@odynn/awayz-core 0.10.36 → 0.10.37
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{TripsService-C_TStOtx.js → TripsService-Q2jinDQJ.js} +1 -1
- package/dist/components/CashValue/CashValue.js +1 -1
- package/dist/components/CashValue/CashValue.stories.js +1 -1
- package/dist/components/ClientPointsValue/ClientPointsValue.js +1 -1
- package/dist/components/Wallet/Card/Card.stories.js +1 -1
- package/dist/context/AwayzContext.js +0 -1
- package/dist/hooks/useAwayzAuth/useAwayzAuth.js +105 -114
- package/dist/hooks/useBookingManagement/useBookingManagement.js +1 -1
- package/dist/hooks/useBookingManagement/useBookingManagement.test.js +1 -1
- package/dist/hooks/useFeatureFlags.js +1 -1
- package/dist/hooks/useSearchLimit.js +1 -1
- package/dist/hooks/useTripManagement/useTripManagement.js +2 -2
- package/dist/hooks/useTripManagement/useTripManagement.test.js +2 -2
- package/dist/hooks/useWallet/useWallet.js +1 -1
- package/dist/hooks/useWallet/useWallet.test.js +1 -1
- package/dist/lib/context/AwayzContext.d.ts +0 -1
- package/dist/lib/hooks/useAwayzAuth/useAwayzAuth.d.ts +0 -1
- package/dist/main.js +1 -1
- package/dist/{noRetryInstance-wA6BVsyM.js → noRetryInstance-BUtUqKl-.js} +507 -511
- package/dist/providers/AwayzProvider.js +1 -1
- package/dist/services/account/AccountService.js +1 -1
- package/dist/services/bookings/BookingService.js +1 -1
- package/dist/services/currency/CurrencyService.js +1 -1
- package/dist/services/features/featureService.js +1 -1
- package/dist/services/index.js +1 -1
- package/dist/services/instance.js +1 -1
- package/dist/services/instanceConfig.js +1 -1
- package/dist/services/noRetryInstance.js +1 -1
- package/dist/services/preferences/PreferencesService.js +1 -1
- package/dist/services/rewards/RewardsService.js +1 -1
- package/dist/services/trips/TripsService.js +2 -2
- package/dist/services/wallet/WalletService.js +1 -1
- package/dist/utils/clientPoints.js +1 -1
- package/package.json +1 -1
|
@@ -3,7 +3,7 @@ var dt = (e, t, n) => t in e ? ft(e, t, { enumerable: !0, configurable: !0, writ
|
|
|
3
3
|
var O = (e, t, n) => dt(e, typeof t != "symbol" ? t + "" : t, n);
|
|
4
4
|
import "react/jsx-runtime";
|
|
5
5
|
import "./arrayExtensions-DlcBOj5a.js";
|
|
6
|
-
import { a as
|
|
6
|
+
import { a as N } from "./keys-C7jV6nZg.js";
|
|
7
7
|
import "react";
|
|
8
8
|
import { getBaseUrl as Be, getGatewayBaseUrl as pt } from "./configs/awayzUrl.js";
|
|
9
9
|
import { EAuthEndpoints as T } from "./configs/endpoints.js";
|
|
@@ -41,9 +41,9 @@ function qe(e, t) {
|
|
|
41
41
|
const { toString: St } = Object.prototype, { getPrototypeOf: ge } = Object, { iterator: te, toStringTag: He } = Symbol, ne = /* @__PURE__ */ ((e) => (t) => {
|
|
42
42
|
const n = St.call(t);
|
|
43
43
|
return e[n] || (e[n] = n.slice(8, -1).toLowerCase());
|
|
44
|
-
})(/* @__PURE__ */ Object.create(null)), x = (e) => (e = e.toLowerCase(), (t) => ne(t) === e), se = (e) => (t) => typeof t === e, { isArray: z } = Array,
|
|
44
|
+
})(/* @__PURE__ */ Object.create(null)), x = (e) => (e = e.toLowerCase(), (t) => ne(t) === e), se = (e) => (t) => typeof t === e, { isArray: z } = Array, v = se("undefined");
|
|
45
45
|
function wt(e) {
|
|
46
|
-
return e !== null && !
|
|
46
|
+
return e !== null && !v(e) && e.constructor !== null && !v(e.constructor) && I(e.constructor.isBuffer) && e.constructor.isBuffer(e);
|
|
47
47
|
}
|
|
48
48
|
const Me = x("ArrayBuffer");
|
|
49
49
|
function yt(e) {
|
|
@@ -68,10 +68,10 @@ function V(e, t, { allOwnKeys: n = !1 } = {}) {
|
|
|
68
68
|
for (s = 0, r = e.length; s < r; s++)
|
|
69
69
|
t.call(null, e[s], s, e);
|
|
70
70
|
else {
|
|
71
|
-
const
|
|
72
|
-
let
|
|
73
|
-
for (s = 0; s <
|
|
74
|
-
|
|
71
|
+
const o = n ? Object.getOwnPropertyNames(e) : Object.keys(e), i = o.length;
|
|
72
|
+
let a;
|
|
73
|
+
for (s = 0; s < i; s++)
|
|
74
|
+
a = o[s], t.call(null, e[a], a, e);
|
|
75
75
|
}
|
|
76
76
|
}
|
|
77
77
|
function Ge(e, t) {
|
|
@@ -83,29 +83,29 @@ function Ge(e, t) {
|
|
|
83
83
|
return r;
|
|
84
84
|
return null;
|
|
85
85
|
}
|
|
86
|
-
const H = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, ze = (e) => !
|
|
86
|
+
const H = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, ze = (e) => !v(e) && e !== H;
|
|
87
87
|
function fe() {
|
|
88
88
|
const { caseless: e } = ze(this) && this || {}, t = {}, n = (s, r) => {
|
|
89
|
-
const
|
|
90
|
-
X(t[
|
|
89
|
+
const o = e && Ge(t, r) || r;
|
|
90
|
+
X(t[o]) && X(s) ? t[o] = fe(t[o], s) : X(s) ? t[o] = fe({}, s) : z(s) ? t[o] = s.slice() : t[o] = s;
|
|
91
91
|
};
|
|
92
92
|
for (let s = 0, r = arguments.length; s < r; s++)
|
|
93
93
|
arguments[s] && V(arguments[s], n);
|
|
94
94
|
return t;
|
|
95
95
|
}
|
|
96
|
-
const Dt = (e, t, n, { allOwnKeys: s } = {}) => (V(t, (r,
|
|
97
|
-
n && I(r) ? e[
|
|
96
|
+
const Dt = (e, t, n, { allOwnKeys: s } = {}) => (V(t, (r, o) => {
|
|
97
|
+
n && I(r) ? e[o] = qe(r, n) : e[o] = r;
|
|
98
98
|
}, { allOwnKeys: s }), e), Bt = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e), qt = (e, t, n, s) => {
|
|
99
99
|
e.prototype = Object.create(t.prototype, s), e.prototype.constructor = e, Object.defineProperty(e, "super", {
|
|
100
100
|
value: t.prototype
|
|
101
101
|
}), n && Object.assign(e.prototype, n);
|
|
102
102
|
}, Ht = (e, t, n, s) => {
|
|
103
|
-
let r,
|
|
104
|
-
const
|
|
103
|
+
let r, o, i;
|
|
104
|
+
const a = {};
|
|
105
105
|
if (t = t || {}, e == null) return t;
|
|
106
106
|
do {
|
|
107
|
-
for (r = Object.getOwnPropertyNames(e),
|
|
108
|
-
|
|
107
|
+
for (r = Object.getOwnPropertyNames(e), o = r.length; o-- > 0; )
|
|
108
|
+
i = r[o], (!s || s(i, e, t)) && !a[i] && (t[i] = e[i], a[i] = !0);
|
|
109
109
|
e = n !== !1 && ge(e);
|
|
110
110
|
} while (e && (!n || n(e, t)) && e !== Object.prototype);
|
|
111
111
|
return t;
|
|
@@ -126,8 +126,8 @@ const Dt = (e, t, n, { allOwnKeys: s } = {}) => (V(t, (r, i) => {
|
|
|
126
126
|
const s = (e && e[te]).call(e);
|
|
127
127
|
let r;
|
|
128
128
|
for (; (r = s.next()) && !r.done; ) {
|
|
129
|
-
const
|
|
130
|
-
t.call(e,
|
|
129
|
+
const o = r.value;
|
|
130
|
+
t.call(e, o[0], o[1]);
|
|
131
131
|
}
|
|
132
132
|
}, $t = (e, t) => {
|
|
133
133
|
let n;
|
|
@@ -135,16 +135,16 @@ const Dt = (e, t, n, { allOwnKeys: s } = {}) => (V(t, (r, i) => {
|
|
|
135
135
|
for (; (n = e.exec(t)) !== null; )
|
|
136
136
|
s.push(n);
|
|
137
137
|
return s;
|
|
138
|
-
},
|
|
138
|
+
}, Kt = x("HTMLFormElement"), vt = (e) => e.toLowerCase().replace(
|
|
139
139
|
/[-_\s]([a-z\d])(\w*)/g,
|
|
140
140
|
function(n, s, r) {
|
|
141
141
|
return s.toUpperCase() + r;
|
|
142
142
|
}
|
|
143
143
|
), be = (({ hasOwnProperty: e }) => (t, n) => e.call(t, n))(Object.prototype), Vt = x("RegExp"), $e = (e, t) => {
|
|
144
144
|
const n = Object.getOwnPropertyDescriptors(e), s = {};
|
|
145
|
-
V(n, (r,
|
|
146
|
-
let
|
|
147
|
-
(
|
|
145
|
+
V(n, (r, o) => {
|
|
146
|
+
let i;
|
|
147
|
+
(i = t(r, o, e)) !== !1 && (s[o] = i || r);
|
|
148
148
|
}), Object.defineProperties(e, s);
|
|
149
149
|
}, Jt = (e) => {
|
|
150
150
|
$e(e, (t, n) => {
|
|
@@ -163,8 +163,8 @@ const Dt = (e, t, n, { allOwnKeys: s } = {}) => (V(t, (r, i) => {
|
|
|
163
163
|
});
|
|
164
164
|
}, Wt = (e, t) => {
|
|
165
165
|
const n = {}, s = (r) => {
|
|
166
|
-
r.forEach((
|
|
167
|
-
n[
|
|
166
|
+
r.forEach((o) => {
|
|
167
|
+
n[o] = !0;
|
|
168
168
|
});
|
|
169
169
|
};
|
|
170
170
|
return z(e) ? s(e) : s(String(e).split(t)), n;
|
|
@@ -180,24 +180,24 @@ const Qt = (e) => {
|
|
|
180
180
|
return;
|
|
181
181
|
if (!("toJSON" in s)) {
|
|
182
182
|
t[r] = s;
|
|
183
|
-
const
|
|
184
|
-
return V(s, (
|
|
185
|
-
const f = n(
|
|
186
|
-
!
|
|
187
|
-
}), t[r] = void 0,
|
|
183
|
+
const o = z(s) ? [] : {};
|
|
184
|
+
return V(s, (i, a) => {
|
|
185
|
+
const f = n(i, r + 1);
|
|
186
|
+
!v(f) && (o[a] = f);
|
|
187
|
+
}), t[r] = void 0, o;
|
|
188
188
|
}
|
|
189
189
|
}
|
|
190
190
|
return s;
|
|
191
191
|
};
|
|
192
192
|
return n(e, 0);
|
|
193
|
-
}, en = x("AsyncFunction"), tn = (e) => e && (re(e) || I(e)) && I(e.then) && I(e.catch),
|
|
194
|
-
r === H &&
|
|
193
|
+
}, en = x("AsyncFunction"), tn = (e) => e && (re(e) || I(e)) && I(e.then) && I(e.catch), Ke = ((e, t) => e ? setImmediate : t ? ((n, s) => (H.addEventListener("message", ({ source: r, data: o }) => {
|
|
194
|
+
r === H && o === n && s.length && s.shift()();
|
|
195
195
|
}, !1), (r) => {
|
|
196
196
|
s.push(r), H.postMessage(n, "*");
|
|
197
197
|
}))(`axios@${Math.random()}`, []) : (n) => setTimeout(n))(
|
|
198
198
|
typeof setImmediate == "function",
|
|
199
199
|
I(H.postMessage)
|
|
200
|
-
), nn = typeof queueMicrotask < "u" ? queueMicrotask.bind(H) : typeof process < "u" && process.nextTick ||
|
|
200
|
+
), nn = typeof queueMicrotask < "u" ? queueMicrotask.bind(H) : typeof process < "u" && process.nextTick || Ke, sn = (e) => e != null && I(e[te]), c = {
|
|
201
201
|
isArray: z,
|
|
202
202
|
isArrayBuffer: Me,
|
|
203
203
|
isBuffer: wt,
|
|
@@ -212,7 +212,7 @@ const Qt = (e) => {
|
|
|
212
212
|
isRequest: xt,
|
|
213
213
|
isResponse: Pt,
|
|
214
214
|
isHeaders: Lt,
|
|
215
|
-
isUndefined:
|
|
215
|
+
isUndefined: v,
|
|
216
216
|
isDate: Ot,
|
|
217
217
|
isFile: At,
|
|
218
218
|
isBlob: _t,
|
|
@@ -235,14 +235,14 @@ const Qt = (e) => {
|
|
|
235
235
|
toArray: jt,
|
|
236
236
|
forEachEntry: zt,
|
|
237
237
|
matchAll: $t,
|
|
238
|
-
isHTMLForm:
|
|
238
|
+
isHTMLForm: Kt,
|
|
239
239
|
hasOwnProperty: be,
|
|
240
240
|
hasOwnProp: be,
|
|
241
241
|
// an alias to avoid ESLint no-prototype-builtins detection
|
|
242
242
|
reduceDescriptors: $e,
|
|
243
243
|
freezeMethods: Jt,
|
|
244
244
|
toObjectSet: Wt,
|
|
245
|
-
toCamelCase:
|
|
245
|
+
toCamelCase: vt,
|
|
246
246
|
noop: Xt,
|
|
247
247
|
toFiniteNumber: Yt,
|
|
248
248
|
findKey: Ge,
|
|
@@ -252,14 +252,14 @@ const Qt = (e) => {
|
|
|
252
252
|
toJSONObject: Qt,
|
|
253
253
|
isAsyncFn: en,
|
|
254
254
|
isThenable: tn,
|
|
255
|
-
setImmediate:
|
|
255
|
+
setImmediate: Ke,
|
|
256
256
|
asap: nn,
|
|
257
257
|
isIterable: sn
|
|
258
258
|
};
|
|
259
259
|
function m(e, t, n, s, r) {
|
|
260
260
|
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), s && (this.request = s), r && (this.response = r, this.status = r.status ? r.status : null);
|
|
261
261
|
}
|
|
262
|
-
|
|
262
|
+
c.inherits(m, Error, {
|
|
263
263
|
toJSON: function() {
|
|
264
264
|
return {
|
|
265
265
|
// Standard
|
|
@@ -274,13 +274,13 @@ a.inherits(m, Error, {
|
|
|
274
274
|
columnNumber: this.columnNumber,
|
|
275
275
|
stack: this.stack,
|
|
276
276
|
// Axios
|
|
277
|
-
config:
|
|
277
|
+
config: c.toJSONObject(this.config),
|
|
278
278
|
code: this.code,
|
|
279
279
|
status: this.status
|
|
280
280
|
};
|
|
281
281
|
}
|
|
282
282
|
});
|
|
283
|
-
const
|
|
283
|
+
const ve = m.prototype, Ve = {};
|
|
284
284
|
[
|
|
285
285
|
"ERR_BAD_OPTION_VALUE",
|
|
286
286
|
"ERR_BAD_OPTION",
|
|
@@ -299,91 +299,91 @@ const Ke = m.prototype, Ve = {};
|
|
|
299
299
|
Ve[e] = { value: e };
|
|
300
300
|
});
|
|
301
301
|
Object.defineProperties(m, Ve);
|
|
302
|
-
Object.defineProperty(
|
|
303
|
-
m.from = (e, t, n, s, r,
|
|
304
|
-
const
|
|
305
|
-
return
|
|
302
|
+
Object.defineProperty(ve, "isAxiosError", { value: !0 });
|
|
303
|
+
m.from = (e, t, n, s, r, o) => {
|
|
304
|
+
const i = Object.create(ve);
|
|
305
|
+
return c.toFlatObject(e, i, function(f) {
|
|
306
306
|
return f !== Error.prototype;
|
|
307
|
-
}, (
|
|
307
|
+
}, (a) => a !== "isAxiosError"), m.call(i, e.message, t, n, s, r), i.cause = e, i.name = e.name, o && Object.assign(i, o), i;
|
|
308
308
|
};
|
|
309
309
|
const rn = null;
|
|
310
310
|
function de(e) {
|
|
311
|
-
return
|
|
311
|
+
return c.isPlainObject(e) || c.isArray(e);
|
|
312
312
|
}
|
|
313
313
|
function Je(e) {
|
|
314
|
-
return
|
|
314
|
+
return c.endsWith(e, "[]") ? e.slice(0, -2) : e;
|
|
315
315
|
}
|
|
316
316
|
function Oe(e, t, n) {
|
|
317
|
-
return e ? e.concat(t).map(function(r,
|
|
318
|
-
return r = Je(r), !n &&
|
|
317
|
+
return e ? e.concat(t).map(function(r, o) {
|
|
318
|
+
return r = Je(r), !n && o ? "[" + r + "]" : r;
|
|
319
319
|
}).join(n ? "." : "") : t;
|
|
320
320
|
}
|
|
321
321
|
function on(e) {
|
|
322
|
-
return
|
|
322
|
+
return c.isArray(e) && !e.some(de);
|
|
323
323
|
}
|
|
324
|
-
const an =
|
|
324
|
+
const an = c.toFlatObject(c, {}, null, function(t) {
|
|
325
325
|
return /^is[A-Z]/.test(t);
|
|
326
326
|
});
|
|
327
327
|
function oe(e, t, n) {
|
|
328
|
-
if (!
|
|
328
|
+
if (!c.isObject(e))
|
|
329
329
|
throw new TypeError("target must be an object");
|
|
330
|
-
t = t || new FormData(), n =
|
|
330
|
+
t = t || new FormData(), n = c.toFlatObject(n, {
|
|
331
331
|
metaTokens: !0,
|
|
332
332
|
dots: !1,
|
|
333
333
|
indexes: !1
|
|
334
334
|
}, !1, function(E, h) {
|
|
335
|
-
return !
|
|
335
|
+
return !c.isUndefined(h[E]);
|
|
336
336
|
});
|
|
337
|
-
const s = n.metaTokens, r = n.visitor ||
|
|
338
|
-
if (!
|
|
337
|
+
const s = n.metaTokens, r = n.visitor || l, o = n.dots, i = n.indexes, f = (n.Blob || typeof Blob < "u" && Blob) && c.isSpecCompliantForm(t);
|
|
338
|
+
if (!c.isFunction(r))
|
|
339
339
|
throw new TypeError("visitor must be a function");
|
|
340
|
-
function
|
|
340
|
+
function u(p) {
|
|
341
341
|
if (p === null) return "";
|
|
342
|
-
if (
|
|
342
|
+
if (c.isDate(p))
|
|
343
343
|
return p.toISOString();
|
|
344
|
-
if (!f &&
|
|
344
|
+
if (!f && c.isBlob(p))
|
|
345
345
|
throw new m("Blob is not supported. Use a Buffer instead.");
|
|
346
|
-
return
|
|
346
|
+
return c.isArrayBuffer(p) || c.isTypedArray(p) ? f && typeof Blob == "function" ? new Blob([p]) : Buffer.from(p) : p;
|
|
347
347
|
}
|
|
348
|
-
function
|
|
349
|
-
let
|
|
348
|
+
function l(p, E, h) {
|
|
349
|
+
let S = p;
|
|
350
350
|
if (p && !h && typeof p == "object") {
|
|
351
|
-
if (
|
|
351
|
+
if (c.endsWith(E, "{}"))
|
|
352
352
|
E = s ? E : E.slice(0, -2), p = JSON.stringify(p);
|
|
353
|
-
else if (
|
|
354
|
-
return E = Je(E),
|
|
355
|
-
!(
|
|
353
|
+
else if (c.isArray(p) && on(p) || (c.isFileList(p) || c.endsWith(E, "[]")) && (S = c.toArray(p)))
|
|
354
|
+
return E = Je(E), S.forEach(function(b, L) {
|
|
355
|
+
!(c.isUndefined(b) || b === null) && t.append(
|
|
356
356
|
// eslint-disable-next-line no-nested-ternary
|
|
357
|
-
|
|
358
|
-
|
|
357
|
+
i === !0 ? Oe([E], L, o) : i === null ? E : E + "[]",
|
|
358
|
+
u(b)
|
|
359
359
|
);
|
|
360
360
|
}), !1;
|
|
361
361
|
}
|
|
362
|
-
return de(p) ? !0 : (t.append(Oe(h, E,
|
|
362
|
+
return de(p) ? !0 : (t.append(Oe(h, E, o), u(p)), !1);
|
|
363
363
|
}
|
|
364
364
|
const d = [], R = Object.assign(an, {
|
|
365
|
-
defaultVisitor:
|
|
366
|
-
convertValue:
|
|
365
|
+
defaultVisitor: l,
|
|
366
|
+
convertValue: u,
|
|
367
367
|
isVisitable: de
|
|
368
368
|
});
|
|
369
|
-
function
|
|
370
|
-
if (!
|
|
369
|
+
function w(p, E) {
|
|
370
|
+
if (!c.isUndefined(p)) {
|
|
371
371
|
if (d.indexOf(p) !== -1)
|
|
372
372
|
throw Error("Circular reference detected in " + E.join("."));
|
|
373
|
-
d.push(p),
|
|
374
|
-
(!(
|
|
373
|
+
d.push(p), c.forEach(p, function(S, y) {
|
|
374
|
+
(!(c.isUndefined(S) || S === null) && r.call(
|
|
375
375
|
t,
|
|
376
|
-
|
|
377
|
-
|
|
376
|
+
S,
|
|
377
|
+
c.isString(y) ? y.trim() : y,
|
|
378
378
|
E,
|
|
379
379
|
R
|
|
380
|
-
)) === !0 && S
|
|
380
|
+
)) === !0 && w(S, E ? E.concat(y) : [y]);
|
|
381
381
|
}), d.pop();
|
|
382
382
|
}
|
|
383
383
|
}
|
|
384
|
-
if (!
|
|
384
|
+
if (!c.isObject(e))
|
|
385
385
|
throw new TypeError("data must be an object");
|
|
386
|
-
return
|
|
386
|
+
return w(e), t;
|
|
387
387
|
}
|
|
388
388
|
function Ae(e) {
|
|
389
389
|
const t = {
|
|
@@ -421,14 +421,14 @@ function Xe(e, t, n) {
|
|
|
421
421
|
if (!t)
|
|
422
422
|
return e;
|
|
423
423
|
const s = n && n.encode || cn;
|
|
424
|
-
|
|
424
|
+
c.isFunction(n) && (n = {
|
|
425
425
|
serialize: n
|
|
426
426
|
});
|
|
427
427
|
const r = n && n.serialize;
|
|
428
|
-
let
|
|
429
|
-
if (r ?
|
|
430
|
-
const
|
|
431
|
-
|
|
428
|
+
let o;
|
|
429
|
+
if (r ? o = r(t, n) : o = c.isURLSearchParams(t) ? t.toString() : new Se(t, n).toString(s), o) {
|
|
430
|
+
const i = e.indexOf("#");
|
|
431
|
+
i !== -1 && (e = e.slice(0, i)), e += (e.indexOf("?") === -1 ? "?" : "&") + o;
|
|
432
432
|
}
|
|
433
433
|
return e;
|
|
434
434
|
}
|
|
@@ -481,7 +481,7 @@ class _e {
|
|
|
481
481
|
* @returns {void}
|
|
482
482
|
*/
|
|
483
483
|
forEach(t) {
|
|
484
|
-
|
|
484
|
+
c.forEach(this.handlers, function(s) {
|
|
485
485
|
s !== null && t(s);
|
|
486
486
|
});
|
|
487
487
|
}
|
|
@@ -512,42 +512,42 @@ self instanceof WorkerGlobalScope && typeof self.importScripts == "function", mn
|
|
|
512
512
|
};
|
|
513
513
|
function Rn(e, t) {
|
|
514
514
|
return oe(e, new A.classes.URLSearchParams(), Object.assign({
|
|
515
|
-
visitor: function(n, s, r,
|
|
516
|
-
return A.isNode &&
|
|
515
|
+
visitor: function(n, s, r, o) {
|
|
516
|
+
return A.isNode && c.isBuffer(n) ? (this.append(s, n.toString("base64")), !1) : o.defaultVisitor.apply(this, arguments);
|
|
517
517
|
}
|
|
518
518
|
}, t));
|
|
519
519
|
}
|
|
520
520
|
function gn(e) {
|
|
521
|
-
return
|
|
521
|
+
return c.matchAll(/\w+|\[(\w*)]/g, e).map((t) => t[0] === "[]" ? "" : t[1] || t[0]);
|
|
522
522
|
}
|
|
523
523
|
function Sn(e) {
|
|
524
524
|
const t = {}, n = Object.keys(e);
|
|
525
525
|
let s;
|
|
526
526
|
const r = n.length;
|
|
527
|
-
let
|
|
527
|
+
let o;
|
|
528
528
|
for (s = 0; s < r; s++)
|
|
529
|
-
|
|
529
|
+
o = n[s], t[o] = e[o];
|
|
530
530
|
return t;
|
|
531
531
|
}
|
|
532
532
|
function Ze(e) {
|
|
533
|
-
function t(n, s, r,
|
|
534
|
-
let
|
|
535
|
-
if (
|
|
536
|
-
const
|
|
537
|
-
return
|
|
533
|
+
function t(n, s, r, o) {
|
|
534
|
+
let i = n[o++];
|
|
535
|
+
if (i === "__proto__") return !0;
|
|
536
|
+
const a = Number.isFinite(+i), f = o >= n.length;
|
|
537
|
+
return i = !i && c.isArray(r) ? r.length : i, f ? (c.hasOwnProp(r, i) ? r[i] = [r[i], s] : r[i] = s, !a) : ((!r[i] || !c.isObject(r[i])) && (r[i] = []), t(n, s, r[i], o) && c.isArray(r[i]) && (r[i] = Sn(r[i])), !a);
|
|
538
538
|
}
|
|
539
|
-
if (
|
|
539
|
+
if (c.isFormData(e) && c.isFunction(e.entries)) {
|
|
540
540
|
const n = {};
|
|
541
|
-
return
|
|
541
|
+
return c.forEachEntry(e, (s, r) => {
|
|
542
542
|
t(gn(s), r, n, 0);
|
|
543
543
|
}), n;
|
|
544
544
|
}
|
|
545
545
|
return null;
|
|
546
546
|
}
|
|
547
547
|
function wn(e, t, n) {
|
|
548
|
-
if (
|
|
548
|
+
if (c.isString(e))
|
|
549
549
|
try {
|
|
550
|
-
return (t || JSON.parse)(e),
|
|
550
|
+
return (t || JSON.parse)(e), c.trim(e);
|
|
551
551
|
} catch (s) {
|
|
552
552
|
if (s.name !== "SyntaxError")
|
|
553
553
|
throw s;
|
|
@@ -558,41 +558,41 @@ const J = {
|
|
|
558
558
|
transitional: Ye,
|
|
559
559
|
adapter: ["xhr", "http", "fetch"],
|
|
560
560
|
transformRequest: [function(t, n) {
|
|
561
|
-
const s = n.getContentType() || "", r = s.indexOf("application/json") > -1,
|
|
562
|
-
if (
|
|
561
|
+
const s = n.getContentType() || "", r = s.indexOf("application/json") > -1, o = c.isObject(t);
|
|
562
|
+
if (o && c.isHTMLForm(t) && (t = new FormData(t)), c.isFormData(t))
|
|
563
563
|
return r ? JSON.stringify(Ze(t)) : t;
|
|
564
|
-
if (
|
|
564
|
+
if (c.isArrayBuffer(t) || c.isBuffer(t) || c.isStream(t) || c.isFile(t) || c.isBlob(t) || c.isReadableStream(t))
|
|
565
565
|
return t;
|
|
566
|
-
if (
|
|
566
|
+
if (c.isArrayBufferView(t))
|
|
567
567
|
return t.buffer;
|
|
568
|
-
if (
|
|
568
|
+
if (c.isURLSearchParams(t))
|
|
569
569
|
return n.setContentType("application/x-www-form-urlencoded;charset=utf-8", !1), t.toString();
|
|
570
|
-
let
|
|
571
|
-
if (
|
|
570
|
+
let a;
|
|
571
|
+
if (o) {
|
|
572
572
|
if (s.indexOf("application/x-www-form-urlencoded") > -1)
|
|
573
573
|
return Rn(t, this.formSerializer).toString();
|
|
574
|
-
if ((
|
|
574
|
+
if ((a = c.isFileList(t)) || s.indexOf("multipart/form-data") > -1) {
|
|
575
575
|
const f = this.env && this.env.FormData;
|
|
576
576
|
return oe(
|
|
577
|
-
|
|
577
|
+
a ? { "files[]": t } : t,
|
|
578
578
|
f && new f(),
|
|
579
579
|
this.formSerializer
|
|
580
580
|
);
|
|
581
581
|
}
|
|
582
582
|
}
|
|
583
|
-
return
|
|
583
|
+
return o || r ? (n.setContentType("application/json", !1), wn(t)) : t;
|
|
584
584
|
}],
|
|
585
585
|
transformResponse: [function(t) {
|
|
586
586
|
const n = this.transitional || J.transitional, s = n && n.forcedJSONParsing, r = this.responseType === "json";
|
|
587
|
-
if (
|
|
587
|
+
if (c.isResponse(t) || c.isReadableStream(t))
|
|
588
588
|
return t;
|
|
589
|
-
if (t &&
|
|
590
|
-
const
|
|
589
|
+
if (t && c.isString(t) && (s && !this.responseType || r)) {
|
|
590
|
+
const i = !(n && n.silentJSONParsing) && r;
|
|
591
591
|
try {
|
|
592
592
|
return JSON.parse(t);
|
|
593
|
-
} catch (
|
|
594
|
-
if (
|
|
595
|
-
throw
|
|
593
|
+
} catch (a) {
|
|
594
|
+
if (i)
|
|
595
|
+
throw a.name === "SyntaxError" ? m.from(a, m.ERR_BAD_RESPONSE, this, null, this.response) : a;
|
|
596
596
|
}
|
|
597
597
|
}
|
|
598
598
|
return t;
|
|
@@ -620,10 +620,10 @@ const J = {
|
|
|
620
620
|
}
|
|
621
621
|
}
|
|
622
622
|
};
|
|
623
|
-
|
|
623
|
+
c.forEach(["delete", "get", "head", "post", "put", "patch"], (e) => {
|
|
624
624
|
J.headers[e] = {};
|
|
625
625
|
});
|
|
626
|
-
const yn =
|
|
626
|
+
const yn = c.toObjectSet([
|
|
627
627
|
"age",
|
|
628
628
|
"authorization",
|
|
629
629
|
"content-length",
|
|
@@ -645,15 +645,15 @@ const yn = a.toObjectSet([
|
|
|
645
645
|
const t = {};
|
|
646
646
|
let n, s, r;
|
|
647
647
|
return e && e.split(`
|
|
648
|
-
`).forEach(function(
|
|
649
|
-
r =
|
|
648
|
+
`).forEach(function(i) {
|
|
649
|
+
r = i.indexOf(":"), n = i.substring(0, r).trim().toLowerCase(), s = i.substring(r + 1).trim(), !(!n || t[n] && yn[n]) && (n === "set-cookie" ? t[n] ? t[n].push(s) : t[n] = [s] : t[n] = t[n] ? t[n] + ", " + s : s);
|
|
650
650
|
}), t;
|
|
651
651
|
}, Ne = Symbol("internals");
|
|
652
|
-
function
|
|
652
|
+
function K(e) {
|
|
653
653
|
return e && String(e).trim().toLowerCase();
|
|
654
654
|
}
|
|
655
655
|
function Y(e) {
|
|
656
|
-
return e === !1 || e == null ? e :
|
|
656
|
+
return e === !1 || e == null ? e : c.isArray(e) ? e.map(Y) : String(e);
|
|
657
657
|
}
|
|
658
658
|
function bn(e) {
|
|
659
659
|
const t = /* @__PURE__ */ Object.create(null), n = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
|
|
@@ -664,12 +664,12 @@ function bn(e) {
|
|
|
664
664
|
}
|
|
665
665
|
const On = (e) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());
|
|
666
666
|
function ce(e, t, n, s, r) {
|
|
667
|
-
if (
|
|
667
|
+
if (c.isFunction(s))
|
|
668
668
|
return s.call(this, t, n);
|
|
669
|
-
if (r && (t = n), !!
|
|
670
|
-
if (
|
|
669
|
+
if (r && (t = n), !!c.isString(t)) {
|
|
670
|
+
if (c.isString(s))
|
|
671
671
|
return t.indexOf(s) !== -1;
|
|
672
|
-
if (
|
|
672
|
+
if (c.isRegExp(s))
|
|
673
673
|
return s.test(t);
|
|
674
674
|
}
|
|
675
675
|
}
|
|
@@ -677,11 +677,11 @@ function An(e) {
|
|
|
677
677
|
return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (t, n, s) => n.toUpperCase() + s);
|
|
678
678
|
}
|
|
679
679
|
function _n(e, t) {
|
|
680
|
-
const n =
|
|
680
|
+
const n = c.toCamelCase(" " + t);
|
|
681
681
|
["get", "set", "has"].forEach((s) => {
|
|
682
682
|
Object.defineProperty(e, s + n, {
|
|
683
|
-
value: function(r,
|
|
684
|
-
return this[s].call(this, t, r,
|
|
683
|
+
value: function(r, o, i) {
|
|
684
|
+
return this[s].call(this, t, r, o, i);
|
|
685
685
|
},
|
|
686
686
|
configurable: !0
|
|
687
687
|
});
|
|
@@ -693,50 +693,50 @@ let k = class {
|
|
|
693
693
|
}
|
|
694
694
|
set(t, n, s) {
|
|
695
695
|
const r = this;
|
|
696
|
-
function
|
|
697
|
-
const
|
|
698
|
-
if (!
|
|
696
|
+
function o(a, f, u) {
|
|
697
|
+
const l = K(f);
|
|
698
|
+
if (!l)
|
|
699
699
|
throw new Error("header name must be a non-empty string");
|
|
700
|
-
const d =
|
|
701
|
-
(!d || r[d] === void 0 ||
|
|
700
|
+
const d = c.findKey(r, l);
|
|
701
|
+
(!d || r[d] === void 0 || u === !0 || u === void 0 && r[d] !== !1) && (r[d || f] = Y(a));
|
|
702
702
|
}
|
|
703
|
-
const
|
|
704
|
-
if (
|
|
705
|
-
|
|
706
|
-
else if (
|
|
707
|
-
|
|
708
|
-
else if (
|
|
709
|
-
let
|
|
710
|
-
for (const
|
|
711
|
-
if (!
|
|
703
|
+
const i = (a, f) => c.forEach(a, (u, l) => o(u, l, f));
|
|
704
|
+
if (c.isPlainObject(t) || t instanceof this.constructor)
|
|
705
|
+
i(t, n);
|
|
706
|
+
else if (c.isString(t) && (t = t.trim()) && !On(t))
|
|
707
|
+
i(Tn(t), n);
|
|
708
|
+
else if (c.isObject(t) && c.isIterable(t)) {
|
|
709
|
+
let a = {}, f, u;
|
|
710
|
+
for (const l of t) {
|
|
711
|
+
if (!c.isArray(l))
|
|
712
712
|
throw TypeError("Object iterator must return a key-value pair");
|
|
713
|
-
|
|
713
|
+
a[u = l[0]] = (f = a[u]) ? c.isArray(f) ? [...f, l[1]] : [f, l[1]] : l[1];
|
|
714
714
|
}
|
|
715
|
-
|
|
715
|
+
i(a, n);
|
|
716
716
|
} else
|
|
717
|
-
t != null &&
|
|
717
|
+
t != null && o(n, t, s);
|
|
718
718
|
return this;
|
|
719
719
|
}
|
|
720
720
|
get(t, n) {
|
|
721
|
-
if (t =
|
|
722
|
-
const s =
|
|
721
|
+
if (t = K(t), t) {
|
|
722
|
+
const s = c.findKey(this, t);
|
|
723
723
|
if (s) {
|
|
724
724
|
const r = this[s];
|
|
725
725
|
if (!n)
|
|
726
726
|
return r;
|
|
727
727
|
if (n === !0)
|
|
728
728
|
return bn(r);
|
|
729
|
-
if (
|
|
729
|
+
if (c.isFunction(n))
|
|
730
730
|
return n.call(this, r, s);
|
|
731
|
-
if (
|
|
731
|
+
if (c.isRegExp(n))
|
|
732
732
|
return n.exec(r);
|
|
733
733
|
throw new TypeError("parser must be boolean|regexp|function");
|
|
734
734
|
}
|
|
735
735
|
}
|
|
736
736
|
}
|
|
737
737
|
has(t, n) {
|
|
738
|
-
if (t =
|
|
739
|
-
const s =
|
|
738
|
+
if (t = K(t), t) {
|
|
739
|
+
const s = c.findKey(this, t);
|
|
740
740
|
return !!(s && this[s] !== void 0 && (!n || ce(this, this[s], s, n)));
|
|
741
741
|
}
|
|
742
742
|
return !1;
|
|
@@ -744,33 +744,33 @@ let k = class {
|
|
|
744
744
|
delete(t, n) {
|
|
745
745
|
const s = this;
|
|
746
746
|
let r = !1;
|
|
747
|
-
function i
|
|
748
|
-
if (
|
|
749
|
-
const
|
|
750
|
-
|
|
747
|
+
function o(i) {
|
|
748
|
+
if (i = K(i), i) {
|
|
749
|
+
const a = c.findKey(s, i);
|
|
750
|
+
a && (!n || ce(s, s[a], a, n)) && (delete s[a], r = !0);
|
|
751
751
|
}
|
|
752
752
|
}
|
|
753
|
-
return
|
|
753
|
+
return c.isArray(t) ? t.forEach(o) : o(t), r;
|
|
754
754
|
}
|
|
755
755
|
clear(t) {
|
|
756
756
|
const n = Object.keys(this);
|
|
757
757
|
let s = n.length, r = !1;
|
|
758
758
|
for (; s--; ) {
|
|
759
|
-
const
|
|
760
|
-
(!t || ce(this, this[
|
|
759
|
+
const o = n[s];
|
|
760
|
+
(!t || ce(this, this[o], o, t, !0)) && (delete this[o], r = !0);
|
|
761
761
|
}
|
|
762
762
|
return r;
|
|
763
763
|
}
|
|
764
764
|
normalize(t) {
|
|
765
765
|
const n = this, s = {};
|
|
766
|
-
return
|
|
767
|
-
const
|
|
768
|
-
if (
|
|
769
|
-
n[
|
|
766
|
+
return c.forEach(this, (r, o) => {
|
|
767
|
+
const i = c.findKey(s, o);
|
|
768
|
+
if (i) {
|
|
769
|
+
n[i] = Y(r), delete n[o];
|
|
770
770
|
return;
|
|
771
771
|
}
|
|
772
|
-
const
|
|
773
|
-
|
|
772
|
+
const a = t ? An(o) : String(o).trim();
|
|
773
|
+
a !== o && delete n[o], n[a] = Y(r), s[a] = !0;
|
|
774
774
|
}), this;
|
|
775
775
|
}
|
|
776
776
|
concat(...t) {
|
|
@@ -778,8 +778,8 @@ let k = class {
|
|
|
778
778
|
}
|
|
779
779
|
toJSON(t) {
|
|
780
780
|
const n = /* @__PURE__ */ Object.create(null);
|
|
781
|
-
return
|
|
782
|
-
s != null && s !== !1 && (n[r] = t &&
|
|
781
|
+
return c.forEach(this, (s, r) => {
|
|
782
|
+
s != null && s !== !1 && (n[r] = t && c.isArray(s) ? s.join(", ") : s);
|
|
783
783
|
}), n;
|
|
784
784
|
}
|
|
785
785
|
[Symbol.iterator]() {
|
|
@@ -806,15 +806,15 @@ let k = class {
|
|
|
806
806
|
const s = (this[Ne] = this[Ne] = {
|
|
807
807
|
accessors: {}
|
|
808
808
|
}).accessors, r = this.prototype;
|
|
809
|
-
function i
|
|
810
|
-
const
|
|
811
|
-
s[
|
|
809
|
+
function o(i) {
|
|
810
|
+
const a = K(i);
|
|
811
|
+
s[a] || (_n(r, i), s[a] = !0);
|
|
812
812
|
}
|
|
813
|
-
return
|
|
813
|
+
return c.isArray(t) ? t.forEach(o) : o(t), this;
|
|
814
814
|
}
|
|
815
815
|
};
|
|
816
816
|
k.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]);
|
|
817
|
-
|
|
817
|
+
c.reduceDescriptors(k.prototype, ({ value: e }, t) => {
|
|
818
818
|
let n = t[0].toUpperCase() + t.slice(1);
|
|
819
819
|
return {
|
|
820
820
|
get: () => e,
|
|
@@ -823,13 +823,13 @@ a.reduceDescriptors(k.prototype, ({ value: e }, t) => {
|
|
|
823
823
|
}
|
|
824
824
|
};
|
|
825
825
|
});
|
|
826
|
-
|
|
826
|
+
c.freezeMethods(k);
|
|
827
827
|
function ue(e, t) {
|
|
828
828
|
const n = this || J, s = t || n, r = k.from(s.headers);
|
|
829
|
-
let
|
|
830
|
-
return
|
|
831
|
-
|
|
832
|
-
}), r.normalize(),
|
|
829
|
+
let o = s.data;
|
|
830
|
+
return c.forEach(e, function(a) {
|
|
831
|
+
o = a.call(n, o, r.normalize(), t ? t.status : void 0);
|
|
832
|
+
}), r.normalize(), o;
|
|
833
833
|
}
|
|
834
834
|
function Qe(e) {
|
|
835
835
|
return !!(e && e.__CANCEL__);
|
|
@@ -837,7 +837,7 @@ function Qe(e) {
|
|
|
837
837
|
function $(e, t, n) {
|
|
838
838
|
m.call(this, e ?? "canceled", m.ERR_CANCELED, t, n), this.name = "CanceledError";
|
|
839
839
|
}
|
|
840
|
-
|
|
840
|
+
c.inherits($, m, {
|
|
841
841
|
__CANCEL__: !0
|
|
842
842
|
});
|
|
843
843
|
function et(e, t, n) {
|
|
@@ -857,46 +857,46 @@ function Nn(e) {
|
|
|
857
857
|
function Cn(e, t) {
|
|
858
858
|
e = e || 10;
|
|
859
859
|
const n = new Array(e), s = new Array(e);
|
|
860
|
-
let r = 0,
|
|
860
|
+
let r = 0, o = 0, i;
|
|
861
861
|
return t = t !== void 0 ? t : 1e3, function(f) {
|
|
862
|
-
const
|
|
863
|
-
|
|
864
|
-
let d =
|
|
862
|
+
const u = Date.now(), l = s[o];
|
|
863
|
+
i || (i = u), n[r] = f, s[r] = u;
|
|
864
|
+
let d = o, R = 0;
|
|
865
865
|
for (; d !== r; )
|
|
866
866
|
R += n[d++], d = d % e;
|
|
867
|
-
if (r = (r + 1) % e, r ===
|
|
867
|
+
if (r = (r + 1) % e, r === o && (o = (o + 1) % e), u - i < t)
|
|
868
868
|
return;
|
|
869
|
-
const
|
|
870
|
-
return
|
|
869
|
+
const w = l && u - l;
|
|
870
|
+
return w ? Math.round(R * 1e3 / w) : void 0;
|
|
871
871
|
};
|
|
872
872
|
}
|
|
873
873
|
function In(e, t) {
|
|
874
|
-
let n = 0, s = 1e3 / t, r,
|
|
875
|
-
const
|
|
876
|
-
n =
|
|
874
|
+
let n = 0, s = 1e3 / t, r, o;
|
|
875
|
+
const i = (u, l = Date.now()) => {
|
|
876
|
+
n = l, r = null, o && (clearTimeout(o), o = null), e.apply(null, u);
|
|
877
877
|
};
|
|
878
|
-
return [(...
|
|
879
|
-
const
|
|
880
|
-
d >= s ?
|
|
881
|
-
|
|
878
|
+
return [(...u) => {
|
|
879
|
+
const l = Date.now(), d = l - n;
|
|
880
|
+
d >= s ? i(u, l) : (r = u, o || (o = setTimeout(() => {
|
|
881
|
+
o = null, i(r);
|
|
882
882
|
}, s - d)));
|
|
883
|
-
}, () => r &&
|
|
883
|
+
}, () => r && i(r)];
|
|
884
884
|
}
|
|
885
885
|
const Q = (e, t, n = 3) => {
|
|
886
886
|
let s = 0;
|
|
887
887
|
const r = Cn(50, 250);
|
|
888
|
-
return In((
|
|
889
|
-
const
|
|
890
|
-
s =
|
|
888
|
+
return In((o) => {
|
|
889
|
+
const i = o.loaded, a = o.lengthComputable ? o.total : void 0, f = i - s, u = r(f), l = i <= a;
|
|
890
|
+
s = i;
|
|
891
891
|
const d = {
|
|
892
|
-
loaded:
|
|
893
|
-
total:
|
|
894
|
-
progress:
|
|
892
|
+
loaded: i,
|
|
893
|
+
total: a,
|
|
894
|
+
progress: a ? i / a : void 0,
|
|
895
895
|
bytes: f,
|
|
896
|
-
rate:
|
|
897
|
-
estimated:
|
|
898
|
-
event:
|
|
899
|
-
lengthComputable:
|
|
896
|
+
rate: u || void 0,
|
|
897
|
+
estimated: u && a && l ? (a - i) / u : void 0,
|
|
898
|
+
event: o,
|
|
899
|
+
lengthComputable: a != null,
|
|
900
900
|
[t ? "download" : "upload"]: !0
|
|
901
901
|
};
|
|
902
902
|
e(d);
|
|
@@ -908,15 +908,15 @@ const Q = (e, t, n = 3) => {
|
|
|
908
908
|
total: e,
|
|
909
909
|
loaded: s
|
|
910
910
|
}), t[1]];
|
|
911
|
-
}, Ie = (e) => (...t) =>
|
|
911
|
+
}, Ie = (e) => (...t) => c.asap(() => e(...t)), kn = A.hasStandardBrowserEnv ? /* @__PURE__ */ ((e, t) => (n) => (n = new URL(n, A.origin), e.protocol === n.protocol && e.host === n.host && (t || e.port === n.port)))(
|
|
912
912
|
new URL(A.origin),
|
|
913
913
|
A.navigator && /(msie|trident)/i.test(A.navigator.userAgent)
|
|
914
914
|
) : () => !0, Un = A.hasStandardBrowserEnv ? (
|
|
915
915
|
// Standard browser envs support document.cookie
|
|
916
916
|
{
|
|
917
|
-
write(e, t, n, s, r,
|
|
918
|
-
const
|
|
919
|
-
|
|
917
|
+
write(e, t, n, s, r, o) {
|
|
918
|
+
const i = [e + "=" + encodeURIComponent(t)];
|
|
919
|
+
c.isNumber(n) && i.push("expires=" + new Date(n).toGMTString()), c.isString(s) && i.push("path=" + s), c.isString(r) && i.push("domain=" + r), o === !0 && i.push("secure"), document.cookie = i.join("; ");
|
|
920
920
|
},
|
|
921
921
|
read(e) {
|
|
922
922
|
const t = document.cookie.match(new RegExp("(^|;\\s*)(" + e + ")=([^;]*)"));
|
|
@@ -952,106 +952,106 @@ const ke = (e) => e instanceof k ? { ...e } : e;
|
|
|
952
952
|
function j(e, t) {
|
|
953
953
|
t = t || {};
|
|
954
954
|
const n = {};
|
|
955
|
-
function s(
|
|
956
|
-
return
|
|
955
|
+
function s(u, l, d, R) {
|
|
956
|
+
return c.isPlainObject(u) && c.isPlainObject(l) ? c.merge.call({ caseless: R }, u, l) : c.isPlainObject(l) ? c.merge({}, l) : c.isArray(l) ? l.slice() : l;
|
|
957
957
|
}
|
|
958
|
-
function r(
|
|
959
|
-
if (
|
|
960
|
-
if (!
|
|
961
|
-
return s(void 0,
|
|
962
|
-
} else return s(
|
|
958
|
+
function r(u, l, d, R) {
|
|
959
|
+
if (c.isUndefined(l)) {
|
|
960
|
+
if (!c.isUndefined(u))
|
|
961
|
+
return s(void 0, u, d, R);
|
|
962
|
+
} else return s(u, l, d, R);
|
|
963
963
|
}
|
|
964
|
-
function
|
|
965
|
-
if (!
|
|
966
|
-
return s(void 0,
|
|
964
|
+
function o(u, l) {
|
|
965
|
+
if (!c.isUndefined(l))
|
|
966
|
+
return s(void 0, l);
|
|
967
967
|
}
|
|
968
|
-
function
|
|
969
|
-
if (
|
|
970
|
-
if (!
|
|
971
|
-
return s(void 0,
|
|
972
|
-
} else return s(void 0,
|
|
968
|
+
function i(u, l) {
|
|
969
|
+
if (c.isUndefined(l)) {
|
|
970
|
+
if (!c.isUndefined(u))
|
|
971
|
+
return s(void 0, u);
|
|
972
|
+
} else return s(void 0, l);
|
|
973
973
|
}
|
|
974
|
-
function
|
|
974
|
+
function a(u, l, d) {
|
|
975
975
|
if (d in t)
|
|
976
|
-
return s(
|
|
976
|
+
return s(u, l);
|
|
977
977
|
if (d in e)
|
|
978
|
-
return s(void 0,
|
|
978
|
+
return s(void 0, u);
|
|
979
979
|
}
|
|
980
980
|
const f = {
|
|
981
|
-
url:
|
|
982
|
-
method:
|
|
983
|
-
data:
|
|
984
|
-
baseURL:
|
|
985
|
-
transformRequest:
|
|
986
|
-
transformResponse:
|
|
987
|
-
paramsSerializer:
|
|
988
|
-
timeout:
|
|
989
|
-
timeoutMessage:
|
|
990
|
-
withCredentials:
|
|
991
|
-
withXSRFToken:
|
|
992
|
-
adapter:
|
|
993
|
-
responseType:
|
|
994
|
-
xsrfCookieName:
|
|
995
|
-
xsrfHeaderName:
|
|
996
|
-
onUploadProgress:
|
|
997
|
-
onDownloadProgress:
|
|
998
|
-
decompress:
|
|
999
|
-
maxContentLength:
|
|
1000
|
-
maxBodyLength:
|
|
1001
|
-
beforeRedirect:
|
|
1002
|
-
transport:
|
|
1003
|
-
httpAgent:
|
|
1004
|
-
httpsAgent:
|
|
1005
|
-
cancelToken:
|
|
1006
|
-
socketPath:
|
|
1007
|
-
responseEncoding:
|
|
1008
|
-
validateStatus:
|
|
1009
|
-
headers: (
|
|
981
|
+
url: o,
|
|
982
|
+
method: o,
|
|
983
|
+
data: o,
|
|
984
|
+
baseURL: i,
|
|
985
|
+
transformRequest: i,
|
|
986
|
+
transformResponse: i,
|
|
987
|
+
paramsSerializer: i,
|
|
988
|
+
timeout: i,
|
|
989
|
+
timeoutMessage: i,
|
|
990
|
+
withCredentials: i,
|
|
991
|
+
withXSRFToken: i,
|
|
992
|
+
adapter: i,
|
|
993
|
+
responseType: i,
|
|
994
|
+
xsrfCookieName: i,
|
|
995
|
+
xsrfHeaderName: i,
|
|
996
|
+
onUploadProgress: i,
|
|
997
|
+
onDownloadProgress: i,
|
|
998
|
+
decompress: i,
|
|
999
|
+
maxContentLength: i,
|
|
1000
|
+
maxBodyLength: i,
|
|
1001
|
+
beforeRedirect: i,
|
|
1002
|
+
transport: i,
|
|
1003
|
+
httpAgent: i,
|
|
1004
|
+
httpsAgent: i,
|
|
1005
|
+
cancelToken: i,
|
|
1006
|
+
socketPath: i,
|
|
1007
|
+
responseEncoding: i,
|
|
1008
|
+
validateStatus: a,
|
|
1009
|
+
headers: (u, l, d) => r(ke(u), ke(l), d, !0)
|
|
1010
1010
|
};
|
|
1011
|
-
return
|
|
1012
|
-
const d = f[
|
|
1013
|
-
|
|
1011
|
+
return c.forEach(Object.keys(Object.assign({}, e, t)), function(l) {
|
|
1012
|
+
const d = f[l] || r, R = d(e[l], t[l], l);
|
|
1013
|
+
c.isUndefined(R) && d !== a || (n[l] = R);
|
|
1014
1014
|
}), n;
|
|
1015
1015
|
}
|
|
1016
1016
|
const nt = (e) => {
|
|
1017
1017
|
const t = j({}, e);
|
|
1018
|
-
let { data: n, withXSRFToken: s, xsrfHeaderName: r, xsrfCookieName:
|
|
1019
|
-
t.headers =
|
|
1018
|
+
let { data: n, withXSRFToken: s, xsrfHeaderName: r, xsrfCookieName: o, headers: i, auth: a } = t;
|
|
1019
|
+
t.headers = i = k.from(i), t.url = Xe(tt(t.baseURL, t.url, t.allowAbsoluteUrls), e.params, e.paramsSerializer), a && i.set(
|
|
1020
1020
|
"Authorization",
|
|
1021
|
-
"Basic " + btoa((
|
|
1021
|
+
"Basic " + btoa((a.username || "") + ":" + (a.password ? unescape(encodeURIComponent(a.password)) : ""))
|
|
1022
1022
|
);
|
|
1023
1023
|
let f;
|
|
1024
|
-
if (
|
|
1024
|
+
if (c.isFormData(n)) {
|
|
1025
1025
|
if (A.hasStandardBrowserEnv || A.hasStandardBrowserWebWorkerEnv)
|
|
1026
|
-
|
|
1027
|
-
else if ((f =
|
|
1028
|
-
const [
|
|
1029
|
-
|
|
1026
|
+
i.setContentType(void 0);
|
|
1027
|
+
else if ((f = i.getContentType()) !== !1) {
|
|
1028
|
+
const [u, ...l] = f ? f.split(";").map((d) => d.trim()).filter(Boolean) : [];
|
|
1029
|
+
i.setContentType([u || "multipart/form-data", ...l].join("; "));
|
|
1030
1030
|
}
|
|
1031
1031
|
}
|
|
1032
|
-
if (A.hasStandardBrowserEnv && (s &&
|
|
1033
|
-
const
|
|
1034
|
-
|
|
1032
|
+
if (A.hasStandardBrowserEnv && (s && c.isFunction(s) && (s = s(t)), s || s !== !1 && kn(t.url))) {
|
|
1033
|
+
const u = r && o && Un.read(o);
|
|
1034
|
+
u && i.set(r, u);
|
|
1035
1035
|
}
|
|
1036
1036
|
return t;
|
|
1037
1037
|
}, Ln = typeof XMLHttpRequest < "u", Fn = Ln && function(e) {
|
|
1038
1038
|
return new Promise(function(n, s) {
|
|
1039
1039
|
const r = nt(e);
|
|
1040
|
-
let
|
|
1041
|
-
const
|
|
1042
|
-
let { responseType:
|
|
1040
|
+
let o = r.data;
|
|
1041
|
+
const i = k.from(r.headers).normalize();
|
|
1042
|
+
let { responseType: a, onUploadProgress: f, onDownloadProgress: u } = r, l, d, R, w, p;
|
|
1043
1043
|
function E() {
|
|
1044
|
-
|
|
1044
|
+
w && w(), p && p(), r.cancelToken && r.cancelToken.unsubscribe(l), r.signal && r.signal.removeEventListener("abort", l);
|
|
1045
1045
|
}
|
|
1046
1046
|
let h = new XMLHttpRequest();
|
|
1047
1047
|
h.open(r.method.toUpperCase(), r.url, !0), h.timeout = r.timeout;
|
|
1048
|
-
function
|
|
1048
|
+
function S() {
|
|
1049
1049
|
if (!h)
|
|
1050
1050
|
return;
|
|
1051
1051
|
const b = k.from(
|
|
1052
1052
|
"getAllResponseHeaders" in h && h.getAllResponseHeaders()
|
|
1053
|
-
),
|
|
1054
|
-
data: !
|
|
1053
|
+
), C = {
|
|
1054
|
+
data: !a || a === "text" || a === "json" ? h.responseText : h.response,
|
|
1055
1055
|
status: h.status,
|
|
1056
1056
|
statusText: h.statusText,
|
|
1057
1057
|
headers: b,
|
|
@@ -1062,57 +1062,57 @@ const nt = (e) => {
|
|
|
1062
1062
|
n(B), E();
|
|
1063
1063
|
}, function(B) {
|
|
1064
1064
|
s(B), E();
|
|
1065
|
-
},
|
|
1065
|
+
}, C), h = null;
|
|
1066
1066
|
}
|
|
1067
|
-
"onloadend" in h ? h.onloadend =
|
|
1068
|
-
!h || h.readyState !== 4 || h.status === 0 && !(h.responseURL && h.responseURL.indexOf("file:") === 0) || setTimeout(
|
|
1067
|
+
"onloadend" in h ? h.onloadend = S : h.onreadystatechange = function() {
|
|
1068
|
+
!h || h.readyState !== 4 || h.status === 0 && !(h.responseURL && h.responseURL.indexOf("file:") === 0) || setTimeout(S);
|
|
1069
1069
|
}, h.onabort = function() {
|
|
1070
1070
|
h && (s(new m("Request aborted", m.ECONNABORTED, e, h)), h = null);
|
|
1071
1071
|
}, h.onerror = function() {
|
|
1072
1072
|
s(new m("Network Error", m.ERR_NETWORK, e, h)), h = null;
|
|
1073
1073
|
}, h.ontimeout = function() {
|
|
1074
1074
|
let L = r.timeout ? "timeout of " + r.timeout + "ms exceeded" : "timeout exceeded";
|
|
1075
|
-
const
|
|
1075
|
+
const C = r.transitional || Ye;
|
|
1076
1076
|
r.timeoutErrorMessage && (L = r.timeoutErrorMessage), s(new m(
|
|
1077
1077
|
L,
|
|
1078
|
-
|
|
1078
|
+
C.clarifyTimeoutError ? m.ETIMEDOUT : m.ECONNABORTED,
|
|
1079
1079
|
e,
|
|
1080
1080
|
h
|
|
1081
1081
|
)), h = null;
|
|
1082
|
-
},
|
|
1083
|
-
h.setRequestHeader(
|
|
1084
|
-
}),
|
|
1082
|
+
}, o === void 0 && i.setContentType(null), "setRequestHeader" in h && c.forEach(i.toJSON(), function(L, C) {
|
|
1083
|
+
h.setRequestHeader(C, L);
|
|
1084
|
+
}), c.isUndefined(r.withCredentials) || (h.withCredentials = !!r.withCredentials), a && a !== "json" && (h.responseType = r.responseType), u && ([R, p] = Q(u, !0), h.addEventListener("progress", R)), f && h.upload && ([d, w] = Q(f), h.upload.addEventListener("progress", d), h.upload.addEventListener("loadend", w)), (r.cancelToken || r.signal) && (l = (b) => {
|
|
1085
1085
|
h && (s(!b || b.type ? new $(null, e, h) : b), h.abort(), h = null);
|
|
1086
|
-
}, r.cancelToken && r.cancelToken.subscribe(
|
|
1086
|
+
}, r.cancelToken && r.cancelToken.subscribe(l), r.signal && (r.signal.aborted ? l() : r.signal.addEventListener("abort", l)));
|
|
1087
1087
|
const y = Nn(r.url);
|
|
1088
1088
|
if (y && A.protocols.indexOf(y) === -1) {
|
|
1089
1089
|
s(new m("Unsupported protocol " + y + ":", m.ERR_BAD_REQUEST, e));
|
|
1090
1090
|
return;
|
|
1091
1091
|
}
|
|
1092
|
-
h.send(
|
|
1092
|
+
h.send(o || null);
|
|
1093
1093
|
});
|
|
1094
1094
|
}, Dn = (e, t) => {
|
|
1095
1095
|
const { length: n } = e = e ? e.filter(Boolean) : [];
|
|
1096
1096
|
if (t || n) {
|
|
1097
1097
|
let s = new AbortController(), r;
|
|
1098
|
-
const
|
|
1098
|
+
const o = function(u) {
|
|
1099
1099
|
if (!r) {
|
|
1100
|
-
r = !0,
|
|
1101
|
-
const
|
|
1102
|
-
s.abort(
|
|
1100
|
+
r = !0, a();
|
|
1101
|
+
const l = u instanceof Error ? u : this.reason;
|
|
1102
|
+
s.abort(l instanceof m ? l : new $(l instanceof Error ? l.message : l));
|
|
1103
1103
|
}
|
|
1104
1104
|
};
|
|
1105
|
-
let
|
|
1106
|
-
|
|
1105
|
+
let i = t && setTimeout(() => {
|
|
1106
|
+
i = null, o(new m(`timeout ${t} of ms exceeded`, m.ETIMEDOUT));
|
|
1107
1107
|
}, t);
|
|
1108
|
-
const
|
|
1109
|
-
e && (
|
|
1110
|
-
|
|
1108
|
+
const a = () => {
|
|
1109
|
+
e && (i && clearTimeout(i), i = null, e.forEach((u) => {
|
|
1110
|
+
u.unsubscribe ? u.unsubscribe(o) : u.removeEventListener("abort", o);
|
|
1111
1111
|
}), e = null);
|
|
1112
1112
|
};
|
|
1113
|
-
e.forEach((
|
|
1113
|
+
e.forEach((u) => u.addEventListener("abort", o));
|
|
1114
1114
|
const { signal: f } = s;
|
|
1115
|
-
return f.unsubscribe = () =>
|
|
1115
|
+
return f.unsubscribe = () => c.asap(a), f;
|
|
1116
1116
|
}
|
|
1117
1117
|
}, Bn = function* (e, t) {
|
|
1118
1118
|
let n = e.byteLength;
|
|
@@ -1144,29 +1144,29 @@ const nt = (e) => {
|
|
|
1144
1144
|
}
|
|
1145
1145
|
}, Ue = (e, t, n, s) => {
|
|
1146
1146
|
const r = qn(e, t);
|
|
1147
|
-
let
|
|
1148
|
-
|
|
1147
|
+
let o = 0, i, a = (f) => {
|
|
1148
|
+
i || (i = !0, s && s(f));
|
|
1149
1149
|
};
|
|
1150
1150
|
return new ReadableStream({
|
|
1151
1151
|
async pull(f) {
|
|
1152
1152
|
try {
|
|
1153
|
-
const { done:
|
|
1154
|
-
if (
|
|
1155
|
-
|
|
1153
|
+
const { done: u, value: l } = await r.next();
|
|
1154
|
+
if (u) {
|
|
1155
|
+
a(), f.close();
|
|
1156
1156
|
return;
|
|
1157
1157
|
}
|
|
1158
|
-
let d =
|
|
1158
|
+
let d = l.byteLength;
|
|
1159
1159
|
if (n) {
|
|
1160
|
-
let R =
|
|
1160
|
+
let R = o += d;
|
|
1161
1161
|
n(R);
|
|
1162
1162
|
}
|
|
1163
|
-
f.enqueue(new Uint8Array(
|
|
1164
|
-
} catch (
|
|
1165
|
-
throw
|
|
1163
|
+
f.enqueue(new Uint8Array(l));
|
|
1164
|
+
} catch (u) {
|
|
1165
|
+
throw a(u), u;
|
|
1166
1166
|
}
|
|
1167
1167
|
},
|
|
1168
1168
|
cancel(f) {
|
|
1169
|
-
return
|
|
1169
|
+
return a(f), r.return();
|
|
1170
1170
|
}
|
|
1171
1171
|
}, {
|
|
1172
1172
|
highWaterMark: 2
|
|
@@ -1187,12 +1187,12 @@ const nt = (e) => {
|
|
|
1187
1187
|
}
|
|
1188
1188
|
}).headers.has("Content-Type");
|
|
1189
1189
|
return e && !t;
|
|
1190
|
-
}), xe = 64 * 1024, he = st && rt(() =>
|
|
1190
|
+
}), xe = 64 * 1024, he = st && rt(() => c.isReadableStream(new Response("").body)), ee = {
|
|
1191
1191
|
stream: he && ((e) => e.body)
|
|
1192
1192
|
};
|
|
1193
1193
|
ie && ((e) => {
|
|
1194
1194
|
["text", "arrayBuffer", "blob", "formData", "stream"].forEach((t) => {
|
|
1195
|
-
!ee[t] && (ee[t] =
|
|
1195
|
+
!ee[t] && (ee[t] = c.isFunction(e[t]) ? (n) => n[t]() : (n, s) => {
|
|
1196
1196
|
throw new m(`Response type '${t}' is not supported`, m.ERR_NOT_SUPPORT, s);
|
|
1197
1197
|
});
|
|
1198
1198
|
});
|
|
@@ -1200,19 +1200,19 @@ ie && ((e) => {
|
|
|
1200
1200
|
const Gn = async (e) => {
|
|
1201
1201
|
if (e == null)
|
|
1202
1202
|
return 0;
|
|
1203
|
-
if (
|
|
1203
|
+
if (c.isBlob(e))
|
|
1204
1204
|
return e.size;
|
|
1205
|
-
if (
|
|
1205
|
+
if (c.isSpecCompliantForm(e))
|
|
1206
1206
|
return (await new Request(A.origin, {
|
|
1207
1207
|
method: "POST",
|
|
1208
1208
|
body: e
|
|
1209
1209
|
}).arrayBuffer()).byteLength;
|
|
1210
|
-
if (
|
|
1210
|
+
if (c.isArrayBufferView(e) || c.isArrayBuffer(e))
|
|
1211
1211
|
return e.byteLength;
|
|
1212
|
-
if (
|
|
1212
|
+
if (c.isURLSearchParams(e) && (e = e + ""), c.isString(e))
|
|
1213
1213
|
return (await Mn(e)).byteLength;
|
|
1214
1214
|
}, zn = async (e, t) => {
|
|
1215
|
-
const n =
|
|
1215
|
+
const n = c.toFiniteNumber(e.getContentLength());
|
|
1216
1216
|
return n ?? Gn(t);
|
|
1217
1217
|
}, $n = ie && (async (e) => {
|
|
1218
1218
|
let {
|
|
@@ -1220,69 +1220,69 @@ const Gn = async (e) => {
|
|
|
1220
1220
|
method: n,
|
|
1221
1221
|
data: s,
|
|
1222
1222
|
signal: r,
|
|
1223
|
-
cancelToken:
|
|
1224
|
-
timeout:
|
|
1225
|
-
onDownloadProgress:
|
|
1223
|
+
cancelToken: o,
|
|
1224
|
+
timeout: i,
|
|
1225
|
+
onDownloadProgress: a,
|
|
1226
1226
|
onUploadProgress: f,
|
|
1227
|
-
responseType:
|
|
1228
|
-
headers:
|
|
1227
|
+
responseType: u,
|
|
1228
|
+
headers: l,
|
|
1229
1229
|
withCredentials: d = "same-origin",
|
|
1230
1230
|
fetchOptions: R
|
|
1231
1231
|
} = nt(e);
|
|
1232
|
-
|
|
1233
|
-
let
|
|
1234
|
-
const E =
|
|
1235
|
-
|
|
1232
|
+
u = u ? (u + "").toLowerCase() : "text";
|
|
1233
|
+
let w = Dn([r, o && o.toAbortSignal()], i), p;
|
|
1234
|
+
const E = w && w.unsubscribe && (() => {
|
|
1235
|
+
w.unsubscribe();
|
|
1236
1236
|
});
|
|
1237
1237
|
let h;
|
|
1238
1238
|
try {
|
|
1239
|
-
if (f && jn && n !== "get" && n !== "head" && (h = await zn(
|
|
1240
|
-
let
|
|
1239
|
+
if (f && jn && n !== "get" && n !== "head" && (h = await zn(l, s)) !== 0) {
|
|
1240
|
+
let C = new Request(t, {
|
|
1241
1241
|
method: "POST",
|
|
1242
1242
|
body: s,
|
|
1243
1243
|
duplex: "half"
|
|
1244
1244
|
}), D;
|
|
1245
|
-
if (
|
|
1245
|
+
if (c.isFormData(s) && (D = C.headers.get("content-type")) && l.setContentType(D), C.body) {
|
|
1246
1246
|
const [B, W] = Ce(
|
|
1247
1247
|
h,
|
|
1248
1248
|
Q(Ie(f))
|
|
1249
1249
|
);
|
|
1250
|
-
s = Ue(
|
|
1250
|
+
s = Ue(C.body, xe, B, W);
|
|
1251
1251
|
}
|
|
1252
1252
|
}
|
|
1253
|
-
|
|
1254
|
-
const
|
|
1253
|
+
c.isString(d) || (d = d ? "include" : "omit");
|
|
1254
|
+
const S = "credentials" in Request.prototype;
|
|
1255
1255
|
p = new Request(t, {
|
|
1256
1256
|
...R,
|
|
1257
|
-
signal:
|
|
1257
|
+
signal: w,
|
|
1258
1258
|
method: n.toUpperCase(),
|
|
1259
|
-
headers:
|
|
1259
|
+
headers: l.normalize().toJSON(),
|
|
1260
1260
|
body: s,
|
|
1261
1261
|
duplex: "half",
|
|
1262
|
-
credentials:
|
|
1262
|
+
credentials: S ? d : void 0
|
|
1263
1263
|
});
|
|
1264
1264
|
let y = await fetch(p);
|
|
1265
|
-
const b = he && (
|
|
1266
|
-
if (he && (
|
|
1267
|
-
const
|
|
1265
|
+
const b = he && (u === "stream" || u === "response");
|
|
1266
|
+
if (he && (a || b && E)) {
|
|
1267
|
+
const C = {};
|
|
1268
1268
|
["status", "statusText", "headers"].forEach((ye) => {
|
|
1269
|
-
|
|
1269
|
+
C[ye] = y[ye];
|
|
1270
1270
|
});
|
|
1271
|
-
const D =
|
|
1271
|
+
const D = c.toFiniteNumber(y.headers.get("content-length")), [B, W] = a && Ce(
|
|
1272
1272
|
D,
|
|
1273
|
-
Q(Ie(
|
|
1273
|
+
Q(Ie(a), !0)
|
|
1274
1274
|
) || [];
|
|
1275
1275
|
y = new Response(
|
|
1276
1276
|
Ue(y.body, xe, B, () => {
|
|
1277
1277
|
W && W(), E && E();
|
|
1278
1278
|
}),
|
|
1279
|
-
|
|
1279
|
+
C
|
|
1280
1280
|
);
|
|
1281
1281
|
}
|
|
1282
|
-
|
|
1283
|
-
let L = await ee[
|
|
1284
|
-
return !b && E && E(), await new Promise((
|
|
1285
|
-
et(
|
|
1282
|
+
u = u || "text";
|
|
1283
|
+
let L = await ee[c.findKey(ee, u) || "text"](y, e);
|
|
1284
|
+
return !b && E && E(), await new Promise((C, D) => {
|
|
1285
|
+
et(C, D, {
|
|
1286
1286
|
data: L,
|
|
1287
1287
|
headers: k.from(y.headers),
|
|
1288
1288
|
status: y.status,
|
|
@@ -1291,20 +1291,20 @@ const Gn = async (e) => {
|
|
|
1291
1291
|
request: p
|
|
1292
1292
|
});
|
|
1293
1293
|
});
|
|
1294
|
-
} catch (
|
|
1295
|
-
throw E && E(),
|
|
1294
|
+
} catch (S) {
|
|
1295
|
+
throw E && E(), S && S.name === "TypeError" && /Load failed|fetch/i.test(S.message) ? Object.assign(
|
|
1296
1296
|
new m("Network Error", m.ERR_NETWORK, e, p),
|
|
1297
1297
|
{
|
|
1298
|
-
cause:
|
|
1298
|
+
cause: S.cause || S
|
|
1299
1299
|
}
|
|
1300
|
-
) : m.from(
|
|
1300
|
+
) : m.from(S, S && S.code, e, p);
|
|
1301
1301
|
}
|
|
1302
1302
|
}), me = {
|
|
1303
1303
|
http: rn,
|
|
1304
1304
|
xhr: Fn,
|
|
1305
1305
|
fetch: $n
|
|
1306
1306
|
};
|
|
1307
|
-
|
|
1307
|
+
c.forEach(me, (e, t) => {
|
|
1308
1308
|
if (e) {
|
|
1309
1309
|
try {
|
|
1310
1310
|
Object.defineProperty(e, "name", { value: t });
|
|
@@ -1313,30 +1313,30 @@ a.forEach(me, (e, t) => {
|
|
|
1313
1313
|
Object.defineProperty(e, "adapterName", { value: t });
|
|
1314
1314
|
}
|
|
1315
1315
|
});
|
|
1316
|
-
const Pe = (e) => `- ${e}`,
|
|
1316
|
+
const Pe = (e) => `- ${e}`, Kn = (e) => c.isFunction(e) || e === null || e === !1, ot = {
|
|
1317
1317
|
getAdapter: (e) => {
|
|
1318
|
-
e =
|
|
1318
|
+
e = c.isArray(e) ? e : [e];
|
|
1319
1319
|
const { length: t } = e;
|
|
1320
1320
|
let n, s;
|
|
1321
1321
|
const r = {};
|
|
1322
|
-
for (let
|
|
1323
|
-
n = e[
|
|
1324
|
-
let
|
|
1325
|
-
if (s = n, !
|
|
1326
|
-
throw new m(`Unknown adapter '${
|
|
1322
|
+
for (let o = 0; o < t; o++) {
|
|
1323
|
+
n = e[o];
|
|
1324
|
+
let i;
|
|
1325
|
+
if (s = n, !Kn(n) && (s = me[(i = String(n)).toLowerCase()], s === void 0))
|
|
1326
|
+
throw new m(`Unknown adapter '${i}'`);
|
|
1327
1327
|
if (s)
|
|
1328
1328
|
break;
|
|
1329
|
-
r[
|
|
1329
|
+
r[i || "#" + o] = s;
|
|
1330
1330
|
}
|
|
1331
1331
|
if (!s) {
|
|
1332
|
-
const
|
|
1333
|
-
([
|
|
1332
|
+
const o = Object.entries(r).map(
|
|
1333
|
+
([a, f]) => `adapter ${a} ` + (f === !1 ? "is not supported by the environment" : "is not available in the build")
|
|
1334
1334
|
);
|
|
1335
|
-
let
|
|
1336
|
-
` +
|
|
1337
|
-
`) : " " + Pe(
|
|
1335
|
+
let i = t ? o.length > 1 ? `since :
|
|
1336
|
+
` + o.map(Pe).join(`
|
|
1337
|
+
`) : " " + Pe(o[0]) : "as no adapter specified";
|
|
1338
1338
|
throw new m(
|
|
1339
|
-
"There is no suitable adapter to dispatch the request " +
|
|
1339
|
+
"There is no suitable adapter to dispatch the request " + i,
|
|
1340
1340
|
"ERR_NOT_SUPPORT"
|
|
1341
1341
|
);
|
|
1342
1342
|
}
|
|
@@ -1374,45 +1374,45 @@ const it = "1.9.0", ae = {};
|
|
|
1374
1374
|
});
|
|
1375
1375
|
const Fe = {};
|
|
1376
1376
|
ae.transitional = function(t, n, s) {
|
|
1377
|
-
function r(
|
|
1378
|
-
return "[Axios v" + it + "] Transitional option '" +
|
|
1377
|
+
function r(o, i) {
|
|
1378
|
+
return "[Axios v" + it + "] Transitional option '" + o + "'" + i + (s ? ". " + s : "");
|
|
1379
1379
|
}
|
|
1380
|
-
return (
|
|
1380
|
+
return (o, i, a) => {
|
|
1381
1381
|
if (t === !1)
|
|
1382
1382
|
throw new m(
|
|
1383
|
-
r(
|
|
1383
|
+
r(i, " has been removed" + (n ? " in " + n : "")),
|
|
1384
1384
|
m.ERR_DEPRECATED
|
|
1385
1385
|
);
|
|
1386
|
-
return n && !Fe[
|
|
1386
|
+
return n && !Fe[i] && (Fe[i] = !0, console.warn(
|
|
1387
1387
|
r(
|
|
1388
|
-
|
|
1388
|
+
i,
|
|
1389
1389
|
" has been deprecated since v" + n + " and will be removed in the near future"
|
|
1390
1390
|
)
|
|
1391
|
-
)), t ? t(
|
|
1391
|
+
)), t ? t(o, i, a) : !0;
|
|
1392
1392
|
};
|
|
1393
1393
|
};
|
|
1394
1394
|
ae.spelling = function(t) {
|
|
1395
1395
|
return (n, s) => (console.warn(`${s} is likely a misspelling of ${t}`), !0);
|
|
1396
1396
|
};
|
|
1397
|
-
function
|
|
1397
|
+
function vn(e, t, n) {
|
|
1398
1398
|
if (typeof e != "object")
|
|
1399
1399
|
throw new m("options must be an object", m.ERR_BAD_OPTION_VALUE);
|
|
1400
1400
|
const s = Object.keys(e);
|
|
1401
1401
|
let r = s.length;
|
|
1402
1402
|
for (; r-- > 0; ) {
|
|
1403
|
-
const
|
|
1404
|
-
if (
|
|
1405
|
-
const
|
|
1403
|
+
const o = s[r], i = t[o];
|
|
1404
|
+
if (i) {
|
|
1405
|
+
const a = e[o], f = a === void 0 || i(a, o, e);
|
|
1406
1406
|
if (f !== !0)
|
|
1407
|
-
throw new m("option " +
|
|
1407
|
+
throw new m("option " + o + " must be " + f, m.ERR_BAD_OPTION_VALUE);
|
|
1408
1408
|
continue;
|
|
1409
1409
|
}
|
|
1410
1410
|
if (n !== !0)
|
|
1411
|
-
throw new m("Unknown option " +
|
|
1411
|
+
throw new m("Unknown option " + o, m.ERR_BAD_OPTION);
|
|
1412
1412
|
}
|
|
1413
1413
|
}
|
|
1414
1414
|
const Z = {
|
|
1415
|
-
assertOptions:
|
|
1415
|
+
assertOptions: vn,
|
|
1416
1416
|
validators: ae
|
|
1417
1417
|
}, P = Z.validators;
|
|
1418
1418
|
let M = class {
|
|
@@ -1437,10 +1437,10 @@ let M = class {
|
|
|
1437
1437
|
if (s instanceof Error) {
|
|
1438
1438
|
let r = {};
|
|
1439
1439
|
Error.captureStackTrace ? Error.captureStackTrace(r) : r = new Error();
|
|
1440
|
-
const
|
|
1440
|
+
const o = r.stack ? r.stack.replace(/^.+\n/, "") : "";
|
|
1441
1441
|
try {
|
|
1442
|
-
s.stack ?
|
|
1443
|
-
` +
|
|
1442
|
+
s.stack ? o && !String(s.stack).endsWith(o.replace(/^.+\n.+\n/, "")) && (s.stack += `
|
|
1443
|
+
` + o) : s.stack = o;
|
|
1444
1444
|
} catch {
|
|
1445
1445
|
}
|
|
1446
1446
|
}
|
|
@@ -1449,12 +1449,12 @@ let M = class {
|
|
|
1449
1449
|
}
|
|
1450
1450
|
_request(t, n) {
|
|
1451
1451
|
typeof t == "string" ? (n = n || {}, n.url = t) : n = t || {}, n = j(this.defaults, n);
|
|
1452
|
-
const { transitional: s, paramsSerializer: r, headers:
|
|
1452
|
+
const { transitional: s, paramsSerializer: r, headers: o } = n;
|
|
1453
1453
|
s !== void 0 && Z.assertOptions(s, {
|
|
1454
1454
|
silentJSONParsing: P.transitional(P.boolean),
|
|
1455
1455
|
forcedJSONParsing: P.transitional(P.boolean),
|
|
1456
1456
|
clarifyTimeoutError: P.transitional(P.boolean)
|
|
1457
|
-
}, !1), r != null && (
|
|
1457
|
+
}, !1), r != null && (c.isFunction(r) ? n.paramsSerializer = {
|
|
1458
1458
|
serialize: r
|
|
1459
1459
|
} : Z.assertOptions(r, {
|
|
1460
1460
|
encode: P.function,
|
|
@@ -1463,51 +1463,51 @@ let M = class {
|
|
|
1463
1463
|
baseUrl: P.spelling("baseURL"),
|
|
1464
1464
|
withXsrfToken: P.spelling("withXSRFToken")
|
|
1465
1465
|
}, !0), n.method = (n.method || this.defaults.method || "get").toLowerCase();
|
|
1466
|
-
let
|
|
1467
|
-
|
|
1468
|
-
|
|
1466
|
+
let i = o && c.merge(
|
|
1467
|
+
o.common,
|
|
1468
|
+
o[n.method]
|
|
1469
1469
|
);
|
|
1470
|
-
|
|
1470
|
+
o && c.forEach(
|
|
1471
1471
|
["delete", "get", "head", "post", "put", "patch", "common"],
|
|
1472
1472
|
(p) => {
|
|
1473
|
-
delete
|
|
1473
|
+
delete o[p];
|
|
1474
1474
|
}
|
|
1475
|
-
), n.headers = k.concat(
|
|
1476
|
-
const
|
|
1475
|
+
), n.headers = k.concat(i, o);
|
|
1476
|
+
const a = [];
|
|
1477
1477
|
let f = !0;
|
|
1478
1478
|
this.interceptors.request.forEach(function(E) {
|
|
1479
|
-
typeof E.runWhen == "function" && E.runWhen(n) === !1 || (f = f && E.synchronous,
|
|
1479
|
+
typeof E.runWhen == "function" && E.runWhen(n) === !1 || (f = f && E.synchronous, a.unshift(E.fulfilled, E.rejected));
|
|
1480
1480
|
});
|
|
1481
|
-
const
|
|
1481
|
+
const u = [];
|
|
1482
1482
|
this.interceptors.response.forEach(function(E) {
|
|
1483
|
-
|
|
1483
|
+
u.push(E.fulfilled, E.rejected);
|
|
1484
1484
|
});
|
|
1485
|
-
let
|
|
1485
|
+
let l, d = 0, R;
|
|
1486
1486
|
if (!f) {
|
|
1487
1487
|
const p = [Le.bind(this), void 0];
|
|
1488
|
-
for (p.unshift.apply(p,
|
|
1489
|
-
|
|
1490
|
-
return
|
|
1488
|
+
for (p.unshift.apply(p, a), p.push.apply(p, u), R = p.length, l = Promise.resolve(n); d < R; )
|
|
1489
|
+
l = l.then(p[d++], p[d++]);
|
|
1490
|
+
return l;
|
|
1491
1491
|
}
|
|
1492
|
-
R =
|
|
1493
|
-
let
|
|
1492
|
+
R = a.length;
|
|
1493
|
+
let w = n;
|
|
1494
1494
|
for (d = 0; d < R; ) {
|
|
1495
|
-
const p =
|
|
1495
|
+
const p = a[d++], E = a[d++];
|
|
1496
1496
|
try {
|
|
1497
|
-
|
|
1497
|
+
w = p(w);
|
|
1498
1498
|
} catch (h) {
|
|
1499
1499
|
E.call(this, h);
|
|
1500
1500
|
break;
|
|
1501
1501
|
}
|
|
1502
1502
|
}
|
|
1503
1503
|
try {
|
|
1504
|
-
|
|
1504
|
+
l = Le.call(this, w);
|
|
1505
1505
|
} catch (p) {
|
|
1506
1506
|
return Promise.reject(p);
|
|
1507
1507
|
}
|
|
1508
|
-
for (d = 0, R =
|
|
1509
|
-
|
|
1510
|
-
return
|
|
1508
|
+
for (d = 0, R = u.length; d < R; )
|
|
1509
|
+
l = l.then(u[d++], u[d++]);
|
|
1510
|
+
return l;
|
|
1511
1511
|
}
|
|
1512
1512
|
getUri(t) {
|
|
1513
1513
|
t = j(this.defaults, t);
|
|
@@ -1515,7 +1515,7 @@ let M = class {
|
|
|
1515
1515
|
return Xe(n, t.params, t.paramsSerializer);
|
|
1516
1516
|
}
|
|
1517
1517
|
};
|
|
1518
|
-
|
|
1518
|
+
c.forEach(["delete", "get", "head", "options"], function(t) {
|
|
1519
1519
|
M.prototype[t] = function(n, s) {
|
|
1520
1520
|
return this.request(j(s || {}, {
|
|
1521
1521
|
method: t,
|
|
@@ -1524,16 +1524,16 @@ a.forEach(["delete", "get", "head", "options"], function(t) {
|
|
|
1524
1524
|
}));
|
|
1525
1525
|
};
|
|
1526
1526
|
});
|
|
1527
|
-
|
|
1527
|
+
c.forEach(["post", "put", "patch"], function(t) {
|
|
1528
1528
|
function n(s) {
|
|
1529
|
-
return function(
|
|
1530
|
-
return this.request(j(
|
|
1529
|
+
return function(o, i, a) {
|
|
1530
|
+
return this.request(j(a || {}, {
|
|
1531
1531
|
method: t,
|
|
1532
1532
|
headers: s ? {
|
|
1533
1533
|
"Content-Type": "multipart/form-data"
|
|
1534
1534
|
} : {},
|
|
1535
|
-
url:
|
|
1536
|
-
data:
|
|
1535
|
+
url: o,
|
|
1536
|
+
data: i
|
|
1537
1537
|
}));
|
|
1538
1538
|
};
|
|
1539
1539
|
}
|
|
@@ -1544,26 +1544,26 @@ let Vn = class at {
|
|
|
1544
1544
|
if (typeof t != "function")
|
|
1545
1545
|
throw new TypeError("executor must be a function.");
|
|
1546
1546
|
let n;
|
|
1547
|
-
this.promise = new Promise(function(
|
|
1548
|
-
n =
|
|
1547
|
+
this.promise = new Promise(function(o) {
|
|
1548
|
+
n = o;
|
|
1549
1549
|
});
|
|
1550
1550
|
const s = this;
|
|
1551
1551
|
this.promise.then((r) => {
|
|
1552
1552
|
if (!s._listeners) return;
|
|
1553
|
-
let
|
|
1554
|
-
for (;
|
|
1555
|
-
s._listeners[
|
|
1553
|
+
let o = s._listeners.length;
|
|
1554
|
+
for (; o-- > 0; )
|
|
1555
|
+
s._listeners[o](r);
|
|
1556
1556
|
s._listeners = null;
|
|
1557
1557
|
}), this.promise.then = (r) => {
|
|
1558
|
-
let
|
|
1559
|
-
const
|
|
1560
|
-
s.subscribe(
|
|
1558
|
+
let o;
|
|
1559
|
+
const i = new Promise((a) => {
|
|
1560
|
+
s.subscribe(a), o = a;
|
|
1561
1561
|
}).then(r);
|
|
1562
|
-
return
|
|
1563
|
-
s.unsubscribe(
|
|
1564
|
-
},
|
|
1565
|
-
}, t(function(
|
|
1566
|
-
s.reason || (s.reason = new $(
|
|
1562
|
+
return i.cancel = function() {
|
|
1563
|
+
s.unsubscribe(o);
|
|
1564
|
+
}, i;
|
|
1565
|
+
}, t(function(o, i, a) {
|
|
1566
|
+
s.reason || (s.reason = new $(o, i, a), n(s.reason));
|
|
1567
1567
|
});
|
|
1568
1568
|
}
|
|
1569
1569
|
/**
|
|
@@ -1618,7 +1618,7 @@ function Jn(e) {
|
|
|
1618
1618
|
};
|
|
1619
1619
|
}
|
|
1620
1620
|
function Wn(e) {
|
|
1621
|
-
return
|
|
1621
|
+
return c.isObject(e) && e.isAxiosError === !0;
|
|
1622
1622
|
}
|
|
1623
1623
|
const Ee = {
|
|
1624
1624
|
Continue: 100,
|
|
@@ -1690,7 +1690,7 @@ Object.entries(Ee).forEach(([e, t]) => {
|
|
|
1690
1690
|
});
|
|
1691
1691
|
function ct(e) {
|
|
1692
1692
|
const t = new M(e), n = qe(M.prototype.request, t);
|
|
1693
|
-
return
|
|
1693
|
+
return c.extend(n, M.prototype, t, { allOwnKeys: !0 }), c.extend(n, t, null, { allOwnKeys: !0 }), n.create = function(r) {
|
|
1694
1694
|
return ct(j(e, r));
|
|
1695
1695
|
}, n;
|
|
1696
1696
|
}
|
|
@@ -1710,7 +1710,7 @@ g.spread = Jn;
|
|
|
1710
1710
|
g.isAxiosError = Wn;
|
|
1711
1711
|
g.mergeConfig = j;
|
|
1712
1712
|
g.AxiosHeaders = k;
|
|
1713
|
-
g.formToJSON = (e) => Ze(
|
|
1713
|
+
g.formToJSON = (e) => Ze(c.isHTMLForm(e) ? new FormData(e) : e);
|
|
1714
1714
|
g.getAdapter = ot.getAdapter;
|
|
1715
1715
|
g.HttpStatusCode = Ee;
|
|
1716
1716
|
g.default = g;
|
|
@@ -1731,9 +1731,9 @@ const {
|
|
|
1731
1731
|
formToJSON: qs,
|
|
1732
1732
|
getAdapter: Hs,
|
|
1733
1733
|
mergeConfig: Ms
|
|
1734
|
-
} = g, ut = (e) => (e.baseURL = Be(), e.headers.Authorization = localStorage.getItem(
|
|
1735
|
-
e.baseURL = pt(), e.headers.Authorization = localStorage.getItem(
|
|
1736
|
-
const t = localStorage.getItem(
|
|
1734
|
+
} = g, ut = (e) => (e.baseURL = Be(), e.headers.Authorization = localStorage.getItem(N.TOKEN), e.headers["client-id"] = localStorage.getItem(N.CLIENT_ID), e.metadata = { startTime: /* @__PURE__ */ new Date() }, { ...e }), Yn = (e) => {
|
|
1735
|
+
e.baseURL = pt(), e.headers.Authorization = localStorage.getItem(N.TOKEN), e.headers["client-id"] = localStorage.getItem(N.CLIENT_ID);
|
|
1736
|
+
const t = localStorage.getItem(N.OVERRIDE_PAC_ENDPOINT);
|
|
1737
1737
|
return t && (e.headers["x-override-url"] = t), e.headers["Api-Version"] = "1.0", e.metadata = { startTime: /* @__PURE__ */ new Date() }, { ...e };
|
|
1738
1738
|
}, js = (e, t, n) => {
|
|
1739
1739
|
for (const s of e)
|
|
@@ -1741,35 +1741,35 @@ const {
|
|
|
1741
1741
|
}, Zn = async (e) => new Promise((t, n) => {
|
|
1742
1742
|
setTimeout(t, e);
|
|
1743
1743
|
}), Qn = async (e, t) => (await Zn(t), e()), De = (e, t) => {
|
|
1744
|
-
var r,
|
|
1744
|
+
var r, o;
|
|
1745
1745
|
let n = "", s = t;
|
|
1746
1746
|
typeof t == "string" ? n = t : t instanceof Xn ? (n = t.message, s = {
|
|
1747
1747
|
message: t.message,
|
|
1748
1748
|
cause: t.cause,
|
|
1749
1749
|
status: t.status,
|
|
1750
1750
|
data: (r = t == null ? void 0 : t.response) == null ? void 0 : r.data
|
|
1751
|
-
}) : n = t.message, (
|
|
1751
|
+
}) : n = t.message, (o = window.parent) == null || o.postMessage(
|
|
1752
1752
|
{ type: "auth_error", details: { message: n, action: e, info: s } },
|
|
1753
1753
|
"*"
|
|
1754
1754
|
);
|
|
1755
1755
|
}, lt = async (e, t, n) => {
|
|
1756
|
-
var
|
|
1757
|
-
const s = e.config, r = localStorage.getItem(
|
|
1756
|
+
var i, a, f;
|
|
1757
|
+
const s = e.config, r = localStorage.getItem(N.REFRESH_TOKEN), o = ((i = e.response) == null ? void 0 : i.status) || F.InternalServerError;
|
|
1758
1758
|
if (!s || s.__retries === t)
|
|
1759
1759
|
throw e;
|
|
1760
|
-
if (
|
|
1760
|
+
if (o === F.Unauthorized && s.url !== T.REFRESH_EMBED_TOKEN && s.url !== T.REFRESH_TOKEN && s.url !== T.SIGN_IN && s.url !== T.SIGN_UP && s.url !== T.OTP) {
|
|
1761
1761
|
if (!r)
|
|
1762
1762
|
throw De(
|
|
1763
1763
|
"refresh_token",
|
|
1764
1764
|
"no refresh token found to reauthenticate user"
|
|
1765
1765
|
), e;
|
|
1766
1766
|
try {
|
|
1767
|
-
const { token:
|
|
1768
|
-
return (
|
|
1769
|
-
} catch (
|
|
1767
|
+
const { token: u, data: l } = await rs.refreshAccessToken();
|
|
1768
|
+
return (a = s.url) != null && a.includes(T.EXCHANGE_TOKEN) && l && "id_token" in l && (s.data = JSON.stringify({ idToken: l.id_token })), s.headers && (s.headers.Authorization = `Bearer ${u}`), n(s);
|
|
1769
|
+
} catch (u) {
|
|
1770
1770
|
if (!((f = s == null ? void 0 : s.url) != null && f.includes(T.EXCHANGE_TOKEN))) {
|
|
1771
|
-
const
|
|
1772
|
-
De("refresh_token",
|
|
1771
|
+
const l = u instanceof Error ? u.message : "Unable to refresh access token.";
|
|
1772
|
+
De("refresh_token", l);
|
|
1773
1773
|
}
|
|
1774
1774
|
throw e;
|
|
1775
1775
|
}
|
|
@@ -1782,7 +1782,7 @@ const {
|
|
|
1782
1782
|
F.Conflict,
|
|
1783
1783
|
F.NotFound,
|
|
1784
1784
|
F.UnprocessableEntity
|
|
1785
|
-
].includes(
|
|
1785
|
+
].includes(o) || (s.__retries || (s.__retries = 0), s.__retries += 1, s.__retries > t))
|
|
1786
1786
|
throw e;
|
|
1787
1787
|
return Qn(
|
|
1788
1788
|
() => n(s),
|
|
@@ -1790,7 +1790,7 @@ const {
|
|
|
1790
1790
|
// Exponential backoff 50ms, 500ms, 5000ms
|
|
1791
1791
|
);
|
|
1792
1792
|
}, es = g.create();
|
|
1793
|
-
es.interceptors.request.use((e) => (e.baseURL = Be(), e.headers.Authorization = localStorage.getItem(
|
|
1793
|
+
es.interceptors.request.use((e) => (e.baseURL = Be(), e.headers.Authorization = localStorage.getItem(N.TOKEN), e.metadata = { startTime: /* @__PURE__ */ new Date() }, { ...e }));
|
|
1794
1794
|
const _ = g.create();
|
|
1795
1795
|
_.interceptors.request.use((e) => (e = ut(e), e));
|
|
1796
1796
|
const ts = g.create();
|
|
@@ -1816,32 +1816,31 @@ class ss {
|
|
|
1816
1816
|
* @returns A promise that resolves to a service response containing authentication data.
|
|
1817
1817
|
*/
|
|
1818
1818
|
O(this, "login", async (t) => {
|
|
1819
|
-
var n, s, r, i;
|
|
1819
|
+
var n, s, r, o, i;
|
|
1820
1820
|
try {
|
|
1821
|
-
const { data:
|
|
1821
|
+
const { data: a } = await _.post(T.SIGN_IN, {
|
|
1822
1822
|
email_address: t.email,
|
|
1823
1823
|
password: t.password
|
|
1824
|
-
}),
|
|
1824
|
+
}), f = await G.ensureQueryData({
|
|
1825
1825
|
queryKey: [q.USER_REGIONS],
|
|
1826
1826
|
queryFn: this.getRegions
|
|
1827
|
-
}),
|
|
1828
|
-
return {
|
|
1827
|
+
}), u = U(a.data);
|
|
1828
|
+
return (n = a.data) == null || delete n.refreshToken, (s = a.data) == null || delete s.accessToken, {
|
|
1829
1829
|
success: !0,
|
|
1830
1830
|
data: U({
|
|
1831
|
-
...
|
|
1832
|
-
token: l,
|
|
1831
|
+
...a.data,
|
|
1833
1832
|
user: {
|
|
1834
|
-
...
|
|
1835
|
-
userRegion:
|
|
1836
|
-
(
|
|
1833
|
+
...u.user,
|
|
1834
|
+
userRegion: f.find(
|
|
1835
|
+
(l) => l.code === a.data.user.user_region
|
|
1837
1836
|
)
|
|
1838
1837
|
}
|
|
1839
1838
|
})
|
|
1840
1839
|
};
|
|
1841
|
-
} catch (
|
|
1842
|
-
return console.error(
|
|
1840
|
+
} catch (a) {
|
|
1841
|
+
return console.error(a), {
|
|
1843
1842
|
success: !1,
|
|
1844
|
-
message: ((
|
|
1843
|
+
message: ((o = (r = a.response) == null ? void 0 : r.data) == null ? void 0 : o.message) || ((i = a == null ? void 0 : a.response) == null ? void 0 : i.data) || a.message || "error signing in"
|
|
1845
1844
|
};
|
|
1846
1845
|
}
|
|
1847
1846
|
});
|
|
@@ -1852,9 +1851,9 @@ class ss {
|
|
|
1852
1851
|
* @returns A promise that resolves to a service response containing authentication data.
|
|
1853
1852
|
*/
|
|
1854
1853
|
O(this, "signUp", async (t) => {
|
|
1855
|
-
var n, s, r,
|
|
1854
|
+
var n, s, r, o, i;
|
|
1856
1855
|
try {
|
|
1857
|
-
const { data:
|
|
1856
|
+
const { data: a } = await _.post(T.SIGN_UP, {
|
|
1858
1857
|
user: {
|
|
1859
1858
|
email_address: t.email,
|
|
1860
1859
|
password: t.password,
|
|
@@ -1866,45 +1865,45 @@ class ss {
|
|
|
1866
1865
|
}), f = await G.ensureQueryData({
|
|
1867
1866
|
queryKey: [q.USER_REGIONS],
|
|
1868
1867
|
queryFn: this.getRegions
|
|
1869
|
-
}),
|
|
1870
|
-
return localStorage.setItem(
|
|
1868
|
+
}), u = U(a.data), l = (n = a.data) == null ? void 0 : n.tokens.accessToken;
|
|
1869
|
+
return localStorage.setItem(N.TOKEN, l), {
|
|
1871
1870
|
success: !0,
|
|
1872
1871
|
data: {
|
|
1873
|
-
token:
|
|
1874
|
-
...(s =
|
|
1872
|
+
token: l,
|
|
1873
|
+
...(s = a.data) == null ? void 0 : s.tokens,
|
|
1875
1874
|
user: {
|
|
1876
|
-
...
|
|
1875
|
+
...u.user,
|
|
1877
1876
|
userRegion: f.find(
|
|
1878
|
-
(d) => d.code ===
|
|
1877
|
+
(d) => d.code === a.data.user.user_region
|
|
1879
1878
|
)
|
|
1880
1879
|
}
|
|
1881
1880
|
}
|
|
1882
1881
|
};
|
|
1883
|
-
} catch (
|
|
1884
|
-
return console.error(
|
|
1882
|
+
} catch (a) {
|
|
1883
|
+
return console.error(a), {
|
|
1885
1884
|
success: !1,
|
|
1886
|
-
message: ((
|
|
1885
|
+
message: ((o = (r = a.response) == null ? void 0 : r.data) == null ? void 0 : o.message) || ((i = a.response) == null ? void 0 : i.data) || a.message || "error signing up"
|
|
1887
1886
|
};
|
|
1888
1887
|
}
|
|
1889
1888
|
});
|
|
1890
1889
|
O(this, "getOrCreateGoogleUser", async (t, n) => {
|
|
1891
|
-
var s, r,
|
|
1890
|
+
var s, r, o, i, a;
|
|
1892
1891
|
try {
|
|
1893
1892
|
const { data: f } = await _.post(T.GOOGLE_AUTH, {
|
|
1894
1893
|
google_access_token: t,
|
|
1895
1894
|
user_region: n
|
|
1896
|
-
}),
|
|
1895
|
+
}), u = await G.ensureQueryData({
|
|
1897
1896
|
queryKey: [q.USER_REGIONS],
|
|
1898
1897
|
queryFn: this.getRegions
|
|
1899
|
-
}),
|
|
1900
|
-
return localStorage.setItem(
|
|
1898
|
+
}), l = U(f.data), d = (s = f.data) == null ? void 0 : s.tokens.accessToken;
|
|
1899
|
+
return localStorage.setItem(N.TOKEN, d), {
|
|
1901
1900
|
success: !0,
|
|
1902
1901
|
data: {
|
|
1903
1902
|
token: d,
|
|
1904
1903
|
...(r = f.data) == null ? void 0 : r.tokens,
|
|
1905
1904
|
user: {
|
|
1906
|
-
...
|
|
1907
|
-
userRegion:
|
|
1905
|
+
...l.user,
|
|
1906
|
+
userRegion: u.find(
|
|
1908
1907
|
(R) => R.code === f.data.user.user_region
|
|
1909
1908
|
)
|
|
1910
1909
|
}
|
|
@@ -1913,7 +1912,7 @@ class ss {
|
|
|
1913
1912
|
} catch (f) {
|
|
1914
1913
|
return console.error(f), {
|
|
1915
1914
|
success: !1,
|
|
1916
|
-
message: ((
|
|
1915
|
+
message: ((i = (o = f.response) == null ? void 0 : o.data) == null ? void 0 : i.message) || ((a = f == null ? void 0 : f.response) == null ? void 0 : a.data) || f.message || "error getting or creating google user"
|
|
1917
1916
|
};
|
|
1918
1917
|
}
|
|
1919
1918
|
});
|
|
@@ -1928,10 +1927,10 @@ class ss {
|
|
|
1928
1927
|
cancel_url: t.cancelUrl
|
|
1929
1928
|
}
|
|
1930
1929
|
)).data;
|
|
1931
|
-
} catch (
|
|
1932
|
-
return console.error(
|
|
1930
|
+
} catch (o) {
|
|
1931
|
+
return console.error(o), {
|
|
1933
1932
|
success: !1,
|
|
1934
|
-
message: ((s = (n =
|
|
1933
|
+
message: ((s = (n = o.response) == null ? void 0 : n.data) == null ? void 0 : s.message) || ((r = o.response) == null ? void 0 : r.data) || o.message || "error resending verification email"
|
|
1935
1934
|
};
|
|
1936
1935
|
}
|
|
1937
1936
|
});
|
|
@@ -1944,9 +1943,9 @@ class ss {
|
|
|
1944
1943
|
* @returns A promise that resolves to a service response containing authentication data.
|
|
1945
1944
|
*/
|
|
1946
1945
|
O(this, "authenticateWithToken", async (t, n, s) => {
|
|
1947
|
-
var r,
|
|
1946
|
+
var r, o, i;
|
|
1948
1947
|
try {
|
|
1949
|
-
const { data:
|
|
1948
|
+
const { data: a } = await _.post(
|
|
1950
1949
|
T.EXCHANGE_TOKEN,
|
|
1951
1950
|
Et({
|
|
1952
1951
|
idToken: t,
|
|
@@ -1956,23 +1955,23 @@ class ss {
|
|
|
1956
1955
|
), f = await G.ensureQueryData({
|
|
1957
1956
|
queryKey: [q.USER_REGIONS],
|
|
1958
1957
|
queryFn: this.getRegions
|
|
1959
|
-
}),
|
|
1958
|
+
}), u = U(a.data);
|
|
1960
1959
|
return {
|
|
1961
1960
|
success: !0,
|
|
1962
1961
|
data: {
|
|
1963
|
-
...
|
|
1962
|
+
...u,
|
|
1964
1963
|
user: {
|
|
1965
|
-
...
|
|
1964
|
+
...u.user,
|
|
1966
1965
|
userRegion: f.find(
|
|
1967
|
-
(
|
|
1966
|
+
(l) => l.code === a.data.user.user_region
|
|
1968
1967
|
)
|
|
1969
1968
|
}
|
|
1970
1969
|
}
|
|
1971
1970
|
};
|
|
1972
|
-
} catch (
|
|
1973
|
-
return console.error(
|
|
1971
|
+
} catch (a) {
|
|
1972
|
+
return console.error(a), {
|
|
1974
1973
|
success: !1,
|
|
1975
|
-
message: ((
|
|
1974
|
+
message: ((o = (r = a.response) == null ? void 0 : r.data) == null ? void 0 : o.message) || ((i = a == null ? void 0 : a.response) == null ? void 0 : i.data) || a.message || "error exchanging token"
|
|
1976
1975
|
};
|
|
1977
1976
|
}
|
|
1978
1977
|
});
|
|
@@ -2018,17 +2017,17 @@ class ss {
|
|
|
2018
2017
|
});
|
|
2019
2018
|
this.isRefreshingAccessToken = !0;
|
|
2020
2019
|
try {
|
|
2021
|
-
const t = localStorage.getItem(
|
|
2020
|
+
const t = localStorage.getItem(N.REFRESH_TOKEN);
|
|
2022
2021
|
if (!t)
|
|
2023
2022
|
throw new Error("No refresh token found to reauthenticate user.");
|
|
2024
|
-
const s = localStorage.getItem(
|
|
2025
|
-
if (!
|
|
2026
|
-
throw new Error(
|
|
2027
|
-
const
|
|
2028
|
-
if (!
|
|
2023
|
+
const s = localStorage.getItem(N.AUTH_FLOW) === ht.POST_MESSAGE ? this.refreshEmbedToken : this.refreshToken, { data: r, success: o, message: i } = await s(t);
|
|
2024
|
+
if (!o || !r)
|
|
2025
|
+
throw new Error(i || "Unable to refresh access token.");
|
|
2026
|
+
const a = r.token || r.accessToken;
|
|
2027
|
+
if (!a)
|
|
2029
2028
|
throw new Error("Refresh response did not include an access token.");
|
|
2030
|
-
localStorage.setItem(
|
|
2031
|
-
const f = { token:
|
|
2029
|
+
localStorage.setItem(N.TOKEN, a);
|
|
2030
|
+
const f = { token: a, data: r };
|
|
2032
2031
|
return this.processRefreshAccessTokenQueue(null, f), f;
|
|
2033
2032
|
} catch (t) {
|
|
2034
2033
|
const n = t instanceof Error ? t : new Error("Unable to refresh access token.");
|
|
@@ -2051,7 +2050,7 @@ class ss {
|
|
|
2051
2050
|
refreshToken: t
|
|
2052
2051
|
}
|
|
2053
2052
|
), s = n.data.token;
|
|
2054
|
-
return localStorage.setItem(
|
|
2053
|
+
return localStorage.setItem(N.TOKEN, s), {
|
|
2055
2054
|
success: !0,
|
|
2056
2055
|
data: n.data
|
|
2057
2056
|
};
|
|
@@ -2076,7 +2075,7 @@ class ss {
|
|
|
2076
2075
|
refreshToken: t
|
|
2077
2076
|
}
|
|
2078
2077
|
), s = n.data.accessToken;
|
|
2079
|
-
return localStorage.setItem(
|
|
2078
|
+
return localStorage.setItem(N.TOKEN, s), {
|
|
2080
2079
|
success: !0,
|
|
2081
2080
|
data: {
|
|
2082
2081
|
...n.data,
|
|
@@ -2112,32 +2111,29 @@ class ss {
|
|
|
2112
2111
|
return U(t.data);
|
|
2113
2112
|
});
|
|
2114
2113
|
O(this, "validate2FA", async (t, n) => {
|
|
2115
|
-
var s, r, i;
|
|
2114
|
+
var s, r, o, i;
|
|
2116
2115
|
try {
|
|
2117
|
-
const { data:
|
|
2116
|
+
const { data: a } = await _.post(T.OTP, {
|
|
2118
2117
|
email_address: t,
|
|
2119
2118
|
otp: n
|
|
2120
|
-
}),
|
|
2119
|
+
}), f = await G.ensureQueryData({
|
|
2121
2120
|
queryKey: [q.USER_REGIONS],
|
|
2122
2121
|
queryFn: this.getRegions
|
|
2123
|
-
}),
|
|
2124
|
-
return { success: !0, data: U({
|
|
2125
|
-
...
|
|
2126
|
-
token:
|
|
2127
|
-
|
|
2128
|
-
|
|
2129
|
-
|
|
2130
|
-
|
|
2131
|
-
|
|
2132
|
-
|
|
2133
|
-
)
|
|
2134
|
-
}
|
|
2135
|
-
} : {}
|
|
2122
|
+
}), u = (s = a.data) == null ? void 0 : s.accessToken;
|
|
2123
|
+
return localStorage.setItem(N.TOKEN, u), { success: !0, data: U({
|
|
2124
|
+
...a.data,
|
|
2125
|
+
token: u,
|
|
2126
|
+
user: {
|
|
2127
|
+
...a.data.user,
|
|
2128
|
+
userRegion: f.find(
|
|
2129
|
+
(d) => d.code === a.data.user.user_region
|
|
2130
|
+
)
|
|
2131
|
+
}
|
|
2136
2132
|
}) };
|
|
2137
|
-
} catch (
|
|
2138
|
-
return console.error(
|
|
2133
|
+
} catch (a) {
|
|
2134
|
+
return console.error(a), {
|
|
2139
2135
|
success: !1,
|
|
2140
|
-
message: ((
|
|
2136
|
+
message: ((o = (r = a.response) == null ? void 0 : r.data) == null ? void 0 : o.message) || ((i = a == null ? void 0 : a.response) == null ? void 0 : i.data) || a.message || "error signing in"
|
|
2141
2137
|
};
|
|
2142
2138
|
}
|
|
2143
2139
|
});
|