@akad/sdk 1.0.29 → 1.0.30
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/auth/index.d.ts +1 -1
- package/constants/index.d.ts +1 -0
- package/package.json +1 -1
- package/ts-lib.js +491 -485
- package/ts-lib.umd.cjs +6 -6
package/ts-lib.js
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
function me(e) {
|
|
2
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
|
-
function
|
|
4
|
+
function it(e) {
|
|
5
5
|
if (!e || typeof e != "string")
|
|
6
6
|
return { endpoint: "unknown", endpointIds: [] };
|
|
7
7
|
const t = e.replace(/^https?:\/\/[^/]+/, "").split("?")[0].split("/").filter(Boolean), n = t.filter((s) => !me(s)), r = t.filter((s) => me(s));
|
|
8
8
|
return { endpoint: n.map((s) => s.replace(/[^a-z0-9-]/gi, "-").toLowerCase()).join("-") || "unknown", endpointIds: r };
|
|
9
9
|
}
|
|
10
|
-
const
|
|
11
|
-
function
|
|
10
|
+
const at = "pushRequestEvent: url must be a non-empty string (not undefined, null, empty, or whitespace-only)";
|
|
11
|
+
function ct(e) {
|
|
12
12
|
return typeof e == "string" && e.trim().length > 0;
|
|
13
13
|
}
|
|
14
|
-
function
|
|
14
|
+
function ut(e) {
|
|
15
15
|
if (!e || typeof e != "string")
|
|
16
16
|
return {};
|
|
17
17
|
const t = e.indexOf("?");
|
|
@@ -20,10 +20,10 @@ function ct(e) {
|
|
|
20
20
|
const n = e.slice(t + 1);
|
|
21
21
|
return Object.fromEntries(new URLSearchParams(n));
|
|
22
22
|
}
|
|
23
|
-
function
|
|
24
|
-
if (!
|
|
25
|
-
throw new Error(
|
|
26
|
-
const { includeEndpointIds: r = !1, includeQueryParams: s = [] } = n, { endpoint:
|
|
23
|
+
function lt(e, t, n = {}) {
|
|
24
|
+
if (!ct(e))
|
|
25
|
+
throw new Error(at);
|
|
26
|
+
const { includeEndpointIds: r = !1, includeQueryParams: s = [] } = n, { endpoint: i, endpointIds: o } = it(e), c = `request-${i}`;
|
|
27
27
|
if (typeof window > "u" || !window.dataLayer)
|
|
28
28
|
return;
|
|
29
29
|
const l = {
|
|
@@ -31,8 +31,8 @@ function ut(e, t, n = {}) {
|
|
|
31
31
|
requestLabel: c,
|
|
32
32
|
requestStatus: t
|
|
33
33
|
};
|
|
34
|
-
if (r &&
|
|
35
|
-
const d =
|
|
34
|
+
if (r && o.length && (l.requestEndpointIds = o), Array.isArray(s) && s.length) {
|
|
35
|
+
const d = ut(e), a = s.reduce(
|
|
36
36
|
(f, h) => (h in d && (f[h] = d[h]), f),
|
|
37
37
|
{}
|
|
38
38
|
);
|
|
@@ -47,35 +47,35 @@ function ye(e, t) {
|
|
|
47
47
|
if (!n)
|
|
48
48
|
return;
|
|
49
49
|
const { includeEndpointIds: r, includeQueryParams: s } = e.tracking;
|
|
50
|
-
|
|
50
|
+
lt(n, t, { includeEndpointIds: r, includeQueryParams: s });
|
|
51
51
|
}
|
|
52
52
|
function Be(e, t) {
|
|
53
53
|
return function() {
|
|
54
54
|
return e.apply(t, arguments);
|
|
55
55
|
};
|
|
56
56
|
}
|
|
57
|
-
const { toString:
|
|
58
|
-
const n =
|
|
57
|
+
const { toString: dt } = Object.prototype, { getPrototypeOf: le } = Object, v = /* @__PURE__ */ ((e) => (t) => {
|
|
58
|
+
const n = dt.call(t);
|
|
59
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
|
-
function
|
|
61
|
+
function ft(e) {
|
|
62
62
|
return e !== null && !D(e) && e.constructor !== null && !D(e.constructor) && A(e.constructor.isBuffer) && e.constructor.isBuffer(e);
|
|
63
63
|
}
|
|
64
64
|
const _e = N("ArrayBuffer");
|
|
65
|
-
function
|
|
65
|
+
function ht(e) {
|
|
66
66
|
let t;
|
|
67
67
|
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer && _e(e.buffer), t;
|
|
68
68
|
}
|
|
69
|
-
const
|
|
69
|
+
const pt = G("string"), A = G("function"), Fe = G("number"), K = (e) => e !== null && typeof e == "object", mt = (e) => e === !0 || e === !1, z = (e) => {
|
|
70
70
|
if (v(e) !== "object")
|
|
71
71
|
return !1;
|
|
72
72
|
const t = le(e);
|
|
73
73
|
return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(Symbol.toStringTag in e) && !(Symbol.iterator in e);
|
|
74
|
-
},
|
|
74
|
+
}, yt = N("Date"), wt = N("File"), gt = N("Blob"), bt = N("FileList"), Tt = (e) => K(e) && A(e.pipe), Et = (e) => {
|
|
75
75
|
let t;
|
|
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
|
+
}, St = N("URLSearchParams"), [Rt, Ot, At, Pt] = ["ReadableStream", "Request", "Response", "Headers"].map(N), kt = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
|
|
79
79
|
function I(e, t, { allOwnKeys: n = !1 } = {}) {
|
|
80
80
|
if (e === null || typeof e > "u")
|
|
81
81
|
return;
|
|
@@ -84,10 +84,10 @@ function I(e, t, { allOwnKeys: n = !1 } = {}) {
|
|
|
84
84
|
for (r = 0, s = e.length; r < s; r++)
|
|
85
85
|
t.call(null, e[r], r, e);
|
|
86
86
|
else {
|
|
87
|
-
const
|
|
87
|
+
const i = n ? Object.getOwnPropertyNames(e) : Object.keys(e), o = i.length;
|
|
88
88
|
let c;
|
|
89
|
-
for (r = 0; r <
|
|
90
|
-
c =
|
|
89
|
+
for (r = 0; r < o; r++)
|
|
90
|
+
c = i[r], t.call(null, e[c], c, e);
|
|
91
91
|
}
|
|
92
92
|
}
|
|
93
93
|
function $e(e, t) {
|
|
@@ -102,35 +102,35 @@ function $e(e, t) {
|
|
|
102
102
|
const De = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, Ie = (e) => !D(e) && e !== De;
|
|
103
103
|
function re() {
|
|
104
104
|
const { caseless: e } = Ie(this) && this || {}, t = {}, n = (r, s) => {
|
|
105
|
-
const
|
|
106
|
-
z(t[
|
|
105
|
+
const i = e && $e(t, s) || s;
|
|
106
|
+
z(t[i]) && z(r) ? t[i] = re(t[i], r) : z(r) ? t[i] = re({}, r) : _(r) ? t[i] = r.slice() : t[i] = r;
|
|
107
107
|
};
|
|
108
108
|
for (let r = 0, s = arguments.length; r < s; r++)
|
|
109
109
|
arguments[r] && I(arguments[r], n);
|
|
110
110
|
return t;
|
|
111
111
|
}
|
|
112
|
-
const
|
|
113
|
-
n && A(s) ? e[
|
|
114
|
-
}, { allOwnKeys: r }), e),
|
|
112
|
+
const Nt = (e, t, n, { allOwnKeys: r } = {}) => (I(t, (s, i) => {
|
|
113
|
+
n && A(s) ? e[i] = Be(s, n) : e[i] = s;
|
|
114
|
+
}, { allOwnKeys: r }), e), Ct = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e), xt = (e, t, n, r) => {
|
|
115
115
|
e.prototype = Object.create(t.prototype, r), e.prototype.constructor = e, Object.defineProperty(e, "super", {
|
|
116
116
|
value: t.prototype
|
|
117
117
|
}), n && Object.assign(e.prototype, n);
|
|
118
|
-
},
|
|
119
|
-
let s,
|
|
118
|
+
}, qt = (e, t, n, r) => {
|
|
119
|
+
let s, i, o;
|
|
120
120
|
const c = {};
|
|
121
121
|
if (t = t || {}, e == null)
|
|
122
122
|
return t;
|
|
123
123
|
do {
|
|
124
|
-
for (s = Object.getOwnPropertyNames(e),
|
|
125
|
-
|
|
124
|
+
for (s = Object.getOwnPropertyNames(e), i = s.length; i-- > 0; )
|
|
125
|
+
o = s[i], (!r || r(o, e, t)) && !c[o] && (t[o] = e[o], c[o] = !0);
|
|
126
126
|
e = n !== !1 && le(e);
|
|
127
127
|
} while (e && (!n || n(e, t)) && e !== Object.prototype);
|
|
128
128
|
return t;
|
|
129
|
-
},
|
|
129
|
+
}, Ut = (e, t, n) => {
|
|
130
130
|
e = String(e), (n === void 0 || n > e.length) && (n = e.length), n -= t.length;
|
|
131
131
|
const r = e.indexOf(t, n);
|
|
132
132
|
return r !== -1 && r === n;
|
|
133
|
-
},
|
|
133
|
+
}, Lt = (e) => {
|
|
134
134
|
if (!e)
|
|
135
135
|
return null;
|
|
136
136
|
if (_(e))
|
|
@@ -142,31 +142,31 @@ const kt = (e, t, n, { allOwnKeys: r } = {}) => (I(t, (s, o) => {
|
|
|
142
142
|
for (; t-- > 0; )
|
|
143
143
|
n[t] = e[t];
|
|
144
144
|
return n;
|
|
145
|
-
},
|
|
145
|
+
}, Bt = /* @__PURE__ */ ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" && le(Uint8Array)), _t = (e, t) => {
|
|
146
146
|
const r = (e && e[Symbol.iterator]).call(e);
|
|
147
147
|
let s;
|
|
148
148
|
for (; (s = r.next()) && !s.done; ) {
|
|
149
|
-
const
|
|
150
|
-
t.call(e,
|
|
149
|
+
const i = s.value;
|
|
150
|
+
t.call(e, i[0], i[1]);
|
|
151
151
|
}
|
|
152
|
-
},
|
|
152
|
+
}, Ft = (e, t) => {
|
|
153
153
|
let n;
|
|
154
154
|
const r = [];
|
|
155
155
|
for (; (n = e.exec(t)) !== null; )
|
|
156
156
|
r.push(n);
|
|
157
157
|
return r;
|
|
158
|
-
},
|
|
158
|
+
}, $t = N("HTMLFormElement"), Dt = (e) => e.toLowerCase().replace(
|
|
159
159
|
/[-_\s]([a-z\d])(\w*)/g,
|
|
160
160
|
function(n, r, s) {
|
|
161
161
|
return r.toUpperCase() + s;
|
|
162
162
|
}
|
|
163
|
-
),
|
|
163
|
+
), we = (({ hasOwnProperty: e }) => (t, n) => e.call(t, n))(Object.prototype), It = N("RegExp"), je = (e, t) => {
|
|
164
164
|
const n = Object.getOwnPropertyDescriptors(e), r = {};
|
|
165
|
-
I(n, (s,
|
|
166
|
-
let
|
|
167
|
-
(
|
|
165
|
+
I(n, (s, i) => {
|
|
166
|
+
let o;
|
|
167
|
+
(o = t(s, i, e)) !== !1 && (r[i] = o || s);
|
|
168
168
|
}), Object.defineProperties(e, r);
|
|
169
|
-
},
|
|
169
|
+
}, jt = (e) => {
|
|
170
170
|
je(e, (t, n) => {
|
|
171
171
|
if (A(e) && ["arguments", "caller", "callee"].indexOf(n) !== -1)
|
|
172
172
|
return !1;
|
|
@@ -181,102 +181,102 @@ const kt = (e, t, n, { allOwnKeys: r } = {}) => (I(t, (s, o) => {
|
|
|
181
181
|
});
|
|
182
182
|
}
|
|
183
183
|
});
|
|
184
|
-
},
|
|
184
|
+
}, Ht = (e, t) => {
|
|
185
185
|
const n = {}, r = (s) => {
|
|
186
|
-
s.forEach((
|
|
187
|
-
n[
|
|
186
|
+
s.forEach((i) => {
|
|
187
|
+
n[i] = !0;
|
|
188
188
|
});
|
|
189
189
|
};
|
|
190
190
|
return _(e) ? r(e) : r(String(e).split(t)), n;
|
|
191
|
-
},
|
|
192
|
-
},
|
|
193
|
-
DIGIT:
|
|
191
|
+
}, zt = () => {
|
|
192
|
+
}, Jt = (e, t) => e != null && Number.isFinite(e = +e) ? e : t, Z = "abcdefghijklmnopqrstuvwxyz", ge = "0123456789", He = {
|
|
193
|
+
DIGIT: ge,
|
|
194
194
|
ALPHA: Z,
|
|
195
|
-
ALPHA_DIGIT: Z + Z.toUpperCase() +
|
|
196
|
-
},
|
|
195
|
+
ALPHA_DIGIT: Z + Z.toUpperCase() + ge
|
|
196
|
+
}, Mt = (e = 16, t = He.ALPHA_DIGIT) => {
|
|
197
197
|
let n = "";
|
|
198
198
|
const { length: r } = t;
|
|
199
199
|
for (; e--; )
|
|
200
200
|
n += t[Math.random() * r | 0];
|
|
201
201
|
return n;
|
|
202
202
|
};
|
|
203
|
-
function
|
|
203
|
+
function Vt(e) {
|
|
204
204
|
return !!(e && A(e.append) && e[Symbol.toStringTag] === "FormData" && e[Symbol.iterator]);
|
|
205
205
|
}
|
|
206
|
-
const
|
|
206
|
+
const vt = (e) => {
|
|
207
207
|
const t = new Array(10), n = (r, s) => {
|
|
208
208
|
if (K(r)) {
|
|
209
209
|
if (t.indexOf(r) >= 0)
|
|
210
210
|
return;
|
|
211
211
|
if (!("toJSON" in r)) {
|
|
212
212
|
t[s] = r;
|
|
213
|
-
const
|
|
214
|
-
return I(r, (
|
|
215
|
-
const l = n(
|
|
216
|
-
!D(l) && (
|
|
217
|
-
}), t[s] = void 0,
|
|
213
|
+
const i = _(r) ? [] : {};
|
|
214
|
+
return I(r, (o, c) => {
|
|
215
|
+
const l = n(o, s + 1);
|
|
216
|
+
!D(l) && (i[c] = l);
|
|
217
|
+
}), t[s] = void 0, i;
|
|
218
218
|
}
|
|
219
219
|
}
|
|
220
220
|
return r;
|
|
221
221
|
};
|
|
222
222
|
return n(e, 0);
|
|
223
|
-
},
|
|
223
|
+
}, Gt = N("AsyncFunction"), Kt = (e) => e && (K(e) || A(e)) && A(e.then) && A(e.catch), u = {
|
|
224
224
|
isArray: _,
|
|
225
225
|
isArrayBuffer: _e,
|
|
226
|
-
isBuffer:
|
|
227
|
-
isFormData:
|
|
228
|
-
isArrayBufferView:
|
|
229
|
-
isString:
|
|
226
|
+
isBuffer: ft,
|
|
227
|
+
isFormData: Et,
|
|
228
|
+
isArrayBufferView: ht,
|
|
229
|
+
isString: pt,
|
|
230
230
|
isNumber: Fe,
|
|
231
|
-
isBoolean:
|
|
231
|
+
isBoolean: mt,
|
|
232
232
|
isObject: K,
|
|
233
233
|
isPlainObject: z,
|
|
234
|
-
isReadableStream:
|
|
235
|
-
isRequest:
|
|
236
|
-
isResponse:
|
|
237
|
-
isHeaders:
|
|
234
|
+
isReadableStream: Rt,
|
|
235
|
+
isRequest: Ot,
|
|
236
|
+
isResponse: At,
|
|
237
|
+
isHeaders: Pt,
|
|
238
238
|
isUndefined: D,
|
|
239
|
-
isDate:
|
|
240
|
-
isFile:
|
|
239
|
+
isDate: yt,
|
|
240
|
+
isFile: wt,
|
|
241
241
|
isBlob: gt,
|
|
242
|
-
isRegExp:
|
|
242
|
+
isRegExp: It,
|
|
243
243
|
isFunction: A,
|
|
244
|
-
isStream:
|
|
245
|
-
isURLSearchParams:
|
|
246
|
-
isTypedArray:
|
|
247
|
-
isFileList:
|
|
244
|
+
isStream: Tt,
|
|
245
|
+
isURLSearchParams: St,
|
|
246
|
+
isTypedArray: Bt,
|
|
247
|
+
isFileList: bt,
|
|
248
248
|
forEach: I,
|
|
249
249
|
merge: re,
|
|
250
|
-
extend:
|
|
251
|
-
trim:
|
|
252
|
-
stripBOM:
|
|
253
|
-
inherits:
|
|
254
|
-
toFlatObject:
|
|
250
|
+
extend: Nt,
|
|
251
|
+
trim: kt,
|
|
252
|
+
stripBOM: Ct,
|
|
253
|
+
inherits: xt,
|
|
254
|
+
toFlatObject: qt,
|
|
255
255
|
kindOf: v,
|
|
256
256
|
kindOfTest: N,
|
|
257
|
-
endsWith:
|
|
258
|
-
toArray:
|
|
259
|
-
forEachEntry:
|
|
260
|
-
matchAll:
|
|
261
|
-
isHTMLForm:
|
|
262
|
-
hasOwnProperty:
|
|
263
|
-
hasOwnProp:
|
|
257
|
+
endsWith: Ut,
|
|
258
|
+
toArray: Lt,
|
|
259
|
+
forEachEntry: _t,
|
|
260
|
+
matchAll: Ft,
|
|
261
|
+
isHTMLForm: $t,
|
|
262
|
+
hasOwnProperty: we,
|
|
263
|
+
hasOwnProp: we,
|
|
264
264
|
// an alias to avoid ESLint no-prototype-builtins detection
|
|
265
265
|
reduceDescriptors: je,
|
|
266
|
-
freezeMethods:
|
|
267
|
-
toObjectSet:
|
|
268
|
-
toCamelCase:
|
|
269
|
-
noop:
|
|
270
|
-
toFiniteNumber:
|
|
266
|
+
freezeMethods: jt,
|
|
267
|
+
toObjectSet: Ht,
|
|
268
|
+
toCamelCase: Dt,
|
|
269
|
+
noop: zt,
|
|
270
|
+
toFiniteNumber: Jt,
|
|
271
271
|
findKey: $e,
|
|
272
272
|
global: De,
|
|
273
273
|
isContextDefined: Ie,
|
|
274
274
|
ALPHABET: He,
|
|
275
|
-
generateString:
|
|
276
|
-
isSpecCompliantForm:
|
|
277
|
-
toJSONObject:
|
|
278
|
-
isAsyncFn:
|
|
279
|
-
isThenable:
|
|
275
|
+
generateString: Mt,
|
|
276
|
+
isSpecCompliantForm: Vt,
|
|
277
|
+
toJSONObject: vt,
|
|
278
|
+
isAsyncFn: Gt,
|
|
279
|
+
isThenable: Kt
|
|
280
280
|
};
|
|
281
281
|
function y(e, t, n, r, s) {
|
|
282
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);
|
|
@@ -322,13 +322,13 @@ 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, n, r, s,
|
|
326
|
-
const
|
|
327
|
-
return u.toFlatObject(e,
|
|
325
|
+
y.from = (e, t, n, r, s, i) => {
|
|
326
|
+
const o = Object.create(ze);
|
|
327
|
+
return u.toFlatObject(e, o, function(l) {
|
|
328
328
|
return l !== Error.prototype;
|
|
329
|
-
}, (c) => c !== "isAxiosError"), y.call(
|
|
329
|
+
}, (c) => c !== "isAxiosError"), y.call(o, e.message, t, n, r, s), o.cause = e, o.name = e.name, i && Object.assign(o, i), o;
|
|
330
330
|
};
|
|
331
|
-
const
|
|
331
|
+
const Qt = null;
|
|
332
332
|
function se(e) {
|
|
333
333
|
return u.isPlainObject(e) || u.isArray(e);
|
|
334
334
|
}
|
|
@@ -336,14 +336,14 @@ function Me(e) {
|
|
|
336
336
|
return u.endsWith(e, "[]") ? e.slice(0, -2) : e;
|
|
337
337
|
}
|
|
338
338
|
function be(e, t, n) {
|
|
339
|
-
return e ? e.concat(t).map(function(s,
|
|
340
|
-
return s = Me(s), !n &&
|
|
339
|
+
return e ? e.concat(t).map(function(s, i) {
|
|
340
|
+
return s = Me(s), !n && i ? "[" + s + "]" : s;
|
|
341
341
|
}).join(n ? "." : "") : t;
|
|
342
342
|
}
|
|
343
|
-
function
|
|
343
|
+
function Wt(e) {
|
|
344
344
|
return u.isArray(e) && !e.some(se);
|
|
345
345
|
}
|
|
346
|
-
const
|
|
346
|
+
const Xt = u.toFlatObject(u, {}, null, function(t) {
|
|
347
347
|
return /^is[A-Z]/.test(t);
|
|
348
348
|
});
|
|
349
349
|
function Q(e, t, n) {
|
|
@@ -353,10 +353,10 @@ function Q(e, t, n) {
|
|
|
353
353
|
metaTokens: !0,
|
|
354
354
|
dots: !1,
|
|
355
355
|
indexes: !1
|
|
356
|
-
}, !1, function(
|
|
357
|
-
return !u.isUndefined(E[
|
|
356
|
+
}, !1, function(w, E) {
|
|
357
|
+
return !u.isUndefined(E[w]);
|
|
358
358
|
});
|
|
359
|
-
const r = n.metaTokens, s = n.visitor || a,
|
|
359
|
+
const r = n.metaTokens, s = n.visitor || a, i = n.dots, o = 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) {
|
|
@@ -368,39 +368,39 @@ function Q(e, t, n) {
|
|
|
368
368
|
throw new y("Blob is not supported. Use a Buffer instead.");
|
|
369
369
|
return u.isArrayBuffer(p) || u.isTypedArray(p) ? l && typeof Blob == "function" ? new Blob([p]) : Buffer.from(p) : p;
|
|
370
370
|
}
|
|
371
|
-
function a(p,
|
|
371
|
+
function a(p, w, E) {
|
|
372
372
|
let T = p;
|
|
373
373
|
if (p && !E && typeof p == "object") {
|
|
374
|
-
if (u.endsWith(
|
|
375
|
-
|
|
376
|
-
else if (u.isArray(p) &&
|
|
377
|
-
return
|
|
378
|
-
!(u.isUndefined(
|
|
374
|
+
if (u.endsWith(w, "{}"))
|
|
375
|
+
w = r ? w : w.slice(0, -2), p = JSON.stringify(p);
|
|
376
|
+
else if (u.isArray(p) && Wt(p) || (u.isFileList(p) || u.endsWith(w, "[]")) && (T = u.toArray(p)))
|
|
377
|
+
return w = Me(w), T.forEach(function(g, O) {
|
|
378
|
+
!(u.isUndefined(g) || g === null) && t.append(
|
|
379
379
|
// eslint-disable-next-line no-nested-ternary
|
|
380
|
-
|
|
381
|
-
d(
|
|
380
|
+
o === !0 ? be([w], O, i) : o === null ? w : w + "[]",
|
|
381
|
+
d(g)
|
|
382
382
|
);
|
|
383
383
|
}), !1;
|
|
384
384
|
}
|
|
385
|
-
return se(p) ? !0 : (t.append(be(E,
|
|
385
|
+
return se(p) ? !0 : (t.append(be(E, w, i), d(p)), !1);
|
|
386
386
|
}
|
|
387
|
-
const f = [], h = Object.assign(
|
|
387
|
+
const f = [], h = Object.assign(Xt, {
|
|
388
388
|
defaultVisitor: a,
|
|
389
389
|
convertValue: d,
|
|
390
390
|
isVisitable: se
|
|
391
391
|
});
|
|
392
|
-
function m(p,
|
|
392
|
+
function m(p, w) {
|
|
393
393
|
if (!u.isUndefined(p)) {
|
|
394
394
|
if (f.indexOf(p) !== -1)
|
|
395
|
-
throw Error("Circular reference detected in " +
|
|
395
|
+
throw Error("Circular reference detected in " + w.join("."));
|
|
396
396
|
f.push(p), u.forEach(p, function(T, R) {
|
|
397
397
|
(!(u.isUndefined(T) || T === null) && s.call(
|
|
398
398
|
t,
|
|
399
399
|
T,
|
|
400
400
|
u.isString(R) ? R.trim() : R,
|
|
401
|
-
|
|
401
|
+
w,
|
|
402
402
|
h
|
|
403
|
-
)) === !0 && m(T,
|
|
403
|
+
)) === !0 && m(T, w ? w.concat(R) : [R]);
|
|
404
404
|
}), f.pop();
|
|
405
405
|
}
|
|
406
406
|
}
|
|
@@ -437,17 +437,17 @@ Ve.toString = function(t) {
|
|
|
437
437
|
return n(s[0]) + "=" + n(s[1]);
|
|
438
438
|
}, "").join("&");
|
|
439
439
|
};
|
|
440
|
-
function
|
|
440
|
+
function Zt(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
443
|
function ve(e, t, n) {
|
|
444
444
|
if (!t)
|
|
445
445
|
return e;
|
|
446
|
-
const r = n && n.encode ||
|
|
447
|
-
let
|
|
448
|
-
if (s ?
|
|
449
|
-
const
|
|
450
|
-
|
|
446
|
+
const r = n && n.encode || Zt, s = n && n.serialize;
|
|
447
|
+
let i;
|
|
448
|
+
if (s ? i = s(t, n) : i = u.isURLSearchParams(t) ? t.toString() : new de(t, n).toString(r), i) {
|
|
449
|
+
const o = e.indexOf("#");
|
|
450
|
+
o !== -1 && (e = e.slice(0, o)), e += (e.indexOf("?") === -1 ? "?" : "&") + i;
|
|
451
451
|
}
|
|
452
452
|
return e;
|
|
453
453
|
}
|
|
@@ -509,61 +509,61 @@ const Ge = {
|
|
|
509
509
|
silentJSONParsing: !0,
|
|
510
510
|
forcedJSONParsing: !0,
|
|
511
511
|
clarifyTimeoutError: !1
|
|
512
|
-
},
|
|
512
|
+
}, Yt = typeof URLSearchParams < "u" ? URLSearchParams : de, en = typeof FormData < "u" ? FormData : null, tn = typeof Blob < "u" ? Blob : null, nn = {
|
|
513
513
|
isBrowser: !0,
|
|
514
514
|
classes: {
|
|
515
|
-
URLSearchParams:
|
|
516
|
-
FormData:
|
|
517
|
-
Blob:
|
|
515
|
+
URLSearchParams: Yt,
|
|
516
|
+
FormData: en,
|
|
517
|
+
Blob: tn
|
|
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", rn = ((e) => fe && ["ReactNative", "NativeScript", "NS"].indexOf(e) < 0)(typeof navigator < "u" && navigator.product), sn = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
|
|
521
|
+
self instanceof WorkerGlobalScope && typeof self.importScripts == "function", on = fe && window.location.href || "http://localhost", an = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
522
522
|
__proto__: null,
|
|
523
523
|
hasBrowserEnv: fe,
|
|
524
|
-
hasStandardBrowserEnv:
|
|
525
|
-
hasStandardBrowserWebWorkerEnv:
|
|
526
|
-
origin:
|
|
524
|
+
hasStandardBrowserEnv: rn,
|
|
525
|
+
hasStandardBrowserWebWorkerEnv: sn,
|
|
526
|
+
origin: on
|
|
527
527
|
}, Symbol.toStringTag, { value: "Module" })), k = {
|
|
528
|
-
...
|
|
529
|
-
...
|
|
528
|
+
...an,
|
|
529
|
+
...nn
|
|
530
530
|
};
|
|
531
|
-
function
|
|
531
|
+
function cn(e, t) {
|
|
532
532
|
return Q(e, new k.classes.URLSearchParams(), Object.assign({
|
|
533
|
-
visitor: function(n, r, s,
|
|
534
|
-
return k.isNode && u.isBuffer(n) ? (this.append(r, n.toString("base64")), !1) :
|
|
533
|
+
visitor: function(n, r, s, i) {
|
|
534
|
+
return k.isNode && u.isBuffer(n) ? (this.append(r, n.toString("base64")), !1) : i.defaultVisitor.apply(this, arguments);
|
|
535
535
|
}
|
|
536
536
|
}, t));
|
|
537
537
|
}
|
|
538
|
-
function
|
|
538
|
+
function un(e) {
|
|
539
539
|
return u.matchAll(/\w+|\[(\w*)]/g, e).map((t) => t[0] === "[]" ? "" : t[1] || t[0]);
|
|
540
540
|
}
|
|
541
|
-
function
|
|
541
|
+
function ln(e) {
|
|
542
542
|
const t = {}, n = Object.keys(e);
|
|
543
543
|
let r;
|
|
544
544
|
const s = n.length;
|
|
545
|
-
let
|
|
545
|
+
let i;
|
|
546
546
|
for (r = 0; r < s; r++)
|
|
547
|
-
|
|
547
|
+
i = n[r], t[i] = e[i];
|
|
548
548
|
return t;
|
|
549
549
|
}
|
|
550
550
|
function Ke(e) {
|
|
551
|
-
function t(n, r, s,
|
|
552
|
-
let
|
|
553
|
-
if (
|
|
551
|
+
function t(n, r, s, i) {
|
|
552
|
+
let o = n[i++];
|
|
553
|
+
if (o === "__proto__")
|
|
554
554
|
return !0;
|
|
555
|
-
const c = Number.isFinite(+
|
|
556
|
-
return
|
|
555
|
+
const c = Number.isFinite(+o), l = i >= n.length;
|
|
556
|
+
return o = !o && u.isArray(s) ? s.length : o, l ? (u.hasOwnProp(s, o) ? s[o] = [s[o], r] : s[o] = r, !c) : ((!s[o] || !u.isObject(s[o])) && (s[o] = []), t(n, r, s[o], i) && u.isArray(s[o]) && (s[o] = ln(s[o])), !c);
|
|
557
557
|
}
|
|
558
558
|
if (u.isFormData(e) && u.isFunction(e.entries)) {
|
|
559
559
|
const n = {};
|
|
560
560
|
return u.forEachEntry(e, (r, s) => {
|
|
561
|
-
t(
|
|
561
|
+
t(un(r), s, n, 0);
|
|
562
562
|
}), n;
|
|
563
563
|
}
|
|
564
564
|
return null;
|
|
565
565
|
}
|
|
566
|
-
function
|
|
566
|
+
function dn(e, t, n) {
|
|
567
567
|
if (u.isString(e))
|
|
568
568
|
try {
|
|
569
569
|
return (t || JSON.parse)(e), u.trim(e);
|
|
@@ -577,8 +577,8 @@ const j = {
|
|
|
577
577
|
transitional: Ge,
|
|
578
578
|
adapter: ["xhr", "http", "fetch"],
|
|
579
579
|
transformRequest: [function(t, n) {
|
|
580
|
-
const r = n.getContentType() || "", s = r.indexOf("application/json") > -1,
|
|
581
|
-
if (
|
|
580
|
+
const r = n.getContentType() || "", s = r.indexOf("application/json") > -1, i = u.isObject(t);
|
|
581
|
+
if (i && 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))
|
|
584
584
|
return t;
|
|
@@ -587,9 +587,9 @@ const j = {
|
|
|
587
587
|
if (u.isURLSearchParams(t))
|
|
588
588
|
return n.setContentType("application/x-www-form-urlencoded;charset=utf-8", !1), t.toString();
|
|
589
589
|
let c;
|
|
590
|
-
if (
|
|
590
|
+
if (i) {
|
|
591
591
|
if (r.indexOf("application/x-www-form-urlencoded") > -1)
|
|
592
|
-
return
|
|
592
|
+
return cn(t, this.formSerializer).toString();
|
|
593
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(
|
|
@@ -599,18 +599,18 @@ const j = {
|
|
|
599
599
|
);
|
|
600
600
|
}
|
|
601
601
|
}
|
|
602
|
-
return
|
|
602
|
+
return i || s ? (n.setContentType("application/json", !1), dn(t)) : t;
|
|
603
603
|
}],
|
|
604
604
|
transformResponse: [function(t) {
|
|
605
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
608
|
if (t && u.isString(t) && (r && !this.responseType || s)) {
|
|
609
|
-
const
|
|
609
|
+
const o = !(n && n.silentJSONParsing) && s;
|
|
610
610
|
try {
|
|
611
611
|
return JSON.parse(t);
|
|
612
612
|
} catch (c) {
|
|
613
|
-
if (
|
|
613
|
+
if (o)
|
|
614
614
|
throw c.name === "SyntaxError" ? y.from(c, y.ERR_BAD_RESPONSE, this, null, this.response) : c;
|
|
615
615
|
}
|
|
616
616
|
}
|
|
@@ -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 fn = u.toObjectSet([
|
|
646
646
|
"age",
|
|
647
647
|
"authorization",
|
|
648
648
|
"content-length",
|
|
@@ -660,12 +660,12 @@ const dn = u.toObjectSet([
|
|
|
660
660
|
"referer",
|
|
661
661
|
"retry-after",
|
|
662
662
|
"user-agent"
|
|
663
|
-
]),
|
|
663
|
+
]), hn = (e) => {
|
|
664
664
|
const t = {};
|
|
665
665
|
let n, r, s;
|
|
666
666
|
return e && e.split(`
|
|
667
|
-
`).forEach(function(
|
|
668
|
-
s =
|
|
667
|
+
`).forEach(function(o) {
|
|
668
|
+
s = o.indexOf(":"), n = o.substring(0, s).trim().toLowerCase(), r = o.substring(s + 1).trim(), !(!n || t[n] && fn[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,14 +674,14 @@ 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
|
|
677
|
+
function pn(e) {
|
|
678
678
|
const t = /* @__PURE__ */ Object.create(null), n = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
|
|
679
679
|
let r;
|
|
680
680
|
for (; r = n.exec(e); )
|
|
681
681
|
t[r[1]] = r[2];
|
|
682
682
|
return t;
|
|
683
683
|
}
|
|
684
|
-
const
|
|
684
|
+
const mn = (e) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());
|
|
685
685
|
function Y(e, t, n, r, s) {
|
|
686
686
|
if (u.isFunction(r))
|
|
687
687
|
return r.call(this, t, n);
|
|
@@ -692,15 +692,15 @@ function Y(e, t, n, r, s) {
|
|
|
692
692
|
return r.test(t);
|
|
693
693
|
}
|
|
694
694
|
}
|
|
695
|
-
function
|
|
695
|
+
function yn(e) {
|
|
696
696
|
return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (t, n, r) => n.toUpperCase() + r);
|
|
697
697
|
}
|
|
698
|
-
function
|
|
698
|
+
function wn(e, t) {
|
|
699
699
|
const n = u.toCamelCase(" " + t);
|
|
700
700
|
["get", "set", "has"].forEach((r) => {
|
|
701
701
|
Object.defineProperty(e, r + n, {
|
|
702
|
-
value: function(s,
|
|
703
|
-
return this[r].call(this, t, s,
|
|
702
|
+
value: function(s, i, o) {
|
|
703
|
+
return this[r].call(this, t, s, i, o);
|
|
704
704
|
},
|
|
705
705
|
configurable: !0
|
|
706
706
|
});
|
|
@@ -712,23 +712,23 @@ let S = class {
|
|
|
712
712
|
}
|
|
713
713
|
set(t, n, r) {
|
|
714
714
|
const s = this;
|
|
715
|
-
function
|
|
715
|
+
function i(c, l, d) {
|
|
716
716
|
const a = $(l);
|
|
717
717
|
if (!a)
|
|
718
718
|
throw new Error("header name must be a non-empty string");
|
|
719
719
|
const f = u.findKey(s, a);
|
|
720
720
|
(!f || s[f] === void 0 || d === !0 || d === void 0 && s[f] !== !1) && (s[f || l] = J(c));
|
|
721
721
|
}
|
|
722
|
-
const
|
|
722
|
+
const o = (c, l) => u.forEach(c, (d, a) => i(d, a, l));
|
|
723
723
|
if (u.isPlainObject(t) || t instanceof this.constructor)
|
|
724
|
-
|
|
725
|
-
else if (u.isString(t) && (t = t.trim()) && !
|
|
726
|
-
|
|
724
|
+
o(t, n);
|
|
725
|
+
else if (u.isString(t) && (t = t.trim()) && !mn(t))
|
|
726
|
+
o(hn(t), n);
|
|
727
727
|
else if (u.isHeaders(t))
|
|
728
728
|
for (const [c, l] of t.entries())
|
|
729
|
-
|
|
729
|
+
i(l, c, r);
|
|
730
730
|
else
|
|
731
|
-
t != null &&
|
|
731
|
+
t != null && i(n, t, r);
|
|
732
732
|
return this;
|
|
733
733
|
}
|
|
734
734
|
get(t, n) {
|
|
@@ -739,7 +739,7 @@ let S = class {
|
|
|
739
739
|
if (!n)
|
|
740
740
|
return s;
|
|
741
741
|
if (n === !0)
|
|
742
|
-
return
|
|
742
|
+
return pn(s);
|
|
743
743
|
if (u.isFunction(n))
|
|
744
744
|
return n.call(this, s, r);
|
|
745
745
|
if (u.isRegExp(n))
|
|
@@ -758,33 +758,33 @@ let S = class {
|
|
|
758
758
|
delete(t, n) {
|
|
759
759
|
const r = this;
|
|
760
760
|
let s = !1;
|
|
761
|
-
function o
|
|
762
|
-
if (
|
|
763
|
-
const c = u.findKey(r,
|
|
761
|
+
function i(o) {
|
|
762
|
+
if (o = $(o), o) {
|
|
763
|
+
const c = u.findKey(r, o);
|
|
764
764
|
c && (!n || Y(r, r[c], c, n)) && (delete r[c], s = !0);
|
|
765
765
|
}
|
|
766
766
|
}
|
|
767
|
-
return u.isArray(t) ? t.forEach(
|
|
767
|
+
return u.isArray(t) ? t.forEach(i) : i(t), s;
|
|
768
768
|
}
|
|
769
769
|
clear(t) {
|
|
770
770
|
const n = Object.keys(this);
|
|
771
771
|
let r = n.length, s = !1;
|
|
772
772
|
for (; r--; ) {
|
|
773
|
-
const
|
|
774
|
-
(!t || Y(this, this[
|
|
773
|
+
const i = n[r];
|
|
774
|
+
(!t || Y(this, this[i], i, t, !0)) && (delete this[i], s = !0);
|
|
775
775
|
}
|
|
776
776
|
return s;
|
|
777
777
|
}
|
|
778
778
|
normalize(t) {
|
|
779
779
|
const n = this, r = {};
|
|
780
|
-
return u.forEach(this, (s,
|
|
781
|
-
const
|
|
782
|
-
if (
|
|
783
|
-
n[
|
|
780
|
+
return u.forEach(this, (s, i) => {
|
|
781
|
+
const o = u.findKey(r, i);
|
|
782
|
+
if (o) {
|
|
783
|
+
n[o] = J(s), delete n[i];
|
|
784
784
|
return;
|
|
785
785
|
}
|
|
786
|
-
const c = t ?
|
|
787
|
-
c !==
|
|
786
|
+
const c = t ? yn(i) : String(i).trim();
|
|
787
|
+
c !== i && delete n[i], n[c] = J(s), r[c] = !0;
|
|
788
788
|
}), this;
|
|
789
789
|
}
|
|
790
790
|
concat(...t) {
|
|
@@ -817,11 +817,11 @@ let S = class {
|
|
|
817
817
|
const r = (this[Se] = this[Se] = {
|
|
818
818
|
accessors: {}
|
|
819
819
|
}).accessors, s = this.prototype;
|
|
820
|
-
function o
|
|
821
|
-
const c = $(
|
|
822
|
-
r[c] || (
|
|
820
|
+
function i(o) {
|
|
821
|
+
const c = $(o);
|
|
822
|
+
r[c] || (wn(s, o), r[c] = !0);
|
|
823
823
|
}
|
|
824
|
-
return u.isArray(t) ? t.forEach(
|
|
824
|
+
return u.isArray(t) ? t.forEach(i) : i(t), this;
|
|
825
825
|
}
|
|
826
826
|
};
|
|
827
827
|
S.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]);
|
|
@@ -837,10 +837,10 @@ u.reduceDescriptors(S.prototype, ({ value: e }, t) => {
|
|
|
837
837
|
u.freezeMethods(S);
|
|
838
838
|
function ee(e, t) {
|
|
839
839
|
const n = this || j, r = t || n, s = S.from(r.headers);
|
|
840
|
-
let
|
|
840
|
+
let i = r.data;
|
|
841
841
|
return u.forEach(e, function(c) {
|
|
842
|
-
|
|
843
|
-
}), s.normalize(),
|
|
842
|
+
i = c.call(n, i, s.normalize(), t ? t.status : void 0);
|
|
843
|
+
}), s.normalize(), i;
|
|
844
844
|
}
|
|
845
845
|
function Qe(e) {
|
|
846
846
|
return !!(e && e.__CANCEL__);
|
|
@@ -865,60 +865,60 @@ function gn(e) {
|
|
|
865
865
|
const t = /^([-+\w]{1,25})(:?\/\/|:)/.exec(e);
|
|
866
866
|
return t && t[1] || "";
|
|
867
867
|
}
|
|
868
|
-
function
|
|
868
|
+
function bn(e, t) {
|
|
869
869
|
e = e || 10;
|
|
870
870
|
const n = new Array(e), r = new Array(e);
|
|
871
|
-
let s = 0,
|
|
871
|
+
let s = 0, i = 0, o;
|
|
872
872
|
return t = t !== void 0 ? t : 1e3, function(l) {
|
|
873
|
-
const d = Date.now(), a = r[
|
|
874
|
-
|
|
875
|
-
let f =
|
|
873
|
+
const d = Date.now(), a = r[i];
|
|
874
|
+
o || (o = d), n[s] = l, r[s] = d;
|
|
875
|
+
let f = i, h = 0;
|
|
876
876
|
for (; f !== s; )
|
|
877
877
|
h += n[f++], f = f % e;
|
|
878
|
-
if (s = (s + 1) % e, s ===
|
|
878
|
+
if (s = (s + 1) % e, s === i && (i = (i + 1) % e), d - o < 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
|
|
884
|
+
function Tn(e, t) {
|
|
885
885
|
let n = 0;
|
|
886
886
|
const r = 1e3 / t;
|
|
887
887
|
let s = null;
|
|
888
888
|
return function() {
|
|
889
|
-
const
|
|
890
|
-
if (
|
|
889
|
+
const o = this === !0, c = Date.now();
|
|
890
|
+
if (o || c - n > r)
|
|
891
891
|
return s && (clearTimeout(s), s = null), n = c, e.apply(null, arguments);
|
|
892
892
|
s || (s = setTimeout(() => (s = null, n = Date.now(), e.apply(null, arguments)), r - (c - n)));
|
|
893
893
|
};
|
|
894
894
|
}
|
|
895
895
|
const M = (e, t, n = 3) => {
|
|
896
896
|
let r = 0;
|
|
897
|
-
const s =
|
|
898
|
-
return
|
|
899
|
-
const
|
|
900
|
-
r =
|
|
897
|
+
const s = bn(50, 250);
|
|
898
|
+
return Tn((i) => {
|
|
899
|
+
const o = i.loaded, c = i.lengthComputable ? i.total : void 0, l = o - r, d = s(l), a = o <= c;
|
|
900
|
+
r = o;
|
|
901
901
|
const f = {
|
|
902
|
-
loaded:
|
|
902
|
+
loaded: o,
|
|
903
903
|
total: c,
|
|
904
|
-
progress: c ?
|
|
904
|
+
progress: c ? o / c : void 0,
|
|
905
905
|
bytes: l,
|
|
906
906
|
rate: d || void 0,
|
|
907
|
-
estimated: d && c && a ? (c -
|
|
908
|
-
event:
|
|
907
|
+
estimated: d && c && a ? (c - o) / d : void 0,
|
|
908
|
+
event: i,
|
|
909
909
|
lengthComputable: c != null
|
|
910
910
|
};
|
|
911
911
|
f[t ? "download" : "upload"] = !0, e(f);
|
|
912
912
|
}, n);
|
|
913
|
-
},
|
|
913
|
+
}, En = 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
917
|
const t = /(msie|trident)/i.test(navigator.userAgent), n = document.createElement("a");
|
|
918
918
|
let r;
|
|
919
|
-
function s(
|
|
920
|
-
let
|
|
921
|
-
return t && (n.setAttribute("href",
|
|
919
|
+
function s(i) {
|
|
920
|
+
let o = i;
|
|
921
|
+
return t && (n.setAttribute("href", o), o = n.href), n.setAttribute("href", o), {
|
|
922
922
|
href: n.href,
|
|
923
923
|
protocol: n.protocol ? n.protocol.replace(/:$/, "") : "",
|
|
924
924
|
host: n.host,
|
|
@@ -929,8 +929,8 @@ const M = (e, t, n = 3) => {
|
|
|
929
929
|
pathname: n.pathname.charAt(0) === "/" ? n.pathname : "/" + n.pathname
|
|
930
930
|
};
|
|
931
931
|
}
|
|
932
|
-
return r = s(window.location.href), function(
|
|
933
|
-
const c = u.isString(
|
|
932
|
+
return r = s(window.location.href), function(o) {
|
|
933
|
+
const c = u.isString(o) ? s(o) : o;
|
|
934
934
|
return c.protocol === r.protocol && c.host === r.host;
|
|
935
935
|
};
|
|
936
936
|
}()
|
|
@@ -941,12 +941,12 @@ const M = (e, t, n = 3) => {
|
|
|
941
941
|
return !0;
|
|
942
942
|
};
|
|
943
943
|
}()
|
|
944
|
-
),
|
|
944
|
+
), Sn = k.hasStandardBrowserEnv ? (
|
|
945
945
|
// Standard browser envs support document.cookie
|
|
946
946
|
{
|
|
947
|
-
write(e, t, n, r, s,
|
|
948
|
-
const
|
|
949
|
-
u.isNumber(n) &&
|
|
947
|
+
write(e, t, n, r, s, i) {
|
|
948
|
+
const o = [e + "=" + encodeURIComponent(t)];
|
|
949
|
+
u.isNumber(n) && o.push("expires=" + new Date(n).toGMTString()), u.isString(r) && o.push("path=" + r), u.isString(s) && o.push("domain=" + s), i === !0 && o.push("secure"), document.cookie = o.join("; ");
|
|
950
950
|
},
|
|
951
951
|
read(e) {
|
|
952
952
|
const t = document.cookie.match(new RegExp("(^|;\\s*)(" + e + ")=([^;]*)"));
|
|
@@ -968,14 +968,14 @@ const M = (e, t, n = 3) => {
|
|
|
968
968
|
}
|
|
969
969
|
}
|
|
970
970
|
);
|
|
971
|
-
function
|
|
971
|
+
function Rn(e) {
|
|
972
972
|
return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(e);
|
|
973
973
|
}
|
|
974
|
-
function
|
|
974
|
+
function On(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 && !Rn(t) ? On(e, t) : t;
|
|
979
979
|
}
|
|
980
980
|
const Re = (e) => e instanceof S ? { ...e } : e;
|
|
981
981
|
function L(e, t) {
|
|
@@ -991,11 +991,11 @@ function L(e, t) {
|
|
|
991
991
|
} else
|
|
992
992
|
return r(d, a, f);
|
|
993
993
|
}
|
|
994
|
-
function
|
|
994
|
+
function i(d, a) {
|
|
995
995
|
if (!u.isUndefined(a))
|
|
996
996
|
return r(void 0, a);
|
|
997
997
|
}
|
|
998
|
-
function
|
|
998
|
+
function o(d, a) {
|
|
999
999
|
if (u.isUndefined(a)) {
|
|
1000
1000
|
if (!u.isUndefined(d))
|
|
1001
1001
|
return r(void 0, d);
|
|
@@ -1009,33 +1009,33 @@ function L(e, t) {
|
|
|
1009
1009
|
return r(void 0, d);
|
|
1010
1010
|
}
|
|
1011
1011
|
const l = {
|
|
1012
|
-
url:
|
|
1013
|
-
method:
|
|
1014
|
-
data:
|
|
1015
|
-
baseURL:
|
|
1016
|
-
transformRequest:
|
|
1017
|
-
transformResponse:
|
|
1018
|
-
paramsSerializer:
|
|
1019
|
-
timeout:
|
|
1020
|
-
timeoutMessage:
|
|
1021
|
-
withCredentials:
|
|
1022
|
-
withXSRFToken:
|
|
1023
|
-
adapter:
|
|
1024
|
-
responseType:
|
|
1025
|
-
xsrfCookieName:
|
|
1026
|
-
xsrfHeaderName:
|
|
1027
|
-
onUploadProgress:
|
|
1028
|
-
onDownloadProgress:
|
|
1029
|
-
decompress:
|
|
1030
|
-
maxContentLength:
|
|
1031
|
-
maxBodyLength:
|
|
1032
|
-
beforeRedirect:
|
|
1033
|
-
transport:
|
|
1034
|
-
httpAgent:
|
|
1035
|
-
httpsAgent:
|
|
1036
|
-
cancelToken:
|
|
1037
|
-
socketPath:
|
|
1038
|
-
responseEncoding:
|
|
1012
|
+
url: i,
|
|
1013
|
+
method: i,
|
|
1014
|
+
data: i,
|
|
1015
|
+
baseURL: o,
|
|
1016
|
+
transformRequest: o,
|
|
1017
|
+
transformResponse: o,
|
|
1018
|
+
paramsSerializer: o,
|
|
1019
|
+
timeout: o,
|
|
1020
|
+
timeoutMessage: o,
|
|
1021
|
+
withCredentials: o,
|
|
1022
|
+
withXSRFToken: o,
|
|
1023
|
+
adapter: o,
|
|
1024
|
+
responseType: o,
|
|
1025
|
+
xsrfCookieName: o,
|
|
1026
|
+
xsrfHeaderName: o,
|
|
1027
|
+
onUploadProgress: o,
|
|
1028
|
+
onDownloadProgress: o,
|
|
1029
|
+
decompress: o,
|
|
1030
|
+
maxContentLength: o,
|
|
1031
|
+
maxBodyLength: o,
|
|
1032
|
+
beforeRedirect: o,
|
|
1033
|
+
transport: o,
|
|
1034
|
+
httpAgent: o,
|
|
1035
|
+
httpsAgent: o,
|
|
1036
|
+
cancelToken: o,
|
|
1037
|
+
socketPath: o,
|
|
1038
|
+
responseEncoding: o,
|
|
1039
1039
|
validateStatus: c,
|
|
1040
1040
|
headers: (d, a) => s(Re(d), Re(a), !0)
|
|
1041
1041
|
};
|
|
@@ -1046,30 +1046,30 @@ function L(e, t) {
|
|
|
1046
1046
|
}
|
|
1047
1047
|
const Ze = (e) => {
|
|
1048
1048
|
const t = L({}, e);
|
|
1049
|
-
let { data: n, withXSRFToken: r, xsrfHeaderName: s, xsrfCookieName:
|
|
1050
|
-
t.headers =
|
|
1049
|
+
let { data: n, withXSRFToken: r, xsrfHeaderName: s, xsrfCookieName: i, headers: o, auth: c } = t;
|
|
1050
|
+
t.headers = o = S.from(o), t.url = ve(Xe(t.baseURL, t.url), e.params, e.paramsSerializer), c && o.set(
|
|
1051
1051
|
"Authorization",
|
|
1052
1052
|
"Basic " + btoa((c.username || "") + ":" + (c.password ? unescape(encodeURIComponent(c.password)) : ""))
|
|
1053
1053
|
);
|
|
1054
1054
|
let l;
|
|
1055
1055
|
if (u.isFormData(n)) {
|
|
1056
1056
|
if (k.hasStandardBrowserEnv || k.hasStandardBrowserWebWorkerEnv)
|
|
1057
|
-
|
|
1058
|
-
else if ((l =
|
|
1057
|
+
o.setContentType(void 0);
|
|
1058
|
+
else if ((l = o.getContentType()) !== !1) {
|
|
1059
1059
|
const [d, ...a] = l ? l.split(";").map((f) => f.trim()).filter(Boolean) : [];
|
|
1060
|
-
|
|
1060
|
+
o.setContentType([d || "multipart/form-data", ...a].join("; "));
|
|
1061
1061
|
}
|
|
1062
1062
|
}
|
|
1063
|
-
if (k.hasStandardBrowserEnv && (r && u.isFunction(r) && (r = r(t)), r || r !== !1 &&
|
|
1064
|
-
const d = s &&
|
|
1065
|
-
d &&
|
|
1063
|
+
if (k.hasStandardBrowserEnv && (r && u.isFunction(r) && (r = r(t)), r || r !== !1 && En(t.url))) {
|
|
1064
|
+
const d = s && i && Sn.read(i);
|
|
1065
|
+
d && o.set(s, d);
|
|
1066
1066
|
}
|
|
1067
1067
|
return t;
|
|
1068
|
-
},
|
|
1068
|
+
}, An = typeof XMLHttpRequest < "u", Pn = An && function(e) {
|
|
1069
1069
|
return new Promise(function(n, r) {
|
|
1070
1070
|
const s = Ze(e);
|
|
1071
|
-
let
|
|
1072
|
-
const
|
|
1071
|
+
let i = s.data;
|
|
1072
|
+
const o = S.from(s.headers).normalize();
|
|
1073
1073
|
let { responseType: c } = s, l;
|
|
1074
1074
|
function d() {
|
|
1075
1075
|
s.cancelToken && s.cancelToken.unsubscribe(l), s.signal && s.signal.removeEventListener("abort", l);
|
|
@@ -1081,7 +1081,7 @@ const Ze = (e) => {
|
|
|
1081
1081
|
return;
|
|
1082
1082
|
const m = S.from(
|
|
1083
1083
|
"getAllResponseHeaders" in a && a.getAllResponseHeaders()
|
|
1084
|
-
),
|
|
1084
|
+
), w = {
|
|
1085
1085
|
data: !c || c === "text" || c === "json" ? a.responseText : a.response,
|
|
1086
1086
|
status: a.status,
|
|
1087
1087
|
statusText: a.statusText,
|
|
@@ -1093,7 +1093,7 @@ const Ze = (e) => {
|
|
|
1093
1093
|
n(T), d();
|
|
1094
1094
|
}, function(T) {
|
|
1095
1095
|
r(T), d();
|
|
1096
|
-
},
|
|
1096
|
+
}, w), 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);
|
|
@@ -1103,15 +1103,15 @@ const Ze = (e) => {
|
|
|
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
|
-
const
|
|
1106
|
+
const w = s.transitional || Ge;
|
|
1107
1107
|
s.timeoutErrorMessage && (p = s.timeoutErrorMessage), r(new y(
|
|
1108
1108
|
p,
|
|
1109
|
-
|
|
1109
|
+
w.clarifyTimeoutError ? y.ETIMEDOUT : y.ECONNABORTED,
|
|
1110
1110
|
s,
|
|
1111
1111
|
a
|
|
1112
1112
|
)), a = null;
|
|
1113
|
-
},
|
|
1114
|
-
a.setRequestHeader(
|
|
1113
|
+
}, i === void 0 && o.setContentType(null), "setRequestHeader" in a && u.forEach(o.toJSON(), function(p, w) {
|
|
1114
|
+
a.setRequestHeader(w, 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
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)));
|
|
@@ -1120,31 +1120,31 @@ const Ze = (e) => {
|
|
|
1120
1120
|
r(new y("Unsupported protocol " + h + ":", y.ERR_BAD_REQUEST, e));
|
|
1121
1121
|
return;
|
|
1122
1122
|
}
|
|
1123
|
-
a.send(
|
|
1123
|
+
a.send(i || null);
|
|
1124
1124
|
});
|
|
1125
|
-
},
|
|
1125
|
+
}, kn = (e, t) => {
|
|
1126
1126
|
let n = new AbortController(), r;
|
|
1127
1127
|
const s = function(l) {
|
|
1128
1128
|
if (!r) {
|
|
1129
|
-
r = !0,
|
|
1129
|
+
r = !0, o();
|
|
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
|
-
let
|
|
1134
|
+
let i = t && setTimeout(() => {
|
|
1135
1135
|
s(new y(`timeout ${t} of ms exceeded`, y.ETIMEDOUT));
|
|
1136
1136
|
}, t);
|
|
1137
|
-
const
|
|
1138
|
-
e && (
|
|
1137
|
+
const o = () => {
|
|
1138
|
+
e && (i && clearTimeout(i), i = null, e.forEach((l) => {
|
|
1139
1139
|
l && (l.removeEventListener ? l.removeEventListener("abort", s) : l.unsubscribe(s));
|
|
1140
1140
|
}), e = null);
|
|
1141
1141
|
};
|
|
1142
1142
|
e.forEach((l) => l && l.addEventListener && l.addEventListener("abort", s));
|
|
1143
1143
|
const { signal: c } = n;
|
|
1144
|
-
return c.unsubscribe =
|
|
1145
|
-
|
|
1144
|
+
return c.unsubscribe = o, [c, () => {
|
|
1145
|
+
i && clearTimeout(i), i = null;
|
|
1146
1146
|
}];
|
|
1147
|
-
},
|
|
1147
|
+
}, Nn = function* (e, t) {
|
|
1148
1148
|
let n = e.byteLength;
|
|
1149
1149
|
if (!t || n < t) {
|
|
1150
1150
|
yield e;
|
|
@@ -1153,25 +1153,25 @@ const Ze = (e) => {
|
|
|
1153
1153
|
let r = 0, s;
|
|
1154
1154
|
for (; r < n; )
|
|
1155
1155
|
s = r + t, yield e.slice(r, s), r = s;
|
|
1156
|
-
},
|
|
1156
|
+
}, Cn = async function* (e, t, n) {
|
|
1157
1157
|
for await (const r of e)
|
|
1158
|
-
yield*
|
|
1158
|
+
yield* Nn(ArrayBuffer.isView(r) ? r : await n(String(r)), t);
|
|
1159
1159
|
}, Oe = (e, t, n, r, s) => {
|
|
1160
|
-
const
|
|
1161
|
-
let
|
|
1160
|
+
const i = Cn(e, t, s);
|
|
1161
|
+
let o = 0;
|
|
1162
1162
|
return new ReadableStream({
|
|
1163
1163
|
type: "bytes",
|
|
1164
1164
|
async pull(c) {
|
|
1165
|
-
const { done: l, value: d } = await
|
|
1165
|
+
const { done: l, value: d } = await i.next();
|
|
1166
1166
|
if (l) {
|
|
1167
1167
|
c.close(), r();
|
|
1168
1168
|
return;
|
|
1169
1169
|
}
|
|
1170
1170
|
let a = d.byteLength;
|
|
1171
|
-
n && n(
|
|
1171
|
+
n && n(o += a), c.enqueue(new Uint8Array(d));
|
|
1172
1172
|
},
|
|
1173
1173
|
cancel(c) {
|
|
1174
|
-
return r(c),
|
|
1174
|
+
return r(c), i.return();
|
|
1175
1175
|
}
|
|
1176
1176
|
}, {
|
|
1177
1177
|
highWaterMark: 2
|
|
@@ -1183,7 +1183,7 @@ const Ze = (e) => {
|
|
|
1183
1183
|
total: e,
|
|
1184
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())), xn = Ye && (() => {
|
|
1187
1187
|
let e = !1;
|
|
1188
1188
|
const t = new Request(k.origin, {
|
|
1189
1189
|
body: new ReadableStream(),
|
|
@@ -1208,7 +1208,7 @@ W && ((e) => {
|
|
|
1208
1208
|
});
|
|
1209
1209
|
});
|
|
1210
1210
|
})(new Response());
|
|
1211
|
-
const
|
|
1211
|
+
const qn = async (e) => {
|
|
1212
1212
|
if (e == null)
|
|
1213
1213
|
return 0;
|
|
1214
1214
|
if (u.isBlob(e))
|
|
@@ -1219,17 +1219,17 @@ const xn = 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
|
-
},
|
|
1222
|
+
}, Un = async (e, t) => {
|
|
1223
1223
|
const n = u.toFiniteNumber(e.getContentLength());
|
|
1224
|
-
return n ??
|
|
1225
|
-
},
|
|
1224
|
+
return n ?? qn(t);
|
|
1225
|
+
}, Ln = W && (async (e) => {
|
|
1226
1226
|
let {
|
|
1227
1227
|
url: t,
|
|
1228
1228
|
method: n,
|
|
1229
1229
|
data: r,
|
|
1230
1230
|
signal: s,
|
|
1231
|
-
cancelToken:
|
|
1232
|
-
timeout:
|
|
1231
|
+
cancelToken: i,
|
|
1232
|
+
timeout: o,
|
|
1233
1233
|
onDownloadProgress: c,
|
|
1234
1234
|
onUploadProgress: l,
|
|
1235
1235
|
responseType: d,
|
|
@@ -1238,15 +1238,15 @@ const xn = async (e) => {
|
|
|
1238
1238
|
fetchOptions: h
|
|
1239
1239
|
} = Ze(e);
|
|
1240
1240
|
d = d ? (d + "").toLowerCase() : "text";
|
|
1241
|
-
let [m, p] = s ||
|
|
1241
|
+
let [m, p] = s || i || o ? kn([s, i], o) : [], w, E;
|
|
1242
1242
|
const T = () => {
|
|
1243
|
-
!
|
|
1243
|
+
!w && setTimeout(() => {
|
|
1244
1244
|
m && m.unsubscribe();
|
|
1245
|
-
}),
|
|
1245
|
+
}), w = !0;
|
|
1246
1246
|
};
|
|
1247
1247
|
let R;
|
|
1248
1248
|
try {
|
|
1249
|
-
if (l &&
|
|
1249
|
+
if (l && xn && n !== "get" && n !== "head" && (R = await Un(a, r)) !== 0) {
|
|
1250
1250
|
let C = new Request(t, {
|
|
1251
1251
|
method: "POST",
|
|
1252
1252
|
body: r,
|
|
@@ -1266,16 +1266,16 @@ const xn = async (e) => {
|
|
|
1266
1266
|
duplex: "half",
|
|
1267
1267
|
withCredentials: f
|
|
1268
1268
|
});
|
|
1269
|
-
let
|
|
1269
|
+
let g = await fetch(E);
|
|
1270
1270
|
const O = ie && (d === "stream" || d === "response");
|
|
1271
1271
|
if (ie && (c || O)) {
|
|
1272
1272
|
const C = {};
|
|
1273
1273
|
["status", "statusText", "headers"].forEach((pe) => {
|
|
1274
|
-
C[pe] =
|
|
1274
|
+
C[pe] = g[pe];
|
|
1275
1275
|
});
|
|
1276
|
-
const B = u.toFiniteNumber(
|
|
1277
|
-
|
|
1278
|
-
Oe(
|
|
1276
|
+
const B = u.toFiniteNumber(g.headers.get("content-length"));
|
|
1277
|
+
g = new Response(
|
|
1278
|
+
Oe(g.body, Pe, c && Ae(
|
|
1279
1279
|
B,
|
|
1280
1280
|
M(c, !0)
|
|
1281
1281
|
), O && T, oe),
|
|
@@ -1283,29 +1283,29 @@ const xn = async (e) => {
|
|
|
1283
1283
|
);
|
|
1284
1284
|
}
|
|
1285
1285
|
d = d || "text";
|
|
1286
|
-
let X = await V[u.findKey(V, d) || "text"](
|
|
1286
|
+
let X = await V[u.findKey(V, d) || "text"](g, e);
|
|
1287
1287
|
return !O && T(), p && p(), await new Promise((C, B) => {
|
|
1288
1288
|
We(C, B, {
|
|
1289
1289
|
data: X,
|
|
1290
|
-
headers: S.from(
|
|
1291
|
-
status:
|
|
1292
|
-
statusText:
|
|
1290
|
+
headers: S.from(g.headers),
|
|
1291
|
+
status: g.status,
|
|
1292
|
+
statusText: g.statusText,
|
|
1293
1293
|
config: e,
|
|
1294
1294
|
request: E
|
|
1295
1295
|
});
|
|
1296
1296
|
});
|
|
1297
|
-
} catch (
|
|
1298
|
-
throw T(),
|
|
1297
|
+
} catch (g) {
|
|
1298
|
+
throw T(), g && g.name === "TypeError" && /fetch/i.test(g.message) ? Object.assign(
|
|
1299
1299
|
new y("Network Error", y.ERR_NETWORK, e, E),
|
|
1300
1300
|
{
|
|
1301
|
-
cause:
|
|
1301
|
+
cause: g.cause || g
|
|
1302
1302
|
}
|
|
1303
|
-
) : y.from(
|
|
1303
|
+
) : y.from(g, g && g.code, e, E);
|
|
1304
1304
|
}
|
|
1305
1305
|
}), ae = {
|
|
1306
|
-
http:
|
|
1307
|
-
xhr:
|
|
1308
|
-
fetch:
|
|
1306
|
+
http: Qt,
|
|
1307
|
+
xhr: Pn,
|
|
1308
|
+
fetch: Ln
|
|
1309
1309
|
};
|
|
1310
1310
|
u.forEach(ae, (e, t) => {
|
|
1311
1311
|
if (e) {
|
|
@@ -1316,30 +1316,30 @@ 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}`, Bn = (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
1323
|
let n, r;
|
|
1324
1324
|
const s = {};
|
|
1325
|
-
for (let
|
|
1326
|
-
n = e[
|
|
1327
|
-
let
|
|
1328
|
-
if (r = n, !
|
|
1329
|
-
throw new y(`Unknown adapter '${
|
|
1325
|
+
for (let i = 0; i < t; i++) {
|
|
1326
|
+
n = e[i];
|
|
1327
|
+
let o;
|
|
1328
|
+
if (r = n, !Bn(n) && (r = ae[(o = String(n)).toLowerCase()], r === void 0))
|
|
1329
|
+
throw new y(`Unknown adapter '${o}'`);
|
|
1330
1330
|
if (r)
|
|
1331
1331
|
break;
|
|
1332
|
-
s[
|
|
1332
|
+
s[o || "#" + i] = r;
|
|
1333
1333
|
}
|
|
1334
1334
|
if (!r) {
|
|
1335
|
-
const
|
|
1335
|
+
const i = 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
|
);
|
|
1338
|
-
let
|
|
1339
|
-
` +
|
|
1340
|
-
`) : " " + ke(
|
|
1338
|
+
let o = t ? i.length > 1 ? `since :
|
|
1339
|
+
` + i.map(ke).join(`
|
|
1340
|
+
`) : " " + ke(i[0]) : "as no adapter specified";
|
|
1341
1341
|
throw new y(
|
|
1342
|
-
"There is no suitable adapter to dispatch the request " +
|
|
1342
|
+
"There is no suitable adapter to dispatch the request " + o,
|
|
1343
1343
|
"ERR_NOT_SUPPORT"
|
|
1344
1344
|
);
|
|
1345
1345
|
}
|
|
@@ -1377,42 +1377,42 @@ const tt = "1.7.2", he = {};
|
|
|
1377
1377
|
});
|
|
1378
1378
|
const Ce = {};
|
|
1379
1379
|
he.transitional = function(t, n, r) {
|
|
1380
|
-
function s(
|
|
1381
|
-
return "[Axios v" + tt + "] Transitional option '" +
|
|
1380
|
+
function s(i, o) {
|
|
1381
|
+
return "[Axios v" + tt + "] Transitional option '" + i + "'" + o + (r ? ". " + r : "");
|
|
1382
1382
|
}
|
|
1383
|
-
return (
|
|
1383
|
+
return (i, o, c) => {
|
|
1384
1384
|
if (t === !1)
|
|
1385
1385
|
throw new y(
|
|
1386
|
-
s(
|
|
1386
|
+
s(o, " has been removed" + (n ? " in " + n : "")),
|
|
1387
1387
|
y.ERR_DEPRECATED
|
|
1388
1388
|
);
|
|
1389
|
-
return n && !Ce[
|
|
1389
|
+
return n && !Ce[o] && (Ce[o] = !0, console.warn(
|
|
1390
1390
|
s(
|
|
1391
|
-
|
|
1391
|
+
o,
|
|
1392
1392
|
" has been deprecated since v" + n + " and will be removed in the near future"
|
|
1393
1393
|
)
|
|
1394
|
-
)), t ? t(
|
|
1394
|
+
)), t ? t(i, o, c) : !0;
|
|
1395
1395
|
};
|
|
1396
1396
|
};
|
|
1397
|
-
function
|
|
1397
|
+
function _n(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
1400
|
const r = Object.keys(e);
|
|
1401
1401
|
let s = r.length;
|
|
1402
1402
|
for (; s-- > 0; ) {
|
|
1403
|
-
const
|
|
1404
|
-
if (
|
|
1405
|
-
const c = e[
|
|
1403
|
+
const i = r[s], o = t[i];
|
|
1404
|
+
if (o) {
|
|
1405
|
+
const c = e[i], l = c === void 0 || o(c, i, e);
|
|
1406
1406
|
if (l !== !0)
|
|
1407
|
-
throw new y("option " +
|
|
1407
|
+
throw new y("option " + i + " must be " + l, y.ERR_BAD_OPTION_VALUE);
|
|
1408
1408
|
continue;
|
|
1409
1409
|
}
|
|
1410
1410
|
if (n !== !0)
|
|
1411
|
-
throw new y("Unknown option " +
|
|
1411
|
+
throw new y("Unknown option " + i, y.ERR_BAD_OPTION);
|
|
1412
1412
|
}
|
|
1413
1413
|
}
|
|
1414
1414
|
const ce = {
|
|
1415
|
-
assertOptions:
|
|
1415
|
+
assertOptions: _n,
|
|
1416
1416
|
validators: he
|
|
1417
1417
|
}, x = ce.validators;
|
|
1418
1418
|
let U = class {
|
|
@@ -1437,10 +1437,10 @@ let U = class {
|
|
|
1437
1437
|
if (r instanceof Error) {
|
|
1438
1438
|
let s;
|
|
1439
1439
|
Error.captureStackTrace ? Error.captureStackTrace(s = {}) : s = new Error();
|
|
1440
|
-
const
|
|
1440
|
+
const i = s.stack ? s.stack.replace(/^.+\n/, "") : "";
|
|
1441
1441
|
try {
|
|
1442
|
-
r.stack ?
|
|
1443
|
-
` +
|
|
1442
|
+
r.stack ? i && !String(r.stack).endsWith(i.replace(/^.+\n.+\n/, "")) && (r.stack += `
|
|
1443
|
+
` + i) : r.stack = i;
|
|
1444
1444
|
} catch {
|
|
1445
1445
|
}
|
|
1446
1446
|
}
|
|
@@ -1449,7 +1449,7 @@ let U = class {
|
|
|
1449
1449
|
}
|
|
1450
1450
|
_request(t, n) {
|
|
1451
1451
|
typeof t == "string" ? (n = n || {}, n.url = t) : n = t || {}, n = L(this.defaults, n);
|
|
1452
|
-
const { transitional: r, paramsSerializer: s, headers:
|
|
1452
|
+
const { transitional: r, paramsSerializer: s, headers: i } = n;
|
|
1453
1453
|
r !== void 0 && ce.assertOptions(r, {
|
|
1454
1454
|
silentJSONParsing: x.transitional(x.boolean),
|
|
1455
1455
|
forcedJSONParsing: x.transitional(x.boolean),
|
|
@@ -1460,24 +1460,24 @@ let U = class {
|
|
|
1460
1460
|
encode: x.function,
|
|
1461
1461
|
serialize: x.function
|
|
1462
1462
|
}, !0)), n.method = (n.method || this.defaults.method || "get").toLowerCase();
|
|
1463
|
-
let
|
|
1464
|
-
|
|
1465
|
-
|
|
1463
|
+
let o = i && u.merge(
|
|
1464
|
+
i.common,
|
|
1465
|
+
i[n.method]
|
|
1466
1466
|
);
|
|
1467
|
-
|
|
1467
|
+
i && u.forEach(
|
|
1468
1468
|
["delete", "get", "head", "post", "put", "patch", "common"],
|
|
1469
1469
|
(p) => {
|
|
1470
|
-
delete
|
|
1470
|
+
delete i[p];
|
|
1471
1471
|
}
|
|
1472
|
-
), n.headers = S.concat(
|
|
1472
|
+
), n.headers = S.concat(o, i);
|
|
1473
1473
|
const c = [];
|
|
1474
1474
|
let l = !0;
|
|
1475
|
-
this.interceptors.request.forEach(function(
|
|
1476
|
-
typeof
|
|
1475
|
+
this.interceptors.request.forEach(function(w) {
|
|
1476
|
+
typeof w.runWhen == "function" && w.runWhen(n) === !1 || (l = l && w.synchronous, c.unshift(w.fulfilled, w.rejected));
|
|
1477
1477
|
});
|
|
1478
1478
|
const d = [];
|
|
1479
|
-
this.interceptors.response.forEach(function(
|
|
1480
|
-
d.push(
|
|
1479
|
+
this.interceptors.response.forEach(function(w) {
|
|
1480
|
+
d.push(w.fulfilled, w.rejected);
|
|
1481
1481
|
});
|
|
1482
1482
|
let a, f = 0, h;
|
|
1483
1483
|
if (!l) {
|
|
@@ -1489,11 +1489,11 @@ let U = class {
|
|
|
1489
1489
|
h = c.length;
|
|
1490
1490
|
let m = n;
|
|
1491
1491
|
for (f = 0; f < h; ) {
|
|
1492
|
-
const p = c[f++],
|
|
1492
|
+
const p = c[f++], w = c[f++];
|
|
1493
1493
|
try {
|
|
1494
1494
|
m = p(m);
|
|
1495
1495
|
} catch (E) {
|
|
1496
|
-
|
|
1496
|
+
w.call(this, E);
|
|
1497
1497
|
break;
|
|
1498
1498
|
}
|
|
1499
1499
|
}
|
|
@@ -1523,45 +1523,45 @@ u.forEach(["delete", "get", "head", "options"], function(t) {
|
|
|
1523
1523
|
});
|
|
1524
1524
|
u.forEach(["post", "put", "patch"], function(t) {
|
|
1525
1525
|
function n(r) {
|
|
1526
|
-
return function(
|
|
1526
|
+
return function(i, o, c) {
|
|
1527
1527
|
return this.request(L(c || {}, {
|
|
1528
1528
|
method: t,
|
|
1529
1529
|
headers: r ? {
|
|
1530
1530
|
"Content-Type": "multipart/form-data"
|
|
1531
1531
|
} : {},
|
|
1532
|
-
url:
|
|
1533
|
-
data:
|
|
1532
|
+
url: i,
|
|
1533
|
+
data: o
|
|
1534
1534
|
}));
|
|
1535
1535
|
};
|
|
1536
1536
|
}
|
|
1537
1537
|
U.prototype[t] = n(), U.prototype[t + "Form"] = n(!0);
|
|
1538
1538
|
});
|
|
1539
|
-
let
|
|
1539
|
+
let Fn = class nt {
|
|
1540
1540
|
constructor(t) {
|
|
1541
1541
|
if (typeof t != "function")
|
|
1542
1542
|
throw new TypeError("executor must be a function.");
|
|
1543
1543
|
let n;
|
|
1544
|
-
this.promise = new Promise(function(
|
|
1545
|
-
n =
|
|
1544
|
+
this.promise = new Promise(function(i) {
|
|
1545
|
+
n = i;
|
|
1546
1546
|
});
|
|
1547
1547
|
const r = this;
|
|
1548
1548
|
this.promise.then((s) => {
|
|
1549
1549
|
if (!r._listeners)
|
|
1550
1550
|
return;
|
|
1551
|
-
let
|
|
1552
|
-
for (;
|
|
1553
|
-
r._listeners[
|
|
1551
|
+
let i = r._listeners.length;
|
|
1552
|
+
for (; i-- > 0; )
|
|
1553
|
+
r._listeners[i](s);
|
|
1554
1554
|
r._listeners = null;
|
|
1555
1555
|
}), this.promise.then = (s) => {
|
|
1556
|
-
let
|
|
1557
|
-
const
|
|
1558
|
-
r.subscribe(c),
|
|
1556
|
+
let i;
|
|
1557
|
+
const o = new Promise((c) => {
|
|
1558
|
+
r.subscribe(c), i = c;
|
|
1559
1559
|
}).then(s);
|
|
1560
|
-
return
|
|
1561
|
-
r.unsubscribe(
|
|
1562
|
-
},
|
|
1563
|
-
}, t(function(
|
|
1564
|
-
r.reason || (r.reason = new F(
|
|
1560
|
+
return o.cancel = function() {
|
|
1561
|
+
r.unsubscribe(i);
|
|
1562
|
+
}, o;
|
|
1563
|
+
}, t(function(i, o, c) {
|
|
1564
|
+
r.reason || (r.reason = new F(i, o, c), n(r.reason));
|
|
1565
1565
|
});
|
|
1566
1566
|
}
|
|
1567
1567
|
/**
|
|
@@ -1604,12 +1604,12 @@ let _n = class nt {
|
|
|
1604
1604
|
};
|
|
1605
1605
|
}
|
|
1606
1606
|
};
|
|
1607
|
-
function
|
|
1607
|
+
function $n(e) {
|
|
1608
1608
|
return function(n) {
|
|
1609
1609
|
return e.apply(null, n);
|
|
1610
1610
|
};
|
|
1611
1611
|
}
|
|
1612
|
-
function
|
|
1612
|
+
function Dn(e) {
|
|
1613
1613
|
return u.isObject(e) && e.isAxiosError === !0;
|
|
1614
1614
|
}
|
|
1615
1615
|
const ue = {
|
|
@@ -1689,7 +1689,7 @@ function rt(e) {
|
|
|
1689
1689
|
const b = rt(j);
|
|
1690
1690
|
b.Axios = U;
|
|
1691
1691
|
b.CanceledError = F;
|
|
1692
|
-
b.CancelToken =
|
|
1692
|
+
b.CancelToken = Fn;
|
|
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 = $n;
|
|
1702
|
+
b.isAxiosError = Dn;
|
|
1703
1703
|
b.mergeConfig = L;
|
|
1704
1704
|
b.AxiosHeaders = S;
|
|
1705
1705
|
b.formToJSON = (e) => Ke(u.isHTMLForm(e) ? new FormData(e) : e);
|
|
@@ -1707,36 +1707,36 @@ 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:
|
|
1710
|
+
Axios: dr,
|
|
1711
|
+
AxiosError: In,
|
|
1712
|
+
CanceledError: fr,
|
|
1713
|
+
isCancel: hr,
|
|
1714
|
+
CancelToken: pr,
|
|
1715
|
+
VERSION: mr,
|
|
1716
|
+
all: yr,
|
|
1717
|
+
Cancel: wr,
|
|
1718
1718
|
isAxiosError: gr,
|
|
1719
|
-
spread:
|
|
1720
|
-
toFormData:
|
|
1719
|
+
spread: br,
|
|
1720
|
+
toFormData: Tr,
|
|
1721
1721
|
AxiosHeaders: xe,
|
|
1722
|
-
HttpStatusCode:
|
|
1723
|
-
formToJSON:
|
|
1724
|
-
getAdapter:
|
|
1725
|
-
mergeConfig:
|
|
1726
|
-
} = b, qe = "auth",
|
|
1727
|
-
const
|
|
1722
|
+
HttpStatusCode: Er,
|
|
1723
|
+
formToJSON: Sr,
|
|
1724
|
+
getAdapter: Rr,
|
|
1725
|
+
mergeConfig: Or
|
|
1726
|
+
} = b, st = "/security/connect/token/refresh", qe = "auth", ot = async (e, t, n, r = st) => {
|
|
1727
|
+
const s = {
|
|
1728
1728
|
client_id: e.clientId,
|
|
1729
1729
|
client_secret: e.clientSecret
|
|
1730
|
-
},
|
|
1731
|
-
`${e.url}
|
|
1732
|
-
|
|
1730
|
+
}, i = await n.post(
|
|
1731
|
+
`${e.url}${r}`,
|
|
1732
|
+
s,
|
|
1733
1733
|
{ withCredentials: !0, headers: t || {} }
|
|
1734
1734
|
), o = {
|
|
1735
|
-
...
|
|
1736
|
-
accessToken:
|
|
1735
|
+
...i.data,
|
|
1736
|
+
accessToken: i.data.access_token
|
|
1737
1737
|
};
|
|
1738
|
-
return "access_token" in o && delete o.access_token,
|
|
1739
|
-
},
|
|
1738
|
+
return "access_token" in o && delete o.access_token, i.status === 200 && o.accessToken && localStorage.setItem("accessToken", o.accessToken), o;
|
|
1739
|
+
}, jn = (e) => {
|
|
1740
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`, {
|
|
@@ -1749,7 +1749,7 @@ const {
|
|
|
1749
1749
|
method: "GET",
|
|
1750
1750
|
data: "",
|
|
1751
1751
|
...l
|
|
1752
|
-
}),
|
|
1752
|
+
}), i = async (c) => {
|
|
1753
1753
|
try {
|
|
1754
1754
|
await t.request("/security/api/authorization/logout", {
|
|
1755
1755
|
method: "POST",
|
|
@@ -1764,14 +1764,19 @@ const {
|
|
|
1764
1764
|
const l = e.refreshLogoutUrl ?? "";
|
|
1765
1765
|
l && (globalThis.location.href = `${l}?logout`);
|
|
1766
1766
|
}
|
|
1767
|
-
},
|
|
1767
|
+
}, o = t.axiosClient;
|
|
1768
1768
|
return {
|
|
1769
1769
|
postLogin: r,
|
|
1770
1770
|
getToken: s,
|
|
1771
|
-
postToken: n ? () =>
|
|
1772
|
-
|
|
1771
|
+
postToken: n ? () => ot(
|
|
1772
|
+
n,
|
|
1773
|
+
e.headers,
|
|
1774
|
+
o,
|
|
1775
|
+
e.refreshTokenEndpointPath
|
|
1776
|
+
) : void 0,
|
|
1777
|
+
postLogout: i
|
|
1773
1778
|
};
|
|
1774
|
-
}, Ue = () => new
|
|
1779
|
+
}, Ue = () => new In(
|
|
1775
1780
|
"Unauthorized",
|
|
1776
1781
|
"ERR_UNAUTHORIZED",
|
|
1777
1782
|
{ headers: new xe() },
|
|
@@ -1783,12 +1788,12 @@ const {
|
|
|
1783
1788
|
headers: {},
|
|
1784
1789
|
config: { headers: new xe() }
|
|
1785
1790
|
}
|
|
1786
|
-
),
|
|
1791
|
+
), Hn = (e) => {
|
|
1787
1792
|
let t = !1;
|
|
1788
|
-
const n = [], r = () => localStorage.getItem("accessToken"), s = () => localStorage.getItem("refreshToken"),
|
|
1793
|
+
const n = [], r = () => localStorage.getItem("accessToken"), s = () => localStorage.getItem("refreshToken"), i = (a) => {
|
|
1789
1794
|
const f = a.accessToken, h = a.refreshToken;
|
|
1790
1795
|
f && localStorage.setItem("accessToken", f), h && localStorage.setItem("refreshToken", h);
|
|
1791
|
-
},
|
|
1796
|
+
}, o = () => {
|
|
1792
1797
|
localStorage.removeItem("accessToken"), localStorage.removeItem("refreshToken");
|
|
1793
1798
|
}, c = (a, f = null) => {
|
|
1794
1799
|
var h;
|
|
@@ -1798,14 +1803,14 @@ const {
|
|
|
1798
1803
|
};
|
|
1799
1804
|
return {
|
|
1800
1805
|
getAccessToken: r,
|
|
1801
|
-
setTokens:
|
|
1802
|
-
clearTokens:
|
|
1806
|
+
setTokens: i,
|
|
1807
|
+
clearTokens: o,
|
|
1803
1808
|
handleTokenRefresh: async (a) => {
|
|
1804
1809
|
var f;
|
|
1805
1810
|
if (e.refreshTokenEndpointPath && ((f = a.url) == null ? void 0 : f.includes(
|
|
1806
1811
|
e.refreshTokenEndpointPath
|
|
1807
1812
|
))) {
|
|
1808
|
-
|
|
1813
|
+
o();
|
|
1809
1814
|
const m = Ue();
|
|
1810
1815
|
throw c(m), e.refreshLogoutUrl && (globalThis.location.href = `${e.refreshLogoutUrl}?logout`), m;
|
|
1811
1816
|
}
|
|
@@ -1820,9 +1825,9 @@ const {
|
|
|
1820
1825
|
t = !0;
|
|
1821
1826
|
try {
|
|
1822
1827
|
const h = s(), m = await e.onRefreshToken(h);
|
|
1823
|
-
return
|
|
1828
|
+
return i(m), a.headers ?? (a.headers = {}), a.headers.Authorization = `Bearer ${m.accessToken}`, c(null, m.accessToken), t = !1, a;
|
|
1824
1829
|
} catch {
|
|
1825
|
-
|
|
1830
|
+
o();
|
|
1826
1831
|
const h = Ue();
|
|
1827
1832
|
throw c(h), t = !1, h;
|
|
1828
1833
|
}
|
|
@@ -1832,7 +1837,7 @@ const {
|
|
|
1832
1837
|
return ((f = a == null ? void 0 : a.response) == null ? void 0 : f.status) === 401;
|
|
1833
1838
|
}
|
|
1834
1839
|
};
|
|
1835
|
-
},
|
|
1840
|
+
}, zn = (e) => {
|
|
1836
1841
|
const t = (r) => r ? r.toString().replace(/(^\/{1,2})|(\/{1,2}$)/g, "") : null;
|
|
1837
1842
|
return [
|
|
1838
1843
|
t(e.baseUrl),
|
|
@@ -1840,25 +1845,26 @@ const {
|
|
|
1840
1845
|
t(e.apiVersion),
|
|
1841
1846
|
t(e.endpoint)
|
|
1842
1847
|
].filter(Boolean).join("/");
|
|
1843
|
-
},
|
|
1848
|
+
}, Jn = (e, t, n, r, s) => {
|
|
1844
1849
|
var d;
|
|
1845
1850
|
if (!t)
|
|
1846
1851
|
return null;
|
|
1847
|
-
const
|
|
1848
|
-
return
|
|
1852
|
+
const i = !!e.digitalRefresh, o = e.refreshTokenApiVersion ?? s, c = e.refreshTokenEndpointPath ?? (i ? st : "/refresh-token"), l = `${r}/auth/${o}${c}`;
|
|
1853
|
+
return Hn({
|
|
1849
1854
|
baseUrl: e.baseUrl,
|
|
1850
1855
|
refreshTokenEndpointPath: c,
|
|
1851
1856
|
digitalRefreshUrl: (d = e.digitalRefresh) == null ? void 0 : d.url,
|
|
1852
1857
|
refreshLogoutUrl: e.refreshLogoutUrl ?? void 0,
|
|
1853
|
-
onRefreshToken: async (a) =>
|
|
1858
|
+
onRefreshToken: async (a) => i ? await ot(
|
|
1854
1859
|
e.digitalRefresh,
|
|
1855
1860
|
e.headers,
|
|
1856
|
-
n
|
|
1861
|
+
n,
|
|
1862
|
+
c
|
|
1857
1863
|
) : (await n.post(l, {
|
|
1858
1864
|
refreshToken: a
|
|
1859
1865
|
})).data
|
|
1860
1866
|
});
|
|
1861
|
-
},
|
|
1867
|
+
}, Mn = (e, t) => {
|
|
1862
1868
|
e.interceptors.response.use(
|
|
1863
1869
|
(n) => n,
|
|
1864
1870
|
async (n) => {
|
|
@@ -1870,8 +1876,8 @@ const {
|
|
|
1870
1876
|
return e.request(s);
|
|
1871
1877
|
}
|
|
1872
1878
|
);
|
|
1873
|
-
},
|
|
1874
|
-
const
|
|
1879
|
+
}, Vn = (e, t, n, r, s) => {
|
|
1880
|
+
const i = {
|
|
1875
1881
|
"Content-Type": (e == null ? void 0 : e.contentType) ?? "application/json",
|
|
1876
1882
|
...t && { apiVersion: t },
|
|
1877
1883
|
Authorization: "",
|
|
@@ -1879,11 +1885,11 @@ const {
|
|
|
1879
1885
|
...e == null ? void 0 : e.headers
|
|
1880
1886
|
};
|
|
1881
1887
|
if (s && r) {
|
|
1882
|
-
const
|
|
1883
|
-
|
|
1888
|
+
const o = r.getAccessToken();
|
|
1889
|
+
o && (i.Authorization = `Bearer ${o}`);
|
|
1884
1890
|
}
|
|
1885
|
-
return
|
|
1886
|
-
},
|
|
1891
|
+
return i;
|
|
1892
|
+
}, vn = (e, t, n) => {
|
|
1887
1893
|
const r = {
|
|
1888
1894
|
method: (e == null ? void 0 : e.method) ?? "GET",
|
|
1889
1895
|
headers: t,
|
|
@@ -1892,21 +1898,21 @@ const {
|
|
|
1892
1898
|
responseType: e == null ? void 0 : e.responseType
|
|
1893
1899
|
};
|
|
1894
1900
|
return (e == null ? void 0 : e.withCredentials) !== void 0 && (r.withCredentials = e.withCredentials), r;
|
|
1895
|
-
},
|
|
1901
|
+
}, Gn = (e, t) => ({
|
|
1896
1902
|
getAccessToken: e && t ? t.getAccessToken : () => null,
|
|
1897
1903
|
setTokens: e && t ? t.setTokens : () => {
|
|
1898
1904
|
},
|
|
1899
1905
|
clearTokens: e && t ? t.clearTokens : () => {
|
|
1900
1906
|
}
|
|
1901
1907
|
}), P = (e) => {
|
|
1902
|
-
const t = b.create(), n = e.apiVersion, r = e.productCode,
|
|
1908
|
+
const t = b.create(), n = e.apiVersion, r = e.productCode, i = e.baseUrl.replace(/\/$/, ""), o = e.hasTokenManager !== !1, c = Jn(
|
|
1903
1909
|
e,
|
|
1904
|
-
i,
|
|
1905
|
-
t,
|
|
1906
1910
|
o,
|
|
1911
|
+
t,
|
|
1912
|
+
i,
|
|
1907
1913
|
n
|
|
1908
1914
|
);
|
|
1909
|
-
|
|
1915
|
+
o && c && Mn(t, c);
|
|
1910
1916
|
const l = (h) => ({
|
|
1911
1917
|
data: h.data,
|
|
1912
1918
|
status: h.status,
|
|
@@ -1922,28 +1928,28 @@ const {
|
|
|
1922
1928
|
};
|
|
1923
1929
|
}, a = async (h, m) => {
|
|
1924
1930
|
var R;
|
|
1925
|
-
const p = h.startsWith("/") ? h.substring(1) : h,
|
|
1926
|
-
baseUrl:
|
|
1931
|
+
const p = h.startsWith("/") ? h.substring(1) : h, w = zn({
|
|
1932
|
+
baseUrl: i,
|
|
1927
1933
|
productCode: r,
|
|
1928
1934
|
apiVersion: n,
|
|
1929
1935
|
endpoint: p
|
|
1930
|
-
}), E =
|
|
1936
|
+
}), E = Vn(
|
|
1931
1937
|
m,
|
|
1932
1938
|
n,
|
|
1933
1939
|
e.headers,
|
|
1934
1940
|
c,
|
|
1935
|
-
|
|
1936
|
-
), T =
|
|
1941
|
+
o
|
|
1942
|
+
), T = vn(m, E, w);
|
|
1937
1943
|
try {
|
|
1938
|
-
const
|
|
1944
|
+
const g = await t.request(T), O = l(g);
|
|
1939
1945
|
return ye(
|
|
1940
1946
|
{ tracking: m == null ? void 0 : m.tracking, url: T.url },
|
|
1941
1947
|
O.status
|
|
1942
1948
|
), e.responseInterceptor ? await e.responseInterceptor.onFulfilled(
|
|
1943
1949
|
O
|
|
1944
1950
|
) : O;
|
|
1945
|
-
} catch (
|
|
1946
|
-
const O =
|
|
1951
|
+
} catch (g) {
|
|
1952
|
+
const O = g, X = (R = O.response) == null ? void 0 : R.status;
|
|
1947
1953
|
if (ye(
|
|
1948
1954
|
{ tracking: m == null ? void 0 : m.tracking, url: T.url },
|
|
1949
1955
|
X
|
|
@@ -1951,19 +1957,19 @@ const {
|
|
|
1951
1957
|
const C = d(O, T.url);
|
|
1952
1958
|
return e.responseInterceptor.onReject(C);
|
|
1953
1959
|
}
|
|
1954
|
-
throw
|
|
1960
|
+
throw g;
|
|
1955
1961
|
}
|
|
1956
|
-
}, f =
|
|
1962
|
+
}, f = Gn(o, c);
|
|
1957
1963
|
return {
|
|
1958
1964
|
request: a,
|
|
1959
1965
|
...f,
|
|
1960
1966
|
axiosClient: t
|
|
1961
1967
|
};
|
|
1962
|
-
},
|
|
1963
|
-
function
|
|
1968
|
+
}, Kn = "cep";
|
|
1969
|
+
function Qn(e) {
|
|
1964
1970
|
const t = P(e);
|
|
1965
1971
|
function n(r, s) {
|
|
1966
|
-
return t.request(`/${
|
|
1972
|
+
return t.request(`/${Kn}`, {
|
|
1967
1973
|
method: "POST",
|
|
1968
1974
|
data: JSON.stringify(r),
|
|
1969
1975
|
...s
|
|
@@ -1973,7 +1979,7 @@ function Kn(e) {
|
|
|
1973
1979
|
getAddress: n
|
|
1974
1980
|
};
|
|
1975
1981
|
}
|
|
1976
|
-
const
|
|
1982
|
+
const Wn = (e) => {
|
|
1977
1983
|
const t = P(e);
|
|
1978
1984
|
return {
|
|
1979
1985
|
signUp: async (c, l) => await t.request("/sign-up", {
|
|
@@ -2006,7 +2012,7 @@ const Qn = (e) => {
|
|
|
2006
2012
|
...l
|
|
2007
2013
|
})
|
|
2008
2014
|
};
|
|
2009
|
-
}, Le = "digital",
|
|
2015
|
+
}, Le = "digital", Xn = (e) => {
|
|
2010
2016
|
const t = P(e);
|
|
2011
2017
|
return {
|
|
2012
2018
|
getBroker: (s) => t.request(`/${Le}/getBroker`, {
|
|
@@ -2014,65 +2020,65 @@ const Qn = (e) => {
|
|
|
2014
2020
|
data: "",
|
|
2015
2021
|
...s
|
|
2016
2022
|
}),
|
|
2017
|
-
getAllBrokerages: (s,
|
|
2023
|
+
getAllBrokerages: (s, i) => t.request(
|
|
2018
2024
|
`/${Le}/getAllBrokerages?name=${s}`,
|
|
2019
2025
|
{
|
|
2020
2026
|
method: "GET",
|
|
2021
2027
|
data: "",
|
|
2022
|
-
...
|
|
2028
|
+
...i
|
|
2023
2029
|
}
|
|
2024
2030
|
)
|
|
2025
2031
|
};
|
|
2026
|
-
},
|
|
2032
|
+
}, Zn = "data", Yn = (e) => {
|
|
2027
2033
|
const t = P(e);
|
|
2028
2034
|
return {
|
|
2029
|
-
postData: async (r, s) => await t.request(`/${
|
|
2035
|
+
postData: async (r, s) => await t.request(`/${Zn}`, {
|
|
2030
2036
|
method: "POST",
|
|
2031
2037
|
data: JSON.stringify(r),
|
|
2032
2038
|
...s
|
|
2033
2039
|
})
|
|
2034
2040
|
};
|
|
2035
|
-
},
|
|
2041
|
+
}, er = "endorsement", tr = (e) => {
|
|
2036
2042
|
const t = P(e);
|
|
2037
2043
|
return {
|
|
2038
|
-
putEndorsement: (r, s) => t.request(`/${
|
|
2044
|
+
putEndorsement: (r, s) => t.request(`/${er}`, {
|
|
2039
2045
|
method: "PUT",
|
|
2040
2046
|
data: r,
|
|
2041
2047
|
contentType: "multipart/form-data",
|
|
2042
2048
|
...s
|
|
2043
2049
|
})
|
|
2044
2050
|
};
|
|
2045
|
-
}, ne = "payment",
|
|
2051
|
+
}, ne = "payment", nr = (e) => {
|
|
2046
2052
|
const t = P(e);
|
|
2047
2053
|
return {
|
|
2048
|
-
postPayment: (
|
|
2054
|
+
postPayment: (i, o) => t.request(`/${ne}`, {
|
|
2049
2055
|
method: "POST",
|
|
2050
|
-
data: JSON.stringify(
|
|
2051
|
-
...
|
|
2056
|
+
data: JSON.stringify(i),
|
|
2057
|
+
...o
|
|
2052
2058
|
}),
|
|
2053
|
-
getPaymentStatus: (
|
|
2054
|
-
`/${ne}/status?policyId=${
|
|
2059
|
+
getPaymentStatus: (i, o) => t.request(
|
|
2060
|
+
`/${ne}/status?policyId=${i.policyId}`,
|
|
2055
2061
|
{
|
|
2056
2062
|
method: "GET",
|
|
2057
2063
|
data: "",
|
|
2058
|
-
...
|
|
2064
|
+
...o
|
|
2059
2065
|
}
|
|
2060
2066
|
),
|
|
2061
|
-
getPaymentSummary: (
|
|
2062
|
-
`/${ne}/summary?policyId=${
|
|
2067
|
+
getPaymentSummary: (i, o) => t.request(
|
|
2068
|
+
`/${ne}/summary?policyId=${i.policyId}`,
|
|
2063
2069
|
{
|
|
2064
2070
|
method: "GET",
|
|
2065
2071
|
data: "",
|
|
2066
|
-
...
|
|
2072
|
+
...o
|
|
2067
2073
|
}
|
|
2068
2074
|
)
|
|
2069
2075
|
};
|
|
2070
|
-
}, H = "product/action",
|
|
2076
|
+
}, H = "product/action", rr = (e) => {
|
|
2071
2077
|
const t = P(e);
|
|
2072
2078
|
return {
|
|
2073
|
-
getCnpjStatus: (
|
|
2079
|
+
getCnpjStatus: (o, c, l, d) => {
|
|
2074
2080
|
const f = new URLSearchParams({
|
|
2075
|
-
...
|
|
2081
|
+
...o && { cnpj: o },
|
|
2076
2082
|
...c && { brokerageIdentity: c },
|
|
2077
2083
|
...l !== void 0 && {
|
|
2078
2084
|
isBrokerageDefinedAtStart: String(l)
|
|
@@ -2084,29 +2090,29 @@ const Qn = (e) => {
|
|
|
2084
2090
|
...d
|
|
2085
2091
|
});
|
|
2086
2092
|
},
|
|
2087
|
-
getKeyNumber: (
|
|
2093
|
+
getKeyNumber: (o) => t.request(`/${H}/Custom/GetKeyNumber`, {
|
|
2088
2094
|
method: "GET",
|
|
2089
2095
|
data: "",
|
|
2090
|
-
...
|
|
2096
|
+
...o
|
|
2091
2097
|
}),
|
|
2092
|
-
getProposalNumberByKeyNumber: (
|
|
2093
|
-
`/${H}/Custom/GetProposalNoByKeyNumber?keyNumber=${
|
|
2098
|
+
getProposalNumberByKeyNumber: (o, c) => t.request(
|
|
2099
|
+
`/${H}/Custom/GetProposalNoByKeyNumber?keyNumber=${o.keyNumber}`,
|
|
2094
2100
|
{
|
|
2095
2101
|
method: "GET",
|
|
2096
2102
|
data: "",
|
|
2097
2103
|
...c
|
|
2098
2104
|
}
|
|
2099
2105
|
),
|
|
2100
|
-
postCoveragesAndClausesRules: (
|
|
2106
|
+
postCoveragesAndClausesRules: (o, c) => t.request(
|
|
2101
2107
|
`/${H}/Custom/LoadRules`,
|
|
2102
2108
|
{
|
|
2103
2109
|
method: "POST",
|
|
2104
|
-
data: JSON.stringify(
|
|
2110
|
+
data: JSON.stringify(o),
|
|
2105
2111
|
...c
|
|
2106
2112
|
}
|
|
2107
2113
|
)
|
|
2108
2114
|
};
|
|
2109
|
-
}, q = "quotation",
|
|
2115
|
+
}, q = "quotation", sr = (e) => {
|
|
2110
2116
|
const t = P(e);
|
|
2111
2117
|
return {
|
|
2112
2118
|
getQuotations: (a, f) => {
|
|
@@ -2168,17 +2174,17 @@ const Qn = (e) => {
|
|
|
2168
2174
|
}
|
|
2169
2175
|
)
|
|
2170
2176
|
};
|
|
2171
|
-
},
|
|
2177
|
+
}, or = "report", ir = (e) => {
|
|
2172
2178
|
const t = P(e);
|
|
2173
2179
|
return {
|
|
2174
2180
|
getReportStream: (r, s) => {
|
|
2175
|
-
const
|
|
2181
|
+
const i = new URLSearchParams({
|
|
2176
2182
|
policyId: r.policyId,
|
|
2177
2183
|
documentType: r.documentType ?? "certificate",
|
|
2178
2184
|
...r.additionalParams
|
|
2179
2185
|
});
|
|
2180
2186
|
return t.request(
|
|
2181
|
-
`/${
|
|
2187
|
+
`/${or}/generate-stream?${i.toString()}`,
|
|
2182
2188
|
{
|
|
2183
2189
|
method: "GET",
|
|
2184
2190
|
data: "",
|
|
@@ -2188,11 +2194,11 @@ const Qn = (e) => {
|
|
|
2188
2194
|
);
|
|
2189
2195
|
}
|
|
2190
2196
|
};
|
|
2191
|
-
},
|
|
2197
|
+
}, ar = "SubscriberData", cr = (e) => {
|
|
2192
2198
|
const t = P(e);
|
|
2193
2199
|
return {
|
|
2194
2200
|
getSubscriber: (r, s) => t.request(
|
|
2195
|
-
`/${
|
|
2201
|
+
`/${ar}/get-subscriber-data?cnpj=${r}`,
|
|
2196
2202
|
{
|
|
2197
2203
|
method: "GET",
|
|
2198
2204
|
data: "",
|
|
@@ -2201,15 +2207,15 @@ const Qn = (e) => {
|
|
|
2201
2207
|
)
|
|
2202
2208
|
};
|
|
2203
2209
|
};
|
|
2204
|
-
function
|
|
2205
|
-
const t =
|
|
2210
|
+
function Ar(e) {
|
|
2211
|
+
const t = jn(e), n = Wn(e), r = Yn(e), s = sr(e), i = nr(e), o = Qn(e), c = Xn(e), l = tr(e), d = rr(e), a = ir(e), f = cr(e), h = P(e);
|
|
2206
2212
|
return {
|
|
2207
2213
|
auth: t,
|
|
2208
2214
|
authAkad: n,
|
|
2209
2215
|
data: r,
|
|
2210
2216
|
quotation: s,
|
|
2211
|
-
payment:
|
|
2212
|
-
address:
|
|
2217
|
+
payment: i,
|
|
2218
|
+
address: o,
|
|
2213
2219
|
broker: c,
|
|
2214
2220
|
endorsement: l,
|
|
2215
2221
|
plugin: d,
|
|
@@ -2219,5 +2225,5 @@ function Or(e) {
|
|
|
2219
2225
|
};
|
|
2220
2226
|
}
|
|
2221
2227
|
export {
|
|
2222
|
-
|
|
2228
|
+
Ar as default
|
|
2223
2229
|
};
|