@odynn/awayz-core 0.10.32 → 0.10.34
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-BwBvXdDC.js → TripsService-DtjkgWX5.js} +6 -6
- package/dist/assets/_styles5.css +1 -1
- package/dist/assets/_styles6.css +1 -1
- package/dist/assets/noRetryInstance.css +1 -0
- package/dist/components/Bookings/FlightBooking/FlightBooking.js +1 -1
- package/dist/components/Bookings/HotelBooking/HotelBooking.js +1 -1
- package/dist/components/CashValue/CashValue.js +13 -15
- package/dist/components/CashValue/CashValue.stories.js +15 -15
- package/dist/components/ClientPointsValue/ClientPointsValue.js +18 -20
- package/dist/components/Modal/Modal.js +1 -1
- package/dist/components/Tooltip/Tooltip.js +1 -1
- package/dist/components/Wallet/Card/Card.stories.js +14 -15
- package/dist/configs/awayzUrl.js +12 -0
- package/dist/context/AwayzContext.js +1 -0
- package/dist/hooks/useAwayzAuth/useAwayzAuth.js +98 -104
- package/dist/hooks/useBookingManagement/useBookingManagement.js +4 -6
- package/dist/hooks/useBookingManagement/useBookingManagement.test.js +2 -4
- package/dist/hooks/useFeatureFlags.js +1 -1
- package/dist/hooks/useSearchLimit.js +1 -1
- package/dist/hooks/useTripManagement/useTripManagement.js +5 -7
- package/dist/hooks/useTripManagement/useTripManagement.test.js +3 -5
- package/dist/hooks/useWallet/useWallet.js +29 -31
- package/dist/hooks/useWallet/useWallet.test.js +2 -4
- package/dist/keys-C7jV6nZg.js +5 -0
- package/dist/lib/configs/awayzConfig.d.ts +3 -2
- package/dist/lib/configs/awayzUrl.d.ts +4 -0
- package/dist/lib/context/AwayzContext.d.ts +1 -0
- package/dist/lib/hooks/useAwayzAuth/useAwayzAuth.d.ts +1 -0
- package/dist/lib/main.d.ts +1 -1
- package/dist/lib/services/account/AccountService.d.ts +2 -1
- package/dist/main.js +27 -28
- package/dist/{AccountService-B582vLTc.js → noRetryInstance-BbgLI6--.js} +721 -699
- package/dist/providers/AwayzProvider.js +14 -17
- package/dist/services/account/AccountService.js +2 -2
- package/dist/services/bookings/BookingService.js +3 -3
- package/dist/services/currency/CurrencyService.js +14 -16
- package/dist/services/features/featureService.js +1 -1
- package/dist/services/index.js +12 -13
- package/dist/services/instance.js +3 -3
- package/dist/services/instanceConfig.js +21 -11
- package/dist/services/noRetryInstance.js +2 -9
- 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 +4 -6
- package/package.json +1 -1
- package/dist/assets/_styles7.css +0 -1
- package/dist/configs/baseUrl.js +0 -11
- package/dist/configs/gatewayBaseUrl.js +0 -8
- package/dist/keys-BcBfU51M.js +0 -5
- package/dist/lib/configs/baseUrl.d.ts +0 -3
- package/dist/lib/configs/gatewayBaseUrl.d.ts +0 -2
|
@@ -1,56 +1,65 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var O = (e, t, n) =>
|
|
1
|
+
import './assets/_styles4.css';import './assets/_styles6.css';import './assets/_styles5.css';import './assets/_styles2.css';import './assets/_styles.css';import './assets/_styles3.css';import './assets/noRetryInstance.css';var ft = Object.defineProperty;
|
|
2
|
+
var dt = (e, t, n) => t in e ? ft(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
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 C } from "./keys-
|
|
6
|
+
import { a as C } from "./keys-C7jV6nZg.js";
|
|
7
7
|
import "react";
|
|
8
|
-
import {
|
|
8
|
+
import { getBaseUrl as Be, getGatewayBaseUrl as pt } from "./configs/awayzUrl.js";
|
|
9
9
|
import { EAuthEndpoints as T } from "./configs/endpoints.js";
|
|
10
|
-
import
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
import "react-i18next";
|
|
11
|
+
/* empty css */
|
|
12
|
+
/* empty css */
|
|
13
|
+
/* empty css */
|
|
14
|
+
import "@tanstack/react-query";
|
|
15
|
+
import { awayzClient as G } from "./configs/awayzClient.js";
|
|
16
|
+
import { EAuthFlow as ht } from "./types/EAuthFlow.js";
|
|
17
|
+
/* empty css */
|
|
18
|
+
/* empty css */
|
|
19
|
+
import "./index-Cv-wvFlM.js";
|
|
20
|
+
import "./context/AwayzContext.js";
|
|
21
|
+
/* empty css */
|
|
13
22
|
const U = (e) => Array.isArray(e) ? e.map((t) => U(t)) : typeof e == "object" && e !== null ? Object.keys(e).reduce((t, n) => {
|
|
14
|
-
const s =
|
|
23
|
+
const s = Rt(n);
|
|
15
24
|
return t[s] = U(e[n]), t;
|
|
16
25
|
}, {}) : e;
|
|
17
|
-
function
|
|
26
|
+
function mt(e) {
|
|
18
27
|
return e.replace(/([A-Z])/g, "_$1").toLowerCase();
|
|
19
28
|
}
|
|
20
|
-
const
|
|
21
|
-
const s =
|
|
22
|
-
return t[s] =
|
|
23
|
-
}, {}) : e,
|
|
29
|
+
const Te = (e) => Array.isArray(e) ? e.map((t) => Te(t)) : typeof e == "object" && e !== null ? Object.keys(e).reduce((t, n) => {
|
|
30
|
+
const s = mt(n);
|
|
31
|
+
return t[s] = Te(e[n]), t;
|
|
32
|
+
}, {}) : e, Et = (e) => (Object.keys(e).forEach(
|
|
24
33
|
(t) => !e[t] && delete e[t]
|
|
25
|
-
), e),
|
|
26
|
-
var q = /* @__PURE__ */ ((e) => (e.LOCATIONS = "LOCATIONS", e.CHECK_USER = "CHECK_USER", e.USER_REGIONS = "USER_REGIONS", e.CONVERT_CURRENCY = "CONVERT_CURRENCY", e.CLIENT_COMPONENT_KEY = "CLIENT_COMPONENT_KEY", e.SEARCH_LIMIT = "SEARCH_LIMIT", e.PROGRAMS = "PROGRAMS", e.USER_PROGRAMS = "USER_PROGRAMS", e.LINKED_USER_PROGRAMS = "LINKED_USER_PROGRAMS", e.BANKS = "BANKS", e.CARDS = "CARDS", e.USER_CARDS = "USER_CARDS", e.TRIPS = "TRIPS", e.UNCATEGORISED_BOOKINGS = "UNCATEGORISED_BOOKINGS", e.BOOKING = "BOOKING", e.VALUE_CENTS = "VALUE_CENTS", e.AVAILABILITY_ALERTS = "AVAILABILITY_ALERTS", e.ALERT_NOTIFICATIONS = "ALERT_NOTIFICATIONS", e.POINTS_AS_CASH = "POINTS_AS_CASH", e.GET_USER_REGION = "get_user_region", e.PRICING = "pricing", e.FAQS = "faqs", e.FEATURES = "features", e.AIRLINE_HEALTH = "airline_health", e.SUPPORTED_AIRLINE_PROGRAMS = "supported_airline_programs", e.CLIENT_DETAILS = "client-details", e))(q || {}),
|
|
27
|
-
function
|
|
34
|
+
), e), Rt = (e) => (e = e.replace(/^_+/, ""), e.replace(/_([a-z])/gi, (t, n) => n.toUpperCase()));
|
|
35
|
+
var q = /* @__PURE__ */ ((e) => (e.LOCATIONS = "LOCATIONS", e.CHECK_USER = "CHECK_USER", e.USER_REGIONS = "USER_REGIONS", e.CONVERT_CURRENCY = "CONVERT_CURRENCY", e.CLIENT_COMPONENT_KEY = "CLIENT_COMPONENT_KEY", e.SEARCH_LIMIT = "SEARCH_LIMIT", e.PROGRAMS = "PROGRAMS", e.USER_PROGRAMS = "USER_PROGRAMS", e.LINKED_USER_PROGRAMS = "LINKED_USER_PROGRAMS", e.BANKS = "BANKS", e.CARDS = "CARDS", e.USER_CARDS = "USER_CARDS", e.TRIPS = "TRIPS", e.UNCATEGORISED_BOOKINGS = "UNCATEGORISED_BOOKINGS", e.BOOKING = "BOOKING", e.VALUE_CENTS = "VALUE_CENTS", e.AVAILABILITY_ALERTS = "AVAILABILITY_ALERTS", e.ALERT_NOTIFICATIONS = "ALERT_NOTIFICATIONS", e.POINTS_AS_CASH = "POINTS_AS_CASH", e.GET_USER_REGION = "get_user_region", e.PRICING = "pricing", e.FAQS = "faqs", e.FEATURES = "features", e.AIRLINE_HEALTH = "airline_health", e.SUPPORTED_AIRLINE_PROGRAMS = "supported_airline_programs", e.CLIENT_DETAILS = "client-details", e))(q || {}), gt = /* @__PURE__ */ ((e) => (e.HOTEL = "Hotel", e.AIRLINE = "Airline", e.BANK = "Bank", e))(gt || {});
|
|
36
|
+
function qe(e, t) {
|
|
28
37
|
return function() {
|
|
29
38
|
return e.apply(t, arguments);
|
|
30
39
|
};
|
|
31
40
|
}
|
|
32
|
-
const { toString:
|
|
33
|
-
const n =
|
|
41
|
+
const { toString: St } = Object.prototype, { getPrototypeOf: ge } = Object, { iterator: te, toStringTag: He } = Symbol, ne = /* @__PURE__ */ ((e) => (t) => {
|
|
42
|
+
const n = St.call(t);
|
|
34
43
|
return e[n] || (e[n] = n.slice(8, -1).toLowerCase());
|
|
35
|
-
})(/* @__PURE__ */ Object.create(null)), x = (e) => (e = e.toLowerCase(), (t) => ne(t) === e), se = (e) => (t) => typeof t === e, { isArray: z } = Array,
|
|
36
|
-
function
|
|
37
|
-
return e !== null && !
|
|
44
|
+
})(/* @__PURE__ */ Object.create(null)), x = (e) => (e = e.toLowerCase(), (t) => ne(t) === e), se = (e) => (t) => typeof t === e, { isArray: z } = Array, K = se("undefined");
|
|
45
|
+
function wt(e) {
|
|
46
|
+
return e !== null && !K(e) && e.constructor !== null && !K(e.constructor) && I(e.constructor.isBuffer) && e.constructor.isBuffer(e);
|
|
38
47
|
}
|
|
39
|
-
const
|
|
40
|
-
function
|
|
48
|
+
const Me = x("ArrayBuffer");
|
|
49
|
+
function yt(e) {
|
|
41
50
|
let t;
|
|
42
|
-
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer &&
|
|
51
|
+
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer && Me(e.buffer), t;
|
|
43
52
|
}
|
|
44
|
-
const
|
|
53
|
+
const Tt = se("string"), I = se("function"), je = se("number"), re = (e) => e !== null && typeof e == "object", bt = (e) => e === !0 || e === !1, X = (e) => {
|
|
45
54
|
if (ne(e) !== "object")
|
|
46
55
|
return !1;
|
|
47
|
-
const t =
|
|
48
|
-
return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(
|
|
49
|
-
},
|
|
56
|
+
const t = ge(e);
|
|
57
|
+
return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(He in e) && !(te in e);
|
|
58
|
+
}, Ot = x("Date"), At = x("File"), _t = x("Blob"), Nt = x("FileList"), Ct = (e) => re(e) && I(e.pipe), It = (e) => {
|
|
50
59
|
let t;
|
|
51
60
|
return e && (typeof FormData == "function" && e instanceof FormData || I(e.append) && ((t = ne(e)) === "formdata" || // detect form-data instance
|
|
52
61
|
t === "object" && I(e.toString) && e.toString() === "[object FormData]"));
|
|
53
|
-
},
|
|
62
|
+
}, kt = x("URLSearchParams"), [Ut, xt, Lt, Pt] = ["ReadableStream", "Request", "Response", "Headers"].map(x), Ft = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
|
|
54
63
|
function V(e, t, { allOwnKeys: n = !1 } = {}) {
|
|
55
64
|
if (e === null || typeof e > "u")
|
|
56
65
|
return;
|
|
@@ -59,13 +68,13 @@ function V(e, t, { allOwnKeys: n = !1 } = {}) {
|
|
|
59
68
|
for (s = 0, r = e.length; s < r; s++)
|
|
60
69
|
t.call(null, e[s], s, e);
|
|
61
70
|
else {
|
|
62
|
-
const
|
|
71
|
+
const o = n ? Object.getOwnPropertyNames(e) : Object.keys(e), i = o.length;
|
|
63
72
|
let c;
|
|
64
|
-
for (s = 0; s <
|
|
65
|
-
c =
|
|
73
|
+
for (s = 0; s < i; s++)
|
|
74
|
+
c = o[s], t.call(null, e[c], c, e);
|
|
66
75
|
}
|
|
67
76
|
}
|
|
68
|
-
function
|
|
77
|
+
function Ge(e, t) {
|
|
69
78
|
t = t.toLowerCase();
|
|
70
79
|
const n = Object.keys(e);
|
|
71
80
|
let s = n.length, r;
|
|
@@ -74,71 +83,71 @@ function je(e, t) {
|
|
|
74
83
|
return r;
|
|
75
84
|
return null;
|
|
76
85
|
}
|
|
77
|
-
const H = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global,
|
|
86
|
+
const H = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, ze = (e) => !K(e) && e !== H;
|
|
78
87
|
function fe() {
|
|
79
|
-
const { caseless: e } =
|
|
80
|
-
const
|
|
81
|
-
X(t[
|
|
88
|
+
const { caseless: e } = ze(this) && this || {}, t = {}, n = (s, r) => {
|
|
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;
|
|
82
91
|
};
|
|
83
92
|
for (let s = 0, r = arguments.length; s < r; s++)
|
|
84
93
|
arguments[s] && V(arguments[s], n);
|
|
85
94
|
return t;
|
|
86
95
|
}
|
|
87
|
-
const
|
|
88
|
-
n && I(r) ? e[
|
|
89
|
-
}, { allOwnKeys: s }), 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
|
+
}, { allOwnKeys: s }), e), Bt = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e), qt = (e, t, n, s) => {
|
|
90
99
|
e.prototype = Object.create(t.prototype, s), e.prototype.constructor = e, Object.defineProperty(e, "super", {
|
|
91
100
|
value: t.prototype
|
|
92
101
|
}), n && Object.assign(e.prototype, n);
|
|
93
|
-
},
|
|
94
|
-
let r,
|
|
102
|
+
}, Ht = (e, t, n, s) => {
|
|
103
|
+
let r, o, i;
|
|
95
104
|
const c = {};
|
|
96
105
|
if (t = t || {}, e == null) return t;
|
|
97
106
|
do {
|
|
98
|
-
for (r = Object.getOwnPropertyNames(e),
|
|
99
|
-
|
|
100
|
-
e = n !== !1 &&
|
|
107
|
+
for (r = Object.getOwnPropertyNames(e), o = r.length; o-- > 0; )
|
|
108
|
+
i = r[o], (!s || s(i, e, t)) && !c[i] && (t[i] = e[i], c[i] = !0);
|
|
109
|
+
e = n !== !1 && ge(e);
|
|
101
110
|
} while (e && (!n || n(e, t)) && e !== Object.prototype);
|
|
102
111
|
return t;
|
|
103
|
-
},
|
|
112
|
+
}, Mt = (e, t, n) => {
|
|
104
113
|
e = String(e), (n === void 0 || n > e.length) && (n = e.length), n -= t.length;
|
|
105
114
|
const s = e.indexOf(t, n);
|
|
106
115
|
return s !== -1 && s === n;
|
|
107
|
-
},
|
|
116
|
+
}, jt = (e) => {
|
|
108
117
|
if (!e) return null;
|
|
109
118
|
if (z(e)) return e;
|
|
110
119
|
let t = e.length;
|
|
111
|
-
if (!
|
|
120
|
+
if (!je(t)) return null;
|
|
112
121
|
const n = new Array(t);
|
|
113
122
|
for (; t-- > 0; )
|
|
114
123
|
n[t] = e[t];
|
|
115
124
|
return n;
|
|
116
|
-
},
|
|
125
|
+
}, Gt = /* @__PURE__ */ ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" && ge(Uint8Array)), zt = (e, t) => {
|
|
117
126
|
const s = (e && e[te]).call(e);
|
|
118
127
|
let r;
|
|
119
128
|
for (; (r = s.next()) && !r.done; ) {
|
|
120
|
-
const
|
|
121
|
-
t.call(e,
|
|
129
|
+
const o = r.value;
|
|
130
|
+
t.call(e, o[0], o[1]);
|
|
122
131
|
}
|
|
123
|
-
},
|
|
132
|
+
}, vt = (e, t) => {
|
|
124
133
|
let n;
|
|
125
134
|
const s = [];
|
|
126
135
|
for (; (n = e.exec(t)) !== null; )
|
|
127
136
|
s.push(n);
|
|
128
137
|
return s;
|
|
129
|
-
},
|
|
138
|
+
}, $t = x("HTMLFormElement"), Kt = (e) => e.toLowerCase().replace(
|
|
130
139
|
/[-_\s]([a-z\d])(\w*)/g,
|
|
131
140
|
function(n, s, r) {
|
|
132
141
|
return s.toUpperCase() + r;
|
|
133
142
|
}
|
|
134
|
-
),
|
|
143
|
+
), be = (({ hasOwnProperty: e }) => (t, n) => e.call(t, n))(Object.prototype), Vt = x("RegExp"), ve = (e, t) => {
|
|
135
144
|
const n = Object.getOwnPropertyDescriptors(e), s = {};
|
|
136
|
-
V(n, (r,
|
|
137
|
-
let
|
|
138
|
-
(
|
|
145
|
+
V(n, (r, o) => {
|
|
146
|
+
let i;
|
|
147
|
+
(i = t(r, o, e)) !== !1 && (s[o] = i || r);
|
|
139
148
|
}), Object.defineProperties(e, s);
|
|
140
|
-
},
|
|
141
|
-
|
|
149
|
+
}, Jt = (e) => {
|
|
150
|
+
ve(e, (t, n) => {
|
|
142
151
|
if (I(e) && ["arguments", "caller", "callee"].indexOf(n) !== -1)
|
|
143
152
|
return !1;
|
|
144
153
|
const s = e[n];
|
|
@@ -152,100 +161,100 @@ const Lt = (e, t, n, { allOwnKeys: s } = {}) => (V(t, (r, i) => {
|
|
|
152
161
|
});
|
|
153
162
|
}
|
|
154
163
|
});
|
|
155
|
-
},
|
|
164
|
+
}, Wt = (e, t) => {
|
|
156
165
|
const n = {}, s = (r) => {
|
|
157
|
-
r.forEach((
|
|
158
|
-
n[
|
|
166
|
+
r.forEach((o) => {
|
|
167
|
+
n[o] = !0;
|
|
159
168
|
});
|
|
160
169
|
};
|
|
161
170
|
return z(e) ? s(e) : s(String(e).split(t)), n;
|
|
162
|
-
},
|
|
163
|
-
},
|
|
164
|
-
function
|
|
165
|
-
return !!(e && I(e.append) && e[
|
|
171
|
+
}, Xt = () => {
|
|
172
|
+
}, Yt = (e, t) => e != null && Number.isFinite(e = +e) ? e : t;
|
|
173
|
+
function Zt(e) {
|
|
174
|
+
return !!(e && I(e.append) && e[He] === "FormData" && e[te]);
|
|
166
175
|
}
|
|
167
|
-
const
|
|
176
|
+
const Qt = (e) => {
|
|
168
177
|
const t = new Array(10), n = (s, r) => {
|
|
169
178
|
if (re(s)) {
|
|
170
179
|
if (t.indexOf(s) >= 0)
|
|
171
180
|
return;
|
|
172
181
|
if (!("toJSON" in s)) {
|
|
173
182
|
t[r] = s;
|
|
174
|
-
const
|
|
175
|
-
return V(s, (
|
|
176
|
-
const
|
|
177
|
-
!
|
|
178
|
-
}), t[r] = void 0,
|
|
183
|
+
const o = z(s) ? [] : {};
|
|
184
|
+
return V(s, (i, c) => {
|
|
185
|
+
const u = n(i, r + 1);
|
|
186
|
+
!K(u) && (o[c] = u);
|
|
187
|
+
}), t[r] = void 0, o;
|
|
179
188
|
}
|
|
180
189
|
}
|
|
181
190
|
return s;
|
|
182
191
|
};
|
|
183
192
|
return n(e, 0);
|
|
184
|
-
},
|
|
185
|
-
r === H &&
|
|
193
|
+
}, en = x("AsyncFunction"), tn = (e) => e && (re(e) || I(e)) && I(e.then) && I(e.catch), $e = ((e, t) => e ? setImmediate : t ? ((n, s) => (H.addEventListener("message", ({ source: r, data: o }) => {
|
|
194
|
+
r === H && o === n && s.length && s.shift()();
|
|
186
195
|
}, !1), (r) => {
|
|
187
196
|
s.push(r), H.postMessage(n, "*");
|
|
188
197
|
}))(`axios@${Math.random()}`, []) : (n) => setTimeout(n))(
|
|
189
198
|
typeof setImmediate == "function",
|
|
190
199
|
I(H.postMessage)
|
|
191
|
-
),
|
|
200
|
+
), nn = typeof queueMicrotask < "u" ? queueMicrotask.bind(H) : typeof process < "u" && process.nextTick || $e, sn = (e) => e != null && I(e[te]), a = {
|
|
192
201
|
isArray: z,
|
|
193
|
-
isArrayBuffer:
|
|
194
|
-
isBuffer:
|
|
195
|
-
isFormData:
|
|
196
|
-
isArrayBufferView:
|
|
197
|
-
isString:
|
|
198
|
-
isNumber:
|
|
199
|
-
isBoolean:
|
|
202
|
+
isArrayBuffer: Me,
|
|
203
|
+
isBuffer: wt,
|
|
204
|
+
isFormData: It,
|
|
205
|
+
isArrayBufferView: yt,
|
|
206
|
+
isString: Tt,
|
|
207
|
+
isNumber: je,
|
|
208
|
+
isBoolean: bt,
|
|
200
209
|
isObject: re,
|
|
201
210
|
isPlainObject: X,
|
|
202
|
-
isReadableStream:
|
|
203
|
-
isRequest:
|
|
204
|
-
isResponse:
|
|
205
|
-
isHeaders:
|
|
206
|
-
isUndefined:
|
|
207
|
-
isDate:
|
|
208
|
-
isFile:
|
|
209
|
-
isBlob:
|
|
210
|
-
isRegExp:
|
|
211
|
+
isReadableStream: Ut,
|
|
212
|
+
isRequest: xt,
|
|
213
|
+
isResponse: Lt,
|
|
214
|
+
isHeaders: Pt,
|
|
215
|
+
isUndefined: K,
|
|
216
|
+
isDate: Ot,
|
|
217
|
+
isFile: At,
|
|
218
|
+
isBlob: _t,
|
|
219
|
+
isRegExp: Vt,
|
|
211
220
|
isFunction: I,
|
|
212
|
-
isStream:
|
|
213
|
-
isURLSearchParams:
|
|
214
|
-
isTypedArray:
|
|
215
|
-
isFileList:
|
|
221
|
+
isStream: Ct,
|
|
222
|
+
isURLSearchParams: kt,
|
|
223
|
+
isTypedArray: Gt,
|
|
224
|
+
isFileList: Nt,
|
|
216
225
|
forEach: V,
|
|
217
226
|
merge: fe,
|
|
218
|
-
extend:
|
|
219
|
-
trim:
|
|
220
|
-
stripBOM:
|
|
221
|
-
inherits:
|
|
222
|
-
toFlatObject:
|
|
227
|
+
extend: Dt,
|
|
228
|
+
trim: Ft,
|
|
229
|
+
stripBOM: Bt,
|
|
230
|
+
inherits: qt,
|
|
231
|
+
toFlatObject: Ht,
|
|
223
232
|
kindOf: ne,
|
|
224
233
|
kindOfTest: x,
|
|
225
|
-
endsWith:
|
|
226
|
-
toArray:
|
|
227
|
-
forEachEntry:
|
|
228
|
-
matchAll:
|
|
229
|
-
isHTMLForm:
|
|
230
|
-
hasOwnProperty:
|
|
231
|
-
hasOwnProp:
|
|
234
|
+
endsWith: Mt,
|
|
235
|
+
toArray: jt,
|
|
236
|
+
forEachEntry: zt,
|
|
237
|
+
matchAll: vt,
|
|
238
|
+
isHTMLForm: $t,
|
|
239
|
+
hasOwnProperty: be,
|
|
240
|
+
hasOwnProp: be,
|
|
232
241
|
// an alias to avoid ESLint no-prototype-builtins detection
|
|
233
|
-
reduceDescriptors:
|
|
234
|
-
freezeMethods:
|
|
235
|
-
toObjectSet:
|
|
236
|
-
toCamelCase:
|
|
237
|
-
noop:
|
|
238
|
-
toFiniteNumber:
|
|
239
|
-
findKey:
|
|
242
|
+
reduceDescriptors: ve,
|
|
243
|
+
freezeMethods: Jt,
|
|
244
|
+
toObjectSet: Wt,
|
|
245
|
+
toCamelCase: Kt,
|
|
246
|
+
noop: Xt,
|
|
247
|
+
toFiniteNumber: Yt,
|
|
248
|
+
findKey: Ge,
|
|
240
249
|
global: H,
|
|
241
|
-
isContextDefined:
|
|
242
|
-
isSpecCompliantForm:
|
|
243
|
-
toJSONObject:
|
|
244
|
-
isAsyncFn:
|
|
245
|
-
isThenable:
|
|
246
|
-
setImmediate:
|
|
247
|
-
asap:
|
|
248
|
-
isIterable:
|
|
250
|
+
isContextDefined: ze,
|
|
251
|
+
isSpecCompliantForm: Zt,
|
|
252
|
+
toJSONObject: Qt,
|
|
253
|
+
isAsyncFn: en,
|
|
254
|
+
isThenable: tn,
|
|
255
|
+
setImmediate: $e,
|
|
256
|
+
asap: nn,
|
|
257
|
+
isIterable: sn
|
|
249
258
|
};
|
|
250
259
|
function m(e, t, n, s, r) {
|
|
251
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);
|
|
@@ -271,7 +280,7 @@ a.inherits(m, Error, {
|
|
|
271
280
|
};
|
|
272
281
|
}
|
|
273
282
|
});
|
|
274
|
-
const
|
|
283
|
+
const Ke = m.prototype, Ve = {};
|
|
275
284
|
[
|
|
276
285
|
"ERR_BAD_OPTION_VALUE",
|
|
277
286
|
"ERR_BAD_OPTION",
|
|
@@ -287,32 +296,32 @@ const $e = m.prototype, ve = {};
|
|
|
287
296
|
"ERR_INVALID_URL"
|
|
288
297
|
// eslint-disable-next-line func-names
|
|
289
298
|
].forEach((e) => {
|
|
290
|
-
|
|
299
|
+
Ve[e] = { value: e };
|
|
291
300
|
});
|
|
292
|
-
Object.defineProperties(m,
|
|
293
|
-
Object.defineProperty(
|
|
294
|
-
m.from = (e, t, n, s, r,
|
|
295
|
-
const
|
|
296
|
-
return a.toFlatObject(e,
|
|
297
|
-
return
|
|
298
|
-
}, (c) => c !== "isAxiosError"), m.call(
|
|
301
|
+
Object.defineProperties(m, Ve);
|
|
302
|
+
Object.defineProperty(Ke, "isAxiosError", { value: !0 });
|
|
303
|
+
m.from = (e, t, n, s, r, o) => {
|
|
304
|
+
const i = Object.create(Ke);
|
|
305
|
+
return a.toFlatObject(e, i, function(u) {
|
|
306
|
+
return u !== Error.prototype;
|
|
307
|
+
}, (c) => c !== "isAxiosError"), m.call(i, e.message, t, n, s, r), i.cause = e, i.name = e.name, o && Object.assign(i, o), i;
|
|
299
308
|
};
|
|
300
|
-
const
|
|
309
|
+
const rn = null;
|
|
301
310
|
function de(e) {
|
|
302
311
|
return a.isPlainObject(e) || a.isArray(e);
|
|
303
312
|
}
|
|
304
|
-
function
|
|
313
|
+
function Je(e) {
|
|
305
314
|
return a.endsWith(e, "[]") ? e.slice(0, -2) : e;
|
|
306
315
|
}
|
|
307
|
-
function
|
|
308
|
-
return e ? e.concat(t).map(function(r,
|
|
309
|
-
return r =
|
|
316
|
+
function Oe(e, t, n) {
|
|
317
|
+
return e ? e.concat(t).map(function(r, o) {
|
|
318
|
+
return r = Je(r), !n && o ? "[" + r + "]" : r;
|
|
310
319
|
}).join(n ? "." : "") : t;
|
|
311
320
|
}
|
|
312
|
-
function
|
|
321
|
+
function on(e) {
|
|
313
322
|
return a.isArray(e) && !e.some(de);
|
|
314
323
|
}
|
|
315
|
-
const
|
|
324
|
+
const an = a.toFlatObject(a, {}, null, function(t) {
|
|
316
325
|
return /^is[A-Z]/.test(t);
|
|
317
326
|
});
|
|
318
327
|
function oe(e, t, n) {
|
|
@@ -322,46 +331,46 @@ function oe(e, t, n) {
|
|
|
322
331
|
metaTokens: !0,
|
|
323
332
|
dots: !1,
|
|
324
333
|
indexes: !1
|
|
325
|
-
}, !1, function(E,
|
|
326
|
-
return !a.isUndefined(
|
|
334
|
+
}, !1, function(E, h) {
|
|
335
|
+
return !a.isUndefined(h[E]);
|
|
327
336
|
});
|
|
328
|
-
const s = n.metaTokens, r = n.visitor ||
|
|
337
|
+
const s = n.metaTokens, r = n.visitor || f, o = n.dots, i = n.indexes, u = (n.Blob || typeof Blob < "u" && Blob) && a.isSpecCompliantForm(t);
|
|
329
338
|
if (!a.isFunction(r))
|
|
330
339
|
throw new TypeError("visitor must be a function");
|
|
331
|
-
function
|
|
332
|
-
if (
|
|
333
|
-
if (a.isDate(
|
|
334
|
-
return
|
|
335
|
-
if (!
|
|
340
|
+
function l(p) {
|
|
341
|
+
if (p === null) return "";
|
|
342
|
+
if (a.isDate(p))
|
|
343
|
+
return p.toISOString();
|
|
344
|
+
if (!u && a.isBlob(p))
|
|
336
345
|
throw new m("Blob is not supported. Use a Buffer instead.");
|
|
337
|
-
return a.isArrayBuffer(
|
|
346
|
+
return a.isArrayBuffer(p) || a.isTypedArray(p) ? u && typeof Blob == "function" ? new Blob([p]) : Buffer.from(p) : p;
|
|
338
347
|
}
|
|
339
|
-
function
|
|
340
|
-
let S =
|
|
341
|
-
if (
|
|
348
|
+
function f(p, E, h) {
|
|
349
|
+
let S = p;
|
|
350
|
+
if (p && !h && typeof p == "object") {
|
|
342
351
|
if (a.endsWith(E, "{}"))
|
|
343
|
-
E = s ? E : E.slice(0, -2),
|
|
344
|
-
else if (a.isArray(
|
|
345
|
-
return E =
|
|
352
|
+
E = s ? E : E.slice(0, -2), p = JSON.stringify(p);
|
|
353
|
+
else if (a.isArray(p) && on(p) || (a.isFileList(p) || a.endsWith(E, "[]")) && (S = a.toArray(p)))
|
|
354
|
+
return E = Je(E), S.forEach(function(b, P) {
|
|
346
355
|
!(a.isUndefined(b) || b === null) && t.append(
|
|
347
356
|
// eslint-disable-next-line no-nested-ternary
|
|
348
|
-
|
|
349
|
-
|
|
357
|
+
i === !0 ? Oe([E], P, o) : i === null ? E : E + "[]",
|
|
358
|
+
l(b)
|
|
350
359
|
);
|
|
351
360
|
}), !1;
|
|
352
361
|
}
|
|
353
|
-
return de(
|
|
362
|
+
return de(p) ? !0 : (t.append(Oe(h, E, o), l(p)), !1);
|
|
354
363
|
}
|
|
355
|
-
const d = [], R = Object.assign(
|
|
356
|
-
defaultVisitor:
|
|
357
|
-
convertValue:
|
|
364
|
+
const d = [], R = Object.assign(an, {
|
|
365
|
+
defaultVisitor: f,
|
|
366
|
+
convertValue: l,
|
|
358
367
|
isVisitable: de
|
|
359
368
|
});
|
|
360
|
-
function w(
|
|
361
|
-
if (!a.isUndefined(
|
|
362
|
-
if (d.indexOf(
|
|
369
|
+
function w(p, E) {
|
|
370
|
+
if (!a.isUndefined(p)) {
|
|
371
|
+
if (d.indexOf(p) !== -1)
|
|
363
372
|
throw Error("Circular reference detected in " + E.join("."));
|
|
364
|
-
d.push(
|
|
373
|
+
d.push(p), a.forEach(p, function(S, y) {
|
|
365
374
|
(!(a.isUndefined(S) || S === null) && r.call(
|
|
366
375
|
t,
|
|
367
376
|
S,
|
|
@@ -376,7 +385,7 @@ function oe(e, t, n) {
|
|
|
376
385
|
throw new TypeError("data must be an object");
|
|
377
386
|
return w(e), t;
|
|
378
387
|
}
|
|
379
|
-
function
|
|
388
|
+
function Ae(e) {
|
|
380
389
|
const t = {
|
|
381
390
|
"!": "%21",
|
|
382
391
|
"'": "%27",
|
|
@@ -390,40 +399,40 @@ function Oe(e) {
|
|
|
390
399
|
return t[s];
|
|
391
400
|
});
|
|
392
401
|
}
|
|
393
|
-
function
|
|
402
|
+
function Se(e, t) {
|
|
394
403
|
this._pairs = [], e && oe(e, this, t);
|
|
395
404
|
}
|
|
396
|
-
const
|
|
397
|
-
|
|
405
|
+
const We = Se.prototype;
|
|
406
|
+
We.append = function(t, n) {
|
|
398
407
|
this._pairs.push([t, n]);
|
|
399
408
|
};
|
|
400
|
-
|
|
409
|
+
We.toString = function(t) {
|
|
401
410
|
const n = t ? function(s) {
|
|
402
|
-
return t.call(this, s,
|
|
403
|
-
} :
|
|
411
|
+
return t.call(this, s, Ae);
|
|
412
|
+
} : Ae;
|
|
404
413
|
return this._pairs.map(function(r) {
|
|
405
414
|
return n(r[0]) + "=" + n(r[1]);
|
|
406
415
|
}, "").join("&");
|
|
407
416
|
};
|
|
408
|
-
function
|
|
417
|
+
function cn(e) {
|
|
409
418
|
return encodeURIComponent(e).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]");
|
|
410
419
|
}
|
|
411
|
-
function
|
|
420
|
+
function Xe(e, t, n) {
|
|
412
421
|
if (!t)
|
|
413
422
|
return e;
|
|
414
|
-
const s = n && n.encode ||
|
|
423
|
+
const s = n && n.encode || cn;
|
|
415
424
|
a.isFunction(n) && (n = {
|
|
416
425
|
serialize: n
|
|
417
426
|
});
|
|
418
427
|
const r = n && n.serialize;
|
|
419
|
-
let
|
|
420
|
-
if (r ?
|
|
421
|
-
const
|
|
422
|
-
|
|
428
|
+
let o;
|
|
429
|
+
if (r ? o = r(t, n) : o = a.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;
|
|
423
432
|
}
|
|
424
433
|
return e;
|
|
425
434
|
}
|
|
426
|
-
class
|
|
435
|
+
class _e {
|
|
427
436
|
constructor() {
|
|
428
437
|
this.handlers = [];
|
|
429
438
|
}
|
|
@@ -477,65 +486,65 @@ class Ae {
|
|
|
477
486
|
});
|
|
478
487
|
}
|
|
479
488
|
}
|
|
480
|
-
const
|
|
489
|
+
const Ye = {
|
|
481
490
|
silentJSONParsing: !0,
|
|
482
491
|
forcedJSONParsing: !0,
|
|
483
492
|
clarifyTimeoutError: !1
|
|
484
|
-
},
|
|
493
|
+
}, un = typeof URLSearchParams < "u" ? URLSearchParams : Se, ln = typeof FormData < "u" ? FormData : null, fn = typeof Blob < "u" ? Blob : null, dn = {
|
|
485
494
|
isBrowser: !0,
|
|
486
495
|
classes: {
|
|
487
|
-
URLSearchParams:
|
|
488
|
-
FormData:
|
|
489
|
-
Blob:
|
|
496
|
+
URLSearchParams: un,
|
|
497
|
+
FormData: ln,
|
|
498
|
+
Blob: fn
|
|
490
499
|
},
|
|
491
500
|
protocols: ["http", "https", "file", "blob", "url", "data"]
|
|
492
|
-
},
|
|
493
|
-
self instanceof WorkerGlobalScope && typeof self.importScripts == "function",
|
|
501
|
+
}, we = typeof window < "u" && typeof document < "u", pe = typeof navigator == "object" && navigator || void 0, pn = we && (!pe || ["ReactNative", "NativeScript", "NS"].indexOf(pe.product) < 0), hn = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
|
|
502
|
+
self instanceof WorkerGlobalScope && typeof self.importScripts == "function", mn = we && window.location.href || "http://localhost", En = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
494
503
|
__proto__: null,
|
|
495
|
-
hasBrowserEnv:
|
|
496
|
-
hasStandardBrowserEnv:
|
|
497
|
-
hasStandardBrowserWebWorkerEnv:
|
|
498
|
-
navigator:
|
|
499
|
-
origin:
|
|
504
|
+
hasBrowserEnv: we,
|
|
505
|
+
hasStandardBrowserEnv: pn,
|
|
506
|
+
hasStandardBrowserWebWorkerEnv: hn,
|
|
507
|
+
navigator: pe,
|
|
508
|
+
origin: mn
|
|
500
509
|
}, Symbol.toStringTag, { value: "Module" })), A = {
|
|
501
|
-
...
|
|
502
|
-
...
|
|
510
|
+
...En,
|
|
511
|
+
...dn
|
|
503
512
|
};
|
|
504
|
-
function
|
|
513
|
+
function Rn(e, t) {
|
|
505
514
|
return oe(e, new A.classes.URLSearchParams(), Object.assign({
|
|
506
|
-
visitor: function(n, s, r,
|
|
507
|
-
return A.isNode && a.isBuffer(n) ? (this.append(s, n.toString("base64")), !1) :
|
|
515
|
+
visitor: function(n, s, r, o) {
|
|
516
|
+
return A.isNode && a.isBuffer(n) ? (this.append(s, n.toString("base64")), !1) : o.defaultVisitor.apply(this, arguments);
|
|
508
517
|
}
|
|
509
518
|
}, t));
|
|
510
519
|
}
|
|
511
|
-
function
|
|
520
|
+
function gn(e) {
|
|
512
521
|
return a.matchAll(/\w+|\[(\w*)]/g, e).map((t) => t[0] === "[]" ? "" : t[1] || t[0]);
|
|
513
522
|
}
|
|
514
|
-
function
|
|
523
|
+
function Sn(e) {
|
|
515
524
|
const t = {}, n = Object.keys(e);
|
|
516
525
|
let s;
|
|
517
526
|
const r = n.length;
|
|
518
|
-
let
|
|
527
|
+
let o;
|
|
519
528
|
for (s = 0; s < r; s++)
|
|
520
|
-
|
|
529
|
+
o = n[s], t[o] = e[o];
|
|
521
530
|
return t;
|
|
522
531
|
}
|
|
523
|
-
function
|
|
524
|
-
function t(n, s, r,
|
|
525
|
-
let
|
|
526
|
-
if (
|
|
527
|
-
const c = Number.isFinite(+
|
|
528
|
-
return
|
|
532
|
+
function Ze(e) {
|
|
533
|
+
function t(n, s, r, o) {
|
|
534
|
+
let i = n[o++];
|
|
535
|
+
if (i === "__proto__") return !0;
|
|
536
|
+
const c = Number.isFinite(+i), u = o >= n.length;
|
|
537
|
+
return i = !i && a.isArray(r) ? r.length : i, u ? (a.hasOwnProp(r, i) ? r[i] = [r[i], s] : r[i] = s, !c) : ((!r[i] || !a.isObject(r[i])) && (r[i] = []), t(n, s, r[i], o) && a.isArray(r[i]) && (r[i] = Sn(r[i])), !c);
|
|
529
538
|
}
|
|
530
539
|
if (a.isFormData(e) && a.isFunction(e.entries)) {
|
|
531
540
|
const n = {};
|
|
532
541
|
return a.forEachEntry(e, (s, r) => {
|
|
533
|
-
t(
|
|
542
|
+
t(gn(s), r, n, 0);
|
|
534
543
|
}), n;
|
|
535
544
|
}
|
|
536
545
|
return null;
|
|
537
546
|
}
|
|
538
|
-
function
|
|
547
|
+
function wn(e, t, n) {
|
|
539
548
|
if (a.isString(e))
|
|
540
549
|
try {
|
|
541
550
|
return (t || JSON.parse)(e), a.trim(e);
|
|
@@ -546,12 +555,12 @@ function Rn(e, t, n) {
|
|
|
546
555
|
return (n || JSON.stringify)(e);
|
|
547
556
|
}
|
|
548
557
|
const J = {
|
|
549
|
-
transitional:
|
|
558
|
+
transitional: Ye,
|
|
550
559
|
adapter: ["xhr", "http", "fetch"],
|
|
551
560
|
transformRequest: [function(t, n) {
|
|
552
|
-
const s = n.getContentType() || "", r = s.indexOf("application/json") > -1,
|
|
553
|
-
if (
|
|
554
|
-
return r ? JSON.stringify(
|
|
561
|
+
const s = n.getContentType() || "", r = s.indexOf("application/json") > -1, o = a.isObject(t);
|
|
562
|
+
if (o && a.isHTMLForm(t) && (t = new FormData(t)), a.isFormData(t))
|
|
563
|
+
return r ? JSON.stringify(Ze(t)) : t;
|
|
555
564
|
if (a.isArrayBuffer(t) || a.isBuffer(t) || a.isStream(t) || a.isFile(t) || a.isBlob(t) || a.isReadableStream(t))
|
|
556
565
|
return t;
|
|
557
566
|
if (a.isArrayBufferView(t))
|
|
@@ -559,30 +568,30 @@ const J = {
|
|
|
559
568
|
if (a.isURLSearchParams(t))
|
|
560
569
|
return n.setContentType("application/x-www-form-urlencoded;charset=utf-8", !1), t.toString();
|
|
561
570
|
let c;
|
|
562
|
-
if (
|
|
571
|
+
if (o) {
|
|
563
572
|
if (s.indexOf("application/x-www-form-urlencoded") > -1)
|
|
564
|
-
return
|
|
573
|
+
return Rn(t, this.formSerializer).toString();
|
|
565
574
|
if ((c = a.isFileList(t)) || s.indexOf("multipart/form-data") > -1) {
|
|
566
|
-
const
|
|
575
|
+
const u = this.env && this.env.FormData;
|
|
567
576
|
return oe(
|
|
568
577
|
c ? { "files[]": t } : t,
|
|
569
|
-
|
|
578
|
+
u && new u(),
|
|
570
579
|
this.formSerializer
|
|
571
580
|
);
|
|
572
581
|
}
|
|
573
582
|
}
|
|
574
|
-
return
|
|
583
|
+
return o || r ? (n.setContentType("application/json", !1), wn(t)) : t;
|
|
575
584
|
}],
|
|
576
585
|
transformResponse: [function(t) {
|
|
577
586
|
const n = this.transitional || J.transitional, s = n && n.forcedJSONParsing, r = this.responseType === "json";
|
|
578
587
|
if (a.isResponse(t) || a.isReadableStream(t))
|
|
579
588
|
return t;
|
|
580
589
|
if (t && a.isString(t) && (s && !this.responseType || r)) {
|
|
581
|
-
const
|
|
590
|
+
const i = !(n && n.silentJSONParsing) && r;
|
|
582
591
|
try {
|
|
583
592
|
return JSON.parse(t);
|
|
584
593
|
} catch (c) {
|
|
585
|
-
if (
|
|
594
|
+
if (i)
|
|
586
595
|
throw c.name === "SyntaxError" ? m.from(c, m.ERR_BAD_RESPONSE, this, null, this.response) : c;
|
|
587
596
|
}
|
|
588
597
|
}
|
|
@@ -614,7 +623,7 @@ const J = {
|
|
|
614
623
|
a.forEach(["delete", "get", "head", "post", "put", "patch"], (e) => {
|
|
615
624
|
J.headers[e] = {};
|
|
616
625
|
});
|
|
617
|
-
const
|
|
626
|
+
const yn = a.toObjectSet([
|
|
618
627
|
"age",
|
|
619
628
|
"authorization",
|
|
620
629
|
"content-length",
|
|
@@ -632,28 +641,28 @@ const gn = a.toObjectSet([
|
|
|
632
641
|
"referer",
|
|
633
642
|
"retry-after",
|
|
634
643
|
"user-agent"
|
|
635
|
-
]),
|
|
644
|
+
]), Tn = (e) => {
|
|
636
645
|
const t = {};
|
|
637
646
|
let n, s, r;
|
|
638
647
|
return e && e.split(`
|
|
639
|
-
`).forEach(function(
|
|
640
|
-
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);
|
|
641
650
|
}), t;
|
|
642
|
-
},
|
|
651
|
+
}, Ne = Symbol("internals");
|
|
643
652
|
function $(e) {
|
|
644
653
|
return e && String(e).trim().toLowerCase();
|
|
645
654
|
}
|
|
646
655
|
function Y(e) {
|
|
647
656
|
return e === !1 || e == null ? e : a.isArray(e) ? e.map(Y) : String(e);
|
|
648
657
|
}
|
|
649
|
-
function
|
|
658
|
+
function bn(e) {
|
|
650
659
|
const t = /* @__PURE__ */ Object.create(null), n = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
|
|
651
660
|
let s;
|
|
652
661
|
for (; s = n.exec(e); )
|
|
653
662
|
t[s[1]] = s[2];
|
|
654
663
|
return t;
|
|
655
664
|
}
|
|
656
|
-
const
|
|
665
|
+
const On = (e) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());
|
|
657
666
|
function ce(e, t, n, s, r) {
|
|
658
667
|
if (a.isFunction(s))
|
|
659
668
|
return s.call(this, t, n);
|
|
@@ -664,15 +673,15 @@ function ce(e, t, n, s, r) {
|
|
|
664
673
|
return s.test(t);
|
|
665
674
|
}
|
|
666
675
|
}
|
|
667
|
-
function
|
|
676
|
+
function An(e) {
|
|
668
677
|
return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (t, n, s) => n.toUpperCase() + s);
|
|
669
678
|
}
|
|
670
|
-
function
|
|
679
|
+
function _n(e, t) {
|
|
671
680
|
const n = a.toCamelCase(" " + t);
|
|
672
681
|
["get", "set", "has"].forEach((s) => {
|
|
673
682
|
Object.defineProperty(e, s + n, {
|
|
674
|
-
value: function(r,
|
|
675
|
-
return this[s].call(this, t, r,
|
|
683
|
+
value: function(r, o, i) {
|
|
684
|
+
return this[s].call(this, t, r, o, i);
|
|
676
685
|
},
|
|
677
686
|
configurable: !0
|
|
678
687
|
});
|
|
@@ -684,28 +693,28 @@ let k = class {
|
|
|
684
693
|
}
|
|
685
694
|
set(t, n, s) {
|
|
686
695
|
const r = this;
|
|
687
|
-
function
|
|
688
|
-
const
|
|
689
|
-
if (!
|
|
696
|
+
function o(c, u, l) {
|
|
697
|
+
const f = $(u);
|
|
698
|
+
if (!f)
|
|
690
699
|
throw new Error("header name must be a non-empty string");
|
|
691
|
-
const d = a.findKey(r,
|
|
692
|
-
(!d || r[d] === void 0 ||
|
|
700
|
+
const d = a.findKey(r, f);
|
|
701
|
+
(!d || r[d] === void 0 || l === !0 || l === void 0 && r[d] !== !1) && (r[d || u] = Y(c));
|
|
693
702
|
}
|
|
694
|
-
const
|
|
703
|
+
const i = (c, u) => a.forEach(c, (l, f) => o(l, f, u));
|
|
695
704
|
if (a.isPlainObject(t) || t instanceof this.constructor)
|
|
696
|
-
|
|
697
|
-
else if (a.isString(t) && (t = t.trim()) && !
|
|
698
|
-
|
|
705
|
+
i(t, n);
|
|
706
|
+
else if (a.isString(t) && (t = t.trim()) && !On(t))
|
|
707
|
+
i(Tn(t), n);
|
|
699
708
|
else if (a.isObject(t) && a.isIterable(t)) {
|
|
700
|
-
let c = {},
|
|
701
|
-
for (const
|
|
702
|
-
if (!a.isArray(
|
|
709
|
+
let c = {}, u, l;
|
|
710
|
+
for (const f of t) {
|
|
711
|
+
if (!a.isArray(f))
|
|
703
712
|
throw TypeError("Object iterator must return a key-value pair");
|
|
704
|
-
c[
|
|
713
|
+
c[l = f[0]] = (u = c[l]) ? a.isArray(u) ? [...u, f[1]] : [u, f[1]] : f[1];
|
|
705
714
|
}
|
|
706
|
-
|
|
715
|
+
i(c, n);
|
|
707
716
|
} else
|
|
708
|
-
t != null &&
|
|
717
|
+
t != null && o(n, t, s);
|
|
709
718
|
return this;
|
|
710
719
|
}
|
|
711
720
|
get(t, n) {
|
|
@@ -716,7 +725,7 @@ let k = class {
|
|
|
716
725
|
if (!n)
|
|
717
726
|
return r;
|
|
718
727
|
if (n === !0)
|
|
719
|
-
return
|
|
728
|
+
return bn(r);
|
|
720
729
|
if (a.isFunction(n))
|
|
721
730
|
return n.call(this, r, s);
|
|
722
731
|
if (a.isRegExp(n))
|
|
@@ -735,33 +744,33 @@ let k = class {
|
|
|
735
744
|
delete(t, n) {
|
|
736
745
|
const s = this;
|
|
737
746
|
let r = !1;
|
|
738
|
-
function i
|
|
739
|
-
if (
|
|
740
|
-
const c = a.findKey(s,
|
|
747
|
+
function o(i) {
|
|
748
|
+
if (i = $(i), i) {
|
|
749
|
+
const c = a.findKey(s, i);
|
|
741
750
|
c && (!n || ce(s, s[c], c, n)) && (delete s[c], r = !0);
|
|
742
751
|
}
|
|
743
752
|
}
|
|
744
|
-
return a.isArray(t) ? t.forEach(
|
|
753
|
+
return a.isArray(t) ? t.forEach(o) : o(t), r;
|
|
745
754
|
}
|
|
746
755
|
clear(t) {
|
|
747
756
|
const n = Object.keys(this);
|
|
748
757
|
let s = n.length, r = !1;
|
|
749
758
|
for (; s--; ) {
|
|
750
|
-
const
|
|
751
|
-
(!t || ce(this, this[
|
|
759
|
+
const o = n[s];
|
|
760
|
+
(!t || ce(this, this[o], o, t, !0)) && (delete this[o], r = !0);
|
|
752
761
|
}
|
|
753
762
|
return r;
|
|
754
763
|
}
|
|
755
764
|
normalize(t) {
|
|
756
765
|
const n = this, s = {};
|
|
757
|
-
return a.forEach(this, (r,
|
|
758
|
-
const
|
|
759
|
-
if (
|
|
760
|
-
n[
|
|
766
|
+
return a.forEach(this, (r, o) => {
|
|
767
|
+
const i = a.findKey(s, o);
|
|
768
|
+
if (i) {
|
|
769
|
+
n[i] = Y(r), delete n[o];
|
|
761
770
|
return;
|
|
762
771
|
}
|
|
763
|
-
const c = t ?
|
|
764
|
-
c !==
|
|
772
|
+
const c = t ? An(o) : String(o).trim();
|
|
773
|
+
c !== o && delete n[o], n[c] = Y(r), s[c] = !0;
|
|
765
774
|
}), this;
|
|
766
775
|
}
|
|
767
776
|
concat(...t) {
|
|
@@ -794,14 +803,14 @@ let k = class {
|
|
|
794
803
|
return n.forEach((r) => s.set(r)), s;
|
|
795
804
|
}
|
|
796
805
|
static accessor(t) {
|
|
797
|
-
const s = (this[
|
|
806
|
+
const s = (this[Ne] = this[Ne] = {
|
|
798
807
|
accessors: {}
|
|
799
808
|
}).accessors, r = this.prototype;
|
|
800
|
-
function i
|
|
801
|
-
const c = $(
|
|
802
|
-
s[c] || (
|
|
809
|
+
function o(i) {
|
|
810
|
+
const c = $(i);
|
|
811
|
+
s[c] || (_n(r, i), s[c] = !0);
|
|
803
812
|
}
|
|
804
|
-
return a.isArray(t) ? t.forEach(
|
|
813
|
+
return a.isArray(t) ? t.forEach(o) : o(t), this;
|
|
805
814
|
}
|
|
806
815
|
};
|
|
807
816
|
k.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]);
|
|
@@ -817,21 +826,21 @@ a.reduceDescriptors(k.prototype, ({ value: e }, t) => {
|
|
|
817
826
|
a.freezeMethods(k);
|
|
818
827
|
function ue(e, t) {
|
|
819
828
|
const n = this || J, s = t || n, r = k.from(s.headers);
|
|
820
|
-
let
|
|
829
|
+
let o = s.data;
|
|
821
830
|
return a.forEach(e, function(c) {
|
|
822
|
-
|
|
823
|
-
}), r.normalize(),
|
|
831
|
+
o = c.call(n, o, r.normalize(), t ? t.status : void 0);
|
|
832
|
+
}), r.normalize(), o;
|
|
824
833
|
}
|
|
825
|
-
function
|
|
834
|
+
function Qe(e) {
|
|
826
835
|
return !!(e && e.__CANCEL__);
|
|
827
836
|
}
|
|
828
|
-
function
|
|
837
|
+
function v(e, t, n) {
|
|
829
838
|
m.call(this, e ?? "canceled", m.ERR_CANCELED, t, n), this.name = "CanceledError";
|
|
830
839
|
}
|
|
831
|
-
a.inherits(
|
|
840
|
+
a.inherits(v, m, {
|
|
832
841
|
__CANCEL__: !0
|
|
833
842
|
});
|
|
834
|
-
function
|
|
843
|
+
function et(e, t, n) {
|
|
835
844
|
const s = n.config.validateStatus;
|
|
836
845
|
!n.status || !s || s(n.status) ? e(n) : t(new m(
|
|
837
846
|
"Request failed with status code " + n.status,
|
|
@@ -841,73 +850,73 @@ function Qe(e, t, n) {
|
|
|
841
850
|
n
|
|
842
851
|
));
|
|
843
852
|
}
|
|
844
|
-
function
|
|
853
|
+
function Nn(e) {
|
|
845
854
|
const t = /^([-+\w]{1,25})(:?\/\/|:)/.exec(e);
|
|
846
855
|
return t && t[1] || "";
|
|
847
856
|
}
|
|
848
|
-
function
|
|
857
|
+
function Cn(e, t) {
|
|
849
858
|
e = e || 10;
|
|
850
859
|
const n = new Array(e), s = new Array(e);
|
|
851
|
-
let r = 0,
|
|
852
|
-
return t = t !== void 0 ? t : 1e3, function(
|
|
853
|
-
const
|
|
854
|
-
|
|
855
|
-
let d =
|
|
860
|
+
let r = 0, o = 0, i;
|
|
861
|
+
return t = t !== void 0 ? t : 1e3, function(u) {
|
|
862
|
+
const l = Date.now(), f = s[o];
|
|
863
|
+
i || (i = l), n[r] = u, s[r] = l;
|
|
864
|
+
let d = o, R = 0;
|
|
856
865
|
for (; d !== r; )
|
|
857
866
|
R += n[d++], d = d % e;
|
|
858
|
-
if (r = (r + 1) % e, r ===
|
|
867
|
+
if (r = (r + 1) % e, r === o && (o = (o + 1) % e), l - i < t)
|
|
859
868
|
return;
|
|
860
|
-
const w =
|
|
869
|
+
const w = f && l - f;
|
|
861
870
|
return w ? Math.round(R * 1e3 / w) : void 0;
|
|
862
871
|
};
|
|
863
872
|
}
|
|
864
|
-
function
|
|
865
|
-
let n = 0, s = 1e3 / t, r,
|
|
866
|
-
const
|
|
867
|
-
n =
|
|
873
|
+
function In(e, t) {
|
|
874
|
+
let n = 0, s = 1e3 / t, r, o;
|
|
875
|
+
const i = (l, f = Date.now()) => {
|
|
876
|
+
n = f, r = null, o && (clearTimeout(o), o = null), e.apply(null, l);
|
|
868
877
|
};
|
|
869
|
-
return [(...
|
|
870
|
-
const
|
|
871
|
-
d >= s ?
|
|
872
|
-
|
|
878
|
+
return [(...l) => {
|
|
879
|
+
const f = Date.now(), d = f - n;
|
|
880
|
+
d >= s ? i(l, f) : (r = l, o || (o = setTimeout(() => {
|
|
881
|
+
o = null, i(r);
|
|
873
882
|
}, s - d)));
|
|
874
|
-
}, () => r &&
|
|
883
|
+
}, () => r && i(r)];
|
|
875
884
|
}
|
|
876
885
|
const Q = (e, t, n = 3) => {
|
|
877
886
|
let s = 0;
|
|
878
|
-
const r =
|
|
879
|
-
return
|
|
880
|
-
const
|
|
881
|
-
s =
|
|
887
|
+
const r = Cn(50, 250);
|
|
888
|
+
return In((o) => {
|
|
889
|
+
const i = o.loaded, c = o.lengthComputable ? o.total : void 0, u = i - s, l = r(u), f = i <= c;
|
|
890
|
+
s = i;
|
|
882
891
|
const d = {
|
|
883
|
-
loaded:
|
|
892
|
+
loaded: i,
|
|
884
893
|
total: c,
|
|
885
|
-
progress: c ?
|
|
886
|
-
bytes:
|
|
887
|
-
rate:
|
|
888
|
-
estimated:
|
|
889
|
-
event:
|
|
894
|
+
progress: c ? i / c : void 0,
|
|
895
|
+
bytes: u,
|
|
896
|
+
rate: l || void 0,
|
|
897
|
+
estimated: l && c && f ? (c - i) / l : void 0,
|
|
898
|
+
event: o,
|
|
890
899
|
lengthComputable: c != null,
|
|
891
900
|
[t ? "download" : "upload"]: !0
|
|
892
901
|
};
|
|
893
902
|
e(d);
|
|
894
903
|
}, n);
|
|
895
|
-
},
|
|
904
|
+
}, Ce = (e, t) => {
|
|
896
905
|
const n = e != null;
|
|
897
906
|
return [(s) => t[0]({
|
|
898
907
|
lengthComputable: n,
|
|
899
908
|
total: e,
|
|
900
909
|
loaded: s
|
|
901
910
|
}), t[1]];
|
|
902
|
-
},
|
|
911
|
+
}, Ie = (e) => (...t) => a.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)))(
|
|
903
912
|
new URL(A.origin),
|
|
904
913
|
A.navigator && /(msie|trident)/i.test(A.navigator.userAgent)
|
|
905
|
-
) : () => !0,
|
|
914
|
+
) : () => !0, Un = A.hasStandardBrowserEnv ? (
|
|
906
915
|
// Standard browser envs support document.cookie
|
|
907
916
|
{
|
|
908
|
-
write(e, t, n, s, r,
|
|
909
|
-
const
|
|
910
|
-
a.isNumber(n) &&
|
|
917
|
+
write(e, t, n, s, r, o) {
|
|
918
|
+
const i = [e + "=" + encodeURIComponent(t)];
|
|
919
|
+
a.isNumber(n) && i.push("expires=" + new Date(n).toGMTString()), a.isString(s) && i.push("path=" + s), a.isString(r) && i.push("domain=" + r), o === !0 && i.push("secure"), document.cookie = i.join("; ");
|
|
911
920
|
},
|
|
912
921
|
read(e) {
|
|
913
922
|
const t = document.cookie.match(new RegExp("(^|;\\s*)(" + e + ")=([^;]*)"));
|
|
@@ -929,183 +938,183 @@ const Q = (e, t, n = 3) => {
|
|
|
929
938
|
}
|
|
930
939
|
}
|
|
931
940
|
);
|
|
932
|
-
function
|
|
941
|
+
function xn(e) {
|
|
933
942
|
return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(e);
|
|
934
943
|
}
|
|
935
|
-
function
|
|
944
|
+
function Ln(e, t) {
|
|
936
945
|
return t ? e.replace(/\/?\/$/, "") + "/" + t.replace(/^\/+/, "") : e;
|
|
937
946
|
}
|
|
938
|
-
function
|
|
939
|
-
let s = !
|
|
940
|
-
return e && (s || n == !1) ?
|
|
947
|
+
function tt(e, t, n) {
|
|
948
|
+
let s = !xn(t);
|
|
949
|
+
return e && (s || n == !1) ? Ln(e, t) : t;
|
|
941
950
|
}
|
|
942
|
-
const
|
|
951
|
+
const ke = (e) => e instanceof k ? { ...e } : e;
|
|
943
952
|
function j(e, t) {
|
|
944
953
|
t = t || {};
|
|
945
954
|
const n = {};
|
|
946
|
-
function s(
|
|
947
|
-
return a.isPlainObject(
|
|
948
|
-
}
|
|
949
|
-
function r(
|
|
950
|
-
if (a.isUndefined(
|
|
951
|
-
if (!a.isUndefined(
|
|
952
|
-
return s(void 0,
|
|
953
|
-
} else return s(
|
|
954
|
-
}
|
|
955
|
-
function
|
|
956
|
-
if (!a.isUndefined(
|
|
957
|
-
return s(void 0,
|
|
958
|
-
}
|
|
959
|
-
function
|
|
960
|
-
if (a.isUndefined(
|
|
961
|
-
if (!a.isUndefined(
|
|
962
|
-
return s(void 0,
|
|
963
|
-
} else return s(void 0,
|
|
964
|
-
}
|
|
965
|
-
function c(
|
|
955
|
+
function s(l, f, d, R) {
|
|
956
|
+
return a.isPlainObject(l) && a.isPlainObject(f) ? a.merge.call({ caseless: R }, l, f) : a.isPlainObject(f) ? a.merge({}, f) : a.isArray(f) ? f.slice() : f;
|
|
957
|
+
}
|
|
958
|
+
function r(l, f, d, R) {
|
|
959
|
+
if (a.isUndefined(f)) {
|
|
960
|
+
if (!a.isUndefined(l))
|
|
961
|
+
return s(void 0, l, d, R);
|
|
962
|
+
} else return s(l, f, d, R);
|
|
963
|
+
}
|
|
964
|
+
function o(l, f) {
|
|
965
|
+
if (!a.isUndefined(f))
|
|
966
|
+
return s(void 0, f);
|
|
967
|
+
}
|
|
968
|
+
function i(l, f) {
|
|
969
|
+
if (a.isUndefined(f)) {
|
|
970
|
+
if (!a.isUndefined(l))
|
|
971
|
+
return s(void 0, l);
|
|
972
|
+
} else return s(void 0, f);
|
|
973
|
+
}
|
|
974
|
+
function c(l, f, d) {
|
|
966
975
|
if (d in t)
|
|
967
|
-
return s(
|
|
976
|
+
return s(l, f);
|
|
968
977
|
if (d in e)
|
|
969
|
-
return s(void 0,
|
|
970
|
-
}
|
|
971
|
-
const
|
|
972
|
-
url:
|
|
973
|
-
method:
|
|
974
|
-
data:
|
|
975
|
-
baseURL:
|
|
976
|
-
transformRequest:
|
|
977
|
-
transformResponse:
|
|
978
|
-
paramsSerializer:
|
|
979
|
-
timeout:
|
|
980
|
-
timeoutMessage:
|
|
981
|
-
withCredentials:
|
|
982
|
-
withXSRFToken:
|
|
983
|
-
adapter:
|
|
984
|
-
responseType:
|
|
985
|
-
xsrfCookieName:
|
|
986
|
-
xsrfHeaderName:
|
|
987
|
-
onUploadProgress:
|
|
988
|
-
onDownloadProgress:
|
|
989
|
-
decompress:
|
|
990
|
-
maxContentLength:
|
|
991
|
-
maxBodyLength:
|
|
992
|
-
beforeRedirect:
|
|
993
|
-
transport:
|
|
994
|
-
httpAgent:
|
|
995
|
-
httpsAgent:
|
|
996
|
-
cancelToken:
|
|
997
|
-
socketPath:
|
|
998
|
-
responseEncoding:
|
|
978
|
+
return s(void 0, l);
|
|
979
|
+
}
|
|
980
|
+
const u = {
|
|
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,
|
|
999
1008
|
validateStatus: c,
|
|
1000
|
-
headers: (
|
|
1009
|
+
headers: (l, f, d) => r(ke(l), ke(f), d, !0)
|
|
1001
1010
|
};
|
|
1002
|
-
return a.forEach(Object.keys(Object.assign({}, e, t)), function(
|
|
1003
|
-
const d = f
|
|
1004
|
-
a.isUndefined(R) && d !== c || (n[
|
|
1011
|
+
return a.forEach(Object.keys(Object.assign({}, e, t)), function(f) {
|
|
1012
|
+
const d = u[f] || r, R = d(e[f], t[f], f);
|
|
1013
|
+
a.isUndefined(R) && d !== c || (n[f] = R);
|
|
1005
1014
|
}), n;
|
|
1006
1015
|
}
|
|
1007
|
-
const
|
|
1016
|
+
const nt = (e) => {
|
|
1008
1017
|
const t = j({}, e);
|
|
1009
|
-
let { data: n, withXSRFToken: s, xsrfHeaderName: r, xsrfCookieName:
|
|
1010
|
-
t.headers =
|
|
1018
|
+
let { data: n, withXSRFToken: s, xsrfHeaderName: r, xsrfCookieName: o, headers: i, auth: c } = t;
|
|
1019
|
+
t.headers = i = k.from(i), t.url = Xe(tt(t.baseURL, t.url, t.allowAbsoluteUrls), e.params, e.paramsSerializer), c && i.set(
|
|
1011
1020
|
"Authorization",
|
|
1012
1021
|
"Basic " + btoa((c.username || "") + ":" + (c.password ? unescape(encodeURIComponent(c.password)) : ""))
|
|
1013
1022
|
);
|
|
1014
|
-
let
|
|
1023
|
+
let u;
|
|
1015
1024
|
if (a.isFormData(n)) {
|
|
1016
1025
|
if (A.hasStandardBrowserEnv || A.hasStandardBrowserWebWorkerEnv)
|
|
1017
|
-
|
|
1018
|
-
else if ((
|
|
1019
|
-
const [
|
|
1020
|
-
|
|
1026
|
+
i.setContentType(void 0);
|
|
1027
|
+
else if ((u = i.getContentType()) !== !1) {
|
|
1028
|
+
const [l, ...f] = u ? u.split(";").map((d) => d.trim()).filter(Boolean) : [];
|
|
1029
|
+
i.setContentType([l || "multipart/form-data", ...f].join("; "));
|
|
1021
1030
|
}
|
|
1022
1031
|
}
|
|
1023
|
-
if (A.hasStandardBrowserEnv && (s && a.isFunction(s) && (s = s(t)), s || s !== !1 &&
|
|
1024
|
-
const
|
|
1025
|
-
|
|
1032
|
+
if (A.hasStandardBrowserEnv && (s && a.isFunction(s) && (s = s(t)), s || s !== !1 && kn(t.url))) {
|
|
1033
|
+
const l = r && o && Un.read(o);
|
|
1034
|
+
l && i.set(r, l);
|
|
1026
1035
|
}
|
|
1027
1036
|
return t;
|
|
1028
|
-
},
|
|
1037
|
+
}, Pn = typeof XMLHttpRequest < "u", Fn = Pn && function(e) {
|
|
1029
1038
|
return new Promise(function(n, s) {
|
|
1030
|
-
const r =
|
|
1031
|
-
let
|
|
1032
|
-
const
|
|
1033
|
-
let { responseType: c, onUploadProgress:
|
|
1039
|
+
const r = nt(e);
|
|
1040
|
+
let o = r.data;
|
|
1041
|
+
const i = k.from(r.headers).normalize();
|
|
1042
|
+
let { responseType: c, onUploadProgress: u, onDownloadProgress: l } = r, f, d, R, w, p;
|
|
1034
1043
|
function E() {
|
|
1035
|
-
w && w(),
|
|
1044
|
+
w && w(), p && p(), r.cancelToken && r.cancelToken.unsubscribe(f), r.signal && r.signal.removeEventListener("abort", f);
|
|
1036
1045
|
}
|
|
1037
|
-
let
|
|
1038
|
-
|
|
1046
|
+
let h = new XMLHttpRequest();
|
|
1047
|
+
h.open(r.method.toUpperCase(), r.url, !0), h.timeout = r.timeout;
|
|
1039
1048
|
function S() {
|
|
1040
|
-
if (!
|
|
1049
|
+
if (!h)
|
|
1041
1050
|
return;
|
|
1042
1051
|
const b = k.from(
|
|
1043
|
-
"getAllResponseHeaders" in
|
|
1052
|
+
"getAllResponseHeaders" in h && h.getAllResponseHeaders()
|
|
1044
1053
|
), N = {
|
|
1045
|
-
data: !c || c === "text" || c === "json" ?
|
|
1046
|
-
status:
|
|
1047
|
-
statusText:
|
|
1054
|
+
data: !c || c === "text" || c === "json" ? h.responseText : h.response,
|
|
1055
|
+
status: h.status,
|
|
1056
|
+
statusText: h.statusText,
|
|
1048
1057
|
headers: b,
|
|
1049
1058
|
config: e,
|
|
1050
|
-
request:
|
|
1059
|
+
request: h
|
|
1051
1060
|
};
|
|
1052
|
-
|
|
1061
|
+
et(function(B) {
|
|
1053
1062
|
n(B), E();
|
|
1054
1063
|
}, function(B) {
|
|
1055
1064
|
s(B), E();
|
|
1056
|
-
}, N),
|
|
1065
|
+
}, N), h = null;
|
|
1057
1066
|
}
|
|
1058
|
-
"onloadend" in
|
|
1059
|
-
!
|
|
1060
|
-
},
|
|
1061
|
-
|
|
1062
|
-
},
|
|
1063
|
-
s(new m("Network Error", m.ERR_NETWORK, e,
|
|
1064
|
-
},
|
|
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
|
+
}, h.onabort = function() {
|
|
1070
|
+
h && (s(new m("Request aborted", m.ECONNABORTED, e, h)), h = null);
|
|
1071
|
+
}, h.onerror = function() {
|
|
1072
|
+
s(new m("Network Error", m.ERR_NETWORK, e, h)), h = null;
|
|
1073
|
+
}, h.ontimeout = function() {
|
|
1065
1074
|
let P = r.timeout ? "timeout of " + r.timeout + "ms exceeded" : "timeout exceeded";
|
|
1066
|
-
const N = r.transitional ||
|
|
1075
|
+
const N = r.transitional || Ye;
|
|
1067
1076
|
r.timeoutErrorMessage && (P = r.timeoutErrorMessage), s(new m(
|
|
1068
1077
|
P,
|
|
1069
1078
|
N.clarifyTimeoutError ? m.ETIMEDOUT : m.ECONNABORTED,
|
|
1070
1079
|
e,
|
|
1071
|
-
|
|
1072
|
-
)),
|
|
1073
|
-
},
|
|
1074
|
-
|
|
1075
|
-
}), a.isUndefined(r.withCredentials) || (
|
|
1076
|
-
|
|
1077
|
-
}, r.cancelToken && r.cancelToken.subscribe(
|
|
1078
|
-
const y =
|
|
1080
|
+
h
|
|
1081
|
+
)), h = null;
|
|
1082
|
+
}, o === void 0 && i.setContentType(null), "setRequestHeader" in h && a.forEach(i.toJSON(), function(P, N) {
|
|
1083
|
+
h.setRequestHeader(N, P);
|
|
1084
|
+
}), a.isUndefined(r.withCredentials) || (h.withCredentials = !!r.withCredentials), c && c !== "json" && (h.responseType = r.responseType), l && ([R, p] = Q(l, !0), h.addEventListener("progress", R)), u && h.upload && ([d, w] = Q(u), h.upload.addEventListener("progress", d), h.upload.addEventListener("loadend", w)), (r.cancelToken || r.signal) && (f = (b) => {
|
|
1085
|
+
h && (s(!b || b.type ? new v(null, e, h) : b), h.abort(), h = null);
|
|
1086
|
+
}, r.cancelToken && r.cancelToken.subscribe(f), r.signal && (r.signal.aborted ? f() : r.signal.addEventListener("abort", f)));
|
|
1087
|
+
const y = Nn(r.url);
|
|
1079
1088
|
if (y && A.protocols.indexOf(y) === -1) {
|
|
1080
1089
|
s(new m("Unsupported protocol " + y + ":", m.ERR_BAD_REQUEST, e));
|
|
1081
1090
|
return;
|
|
1082
1091
|
}
|
|
1083
|
-
|
|
1092
|
+
h.send(o || null);
|
|
1084
1093
|
});
|
|
1085
|
-
},
|
|
1094
|
+
}, Dn = (e, t) => {
|
|
1086
1095
|
const { length: n } = e = e ? e.filter(Boolean) : [];
|
|
1087
1096
|
if (t || n) {
|
|
1088
1097
|
let s = new AbortController(), r;
|
|
1089
|
-
const
|
|
1098
|
+
const o = function(l) {
|
|
1090
1099
|
if (!r) {
|
|
1091
1100
|
r = !0, c();
|
|
1092
|
-
const
|
|
1093
|
-
s.abort(
|
|
1101
|
+
const f = l instanceof Error ? l : this.reason;
|
|
1102
|
+
s.abort(f instanceof m ? f : new v(f instanceof Error ? f.message : f));
|
|
1094
1103
|
}
|
|
1095
1104
|
};
|
|
1096
|
-
let
|
|
1097
|
-
|
|
1105
|
+
let i = t && setTimeout(() => {
|
|
1106
|
+
i = null, o(new m(`timeout ${t} of ms exceeded`, m.ETIMEDOUT));
|
|
1098
1107
|
}, t);
|
|
1099
1108
|
const c = () => {
|
|
1100
|
-
e && (
|
|
1101
|
-
|
|
1109
|
+
e && (i && clearTimeout(i), i = null, e.forEach((l) => {
|
|
1110
|
+
l.unsubscribe ? l.unsubscribe(o) : l.removeEventListener("abort", o);
|
|
1102
1111
|
}), e = null);
|
|
1103
1112
|
};
|
|
1104
|
-
e.forEach((
|
|
1105
|
-
const { signal:
|
|
1106
|
-
return
|
|
1113
|
+
e.forEach((l) => l.addEventListener("abort", o));
|
|
1114
|
+
const { signal: u } = s;
|
|
1115
|
+
return u.unsubscribe = () => a.asap(c), u;
|
|
1107
1116
|
}
|
|
1108
|
-
},
|
|
1117
|
+
}, Bn = function* (e, t) {
|
|
1109
1118
|
let n = e.byteLength;
|
|
1110
1119
|
if (n < t) {
|
|
1111
1120
|
yield e;
|
|
@@ -1114,10 +1123,10 @@ const tt = (e) => {
|
|
|
1114
1123
|
let s = 0, r;
|
|
1115
1124
|
for (; s < n; )
|
|
1116
1125
|
r = s + t, yield e.slice(s, r), s = r;
|
|
1117
|
-
},
|
|
1118
|
-
for await (const n of
|
|
1119
|
-
yield*
|
|
1120
|
-
},
|
|
1126
|
+
}, qn = async function* (e, t) {
|
|
1127
|
+
for await (const n of Hn(e))
|
|
1128
|
+
yield* Bn(n, t);
|
|
1129
|
+
}, Hn = async function* (e) {
|
|
1121
1130
|
if (e[Symbol.asyncIterator]) {
|
|
1122
1131
|
yield* e;
|
|
1123
1132
|
return;
|
|
@@ -1133,42 +1142,42 @@ const tt = (e) => {
|
|
|
1133
1142
|
} finally {
|
|
1134
1143
|
await t.cancel();
|
|
1135
1144
|
}
|
|
1136
|
-
},
|
|
1137
|
-
const r =
|
|
1138
|
-
let
|
|
1139
|
-
|
|
1145
|
+
}, Ue = (e, t, n, s) => {
|
|
1146
|
+
const r = qn(e, t);
|
|
1147
|
+
let o = 0, i, c = (u) => {
|
|
1148
|
+
i || (i = !0, s && s(u));
|
|
1140
1149
|
};
|
|
1141
1150
|
return new ReadableStream({
|
|
1142
|
-
async pull(
|
|
1151
|
+
async pull(u) {
|
|
1143
1152
|
try {
|
|
1144
|
-
const { done:
|
|
1145
|
-
if (
|
|
1146
|
-
c(),
|
|
1153
|
+
const { done: l, value: f } = await r.next();
|
|
1154
|
+
if (l) {
|
|
1155
|
+
c(), u.close();
|
|
1147
1156
|
return;
|
|
1148
1157
|
}
|
|
1149
|
-
let d =
|
|
1158
|
+
let d = f.byteLength;
|
|
1150
1159
|
if (n) {
|
|
1151
|
-
let R =
|
|
1160
|
+
let R = o += d;
|
|
1152
1161
|
n(R);
|
|
1153
1162
|
}
|
|
1154
|
-
|
|
1155
|
-
} catch (
|
|
1156
|
-
throw c(
|
|
1163
|
+
u.enqueue(new Uint8Array(f));
|
|
1164
|
+
} catch (l) {
|
|
1165
|
+
throw c(l), l;
|
|
1157
1166
|
}
|
|
1158
1167
|
},
|
|
1159
|
-
cancel(
|
|
1160
|
-
return c(
|
|
1168
|
+
cancel(u) {
|
|
1169
|
+
return c(u), r.return();
|
|
1161
1170
|
}
|
|
1162
1171
|
}, {
|
|
1163
1172
|
highWaterMark: 2
|
|
1164
1173
|
});
|
|
1165
|
-
}, ie = typeof fetch == "function" && typeof Request == "function" && typeof Response == "function",
|
|
1174
|
+
}, ie = typeof fetch == "function" && typeof Request == "function" && typeof Response == "function", st = ie && typeof ReadableStream == "function", Mn = ie && (typeof TextEncoder == "function" ? /* @__PURE__ */ ((e) => (t) => e.encode(t))(new TextEncoder()) : async (e) => new Uint8Array(await new Response(e).arrayBuffer())), rt = (e, ...t) => {
|
|
1166
1175
|
try {
|
|
1167
1176
|
return !!e(...t);
|
|
1168
1177
|
} catch {
|
|
1169
1178
|
return !1;
|
|
1170
1179
|
}
|
|
1171
|
-
},
|
|
1180
|
+
}, jn = st && rt(() => {
|
|
1172
1181
|
let e = !1;
|
|
1173
1182
|
const t = new Request(A.origin, {
|
|
1174
1183
|
body: new ReadableStream(),
|
|
@@ -1178,8 +1187,8 @@ const tt = (e) => {
|
|
|
1178
1187
|
}
|
|
1179
1188
|
}).headers.has("Content-Type");
|
|
1180
1189
|
return e && !t;
|
|
1181
|
-
}),
|
|
1182
|
-
stream:
|
|
1190
|
+
}), xe = 64 * 1024, he = st && rt(() => a.isReadableStream(new Response("").body)), ee = {
|
|
1191
|
+
stream: he && ((e) => e.body)
|
|
1183
1192
|
};
|
|
1184
1193
|
ie && ((e) => {
|
|
1185
1194
|
["text", "arrayBuffer", "blob", "formData", "stream"].forEach((t) => {
|
|
@@ -1188,7 +1197,7 @@ ie && ((e) => {
|
|
|
1188
1197
|
});
|
|
1189
1198
|
});
|
|
1190
1199
|
})(new Response());
|
|
1191
|
-
const
|
|
1200
|
+
const Gn = async (e) => {
|
|
1192
1201
|
if (e == null)
|
|
1193
1202
|
return 0;
|
|
1194
1203
|
if (a.isBlob(e))
|
|
@@ -1201,99 +1210,99 @@ const Hn = async (e) => {
|
|
|
1201
1210
|
if (a.isArrayBufferView(e) || a.isArrayBuffer(e))
|
|
1202
1211
|
return e.byteLength;
|
|
1203
1212
|
if (a.isURLSearchParams(e) && (e = e + ""), a.isString(e))
|
|
1204
|
-
return (await
|
|
1205
|
-
},
|
|
1213
|
+
return (await Mn(e)).byteLength;
|
|
1214
|
+
}, zn = async (e, t) => {
|
|
1206
1215
|
const n = a.toFiniteNumber(e.getContentLength());
|
|
1207
|
-
return n ??
|
|
1208
|
-
},
|
|
1216
|
+
return n ?? Gn(t);
|
|
1217
|
+
}, vn = ie && (async (e) => {
|
|
1209
1218
|
let {
|
|
1210
1219
|
url: t,
|
|
1211
1220
|
method: n,
|
|
1212
1221
|
data: s,
|
|
1213
1222
|
signal: r,
|
|
1214
|
-
cancelToken:
|
|
1215
|
-
timeout:
|
|
1223
|
+
cancelToken: o,
|
|
1224
|
+
timeout: i,
|
|
1216
1225
|
onDownloadProgress: c,
|
|
1217
|
-
onUploadProgress:
|
|
1218
|
-
responseType:
|
|
1219
|
-
headers:
|
|
1226
|
+
onUploadProgress: u,
|
|
1227
|
+
responseType: l,
|
|
1228
|
+
headers: f,
|
|
1220
1229
|
withCredentials: d = "same-origin",
|
|
1221
1230
|
fetchOptions: R
|
|
1222
|
-
} =
|
|
1223
|
-
|
|
1224
|
-
let w =
|
|
1231
|
+
} = nt(e);
|
|
1232
|
+
l = l ? (l + "").toLowerCase() : "text";
|
|
1233
|
+
let w = Dn([r, o && o.toAbortSignal()], i), p;
|
|
1225
1234
|
const E = w && w.unsubscribe && (() => {
|
|
1226
1235
|
w.unsubscribe();
|
|
1227
1236
|
});
|
|
1228
|
-
let
|
|
1237
|
+
let h;
|
|
1229
1238
|
try {
|
|
1230
|
-
if (
|
|
1239
|
+
if (u && jn && n !== "get" && n !== "head" && (h = await zn(f, s)) !== 0) {
|
|
1231
1240
|
let N = new Request(t, {
|
|
1232
1241
|
method: "POST",
|
|
1233
1242
|
body: s,
|
|
1234
1243
|
duplex: "half"
|
|
1235
1244
|
}), D;
|
|
1236
|
-
if (a.isFormData(s) && (D = N.headers.get("content-type")) &&
|
|
1237
|
-
const [B, W] =
|
|
1238
|
-
|
|
1239
|
-
Q(
|
|
1245
|
+
if (a.isFormData(s) && (D = N.headers.get("content-type")) && f.setContentType(D), N.body) {
|
|
1246
|
+
const [B, W] = Ce(
|
|
1247
|
+
h,
|
|
1248
|
+
Q(Ie(u))
|
|
1240
1249
|
);
|
|
1241
|
-
s =
|
|
1250
|
+
s = Ue(N.body, xe, B, W);
|
|
1242
1251
|
}
|
|
1243
1252
|
}
|
|
1244
1253
|
a.isString(d) || (d = d ? "include" : "omit");
|
|
1245
1254
|
const S = "credentials" in Request.prototype;
|
|
1246
|
-
|
|
1255
|
+
p = new Request(t, {
|
|
1247
1256
|
...R,
|
|
1248
1257
|
signal: w,
|
|
1249
1258
|
method: n.toUpperCase(),
|
|
1250
|
-
headers:
|
|
1259
|
+
headers: f.normalize().toJSON(),
|
|
1251
1260
|
body: s,
|
|
1252
1261
|
duplex: "half",
|
|
1253
1262
|
credentials: S ? d : void 0
|
|
1254
1263
|
});
|
|
1255
|
-
let y = await fetch(
|
|
1256
|
-
const b =
|
|
1257
|
-
if (
|
|
1264
|
+
let y = await fetch(p);
|
|
1265
|
+
const b = he && (l === "stream" || l === "response");
|
|
1266
|
+
if (he && (c || b && E)) {
|
|
1258
1267
|
const N = {};
|
|
1259
|
-
["status", "statusText", "headers"].forEach((
|
|
1260
|
-
N[
|
|
1268
|
+
["status", "statusText", "headers"].forEach((ye) => {
|
|
1269
|
+
N[ye] = y[ye];
|
|
1261
1270
|
});
|
|
1262
|
-
const D = a.toFiniteNumber(y.headers.get("content-length")), [B, W] = c &&
|
|
1271
|
+
const D = a.toFiniteNumber(y.headers.get("content-length")), [B, W] = c && Ce(
|
|
1263
1272
|
D,
|
|
1264
|
-
Q(
|
|
1273
|
+
Q(Ie(c), !0)
|
|
1265
1274
|
) || [];
|
|
1266
1275
|
y = new Response(
|
|
1267
|
-
|
|
1276
|
+
Ue(y.body, xe, B, () => {
|
|
1268
1277
|
W && W(), E && E();
|
|
1269
1278
|
}),
|
|
1270
1279
|
N
|
|
1271
1280
|
);
|
|
1272
1281
|
}
|
|
1273
|
-
|
|
1274
|
-
let P = await ee[a.findKey(ee,
|
|
1282
|
+
l = l || "text";
|
|
1283
|
+
let P = await ee[a.findKey(ee, l) || "text"](y, e);
|
|
1275
1284
|
return !b && E && E(), await new Promise((N, D) => {
|
|
1276
|
-
|
|
1285
|
+
et(N, D, {
|
|
1277
1286
|
data: P,
|
|
1278
1287
|
headers: k.from(y.headers),
|
|
1279
1288
|
status: y.status,
|
|
1280
1289
|
statusText: y.statusText,
|
|
1281
1290
|
config: e,
|
|
1282
|
-
request:
|
|
1291
|
+
request: p
|
|
1283
1292
|
});
|
|
1284
1293
|
});
|
|
1285
1294
|
} catch (S) {
|
|
1286
1295
|
throw E && E(), S && S.name === "TypeError" && /Load failed|fetch/i.test(S.message) ? Object.assign(
|
|
1287
|
-
new m("Network Error", m.ERR_NETWORK, e,
|
|
1296
|
+
new m("Network Error", m.ERR_NETWORK, e, p),
|
|
1288
1297
|
{
|
|
1289
1298
|
cause: S.cause || S
|
|
1290
1299
|
}
|
|
1291
|
-
) : m.from(S, S && S.code, e,
|
|
1300
|
+
) : m.from(S, S && S.code, e, p);
|
|
1292
1301
|
}
|
|
1293
1302
|
}), me = {
|
|
1294
|
-
http:
|
|
1295
|
-
xhr:
|
|
1296
|
-
fetch:
|
|
1303
|
+
http: rn,
|
|
1304
|
+
xhr: Fn,
|
|
1305
|
+
fetch: vn
|
|
1297
1306
|
};
|
|
1298
1307
|
a.forEach(me, (e, t) => {
|
|
1299
1308
|
if (e) {
|
|
@@ -1304,30 +1313,30 @@ a.forEach(me, (e, t) => {
|
|
|
1304
1313
|
Object.defineProperty(e, "adapterName", { value: t });
|
|
1305
1314
|
}
|
|
1306
1315
|
});
|
|
1307
|
-
const
|
|
1316
|
+
const Le = (e) => `- ${e}`, $n = (e) => a.isFunction(e) || e === null || e === !1, ot = {
|
|
1308
1317
|
getAdapter: (e) => {
|
|
1309
1318
|
e = a.isArray(e) ? e : [e];
|
|
1310
1319
|
const { length: t } = e;
|
|
1311
1320
|
let n, s;
|
|
1312
1321
|
const r = {};
|
|
1313
|
-
for (let
|
|
1314
|
-
n = e[
|
|
1315
|
-
let
|
|
1316
|
-
if (s = n,
|
|
1317
|
-
throw new m(`Unknown adapter '${
|
|
1322
|
+
for (let o = 0; o < t; o++) {
|
|
1323
|
+
n = e[o];
|
|
1324
|
+
let i;
|
|
1325
|
+
if (s = n, !$n(n) && (s = me[(i = String(n)).toLowerCase()], s === void 0))
|
|
1326
|
+
throw new m(`Unknown adapter '${i}'`);
|
|
1318
1327
|
if (s)
|
|
1319
1328
|
break;
|
|
1320
|
-
r[
|
|
1329
|
+
r[i || "#" + o] = s;
|
|
1321
1330
|
}
|
|
1322
1331
|
if (!s) {
|
|
1323
|
-
const
|
|
1324
|
-
([c,
|
|
1332
|
+
const o = Object.entries(r).map(
|
|
1333
|
+
([c, u]) => `adapter ${c} ` + (u === !1 ? "is not supported by the environment" : "is not available in the build")
|
|
1325
1334
|
);
|
|
1326
|
-
let
|
|
1327
|
-
` +
|
|
1328
|
-
`) : " " +
|
|
1335
|
+
let i = t ? o.length > 1 ? `since :
|
|
1336
|
+
` + o.map(Le).join(`
|
|
1337
|
+
`) : " " + Le(o[0]) : "as no adapter specified";
|
|
1329
1338
|
throw new m(
|
|
1330
|
-
"There is no suitable adapter to dispatch the request " +
|
|
1339
|
+
"There is no suitable adapter to dispatch the request " + i,
|
|
1331
1340
|
"ERR_NOT_SUPPORT"
|
|
1332
1341
|
);
|
|
1333
1342
|
}
|
|
@@ -1337,80 +1346,80 @@ const xe = (e) => `- ${e}`, Gn = (e) => a.isFunction(e) || e === null || e === !
|
|
|
1337
1346
|
};
|
|
1338
1347
|
function le(e) {
|
|
1339
1348
|
if (e.cancelToken && e.cancelToken.throwIfRequested(), e.signal && e.signal.aborted)
|
|
1340
|
-
throw new
|
|
1349
|
+
throw new v(null, e);
|
|
1341
1350
|
}
|
|
1342
|
-
function
|
|
1351
|
+
function Pe(e) {
|
|
1343
1352
|
return le(e), e.headers = k.from(e.headers), e.data = ue.call(
|
|
1344
1353
|
e,
|
|
1345
1354
|
e.transformRequest
|
|
1346
|
-
), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1),
|
|
1355
|
+
), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), ot.getAdapter(e.adapter || J.adapter)(e).then(function(s) {
|
|
1347
1356
|
return le(e), s.data = ue.call(
|
|
1348
1357
|
e,
|
|
1349
1358
|
e.transformResponse,
|
|
1350
1359
|
s
|
|
1351
1360
|
), s.headers = k.from(s.headers), s;
|
|
1352
1361
|
}, function(s) {
|
|
1353
|
-
return
|
|
1362
|
+
return Qe(s) || (le(e), s && s.response && (s.response.data = ue.call(
|
|
1354
1363
|
e,
|
|
1355
1364
|
e.transformResponse,
|
|
1356
1365
|
s.response
|
|
1357
1366
|
), s.response.headers = k.from(s.response.headers))), Promise.reject(s);
|
|
1358
1367
|
});
|
|
1359
1368
|
}
|
|
1360
|
-
const
|
|
1369
|
+
const it = "1.9.0", ae = {};
|
|
1361
1370
|
["object", "boolean", "number", "function", "string", "symbol"].forEach((e, t) => {
|
|
1362
1371
|
ae[e] = function(s) {
|
|
1363
1372
|
return typeof s === e || "a" + (t < 1 ? "n " : " ") + e;
|
|
1364
1373
|
};
|
|
1365
1374
|
});
|
|
1366
|
-
const
|
|
1375
|
+
const Fe = {};
|
|
1367
1376
|
ae.transitional = function(t, n, s) {
|
|
1368
|
-
function r(
|
|
1369
|
-
return "[Axios v" +
|
|
1377
|
+
function r(o, i) {
|
|
1378
|
+
return "[Axios v" + it + "] Transitional option '" + o + "'" + i + (s ? ". " + s : "");
|
|
1370
1379
|
}
|
|
1371
|
-
return (
|
|
1380
|
+
return (o, i, c) => {
|
|
1372
1381
|
if (t === !1)
|
|
1373
1382
|
throw new m(
|
|
1374
|
-
r(
|
|
1383
|
+
r(i, " has been removed" + (n ? " in " + n : "")),
|
|
1375
1384
|
m.ERR_DEPRECATED
|
|
1376
1385
|
);
|
|
1377
|
-
return n && !
|
|
1386
|
+
return n && !Fe[i] && (Fe[i] = !0, console.warn(
|
|
1378
1387
|
r(
|
|
1379
|
-
|
|
1388
|
+
i,
|
|
1380
1389
|
" has been deprecated since v" + n + " and will be removed in the near future"
|
|
1381
1390
|
)
|
|
1382
|
-
)), t ? t(
|
|
1391
|
+
)), t ? t(o, i, c) : !0;
|
|
1383
1392
|
};
|
|
1384
1393
|
};
|
|
1385
1394
|
ae.spelling = function(t) {
|
|
1386
1395
|
return (n, s) => (console.warn(`${s} is likely a misspelling of ${t}`), !0);
|
|
1387
1396
|
};
|
|
1388
|
-
function
|
|
1397
|
+
function Kn(e, t, n) {
|
|
1389
1398
|
if (typeof e != "object")
|
|
1390
1399
|
throw new m("options must be an object", m.ERR_BAD_OPTION_VALUE);
|
|
1391
1400
|
const s = Object.keys(e);
|
|
1392
1401
|
let r = s.length;
|
|
1393
1402
|
for (; r-- > 0; ) {
|
|
1394
|
-
const
|
|
1395
|
-
if (
|
|
1396
|
-
const c = e[
|
|
1397
|
-
if (
|
|
1398
|
-
throw new m("option " +
|
|
1403
|
+
const o = s[r], i = t[o];
|
|
1404
|
+
if (i) {
|
|
1405
|
+
const c = e[o], u = c === void 0 || i(c, o, e);
|
|
1406
|
+
if (u !== !0)
|
|
1407
|
+
throw new m("option " + o + " must be " + u, m.ERR_BAD_OPTION_VALUE);
|
|
1399
1408
|
continue;
|
|
1400
1409
|
}
|
|
1401
1410
|
if (n !== !0)
|
|
1402
|
-
throw new m("Unknown option " +
|
|
1411
|
+
throw new m("Unknown option " + o, m.ERR_BAD_OPTION);
|
|
1403
1412
|
}
|
|
1404
1413
|
}
|
|
1405
1414
|
const Z = {
|
|
1406
|
-
assertOptions:
|
|
1415
|
+
assertOptions: Kn,
|
|
1407
1416
|
validators: ae
|
|
1408
1417
|
}, L = Z.validators;
|
|
1409
1418
|
let M = class {
|
|
1410
1419
|
constructor(t) {
|
|
1411
1420
|
this.defaults = t || {}, this.interceptors = {
|
|
1412
|
-
request: new
|
|
1413
|
-
response: new
|
|
1421
|
+
request: new _e(),
|
|
1422
|
+
response: new _e()
|
|
1414
1423
|
};
|
|
1415
1424
|
}
|
|
1416
1425
|
/**
|
|
@@ -1428,10 +1437,10 @@ let M = class {
|
|
|
1428
1437
|
if (s instanceof Error) {
|
|
1429
1438
|
let r = {};
|
|
1430
1439
|
Error.captureStackTrace ? Error.captureStackTrace(r) : r = new Error();
|
|
1431
|
-
const
|
|
1440
|
+
const o = r.stack ? r.stack.replace(/^.+\n/, "") : "";
|
|
1432
1441
|
try {
|
|
1433
|
-
s.stack ?
|
|
1434
|
-
` +
|
|
1442
|
+
s.stack ? o && !String(s.stack).endsWith(o.replace(/^.+\n.+\n/, "")) && (s.stack += `
|
|
1443
|
+
` + o) : s.stack = o;
|
|
1435
1444
|
} catch {
|
|
1436
1445
|
}
|
|
1437
1446
|
}
|
|
@@ -1440,7 +1449,7 @@ let M = class {
|
|
|
1440
1449
|
}
|
|
1441
1450
|
_request(t, n) {
|
|
1442
1451
|
typeof t == "string" ? (n = n || {}, n.url = t) : n = t || {}, n = j(this.defaults, n);
|
|
1443
|
-
const { transitional: s, paramsSerializer: r, headers:
|
|
1452
|
+
const { transitional: s, paramsSerializer: r, headers: o } = n;
|
|
1444
1453
|
s !== void 0 && Z.assertOptions(s, {
|
|
1445
1454
|
silentJSONParsing: L.transitional(L.boolean),
|
|
1446
1455
|
forcedJSONParsing: L.transitional(L.boolean),
|
|
@@ -1454,56 +1463,56 @@ let M = class {
|
|
|
1454
1463
|
baseUrl: L.spelling("baseURL"),
|
|
1455
1464
|
withXsrfToken: L.spelling("withXSRFToken")
|
|
1456
1465
|
}, !0), n.method = (n.method || this.defaults.method || "get").toLowerCase();
|
|
1457
|
-
let
|
|
1458
|
-
|
|
1459
|
-
|
|
1466
|
+
let i = o && a.merge(
|
|
1467
|
+
o.common,
|
|
1468
|
+
o[n.method]
|
|
1460
1469
|
);
|
|
1461
|
-
|
|
1470
|
+
o && a.forEach(
|
|
1462
1471
|
["delete", "get", "head", "post", "put", "patch", "common"],
|
|
1463
|
-
(
|
|
1464
|
-
delete
|
|
1472
|
+
(p) => {
|
|
1473
|
+
delete o[p];
|
|
1465
1474
|
}
|
|
1466
|
-
), n.headers = k.concat(
|
|
1475
|
+
), n.headers = k.concat(i, o);
|
|
1467
1476
|
const c = [];
|
|
1468
|
-
let
|
|
1477
|
+
let u = !0;
|
|
1469
1478
|
this.interceptors.request.forEach(function(E) {
|
|
1470
|
-
typeof E.runWhen == "function" && E.runWhen(n) === !1 || (
|
|
1479
|
+
typeof E.runWhen == "function" && E.runWhen(n) === !1 || (u = u && E.synchronous, c.unshift(E.fulfilled, E.rejected));
|
|
1471
1480
|
});
|
|
1472
|
-
const
|
|
1481
|
+
const l = [];
|
|
1473
1482
|
this.interceptors.response.forEach(function(E) {
|
|
1474
|
-
|
|
1483
|
+
l.push(E.fulfilled, E.rejected);
|
|
1475
1484
|
});
|
|
1476
|
-
let
|
|
1477
|
-
if (!
|
|
1478
|
-
const
|
|
1479
|
-
for (
|
|
1480
|
-
|
|
1481
|
-
return
|
|
1485
|
+
let f, d = 0, R;
|
|
1486
|
+
if (!u) {
|
|
1487
|
+
const p = [Pe.bind(this), void 0];
|
|
1488
|
+
for (p.unshift.apply(p, c), p.push.apply(p, l), R = p.length, f = Promise.resolve(n); d < R; )
|
|
1489
|
+
f = f.then(p[d++], p[d++]);
|
|
1490
|
+
return f;
|
|
1482
1491
|
}
|
|
1483
1492
|
R = c.length;
|
|
1484
1493
|
let w = n;
|
|
1485
1494
|
for (d = 0; d < R; ) {
|
|
1486
|
-
const
|
|
1495
|
+
const p = c[d++], E = c[d++];
|
|
1487
1496
|
try {
|
|
1488
|
-
w =
|
|
1489
|
-
} catch (
|
|
1490
|
-
E.call(this,
|
|
1497
|
+
w = p(w);
|
|
1498
|
+
} catch (h) {
|
|
1499
|
+
E.call(this, h);
|
|
1491
1500
|
break;
|
|
1492
1501
|
}
|
|
1493
1502
|
}
|
|
1494
1503
|
try {
|
|
1495
|
-
|
|
1496
|
-
} catch (
|
|
1497
|
-
return Promise.reject(
|
|
1504
|
+
f = Pe.call(this, w);
|
|
1505
|
+
} catch (p) {
|
|
1506
|
+
return Promise.reject(p);
|
|
1498
1507
|
}
|
|
1499
|
-
for (d = 0, R =
|
|
1500
|
-
|
|
1501
|
-
return
|
|
1508
|
+
for (d = 0, R = l.length; d < R; )
|
|
1509
|
+
f = f.then(l[d++], l[d++]);
|
|
1510
|
+
return f;
|
|
1502
1511
|
}
|
|
1503
1512
|
getUri(t) {
|
|
1504
1513
|
t = j(this.defaults, t);
|
|
1505
|
-
const n =
|
|
1506
|
-
return
|
|
1514
|
+
const n = tt(t.baseURL, t.url, t.allowAbsoluteUrls);
|
|
1515
|
+
return Xe(n, t.params, t.paramsSerializer);
|
|
1507
1516
|
}
|
|
1508
1517
|
};
|
|
1509
1518
|
a.forEach(["delete", "get", "head", "options"], function(t) {
|
|
@@ -1517,44 +1526,44 @@ a.forEach(["delete", "get", "head", "options"], function(t) {
|
|
|
1517
1526
|
});
|
|
1518
1527
|
a.forEach(["post", "put", "patch"], function(t) {
|
|
1519
1528
|
function n(s) {
|
|
1520
|
-
return function(
|
|
1529
|
+
return function(o, i, c) {
|
|
1521
1530
|
return this.request(j(c || {}, {
|
|
1522
1531
|
method: t,
|
|
1523
1532
|
headers: s ? {
|
|
1524
1533
|
"Content-Type": "multipart/form-data"
|
|
1525
1534
|
} : {},
|
|
1526
|
-
url:
|
|
1527
|
-
data:
|
|
1535
|
+
url: o,
|
|
1536
|
+
data: i
|
|
1528
1537
|
}));
|
|
1529
1538
|
};
|
|
1530
1539
|
}
|
|
1531
1540
|
M.prototype[t] = n(), M.prototype[t + "Form"] = n(!0);
|
|
1532
1541
|
});
|
|
1533
|
-
let
|
|
1542
|
+
let Vn = class at {
|
|
1534
1543
|
constructor(t) {
|
|
1535
1544
|
if (typeof t != "function")
|
|
1536
1545
|
throw new TypeError("executor must be a function.");
|
|
1537
1546
|
let n;
|
|
1538
|
-
this.promise = new Promise(function(
|
|
1539
|
-
n =
|
|
1547
|
+
this.promise = new Promise(function(o) {
|
|
1548
|
+
n = o;
|
|
1540
1549
|
});
|
|
1541
1550
|
const s = this;
|
|
1542
1551
|
this.promise.then((r) => {
|
|
1543
1552
|
if (!s._listeners) return;
|
|
1544
|
-
let
|
|
1545
|
-
for (;
|
|
1546
|
-
s._listeners[
|
|
1553
|
+
let o = s._listeners.length;
|
|
1554
|
+
for (; o-- > 0; )
|
|
1555
|
+
s._listeners[o](r);
|
|
1547
1556
|
s._listeners = null;
|
|
1548
1557
|
}), this.promise.then = (r) => {
|
|
1549
|
-
let
|
|
1550
|
-
const
|
|
1551
|
-
s.subscribe(c),
|
|
1558
|
+
let o;
|
|
1559
|
+
const i = new Promise((c) => {
|
|
1560
|
+
s.subscribe(c), o = c;
|
|
1552
1561
|
}).then(r);
|
|
1553
|
-
return
|
|
1554
|
-
s.unsubscribe(
|
|
1555
|
-
},
|
|
1556
|
-
}, t(function(
|
|
1557
|
-
s.reason || (s.reason = new
|
|
1562
|
+
return i.cancel = function() {
|
|
1563
|
+
s.unsubscribe(o);
|
|
1564
|
+
}, i;
|
|
1565
|
+
}, t(function(o, i, c) {
|
|
1566
|
+
s.reason || (s.reason = new v(o, i, c), n(s.reason));
|
|
1558
1567
|
});
|
|
1559
1568
|
}
|
|
1560
1569
|
/**
|
|
@@ -1596,19 +1605,19 @@ let Kn = class it {
|
|
|
1596
1605
|
static source() {
|
|
1597
1606
|
let t;
|
|
1598
1607
|
return {
|
|
1599
|
-
token: new
|
|
1608
|
+
token: new at(function(r) {
|
|
1600
1609
|
t = r;
|
|
1601
1610
|
}),
|
|
1602
1611
|
cancel: t
|
|
1603
1612
|
};
|
|
1604
1613
|
}
|
|
1605
1614
|
};
|
|
1606
|
-
function
|
|
1615
|
+
function Jn(e) {
|
|
1607
1616
|
return function(n) {
|
|
1608
1617
|
return e.apply(null, n);
|
|
1609
1618
|
};
|
|
1610
1619
|
}
|
|
1611
|
-
function
|
|
1620
|
+
function Wn(e) {
|
|
1612
1621
|
return a.isObject(e) && e.isAxiosError === !0;
|
|
1613
1622
|
}
|
|
1614
1623
|
const Ee = {
|
|
@@ -1679,84 +1688,86 @@ const Ee = {
|
|
|
1679
1688
|
Object.entries(Ee).forEach(([e, t]) => {
|
|
1680
1689
|
Ee[t] = e;
|
|
1681
1690
|
});
|
|
1682
|
-
function
|
|
1683
|
-
const t = new M(e), n =
|
|
1691
|
+
function ct(e) {
|
|
1692
|
+
const t = new M(e), n = qe(M.prototype.request, t);
|
|
1684
1693
|
return a.extend(n, M.prototype, t, { allOwnKeys: !0 }), a.extend(n, t, null, { allOwnKeys: !0 }), n.create = function(r) {
|
|
1685
|
-
return
|
|
1694
|
+
return ct(j(e, r));
|
|
1686
1695
|
}, n;
|
|
1687
1696
|
}
|
|
1688
|
-
const g =
|
|
1697
|
+
const g = ct(J);
|
|
1689
1698
|
g.Axios = M;
|
|
1690
|
-
g.CanceledError =
|
|
1691
|
-
g.CancelToken =
|
|
1692
|
-
g.isCancel =
|
|
1693
|
-
g.VERSION =
|
|
1699
|
+
g.CanceledError = v;
|
|
1700
|
+
g.CancelToken = Vn;
|
|
1701
|
+
g.isCancel = Qe;
|
|
1702
|
+
g.VERSION = it;
|
|
1694
1703
|
g.toFormData = oe;
|
|
1695
1704
|
g.AxiosError = m;
|
|
1696
1705
|
g.Cancel = g.CanceledError;
|
|
1697
1706
|
g.all = function(t) {
|
|
1698
1707
|
return Promise.all(t);
|
|
1699
1708
|
};
|
|
1700
|
-
g.spread =
|
|
1701
|
-
g.isAxiosError =
|
|
1709
|
+
g.spread = Jn;
|
|
1710
|
+
g.isAxiosError = Wn;
|
|
1702
1711
|
g.mergeConfig = j;
|
|
1703
1712
|
g.AxiosHeaders = k;
|
|
1704
|
-
g.formToJSON = (e) =>
|
|
1705
|
-
g.getAdapter =
|
|
1713
|
+
g.formToJSON = (e) => Ze(a.isHTMLForm(e) ? new FormData(e) : e);
|
|
1714
|
+
g.getAdapter = ot.getAdapter;
|
|
1706
1715
|
g.HttpStatusCode = Ee;
|
|
1707
1716
|
g.default = g;
|
|
1708
1717
|
const {
|
|
1709
|
-
Axios:
|
|
1710
|
-
AxiosError:
|
|
1711
|
-
CanceledError:
|
|
1712
|
-
isCancel:
|
|
1713
|
-
CancelToken:
|
|
1714
|
-
VERSION:
|
|
1715
|
-
all:
|
|
1716
|
-
Cancel:
|
|
1717
|
-
isAxiosError:
|
|
1718
|
-
spread:
|
|
1719
|
-
toFormData:
|
|
1720
|
-
AxiosHeaders:
|
|
1718
|
+
Axios: Ns,
|
|
1719
|
+
AxiosError: Xn,
|
|
1720
|
+
CanceledError: Cs,
|
|
1721
|
+
isCancel: Is,
|
|
1722
|
+
CancelToken: ks,
|
|
1723
|
+
VERSION: Us,
|
|
1724
|
+
all: xs,
|
|
1725
|
+
Cancel: Ls,
|
|
1726
|
+
isAxiosError: Ps,
|
|
1727
|
+
spread: Fs,
|
|
1728
|
+
toFormData: Ds,
|
|
1729
|
+
AxiosHeaders: Bs,
|
|
1721
1730
|
HttpStatusCode: F,
|
|
1722
|
-
formToJSON:
|
|
1723
|
-
getAdapter:
|
|
1724
|
-
mergeConfig:
|
|
1725
|
-
} = g,
|
|
1731
|
+
formToJSON: qs,
|
|
1732
|
+
getAdapter: Hs,
|
|
1733
|
+
mergeConfig: Ms
|
|
1734
|
+
} = g, ut = (e) => (e.baseURL = Be(), e.headers.Authorization = localStorage.getItem(C.TOKEN), e.headers["client-id"] = localStorage.getItem(C.CLIENT_ID), e.metadata = { startTime: /* @__PURE__ */ new Date() }, { ...e }), Yn = (e) => (e.baseURL = pt(), e.headers.Authorization = localStorage.getItem(C.TOKEN), e.headers["client-id"] = localStorage.getItem(C.CLIENT_ID), e.headers["x-override-url"] = localStorage.getItem(
|
|
1735
|
+
C.OVERRIDE_PAC_ENDPOINT
|
|
1736
|
+
), e.headers["Api-Version"] = "1.0", e.metadata = { startTime: /* @__PURE__ */ new Date() }, { ...e }), js = (e, t, n) => {
|
|
1726
1737
|
for (const s of e)
|
|
1727
1738
|
t ? s.rej(t) : s.res(n);
|
|
1728
|
-
},
|
|
1739
|
+
}, Zn = async (e) => new Promise((t, n) => {
|
|
1729
1740
|
setTimeout(t, e);
|
|
1730
|
-
}),
|
|
1731
|
-
var r,
|
|
1741
|
+
}), Qn = async (e, t) => (await Zn(t), e()), De = (e, t) => {
|
|
1742
|
+
var r, o;
|
|
1732
1743
|
let n = "", s = t;
|
|
1733
|
-
typeof t == "string" ? n = t : t instanceof
|
|
1744
|
+
typeof t == "string" ? n = t : t instanceof Xn ? (n = t.message, s = {
|
|
1734
1745
|
message: t.message,
|
|
1735
1746
|
cause: t.cause,
|
|
1736
1747
|
status: t.status,
|
|
1737
1748
|
data: (r = t == null ? void 0 : t.response) == null ? void 0 : r.data
|
|
1738
|
-
}) : n = t.message, (
|
|
1749
|
+
}) : n = t.message, (o = window.parent) == null || o.postMessage(
|
|
1739
1750
|
{ type: "auth_error", details: { message: n, action: e, info: s } },
|
|
1740
1751
|
"*"
|
|
1741
1752
|
);
|
|
1742
|
-
},
|
|
1743
|
-
var
|
|
1744
|
-
const s = e.config, r = localStorage.getItem(C.REFRESH_TOKEN),
|
|
1753
|
+
}, lt = async (e, t, n) => {
|
|
1754
|
+
var i, c, u;
|
|
1755
|
+
const s = e.config, r = localStorage.getItem(C.REFRESH_TOKEN), o = ((i = e.response) == null ? void 0 : i.status) || F.InternalServerError;
|
|
1745
1756
|
if (!s || s.__retries === t)
|
|
1746
1757
|
throw e;
|
|
1747
|
-
if (
|
|
1758
|
+
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) {
|
|
1748
1759
|
if (!r)
|
|
1749
|
-
throw
|
|
1760
|
+
throw De(
|
|
1750
1761
|
"refresh_token",
|
|
1751
1762
|
"no refresh token found to reauthenticate user"
|
|
1752
1763
|
), e;
|
|
1753
1764
|
try {
|
|
1754
|
-
const { token:
|
|
1755
|
-
return (c = s.url) != null && c.includes(T.EXCHANGE_TOKEN) &&
|
|
1756
|
-
} catch (
|
|
1757
|
-
if (!((
|
|
1758
|
-
const
|
|
1759
|
-
|
|
1765
|
+
const { token: l, data: f } = await rs.refreshAccessToken();
|
|
1766
|
+
return (c = s.url) != null && c.includes(T.EXCHANGE_TOKEN) && f && "id_token" in f && (s.data = JSON.stringify({ idToken: f.id_token })), s.headers && (s.headers.Authorization = `Bearer ${l}`), n(s);
|
|
1767
|
+
} catch (l) {
|
|
1768
|
+
if (!((u = s == null ? void 0 : s.url) != null && u.includes(T.EXCHANGE_TOKEN))) {
|
|
1769
|
+
const f = l instanceof Error ? l.message : "Unable to refresh access token.";
|
|
1770
|
+
De("refresh_token", f);
|
|
1760
1771
|
}
|
|
1761
1772
|
throw e;
|
|
1762
1773
|
}
|
|
@@ -1769,25 +1780,25 @@ const {
|
|
|
1769
1780
|
F.Conflict,
|
|
1770
1781
|
F.NotFound,
|
|
1771
1782
|
F.UnprocessableEntity
|
|
1772
|
-
].includes(
|
|
1783
|
+
].includes(o) || (s.__retries || (s.__retries = 0), s.__retries += 1, s.__retries > t))
|
|
1773
1784
|
throw e;
|
|
1774
|
-
return
|
|
1785
|
+
return Qn(
|
|
1775
1786
|
() => n(s),
|
|
1776
1787
|
Math.pow(10, s.__retries + 1) / 2
|
|
1777
1788
|
// Exponential backoff 50ms, 500ms, 5000ms
|
|
1778
1789
|
);
|
|
1779
|
-
},
|
|
1780
|
-
|
|
1790
|
+
}, es = g.create();
|
|
1791
|
+
es.interceptors.request.use((e) => (e.baseURL = Be(), e.headers.Authorization = localStorage.getItem(C.TOKEN), e.metadata = { startTime: /* @__PURE__ */ new Date() }, { ...e }));
|
|
1781
1792
|
const _ = g.create();
|
|
1782
|
-
_.interceptors.request.use((e) => (e =
|
|
1783
|
-
const
|
|
1784
|
-
|
|
1785
|
-
const
|
|
1793
|
+
_.interceptors.request.use((e) => (e = ut(e), e));
|
|
1794
|
+
const ts = g.create();
|
|
1795
|
+
ts.interceptors.request.use((e) => (e = Yn(e), e));
|
|
1796
|
+
const ns = 3;
|
|
1786
1797
|
_.interceptors.response.use(
|
|
1787
1798
|
null,
|
|
1788
|
-
(e) =>
|
|
1799
|
+
(e) => lt(e, ns, _)
|
|
1789
1800
|
);
|
|
1790
|
-
class
|
|
1801
|
+
class ss {
|
|
1791
1802
|
constructor() {
|
|
1792
1803
|
O(this, "isRefreshingAccessToken", !1);
|
|
1793
1804
|
O(this, "refreshAccessTokenQueue", []);
|
|
@@ -1803,24 +1814,26 @@ class ns {
|
|
|
1803
1814
|
* @returns A promise that resolves to a service response containing authentication data.
|
|
1804
1815
|
*/
|
|
1805
1816
|
O(this, "login", async (t) => {
|
|
1806
|
-
var n, s, r
|
|
1817
|
+
var n, s, r;
|
|
1807
1818
|
try {
|
|
1808
1819
|
const { data: o } = await _.post(T.SIGN_IN, {
|
|
1809
1820
|
email_address: t.email,
|
|
1810
1821
|
password: t.password
|
|
1811
|
-
}),
|
|
1822
|
+
}), i = await G.ensureQueryData({
|
|
1812
1823
|
queryKey: [q.USER_REGIONS],
|
|
1813
1824
|
queryFn: this.getRegions
|
|
1814
|
-
}),
|
|
1815
|
-
return
|
|
1825
|
+
}), c = U(o.data);
|
|
1826
|
+
return {
|
|
1816
1827
|
success: !0,
|
|
1817
1828
|
data: U({
|
|
1818
1829
|
...o.data,
|
|
1819
|
-
|
|
1830
|
+
accessToken: void 0,
|
|
1831
|
+
refreshToken: void 0,
|
|
1832
|
+
token: void 0,
|
|
1820
1833
|
user: {
|
|
1821
|
-
...
|
|
1822
|
-
userRegion:
|
|
1823
|
-
(
|
|
1834
|
+
...c.user,
|
|
1835
|
+
userRegion: i.find(
|
|
1836
|
+
(u) => u.code === o.data.user.user_region
|
|
1824
1837
|
)
|
|
1825
1838
|
}
|
|
1826
1839
|
})
|
|
@@ -1828,7 +1841,7 @@ class ns {
|
|
|
1828
1841
|
} catch (o) {
|
|
1829
1842
|
return console.error(o), {
|
|
1830
1843
|
success: !1,
|
|
1831
|
-
message: ((
|
|
1844
|
+
message: ((s = (n = o.response) == null ? void 0 : n.data) == null ? void 0 : s.message) || ((r = o == null ? void 0 : o.response) == null ? void 0 : r.data) || o.message || "error signing in"
|
|
1832
1845
|
};
|
|
1833
1846
|
}
|
|
1834
1847
|
});
|
|
@@ -1839,7 +1852,7 @@ class ns {
|
|
|
1839
1852
|
* @returns A promise that resolves to a service response containing authentication data.
|
|
1840
1853
|
*/
|
|
1841
1854
|
O(this, "signUp", async (t) => {
|
|
1842
|
-
var n, s, r,
|
|
1855
|
+
var n, s, r, o, i;
|
|
1843
1856
|
try {
|
|
1844
1857
|
const { data: c } = await _.post(T.SIGN_UP, {
|
|
1845
1858
|
user: {
|
|
@@ -1850,18 +1863,18 @@ class ns {
|
|
|
1850
1863
|
success_url: t.successUrl,
|
|
1851
1864
|
cancel_url: t.cancelUrl,
|
|
1852
1865
|
price_id: t.priceId
|
|
1853
|
-
}),
|
|
1866
|
+
}), u = await G.ensureQueryData({
|
|
1854
1867
|
queryKey: [q.USER_REGIONS],
|
|
1855
1868
|
queryFn: this.getRegions
|
|
1856
|
-
}),
|
|
1857
|
-
return localStorage.setItem(C.TOKEN,
|
|
1869
|
+
}), l = U(c.data), f = (n = c.data) == null ? void 0 : n.tokens.accessToken;
|
|
1870
|
+
return localStorage.setItem(C.TOKEN, f), {
|
|
1858
1871
|
success: !0,
|
|
1859
1872
|
data: {
|
|
1860
|
-
token:
|
|
1873
|
+
token: f,
|
|
1861
1874
|
...(s = c.data) == null ? void 0 : s.tokens,
|
|
1862
1875
|
user: {
|
|
1863
|
-
...
|
|
1864
|
-
userRegion:
|
|
1876
|
+
...l.user,
|
|
1877
|
+
userRegion: u.find(
|
|
1865
1878
|
(d) => d.code === c.data.user.user_region
|
|
1866
1879
|
)
|
|
1867
1880
|
}
|
|
@@ -1870,37 +1883,37 @@ class ns {
|
|
|
1870
1883
|
} catch (c) {
|
|
1871
1884
|
return console.error(c), {
|
|
1872
1885
|
success: !1,
|
|
1873
|
-
message: ((
|
|
1886
|
+
message: ((o = (r = c.response) == null ? void 0 : r.data) == null ? void 0 : o.message) || ((i = c.response) == null ? void 0 : i.data) || c.message || "error signing up"
|
|
1874
1887
|
};
|
|
1875
1888
|
}
|
|
1876
1889
|
});
|
|
1877
1890
|
O(this, "getOrCreateGoogleUser", async (t, n) => {
|
|
1878
|
-
var s, r,
|
|
1891
|
+
var s, r, o, i, c;
|
|
1879
1892
|
try {
|
|
1880
|
-
const { data:
|
|
1893
|
+
const { data: u } = await _.post(T.GOOGLE_AUTH, {
|
|
1881
1894
|
google_access_token: t,
|
|
1882
1895
|
user_region: n
|
|
1883
|
-
}),
|
|
1896
|
+
}), l = await G.ensureQueryData({
|
|
1884
1897
|
queryKey: [q.USER_REGIONS],
|
|
1885
1898
|
queryFn: this.getRegions
|
|
1886
|
-
}),
|
|
1899
|
+
}), f = U(u.data), d = (s = u.data) == null ? void 0 : s.tokens.accessToken;
|
|
1887
1900
|
return localStorage.setItem(C.TOKEN, d), {
|
|
1888
1901
|
success: !0,
|
|
1889
1902
|
data: {
|
|
1890
1903
|
token: d,
|
|
1891
|
-
...(r =
|
|
1904
|
+
...(r = u.data) == null ? void 0 : r.tokens,
|
|
1892
1905
|
user: {
|
|
1893
|
-
...
|
|
1894
|
-
userRegion:
|
|
1895
|
-
(R) => R.code ===
|
|
1906
|
+
...f.user,
|
|
1907
|
+
userRegion: l.find(
|
|
1908
|
+
(R) => R.code === u.data.user.user_region
|
|
1896
1909
|
)
|
|
1897
1910
|
}
|
|
1898
1911
|
}
|
|
1899
1912
|
};
|
|
1900
|
-
} catch (
|
|
1901
|
-
return console.error(
|
|
1913
|
+
} catch (u) {
|
|
1914
|
+
return console.error(u), {
|
|
1902
1915
|
success: !1,
|
|
1903
|
-
message: ((
|
|
1916
|
+
message: ((i = (o = u.response) == null ? void 0 : o.data) == null ? void 0 : i.message) || ((c = u == null ? void 0 : u.response) == null ? void 0 : c.data) || u.message || "error getting or creating google user"
|
|
1904
1917
|
};
|
|
1905
1918
|
}
|
|
1906
1919
|
});
|
|
@@ -1915,10 +1928,10 @@ class ns {
|
|
|
1915
1928
|
cancel_url: t.cancelUrl
|
|
1916
1929
|
}
|
|
1917
1930
|
)).data;
|
|
1918
|
-
} catch (
|
|
1919
|
-
return console.error(
|
|
1931
|
+
} catch (o) {
|
|
1932
|
+
return console.error(o), {
|
|
1920
1933
|
success: !1,
|
|
1921
|
-
message: ((s = (n =
|
|
1934
|
+
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"
|
|
1922
1935
|
};
|
|
1923
1936
|
}
|
|
1924
1937
|
});
|
|
@@ -1927,30 +1940,31 @@ class ns {
|
|
|
1927
1940
|
*
|
|
1928
1941
|
* @param idToken - The ID token to authenticate with.
|
|
1929
1942
|
* @param refreshToken - The refresh token for user
|
|
1943
|
+
* @param overrideExchangeTokenUrl - An optional URL to override the default exchange token endpoint, used for testing purposes.
|
|
1930
1944
|
* @returns A promise that resolves to a service response containing authentication data.
|
|
1931
1945
|
*/
|
|
1932
1946
|
O(this, "authenticateWithToken", async (t, n, s) => {
|
|
1933
|
-
var r,
|
|
1947
|
+
var r, o, i;
|
|
1934
1948
|
try {
|
|
1935
1949
|
const { data: c } = await _.post(
|
|
1936
1950
|
T.EXCHANGE_TOKEN,
|
|
1937
|
-
|
|
1951
|
+
Et({
|
|
1938
1952
|
idToken: t,
|
|
1939
1953
|
refreshToken: n,
|
|
1940
1954
|
exchangeTokenEndPoint: s
|
|
1941
1955
|
})
|
|
1942
|
-
),
|
|
1956
|
+
), u = await G.ensureQueryData({
|
|
1943
1957
|
queryKey: [q.USER_REGIONS],
|
|
1944
1958
|
queryFn: this.getRegions
|
|
1945
|
-
}),
|
|
1959
|
+
}), l = U(c.data);
|
|
1946
1960
|
return {
|
|
1947
1961
|
success: !0,
|
|
1948
1962
|
data: {
|
|
1949
|
-
...
|
|
1963
|
+
...l,
|
|
1950
1964
|
user: {
|
|
1951
|
-
...
|
|
1952
|
-
userRegion:
|
|
1953
|
-
(
|
|
1965
|
+
...l.user,
|
|
1966
|
+
userRegion: u.find(
|
|
1967
|
+
(f) => f.code === c.data.user.user_region
|
|
1954
1968
|
)
|
|
1955
1969
|
}
|
|
1956
1970
|
}
|
|
@@ -1958,7 +1972,7 @@ class ns {
|
|
|
1958
1972
|
} catch (c) {
|
|
1959
1973
|
return console.error(c), {
|
|
1960
1974
|
success: !1,
|
|
1961
|
-
message: ((
|
|
1975
|
+
message: ((o = (r = c.response) == null ? void 0 : r.data) == null ? void 0 : o.message) || ((i = c == null ? void 0 : c.response) == null ? void 0 : i.data) || c.message || "error exchanging token"
|
|
1962
1976
|
};
|
|
1963
1977
|
}
|
|
1964
1978
|
});
|
|
@@ -2007,15 +2021,15 @@ class ns {
|
|
|
2007
2021
|
const t = localStorage.getItem(C.REFRESH_TOKEN);
|
|
2008
2022
|
if (!t)
|
|
2009
2023
|
throw new Error("No refresh token found to reauthenticate user.");
|
|
2010
|
-
const s = localStorage.getItem(C.AUTH_FLOW) ===
|
|
2011
|
-
if (!
|
|
2012
|
-
throw new Error(
|
|
2024
|
+
const s = localStorage.getItem(C.AUTH_FLOW) === ht.POST_MESSAGE ? this.refreshEmbedToken : this.refreshToken, { data: r, success: o, message: i } = await s(t);
|
|
2025
|
+
if (!o || !r)
|
|
2026
|
+
throw new Error(i || "Unable to refresh access token.");
|
|
2013
2027
|
const c = r.token || r.accessToken;
|
|
2014
2028
|
if (!c)
|
|
2015
2029
|
throw new Error("Refresh response did not include an access token.");
|
|
2016
2030
|
localStorage.setItem(C.TOKEN, c);
|
|
2017
|
-
const
|
|
2018
|
-
return this.processRefreshAccessTokenQueue(null,
|
|
2031
|
+
const u = { token: c, data: r };
|
|
2032
|
+
return this.processRefreshAccessTokenQueue(null, u), u;
|
|
2019
2033
|
} catch (t) {
|
|
2020
2034
|
const n = t instanceof Error ? t : new Error("Unable to refresh access token.");
|
|
2021
2035
|
throw this.processRefreshAccessTokenQueue(n), n;
|
|
@@ -2098,52 +2112,60 @@ class ns {
|
|
|
2098
2112
|
return U(t.data);
|
|
2099
2113
|
});
|
|
2100
2114
|
O(this, "validate2FA", async (t, n) => {
|
|
2101
|
-
var s, r, i;
|
|
2115
|
+
var s, r, o, i, c;
|
|
2102
2116
|
try {
|
|
2103
|
-
const { data:
|
|
2117
|
+
const { data: u } = await _.post(T.OTP, {
|
|
2104
2118
|
email_address: t,
|
|
2105
2119
|
otp: n
|
|
2106
|
-
}),
|
|
2120
|
+
}), l = await G.ensureQueryData({
|
|
2107
2121
|
queryKey: [q.USER_REGIONS],
|
|
2108
2122
|
queryFn: this.getRegions
|
|
2109
2123
|
});
|
|
2110
2124
|
return { success: !0, data: U({
|
|
2111
|
-
...
|
|
2125
|
+
...u.data,
|
|
2126
|
+
token: (s = u.data) == null ? void 0 : s.accessToken,
|
|
2127
|
+
refreshToken: (r = u.data) == null ? void 0 : r.refreshToken,
|
|
2112
2128
|
user: {
|
|
2113
|
-
...
|
|
2114
|
-
userRegion:
|
|
2115
|
-
(
|
|
2129
|
+
...u.data.user,
|
|
2130
|
+
userRegion: l.find(
|
|
2131
|
+
(d) => d.code === u.data.user.user_region
|
|
2116
2132
|
)
|
|
2117
2133
|
}
|
|
2118
2134
|
}) };
|
|
2119
|
-
} catch (
|
|
2120
|
-
return console.error(
|
|
2135
|
+
} catch (u) {
|
|
2136
|
+
return console.error(u), {
|
|
2121
2137
|
success: !1,
|
|
2122
|
-
message: ((
|
|
2138
|
+
message: ((i = (o = u.response) == null ? void 0 : o.data) == null ? void 0 : i.message) || ((c = u == null ? void 0 : u.response) == null ? void 0 : c.data) || u.message || "error signing in"
|
|
2123
2139
|
};
|
|
2124
2140
|
}
|
|
2125
2141
|
});
|
|
2126
2142
|
}
|
|
2127
2143
|
}
|
|
2128
|
-
const
|
|
2144
|
+
const rs = new ss(), Re = g.create();
|
|
2145
|
+
Re.interceptors.request.use((e) => (e = ut(e), e));
|
|
2146
|
+
const os = 1;
|
|
2147
|
+
Re.interceptors.response.use(
|
|
2148
|
+
null,
|
|
2149
|
+
(e) => lt(e, os, Re)
|
|
2150
|
+
);
|
|
2129
2151
|
export {
|
|
2130
|
-
|
|
2152
|
+
rs as A,
|
|
2131
2153
|
q as E,
|
|
2132
|
-
|
|
2133
|
-
|
|
2154
|
+
Re as a,
|
|
2155
|
+
U as b,
|
|
2134
2156
|
_ as c,
|
|
2135
|
-
|
|
2136
|
-
|
|
2137
|
-
|
|
2138
|
-
|
|
2139
|
-
|
|
2140
|
-
|
|
2141
|
-
|
|
2142
|
-
|
|
2143
|
-
|
|
2144
|
-
|
|
2145
|
-
|
|
2146
|
-
|
|
2147
|
-
|
|
2148
|
-
|
|
2157
|
+
gt as d,
|
|
2158
|
+
Xn as e,
|
|
2159
|
+
Te as f,
|
|
2160
|
+
ts as g,
|
|
2161
|
+
ut as h,
|
|
2162
|
+
es as i,
|
|
2163
|
+
Yn as j,
|
|
2164
|
+
Zn as k,
|
|
2165
|
+
Qn as l,
|
|
2166
|
+
De as m,
|
|
2167
|
+
lt as n,
|
|
2168
|
+
js as p,
|
|
2169
|
+
Et as r,
|
|
2170
|
+
Rt as t
|
|
2149
2171
|
};
|