@odynn/awayz-core 0.6.23 → 0.6.25
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/{AccountService-Cj9L15P-.js → AccountService-B9DbWoCe.js} +554 -548
- package/dist/{TripsService-DDN_-m62.js → TripsService-DJhDDtrv.js} +1 -1
- package/dist/components/Bookings/FlightBooking/FlightBooking.js +1 -1
- package/dist/components/CashValue/CashValue.js +1 -1
- package/dist/components/CashValue/CashValue.stories.js +1 -1
- package/dist/components/Wallet/Card/Card.stories.js +1 -1
- package/dist/hooks/useAwayzAuth/useAwayzAuth.js +73 -69
- package/dist/hooks/useBookingManagement/useBookingManagement.js +1 -1
- package/dist/hooks/useBookingManagement/useBookingManagement.test.js +1 -1
- package/dist/hooks/useSearchLimit.js +1 -1
- package/dist/hooks/useTripManagement/useTripManagement.js +2 -2
- package/dist/hooks/useTripManagement/useTripManagement.test.js +2 -2
- package/dist/hooks/useWallet/useWallet.js +1 -1
- package/dist/hooks/useWallet/useWallet.test.js +1 -1
- package/dist/keys-BcBfU51M.js +5 -0
- package/dist/lib/hooks/useAwayzAuth/useAwayzAuth.types.d.ts +1 -0
- package/dist/lib/hooks/useWallet/useWallet.types.d.ts +1 -1
- package/dist/lib/services/account/AccountService.d.ts +1 -1
- package/dist/main.js +1 -1
- package/dist/providers/AwayzProvider.js +2 -2
- package/dist/services/account/AccountService.js +2 -2
- package/dist/services/bookings/BookingService.js +1 -1
- package/dist/services/currency/CurrencyService.js +1 -1
- package/dist/services/index.js +1 -1
- package/dist/services/instance.js +2 -2
- package/dist/services/instanceConfig.js +2 -2
- package/dist/services/noRetryInstance.js +1 -1
- package/dist/services/preferences/PreferencesService.js +1 -1
- package/dist/services/rewards/RewardsService.js +1 -1
- package/dist/services/trips/TripsService.js +2 -2
- package/dist/services/wallet/WalletService.js +1 -1
- package/package.json +1 -1
- package/dist/keys-D66VvSIm.js +0 -5
|
@@ -2,7 +2,7 @@ var lt = Object.defineProperty;
|
|
|
2
2
|
var ft = (e, t, n) => t in e ? lt(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
3
3
|
var k = (e, t, n) => ft(e, typeof t != "symbol" ? t + "" : t, n);
|
|
4
4
|
import "./arrayExtensions-DlcBOj5a.js";
|
|
5
|
-
import { a as x } from "./keys-
|
|
5
|
+
import { a as x } from "./keys-BcBfU51M.js";
|
|
6
6
|
import "react";
|
|
7
7
|
import { awayzClient as $ } from "./configs/awayzClient.js";
|
|
8
8
|
import { EAuthEndpoints as b } from "./configs/endpoints.js";
|
|
@@ -12,100 +12,100 @@ function pt(e) {
|
|
|
12
12
|
return e = e.replace(/^_+/, ""), e.replace(/_([a-z])/g, (t, n) => n.toUpperCase());
|
|
13
13
|
}
|
|
14
14
|
const L = (e) => Array.isArray(e) ? e.map((t) => L(t)) : typeof e == "object" && e !== null ? Object.keys(e).reduce((t, n) => {
|
|
15
|
-
const
|
|
16
|
-
return t[
|
|
15
|
+
const s = pt(n);
|
|
16
|
+
return t[s] = L(e[n]), t;
|
|
17
17
|
}, {}) : e;
|
|
18
18
|
function ht(e) {
|
|
19
19
|
return e.replace(/([A-Z])/g, "_$1").toLowerCase();
|
|
20
20
|
}
|
|
21
21
|
const we = (e) => Array.isArray(e) ? e.map((t) => we(t)) : typeof e == "object" && e !== null ? Object.keys(e).reduce((t, n) => {
|
|
22
|
-
const
|
|
23
|
-
return t[
|
|
24
|
-
}, {}) : e,
|
|
22
|
+
const s = ht(n);
|
|
23
|
+
return t[s] = we(e[n]), t;
|
|
24
|
+
}, {}) : e, mt = (e) => (Object.keys(e).forEach(
|
|
25
25
|
(t) => !e[t] && delete e[t]
|
|
26
26
|
), e);
|
|
27
|
-
var j = /* @__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))(j || {}),
|
|
27
|
+
var j = /* @__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))(j || {}), Et = /* @__PURE__ */ ((e) => (e.HOTEL = "Hotel", e.AIRLINE = "Airline", e.BANK = "Bank", e))(Et || {});
|
|
28
28
|
function He(e, t) {
|
|
29
29
|
return function() {
|
|
30
30
|
return e.apply(t, arguments);
|
|
31
31
|
};
|
|
32
32
|
}
|
|
33
|
-
const { toString:
|
|
34
|
-
const n =
|
|
33
|
+
const { toString: yt } = Object.prototype, { getPrototypeOf: ye } = Object, { iterator: te, toStringTag: Me } = Symbol, ne = /* @__PURE__ */ ((e) => (t) => {
|
|
34
|
+
const n = yt.call(t);
|
|
35
35
|
return e[n] || (e[n] = n.slice(8, -1).toLowerCase());
|
|
36
|
-
})(/* @__PURE__ */ Object.create(null)), U = (e) => (e = e.toLowerCase(), (t) => ne(t) === e),
|
|
37
|
-
function
|
|
36
|
+
})(/* @__PURE__ */ Object.create(null)), U = (e) => (e = e.toLowerCase(), (t) => ne(t) === e), se = (e) => (t) => typeof t === e, { isArray: z } = Array, v = se("undefined");
|
|
37
|
+
function Rt(e) {
|
|
38
38
|
return e !== null && !v(e) && e.constructor !== null && !v(e.constructor) && _(e.constructor.isBuffer) && e.constructor.isBuffer(e);
|
|
39
39
|
}
|
|
40
40
|
const je = U("ArrayBuffer");
|
|
41
|
-
function
|
|
41
|
+
function St(e) {
|
|
42
42
|
let t;
|
|
43
43
|
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer && je(e.buffer), t;
|
|
44
44
|
}
|
|
45
|
-
const
|
|
45
|
+
const gt = se("string"), _ = se("function"), ze = se("number"), re = (e) => e !== null && typeof e == "object", wt = (e) => e === !0 || e === !1, X = (e) => {
|
|
46
46
|
if (ne(e) !== "object")
|
|
47
47
|
return !1;
|
|
48
48
|
const t = ye(e);
|
|
49
49
|
return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(Me in e) && !(te in e);
|
|
50
|
-
},
|
|
50
|
+
}, Tt = U("Date"), bt = U("File"), Ot = U("Blob"), At = U("FileList"), _t = (e) => re(e) && _(e.pipe), Nt = (e) => {
|
|
51
51
|
let t;
|
|
52
52
|
return e && (typeof FormData == "function" && e instanceof FormData || _(e.append) && ((t = ne(e)) === "formdata" || // detect form-data instance
|
|
53
53
|
t === "object" && _(e.toString) && e.toString() === "[object FormData]"));
|
|
54
|
-
},
|
|
54
|
+
}, Ct = U("URLSearchParams"), [kt, Ut, It, xt] = ["ReadableStream", "Request", "Response", "Headers"].map(U), Pt = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
|
|
55
55
|
function V(e, t, { allOwnKeys: n = !1 } = {}) {
|
|
56
56
|
if (e === null || typeof e > "u")
|
|
57
57
|
return;
|
|
58
|
-
let
|
|
58
|
+
let s, r;
|
|
59
59
|
if (typeof e != "object" && (e = [e]), z(e))
|
|
60
|
-
for (
|
|
61
|
-
t.call(null, e[
|
|
60
|
+
for (s = 0, r = e.length; s < r; s++)
|
|
61
|
+
t.call(null, e[s], s, e);
|
|
62
62
|
else {
|
|
63
63
|
const o = n ? Object.getOwnPropertyNames(e) : Object.keys(e), i = o.length;
|
|
64
64
|
let c;
|
|
65
|
-
for (
|
|
66
|
-
c = o[
|
|
65
|
+
for (s = 0; s < i; s++)
|
|
66
|
+
c = o[s], t.call(null, e[c], c, e);
|
|
67
67
|
}
|
|
68
68
|
}
|
|
69
69
|
function Ke(e, t) {
|
|
70
70
|
t = t.toLowerCase();
|
|
71
71
|
const n = Object.keys(e);
|
|
72
|
-
let
|
|
73
|
-
for (;
|
|
74
|
-
if (
|
|
75
|
-
return
|
|
72
|
+
let s = n.length, r;
|
|
73
|
+
for (; s-- > 0; )
|
|
74
|
+
if (r = n[s], t === r.toLowerCase())
|
|
75
|
+
return r;
|
|
76
76
|
return null;
|
|
77
77
|
}
|
|
78
78
|
const q = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, $e = (e) => !v(e) && e !== q;
|
|
79
79
|
function fe() {
|
|
80
|
-
const { caseless: e } = $e(this) && this || {}, t = {}, n = (
|
|
81
|
-
const o = e && Ke(t,
|
|
82
|
-
X(t[o]) && X(
|
|
80
|
+
const { caseless: e } = $e(this) && this || {}, t = {}, n = (s, r) => {
|
|
81
|
+
const o = e && Ke(t, r) || r;
|
|
82
|
+
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;
|
|
83
83
|
};
|
|
84
|
-
for (let
|
|
85
|
-
arguments[
|
|
84
|
+
for (let s = 0, r = arguments.length; s < r; s++)
|
|
85
|
+
arguments[s] && V(arguments[s], n);
|
|
86
86
|
return t;
|
|
87
87
|
}
|
|
88
|
-
const
|
|
89
|
-
n && _(
|
|
90
|
-
}, { allOwnKeys:
|
|
91
|
-
e.prototype = Object.create(t.prototype,
|
|
88
|
+
const Lt = (e, t, n, { allOwnKeys: s } = {}) => (V(t, (r, o) => {
|
|
89
|
+
n && _(r) ? e[o] = He(r, n) : e[o] = r;
|
|
90
|
+
}, { allOwnKeys: s }), e), Ft = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e), Dt = (e, t, n, s) => {
|
|
91
|
+
e.prototype = Object.create(t.prototype, s), e.prototype.constructor = e, Object.defineProperty(e, "super", {
|
|
92
92
|
value: t.prototype
|
|
93
93
|
}), n && Object.assign(e.prototype, n);
|
|
94
|
-
},
|
|
95
|
-
let
|
|
94
|
+
}, Bt = (e, t, n, s) => {
|
|
95
|
+
let r, o, i;
|
|
96
96
|
const c = {};
|
|
97
97
|
if (t = t || {}, e == null) return t;
|
|
98
98
|
do {
|
|
99
|
-
for (
|
|
100
|
-
i =
|
|
99
|
+
for (r = Object.getOwnPropertyNames(e), o = r.length; o-- > 0; )
|
|
100
|
+
i = r[o], (!s || s(i, e, t)) && !c[i] && (t[i] = e[i], c[i] = !0);
|
|
101
101
|
e = n !== !1 && ye(e);
|
|
102
102
|
} while (e && (!n || n(e, t)) && e !== Object.prototype);
|
|
103
103
|
return t;
|
|
104
|
-
},
|
|
104
|
+
}, qt = (e, t, n) => {
|
|
105
105
|
e = String(e), (n === void 0 || n > e.length) && (n = e.length), n -= t.length;
|
|
106
|
-
const
|
|
107
|
-
return
|
|
108
|
-
},
|
|
106
|
+
const s = e.indexOf(t, n);
|
|
107
|
+
return s !== -1 && s === n;
|
|
108
|
+
}, Ht = (e) => {
|
|
109
109
|
if (!e) return null;
|
|
110
110
|
if (z(e)) return e;
|
|
111
111
|
let t = e.length;
|
|
@@ -114,36 +114,36 @@ const Pt = (e, t, n, { allOwnKeys: r } = {}) => (V(t, (s, o) => {
|
|
|
114
114
|
for (; t-- > 0; )
|
|
115
115
|
n[t] = e[t];
|
|
116
116
|
return n;
|
|
117
|
-
},
|
|
118
|
-
const
|
|
119
|
-
let
|
|
120
|
-
for (; (
|
|
121
|
-
const o =
|
|
117
|
+
}, Mt = /* @__PURE__ */ ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" && ye(Uint8Array)), jt = (e, t) => {
|
|
118
|
+
const s = (e && e[te]).call(e);
|
|
119
|
+
let r;
|
|
120
|
+
for (; (r = s.next()) && !r.done; ) {
|
|
121
|
+
const o = r.value;
|
|
122
122
|
t.call(e, o[0], o[1]);
|
|
123
123
|
}
|
|
124
|
-
},
|
|
124
|
+
}, zt = (e, t) => {
|
|
125
125
|
let n;
|
|
126
|
-
const
|
|
126
|
+
const s = [];
|
|
127
127
|
for (; (n = e.exec(t)) !== null; )
|
|
128
|
-
|
|
129
|
-
return
|
|
130
|
-
},
|
|
128
|
+
s.push(n);
|
|
129
|
+
return s;
|
|
130
|
+
}, Kt = U("HTMLFormElement"), $t = (e) => e.toLowerCase().replace(
|
|
131
131
|
/[-_\s]([a-z\d])(\w*)/g,
|
|
132
|
-
function(n,
|
|
133
|
-
return
|
|
132
|
+
function(n, s, r) {
|
|
133
|
+
return s.toUpperCase() + r;
|
|
134
134
|
}
|
|
135
|
-
), Te = (({ hasOwnProperty: e }) => (t, n) => e.call(t, n))(Object.prototype),
|
|
136
|
-
const n = Object.getOwnPropertyDescriptors(e),
|
|
137
|
-
V(n, (
|
|
135
|
+
), Te = (({ hasOwnProperty: e }) => (t, n) => e.call(t, n))(Object.prototype), Gt = U("RegExp"), Ge = (e, t) => {
|
|
136
|
+
const n = Object.getOwnPropertyDescriptors(e), s = {};
|
|
137
|
+
V(n, (r, o) => {
|
|
138
138
|
let i;
|
|
139
|
-
(i = t(
|
|
140
|
-
}), Object.defineProperties(e,
|
|
141
|
-
},
|
|
139
|
+
(i = t(r, o, e)) !== !1 && (s[o] = i || r);
|
|
140
|
+
}), Object.defineProperties(e, s);
|
|
141
|
+
}, vt = (e) => {
|
|
142
142
|
Ge(e, (t, n) => {
|
|
143
143
|
if (_(e) && ["arguments", "caller", "callee"].indexOf(n) !== -1)
|
|
144
144
|
return !1;
|
|
145
|
-
const
|
|
146
|
-
if (_(
|
|
145
|
+
const s = e[n];
|
|
146
|
+
if (_(s)) {
|
|
147
147
|
if (t.enumerable = !1, "writable" in t) {
|
|
148
148
|
t.writable = !1;
|
|
149
149
|
return;
|
|
@@ -153,103 +153,103 @@ const Pt = (e, t, n, { allOwnKeys: r } = {}) => (V(t, (s, o) => {
|
|
|
153
153
|
});
|
|
154
154
|
}
|
|
155
155
|
});
|
|
156
|
-
},
|
|
157
|
-
const n = {},
|
|
158
|
-
|
|
156
|
+
}, Vt = (e, t) => {
|
|
157
|
+
const n = {}, s = (r) => {
|
|
158
|
+
r.forEach((o) => {
|
|
159
159
|
n[o] = !0;
|
|
160
160
|
});
|
|
161
161
|
};
|
|
162
|
-
return z(e) ?
|
|
163
|
-
},
|
|
164
|
-
},
|
|
165
|
-
function
|
|
162
|
+
return z(e) ? s(e) : s(String(e).split(t)), n;
|
|
163
|
+
}, Jt = () => {
|
|
164
|
+
}, Wt = (e, t) => e != null && Number.isFinite(e = +e) ? e : t;
|
|
165
|
+
function Xt(e) {
|
|
166
166
|
return !!(e && _(e.append) && e[Me] === "FormData" && e[te]);
|
|
167
167
|
}
|
|
168
|
-
const
|
|
169
|
-
const t = new Array(10), n = (
|
|
170
|
-
if (
|
|
171
|
-
if (t.indexOf(
|
|
168
|
+
const Yt = (e) => {
|
|
169
|
+
const t = new Array(10), n = (s, r) => {
|
|
170
|
+
if (re(s)) {
|
|
171
|
+
if (t.indexOf(s) >= 0)
|
|
172
172
|
return;
|
|
173
|
-
if (!("toJSON" in
|
|
174
|
-
t[
|
|
175
|
-
const o = z(
|
|
176
|
-
return V(
|
|
177
|
-
const f = n(i,
|
|
173
|
+
if (!("toJSON" in s)) {
|
|
174
|
+
t[r] = s;
|
|
175
|
+
const o = z(s) ? [] : {};
|
|
176
|
+
return V(s, (i, c) => {
|
|
177
|
+
const f = n(i, r + 1);
|
|
178
178
|
!v(f) && (o[c] = f);
|
|
179
|
-
}), t[
|
|
179
|
+
}), t[r] = void 0, o;
|
|
180
180
|
}
|
|
181
181
|
}
|
|
182
|
-
return
|
|
182
|
+
return s;
|
|
183
183
|
};
|
|
184
184
|
return n(e, 0);
|
|
185
|
-
},
|
|
186
|
-
|
|
187
|
-
}, !1), (
|
|
188
|
-
|
|
185
|
+
}, Zt = U("AsyncFunction"), Qt = (e) => e && (re(e) || _(e)) && _(e.then) && _(e.catch), ve = ((e, t) => e ? setImmediate : t ? ((n, s) => (q.addEventListener("message", ({ source: r, data: o }) => {
|
|
186
|
+
r === q && o === n && s.length && s.shift()();
|
|
187
|
+
}, !1), (r) => {
|
|
188
|
+
s.push(r), q.postMessage(n, "*");
|
|
189
189
|
}))(`axios@${Math.random()}`, []) : (n) => setTimeout(n))(
|
|
190
190
|
typeof setImmediate == "function",
|
|
191
191
|
_(q.postMessage)
|
|
192
|
-
),
|
|
192
|
+
), en = typeof queueMicrotask < "u" ? queueMicrotask.bind(q) : typeof process < "u" && process.nextTick || ve, tn = (e) => e != null && _(e[te]), a = {
|
|
193
193
|
isArray: z,
|
|
194
194
|
isArrayBuffer: je,
|
|
195
|
-
isBuffer:
|
|
196
|
-
isFormData:
|
|
197
|
-
isArrayBufferView:
|
|
198
|
-
isString:
|
|
195
|
+
isBuffer: Rt,
|
|
196
|
+
isFormData: Nt,
|
|
197
|
+
isArrayBufferView: St,
|
|
198
|
+
isString: gt,
|
|
199
199
|
isNumber: ze,
|
|
200
|
-
isBoolean:
|
|
201
|
-
isObject:
|
|
200
|
+
isBoolean: wt,
|
|
201
|
+
isObject: re,
|
|
202
202
|
isPlainObject: X,
|
|
203
|
-
isReadableStream:
|
|
204
|
-
isRequest:
|
|
205
|
-
isResponse:
|
|
206
|
-
isHeaders:
|
|
203
|
+
isReadableStream: kt,
|
|
204
|
+
isRequest: Ut,
|
|
205
|
+
isResponse: It,
|
|
206
|
+
isHeaders: xt,
|
|
207
207
|
isUndefined: v,
|
|
208
|
-
isDate:
|
|
209
|
-
isFile:
|
|
210
|
-
isBlob:
|
|
211
|
-
isRegExp:
|
|
208
|
+
isDate: Tt,
|
|
209
|
+
isFile: bt,
|
|
210
|
+
isBlob: Ot,
|
|
211
|
+
isRegExp: Gt,
|
|
212
212
|
isFunction: _,
|
|
213
|
-
isStream:
|
|
214
|
-
isURLSearchParams:
|
|
215
|
-
isTypedArray:
|
|
216
|
-
isFileList:
|
|
213
|
+
isStream: _t,
|
|
214
|
+
isURLSearchParams: Ct,
|
|
215
|
+
isTypedArray: Mt,
|
|
216
|
+
isFileList: At,
|
|
217
217
|
forEach: V,
|
|
218
218
|
merge: fe,
|
|
219
|
-
extend:
|
|
220
|
-
trim:
|
|
221
|
-
stripBOM:
|
|
222
|
-
inherits:
|
|
223
|
-
toFlatObject:
|
|
219
|
+
extend: Lt,
|
|
220
|
+
trim: Pt,
|
|
221
|
+
stripBOM: Ft,
|
|
222
|
+
inherits: Dt,
|
|
223
|
+
toFlatObject: Bt,
|
|
224
224
|
kindOf: ne,
|
|
225
225
|
kindOfTest: U,
|
|
226
|
-
endsWith:
|
|
227
|
-
toArray:
|
|
228
|
-
forEachEntry:
|
|
229
|
-
matchAll:
|
|
230
|
-
isHTMLForm:
|
|
226
|
+
endsWith: qt,
|
|
227
|
+
toArray: Ht,
|
|
228
|
+
forEachEntry: jt,
|
|
229
|
+
matchAll: zt,
|
|
230
|
+
isHTMLForm: Kt,
|
|
231
231
|
hasOwnProperty: Te,
|
|
232
232
|
hasOwnProp: Te,
|
|
233
233
|
// an alias to avoid ESLint no-prototype-builtins detection
|
|
234
234
|
reduceDescriptors: Ge,
|
|
235
|
-
freezeMethods:
|
|
236
|
-
toObjectSet:
|
|
237
|
-
toCamelCase:
|
|
238
|
-
noop:
|
|
239
|
-
toFiniteNumber:
|
|
235
|
+
freezeMethods: vt,
|
|
236
|
+
toObjectSet: Vt,
|
|
237
|
+
toCamelCase: $t,
|
|
238
|
+
noop: Jt,
|
|
239
|
+
toFiniteNumber: Wt,
|
|
240
240
|
findKey: Ke,
|
|
241
241
|
global: q,
|
|
242
242
|
isContextDefined: $e,
|
|
243
|
-
isSpecCompliantForm:
|
|
244
|
-
toJSONObject:
|
|
245
|
-
isAsyncFn:
|
|
246
|
-
isThenable:
|
|
243
|
+
isSpecCompliantForm: Xt,
|
|
244
|
+
toJSONObject: Yt,
|
|
245
|
+
isAsyncFn: Zt,
|
|
246
|
+
isThenable: Qt,
|
|
247
247
|
setImmediate: ve,
|
|
248
|
-
asap:
|
|
249
|
-
isIterable:
|
|
248
|
+
asap: en,
|
|
249
|
+
isIterable: tn
|
|
250
250
|
};
|
|
251
|
-
function E(e, t, n,
|
|
252
|
-
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),
|
|
251
|
+
function E(e, t, n, s, r) {
|
|
252
|
+
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);
|
|
253
253
|
}
|
|
254
254
|
a.inherits(E, Error, {
|
|
255
255
|
toJSON: function() {
|
|
@@ -292,13 +292,13 @@ const Ve = E.prototype, Je = {};
|
|
|
292
292
|
});
|
|
293
293
|
Object.defineProperties(E, Je);
|
|
294
294
|
Object.defineProperty(Ve, "isAxiosError", { value: !0 });
|
|
295
|
-
E.from = (e, t, n,
|
|
295
|
+
E.from = (e, t, n, s, r, o) => {
|
|
296
296
|
const i = Object.create(Ve);
|
|
297
297
|
return a.toFlatObject(e, i, function(f) {
|
|
298
298
|
return f !== Error.prototype;
|
|
299
|
-
}, (c) => c !== "isAxiosError"), E.call(i, e.message, t, n,
|
|
299
|
+
}, (c) => c !== "isAxiosError"), E.call(i, e.message, t, n, s, r), i.cause = e, i.name = e.name, o && Object.assign(i, o), i;
|
|
300
300
|
};
|
|
301
|
-
const
|
|
301
|
+
const nn = null;
|
|
302
302
|
function de(e) {
|
|
303
303
|
return a.isPlainObject(e) || a.isArray(e);
|
|
304
304
|
}
|
|
@@ -306,11 +306,11 @@ function We(e) {
|
|
|
306
306
|
return a.endsWith(e, "[]") ? e.slice(0, -2) : e;
|
|
307
307
|
}
|
|
308
308
|
function be(e, t, n) {
|
|
309
|
-
return e ? e.concat(t).map(function(
|
|
310
|
-
return
|
|
309
|
+
return e ? e.concat(t).map(function(r, o) {
|
|
310
|
+
return r = We(r), !n && o ? "[" + r + "]" : r;
|
|
311
311
|
}).join(n ? "." : "") : t;
|
|
312
312
|
}
|
|
313
|
-
function
|
|
313
|
+
function sn(e) {
|
|
314
314
|
return a.isArray(e) && !e.some(de);
|
|
315
315
|
}
|
|
316
316
|
const rn = a.toFlatObject(a, {}, null, function(t) {
|
|
@@ -326,8 +326,8 @@ function oe(e, t, n) {
|
|
|
326
326
|
}, !1, function(m, p) {
|
|
327
327
|
return !a.isUndefined(p[m]);
|
|
328
328
|
});
|
|
329
|
-
const
|
|
330
|
-
if (!a.isFunction(
|
|
329
|
+
const s = n.metaTokens, r = n.visitor || l, o = n.dots, i = n.indexes, f = (n.Blob || typeof Blob < "u" && Blob) && a.isSpecCompliantForm(t);
|
|
330
|
+
if (!a.isFunction(r))
|
|
331
331
|
throw new TypeError("visitor must be a function");
|
|
332
332
|
function u(h) {
|
|
333
333
|
if (h === null) return "";
|
|
@@ -341,8 +341,8 @@ function oe(e, t, n) {
|
|
|
341
341
|
let S = h;
|
|
342
342
|
if (h && !p && typeof h == "object") {
|
|
343
343
|
if (a.endsWith(m, "{}"))
|
|
344
|
-
m =
|
|
345
|
-
else if (a.isArray(h) &&
|
|
344
|
+
m = s ? m : m.slice(0, -2), h = JSON.stringify(h);
|
|
345
|
+
else if (a.isArray(h) && sn(h) || (a.isFileList(h) || a.endsWith(m, "[]")) && (S = a.toArray(h)))
|
|
346
346
|
return m = We(m), S.forEach(function(T, P) {
|
|
347
347
|
!(a.isUndefined(T) || T === null) && t.append(
|
|
348
348
|
// eslint-disable-next-line no-nested-ternary
|
|
@@ -363,7 +363,7 @@ function oe(e, t, n) {
|
|
|
363
363
|
if (d.indexOf(h) !== -1)
|
|
364
364
|
throw Error("Circular reference detected in " + m.join("."));
|
|
365
365
|
d.push(h), a.forEach(h, function(S, w) {
|
|
366
|
-
(!(a.isUndefined(S) || S === null) &&
|
|
366
|
+
(!(a.isUndefined(S) || S === null) && r.call(
|
|
367
367
|
t,
|
|
368
368
|
S,
|
|
369
369
|
a.isString(w) ? w.trim() : w,
|
|
@@ -387,8 +387,8 @@ function Oe(e) {
|
|
|
387
387
|
"%20": "+",
|
|
388
388
|
"%00": "\0"
|
|
389
389
|
};
|
|
390
|
-
return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g, function(
|
|
391
|
-
return t[
|
|
390
|
+
return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g, function(s) {
|
|
391
|
+
return t[s];
|
|
392
392
|
});
|
|
393
393
|
}
|
|
394
394
|
function Re(e, t) {
|
|
@@ -399,26 +399,26 @@ Xe.append = function(t, n) {
|
|
|
399
399
|
this._pairs.push([t, n]);
|
|
400
400
|
};
|
|
401
401
|
Xe.toString = function(t) {
|
|
402
|
-
const n = t ? function(
|
|
403
|
-
return t.call(this,
|
|
402
|
+
const n = t ? function(s) {
|
|
403
|
+
return t.call(this, s, Oe);
|
|
404
404
|
} : Oe;
|
|
405
|
-
return this._pairs.map(function(
|
|
406
|
-
return n(
|
|
405
|
+
return this._pairs.map(function(r) {
|
|
406
|
+
return n(r[0]) + "=" + n(r[1]);
|
|
407
407
|
}, "").join("&");
|
|
408
408
|
};
|
|
409
|
-
function
|
|
409
|
+
function on(e) {
|
|
410
410
|
return encodeURIComponent(e).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]");
|
|
411
411
|
}
|
|
412
412
|
function Ye(e, t, n) {
|
|
413
413
|
if (!t)
|
|
414
414
|
return e;
|
|
415
|
-
const
|
|
415
|
+
const s = n && n.encode || on;
|
|
416
416
|
a.isFunction(n) && (n = {
|
|
417
417
|
serialize: n
|
|
418
418
|
});
|
|
419
|
-
const
|
|
419
|
+
const r = n && n.serialize;
|
|
420
420
|
let o;
|
|
421
|
-
if (
|
|
421
|
+
if (r ? o = r(t, n) : o = a.isURLSearchParams(t) ? t.toString() : new Re(t, n).toString(s), o) {
|
|
422
422
|
const i = e.indexOf("#");
|
|
423
423
|
i !== -1 && (e = e.slice(0, i)), e += (e.indexOf("?") === -1 ? "?" : "&") + o;
|
|
424
424
|
}
|
|
@@ -436,12 +436,12 @@ class Ae {
|
|
|
436
436
|
*
|
|
437
437
|
* @return {Number} An ID used to remove interceptor later
|
|
438
438
|
*/
|
|
439
|
-
use(t, n,
|
|
439
|
+
use(t, n, s) {
|
|
440
440
|
return this.handlers.push({
|
|
441
441
|
fulfilled: t,
|
|
442
442
|
rejected: n,
|
|
443
|
-
synchronous:
|
|
444
|
-
runWhen:
|
|
443
|
+
synchronous: s ? s.synchronous : !1,
|
|
444
|
+
runWhen: s ? s.runWhen : null
|
|
445
445
|
}), this.handlers.length - 1;
|
|
446
446
|
}
|
|
447
447
|
/**
|
|
@@ -473,8 +473,8 @@ class Ae {
|
|
|
473
473
|
* @returns {void}
|
|
474
474
|
*/
|
|
475
475
|
forEach(t) {
|
|
476
|
-
a.forEach(this.handlers, function(
|
|
477
|
-
|
|
476
|
+
a.forEach(this.handlers, function(s) {
|
|
477
|
+
s !== null && t(s);
|
|
478
478
|
});
|
|
479
479
|
}
|
|
480
480
|
}
|
|
@@ -482,67 +482,67 @@ const Ze = {
|
|
|
482
482
|
silentJSONParsing: !0,
|
|
483
483
|
forcedJSONParsing: !0,
|
|
484
484
|
clarifyTimeoutError: !1
|
|
485
|
-
},
|
|
485
|
+
}, an = typeof URLSearchParams < "u" ? URLSearchParams : Re, cn = typeof FormData < "u" ? FormData : null, un = typeof Blob < "u" ? Blob : null, ln = {
|
|
486
486
|
isBrowser: !0,
|
|
487
487
|
classes: {
|
|
488
|
-
URLSearchParams:
|
|
489
|
-
FormData:
|
|
490
|
-
Blob:
|
|
488
|
+
URLSearchParams: an,
|
|
489
|
+
FormData: cn,
|
|
490
|
+
Blob: un
|
|
491
491
|
},
|
|
492
492
|
protocols: ["http", "https", "file", "blob", "url", "data"]
|
|
493
|
-
}, Se = typeof window < "u" && typeof document < "u", pe = typeof navigator == "object" && navigator || void 0,
|
|
494
|
-
self instanceof WorkerGlobalScope && typeof self.importScripts == "function",
|
|
493
|
+
}, Se = typeof window < "u" && typeof document < "u", pe = typeof navigator == "object" && navigator || void 0, fn = Se && (!pe || ["ReactNative", "NativeScript", "NS"].indexOf(pe.product) < 0), dn = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
|
|
494
|
+
self instanceof WorkerGlobalScope && typeof self.importScripts == "function", pn = Se && window.location.href || "http://localhost", hn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
495
495
|
__proto__: null,
|
|
496
496
|
hasBrowserEnv: Se,
|
|
497
|
-
hasStandardBrowserEnv:
|
|
498
|
-
hasStandardBrowserWebWorkerEnv:
|
|
497
|
+
hasStandardBrowserEnv: fn,
|
|
498
|
+
hasStandardBrowserWebWorkerEnv: dn,
|
|
499
499
|
navigator: pe,
|
|
500
|
-
origin:
|
|
500
|
+
origin: pn
|
|
501
501
|
}, Symbol.toStringTag, { value: "Module" })), O = {
|
|
502
|
-
...
|
|
503
|
-
...
|
|
502
|
+
...hn,
|
|
503
|
+
...ln
|
|
504
504
|
};
|
|
505
|
-
function
|
|
505
|
+
function mn(e, t) {
|
|
506
506
|
return oe(e, new O.classes.URLSearchParams(), Object.assign({
|
|
507
|
-
visitor: function(n,
|
|
508
|
-
return O.isNode && a.isBuffer(n) ? (this.append(
|
|
507
|
+
visitor: function(n, s, r, o) {
|
|
508
|
+
return O.isNode && a.isBuffer(n) ? (this.append(s, n.toString("base64")), !1) : o.defaultVisitor.apply(this, arguments);
|
|
509
509
|
}
|
|
510
510
|
}, t));
|
|
511
511
|
}
|
|
512
|
-
function
|
|
512
|
+
function En(e) {
|
|
513
513
|
return a.matchAll(/\w+|\[(\w*)]/g, e).map((t) => t[0] === "[]" ? "" : t[1] || t[0]);
|
|
514
514
|
}
|
|
515
|
-
function
|
|
515
|
+
function yn(e) {
|
|
516
516
|
const t = {}, n = Object.keys(e);
|
|
517
|
-
let
|
|
518
|
-
const
|
|
517
|
+
let s;
|
|
518
|
+
const r = n.length;
|
|
519
519
|
let o;
|
|
520
|
-
for (
|
|
521
|
-
o = n[
|
|
520
|
+
for (s = 0; s < r; s++)
|
|
521
|
+
o = n[s], t[o] = e[o];
|
|
522
522
|
return t;
|
|
523
523
|
}
|
|
524
524
|
function Qe(e) {
|
|
525
|
-
function t(n,
|
|
525
|
+
function t(n, s, r, o) {
|
|
526
526
|
let i = n[o++];
|
|
527
527
|
if (i === "__proto__") return !0;
|
|
528
528
|
const c = Number.isFinite(+i), f = o >= n.length;
|
|
529
|
-
return i = !i && a.isArray(
|
|
529
|
+
return i = !i && a.isArray(r) ? r.length : i, f ? (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] = yn(r[i])), !c);
|
|
530
530
|
}
|
|
531
531
|
if (a.isFormData(e) && a.isFunction(e.entries)) {
|
|
532
532
|
const n = {};
|
|
533
|
-
return a.forEachEntry(e, (
|
|
534
|
-
t(
|
|
533
|
+
return a.forEachEntry(e, (s, r) => {
|
|
534
|
+
t(En(s), r, n, 0);
|
|
535
535
|
}), n;
|
|
536
536
|
}
|
|
537
537
|
return null;
|
|
538
538
|
}
|
|
539
|
-
function
|
|
539
|
+
function Rn(e, t, n) {
|
|
540
540
|
if (a.isString(e))
|
|
541
541
|
try {
|
|
542
542
|
return (t || JSON.parse)(e), a.trim(e);
|
|
543
|
-
} catch (
|
|
544
|
-
if (
|
|
545
|
-
throw
|
|
543
|
+
} catch (s) {
|
|
544
|
+
if (s.name !== "SyntaxError")
|
|
545
|
+
throw s;
|
|
546
546
|
}
|
|
547
547
|
return (n || JSON.stringify)(e);
|
|
548
548
|
}
|
|
@@ -550,9 +550,9 @@ const J = {
|
|
|
550
550
|
transitional: Ze,
|
|
551
551
|
adapter: ["xhr", "http", "fetch"],
|
|
552
552
|
transformRequest: [function(t, n) {
|
|
553
|
-
const
|
|
553
|
+
const s = n.getContentType() || "", r = s.indexOf("application/json") > -1, o = a.isObject(t);
|
|
554
554
|
if (o && a.isHTMLForm(t) && (t = new FormData(t)), a.isFormData(t))
|
|
555
|
-
return
|
|
555
|
+
return r ? JSON.stringify(Qe(t)) : t;
|
|
556
556
|
if (a.isArrayBuffer(t) || a.isBuffer(t) || a.isStream(t) || a.isFile(t) || a.isBlob(t) || a.isReadableStream(t))
|
|
557
557
|
return t;
|
|
558
558
|
if (a.isArrayBufferView(t))
|
|
@@ -561,9 +561,9 @@ const J = {
|
|
|
561
561
|
return n.setContentType("application/x-www-form-urlencoded;charset=utf-8", !1), t.toString();
|
|
562
562
|
let c;
|
|
563
563
|
if (o) {
|
|
564
|
-
if (
|
|
565
|
-
return
|
|
566
|
-
if ((c = a.isFileList(t)) ||
|
|
564
|
+
if (s.indexOf("application/x-www-form-urlencoded") > -1)
|
|
565
|
+
return mn(t, this.formSerializer).toString();
|
|
566
|
+
if ((c = a.isFileList(t)) || s.indexOf("multipart/form-data") > -1) {
|
|
567
567
|
const f = this.env && this.env.FormData;
|
|
568
568
|
return oe(
|
|
569
569
|
c ? { "files[]": t } : t,
|
|
@@ -572,14 +572,14 @@ const J = {
|
|
|
572
572
|
);
|
|
573
573
|
}
|
|
574
574
|
}
|
|
575
|
-
return o ||
|
|
575
|
+
return o || r ? (n.setContentType("application/json", !1), Rn(t)) : t;
|
|
576
576
|
}],
|
|
577
577
|
transformResponse: [function(t) {
|
|
578
|
-
const n = this.transitional || J.transitional,
|
|
578
|
+
const n = this.transitional || J.transitional, s = n && n.forcedJSONParsing, r = this.responseType === "json";
|
|
579
579
|
if (a.isResponse(t) || a.isReadableStream(t))
|
|
580
580
|
return t;
|
|
581
|
-
if (t && a.isString(t) && (
|
|
582
|
-
const i = !(n && n.silentJSONParsing) &&
|
|
581
|
+
if (t && a.isString(t) && (s && !this.responseType || r)) {
|
|
582
|
+
const i = !(n && n.silentJSONParsing) && r;
|
|
583
583
|
try {
|
|
584
584
|
return JSON.parse(t);
|
|
585
585
|
} catch (c) {
|
|
@@ -615,7 +615,7 @@ const J = {
|
|
|
615
615
|
a.forEach(["delete", "get", "head", "post", "put", "patch"], (e) => {
|
|
616
616
|
J.headers[e] = {};
|
|
617
617
|
});
|
|
618
|
-
const
|
|
618
|
+
const Sn = a.toObjectSet([
|
|
619
619
|
"age",
|
|
620
620
|
"authorization",
|
|
621
621
|
"content-length",
|
|
@@ -633,12 +633,12 @@ const Rn = a.toObjectSet([
|
|
|
633
633
|
"referer",
|
|
634
634
|
"retry-after",
|
|
635
635
|
"user-agent"
|
|
636
|
-
]),
|
|
636
|
+
]), gn = (e) => {
|
|
637
637
|
const t = {};
|
|
638
|
-
let n,
|
|
638
|
+
let n, s, r;
|
|
639
639
|
return e && e.split(`
|
|
640
640
|
`).forEach(function(i) {
|
|
641
|
-
|
|
641
|
+
r = i.indexOf(":"), n = i.substring(0, r).trim().toLowerCase(), s = i.substring(r + 1).trim(), !(!n || t[n] && Sn[n]) && (n === "set-cookie" ? t[n] ? t[n].push(s) : t[n] = [s] : t[n] = t[n] ? t[n] + ", " + s : s);
|
|
642
642
|
}), t;
|
|
643
643
|
}, _e = Symbol("internals");
|
|
644
644
|
function G(e) {
|
|
@@ -647,33 +647,33 @@ function G(e) {
|
|
|
647
647
|
function Y(e) {
|
|
648
648
|
return e === !1 || e == null ? e : a.isArray(e) ? e.map(Y) : String(e);
|
|
649
649
|
}
|
|
650
|
-
function
|
|
650
|
+
function wn(e) {
|
|
651
651
|
const t = /* @__PURE__ */ Object.create(null), n = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
|
|
652
|
-
let
|
|
653
|
-
for (;
|
|
654
|
-
t[
|
|
652
|
+
let s;
|
|
653
|
+
for (; s = n.exec(e); )
|
|
654
|
+
t[s[1]] = s[2];
|
|
655
655
|
return t;
|
|
656
656
|
}
|
|
657
|
-
const
|
|
658
|
-
function ce(e, t, n,
|
|
659
|
-
if (a.isFunction(
|
|
660
|
-
return
|
|
661
|
-
if (
|
|
662
|
-
if (a.isString(
|
|
663
|
-
return t.indexOf(
|
|
664
|
-
if (a.isRegExp(
|
|
665
|
-
return
|
|
657
|
+
const Tn = (e) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());
|
|
658
|
+
function ce(e, t, n, s, r) {
|
|
659
|
+
if (a.isFunction(s))
|
|
660
|
+
return s.call(this, t, n);
|
|
661
|
+
if (r && (t = n), !!a.isString(t)) {
|
|
662
|
+
if (a.isString(s))
|
|
663
|
+
return t.indexOf(s) !== -1;
|
|
664
|
+
if (a.isRegExp(s))
|
|
665
|
+
return s.test(t);
|
|
666
666
|
}
|
|
667
667
|
}
|
|
668
|
-
function
|
|
669
|
-
return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (t, n,
|
|
668
|
+
function bn(e) {
|
|
669
|
+
return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (t, n, s) => n.toUpperCase() + s);
|
|
670
670
|
}
|
|
671
|
-
function
|
|
671
|
+
function On(e, t) {
|
|
672
672
|
const n = a.toCamelCase(" " + t);
|
|
673
|
-
["get", "set", "has"].forEach((
|
|
674
|
-
Object.defineProperty(e,
|
|
675
|
-
value: function(
|
|
676
|
-
return this[
|
|
673
|
+
["get", "set", "has"].forEach((s) => {
|
|
674
|
+
Object.defineProperty(e, s + n, {
|
|
675
|
+
value: function(r, o, i) {
|
|
676
|
+
return this[s].call(this, t, r, o, i);
|
|
677
677
|
},
|
|
678
678
|
configurable: !0
|
|
679
679
|
});
|
|
@@ -683,20 +683,20 @@ let N = class {
|
|
|
683
683
|
constructor(t) {
|
|
684
684
|
t && this.set(t);
|
|
685
685
|
}
|
|
686
|
-
set(t, n,
|
|
687
|
-
const
|
|
686
|
+
set(t, n, s) {
|
|
687
|
+
const r = this;
|
|
688
688
|
function o(c, f, u) {
|
|
689
689
|
const l = G(f);
|
|
690
690
|
if (!l)
|
|
691
691
|
throw new Error("header name must be a non-empty string");
|
|
692
|
-
const d = a.findKey(
|
|
693
|
-
(!d ||
|
|
692
|
+
const d = a.findKey(r, l);
|
|
693
|
+
(!d || r[d] === void 0 || u === !0 || u === void 0 && r[d] !== !1) && (r[d || f] = Y(c));
|
|
694
694
|
}
|
|
695
695
|
const i = (c, f) => a.forEach(c, (u, l) => o(u, l, f));
|
|
696
696
|
if (a.isPlainObject(t) || t instanceof this.constructor)
|
|
697
697
|
i(t, n);
|
|
698
|
-
else if (a.isString(t) && (t = t.trim()) && !
|
|
699
|
-
i(
|
|
698
|
+
else if (a.isString(t) && (t = t.trim()) && !Tn(t))
|
|
699
|
+
i(gn(t), n);
|
|
700
700
|
else if (a.isObject(t) && a.isIterable(t)) {
|
|
701
701
|
let c = {}, f, u;
|
|
702
702
|
for (const l of t) {
|
|
@@ -706,63 +706,63 @@ let N = class {
|
|
|
706
706
|
}
|
|
707
707
|
i(c, n);
|
|
708
708
|
} else
|
|
709
|
-
t != null && o(n, t,
|
|
709
|
+
t != null && o(n, t, s);
|
|
710
710
|
return this;
|
|
711
711
|
}
|
|
712
712
|
get(t, n) {
|
|
713
713
|
if (t = G(t), t) {
|
|
714
|
-
const
|
|
715
|
-
if (
|
|
716
|
-
const
|
|
714
|
+
const s = a.findKey(this, t);
|
|
715
|
+
if (s) {
|
|
716
|
+
const r = this[s];
|
|
717
717
|
if (!n)
|
|
718
|
-
return
|
|
718
|
+
return r;
|
|
719
719
|
if (n === !0)
|
|
720
|
-
return
|
|
720
|
+
return wn(r);
|
|
721
721
|
if (a.isFunction(n))
|
|
722
|
-
return n.call(this,
|
|
722
|
+
return n.call(this, r, s);
|
|
723
723
|
if (a.isRegExp(n))
|
|
724
|
-
return n.exec(
|
|
724
|
+
return n.exec(r);
|
|
725
725
|
throw new TypeError("parser must be boolean|regexp|function");
|
|
726
726
|
}
|
|
727
727
|
}
|
|
728
728
|
}
|
|
729
729
|
has(t, n) {
|
|
730
730
|
if (t = G(t), t) {
|
|
731
|
-
const
|
|
732
|
-
return !!(
|
|
731
|
+
const s = a.findKey(this, t);
|
|
732
|
+
return !!(s && this[s] !== void 0 && (!n || ce(this, this[s], s, n)));
|
|
733
733
|
}
|
|
734
734
|
return !1;
|
|
735
735
|
}
|
|
736
736
|
delete(t, n) {
|
|
737
|
-
const
|
|
738
|
-
let
|
|
737
|
+
const s = this;
|
|
738
|
+
let r = !1;
|
|
739
739
|
function o(i) {
|
|
740
740
|
if (i = G(i), i) {
|
|
741
|
-
const c = a.findKey(
|
|
742
|
-
c && (!n || ce(
|
|
741
|
+
const c = a.findKey(s, i);
|
|
742
|
+
c && (!n || ce(s, s[c], c, n)) && (delete s[c], r = !0);
|
|
743
743
|
}
|
|
744
744
|
}
|
|
745
|
-
return a.isArray(t) ? t.forEach(o) : o(t),
|
|
745
|
+
return a.isArray(t) ? t.forEach(o) : o(t), r;
|
|
746
746
|
}
|
|
747
747
|
clear(t) {
|
|
748
748
|
const n = Object.keys(this);
|
|
749
|
-
let
|
|
750
|
-
for (;
|
|
751
|
-
const o = n[
|
|
752
|
-
(!t || ce(this, this[o], o, t, !0)) && (delete this[o],
|
|
749
|
+
let s = n.length, r = !1;
|
|
750
|
+
for (; s--; ) {
|
|
751
|
+
const o = n[s];
|
|
752
|
+
(!t || ce(this, this[o], o, t, !0)) && (delete this[o], r = !0);
|
|
753
753
|
}
|
|
754
|
-
return
|
|
754
|
+
return r;
|
|
755
755
|
}
|
|
756
756
|
normalize(t) {
|
|
757
|
-
const n = this,
|
|
758
|
-
return a.forEach(this, (
|
|
759
|
-
const i = a.findKey(
|
|
757
|
+
const n = this, s = {};
|
|
758
|
+
return a.forEach(this, (r, o) => {
|
|
759
|
+
const i = a.findKey(s, o);
|
|
760
760
|
if (i) {
|
|
761
|
-
n[i] = Y(
|
|
761
|
+
n[i] = Y(r), delete n[o];
|
|
762
762
|
return;
|
|
763
763
|
}
|
|
764
|
-
const c = t ?
|
|
765
|
-
c !== o && delete n[o], n[c] = Y(
|
|
764
|
+
const c = t ? bn(o) : String(o).trim();
|
|
765
|
+
c !== o && delete n[o], n[c] = Y(r), s[c] = !0;
|
|
766
766
|
}), this;
|
|
767
767
|
}
|
|
768
768
|
concat(...t) {
|
|
@@ -770,8 +770,8 @@ let N = class {
|
|
|
770
770
|
}
|
|
771
771
|
toJSON(t) {
|
|
772
772
|
const n = /* @__PURE__ */ Object.create(null);
|
|
773
|
-
return a.forEach(this, (
|
|
774
|
-
|
|
773
|
+
return a.forEach(this, (s, r) => {
|
|
774
|
+
s != null && s !== !1 && (n[r] = t && a.isArray(s) ? s.join(", ") : s);
|
|
775
775
|
}), n;
|
|
776
776
|
}
|
|
777
777
|
[Symbol.iterator]() {
|
|
@@ -791,16 +791,16 @@ let N = class {
|
|
|
791
791
|
return t instanceof this ? t : new this(t);
|
|
792
792
|
}
|
|
793
793
|
static concat(t, ...n) {
|
|
794
|
-
const
|
|
795
|
-
return n.forEach((
|
|
794
|
+
const s = new this(t);
|
|
795
|
+
return n.forEach((r) => s.set(r)), s;
|
|
796
796
|
}
|
|
797
797
|
static accessor(t) {
|
|
798
|
-
const
|
|
798
|
+
const s = (this[_e] = this[_e] = {
|
|
799
799
|
accessors: {}
|
|
800
|
-
}).accessors,
|
|
800
|
+
}).accessors, r = this.prototype;
|
|
801
801
|
function o(i) {
|
|
802
802
|
const c = G(i);
|
|
803
|
-
|
|
803
|
+
s[c] || (On(r, i), s[c] = !0);
|
|
804
804
|
}
|
|
805
805
|
return a.isArray(t) ? t.forEach(o) : o(t), this;
|
|
806
806
|
}
|
|
@@ -810,18 +810,18 @@ a.reduceDescriptors(N.prototype, ({ value: e }, t) => {
|
|
|
810
810
|
let n = t[0].toUpperCase() + t.slice(1);
|
|
811
811
|
return {
|
|
812
812
|
get: () => e,
|
|
813
|
-
set(
|
|
814
|
-
this[n] =
|
|
813
|
+
set(s) {
|
|
814
|
+
this[n] = s;
|
|
815
815
|
}
|
|
816
816
|
};
|
|
817
817
|
});
|
|
818
818
|
a.freezeMethods(N);
|
|
819
819
|
function ue(e, t) {
|
|
820
|
-
const n = this || J,
|
|
821
|
-
let o =
|
|
820
|
+
const n = this || J, s = t || n, r = N.from(s.headers);
|
|
821
|
+
let o = s.data;
|
|
822
822
|
return a.forEach(e, function(c) {
|
|
823
|
-
o = c.call(n, o,
|
|
824
|
-
}),
|
|
823
|
+
o = c.call(n, o, r.normalize(), t ? t.status : void 0);
|
|
824
|
+
}), r.normalize(), o;
|
|
825
825
|
}
|
|
826
826
|
function et(e) {
|
|
827
827
|
return !!(e && e.__CANCEL__);
|
|
@@ -833,8 +833,8 @@ a.inherits(K, E, {
|
|
|
833
833
|
__CANCEL__: !0
|
|
834
834
|
});
|
|
835
835
|
function tt(e, t, n) {
|
|
836
|
-
const
|
|
837
|
-
!n.status || !
|
|
836
|
+
const s = n.config.validateStatus;
|
|
837
|
+
!n.status || !s || s(n.status) ? e(n) : t(new E(
|
|
838
838
|
"Request failed with status code " + n.status,
|
|
839
839
|
[E.ERR_BAD_REQUEST, E.ERR_BAD_RESPONSE][Math.floor(n.status / 100) - 4],
|
|
840
840
|
n.config,
|
|
@@ -842,44 +842,44 @@ function tt(e, t, n) {
|
|
|
842
842
|
n
|
|
843
843
|
));
|
|
844
844
|
}
|
|
845
|
-
function
|
|
845
|
+
function An(e) {
|
|
846
846
|
const t = /^([-+\w]{1,25})(:?\/\/|:)/.exec(e);
|
|
847
847
|
return t && t[1] || "";
|
|
848
848
|
}
|
|
849
|
-
function
|
|
849
|
+
function _n(e, t) {
|
|
850
850
|
e = e || 10;
|
|
851
|
-
const n = new Array(e),
|
|
852
|
-
let
|
|
851
|
+
const n = new Array(e), s = new Array(e);
|
|
852
|
+
let r = 0, o = 0, i;
|
|
853
853
|
return t = t !== void 0 ? t : 1e3, function(f) {
|
|
854
|
-
const u = Date.now(), l =
|
|
855
|
-
i || (i = u), n[
|
|
854
|
+
const u = Date.now(), l = s[o];
|
|
855
|
+
i || (i = u), n[r] = f, s[r] = u;
|
|
856
856
|
let d = o, y = 0;
|
|
857
|
-
for (; d !==
|
|
857
|
+
for (; d !== r; )
|
|
858
858
|
y += n[d++], d = d % e;
|
|
859
|
-
if (
|
|
859
|
+
if (r = (r + 1) % e, r === o && (o = (o + 1) % e), u - i < t)
|
|
860
860
|
return;
|
|
861
861
|
const R = l && u - l;
|
|
862
862
|
return R ? Math.round(y * 1e3 / R) : void 0;
|
|
863
863
|
};
|
|
864
864
|
}
|
|
865
|
-
function
|
|
866
|
-
let n = 0,
|
|
865
|
+
function Nn(e, t) {
|
|
866
|
+
let n = 0, s = 1e3 / t, r, o;
|
|
867
867
|
const i = (u, l = Date.now()) => {
|
|
868
|
-
n = l,
|
|
868
|
+
n = l, r = null, o && (clearTimeout(o), o = null), e.apply(null, u);
|
|
869
869
|
};
|
|
870
870
|
return [(...u) => {
|
|
871
871
|
const l = Date.now(), d = l - n;
|
|
872
|
-
d >=
|
|
873
|
-
o = null, i(
|
|
874
|
-
},
|
|
875
|
-
}, () =>
|
|
872
|
+
d >= s ? i(u, l) : (r = u, o || (o = setTimeout(() => {
|
|
873
|
+
o = null, i(r);
|
|
874
|
+
}, s - d)));
|
|
875
|
+
}, () => r && i(r)];
|
|
876
876
|
}
|
|
877
877
|
const Q = (e, t, n = 3) => {
|
|
878
|
-
let
|
|
879
|
-
const
|
|
880
|
-
return
|
|
881
|
-
const i = o.loaded, c = o.lengthComputable ? o.total : void 0, f = i -
|
|
882
|
-
|
|
878
|
+
let s = 0;
|
|
879
|
+
const r = _n(50, 250);
|
|
880
|
+
return Nn((o) => {
|
|
881
|
+
const i = o.loaded, c = o.lengthComputable ? o.total : void 0, f = i - s, u = r(f), l = i <= c;
|
|
882
|
+
s = i;
|
|
883
883
|
const d = {
|
|
884
884
|
loaded: i,
|
|
885
885
|
total: c,
|
|
@@ -895,20 +895,20 @@ const Q = (e, t, n = 3) => {
|
|
|
895
895
|
}, n);
|
|
896
896
|
}, Ne = (e, t) => {
|
|
897
897
|
const n = e != null;
|
|
898
|
-
return [(
|
|
898
|
+
return [(s) => t[0]({
|
|
899
899
|
lengthComputable: n,
|
|
900
900
|
total: e,
|
|
901
|
-
loaded:
|
|
901
|
+
loaded: s
|
|
902
902
|
}), t[1]];
|
|
903
|
-
}, Ce = (e) => (...t) => a.asap(() => e(...t)),
|
|
903
|
+
}, Ce = (e) => (...t) => a.asap(() => e(...t)), Cn = O.hasStandardBrowserEnv ? /* @__PURE__ */ ((e, t) => (n) => (n = new URL(n, O.origin), e.protocol === n.protocol && e.host === n.host && (t || e.port === n.port)))(
|
|
904
904
|
new URL(O.origin),
|
|
905
905
|
O.navigator && /(msie|trident)/i.test(O.navigator.userAgent)
|
|
906
|
-
) : () => !0,
|
|
906
|
+
) : () => !0, kn = O.hasStandardBrowserEnv ? (
|
|
907
907
|
// Standard browser envs support document.cookie
|
|
908
908
|
{
|
|
909
|
-
write(e, t, n,
|
|
909
|
+
write(e, t, n, s, r, o) {
|
|
910
910
|
const i = [e + "=" + encodeURIComponent(t)];
|
|
911
|
-
a.isNumber(n) && i.push("expires=" + new Date(n).toGMTString()), a.isString(
|
|
911
|
+
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("; ");
|
|
912
912
|
},
|
|
913
913
|
read(e) {
|
|
914
914
|
const t = document.cookie.match(new RegExp("(^|;\\s*)(" + e + ")=([^;]*)"));
|
|
@@ -930,44 +930,44 @@ const Q = (e, t, n = 3) => {
|
|
|
930
930
|
}
|
|
931
931
|
}
|
|
932
932
|
);
|
|
933
|
-
function
|
|
933
|
+
function Un(e) {
|
|
934
934
|
return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(e);
|
|
935
935
|
}
|
|
936
|
-
function
|
|
936
|
+
function In(e, t) {
|
|
937
937
|
return t ? e.replace(/\/?\/$/, "") + "/" + t.replace(/^\/+/, "") : e;
|
|
938
938
|
}
|
|
939
939
|
function nt(e, t, n) {
|
|
940
|
-
let
|
|
941
|
-
return e && (
|
|
940
|
+
let s = !Un(t);
|
|
941
|
+
return e && (s || n == !1) ? In(e, t) : t;
|
|
942
942
|
}
|
|
943
943
|
const ke = (e) => e instanceof N ? { ...e } : e;
|
|
944
944
|
function M(e, t) {
|
|
945
945
|
t = t || {};
|
|
946
946
|
const n = {};
|
|
947
|
-
function
|
|
947
|
+
function s(u, l, d, y) {
|
|
948
948
|
return a.isPlainObject(u) && a.isPlainObject(l) ? a.merge.call({ caseless: y }, u, l) : a.isPlainObject(l) ? a.merge({}, l) : a.isArray(l) ? l.slice() : l;
|
|
949
949
|
}
|
|
950
|
-
function
|
|
950
|
+
function r(u, l, d, y) {
|
|
951
951
|
if (a.isUndefined(l)) {
|
|
952
952
|
if (!a.isUndefined(u))
|
|
953
|
-
return
|
|
954
|
-
} else return
|
|
953
|
+
return s(void 0, u, d, y);
|
|
954
|
+
} else return s(u, l, d, y);
|
|
955
955
|
}
|
|
956
956
|
function o(u, l) {
|
|
957
957
|
if (!a.isUndefined(l))
|
|
958
|
-
return
|
|
958
|
+
return s(void 0, l);
|
|
959
959
|
}
|
|
960
960
|
function i(u, l) {
|
|
961
961
|
if (a.isUndefined(l)) {
|
|
962
962
|
if (!a.isUndefined(u))
|
|
963
|
-
return
|
|
964
|
-
} else return
|
|
963
|
+
return s(void 0, u);
|
|
964
|
+
} else return s(void 0, l);
|
|
965
965
|
}
|
|
966
966
|
function c(u, l, d) {
|
|
967
967
|
if (d in t)
|
|
968
|
-
return
|
|
968
|
+
return s(u, l);
|
|
969
969
|
if (d in e)
|
|
970
|
-
return
|
|
970
|
+
return s(void 0, u);
|
|
971
971
|
}
|
|
972
972
|
const f = {
|
|
973
973
|
url: o,
|
|
@@ -998,16 +998,16 @@ function M(e, t) {
|
|
|
998
998
|
socketPath: i,
|
|
999
999
|
responseEncoding: i,
|
|
1000
1000
|
validateStatus: c,
|
|
1001
|
-
headers: (u, l, d) =>
|
|
1001
|
+
headers: (u, l, d) => r(ke(u), ke(l), d, !0)
|
|
1002
1002
|
};
|
|
1003
1003
|
return a.forEach(Object.keys(Object.assign({}, e, t)), function(l) {
|
|
1004
|
-
const d = f[l] ||
|
|
1004
|
+
const d = f[l] || r, y = d(e[l], t[l], l);
|
|
1005
1005
|
a.isUndefined(y) && d !== c || (n[l] = y);
|
|
1006
1006
|
}), n;
|
|
1007
1007
|
}
|
|
1008
|
-
const
|
|
1008
|
+
const st = (e) => {
|
|
1009
1009
|
const t = M({}, e);
|
|
1010
|
-
let { data: n, withXSRFToken:
|
|
1010
|
+
let { data: n, withXSRFToken: s, xsrfHeaderName: r, xsrfCookieName: o, headers: i, auth: c } = t;
|
|
1011
1011
|
t.headers = i = N.from(i), t.url = Ye(nt(t.baseURL, t.url, t.allowAbsoluteUrls), e.params, e.paramsSerializer), c && i.set(
|
|
1012
1012
|
"Authorization",
|
|
1013
1013
|
"Basic " + btoa((c.username || "") + ":" + (c.password ? unescape(encodeURIComponent(c.password)) : ""))
|
|
@@ -1021,22 +1021,22 @@ const rt = (e) => {
|
|
|
1021
1021
|
i.setContentType([u || "multipart/form-data", ...l].join("; "));
|
|
1022
1022
|
}
|
|
1023
1023
|
}
|
|
1024
|
-
if (O.hasStandardBrowserEnv && (
|
|
1025
|
-
const u =
|
|
1026
|
-
u && i.set(
|
|
1024
|
+
if (O.hasStandardBrowserEnv && (s && a.isFunction(s) && (s = s(t)), s || s !== !1 && Cn(t.url))) {
|
|
1025
|
+
const u = r && o && kn.read(o);
|
|
1026
|
+
u && i.set(r, u);
|
|
1027
1027
|
}
|
|
1028
1028
|
return t;
|
|
1029
|
-
},
|
|
1030
|
-
return new Promise(function(n,
|
|
1031
|
-
const
|
|
1032
|
-
let o =
|
|
1033
|
-
const i = N.from(
|
|
1034
|
-
let { responseType: c, onUploadProgress: f, onDownloadProgress: u } =
|
|
1029
|
+
}, xn = typeof XMLHttpRequest < "u", Pn = xn && function(e) {
|
|
1030
|
+
return new Promise(function(n, s) {
|
|
1031
|
+
const r = st(e);
|
|
1032
|
+
let o = r.data;
|
|
1033
|
+
const i = N.from(r.headers).normalize();
|
|
1034
|
+
let { responseType: c, onUploadProgress: f, onDownloadProgress: u } = r, l, d, y, R, h;
|
|
1035
1035
|
function m() {
|
|
1036
|
-
R && R(), h && h(),
|
|
1036
|
+
R && R(), h && h(), r.cancelToken && r.cancelToken.unsubscribe(l), r.signal && r.signal.removeEventListener("abort", l);
|
|
1037
1037
|
}
|
|
1038
1038
|
let p = new XMLHttpRequest();
|
|
1039
|
-
p.open(
|
|
1039
|
+
p.open(r.method.toUpperCase(), r.url, !0), p.timeout = r.timeout;
|
|
1040
1040
|
function S() {
|
|
1041
1041
|
if (!p)
|
|
1042
1042
|
return;
|
|
@@ -1053,19 +1053,19 @@ const rt = (e) => {
|
|
|
1053
1053
|
tt(function(B) {
|
|
1054
1054
|
n(B), m();
|
|
1055
1055
|
}, function(B) {
|
|
1056
|
-
|
|
1056
|
+
s(B), m();
|
|
1057
1057
|
}, A), p = null;
|
|
1058
1058
|
}
|
|
1059
1059
|
"onloadend" in p ? p.onloadend = S : p.onreadystatechange = function() {
|
|
1060
1060
|
!p || p.readyState !== 4 || p.status === 0 && !(p.responseURL && p.responseURL.indexOf("file:") === 0) || setTimeout(S);
|
|
1061
1061
|
}, p.onabort = function() {
|
|
1062
|
-
p && (
|
|
1062
|
+
p && (s(new E("Request aborted", E.ECONNABORTED, e, p)), p = null);
|
|
1063
1063
|
}, p.onerror = function() {
|
|
1064
|
-
|
|
1064
|
+
s(new E("Network Error", E.ERR_NETWORK, e, p)), p = null;
|
|
1065
1065
|
}, p.ontimeout = function() {
|
|
1066
|
-
let P =
|
|
1067
|
-
const A =
|
|
1068
|
-
|
|
1066
|
+
let P = r.timeout ? "timeout of " + r.timeout + "ms exceeded" : "timeout exceeded";
|
|
1067
|
+
const A = r.transitional || Ze;
|
|
1068
|
+
r.timeoutErrorMessage && (P = r.timeoutErrorMessage), s(new E(
|
|
1069
1069
|
P,
|
|
1070
1070
|
A.clarifyTimeoutError ? E.ETIMEDOUT : E.ECONNABORTED,
|
|
1071
1071
|
e,
|
|
@@ -1073,25 +1073,25 @@ const rt = (e) => {
|
|
|
1073
1073
|
)), p = null;
|
|
1074
1074
|
}, o === void 0 && i.setContentType(null), "setRequestHeader" in p && a.forEach(i.toJSON(), function(P, A) {
|
|
1075
1075
|
p.setRequestHeader(A, P);
|
|
1076
|
-
}), a.isUndefined(
|
|
1077
|
-
p && (
|
|
1078
|
-
},
|
|
1079
|
-
const w =
|
|
1076
|
+
}), a.isUndefined(r.withCredentials) || (p.withCredentials = !!r.withCredentials), c && c !== "json" && (p.responseType = r.responseType), u && ([y, h] = Q(u, !0), p.addEventListener("progress", y)), f && p.upload && ([d, R] = Q(f), p.upload.addEventListener("progress", d), p.upload.addEventListener("loadend", R)), (r.cancelToken || r.signal) && (l = (T) => {
|
|
1077
|
+
p && (s(!T || T.type ? new K(null, e, p) : T), p.abort(), p = null);
|
|
1078
|
+
}, r.cancelToken && r.cancelToken.subscribe(l), r.signal && (r.signal.aborted ? l() : r.signal.addEventListener("abort", l)));
|
|
1079
|
+
const w = An(r.url);
|
|
1080
1080
|
if (w && O.protocols.indexOf(w) === -1) {
|
|
1081
|
-
|
|
1081
|
+
s(new E("Unsupported protocol " + w + ":", E.ERR_BAD_REQUEST, e));
|
|
1082
1082
|
return;
|
|
1083
1083
|
}
|
|
1084
1084
|
p.send(o || null);
|
|
1085
1085
|
});
|
|
1086
|
-
},
|
|
1086
|
+
}, Ln = (e, t) => {
|
|
1087
1087
|
const { length: n } = e = e ? e.filter(Boolean) : [];
|
|
1088
1088
|
if (t || n) {
|
|
1089
|
-
let
|
|
1089
|
+
let s = new AbortController(), r;
|
|
1090
1090
|
const o = function(u) {
|
|
1091
|
-
if (!
|
|
1092
|
-
|
|
1091
|
+
if (!r) {
|
|
1092
|
+
r = !0, c();
|
|
1093
1093
|
const l = u instanceof Error ? u : this.reason;
|
|
1094
|
-
|
|
1094
|
+
s.abort(l instanceof E ? l : new K(l instanceof Error ? l.message : l));
|
|
1095
1095
|
}
|
|
1096
1096
|
};
|
|
1097
1097
|
let i = t && setTimeout(() => {
|
|
@@ -1103,22 +1103,22 @@ const rt = (e) => {
|
|
|
1103
1103
|
}), e = null);
|
|
1104
1104
|
};
|
|
1105
1105
|
e.forEach((u) => u.addEventListener("abort", o));
|
|
1106
|
-
const { signal: f } =
|
|
1106
|
+
const { signal: f } = s;
|
|
1107
1107
|
return f.unsubscribe = () => a.asap(c), f;
|
|
1108
1108
|
}
|
|
1109
|
-
},
|
|
1109
|
+
}, Fn = function* (e, t) {
|
|
1110
1110
|
let n = e.byteLength;
|
|
1111
1111
|
if (n < t) {
|
|
1112
1112
|
yield e;
|
|
1113
1113
|
return;
|
|
1114
1114
|
}
|
|
1115
|
-
let
|
|
1116
|
-
for (;
|
|
1117
|
-
|
|
1118
|
-
},
|
|
1119
|
-
for await (const n of
|
|
1120
|
-
yield*
|
|
1121
|
-
},
|
|
1115
|
+
let s = 0, r;
|
|
1116
|
+
for (; s < n; )
|
|
1117
|
+
r = s + t, yield e.slice(s, r), s = r;
|
|
1118
|
+
}, Dn = async function* (e, t) {
|
|
1119
|
+
for await (const n of Bn(e))
|
|
1120
|
+
yield* Fn(n, t);
|
|
1121
|
+
}, Bn = async function* (e) {
|
|
1122
1122
|
if (e[Symbol.asyncIterator]) {
|
|
1123
1123
|
yield* e;
|
|
1124
1124
|
return;
|
|
@@ -1126,23 +1126,23 @@ const rt = (e) => {
|
|
|
1126
1126
|
const t = e.getReader();
|
|
1127
1127
|
try {
|
|
1128
1128
|
for (; ; ) {
|
|
1129
|
-
const { done: n, value:
|
|
1129
|
+
const { done: n, value: s } = await t.read();
|
|
1130
1130
|
if (n)
|
|
1131
1131
|
break;
|
|
1132
|
-
yield
|
|
1132
|
+
yield s;
|
|
1133
1133
|
}
|
|
1134
1134
|
} finally {
|
|
1135
1135
|
await t.cancel();
|
|
1136
1136
|
}
|
|
1137
|
-
}, Ue = (e, t, n,
|
|
1138
|
-
const
|
|
1137
|
+
}, Ue = (e, t, n, s) => {
|
|
1138
|
+
const r = Dn(e, t);
|
|
1139
1139
|
let o = 0, i, c = (f) => {
|
|
1140
|
-
i || (i = !0,
|
|
1140
|
+
i || (i = !0, s && s(f));
|
|
1141
1141
|
};
|
|
1142
1142
|
return new ReadableStream({
|
|
1143
1143
|
async pull(f) {
|
|
1144
1144
|
try {
|
|
1145
|
-
const { done: u, value: l } = await
|
|
1145
|
+
const { done: u, value: l } = await r.next();
|
|
1146
1146
|
if (u) {
|
|
1147
1147
|
c(), f.close();
|
|
1148
1148
|
return;
|
|
@@ -1158,18 +1158,18 @@ const rt = (e) => {
|
|
|
1158
1158
|
}
|
|
1159
1159
|
},
|
|
1160
1160
|
cancel(f) {
|
|
1161
|
-
return c(f),
|
|
1161
|
+
return c(f), r.return();
|
|
1162
1162
|
}
|
|
1163
1163
|
}, {
|
|
1164
1164
|
highWaterMark: 2
|
|
1165
1165
|
});
|
|
1166
|
-
}, ie = typeof fetch == "function" && typeof Request == "function" && typeof Response == "function",
|
|
1166
|
+
}, ie = typeof fetch == "function" && typeof Request == "function" && typeof Response == "function", rt = ie && typeof ReadableStream == "function", qn = ie && (typeof TextEncoder == "function" ? /* @__PURE__ */ ((e) => (t) => e.encode(t))(new TextEncoder()) : async (e) => new Uint8Array(await new Response(e).arrayBuffer())), ot = (e, ...t) => {
|
|
1167
1167
|
try {
|
|
1168
1168
|
return !!e(...t);
|
|
1169
1169
|
} catch {
|
|
1170
1170
|
return !1;
|
|
1171
1171
|
}
|
|
1172
|
-
},
|
|
1172
|
+
}, Hn = rt && ot(() => {
|
|
1173
1173
|
let e = !1;
|
|
1174
1174
|
const t = new Request(O.origin, {
|
|
1175
1175
|
body: new ReadableStream(),
|
|
@@ -1179,17 +1179,17 @@ const rt = (e) => {
|
|
|
1179
1179
|
}
|
|
1180
1180
|
}).headers.has("Content-Type");
|
|
1181
1181
|
return e && !t;
|
|
1182
|
-
}), Ie = 64 * 1024, he =
|
|
1182
|
+
}), Ie = 64 * 1024, he = rt && ot(() => a.isReadableStream(new Response("").body)), ee = {
|
|
1183
1183
|
stream: he && ((e) => e.body)
|
|
1184
1184
|
};
|
|
1185
1185
|
ie && ((e) => {
|
|
1186
1186
|
["text", "arrayBuffer", "blob", "formData", "stream"].forEach((t) => {
|
|
1187
|
-
!ee[t] && (ee[t] = a.isFunction(e[t]) ? (n) => n[t]() : (n,
|
|
1188
|
-
throw new E(`Response type '${t}' is not supported`, E.ERR_NOT_SUPPORT,
|
|
1187
|
+
!ee[t] && (ee[t] = a.isFunction(e[t]) ? (n) => n[t]() : (n, s) => {
|
|
1188
|
+
throw new E(`Response type '${t}' is not supported`, E.ERR_NOT_SUPPORT, s);
|
|
1189
1189
|
});
|
|
1190
1190
|
});
|
|
1191
1191
|
})(new Response());
|
|
1192
|
-
const
|
|
1192
|
+
const Mn = async (e) => {
|
|
1193
1193
|
if (e == null)
|
|
1194
1194
|
return 0;
|
|
1195
1195
|
if (a.isBlob(e))
|
|
@@ -1202,16 +1202,16 @@ const Hn = async (e) => {
|
|
|
1202
1202
|
if (a.isArrayBufferView(e) || a.isArrayBuffer(e))
|
|
1203
1203
|
return e.byteLength;
|
|
1204
1204
|
if (a.isURLSearchParams(e) && (e = e + ""), a.isString(e))
|
|
1205
|
-
return (await
|
|
1206
|
-
},
|
|
1205
|
+
return (await qn(e)).byteLength;
|
|
1206
|
+
}, jn = async (e, t) => {
|
|
1207
1207
|
const n = a.toFiniteNumber(e.getContentLength());
|
|
1208
|
-
return n ??
|
|
1209
|
-
},
|
|
1208
|
+
return n ?? Mn(t);
|
|
1209
|
+
}, zn = ie && (async (e) => {
|
|
1210
1210
|
let {
|
|
1211
1211
|
url: t,
|
|
1212
1212
|
method: n,
|
|
1213
|
-
data:
|
|
1214
|
-
signal:
|
|
1213
|
+
data: s,
|
|
1214
|
+
signal: r,
|
|
1215
1215
|
cancelToken: o,
|
|
1216
1216
|
timeout: i,
|
|
1217
1217
|
onDownloadProgress: c,
|
|
@@ -1220,26 +1220,26 @@ const Hn = async (e) => {
|
|
|
1220
1220
|
headers: l,
|
|
1221
1221
|
withCredentials: d = "same-origin",
|
|
1222
1222
|
fetchOptions: y
|
|
1223
|
-
} =
|
|
1223
|
+
} = st(e);
|
|
1224
1224
|
u = u ? (u + "").toLowerCase() : "text";
|
|
1225
|
-
let R =
|
|
1225
|
+
let R = Ln([r, o && o.toAbortSignal()], i), h;
|
|
1226
1226
|
const m = R && R.unsubscribe && (() => {
|
|
1227
1227
|
R.unsubscribe();
|
|
1228
1228
|
});
|
|
1229
1229
|
let p;
|
|
1230
1230
|
try {
|
|
1231
|
-
if (f &&
|
|
1231
|
+
if (f && Hn && n !== "get" && n !== "head" && (p = await jn(l, s)) !== 0) {
|
|
1232
1232
|
let A = new Request(t, {
|
|
1233
1233
|
method: "POST",
|
|
1234
|
-
body:
|
|
1234
|
+
body: s,
|
|
1235
1235
|
duplex: "half"
|
|
1236
1236
|
}), F;
|
|
1237
|
-
if (a.isFormData(
|
|
1237
|
+
if (a.isFormData(s) && (F = A.headers.get("content-type")) && l.setContentType(F), A.body) {
|
|
1238
1238
|
const [B, W] = Ne(
|
|
1239
1239
|
p,
|
|
1240
1240
|
Q(Ce(f))
|
|
1241
1241
|
);
|
|
1242
|
-
|
|
1242
|
+
s = Ue(A.body, Ie, B, W);
|
|
1243
1243
|
}
|
|
1244
1244
|
}
|
|
1245
1245
|
a.isString(d) || (d = d ? "include" : "omit");
|
|
@@ -1249,7 +1249,7 @@ const Hn = async (e) => {
|
|
|
1249
1249
|
signal: R,
|
|
1250
1250
|
method: n.toUpperCase(),
|
|
1251
1251
|
headers: l.normalize().toJSON(),
|
|
1252
|
-
body:
|
|
1252
|
+
body: s,
|
|
1253
1253
|
duplex: "half",
|
|
1254
1254
|
credentials: S ? d : void 0
|
|
1255
1255
|
});
|
|
@@ -1292,9 +1292,9 @@ const Hn = async (e) => {
|
|
|
1292
1292
|
) : E.from(S, S && S.code, e, h);
|
|
1293
1293
|
}
|
|
1294
1294
|
}), me = {
|
|
1295
|
-
http:
|
|
1296
|
-
xhr:
|
|
1297
|
-
fetch:
|
|
1295
|
+
http: nn,
|
|
1296
|
+
xhr: Pn,
|
|
1297
|
+
fetch: zn
|
|
1298
1298
|
};
|
|
1299
1299
|
a.forEach(me, (e, t) => {
|
|
1300
1300
|
if (e) {
|
|
@@ -1305,23 +1305,23 @@ a.forEach(me, (e, t) => {
|
|
|
1305
1305
|
Object.defineProperty(e, "adapterName", { value: t });
|
|
1306
1306
|
}
|
|
1307
1307
|
});
|
|
1308
|
-
const xe = (e) => `- ${e}`,
|
|
1308
|
+
const xe = (e) => `- ${e}`, Kn = (e) => a.isFunction(e) || e === null || e === !1, it = {
|
|
1309
1309
|
getAdapter: (e) => {
|
|
1310
1310
|
e = a.isArray(e) ? e : [e];
|
|
1311
1311
|
const { length: t } = e;
|
|
1312
|
-
let n,
|
|
1313
|
-
const
|
|
1312
|
+
let n, s;
|
|
1313
|
+
const r = {};
|
|
1314
1314
|
for (let o = 0; o < t; o++) {
|
|
1315
1315
|
n = e[o];
|
|
1316
1316
|
let i;
|
|
1317
|
-
if (
|
|
1317
|
+
if (s = n, !Kn(n) && (s = me[(i = String(n)).toLowerCase()], s === void 0))
|
|
1318
1318
|
throw new E(`Unknown adapter '${i}'`);
|
|
1319
|
-
if (
|
|
1319
|
+
if (s)
|
|
1320
1320
|
break;
|
|
1321
|
-
|
|
1321
|
+
r[i || "#" + o] = s;
|
|
1322
1322
|
}
|
|
1323
|
-
if (!
|
|
1324
|
-
const o = Object.entries(
|
|
1323
|
+
if (!s) {
|
|
1324
|
+
const o = Object.entries(r).map(
|
|
1325
1325
|
([c, f]) => `adapter ${c} ` + (f === !1 ? "is not supported by the environment" : "is not available in the build")
|
|
1326
1326
|
);
|
|
1327
1327
|
let i = t ? o.length > 1 ? `since :
|
|
@@ -1332,7 +1332,7 @@ const xe = (e) => `- ${e}`, zn = (e) => a.isFunction(e) || e === null || e === !
|
|
|
1332
1332
|
"ERR_NOT_SUPPORT"
|
|
1333
1333
|
);
|
|
1334
1334
|
}
|
|
1335
|
-
return
|
|
1335
|
+
return s;
|
|
1336
1336
|
},
|
|
1337
1337
|
adapters: me
|
|
1338
1338
|
};
|
|
@@ -1344,39 +1344,39 @@ function Pe(e) {
|
|
|
1344
1344
|
return le(e), e.headers = N.from(e.headers), e.data = ue.call(
|
|
1345
1345
|
e,
|
|
1346
1346
|
e.transformRequest
|
|
1347
|
-
), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), it.getAdapter(e.adapter || J.adapter)(e).then(function(
|
|
1348
|
-
return le(e),
|
|
1347
|
+
), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), it.getAdapter(e.adapter || J.adapter)(e).then(function(s) {
|
|
1348
|
+
return le(e), s.data = ue.call(
|
|
1349
1349
|
e,
|
|
1350
1350
|
e.transformResponse,
|
|
1351
|
-
|
|
1352
|
-
),
|
|
1353
|
-
}, function(
|
|
1354
|
-
return et(
|
|
1351
|
+
s
|
|
1352
|
+
), s.headers = N.from(s.headers), s;
|
|
1353
|
+
}, function(s) {
|
|
1354
|
+
return et(s) || (le(e), s && s.response && (s.response.data = ue.call(
|
|
1355
1355
|
e,
|
|
1356
1356
|
e.transformResponse,
|
|
1357
|
-
|
|
1358
|
-
),
|
|
1357
|
+
s.response
|
|
1358
|
+
), s.response.headers = N.from(s.response.headers))), Promise.reject(s);
|
|
1359
1359
|
});
|
|
1360
1360
|
}
|
|
1361
1361
|
const at = "1.9.0", ae = {};
|
|
1362
1362
|
["object", "boolean", "number", "function", "string", "symbol"].forEach((e, t) => {
|
|
1363
|
-
ae[e] = function(
|
|
1364
|
-
return typeof
|
|
1363
|
+
ae[e] = function(s) {
|
|
1364
|
+
return typeof s === e || "a" + (t < 1 ? "n " : " ") + e;
|
|
1365
1365
|
};
|
|
1366
1366
|
});
|
|
1367
1367
|
const Le = {};
|
|
1368
|
-
ae.transitional = function(t, n,
|
|
1369
|
-
function
|
|
1370
|
-
return "[Axios v" + at + "] Transitional option '" + o + "'" + i + (
|
|
1368
|
+
ae.transitional = function(t, n, s) {
|
|
1369
|
+
function r(o, i) {
|
|
1370
|
+
return "[Axios v" + at + "] Transitional option '" + o + "'" + i + (s ? ". " + s : "");
|
|
1371
1371
|
}
|
|
1372
1372
|
return (o, i, c) => {
|
|
1373
1373
|
if (t === !1)
|
|
1374
1374
|
throw new E(
|
|
1375
|
-
|
|
1375
|
+
r(i, " has been removed" + (n ? " in " + n : "")),
|
|
1376
1376
|
E.ERR_DEPRECATED
|
|
1377
1377
|
);
|
|
1378
1378
|
return n && !Le[i] && (Le[i] = !0, console.warn(
|
|
1379
|
-
|
|
1379
|
+
r(
|
|
1380
1380
|
i,
|
|
1381
1381
|
" has been deprecated since v" + n + " and will be removed in the near future"
|
|
1382
1382
|
)
|
|
@@ -1384,15 +1384,15 @@ ae.transitional = function(t, n, r) {
|
|
|
1384
1384
|
};
|
|
1385
1385
|
};
|
|
1386
1386
|
ae.spelling = function(t) {
|
|
1387
|
-
return (n,
|
|
1387
|
+
return (n, s) => (console.warn(`${s} is likely a misspelling of ${t}`), !0);
|
|
1388
1388
|
};
|
|
1389
|
-
function
|
|
1389
|
+
function $n(e, t, n) {
|
|
1390
1390
|
if (typeof e != "object")
|
|
1391
1391
|
throw new E("options must be an object", E.ERR_BAD_OPTION_VALUE);
|
|
1392
|
-
const
|
|
1393
|
-
let
|
|
1394
|
-
for (;
|
|
1395
|
-
const o = r
|
|
1392
|
+
const s = Object.keys(e);
|
|
1393
|
+
let r = s.length;
|
|
1394
|
+
for (; r-- > 0; ) {
|
|
1395
|
+
const o = s[r], i = t[o];
|
|
1396
1396
|
if (i) {
|
|
1397
1397
|
const c = e[o], f = c === void 0 || i(c, o, e);
|
|
1398
1398
|
if (f !== !0)
|
|
@@ -1404,7 +1404,7 @@ function Kn(e, t, n) {
|
|
|
1404
1404
|
}
|
|
1405
1405
|
}
|
|
1406
1406
|
const Z = {
|
|
1407
|
-
assertOptions:
|
|
1407
|
+
assertOptions: $n,
|
|
1408
1408
|
validators: ae
|
|
1409
1409
|
}, I = Z.validators;
|
|
1410
1410
|
let H = class {
|
|
@@ -1425,30 +1425,30 @@ let H = class {
|
|
|
1425
1425
|
async request(t, n) {
|
|
1426
1426
|
try {
|
|
1427
1427
|
return await this._request(t, n);
|
|
1428
|
-
} catch (
|
|
1429
|
-
if (
|
|
1430
|
-
let
|
|
1431
|
-
Error.captureStackTrace ? Error.captureStackTrace(
|
|
1432
|
-
const o =
|
|
1428
|
+
} catch (s) {
|
|
1429
|
+
if (s instanceof Error) {
|
|
1430
|
+
let r = {};
|
|
1431
|
+
Error.captureStackTrace ? Error.captureStackTrace(r) : r = new Error();
|
|
1432
|
+
const o = r.stack ? r.stack.replace(/^.+\n/, "") : "";
|
|
1433
1433
|
try {
|
|
1434
|
-
|
|
1435
|
-
` + o) :
|
|
1434
|
+
s.stack ? o && !String(s.stack).endsWith(o.replace(/^.+\n.+\n/, "")) && (s.stack += `
|
|
1435
|
+
` + o) : s.stack = o;
|
|
1436
1436
|
} catch {
|
|
1437
1437
|
}
|
|
1438
1438
|
}
|
|
1439
|
-
throw
|
|
1439
|
+
throw s;
|
|
1440
1440
|
}
|
|
1441
1441
|
}
|
|
1442
1442
|
_request(t, n) {
|
|
1443
1443
|
typeof t == "string" ? (n = n || {}, n.url = t) : n = t || {}, n = M(this.defaults, n);
|
|
1444
|
-
const { transitional:
|
|
1445
|
-
|
|
1444
|
+
const { transitional: s, paramsSerializer: r, headers: o } = n;
|
|
1445
|
+
s !== void 0 && Z.assertOptions(s, {
|
|
1446
1446
|
silentJSONParsing: I.transitional(I.boolean),
|
|
1447
1447
|
forcedJSONParsing: I.transitional(I.boolean),
|
|
1448
1448
|
clarifyTimeoutError: I.transitional(I.boolean)
|
|
1449
|
-
}, !1),
|
|
1450
|
-
serialize:
|
|
1451
|
-
} : Z.assertOptions(
|
|
1449
|
+
}, !1), r != null && (a.isFunction(r) ? n.paramsSerializer = {
|
|
1450
|
+
serialize: r
|
|
1451
|
+
} : Z.assertOptions(r, {
|
|
1452
1452
|
encode: I.function,
|
|
1453
1453
|
serialize: I.function
|
|
1454
1454
|
}, !0)), n.allowAbsoluteUrls !== void 0 || (this.defaults.allowAbsoluteUrls !== void 0 ? n.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls : n.allowAbsoluteUrls = !0), Z.assertOptions(n, {
|
|
@@ -1508,20 +1508,20 @@ let H = class {
|
|
|
1508
1508
|
}
|
|
1509
1509
|
};
|
|
1510
1510
|
a.forEach(["delete", "get", "head", "options"], function(t) {
|
|
1511
|
-
H.prototype[t] = function(n,
|
|
1512
|
-
return this.request(M(
|
|
1511
|
+
H.prototype[t] = function(n, s) {
|
|
1512
|
+
return this.request(M(s || {}, {
|
|
1513
1513
|
method: t,
|
|
1514
1514
|
url: n,
|
|
1515
|
-
data: (
|
|
1515
|
+
data: (s || {}).data
|
|
1516
1516
|
}));
|
|
1517
1517
|
};
|
|
1518
1518
|
});
|
|
1519
1519
|
a.forEach(["post", "put", "patch"], function(t) {
|
|
1520
|
-
function n(
|
|
1520
|
+
function n(s) {
|
|
1521
1521
|
return function(o, i, c) {
|
|
1522
1522
|
return this.request(M(c || {}, {
|
|
1523
1523
|
method: t,
|
|
1524
|
-
headers:
|
|
1524
|
+
headers: s ? {
|
|
1525
1525
|
"Content-Type": "multipart/form-data"
|
|
1526
1526
|
} : {},
|
|
1527
1527
|
url: o,
|
|
@@ -1531,7 +1531,7 @@ a.forEach(["post", "put", "patch"], function(t) {
|
|
|
1531
1531
|
}
|
|
1532
1532
|
H.prototype[t] = n(), H.prototype[t + "Form"] = n(!0);
|
|
1533
1533
|
});
|
|
1534
|
-
let
|
|
1534
|
+
let Gn = class ct {
|
|
1535
1535
|
constructor(t) {
|
|
1536
1536
|
if (typeof t != "function")
|
|
1537
1537
|
throw new TypeError("executor must be a function.");
|
|
@@ -1539,23 +1539,23 @@ let $n = class ct {
|
|
|
1539
1539
|
this.promise = new Promise(function(o) {
|
|
1540
1540
|
n = o;
|
|
1541
1541
|
});
|
|
1542
|
-
const
|
|
1543
|
-
this.promise.then((
|
|
1544
|
-
if (!
|
|
1545
|
-
let o =
|
|
1542
|
+
const s = this;
|
|
1543
|
+
this.promise.then((r) => {
|
|
1544
|
+
if (!s._listeners) return;
|
|
1545
|
+
let o = s._listeners.length;
|
|
1546
1546
|
for (; o-- > 0; )
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
}), this.promise.then = (
|
|
1547
|
+
s._listeners[o](r);
|
|
1548
|
+
s._listeners = null;
|
|
1549
|
+
}), this.promise.then = (r) => {
|
|
1550
1550
|
let o;
|
|
1551
1551
|
const i = new Promise((c) => {
|
|
1552
|
-
|
|
1553
|
-
}).then(
|
|
1552
|
+
s.subscribe(c), o = c;
|
|
1553
|
+
}).then(r);
|
|
1554
1554
|
return i.cancel = function() {
|
|
1555
|
-
|
|
1555
|
+
s.unsubscribe(o);
|
|
1556
1556
|
}, i;
|
|
1557
1557
|
}, t(function(o, i, c) {
|
|
1558
|
-
|
|
1558
|
+
s.reason || (s.reason = new K(o, i, c), n(s.reason));
|
|
1559
1559
|
});
|
|
1560
1560
|
}
|
|
1561
1561
|
/**
|
|
@@ -1585,8 +1585,8 @@ let $n = class ct {
|
|
|
1585
1585
|
n !== -1 && this._listeners.splice(n, 1);
|
|
1586
1586
|
}
|
|
1587
1587
|
toAbortSignal() {
|
|
1588
|
-
const t = new AbortController(), n = (
|
|
1589
|
-
t.abort(
|
|
1588
|
+
const t = new AbortController(), n = (s) => {
|
|
1589
|
+
t.abort(s);
|
|
1590
1590
|
};
|
|
1591
1591
|
return this.subscribe(n), t.signal.unsubscribe = () => this.unsubscribe(n), t.signal;
|
|
1592
1592
|
}
|
|
@@ -1597,19 +1597,19 @@ let $n = class ct {
|
|
|
1597
1597
|
static source() {
|
|
1598
1598
|
let t;
|
|
1599
1599
|
return {
|
|
1600
|
-
token: new ct(function(
|
|
1601
|
-
t =
|
|
1600
|
+
token: new ct(function(r) {
|
|
1601
|
+
t = r;
|
|
1602
1602
|
}),
|
|
1603
1603
|
cancel: t
|
|
1604
1604
|
};
|
|
1605
1605
|
}
|
|
1606
1606
|
};
|
|
1607
|
-
function
|
|
1607
|
+
function vn(e) {
|
|
1608
1608
|
return function(n) {
|
|
1609
1609
|
return e.apply(null, n);
|
|
1610
1610
|
};
|
|
1611
1611
|
}
|
|
1612
|
-
function
|
|
1612
|
+
function Vn(e) {
|
|
1613
1613
|
return a.isObject(e) && e.isAxiosError === !0;
|
|
1614
1614
|
}
|
|
1615
1615
|
const Ee = {
|
|
@@ -1682,14 +1682,14 @@ Object.entries(Ee).forEach(([e, t]) => {
|
|
|
1682
1682
|
});
|
|
1683
1683
|
function ut(e) {
|
|
1684
1684
|
const t = new H(e), n = He(H.prototype.request, t);
|
|
1685
|
-
return a.extend(n, H.prototype, t, { allOwnKeys: !0 }), a.extend(n, t, null, { allOwnKeys: !0 }), n.create = function(
|
|
1686
|
-
return ut(M(e,
|
|
1685
|
+
return a.extend(n, H.prototype, t, { allOwnKeys: !0 }), a.extend(n, t, null, { allOwnKeys: !0 }), n.create = function(r) {
|
|
1686
|
+
return ut(M(e, r));
|
|
1687
1687
|
}, n;
|
|
1688
1688
|
}
|
|
1689
1689
|
const g = ut(J);
|
|
1690
1690
|
g.Axios = H;
|
|
1691
1691
|
g.CanceledError = K;
|
|
1692
|
-
g.CancelToken =
|
|
1692
|
+
g.CancelToken = Gn;
|
|
1693
1693
|
g.isCancel = et;
|
|
1694
1694
|
g.VERSION = at;
|
|
1695
1695
|
g.toFormData = oe;
|
|
@@ -1698,8 +1698,8 @@ g.Cancel = g.CanceledError;
|
|
|
1698
1698
|
g.all = function(t) {
|
|
1699
1699
|
return Promise.all(t);
|
|
1700
1700
|
};
|
|
1701
|
-
g.spread =
|
|
1702
|
-
g.isAxiosError =
|
|
1701
|
+
g.spread = vn;
|
|
1702
|
+
g.isAxiosError = Vn;
|
|
1703
1703
|
g.mergeConfig = M;
|
|
1704
1704
|
g.AxiosHeaders = N;
|
|
1705
1705
|
g.formToJSON = (e) => Qe(a.isHTMLForm(e) ? new FormData(e) : e);
|
|
@@ -1707,40 +1707,40 @@ g.getAdapter = it.getAdapter;
|
|
|
1707
1707
|
g.HttpStatusCode = Ee;
|
|
1708
1708
|
g.default = g;
|
|
1709
1709
|
const {
|
|
1710
|
-
Axios:
|
|
1711
|
-
AxiosError:
|
|
1712
|
-
CanceledError:
|
|
1713
|
-
isCancel:
|
|
1714
|
-
CancelToken:
|
|
1715
|
-
VERSION:
|
|
1716
|
-
all:
|
|
1717
|
-
Cancel:
|
|
1718
|
-
isAxiosError:
|
|
1719
|
-
spread:
|
|
1720
|
-
toFormData:
|
|
1721
|
-
AxiosHeaders:
|
|
1710
|
+
Axios: hs,
|
|
1711
|
+
AxiosError: Jn,
|
|
1712
|
+
CanceledError: ms,
|
|
1713
|
+
isCancel: Es,
|
|
1714
|
+
CancelToken: ys,
|
|
1715
|
+
VERSION: Rs,
|
|
1716
|
+
all: Ss,
|
|
1717
|
+
Cancel: gs,
|
|
1718
|
+
isAxiosError: ws,
|
|
1719
|
+
spread: Ts,
|
|
1720
|
+
toFormData: bs,
|
|
1721
|
+
AxiosHeaders: Os,
|
|
1722
1722
|
HttpStatusCode: D,
|
|
1723
|
-
formToJSON:
|
|
1724
|
-
getAdapter:
|
|
1725
|
-
mergeConfig:
|
|
1726
|
-
} = g,
|
|
1727
|
-
for (const
|
|
1728
|
-
t ?
|
|
1729
|
-
},
|
|
1723
|
+
formToJSON: As,
|
|
1724
|
+
getAdapter: _s,
|
|
1725
|
+
mergeConfig: Ns
|
|
1726
|
+
} = g, Wn = (e) => (e.baseURL = qe(), e.headers.Authorization = localStorage.getItem(x.TOKEN), e.headers["client-id"] = localStorage.getItem(x.CLIENT_ID), e.metadata = { startTime: /* @__PURE__ */ new Date() }, { ...e }), Fe = (e, t, n) => {
|
|
1727
|
+
for (const s of e)
|
|
1728
|
+
t ? s.rej(t) : s.res(n);
|
|
1729
|
+
}, Xn = async (e) => new Promise((t, n) => {
|
|
1730
1730
|
setTimeout(t, e);
|
|
1731
|
-
}),
|
|
1732
|
-
var
|
|
1733
|
-
let n = "",
|
|
1734
|
-
typeof t == "string" ? n = t : t instanceof
|
|
1731
|
+
}), Yn = async (e, t) => (await Xn(t), e()), De = (e, t) => {
|
|
1732
|
+
var r, o;
|
|
1733
|
+
let n = "", s = t;
|
|
1734
|
+
typeof t == "string" ? n = t : t instanceof Jn ? (n = t.message, s = {
|
|
1735
1735
|
message: t.message,
|
|
1736
1736
|
cause: t.cause,
|
|
1737
1737
|
status: t.status,
|
|
1738
|
-
data: (
|
|
1738
|
+
data: (r = t == null ? void 0 : t.response) == null ? void 0 : r.data
|
|
1739
1739
|
}) : n = t.message, (o = window.parent) == null || o.postMessage(
|
|
1740
|
-
{ type: "auth_error", details: { message: n, action: e, info:
|
|
1740
|
+
{ type: "auth_error", details: { message: n, action: e, info: s } },
|
|
1741
1741
|
"*"
|
|
1742
1742
|
);
|
|
1743
|
-
},
|
|
1743
|
+
}, Zn = async (e, t, n, s, r) => {
|
|
1744
1744
|
var f, u, l;
|
|
1745
1745
|
const o = t.config, i = localStorage.getItem(x.REFRESH_TOKEN), c = ((f = t.response) == null ? void 0 : f.status) || D.InternalServerError;
|
|
1746
1746
|
if (!o || o.__retries === n)
|
|
@@ -1751,17 +1751,17 @@ const {
|
|
|
1751
1751
|
"refresh_token",
|
|
1752
1752
|
"no refresh token found to reauthenticate user"
|
|
1753
1753
|
), t;
|
|
1754
|
-
if (
|
|
1754
|
+
if (s)
|
|
1755
1755
|
return new Promise((p, S) => {
|
|
1756
1756
|
e.push({ res: p, rej: S });
|
|
1757
|
-
}).then((p) => (o.headers && (o.headers.Authorization = `Bearer ${p}`),
|
|
1757
|
+
}).then((p) => (o.headers && (o.headers.Authorization = `Bearer ${p}`), r(o))).catch((p) => {
|
|
1758
1758
|
throw p;
|
|
1759
1759
|
});
|
|
1760
|
-
|
|
1760
|
+
s = !0;
|
|
1761
1761
|
const y = localStorage.getItem(x.AUTH_FLOW) === dt.POST_MESSAGE ? Be.refreshEmbedToken : Be.refreshToken, { data: R, success: h, message: m } = await y(i);
|
|
1762
1762
|
if (!h)
|
|
1763
|
-
throw (u = o == null ? void 0 : o.url) != null && u.includes(b.EXCHANGE_TOKEN) || De("refresh_token", m),
|
|
1764
|
-
return (l = o.url) != null && l.includes(b.EXCHANGE_TOKEN) && "id_token" in R && (o.data = JSON.stringify({ idToken: R.id_token })),
|
|
1763
|
+
throw (u = o == null ? void 0 : o.url) != null && u.includes(b.EXCHANGE_TOKEN) || De("refresh_token", m), s = !1, Fe(e, t), t;
|
|
1764
|
+
return (l = o.url) != null && l.includes(b.EXCHANGE_TOKEN) && "id_token" in R && (o.data = JSON.stringify({ idToken: R.id_token })), s = !1, o.headers && (o.headers.Authorization = `Bearer ${R.token}`), Fe(e, null, R.token), r(o);
|
|
1765
1765
|
}
|
|
1766
1766
|
if ([
|
|
1767
1767
|
D.BadRequest,
|
|
@@ -1772,29 +1772,29 @@ const {
|
|
|
1772
1772
|
D.NotFound
|
|
1773
1773
|
].includes(c) || (o.__retries || (o.__retries = 0), o.__retries += 1, o.__retries > n))
|
|
1774
1774
|
throw t;
|
|
1775
|
-
return
|
|
1776
|
-
() =>
|
|
1775
|
+
return Yn(
|
|
1776
|
+
() => r(o),
|
|
1777
1777
|
Math.pow(10, o.__retries + 1) / 2
|
|
1778
1778
|
// Exponential backoff 50ms, 500ms, 5000ms
|
|
1779
1779
|
);
|
|
1780
|
-
},
|
|
1781
|
-
|
|
1780
|
+
}, Qn = g.create();
|
|
1781
|
+
Qn.interceptors.request.use((e) => (e.baseURL = qe(), e.headers.Authorization = localStorage.getItem(x.TOKEN), e.metadata = { startTime: /* @__PURE__ */ new Date() }, { ...e }));
|
|
1782
1782
|
const C = g.create();
|
|
1783
|
-
C.interceptors.request.use((e) => (e =
|
|
1784
|
-
const
|
|
1785
|
-
let
|
|
1786
|
-
const
|
|
1783
|
+
C.interceptors.request.use((e) => (e = Wn(e), e));
|
|
1784
|
+
const es = 3;
|
|
1785
|
+
let ts = !1;
|
|
1786
|
+
const ns = [];
|
|
1787
1787
|
C.interceptors.response.use(
|
|
1788
1788
|
null,
|
|
1789
|
-
(e) =>
|
|
1790
|
-
|
|
1789
|
+
(e) => Zn(
|
|
1790
|
+
ns,
|
|
1791
1791
|
e,
|
|
1792
|
-
|
|
1793
|
-
|
|
1792
|
+
es,
|
|
1793
|
+
ts,
|
|
1794
1794
|
C
|
|
1795
1795
|
)
|
|
1796
1796
|
);
|
|
1797
|
-
class
|
|
1797
|
+
class ss {
|
|
1798
1798
|
constructor() {
|
|
1799
1799
|
/**
|
|
1800
1800
|
* Logs in a user with the provided email and password.
|
|
@@ -1803,7 +1803,7 @@ class nr {
|
|
|
1803
1803
|
* @returns A promise that resolves to a service response containing authentication data.
|
|
1804
1804
|
*/
|
|
1805
1805
|
k(this, "login", async (t) => {
|
|
1806
|
-
var n,
|
|
1806
|
+
var n, s, r, o, i;
|
|
1807
1807
|
try {
|
|
1808
1808
|
const { data: c } = await C.post(b.SIGN_IN, {
|
|
1809
1809
|
email_address: t.email,
|
|
@@ -1816,7 +1816,7 @@ class nr {
|
|
|
1816
1816
|
success: !0,
|
|
1817
1817
|
data: L({
|
|
1818
1818
|
...c.data,
|
|
1819
|
-
token: (
|
|
1819
|
+
token: (s = c.data) == null ? void 0 : s.accessToken,
|
|
1820
1820
|
user: {
|
|
1821
1821
|
...u.user,
|
|
1822
1822
|
userRegion: f.find(
|
|
@@ -1828,7 +1828,7 @@ class nr {
|
|
|
1828
1828
|
} catch (c) {
|
|
1829
1829
|
return console.error(c), {
|
|
1830
1830
|
success: !1,
|
|
1831
|
-
message: ((o = (
|
|
1831
|
+
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 signing in"
|
|
1832
1832
|
};
|
|
1833
1833
|
}
|
|
1834
1834
|
});
|
|
@@ -1839,9 +1839,9 @@ class nr {
|
|
|
1839
1839
|
* @returns A promise that resolves to a service response containing authentication data.
|
|
1840
1840
|
*/
|
|
1841
1841
|
k(this, "signUp", async (t) => {
|
|
1842
|
-
var n,
|
|
1842
|
+
var n, s, r, o, i, c, f;
|
|
1843
1843
|
try {
|
|
1844
|
-
const { data:
|
|
1844
|
+
const { data: u } = await C.post(b.SIGN_UP, {
|
|
1845
1845
|
user: {
|
|
1846
1846
|
email_address: t.email,
|
|
1847
1847
|
password: t.password,
|
|
@@ -1850,62 +1850,64 @@ class nr {
|
|
|
1850
1850
|
success_url: t.successUrl,
|
|
1851
1851
|
cancel_url: t.cancelUrl,
|
|
1852
1852
|
price_id: t.priceId
|
|
1853
|
-
}),
|
|
1853
|
+
}), l = await $.ensureQueryData({
|
|
1854
1854
|
queryKey: [j.USER_REGIONS],
|
|
1855
1855
|
queryFn: this.getRegions
|
|
1856
|
-
}),
|
|
1857
|
-
return localStorage.setItem(x.TOKEN,
|
|
1856
|
+
}), d = L(u.data), y = (n = u.data) == null ? void 0 : n.tokens.accessToken;
|
|
1857
|
+
return localStorage.setItem(x.TOKEN, y), {
|
|
1858
1858
|
success: !0,
|
|
1859
1859
|
data: {
|
|
1860
|
-
|
|
1861
|
-
|
|
1860
|
+
token: (s = u.data) == null ? void 0 : s.tokens.accessToken,
|
|
1861
|
+
accessToken: (r = u.data) == null ? void 0 : r.tokens.accessToken,
|
|
1862
|
+
refreshToken: (o = u.data) == null ? void 0 : o.tokens.refreshToken,
|
|
1862
1863
|
user: {
|
|
1863
|
-
...
|
|
1864
|
-
userRegion:
|
|
1865
|
-
(
|
|
1864
|
+
...d.user,
|
|
1865
|
+
userRegion: l.find(
|
|
1866
|
+
(R) => R.code === u.data.user.user_region
|
|
1866
1867
|
)
|
|
1867
1868
|
}
|
|
1868
1869
|
}
|
|
1869
1870
|
};
|
|
1870
|
-
} catch (
|
|
1871
|
-
return console.error(
|
|
1871
|
+
} catch (u) {
|
|
1872
|
+
return console.error(u), {
|
|
1872
1873
|
success: !1,
|
|
1873
|
-
message: ((
|
|
1874
|
+
message: ((c = (i = u.response) == null ? void 0 : i.data) == null ? void 0 : c.message) || ((f = u.response) == null ? void 0 : f.data) || u.message || "error signing up"
|
|
1874
1875
|
};
|
|
1875
1876
|
}
|
|
1876
1877
|
});
|
|
1877
1878
|
k(this, "getOrCreateGoogleUser", async (t, n) => {
|
|
1878
|
-
var
|
|
1879
|
+
var s, r, o, i, c, f, u;
|
|
1879
1880
|
try {
|
|
1880
|
-
const { data:
|
|
1881
|
+
const { data: l } = await C.post(b.GOOGLE_AUTH, {
|
|
1881
1882
|
google_access_token: t,
|
|
1882
1883
|
user_region: n
|
|
1883
|
-
}),
|
|
1884
|
+
}), d = await $.ensureQueryData({
|
|
1884
1885
|
queryKey: [j.USER_REGIONS],
|
|
1885
1886
|
queryFn: this.getRegions
|
|
1886
|
-
}),
|
|
1887
|
-
return localStorage.setItem(x.TOKEN,
|
|
1887
|
+
}), y = L(l.data), R = (s = l.data) == null ? void 0 : s.tokens.accessToken;
|
|
1888
|
+
return localStorage.setItem(x.TOKEN, R), {
|
|
1888
1889
|
success: !0,
|
|
1889
1890
|
data: {
|
|
1890
|
-
|
|
1891
|
-
|
|
1891
|
+
token: (r = l.data) == null ? void 0 : r.tokens.accessToken,
|
|
1892
|
+
accessToken: (o = l.data) == null ? void 0 : o.tokens.accessToken,
|
|
1893
|
+
refreshToken: (i = l.data) == null ? void 0 : i.tokens.refreshToken,
|
|
1892
1894
|
user: {
|
|
1893
|
-
...
|
|
1894
|
-
userRegion:
|
|
1895
|
-
(
|
|
1895
|
+
...y.user,
|
|
1896
|
+
userRegion: d.find(
|
|
1897
|
+
(h) => h.code === l.data.user.user_region
|
|
1896
1898
|
)
|
|
1897
1899
|
}
|
|
1898
1900
|
}
|
|
1899
1901
|
};
|
|
1900
|
-
} catch (
|
|
1901
|
-
return console.error(
|
|
1902
|
+
} catch (l) {
|
|
1903
|
+
return console.error(l), {
|
|
1902
1904
|
success: !1,
|
|
1903
|
-
message: ((
|
|
1905
|
+
message: ((f = (c = l.response) == null ? void 0 : c.data) == null ? void 0 : f.message) || ((u = l == null ? void 0 : l.response) == null ? void 0 : u.data) || l.message || "error getting or creating google user"
|
|
1904
1906
|
};
|
|
1905
1907
|
}
|
|
1906
1908
|
});
|
|
1907
1909
|
k(this, "resendVerificationEmail", async (t) => {
|
|
1908
|
-
var n,
|
|
1910
|
+
var n, s, r;
|
|
1909
1911
|
try {
|
|
1910
1912
|
return (await C.post(
|
|
1911
1913
|
b.RESEND_VERIFICATION_EMAIL,
|
|
@@ -1918,7 +1920,7 @@ class nr {
|
|
|
1918
1920
|
} catch (o) {
|
|
1919
1921
|
return console.error(o), {
|
|
1920
1922
|
success: !1,
|
|
1921
|
-
message: ((
|
|
1923
|
+
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
1924
|
};
|
|
1923
1925
|
}
|
|
1924
1926
|
});
|
|
@@ -1928,31 +1930,35 @@ class nr {
|
|
|
1928
1930
|
* @param idToken - The ID token to authenticate with.
|
|
1929
1931
|
* @returns A promise that resolves to a service response containing authentication data.
|
|
1930
1932
|
*/
|
|
1931
|
-
k(this, "authenticateWithToken", async (t) => {
|
|
1932
|
-
var
|
|
1933
|
+
k(this, "authenticateWithToken", async (t, n) => {
|
|
1934
|
+
var s, r, o;
|
|
1933
1935
|
try {
|
|
1934
|
-
const { data:
|
|
1935
|
-
|
|
1936
|
-
|
|
1936
|
+
const { data: i } = await C.post(
|
|
1937
|
+
b.EXCHANGE_TOKEN,
|
|
1938
|
+
mt({
|
|
1939
|
+
idToken: t,
|
|
1940
|
+
exchangeTokenEndPoint: n
|
|
1941
|
+
})
|
|
1942
|
+
), c = await $.ensureQueryData({
|
|
1937
1943
|
queryKey: [j.USER_REGIONS],
|
|
1938
1944
|
queryFn: this.getRegions
|
|
1939
|
-
}),
|
|
1945
|
+
}), f = L(i.data);
|
|
1940
1946
|
return {
|
|
1941
1947
|
success: !0,
|
|
1942
1948
|
data: {
|
|
1943
|
-
...
|
|
1949
|
+
...f,
|
|
1944
1950
|
user: {
|
|
1945
|
-
...
|
|
1946
|
-
userRegion:
|
|
1947
|
-
(
|
|
1951
|
+
...f.user,
|
|
1952
|
+
userRegion: c.find(
|
|
1953
|
+
(u) => u.code === i.data.user.user_region
|
|
1948
1954
|
)
|
|
1949
1955
|
}
|
|
1950
1956
|
}
|
|
1951
1957
|
};
|
|
1952
|
-
} catch (
|
|
1953
|
-
return console.error(
|
|
1958
|
+
} catch (i) {
|
|
1959
|
+
return console.error(i), {
|
|
1954
1960
|
success: !1,
|
|
1955
|
-
message: ((r = (
|
|
1961
|
+
message: ((r = (s = i.response) == null ? void 0 : s.data) == null ? void 0 : r.message) || ((o = i == null ? void 0 : i.response) == null ? void 0 : o.data) || i.message || "error exchanging token"
|
|
1956
1962
|
};
|
|
1957
1963
|
}
|
|
1958
1964
|
});
|
|
@@ -1966,15 +1972,15 @@ class nr {
|
|
|
1966
1972
|
const { data: t } = await C.get(b.ME), n = await $.ensureQueryData({
|
|
1967
1973
|
queryKey: [j.USER_REGIONS],
|
|
1968
1974
|
queryFn: this.getRegions
|
|
1969
|
-
}),
|
|
1975
|
+
}), s = {
|
|
1970
1976
|
...t.data,
|
|
1971
1977
|
userRegion: n.find(
|
|
1972
|
-
(
|
|
1978
|
+
(r) => r.code === t.data.user_region
|
|
1973
1979
|
)
|
|
1974
1980
|
};
|
|
1975
1981
|
return {
|
|
1976
1982
|
success: !0,
|
|
1977
|
-
data: L(
|
|
1983
|
+
data: L(s)
|
|
1978
1984
|
};
|
|
1979
1985
|
} catch (t) {
|
|
1980
1986
|
console.error(t);
|
|
@@ -1998,16 +2004,16 @@ class nr {
|
|
|
1998
2004
|
{
|
|
1999
2005
|
refreshToken: t
|
|
2000
2006
|
}
|
|
2001
|
-
),
|
|
2002
|
-
return localStorage.setItem(x.TOKEN,
|
|
2007
|
+
), s = n.data.token;
|
|
2008
|
+
return localStorage.setItem(x.TOKEN, s), {
|
|
2003
2009
|
success: !0,
|
|
2004
2010
|
data: n.data
|
|
2005
2011
|
};
|
|
2006
2012
|
} catch (n) {
|
|
2007
|
-
const { response:
|
|
2013
|
+
const { response: s } = n;
|
|
2008
2014
|
return localStorage.removeItem("refreshToken"), localStorage.removeItem("token"), {
|
|
2009
2015
|
success: !1,
|
|
2010
|
-
message:
|
|
2016
|
+
message: s == null ? void 0 : s.data.message
|
|
2011
2017
|
};
|
|
2012
2018
|
}
|
|
2013
2019
|
});
|
|
@@ -2023,19 +2029,19 @@ class nr {
|
|
|
2023
2029
|
{
|
|
2024
2030
|
refreshToken: t
|
|
2025
2031
|
}
|
|
2026
|
-
),
|
|
2027
|
-
return localStorage.setItem(x.TOKEN,
|
|
2032
|
+
), s = n.data.accessToken;
|
|
2033
|
+
return localStorage.setItem(x.TOKEN, s), {
|
|
2028
2034
|
success: !0,
|
|
2029
2035
|
data: {
|
|
2030
2036
|
...n.data,
|
|
2031
|
-
token:
|
|
2037
|
+
token: s
|
|
2032
2038
|
}
|
|
2033
2039
|
};
|
|
2034
2040
|
} catch (n) {
|
|
2035
|
-
const { response:
|
|
2041
|
+
const { response: s } = n;
|
|
2036
2042
|
return localStorage.removeItem("refreshToken"), localStorage.removeItem("token"), {
|
|
2037
2043
|
success: !1,
|
|
2038
|
-
message:
|
|
2044
|
+
message: s == null ? void 0 : s.data.message
|
|
2039
2045
|
};
|
|
2040
2046
|
}
|
|
2041
2047
|
});
|
|
@@ -2057,22 +2063,22 @@ class nr {
|
|
|
2057
2063
|
});
|
|
2058
2064
|
}
|
|
2059
2065
|
}
|
|
2060
|
-
const Be = new
|
|
2066
|
+
const Be = new ss();
|
|
2061
2067
|
export {
|
|
2062
2068
|
Be as A,
|
|
2063
2069
|
j as E,
|
|
2064
2070
|
L as a,
|
|
2065
|
-
|
|
2071
|
+
Et as b,
|
|
2066
2072
|
C as c,
|
|
2067
2073
|
g as d,
|
|
2068
|
-
|
|
2074
|
+
Jn as e,
|
|
2069
2075
|
we as f,
|
|
2070
|
-
|
|
2071
|
-
|
|
2072
|
-
|
|
2073
|
-
|
|
2074
|
-
|
|
2076
|
+
Wn as g,
|
|
2077
|
+
Zn as h,
|
|
2078
|
+
Qn as i,
|
|
2079
|
+
Xn as j,
|
|
2080
|
+
Yn as k,
|
|
2075
2081
|
De as l,
|
|
2076
2082
|
Fe as p,
|
|
2077
|
-
|
|
2083
|
+
mt as r
|
|
2078
2084
|
};
|