@odynn/awayz-flights 0.10.7 → 0.10.9
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/{FlightItinerary-BvAVMr_3.js → FlightItinerary-Bn345w_C.js} +0 -1
- package/dist/FlightsService-BgXzj6SR.js +155 -0
- package/dist/assets/_styles.css +1 -1
- package/dist/components/BookingOption/BookingOption.js +193 -11
- package/dist/components/Dialog/Dialog.js +8 -9
- package/dist/components/FlightItinerary/FlightItinerary.js +1 -1
- package/dist/components/FlightItineraryDropdown/FlightItineraryDropdown.js +9 -13
- package/dist/components/HorizontalScroller/HorizontalScroller.js +2 -2
- package/dist/components/MiniFlightItinerary/MiniFlightItinerary.js +7 -7
- package/dist/components/index.js +7 -9
- package/dist/hooks/useAirportSearch/useAirportSearch.js +9 -8
- package/dist/hooks/useFlightSearch/useFlightSearch.js +560 -560
- package/dist/index-B9NLqDyM.js +39 -0
- package/dist/lib/components/index.d.ts +0 -1
- package/dist/lib/services/wallet/WalletService.mappers.d.ts +21 -0
- package/dist/main.js +29 -31
- package/dist/numberUtils-DxNMfbMM.js +8 -0
- package/dist/services/flights/FlightsService.js +5 -145
- package/dist/services/wallet/WalletService.js +26 -29
- package/dist/services/wallet/WalletService.mappers.js +74 -0
- package/dist/utils/flightUtils.js +13 -12
- package/package.json +1 -1
- package/dist/BookingOption-D566Ie2y.js +0 -205
- package/dist/assets/_styles2.css +0 -1
- package/dist/components/FlightResult/FlightResult.js +0 -416
- package/dist/enums-DPFgYLjY.js +0 -4
- package/dist/index-9LVJi5JO.js +0 -55
- package/dist/lib/components/FlightResult/FlightResult.d.ts +0 -40
- package/dist/objectUtils-3IeCVocm.js +0 -7
- /package/dist/assets/{_styles4.css → BookingOption.css} +0 -0
- /package/dist/assets/{_styles3.css → Dialog.css} +0 -0
|
@@ -1,22 +1,21 @@
|
|
|
1
|
-
import { useAwayzContext as
|
|
2
|
-
import { useQuery as
|
|
1
|
+
import { useAwayzContext as Nt, awayzClient as Z, getBaseUrl as _t } from "@odynn/awayz-core";
|
|
2
|
+
import { useQuery as Pt, useMutation as me } from "@tanstack/react-query";
|
|
3
|
+
import "react/jsx-runtime";
|
|
3
4
|
import "../../moment-BGjjqtLQ.js";
|
|
4
5
|
import "../../arrayExtensions-Ce8YopTP.js";
|
|
5
|
-
import { c as Ue } from "../../
|
|
6
|
-
import {
|
|
7
|
-
import
|
|
8
|
-
import {
|
|
9
|
-
import
|
|
10
|
-
import {
|
|
11
|
-
|
|
12
|
-
import { mapDataToFlightDetails as kt, groupFlightResults as Ut, buildFlightSearchQuery as Dt } from "../../utils/flightUtils.js";
|
|
13
|
-
async function Bt(e, t) {
|
|
6
|
+
import { F as V, c as Ue } from "../../FlightsService-BgXzj6SR.js";
|
|
7
|
+
import { useState as be, useRef as xt } from "react";
|
|
8
|
+
import It from "../../stores/useFlightStore.js";
|
|
9
|
+
import { EFlightType as Ze, EFlightPaymentType as Q } from "../../types/enums.js";
|
|
10
|
+
import { ECabinClass as Ft } from "../../types/ECabinClass.js";
|
|
11
|
+
import { mapDataToFlightDetails as Lt, groupFlightResults as Ut, buildFlightSearchQuery as Dt } from "../../utils/flightUtils.js";
|
|
12
|
+
async function kt(e, t) {
|
|
14
13
|
const n = e.getReader();
|
|
15
14
|
let r;
|
|
16
15
|
for (; !(r = await n.read()).done; )
|
|
17
16
|
t(r.value);
|
|
18
17
|
}
|
|
19
|
-
function
|
|
18
|
+
function Bt(e) {
|
|
20
19
|
let t, n, r, s = !1;
|
|
21
20
|
return function(o) {
|
|
22
21
|
t === void 0 ? (t = o, n = 0, r = -1) : t = jt(t, o);
|
|
@@ -24,8 +23,8 @@ function It(e) {
|
|
|
24
23
|
let f = 0;
|
|
25
24
|
for (; n < c; ) {
|
|
26
25
|
s && (t[n] === 10 && (f = ++n), s = !1);
|
|
27
|
-
let
|
|
28
|
-
for (; n < c &&
|
|
26
|
+
let l = -1;
|
|
27
|
+
for (; n < c && l === -1; ++n)
|
|
29
28
|
switch (t[n]) {
|
|
30
29
|
case 58:
|
|
31
30
|
r === -1 && (r = n - f);
|
|
@@ -33,12 +32,12 @@ function It(e) {
|
|
|
33
32
|
case 13:
|
|
34
33
|
s = !0;
|
|
35
34
|
case 10:
|
|
36
|
-
|
|
35
|
+
l = n;
|
|
37
36
|
break;
|
|
38
37
|
}
|
|
39
|
-
if (
|
|
38
|
+
if (l === -1)
|
|
40
39
|
break;
|
|
41
|
-
e(t.subarray(f,
|
|
40
|
+
e(t.subarray(f, l), r), f = n, r = -1;
|
|
42
41
|
}
|
|
43
42
|
f === c ? t = void 0 : f !== 0 && (t = t.subarray(f), n -= f);
|
|
44
43
|
};
|
|
@@ -50,20 +49,20 @@ function qt(e, t, n) {
|
|
|
50
49
|
if (o.length === 0)
|
|
51
50
|
n == null || n(r), r = De();
|
|
52
51
|
else if (c > 0) {
|
|
53
|
-
const f = s.decode(o.subarray(0, c)),
|
|
52
|
+
const f = s.decode(o.subarray(0, c)), l = c + (o[c + 1] === 32 ? 2 : 1), u = s.decode(o.subarray(l));
|
|
54
53
|
switch (f) {
|
|
55
54
|
case "data":
|
|
56
55
|
r.data = r.data ? r.data + `
|
|
57
|
-
` +
|
|
56
|
+
` + u : u;
|
|
58
57
|
break;
|
|
59
58
|
case "event":
|
|
60
|
-
r.event =
|
|
59
|
+
r.event = u;
|
|
61
60
|
break;
|
|
62
61
|
case "id":
|
|
63
|
-
e(r.id =
|
|
62
|
+
e(r.id = u);
|
|
64
63
|
break;
|
|
65
64
|
case "retry":
|
|
66
|
-
const d = parseInt(
|
|
65
|
+
const d = parseInt(u, 10);
|
|
67
66
|
isNaN(d) || t(r.retry = d);
|
|
68
67
|
break;
|
|
69
68
|
}
|
|
@@ -82,7 +81,7 @@ function De() {
|
|
|
82
81
|
retry: void 0
|
|
83
82
|
};
|
|
84
83
|
}
|
|
85
|
-
var
|
|
84
|
+
var Mt = function(e, t) {
|
|
86
85
|
var n = {};
|
|
87
86
|
for (var r in e) Object.prototype.hasOwnProperty.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
|
|
88
87
|
if (e != null && typeof Object.getOwnPropertySymbols == "function")
|
|
@@ -90,42 +89,42 @@ var vt = function(e, t) {
|
|
|
90
89
|
t.indexOf(r[s]) < 0 && Object.prototype.propertyIsEnumerable.call(e, r[s]) && (n[r[s]] = e[r[s]]);
|
|
91
90
|
return n;
|
|
92
91
|
};
|
|
93
|
-
const
|
|
94
|
-
function
|
|
95
|
-
var { signal: n, headers: r, onopen: s, onmessage: i, onclose: o, onerror: c, openWhenHidden: f, fetch:
|
|
92
|
+
const Ee = "text/event-stream", Ht = 1e3, ke = "last-event-id";
|
|
93
|
+
function vt(e, t) {
|
|
94
|
+
var { signal: n, headers: r, onopen: s, onmessage: i, onclose: o, onerror: c, openWhenHidden: f, fetch: l } = t, u = Mt(t, ["signal", "headers", "onopen", "onmessage", "onclose", "onerror", "openWhenHidden", "fetch"]);
|
|
96
95
|
return new Promise((d, w) => {
|
|
97
|
-
const
|
|
98
|
-
|
|
96
|
+
const S = Object.assign({}, r);
|
|
97
|
+
S.accept || (S.accept = Ee);
|
|
99
98
|
let p;
|
|
100
99
|
function m() {
|
|
101
100
|
p.abort(), document.hidden || O();
|
|
102
101
|
}
|
|
103
102
|
f || document.addEventListener("visibilitychange", m);
|
|
104
|
-
let h = Ht,
|
|
105
|
-
function
|
|
106
|
-
document.removeEventListener("visibilitychange", m), window.clearTimeout(
|
|
103
|
+
let h = Ht, y = 0;
|
|
104
|
+
function E() {
|
|
105
|
+
document.removeEventListener("visibilitychange", m), window.clearTimeout(y), p.abort();
|
|
107
106
|
}
|
|
108
107
|
n == null || n.addEventListener("abort", () => {
|
|
109
|
-
|
|
108
|
+
E(), d();
|
|
110
109
|
});
|
|
111
|
-
const
|
|
110
|
+
const g = l ?? window.fetch, D = s ?? zt;
|
|
112
111
|
async function O() {
|
|
113
|
-
var
|
|
112
|
+
var I;
|
|
114
113
|
p = new AbortController();
|
|
115
114
|
try {
|
|
116
|
-
const
|
|
117
|
-
await D(
|
|
118
|
-
|
|
119
|
-
}, (
|
|
120
|
-
h =
|
|
121
|
-
}, i))), o == null || o(),
|
|
122
|
-
} catch (
|
|
115
|
+
const F = await g(e, Object.assign(Object.assign({}, u), { headers: S, signal: p.signal }));
|
|
116
|
+
await D(F), await kt(F.body, Bt(qt((x) => {
|
|
117
|
+
x ? S[ke] = x : delete S[ke];
|
|
118
|
+
}, (x) => {
|
|
119
|
+
h = x;
|
|
120
|
+
}, i))), o == null || o(), E(), d();
|
|
121
|
+
} catch (F) {
|
|
123
122
|
if (!p.signal.aborted)
|
|
124
123
|
try {
|
|
125
|
-
const
|
|
126
|
-
window.clearTimeout(
|
|
127
|
-
} catch (
|
|
128
|
-
|
|
124
|
+
const x = (I = c == null ? void 0 : c(F)) !== null && I !== void 0 ? I : h;
|
|
125
|
+
window.clearTimeout(y), y = window.setTimeout(O, x);
|
|
126
|
+
} catch (x) {
|
|
127
|
+
E(), w(x);
|
|
129
128
|
}
|
|
130
129
|
}
|
|
131
130
|
}
|
|
@@ -134,41 +133,42 @@ function Mt(e, t) {
|
|
|
134
133
|
}
|
|
135
134
|
function zt(e) {
|
|
136
135
|
const t = e.headers.get("content-type");
|
|
137
|
-
if (!(t != null && t.startsWith(
|
|
138
|
-
throw new Error(`Expected content-type to be ${
|
|
136
|
+
if (!(t != null && t.startsWith(Ee)))
|
|
137
|
+
throw new Error(`Expected content-type to be ${Ee}, Actual: ${t}`);
|
|
139
138
|
}
|
|
140
|
-
|
|
139
|
+
var z = /* @__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))(z || {});
|
|
140
|
+
function Qe(e, t) {
|
|
141
141
|
return function() {
|
|
142
142
|
return e.apply(t, arguments);
|
|
143
143
|
};
|
|
144
144
|
}
|
|
145
|
-
const { toString: $t } = Object.prototype, { getPrototypeOf:
|
|
145
|
+
const { toString: $t } = Object.prototype, { getPrototypeOf: Pe } = Object, { iterator: ie, toStringTag: et } = Symbol, ae = /* @__PURE__ */ ((e) => (t) => {
|
|
146
146
|
const n = $t.call(t);
|
|
147
147
|
return e[n] || (e[n] = n.slice(8, -1).toLowerCase());
|
|
148
|
-
})(/* @__PURE__ */ Object.create(null)),
|
|
148
|
+
})(/* @__PURE__ */ Object.create(null)), k = (e) => (e = e.toLowerCase(), (t) => ae(t) === e), ce = (e) => (t) => typeof t === e, { isArray: $ } = Array, G = ce("undefined");
|
|
149
149
|
function Jt(e) {
|
|
150
|
-
return e !== null && !
|
|
150
|
+
return e !== null && !G(e) && e.constructor !== null && !G(e.constructor) && L(e.constructor.isBuffer) && e.constructor.isBuffer(e);
|
|
151
151
|
}
|
|
152
|
-
const tt =
|
|
153
|
-
function
|
|
152
|
+
const tt = k("ArrayBuffer");
|
|
153
|
+
function Vt(e) {
|
|
154
154
|
let t;
|
|
155
155
|
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer && tt(e.buffer), t;
|
|
156
156
|
}
|
|
157
|
-
const
|
|
157
|
+
const Wt = ce("string"), L = ce("function"), nt = ce("number"), le = (e) => e !== null && typeof e == "object", Gt = (e) => e === !0 || e === !1, te = (e) => {
|
|
158
158
|
if (ae(e) !== "object")
|
|
159
159
|
return !1;
|
|
160
|
-
const t =
|
|
160
|
+
const t = Pe(e);
|
|
161
161
|
return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(et in e) && !(ie in e);
|
|
162
|
-
},
|
|
162
|
+
}, Kt = k("Date"), Xt = k("File"), Yt = k("Blob"), Zt = k("FileList"), Qt = (e) => le(e) && L(e.pipe), en = (e) => {
|
|
163
163
|
let t;
|
|
164
|
-
return e && (typeof FormData == "function" && e instanceof FormData ||
|
|
165
|
-
t === "object" &&
|
|
166
|
-
}, tn =
|
|
167
|
-
function
|
|
164
|
+
return e && (typeof FormData == "function" && e instanceof FormData || L(e.append) && ((t = ae(e)) === "formdata" || // detect form-data instance
|
|
165
|
+
t === "object" && L(e.toString) && e.toString() === "[object FormData]"));
|
|
166
|
+
}, tn = k("URLSearchParams"), [nn, rn, sn, on] = ["ReadableStream", "Request", "Response", "Headers"].map(k), an = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
|
|
167
|
+
function K(e, t, { allOwnKeys: n = !1 } = {}) {
|
|
168
168
|
if (e === null || typeof e > "u")
|
|
169
169
|
return;
|
|
170
170
|
let r, s;
|
|
171
|
-
if (typeof e != "object" && (e = [e]),
|
|
171
|
+
if (typeof e != "object" && (e = [e]), $(e))
|
|
172
172
|
for (r = 0, s = e.length; r < s; r++)
|
|
173
173
|
t.call(null, e[r], r, e);
|
|
174
174
|
else {
|
|
@@ -187,19 +187,19 @@ function rt(e, t) {
|
|
|
187
187
|
return s;
|
|
188
188
|
return null;
|
|
189
189
|
}
|
|
190
|
-
const
|
|
191
|
-
function
|
|
190
|
+
const M = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, st = (e) => !G(e) && e !== M;
|
|
191
|
+
function ge() {
|
|
192
192
|
const { caseless: e } = st(this) && this || {}, t = {}, n = (r, s) => {
|
|
193
193
|
const i = e && rt(t, s) || s;
|
|
194
|
-
te(t[i]) && te(r) ? t[i] =
|
|
194
|
+
te(t[i]) && te(r) ? t[i] = ge(t[i], r) : te(r) ? t[i] = ge({}, r) : $(r) ? t[i] = r.slice() : t[i] = r;
|
|
195
195
|
};
|
|
196
196
|
for (let r = 0, s = arguments.length; r < s; r++)
|
|
197
|
-
arguments[r] &&
|
|
197
|
+
arguments[r] && K(arguments[r], n);
|
|
198
198
|
return t;
|
|
199
199
|
}
|
|
200
|
-
const cn = (e, t, n, { allOwnKeys: r } = {}) => (
|
|
201
|
-
n &&
|
|
202
|
-
}, { allOwnKeys: r }), e),
|
|
200
|
+
const cn = (e, t, n, { allOwnKeys: r } = {}) => (K(t, (s, i) => {
|
|
201
|
+
n && L(s) ? e[i] = Qe(s, n) : e[i] = s;
|
|
202
|
+
}, { allOwnKeys: r }), e), ln = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e), un = (e, t, n, r) => {
|
|
203
203
|
e.prototype = Object.create(t.prototype, r), e.prototype.constructor = e, Object.defineProperty(e, "super", {
|
|
204
204
|
value: t.prototype
|
|
205
205
|
}), n && Object.assign(e.prototype, n);
|
|
@@ -210,7 +210,7 @@ const cn = (e, t, n, { allOwnKeys: r } = {}) => (X(t, (s, i) => {
|
|
|
210
210
|
do {
|
|
211
211
|
for (s = Object.getOwnPropertyNames(e), i = s.length; i-- > 0; )
|
|
212
212
|
o = s[i], (!r || r(o, e, t)) && !c[o] && (t[o] = e[o], c[o] = !0);
|
|
213
|
-
e = n !== !1 &&
|
|
213
|
+
e = n !== !1 && Pe(e);
|
|
214
214
|
} while (e && (!n || n(e, t)) && e !== Object.prototype);
|
|
215
215
|
return t;
|
|
216
216
|
}, dn = (e, t, n) => {
|
|
@@ -219,43 +219,43 @@ const cn = (e, t, n, { allOwnKeys: r } = {}) => (X(t, (s, i) => {
|
|
|
219
219
|
return r !== -1 && r === n;
|
|
220
220
|
}, pn = (e) => {
|
|
221
221
|
if (!e) return null;
|
|
222
|
-
if (
|
|
222
|
+
if ($(e)) return e;
|
|
223
223
|
let t = e.length;
|
|
224
224
|
if (!nt(t)) return null;
|
|
225
225
|
const n = new Array(t);
|
|
226
226
|
for (; t-- > 0; )
|
|
227
227
|
n[t] = e[t];
|
|
228
228
|
return n;
|
|
229
|
-
}, hn = /* @__PURE__ */ ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" &&
|
|
229
|
+
}, hn = /* @__PURE__ */ ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" && Pe(Uint8Array)), mn = (e, t) => {
|
|
230
230
|
const r = (e && e[ie]).call(e);
|
|
231
231
|
let s;
|
|
232
232
|
for (; (s = r.next()) && !s.done; ) {
|
|
233
233
|
const i = s.value;
|
|
234
234
|
t.call(e, i[0], i[1]);
|
|
235
235
|
}
|
|
236
|
-
},
|
|
236
|
+
}, bn = (e, t) => {
|
|
237
237
|
let n;
|
|
238
238
|
const r = [];
|
|
239
239
|
for (; (n = e.exec(t)) !== null; )
|
|
240
240
|
r.push(n);
|
|
241
241
|
return r;
|
|
242
|
-
},
|
|
242
|
+
}, Rn = k("HTMLFormElement"), wn = (e) => e.toLowerCase().replace(
|
|
243
243
|
/[-_\s]([a-z\d])(\w*)/g,
|
|
244
244
|
function(n, r, s) {
|
|
245
245
|
return r.toUpperCase() + s;
|
|
246
246
|
}
|
|
247
|
-
),
|
|
247
|
+
), Be = (({ hasOwnProperty: e }) => (t, n) => e.call(t, n))(Object.prototype), Sn = k("RegExp"), ot = (e, t) => {
|
|
248
248
|
const n = Object.getOwnPropertyDescriptors(e), r = {};
|
|
249
|
-
|
|
249
|
+
K(n, (s, i) => {
|
|
250
250
|
let o;
|
|
251
251
|
(o = t(s, i, e)) !== !1 && (r[i] = o || s);
|
|
252
252
|
}), Object.defineProperties(e, r);
|
|
253
|
-
},
|
|
253
|
+
}, yn = (e) => {
|
|
254
254
|
ot(e, (t, n) => {
|
|
255
|
-
if (
|
|
255
|
+
if (L(e) && ["arguments", "caller", "callee"].indexOf(n) !== -1)
|
|
256
256
|
return !1;
|
|
257
257
|
const r = e[n];
|
|
258
|
-
if (
|
|
258
|
+
if (L(r)) {
|
|
259
259
|
if (t.enumerable = !1, "writable" in t) {
|
|
260
260
|
t.writable = !1;
|
|
261
261
|
return;
|
|
@@ -265,105 +265,105 @@ const cn = (e, t, n, { allOwnKeys: r } = {}) => (X(t, (s, i) => {
|
|
|
265
265
|
});
|
|
266
266
|
}
|
|
267
267
|
});
|
|
268
|
-
},
|
|
268
|
+
}, En = (e, t) => {
|
|
269
269
|
const n = {}, r = (s) => {
|
|
270
270
|
s.forEach((i) => {
|
|
271
271
|
n[i] = !0;
|
|
272
272
|
});
|
|
273
273
|
};
|
|
274
|
-
return
|
|
275
|
-
},
|
|
274
|
+
return $(e) ? r(e) : r(String(e).split(t)), n;
|
|
275
|
+
}, gn = () => {
|
|
276
276
|
}, On = (e, t) => e != null && Number.isFinite(e = +e) ? e : t;
|
|
277
277
|
function Tn(e) {
|
|
278
|
-
return !!(e &&
|
|
278
|
+
return !!(e && L(e.append) && e[et] === "FormData" && e[ie]);
|
|
279
279
|
}
|
|
280
280
|
const An = (e) => {
|
|
281
281
|
const t = new Array(10), n = (r, s) => {
|
|
282
|
-
if (
|
|
282
|
+
if (le(r)) {
|
|
283
283
|
if (t.indexOf(r) >= 0)
|
|
284
284
|
return;
|
|
285
285
|
if (!("toJSON" in r)) {
|
|
286
286
|
t[s] = r;
|
|
287
|
-
const i =
|
|
288
|
-
return
|
|
287
|
+
const i = $(r) ? [] : {};
|
|
288
|
+
return K(r, (o, c) => {
|
|
289
289
|
const f = n(o, s + 1);
|
|
290
|
-
!
|
|
290
|
+
!G(f) && (i[c] = f);
|
|
291
291
|
}), t[s] = void 0, i;
|
|
292
292
|
}
|
|
293
293
|
}
|
|
294
294
|
return r;
|
|
295
295
|
};
|
|
296
296
|
return n(e, 0);
|
|
297
|
-
}, Cn =
|
|
298
|
-
s ===
|
|
297
|
+
}, Cn = k("AsyncFunction"), Nn = (e) => e && (le(e) || L(e)) && L(e.then) && L(e.catch), it = ((e, t) => e ? setImmediate : t ? ((n, r) => (M.addEventListener("message", ({ source: s, data: i }) => {
|
|
298
|
+
s === M && i === n && r.length && r.shift()();
|
|
299
299
|
}, !1), (s) => {
|
|
300
|
-
r.push(s),
|
|
300
|
+
r.push(s), M.postMessage(n, "*");
|
|
301
301
|
}))(`axios@${Math.random()}`, []) : (n) => setTimeout(n))(
|
|
302
302
|
typeof setImmediate == "function",
|
|
303
|
-
|
|
304
|
-
),
|
|
305
|
-
isArray:
|
|
303
|
+
L(M.postMessage)
|
|
304
|
+
), _n = typeof queueMicrotask < "u" ? queueMicrotask.bind(M) : typeof process < "u" && process.nextTick || it, Pn = (e) => e != null && L(e[ie]), a = {
|
|
305
|
+
isArray: $,
|
|
306
306
|
isArrayBuffer: tt,
|
|
307
307
|
isBuffer: Jt,
|
|
308
308
|
isFormData: en,
|
|
309
|
-
isArrayBufferView:
|
|
310
|
-
isString:
|
|
309
|
+
isArrayBufferView: Vt,
|
|
310
|
+
isString: Wt,
|
|
311
311
|
isNumber: nt,
|
|
312
|
-
isBoolean:
|
|
313
|
-
isObject:
|
|
312
|
+
isBoolean: Gt,
|
|
313
|
+
isObject: le,
|
|
314
314
|
isPlainObject: te,
|
|
315
315
|
isReadableStream: nn,
|
|
316
316
|
isRequest: rn,
|
|
317
317
|
isResponse: sn,
|
|
318
318
|
isHeaders: on,
|
|
319
|
-
isUndefined:
|
|
320
|
-
isDate:
|
|
321
|
-
isFile:
|
|
322
|
-
isBlob:
|
|
323
|
-
isRegExp:
|
|
324
|
-
isFunction:
|
|
325
|
-
isStream:
|
|
319
|
+
isUndefined: G,
|
|
320
|
+
isDate: Kt,
|
|
321
|
+
isFile: Xt,
|
|
322
|
+
isBlob: Yt,
|
|
323
|
+
isRegExp: Sn,
|
|
324
|
+
isFunction: L,
|
|
325
|
+
isStream: Qt,
|
|
326
326
|
isURLSearchParams: tn,
|
|
327
327
|
isTypedArray: hn,
|
|
328
|
-
isFileList:
|
|
329
|
-
forEach:
|
|
330
|
-
merge:
|
|
328
|
+
isFileList: Zt,
|
|
329
|
+
forEach: K,
|
|
330
|
+
merge: ge,
|
|
331
331
|
extend: cn,
|
|
332
332
|
trim: an,
|
|
333
|
-
stripBOM:
|
|
334
|
-
inherits:
|
|
333
|
+
stripBOM: ln,
|
|
334
|
+
inherits: un,
|
|
335
335
|
toFlatObject: fn,
|
|
336
336
|
kindOf: ae,
|
|
337
|
-
kindOfTest:
|
|
337
|
+
kindOfTest: k,
|
|
338
338
|
endsWith: dn,
|
|
339
339
|
toArray: pn,
|
|
340
340
|
forEachEntry: mn,
|
|
341
|
-
matchAll:
|
|
342
|
-
isHTMLForm:
|
|
343
|
-
hasOwnProperty:
|
|
344
|
-
hasOwnProp:
|
|
341
|
+
matchAll: bn,
|
|
342
|
+
isHTMLForm: Rn,
|
|
343
|
+
hasOwnProperty: Be,
|
|
344
|
+
hasOwnProp: Be,
|
|
345
345
|
// an alias to avoid ESLint no-prototype-builtins detection
|
|
346
346
|
reduceDescriptors: ot,
|
|
347
|
-
freezeMethods:
|
|
348
|
-
toObjectSet:
|
|
347
|
+
freezeMethods: yn,
|
|
348
|
+
toObjectSet: En,
|
|
349
349
|
toCamelCase: wn,
|
|
350
|
-
noop:
|
|
350
|
+
noop: gn,
|
|
351
351
|
toFiniteNumber: On,
|
|
352
352
|
findKey: rt,
|
|
353
|
-
global:
|
|
353
|
+
global: M,
|
|
354
354
|
isContextDefined: st,
|
|
355
355
|
isSpecCompliantForm: Tn,
|
|
356
356
|
toJSONObject: An,
|
|
357
357
|
isAsyncFn: Cn,
|
|
358
|
-
isThenable:
|
|
358
|
+
isThenable: Nn,
|
|
359
359
|
setImmediate: it,
|
|
360
|
-
asap:
|
|
361
|
-
isIterable:
|
|
360
|
+
asap: _n,
|
|
361
|
+
isIterable: Pn
|
|
362
362
|
};
|
|
363
|
-
function
|
|
363
|
+
function R(e, t, n, r, s) {
|
|
364
364
|
Error.call(this), Error.captureStackTrace ? Error.captureStackTrace(this, this.constructor) : this.stack = new Error().stack, this.message = e, this.name = "AxiosError", t && (this.code = t), n && (this.config = n), r && (this.request = r), s && (this.response = s, this.status = s.status ? s.status : null);
|
|
365
365
|
}
|
|
366
|
-
a.inherits(
|
|
366
|
+
a.inherits(R, Error, {
|
|
367
367
|
toJSON: function() {
|
|
368
368
|
return {
|
|
369
369
|
// Standard
|
|
@@ -384,7 +384,7 @@ a.inherits(b, Error, {
|
|
|
384
384
|
};
|
|
385
385
|
}
|
|
386
386
|
});
|
|
387
|
-
const at =
|
|
387
|
+
const at = R.prototype, ct = {};
|
|
388
388
|
[
|
|
389
389
|
"ERR_BAD_OPTION_VALUE",
|
|
390
390
|
"ERR_BAD_OPTION",
|
|
@@ -402,33 +402,33 @@ const at = b.prototype, ct = {};
|
|
|
402
402
|
].forEach((e) => {
|
|
403
403
|
ct[e] = { value: e };
|
|
404
404
|
});
|
|
405
|
-
Object.defineProperties(
|
|
405
|
+
Object.defineProperties(R, ct);
|
|
406
406
|
Object.defineProperty(at, "isAxiosError", { value: !0 });
|
|
407
|
-
|
|
407
|
+
R.from = (e, t, n, r, s, i) => {
|
|
408
408
|
const o = Object.create(at);
|
|
409
409
|
return a.toFlatObject(e, o, function(f) {
|
|
410
410
|
return f !== Error.prototype;
|
|
411
|
-
}, (c) => c !== "isAxiosError"),
|
|
411
|
+
}, (c) => c !== "isAxiosError"), R.call(o, e.message, t, n, r, s), o.cause = e, o.name = e.name, i && Object.assign(o, i), o;
|
|
412
412
|
};
|
|
413
|
-
const
|
|
413
|
+
const xn = null;
|
|
414
414
|
function Oe(e) {
|
|
415
415
|
return a.isPlainObject(e) || a.isArray(e);
|
|
416
416
|
}
|
|
417
|
-
function
|
|
417
|
+
function lt(e) {
|
|
418
418
|
return a.endsWith(e, "[]") ? e.slice(0, -2) : e;
|
|
419
419
|
}
|
|
420
420
|
function qe(e, t, n) {
|
|
421
421
|
return e ? e.concat(t).map(function(s, i) {
|
|
422
|
-
return s =
|
|
422
|
+
return s = lt(s), !n && i ? "[" + s + "]" : s;
|
|
423
423
|
}).join(n ? "." : "") : t;
|
|
424
424
|
}
|
|
425
|
-
function
|
|
425
|
+
function In(e) {
|
|
426
426
|
return a.isArray(e) && !e.some(Oe);
|
|
427
427
|
}
|
|
428
|
-
const
|
|
428
|
+
const Fn = a.toFlatObject(a, {}, null, function(t) {
|
|
429
429
|
return /^is[A-Z]/.test(t);
|
|
430
430
|
});
|
|
431
|
-
function
|
|
431
|
+
function ue(e, t, n) {
|
|
432
432
|
if (!a.isObject(e))
|
|
433
433
|
throw new TypeError("target must be an object");
|
|
434
434
|
t = t || new FormData(), n = a.toFlatObject(n, {
|
|
@@ -438,56 +438,56 @@ function le(e, t, n) {
|
|
|
438
438
|
}, !1, function(m, h) {
|
|
439
439
|
return !a.isUndefined(h[m]);
|
|
440
440
|
});
|
|
441
|
-
const r = n.metaTokens, s = n.visitor ||
|
|
441
|
+
const r = n.metaTokens, s = n.visitor || u, i = n.dots, o = n.indexes, f = (n.Blob || typeof Blob < "u" && Blob) && a.isSpecCompliantForm(t);
|
|
442
442
|
if (!a.isFunction(s))
|
|
443
443
|
throw new TypeError("visitor must be a function");
|
|
444
|
-
function
|
|
444
|
+
function l(p) {
|
|
445
445
|
if (p === null) return "";
|
|
446
446
|
if (a.isDate(p))
|
|
447
447
|
return p.toISOString();
|
|
448
448
|
if (!f && a.isBlob(p))
|
|
449
|
-
throw new
|
|
449
|
+
throw new R("Blob is not supported. Use a Buffer instead.");
|
|
450
450
|
return a.isArrayBuffer(p) || a.isTypedArray(p) ? f && typeof Blob == "function" ? new Blob([p]) : Buffer.from(p) : p;
|
|
451
451
|
}
|
|
452
|
-
function
|
|
453
|
-
let
|
|
452
|
+
function u(p, m, h) {
|
|
453
|
+
let y = p;
|
|
454
454
|
if (p && !h && typeof p == "object") {
|
|
455
455
|
if (a.endsWith(m, "{}"))
|
|
456
456
|
m = r ? m : m.slice(0, -2), p = JSON.stringify(p);
|
|
457
|
-
else if (a.isArray(p) &&
|
|
458
|
-
return m =
|
|
459
|
-
!(a.isUndefined(
|
|
457
|
+
else if (a.isArray(p) && In(p) || (a.isFileList(p) || a.endsWith(m, "[]")) && (y = a.toArray(p)))
|
|
458
|
+
return m = lt(m), y.forEach(function(g, D) {
|
|
459
|
+
!(a.isUndefined(g) || g === null) && t.append(
|
|
460
460
|
// eslint-disable-next-line no-nested-ternary
|
|
461
461
|
o === !0 ? qe([m], D, i) : o === null ? m : m + "[]",
|
|
462
|
-
|
|
462
|
+
l(g)
|
|
463
463
|
);
|
|
464
464
|
}), !1;
|
|
465
465
|
}
|
|
466
|
-
return Oe(p) ? !0 : (t.append(qe(h, m, i),
|
|
466
|
+
return Oe(p) ? !0 : (t.append(qe(h, m, i), l(p)), !1);
|
|
467
467
|
}
|
|
468
|
-
const d = [], w = Object.assign(
|
|
469
|
-
defaultVisitor:
|
|
470
|
-
convertValue:
|
|
468
|
+
const d = [], w = Object.assign(Fn, {
|
|
469
|
+
defaultVisitor: u,
|
|
470
|
+
convertValue: l,
|
|
471
471
|
isVisitable: Oe
|
|
472
472
|
});
|
|
473
|
-
function
|
|
473
|
+
function S(p, m) {
|
|
474
474
|
if (!a.isUndefined(p)) {
|
|
475
475
|
if (d.indexOf(p) !== -1)
|
|
476
476
|
throw Error("Circular reference detected in " + m.join("."));
|
|
477
|
-
d.push(p), a.forEach(p, function(
|
|
478
|
-
(!(a.isUndefined(
|
|
477
|
+
d.push(p), a.forEach(p, function(y, E) {
|
|
478
|
+
(!(a.isUndefined(y) || y === null) && s.call(
|
|
479
479
|
t,
|
|
480
|
-
|
|
481
|
-
a.isString(
|
|
480
|
+
y,
|
|
481
|
+
a.isString(E) ? E.trim() : E,
|
|
482
482
|
m,
|
|
483
483
|
w
|
|
484
|
-
)) === !0 &&
|
|
484
|
+
)) === !0 && S(y, m ? m.concat(E) : [E]);
|
|
485
485
|
}), d.pop();
|
|
486
486
|
}
|
|
487
487
|
}
|
|
488
488
|
if (!a.isObject(e))
|
|
489
489
|
throw new TypeError("data must be an object");
|
|
490
|
-
return
|
|
490
|
+
return S(e), t;
|
|
491
491
|
}
|
|
492
492
|
function je(e) {
|
|
493
493
|
const t = {
|
|
@@ -503,14 +503,14 @@ function je(e) {
|
|
|
503
503
|
return t[r];
|
|
504
504
|
});
|
|
505
505
|
}
|
|
506
|
-
function
|
|
507
|
-
this._pairs = [], e &&
|
|
506
|
+
function xe(e, t) {
|
|
507
|
+
this._pairs = [], e && ue(e, this, t);
|
|
508
508
|
}
|
|
509
|
-
const
|
|
510
|
-
|
|
509
|
+
const ut = xe.prototype;
|
|
510
|
+
ut.append = function(t, n) {
|
|
511
511
|
this._pairs.push([t, n]);
|
|
512
512
|
};
|
|
513
|
-
|
|
513
|
+
ut.toString = function(t) {
|
|
514
514
|
const n = t ? function(r) {
|
|
515
515
|
return t.call(this, r, je);
|
|
516
516
|
} : je;
|
|
@@ -518,25 +518,25 @@ lt.toString = function(t) {
|
|
|
518
518
|
return n(s[0]) + "=" + n(s[1]);
|
|
519
519
|
}, "").join("&");
|
|
520
520
|
};
|
|
521
|
-
function
|
|
521
|
+
function Ln(e) {
|
|
522
522
|
return encodeURIComponent(e).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]");
|
|
523
523
|
}
|
|
524
524
|
function ft(e, t, n) {
|
|
525
525
|
if (!t)
|
|
526
526
|
return e;
|
|
527
|
-
const r = n && n.encode ||
|
|
527
|
+
const r = n && n.encode || Ln;
|
|
528
528
|
a.isFunction(n) && (n = {
|
|
529
529
|
serialize: n
|
|
530
530
|
});
|
|
531
531
|
const s = n && n.serialize;
|
|
532
532
|
let i;
|
|
533
|
-
if (s ? i = s(t, n) : i = a.isURLSearchParams(t) ? t.toString() : new
|
|
533
|
+
if (s ? i = s(t, n) : i = a.isURLSearchParams(t) ? t.toString() : new xe(t, n).toString(r), i) {
|
|
534
534
|
const o = e.indexOf("#");
|
|
535
535
|
o !== -1 && (e = e.slice(0, o)), e += (e.indexOf("?") === -1 ? "?" : "&") + i;
|
|
536
536
|
}
|
|
537
537
|
return e;
|
|
538
538
|
}
|
|
539
|
-
class
|
|
539
|
+
class Me {
|
|
540
540
|
constructor() {
|
|
541
541
|
this.handlers = [];
|
|
542
542
|
}
|
|
@@ -594,30 +594,30 @@ const dt = {
|
|
|
594
594
|
silentJSONParsing: !0,
|
|
595
595
|
forcedJSONParsing: !0,
|
|
596
596
|
clarifyTimeoutError: !1
|
|
597
|
-
}, Un = typeof URLSearchParams < "u" ? URLSearchParams :
|
|
597
|
+
}, Un = typeof URLSearchParams < "u" ? URLSearchParams : xe, Dn = typeof FormData < "u" ? FormData : null, kn = typeof Blob < "u" ? Blob : null, Bn = {
|
|
598
598
|
isBrowser: !0,
|
|
599
599
|
classes: {
|
|
600
600
|
URLSearchParams: Un,
|
|
601
601
|
FormData: Dn,
|
|
602
|
-
Blob:
|
|
602
|
+
Blob: kn
|
|
603
603
|
},
|
|
604
604
|
protocols: ["http", "https", "file", "blob", "url", "data"]
|
|
605
|
-
},
|
|
606
|
-
self instanceof WorkerGlobalScope && typeof self.importScripts == "function",
|
|
605
|
+
}, Ie = typeof window < "u" && typeof document < "u", Te = typeof navigator == "object" && navigator || void 0, qn = Ie && (!Te || ["ReactNative", "NativeScript", "NS"].indexOf(Te.product) < 0), jn = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
|
|
606
|
+
self instanceof WorkerGlobalScope && typeof self.importScripts == "function", Mn = Ie && window.location.href || "http://localhost", Hn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
607
607
|
__proto__: null,
|
|
608
|
-
hasBrowserEnv:
|
|
608
|
+
hasBrowserEnv: Ie,
|
|
609
609
|
hasStandardBrowserEnv: qn,
|
|
610
610
|
hasStandardBrowserWebWorkerEnv: jn,
|
|
611
611
|
navigator: Te,
|
|
612
|
-
origin:
|
|
613
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
612
|
+
origin: Mn
|
|
613
|
+
}, Symbol.toStringTag, { value: "Module" })), P = {
|
|
614
614
|
...Hn,
|
|
615
|
-
...
|
|
615
|
+
...Bn
|
|
616
616
|
};
|
|
617
|
-
function
|
|
618
|
-
return
|
|
617
|
+
function vn(e, t) {
|
|
618
|
+
return ue(e, new P.classes.URLSearchParams(), Object.assign({
|
|
619
619
|
visitor: function(n, r, s, i) {
|
|
620
|
-
return
|
|
620
|
+
return P.isNode && a.isBuffer(n) ? (this.append(r, n.toString("base64")), !1) : i.defaultVisitor.apply(this, arguments);
|
|
621
621
|
}
|
|
622
622
|
}, t));
|
|
623
623
|
}
|
|
@@ -658,7 +658,7 @@ function Jn(e, t, n) {
|
|
|
658
658
|
}
|
|
659
659
|
return (n || JSON.stringify)(e);
|
|
660
660
|
}
|
|
661
|
-
const
|
|
661
|
+
const X = {
|
|
662
662
|
transitional: dt,
|
|
663
663
|
adapter: ["xhr", "http", "fetch"],
|
|
664
664
|
transformRequest: [function(t, n) {
|
|
@@ -674,10 +674,10 @@ const Q = {
|
|
|
674
674
|
let c;
|
|
675
675
|
if (i) {
|
|
676
676
|
if (r.indexOf("application/x-www-form-urlencoded") > -1)
|
|
677
|
-
return
|
|
677
|
+
return vn(t, this.formSerializer).toString();
|
|
678
678
|
if ((c = a.isFileList(t)) || r.indexOf("multipart/form-data") > -1) {
|
|
679
679
|
const f = this.env && this.env.FormData;
|
|
680
|
-
return
|
|
680
|
+
return ue(
|
|
681
681
|
c ? { "files[]": t } : t,
|
|
682
682
|
f && new f(),
|
|
683
683
|
this.formSerializer
|
|
@@ -687,7 +687,7 @@ const Q = {
|
|
|
687
687
|
return i || s ? (n.setContentType("application/json", !1), Jn(t)) : t;
|
|
688
688
|
}],
|
|
689
689
|
transformResponse: [function(t) {
|
|
690
|
-
const n = this.transitional ||
|
|
690
|
+
const n = this.transitional || X.transitional, r = n && n.forcedJSONParsing, s = this.responseType === "json";
|
|
691
691
|
if (a.isResponse(t) || a.isReadableStream(t))
|
|
692
692
|
return t;
|
|
693
693
|
if (t && a.isString(t) && (r && !this.responseType || s)) {
|
|
@@ -696,7 +696,7 @@ const Q = {
|
|
|
696
696
|
return JSON.parse(t);
|
|
697
697
|
} catch (c) {
|
|
698
698
|
if (o)
|
|
699
|
-
throw c.name === "SyntaxError" ?
|
|
699
|
+
throw c.name === "SyntaxError" ? R.from(c, R.ERR_BAD_RESPONSE, this, null, this.response) : c;
|
|
700
700
|
}
|
|
701
701
|
}
|
|
702
702
|
return t;
|
|
@@ -711,8 +711,8 @@ const Q = {
|
|
|
711
711
|
maxContentLength: -1,
|
|
712
712
|
maxBodyLength: -1,
|
|
713
713
|
env: {
|
|
714
|
-
FormData:
|
|
715
|
-
Blob:
|
|
714
|
+
FormData: P.classes.FormData,
|
|
715
|
+
Blob: P.classes.Blob
|
|
716
716
|
},
|
|
717
717
|
validateStatus: function(t) {
|
|
718
718
|
return t >= 200 && t < 300;
|
|
@@ -725,9 +725,9 @@ const Q = {
|
|
|
725
725
|
}
|
|
726
726
|
};
|
|
727
727
|
a.forEach(["delete", "get", "head", "post", "put", "patch"], (e) => {
|
|
728
|
-
|
|
728
|
+
X.headers[e] = {};
|
|
729
729
|
});
|
|
730
|
-
const
|
|
730
|
+
const Vn = a.toObjectSet([
|
|
731
731
|
"age",
|
|
732
732
|
"authorization",
|
|
733
733
|
"content-length",
|
|
@@ -745,29 +745,29 @@ const Wn = a.toObjectSet([
|
|
|
745
745
|
"referer",
|
|
746
746
|
"retry-after",
|
|
747
747
|
"user-agent"
|
|
748
|
-
]),
|
|
748
|
+
]), Wn = (e) => {
|
|
749
749
|
const t = {};
|
|
750
750
|
let n, r, s;
|
|
751
751
|
return e && e.split(`
|
|
752
752
|
`).forEach(function(o) {
|
|
753
|
-
s = o.indexOf(":"), n = o.substring(0, s).trim().toLowerCase(), r = o.substring(s + 1).trim(), !(!n || t[n] &&
|
|
753
|
+
s = o.indexOf(":"), n = o.substring(0, s).trim().toLowerCase(), r = o.substring(s + 1).trim(), !(!n || t[n] && Vn[n]) && (n === "set-cookie" ? t[n] ? t[n].push(r) : t[n] = [r] : t[n] = t[n] ? t[n] + ", " + r : r);
|
|
754
754
|
}), t;
|
|
755
755
|
}, He = Symbol("internals");
|
|
756
|
-
function
|
|
756
|
+
function W(e) {
|
|
757
757
|
return e && String(e).trim().toLowerCase();
|
|
758
758
|
}
|
|
759
759
|
function ne(e) {
|
|
760
760
|
return e === !1 || e == null ? e : a.isArray(e) ? e.map(ne) : String(e);
|
|
761
761
|
}
|
|
762
|
-
function
|
|
762
|
+
function Gn(e) {
|
|
763
763
|
const t = /* @__PURE__ */ Object.create(null), n = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
|
|
764
764
|
let r;
|
|
765
765
|
for (; r = n.exec(e); )
|
|
766
766
|
t[r[1]] = r[2];
|
|
767
767
|
return t;
|
|
768
768
|
}
|
|
769
|
-
const
|
|
770
|
-
function
|
|
769
|
+
const Kn = (e) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());
|
|
770
|
+
function Re(e, t, n, r, s) {
|
|
771
771
|
if (a.isFunction(r))
|
|
772
772
|
return r.call(this, t, n);
|
|
773
773
|
if (s && (t = n), !!a.isString(t)) {
|
|
@@ -777,10 +777,10 @@ function be(e, t, n, r, s) {
|
|
|
777
777
|
return r.test(t);
|
|
778
778
|
}
|
|
779
779
|
}
|
|
780
|
-
function
|
|
780
|
+
function Xn(e) {
|
|
781
781
|
return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (t, n, r) => n.toUpperCase() + r);
|
|
782
782
|
}
|
|
783
|
-
function
|
|
783
|
+
function Yn(e, t) {
|
|
784
784
|
const n = a.toCamelCase(" " + t);
|
|
785
785
|
["get", "set", "has"].forEach((r) => {
|
|
786
786
|
Object.defineProperty(e, r + n, {
|
|
@@ -797,24 +797,24 @@ let U = class {
|
|
|
797
797
|
}
|
|
798
798
|
set(t, n, r) {
|
|
799
799
|
const s = this;
|
|
800
|
-
function i(c, f,
|
|
801
|
-
const
|
|
802
|
-
if (!
|
|
800
|
+
function i(c, f, l) {
|
|
801
|
+
const u = W(f);
|
|
802
|
+
if (!u)
|
|
803
803
|
throw new Error("header name must be a non-empty string");
|
|
804
|
-
const d = a.findKey(s,
|
|
805
|
-
(!d || s[d] === void 0 ||
|
|
804
|
+
const d = a.findKey(s, u);
|
|
805
|
+
(!d || s[d] === void 0 || l === !0 || l === void 0 && s[d] !== !1) && (s[d || f] = ne(c));
|
|
806
806
|
}
|
|
807
|
-
const o = (c, f) => a.forEach(c, (
|
|
807
|
+
const o = (c, f) => a.forEach(c, (l, u) => i(l, u, f));
|
|
808
808
|
if (a.isPlainObject(t) || t instanceof this.constructor)
|
|
809
809
|
o(t, n);
|
|
810
|
-
else if (a.isString(t) && (t = t.trim()) && !
|
|
811
|
-
o(
|
|
810
|
+
else if (a.isString(t) && (t = t.trim()) && !Kn(t))
|
|
811
|
+
o(Wn(t), n);
|
|
812
812
|
else if (a.isObject(t) && a.isIterable(t)) {
|
|
813
|
-
let c = {}, f,
|
|
814
|
-
for (const
|
|
815
|
-
if (!a.isArray(
|
|
813
|
+
let c = {}, f, l;
|
|
814
|
+
for (const u of t) {
|
|
815
|
+
if (!a.isArray(u))
|
|
816
816
|
throw TypeError("Object iterator must return a key-value pair");
|
|
817
|
-
c[
|
|
817
|
+
c[l = u[0]] = (f = c[l]) ? a.isArray(f) ? [...f, u[1]] : [f, u[1]] : u[1];
|
|
818
818
|
}
|
|
819
819
|
o(c, n);
|
|
820
820
|
} else
|
|
@@ -822,14 +822,14 @@ let U = class {
|
|
|
822
822
|
return this;
|
|
823
823
|
}
|
|
824
824
|
get(t, n) {
|
|
825
|
-
if (t =
|
|
825
|
+
if (t = W(t), t) {
|
|
826
826
|
const r = a.findKey(this, t);
|
|
827
827
|
if (r) {
|
|
828
828
|
const s = this[r];
|
|
829
829
|
if (!n)
|
|
830
830
|
return s;
|
|
831
831
|
if (n === !0)
|
|
832
|
-
return
|
|
832
|
+
return Gn(s);
|
|
833
833
|
if (a.isFunction(n))
|
|
834
834
|
return n.call(this, s, r);
|
|
835
835
|
if (a.isRegExp(n))
|
|
@@ -839,9 +839,9 @@ let U = class {
|
|
|
839
839
|
}
|
|
840
840
|
}
|
|
841
841
|
has(t, n) {
|
|
842
|
-
if (t =
|
|
842
|
+
if (t = W(t), t) {
|
|
843
843
|
const r = a.findKey(this, t);
|
|
844
|
-
return !!(r && this[r] !== void 0 && (!n ||
|
|
844
|
+
return !!(r && this[r] !== void 0 && (!n || Re(this, this[r], r, n)));
|
|
845
845
|
}
|
|
846
846
|
return !1;
|
|
847
847
|
}
|
|
@@ -849,9 +849,9 @@ let U = class {
|
|
|
849
849
|
const r = this;
|
|
850
850
|
let s = !1;
|
|
851
851
|
function i(o) {
|
|
852
|
-
if (o =
|
|
852
|
+
if (o = W(o), o) {
|
|
853
853
|
const c = a.findKey(r, o);
|
|
854
|
-
c && (!n ||
|
|
854
|
+
c && (!n || Re(r, r[c], c, n)) && (delete r[c], s = !0);
|
|
855
855
|
}
|
|
856
856
|
}
|
|
857
857
|
return a.isArray(t) ? t.forEach(i) : i(t), s;
|
|
@@ -861,7 +861,7 @@ let U = class {
|
|
|
861
861
|
let r = n.length, s = !1;
|
|
862
862
|
for (; r--; ) {
|
|
863
863
|
const i = n[r];
|
|
864
|
-
(!t ||
|
|
864
|
+
(!t || Re(this, this[i], i, t, !0)) && (delete this[i], s = !0);
|
|
865
865
|
}
|
|
866
866
|
return s;
|
|
867
867
|
}
|
|
@@ -873,7 +873,7 @@ let U = class {
|
|
|
873
873
|
n[o] = ne(s), delete n[i];
|
|
874
874
|
return;
|
|
875
875
|
}
|
|
876
|
-
const c = t ?
|
|
876
|
+
const c = t ? Xn(i) : String(i).trim();
|
|
877
877
|
c !== i && delete n[i], n[c] = ne(s), r[c] = !0;
|
|
878
878
|
}), this;
|
|
879
879
|
}
|
|
@@ -911,8 +911,8 @@ let U = class {
|
|
|
911
911
|
accessors: {}
|
|
912
912
|
}).accessors, s = this.prototype;
|
|
913
913
|
function i(o) {
|
|
914
|
-
const c =
|
|
915
|
-
r[c] || (
|
|
914
|
+
const c = W(o);
|
|
915
|
+
r[c] || (Yn(s, o), r[c] = !0);
|
|
916
916
|
}
|
|
917
917
|
return a.isArray(t) ? t.forEach(i) : i(t), this;
|
|
918
918
|
}
|
|
@@ -929,7 +929,7 @@ a.reduceDescriptors(U.prototype, ({ value: e }, t) => {
|
|
|
929
929
|
});
|
|
930
930
|
a.freezeMethods(U);
|
|
931
931
|
function we(e, t) {
|
|
932
|
-
const n = this ||
|
|
932
|
+
const n = this || X, r = t || n, s = U.from(r.headers);
|
|
933
933
|
let i = r.data;
|
|
934
934
|
return a.forEach(e, function(c) {
|
|
935
935
|
i = c.call(n, i, s.normalize(), t ? t.status : void 0);
|
|
@@ -938,84 +938,84 @@ function we(e, t) {
|
|
|
938
938
|
function ht(e) {
|
|
939
939
|
return !!(e && e.__CANCEL__);
|
|
940
940
|
}
|
|
941
|
-
function
|
|
942
|
-
|
|
941
|
+
function J(e, t, n) {
|
|
942
|
+
R.call(this, e ?? "canceled", R.ERR_CANCELED, t, n), this.name = "CanceledError";
|
|
943
943
|
}
|
|
944
|
-
a.inherits(
|
|
944
|
+
a.inherits(J, R, {
|
|
945
945
|
__CANCEL__: !0
|
|
946
946
|
});
|
|
947
947
|
function mt(e, t, n) {
|
|
948
948
|
const r = n.config.validateStatus;
|
|
949
|
-
!n.status || !r || r(n.status) ? e(n) : t(new
|
|
949
|
+
!n.status || !r || r(n.status) ? e(n) : t(new R(
|
|
950
950
|
"Request failed with status code " + n.status,
|
|
951
|
-
[
|
|
951
|
+
[R.ERR_BAD_REQUEST, R.ERR_BAD_RESPONSE][Math.floor(n.status / 100) - 4],
|
|
952
952
|
n.config,
|
|
953
953
|
n.request,
|
|
954
954
|
n
|
|
955
955
|
));
|
|
956
956
|
}
|
|
957
|
-
function
|
|
957
|
+
function Zn(e) {
|
|
958
958
|
const t = /^([-+\w]{1,25})(:?\/\/|:)/.exec(e);
|
|
959
959
|
return t && t[1] || "";
|
|
960
960
|
}
|
|
961
|
-
function
|
|
961
|
+
function Qn(e, t) {
|
|
962
962
|
e = e || 10;
|
|
963
963
|
const n = new Array(e), r = new Array(e);
|
|
964
964
|
let s = 0, i = 0, o;
|
|
965
965
|
return t = t !== void 0 ? t : 1e3, function(f) {
|
|
966
|
-
const
|
|
967
|
-
o || (o =
|
|
966
|
+
const l = Date.now(), u = r[i];
|
|
967
|
+
o || (o = l), n[s] = f, r[s] = l;
|
|
968
968
|
let d = i, w = 0;
|
|
969
969
|
for (; d !== s; )
|
|
970
970
|
w += n[d++], d = d % e;
|
|
971
|
-
if (s = (s + 1) % e, s === i && (i = (i + 1) % e),
|
|
971
|
+
if (s = (s + 1) % e, s === i && (i = (i + 1) % e), l - o < t)
|
|
972
972
|
return;
|
|
973
|
-
const
|
|
974
|
-
return
|
|
973
|
+
const S = u && l - u;
|
|
974
|
+
return S ? Math.round(w * 1e3 / S) : void 0;
|
|
975
975
|
};
|
|
976
976
|
}
|
|
977
977
|
function er(e, t) {
|
|
978
978
|
let n = 0, r = 1e3 / t, s, i;
|
|
979
|
-
const o = (
|
|
980
|
-
n =
|
|
979
|
+
const o = (l, u = Date.now()) => {
|
|
980
|
+
n = u, s = null, i && (clearTimeout(i), i = null), e.apply(null, l);
|
|
981
981
|
};
|
|
982
|
-
return [(...
|
|
983
|
-
const
|
|
984
|
-
d >= r ? o(
|
|
982
|
+
return [(...l) => {
|
|
983
|
+
const u = Date.now(), d = u - n;
|
|
984
|
+
d >= r ? o(l, u) : (s = l, i || (i = setTimeout(() => {
|
|
985
985
|
i = null, o(s);
|
|
986
986
|
}, r - d)));
|
|
987
987
|
}, () => s && o(s)];
|
|
988
988
|
}
|
|
989
989
|
const se = (e, t, n = 3) => {
|
|
990
990
|
let r = 0;
|
|
991
|
-
const s =
|
|
991
|
+
const s = Qn(50, 250);
|
|
992
992
|
return er((i) => {
|
|
993
|
-
const o = i.loaded, c = i.lengthComputable ? i.total : void 0, f = o - r,
|
|
993
|
+
const o = i.loaded, c = i.lengthComputable ? i.total : void 0, f = o - r, l = s(f), u = o <= c;
|
|
994
994
|
r = o;
|
|
995
995
|
const d = {
|
|
996
996
|
loaded: o,
|
|
997
997
|
total: c,
|
|
998
998
|
progress: c ? o / c : void 0,
|
|
999
999
|
bytes: f,
|
|
1000
|
-
rate:
|
|
1001
|
-
estimated:
|
|
1000
|
+
rate: l || void 0,
|
|
1001
|
+
estimated: l && c && u ? (c - o) / l : void 0,
|
|
1002
1002
|
event: i,
|
|
1003
1003
|
lengthComputable: c != null,
|
|
1004
1004
|
[t ? "download" : "upload"]: !0
|
|
1005
1005
|
};
|
|
1006
1006
|
e(d);
|
|
1007
1007
|
}, n);
|
|
1008
|
-
},
|
|
1008
|
+
}, ve = (e, t) => {
|
|
1009
1009
|
const n = e != null;
|
|
1010
1010
|
return [(r) => t[0]({
|
|
1011
1011
|
lengthComputable: n,
|
|
1012
1012
|
total: e,
|
|
1013
1013
|
loaded: r
|
|
1014
1014
|
}), t[1]];
|
|
1015
|
-
}, ze = (e) => (...t) => a.asap(() => e(...t)), tr =
|
|
1016
|
-
new URL(
|
|
1017
|
-
|
|
1018
|
-
) : () => !0, nr =
|
|
1015
|
+
}, ze = (e) => (...t) => a.asap(() => e(...t)), tr = P.hasStandardBrowserEnv ? /* @__PURE__ */ ((e, t) => (n) => (n = new URL(n, P.origin), e.protocol === n.protocol && e.host === n.host && (t || e.port === n.port)))(
|
|
1016
|
+
new URL(P.origin),
|
|
1017
|
+
P.navigator && /(msie|trident)/i.test(P.navigator.userAgent)
|
|
1018
|
+
) : () => !0, nr = P.hasStandardBrowserEnv ? (
|
|
1019
1019
|
// Standard browser envs support document.cookie
|
|
1020
1020
|
{
|
|
1021
1021
|
write(e, t, n, r, s, i) {
|
|
@@ -1048,38 +1048,38 @@ function rr(e) {
|
|
|
1048
1048
|
function sr(e, t) {
|
|
1049
1049
|
return t ? e.replace(/\/?\/$/, "") + "/" + t.replace(/^\/+/, "") : e;
|
|
1050
1050
|
}
|
|
1051
|
-
function
|
|
1051
|
+
function bt(e, t, n) {
|
|
1052
1052
|
let r = !rr(t);
|
|
1053
1053
|
return e && (r || n == !1) ? sr(e, t) : t;
|
|
1054
1054
|
}
|
|
1055
1055
|
const $e = (e) => e instanceof U ? { ...e } : e;
|
|
1056
|
-
function
|
|
1056
|
+
function v(e, t) {
|
|
1057
1057
|
t = t || {};
|
|
1058
1058
|
const n = {};
|
|
1059
|
-
function r(
|
|
1060
|
-
return a.isPlainObject(
|
|
1059
|
+
function r(l, u, d, w) {
|
|
1060
|
+
return a.isPlainObject(l) && a.isPlainObject(u) ? a.merge.call({ caseless: w }, l, u) : a.isPlainObject(u) ? a.merge({}, u) : a.isArray(u) ? u.slice() : u;
|
|
1061
1061
|
}
|
|
1062
|
-
function s(
|
|
1063
|
-
if (a.isUndefined(
|
|
1064
|
-
if (!a.isUndefined(
|
|
1065
|
-
return r(void 0,
|
|
1066
|
-
} else return r(
|
|
1062
|
+
function s(l, u, d, w) {
|
|
1063
|
+
if (a.isUndefined(u)) {
|
|
1064
|
+
if (!a.isUndefined(l))
|
|
1065
|
+
return r(void 0, l, d, w);
|
|
1066
|
+
} else return r(l, u, d, w);
|
|
1067
1067
|
}
|
|
1068
|
-
function i(
|
|
1069
|
-
if (!a.isUndefined(
|
|
1070
|
-
return r(void 0,
|
|
1068
|
+
function i(l, u) {
|
|
1069
|
+
if (!a.isUndefined(u))
|
|
1070
|
+
return r(void 0, u);
|
|
1071
1071
|
}
|
|
1072
|
-
function o(
|
|
1073
|
-
if (a.isUndefined(
|
|
1074
|
-
if (!a.isUndefined(
|
|
1075
|
-
return r(void 0,
|
|
1076
|
-
} else return r(void 0,
|
|
1072
|
+
function o(l, u) {
|
|
1073
|
+
if (a.isUndefined(u)) {
|
|
1074
|
+
if (!a.isUndefined(l))
|
|
1075
|
+
return r(void 0, l);
|
|
1076
|
+
} else return r(void 0, u);
|
|
1077
1077
|
}
|
|
1078
|
-
function c(
|
|
1078
|
+
function c(l, u, d) {
|
|
1079
1079
|
if (d in t)
|
|
1080
|
-
return r(
|
|
1080
|
+
return r(l, u);
|
|
1081
1081
|
if (d in e)
|
|
1082
|
-
return r(void 0,
|
|
1082
|
+
return r(void 0, l);
|
|
1083
1083
|
}
|
|
1084
1084
|
const f = {
|
|
1085
1085
|
url: i,
|
|
@@ -1110,87 +1110,87 @@ function M(e, t) {
|
|
|
1110
1110
|
socketPath: o,
|
|
1111
1111
|
responseEncoding: o,
|
|
1112
1112
|
validateStatus: c,
|
|
1113
|
-
headers: (
|
|
1113
|
+
headers: (l, u, d) => s($e(l), $e(u), d, !0)
|
|
1114
1114
|
};
|
|
1115
|
-
return a.forEach(Object.keys(Object.assign({}, e, t)), function(
|
|
1116
|
-
const d = f[
|
|
1117
|
-
a.isUndefined(w) && d !== c || (n[
|
|
1115
|
+
return a.forEach(Object.keys(Object.assign({}, e, t)), function(u) {
|
|
1116
|
+
const d = f[u] || s, w = d(e[u], t[u], u);
|
|
1117
|
+
a.isUndefined(w) && d !== c || (n[u] = w);
|
|
1118
1118
|
}), n;
|
|
1119
1119
|
}
|
|
1120
|
-
const
|
|
1121
|
-
const t =
|
|
1120
|
+
const Rt = (e) => {
|
|
1121
|
+
const t = v({}, e);
|
|
1122
1122
|
let { data: n, withXSRFToken: r, xsrfHeaderName: s, xsrfCookieName: i, headers: o, auth: c } = t;
|
|
1123
|
-
t.headers = o = U.from(o), t.url = ft(
|
|
1123
|
+
t.headers = o = U.from(o), t.url = ft(bt(t.baseURL, t.url, t.allowAbsoluteUrls), e.params, e.paramsSerializer), c && o.set(
|
|
1124
1124
|
"Authorization",
|
|
1125
1125
|
"Basic " + btoa((c.username || "") + ":" + (c.password ? unescape(encodeURIComponent(c.password)) : ""))
|
|
1126
1126
|
);
|
|
1127
1127
|
let f;
|
|
1128
1128
|
if (a.isFormData(n)) {
|
|
1129
|
-
if (
|
|
1129
|
+
if (P.hasStandardBrowserEnv || P.hasStandardBrowserWebWorkerEnv)
|
|
1130
1130
|
o.setContentType(void 0);
|
|
1131
1131
|
else if ((f = o.getContentType()) !== !1) {
|
|
1132
|
-
const [
|
|
1133
|
-
o.setContentType([
|
|
1132
|
+
const [l, ...u] = f ? f.split(";").map((d) => d.trim()).filter(Boolean) : [];
|
|
1133
|
+
o.setContentType([l || "multipart/form-data", ...u].join("; "));
|
|
1134
1134
|
}
|
|
1135
1135
|
}
|
|
1136
|
-
if (
|
|
1137
|
-
const
|
|
1138
|
-
|
|
1136
|
+
if (P.hasStandardBrowserEnv && (r && a.isFunction(r) && (r = r(t)), r || r !== !1 && tr(t.url))) {
|
|
1137
|
+
const l = s && i && nr.read(i);
|
|
1138
|
+
l && o.set(s, l);
|
|
1139
1139
|
}
|
|
1140
1140
|
return t;
|
|
1141
1141
|
}, or = typeof XMLHttpRequest < "u", ir = or && function(e) {
|
|
1142
1142
|
return new Promise(function(n, r) {
|
|
1143
|
-
const s =
|
|
1143
|
+
const s = Rt(e);
|
|
1144
1144
|
let i = s.data;
|
|
1145
1145
|
const o = U.from(s.headers).normalize();
|
|
1146
|
-
let { responseType: c, onUploadProgress: f, onDownloadProgress:
|
|
1146
|
+
let { responseType: c, onUploadProgress: f, onDownloadProgress: l } = s, u, d, w, S, p;
|
|
1147
1147
|
function m() {
|
|
1148
|
-
|
|
1148
|
+
S && S(), p && p(), s.cancelToken && s.cancelToken.unsubscribe(u), s.signal && s.signal.removeEventListener("abort", u);
|
|
1149
1149
|
}
|
|
1150
1150
|
let h = new XMLHttpRequest();
|
|
1151
1151
|
h.open(s.method.toUpperCase(), s.url, !0), h.timeout = s.timeout;
|
|
1152
|
-
function
|
|
1152
|
+
function y() {
|
|
1153
1153
|
if (!h)
|
|
1154
1154
|
return;
|
|
1155
|
-
const
|
|
1155
|
+
const g = U.from(
|
|
1156
1156
|
"getAllResponseHeaders" in h && h.getAllResponseHeaders()
|
|
1157
1157
|
), O = {
|
|
1158
1158
|
data: !c || c === "text" || c === "json" ? h.responseText : h.response,
|
|
1159
1159
|
status: h.status,
|
|
1160
1160
|
statusText: h.statusText,
|
|
1161
|
-
headers:
|
|
1161
|
+
headers: g,
|
|
1162
1162
|
config: e,
|
|
1163
1163
|
request: h
|
|
1164
1164
|
};
|
|
1165
|
-
mt(function(
|
|
1166
|
-
n(
|
|
1167
|
-
}, function(
|
|
1168
|
-
r(
|
|
1165
|
+
mt(function(F) {
|
|
1166
|
+
n(F), m();
|
|
1167
|
+
}, function(F) {
|
|
1168
|
+
r(F), m();
|
|
1169
1169
|
}, O), h = null;
|
|
1170
1170
|
}
|
|
1171
|
-
"onloadend" in h ? h.onloadend =
|
|
1172
|
-
!h || h.readyState !== 4 || h.status === 0 && !(h.responseURL && h.responseURL.indexOf("file:") === 0) || setTimeout(
|
|
1171
|
+
"onloadend" in h ? h.onloadend = y : h.onreadystatechange = function() {
|
|
1172
|
+
!h || h.readyState !== 4 || h.status === 0 && !(h.responseURL && h.responseURL.indexOf("file:") === 0) || setTimeout(y);
|
|
1173
1173
|
}, h.onabort = function() {
|
|
1174
|
-
h && (r(new
|
|
1174
|
+
h && (r(new R("Request aborted", R.ECONNABORTED, e, h)), h = null);
|
|
1175
1175
|
}, h.onerror = function() {
|
|
1176
|
-
r(new
|
|
1176
|
+
r(new R("Network Error", R.ERR_NETWORK, e, h)), h = null;
|
|
1177
1177
|
}, h.ontimeout = function() {
|
|
1178
1178
|
let D = s.timeout ? "timeout of " + s.timeout + "ms exceeded" : "timeout exceeded";
|
|
1179
1179
|
const O = s.transitional || dt;
|
|
1180
|
-
s.timeoutErrorMessage && (D = s.timeoutErrorMessage), r(new
|
|
1180
|
+
s.timeoutErrorMessage && (D = s.timeoutErrorMessage), r(new R(
|
|
1181
1181
|
D,
|
|
1182
|
-
O.clarifyTimeoutError ?
|
|
1182
|
+
O.clarifyTimeoutError ? R.ETIMEDOUT : R.ECONNABORTED,
|
|
1183
1183
|
e,
|
|
1184
1184
|
h
|
|
1185
1185
|
)), h = null;
|
|
1186
1186
|
}, i === void 0 && o.setContentType(null), "setRequestHeader" in h && a.forEach(o.toJSON(), function(D, O) {
|
|
1187
1187
|
h.setRequestHeader(O, D);
|
|
1188
|
-
}), a.isUndefined(s.withCredentials) || (h.withCredentials = !!s.withCredentials), c && c !== "json" && (h.responseType = s.responseType),
|
|
1189
|
-
h && (r(!
|
|
1190
|
-
}, s.cancelToken && s.cancelToken.subscribe(
|
|
1191
|
-
const
|
|
1192
|
-
if (
|
|
1193
|
-
r(new
|
|
1188
|
+
}), a.isUndefined(s.withCredentials) || (h.withCredentials = !!s.withCredentials), c && c !== "json" && (h.responseType = s.responseType), l && ([w, p] = se(l, !0), h.addEventListener("progress", w)), f && h.upload && ([d, S] = se(f), h.upload.addEventListener("progress", d), h.upload.addEventListener("loadend", S)), (s.cancelToken || s.signal) && (u = (g) => {
|
|
1189
|
+
h && (r(!g || g.type ? new J(null, e, h) : g), h.abort(), h = null);
|
|
1190
|
+
}, s.cancelToken && s.cancelToken.subscribe(u), s.signal && (s.signal.aborted ? u() : s.signal.addEventListener("abort", u)));
|
|
1191
|
+
const E = Zn(s.url);
|
|
1192
|
+
if (E && P.protocols.indexOf(E) === -1) {
|
|
1193
|
+
r(new R("Unsupported protocol " + E + ":", R.ERR_BAD_REQUEST, e));
|
|
1194
1194
|
return;
|
|
1195
1195
|
}
|
|
1196
1196
|
h.send(i || null);
|
|
@@ -1199,22 +1199,22 @@ const bt = (e) => {
|
|
|
1199
1199
|
const { length: n } = e = e ? e.filter(Boolean) : [];
|
|
1200
1200
|
if (t || n) {
|
|
1201
1201
|
let r = new AbortController(), s;
|
|
1202
|
-
const i = function(
|
|
1202
|
+
const i = function(l) {
|
|
1203
1203
|
if (!s) {
|
|
1204
1204
|
s = !0, c();
|
|
1205
|
-
const
|
|
1206
|
-
r.abort(
|
|
1205
|
+
const u = l instanceof Error ? l : this.reason;
|
|
1206
|
+
r.abort(u instanceof R ? u : new J(u instanceof Error ? u.message : u));
|
|
1207
1207
|
}
|
|
1208
1208
|
};
|
|
1209
1209
|
let o = t && setTimeout(() => {
|
|
1210
|
-
o = null, i(new
|
|
1210
|
+
o = null, i(new R(`timeout ${t} of ms exceeded`, R.ETIMEDOUT));
|
|
1211
1211
|
}, t);
|
|
1212
1212
|
const c = () => {
|
|
1213
|
-
e && (o && clearTimeout(o), o = null, e.forEach((
|
|
1214
|
-
|
|
1213
|
+
e && (o && clearTimeout(o), o = null, e.forEach((l) => {
|
|
1214
|
+
l.unsubscribe ? l.unsubscribe(i) : l.removeEventListener("abort", i);
|
|
1215
1215
|
}), e = null);
|
|
1216
1216
|
};
|
|
1217
|
-
e.forEach((
|
|
1217
|
+
e.forEach((l) => l.addEventListener("abort", i));
|
|
1218
1218
|
const { signal: f } = r;
|
|
1219
1219
|
return f.unsubscribe = () => a.asap(c), f;
|
|
1220
1220
|
}
|
|
@@ -1227,10 +1227,10 @@ const bt = (e) => {
|
|
|
1227
1227
|
let r = 0, s;
|
|
1228
1228
|
for (; r < n; )
|
|
1229
1229
|
s = r + t, yield e.slice(r, s), r = s;
|
|
1230
|
-
},
|
|
1231
|
-
for await (const n of
|
|
1230
|
+
}, lr = async function* (e, t) {
|
|
1231
|
+
for await (const n of ur(e))
|
|
1232
1232
|
yield* cr(n, t);
|
|
1233
|
-
},
|
|
1233
|
+
}, ur = async function* (e) {
|
|
1234
1234
|
if (e[Symbol.asyncIterator]) {
|
|
1235
1235
|
yield* e;
|
|
1236
1236
|
return;
|
|
@@ -1247,26 +1247,26 @@ const bt = (e) => {
|
|
|
1247
1247
|
await t.cancel();
|
|
1248
1248
|
}
|
|
1249
1249
|
}, Je = (e, t, n, r) => {
|
|
1250
|
-
const s =
|
|
1250
|
+
const s = lr(e, t);
|
|
1251
1251
|
let i = 0, o, c = (f) => {
|
|
1252
1252
|
o || (o = !0, r && r(f));
|
|
1253
1253
|
};
|
|
1254
1254
|
return new ReadableStream({
|
|
1255
1255
|
async pull(f) {
|
|
1256
1256
|
try {
|
|
1257
|
-
const { done:
|
|
1258
|
-
if (
|
|
1257
|
+
const { done: l, value: u } = await s.next();
|
|
1258
|
+
if (l) {
|
|
1259
1259
|
c(), f.close();
|
|
1260
1260
|
return;
|
|
1261
1261
|
}
|
|
1262
|
-
let d =
|
|
1262
|
+
let d = u.byteLength;
|
|
1263
1263
|
if (n) {
|
|
1264
1264
|
let w = i += d;
|
|
1265
1265
|
n(w);
|
|
1266
1266
|
}
|
|
1267
|
-
f.enqueue(new Uint8Array(
|
|
1268
|
-
} catch (
|
|
1269
|
-
throw c(
|
|
1267
|
+
f.enqueue(new Uint8Array(u));
|
|
1268
|
+
} catch (l) {
|
|
1269
|
+
throw c(l), l;
|
|
1270
1270
|
}
|
|
1271
1271
|
},
|
|
1272
1272
|
cancel(f) {
|
|
@@ -1275,15 +1275,15 @@ const bt = (e) => {
|
|
|
1275
1275
|
}, {
|
|
1276
1276
|
highWaterMark: 2
|
|
1277
1277
|
});
|
|
1278
|
-
}, fe = typeof fetch == "function" && typeof Request == "function" && typeof Response == "function", wt = fe && typeof ReadableStream == "function", fr = fe && (typeof TextEncoder == "function" ? /* @__PURE__ */ ((e) => (t) => e.encode(t))(new TextEncoder()) : async (e) => new Uint8Array(await new Response(e).arrayBuffer())),
|
|
1278
|
+
}, fe = typeof fetch == "function" && typeof Request == "function" && typeof Response == "function", wt = fe && typeof ReadableStream == "function", fr = fe && (typeof TextEncoder == "function" ? /* @__PURE__ */ ((e) => (t) => e.encode(t))(new TextEncoder()) : async (e) => new Uint8Array(await new Response(e).arrayBuffer())), St = (e, ...t) => {
|
|
1279
1279
|
try {
|
|
1280
1280
|
return !!e(...t);
|
|
1281
1281
|
} catch {
|
|
1282
1282
|
return !1;
|
|
1283
1283
|
}
|
|
1284
|
-
}, dr = wt &&
|
|
1284
|
+
}, dr = wt && St(() => {
|
|
1285
1285
|
let e = !1;
|
|
1286
|
-
const t = new Request(
|
|
1286
|
+
const t = new Request(P.origin, {
|
|
1287
1287
|
body: new ReadableStream(),
|
|
1288
1288
|
method: "POST",
|
|
1289
1289
|
get duplex() {
|
|
@@ -1291,13 +1291,13 @@ const bt = (e) => {
|
|
|
1291
1291
|
}
|
|
1292
1292
|
}).headers.has("Content-Type");
|
|
1293
1293
|
return e && !t;
|
|
1294
|
-
}),
|
|
1294
|
+
}), Ve = 64 * 1024, Ae = wt && St(() => a.isReadableStream(new Response("").body)), oe = {
|
|
1295
1295
|
stream: Ae && ((e) => e.body)
|
|
1296
1296
|
};
|
|
1297
1297
|
fe && ((e) => {
|
|
1298
1298
|
["text", "arrayBuffer", "blob", "formData", "stream"].forEach((t) => {
|
|
1299
1299
|
!oe[t] && (oe[t] = a.isFunction(e[t]) ? (n) => n[t]() : (n, r) => {
|
|
1300
|
-
throw new
|
|
1300
|
+
throw new R(`Response type '${t}' is not supported`, R.ERR_NOT_SUPPORT, r);
|
|
1301
1301
|
});
|
|
1302
1302
|
});
|
|
1303
1303
|
})(new Response());
|
|
@@ -1307,7 +1307,7 @@ const pr = async (e) => {
|
|
|
1307
1307
|
if (a.isBlob(e))
|
|
1308
1308
|
return e.size;
|
|
1309
1309
|
if (a.isSpecCompliantForm(e))
|
|
1310
|
-
return (await new Request(
|
|
1310
|
+
return (await new Request(P.origin, {
|
|
1311
1311
|
method: "POST",
|
|
1312
1312
|
body: e
|
|
1313
1313
|
}).arrayBuffer()).byteLength;
|
|
@@ -1328,83 +1328,83 @@ const pr = async (e) => {
|
|
|
1328
1328
|
timeout: o,
|
|
1329
1329
|
onDownloadProgress: c,
|
|
1330
1330
|
onUploadProgress: f,
|
|
1331
|
-
responseType:
|
|
1332
|
-
headers:
|
|
1331
|
+
responseType: l,
|
|
1332
|
+
headers: u,
|
|
1333
1333
|
withCredentials: d = "same-origin",
|
|
1334
1334
|
fetchOptions: w
|
|
1335
|
-
} =
|
|
1336
|
-
|
|
1337
|
-
let
|
|
1338
|
-
const m =
|
|
1339
|
-
|
|
1335
|
+
} = Rt(e);
|
|
1336
|
+
l = l ? (l + "").toLowerCase() : "text";
|
|
1337
|
+
let S = ar([s, i && i.toAbortSignal()], o), p;
|
|
1338
|
+
const m = S && S.unsubscribe && (() => {
|
|
1339
|
+
S.unsubscribe();
|
|
1340
1340
|
});
|
|
1341
1341
|
let h;
|
|
1342
1342
|
try {
|
|
1343
|
-
if (f && dr && n !== "get" && n !== "head" && (h = await hr(
|
|
1343
|
+
if (f && dr && n !== "get" && n !== "head" && (h = await hr(u, r)) !== 0) {
|
|
1344
1344
|
let O = new Request(t, {
|
|
1345
1345
|
method: "POST",
|
|
1346
1346
|
body: r,
|
|
1347
1347
|
duplex: "half"
|
|
1348
|
-
}),
|
|
1349
|
-
if (a.isFormData(r) && (
|
|
1350
|
-
const [
|
|
1348
|
+
}), I;
|
|
1349
|
+
if (a.isFormData(r) && (I = O.headers.get("content-type")) && u.setContentType(I), O.body) {
|
|
1350
|
+
const [F, x] = ve(
|
|
1351
1351
|
h,
|
|
1352
1352
|
se(ze(f))
|
|
1353
1353
|
);
|
|
1354
|
-
r = Je(O.body,
|
|
1354
|
+
r = Je(O.body, Ve, F, x);
|
|
1355
1355
|
}
|
|
1356
1356
|
}
|
|
1357
1357
|
a.isString(d) || (d = d ? "include" : "omit");
|
|
1358
|
-
const
|
|
1358
|
+
const y = "credentials" in Request.prototype;
|
|
1359
1359
|
p = new Request(t, {
|
|
1360
1360
|
...w,
|
|
1361
|
-
signal:
|
|
1361
|
+
signal: S,
|
|
1362
1362
|
method: n.toUpperCase(),
|
|
1363
|
-
headers:
|
|
1363
|
+
headers: u.normalize().toJSON(),
|
|
1364
1364
|
body: r,
|
|
1365
1365
|
duplex: "half",
|
|
1366
|
-
credentials:
|
|
1366
|
+
credentials: y ? d : void 0
|
|
1367
1367
|
});
|
|
1368
|
-
let
|
|
1369
|
-
const
|
|
1370
|
-
if (Ae && (c ||
|
|
1368
|
+
let E = await fetch(p);
|
|
1369
|
+
const g = Ae && (l === "stream" || l === "response");
|
|
1370
|
+
if (Ae && (c || g && m)) {
|
|
1371
1371
|
const O = {};
|
|
1372
|
-
["status", "statusText", "headers"].forEach((
|
|
1373
|
-
O[
|
|
1372
|
+
["status", "statusText", "headers"].forEach((Y) => {
|
|
1373
|
+
O[Y] = E[Y];
|
|
1374
1374
|
});
|
|
1375
|
-
const
|
|
1376
|
-
|
|
1375
|
+
const I = a.toFiniteNumber(E.headers.get("content-length")), [F, x] = c && ve(
|
|
1376
|
+
I,
|
|
1377
1377
|
se(ze(c), !0)
|
|
1378
1378
|
) || [];
|
|
1379
|
-
|
|
1380
|
-
Je(
|
|
1381
|
-
|
|
1379
|
+
E = new Response(
|
|
1380
|
+
Je(E.body, Ve, F, () => {
|
|
1381
|
+
x && x(), m && m();
|
|
1382
1382
|
}),
|
|
1383
1383
|
O
|
|
1384
1384
|
);
|
|
1385
1385
|
}
|
|
1386
|
-
|
|
1387
|
-
let D = await oe[a.findKey(oe,
|
|
1388
|
-
return !
|
|
1389
|
-
mt(O,
|
|
1386
|
+
l = l || "text";
|
|
1387
|
+
let D = await oe[a.findKey(oe, l) || "text"](E, e);
|
|
1388
|
+
return !g && m && m(), await new Promise((O, I) => {
|
|
1389
|
+
mt(O, I, {
|
|
1390
1390
|
data: D,
|
|
1391
|
-
headers: U.from(
|
|
1392
|
-
status:
|
|
1393
|
-
statusText:
|
|
1391
|
+
headers: U.from(E.headers),
|
|
1392
|
+
status: E.status,
|
|
1393
|
+
statusText: E.statusText,
|
|
1394
1394
|
config: e,
|
|
1395
1395
|
request: p
|
|
1396
1396
|
});
|
|
1397
1397
|
});
|
|
1398
|
-
} catch (
|
|
1399
|
-
throw m && m(),
|
|
1400
|
-
new
|
|
1398
|
+
} catch (y) {
|
|
1399
|
+
throw m && m(), y && y.name === "TypeError" && /Load failed|fetch/i.test(y.message) ? Object.assign(
|
|
1400
|
+
new R("Network Error", R.ERR_NETWORK, e, p),
|
|
1401
1401
|
{
|
|
1402
|
-
cause:
|
|
1402
|
+
cause: y.cause || y
|
|
1403
1403
|
}
|
|
1404
|
-
) :
|
|
1404
|
+
) : R.from(y, y && y.code, e, p);
|
|
1405
1405
|
}
|
|
1406
1406
|
}), Ce = {
|
|
1407
|
-
http:
|
|
1407
|
+
http: xn,
|
|
1408
1408
|
xhr: ir,
|
|
1409
1409
|
fetch: mr
|
|
1410
1410
|
};
|
|
@@ -1417,7 +1417,7 @@ a.forEach(Ce, (e, t) => {
|
|
|
1417
1417
|
Object.defineProperty(e, "adapterName", { value: t });
|
|
1418
1418
|
}
|
|
1419
1419
|
});
|
|
1420
|
-
const
|
|
1420
|
+
const We = (e) => `- ${e}`, br = (e) => a.isFunction(e) || e === null || e === !1, yt = {
|
|
1421
1421
|
getAdapter: (e) => {
|
|
1422
1422
|
e = a.isArray(e) ? e : [e];
|
|
1423
1423
|
const { length: t } = e;
|
|
@@ -1426,8 +1426,8 @@ const Ke = (e) => `- ${e}`, yr = (e) => a.isFunction(e) || e === null || e === !
|
|
|
1426
1426
|
for (let i = 0; i < t; i++) {
|
|
1427
1427
|
n = e[i];
|
|
1428
1428
|
let o;
|
|
1429
|
-
if (r = n, !
|
|
1430
|
-
throw new
|
|
1429
|
+
if (r = n, !br(n) && (r = Ce[(o = String(n)).toLowerCase()], r === void 0))
|
|
1430
|
+
throw new R(`Unknown adapter '${o}'`);
|
|
1431
1431
|
if (r)
|
|
1432
1432
|
break;
|
|
1433
1433
|
s[o || "#" + i] = r;
|
|
@@ -1437,9 +1437,9 @@ const Ke = (e) => `- ${e}`, yr = (e) => a.isFunction(e) || e === null || e === !
|
|
|
1437
1437
|
([c, f]) => `adapter ${c} ` + (f === !1 ? "is not supported by the environment" : "is not available in the build")
|
|
1438
1438
|
);
|
|
1439
1439
|
let o = t ? i.length > 1 ? `since :
|
|
1440
|
-
` + i.map(
|
|
1441
|
-
`) : " " +
|
|
1442
|
-
throw new
|
|
1440
|
+
` + i.map(We).join(`
|
|
1441
|
+
`) : " " + We(i[0]) : "as no adapter specified";
|
|
1442
|
+
throw new R(
|
|
1443
1443
|
"There is no suitable adapter to dispatch the request " + o,
|
|
1444
1444
|
"ERR_NOT_SUPPORT"
|
|
1445
1445
|
);
|
|
@@ -1448,46 +1448,46 @@ const Ke = (e) => `- ${e}`, yr = (e) => a.isFunction(e) || e === null || e === !
|
|
|
1448
1448
|
},
|
|
1449
1449
|
adapters: Ce
|
|
1450
1450
|
};
|
|
1451
|
-
function
|
|
1451
|
+
function Se(e) {
|
|
1452
1452
|
if (e.cancelToken && e.cancelToken.throwIfRequested(), e.signal && e.signal.aborted)
|
|
1453
|
-
throw new
|
|
1453
|
+
throw new J(null, e);
|
|
1454
1454
|
}
|
|
1455
|
-
function
|
|
1456
|
-
return
|
|
1455
|
+
function Ge(e) {
|
|
1456
|
+
return Se(e), e.headers = U.from(e.headers), e.data = we.call(
|
|
1457
1457
|
e,
|
|
1458
1458
|
e.transformRequest
|
|
1459
|
-
), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1),
|
|
1460
|
-
return
|
|
1459
|
+
), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), yt.getAdapter(e.adapter || X.adapter)(e).then(function(r) {
|
|
1460
|
+
return Se(e), r.data = we.call(
|
|
1461
1461
|
e,
|
|
1462
1462
|
e.transformResponse,
|
|
1463
1463
|
r
|
|
1464
1464
|
), r.headers = U.from(r.headers), r;
|
|
1465
1465
|
}, function(r) {
|
|
1466
|
-
return ht(r) || (
|
|
1466
|
+
return ht(r) || (Se(e), r && r.response && (r.response.data = we.call(
|
|
1467
1467
|
e,
|
|
1468
1468
|
e.transformResponse,
|
|
1469
1469
|
r.response
|
|
1470
1470
|
), r.response.headers = U.from(r.response.headers))), Promise.reject(r);
|
|
1471
1471
|
});
|
|
1472
1472
|
}
|
|
1473
|
-
const
|
|
1473
|
+
const Et = "1.9.0", de = {};
|
|
1474
1474
|
["object", "boolean", "number", "function", "string", "symbol"].forEach((e, t) => {
|
|
1475
1475
|
de[e] = function(r) {
|
|
1476
1476
|
return typeof r === e || "a" + (t < 1 ? "n " : " ") + e;
|
|
1477
1477
|
};
|
|
1478
1478
|
});
|
|
1479
|
-
const
|
|
1479
|
+
const Ke = {};
|
|
1480
1480
|
de.transitional = function(t, n, r) {
|
|
1481
1481
|
function s(i, o) {
|
|
1482
|
-
return "[Axios v" +
|
|
1482
|
+
return "[Axios v" + Et + "] Transitional option '" + i + "'" + o + (r ? ". " + r : "");
|
|
1483
1483
|
}
|
|
1484
1484
|
return (i, o, c) => {
|
|
1485
1485
|
if (t === !1)
|
|
1486
|
-
throw new
|
|
1486
|
+
throw new R(
|
|
1487
1487
|
s(o, " has been removed" + (n ? " in " + n : "")),
|
|
1488
|
-
|
|
1488
|
+
R.ERR_DEPRECATED
|
|
1489
1489
|
);
|
|
1490
|
-
return n && !
|
|
1490
|
+
return n && !Ke[o] && (Ke[o] = !0, console.warn(
|
|
1491
1491
|
s(
|
|
1492
1492
|
o,
|
|
1493
1493
|
" has been deprecated since v" + n + " and will be removed in the near future"
|
|
@@ -1498,9 +1498,9 @@ de.transitional = function(t, n, r) {
|
|
|
1498
1498
|
de.spelling = function(t) {
|
|
1499
1499
|
return (n, r) => (console.warn(`${r} is likely a misspelling of ${t}`), !0);
|
|
1500
1500
|
};
|
|
1501
|
-
function
|
|
1501
|
+
function Rr(e, t, n) {
|
|
1502
1502
|
if (typeof e != "object")
|
|
1503
|
-
throw new
|
|
1503
|
+
throw new R("options must be an object", R.ERR_BAD_OPTION_VALUE);
|
|
1504
1504
|
const r = Object.keys(e);
|
|
1505
1505
|
let s = r.length;
|
|
1506
1506
|
for (; s-- > 0; ) {
|
|
@@ -1508,22 +1508,22 @@ function br(e, t, n) {
|
|
|
1508
1508
|
if (o) {
|
|
1509
1509
|
const c = e[i], f = c === void 0 || o(c, i, e);
|
|
1510
1510
|
if (f !== !0)
|
|
1511
|
-
throw new
|
|
1511
|
+
throw new R("option " + i + " must be " + f, R.ERR_BAD_OPTION_VALUE);
|
|
1512
1512
|
continue;
|
|
1513
1513
|
}
|
|
1514
1514
|
if (n !== !0)
|
|
1515
|
-
throw new
|
|
1515
|
+
throw new R("Unknown option " + i, R.ERR_BAD_OPTION);
|
|
1516
1516
|
}
|
|
1517
1517
|
}
|
|
1518
1518
|
const re = {
|
|
1519
|
-
assertOptions:
|
|
1519
|
+
assertOptions: Rr,
|
|
1520
1520
|
validators: de
|
|
1521
|
-
},
|
|
1521
|
+
}, B = re.validators;
|
|
1522
1522
|
let H = class {
|
|
1523
1523
|
constructor(t) {
|
|
1524
1524
|
this.defaults = t || {}, this.interceptors = {
|
|
1525
|
-
request: new
|
|
1526
|
-
response: new
|
|
1525
|
+
request: new Me(),
|
|
1526
|
+
response: new Me()
|
|
1527
1527
|
};
|
|
1528
1528
|
}
|
|
1529
1529
|
/**
|
|
@@ -1552,20 +1552,20 @@ let H = class {
|
|
|
1552
1552
|
}
|
|
1553
1553
|
}
|
|
1554
1554
|
_request(t, n) {
|
|
1555
|
-
typeof t == "string" ? (n = n || {}, n.url = t) : n = t || {}, n =
|
|
1555
|
+
typeof t == "string" ? (n = n || {}, n.url = t) : n = t || {}, n = v(this.defaults, n);
|
|
1556
1556
|
const { transitional: r, paramsSerializer: s, headers: i } = n;
|
|
1557
1557
|
r !== void 0 && re.assertOptions(r, {
|
|
1558
|
-
silentJSONParsing:
|
|
1559
|
-
forcedJSONParsing:
|
|
1560
|
-
clarifyTimeoutError:
|
|
1558
|
+
silentJSONParsing: B.transitional(B.boolean),
|
|
1559
|
+
forcedJSONParsing: B.transitional(B.boolean),
|
|
1560
|
+
clarifyTimeoutError: B.transitional(B.boolean)
|
|
1561
1561
|
}, !1), s != null && (a.isFunction(s) ? n.paramsSerializer = {
|
|
1562
1562
|
serialize: s
|
|
1563
1563
|
} : re.assertOptions(s, {
|
|
1564
|
-
encode:
|
|
1565
|
-
serialize:
|
|
1564
|
+
encode: B.function,
|
|
1565
|
+
serialize: B.function
|
|
1566
1566
|
}, !0)), n.allowAbsoluteUrls !== void 0 || (this.defaults.allowAbsoluteUrls !== void 0 ? n.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls : n.allowAbsoluteUrls = !0), re.assertOptions(n, {
|
|
1567
|
-
baseUrl:
|
|
1568
|
-
withXsrfToken:
|
|
1567
|
+
baseUrl: B.spelling("baseURL"),
|
|
1568
|
+
withXsrfToken: B.spelling("withXSRFToken")
|
|
1569
1569
|
}, !0), n.method = (n.method || this.defaults.method || "get").toLowerCase();
|
|
1570
1570
|
let o = i && a.merge(
|
|
1571
1571
|
i.common,
|
|
@@ -1582,46 +1582,46 @@ let H = class {
|
|
|
1582
1582
|
this.interceptors.request.forEach(function(m) {
|
|
1583
1583
|
typeof m.runWhen == "function" && m.runWhen(n) === !1 || (f = f && m.synchronous, c.unshift(m.fulfilled, m.rejected));
|
|
1584
1584
|
});
|
|
1585
|
-
const
|
|
1585
|
+
const l = [];
|
|
1586
1586
|
this.interceptors.response.forEach(function(m) {
|
|
1587
|
-
|
|
1587
|
+
l.push(m.fulfilled, m.rejected);
|
|
1588
1588
|
});
|
|
1589
|
-
let
|
|
1589
|
+
let u, d = 0, w;
|
|
1590
1590
|
if (!f) {
|
|
1591
|
-
const p = [
|
|
1592
|
-
for (p.unshift.apply(p, c), p.push.apply(p,
|
|
1593
|
-
|
|
1594
|
-
return
|
|
1591
|
+
const p = [Ge.bind(this), void 0];
|
|
1592
|
+
for (p.unshift.apply(p, c), p.push.apply(p, l), w = p.length, u = Promise.resolve(n); d < w; )
|
|
1593
|
+
u = u.then(p[d++], p[d++]);
|
|
1594
|
+
return u;
|
|
1595
1595
|
}
|
|
1596
1596
|
w = c.length;
|
|
1597
|
-
let
|
|
1597
|
+
let S = n;
|
|
1598
1598
|
for (d = 0; d < w; ) {
|
|
1599
1599
|
const p = c[d++], m = c[d++];
|
|
1600
1600
|
try {
|
|
1601
|
-
|
|
1601
|
+
S = p(S);
|
|
1602
1602
|
} catch (h) {
|
|
1603
1603
|
m.call(this, h);
|
|
1604
1604
|
break;
|
|
1605
1605
|
}
|
|
1606
1606
|
}
|
|
1607
1607
|
try {
|
|
1608
|
-
|
|
1608
|
+
u = Ge.call(this, S);
|
|
1609
1609
|
} catch (p) {
|
|
1610
1610
|
return Promise.reject(p);
|
|
1611
1611
|
}
|
|
1612
|
-
for (d = 0, w =
|
|
1613
|
-
|
|
1614
|
-
return
|
|
1612
|
+
for (d = 0, w = l.length; d < w; )
|
|
1613
|
+
u = u.then(l[d++], l[d++]);
|
|
1614
|
+
return u;
|
|
1615
1615
|
}
|
|
1616
1616
|
getUri(t) {
|
|
1617
|
-
t =
|
|
1618
|
-
const n =
|
|
1617
|
+
t = v(this.defaults, t);
|
|
1618
|
+
const n = bt(t.baseURL, t.url, t.allowAbsoluteUrls);
|
|
1619
1619
|
return ft(n, t.params, t.paramsSerializer);
|
|
1620
1620
|
}
|
|
1621
1621
|
};
|
|
1622
1622
|
a.forEach(["delete", "get", "head", "options"], function(t) {
|
|
1623
1623
|
H.prototype[t] = function(n, r) {
|
|
1624
|
-
return this.request(
|
|
1624
|
+
return this.request(v(r || {}, {
|
|
1625
1625
|
method: t,
|
|
1626
1626
|
url: n,
|
|
1627
1627
|
data: (r || {}).data
|
|
@@ -1631,7 +1631,7 @@ a.forEach(["delete", "get", "head", "options"], function(t) {
|
|
|
1631
1631
|
a.forEach(["post", "put", "patch"], function(t) {
|
|
1632
1632
|
function n(r) {
|
|
1633
1633
|
return function(i, o, c) {
|
|
1634
|
-
return this.request(
|
|
1634
|
+
return this.request(v(c || {}, {
|
|
1635
1635
|
method: t,
|
|
1636
1636
|
headers: r ? {
|
|
1637
1637
|
"Content-Type": "multipart/form-data"
|
|
@@ -1643,7 +1643,7 @@ a.forEach(["post", "put", "patch"], function(t) {
|
|
|
1643
1643
|
}
|
|
1644
1644
|
H.prototype[t] = n(), H.prototype[t + "Form"] = n(!0);
|
|
1645
1645
|
});
|
|
1646
|
-
let wr = class
|
|
1646
|
+
let wr = class gt {
|
|
1647
1647
|
constructor(t) {
|
|
1648
1648
|
if (typeof t != "function")
|
|
1649
1649
|
throw new TypeError("executor must be a function.");
|
|
@@ -1667,7 +1667,7 @@ let wr = class St {
|
|
|
1667
1667
|
r.unsubscribe(i);
|
|
1668
1668
|
}, o;
|
|
1669
1669
|
}, t(function(i, o, c) {
|
|
1670
|
-
r.reason || (r.reason = new
|
|
1670
|
+
r.reason || (r.reason = new J(i, o, c), n(r.reason));
|
|
1671
1671
|
});
|
|
1672
1672
|
}
|
|
1673
1673
|
/**
|
|
@@ -1709,22 +1709,22 @@ let wr = class St {
|
|
|
1709
1709
|
static source() {
|
|
1710
1710
|
let t;
|
|
1711
1711
|
return {
|
|
1712
|
-
token: new
|
|
1712
|
+
token: new gt(function(s) {
|
|
1713
1713
|
t = s;
|
|
1714
1714
|
}),
|
|
1715
1715
|
cancel: t
|
|
1716
1716
|
};
|
|
1717
1717
|
}
|
|
1718
1718
|
};
|
|
1719
|
-
function
|
|
1719
|
+
function Sr(e) {
|
|
1720
1720
|
return function(n) {
|
|
1721
1721
|
return e.apply(null, n);
|
|
1722
1722
|
};
|
|
1723
1723
|
}
|
|
1724
|
-
function
|
|
1724
|
+
function yr(e) {
|
|
1725
1725
|
return a.isObject(e) && e.isAxiosError === !0;
|
|
1726
1726
|
}
|
|
1727
|
-
const
|
|
1727
|
+
const Ne = {
|
|
1728
1728
|
Continue: 100,
|
|
1729
1729
|
SwitchingProtocols: 101,
|
|
1730
1730
|
Processing: 102,
|
|
@@ -1789,115 +1789,115 @@ const xe = {
|
|
|
1789
1789
|
NotExtended: 510,
|
|
1790
1790
|
NetworkAuthenticationRequired: 511
|
|
1791
1791
|
};
|
|
1792
|
-
Object.entries(
|
|
1793
|
-
|
|
1792
|
+
Object.entries(Ne).forEach(([e, t]) => {
|
|
1793
|
+
Ne[t] = e;
|
|
1794
1794
|
});
|
|
1795
1795
|
function Ot(e) {
|
|
1796
|
-
const t = new H(e), n =
|
|
1796
|
+
const t = new H(e), n = Qe(H.prototype.request, t);
|
|
1797
1797
|
return a.extend(n, H.prototype, t, { allOwnKeys: !0 }), a.extend(n, t, null, { allOwnKeys: !0 }), n.create = function(s) {
|
|
1798
|
-
return Ot(
|
|
1798
|
+
return Ot(v(e, s));
|
|
1799
1799
|
}, n;
|
|
1800
1800
|
}
|
|
1801
|
-
const T = Ot(
|
|
1801
|
+
const T = Ot(X);
|
|
1802
1802
|
T.Axios = H;
|
|
1803
|
-
T.CanceledError =
|
|
1803
|
+
T.CanceledError = J;
|
|
1804
1804
|
T.CancelToken = wr;
|
|
1805
1805
|
T.isCancel = ht;
|
|
1806
|
-
T.VERSION =
|
|
1807
|
-
T.toFormData =
|
|
1808
|
-
T.AxiosError =
|
|
1806
|
+
T.VERSION = Et;
|
|
1807
|
+
T.toFormData = ue;
|
|
1808
|
+
T.AxiosError = R;
|
|
1809
1809
|
T.Cancel = T.CanceledError;
|
|
1810
1810
|
T.all = function(t) {
|
|
1811
1811
|
return Promise.all(t);
|
|
1812
1812
|
};
|
|
1813
|
-
T.spread =
|
|
1814
|
-
T.isAxiosError =
|
|
1815
|
-
T.mergeConfig =
|
|
1813
|
+
T.spread = Sr;
|
|
1814
|
+
T.isAxiosError = yr;
|
|
1815
|
+
T.mergeConfig = v;
|
|
1816
1816
|
T.AxiosHeaders = U;
|
|
1817
1817
|
T.formToJSON = (e) => pt(a.isHTMLForm(e) ? new FormData(e) : e);
|
|
1818
|
-
T.getAdapter =
|
|
1819
|
-
T.HttpStatusCode =
|
|
1818
|
+
T.getAdapter = yt.getAdapter;
|
|
1819
|
+
T.HttpStatusCode = Ne;
|
|
1820
1820
|
T.default = T;
|
|
1821
1821
|
const {
|
|
1822
|
-
Axios:
|
|
1823
|
-
AxiosError:
|
|
1824
|
-
CanceledError:
|
|
1825
|
-
isCancel:
|
|
1826
|
-
CancelToken:
|
|
1827
|
-
VERSION:
|
|
1828
|
-
all:
|
|
1829
|
-
Cancel:
|
|
1830
|
-
isAxiosError:
|
|
1831
|
-
spread:
|
|
1832
|
-
toFormData:
|
|
1833
|
-
AxiosHeaders:
|
|
1834
|
-
HttpStatusCode:
|
|
1822
|
+
Axios: jr,
|
|
1823
|
+
AxiosError: Mr,
|
|
1824
|
+
CanceledError: Hr,
|
|
1825
|
+
isCancel: vr,
|
|
1826
|
+
CancelToken: zr,
|
|
1827
|
+
VERSION: $r,
|
|
1828
|
+
all: Jr,
|
|
1829
|
+
Cancel: Vr,
|
|
1830
|
+
isAxiosError: Wr,
|
|
1831
|
+
spread: Gr,
|
|
1832
|
+
toFormData: Kr,
|
|
1833
|
+
AxiosHeaders: Xr,
|
|
1834
|
+
HttpStatusCode: _e,
|
|
1835
1835
|
formToJSON: Yr,
|
|
1836
1836
|
getAdapter: Zr,
|
|
1837
|
-
mergeConfig:
|
|
1838
|
-
} = T,
|
|
1839
|
-
let
|
|
1840
|
-
const
|
|
1837
|
+
mergeConfig: Qr
|
|
1838
|
+
} = T, Xe = 1, ee = Ft.ECONOMY;
|
|
1839
|
+
let ye = new AbortController();
|
|
1840
|
+
const Er = 3 * 60 * 1e3, Ye = (e) => {
|
|
1841
1841
|
if (!e.origin || !e.destination)
|
|
1842
1842
|
throw new Error("Origin and destination are required.");
|
|
1843
1843
|
if (!e.dates)
|
|
1844
1844
|
throw new Error("At least one date is required.");
|
|
1845
|
-
if (e.flightType ===
|
|
1845
|
+
if (e.flightType === Ze.ROUND_TRIP && e.dates.length != 2)
|
|
1846
1846
|
throw new Error(
|
|
1847
1847
|
"Two dates are required for round-trip flights: departure and return."
|
|
1848
1848
|
);
|
|
1849
|
-
},
|
|
1849
|
+
}, gr = (e, t, n) => e[t] === _e.Ok ? e : {
|
|
1850
1850
|
...e,
|
|
1851
|
-
[t]: n ??
|
|
1852
|
-
},
|
|
1853
|
-
const { token: e, config: t } =
|
|
1854
|
-
inboundResults:
|
|
1855
|
-
outboundResults:
|
|
1851
|
+
[t]: n ?? _e.MultipleChoices
|
|
1852
|
+
}, es = () => {
|
|
1853
|
+
const { token: e, config: t } = Nt(), [n, r] = be(""), [s, i] = be([]), [o, c] = be(!1), f = xt(null), {
|
|
1854
|
+
inboundResults: l,
|
|
1855
|
+
outboundResults: u,
|
|
1856
1856
|
setInboundResults: d,
|
|
1857
1857
|
setOutboundResults: w,
|
|
1858
|
-
partialOfferRequestId:
|
|
1858
|
+
partialOfferRequestId: S,
|
|
1859
1859
|
setPartialOfferRequestId: p,
|
|
1860
1860
|
airlineStatuses: m,
|
|
1861
1861
|
setAirlineStatuses: h
|
|
1862
|
-
} =
|
|
1863
|
-
queryKey: [
|
|
1864
|
-
queryFn:
|
|
1865
|
-
}),
|
|
1866
|
-
data:
|
|
1867
|
-
inbound:
|
|
1862
|
+
} = It(), { data: y } = Pt({
|
|
1863
|
+
queryKey: [z.SUPPORTED_AIRLINE_PROGRAMS],
|
|
1864
|
+
queryFn: V.getSupportedAirlinePrograms
|
|
1865
|
+
}), E = ({
|
|
1866
|
+
data: b,
|
|
1867
|
+
inbound: N
|
|
1868
1868
|
}) => {
|
|
1869
|
-
const C =
|
|
1870
|
-
return (
|
|
1869
|
+
const C = Lt(b);
|
|
1870
|
+
return (N ? d : w)(Ut(C)), C;
|
|
1871
1871
|
}, {
|
|
1872
|
-
mutate:
|
|
1872
|
+
mutate: g,
|
|
1873
1873
|
status: D,
|
|
1874
1874
|
error: O
|
|
1875
1875
|
} = me({
|
|
1876
|
-
mutationFn: async (
|
|
1877
|
-
|
|
1876
|
+
mutationFn: async (b) => {
|
|
1877
|
+
Ye(b);
|
|
1878
1878
|
const C = {
|
|
1879
1879
|
passengers: Array.from(
|
|
1880
|
-
{ length:
|
|
1880
|
+
{ length: b.passengers ?? Xe },
|
|
1881
1881
|
() => ({ type: "adult" })
|
|
1882
1882
|
),
|
|
1883
|
-
origin:
|
|
1884
|
-
destination:
|
|
1885
|
-
cabin_class:
|
|
1883
|
+
origin: b.origin || "",
|
|
1884
|
+
destination: b.destination || "",
|
|
1885
|
+
cabin_class: b.cabinClass ?? ee
|
|
1886
1886
|
};
|
|
1887
|
-
if (
|
|
1888
|
-
const A = await
|
|
1887
|
+
if (b.flightType === Ze.ONE_WAY) {
|
|
1888
|
+
const A = await V.cashOnlySearch({
|
|
1889
1889
|
...C,
|
|
1890
|
-
departure_dates:
|
|
1890
|
+
departure_dates: b.dates
|
|
1891
1891
|
});
|
|
1892
1892
|
return {
|
|
1893
1893
|
success: A.success,
|
|
1894
1894
|
data: A.data
|
|
1895
1895
|
};
|
|
1896
1896
|
} else {
|
|
1897
|
-
const A = await
|
|
1897
|
+
const A = await V.roundTripOutboundSearch({
|
|
1898
1898
|
...C,
|
|
1899
|
-
departure_date:
|
|
1900
|
-
return_date:
|
|
1899
|
+
departure_date: b.dates[0],
|
|
1900
|
+
return_date: b.dates[1]
|
|
1901
1901
|
});
|
|
1902
1902
|
return {
|
|
1903
1903
|
success: A.success,
|
|
@@ -1906,133 +1906,133 @@ const Rr = 3 * 60 * 1e3, Ge = (e) => {
|
|
|
1906
1906
|
};
|
|
1907
1907
|
}
|
|
1908
1908
|
},
|
|
1909
|
-
onSuccess: (
|
|
1910
|
-
const { success:
|
|
1911
|
-
if (!
|
|
1909
|
+
onSuccess: (b) => {
|
|
1910
|
+
const { success: N, data: C, partialOfferRequestId: A } = b;
|
|
1911
|
+
if (!N) {
|
|
1912
1912
|
console.log("oh lol, it didn't work");
|
|
1913
1913
|
return;
|
|
1914
1914
|
}
|
|
1915
|
-
|
|
1915
|
+
E({ data: C }), A && p(A);
|
|
1916
1916
|
},
|
|
1917
|
-
onError: (
|
|
1918
|
-
console.error("Error in outbound flight search:",
|
|
1917
|
+
onError: (b) => {
|
|
1918
|
+
console.error("Error in outbound flight search:", b);
|
|
1919
1919
|
},
|
|
1920
1920
|
onSettled: () => {
|
|
1921
|
-
|
|
1921
|
+
Z.invalidateQueries({ queryKey: [z.SEARCH_LIMIT] });
|
|
1922
1922
|
}
|
|
1923
1923
|
}), {
|
|
1924
|
-
mutate:
|
|
1925
|
-
status:
|
|
1926
|
-
error:
|
|
1924
|
+
mutate: I,
|
|
1925
|
+
status: F,
|
|
1926
|
+
error: x
|
|
1927
1927
|
} = me({
|
|
1928
1928
|
mutationFn: async ({
|
|
1929
|
-
outboundOfferId:
|
|
1930
|
-
cabinClass:
|
|
1929
|
+
outboundOfferId: b,
|
|
1930
|
+
cabinClass: N
|
|
1931
1931
|
}) => {
|
|
1932
|
-
if (!
|
|
1932
|
+
if (!S)
|
|
1933
1933
|
throw new Error("No partialOfferRequestId found for inbound search.");
|
|
1934
|
-
return d([]), r(
|
|
1935
|
-
outboundOfferId:
|
|
1936
|
-
outboundOfferRequestId:
|
|
1937
|
-
cabinClass:
|
|
1934
|
+
return d([]), r(b), await V.roundTripInboundSearch({
|
|
1935
|
+
outboundOfferId: b,
|
|
1936
|
+
outboundOfferRequestId: S,
|
|
1937
|
+
cabinClass: N || ee
|
|
1938
1938
|
});
|
|
1939
1939
|
},
|
|
1940
|
-
onSuccess: (
|
|
1941
|
-
const { success:
|
|
1942
|
-
|
|
1940
|
+
onSuccess: (b) => {
|
|
1941
|
+
const { success: N, data: C } = b;
|
|
1942
|
+
N && E({
|
|
1943
1943
|
data: C.offers,
|
|
1944
1944
|
inbound: !0
|
|
1945
1945
|
});
|
|
1946
1946
|
},
|
|
1947
|
-
onError: (
|
|
1948
|
-
console.error("Error in inbound flight search:",
|
|
1947
|
+
onError: (b) => {
|
|
1948
|
+
console.error("Error in inbound flight search:", b);
|
|
1949
1949
|
},
|
|
1950
1950
|
onSettled: () => {
|
|
1951
|
-
|
|
1951
|
+
Z.invalidateQueries({ queryKey: [z.SEARCH_LIMIT] });
|
|
1952
1952
|
}
|
|
1953
1953
|
}), {
|
|
1954
|
-
mutate:
|
|
1954
|
+
mutate: Y,
|
|
1955
1955
|
status: Tt,
|
|
1956
1956
|
error: At
|
|
1957
1957
|
} = me({
|
|
1958
1958
|
mutationFn: async ({
|
|
1959
|
-
inboundOfferId:
|
|
1960
|
-
cabinClass:
|
|
1959
|
+
inboundOfferId: b,
|
|
1960
|
+
cabinClass: N
|
|
1961
1961
|
}) => {
|
|
1962
|
-
if (!
|
|
1962
|
+
if (!S)
|
|
1963
1963
|
throw new Error("No partialOfferRequestId found for round-trip fares.");
|
|
1964
|
-
return await
|
|
1964
|
+
return await V.getRoundTripFares({
|
|
1965
1965
|
outboundOfferId: n,
|
|
1966
|
-
outboundOfferRequestId:
|
|
1967
|
-
inboundOfferId:
|
|
1968
|
-
cabinClass:
|
|
1966
|
+
outboundOfferRequestId: S,
|
|
1967
|
+
inboundOfferId: b,
|
|
1968
|
+
cabinClass: N || ee
|
|
1969
1969
|
});
|
|
1970
1970
|
},
|
|
1971
|
-
onSuccess: (
|
|
1972
|
-
const { success:
|
|
1973
|
-
if (!
|
|
1971
|
+
onSuccess: (b) => {
|
|
1972
|
+
const { success: N, data: C } = b;
|
|
1973
|
+
if (!N) return;
|
|
1974
1974
|
const A = C.offers;
|
|
1975
1975
|
i(Ue(A));
|
|
1976
1976
|
},
|
|
1977
|
-
onError: (
|
|
1978
|
-
console.error("Error in round-trip fare search:",
|
|
1977
|
+
onError: (b) => {
|
|
1978
|
+
console.error("Error in round-trip fare search:", b);
|
|
1979
1979
|
},
|
|
1980
1980
|
onSettled: () => {
|
|
1981
|
-
|
|
1981
|
+
Z.invalidateQueries({ queryKey: [z.SEARCH_LIMIT] });
|
|
1982
1982
|
}
|
|
1983
|
-
}),
|
|
1984
|
-
var
|
|
1983
|
+
}), Fe = async (b) => {
|
|
1984
|
+
var Le;
|
|
1985
1985
|
h(() => ({
|
|
1986
|
-
...
|
|
1986
|
+
...y == null ? void 0 : y.reduce((j, _) => (j[_] = -1, j), {})
|
|
1987
1987
|
})), c(!0);
|
|
1988
|
-
const
|
|
1989
|
-
originCode:
|
|
1990
|
-
destinationCode:
|
|
1991
|
-
dates:
|
|
1992
|
-
cabinClass:
|
|
1993
|
-
passengerCount:
|
|
1994
|
-
paymentType:
|
|
1988
|
+
const N = b.paymentType === Q.CASH_AND_MILES ? ['"cash"', '"points"'] : ['"points"'], C = Dt({
|
|
1989
|
+
originCode: b.origin,
|
|
1990
|
+
destinationCode: b.destination,
|
|
1991
|
+
dates: b.dates,
|
|
1992
|
+
cabinClass: b.cabinClass ?? ee,
|
|
1993
|
+
passengerCount: b.passengers ?? Xe,
|
|
1994
|
+
paymentType: N
|
|
1995
1995
|
});
|
|
1996
1996
|
let A = [], pe = 0;
|
|
1997
|
-
|
|
1997
|
+
ye = new AbortController(), f.current = setTimeout(
|
|
1998
1998
|
() => {
|
|
1999
1999
|
q();
|
|
2000
2000
|
},
|
|
2001
|
-
(((
|
|
2002
|
-
),
|
|
2001
|
+
(((Le = t == null ? void 0 : t.flightsConfig) == null ? void 0 : Le.streamTimeoutTotalSeconds) ?? Er) * 1e3
|
|
2002
|
+
), vt(_t() + C, {
|
|
2003
2003
|
headers: {
|
|
2004
2004
|
"Content-Type": "application/json",
|
|
2005
2005
|
Authorization: e ?? "",
|
|
2006
2006
|
"client-id": (t == null ? void 0 : t.clientId) ?? ""
|
|
2007
2007
|
},
|
|
2008
2008
|
openWhenHidden: !0,
|
|
2009
|
-
signal:
|
|
2009
|
+
signal: ye.signal,
|
|
2010
2010
|
onmessage(j) {
|
|
2011
2011
|
try {
|
|
2012
|
-
const
|
|
2013
|
-
if (
|
|
2012
|
+
const _ = Ue(JSON.parse(j.data));
|
|
2013
|
+
if (_.success === !1)
|
|
2014
2014
|
return;
|
|
2015
|
-
if (
|
|
2015
|
+
if (_.close === !0) {
|
|
2016
2016
|
q();
|
|
2017
2017
|
return;
|
|
2018
2018
|
}
|
|
2019
|
-
if (
|
|
2020
|
-
(he) =>
|
|
2019
|
+
if (_.airlineProgram && h(
|
|
2020
|
+
(he) => gr(
|
|
2021
2021
|
he,
|
|
2022
|
-
|
|
2023
|
-
|
|
2022
|
+
_.airlineProgram,
|
|
2023
|
+
_.status ?? _.statusCode
|
|
2024
2024
|
)
|
|
2025
|
-
),
|
|
2025
|
+
), _.status === _e.Ok && _.flights && _.flights.length > 0) {
|
|
2026
2026
|
pe = 0;
|
|
2027
|
-
const he =
|
|
2027
|
+
const he = _.flights.map((Ct) => ({
|
|
2028
2028
|
...Ct,
|
|
2029
|
-
partners:
|
|
2029
|
+
partners: _.partners ?? []
|
|
2030
2030
|
}));
|
|
2031
|
-
A = [...A, ...he],
|
|
2031
|
+
A = [...A, ...he], E({ data: A });
|
|
2032
2032
|
}
|
|
2033
|
-
|
|
2034
|
-
} catch (
|
|
2035
|
-
console.error("Error parsing message:",
|
|
2033
|
+
_.ping && (pe++, pe >= t.flightsConfig.streamTimeoutPingCount && q());
|
|
2034
|
+
} catch (_) {
|
|
2035
|
+
console.error("Error parsing message:", _), q();
|
|
2036
2036
|
}
|
|
2037
2037
|
},
|
|
2038
2038
|
onerror(j) {
|
|
@@ -2044,13 +2044,13 @@ const Rr = 3 * 60 * 1e3, Ge = (e) => {
|
|
|
2044
2044
|
keepalive: !1
|
|
2045
2045
|
});
|
|
2046
2046
|
}, q = () => {
|
|
2047
|
-
|
|
2048
|
-
const
|
|
2049
|
-
for (const C in
|
|
2050
|
-
const A =
|
|
2051
|
-
A !== -1 && (
|
|
2047
|
+
ye.abort(), f.current && (clearTimeout(f.current), f.current = null), c(!1), Z.invalidateQueries({ queryKey: [z.SEARCH_LIMIT] }), h((b) => {
|
|
2048
|
+
const N = {};
|
|
2049
|
+
for (const C in b) {
|
|
2050
|
+
const A = b[C];
|
|
2051
|
+
A !== -1 && (N[C] = A);
|
|
2052
2052
|
}
|
|
2053
|
-
return
|
|
2053
|
+
return N;
|
|
2054
2054
|
});
|
|
2055
2055
|
};
|
|
2056
2056
|
return {
|
|
@@ -2059,7 +2059,7 @@ const Rr = 3 * 60 * 1e3, Ge = (e) => {
|
|
|
2059
2059
|
* @type {boolean}
|
|
2060
2060
|
* @default false
|
|
2061
2061
|
*/
|
|
2062
|
-
loading: D === "pending" ||
|
|
2062
|
+
loading: D === "pending" || F === "pending" || o,
|
|
2063
2063
|
/**
|
|
2064
2064
|
* Loading status for fares
|
|
2065
2065
|
* @type {boolean}
|
|
@@ -2067,11 +2067,11 @@ const Rr = 3 * 60 * 1e3, Ge = (e) => {
|
|
|
2067
2067
|
*/
|
|
2068
2068
|
loadingFares: Tt === "pending",
|
|
2069
2069
|
outboundError: O,
|
|
2070
|
-
inboundError:
|
|
2070
|
+
inboundError: x,
|
|
2071
2071
|
roundTripFaresError: At,
|
|
2072
2072
|
// Results
|
|
2073
|
-
outboundResults:
|
|
2074
|
-
inboundResults:
|
|
2073
|
+
outboundResults: u,
|
|
2074
|
+
inboundResults: l,
|
|
2075
2075
|
roundTripFares: s,
|
|
2076
2076
|
// Mutation triggers
|
|
2077
2077
|
/**
|
|
@@ -2080,16 +2080,16 @@ const Rr = 3 * 60 * 1e3, Ge = (e) => {
|
|
|
2080
2080
|
*
|
|
2081
2081
|
* @param {ISearchFlightArgs} args - The search arguments
|
|
2082
2082
|
*/
|
|
2083
|
-
searchOutboundFlights: async (
|
|
2084
|
-
switch (
|
|
2085
|
-
case
|
|
2086
|
-
|
|
2083
|
+
searchOutboundFlights: async (b) => {
|
|
2084
|
+
switch (Ye(b), w([]), q(), b.paymentType) {
|
|
2085
|
+
case Q.CASH_AND_MILES:
|
|
2086
|
+
Fe(b);
|
|
2087
2087
|
break;
|
|
2088
|
-
case
|
|
2089
|
-
|
|
2088
|
+
case Q.CASH:
|
|
2089
|
+
g(b);
|
|
2090
2090
|
break;
|
|
2091
|
-
case
|
|
2092
|
-
|
|
2091
|
+
case Q.MILES:
|
|
2092
|
+
Fe(b);
|
|
2093
2093
|
break;
|
|
2094
2094
|
}
|
|
2095
2095
|
},
|
|
@@ -2099,14 +2099,14 @@ const Rr = 3 * 60 * 1e3, Ge = (e) => {
|
|
|
2099
2099
|
*
|
|
2100
2100
|
* @param {{ outboundOfferId: string; cabinClass: ECabinClass }} args - The search arguments
|
|
2101
2101
|
*/
|
|
2102
|
-
searchInboundFlights:
|
|
2102
|
+
searchInboundFlights: I,
|
|
2103
2103
|
/**
|
|
2104
2104
|
* Used to get round-trip fares after selecting both outbound and inbound flights
|
|
2105
2105
|
* @type {function}
|
|
2106
2106
|
*
|
|
2107
2107
|
* @param {{ inboundOfferId: string; cabinClass: ECabinClass }} args - The fare search arguments
|
|
2108
2108
|
*/
|
|
2109
|
-
getRoundTripFares:
|
|
2109
|
+
getRoundTripFares: Y,
|
|
2110
2110
|
/**
|
|
2111
2111
|
* Resets the flight search state, clearing all results and selections
|
|
2112
2112
|
* @type {function}
|
|
@@ -2125,9 +2125,9 @@ const Rr = 3 * 60 * 1e3, Ge = (e) => {
|
|
|
2125
2125
|
* The partial offer request ID returned from the round-trip outbound search, needed for the inbound search and fares search
|
|
2126
2126
|
* @type {string}
|
|
2127
2127
|
*/
|
|
2128
|
-
partialOfferRequestId:
|
|
2128
|
+
partialOfferRequestId: S
|
|
2129
2129
|
};
|
|
2130
2130
|
};
|
|
2131
2131
|
export {
|
|
2132
|
-
|
|
2132
|
+
es as useFlightSearch
|
|
2133
2133
|
};
|