@odynn/awayz-flights 0.10.11 → 0.10.12
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.
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
import { useAwayzContext as
|
|
2
|
-
import { useQuery as
|
|
1
|
+
import { useAwayzContext as _t, awayzClient as Z, getBaseUrl as Pt } from "@odynn/awayz-core";
|
|
2
|
+
import { useQuery as xt, useMutation as be } from "@tanstack/react-query";
|
|
3
3
|
import "react/jsx-runtime";
|
|
4
4
|
import "../../moment-BGjjqtLQ.js";
|
|
5
5
|
import "../../arrayExtensions-Ce8YopTP.js";
|
|
6
|
-
import { F as
|
|
7
|
-
import { useState as
|
|
8
|
-
import
|
|
9
|
-
import { EFlightType as
|
|
10
|
-
import { ECabinClass as
|
|
11
|
-
import { mapDataToFlightDetails as
|
|
12
|
-
async function
|
|
6
|
+
import { F as J, c as De } from "../../FlightsService-BgXzj6SR.js";
|
|
7
|
+
import { useState as Re, useRef as It } from "react";
|
|
8
|
+
import Ft from "../../stores/useFlightStore.js";
|
|
9
|
+
import { EFlightType as Qe, EFlightPaymentType as Q } from "../../types/enums.js";
|
|
10
|
+
import { ECabinClass as Lt } from "../../types/ECabinClass.js";
|
|
11
|
+
import { passengerValues as ke, mapDataToFlightDetails as Ut, groupFlightResults as Dt, buildFlightSearchQuery as kt } from "../../utils/flightUtils.js";
|
|
12
|
+
async function Bt(e, t) {
|
|
13
13
|
const n = e.getReader();
|
|
14
14
|
let r;
|
|
15
15
|
for (; !(r = await n.read()).done; )
|
|
16
16
|
t(r.value);
|
|
17
17
|
}
|
|
18
|
-
function
|
|
18
|
+
function qt(e) {
|
|
19
19
|
let t, n, r, s = !1;
|
|
20
20
|
return function(o) {
|
|
21
|
-
t === void 0 ? (t = o, n = 0, r = -1) : t =
|
|
21
|
+
t === void 0 ? (t = o, n = 0, r = -1) : t = Mt(t, o);
|
|
22
22
|
const c = t.length;
|
|
23
23
|
let f = 0;
|
|
24
24
|
for (; n < c; ) {
|
|
@@ -42,12 +42,12 @@ function Bt(e) {
|
|
|
42
42
|
f === c ? t = void 0 : f !== 0 && (t = t.subarray(f), n -= f);
|
|
43
43
|
};
|
|
44
44
|
}
|
|
45
|
-
function
|
|
46
|
-
let r =
|
|
45
|
+
function jt(e, t, n) {
|
|
46
|
+
let r = Be();
|
|
47
47
|
const s = new TextDecoder();
|
|
48
48
|
return function(o, c) {
|
|
49
49
|
if (o.length === 0)
|
|
50
|
-
n == null || n(r), r =
|
|
50
|
+
n == null || n(r), r = Be();
|
|
51
51
|
else if (c > 0) {
|
|
52
52
|
const f = s.decode(o.subarray(0, c)), l = c + (o[c + 1] === 32 ? 2 : 1), u = s.decode(o.subarray(l));
|
|
53
53
|
switch (f) {
|
|
@@ -69,11 +69,11 @@ function qt(e, t, n) {
|
|
|
69
69
|
}
|
|
70
70
|
};
|
|
71
71
|
}
|
|
72
|
-
function
|
|
72
|
+
function Mt(e, t) {
|
|
73
73
|
const n = new Uint8Array(e.length + t.length);
|
|
74
74
|
return n.set(e), n.set(t, e.length), n;
|
|
75
75
|
}
|
|
76
|
-
function
|
|
76
|
+
function Be() {
|
|
77
77
|
return {
|
|
78
78
|
data: "",
|
|
79
79
|
event: "",
|
|
@@ -81,7 +81,7 @@ function De() {
|
|
|
81
81
|
retry: void 0
|
|
82
82
|
};
|
|
83
83
|
}
|
|
84
|
-
var
|
|
84
|
+
var Ht = function(e, t) {
|
|
85
85
|
var n = {};
|
|
86
86
|
for (var r in e) Object.prototype.hasOwnProperty.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
|
|
87
87
|
if (e != null && typeof Object.getOwnPropertySymbols == "function")
|
|
@@ -89,32 +89,32 @@ var Mt = function(e, t) {
|
|
|
89
89
|
t.indexOf(r[s]) < 0 && Object.prototype.propertyIsEnumerable.call(e, r[s]) && (n[r[s]] = e[r[s]]);
|
|
90
90
|
return n;
|
|
91
91
|
};
|
|
92
|
-
const
|
|
93
|
-
function
|
|
94
|
-
var { signal: n, headers: r, onopen: s, onmessage: i, onclose: o, onerror: c, openWhenHidden: f, fetch: l } = t, u =
|
|
92
|
+
const ge = "text/event-stream", vt = 1e3, qe = "last-event-id";
|
|
93
|
+
function zt(e, t) {
|
|
94
|
+
var { signal: n, headers: r, onopen: s, onmessage: i, onclose: o, onerror: c, openWhenHidden: f, fetch: l } = t, u = Ht(t, ["signal", "headers", "onopen", "onmessage", "onclose", "onerror", "openWhenHidden", "fetch"]);
|
|
95
95
|
return new Promise((d, w) => {
|
|
96
96
|
const S = Object.assign({}, r);
|
|
97
|
-
S.accept || (S.accept =
|
|
97
|
+
S.accept || (S.accept = ge);
|
|
98
98
|
let p;
|
|
99
99
|
function m() {
|
|
100
100
|
p.abort(), document.hidden || O();
|
|
101
101
|
}
|
|
102
102
|
f || document.addEventListener("visibilitychange", m);
|
|
103
|
-
let h =
|
|
103
|
+
let h = vt, y = 0;
|
|
104
104
|
function E() {
|
|
105
105
|
document.removeEventListener("visibilitychange", m), window.clearTimeout(y), p.abort();
|
|
106
106
|
}
|
|
107
107
|
n == null || n.addEventListener("abort", () => {
|
|
108
108
|
E(), d();
|
|
109
109
|
});
|
|
110
|
-
const g = l ?? window.fetch, D = s ??
|
|
110
|
+
const g = l ?? window.fetch, D = s ?? $t;
|
|
111
111
|
async function O() {
|
|
112
112
|
var I;
|
|
113
113
|
p = new AbortController();
|
|
114
114
|
try {
|
|
115
115
|
const F = await g(e, Object.assign(Object.assign({}, u), { headers: S, signal: p.signal }));
|
|
116
|
-
await D(F), await
|
|
117
|
-
x ? S[
|
|
116
|
+
await D(F), await Bt(F.body, qt(jt((x) => {
|
|
117
|
+
x ? S[qe] = x : delete S[qe];
|
|
118
118
|
}, (x) => {
|
|
119
119
|
h = x;
|
|
120
120
|
}, i))), o == null || o(), E(), d();
|
|
@@ -131,39 +131,39 @@ function vt(e, t) {
|
|
|
131
131
|
O();
|
|
132
132
|
});
|
|
133
133
|
}
|
|
134
|
-
function
|
|
134
|
+
function $t(e) {
|
|
135
135
|
const t = e.headers.get("content-type");
|
|
136
|
-
if (!(t != null && t.startsWith(
|
|
137
|
-
throw new Error(`Expected content-type to be ${
|
|
136
|
+
if (!(t != null && t.startsWith(ge)))
|
|
137
|
+
throw new Error(`Expected content-type to be ${ge}, Actual: ${t}`);
|
|
138
138
|
}
|
|
139
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
|
|
140
|
+
function et(e, t) {
|
|
141
141
|
return function() {
|
|
142
142
|
return e.apply(t, arguments);
|
|
143
143
|
};
|
|
144
144
|
}
|
|
145
|
-
const { toString:
|
|
146
|
-
const n =
|
|
145
|
+
const { toString: Vt } = Object.prototype, { getPrototypeOf: xe } = Object, { iterator: ie, toStringTag: tt } = Symbol, ae = /* @__PURE__ */ ((e) => (t) => {
|
|
146
|
+
const n = Vt.call(t);
|
|
147
147
|
return e[n] || (e[n] = n.slice(8, -1).toLowerCase());
|
|
148
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
150
|
return e !== null && !G(e) && e.constructor !== null && !G(e.constructor) && L(e.constructor.isBuffer) && e.constructor.isBuffer(e);
|
|
151
151
|
}
|
|
152
|
-
const
|
|
153
|
-
function
|
|
152
|
+
const nt = k("ArrayBuffer");
|
|
153
|
+
function Wt(e) {
|
|
154
154
|
let t;
|
|
155
|
-
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer &&
|
|
155
|
+
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer && nt(e.buffer), t;
|
|
156
156
|
}
|
|
157
|
-
const
|
|
157
|
+
const Gt = ce("string"), L = ce("function"), rt = ce("number"), le = (e) => e !== null && typeof e == "object", Kt = (e) => e === !0 || e === !1, te = (e) => {
|
|
158
158
|
if (ae(e) !== "object")
|
|
159
159
|
return !1;
|
|
160
|
-
const t =
|
|
161
|
-
return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(
|
|
162
|
-
},
|
|
160
|
+
const t = xe(e);
|
|
161
|
+
return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(tt in e) && !(ie in e);
|
|
162
|
+
}, Xt = k("Date"), Yt = k("File"), Zt = k("Blob"), Qt = k("FileList"), en = (e) => le(e) && L(e.pipe), tn = (e) => {
|
|
163
163
|
let t;
|
|
164
164
|
return e && (typeof FormData == "function" && e instanceof FormData || L(e.append) && ((t = ae(e)) === "formdata" || // detect form-data instance
|
|
165
165
|
t === "object" && L(e.toString) && e.toString() === "[object FormData]"));
|
|
166
|
-
},
|
|
166
|
+
}, nn = k("URLSearchParams"), [rn, sn, on, an] = ["ReadableStream", "Request", "Response", "Headers"].map(k), cn = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
|
|
167
167
|
function K(e, t, { allOwnKeys: n = !1 } = {}) {
|
|
168
168
|
if (e === null || typeof e > "u")
|
|
169
169
|
return;
|
|
@@ -178,7 +178,7 @@ function K(e, t, { allOwnKeys: n = !1 } = {}) {
|
|
|
178
178
|
c = i[r], t.call(null, e[c], c, e);
|
|
179
179
|
}
|
|
180
180
|
}
|
|
181
|
-
function
|
|
181
|
+
function st(e, t) {
|
|
182
182
|
t = t.toLowerCase();
|
|
183
183
|
const n = Object.keys(e);
|
|
184
184
|
let r = n.length, s;
|
|
@@ -187,71 +187,71 @@ function rt(e, t) {
|
|
|
187
187
|
return s;
|
|
188
188
|
return null;
|
|
189
189
|
}
|
|
190
|
-
const M = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global,
|
|
191
|
-
function
|
|
192
|
-
const { caseless: e } =
|
|
193
|
-
const i = e &&
|
|
194
|
-
te(t[i]) && te(r) ? t[i] =
|
|
190
|
+
const M = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, ot = (e) => !G(e) && e !== M;
|
|
191
|
+
function Oe() {
|
|
192
|
+
const { caseless: e } = ot(this) && this || {}, t = {}, n = (r, s) => {
|
|
193
|
+
const i = e && st(t, s) || s;
|
|
194
|
+
te(t[i]) && te(r) ? t[i] = Oe(t[i], r) : te(r) ? t[i] = Oe({}, r) : $(r) ? t[i] = r.slice() : t[i] = r;
|
|
195
195
|
};
|
|
196
196
|
for (let r = 0, s = arguments.length; r < s; r++)
|
|
197
197
|
arguments[r] && K(arguments[r], n);
|
|
198
198
|
return t;
|
|
199
199
|
}
|
|
200
|
-
const
|
|
201
|
-
n && L(s) ? e[i] =
|
|
202
|
-
}, { allOwnKeys: r }), e),
|
|
200
|
+
const ln = (e, t, n, { allOwnKeys: r } = {}) => (K(t, (s, i) => {
|
|
201
|
+
n && L(s) ? e[i] = et(s, n) : e[i] = s;
|
|
202
|
+
}, { allOwnKeys: r }), e), un = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e), fn = (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);
|
|
206
|
-
},
|
|
206
|
+
}, dn = (e, t, n, r) => {
|
|
207
207
|
let s, i, o;
|
|
208
208
|
const c = {};
|
|
209
209
|
if (t = t || {}, e == null) return t;
|
|
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 && xe(e);
|
|
214
214
|
} while (e && (!n || n(e, t)) && e !== Object.prototype);
|
|
215
215
|
return t;
|
|
216
|
-
},
|
|
216
|
+
}, pn = (e, t, n) => {
|
|
217
217
|
e = String(e), (n === void 0 || n > e.length) && (n = e.length), n -= t.length;
|
|
218
218
|
const r = e.indexOf(t, n);
|
|
219
219
|
return r !== -1 && r === n;
|
|
220
|
-
},
|
|
220
|
+
}, hn = (e) => {
|
|
221
221
|
if (!e) return null;
|
|
222
222
|
if ($(e)) return e;
|
|
223
223
|
let t = e.length;
|
|
224
|
-
if (!
|
|
224
|
+
if (!rt(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
|
-
},
|
|
229
|
+
}, mn = /* @__PURE__ */ ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" && xe(Uint8Array)), bn = (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
|
+
}, Rn = (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
|
+
}, wn = k("HTMLFormElement"), Sn = (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
|
+
), je = (({ hasOwnProperty: e }) => (t, n) => e.call(t, n))(Object.prototype), yn = k("RegExp"), it = (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
|
-
},
|
|
254
|
-
|
|
253
|
+
}, En = (e) => {
|
|
254
|
+
it(e, (t, n) => {
|
|
255
255
|
if (L(e) && ["arguments", "caller", "callee"].indexOf(n) !== -1)
|
|
256
256
|
return !1;
|
|
257
257
|
const r = e[n];
|
|
@@ -265,19 +265,19 @@ const cn = (e, t, n, { allOwnKeys: r } = {}) => (K(t, (s, i) => {
|
|
|
265
265
|
});
|
|
266
266
|
}
|
|
267
267
|
});
|
|
268
|
-
},
|
|
268
|
+
}, gn = (e, t) => {
|
|
269
269
|
const n = {}, r = (s) => {
|
|
270
270
|
s.forEach((i) => {
|
|
271
271
|
n[i] = !0;
|
|
272
272
|
});
|
|
273
273
|
};
|
|
274
274
|
return $(e) ? r(e) : r(String(e).split(t)), n;
|
|
275
|
-
},
|
|
276
|
-
},
|
|
277
|
-
function
|
|
278
|
-
return !!(e && L(e.append) && e[
|
|
275
|
+
}, On = () => {
|
|
276
|
+
}, Tn = (e, t) => e != null && Number.isFinite(e = +e) ? e : t;
|
|
277
|
+
function An(e) {
|
|
278
|
+
return !!(e && L(e.append) && e[tt] === "FormData" && e[ie]);
|
|
279
279
|
}
|
|
280
|
-
const
|
|
280
|
+
const Cn = (e) => {
|
|
281
281
|
const t = new Array(10), n = (r, s) => {
|
|
282
282
|
if (le(r)) {
|
|
283
283
|
if (t.indexOf(r) >= 0)
|
|
@@ -294,71 +294,71 @@ const An = (e) => {
|
|
|
294
294
|
return r;
|
|
295
295
|
};
|
|
296
296
|
return n(e, 0);
|
|
297
|
-
},
|
|
297
|
+
}, Nn = k("AsyncFunction"), _n = (e) => e && (le(e) || L(e)) && L(e.then) && L(e.catch), at = ((e, t) => e ? setImmediate : t ? ((n, r) => (M.addEventListener("message", ({ source: s, data: i }) => {
|
|
298
298
|
s === M && i === n && r.length && r.shift()();
|
|
299
299
|
}, !1), (s) => {
|
|
300
300
|
r.push(s), M.postMessage(n, "*");
|
|
301
301
|
}))(`axios@${Math.random()}`, []) : (n) => setTimeout(n))(
|
|
302
302
|
typeof setImmediate == "function",
|
|
303
303
|
L(M.postMessage)
|
|
304
|
-
),
|
|
304
|
+
), Pn = typeof queueMicrotask < "u" ? queueMicrotask.bind(M) : typeof process < "u" && process.nextTick || at, xn = (e) => e != null && L(e[ie]), a = {
|
|
305
305
|
isArray: $,
|
|
306
|
-
isArrayBuffer:
|
|
306
|
+
isArrayBuffer: nt,
|
|
307
307
|
isBuffer: Jt,
|
|
308
|
-
isFormData:
|
|
309
|
-
isArrayBufferView:
|
|
310
|
-
isString:
|
|
311
|
-
isNumber:
|
|
312
|
-
isBoolean:
|
|
308
|
+
isFormData: tn,
|
|
309
|
+
isArrayBufferView: Wt,
|
|
310
|
+
isString: Gt,
|
|
311
|
+
isNumber: rt,
|
|
312
|
+
isBoolean: Kt,
|
|
313
313
|
isObject: le,
|
|
314
314
|
isPlainObject: te,
|
|
315
|
-
isReadableStream:
|
|
316
|
-
isRequest:
|
|
317
|
-
isResponse:
|
|
318
|
-
isHeaders:
|
|
315
|
+
isReadableStream: rn,
|
|
316
|
+
isRequest: sn,
|
|
317
|
+
isResponse: on,
|
|
318
|
+
isHeaders: an,
|
|
319
319
|
isUndefined: G,
|
|
320
|
-
isDate:
|
|
321
|
-
isFile:
|
|
322
|
-
isBlob:
|
|
323
|
-
isRegExp:
|
|
320
|
+
isDate: Xt,
|
|
321
|
+
isFile: Yt,
|
|
322
|
+
isBlob: Zt,
|
|
323
|
+
isRegExp: yn,
|
|
324
324
|
isFunction: L,
|
|
325
|
-
isStream:
|
|
326
|
-
isURLSearchParams:
|
|
327
|
-
isTypedArray:
|
|
328
|
-
isFileList:
|
|
325
|
+
isStream: en,
|
|
326
|
+
isURLSearchParams: nn,
|
|
327
|
+
isTypedArray: mn,
|
|
328
|
+
isFileList: Qt,
|
|
329
329
|
forEach: K,
|
|
330
|
-
merge:
|
|
331
|
-
extend:
|
|
332
|
-
trim:
|
|
333
|
-
stripBOM:
|
|
334
|
-
inherits:
|
|
335
|
-
toFlatObject:
|
|
330
|
+
merge: Oe,
|
|
331
|
+
extend: ln,
|
|
332
|
+
trim: cn,
|
|
333
|
+
stripBOM: un,
|
|
334
|
+
inherits: fn,
|
|
335
|
+
toFlatObject: dn,
|
|
336
336
|
kindOf: ae,
|
|
337
337
|
kindOfTest: k,
|
|
338
|
-
endsWith:
|
|
339
|
-
toArray:
|
|
340
|
-
forEachEntry:
|
|
341
|
-
matchAll:
|
|
342
|
-
isHTMLForm:
|
|
343
|
-
hasOwnProperty:
|
|
344
|
-
hasOwnProp:
|
|
338
|
+
endsWith: pn,
|
|
339
|
+
toArray: hn,
|
|
340
|
+
forEachEntry: bn,
|
|
341
|
+
matchAll: Rn,
|
|
342
|
+
isHTMLForm: wn,
|
|
343
|
+
hasOwnProperty: je,
|
|
344
|
+
hasOwnProp: je,
|
|
345
345
|
// an alias to avoid ESLint no-prototype-builtins detection
|
|
346
|
-
reduceDescriptors:
|
|
347
|
-
freezeMethods:
|
|
348
|
-
toObjectSet:
|
|
349
|
-
toCamelCase:
|
|
350
|
-
noop:
|
|
351
|
-
toFiniteNumber:
|
|
352
|
-
findKey:
|
|
346
|
+
reduceDescriptors: it,
|
|
347
|
+
freezeMethods: En,
|
|
348
|
+
toObjectSet: gn,
|
|
349
|
+
toCamelCase: Sn,
|
|
350
|
+
noop: On,
|
|
351
|
+
toFiniteNumber: Tn,
|
|
352
|
+
findKey: st,
|
|
353
353
|
global: M,
|
|
354
|
-
isContextDefined:
|
|
355
|
-
isSpecCompliantForm:
|
|
356
|
-
toJSONObject:
|
|
357
|
-
isAsyncFn:
|
|
358
|
-
isThenable:
|
|
359
|
-
setImmediate:
|
|
360
|
-
asap:
|
|
361
|
-
isIterable:
|
|
354
|
+
isContextDefined: ot,
|
|
355
|
+
isSpecCompliantForm: An,
|
|
356
|
+
toJSONObject: Cn,
|
|
357
|
+
isAsyncFn: Nn,
|
|
358
|
+
isThenable: _n,
|
|
359
|
+
setImmediate: at,
|
|
360
|
+
asap: Pn,
|
|
361
|
+
isIterable: xn
|
|
362
362
|
};
|
|
363
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);
|
|
@@ -384,7 +384,7 @@ a.inherits(R, Error, {
|
|
|
384
384
|
};
|
|
385
385
|
}
|
|
386
386
|
});
|
|
387
|
-
const
|
|
387
|
+
const ct = R.prototype, lt = {};
|
|
388
388
|
[
|
|
389
389
|
"ERR_BAD_OPTION_VALUE",
|
|
390
390
|
"ERR_BAD_OPTION",
|
|
@@ -400,32 +400,32 @@ const at = R.prototype, ct = {};
|
|
|
400
400
|
"ERR_INVALID_URL"
|
|
401
401
|
// eslint-disable-next-line func-names
|
|
402
402
|
].forEach((e) => {
|
|
403
|
-
|
|
403
|
+
lt[e] = { value: e };
|
|
404
404
|
});
|
|
405
|
-
Object.defineProperties(R,
|
|
406
|
-
Object.defineProperty(
|
|
405
|
+
Object.defineProperties(R, lt);
|
|
406
|
+
Object.defineProperty(ct, "isAxiosError", { value: !0 });
|
|
407
407
|
R.from = (e, t, n, r, s, i) => {
|
|
408
|
-
const o = Object.create(
|
|
408
|
+
const o = Object.create(ct);
|
|
409
409
|
return a.toFlatObject(e, o, function(f) {
|
|
410
410
|
return f !== Error.prototype;
|
|
411
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
|
|
414
|
-
function
|
|
413
|
+
const In = null;
|
|
414
|
+
function Te(e) {
|
|
415
415
|
return a.isPlainObject(e) || a.isArray(e);
|
|
416
416
|
}
|
|
417
|
-
function
|
|
417
|
+
function ut(e) {
|
|
418
418
|
return a.endsWith(e, "[]") ? e.slice(0, -2) : e;
|
|
419
419
|
}
|
|
420
|
-
function
|
|
420
|
+
function Me(e, t, n) {
|
|
421
421
|
return e ? e.concat(t).map(function(s, i) {
|
|
422
|
-
return s =
|
|
422
|
+
return s = ut(s), !n && i ? "[" + s + "]" : s;
|
|
423
423
|
}).join(n ? "." : "") : t;
|
|
424
424
|
}
|
|
425
|
-
function
|
|
426
|
-
return a.isArray(e) && !e.some(
|
|
425
|
+
function Fn(e) {
|
|
426
|
+
return a.isArray(e) && !e.some(Te);
|
|
427
427
|
}
|
|
428
|
-
const
|
|
428
|
+
const Ln = a.toFlatObject(a, {}, null, function(t) {
|
|
429
429
|
return /^is[A-Z]/.test(t);
|
|
430
430
|
});
|
|
431
431
|
function ue(e, t, n) {
|
|
@@ -454,21 +454,21 @@ function ue(e, t, n) {
|
|
|
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 =
|
|
457
|
+
else if (a.isArray(p) && Fn(p) || (a.isFileList(p) || a.endsWith(m, "[]")) && (y = a.toArray(p)))
|
|
458
|
+
return m = ut(m), y.forEach(function(g, D) {
|
|
459
459
|
!(a.isUndefined(g) || g === null) && t.append(
|
|
460
460
|
// eslint-disable-next-line no-nested-ternary
|
|
461
|
-
o === !0 ?
|
|
461
|
+
o === !0 ? Me([m], D, i) : o === null ? m : m + "[]",
|
|
462
462
|
l(g)
|
|
463
463
|
);
|
|
464
464
|
}), !1;
|
|
465
465
|
}
|
|
466
|
-
return
|
|
466
|
+
return Te(p) ? !0 : (t.append(Me(h, m, i), l(p)), !1);
|
|
467
467
|
}
|
|
468
|
-
const d = [], w = Object.assign(
|
|
468
|
+
const d = [], w = Object.assign(Ln, {
|
|
469
469
|
defaultVisitor: u,
|
|
470
470
|
convertValue: l,
|
|
471
|
-
isVisitable:
|
|
471
|
+
isVisitable: Te
|
|
472
472
|
});
|
|
473
473
|
function S(p, m) {
|
|
474
474
|
if (!a.isUndefined(p)) {
|
|
@@ -489,7 +489,7 @@ function ue(e, t, n) {
|
|
|
489
489
|
throw new TypeError("data must be an object");
|
|
490
490
|
return S(e), t;
|
|
491
491
|
}
|
|
492
|
-
function
|
|
492
|
+
function He(e) {
|
|
493
493
|
const t = {
|
|
494
494
|
"!": "%21",
|
|
495
495
|
"'": "%27",
|
|
@@ -503,40 +503,40 @@ function je(e) {
|
|
|
503
503
|
return t[r];
|
|
504
504
|
});
|
|
505
505
|
}
|
|
506
|
-
function
|
|
506
|
+
function Ie(e, t) {
|
|
507
507
|
this._pairs = [], e && ue(e, this, t);
|
|
508
508
|
}
|
|
509
|
-
const
|
|
510
|
-
|
|
509
|
+
const ft = Ie.prototype;
|
|
510
|
+
ft.append = function(t, n) {
|
|
511
511
|
this._pairs.push([t, n]);
|
|
512
512
|
};
|
|
513
|
-
|
|
513
|
+
ft.toString = function(t) {
|
|
514
514
|
const n = t ? function(r) {
|
|
515
|
-
return t.call(this, r,
|
|
516
|
-
} :
|
|
515
|
+
return t.call(this, r, He);
|
|
516
|
+
} : He;
|
|
517
517
|
return this._pairs.map(function(s) {
|
|
518
518
|
return n(s[0]) + "=" + n(s[1]);
|
|
519
519
|
}, "").join("&");
|
|
520
520
|
};
|
|
521
|
-
function
|
|
521
|
+
function Un(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
|
-
function
|
|
524
|
+
function dt(e, t, n) {
|
|
525
525
|
if (!t)
|
|
526
526
|
return e;
|
|
527
|
-
const r = n && n.encode ||
|
|
527
|
+
const r = n && n.encode || Un;
|
|
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 Ie(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 ve {
|
|
540
540
|
constructor() {
|
|
541
541
|
this.handlers = [];
|
|
542
542
|
}
|
|
@@ -590,41 +590,41 @@ class Me {
|
|
|
590
590
|
});
|
|
591
591
|
}
|
|
592
592
|
}
|
|
593
|
-
const
|
|
593
|
+
const pt = {
|
|
594
594
|
silentJSONParsing: !0,
|
|
595
595
|
forcedJSONParsing: !0,
|
|
596
596
|
clarifyTimeoutError: !1
|
|
597
|
-
},
|
|
597
|
+
}, Dn = typeof URLSearchParams < "u" ? URLSearchParams : Ie, kn = typeof FormData < "u" ? FormData : null, Bn = typeof Blob < "u" ? Blob : null, qn = {
|
|
598
598
|
isBrowser: !0,
|
|
599
599
|
classes: {
|
|
600
|
-
URLSearchParams:
|
|
601
|
-
FormData:
|
|
602
|
-
Blob:
|
|
600
|
+
URLSearchParams: Dn,
|
|
601
|
+
FormData: kn,
|
|
602
|
+
Blob: Bn
|
|
603
603
|
},
|
|
604
604
|
protocols: ["http", "https", "file", "blob", "url", "data"]
|
|
605
|
-
},
|
|
606
|
-
self instanceof WorkerGlobalScope && typeof self.importScripts == "function",
|
|
605
|
+
}, Fe = typeof window < "u" && typeof document < "u", Ae = typeof navigator == "object" && navigator || void 0, jn = Fe && (!Ae || ["ReactNative", "NativeScript", "NS"].indexOf(Ae.product) < 0), Mn = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
|
|
606
|
+
self instanceof WorkerGlobalScope && typeof self.importScripts == "function", Hn = Fe && window.location.href || "http://localhost", vn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
607
607
|
__proto__: null,
|
|
608
|
-
hasBrowserEnv:
|
|
609
|
-
hasStandardBrowserEnv:
|
|
610
|
-
hasStandardBrowserWebWorkerEnv:
|
|
611
|
-
navigator:
|
|
612
|
-
origin:
|
|
608
|
+
hasBrowserEnv: Fe,
|
|
609
|
+
hasStandardBrowserEnv: jn,
|
|
610
|
+
hasStandardBrowserWebWorkerEnv: Mn,
|
|
611
|
+
navigator: Ae,
|
|
612
|
+
origin: Hn
|
|
613
613
|
}, Symbol.toStringTag, { value: "Module" })), P = {
|
|
614
|
-
...
|
|
615
|
-
...
|
|
614
|
+
...vn,
|
|
615
|
+
...qn
|
|
616
616
|
};
|
|
617
|
-
function
|
|
617
|
+
function zn(e, t) {
|
|
618
618
|
return ue(e, new P.classes.URLSearchParams(), Object.assign({
|
|
619
619
|
visitor: function(n, r, s, i) {
|
|
620
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
|
}
|
|
624
|
-
function
|
|
624
|
+
function $n(e) {
|
|
625
625
|
return a.matchAll(/\w+|\[(\w*)]/g, e).map((t) => t[0] === "[]" ? "" : t[1] || t[0]);
|
|
626
626
|
}
|
|
627
|
-
function
|
|
627
|
+
function Vn(e) {
|
|
628
628
|
const t = {}, n = Object.keys(e);
|
|
629
629
|
let r;
|
|
630
630
|
const s = n.length;
|
|
@@ -633,17 +633,17 @@ function $n(e) {
|
|
|
633
633
|
i = n[r], t[i] = e[i];
|
|
634
634
|
return t;
|
|
635
635
|
}
|
|
636
|
-
function
|
|
636
|
+
function ht(e) {
|
|
637
637
|
function t(n, r, s, i) {
|
|
638
638
|
let o = n[i++];
|
|
639
639
|
if (o === "__proto__") return !0;
|
|
640
640
|
const c = Number.isFinite(+o), f = i >= n.length;
|
|
641
|
-
return o = !o && a.isArray(s) ? s.length : o, f ? (a.hasOwnProp(s, o) ? s[o] = [s[o], r] : s[o] = r, !c) : ((!s[o] || !a.isObject(s[o])) && (s[o] = []), t(n, r, s[o], i) && a.isArray(s[o]) && (s[o] =
|
|
641
|
+
return o = !o && a.isArray(s) ? s.length : o, f ? (a.hasOwnProp(s, o) ? s[o] = [s[o], r] : s[o] = r, !c) : ((!s[o] || !a.isObject(s[o])) && (s[o] = []), t(n, r, s[o], i) && a.isArray(s[o]) && (s[o] = Vn(s[o])), !c);
|
|
642
642
|
}
|
|
643
643
|
if (a.isFormData(e) && a.isFunction(e.entries)) {
|
|
644
644
|
const n = {};
|
|
645
645
|
return a.forEachEntry(e, (r, s) => {
|
|
646
|
-
t(
|
|
646
|
+
t($n(r), s, n, 0);
|
|
647
647
|
}), n;
|
|
648
648
|
}
|
|
649
649
|
return null;
|
|
@@ -659,12 +659,12 @@ function Jn(e, t, n) {
|
|
|
659
659
|
return (n || JSON.stringify)(e);
|
|
660
660
|
}
|
|
661
661
|
const X = {
|
|
662
|
-
transitional:
|
|
662
|
+
transitional: pt,
|
|
663
663
|
adapter: ["xhr", "http", "fetch"],
|
|
664
664
|
transformRequest: [function(t, n) {
|
|
665
665
|
const r = n.getContentType() || "", s = r.indexOf("application/json") > -1, i = a.isObject(t);
|
|
666
666
|
if (i && a.isHTMLForm(t) && (t = new FormData(t)), a.isFormData(t))
|
|
667
|
-
return s ? JSON.stringify(
|
|
667
|
+
return s ? JSON.stringify(ht(t)) : t;
|
|
668
668
|
if (a.isArrayBuffer(t) || a.isBuffer(t) || a.isStream(t) || a.isFile(t) || a.isBlob(t) || a.isReadableStream(t))
|
|
669
669
|
return t;
|
|
670
670
|
if (a.isArrayBufferView(t))
|
|
@@ -674,7 +674,7 @@ const X = {
|
|
|
674
674
|
let c;
|
|
675
675
|
if (i) {
|
|
676
676
|
if (r.indexOf("application/x-www-form-urlencoded") > -1)
|
|
677
|
-
return
|
|
677
|
+
return zn(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
680
|
return ue(
|
|
@@ -727,7 +727,7 @@ const X = {
|
|
|
727
727
|
a.forEach(["delete", "get", "head", "post", "put", "patch"], (e) => {
|
|
728
728
|
X.headers[e] = {};
|
|
729
729
|
});
|
|
730
|
-
const
|
|
730
|
+
const Wn = a.toObjectSet([
|
|
731
731
|
"age",
|
|
732
732
|
"authorization",
|
|
733
733
|
"content-length",
|
|
@@ -745,29 +745,29 @@ const Vn = a.toObjectSet([
|
|
|
745
745
|
"referer",
|
|
746
746
|
"retry-after",
|
|
747
747
|
"user-agent"
|
|
748
|
-
]),
|
|
748
|
+
]), Gn = (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] && Wn[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
|
+
}, ze = Symbol("internals");
|
|
756
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 Kn(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 Xn = (e) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());
|
|
770
|
+
function we(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 Re(e, t, n, r, s) {
|
|
|
777
777
|
return r.test(t);
|
|
778
778
|
}
|
|
779
779
|
}
|
|
780
|
-
function
|
|
780
|
+
function Yn(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 Zn(e, t) {
|
|
784
784
|
const n = a.toCamelCase(" " + t);
|
|
785
785
|
["get", "set", "has"].forEach((r) => {
|
|
786
786
|
Object.defineProperty(e, r + n, {
|
|
@@ -807,8 +807,8 @@ let U = class {
|
|
|
807
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()) && !Xn(t))
|
|
811
|
+
o(Gn(t), n);
|
|
812
812
|
else if (a.isObject(t) && a.isIterable(t)) {
|
|
813
813
|
let c = {}, f, l;
|
|
814
814
|
for (const u of t) {
|
|
@@ -829,7 +829,7 @@ let U = class {
|
|
|
829
829
|
if (!n)
|
|
830
830
|
return s;
|
|
831
831
|
if (n === !0)
|
|
832
|
-
return
|
|
832
|
+
return Kn(s);
|
|
833
833
|
if (a.isFunction(n))
|
|
834
834
|
return n.call(this, s, r);
|
|
835
835
|
if (a.isRegExp(n))
|
|
@@ -841,7 +841,7 @@ let U = class {
|
|
|
841
841
|
has(t, n) {
|
|
842
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 || we(this, this[r], r, n)));
|
|
845
845
|
}
|
|
846
846
|
return !1;
|
|
847
847
|
}
|
|
@@ -851,7 +851,7 @@ let U = class {
|
|
|
851
851
|
function i(o) {
|
|
852
852
|
if (o = W(o), o) {
|
|
853
853
|
const c = a.findKey(r, o);
|
|
854
|
-
c && (!n ||
|
|
854
|
+
c && (!n || we(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 || we(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 ? Yn(i) : String(i).trim();
|
|
877
877
|
c !== i && delete n[i], n[c] = ne(s), r[c] = !0;
|
|
878
878
|
}), this;
|
|
879
879
|
}
|
|
@@ -907,12 +907,12 @@ let U = class {
|
|
|
907
907
|
return n.forEach((s) => r.set(s)), r;
|
|
908
908
|
}
|
|
909
909
|
static accessor(t) {
|
|
910
|
-
const r = (this[
|
|
910
|
+
const r = (this[ze] = this[ze] = {
|
|
911
911
|
accessors: {}
|
|
912
912
|
}).accessors, s = this.prototype;
|
|
913
913
|
function i(o) {
|
|
914
914
|
const c = W(o);
|
|
915
|
-
r[c] || (
|
|
915
|
+
r[c] || (Zn(s, o), r[c] = !0);
|
|
916
916
|
}
|
|
917
917
|
return a.isArray(t) ? t.forEach(i) : i(t), this;
|
|
918
918
|
}
|
|
@@ -928,23 +928,23 @@ a.reduceDescriptors(U.prototype, ({ value: e }, t) => {
|
|
|
928
928
|
};
|
|
929
929
|
});
|
|
930
930
|
a.freezeMethods(U);
|
|
931
|
-
function
|
|
931
|
+
function Se(e, t) {
|
|
932
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);
|
|
936
936
|
}), s.normalize(), i;
|
|
937
937
|
}
|
|
938
|
-
function
|
|
938
|
+
function mt(e) {
|
|
939
939
|
return !!(e && e.__CANCEL__);
|
|
940
940
|
}
|
|
941
|
-
function
|
|
941
|
+
function V(e, t, n) {
|
|
942
942
|
R.call(this, e ?? "canceled", R.ERR_CANCELED, t, n), this.name = "CanceledError";
|
|
943
943
|
}
|
|
944
|
-
a.inherits(
|
|
944
|
+
a.inherits(V, R, {
|
|
945
945
|
__CANCEL__: !0
|
|
946
946
|
});
|
|
947
|
-
function
|
|
947
|
+
function bt(e, t, n) {
|
|
948
948
|
const r = n.config.validateStatus;
|
|
949
949
|
!n.status || !r || r(n.status) ? e(n) : t(new R(
|
|
950
950
|
"Request failed with status code " + n.status,
|
|
@@ -954,11 +954,11 @@ function mt(e, t, n) {
|
|
|
954
954
|
n
|
|
955
955
|
));
|
|
956
956
|
}
|
|
957
|
-
function
|
|
957
|
+
function Qn(e) {
|
|
958
958
|
const t = /^([-+\w]{1,25})(:?\/\/|:)/.exec(e);
|
|
959
959
|
return t && t[1] || "";
|
|
960
960
|
}
|
|
961
|
-
function
|
|
961
|
+
function er(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;
|
|
@@ -974,7 +974,7 @@ function Qn(e, t) {
|
|
|
974
974
|
return S ? Math.round(w * 1e3 / S) : void 0;
|
|
975
975
|
};
|
|
976
976
|
}
|
|
977
|
-
function
|
|
977
|
+
function tr(e, t) {
|
|
978
978
|
let n = 0, r = 1e3 / t, s, i;
|
|
979
979
|
const o = (l, u = Date.now()) => {
|
|
980
980
|
n = u, s = null, i && (clearTimeout(i), i = null), e.apply(null, l);
|
|
@@ -988,8 +988,8 @@ function er(e, t) {
|
|
|
988
988
|
}
|
|
989
989
|
const se = (e, t, n = 3) => {
|
|
990
990
|
let r = 0;
|
|
991
|
-
const s =
|
|
992
|
-
return
|
|
991
|
+
const s = er(50, 250);
|
|
992
|
+
return tr((i) => {
|
|
993
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 = {
|
|
@@ -1005,17 +1005,17 @@ const se = (e, t, n = 3) => {
|
|
|
1005
1005
|
};
|
|
1006
1006
|
e(d);
|
|
1007
1007
|
}, n);
|
|
1008
|
-
},
|
|
1008
|
+
}, $e = (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
|
-
},
|
|
1015
|
+
}, Ve = (e) => (...t) => a.asap(() => e(...t)), nr = 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
1016
|
new URL(P.origin),
|
|
1017
1017
|
P.navigator && /(msie|trident)/i.test(P.navigator.userAgent)
|
|
1018
|
-
) : () => !0,
|
|
1018
|
+
) : () => !0, rr = P.hasStandardBrowserEnv ? (
|
|
1019
1019
|
// Standard browser envs support document.cookie
|
|
1020
1020
|
{
|
|
1021
1021
|
write(e, t, n, r, s, i) {
|
|
@@ -1042,17 +1042,17 @@ const se = (e, t, n = 3) => {
|
|
|
1042
1042
|
}
|
|
1043
1043
|
}
|
|
1044
1044
|
);
|
|
1045
|
-
function
|
|
1045
|
+
function sr(e) {
|
|
1046
1046
|
return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(e);
|
|
1047
1047
|
}
|
|
1048
|
-
function
|
|
1048
|
+
function or(e, t) {
|
|
1049
1049
|
return t ? e.replace(/\/?\/$/, "") + "/" + t.replace(/^\/+/, "") : e;
|
|
1050
1050
|
}
|
|
1051
|
-
function
|
|
1052
|
-
let r = !
|
|
1053
|
-
return e && (r || n == !1) ?
|
|
1051
|
+
function Rt(e, t, n) {
|
|
1052
|
+
let r = !sr(t);
|
|
1053
|
+
return e && (r || n == !1) ? or(e, t) : t;
|
|
1054
1054
|
}
|
|
1055
|
-
const
|
|
1055
|
+
const Je = (e) => e instanceof U ? { ...e } : e;
|
|
1056
1056
|
function v(e, t) {
|
|
1057
1057
|
t = t || {};
|
|
1058
1058
|
const n = {};
|
|
@@ -1110,17 +1110,17 @@ function v(e, t) {
|
|
|
1110
1110
|
socketPath: o,
|
|
1111
1111
|
responseEncoding: o,
|
|
1112
1112
|
validateStatus: c,
|
|
1113
|
-
headers: (l, u, d) => s(
|
|
1113
|
+
headers: (l, u, d) => s(Je(l), Je(u), d, !0)
|
|
1114
1114
|
};
|
|
1115
1115
|
return a.forEach(Object.keys(Object.assign({}, e, t)), function(u) {
|
|
1116
1116
|
const d = f[u] || s, w = d(e[u], t[u], u);
|
|
1117
1117
|
a.isUndefined(w) && d !== c || (n[u] = w);
|
|
1118
1118
|
}), n;
|
|
1119
1119
|
}
|
|
1120
|
-
const
|
|
1120
|
+
const wt = (e) => {
|
|
1121
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 =
|
|
1123
|
+
t.headers = o = U.from(o), t.url = dt(Rt(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
|
);
|
|
@@ -1133,14 +1133,14 @@ const Rt = (e) => {
|
|
|
1133
1133
|
o.setContentType([l || "multipart/form-data", ...u].join("; "));
|
|
1134
1134
|
}
|
|
1135
1135
|
}
|
|
1136
|
-
if (P.hasStandardBrowserEnv && (r && a.isFunction(r) && (r = r(t)), r || r !== !1 &&
|
|
1137
|
-
const l = s && i &&
|
|
1136
|
+
if (P.hasStandardBrowserEnv && (r && a.isFunction(r) && (r = r(t)), r || r !== !1 && nr(t.url))) {
|
|
1137
|
+
const l = s && i && rr.read(i);
|
|
1138
1138
|
l && o.set(s, l);
|
|
1139
1139
|
}
|
|
1140
1140
|
return t;
|
|
1141
|
-
},
|
|
1141
|
+
}, ir = typeof XMLHttpRequest < "u", ar = ir && function(e) {
|
|
1142
1142
|
return new Promise(function(n, r) {
|
|
1143
|
-
const s =
|
|
1143
|
+
const s = wt(e);
|
|
1144
1144
|
let i = s.data;
|
|
1145
1145
|
const o = U.from(s.headers).normalize();
|
|
1146
1146
|
let { responseType: c, onUploadProgress: f, onDownloadProgress: l } = s, u, d, w, S, p;
|
|
@@ -1162,7 +1162,7 @@ const Rt = (e) => {
|
|
|
1162
1162
|
config: e,
|
|
1163
1163
|
request: h
|
|
1164
1164
|
};
|
|
1165
|
-
|
|
1165
|
+
bt(function(F) {
|
|
1166
1166
|
n(F), m();
|
|
1167
1167
|
}, function(F) {
|
|
1168
1168
|
r(F), m();
|
|
@@ -1176,7 +1176,7 @@ const Rt = (e) => {
|
|
|
1176
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
|
-
const O = s.transitional ||
|
|
1179
|
+
const O = s.transitional || pt;
|
|
1180
1180
|
s.timeoutErrorMessage && (D = s.timeoutErrorMessage), r(new R(
|
|
1181
1181
|
D,
|
|
1182
1182
|
O.clarifyTimeoutError ? R.ETIMEDOUT : R.ECONNABORTED,
|
|
@@ -1186,16 +1186,16 @@ const Rt = (e) => {
|
|
|
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
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
|
|
1189
|
+
h && (r(!g || g.type ? new V(null, e, h) : g), h.abort(), h = null);
|
|
1190
1190
|
}, s.cancelToken && s.cancelToken.subscribe(u), s.signal && (s.signal.aborted ? u() : s.signal.addEventListener("abort", u)));
|
|
1191
|
-
const E =
|
|
1191
|
+
const E = Qn(s.url);
|
|
1192
1192
|
if (E && P.protocols.indexOf(E) === -1) {
|
|
1193
1193
|
r(new R("Unsupported protocol " + E + ":", R.ERR_BAD_REQUEST, e));
|
|
1194
1194
|
return;
|
|
1195
1195
|
}
|
|
1196
1196
|
h.send(i || null);
|
|
1197
1197
|
});
|
|
1198
|
-
},
|
|
1198
|
+
}, cr = (e, t) => {
|
|
1199
1199
|
const { length: n } = e = e ? e.filter(Boolean) : [];
|
|
1200
1200
|
if (t || n) {
|
|
1201
1201
|
let r = new AbortController(), s;
|
|
@@ -1203,7 +1203,7 @@ const Rt = (e) => {
|
|
|
1203
1203
|
if (!s) {
|
|
1204
1204
|
s = !0, c();
|
|
1205
1205
|
const u = l instanceof Error ? l : this.reason;
|
|
1206
|
-
r.abort(u instanceof R ? u : new
|
|
1206
|
+
r.abort(u instanceof R ? u : new V(u instanceof Error ? u.message : u));
|
|
1207
1207
|
}
|
|
1208
1208
|
};
|
|
1209
1209
|
let o = t && setTimeout(() => {
|
|
@@ -1218,7 +1218,7 @@ const Rt = (e) => {
|
|
|
1218
1218
|
const { signal: f } = r;
|
|
1219
1219
|
return f.unsubscribe = () => a.asap(c), f;
|
|
1220
1220
|
}
|
|
1221
|
-
},
|
|
1221
|
+
}, lr = function* (e, t) {
|
|
1222
1222
|
let n = e.byteLength;
|
|
1223
1223
|
if (n < t) {
|
|
1224
1224
|
yield e;
|
|
@@ -1227,10 +1227,10 @@ const Rt = (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
|
|
1232
|
-
yield*
|
|
1233
|
-
},
|
|
1230
|
+
}, ur = async function* (e, t) {
|
|
1231
|
+
for await (const n of fr(e))
|
|
1232
|
+
yield* lr(n, t);
|
|
1233
|
+
}, fr = async function* (e) {
|
|
1234
1234
|
if (e[Symbol.asyncIterator]) {
|
|
1235
1235
|
yield* e;
|
|
1236
1236
|
return;
|
|
@@ -1246,8 +1246,8 @@ const Rt = (e) => {
|
|
|
1246
1246
|
} finally {
|
|
1247
1247
|
await t.cancel();
|
|
1248
1248
|
}
|
|
1249
|
-
},
|
|
1250
|
-
const s =
|
|
1249
|
+
}, We = (e, t, n, r) => {
|
|
1250
|
+
const s = ur(e, t);
|
|
1251
1251
|
let i = 0, o, c = (f) => {
|
|
1252
1252
|
o || (o = !0, r && r(f));
|
|
1253
1253
|
};
|
|
@@ -1275,13 +1275,13 @@ const Rt = (e) => {
|
|
|
1275
1275
|
}, {
|
|
1276
1276
|
highWaterMark: 2
|
|
1277
1277
|
});
|
|
1278
|
-
}, fe = typeof fetch == "function" && typeof Request == "function" && typeof Response == "function",
|
|
1278
|
+
}, fe = typeof fetch == "function" && typeof Request == "function" && typeof Response == "function", St = fe && typeof ReadableStream == "function", dr = fe && (typeof TextEncoder == "function" ? /* @__PURE__ */ ((e) => (t) => e.encode(t))(new TextEncoder()) : async (e) => new Uint8Array(await new Response(e).arrayBuffer())), yt = (e, ...t) => {
|
|
1279
1279
|
try {
|
|
1280
1280
|
return !!e(...t);
|
|
1281
1281
|
} catch {
|
|
1282
1282
|
return !1;
|
|
1283
1283
|
}
|
|
1284
|
-
},
|
|
1284
|
+
}, pr = St && yt(() => {
|
|
1285
1285
|
let e = !1;
|
|
1286
1286
|
const t = new Request(P.origin, {
|
|
1287
1287
|
body: new ReadableStream(),
|
|
@@ -1291,8 +1291,8 @@ const Rt = (e) => {
|
|
|
1291
1291
|
}
|
|
1292
1292
|
}).headers.has("Content-Type");
|
|
1293
1293
|
return e && !t;
|
|
1294
|
-
}),
|
|
1295
|
-
stream:
|
|
1294
|
+
}), Ge = 64 * 1024, Ce = St && yt(() => a.isReadableStream(new Response("").body)), oe = {
|
|
1295
|
+
stream: Ce && ((e) => e.body)
|
|
1296
1296
|
};
|
|
1297
1297
|
fe && ((e) => {
|
|
1298
1298
|
["text", "arrayBuffer", "blob", "formData", "stream"].forEach((t) => {
|
|
@@ -1301,7 +1301,7 @@ fe && ((e) => {
|
|
|
1301
1301
|
});
|
|
1302
1302
|
});
|
|
1303
1303
|
})(new Response());
|
|
1304
|
-
const
|
|
1304
|
+
const hr = async (e) => {
|
|
1305
1305
|
if (e == null)
|
|
1306
1306
|
return 0;
|
|
1307
1307
|
if (a.isBlob(e))
|
|
@@ -1314,11 +1314,11 @@ const pr = async (e) => {
|
|
|
1314
1314
|
if (a.isArrayBufferView(e) || a.isArrayBuffer(e))
|
|
1315
1315
|
return e.byteLength;
|
|
1316
1316
|
if (a.isURLSearchParams(e) && (e = e + ""), a.isString(e))
|
|
1317
|
-
return (await
|
|
1318
|
-
},
|
|
1317
|
+
return (await dr(e)).byteLength;
|
|
1318
|
+
}, mr = async (e, t) => {
|
|
1319
1319
|
const n = a.toFiniteNumber(e.getContentLength());
|
|
1320
|
-
return n ??
|
|
1321
|
-
},
|
|
1320
|
+
return n ?? hr(t);
|
|
1321
|
+
}, br = fe && (async (e) => {
|
|
1322
1322
|
let {
|
|
1323
1323
|
url: t,
|
|
1324
1324
|
method: n,
|
|
@@ -1332,26 +1332,26 @@ const pr = async (e) => {
|
|
|
1332
1332
|
headers: u,
|
|
1333
1333
|
withCredentials: d = "same-origin",
|
|
1334
1334
|
fetchOptions: w
|
|
1335
|
-
} =
|
|
1335
|
+
} = wt(e);
|
|
1336
1336
|
l = l ? (l + "").toLowerCase() : "text";
|
|
1337
|
-
let S =
|
|
1337
|
+
let S = cr([s, i && i.toAbortSignal()], o), p;
|
|
1338
1338
|
const m = S && S.unsubscribe && (() => {
|
|
1339
1339
|
S.unsubscribe();
|
|
1340
1340
|
});
|
|
1341
1341
|
let h;
|
|
1342
1342
|
try {
|
|
1343
|
-
if (f &&
|
|
1343
|
+
if (f && pr && n !== "get" && n !== "head" && (h = await mr(u, r)) !== 0) {
|
|
1344
1344
|
let O = new Request(t, {
|
|
1345
1345
|
method: "POST",
|
|
1346
1346
|
body: r,
|
|
1347
1347
|
duplex: "half"
|
|
1348
1348
|
}), I;
|
|
1349
1349
|
if (a.isFormData(r) && (I = O.headers.get("content-type")) && u.setContentType(I), O.body) {
|
|
1350
|
-
const [F, x] =
|
|
1350
|
+
const [F, x] = $e(
|
|
1351
1351
|
h,
|
|
1352
|
-
se(
|
|
1352
|
+
se(Ve(f))
|
|
1353
1353
|
);
|
|
1354
|
-
r =
|
|
1354
|
+
r = We(O.body, Ge, F, x);
|
|
1355
1355
|
}
|
|
1356
1356
|
}
|
|
1357
1357
|
a.isString(d) || (d = d ? "include" : "omit");
|
|
@@ -1366,18 +1366,18 @@ const pr = async (e) => {
|
|
|
1366
1366
|
credentials: y ? d : void 0
|
|
1367
1367
|
});
|
|
1368
1368
|
let E = await fetch(p);
|
|
1369
|
-
const g =
|
|
1370
|
-
if (
|
|
1369
|
+
const g = Ce && (l === "stream" || l === "response");
|
|
1370
|
+
if (Ce && (c || g && m)) {
|
|
1371
1371
|
const O = {};
|
|
1372
1372
|
["status", "statusText", "headers"].forEach((Y) => {
|
|
1373
1373
|
O[Y] = E[Y];
|
|
1374
1374
|
});
|
|
1375
|
-
const I = a.toFiniteNumber(E.headers.get("content-length")), [F, x] = c &&
|
|
1375
|
+
const I = a.toFiniteNumber(E.headers.get("content-length")), [F, x] = c && $e(
|
|
1376
1376
|
I,
|
|
1377
|
-
se(
|
|
1377
|
+
se(Ve(c), !0)
|
|
1378
1378
|
) || [];
|
|
1379
1379
|
E = new Response(
|
|
1380
|
-
|
|
1380
|
+
We(E.body, Ge, F, () => {
|
|
1381
1381
|
x && x(), m && m();
|
|
1382
1382
|
}),
|
|
1383
1383
|
O
|
|
@@ -1386,7 +1386,7 @@ const pr = async (e) => {
|
|
|
1386
1386
|
l = l || "text";
|
|
1387
1387
|
let D = await oe[a.findKey(oe, l) || "text"](E, e);
|
|
1388
1388
|
return !g && m && m(), await new Promise((O, I) => {
|
|
1389
|
-
|
|
1389
|
+
bt(O, I, {
|
|
1390
1390
|
data: D,
|
|
1391
1391
|
headers: U.from(E.headers),
|
|
1392
1392
|
status: E.status,
|
|
@@ -1403,12 +1403,12 @@ const pr = async (e) => {
|
|
|
1403
1403
|
}
|
|
1404
1404
|
) : R.from(y, y && y.code, e, p);
|
|
1405
1405
|
}
|
|
1406
|
-
}),
|
|
1407
|
-
http:
|
|
1408
|
-
xhr:
|
|
1409
|
-
fetch:
|
|
1406
|
+
}), Ne = {
|
|
1407
|
+
http: In,
|
|
1408
|
+
xhr: ar,
|
|
1409
|
+
fetch: br
|
|
1410
1410
|
};
|
|
1411
|
-
a.forEach(
|
|
1411
|
+
a.forEach(Ne, (e, t) => {
|
|
1412
1412
|
if (e) {
|
|
1413
1413
|
try {
|
|
1414
1414
|
Object.defineProperty(e, "name", { value: t });
|
|
@@ -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 Ke = (e) => `- ${e}`, Rr = (e) => a.isFunction(e) || e === null || e === !1, Et = {
|
|
1421
1421
|
getAdapter: (e) => {
|
|
1422
1422
|
e = a.isArray(e) ? e : [e];
|
|
1423
1423
|
const { length: t } = e;
|
|
@@ -1426,7 +1426,7 @@ const We = (e) => `- ${e}`, br = (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, !
|
|
1429
|
+
if (r = n, !Rr(n) && (r = Ne[(o = String(n)).toLowerCase()], r === void 0))
|
|
1430
1430
|
throw new R(`Unknown adapter '${o}'`);
|
|
1431
1431
|
if (r)
|
|
1432
1432
|
break;
|
|
@@ -1437,8 +1437,8 @@ const We = (e) => `- ${e}`, br = (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
|
-
`) : " " +
|
|
1440
|
+
` + i.map(Ke).join(`
|
|
1441
|
+
`) : " " + Ke(i[0]) : "as no adapter specified";
|
|
1442
1442
|
throw new R(
|
|
1443
1443
|
"There is no suitable adapter to dispatch the request " + o,
|
|
1444
1444
|
"ERR_NOT_SUPPORT"
|
|
@@ -1446,40 +1446,40 @@ const We = (e) => `- ${e}`, br = (e) => a.isFunction(e) || e === null || e === !
|
|
|
1446
1446
|
}
|
|
1447
1447
|
return r;
|
|
1448
1448
|
},
|
|
1449
|
-
adapters:
|
|
1449
|
+
adapters: Ne
|
|
1450
1450
|
};
|
|
1451
|
-
function
|
|
1451
|
+
function ye(e) {
|
|
1452
1452
|
if (e.cancelToken && e.cancelToken.throwIfRequested(), e.signal && e.signal.aborted)
|
|
1453
|
-
throw new
|
|
1453
|
+
throw new V(null, e);
|
|
1454
1454
|
}
|
|
1455
|
-
function
|
|
1456
|
-
return
|
|
1455
|
+
function Xe(e) {
|
|
1456
|
+
return ye(e), e.headers = U.from(e.headers), e.data = Se.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), Et.getAdapter(e.adapter || X.adapter)(e).then(function(r) {
|
|
1460
|
+
return ye(e), r.data = Se.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
|
|
1466
|
+
return mt(r) || (ye(e), r && r.response && (r.response.data = Se.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 gt = "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 Ye = {};
|
|
1480
1480
|
de.transitional = function(t, n, r) {
|
|
1481
1481
|
function s(i, o) {
|
|
1482
|
-
return "[Axios v" +
|
|
1482
|
+
return "[Axios v" + gt + "] Transitional option '" + i + "'" + o + (r ? ". " + r : "");
|
|
1483
1483
|
}
|
|
1484
1484
|
return (i, o, c) => {
|
|
1485
1485
|
if (t === !1)
|
|
@@ -1487,7 +1487,7 @@ de.transitional = function(t, n, r) {
|
|
|
1487
1487
|
s(o, " has been removed" + (n ? " in " + n : "")),
|
|
1488
1488
|
R.ERR_DEPRECATED
|
|
1489
1489
|
);
|
|
1490
|
-
return n && !
|
|
1490
|
+
return n && !Ye[o] && (Ye[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,7 +1498,7 @@ 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 wr(e, t, n) {
|
|
1502
1502
|
if (typeof e != "object")
|
|
1503
1503
|
throw new R("options must be an object", R.ERR_BAD_OPTION_VALUE);
|
|
1504
1504
|
const r = Object.keys(e);
|
|
@@ -1516,14 +1516,14 @@ function Rr(e, t, n) {
|
|
|
1516
1516
|
}
|
|
1517
1517
|
}
|
|
1518
1518
|
const re = {
|
|
1519
|
-
assertOptions:
|
|
1519
|
+
assertOptions: wr,
|
|
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 ve(),
|
|
1526
|
+
response: new ve()
|
|
1527
1527
|
};
|
|
1528
1528
|
}
|
|
1529
1529
|
/**
|
|
@@ -1588,7 +1588,7 @@ let H = class {
|
|
|
1588
1588
|
});
|
|
1589
1589
|
let u, d = 0, w;
|
|
1590
1590
|
if (!f) {
|
|
1591
|
-
const p = [
|
|
1591
|
+
const p = [Xe.bind(this), void 0];
|
|
1592
1592
|
for (p.unshift.apply(p, c), p.push.apply(p, l), w = p.length, u = Promise.resolve(n); d < w; )
|
|
1593
1593
|
u = u.then(p[d++], p[d++]);
|
|
1594
1594
|
return u;
|
|
@@ -1605,7 +1605,7 @@ let H = class {
|
|
|
1605
1605
|
}
|
|
1606
1606
|
}
|
|
1607
1607
|
try {
|
|
1608
|
-
u =
|
|
1608
|
+
u = Xe.call(this, S);
|
|
1609
1609
|
} catch (p) {
|
|
1610
1610
|
return Promise.reject(p);
|
|
1611
1611
|
}
|
|
@@ -1615,8 +1615,8 @@ let H = class {
|
|
|
1615
1615
|
}
|
|
1616
1616
|
getUri(t) {
|
|
1617
1617
|
t = v(this.defaults, t);
|
|
1618
|
-
const n =
|
|
1619
|
-
return
|
|
1618
|
+
const n = Rt(t.baseURL, t.url, t.allowAbsoluteUrls);
|
|
1619
|
+
return dt(n, t.params, t.paramsSerializer);
|
|
1620
1620
|
}
|
|
1621
1621
|
};
|
|
1622
1622
|
a.forEach(["delete", "get", "head", "options"], function(t) {
|
|
@@ -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
|
|
1646
|
+
let Sr = class Ot {
|
|
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 gt {
|
|
|
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 V(i, o, c), n(r.reason));
|
|
1671
1671
|
});
|
|
1672
1672
|
}
|
|
1673
1673
|
/**
|
|
@@ -1709,22 +1709,22 @@ let wr = class gt {
|
|
|
1709
1709
|
static source() {
|
|
1710
1710
|
let t;
|
|
1711
1711
|
return {
|
|
1712
|
-
token: new
|
|
1712
|
+
token: new Ot(function(s) {
|
|
1713
1713
|
t = s;
|
|
1714
1714
|
}),
|
|
1715
1715
|
cancel: t
|
|
1716
1716
|
};
|
|
1717
1717
|
}
|
|
1718
1718
|
};
|
|
1719
|
-
function
|
|
1719
|
+
function yr(e) {
|
|
1720
1720
|
return function(n) {
|
|
1721
1721
|
return e.apply(null, n);
|
|
1722
1722
|
};
|
|
1723
1723
|
}
|
|
1724
|
-
function
|
|
1724
|
+
function Er(e) {
|
|
1725
1725
|
return a.isObject(e) && e.isAxiosError === !0;
|
|
1726
1726
|
}
|
|
1727
|
-
const
|
|
1727
|
+
const _e = {
|
|
1728
1728
|
Continue: 100,
|
|
1729
1729
|
SwitchingProtocols: 101,
|
|
1730
1730
|
Processing: 102,
|
|
@@ -1789,68 +1789,68 @@ const Ne = {
|
|
|
1789
1789
|
NotExtended: 510,
|
|
1790
1790
|
NetworkAuthenticationRequired: 511
|
|
1791
1791
|
};
|
|
1792
|
-
Object.entries(
|
|
1793
|
-
|
|
1792
|
+
Object.entries(_e).forEach(([e, t]) => {
|
|
1793
|
+
_e[t] = e;
|
|
1794
1794
|
});
|
|
1795
|
-
function
|
|
1796
|
-
const t = new H(e), n =
|
|
1795
|
+
function Tt(e) {
|
|
1796
|
+
const t = new H(e), n = et(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
|
|
1798
|
+
return Tt(v(e, s));
|
|
1799
1799
|
}, n;
|
|
1800
1800
|
}
|
|
1801
|
-
const T =
|
|
1801
|
+
const T = Tt(X);
|
|
1802
1802
|
T.Axios = H;
|
|
1803
|
-
T.CanceledError =
|
|
1804
|
-
T.CancelToken =
|
|
1805
|
-
T.isCancel =
|
|
1806
|
-
T.VERSION =
|
|
1803
|
+
T.CanceledError = V;
|
|
1804
|
+
T.CancelToken = Sr;
|
|
1805
|
+
T.isCancel = mt;
|
|
1806
|
+
T.VERSION = gt;
|
|
1807
1807
|
T.toFormData = ue;
|
|
1808
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 =
|
|
1813
|
+
T.spread = yr;
|
|
1814
|
+
T.isAxiosError = Er;
|
|
1815
1815
|
T.mergeConfig = v;
|
|
1816
1816
|
T.AxiosHeaders = U;
|
|
1817
|
-
T.formToJSON = (e) =>
|
|
1818
|
-
T.getAdapter =
|
|
1819
|
-
T.HttpStatusCode =
|
|
1817
|
+
T.formToJSON = (e) => ht(a.isHTMLForm(e) ? new FormData(e) : e);
|
|
1818
|
+
T.getAdapter = Et.getAdapter;
|
|
1819
|
+
T.HttpStatusCode = _e;
|
|
1820
1820
|
T.default = T;
|
|
1821
1821
|
const {
|
|
1822
|
-
Axios:
|
|
1823
|
-
AxiosError:
|
|
1824
|
-
CanceledError:
|
|
1825
|
-
isCancel:
|
|
1826
|
-
CancelToken:
|
|
1827
|
-
VERSION:
|
|
1822
|
+
Axios: Mr,
|
|
1823
|
+
AxiosError: Hr,
|
|
1824
|
+
CanceledError: vr,
|
|
1825
|
+
isCancel: zr,
|
|
1826
|
+
CancelToken: $r,
|
|
1827
|
+
VERSION: Vr,
|
|
1828
1828
|
all: Jr,
|
|
1829
|
-
Cancel:
|
|
1830
|
-
isAxiosError:
|
|
1831
|
-
spread:
|
|
1832
|
-
toFormData:
|
|
1833
|
-
AxiosHeaders:
|
|
1834
|
-
HttpStatusCode:
|
|
1835
|
-
formToJSON:
|
|
1836
|
-
getAdapter:
|
|
1837
|
-
mergeConfig:
|
|
1838
|
-
} = T,
|
|
1839
|
-
let
|
|
1840
|
-
const
|
|
1829
|
+
Cancel: Wr,
|
|
1830
|
+
isAxiosError: Gr,
|
|
1831
|
+
spread: Kr,
|
|
1832
|
+
toFormData: Xr,
|
|
1833
|
+
AxiosHeaders: Yr,
|
|
1834
|
+
HttpStatusCode: Pe,
|
|
1835
|
+
formToJSON: Zr,
|
|
1836
|
+
getAdapter: Qr,
|
|
1837
|
+
mergeConfig: es
|
|
1838
|
+
} = T, ee = Lt.ECONOMY;
|
|
1839
|
+
let Ee = new AbortController();
|
|
1840
|
+
const gr = 3 * 60 * 1e3, Ze = (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 === Qe.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
|
+
}, Or = (e, t, n) => e[t] === Pe.Ok ? e : {
|
|
1850
1850
|
...e,
|
|
1851
|
-
[t]: n ??
|
|
1852
|
-
},
|
|
1853
|
-
const { token: e, config: t } =
|
|
1851
|
+
[t]: n ?? Pe.MultipleChoices
|
|
1852
|
+
}, ts = () => {
|
|
1853
|
+
const { token: e, config: t } = _t(), [n, r] = Re(""), [s, i] = Re([]), [o, c] = Re(!1), f = It(null), {
|
|
1854
1854
|
inboundResults: l,
|
|
1855
1855
|
outboundResults: u,
|
|
1856
1856
|
setInboundResults: d,
|
|
@@ -1859,60 +1859,57 @@ const Er = 3 * 60 * 1e3, Ye = (e) => {
|
|
|
1859
1859
|
setPartialOfferRequestId: p,
|
|
1860
1860
|
airlineStatuses: m,
|
|
1861
1861
|
setAirlineStatuses: h
|
|
1862
|
-
} =
|
|
1862
|
+
} = Ft(), { data: y } = xt({
|
|
1863
1863
|
queryKey: [z.SUPPORTED_AIRLINE_PROGRAMS],
|
|
1864
|
-
queryFn:
|
|
1864
|
+
queryFn: J.getSupportedAirlinePrograms
|
|
1865
1865
|
}), E = ({
|
|
1866
1866
|
data: b,
|
|
1867
|
-
inbound:
|
|
1867
|
+
inbound: A
|
|
1868
1868
|
}) => {
|
|
1869
|
-
const C =
|
|
1870
|
-
return (
|
|
1869
|
+
const C = Ut(b);
|
|
1870
|
+
return (A ? d : w)(Dt(C)), C;
|
|
1871
1871
|
}, {
|
|
1872
1872
|
mutate: g,
|
|
1873
1873
|
status: D,
|
|
1874
1874
|
error: O
|
|
1875
|
-
} =
|
|
1875
|
+
} = be({
|
|
1876
1876
|
mutationFn: async (b) => {
|
|
1877
|
-
|
|
1878
|
-
const C = {
|
|
1879
|
-
passengers:
|
|
1880
|
-
{ length: b.passengers ?? Xe },
|
|
1881
|
-
() => ({ type: "adult" })
|
|
1882
|
-
),
|
|
1877
|
+
Ze(b);
|
|
1878
|
+
const { passengerList: A } = ke(b.passengers), C = {
|
|
1879
|
+
passengers: A,
|
|
1883
1880
|
origin: b.origin || "",
|
|
1884
1881
|
destination: b.destination || "",
|
|
1885
1882
|
cabin_class: b.cabinClass ?? ee
|
|
1886
1883
|
};
|
|
1887
|
-
if (b.flightType ===
|
|
1888
|
-
const
|
|
1884
|
+
if (b.flightType === Qe.ONE_WAY) {
|
|
1885
|
+
const N = await J.cashOnlySearch({
|
|
1889
1886
|
...C,
|
|
1890
1887
|
departure_dates: b.dates
|
|
1891
1888
|
});
|
|
1892
1889
|
return {
|
|
1893
|
-
success:
|
|
1894
|
-
data:
|
|
1890
|
+
success: N.success,
|
|
1891
|
+
data: N.data
|
|
1895
1892
|
};
|
|
1896
1893
|
} else {
|
|
1897
|
-
const
|
|
1894
|
+
const N = await J.roundTripOutboundSearch({
|
|
1898
1895
|
...C,
|
|
1899
1896
|
departure_date: b.dates[0],
|
|
1900
1897
|
return_date: b.dates[1]
|
|
1901
1898
|
});
|
|
1902
1899
|
return {
|
|
1903
|
-
success:
|
|
1904
|
-
data:
|
|
1905
|
-
partialOfferRequestId:
|
|
1900
|
+
success: N.success,
|
|
1901
|
+
data: N.data.offers,
|
|
1902
|
+
partialOfferRequestId: N.data.id
|
|
1906
1903
|
};
|
|
1907
1904
|
}
|
|
1908
1905
|
},
|
|
1909
1906
|
onSuccess: (b) => {
|
|
1910
|
-
const { success:
|
|
1911
|
-
if (!
|
|
1907
|
+
const { success: A, data: C, partialOfferRequestId: N } = b;
|
|
1908
|
+
if (!A) {
|
|
1912
1909
|
console.log("oh lol, it didn't work");
|
|
1913
1910
|
return;
|
|
1914
1911
|
}
|
|
1915
|
-
E({ data: C }),
|
|
1912
|
+
E({ data: C }), N && p(N);
|
|
1916
1913
|
},
|
|
1917
1914
|
onError: (b) => {
|
|
1918
1915
|
console.error("Error in outbound flight search:", b);
|
|
@@ -1924,22 +1921,22 @@ const Er = 3 * 60 * 1e3, Ye = (e) => {
|
|
|
1924
1921
|
mutate: I,
|
|
1925
1922
|
status: F,
|
|
1926
1923
|
error: x
|
|
1927
|
-
} =
|
|
1924
|
+
} = be({
|
|
1928
1925
|
mutationFn: async ({
|
|
1929
1926
|
outboundOfferId: b,
|
|
1930
|
-
cabinClass:
|
|
1927
|
+
cabinClass: A
|
|
1931
1928
|
}) => {
|
|
1932
1929
|
if (!S)
|
|
1933
1930
|
throw new Error("No partialOfferRequestId found for inbound search.");
|
|
1934
|
-
return d([]), r(b), await
|
|
1931
|
+
return d([]), r(b), await J.roundTripInboundSearch({
|
|
1935
1932
|
outboundOfferId: b,
|
|
1936
1933
|
outboundOfferRequestId: S,
|
|
1937
|
-
cabinClass:
|
|
1934
|
+
cabinClass: A || ee
|
|
1938
1935
|
});
|
|
1939
1936
|
},
|
|
1940
1937
|
onSuccess: (b) => {
|
|
1941
|
-
const { success:
|
|
1942
|
-
|
|
1938
|
+
const { success: A, data: C } = b;
|
|
1939
|
+
A && E({
|
|
1943
1940
|
data: C.offers,
|
|
1944
1941
|
inbound: !0
|
|
1945
1942
|
});
|
|
@@ -1952,27 +1949,27 @@ const Er = 3 * 60 * 1e3, Ye = (e) => {
|
|
|
1952
1949
|
}
|
|
1953
1950
|
}), {
|
|
1954
1951
|
mutate: Y,
|
|
1955
|
-
status:
|
|
1956
|
-
error:
|
|
1957
|
-
} =
|
|
1952
|
+
status: At,
|
|
1953
|
+
error: Ct
|
|
1954
|
+
} = be({
|
|
1958
1955
|
mutationFn: async ({
|
|
1959
1956
|
inboundOfferId: b,
|
|
1960
|
-
cabinClass:
|
|
1957
|
+
cabinClass: A
|
|
1961
1958
|
}) => {
|
|
1962
1959
|
if (!S)
|
|
1963
1960
|
throw new Error("No partialOfferRequestId found for round-trip fares.");
|
|
1964
|
-
return await
|
|
1961
|
+
return await J.getRoundTripFares({
|
|
1965
1962
|
outboundOfferId: n,
|
|
1966
1963
|
outboundOfferRequestId: S,
|
|
1967
1964
|
inboundOfferId: b,
|
|
1968
|
-
cabinClass:
|
|
1965
|
+
cabinClass: A || ee
|
|
1969
1966
|
});
|
|
1970
1967
|
},
|
|
1971
1968
|
onSuccess: (b) => {
|
|
1972
|
-
const { success:
|
|
1973
|
-
if (!
|
|
1974
|
-
const
|
|
1975
|
-
i(
|
|
1969
|
+
const { success: A, data: C } = b;
|
|
1970
|
+
if (!A) return;
|
|
1971
|
+
const N = C.offers;
|
|
1972
|
+
i(De(N));
|
|
1976
1973
|
},
|
|
1977
1974
|
onError: (b) => {
|
|
1978
1975
|
console.error("Error in round-trip fare search:", b);
|
|
@@ -1980,36 +1977,36 @@ const Er = 3 * 60 * 1e3, Ye = (e) => {
|
|
|
1980
1977
|
onSettled: () => {
|
|
1981
1978
|
Z.invalidateQueries({ queryKey: [z.SEARCH_LIMIT] });
|
|
1982
1979
|
}
|
|
1983
|
-
}),
|
|
1984
|
-
var
|
|
1980
|
+
}), Le = async (b) => {
|
|
1981
|
+
var Ue;
|
|
1985
1982
|
h(() => ({
|
|
1986
1983
|
...y == null ? void 0 : y.reduce((j, _) => (j[_] = -1, j), {})
|
|
1987
1984
|
})), c(!0);
|
|
1988
|
-
const
|
|
1985
|
+
const A = b.paymentType === Q.CASH_AND_MILES ? ['"cash"', '"points"'] : ['"points"'], { passengerCount: C } = ke(b.passengers), N = kt({
|
|
1989
1986
|
originCode: b.origin,
|
|
1990
1987
|
destinationCode: b.destination,
|
|
1991
1988
|
dates: b.dates,
|
|
1992
1989
|
cabinClass: b.cabinClass ?? ee,
|
|
1993
|
-
passengerCount:
|
|
1994
|
-
paymentType:
|
|
1990
|
+
passengerCount: C,
|
|
1991
|
+
paymentType: A
|
|
1995
1992
|
});
|
|
1996
|
-
let
|
|
1997
|
-
|
|
1993
|
+
let pe = [], he = 0;
|
|
1994
|
+
Ee = new AbortController(), f.current = setTimeout(
|
|
1998
1995
|
() => {
|
|
1999
1996
|
q();
|
|
2000
1997
|
},
|
|
2001
|
-
(((
|
|
2002
|
-
),
|
|
1998
|
+
(((Ue = t == null ? void 0 : t.flightsConfig) == null ? void 0 : Ue.streamTimeoutTotalSeconds) ?? gr) * 1e3
|
|
1999
|
+
), zt(Pt() + N, {
|
|
2003
2000
|
headers: {
|
|
2004
2001
|
"Content-Type": "application/json",
|
|
2005
2002
|
Authorization: e ?? "",
|
|
2006
2003
|
"client-id": (t == null ? void 0 : t.clientId) ?? ""
|
|
2007
2004
|
},
|
|
2008
2005
|
openWhenHidden: !0,
|
|
2009
|
-
signal:
|
|
2006
|
+
signal: Ee.signal,
|
|
2010
2007
|
onmessage(j) {
|
|
2011
2008
|
try {
|
|
2012
|
-
const _ =
|
|
2009
|
+
const _ = De(JSON.parse(j.data));
|
|
2013
2010
|
if (_.success === !1)
|
|
2014
2011
|
return;
|
|
2015
2012
|
if (_.close === !0) {
|
|
@@ -2017,20 +2014,20 @@ const Er = 3 * 60 * 1e3, Ye = (e) => {
|
|
|
2017
2014
|
return;
|
|
2018
2015
|
}
|
|
2019
2016
|
if (_.airlineProgram && h(
|
|
2020
|
-
(
|
|
2021
|
-
|
|
2017
|
+
(me) => Or(
|
|
2018
|
+
me,
|
|
2022
2019
|
_.airlineProgram,
|
|
2023
2020
|
_.status ?? _.statusCode
|
|
2024
2021
|
)
|
|
2025
|
-
), _.status ===
|
|
2026
|
-
|
|
2027
|
-
const
|
|
2028
|
-
...
|
|
2022
|
+
), _.status === Pe.Ok && _.flights && _.flights.length > 0) {
|
|
2023
|
+
he = 0;
|
|
2024
|
+
const me = _.flights.map((Nt) => ({
|
|
2025
|
+
...Nt,
|
|
2029
2026
|
partners: _.partners ?? []
|
|
2030
2027
|
}));
|
|
2031
|
-
|
|
2028
|
+
pe = [...pe, ...me], E({ data: pe });
|
|
2032
2029
|
}
|
|
2033
|
-
_.ping && (
|
|
2030
|
+
_.ping && (he++, he >= t.flightsConfig.streamTimeoutPingCount && q());
|
|
2034
2031
|
} catch (_) {
|
|
2035
2032
|
console.error("Error parsing message:", _), q();
|
|
2036
2033
|
}
|
|
@@ -2044,13 +2041,13 @@ const Er = 3 * 60 * 1e3, Ye = (e) => {
|
|
|
2044
2041
|
keepalive: !1
|
|
2045
2042
|
});
|
|
2046
2043
|
}, q = () => {
|
|
2047
|
-
|
|
2048
|
-
const
|
|
2044
|
+
Ee.abort(), f.current && (clearTimeout(f.current), f.current = null), c(!1), Z.invalidateQueries({ queryKey: [z.SEARCH_LIMIT] }), h((b) => {
|
|
2045
|
+
const A = {};
|
|
2049
2046
|
for (const C in b) {
|
|
2050
|
-
const
|
|
2051
|
-
|
|
2047
|
+
const N = b[C];
|
|
2048
|
+
N !== -1 && (A[C] = N);
|
|
2052
2049
|
}
|
|
2053
|
-
return
|
|
2050
|
+
return A;
|
|
2054
2051
|
});
|
|
2055
2052
|
};
|
|
2056
2053
|
return {
|
|
@@ -2065,10 +2062,10 @@ const Er = 3 * 60 * 1e3, Ye = (e) => {
|
|
|
2065
2062
|
* @type {boolean}
|
|
2066
2063
|
* @default false
|
|
2067
2064
|
*/
|
|
2068
|
-
loadingFares:
|
|
2065
|
+
loadingFares: At === "pending",
|
|
2069
2066
|
outboundError: O,
|
|
2070
2067
|
inboundError: x,
|
|
2071
|
-
roundTripFaresError:
|
|
2068
|
+
roundTripFaresError: Ct,
|
|
2072
2069
|
// Results
|
|
2073
2070
|
outboundResults: u,
|
|
2074
2071
|
inboundResults: l,
|
|
@@ -2081,15 +2078,15 @@ const Er = 3 * 60 * 1e3, Ye = (e) => {
|
|
|
2081
2078
|
* @param {ISearchFlightArgs} args - The search arguments
|
|
2082
2079
|
*/
|
|
2083
2080
|
searchOutboundFlights: async (b) => {
|
|
2084
|
-
switch (
|
|
2081
|
+
switch (Ze(b), w([]), q(), b.paymentType) {
|
|
2085
2082
|
case Q.CASH_AND_MILES:
|
|
2086
|
-
|
|
2083
|
+
Le(b);
|
|
2087
2084
|
break;
|
|
2088
2085
|
case Q.CASH:
|
|
2089
2086
|
g(b);
|
|
2090
2087
|
break;
|
|
2091
2088
|
case Q.MILES:
|
|
2092
|
-
|
|
2089
|
+
Le(b);
|
|
2093
2090
|
break;
|
|
2094
2091
|
}
|
|
2095
2092
|
},
|
|
@@ -2129,5 +2126,5 @@ const Er = 3 * 60 * 1e3, Ye = (e) => {
|
|
|
2129
2126
|
};
|
|
2130
2127
|
};
|
|
2131
2128
|
export {
|
|
2132
|
-
|
|
2129
|
+
ts as useFlightSearch
|
|
2133
2130
|
};
|