@enviabybus/react-utility-belt 2.2.2 → 2.3.1
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/chunks/{http.helper.CwyjayYT.js → services.helper.D025rU8I.js} +556 -555
- package/dist/chunks/services.helper.DlU_zXxQ.js +47 -0
- package/dist/helpers.cjs.js +1 -1
- package/dist/helpers.es.js +23 -22
- package/dist/services.cjs.js +7 -7
- package/dist/services.es.js +1259 -2098
- package/dist/src/helpers/index.d.ts +1 -0
- package/dist/src/helpers/index.d.ts.map +1 -1
- package/dist/src/helpers/services.helper.d.ts +2 -0
- package/dist/src/helpers/services.helper.d.ts.map +1 -0
- package/dist/src/services/services.d.ts +23 -24
- package/dist/src/services/services.d.ts.map +1 -1
- package/dist/src/services/tracker/tracker.service.d.ts +5 -3
- package/dist/src/services/tracker/tracker.service.d.ts.map +1 -1
- package/dist/vite.config.d.ts.map +1 -1
- package/package.json +1 -1
- package/dist/chunks/http.helper.DIOQCl86.js +0 -47
package/dist/services.es.js
CHANGED
|
@@ -1,389 +1,384 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
};
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
import * as _ from "react";
|
|
8
|
-
import { useRef as Yr, useEffect as yr, createContext as en, useState as tn, useContext as rn } from "react";
|
|
9
|
-
import { jsx as br } from "react/jsx-runtime";
|
|
10
|
-
import { HttpServiceError as Z, HttpServiceErrorCode as gr } from "./errors.es.js";
|
|
11
|
-
const nn = (e) => ({
|
|
1
|
+
import { c as W, l as ke, a as Xe, e as Nt, g as Ft, d as Ze } from "./chunks/services.helper.D025rU8I.js";
|
|
2
|
+
import { useRef as Ut, useEffect as Ye, useState as kt, createContext as Dt, useContext as _t } from "react";
|
|
3
|
+
import { jsx as et } from "react/jsx-runtime";
|
|
4
|
+
import { useMutation as Bt, useQuery as Mt } from "@tanstack/react-query";
|
|
5
|
+
import { HttpServiceError as U, HttpServiceErrorCode as tt } from "./errors.es.js";
|
|
6
|
+
const Ht = (e) => ({
|
|
12
7
|
...t
|
|
13
|
-
}) => e(t),
|
|
8
|
+
}) => e(t), zr = ({
|
|
14
9
|
useAdapter: e,
|
|
15
10
|
LoggerService: t
|
|
16
|
-
}) =>
|
|
11
|
+
}) => de("ERROR_SERVICE", Ht(e), [t.ServiceProvider]), Jr = () => ({
|
|
17
12
|
LoggerService: e
|
|
18
13
|
}) => {
|
|
19
|
-
const t =
|
|
20
|
-
const
|
|
21
|
-
|
|
22
|
-
...
|
|
23
|
-
[
|
|
14
|
+
const t = ie(e), n = Ut({}), r = (c, f) => {
|
|
15
|
+
const l = n.current;
|
|
16
|
+
n.current = {
|
|
17
|
+
...l,
|
|
18
|
+
[c]: [...l[c] || [], f]
|
|
24
19
|
};
|
|
25
|
-
}, s = (
|
|
26
|
-
const
|
|
27
|
-
|
|
28
|
-
...
|
|
20
|
+
}, s = (c, f) => {
|
|
21
|
+
const l = n.current;
|
|
22
|
+
n.current = {
|
|
23
|
+
...l,
|
|
29
24
|
// Used internaly, assured not to be undefined
|
|
30
|
-
[
|
|
25
|
+
[c]: l[c].filter((a) => a !== f)
|
|
31
26
|
};
|
|
32
27
|
};
|
|
33
28
|
return {
|
|
34
|
-
raiseError: (
|
|
29
|
+
raiseError: (c) => {
|
|
35
30
|
var f;
|
|
36
|
-
t.error(
|
|
31
|
+
t.error(c), (f = n.current[c.code]) == null || f.forEach((l) => l(c));
|
|
37
32
|
},
|
|
38
|
-
useErrorHandler: (
|
|
39
|
-
const
|
|
40
|
-
let
|
|
41
|
-
|
|
42
|
-
s(
|
|
43
|
-
}),
|
|
33
|
+
useErrorHandler: (c, f) => {
|
|
34
|
+
const l = W.c(4);
|
|
35
|
+
let a, p;
|
|
36
|
+
l[0] !== f || l[1] !== c ? (a = () => (r(c, f), () => {
|
|
37
|
+
s(c, f);
|
|
38
|
+
}), p = [c, f], l[0] = f, l[1] = c, l[2] = a, l[3] = p) : (a = l[2], p = l[3]), Ye(a, p);
|
|
44
39
|
}
|
|
45
40
|
};
|
|
46
|
-
},
|
|
41
|
+
}, jt = (e) => ({
|
|
47
42
|
ErrorService: t,
|
|
48
|
-
LoggerService:
|
|
43
|
+
LoggerService: n
|
|
49
44
|
}) => {
|
|
50
|
-
const
|
|
51
|
-
const
|
|
52
|
-
s.info(`HTTP request: ${JSON.stringify(
|
|
53
|
-
},
|
|
45
|
+
const r = e(), s = ie(n), o = ie(t), i = (E) => {
|
|
46
|
+
const b = ke.omitBy(E, ke.isNil);
|
|
47
|
+
s.info(`HTTP request: ${JSON.stringify(b)}`);
|
|
48
|
+
}, c = (E) => {
|
|
54
49
|
const {
|
|
55
|
-
body:
|
|
56
|
-
status:
|
|
50
|
+
body: b,
|
|
51
|
+
status: S
|
|
57
52
|
} = E;
|
|
58
53
|
s.info(`HTTP response: ${JSON.stringify({
|
|
59
|
-
body:
|
|
60
|
-
status:
|
|
54
|
+
body: b,
|
|
55
|
+
status: S
|
|
61
56
|
})}`);
|
|
62
|
-
}, f = (E) => E >= 400 && E < 600,
|
|
57
|
+
}, f = (E) => E >= 400 && E < 600, l = (E) => {
|
|
63
58
|
const {
|
|
64
|
-
details:
|
|
65
|
-
message:
|
|
59
|
+
details: b,
|
|
60
|
+
message: S
|
|
66
61
|
} = E;
|
|
67
|
-
return o.raiseError(new
|
|
68
|
-
code:
|
|
69
|
-
details:
|
|
70
|
-
message:
|
|
62
|
+
return o.raiseError(new U({
|
|
63
|
+
code: tt.Unauthorized,
|
|
64
|
+
details: b,
|
|
65
|
+
message: S
|
|
71
66
|
}));
|
|
72
|
-
},
|
|
67
|
+
}, a = (E) => {
|
|
73
68
|
const {
|
|
74
|
-
status:
|
|
69
|
+
status: b
|
|
75
70
|
} = E.details || {};
|
|
76
|
-
if (!
|
|
77
|
-
const
|
|
78
|
-
s.error(
|
|
71
|
+
if (!b || b >= 500) {
|
|
72
|
+
const S = JSON.stringify(E);
|
|
73
|
+
s.error(S);
|
|
79
74
|
} else {
|
|
80
|
-
if (
|
|
81
|
-
return
|
|
75
|
+
if (b === 401)
|
|
76
|
+
return l(E);
|
|
82
77
|
s.warn(E);
|
|
83
78
|
}
|
|
84
79
|
return o.raiseError(E);
|
|
85
|
-
},
|
|
80
|
+
}, p = async (E, b, S = {}) => {
|
|
86
81
|
i({
|
|
87
82
|
method: E,
|
|
88
|
-
...
|
|
83
|
+
...b
|
|
89
84
|
});
|
|
90
|
-
let
|
|
91
|
-
const
|
|
92
|
-
if (
|
|
93
|
-
|
|
85
|
+
let O, T;
|
|
86
|
+
const v = (A) => {
|
|
87
|
+
if (A instanceof U) {
|
|
88
|
+
T = A;
|
|
94
89
|
return;
|
|
95
90
|
}
|
|
96
|
-
|
|
91
|
+
O = A;
|
|
97
92
|
};
|
|
98
93
|
switch (E) {
|
|
99
94
|
case "GET": {
|
|
100
|
-
|
|
95
|
+
v(await r.get(b, S));
|
|
101
96
|
break;
|
|
102
97
|
}
|
|
103
98
|
case "DELETE": {
|
|
104
|
-
|
|
99
|
+
v(await r.delete(b, S));
|
|
105
100
|
break;
|
|
106
101
|
}
|
|
107
102
|
case "PATCH": {
|
|
108
|
-
|
|
103
|
+
v(await r.patch(b, S));
|
|
109
104
|
break;
|
|
110
105
|
}
|
|
111
106
|
case "POST": {
|
|
112
|
-
|
|
107
|
+
v(await r.post(b, S));
|
|
113
108
|
break;
|
|
114
109
|
}
|
|
115
110
|
case "PUT": {
|
|
116
|
-
|
|
111
|
+
v(await r.put(b, S));
|
|
117
112
|
break;
|
|
118
113
|
}
|
|
119
114
|
default:
|
|
120
115
|
throw Error(`Unknown method HTTP method '${E}'`);
|
|
121
116
|
}
|
|
122
|
-
if (
|
|
123
|
-
throw
|
|
124
|
-
return
|
|
117
|
+
if (T)
|
|
118
|
+
throw a(T), T;
|
|
119
|
+
return O ? (c(O), f(O.status) && a(new U({
|
|
125
120
|
details: {
|
|
126
|
-
body: JSON.stringify(
|
|
121
|
+
body: JSON.stringify(O.body),
|
|
127
122
|
method: E,
|
|
128
|
-
status:
|
|
129
|
-
url:
|
|
123
|
+
status: O.status,
|
|
124
|
+
url: b.url
|
|
130
125
|
}
|
|
131
|
-
})),
|
|
126
|
+
})), O) : void 0;
|
|
132
127
|
};
|
|
133
128
|
return {
|
|
134
|
-
delete: (E,
|
|
135
|
-
get: (E,
|
|
136
|
-
patch: (E,
|
|
137
|
-
post: async (E,
|
|
138
|
-
put: (E,
|
|
129
|
+
delete: (E, b = {}) => p("DELETE", E, b),
|
|
130
|
+
get: (E, b = {}) => p("GET", E, b),
|
|
131
|
+
patch: (E, b = {}) => p("PATCH", E, b),
|
|
132
|
+
post: async (E, b = {}) => await p("POST", E, b),
|
|
133
|
+
put: (E, b = {}) => p("PUT", E, b)
|
|
139
134
|
};
|
|
140
|
-
},
|
|
135
|
+
}, Kr = ({
|
|
141
136
|
useAdapter: e,
|
|
142
137
|
ErrorService: t,
|
|
143
|
-
LoggerService:
|
|
144
|
-
}) =>
|
|
145
|
-
function
|
|
138
|
+
LoggerService: n
|
|
139
|
+
}) => de("HTTP_SERVICE", jt(e), [t.ServiceProvider, n.ServiceProvider]);
|
|
140
|
+
function nt(e, t) {
|
|
146
141
|
return function() {
|
|
147
142
|
return e.apply(t, arguments);
|
|
148
143
|
};
|
|
149
144
|
}
|
|
150
|
-
const { toString:
|
|
151
|
-
const
|
|
152
|
-
return e[
|
|
153
|
-
})(/* @__PURE__ */ Object.create(null)),
|
|
154
|
-
function
|
|
155
|
-
return e !== null && !
|
|
145
|
+
const { toString: qt } = Object.prototype, { getPrototypeOf: Re } = Object, { iterator: ae, toStringTag: rt } = Symbol, ce = /* @__PURE__ */ ((e) => (t) => {
|
|
146
|
+
const n = qt.call(t);
|
|
147
|
+
return e[n] || (e[n] = n.slice(8, -1).toLowerCase());
|
|
148
|
+
})(/* @__PURE__ */ Object.create(null)), L = (e) => (e = e.toLowerCase(), (t) => ce(t) === e), ue = (e) => (t) => typeof t === e, { isArray: $ } = Array, I = ue("undefined");
|
|
149
|
+
function V(e) {
|
|
150
|
+
return e !== null && !I(e) && e.constructor !== null && !I(e.constructor) && x(e.constructor.isBuffer) && e.constructor.isBuffer(e);
|
|
156
151
|
}
|
|
157
|
-
const
|
|
158
|
-
function
|
|
152
|
+
const st = L("ArrayBuffer");
|
|
153
|
+
function It(e) {
|
|
159
154
|
let t;
|
|
160
|
-
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 && st(e.buffer), t;
|
|
161
156
|
}
|
|
162
|
-
const
|
|
163
|
-
if (
|
|
157
|
+
const $t = ue("string"), x = ue("function"), ot = ue("number"), G = (e) => e !== null && typeof e == "object", zt = (e) => e === !0 || e === !1, ne = (e) => {
|
|
158
|
+
if (ce(e) !== "object")
|
|
164
159
|
return !1;
|
|
165
|
-
const t =
|
|
166
|
-
return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(
|
|
167
|
-
},
|
|
168
|
-
if (!
|
|
160
|
+
const t = Re(e);
|
|
161
|
+
return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(rt in e) && !(ae in e);
|
|
162
|
+
}, Jt = (e) => {
|
|
163
|
+
if (!G(e) || V(e))
|
|
169
164
|
return !1;
|
|
170
165
|
try {
|
|
171
166
|
return Object.keys(e).length === 0 && Object.getPrototypeOf(e) === Object.prototype;
|
|
172
167
|
} catch {
|
|
173
168
|
return !1;
|
|
174
169
|
}
|
|
175
|
-
},
|
|
170
|
+
}, Kt = L("Date"), Wt = L("File"), Vt = L("Blob"), Gt = L("FileList"), Qt = (e) => G(e) && x(e.pipe), Xt = (e) => {
|
|
176
171
|
let t;
|
|
177
|
-
return e && (typeof FormData == "function" && e instanceof FormData ||
|
|
178
|
-
t === "object" &&
|
|
179
|
-
},
|
|
180
|
-
function
|
|
172
|
+
return e && (typeof FormData == "function" && e instanceof FormData || x(e.append) && ((t = ce(e)) === "formdata" || // detect form-data instance
|
|
173
|
+
t === "object" && x(e.toString) && e.toString() === "[object FormData]"));
|
|
174
|
+
}, Zt = L("URLSearchParams"), [Yt, en, tn, nn] = ["ReadableStream", "Request", "Response", "Headers"].map(L), rn = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
|
|
175
|
+
function Q(e, t, { allOwnKeys: n = !1 } = {}) {
|
|
181
176
|
if (e === null || typeof e > "u")
|
|
182
177
|
return;
|
|
183
|
-
let
|
|
184
|
-
if (typeof e != "object" && (e = [e]),
|
|
185
|
-
for (
|
|
186
|
-
t.call(null, e[
|
|
178
|
+
let r, s;
|
|
179
|
+
if (typeof e != "object" && (e = [e]), $(e))
|
|
180
|
+
for (r = 0, s = e.length; r < s; r++)
|
|
181
|
+
t.call(null, e[r], r, e);
|
|
187
182
|
else {
|
|
188
|
-
if (
|
|
183
|
+
if (V(e))
|
|
189
184
|
return;
|
|
190
|
-
const o =
|
|
191
|
-
let
|
|
192
|
-
for (
|
|
193
|
-
|
|
185
|
+
const o = n ? Object.getOwnPropertyNames(e) : Object.keys(e), i = o.length;
|
|
186
|
+
let c;
|
|
187
|
+
for (r = 0; r < i; r++)
|
|
188
|
+
c = o[r], t.call(null, e[c], c, e);
|
|
194
189
|
}
|
|
195
190
|
}
|
|
196
|
-
function
|
|
197
|
-
if (
|
|
191
|
+
function it(e, t) {
|
|
192
|
+
if (V(e))
|
|
198
193
|
return null;
|
|
199
194
|
t = t.toLowerCase();
|
|
200
|
-
const
|
|
201
|
-
let
|
|
202
|
-
for (;
|
|
203
|
-
if (s = r
|
|
195
|
+
const n = Object.keys(e);
|
|
196
|
+
let r = n.length, s;
|
|
197
|
+
for (; r-- > 0; )
|
|
198
|
+
if (s = n[r], t === s.toLowerCase())
|
|
204
199
|
return s;
|
|
205
200
|
return null;
|
|
206
201
|
}
|
|
207
|
-
const
|
|
208
|
-
function
|
|
209
|
-
const { caseless: e, skipUndefined: t } =
|
|
210
|
-
const i = e &&
|
|
211
|
-
|
|
202
|
+
const B = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, at = (e) => !I(e) && e !== B;
|
|
203
|
+
function ge() {
|
|
204
|
+
const { caseless: e, skipUndefined: t } = at(this) && this || {}, n = {}, r = (s, o) => {
|
|
205
|
+
const i = e && it(n, o) || o;
|
|
206
|
+
ne(n[i]) && ne(s) ? n[i] = ge(n[i], s) : ne(s) ? n[i] = ge({}, s) : $(s) ? n[i] = s.slice() : (!t || !I(s)) && (n[i] = s);
|
|
212
207
|
};
|
|
213
208
|
for (let s = 0, o = arguments.length; s < o; s++)
|
|
214
|
-
arguments[s] &&
|
|
215
|
-
return
|
|
209
|
+
arguments[s] && Q(arguments[s], r);
|
|
210
|
+
return n;
|
|
216
211
|
}
|
|
217
|
-
const
|
|
218
|
-
|
|
219
|
-
}, { allOwnKeys:
|
|
220
|
-
e.prototype = Object.create(t.prototype,
|
|
212
|
+
const sn = (e, t, n, { allOwnKeys: r } = {}) => (Q(t, (s, o) => {
|
|
213
|
+
n && x(s) ? e[o] = nt(s, n) : e[o] = s;
|
|
214
|
+
}, { allOwnKeys: r }), e), on = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e), an = (e, t, n, r) => {
|
|
215
|
+
e.prototype = Object.create(t.prototype, r), e.prototype.constructor = e, Object.defineProperty(e, "super", {
|
|
221
216
|
value: t.prototype
|
|
222
|
-
}),
|
|
223
|
-
},
|
|
217
|
+
}), n && Object.assign(e.prototype, n);
|
|
218
|
+
}, cn = (e, t, n, r) => {
|
|
224
219
|
let s, o, i;
|
|
225
|
-
const
|
|
220
|
+
const c = {};
|
|
226
221
|
if (t = t || {}, e == null) return t;
|
|
227
222
|
do {
|
|
228
223
|
for (s = Object.getOwnPropertyNames(e), o = s.length; o-- > 0; )
|
|
229
|
-
i = s[o], (!
|
|
230
|
-
e =
|
|
231
|
-
} while (e && (!
|
|
224
|
+
i = s[o], (!r || r(i, e, t)) && !c[i] && (t[i] = e[i], c[i] = !0);
|
|
225
|
+
e = n !== !1 && Re(e);
|
|
226
|
+
} while (e && (!n || n(e, t)) && e !== Object.prototype);
|
|
232
227
|
return t;
|
|
233
|
-
},
|
|
234
|
-
e = String(e), (
|
|
235
|
-
const
|
|
236
|
-
return
|
|
237
|
-
},
|
|
228
|
+
}, un = (e, t, n) => {
|
|
229
|
+
e = String(e), (n === void 0 || n > e.length) && (n = e.length), n -= t.length;
|
|
230
|
+
const r = e.indexOf(t, n);
|
|
231
|
+
return r !== -1 && r === n;
|
|
232
|
+
}, ln = (e) => {
|
|
238
233
|
if (!e) return null;
|
|
239
|
-
if (
|
|
234
|
+
if ($(e)) return e;
|
|
240
235
|
let t = e.length;
|
|
241
|
-
if (!
|
|
242
|
-
const
|
|
236
|
+
if (!ot(t)) return null;
|
|
237
|
+
const n = new Array(t);
|
|
243
238
|
for (; t-- > 0; )
|
|
244
|
-
|
|
245
|
-
return
|
|
246
|
-
},
|
|
247
|
-
const
|
|
239
|
+
n[t] = e[t];
|
|
240
|
+
return n;
|
|
241
|
+
}, fn = /* @__PURE__ */ ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" && Re(Uint8Array)), dn = (e, t) => {
|
|
242
|
+
const r = (e && e[ae]).call(e);
|
|
248
243
|
let s;
|
|
249
|
-
for (; (s =
|
|
244
|
+
for (; (s = r.next()) && !s.done; ) {
|
|
250
245
|
const o = s.value;
|
|
251
246
|
t.call(e, o[0], o[1]);
|
|
252
247
|
}
|
|
253
|
-
},
|
|
254
|
-
let
|
|
255
|
-
const
|
|
256
|
-
for (; (
|
|
257
|
-
|
|
258
|
-
return
|
|
259
|
-
},
|
|
248
|
+
}, pn = (e, t) => {
|
|
249
|
+
let n;
|
|
250
|
+
const r = [];
|
|
251
|
+
for (; (n = e.exec(t)) !== null; )
|
|
252
|
+
r.push(n);
|
|
253
|
+
return r;
|
|
254
|
+
}, hn = L("HTMLFormElement"), mn = (e) => e.toLowerCase().replace(
|
|
260
255
|
/[-_\s]([a-z\d])(\w*)/g,
|
|
261
|
-
function(
|
|
262
|
-
return
|
|
256
|
+
function(n, r, s) {
|
|
257
|
+
return r.toUpperCase() + s;
|
|
263
258
|
}
|
|
264
|
-
),
|
|
265
|
-
const
|
|
266
|
-
|
|
259
|
+
), De = (({ hasOwnProperty: e }) => (t, n) => e.call(t, n))(Object.prototype), yn = L("RegExp"), ct = (e, t) => {
|
|
260
|
+
const n = Object.getOwnPropertyDescriptors(e), r = {};
|
|
261
|
+
Q(n, (s, o) => {
|
|
267
262
|
let i;
|
|
268
|
-
(i = t(s, o, e)) !== !1 && (
|
|
269
|
-
}), Object.defineProperties(e,
|
|
270
|
-
},
|
|
271
|
-
|
|
272
|
-
if (
|
|
263
|
+
(i = t(s, o, e)) !== !1 && (r[o] = i || s);
|
|
264
|
+
}), Object.defineProperties(e, r);
|
|
265
|
+
}, En = (e) => {
|
|
266
|
+
ct(e, (t, n) => {
|
|
267
|
+
if (x(e) && ["arguments", "caller", "callee"].indexOf(n) !== -1)
|
|
273
268
|
return !1;
|
|
274
|
-
const
|
|
275
|
-
if (
|
|
269
|
+
const r = e[n];
|
|
270
|
+
if (x(r)) {
|
|
276
271
|
if (t.enumerable = !1, "writable" in t) {
|
|
277
272
|
t.writable = !1;
|
|
278
273
|
return;
|
|
279
274
|
}
|
|
280
275
|
t.set || (t.set = () => {
|
|
281
|
-
throw Error("Can not rewrite read-only method '" +
|
|
276
|
+
throw Error("Can not rewrite read-only method '" + n + "'");
|
|
282
277
|
});
|
|
283
278
|
}
|
|
284
279
|
});
|
|
285
|
-
},
|
|
286
|
-
const
|
|
280
|
+
}, gn = (e, t) => {
|
|
281
|
+
const n = {}, r = (s) => {
|
|
287
282
|
s.forEach((o) => {
|
|
288
|
-
|
|
283
|
+
n[o] = !0;
|
|
289
284
|
});
|
|
290
285
|
};
|
|
291
|
-
return
|
|
292
|
-
},
|
|
293
|
-
},
|
|
294
|
-
function
|
|
295
|
-
return !!(e &&
|
|
296
|
-
}
|
|
297
|
-
const
|
|
298
|
-
const t = new Array(10),
|
|
299
|
-
if (
|
|
300
|
-
if (t.indexOf(
|
|
286
|
+
return $(e) ? r(e) : r(String(e).split(t)), n;
|
|
287
|
+
}, bn = () => {
|
|
288
|
+
}, wn = (e, t) => e != null && Number.isFinite(e = +e) ? e : t;
|
|
289
|
+
function Sn(e) {
|
|
290
|
+
return !!(e && x(e.append) && e[rt] === "FormData" && e[ae]);
|
|
291
|
+
}
|
|
292
|
+
const Rn = (e) => {
|
|
293
|
+
const t = new Array(10), n = (r, s) => {
|
|
294
|
+
if (G(r)) {
|
|
295
|
+
if (t.indexOf(r) >= 0)
|
|
301
296
|
return;
|
|
302
|
-
if (
|
|
303
|
-
return
|
|
304
|
-
if (!("toJSON" in
|
|
305
|
-
t[s] =
|
|
306
|
-
const o =
|
|
307
|
-
return
|
|
308
|
-
const f =
|
|
309
|
-
!
|
|
297
|
+
if (V(r))
|
|
298
|
+
return r;
|
|
299
|
+
if (!("toJSON" in r)) {
|
|
300
|
+
t[s] = r;
|
|
301
|
+
const o = $(r) ? [] : {};
|
|
302
|
+
return Q(r, (i, c) => {
|
|
303
|
+
const f = n(i, s + 1);
|
|
304
|
+
!I(f) && (o[c] = f);
|
|
310
305
|
}), t[s] = void 0, o;
|
|
311
306
|
}
|
|
312
307
|
}
|
|
313
|
-
return
|
|
308
|
+
return r;
|
|
314
309
|
};
|
|
315
|
-
return
|
|
316
|
-
},
|
|
317
|
-
s ===
|
|
310
|
+
return n(e, 0);
|
|
311
|
+
}, On = L("AsyncFunction"), Tn = (e) => e && (G(e) || x(e)) && x(e.then) && x(e.catch), ut = ((e, t) => e ? setImmediate : t ? ((n, r) => (B.addEventListener("message", ({ source: s, data: o }) => {
|
|
312
|
+
s === B && o === n && r.length && r.shift()();
|
|
318
313
|
}, !1), (s) => {
|
|
319
|
-
|
|
320
|
-
}))(`axios@${Math.random()}`, []) : (
|
|
314
|
+
r.push(s), B.postMessage(n, "*");
|
|
315
|
+
}))(`axios@${Math.random()}`, []) : (n) => setTimeout(n))(
|
|
321
316
|
typeof setImmediate == "function",
|
|
322
|
-
|
|
323
|
-
),
|
|
324
|
-
isArray:
|
|
325
|
-
isArrayBuffer:
|
|
326
|
-
isBuffer:
|
|
327
|
-
isFormData:
|
|
328
|
-
isArrayBufferView:
|
|
329
|
-
isString:
|
|
330
|
-
isNumber:
|
|
331
|
-
isBoolean:
|
|
332
|
-
isObject:
|
|
333
|
-
isPlainObject:
|
|
334
|
-
isEmptyObject:
|
|
335
|
-
isReadableStream:
|
|
336
|
-
isRequest:
|
|
337
|
-
isResponse:
|
|
338
|
-
isHeaders:
|
|
339
|
-
isUndefined:
|
|
340
|
-
isDate:
|
|
341
|
-
isFile:
|
|
342
|
-
isBlob:
|
|
343
|
-
isRegExp:
|
|
344
|
-
isFunction:
|
|
345
|
-
isStream:
|
|
346
|
-
isURLSearchParams:
|
|
347
|
-
isTypedArray:
|
|
348
|
-
isFileList:
|
|
349
|
-
forEach:
|
|
350
|
-
merge:
|
|
351
|
-
extend:
|
|
352
|
-
trim:
|
|
353
|
-
stripBOM:
|
|
354
|
-
inherits:
|
|
355
|
-
toFlatObject:
|
|
356
|
-
kindOf:
|
|
357
|
-
kindOfTest:
|
|
358
|
-
endsWith:
|
|
359
|
-
toArray:
|
|
360
|
-
forEachEntry:
|
|
361
|
-
matchAll:
|
|
362
|
-
isHTMLForm:
|
|
363
|
-
hasOwnProperty:
|
|
364
|
-
hasOwnProp:
|
|
317
|
+
x(B.postMessage)
|
|
318
|
+
), An = typeof queueMicrotask < "u" ? queueMicrotask.bind(B) : typeof process < "u" && process.nextTick || ut, Cn = (e) => e != null && x(e[ae]), u = {
|
|
319
|
+
isArray: $,
|
|
320
|
+
isArrayBuffer: st,
|
|
321
|
+
isBuffer: V,
|
|
322
|
+
isFormData: Xt,
|
|
323
|
+
isArrayBufferView: It,
|
|
324
|
+
isString: $t,
|
|
325
|
+
isNumber: ot,
|
|
326
|
+
isBoolean: zt,
|
|
327
|
+
isObject: G,
|
|
328
|
+
isPlainObject: ne,
|
|
329
|
+
isEmptyObject: Jt,
|
|
330
|
+
isReadableStream: Yt,
|
|
331
|
+
isRequest: en,
|
|
332
|
+
isResponse: tn,
|
|
333
|
+
isHeaders: nn,
|
|
334
|
+
isUndefined: I,
|
|
335
|
+
isDate: Kt,
|
|
336
|
+
isFile: Wt,
|
|
337
|
+
isBlob: Vt,
|
|
338
|
+
isRegExp: yn,
|
|
339
|
+
isFunction: x,
|
|
340
|
+
isStream: Qt,
|
|
341
|
+
isURLSearchParams: Zt,
|
|
342
|
+
isTypedArray: fn,
|
|
343
|
+
isFileList: Gt,
|
|
344
|
+
forEach: Q,
|
|
345
|
+
merge: ge,
|
|
346
|
+
extend: sn,
|
|
347
|
+
trim: rn,
|
|
348
|
+
stripBOM: on,
|
|
349
|
+
inherits: an,
|
|
350
|
+
toFlatObject: cn,
|
|
351
|
+
kindOf: ce,
|
|
352
|
+
kindOfTest: L,
|
|
353
|
+
endsWith: un,
|
|
354
|
+
toArray: ln,
|
|
355
|
+
forEachEntry: dn,
|
|
356
|
+
matchAll: pn,
|
|
357
|
+
isHTMLForm: hn,
|
|
358
|
+
hasOwnProperty: De,
|
|
359
|
+
hasOwnProp: De,
|
|
365
360
|
// an alias to avoid ESLint no-prototype-builtins detection
|
|
366
|
-
reduceDescriptors:
|
|
367
|
-
freezeMethods:
|
|
368
|
-
toObjectSet:
|
|
369
|
-
toCamelCase:
|
|
370
|
-
noop:
|
|
371
|
-
toFiniteNumber:
|
|
372
|
-
findKey:
|
|
373
|
-
global:
|
|
374
|
-
isContextDefined:
|
|
375
|
-
isSpecCompliantForm:
|
|
376
|
-
toJSONObject:
|
|
377
|
-
isAsyncFn:
|
|
378
|
-
isThenable:
|
|
379
|
-
setImmediate:
|
|
380
|
-
asap:
|
|
381
|
-
isIterable:
|
|
361
|
+
reduceDescriptors: ct,
|
|
362
|
+
freezeMethods: En,
|
|
363
|
+
toObjectSet: gn,
|
|
364
|
+
toCamelCase: mn,
|
|
365
|
+
noop: bn,
|
|
366
|
+
toFiniteNumber: wn,
|
|
367
|
+
findKey: it,
|
|
368
|
+
global: B,
|
|
369
|
+
isContextDefined: at,
|
|
370
|
+
isSpecCompliantForm: Sn,
|
|
371
|
+
toJSONObject: Rn,
|
|
372
|
+
isAsyncFn: On,
|
|
373
|
+
isThenable: Tn,
|
|
374
|
+
setImmediate: ut,
|
|
375
|
+
asap: An,
|
|
376
|
+
isIterable: Cn
|
|
382
377
|
};
|
|
383
|
-
function
|
|
384
|
-
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),
|
|
378
|
+
function g(e, t, n, r, s) {
|
|
379
|
+
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);
|
|
385
380
|
}
|
|
386
|
-
|
|
381
|
+
u.inherits(g, Error, {
|
|
387
382
|
toJSON: function() {
|
|
388
383
|
return {
|
|
389
384
|
// Standard
|
|
@@ -398,13 +393,13 @@ l.inherits(R, Error, {
|
|
|
398
393
|
columnNumber: this.columnNumber,
|
|
399
394
|
stack: this.stack,
|
|
400
395
|
// Axios
|
|
401
|
-
config:
|
|
396
|
+
config: u.toJSONObject(this.config),
|
|
402
397
|
code: this.code,
|
|
403
398
|
status: this.status
|
|
404
399
|
};
|
|
405
400
|
}
|
|
406
401
|
});
|
|
407
|
-
const
|
|
402
|
+
const lt = g.prototype, ft = {};
|
|
408
403
|
[
|
|
409
404
|
"ERR_BAD_OPTION_VALUE",
|
|
410
405
|
"ERR_BAD_OPTION",
|
|
@@ -420,100 +415,100 @@ const Ar = R.prototype, xr = {};
|
|
|
420
415
|
"ERR_INVALID_URL"
|
|
421
416
|
// eslint-disable-next-line func-names
|
|
422
417
|
].forEach((e) => {
|
|
423
|
-
|
|
418
|
+
ft[e] = { value: e };
|
|
424
419
|
});
|
|
425
|
-
Object.defineProperties(
|
|
426
|
-
Object.defineProperty(
|
|
427
|
-
|
|
428
|
-
const i = Object.create(
|
|
429
|
-
|
|
430
|
-
return
|
|
431
|
-
}, (
|
|
432
|
-
const
|
|
433
|
-
return
|
|
420
|
+
Object.defineProperties(g, ft);
|
|
421
|
+
Object.defineProperty(lt, "isAxiosError", { value: !0 });
|
|
422
|
+
g.from = (e, t, n, r, s, o) => {
|
|
423
|
+
const i = Object.create(lt);
|
|
424
|
+
u.toFlatObject(e, i, function(a) {
|
|
425
|
+
return a !== Error.prototype;
|
|
426
|
+
}, (l) => l !== "isAxiosError");
|
|
427
|
+
const c = e && e.message ? e.message : "Error", f = t == null && e ? e.code : t;
|
|
428
|
+
return g.call(i, c, f, n, r, s), e && i.cause == null && Object.defineProperty(i, "cause", { value: e, configurable: !0 }), i.name = e && e.name || "Error", o && Object.assign(i, o), i;
|
|
434
429
|
};
|
|
435
|
-
const
|
|
436
|
-
function
|
|
437
|
-
return
|
|
430
|
+
const xn = null;
|
|
431
|
+
function be(e) {
|
|
432
|
+
return u.isPlainObject(e) || u.isArray(e);
|
|
438
433
|
}
|
|
439
|
-
function
|
|
440
|
-
return
|
|
434
|
+
function dt(e) {
|
|
435
|
+
return u.endsWith(e, "[]") ? e.slice(0, -2) : e;
|
|
441
436
|
}
|
|
442
|
-
function
|
|
437
|
+
function _e(e, t, n) {
|
|
443
438
|
return e ? e.concat(t).map(function(s, o) {
|
|
444
|
-
return s =
|
|
445
|
-
}).join(
|
|
439
|
+
return s = dt(s), !n && o ? "[" + s + "]" : s;
|
|
440
|
+
}).join(n ? "." : "") : t;
|
|
446
441
|
}
|
|
447
|
-
function
|
|
448
|
-
return
|
|
442
|
+
function Pn(e) {
|
|
443
|
+
return u.isArray(e) && !e.some(be);
|
|
449
444
|
}
|
|
450
|
-
const
|
|
445
|
+
const vn = u.toFlatObject(u, {}, null, function(t) {
|
|
451
446
|
return /^is[A-Z]/.test(t);
|
|
452
447
|
});
|
|
453
|
-
function
|
|
454
|
-
if (!
|
|
448
|
+
function le(e, t, n) {
|
|
449
|
+
if (!u.isObject(e))
|
|
455
450
|
throw new TypeError("target must be an object");
|
|
456
|
-
t = t || new FormData(),
|
|
451
|
+
t = t || new FormData(), n = u.toFlatObject(n, {
|
|
457
452
|
metaTokens: !0,
|
|
458
453
|
dots: !1,
|
|
459
454
|
indexes: !1
|
|
460
|
-
}, !1, function(
|
|
461
|
-
return !
|
|
455
|
+
}, !1, function(m, h) {
|
|
456
|
+
return !u.isUndefined(h[m]);
|
|
462
457
|
});
|
|
463
|
-
const
|
|
464
|
-
if (!
|
|
458
|
+
const r = n.metaTokens, s = n.visitor || a, o = n.dots, i = n.indexes, f = (n.Blob || typeof Blob < "u" && Blob) && u.isSpecCompliantForm(t);
|
|
459
|
+
if (!u.isFunction(s))
|
|
465
460
|
throw new TypeError("visitor must be a function");
|
|
466
|
-
function
|
|
467
|
-
if (
|
|
468
|
-
if (
|
|
469
|
-
return
|
|
470
|
-
if (
|
|
471
|
-
return
|
|
472
|
-
if (!f &&
|
|
473
|
-
throw new
|
|
474
|
-
return
|
|
475
|
-
}
|
|
476
|
-
function
|
|
477
|
-
let E =
|
|
478
|
-
if (
|
|
479
|
-
if (
|
|
480
|
-
|
|
481
|
-
else if (
|
|
482
|
-
return
|
|
483
|
-
!(
|
|
461
|
+
function l(d) {
|
|
462
|
+
if (d === null) return "";
|
|
463
|
+
if (u.isDate(d))
|
|
464
|
+
return d.toISOString();
|
|
465
|
+
if (u.isBoolean(d))
|
|
466
|
+
return d.toString();
|
|
467
|
+
if (!f && u.isBlob(d))
|
|
468
|
+
throw new g("Blob is not supported. Use a Buffer instead.");
|
|
469
|
+
return u.isArrayBuffer(d) || u.isTypedArray(d) ? f && typeof Blob == "function" ? new Blob([d]) : Buffer.from(d) : d;
|
|
470
|
+
}
|
|
471
|
+
function a(d, m, h) {
|
|
472
|
+
let E = d;
|
|
473
|
+
if (d && !h && typeof d == "object") {
|
|
474
|
+
if (u.endsWith(m, "{}"))
|
|
475
|
+
m = r ? m : m.slice(0, -2), d = JSON.stringify(d);
|
|
476
|
+
else if (u.isArray(d) && Pn(d) || (u.isFileList(d) || u.endsWith(m, "[]")) && (E = u.toArray(d)))
|
|
477
|
+
return m = dt(m), E.forEach(function(S, O) {
|
|
478
|
+
!(u.isUndefined(S) || S === null) && t.append(
|
|
484
479
|
// eslint-disable-next-line no-nested-ternary
|
|
485
|
-
i === !0 ?
|
|
486
|
-
|
|
480
|
+
i === !0 ? _e([m], O, o) : i === null ? m : m + "[]",
|
|
481
|
+
l(S)
|
|
487
482
|
);
|
|
488
483
|
}), !1;
|
|
489
484
|
}
|
|
490
|
-
return
|
|
485
|
+
return be(d) ? !0 : (t.append(_e(h, m, o), l(d)), !1);
|
|
491
486
|
}
|
|
492
|
-
const
|
|
493
|
-
defaultVisitor:
|
|
494
|
-
convertValue:
|
|
495
|
-
isVisitable:
|
|
487
|
+
const p = [], y = Object.assign(vn, {
|
|
488
|
+
defaultVisitor: a,
|
|
489
|
+
convertValue: l,
|
|
490
|
+
isVisitable: be
|
|
496
491
|
});
|
|
497
|
-
function
|
|
498
|
-
if (!
|
|
499
|
-
if (
|
|
500
|
-
throw Error("Circular reference detected in " +
|
|
501
|
-
|
|
502
|
-
(!(
|
|
492
|
+
function w(d, m) {
|
|
493
|
+
if (!u.isUndefined(d)) {
|
|
494
|
+
if (p.indexOf(d) !== -1)
|
|
495
|
+
throw Error("Circular reference detected in " + m.join("."));
|
|
496
|
+
p.push(d), u.forEach(d, function(E, b) {
|
|
497
|
+
(!(u.isUndefined(E) || E === null) && s.call(
|
|
503
498
|
t,
|
|
504
499
|
E,
|
|
505
|
-
|
|
506
|
-
|
|
500
|
+
u.isString(b) ? b.trim() : b,
|
|
501
|
+
m,
|
|
507
502
|
y
|
|
508
|
-
)) === !0 &&
|
|
509
|
-
}),
|
|
503
|
+
)) === !0 && w(E, m ? m.concat(b) : [b]);
|
|
504
|
+
}), p.pop();
|
|
510
505
|
}
|
|
511
506
|
}
|
|
512
|
-
if (!
|
|
507
|
+
if (!u.isObject(e))
|
|
513
508
|
throw new TypeError("data must be an object");
|
|
514
|
-
return
|
|
509
|
+
return w(e), t;
|
|
515
510
|
}
|
|
516
|
-
function
|
|
511
|
+
function Be(e) {
|
|
517
512
|
const t = {
|
|
518
513
|
"!": "%21",
|
|
519
514
|
"'": "%27",
|
|
@@ -523,44 +518,44 @@ function qt(e) {
|
|
|
523
518
|
"%20": "+",
|
|
524
519
|
"%00": "\0"
|
|
525
520
|
};
|
|
526
|
-
return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g, function(
|
|
527
|
-
return t[
|
|
521
|
+
return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g, function(r) {
|
|
522
|
+
return t[r];
|
|
528
523
|
});
|
|
529
524
|
}
|
|
530
|
-
function
|
|
531
|
-
this._pairs = [], e &&
|
|
525
|
+
function Oe(e, t) {
|
|
526
|
+
this._pairs = [], e && le(e, this, t);
|
|
532
527
|
}
|
|
533
|
-
const
|
|
534
|
-
|
|
535
|
-
this._pairs.push([t,
|
|
528
|
+
const pt = Oe.prototype;
|
|
529
|
+
pt.append = function(t, n) {
|
|
530
|
+
this._pairs.push([t, n]);
|
|
536
531
|
};
|
|
537
|
-
|
|
538
|
-
const
|
|
539
|
-
return t.call(this,
|
|
540
|
-
} :
|
|
532
|
+
pt.toString = function(t) {
|
|
533
|
+
const n = t ? function(r) {
|
|
534
|
+
return t.call(this, r, Be);
|
|
535
|
+
} : Be;
|
|
541
536
|
return this._pairs.map(function(s) {
|
|
542
|
-
return
|
|
537
|
+
return n(s[0]) + "=" + n(s[1]);
|
|
543
538
|
}, "").join("&");
|
|
544
539
|
};
|
|
545
|
-
function
|
|
540
|
+
function Ln(e) {
|
|
546
541
|
return encodeURIComponent(e).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+");
|
|
547
542
|
}
|
|
548
|
-
function
|
|
543
|
+
function ht(e, t, n) {
|
|
549
544
|
if (!t)
|
|
550
545
|
return e;
|
|
551
|
-
const
|
|
552
|
-
|
|
553
|
-
serialize:
|
|
546
|
+
const r = n && n.encode || Ln;
|
|
547
|
+
u.isFunction(n) && (n = {
|
|
548
|
+
serialize: n
|
|
554
549
|
});
|
|
555
|
-
const s =
|
|
550
|
+
const s = n && n.serialize;
|
|
556
551
|
let o;
|
|
557
|
-
if (s ? o = s(t,
|
|
552
|
+
if (s ? o = s(t, n) : o = u.isURLSearchParams(t) ? t.toString() : new Oe(t, n).toString(r), o) {
|
|
558
553
|
const i = e.indexOf("#");
|
|
559
554
|
i !== -1 && (e = e.slice(0, i)), e += (e.indexOf("?") === -1 ? "?" : "&") + o;
|
|
560
555
|
}
|
|
561
556
|
return e;
|
|
562
557
|
}
|
|
563
|
-
class
|
|
558
|
+
class Me {
|
|
564
559
|
constructor() {
|
|
565
560
|
this.handlers = [];
|
|
566
561
|
}
|
|
@@ -572,12 +567,12 @@ class Ht {
|
|
|
572
567
|
*
|
|
573
568
|
* @return {Number} An ID used to remove interceptor later
|
|
574
569
|
*/
|
|
575
|
-
use(t,
|
|
570
|
+
use(t, n, r) {
|
|
576
571
|
return this.handlers.push({
|
|
577
572
|
fulfilled: t,
|
|
578
|
-
rejected:
|
|
579
|
-
synchronous:
|
|
580
|
-
runWhen:
|
|
573
|
+
rejected: n,
|
|
574
|
+
synchronous: r ? r.synchronous : !1,
|
|
575
|
+
runWhen: r ? r.runWhen : null
|
|
581
576
|
}), this.handlers.length - 1;
|
|
582
577
|
}
|
|
583
578
|
/**
|
|
@@ -609,119 +604,119 @@ class Ht {
|
|
|
609
604
|
* @returns {void}
|
|
610
605
|
*/
|
|
611
606
|
forEach(t) {
|
|
612
|
-
|
|
613
|
-
|
|
607
|
+
u.forEach(this.handlers, function(r) {
|
|
608
|
+
r !== null && t(r);
|
|
614
609
|
});
|
|
615
610
|
}
|
|
616
611
|
}
|
|
617
|
-
const
|
|
612
|
+
const mt = {
|
|
618
613
|
silentJSONParsing: !0,
|
|
619
614
|
forcedJSONParsing: !0,
|
|
620
615
|
clarifyTimeoutError: !1
|
|
621
|
-
},
|
|
616
|
+
}, Nn = typeof URLSearchParams < "u" ? URLSearchParams : Oe, Fn = typeof FormData < "u" ? FormData : null, Un = typeof Blob < "u" ? Blob : null, kn = {
|
|
622
617
|
isBrowser: !0,
|
|
623
618
|
classes: {
|
|
624
|
-
URLSearchParams:
|
|
625
|
-
FormData:
|
|
626
|
-
Blob:
|
|
619
|
+
URLSearchParams: Nn,
|
|
620
|
+
FormData: Fn,
|
|
621
|
+
Blob: Un
|
|
627
622
|
},
|
|
628
623
|
protocols: ["http", "https", "file", "blob", "url", "data"]
|
|
629
|
-
},
|
|
630
|
-
self instanceof WorkerGlobalScope && typeof self.importScripts == "function",
|
|
624
|
+
}, Te = typeof window < "u" && typeof document < "u", we = typeof navigator == "object" && navigator || void 0, Dn = Te && (!we || ["ReactNative", "NativeScript", "NS"].indexOf(we.product) < 0), _n = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
|
|
625
|
+
self instanceof WorkerGlobalScope && typeof self.importScripts == "function", Bn = Te && window.location.href || "http://localhost", Mn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
631
626
|
__proto__: null,
|
|
632
|
-
hasBrowserEnv:
|
|
633
|
-
hasStandardBrowserEnv:
|
|
634
|
-
hasStandardBrowserWebWorkerEnv:
|
|
635
|
-
navigator:
|
|
636
|
-
origin:
|
|
637
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
638
|
-
...
|
|
639
|
-
...
|
|
627
|
+
hasBrowserEnv: Te,
|
|
628
|
+
hasStandardBrowserEnv: Dn,
|
|
629
|
+
hasStandardBrowserWebWorkerEnv: _n,
|
|
630
|
+
navigator: we,
|
|
631
|
+
origin: Bn
|
|
632
|
+
}, Symbol.toStringTag, { value: "Module" })), C = {
|
|
633
|
+
...Mn,
|
|
634
|
+
...kn
|
|
640
635
|
};
|
|
641
|
-
function
|
|
642
|
-
return
|
|
643
|
-
visitor: function(
|
|
644
|
-
return
|
|
636
|
+
function Hn(e, t) {
|
|
637
|
+
return le(e, new C.classes.URLSearchParams(), {
|
|
638
|
+
visitor: function(n, r, s, o) {
|
|
639
|
+
return C.isNode && u.isBuffer(n) ? (this.append(r, n.toString("base64")), !1) : o.defaultVisitor.apply(this, arguments);
|
|
645
640
|
},
|
|
646
641
|
...t
|
|
647
642
|
});
|
|
648
643
|
}
|
|
649
|
-
function
|
|
650
|
-
return
|
|
644
|
+
function jn(e) {
|
|
645
|
+
return u.matchAll(/\w+|\[(\w*)]/g, e).map((t) => t[0] === "[]" ? "" : t[1] || t[0]);
|
|
651
646
|
}
|
|
652
|
-
function
|
|
653
|
-
const t = {},
|
|
654
|
-
let
|
|
655
|
-
const s =
|
|
647
|
+
function qn(e) {
|
|
648
|
+
const t = {}, n = Object.keys(e);
|
|
649
|
+
let r;
|
|
650
|
+
const s = n.length;
|
|
656
651
|
let o;
|
|
657
|
-
for (
|
|
658
|
-
o = r
|
|
652
|
+
for (r = 0; r < s; r++)
|
|
653
|
+
o = n[r], t[o] = e[o];
|
|
659
654
|
return t;
|
|
660
655
|
}
|
|
661
|
-
function
|
|
662
|
-
function t(
|
|
663
|
-
let i =
|
|
656
|
+
function yt(e) {
|
|
657
|
+
function t(n, r, s, o) {
|
|
658
|
+
let i = n[o++];
|
|
664
659
|
if (i === "__proto__") return !0;
|
|
665
|
-
const
|
|
666
|
-
return i = !i &&
|
|
660
|
+
const c = Number.isFinite(+i), f = o >= n.length;
|
|
661
|
+
return i = !i && u.isArray(s) ? s.length : i, f ? (u.hasOwnProp(s, i) ? s[i] = [s[i], r] : s[i] = r, !c) : ((!s[i] || !u.isObject(s[i])) && (s[i] = []), t(n, r, s[i], o) && u.isArray(s[i]) && (s[i] = qn(s[i])), !c);
|
|
667
662
|
}
|
|
668
|
-
if (
|
|
669
|
-
const
|
|
670
|
-
return
|
|
671
|
-
t(
|
|
672
|
-
}),
|
|
663
|
+
if (u.isFormData(e) && u.isFunction(e.entries)) {
|
|
664
|
+
const n = {};
|
|
665
|
+
return u.forEachEntry(e, (r, s) => {
|
|
666
|
+
t(jn(r), s, n, 0);
|
|
667
|
+
}), n;
|
|
673
668
|
}
|
|
674
669
|
return null;
|
|
675
670
|
}
|
|
676
|
-
function
|
|
677
|
-
if (
|
|
671
|
+
function In(e, t, n) {
|
|
672
|
+
if (u.isString(e))
|
|
678
673
|
try {
|
|
679
|
-
return (t || JSON.parse)(e),
|
|
680
|
-
} catch (
|
|
681
|
-
if (
|
|
682
|
-
throw
|
|
674
|
+
return (t || JSON.parse)(e), u.trim(e);
|
|
675
|
+
} catch (r) {
|
|
676
|
+
if (r.name !== "SyntaxError")
|
|
677
|
+
throw r;
|
|
683
678
|
}
|
|
684
|
-
return (
|
|
679
|
+
return (n || JSON.stringify)(e);
|
|
685
680
|
}
|
|
686
|
-
const
|
|
687
|
-
transitional:
|
|
681
|
+
const X = {
|
|
682
|
+
transitional: mt,
|
|
688
683
|
adapter: ["xhr", "http", "fetch"],
|
|
689
|
-
transformRequest: [function(t,
|
|
690
|
-
const
|
|
691
|
-
if (o &&
|
|
692
|
-
return s ? JSON.stringify(
|
|
693
|
-
if (
|
|
684
|
+
transformRequest: [function(t, n) {
|
|
685
|
+
const r = n.getContentType() || "", s = r.indexOf("application/json") > -1, o = u.isObject(t);
|
|
686
|
+
if (o && u.isHTMLForm(t) && (t = new FormData(t)), u.isFormData(t))
|
|
687
|
+
return s ? JSON.stringify(yt(t)) : t;
|
|
688
|
+
if (u.isArrayBuffer(t) || u.isBuffer(t) || u.isStream(t) || u.isFile(t) || u.isBlob(t) || u.isReadableStream(t))
|
|
694
689
|
return t;
|
|
695
|
-
if (
|
|
690
|
+
if (u.isArrayBufferView(t))
|
|
696
691
|
return t.buffer;
|
|
697
|
-
if (
|
|
698
|
-
return
|
|
699
|
-
let
|
|
692
|
+
if (u.isURLSearchParams(t))
|
|
693
|
+
return n.setContentType("application/x-www-form-urlencoded;charset=utf-8", !1), t.toString();
|
|
694
|
+
let c;
|
|
700
695
|
if (o) {
|
|
701
|
-
if (
|
|
702
|
-
return
|
|
703
|
-
if ((
|
|
696
|
+
if (r.indexOf("application/x-www-form-urlencoded") > -1)
|
|
697
|
+
return Hn(t, this.formSerializer).toString();
|
|
698
|
+
if ((c = u.isFileList(t)) || r.indexOf("multipart/form-data") > -1) {
|
|
704
699
|
const f = this.env && this.env.FormData;
|
|
705
|
-
return
|
|
706
|
-
|
|
700
|
+
return le(
|
|
701
|
+
c ? { "files[]": t } : t,
|
|
707
702
|
f && new f(),
|
|
708
703
|
this.formSerializer
|
|
709
704
|
);
|
|
710
705
|
}
|
|
711
706
|
}
|
|
712
|
-
return o || s ? (
|
|
707
|
+
return o || s ? (n.setContentType("application/json", !1), In(t)) : t;
|
|
713
708
|
}],
|
|
714
709
|
transformResponse: [function(t) {
|
|
715
|
-
const
|
|
716
|
-
if (
|
|
710
|
+
const n = this.transitional || X.transitional, r = n && n.forcedJSONParsing, s = this.responseType === "json";
|
|
711
|
+
if (u.isResponse(t) || u.isReadableStream(t))
|
|
717
712
|
return t;
|
|
718
|
-
if (t &&
|
|
719
|
-
const i = !(
|
|
713
|
+
if (t && u.isString(t) && (r && !this.responseType || s)) {
|
|
714
|
+
const i = !(n && n.silentJSONParsing) && s;
|
|
720
715
|
try {
|
|
721
716
|
return JSON.parse(t, this.parseReviver);
|
|
722
|
-
} catch (
|
|
717
|
+
} catch (c) {
|
|
723
718
|
if (i)
|
|
724
|
-
throw
|
|
719
|
+
throw c.name === "SyntaxError" ? g.from(c, g.ERR_BAD_RESPONSE, this, null, this.response) : c;
|
|
725
720
|
}
|
|
726
721
|
}
|
|
727
722
|
return t;
|
|
@@ -736,8 +731,8 @@ const Be = {
|
|
|
736
731
|
maxContentLength: -1,
|
|
737
732
|
maxBodyLength: -1,
|
|
738
733
|
env: {
|
|
739
|
-
FormData:
|
|
740
|
-
Blob:
|
|
734
|
+
FormData: C.classes.FormData,
|
|
735
|
+
Blob: C.classes.Blob
|
|
741
736
|
},
|
|
742
737
|
validateStatus: function(t) {
|
|
743
738
|
return t >= 200 && t < 300;
|
|
@@ -749,10 +744,10 @@ const Be = {
|
|
|
749
744
|
}
|
|
750
745
|
}
|
|
751
746
|
};
|
|
752
|
-
|
|
753
|
-
|
|
747
|
+
u.forEach(["delete", "get", "head", "post", "put", "patch"], (e) => {
|
|
748
|
+
X.headers[e] = {};
|
|
754
749
|
});
|
|
755
|
-
const
|
|
750
|
+
const $n = u.toObjectSet([
|
|
756
751
|
"age",
|
|
757
752
|
"authorization",
|
|
758
753
|
"content-length",
|
|
@@ -770,152 +765,152 @@ const as = l.toObjectSet([
|
|
|
770
765
|
"referer",
|
|
771
766
|
"retry-after",
|
|
772
767
|
"user-agent"
|
|
773
|
-
]),
|
|
768
|
+
]), zn = (e) => {
|
|
774
769
|
const t = {};
|
|
775
|
-
let
|
|
770
|
+
let n, r, s;
|
|
776
771
|
return e && e.split(`
|
|
777
772
|
`).forEach(function(i) {
|
|
778
|
-
s = i.indexOf(":"),
|
|
773
|
+
s = i.indexOf(":"), n = i.substring(0, s).trim().toLowerCase(), r = i.substring(s + 1).trim(), !(!n || t[n] && $n[n]) && (n === "set-cookie" ? t[n] ? t[n].push(r) : t[n] = [r] : t[n] = t[n] ? t[n] + ", " + r : r);
|
|
779
774
|
}), t;
|
|
780
|
-
},
|
|
781
|
-
function
|
|
775
|
+
}, He = Symbol("internals");
|
|
776
|
+
function K(e) {
|
|
782
777
|
return e && String(e).trim().toLowerCase();
|
|
783
778
|
}
|
|
784
|
-
function
|
|
785
|
-
return e === !1 || e == null ? e :
|
|
779
|
+
function re(e) {
|
|
780
|
+
return e === !1 || e == null ? e : u.isArray(e) ? e.map(re) : String(e);
|
|
786
781
|
}
|
|
787
|
-
function
|
|
788
|
-
const t = /* @__PURE__ */ Object.create(null),
|
|
789
|
-
let
|
|
790
|
-
for (;
|
|
791
|
-
t[
|
|
782
|
+
function Jn(e) {
|
|
783
|
+
const t = /* @__PURE__ */ Object.create(null), n = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
|
|
784
|
+
let r;
|
|
785
|
+
for (; r = n.exec(e); )
|
|
786
|
+
t[r[1]] = r[2];
|
|
792
787
|
return t;
|
|
793
788
|
}
|
|
794
|
-
const
|
|
795
|
-
function
|
|
796
|
-
if (
|
|
797
|
-
return
|
|
798
|
-
if (s && (t =
|
|
799
|
-
if (
|
|
800
|
-
return t.indexOf(
|
|
801
|
-
if (
|
|
802
|
-
return
|
|
789
|
+
const Kn = (e) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());
|
|
790
|
+
function me(e, t, n, r, s) {
|
|
791
|
+
if (u.isFunction(r))
|
|
792
|
+
return r.call(this, t, n);
|
|
793
|
+
if (s && (t = n), !!u.isString(t)) {
|
|
794
|
+
if (u.isString(r))
|
|
795
|
+
return t.indexOf(r) !== -1;
|
|
796
|
+
if (u.isRegExp(r))
|
|
797
|
+
return r.test(t);
|
|
803
798
|
}
|
|
804
799
|
}
|
|
805
|
-
function
|
|
806
|
-
return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (t,
|
|
800
|
+
function Wn(e) {
|
|
801
|
+
return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (t, n, r) => n.toUpperCase() + r);
|
|
807
802
|
}
|
|
808
|
-
function
|
|
809
|
-
const
|
|
810
|
-
["get", "set", "has"].forEach((
|
|
811
|
-
Object.defineProperty(e,
|
|
803
|
+
function Vn(e, t) {
|
|
804
|
+
const n = u.toCamelCase(" " + t);
|
|
805
|
+
["get", "set", "has"].forEach((r) => {
|
|
806
|
+
Object.defineProperty(e, r + n, {
|
|
812
807
|
value: function(s, o, i) {
|
|
813
|
-
return this[
|
|
808
|
+
return this[r].call(this, t, s, o, i);
|
|
814
809
|
},
|
|
815
810
|
configurable: !0
|
|
816
811
|
});
|
|
817
812
|
});
|
|
818
813
|
}
|
|
819
|
-
let
|
|
814
|
+
let P = class {
|
|
820
815
|
constructor(t) {
|
|
821
816
|
t && this.set(t);
|
|
822
817
|
}
|
|
823
|
-
set(t,
|
|
818
|
+
set(t, n, r) {
|
|
824
819
|
const s = this;
|
|
825
|
-
function o(
|
|
826
|
-
const
|
|
827
|
-
if (!
|
|
820
|
+
function o(c, f, l) {
|
|
821
|
+
const a = K(f);
|
|
822
|
+
if (!a)
|
|
828
823
|
throw new Error("header name must be a non-empty string");
|
|
829
|
-
const
|
|
830
|
-
(!
|
|
824
|
+
const p = u.findKey(s, a);
|
|
825
|
+
(!p || s[p] === void 0 || l === !0 || l === void 0 && s[p] !== !1) && (s[p || f] = re(c));
|
|
831
826
|
}
|
|
832
|
-
const i = (
|
|
833
|
-
if (
|
|
834
|
-
i(t,
|
|
835
|
-
else if (
|
|
836
|
-
i(
|
|
837
|
-
else if (
|
|
838
|
-
let
|
|
839
|
-
for (const
|
|
840
|
-
if (!
|
|
827
|
+
const i = (c, f) => u.forEach(c, (l, a) => o(l, a, f));
|
|
828
|
+
if (u.isPlainObject(t) || t instanceof this.constructor)
|
|
829
|
+
i(t, n);
|
|
830
|
+
else if (u.isString(t) && (t = t.trim()) && !Kn(t))
|
|
831
|
+
i(zn(t), n);
|
|
832
|
+
else if (u.isObject(t) && u.isIterable(t)) {
|
|
833
|
+
let c = {}, f, l;
|
|
834
|
+
for (const a of t) {
|
|
835
|
+
if (!u.isArray(a))
|
|
841
836
|
throw TypeError("Object iterator must return a key-value pair");
|
|
842
|
-
|
|
837
|
+
c[l = a[0]] = (f = c[l]) ? u.isArray(f) ? [...f, a[1]] : [f, a[1]] : a[1];
|
|
843
838
|
}
|
|
844
|
-
i(
|
|
839
|
+
i(c, n);
|
|
845
840
|
} else
|
|
846
|
-
t != null && o(
|
|
841
|
+
t != null && o(n, t, r);
|
|
847
842
|
return this;
|
|
848
843
|
}
|
|
849
|
-
get(t,
|
|
850
|
-
if (t =
|
|
851
|
-
const
|
|
852
|
-
if (
|
|
853
|
-
const s = this[
|
|
854
|
-
if (!
|
|
844
|
+
get(t, n) {
|
|
845
|
+
if (t = K(t), t) {
|
|
846
|
+
const r = u.findKey(this, t);
|
|
847
|
+
if (r) {
|
|
848
|
+
const s = this[r];
|
|
849
|
+
if (!n)
|
|
855
850
|
return s;
|
|
856
|
-
if (
|
|
857
|
-
return
|
|
858
|
-
if (
|
|
859
|
-
return
|
|
860
|
-
if (
|
|
861
|
-
return
|
|
851
|
+
if (n === !0)
|
|
852
|
+
return Jn(s);
|
|
853
|
+
if (u.isFunction(n))
|
|
854
|
+
return n.call(this, s, r);
|
|
855
|
+
if (u.isRegExp(n))
|
|
856
|
+
return n.exec(s);
|
|
862
857
|
throw new TypeError("parser must be boolean|regexp|function");
|
|
863
858
|
}
|
|
864
859
|
}
|
|
865
860
|
}
|
|
866
|
-
has(t,
|
|
867
|
-
if (t =
|
|
868
|
-
const
|
|
869
|
-
return !!(
|
|
861
|
+
has(t, n) {
|
|
862
|
+
if (t = K(t), t) {
|
|
863
|
+
const r = u.findKey(this, t);
|
|
864
|
+
return !!(r && this[r] !== void 0 && (!n || me(this, this[r], r, n)));
|
|
870
865
|
}
|
|
871
866
|
return !1;
|
|
872
867
|
}
|
|
873
|
-
delete(t,
|
|
874
|
-
const
|
|
868
|
+
delete(t, n) {
|
|
869
|
+
const r = this;
|
|
875
870
|
let s = !1;
|
|
876
871
|
function o(i) {
|
|
877
|
-
if (i =
|
|
878
|
-
const
|
|
879
|
-
|
|
872
|
+
if (i = K(i), i) {
|
|
873
|
+
const c = u.findKey(r, i);
|
|
874
|
+
c && (!n || me(r, r[c], c, n)) && (delete r[c], s = !0);
|
|
880
875
|
}
|
|
881
876
|
}
|
|
882
|
-
return
|
|
877
|
+
return u.isArray(t) ? t.forEach(o) : o(t), s;
|
|
883
878
|
}
|
|
884
879
|
clear(t) {
|
|
885
|
-
const
|
|
886
|
-
let
|
|
887
|
-
for (;
|
|
888
|
-
const o = r
|
|
889
|
-
(!t ||
|
|
880
|
+
const n = Object.keys(this);
|
|
881
|
+
let r = n.length, s = !1;
|
|
882
|
+
for (; r--; ) {
|
|
883
|
+
const o = n[r];
|
|
884
|
+
(!t || me(this, this[o], o, t, !0)) && (delete this[o], s = !0);
|
|
890
885
|
}
|
|
891
886
|
return s;
|
|
892
887
|
}
|
|
893
888
|
normalize(t) {
|
|
894
|
-
const
|
|
895
|
-
return
|
|
896
|
-
const i =
|
|
889
|
+
const n = this, r = {};
|
|
890
|
+
return u.forEach(this, (s, o) => {
|
|
891
|
+
const i = u.findKey(r, o);
|
|
897
892
|
if (i) {
|
|
898
|
-
|
|
893
|
+
n[i] = re(s), delete n[o];
|
|
899
894
|
return;
|
|
900
895
|
}
|
|
901
|
-
const
|
|
902
|
-
|
|
896
|
+
const c = t ? Wn(o) : String(o).trim();
|
|
897
|
+
c !== o && delete n[o], n[c] = re(s), r[c] = !0;
|
|
903
898
|
}), this;
|
|
904
899
|
}
|
|
905
900
|
concat(...t) {
|
|
906
901
|
return this.constructor.concat(this, ...t);
|
|
907
902
|
}
|
|
908
903
|
toJSON(t) {
|
|
909
|
-
const
|
|
910
|
-
return
|
|
911
|
-
|
|
912
|
-
}),
|
|
904
|
+
const n = /* @__PURE__ */ Object.create(null);
|
|
905
|
+
return u.forEach(this, (r, s) => {
|
|
906
|
+
r != null && r !== !1 && (n[s] = t && u.isArray(r) ? r.join(", ") : r);
|
|
907
|
+
}), n;
|
|
913
908
|
}
|
|
914
909
|
[Symbol.iterator]() {
|
|
915
910
|
return Object.entries(this.toJSON())[Symbol.iterator]();
|
|
916
911
|
}
|
|
917
912
|
toString() {
|
|
918
|
-
return Object.entries(this.toJSON()).map(([t,
|
|
913
|
+
return Object.entries(this.toJSON()).map(([t, n]) => t + ": " + n).join(`
|
|
919
914
|
`);
|
|
920
915
|
}
|
|
921
916
|
getSetCookie() {
|
|
@@ -927,126 +922,126 @@ let q = class {
|
|
|
927
922
|
static from(t) {
|
|
928
923
|
return t instanceof this ? t : new this(t);
|
|
929
924
|
}
|
|
930
|
-
static concat(t, ...
|
|
931
|
-
const
|
|
932
|
-
return
|
|
925
|
+
static concat(t, ...n) {
|
|
926
|
+
const r = new this(t);
|
|
927
|
+
return n.forEach((s) => r.set(s)), r;
|
|
933
928
|
}
|
|
934
929
|
static accessor(t) {
|
|
935
|
-
const
|
|
930
|
+
const r = (this[He] = this[He] = {
|
|
936
931
|
accessors: {}
|
|
937
932
|
}).accessors, s = this.prototype;
|
|
938
933
|
function o(i) {
|
|
939
|
-
const
|
|
940
|
-
|
|
934
|
+
const c = K(i);
|
|
935
|
+
r[c] || (Vn(s, i), r[c] = !0);
|
|
941
936
|
}
|
|
942
|
-
return
|
|
937
|
+
return u.isArray(t) ? t.forEach(o) : o(t), this;
|
|
943
938
|
}
|
|
944
939
|
};
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
let
|
|
940
|
+
P.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]);
|
|
941
|
+
u.reduceDescriptors(P.prototype, ({ value: e }, t) => {
|
|
942
|
+
let n = t[0].toUpperCase() + t.slice(1);
|
|
948
943
|
return {
|
|
949
944
|
get: () => e,
|
|
950
|
-
set(
|
|
951
|
-
this[
|
|
945
|
+
set(r) {
|
|
946
|
+
this[n] = r;
|
|
952
947
|
}
|
|
953
948
|
};
|
|
954
949
|
});
|
|
955
|
-
|
|
956
|
-
function
|
|
957
|
-
const
|
|
958
|
-
let o =
|
|
959
|
-
return
|
|
960
|
-
o =
|
|
950
|
+
u.freezeMethods(P);
|
|
951
|
+
function ye(e, t) {
|
|
952
|
+
const n = this || X, r = t || n, s = P.from(r.headers);
|
|
953
|
+
let o = r.data;
|
|
954
|
+
return u.forEach(e, function(c) {
|
|
955
|
+
o = c.call(n, o, s.normalize(), t ? t.status : void 0);
|
|
961
956
|
}), s.normalize(), o;
|
|
962
957
|
}
|
|
963
|
-
function
|
|
958
|
+
function Et(e) {
|
|
964
959
|
return !!(e && e.__CANCEL__);
|
|
965
960
|
}
|
|
966
|
-
function
|
|
967
|
-
|
|
961
|
+
function z(e, t, n) {
|
|
962
|
+
g.call(this, e ?? "canceled", g.ERR_CANCELED, t, n), this.name = "CanceledError";
|
|
968
963
|
}
|
|
969
|
-
|
|
964
|
+
u.inherits(z, g, {
|
|
970
965
|
__CANCEL__: !0
|
|
971
966
|
});
|
|
972
|
-
function
|
|
973
|
-
const
|
|
974
|
-
!
|
|
975
|
-
"Request failed with status code " +
|
|
976
|
-
[
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
967
|
+
function gt(e, t, n) {
|
|
968
|
+
const r = n.config.validateStatus;
|
|
969
|
+
!n.status || !r || r(n.status) ? e(n) : t(new g(
|
|
970
|
+
"Request failed with status code " + n.status,
|
|
971
|
+
[g.ERR_BAD_REQUEST, g.ERR_BAD_RESPONSE][Math.floor(n.status / 100) - 4],
|
|
972
|
+
n.config,
|
|
973
|
+
n.request,
|
|
974
|
+
n
|
|
980
975
|
));
|
|
981
976
|
}
|
|
982
|
-
function
|
|
977
|
+
function Gn(e) {
|
|
983
978
|
const t = /^([-+\w]{1,25})(:?\/\/|:)/.exec(e);
|
|
984
979
|
return t && t[1] || "";
|
|
985
980
|
}
|
|
986
|
-
function
|
|
981
|
+
function Qn(e, t) {
|
|
987
982
|
e = e || 10;
|
|
988
|
-
const
|
|
983
|
+
const n = new Array(e), r = new Array(e);
|
|
989
984
|
let s = 0, o = 0, i;
|
|
990
985
|
return t = t !== void 0 ? t : 1e3, function(f) {
|
|
991
|
-
const
|
|
992
|
-
i || (i =
|
|
993
|
-
let
|
|
994
|
-
for (;
|
|
995
|
-
y +=
|
|
996
|
-
if (s = (s + 1) % e, s === o && (o = (o + 1) % e),
|
|
986
|
+
const l = Date.now(), a = r[o];
|
|
987
|
+
i || (i = l), n[s] = f, r[s] = l;
|
|
988
|
+
let p = o, y = 0;
|
|
989
|
+
for (; p !== s; )
|
|
990
|
+
y += n[p++], p = p % e;
|
|
991
|
+
if (s = (s + 1) % e, s === o && (o = (o + 1) % e), l - i < t)
|
|
997
992
|
return;
|
|
998
|
-
const
|
|
999
|
-
return
|
|
993
|
+
const w = a && l - a;
|
|
994
|
+
return w ? Math.round(y * 1e3 / w) : void 0;
|
|
1000
995
|
};
|
|
1001
996
|
}
|
|
1002
|
-
function
|
|
1003
|
-
let
|
|
1004
|
-
const i = (
|
|
1005
|
-
|
|
997
|
+
function Xn(e, t) {
|
|
998
|
+
let n = 0, r = 1e3 / t, s, o;
|
|
999
|
+
const i = (l, a = Date.now()) => {
|
|
1000
|
+
n = a, s = null, o && (clearTimeout(o), o = null), e(...l);
|
|
1006
1001
|
};
|
|
1007
|
-
return [(...
|
|
1008
|
-
const
|
|
1009
|
-
|
|
1002
|
+
return [(...l) => {
|
|
1003
|
+
const a = Date.now(), p = a - n;
|
|
1004
|
+
p >= r ? i(l, a) : (s = l, o || (o = setTimeout(() => {
|
|
1010
1005
|
o = null, i(s);
|
|
1011
|
-
},
|
|
1006
|
+
}, r - p)));
|
|
1012
1007
|
}, () => s && i(s)];
|
|
1013
1008
|
}
|
|
1014
|
-
const
|
|
1015
|
-
let
|
|
1016
|
-
const s =
|
|
1017
|
-
return
|
|
1018
|
-
const i = o.loaded,
|
|
1019
|
-
|
|
1020
|
-
const
|
|
1009
|
+
const oe = (e, t, n = 3) => {
|
|
1010
|
+
let r = 0;
|
|
1011
|
+
const s = Qn(50, 250);
|
|
1012
|
+
return Xn((o) => {
|
|
1013
|
+
const i = o.loaded, c = o.lengthComputable ? o.total : void 0, f = i - r, l = s(f), a = i <= c;
|
|
1014
|
+
r = i;
|
|
1015
|
+
const p = {
|
|
1021
1016
|
loaded: i,
|
|
1022
|
-
total:
|
|
1023
|
-
progress:
|
|
1017
|
+
total: c,
|
|
1018
|
+
progress: c ? i / c : void 0,
|
|
1024
1019
|
bytes: f,
|
|
1025
|
-
rate:
|
|
1026
|
-
estimated:
|
|
1020
|
+
rate: l || void 0,
|
|
1021
|
+
estimated: l && c && a ? (c - i) / l : void 0,
|
|
1027
1022
|
event: o,
|
|
1028
|
-
lengthComputable:
|
|
1023
|
+
lengthComputable: c != null,
|
|
1029
1024
|
[t ? "download" : "upload"]: !0
|
|
1030
1025
|
};
|
|
1031
|
-
e(
|
|
1032
|
-
},
|
|
1033
|
-
},
|
|
1034
|
-
const
|
|
1035
|
-
return [(
|
|
1036
|
-
lengthComputable:
|
|
1026
|
+
e(p);
|
|
1027
|
+
}, n);
|
|
1028
|
+
}, je = (e, t) => {
|
|
1029
|
+
const n = e != null;
|
|
1030
|
+
return [(r) => t[0]({
|
|
1031
|
+
lengthComputable: n,
|
|
1037
1032
|
total: e,
|
|
1038
|
-
loaded:
|
|
1033
|
+
loaded: r
|
|
1039
1034
|
}), t[1]];
|
|
1040
|
-
},
|
|
1041
|
-
new URL(
|
|
1042
|
-
|
|
1043
|
-
) : () => !0,
|
|
1035
|
+
}, qe = (e) => (...t) => u.asap(() => e(...t)), Zn = C.hasStandardBrowserEnv ? /* @__PURE__ */ ((e, t) => (n) => (n = new URL(n, C.origin), e.protocol === n.protocol && e.host === n.host && (t || e.port === n.port)))(
|
|
1036
|
+
new URL(C.origin),
|
|
1037
|
+
C.navigator && /(msie|trident)/i.test(C.navigator.userAgent)
|
|
1038
|
+
) : () => !0, Yn = C.hasStandardBrowserEnv ? (
|
|
1044
1039
|
// Standard browser envs support document.cookie
|
|
1045
1040
|
{
|
|
1046
|
-
write(e, t,
|
|
1041
|
+
write(e, t, n, r, s, o, i) {
|
|
1047
1042
|
if (typeof document > "u") return;
|
|
1048
|
-
const
|
|
1049
|
-
|
|
1043
|
+
const c = [`${e}=${encodeURIComponent(t)}`];
|
|
1044
|
+
u.isNumber(n) && c.push(`expires=${new Date(n).toUTCString()}`), u.isString(r) && c.push(`path=${r}`), u.isString(s) && c.push(`domain=${s}`), o === !0 && c.push("secure"), u.isString(i) && c.push(`SameSite=${i}`), document.cookie = c.join("; ");
|
|
1050
1045
|
},
|
|
1051
1046
|
read(e) {
|
|
1052
1047
|
if (typeof document > "u") return null;
|
|
@@ -1069,44 +1064,44 @@ const Qe = (e, t, r = 3) => {
|
|
|
1069
1064
|
}
|
|
1070
1065
|
}
|
|
1071
1066
|
);
|
|
1072
|
-
function
|
|
1067
|
+
function er(e) {
|
|
1073
1068
|
return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(e);
|
|
1074
1069
|
}
|
|
1075
|
-
function
|
|
1070
|
+
function tr(e, t) {
|
|
1076
1071
|
return t ? e.replace(/\/?\/$/, "") + "/" + t.replace(/^\/+/, "") : e;
|
|
1077
1072
|
}
|
|
1078
|
-
function
|
|
1079
|
-
let
|
|
1080
|
-
return e && (
|
|
1073
|
+
function bt(e, t, n) {
|
|
1074
|
+
let r = !er(t);
|
|
1075
|
+
return e && (r || n == !1) ? tr(e, t) : t;
|
|
1081
1076
|
}
|
|
1082
|
-
const
|
|
1083
|
-
function
|
|
1077
|
+
const Ie = (e) => e instanceof P ? { ...e } : e;
|
|
1078
|
+
function H(e, t) {
|
|
1084
1079
|
t = t || {};
|
|
1085
|
-
const
|
|
1086
|
-
function
|
|
1087
|
-
return
|
|
1088
|
-
}
|
|
1089
|
-
function s(
|
|
1090
|
-
if (
|
|
1091
|
-
if (!
|
|
1092
|
-
return
|
|
1093
|
-
} else return
|
|
1094
|
-
}
|
|
1095
|
-
function o(
|
|
1096
|
-
if (!
|
|
1097
|
-
return
|
|
1098
|
-
}
|
|
1099
|
-
function i(
|
|
1100
|
-
if (
|
|
1101
|
-
if (!
|
|
1102
|
-
return
|
|
1103
|
-
} else return
|
|
1104
|
-
}
|
|
1105
|
-
function
|
|
1106
|
-
if (
|
|
1107
|
-
return
|
|
1108
|
-
if (
|
|
1109
|
-
return
|
|
1080
|
+
const n = {};
|
|
1081
|
+
function r(l, a, p, y) {
|
|
1082
|
+
return u.isPlainObject(l) && u.isPlainObject(a) ? u.merge.call({ caseless: y }, l, a) : u.isPlainObject(a) ? u.merge({}, a) : u.isArray(a) ? a.slice() : a;
|
|
1083
|
+
}
|
|
1084
|
+
function s(l, a, p, y) {
|
|
1085
|
+
if (u.isUndefined(a)) {
|
|
1086
|
+
if (!u.isUndefined(l))
|
|
1087
|
+
return r(void 0, l, p, y);
|
|
1088
|
+
} else return r(l, a, p, y);
|
|
1089
|
+
}
|
|
1090
|
+
function o(l, a) {
|
|
1091
|
+
if (!u.isUndefined(a))
|
|
1092
|
+
return r(void 0, a);
|
|
1093
|
+
}
|
|
1094
|
+
function i(l, a) {
|
|
1095
|
+
if (u.isUndefined(a)) {
|
|
1096
|
+
if (!u.isUndefined(l))
|
|
1097
|
+
return r(void 0, l);
|
|
1098
|
+
} else return r(void 0, a);
|
|
1099
|
+
}
|
|
1100
|
+
function c(l, a, p) {
|
|
1101
|
+
if (p in t)
|
|
1102
|
+
return r(l, a);
|
|
1103
|
+
if (p in e)
|
|
1104
|
+
return r(void 0, l);
|
|
1110
1105
|
}
|
|
1111
1106
|
const f = {
|
|
1112
1107
|
url: o,
|
|
@@ -1136,129 +1131,129 @@ function be(e, t) {
|
|
|
1136
1131
|
cancelToken: i,
|
|
1137
1132
|
socketPath: i,
|
|
1138
1133
|
responseEncoding: i,
|
|
1139
|
-
validateStatus:
|
|
1140
|
-
headers: (
|
|
1134
|
+
validateStatus: c,
|
|
1135
|
+
headers: (l, a, p) => s(Ie(l), Ie(a), p, !0)
|
|
1141
1136
|
};
|
|
1142
|
-
return
|
|
1143
|
-
const
|
|
1144
|
-
|
|
1145
|
-
}),
|
|
1146
|
-
}
|
|
1147
|
-
const
|
|
1148
|
-
const t =
|
|
1149
|
-
let { data:
|
|
1150
|
-
if (t.headers = i =
|
|
1137
|
+
return u.forEach(Object.keys({ ...e, ...t }), function(a) {
|
|
1138
|
+
const p = f[a] || s, y = p(e[a], t[a], a);
|
|
1139
|
+
u.isUndefined(y) && p !== c || (n[a] = y);
|
|
1140
|
+
}), n;
|
|
1141
|
+
}
|
|
1142
|
+
const wt = (e) => {
|
|
1143
|
+
const t = H({}, e);
|
|
1144
|
+
let { data: n, withXSRFToken: r, xsrfHeaderName: s, xsrfCookieName: o, headers: i, auth: c } = t;
|
|
1145
|
+
if (t.headers = i = P.from(i), t.url = ht(bt(t.baseURL, t.url, t.allowAbsoluteUrls), e.params, e.paramsSerializer), c && i.set(
|
|
1151
1146
|
"Authorization",
|
|
1152
|
-
"Basic " + btoa((
|
|
1153
|
-
),
|
|
1154
|
-
if (
|
|
1147
|
+
"Basic " + btoa((c.username || "") + ":" + (c.password ? unescape(encodeURIComponent(c.password)) : ""))
|
|
1148
|
+
), u.isFormData(n)) {
|
|
1149
|
+
if (C.hasStandardBrowserEnv || C.hasStandardBrowserWebWorkerEnv)
|
|
1155
1150
|
i.setContentType(void 0);
|
|
1156
|
-
else if (
|
|
1157
|
-
const f =
|
|
1158
|
-
Object.entries(f).forEach(([
|
|
1159
|
-
|
|
1151
|
+
else if (u.isFunction(n.getHeaders)) {
|
|
1152
|
+
const f = n.getHeaders(), l = ["content-type", "content-length"];
|
|
1153
|
+
Object.entries(f).forEach(([a, p]) => {
|
|
1154
|
+
l.includes(a.toLowerCase()) && i.set(a, p);
|
|
1160
1155
|
});
|
|
1161
1156
|
}
|
|
1162
1157
|
}
|
|
1163
|
-
if (
|
|
1164
|
-
const f = s && o &&
|
|
1158
|
+
if (C.hasStandardBrowserEnv && (r && u.isFunction(r) && (r = r(t)), r || r !== !1 && Zn(t.url))) {
|
|
1159
|
+
const f = s && o && Yn.read(o);
|
|
1165
1160
|
f && i.set(s, f);
|
|
1166
1161
|
}
|
|
1167
1162
|
return t;
|
|
1168
|
-
},
|
|
1169
|
-
return new Promise(function(
|
|
1170
|
-
const s =
|
|
1163
|
+
}, nr = typeof XMLHttpRequest < "u", rr = nr && function(e) {
|
|
1164
|
+
return new Promise(function(n, r) {
|
|
1165
|
+
const s = wt(e);
|
|
1171
1166
|
let o = s.data;
|
|
1172
|
-
const i =
|
|
1173
|
-
let { responseType:
|
|
1174
|
-
function
|
|
1175
|
-
|
|
1167
|
+
const i = P.from(s.headers).normalize();
|
|
1168
|
+
let { responseType: c, onUploadProgress: f, onDownloadProgress: l } = s, a, p, y, w, d;
|
|
1169
|
+
function m() {
|
|
1170
|
+
w && w(), d && d(), s.cancelToken && s.cancelToken.unsubscribe(a), s.signal && s.signal.removeEventListener("abort", a);
|
|
1176
1171
|
}
|
|
1177
|
-
let
|
|
1178
|
-
|
|
1172
|
+
let h = new XMLHttpRequest();
|
|
1173
|
+
h.open(s.method.toUpperCase(), s.url, !0), h.timeout = s.timeout;
|
|
1179
1174
|
function E() {
|
|
1180
|
-
if (!
|
|
1175
|
+
if (!h)
|
|
1181
1176
|
return;
|
|
1182
|
-
const
|
|
1183
|
-
"getAllResponseHeaders" in
|
|
1184
|
-
),
|
|
1185
|
-
data: !
|
|
1186
|
-
status:
|
|
1187
|
-
statusText:
|
|
1188
|
-
headers:
|
|
1177
|
+
const S = P.from(
|
|
1178
|
+
"getAllResponseHeaders" in h && h.getAllResponseHeaders()
|
|
1179
|
+
), T = {
|
|
1180
|
+
data: !c || c === "text" || c === "json" ? h.responseText : h.response,
|
|
1181
|
+
status: h.status,
|
|
1182
|
+
statusText: h.statusText,
|
|
1183
|
+
headers: S,
|
|
1189
1184
|
config: e,
|
|
1190
|
-
request:
|
|
1185
|
+
request: h
|
|
1191
1186
|
};
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
}, function(
|
|
1195
|
-
|
|
1196
|
-
},
|
|
1187
|
+
gt(function(A) {
|
|
1188
|
+
n(A), m();
|
|
1189
|
+
}, function(A) {
|
|
1190
|
+
r(A), m();
|
|
1191
|
+
}, T), h = null;
|
|
1197
1192
|
}
|
|
1198
|
-
"onloadend" in
|
|
1199
|
-
!
|
|
1200
|
-
},
|
|
1201
|
-
|
|
1202
|
-
},
|
|
1203
|
-
const
|
|
1204
|
-
|
|
1205
|
-
},
|
|
1206
|
-
let
|
|
1207
|
-
const
|
|
1208
|
-
s.timeoutErrorMessage && (
|
|
1209
|
-
|
|
1210
|
-
|
|
1193
|
+
"onloadend" in h ? h.onloadend = E : h.onreadystatechange = function() {
|
|
1194
|
+
!h || h.readyState !== 4 || h.status === 0 && !(h.responseURL && h.responseURL.indexOf("file:") === 0) || setTimeout(E);
|
|
1195
|
+
}, h.onabort = function() {
|
|
1196
|
+
h && (r(new g("Request aborted", g.ECONNABORTED, e, h)), h = null);
|
|
1197
|
+
}, h.onerror = function(O) {
|
|
1198
|
+
const T = O && O.message ? O.message : "Network Error", v = new g(T, g.ERR_NETWORK, e, h);
|
|
1199
|
+
v.event = O || null, r(v), h = null;
|
|
1200
|
+
}, h.ontimeout = function() {
|
|
1201
|
+
let O = s.timeout ? "timeout of " + s.timeout + "ms exceeded" : "timeout exceeded";
|
|
1202
|
+
const T = s.transitional || mt;
|
|
1203
|
+
s.timeoutErrorMessage && (O = s.timeoutErrorMessage), r(new g(
|
|
1204
|
+
O,
|
|
1205
|
+
T.clarifyTimeoutError ? g.ETIMEDOUT : g.ECONNABORTED,
|
|
1211
1206
|
e,
|
|
1212
|
-
|
|
1213
|
-
)),
|
|
1214
|
-
}, o === void 0 && i.setContentType(null), "setRequestHeader" in
|
|
1215
|
-
|
|
1216
|
-
}),
|
|
1217
|
-
|
|
1218
|
-
}, s.cancelToken && s.cancelToken.subscribe(
|
|
1219
|
-
const
|
|
1220
|
-
if (
|
|
1221
|
-
|
|
1207
|
+
h
|
|
1208
|
+
)), h = null;
|
|
1209
|
+
}, o === void 0 && i.setContentType(null), "setRequestHeader" in h && u.forEach(i.toJSON(), function(O, T) {
|
|
1210
|
+
h.setRequestHeader(T, O);
|
|
1211
|
+
}), u.isUndefined(s.withCredentials) || (h.withCredentials = !!s.withCredentials), c && c !== "json" && (h.responseType = s.responseType), l && ([y, d] = oe(l, !0), h.addEventListener("progress", y)), f && h.upload && ([p, w] = oe(f), h.upload.addEventListener("progress", p), h.upload.addEventListener("loadend", w)), (s.cancelToken || s.signal) && (a = (S) => {
|
|
1212
|
+
h && (r(!S || S.type ? new z(null, e, h) : S), h.abort(), h = null);
|
|
1213
|
+
}, s.cancelToken && s.cancelToken.subscribe(a), s.signal && (s.signal.aborted ? a() : s.signal.addEventListener("abort", a)));
|
|
1214
|
+
const b = Gn(s.url);
|
|
1215
|
+
if (b && C.protocols.indexOf(b) === -1) {
|
|
1216
|
+
r(new g("Unsupported protocol " + b + ":", g.ERR_BAD_REQUEST, e));
|
|
1222
1217
|
return;
|
|
1223
1218
|
}
|
|
1224
|
-
|
|
1219
|
+
h.send(o || null);
|
|
1225
1220
|
});
|
|
1226
|
-
},
|
|
1227
|
-
const { length:
|
|
1228
|
-
if (t ||
|
|
1229
|
-
let
|
|
1230
|
-
const o = function(
|
|
1221
|
+
}, sr = (e, t) => {
|
|
1222
|
+
const { length: n } = e = e ? e.filter(Boolean) : [];
|
|
1223
|
+
if (t || n) {
|
|
1224
|
+
let r = new AbortController(), s;
|
|
1225
|
+
const o = function(l) {
|
|
1231
1226
|
if (!s) {
|
|
1232
|
-
s = !0,
|
|
1233
|
-
const
|
|
1234
|
-
|
|
1227
|
+
s = !0, c();
|
|
1228
|
+
const a = l instanceof Error ? l : this.reason;
|
|
1229
|
+
r.abort(a instanceof g ? a : new z(a instanceof Error ? a.message : a));
|
|
1235
1230
|
}
|
|
1236
1231
|
};
|
|
1237
1232
|
let i = t && setTimeout(() => {
|
|
1238
|
-
i = null, o(new
|
|
1233
|
+
i = null, o(new g(`timeout ${t} of ms exceeded`, g.ETIMEDOUT));
|
|
1239
1234
|
}, t);
|
|
1240
|
-
const
|
|
1241
|
-
e && (i && clearTimeout(i), i = null, e.forEach((
|
|
1242
|
-
|
|
1235
|
+
const c = () => {
|
|
1236
|
+
e && (i && clearTimeout(i), i = null, e.forEach((l) => {
|
|
1237
|
+
l.unsubscribe ? l.unsubscribe(o) : l.removeEventListener("abort", o);
|
|
1243
1238
|
}), e = null);
|
|
1244
1239
|
};
|
|
1245
|
-
e.forEach((
|
|
1246
|
-
const { signal: f } =
|
|
1247
|
-
return f.unsubscribe = () =>
|
|
1240
|
+
e.forEach((l) => l.addEventListener("abort", o));
|
|
1241
|
+
const { signal: f } = r;
|
|
1242
|
+
return f.unsubscribe = () => u.asap(c), f;
|
|
1248
1243
|
}
|
|
1249
|
-
},
|
|
1250
|
-
let
|
|
1251
|
-
if (
|
|
1244
|
+
}, or = function* (e, t) {
|
|
1245
|
+
let n = e.byteLength;
|
|
1246
|
+
if (n < t) {
|
|
1252
1247
|
yield e;
|
|
1253
1248
|
return;
|
|
1254
1249
|
}
|
|
1255
|
-
let
|
|
1256
|
-
for (;
|
|
1257
|
-
s =
|
|
1258
|
-
},
|
|
1259
|
-
for await (const
|
|
1260
|
-
yield*
|
|
1261
|
-
},
|
|
1250
|
+
let r = 0, s;
|
|
1251
|
+
for (; r < n; )
|
|
1252
|
+
s = r + t, yield e.slice(r, s), r = s;
|
|
1253
|
+
}, ir = async function* (e, t) {
|
|
1254
|
+
for await (const n of ar(e))
|
|
1255
|
+
yield* or(n, t);
|
|
1256
|
+
}, ar = async function* (e) {
|
|
1262
1257
|
if (e[Symbol.asyncIterator]) {
|
|
1263
1258
|
yield* e;
|
|
1264
1259
|
return;
|
|
@@ -1266,208 +1261,208 @@ const Mr = (e) => {
|
|
|
1266
1261
|
const t = e.getReader();
|
|
1267
1262
|
try {
|
|
1268
1263
|
for (; ; ) {
|
|
1269
|
-
const { done:
|
|
1270
|
-
if (
|
|
1264
|
+
const { done: n, value: r } = await t.read();
|
|
1265
|
+
if (n)
|
|
1271
1266
|
break;
|
|
1272
|
-
yield
|
|
1267
|
+
yield r;
|
|
1273
1268
|
}
|
|
1274
1269
|
} finally {
|
|
1275
1270
|
await t.cancel();
|
|
1276
1271
|
}
|
|
1277
|
-
},
|
|
1278
|
-
const s =
|
|
1279
|
-
let o = 0, i,
|
|
1280
|
-
i || (i = !0,
|
|
1272
|
+
}, $e = (e, t, n, r) => {
|
|
1273
|
+
const s = ir(e, t);
|
|
1274
|
+
let o = 0, i, c = (f) => {
|
|
1275
|
+
i || (i = !0, r && r(f));
|
|
1281
1276
|
};
|
|
1282
1277
|
return new ReadableStream({
|
|
1283
1278
|
async pull(f) {
|
|
1284
1279
|
try {
|
|
1285
|
-
const { done:
|
|
1286
|
-
if (
|
|
1287
|
-
|
|
1280
|
+
const { done: l, value: a } = await s.next();
|
|
1281
|
+
if (l) {
|
|
1282
|
+
c(), f.close();
|
|
1288
1283
|
return;
|
|
1289
1284
|
}
|
|
1290
|
-
let
|
|
1291
|
-
if (
|
|
1292
|
-
let y = o +=
|
|
1293
|
-
|
|
1285
|
+
let p = a.byteLength;
|
|
1286
|
+
if (n) {
|
|
1287
|
+
let y = o += p;
|
|
1288
|
+
n(y);
|
|
1294
1289
|
}
|
|
1295
|
-
f.enqueue(new Uint8Array(
|
|
1296
|
-
} catch (
|
|
1297
|
-
throw
|
|
1290
|
+
f.enqueue(new Uint8Array(a));
|
|
1291
|
+
} catch (l) {
|
|
1292
|
+
throw c(l), l;
|
|
1298
1293
|
}
|
|
1299
1294
|
},
|
|
1300
1295
|
cancel(f) {
|
|
1301
|
-
return
|
|
1296
|
+
return c(f), s.return();
|
|
1302
1297
|
}
|
|
1303
1298
|
}, {
|
|
1304
1299
|
highWaterMark: 2
|
|
1305
1300
|
});
|
|
1306
|
-
},
|
|
1301
|
+
}, ze = 64 * 1024, { isFunction: te } = u, cr = (({ Request: e, Response: t }) => ({
|
|
1307
1302
|
Request: e,
|
|
1308
1303
|
Response: t
|
|
1309
|
-
}))(
|
|
1310
|
-
ReadableStream:
|
|
1311
|
-
TextEncoder:
|
|
1312
|
-
} =
|
|
1304
|
+
}))(u.global), {
|
|
1305
|
+
ReadableStream: Je,
|
|
1306
|
+
TextEncoder: Ke
|
|
1307
|
+
} = u.global, We = (e, ...t) => {
|
|
1313
1308
|
try {
|
|
1314
1309
|
return !!e(...t);
|
|
1315
1310
|
} catch {
|
|
1316
1311
|
return !1;
|
|
1317
1312
|
}
|
|
1318
|
-
},
|
|
1319
|
-
e =
|
|
1313
|
+
}, ur = (e) => {
|
|
1314
|
+
e = u.merge.call({
|
|
1320
1315
|
skipUndefined: !0
|
|
1321
|
-
},
|
|
1322
|
-
const { fetch: t, Request:
|
|
1316
|
+
}, cr, e);
|
|
1317
|
+
const { fetch: t, Request: n, Response: r } = e, s = t ? te(t) : typeof fetch == "function", o = te(n), i = te(r);
|
|
1323
1318
|
if (!s)
|
|
1324
1319
|
return !1;
|
|
1325
|
-
const
|
|
1326
|
-
let
|
|
1327
|
-
const
|
|
1328
|
-
body: new
|
|
1320
|
+
const c = s && te(Je), f = s && (typeof Ke == "function" ? /* @__PURE__ */ ((d) => (m) => d.encode(m))(new Ke()) : async (d) => new Uint8Array(await new n(d).arrayBuffer())), l = o && c && We(() => {
|
|
1321
|
+
let d = !1;
|
|
1322
|
+
const m = new n(C.origin, {
|
|
1323
|
+
body: new Je(),
|
|
1329
1324
|
method: "POST",
|
|
1330
1325
|
get duplex() {
|
|
1331
|
-
return
|
|
1326
|
+
return d = !0, "half";
|
|
1332
1327
|
}
|
|
1333
1328
|
}).headers.has("Content-Type");
|
|
1334
|
-
return
|
|
1335
|
-
}),
|
|
1336
|
-
stream:
|
|
1329
|
+
return d && !m;
|
|
1330
|
+
}), a = i && c && We(() => u.isReadableStream(new r("").body)), p = {
|
|
1331
|
+
stream: a && ((d) => d.body)
|
|
1337
1332
|
};
|
|
1338
|
-
s && ["text", "arrayBuffer", "blob", "formData", "stream"].forEach((
|
|
1339
|
-
!
|
|
1340
|
-
let E =
|
|
1333
|
+
s && ["text", "arrayBuffer", "blob", "formData", "stream"].forEach((d) => {
|
|
1334
|
+
!p[d] && (p[d] = (m, h) => {
|
|
1335
|
+
let E = m && m[d];
|
|
1341
1336
|
if (E)
|
|
1342
|
-
return E.call(
|
|
1343
|
-
throw new
|
|
1337
|
+
return E.call(m);
|
|
1338
|
+
throw new g(`Response type '${d}' is not supported`, g.ERR_NOT_SUPPORT, h);
|
|
1344
1339
|
});
|
|
1345
1340
|
});
|
|
1346
|
-
const y = async (
|
|
1347
|
-
if (
|
|
1341
|
+
const y = async (d) => {
|
|
1342
|
+
if (d == null)
|
|
1348
1343
|
return 0;
|
|
1349
|
-
if (
|
|
1350
|
-
return
|
|
1351
|
-
if (
|
|
1352
|
-
return (await new
|
|
1344
|
+
if (u.isBlob(d))
|
|
1345
|
+
return d.size;
|
|
1346
|
+
if (u.isSpecCompliantForm(d))
|
|
1347
|
+
return (await new n(C.origin, {
|
|
1353
1348
|
method: "POST",
|
|
1354
|
-
body:
|
|
1349
|
+
body: d
|
|
1355
1350
|
}).arrayBuffer()).byteLength;
|
|
1356
|
-
if (
|
|
1357
|
-
return
|
|
1358
|
-
if (
|
|
1359
|
-
return (await f(
|
|
1360
|
-
},
|
|
1361
|
-
const
|
|
1362
|
-
return
|
|
1351
|
+
if (u.isArrayBufferView(d) || u.isArrayBuffer(d))
|
|
1352
|
+
return d.byteLength;
|
|
1353
|
+
if (u.isURLSearchParams(d) && (d = d + ""), u.isString(d))
|
|
1354
|
+
return (await f(d)).byteLength;
|
|
1355
|
+
}, w = async (d, m) => {
|
|
1356
|
+
const h = u.toFiniteNumber(d.getContentLength());
|
|
1357
|
+
return h ?? y(m);
|
|
1363
1358
|
};
|
|
1364
|
-
return async (
|
|
1359
|
+
return async (d) => {
|
|
1365
1360
|
let {
|
|
1366
|
-
url:
|
|
1367
|
-
method:
|
|
1361
|
+
url: m,
|
|
1362
|
+
method: h,
|
|
1368
1363
|
data: E,
|
|
1369
|
-
signal:
|
|
1370
|
-
cancelToken:
|
|
1371
|
-
timeout:
|
|
1372
|
-
onDownloadProgress:
|
|
1373
|
-
onUploadProgress:
|
|
1374
|
-
responseType:
|
|
1375
|
-
headers:
|
|
1376
|
-
withCredentials:
|
|
1377
|
-
fetchOptions:
|
|
1378
|
-
} =
|
|
1379
|
-
|
|
1380
|
-
let
|
|
1381
|
-
const
|
|
1382
|
-
|
|
1364
|
+
signal: b,
|
|
1365
|
+
cancelToken: S,
|
|
1366
|
+
timeout: O,
|
|
1367
|
+
onDownloadProgress: T,
|
|
1368
|
+
onUploadProgress: v,
|
|
1369
|
+
responseType: A,
|
|
1370
|
+
headers: pe,
|
|
1371
|
+
withCredentials: Z = "same-origin",
|
|
1372
|
+
fetchOptions: Pe
|
|
1373
|
+
} = wt(d), ve = t || fetch;
|
|
1374
|
+
A = A ? (A + "").toLowerCase() : "text";
|
|
1375
|
+
let Y = sr([b, S && S.toAbortSignal()], O), J = null;
|
|
1376
|
+
const _ = Y && Y.unsubscribe && (() => {
|
|
1377
|
+
Y.unsubscribe();
|
|
1383
1378
|
});
|
|
1384
|
-
let
|
|
1379
|
+
let Le;
|
|
1385
1380
|
try {
|
|
1386
|
-
if (
|
|
1387
|
-
let
|
|
1381
|
+
if (v && l && h !== "get" && h !== "head" && (Le = await w(pe, E)) !== 0) {
|
|
1382
|
+
let D = new n(m, {
|
|
1388
1383
|
method: "POST",
|
|
1389
1384
|
body: E,
|
|
1390
1385
|
duplex: "half"
|
|
1391
|
-
}),
|
|
1392
|
-
if (
|
|
1393
|
-
const [
|
|
1394
|
-
|
|
1395
|
-
|
|
1386
|
+
}), q;
|
|
1387
|
+
if (u.isFormData(E) && (q = D.headers.get("content-type")) && pe.setContentType(q), D.body) {
|
|
1388
|
+
const [he, ee] = je(
|
|
1389
|
+
Le,
|
|
1390
|
+
oe(qe(v))
|
|
1396
1391
|
);
|
|
1397
|
-
E =
|
|
1392
|
+
E = $e(D.body, ze, he, ee);
|
|
1398
1393
|
}
|
|
1399
1394
|
}
|
|
1400
|
-
|
|
1401
|
-
const
|
|
1402
|
-
...
|
|
1403
|
-
signal:
|
|
1404
|
-
method:
|
|
1405
|
-
headers:
|
|
1395
|
+
u.isString(Z) || (Z = Z ? "include" : "omit");
|
|
1396
|
+
const N = o && "credentials" in n.prototype, Ne = {
|
|
1397
|
+
...Pe,
|
|
1398
|
+
signal: Y,
|
|
1399
|
+
method: h.toUpperCase(),
|
|
1400
|
+
headers: pe.normalize().toJSON(),
|
|
1406
1401
|
body: E,
|
|
1407
1402
|
duplex: "half",
|
|
1408
|
-
credentials:
|
|
1403
|
+
credentials: N ? Z : void 0
|
|
1409
1404
|
};
|
|
1410
|
-
|
|
1411
|
-
let
|
|
1412
|
-
const
|
|
1413
|
-
if (
|
|
1414
|
-
const
|
|
1415
|
-
["status", "statusText", "headers"].forEach((
|
|
1416
|
-
|
|
1405
|
+
J = o && new n(m, Ne);
|
|
1406
|
+
let k = await (o ? ve(J, Pe) : ve(m, Ne));
|
|
1407
|
+
const Fe = a && (A === "stream" || A === "response");
|
|
1408
|
+
if (a && (T || Fe && _)) {
|
|
1409
|
+
const D = {};
|
|
1410
|
+
["status", "statusText", "headers"].forEach((Ue) => {
|
|
1411
|
+
D[Ue] = k[Ue];
|
|
1417
1412
|
});
|
|
1418
|
-
const
|
|
1419
|
-
|
|
1420
|
-
|
|
1413
|
+
const q = u.toFiniteNumber(k.headers.get("content-length")), [he, ee] = T && je(
|
|
1414
|
+
q,
|
|
1415
|
+
oe(qe(T), !0)
|
|
1421
1416
|
) || [];
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
|
|
1417
|
+
k = new r(
|
|
1418
|
+
$e(k.body, ze, he, () => {
|
|
1419
|
+
ee && ee(), _ && _();
|
|
1425
1420
|
}),
|
|
1426
|
-
|
|
1421
|
+
D
|
|
1427
1422
|
);
|
|
1428
1423
|
}
|
|
1429
|
-
|
|
1430
|
-
let
|
|
1431
|
-
return !
|
|
1432
|
-
|
|
1433
|
-
data:
|
|
1434
|
-
headers:
|
|
1435
|
-
status:
|
|
1436
|
-
statusText:
|
|
1437
|
-
config:
|
|
1438
|
-
request:
|
|
1424
|
+
A = A || "text";
|
|
1425
|
+
let Lt = await p[u.findKey(p, A) || "text"](k, d);
|
|
1426
|
+
return !Fe && _ && _(), await new Promise((D, q) => {
|
|
1427
|
+
gt(D, q, {
|
|
1428
|
+
data: Lt,
|
|
1429
|
+
headers: P.from(k.headers),
|
|
1430
|
+
status: k.status,
|
|
1431
|
+
statusText: k.statusText,
|
|
1432
|
+
config: d,
|
|
1433
|
+
request: J
|
|
1439
1434
|
});
|
|
1440
1435
|
});
|
|
1441
|
-
} catch (
|
|
1442
|
-
throw
|
|
1443
|
-
new
|
|
1436
|
+
} catch (N) {
|
|
1437
|
+
throw _ && _(), N && N.name === "TypeError" && /Load failed|fetch/i.test(N.message) ? Object.assign(
|
|
1438
|
+
new g("Network Error", g.ERR_NETWORK, d, J),
|
|
1444
1439
|
{
|
|
1445
|
-
cause:
|
|
1440
|
+
cause: N.cause || N
|
|
1446
1441
|
}
|
|
1447
|
-
) :
|
|
1442
|
+
) : g.from(N, N && N.code, d, J);
|
|
1448
1443
|
}
|
|
1449
1444
|
};
|
|
1450
|
-
},
|
|
1445
|
+
}, lr = /* @__PURE__ */ new Map(), St = (e) => {
|
|
1451
1446
|
let t = e && e.env || {};
|
|
1452
|
-
const { fetch:
|
|
1453
|
-
|
|
1447
|
+
const { fetch: n, Request: r, Response: s } = t, o = [
|
|
1448
|
+
r,
|
|
1454
1449
|
s,
|
|
1455
|
-
|
|
1450
|
+
n
|
|
1456
1451
|
];
|
|
1457
|
-
let i = o.length,
|
|
1458
|
-
for (;
|
|
1459
|
-
f = o[
|
|
1460
|
-
return
|
|
1452
|
+
let i = o.length, c = i, f, l, a = lr;
|
|
1453
|
+
for (; c--; )
|
|
1454
|
+
f = o[c], l = a.get(f), l === void 0 && a.set(f, l = c ? /* @__PURE__ */ new Map() : ur(t)), a = l;
|
|
1455
|
+
return l;
|
|
1461
1456
|
};
|
|
1462
|
-
|
|
1463
|
-
const
|
|
1464
|
-
http:
|
|
1465
|
-
xhr:
|
|
1457
|
+
St();
|
|
1458
|
+
const Ae = {
|
|
1459
|
+
http: xn,
|
|
1460
|
+
xhr: rr,
|
|
1466
1461
|
fetch: {
|
|
1467
|
-
get:
|
|
1462
|
+
get: St
|
|
1468
1463
|
}
|
|
1469
1464
|
};
|
|
1470
|
-
|
|
1465
|
+
u.forEach(Ae, (e, t) => {
|
|
1471
1466
|
if (e) {
|
|
1472
1467
|
try {
|
|
1473
1468
|
Object.defineProperty(e, "name", { value: t });
|
|
@@ -1476,123 +1471,123 @@ l.forEach(Pt, (e, t) => {
|
|
|
1476
1471
|
Object.defineProperty(e, "adapterName", { value: t });
|
|
1477
1472
|
}
|
|
1478
1473
|
});
|
|
1479
|
-
const
|
|
1480
|
-
function
|
|
1481
|
-
e =
|
|
1482
|
-
const { length:
|
|
1483
|
-
let
|
|
1474
|
+
const Ve = (e) => `- ${e}`, fr = (e) => u.isFunction(e) || e === null || e === !1;
|
|
1475
|
+
function dr(e, t) {
|
|
1476
|
+
e = u.isArray(e) ? e : [e];
|
|
1477
|
+
const { length: n } = e;
|
|
1478
|
+
let r, s;
|
|
1484
1479
|
const o = {};
|
|
1485
|
-
for (let i = 0; i <
|
|
1486
|
-
|
|
1487
|
-
let
|
|
1488
|
-
if (s =
|
|
1489
|
-
throw new
|
|
1490
|
-
if (s && (
|
|
1480
|
+
for (let i = 0; i < n; i++) {
|
|
1481
|
+
r = e[i];
|
|
1482
|
+
let c;
|
|
1483
|
+
if (s = r, !fr(r) && (s = Ae[(c = String(r)).toLowerCase()], s === void 0))
|
|
1484
|
+
throw new g(`Unknown adapter '${c}'`);
|
|
1485
|
+
if (s && (u.isFunction(s) || (s = s.get(t))))
|
|
1491
1486
|
break;
|
|
1492
|
-
o[
|
|
1487
|
+
o[c || "#" + i] = s;
|
|
1493
1488
|
}
|
|
1494
1489
|
if (!s) {
|
|
1495
1490
|
const i = Object.entries(o).map(
|
|
1496
|
-
([f,
|
|
1491
|
+
([f, l]) => `adapter ${f} ` + (l === !1 ? "is not supported by the environment" : "is not available in the build")
|
|
1497
1492
|
);
|
|
1498
|
-
let
|
|
1499
|
-
` + i.map(
|
|
1500
|
-
`) : " " +
|
|
1501
|
-
throw new
|
|
1502
|
-
"There is no suitable adapter to dispatch the request " +
|
|
1493
|
+
let c = n ? i.length > 1 ? `since :
|
|
1494
|
+
` + i.map(Ve).join(`
|
|
1495
|
+
`) : " " + Ve(i[0]) : "as no adapter specified";
|
|
1496
|
+
throw new g(
|
|
1497
|
+
"There is no suitable adapter to dispatch the request " + c,
|
|
1503
1498
|
"ERR_NOT_SUPPORT"
|
|
1504
1499
|
);
|
|
1505
1500
|
}
|
|
1506
1501
|
return s;
|
|
1507
1502
|
}
|
|
1508
|
-
const
|
|
1503
|
+
const Rt = {
|
|
1509
1504
|
/**
|
|
1510
1505
|
* Resolve an adapter from a list of adapter names or functions.
|
|
1511
1506
|
* @type {Function}
|
|
1512
1507
|
*/
|
|
1513
|
-
getAdapter:
|
|
1508
|
+
getAdapter: dr,
|
|
1514
1509
|
/**
|
|
1515
1510
|
* Exposes all known adapters
|
|
1516
1511
|
* @type {Object<string, Function|Object>}
|
|
1517
1512
|
*/
|
|
1518
|
-
adapters:
|
|
1513
|
+
adapters: Ae
|
|
1519
1514
|
};
|
|
1520
|
-
function
|
|
1515
|
+
function Ee(e) {
|
|
1521
1516
|
if (e.cancelToken && e.cancelToken.throwIfRequested(), e.signal && e.signal.aborted)
|
|
1522
|
-
throw new
|
|
1517
|
+
throw new z(null, e);
|
|
1523
1518
|
}
|
|
1524
|
-
function
|
|
1525
|
-
return
|
|
1519
|
+
function Ge(e) {
|
|
1520
|
+
return Ee(e), e.headers = P.from(e.headers), e.data = ye.call(
|
|
1526
1521
|
e,
|
|
1527
1522
|
e.transformRequest
|
|
1528
|
-
), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1),
|
|
1529
|
-
return
|
|
1523
|
+
), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), Rt.getAdapter(e.adapter || X.adapter, e)(e).then(function(r) {
|
|
1524
|
+
return Ee(e), r.data = ye.call(
|
|
1530
1525
|
e,
|
|
1531
1526
|
e.transformResponse,
|
|
1532
|
-
|
|
1533
|
-
),
|
|
1534
|
-
}, function(
|
|
1535
|
-
return
|
|
1527
|
+
r
|
|
1528
|
+
), r.headers = P.from(r.headers), r;
|
|
1529
|
+
}, function(r) {
|
|
1530
|
+
return Et(r) || (Ee(e), r && r.response && (r.response.data = ye.call(
|
|
1536
1531
|
e,
|
|
1537
1532
|
e.transformResponse,
|
|
1538
|
-
|
|
1539
|
-
),
|
|
1533
|
+
r.response
|
|
1534
|
+
), r.response.headers = P.from(r.response.headers))), Promise.reject(r);
|
|
1540
1535
|
});
|
|
1541
1536
|
}
|
|
1542
|
-
const
|
|
1537
|
+
const Ot = "1.13.2", fe = {};
|
|
1543
1538
|
["object", "boolean", "number", "function", "string", "symbol"].forEach((e, t) => {
|
|
1544
|
-
|
|
1545
|
-
return typeof
|
|
1539
|
+
fe[e] = function(r) {
|
|
1540
|
+
return typeof r === e || "a" + (t < 1 ? "n " : " ") + e;
|
|
1546
1541
|
};
|
|
1547
1542
|
});
|
|
1548
|
-
const
|
|
1549
|
-
|
|
1543
|
+
const Qe = {};
|
|
1544
|
+
fe.transitional = function(t, n, r) {
|
|
1550
1545
|
function s(o, i) {
|
|
1551
|
-
return "[Axios v" +
|
|
1546
|
+
return "[Axios v" + Ot + "] Transitional option '" + o + "'" + i + (r ? ". " + r : "");
|
|
1552
1547
|
}
|
|
1553
|
-
return (o, i,
|
|
1548
|
+
return (o, i, c) => {
|
|
1554
1549
|
if (t === !1)
|
|
1555
|
-
throw new
|
|
1556
|
-
s(i, " has been removed" + (
|
|
1557
|
-
|
|
1550
|
+
throw new g(
|
|
1551
|
+
s(i, " has been removed" + (n ? " in " + n : "")),
|
|
1552
|
+
g.ERR_DEPRECATED
|
|
1558
1553
|
);
|
|
1559
|
-
return
|
|
1554
|
+
return n && !Qe[i] && (Qe[i] = !0, console.warn(
|
|
1560
1555
|
s(
|
|
1561
1556
|
i,
|
|
1562
|
-
" has been deprecated since v" +
|
|
1557
|
+
" has been deprecated since v" + n + " and will be removed in the near future"
|
|
1563
1558
|
)
|
|
1564
|
-
)), t ? t(o, i,
|
|
1559
|
+
)), t ? t(o, i, c) : !0;
|
|
1565
1560
|
};
|
|
1566
1561
|
};
|
|
1567
|
-
|
|
1568
|
-
return (
|
|
1562
|
+
fe.spelling = function(t) {
|
|
1563
|
+
return (n, r) => (console.warn(`${r} is likely a misspelling of ${t}`), !0);
|
|
1569
1564
|
};
|
|
1570
|
-
function
|
|
1565
|
+
function pr(e, t, n) {
|
|
1571
1566
|
if (typeof e != "object")
|
|
1572
|
-
throw new
|
|
1573
|
-
const
|
|
1574
|
-
let s =
|
|
1567
|
+
throw new g("options must be an object", g.ERR_BAD_OPTION_VALUE);
|
|
1568
|
+
const r = Object.keys(e);
|
|
1569
|
+
let s = r.length;
|
|
1575
1570
|
for (; s-- > 0; ) {
|
|
1576
|
-
const o =
|
|
1571
|
+
const o = r[s], i = t[o];
|
|
1577
1572
|
if (i) {
|
|
1578
|
-
const
|
|
1573
|
+
const c = e[o], f = c === void 0 || i(c, o, e);
|
|
1579
1574
|
if (f !== !0)
|
|
1580
|
-
throw new
|
|
1575
|
+
throw new g("option " + o + " must be " + f, g.ERR_BAD_OPTION_VALUE);
|
|
1581
1576
|
continue;
|
|
1582
1577
|
}
|
|
1583
|
-
if (
|
|
1584
|
-
throw new
|
|
1578
|
+
if (n !== !0)
|
|
1579
|
+
throw new g("Unknown option " + o, g.ERR_BAD_OPTION);
|
|
1585
1580
|
}
|
|
1586
1581
|
}
|
|
1587
|
-
const
|
|
1588
|
-
assertOptions:
|
|
1589
|
-
validators:
|
|
1590
|
-
},
|
|
1591
|
-
let
|
|
1582
|
+
const se = {
|
|
1583
|
+
assertOptions: pr,
|
|
1584
|
+
validators: fe
|
|
1585
|
+
}, F = se.validators;
|
|
1586
|
+
let M = class {
|
|
1592
1587
|
constructor(t) {
|
|
1593
1588
|
this.defaults = t || {}, this.interceptors = {
|
|
1594
|
-
request: new
|
|
1595
|
-
response: new
|
|
1589
|
+
request: new Me(),
|
|
1590
|
+
response: new Me()
|
|
1596
1591
|
};
|
|
1597
1592
|
}
|
|
1598
1593
|
/**
|
|
@@ -1603,106 +1598,106 @@ let ye = class {
|
|
|
1603
1598
|
*
|
|
1604
1599
|
* @returns {Promise} The Promise to be fulfilled
|
|
1605
1600
|
*/
|
|
1606
|
-
async request(t,
|
|
1601
|
+
async request(t, n) {
|
|
1607
1602
|
try {
|
|
1608
|
-
return await this._request(t,
|
|
1609
|
-
} catch (
|
|
1610
|
-
if (
|
|
1603
|
+
return await this._request(t, n);
|
|
1604
|
+
} catch (r) {
|
|
1605
|
+
if (r instanceof Error) {
|
|
1611
1606
|
let s = {};
|
|
1612
1607
|
Error.captureStackTrace ? Error.captureStackTrace(s) : s = new Error();
|
|
1613
1608
|
const o = s.stack ? s.stack.replace(/^.+\n/, "") : "";
|
|
1614
1609
|
try {
|
|
1615
|
-
|
|
1616
|
-
` + o) :
|
|
1610
|
+
r.stack ? o && !String(r.stack).endsWith(o.replace(/^.+\n.+\n/, "")) && (r.stack += `
|
|
1611
|
+
` + o) : r.stack = o;
|
|
1617
1612
|
} catch {
|
|
1618
1613
|
}
|
|
1619
1614
|
}
|
|
1620
|
-
throw
|
|
1615
|
+
throw r;
|
|
1621
1616
|
}
|
|
1622
1617
|
}
|
|
1623
|
-
_request(t,
|
|
1624
|
-
typeof t == "string" ? (
|
|
1625
|
-
const { transitional:
|
|
1626
|
-
|
|
1627
|
-
silentJSONParsing:
|
|
1628
|
-
forcedJSONParsing:
|
|
1629
|
-
clarifyTimeoutError:
|
|
1630
|
-
}, !1), s != null && (
|
|
1618
|
+
_request(t, n) {
|
|
1619
|
+
typeof t == "string" ? (n = n || {}, n.url = t) : n = t || {}, n = H(this.defaults, n);
|
|
1620
|
+
const { transitional: r, paramsSerializer: s, headers: o } = n;
|
|
1621
|
+
r !== void 0 && se.assertOptions(r, {
|
|
1622
|
+
silentJSONParsing: F.transitional(F.boolean),
|
|
1623
|
+
forcedJSONParsing: F.transitional(F.boolean),
|
|
1624
|
+
clarifyTimeoutError: F.transitional(F.boolean)
|
|
1625
|
+
}, !1), s != null && (u.isFunction(s) ? n.paramsSerializer = {
|
|
1631
1626
|
serialize: s
|
|
1632
|
-
} :
|
|
1633
|
-
encode:
|
|
1634
|
-
serialize:
|
|
1635
|
-
}, !0)),
|
|
1636
|
-
baseUrl:
|
|
1637
|
-
withXsrfToken:
|
|
1638
|
-
}, !0),
|
|
1639
|
-
let i = o &&
|
|
1627
|
+
} : se.assertOptions(s, {
|
|
1628
|
+
encode: F.function,
|
|
1629
|
+
serialize: F.function
|
|
1630
|
+
}, !0)), n.allowAbsoluteUrls !== void 0 || (this.defaults.allowAbsoluteUrls !== void 0 ? n.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls : n.allowAbsoluteUrls = !0), se.assertOptions(n, {
|
|
1631
|
+
baseUrl: F.spelling("baseURL"),
|
|
1632
|
+
withXsrfToken: F.spelling("withXSRFToken")
|
|
1633
|
+
}, !0), n.method = (n.method || this.defaults.method || "get").toLowerCase();
|
|
1634
|
+
let i = o && u.merge(
|
|
1640
1635
|
o.common,
|
|
1641
|
-
o[
|
|
1636
|
+
o[n.method]
|
|
1642
1637
|
);
|
|
1643
|
-
o &&
|
|
1638
|
+
o && u.forEach(
|
|
1644
1639
|
["delete", "get", "head", "post", "put", "patch", "common"],
|
|
1645
|
-
(
|
|
1646
|
-
delete o[
|
|
1640
|
+
(d) => {
|
|
1641
|
+
delete o[d];
|
|
1647
1642
|
}
|
|
1648
|
-
),
|
|
1649
|
-
const
|
|
1643
|
+
), n.headers = P.concat(i, o);
|
|
1644
|
+
const c = [];
|
|
1650
1645
|
let f = !0;
|
|
1651
|
-
this.interceptors.request.forEach(function(
|
|
1652
|
-
typeof
|
|
1646
|
+
this.interceptors.request.forEach(function(m) {
|
|
1647
|
+
typeof m.runWhen == "function" && m.runWhen(n) === !1 || (f = f && m.synchronous, c.unshift(m.fulfilled, m.rejected));
|
|
1653
1648
|
});
|
|
1654
|
-
const
|
|
1655
|
-
this.interceptors.response.forEach(function(
|
|
1656
|
-
|
|
1649
|
+
const l = [];
|
|
1650
|
+
this.interceptors.response.forEach(function(m) {
|
|
1651
|
+
l.push(m.fulfilled, m.rejected);
|
|
1657
1652
|
});
|
|
1658
|
-
let
|
|
1653
|
+
let a, p = 0, y;
|
|
1659
1654
|
if (!f) {
|
|
1660
|
-
const
|
|
1661
|
-
for (
|
|
1662
|
-
|
|
1663
|
-
return
|
|
1655
|
+
const d = [Ge.bind(this), void 0];
|
|
1656
|
+
for (d.unshift(...c), d.push(...l), y = d.length, a = Promise.resolve(n); p < y; )
|
|
1657
|
+
a = a.then(d[p++], d[p++]);
|
|
1658
|
+
return a;
|
|
1664
1659
|
}
|
|
1665
|
-
y =
|
|
1666
|
-
let
|
|
1667
|
-
for (;
|
|
1668
|
-
const
|
|
1660
|
+
y = c.length;
|
|
1661
|
+
let w = n;
|
|
1662
|
+
for (; p < y; ) {
|
|
1663
|
+
const d = c[p++], m = c[p++];
|
|
1669
1664
|
try {
|
|
1670
|
-
|
|
1671
|
-
} catch (
|
|
1672
|
-
|
|
1665
|
+
w = d(w);
|
|
1666
|
+
} catch (h) {
|
|
1667
|
+
m.call(this, h);
|
|
1673
1668
|
break;
|
|
1674
1669
|
}
|
|
1675
1670
|
}
|
|
1676
1671
|
try {
|
|
1677
|
-
|
|
1678
|
-
} catch (
|
|
1679
|
-
return Promise.reject(
|
|
1672
|
+
a = Ge.call(this, w);
|
|
1673
|
+
} catch (d) {
|
|
1674
|
+
return Promise.reject(d);
|
|
1680
1675
|
}
|
|
1681
|
-
for (
|
|
1682
|
-
|
|
1683
|
-
return
|
|
1676
|
+
for (p = 0, y = l.length; p < y; )
|
|
1677
|
+
a = a.then(l[p++], l[p++]);
|
|
1678
|
+
return a;
|
|
1684
1679
|
}
|
|
1685
1680
|
getUri(t) {
|
|
1686
|
-
t =
|
|
1687
|
-
const
|
|
1688
|
-
return
|
|
1681
|
+
t = H(this.defaults, t);
|
|
1682
|
+
const n = bt(t.baseURL, t.url, t.allowAbsoluteUrls);
|
|
1683
|
+
return ht(n, t.params, t.paramsSerializer);
|
|
1689
1684
|
}
|
|
1690
1685
|
};
|
|
1691
|
-
|
|
1692
|
-
|
|
1693
|
-
return this.request(
|
|
1686
|
+
u.forEach(["delete", "get", "head", "options"], function(t) {
|
|
1687
|
+
M.prototype[t] = function(n, r) {
|
|
1688
|
+
return this.request(H(r || {}, {
|
|
1694
1689
|
method: t,
|
|
1695
|
-
url:
|
|
1696
|
-
data: (
|
|
1690
|
+
url: n,
|
|
1691
|
+
data: (r || {}).data
|
|
1697
1692
|
}));
|
|
1698
1693
|
};
|
|
1699
1694
|
});
|
|
1700
|
-
|
|
1701
|
-
function r
|
|
1702
|
-
return function(o, i,
|
|
1703
|
-
return this.request(
|
|
1695
|
+
u.forEach(["post", "put", "patch"], function(t) {
|
|
1696
|
+
function n(r) {
|
|
1697
|
+
return function(o, i, c) {
|
|
1698
|
+
return this.request(H(c || {}, {
|
|
1704
1699
|
method: t,
|
|
1705
|
-
headers:
|
|
1700
|
+
headers: r ? {
|
|
1706
1701
|
"Content-Type": "multipart/form-data"
|
|
1707
1702
|
} : {},
|
|
1708
1703
|
url: o,
|
|
@@ -1710,33 +1705,33 @@ l.forEach(["post", "put", "patch"], function(t) {
|
|
|
1710
1705
|
}));
|
|
1711
1706
|
};
|
|
1712
1707
|
}
|
|
1713
|
-
|
|
1708
|
+
M.prototype[t] = n(), M.prototype[t + "Form"] = n(!0);
|
|
1714
1709
|
});
|
|
1715
|
-
let
|
|
1710
|
+
let hr = class Tt {
|
|
1716
1711
|
constructor(t) {
|
|
1717
1712
|
if (typeof t != "function")
|
|
1718
1713
|
throw new TypeError("executor must be a function.");
|
|
1719
|
-
let
|
|
1714
|
+
let n;
|
|
1720
1715
|
this.promise = new Promise(function(o) {
|
|
1721
|
-
|
|
1716
|
+
n = o;
|
|
1722
1717
|
});
|
|
1723
|
-
const
|
|
1718
|
+
const r = this;
|
|
1724
1719
|
this.promise.then((s) => {
|
|
1725
|
-
if (!
|
|
1726
|
-
let o =
|
|
1720
|
+
if (!r._listeners) return;
|
|
1721
|
+
let o = r._listeners.length;
|
|
1727
1722
|
for (; o-- > 0; )
|
|
1728
|
-
|
|
1729
|
-
|
|
1723
|
+
r._listeners[o](s);
|
|
1724
|
+
r._listeners = null;
|
|
1730
1725
|
}), this.promise.then = (s) => {
|
|
1731
1726
|
let o;
|
|
1732
|
-
const i = new Promise((
|
|
1733
|
-
|
|
1727
|
+
const i = new Promise((c) => {
|
|
1728
|
+
r.subscribe(c), o = c;
|
|
1734
1729
|
}).then(s);
|
|
1735
1730
|
return i.cancel = function() {
|
|
1736
|
-
|
|
1731
|
+
r.unsubscribe(o);
|
|
1737
1732
|
}, i;
|
|
1738
|
-
}, t(function(o, i,
|
|
1739
|
-
|
|
1733
|
+
}, t(function(o, i, c) {
|
|
1734
|
+
r.reason || (r.reason = new z(o, i, c), n(r.reason));
|
|
1740
1735
|
});
|
|
1741
1736
|
}
|
|
1742
1737
|
/**
|
|
@@ -1762,14 +1757,14 @@ let Ls = class qr {
|
|
|
1762
1757
|
unsubscribe(t) {
|
|
1763
1758
|
if (!this._listeners)
|
|
1764
1759
|
return;
|
|
1765
|
-
const
|
|
1766
|
-
|
|
1760
|
+
const n = this._listeners.indexOf(t);
|
|
1761
|
+
n !== -1 && this._listeners.splice(n, 1);
|
|
1767
1762
|
}
|
|
1768
1763
|
toAbortSignal() {
|
|
1769
|
-
const t = new AbortController(),
|
|
1770
|
-
t.abort(
|
|
1764
|
+
const t = new AbortController(), n = (r) => {
|
|
1765
|
+
t.abort(r);
|
|
1771
1766
|
};
|
|
1772
|
-
return this.subscribe(
|
|
1767
|
+
return this.subscribe(n), t.signal.unsubscribe = () => this.unsubscribe(n), t.signal;
|
|
1773
1768
|
}
|
|
1774
1769
|
/**
|
|
1775
1770
|
* Returns an object that contains a new `CancelToken` and a function that, when called,
|
|
@@ -1778,22 +1773,22 @@ let Ls = class qr {
|
|
|
1778
1773
|
static source() {
|
|
1779
1774
|
let t;
|
|
1780
1775
|
return {
|
|
1781
|
-
token: new
|
|
1776
|
+
token: new Tt(function(s) {
|
|
1782
1777
|
t = s;
|
|
1783
1778
|
}),
|
|
1784
1779
|
cancel: t
|
|
1785
1780
|
};
|
|
1786
1781
|
}
|
|
1787
1782
|
};
|
|
1788
|
-
function
|
|
1789
|
-
return function(
|
|
1790
|
-
return e.apply(null,
|
|
1783
|
+
function mr(e) {
|
|
1784
|
+
return function(n) {
|
|
1785
|
+
return e.apply(null, n);
|
|
1791
1786
|
};
|
|
1792
1787
|
}
|
|
1793
|
-
function
|
|
1794
|
-
return
|
|
1788
|
+
function yr(e) {
|
|
1789
|
+
return u.isObject(e) && e.isAxiosError === !0;
|
|
1795
1790
|
}
|
|
1796
|
-
const
|
|
1791
|
+
const Se = {
|
|
1797
1792
|
Continue: 100,
|
|
1798
1793
|
SwitchingProtocols: 101,
|
|
1799
1794
|
Processing: 102,
|
|
@@ -1864,158 +1859,158 @@ const dt = {
|
|
|
1864
1859
|
SslHandshakeFailed: 525,
|
|
1865
1860
|
InvalidSslCertificate: 526
|
|
1866
1861
|
};
|
|
1867
|
-
Object.entries(
|
|
1868
|
-
|
|
1862
|
+
Object.entries(Se).forEach(([e, t]) => {
|
|
1863
|
+
Se[t] = e;
|
|
1869
1864
|
});
|
|
1870
|
-
function
|
|
1871
|
-
const t = new
|
|
1872
|
-
return
|
|
1873
|
-
return
|
|
1874
|
-
},
|
|
1875
|
-
}
|
|
1876
|
-
const
|
|
1877
|
-
|
|
1878
|
-
|
|
1879
|
-
|
|
1880
|
-
|
|
1881
|
-
|
|
1882
|
-
|
|
1883
|
-
|
|
1884
|
-
|
|
1885
|
-
|
|
1865
|
+
function At(e) {
|
|
1866
|
+
const t = new M(e), n = nt(M.prototype.request, t);
|
|
1867
|
+
return u.extend(n, M.prototype, t, { allOwnKeys: !0 }), u.extend(n, t, null, { allOwnKeys: !0 }), n.create = function(s) {
|
|
1868
|
+
return At(H(e, s));
|
|
1869
|
+
}, n;
|
|
1870
|
+
}
|
|
1871
|
+
const R = At(X);
|
|
1872
|
+
R.Axios = M;
|
|
1873
|
+
R.CanceledError = z;
|
|
1874
|
+
R.CancelToken = hr;
|
|
1875
|
+
R.isCancel = Et;
|
|
1876
|
+
R.VERSION = Ot;
|
|
1877
|
+
R.toFormData = le;
|
|
1878
|
+
R.AxiosError = g;
|
|
1879
|
+
R.Cancel = R.CanceledError;
|
|
1880
|
+
R.all = function(t) {
|
|
1886
1881
|
return Promise.all(t);
|
|
1887
1882
|
};
|
|
1888
|
-
|
|
1889
|
-
|
|
1890
|
-
|
|
1891
|
-
|
|
1892
|
-
|
|
1893
|
-
|
|
1894
|
-
|
|
1895
|
-
|
|
1883
|
+
R.spread = mr;
|
|
1884
|
+
R.isAxiosError = yr;
|
|
1885
|
+
R.mergeConfig = H;
|
|
1886
|
+
R.AxiosHeaders = P;
|
|
1887
|
+
R.formToJSON = (e) => yt(u.isHTMLForm(e) ? new FormData(e) : e);
|
|
1888
|
+
R.getAdapter = Rt.getAdapter;
|
|
1889
|
+
R.HttpStatusCode = Se;
|
|
1890
|
+
R.default = R;
|
|
1896
1891
|
const {
|
|
1897
|
-
Axios:
|
|
1898
|
-
AxiosError:
|
|
1899
|
-
CanceledError:
|
|
1900
|
-
isCancel:
|
|
1901
|
-
CancelToken:
|
|
1902
|
-
VERSION:
|
|
1903
|
-
all:
|
|
1904
|
-
Cancel:
|
|
1905
|
-
isAxiosError:
|
|
1906
|
-
spread:
|
|
1907
|
-
toFormData:
|
|
1908
|
-
AxiosHeaders:
|
|
1909
|
-
HttpStatusCode:
|
|
1910
|
-
formToJSON:
|
|
1911
|
-
getAdapter:
|
|
1912
|
-
mergeConfig:
|
|
1913
|
-
} =
|
|
1914
|
-
PATCH:
|
|
1915
|
-
POST:
|
|
1916
|
-
PUT:
|
|
1917
|
-
})[e],
|
|
1918
|
-
DELETE:
|
|
1919
|
-
GET:
|
|
1920
|
-
})[e],
|
|
1892
|
+
Axios: Gr,
|
|
1893
|
+
AxiosError: Er,
|
|
1894
|
+
CanceledError: Qr,
|
|
1895
|
+
isCancel: Xr,
|
|
1896
|
+
CancelToken: Zr,
|
|
1897
|
+
VERSION: Yr,
|
|
1898
|
+
all: es,
|
|
1899
|
+
Cancel: ts,
|
|
1900
|
+
isAxiosError: gr,
|
|
1901
|
+
spread: ns,
|
|
1902
|
+
toFormData: rs,
|
|
1903
|
+
AxiosHeaders: ss,
|
|
1904
|
+
HttpStatusCode: os,
|
|
1905
|
+
formToJSON: is,
|
|
1906
|
+
getAdapter: as,
|
|
1907
|
+
mergeConfig: cs
|
|
1908
|
+
} = R, br = (e) => ({
|
|
1909
|
+
PATCH: R.patch,
|
|
1910
|
+
POST: R.post,
|
|
1911
|
+
PUT: R.put
|
|
1912
|
+
})[e], wr = (e) => ({
|
|
1913
|
+
DELETE: R.delete,
|
|
1914
|
+
GET: R.get
|
|
1915
|
+
})[e], Sr = (e) => {
|
|
1921
1916
|
const {
|
|
1922
1917
|
data: t,
|
|
1923
|
-
headers:
|
|
1924
|
-
status:
|
|
1918
|
+
headers: n,
|
|
1919
|
+
status: r
|
|
1925
1920
|
} = e;
|
|
1926
1921
|
return {
|
|
1927
1922
|
body: t,
|
|
1928
|
-
header:
|
|
1929
|
-
status:
|
|
1923
|
+
header: n,
|
|
1924
|
+
status: r
|
|
1930
1925
|
};
|
|
1931
|
-
},
|
|
1932
|
-
if (!
|
|
1933
|
-
return new
|
|
1934
|
-
message: "An unknown error
|
|
1926
|
+
}, Rr = (e) => {
|
|
1927
|
+
if (!gr(e))
|
|
1928
|
+
return new U({
|
|
1929
|
+
message: "An unknown error occurred"
|
|
1935
1930
|
});
|
|
1936
1931
|
const {
|
|
1937
1932
|
message: t,
|
|
1938
|
-
response:
|
|
1933
|
+
response: n
|
|
1939
1934
|
} = e;
|
|
1940
|
-
if (!
|
|
1941
|
-
return new
|
|
1935
|
+
if (!n)
|
|
1936
|
+
return new U({
|
|
1942
1937
|
message: t
|
|
1943
1938
|
});
|
|
1944
1939
|
const {
|
|
1945
1940
|
config: {
|
|
1946
|
-
url:
|
|
1941
|
+
url: r,
|
|
1947
1942
|
method: s
|
|
1948
1943
|
},
|
|
1949
1944
|
status: o,
|
|
1950
1945
|
data: i
|
|
1951
|
-
} =
|
|
1946
|
+
} = n, c = {
|
|
1952
1947
|
method: s,
|
|
1953
1948
|
status: o,
|
|
1954
|
-
url:
|
|
1949
|
+
url: r
|
|
1955
1950
|
};
|
|
1956
1951
|
if (!i)
|
|
1957
|
-
return new
|
|
1958
|
-
details:
|
|
1952
|
+
return new U({
|
|
1953
|
+
details: c,
|
|
1959
1954
|
message: t
|
|
1960
1955
|
});
|
|
1961
1956
|
try {
|
|
1962
|
-
return new
|
|
1957
|
+
return new U({
|
|
1963
1958
|
details: {
|
|
1964
|
-
...
|
|
1959
|
+
...c,
|
|
1965
1960
|
body: i
|
|
1966
1961
|
},
|
|
1967
1962
|
message: t
|
|
1968
1963
|
});
|
|
1969
1964
|
} catch {
|
|
1970
|
-
return new
|
|
1971
|
-
details:
|
|
1965
|
+
return new U({
|
|
1966
|
+
details: c,
|
|
1972
1967
|
message: t
|
|
1973
1968
|
});
|
|
1974
1969
|
}
|
|
1975
|
-
},
|
|
1970
|
+
}, Ct = async (e) => {
|
|
1976
1971
|
try {
|
|
1977
1972
|
const t = await e;
|
|
1978
|
-
return
|
|
1973
|
+
return Sr(t);
|
|
1979
1974
|
} catch (t) {
|
|
1980
|
-
return t instanceof
|
|
1981
|
-
code:
|
|
1982
|
-
message: "An unknown error
|
|
1975
|
+
return t instanceof Er ? Rr(t) : new U({
|
|
1976
|
+
code: tt.Generic,
|
|
1977
|
+
message: "An unknown error occurred"
|
|
1983
1978
|
});
|
|
1984
1979
|
}
|
|
1985
|
-
},
|
|
1980
|
+
}, xt = (e, {
|
|
1986
1981
|
headers: t = {},
|
|
1987
|
-
query:
|
|
1988
|
-
timeout:
|
|
1982
|
+
query: n = {},
|
|
1983
|
+
timeout: r,
|
|
1989
1984
|
url: s
|
|
1990
1985
|
}, o) => {
|
|
1991
|
-
const i =
|
|
1986
|
+
const i = wr(e), c = {
|
|
1992
1987
|
headers: t
|
|
1993
|
-
}, f =
|
|
1994
|
-
return o.buffer && (
|
|
1995
|
-
},
|
|
1988
|
+
}, f = Xe(s, n);
|
|
1989
|
+
return o.buffer && (c.responseType = "arraybuffer"), r && (c.timeout = r), Ct(i(f, c));
|
|
1990
|
+
}, Ce = (e, {
|
|
1996
1991
|
headers: t = {},
|
|
1997
|
-
body:
|
|
1998
|
-
query:
|
|
1992
|
+
body: n = null,
|
|
1993
|
+
query: r = {},
|
|
1999
1994
|
timeout: s,
|
|
2000
1995
|
url: o,
|
|
2001
1996
|
attachments: i
|
|
2002
|
-
},
|
|
2003
|
-
const f =
|
|
1997
|
+
}, c) => {
|
|
1998
|
+
const f = br(e), l = i && i.length > 0, a = new FormData(), p = l ? a : n, y = {
|
|
2004
1999
|
headers: t
|
|
2005
|
-
},
|
|
2006
|
-
return
|
|
2007
|
-
|
|
2008
|
-
}),
|
|
2009
|
-
},
|
|
2010
|
-
delete:
|
|
2011
|
-
get:
|
|
2012
|
-
patch:
|
|
2013
|
-
post:
|
|
2014
|
-
put:
|
|
2015
|
-
}),
|
|
2000
|
+
}, w = Xe(o, r);
|
|
2001
|
+
return l && i.forEach((d) => {
|
|
2002
|
+
a.append(d.name, d.filePath);
|
|
2003
|
+
}), c.buffer && (y.responseType = "arraybuffer"), s && (y.timeout = s), Ct(f(w, p, y));
|
|
2004
|
+
}, Or = (e, t) => xt("DELETE", e, t), Tr = (e, t) => xt("GET", e, t), Ar = (e, t) => Ce("PATCH", e, t), Cr = (e, t) => Ce("POST", e, t), xr = (e, t) => Ce("PUT", e, t), us = () => () => ({
|
|
2005
|
+
delete: Or,
|
|
2006
|
+
get: Tr,
|
|
2007
|
+
patch: Ar,
|
|
2008
|
+
post: Cr,
|
|
2009
|
+
put: xr
|
|
2010
|
+
}), Pr = (e) => () => e(), ls = ({
|
|
2016
2011
|
useAdapter: e
|
|
2017
|
-
}) =>
|
|
2018
|
-
var
|
|
2012
|
+
}) => de("LOGGER_SERVICE", Pr(e), []);
|
|
2013
|
+
var Pt = { exports: {} };
|
|
2019
2014
|
/*!
|
|
2020
2015
|
* js-logger - http://github.com/jonnyreeves/js-logger
|
|
2021
2016
|
* Jonny Reeves, http://jonnyreeves.co.uk/
|
|
@@ -2023,1082 +2018,248 @@ var Vr = { exports: {} };
|
|
|
2023
2018
|
*/
|
|
2024
2019
|
(function(e) {
|
|
2025
2020
|
(function(t) {
|
|
2026
|
-
var
|
|
2027
|
-
|
|
2028
|
-
var
|
|
2021
|
+
var n = {};
|
|
2022
|
+
n.VERSION = "1.6.1";
|
|
2023
|
+
var r, s = {}, o = function(a, p) {
|
|
2029
2024
|
return function() {
|
|
2030
|
-
return
|
|
2025
|
+
return p.apply(a, arguments);
|
|
2031
2026
|
};
|
|
2032
2027
|
}, i = function() {
|
|
2033
|
-
var
|
|
2034
|
-
for (
|
|
2035
|
-
for (y in
|
|
2036
|
-
!(y in
|
|
2037
|
-
return
|
|
2038
|
-
},
|
|
2039
|
-
return { value:
|
|
2028
|
+
var a = arguments, p = a[0], y, w;
|
|
2029
|
+
for (w = 1; w < a.length; w++)
|
|
2030
|
+
for (y in a[w])
|
|
2031
|
+
!(y in p) && a[w].hasOwnProperty(y) && (p[y] = a[w][y]);
|
|
2032
|
+
return p;
|
|
2033
|
+
}, c = function(a, p) {
|
|
2034
|
+
return { value: a, name: p };
|
|
2040
2035
|
};
|
|
2041
|
-
|
|
2042
|
-
var f = function(
|
|
2043
|
-
this.context =
|
|
2036
|
+
n.TRACE = c(1, "TRACE"), n.DEBUG = c(2, "DEBUG"), n.INFO = c(3, "INFO"), n.TIME = c(4, "TIME"), n.WARN = c(5, "WARN"), n.ERROR = c(8, "ERROR"), n.OFF = c(99, "OFF");
|
|
2037
|
+
var f = function(a) {
|
|
2038
|
+
this.context = a, this.setLevel(a.filterLevel), this.log = this.info;
|
|
2044
2039
|
};
|
|
2045
2040
|
f.prototype = {
|
|
2046
2041
|
// Changes the current logging level for the logging instance.
|
|
2047
|
-
setLevel: function(
|
|
2048
|
-
|
|
2042
|
+
setLevel: function(a) {
|
|
2043
|
+
a && "value" in a && (this.context.filterLevel = a);
|
|
2049
2044
|
},
|
|
2050
2045
|
// Gets the current logging level for the logging instance
|
|
2051
2046
|
getLevel: function() {
|
|
2052
2047
|
return this.context.filterLevel;
|
|
2053
2048
|
},
|
|
2054
2049
|
// Is the logger configured to output messages at the supplied level?
|
|
2055
|
-
enabledFor: function(
|
|
2056
|
-
var
|
|
2057
|
-
return
|
|
2050
|
+
enabledFor: function(a) {
|
|
2051
|
+
var p = this.context.filterLevel;
|
|
2052
|
+
return a.value >= p.value;
|
|
2058
2053
|
},
|
|
2059
2054
|
trace: function() {
|
|
2060
|
-
this.invoke(
|
|
2055
|
+
this.invoke(n.TRACE, arguments);
|
|
2061
2056
|
},
|
|
2062
2057
|
debug: function() {
|
|
2063
|
-
this.invoke(
|
|
2058
|
+
this.invoke(n.DEBUG, arguments);
|
|
2064
2059
|
},
|
|
2065
2060
|
info: function() {
|
|
2066
|
-
this.invoke(
|
|
2061
|
+
this.invoke(n.INFO, arguments);
|
|
2067
2062
|
},
|
|
2068
2063
|
warn: function() {
|
|
2069
|
-
this.invoke(
|
|
2064
|
+
this.invoke(n.WARN, arguments);
|
|
2070
2065
|
},
|
|
2071
2066
|
error: function() {
|
|
2072
|
-
this.invoke(
|
|
2067
|
+
this.invoke(n.ERROR, arguments);
|
|
2073
2068
|
},
|
|
2074
|
-
time: function(
|
|
2075
|
-
typeof
|
|
2069
|
+
time: function(a) {
|
|
2070
|
+
typeof a == "string" && a.length > 0 && this.invoke(n.TIME, [a, "start"]);
|
|
2076
2071
|
},
|
|
2077
|
-
timeEnd: function(
|
|
2078
|
-
typeof
|
|
2072
|
+
timeEnd: function(a) {
|
|
2073
|
+
typeof a == "string" && a.length > 0 && this.invoke(n.TIME, [a, "end"]);
|
|
2079
2074
|
},
|
|
2080
2075
|
// Invokes the logger callback if it's not being filtered.
|
|
2081
|
-
invoke: function(
|
|
2082
|
-
|
|
2076
|
+
invoke: function(a, p) {
|
|
2077
|
+
r && this.enabledFor(a) && r(p, i({ level: a }, this.context));
|
|
2083
2078
|
}
|
|
2084
2079
|
};
|
|
2085
|
-
var
|
|
2080
|
+
var l = new f({ filterLevel: n.OFF });
|
|
2086
2081
|
(function() {
|
|
2087
|
-
var
|
|
2088
|
-
|
|
2089
|
-
})(),
|
|
2090
|
-
|
|
2091
|
-
},
|
|
2092
|
-
|
|
2093
|
-
for (var
|
|
2094
|
-
s.hasOwnProperty(
|
|
2095
|
-
},
|
|
2096
|
-
return
|
|
2097
|
-
},
|
|
2098
|
-
return s[
|
|
2099
|
-
},
|
|
2100
|
-
|
|
2101
|
-
|
|
2082
|
+
var a = n;
|
|
2083
|
+
a.enabledFor = o(l, l.enabledFor), a.trace = o(l, l.trace), a.debug = o(l, l.debug), a.time = o(l, l.time), a.timeEnd = o(l, l.timeEnd), a.info = o(l, l.info), a.warn = o(l, l.warn), a.error = o(l, l.error), a.log = a.info;
|
|
2084
|
+
})(), n.setHandler = function(a) {
|
|
2085
|
+
r = a;
|
|
2086
|
+
}, n.setLevel = function(a) {
|
|
2087
|
+
l.setLevel(a);
|
|
2088
|
+
for (var p in s)
|
|
2089
|
+
s.hasOwnProperty(p) && s[p].setLevel(a);
|
|
2090
|
+
}, n.getLevel = function() {
|
|
2091
|
+
return l.getLevel();
|
|
2092
|
+
}, n.get = function(a) {
|
|
2093
|
+
return s[a] || (s[a] = new f(i({ name: a }, l.context)));
|
|
2094
|
+
}, n.createDefaultHandler = function(a) {
|
|
2095
|
+
a = a || {}, a.formatter = a.formatter || function(d, m) {
|
|
2096
|
+
m.name && d.unshift("[" + m.name + "]");
|
|
2102
2097
|
};
|
|
2103
|
-
var
|
|
2104
|
-
Function.prototype.apply.call(
|
|
2098
|
+
var p = {}, y = function(w, d) {
|
|
2099
|
+
Function.prototype.apply.call(w, console, d);
|
|
2105
2100
|
};
|
|
2106
2101
|
return typeof console > "u" ? function() {
|
|
2107
|
-
} : function(
|
|
2108
|
-
|
|
2109
|
-
var
|
|
2110
|
-
|
|
2102
|
+
} : function(w, d) {
|
|
2103
|
+
w = Array.prototype.slice.call(w);
|
|
2104
|
+
var m = console.log, h;
|
|
2105
|
+
d.level === n.TIME ? (h = (d.name ? "[" + d.name + "] " : "") + w[0], w[1] === "start" ? console.time ? console.time(h) : p[h] = (/* @__PURE__ */ new Date()).getTime() : console.timeEnd ? console.timeEnd(h) : y(m, [h + ": " + ((/* @__PURE__ */ new Date()).getTime() - p[h]) + "ms"])) : (d.level === n.WARN && console.warn ? m = console.warn : d.level === n.ERROR && console.error ? m = console.error : d.level === n.INFO && console.info ? m = console.info : d.level === n.DEBUG && console.debug ? m = console.debug : d.level === n.TRACE && console.trace && (m = console.trace), a.formatter(w, d), y(m, w));
|
|
2111
2106
|
};
|
|
2112
|
-
},
|
|
2113
|
-
|
|
2114
|
-
},
|
|
2115
|
-
return t.Logger =
|
|
2116
|
-
}, t.Logger =
|
|
2117
|
-
})(
|
|
2118
|
-
})(
|
|
2119
|
-
var
|
|
2120
|
-
const
|
|
2121
|
-
|
|
2122
|
-
},
|
|
2123
|
-
|
|
2124
|
-
},
|
|
2125
|
-
|
|
2126
|
-
},
|
|
2127
|
-
|
|
2128
|
-
},
|
|
2129
|
-
|
|
2130
|
-
},
|
|
2131
|
-
|
|
2132
|
-
defaultLevel:
|
|
2107
|
+
}, n.useDefaults = function(a) {
|
|
2108
|
+
n.setLevel(a && a.defaultLevel || n.DEBUG), n.setHandler(n.createDefaultHandler(a));
|
|
2109
|
+
}, n.setDefaults = n.useDefaults, e.exports ? e.exports = n : (n._prevLogger = t.Logger, n.noConflict = function() {
|
|
2110
|
+
return t.Logger = n._prevLogger, n;
|
|
2111
|
+
}, t.Logger = n);
|
|
2112
|
+
})(Nt);
|
|
2113
|
+
})(Pt);
|
|
2114
|
+
var vr = Pt.exports;
|
|
2115
|
+
const j = /* @__PURE__ */ Ft(vr), xe = (e) => typeof e == "string" ? e : e.stack || e.toString(), Lr = (e) => {
|
|
2116
|
+
j.debug("💡", e);
|
|
2117
|
+
}, Nr = (e) => {
|
|
2118
|
+
j.error("❌", xe(e));
|
|
2119
|
+
}, Fr = (e) => {
|
|
2120
|
+
j.error("❌", xe(e));
|
|
2121
|
+
}, Ur = (e) => {
|
|
2122
|
+
j.info("✅", xe(e));
|
|
2123
|
+
}, kr = (e) => {
|
|
2124
|
+
j.warn("⚠️", e.toString());
|
|
2125
|
+
}, fs = () => () => (Ye(() => {
|
|
2126
|
+
j.useDefaults({
|
|
2127
|
+
defaultLevel: j.INFO
|
|
2133
2128
|
});
|
|
2134
2129
|
}, []), {
|
|
2135
|
-
debug:
|
|
2136
|
-
error:
|
|
2137
|
-
fatal:
|
|
2138
|
-
info:
|
|
2139
|
-
warn:
|
|
2140
|
-
}),
|
|
2130
|
+
debug: Lr,
|
|
2131
|
+
error: Nr,
|
|
2132
|
+
fatal: Fr,
|
|
2133
|
+
info: Ur,
|
|
2134
|
+
warn: kr
|
|
2135
|
+
}), Dr = (e) => ({
|
|
2141
2136
|
...t
|
|
2142
|
-
}) => {
|
|
2143
|
-
|
|
2144
|
-
|
|
2145
|
-
captureEvent: n,
|
|
2146
|
-
useCaptureEvent: s
|
|
2147
|
-
};
|
|
2148
|
-
}, ci = ({
|
|
2137
|
+
}) => ({
|
|
2138
|
+
captureEvent: e(t).captureEvent
|
|
2139
|
+
}), ds = ({
|
|
2149
2140
|
useAdapter: e,
|
|
2150
2141
|
HttpService: t
|
|
2151
|
-
}) =>
|
|
2142
|
+
}) => de("TRACKER_SERVICE", Dr(e), [t.ServiceProvider]), ps = ({
|
|
2152
2143
|
getDistinctId: e,
|
|
2153
2144
|
getTimestamp: t,
|
|
2154
|
-
getHeaders:
|
|
2155
|
-
transformProperties:
|
|
2145
|
+
getHeaders: n,
|
|
2146
|
+
transformProperties: r,
|
|
2156
2147
|
config: s
|
|
2157
2148
|
}) => ({
|
|
2158
2149
|
HttpService: o
|
|
2159
2150
|
}) => {
|
|
2160
|
-
const i =
|
|
2151
|
+
const i = ie(o), c = () => ({
|
|
2161
2152
|
Authorization: `Bearer ${s.apiKey}`,
|
|
2162
|
-
...
|
|
2163
|
-
}), f = (
|
|
2153
|
+
...n == null ? void 0 : n()
|
|
2154
|
+
}), f = (p) => [s.host, p].filter(Boolean).join("/"), l = (p, y) => i.post({
|
|
2164
2155
|
body: y,
|
|
2165
|
-
headers:
|
|
2166
|
-
url: f(
|
|
2156
|
+
headers: c(),
|
|
2157
|
+
url: f(p)
|
|
2167
2158
|
});
|
|
2168
2159
|
return {
|
|
2169
|
-
captureEvent:
|
|
2170
|
-
event:
|
|
2160
|
+
captureEvent: Mr("posthog-capture-event", async ({
|
|
2161
|
+
event: p,
|
|
2171
2162
|
properties: y
|
|
2172
2163
|
}) => {
|
|
2173
|
-
const
|
|
2174
|
-
await
|
|
2164
|
+
const w = s.paths.event, d = e(p, y), m = t == null ? void 0 : t(p, y), h = r(p, y);
|
|
2165
|
+
await l(w, {
|
|
2175
2166
|
api_key: s.apiKey,
|
|
2176
|
-
distinct_id:
|
|
2177
|
-
event:
|
|
2178
|
-
properties:
|
|
2179
|
-
timestamp:
|
|
2167
|
+
distinct_id: d,
|
|
2168
|
+
event: p,
|
|
2169
|
+
properties: h,
|
|
2170
|
+
timestamp: m
|
|
2180
2171
|
});
|
|
2181
2172
|
})
|
|
2182
2173
|
};
|
|
2183
2174
|
};
|
|
2184
|
-
var
|
|
2185
|
-
|
|
2186
|
-
|
|
2187
|
-
}
|
|
2188
|
-
subscribe(e) {
|
|
2189
|
-
return this.listeners.add(e), this.onSubscribe(), () => {
|
|
2190
|
-
this.listeners.delete(e), this.onUnsubscribe();
|
|
2191
|
-
};
|
|
2192
|
-
}
|
|
2193
|
-
hasListeners() {
|
|
2194
|
-
return this.listeners.size > 0;
|
|
2195
|
-
}
|
|
2196
|
-
onSubscribe() {
|
|
2197
|
-
}
|
|
2198
|
-
onUnsubscribe() {
|
|
2199
|
-
}
|
|
2200
|
-
}, eo = {
|
|
2201
|
-
// We need the wrapper function syntax below instead of direct references to
|
|
2202
|
-
// global setTimeout etc.
|
|
2203
|
-
//
|
|
2204
|
-
// BAD: `setTimeout: setTimeout`
|
|
2205
|
-
// GOOD: `setTimeout: (cb, delay) => setTimeout(cb, delay)`
|
|
2206
|
-
//
|
|
2207
|
-
// If we use direct references here, then anything that wants to spy on or
|
|
2208
|
-
// replace the global setTimeout (like tests) won't work since we'll already
|
|
2209
|
-
// have a hard reference to the original implementation at the time when this
|
|
2210
|
-
// file was imported.
|
|
2211
|
-
setTimeout: (e, t) => setTimeout(e, t),
|
|
2212
|
-
clearTimeout: (e) => clearTimeout(e),
|
|
2213
|
-
setInterval: (e, t) => setInterval(e, t),
|
|
2214
|
-
clearInterval: (e) => clearInterval(e)
|
|
2215
|
-
}, W, fe, lr, to = (lr = class {
|
|
2216
|
-
constructor() {
|
|
2217
|
-
// We cannot have TimeoutManager<T> as we must instantiate it with a concrete
|
|
2218
|
-
// type at app boot; and if we leave that type, then any new timer provider
|
|
2219
|
-
// would need to support ReturnType<typeof setTimeout>, which is infeasible.
|
|
2220
|
-
//
|
|
2221
|
-
// We settle for type safety for the TimeoutProvider type, and accept that
|
|
2222
|
-
// this class is unsafe internally to allow for extension.
|
|
2223
|
-
T(this, W, eo);
|
|
2224
|
-
T(this, fe, !1);
|
|
2225
|
-
}
|
|
2226
|
-
setTimeoutProvider(e) {
|
|
2227
|
-
process.env.NODE_ENV !== "production" && d(this, fe) && e !== d(this, W) && console.error(
|
|
2228
|
-
"[timeoutManager]: Switching provider after calls to previous provider might result in unexpected behavior.",
|
|
2229
|
-
{ previous: d(this, W), provider: e }
|
|
2230
|
-
), S(this, W, e), process.env.NODE_ENV !== "production" && S(this, fe, !1);
|
|
2231
|
-
}
|
|
2232
|
-
setTimeout(e, t) {
|
|
2233
|
-
return process.env.NODE_ENV !== "production" && S(this, fe, !0), d(this, W).setTimeout(e, t);
|
|
2234
|
-
}
|
|
2235
|
-
clearTimeout(e) {
|
|
2236
|
-
d(this, W).clearTimeout(e);
|
|
2237
|
-
}
|
|
2238
|
-
setInterval(e, t) {
|
|
2239
|
-
return process.env.NODE_ENV !== "production" && S(this, fe, !0), d(this, W).setInterval(e, t);
|
|
2240
|
-
}
|
|
2241
|
-
clearInterval(e) {
|
|
2242
|
-
d(this, W).clearInterval(e);
|
|
2243
|
-
}
|
|
2244
|
-
}, W = new WeakMap(), fe = new WeakMap(), lr), He = new to();
|
|
2245
|
-
function ro(e) {
|
|
2246
|
-
setTimeout(e, 0);
|
|
2247
|
-
}
|
|
2248
|
-
var _e = typeof window > "u" || "Deno" in globalThis;
|
|
2249
|
-
function We() {
|
|
2250
|
-
}
|
|
2251
|
-
function tr(e) {
|
|
2252
|
-
return typeof e == "number" && e >= 0 && e !== 1 / 0;
|
|
2253
|
-
}
|
|
2254
|
-
function no(e, t) {
|
|
2255
|
-
return Math.max(e + (t || 0) - Date.now(), 0);
|
|
2256
|
-
}
|
|
2257
|
-
function Le(e, t) {
|
|
2258
|
-
return typeof e == "function" ? e(t) : e;
|
|
2259
|
-
}
|
|
2260
|
-
function $(e, t) {
|
|
2261
|
-
return typeof e == "function" ? e(t) : e;
|
|
2262
|
-
}
|
|
2263
|
-
function rr(e) {
|
|
2264
|
-
return JSON.stringify(
|
|
2265
|
-
e,
|
|
2266
|
-
(t, r) => mt(r) ? Object.keys(r).sort().reduce((n, s) => (n[s] = r[s], n), {}) : r
|
|
2267
|
-
);
|
|
2268
|
-
}
|
|
2269
|
-
var so = Object.prototype.hasOwnProperty;
|
|
2270
|
-
function pt(e, t) {
|
|
2271
|
-
if (e === t)
|
|
2272
|
-
return e;
|
|
2273
|
-
const r = nr(e) && nr(t);
|
|
2274
|
-
if (!r && !(mt(e) && mt(t))) return t;
|
|
2275
|
-
const s = (r ? e : Object.keys(e)).length, o = r ? t : Object.keys(t), i = o.length, a = r ? new Array(i) : {};
|
|
2276
|
-
let f = 0;
|
|
2277
|
-
for (let u = 0; u < i; u++) {
|
|
2278
|
-
const c = r ? u : o[u], h = e[c], y = t[c];
|
|
2279
|
-
if (h === y) {
|
|
2280
|
-
a[c] = h, (r ? u < s : so.call(e, c)) && f++;
|
|
2281
|
-
continue;
|
|
2282
|
-
}
|
|
2283
|
-
if (h === null || y === null || typeof h != "object" || typeof y != "object") {
|
|
2284
|
-
a[c] = y;
|
|
2285
|
-
continue;
|
|
2286
|
-
}
|
|
2287
|
-
const g = pt(h, y);
|
|
2288
|
-
a[c] = g, g === h && f++;
|
|
2289
|
-
}
|
|
2290
|
-
return s === i && f === s ? e : a;
|
|
2291
|
-
}
|
|
2292
|
-
function Ke(e, t) {
|
|
2293
|
-
if (!t || Object.keys(e).length !== Object.keys(t).length)
|
|
2294
|
-
return !1;
|
|
2295
|
-
for (const r in e)
|
|
2296
|
-
if (e[r] !== t[r])
|
|
2297
|
-
return !1;
|
|
2298
|
-
return !0;
|
|
2299
|
-
}
|
|
2300
|
-
function nr(e) {
|
|
2301
|
-
return Array.isArray(e) && e.length === Object.keys(e).length;
|
|
2302
|
-
}
|
|
2303
|
-
function mt(e) {
|
|
2304
|
-
if (!sr(e))
|
|
2305
|
-
return !1;
|
|
2306
|
-
const t = e.constructor;
|
|
2307
|
-
if (t === void 0)
|
|
2308
|
-
return !0;
|
|
2309
|
-
const r = t.prototype;
|
|
2310
|
-
return !(!sr(r) || !r.hasOwnProperty("isPrototypeOf") || Object.getPrototypeOf(e) !== Object.prototype);
|
|
2311
|
-
}
|
|
2312
|
-
function sr(e) {
|
|
2313
|
-
return Object.prototype.toString.call(e) === "[object Object]";
|
|
2314
|
-
}
|
|
2315
|
-
function or(e, t, r) {
|
|
2316
|
-
if (typeof r.structuralSharing == "function")
|
|
2317
|
-
return r.structuralSharing(e, t);
|
|
2318
|
-
if (r.structuralSharing !== !1) {
|
|
2319
|
-
if (process.env.NODE_ENV !== "production")
|
|
2320
|
-
try {
|
|
2321
|
-
return pt(e, t);
|
|
2322
|
-
} catch (n) {
|
|
2323
|
-
throw console.error(
|
|
2324
|
-
`Structural sharing requires data to be JSON serializable. To fix this, turn off structuralSharing or return JSON-serializable data from your queryFn. [${r.queryHash}]: ${n}`
|
|
2325
|
-
), n;
|
|
2326
|
-
}
|
|
2327
|
-
return pt(e, t);
|
|
2328
|
-
}
|
|
2329
|
-
return t;
|
|
2330
|
-
}
|
|
2331
|
-
function Jr(e, t) {
|
|
2332
|
-
return typeof e == "function" ? e(...t) : !!e;
|
|
2333
|
-
}
|
|
2334
|
-
var he, re, we, fr, oo = (fr = class extends rt {
|
|
2335
|
-
constructor() {
|
|
2336
|
-
super();
|
|
2337
|
-
T(this, he);
|
|
2338
|
-
T(this, re);
|
|
2339
|
-
T(this, we);
|
|
2340
|
-
S(this, we, (t) => {
|
|
2341
|
-
if (!_e && window.addEventListener) {
|
|
2342
|
-
const r = () => t();
|
|
2343
|
-
return window.addEventListener("visibilitychange", r, !1), () => {
|
|
2344
|
-
window.removeEventListener("visibilitychange", r);
|
|
2345
|
-
};
|
|
2346
|
-
}
|
|
2347
|
-
});
|
|
2348
|
-
}
|
|
2349
|
-
onSubscribe() {
|
|
2350
|
-
d(this, re) || this.setEventListener(d(this, we));
|
|
2351
|
-
}
|
|
2352
|
-
onUnsubscribe() {
|
|
2353
|
-
var t;
|
|
2354
|
-
this.hasListeners() || ((t = d(this, re)) == null || t.call(this), S(this, re, void 0));
|
|
2355
|
-
}
|
|
2356
|
-
setEventListener(t) {
|
|
2357
|
-
var r;
|
|
2358
|
-
S(this, we, t), (r = d(this, re)) == null || r.call(this), S(this, re, t((n) => {
|
|
2359
|
-
typeof n == "boolean" ? this.setFocused(n) : this.onFocus();
|
|
2360
|
-
}));
|
|
2361
|
-
}
|
|
2362
|
-
setFocused(t) {
|
|
2363
|
-
d(this, he) !== t && (S(this, he, t), this.onFocus());
|
|
2364
|
-
}
|
|
2365
|
-
onFocus() {
|
|
2366
|
-
const t = this.isFocused();
|
|
2367
|
-
this.listeners.forEach((r) => {
|
|
2368
|
-
r(t);
|
|
2369
|
-
});
|
|
2370
|
-
}
|
|
2371
|
-
isFocused() {
|
|
2372
|
-
var t;
|
|
2373
|
-
return typeof d(this, he) == "boolean" ? d(this, he) : ((t = globalThis.document) == null ? void 0 : t.visibilityState) !== "hidden";
|
|
2374
|
-
}
|
|
2375
|
-
}, he = new WeakMap(), re = new WeakMap(), we = new WeakMap(), fr), io = new oo();
|
|
2376
|
-
function ir() {
|
|
2377
|
-
let e, t;
|
|
2378
|
-
const r = new Promise((s, o) => {
|
|
2379
|
-
e = s, t = o;
|
|
2380
|
-
});
|
|
2381
|
-
r.status = "pending", r.catch(() => {
|
|
2382
|
-
});
|
|
2383
|
-
function n(s) {
|
|
2384
|
-
Object.assign(r, s), delete r.resolve, delete r.reject;
|
|
2385
|
-
}
|
|
2386
|
-
return r.resolve = (s) => {
|
|
2387
|
-
n({
|
|
2388
|
-
status: "fulfilled",
|
|
2389
|
-
value: s
|
|
2390
|
-
}), e(s);
|
|
2391
|
-
}, r.reject = (s) => {
|
|
2392
|
-
n({
|
|
2393
|
-
status: "rejected",
|
|
2394
|
-
reason: s
|
|
2395
|
-
}), t(s);
|
|
2396
|
-
}, r;
|
|
2397
|
-
}
|
|
2398
|
-
var ao = ro;
|
|
2399
|
-
function co() {
|
|
2400
|
-
let e = [], t = 0, r = (a) => {
|
|
2401
|
-
a();
|
|
2402
|
-
}, n = (a) => {
|
|
2403
|
-
a();
|
|
2404
|
-
}, s = ao;
|
|
2405
|
-
const o = (a) => {
|
|
2406
|
-
t ? e.push(a) : s(() => {
|
|
2407
|
-
r(a);
|
|
2408
|
-
});
|
|
2409
|
-
}, i = () => {
|
|
2410
|
-
const a = e;
|
|
2411
|
-
e = [], a.length && s(() => {
|
|
2412
|
-
n(() => {
|
|
2413
|
-
a.forEach((f) => {
|
|
2414
|
-
r(f);
|
|
2415
|
-
});
|
|
2416
|
-
});
|
|
2417
|
-
});
|
|
2418
|
-
};
|
|
2175
|
+
var _r = /* @__PURE__ */ ((e) => (e.MUTATION = "mutation", e.QUERY = "query", e))(_r || {});
|
|
2176
|
+
const Br = () => {
|
|
2177
|
+
const e = Dt(void 0);
|
|
2419
2178
|
return {
|
|
2420
|
-
|
|
2421
|
-
|
|
2422
|
-
t++;
|
|
2423
|
-
try {
|
|
2424
|
-
f = a();
|
|
2425
|
-
} finally {
|
|
2426
|
-
t--, t || i();
|
|
2427
|
-
}
|
|
2428
|
-
return f;
|
|
2429
|
-
},
|
|
2430
|
-
/**
|
|
2431
|
-
* All calls to the wrapped function will be batched.
|
|
2432
|
-
*/
|
|
2433
|
-
batchCalls: (a) => (...f) => {
|
|
2434
|
-
o(() => {
|
|
2435
|
-
a(...f);
|
|
2436
|
-
});
|
|
2437
|
-
},
|
|
2438
|
-
schedule: o,
|
|
2439
|
-
/**
|
|
2440
|
-
* Use this method to set a custom notify function.
|
|
2441
|
-
* This can be used to for example wrap notifications with `React.act` while running tests.
|
|
2442
|
-
*/
|
|
2443
|
-
setNotifyFunction: (a) => {
|
|
2444
|
-
r = a;
|
|
2445
|
-
},
|
|
2446
|
-
/**
|
|
2447
|
-
* Use this method to set a custom function to batch notifications together into a single tick.
|
|
2448
|
-
* By default React Query will use the batch function provided by ReactDOM or React Native.
|
|
2449
|
-
*/
|
|
2450
|
-
setBatchNotifyFunction: (a) => {
|
|
2451
|
-
n = a;
|
|
2452
|
-
},
|
|
2453
|
-
setScheduler: (a) => {
|
|
2454
|
-
s = a;
|
|
2455
|
-
}
|
|
2456
|
-
};
|
|
2457
|
-
}
|
|
2458
|
-
var nt = co(), Se, ne, Re, hr, uo = (hr = class extends rt {
|
|
2459
|
-
constructor() {
|
|
2460
|
-
super();
|
|
2461
|
-
T(this, Se, !0);
|
|
2462
|
-
T(this, ne);
|
|
2463
|
-
T(this, Re);
|
|
2464
|
-
S(this, Re, (t) => {
|
|
2465
|
-
if (!_e && window.addEventListener) {
|
|
2466
|
-
const r = () => t(!0), n = () => t(!1);
|
|
2467
|
-
return window.addEventListener("online", r, !1), window.addEventListener("offline", n, !1), () => {
|
|
2468
|
-
window.removeEventListener("online", r), window.removeEventListener("offline", n);
|
|
2469
|
-
};
|
|
2470
|
-
}
|
|
2471
|
-
});
|
|
2472
|
-
}
|
|
2473
|
-
onSubscribe() {
|
|
2474
|
-
d(this, ne) || this.setEventListener(d(this, Re));
|
|
2475
|
-
}
|
|
2476
|
-
onUnsubscribe() {
|
|
2477
|
-
var t;
|
|
2478
|
-
this.hasListeners() || ((t = d(this, ne)) == null || t.call(this), S(this, ne, void 0));
|
|
2479
|
-
}
|
|
2480
|
-
setEventListener(t) {
|
|
2481
|
-
var r;
|
|
2482
|
-
S(this, Re, t), (r = d(this, ne)) == null || r.call(this), S(this, ne, t(this.setOnline.bind(this)));
|
|
2483
|
-
}
|
|
2484
|
-
setOnline(t) {
|
|
2485
|
-
d(this, Se) !== t && (S(this, Se, t), this.listeners.forEach((n) => {
|
|
2486
|
-
n(t);
|
|
2487
|
-
}));
|
|
2488
|
-
}
|
|
2489
|
-
isOnline() {
|
|
2490
|
-
return d(this, Se);
|
|
2491
|
-
}
|
|
2492
|
-
}, Se = new WeakMap(), ne = new WeakMap(), Re = new WeakMap(), hr), lo = new uo();
|
|
2493
|
-
function fo(e) {
|
|
2494
|
-
return (e ?? "online") === "online" ? lo.isOnline() : !0;
|
|
2495
|
-
}
|
|
2496
|
-
function ho(e, t) {
|
|
2497
|
-
return {
|
|
2498
|
-
fetchFailureCount: 0,
|
|
2499
|
-
fetchFailureReason: null,
|
|
2500
|
-
fetchStatus: fo(t.networkMode) ? "fetching" : "paused",
|
|
2501
|
-
...e === void 0 && {
|
|
2502
|
-
error: null,
|
|
2503
|
-
status: "pending"
|
|
2504
|
-
}
|
|
2505
|
-
};
|
|
2506
|
-
}
|
|
2507
|
-
var I, v, Ue, k, de, Oe, K, se, De, ve, Te, pe, me, oe, Ce, C, Ne, yt, bt, gt, Et, wt, St, Rt, Qr, dr, po = (dr = class extends rt {
|
|
2508
|
-
constructor(t, r) {
|
|
2509
|
-
super();
|
|
2510
|
-
T(this, C);
|
|
2511
|
-
T(this, I);
|
|
2512
|
-
T(this, v);
|
|
2513
|
-
T(this, Ue);
|
|
2514
|
-
T(this, k);
|
|
2515
|
-
T(this, de);
|
|
2516
|
-
T(this, Oe);
|
|
2517
|
-
T(this, K);
|
|
2518
|
-
T(this, se);
|
|
2519
|
-
T(this, De);
|
|
2520
|
-
T(this, ve);
|
|
2521
|
-
// This property keeps track of the last query with defined data.
|
|
2522
|
-
// It will be used to pass the previous data and query to the placeholder function between renders.
|
|
2523
|
-
T(this, Te);
|
|
2524
|
-
T(this, pe);
|
|
2525
|
-
T(this, me);
|
|
2526
|
-
T(this, oe);
|
|
2527
|
-
T(this, Ce, /* @__PURE__ */ new Set());
|
|
2528
|
-
this.options = r, S(this, I, t), S(this, se, null), S(this, K, ir()), this.bindMethods(), this.setOptions(r);
|
|
2529
|
-
}
|
|
2530
|
-
bindMethods() {
|
|
2531
|
-
this.refetch = this.refetch.bind(this);
|
|
2532
|
-
}
|
|
2533
|
-
onSubscribe() {
|
|
2534
|
-
this.listeners.size === 1 && (d(this, v).addObserver(this), ar(d(this, v), this.options) ? x(this, C, Ne).call(this) : this.updateResult(), x(this, C, Et).call(this));
|
|
2535
|
-
}
|
|
2536
|
-
onUnsubscribe() {
|
|
2537
|
-
this.hasListeners() || this.destroy();
|
|
2538
|
-
}
|
|
2539
|
-
shouldFetchOnReconnect() {
|
|
2540
|
-
return Ot(
|
|
2541
|
-
d(this, v),
|
|
2542
|
-
this.options,
|
|
2543
|
-
this.options.refetchOnReconnect
|
|
2544
|
-
);
|
|
2545
|
-
}
|
|
2546
|
-
shouldFetchOnWindowFocus() {
|
|
2547
|
-
return Ot(
|
|
2548
|
-
d(this, v),
|
|
2549
|
-
this.options,
|
|
2550
|
-
this.options.refetchOnWindowFocus
|
|
2551
|
-
);
|
|
2552
|
-
}
|
|
2553
|
-
destroy() {
|
|
2554
|
-
this.listeners = /* @__PURE__ */ new Set(), x(this, C, wt).call(this), x(this, C, St).call(this), d(this, v).removeObserver(this);
|
|
2555
|
-
}
|
|
2556
|
-
setOptions(t) {
|
|
2557
|
-
const r = this.options, n = d(this, v);
|
|
2558
|
-
if (this.options = d(this, I).defaultQueryOptions(t), this.options.enabled !== void 0 && typeof this.options.enabled != "boolean" && typeof this.options.enabled != "function" && typeof $(this.options.enabled, d(this, v)) != "boolean")
|
|
2559
|
-
throw new Error(
|
|
2560
|
-
"Expected enabled to be a boolean or a callback that returns a boolean"
|
|
2561
|
-
);
|
|
2562
|
-
x(this, C, Rt).call(this), d(this, v).setOptions(this.options), r._defaulted && !Ke(this.options, r) && d(this, I).getQueryCache().notify({
|
|
2563
|
-
type: "observerOptionsUpdated",
|
|
2564
|
-
query: d(this, v),
|
|
2565
|
-
observer: this
|
|
2566
|
-
});
|
|
2567
|
-
const s = this.hasListeners();
|
|
2568
|
-
s && cr(
|
|
2569
|
-
d(this, v),
|
|
2570
|
-
n,
|
|
2571
|
-
this.options,
|
|
2572
|
-
r
|
|
2573
|
-
) && x(this, C, Ne).call(this), this.updateResult(), s && (d(this, v) !== n || $(this.options.enabled, d(this, v)) !== $(r.enabled, d(this, v)) || Le(this.options.staleTime, d(this, v)) !== Le(r.staleTime, d(this, v))) && x(this, C, yt).call(this);
|
|
2574
|
-
const o = x(this, C, bt).call(this);
|
|
2575
|
-
s && (d(this, v) !== n || $(this.options.enabled, d(this, v)) !== $(r.enabled, d(this, v)) || o !== d(this, oe)) && x(this, C, gt).call(this, o);
|
|
2576
|
-
}
|
|
2577
|
-
getOptimisticResult(t) {
|
|
2578
|
-
const r = d(this, I).getQueryCache().build(d(this, I), t), n = this.createResult(r, t);
|
|
2579
|
-
return yo(this, n) && (S(this, k, n), S(this, Oe, this.options), S(this, de, d(this, v).state)), n;
|
|
2580
|
-
}
|
|
2581
|
-
getCurrentResult() {
|
|
2582
|
-
return d(this, k);
|
|
2583
|
-
}
|
|
2584
|
-
trackResult(t, r) {
|
|
2585
|
-
return new Proxy(t, {
|
|
2586
|
-
get: (n, s) => (this.trackProp(s), r == null || r(s), s === "promise" && (this.trackProp("data"), !this.options.experimental_prefetchInRender && d(this, K).status === "pending" && d(this, K).reject(
|
|
2587
|
-
new Error(
|
|
2588
|
-
"experimental_prefetchInRender feature flag is not enabled"
|
|
2589
|
-
)
|
|
2590
|
-
)), Reflect.get(n, s))
|
|
2591
|
-
});
|
|
2592
|
-
}
|
|
2593
|
-
trackProp(t) {
|
|
2594
|
-
d(this, Ce).add(t);
|
|
2595
|
-
}
|
|
2596
|
-
getCurrentQuery() {
|
|
2597
|
-
return d(this, v);
|
|
2598
|
-
}
|
|
2599
|
-
refetch({ ...t } = {}) {
|
|
2600
|
-
return this.fetch({
|
|
2601
|
-
...t
|
|
2602
|
-
});
|
|
2603
|
-
}
|
|
2604
|
-
fetchOptimistic(t) {
|
|
2605
|
-
const r = d(this, I).defaultQueryOptions(t), n = d(this, I).getQueryCache().build(d(this, I), r);
|
|
2606
|
-
return n.fetch().then(() => this.createResult(n, r));
|
|
2607
|
-
}
|
|
2608
|
-
fetch(t) {
|
|
2609
|
-
return x(this, C, Ne).call(this, {
|
|
2610
|
-
...t,
|
|
2611
|
-
cancelRefetch: t.cancelRefetch ?? !0
|
|
2612
|
-
}).then(() => (this.updateResult(), d(this, k)));
|
|
2613
|
-
}
|
|
2614
|
-
createResult(t, r) {
|
|
2615
|
-
var ae;
|
|
2616
|
-
const n = d(this, v), s = this.options, o = d(this, k), i = d(this, de), a = d(this, Oe), u = t !== n ? t.state : d(this, Ue), { state: c } = t;
|
|
2617
|
-
let h = { ...c }, y = !1, g;
|
|
2618
|
-
if (r._optimisticResults) {
|
|
2619
|
-
const D = this.hasListeners(), ce = !D && ar(t, r), H = D && cr(t, n, r, s);
|
|
2620
|
-
(ce || H) && (h = {
|
|
2621
|
-
...h,
|
|
2622
|
-
...ho(c.data, t.options)
|
|
2623
|
-
}), r._optimisticResults === "isRestoring" && (h.fetchStatus = "idle");
|
|
2624
|
-
}
|
|
2625
|
-
let { error: p, errorUpdatedAt: b, status: m } = h;
|
|
2626
|
-
g = h.data;
|
|
2627
|
-
let E = !1;
|
|
2628
|
-
if (r.placeholderData !== void 0 && g === void 0 && m === "pending") {
|
|
2629
|
-
let D;
|
|
2630
|
-
o != null && o.isPlaceholderData && r.placeholderData === (a == null ? void 0 : a.placeholderData) ? (D = o.data, E = !0) : D = typeof r.placeholderData == "function" ? r.placeholderData(
|
|
2631
|
-
(ae = d(this, Te)) == null ? void 0 : ae.state.data,
|
|
2632
|
-
d(this, Te)
|
|
2633
|
-
) : r.placeholderData, D !== void 0 && (m = "success", g = or(
|
|
2634
|
-
o == null ? void 0 : o.data,
|
|
2635
|
-
D,
|
|
2636
|
-
r
|
|
2637
|
-
), y = !0);
|
|
2638
|
-
}
|
|
2639
|
-
if (r.select && g !== void 0 && !E)
|
|
2640
|
-
if (o && g === (i == null ? void 0 : i.data) && r.select === d(this, De))
|
|
2641
|
-
g = d(this, ve);
|
|
2642
|
-
else
|
|
2643
|
-
try {
|
|
2644
|
-
S(this, De, r.select), g = r.select(g), g = or(o == null ? void 0 : o.data, g, r), S(this, ve, g), S(this, se, null);
|
|
2645
|
-
} catch (D) {
|
|
2646
|
-
S(this, se, D);
|
|
2647
|
-
}
|
|
2648
|
-
d(this, se) && (p = d(this, se), g = d(this, ve), b = Date.now(), m = "error");
|
|
2649
|
-
const w = h.fetchStatus === "fetching", O = m === "pending", A = m === "error", F = O && w, L = g !== void 0, M = {
|
|
2650
|
-
status: m,
|
|
2651
|
-
fetchStatus: h.fetchStatus,
|
|
2652
|
-
isPending: O,
|
|
2653
|
-
isSuccess: m === "success",
|
|
2654
|
-
isError: A,
|
|
2655
|
-
isInitialLoading: F,
|
|
2656
|
-
isLoading: F,
|
|
2657
|
-
data: g,
|
|
2658
|
-
dataUpdatedAt: h.dataUpdatedAt,
|
|
2659
|
-
error: p,
|
|
2660
|
-
errorUpdatedAt: b,
|
|
2661
|
-
failureCount: h.fetchFailureCount,
|
|
2662
|
-
failureReason: h.fetchFailureReason,
|
|
2663
|
-
errorUpdateCount: h.errorUpdateCount,
|
|
2664
|
-
isFetched: h.dataUpdateCount > 0 || h.errorUpdateCount > 0,
|
|
2665
|
-
isFetchedAfterMount: h.dataUpdateCount > u.dataUpdateCount || h.errorUpdateCount > u.errorUpdateCount,
|
|
2666
|
-
isFetching: w,
|
|
2667
|
-
isRefetching: w && !O,
|
|
2668
|
-
isLoadingError: A && !L,
|
|
2669
|
-
isPaused: h.fetchStatus === "paused",
|
|
2670
|
-
isPlaceholderData: y,
|
|
2671
|
-
isRefetchError: A && L,
|
|
2672
|
-
isStale: Lt(t, r),
|
|
2673
|
-
refetch: this.refetch,
|
|
2674
|
-
promise: d(this, K),
|
|
2675
|
-
isEnabled: $(r.enabled, t) !== !1
|
|
2676
|
-
};
|
|
2677
|
-
if (this.options.experimental_prefetchInRender) {
|
|
2678
|
-
const D = (V) => {
|
|
2679
|
-
M.status === "error" ? V.reject(M.error) : M.data !== void 0 && V.resolve(M.data);
|
|
2680
|
-
}, ce = () => {
|
|
2681
|
-
const V = S(this, K, M.promise = ir());
|
|
2682
|
-
D(V);
|
|
2683
|
-
}, H = d(this, K);
|
|
2684
|
-
switch (H.status) {
|
|
2685
|
-
case "pending":
|
|
2686
|
-
t.queryHash === n.queryHash && D(H);
|
|
2687
|
-
break;
|
|
2688
|
-
case "fulfilled":
|
|
2689
|
-
(M.status === "error" || M.data !== H.value) && ce();
|
|
2690
|
-
break;
|
|
2691
|
-
case "rejected":
|
|
2692
|
-
(M.status !== "error" || M.error !== H.reason) && ce();
|
|
2693
|
-
break;
|
|
2694
|
-
}
|
|
2695
|
-
}
|
|
2696
|
-
return M;
|
|
2697
|
-
}
|
|
2698
|
-
updateResult() {
|
|
2699
|
-
const t = d(this, k), r = this.createResult(d(this, v), this.options);
|
|
2700
|
-
if (S(this, de, d(this, v).state), S(this, Oe, this.options), d(this, de).data !== void 0 && S(this, Te, d(this, v)), Ke(r, t))
|
|
2701
|
-
return;
|
|
2702
|
-
S(this, k, r);
|
|
2703
|
-
const n = () => {
|
|
2704
|
-
if (!t)
|
|
2705
|
-
return !0;
|
|
2706
|
-
const { notifyOnChangeProps: s } = this.options, o = typeof s == "function" ? s() : s;
|
|
2707
|
-
if (o === "all" || !o && !d(this, Ce).size)
|
|
2708
|
-
return !0;
|
|
2709
|
-
const i = new Set(
|
|
2710
|
-
o ?? d(this, Ce)
|
|
2711
|
-
);
|
|
2712
|
-
return this.options.throwOnError && i.add("error"), Object.keys(d(this, k)).some((a) => {
|
|
2713
|
-
const f = a;
|
|
2714
|
-
return d(this, k)[f] !== t[f] && i.has(f);
|
|
2715
|
-
});
|
|
2716
|
-
};
|
|
2717
|
-
x(this, C, Qr).call(this, { listeners: n() });
|
|
2718
|
-
}
|
|
2719
|
-
onQueryUpdate() {
|
|
2720
|
-
this.updateResult(), this.hasListeners() && x(this, C, Et).call(this);
|
|
2721
|
-
}
|
|
2722
|
-
}, I = new WeakMap(), v = new WeakMap(), Ue = new WeakMap(), k = new WeakMap(), de = new WeakMap(), Oe = new WeakMap(), K = new WeakMap(), se = new WeakMap(), De = new WeakMap(), ve = new WeakMap(), Te = new WeakMap(), pe = new WeakMap(), me = new WeakMap(), oe = new WeakMap(), Ce = new WeakMap(), C = new WeakSet(), Ne = function(t) {
|
|
2723
|
-
x(this, C, Rt).call(this);
|
|
2724
|
-
let r = d(this, v).fetch(
|
|
2725
|
-
this.options,
|
|
2726
|
-
t
|
|
2727
|
-
);
|
|
2728
|
-
return t != null && t.throwOnError || (r = r.catch(We)), r;
|
|
2729
|
-
}, yt = function() {
|
|
2730
|
-
x(this, C, wt).call(this);
|
|
2731
|
-
const t = Le(
|
|
2732
|
-
this.options.staleTime,
|
|
2733
|
-
d(this, v)
|
|
2734
|
-
);
|
|
2735
|
-
if (_e || d(this, k).isStale || !tr(t))
|
|
2736
|
-
return;
|
|
2737
|
-
const n = no(d(this, k).dataUpdatedAt, t) + 1;
|
|
2738
|
-
S(this, pe, He.setTimeout(() => {
|
|
2739
|
-
d(this, k).isStale || this.updateResult();
|
|
2740
|
-
}, n));
|
|
2741
|
-
}, bt = function() {
|
|
2742
|
-
return (typeof this.options.refetchInterval == "function" ? this.options.refetchInterval(d(this, v)) : this.options.refetchInterval) ?? !1;
|
|
2743
|
-
}, gt = function(t) {
|
|
2744
|
-
x(this, C, St).call(this), S(this, oe, t), !(_e || $(this.options.enabled, d(this, v)) === !1 || !tr(d(this, oe)) || d(this, oe) === 0) && S(this, me, He.setInterval(() => {
|
|
2745
|
-
(this.options.refetchIntervalInBackground || io.isFocused()) && x(this, C, Ne).call(this);
|
|
2746
|
-
}, d(this, oe)));
|
|
2747
|
-
}, Et = function() {
|
|
2748
|
-
x(this, C, yt).call(this), x(this, C, gt).call(this, x(this, C, bt).call(this));
|
|
2749
|
-
}, wt = function() {
|
|
2750
|
-
d(this, pe) && (He.clearTimeout(d(this, pe)), S(this, pe, void 0));
|
|
2751
|
-
}, St = function() {
|
|
2752
|
-
d(this, me) && (He.clearInterval(d(this, me)), S(this, me, void 0));
|
|
2753
|
-
}, Rt = function() {
|
|
2754
|
-
const t = d(this, I).getQueryCache().build(d(this, I), this.options);
|
|
2755
|
-
if (t === d(this, v))
|
|
2756
|
-
return;
|
|
2757
|
-
const r = d(this, v);
|
|
2758
|
-
S(this, v, t), S(this, Ue, t.state), this.hasListeners() && (r == null || r.removeObserver(this), t.addObserver(this));
|
|
2759
|
-
}, Qr = function(t) {
|
|
2760
|
-
nt.batch(() => {
|
|
2761
|
-
t.listeners && this.listeners.forEach((r) => {
|
|
2762
|
-
r(d(this, k));
|
|
2763
|
-
}), d(this, I).getQueryCache().notify({
|
|
2764
|
-
query: d(this, v),
|
|
2765
|
-
type: "observerResultsUpdated"
|
|
2766
|
-
});
|
|
2767
|
-
});
|
|
2768
|
-
}, dr);
|
|
2769
|
-
function mo(e, t) {
|
|
2770
|
-
return $(t.enabled, e) !== !1 && e.state.data === void 0 && !(e.state.status === "error" && t.retryOnMount === !1);
|
|
2771
|
-
}
|
|
2772
|
-
function ar(e, t) {
|
|
2773
|
-
return mo(e, t) || e.state.data !== void 0 && Ot(e, t, t.refetchOnMount);
|
|
2774
|
-
}
|
|
2775
|
-
function Ot(e, t, r) {
|
|
2776
|
-
if ($(t.enabled, e) !== !1 && Le(t.staleTime, e) !== "static") {
|
|
2777
|
-
const n = typeof r == "function" ? r(e) : r;
|
|
2778
|
-
return n === "always" || n !== !1 && Lt(e, t);
|
|
2779
|
-
}
|
|
2780
|
-
return !1;
|
|
2781
|
-
}
|
|
2782
|
-
function cr(e, t, r, n) {
|
|
2783
|
-
return (e !== t || $(n.enabled, e) === !1) && (!r.suspense || e.state.status !== "error") && Lt(e, r);
|
|
2784
|
-
}
|
|
2785
|
-
function Lt(e, t) {
|
|
2786
|
-
return $(t.enabled, e) !== !1 && e.isStaleByTime(Le(t.staleTime, e));
|
|
2787
|
-
}
|
|
2788
|
-
function yo(e, t) {
|
|
2789
|
-
return !Ke(e.getCurrentResult(), t);
|
|
2790
|
-
}
|
|
2791
|
-
function bo() {
|
|
2792
|
-
return {
|
|
2793
|
-
context: void 0,
|
|
2794
|
-
data: void 0,
|
|
2795
|
-
error: null,
|
|
2796
|
-
failureCount: 0,
|
|
2797
|
-
failureReason: null,
|
|
2798
|
-
isPaused: !1,
|
|
2799
|
-
status: "idle",
|
|
2800
|
-
variables: void 0,
|
|
2801
|
-
submittedAt: 0
|
|
2802
|
-
};
|
|
2803
|
-
}
|
|
2804
|
-
var G, ie, B, X, Y, Je, vt, pr, go = (pr = class extends rt {
|
|
2805
|
-
constructor(t, r) {
|
|
2806
|
-
super();
|
|
2807
|
-
T(this, Y);
|
|
2808
|
-
T(this, G);
|
|
2809
|
-
T(this, ie);
|
|
2810
|
-
T(this, B);
|
|
2811
|
-
T(this, X);
|
|
2812
|
-
S(this, G, t), this.setOptions(r), this.bindMethods(), x(this, Y, Je).call(this);
|
|
2813
|
-
}
|
|
2814
|
-
bindMethods() {
|
|
2815
|
-
this.mutate = this.mutate.bind(this), this.reset = this.reset.bind(this);
|
|
2816
|
-
}
|
|
2817
|
-
setOptions(t) {
|
|
2818
|
-
var n;
|
|
2819
|
-
const r = this.options;
|
|
2820
|
-
this.options = d(this, G).defaultMutationOptions(t), Ke(this.options, r) || d(this, G).getMutationCache().notify({
|
|
2821
|
-
type: "observerOptionsUpdated",
|
|
2822
|
-
mutation: d(this, B),
|
|
2823
|
-
observer: this
|
|
2824
|
-
}), r != null && r.mutationKey && this.options.mutationKey && rr(r.mutationKey) !== rr(this.options.mutationKey) ? this.reset() : ((n = d(this, B)) == null ? void 0 : n.state.status) === "pending" && d(this, B).setOptions(this.options);
|
|
2825
|
-
}
|
|
2826
|
-
onUnsubscribe() {
|
|
2827
|
-
var t;
|
|
2828
|
-
this.hasListeners() || (t = d(this, B)) == null || t.removeObserver(this);
|
|
2829
|
-
}
|
|
2830
|
-
onMutationUpdate(t) {
|
|
2831
|
-
x(this, Y, Je).call(this), x(this, Y, vt).call(this, t);
|
|
2832
|
-
}
|
|
2833
|
-
getCurrentResult() {
|
|
2834
|
-
return d(this, ie);
|
|
2835
|
-
}
|
|
2836
|
-
reset() {
|
|
2837
|
-
var t;
|
|
2838
|
-
(t = d(this, B)) == null || t.removeObserver(this), S(this, B, void 0), x(this, Y, Je).call(this), x(this, Y, vt).call(this);
|
|
2839
|
-
}
|
|
2840
|
-
mutate(t, r) {
|
|
2841
|
-
var n;
|
|
2842
|
-
return S(this, X, r), (n = d(this, B)) == null || n.removeObserver(this), S(this, B, d(this, G).getMutationCache().build(d(this, G), this.options)), d(this, B).addObserver(this), d(this, B).execute(t);
|
|
2843
|
-
}
|
|
2844
|
-
}, G = new WeakMap(), ie = new WeakMap(), B = new WeakMap(), X = new WeakMap(), Y = new WeakSet(), Je = function() {
|
|
2845
|
-
var r;
|
|
2846
|
-
const t = ((r = d(this, B)) == null ? void 0 : r.state) ?? bo();
|
|
2847
|
-
S(this, ie, {
|
|
2848
|
-
...t,
|
|
2849
|
-
isPending: t.status === "pending",
|
|
2850
|
-
isSuccess: t.status === "success",
|
|
2851
|
-
isError: t.status === "error",
|
|
2852
|
-
isIdle: t.status === "idle",
|
|
2853
|
-
mutate: this.mutate,
|
|
2854
|
-
reset: this.reset
|
|
2855
|
-
});
|
|
2856
|
-
}, vt = function(t) {
|
|
2857
|
-
nt.batch(() => {
|
|
2858
|
-
var r, n, s, o, i, a, f, u;
|
|
2859
|
-
if (d(this, X) && this.hasListeners()) {
|
|
2860
|
-
const c = d(this, ie).variables, h = d(this, ie).context, y = {
|
|
2861
|
-
client: d(this, G),
|
|
2862
|
-
meta: this.options.meta,
|
|
2863
|
-
mutationKey: this.options.mutationKey
|
|
2864
|
-
};
|
|
2865
|
-
(t == null ? void 0 : t.type) === "success" ? ((n = (r = d(this, X)).onSuccess) == null || n.call(
|
|
2866
|
-
r,
|
|
2867
|
-
t.data,
|
|
2868
|
-
c,
|
|
2869
|
-
h,
|
|
2870
|
-
y
|
|
2871
|
-
), (o = (s = d(this, X)).onSettled) == null || o.call(
|
|
2872
|
-
s,
|
|
2873
|
-
t.data,
|
|
2874
|
-
null,
|
|
2875
|
-
c,
|
|
2876
|
-
h,
|
|
2877
|
-
y
|
|
2878
|
-
)) : (t == null ? void 0 : t.type) === "error" && ((a = (i = d(this, X)).onError) == null || a.call(
|
|
2879
|
-
i,
|
|
2880
|
-
t.error,
|
|
2881
|
-
c,
|
|
2882
|
-
h,
|
|
2883
|
-
y
|
|
2884
|
-
), (u = (f = d(this, X)).onSettled) == null || u.call(
|
|
2885
|
-
f,
|
|
2886
|
-
void 0,
|
|
2887
|
-
t.error,
|
|
2888
|
-
c,
|
|
2889
|
-
h,
|
|
2890
|
-
y
|
|
2891
|
-
));
|
|
2892
|
-
}
|
|
2893
|
-
this.listeners.forEach((c) => {
|
|
2894
|
-
c(d(this, ie));
|
|
2895
|
-
});
|
|
2896
|
-
});
|
|
2897
|
-
}, pr), Eo = _.createContext(
|
|
2898
|
-
void 0
|
|
2899
|
-
), Wr = (e) => {
|
|
2900
|
-
const t = _.useContext(Eo);
|
|
2901
|
-
if (!t)
|
|
2902
|
-
throw new Error("No QueryClient set, use QueryClientProvider to set one");
|
|
2903
|
-
return t;
|
|
2904
|
-
}, Kr = _.createContext(!1), wo = () => _.useContext(Kr);
|
|
2905
|
-
Kr.Provider;
|
|
2906
|
-
function So() {
|
|
2907
|
-
let e = !1;
|
|
2908
|
-
return {
|
|
2909
|
-
clearReset: () => {
|
|
2910
|
-
e = !1;
|
|
2911
|
-
},
|
|
2912
|
-
reset: () => {
|
|
2913
|
-
e = !0;
|
|
2914
|
-
},
|
|
2915
|
-
isReset: () => e
|
|
2916
|
-
};
|
|
2917
|
-
}
|
|
2918
|
-
var Ro = _.createContext(So()), Oo = () => _.useContext(Ro), vo = (e, t) => {
|
|
2919
|
-
(e.suspense || e.throwOnError || e.experimental_prefetchInRender) && (t.isReset() || (e.retryOnMount = !1));
|
|
2920
|
-
}, To = (e) => {
|
|
2921
|
-
_.useEffect(() => {
|
|
2922
|
-
e.clearReset();
|
|
2923
|
-
}, [e]);
|
|
2924
|
-
}, Co = ({
|
|
2925
|
-
result: e,
|
|
2926
|
-
errorResetBoundary: t,
|
|
2927
|
-
throwOnError: r,
|
|
2928
|
-
query: n,
|
|
2929
|
-
suspense: s
|
|
2930
|
-
}) => e.isError && !t.isReset() && !e.isFetching && n && (s && e.data === void 0 || Jr(r, [e.error, n])), Ao = (e) => {
|
|
2931
|
-
if (e.suspense) {
|
|
2932
|
-
const r = (s) => s === "static" ? s : Math.max(s ?? 1e3, 1e3), n = e.staleTime;
|
|
2933
|
-
e.staleTime = typeof n == "function" ? (...s) => r(n(...s)) : r(n), typeof e.gcTime == "number" && (e.gcTime = Math.max(
|
|
2934
|
-
e.gcTime,
|
|
2935
|
-
1e3
|
|
2936
|
-
));
|
|
2937
|
-
}
|
|
2938
|
-
}, xo = (e, t) => e.isLoading && e.isFetching && !t, Po = (e, t) => (e == null ? void 0 : e.suspense) && t.isPending, ur = (e, t, r) => t.fetchOptimistic(e).catch(() => {
|
|
2939
|
-
r.clearReset();
|
|
2940
|
-
});
|
|
2941
|
-
function Fo(e, t, r) {
|
|
2942
|
-
var h, y, g, p, b;
|
|
2943
|
-
if (process.env.NODE_ENV !== "production" && (typeof e != "object" || Array.isArray(e)))
|
|
2944
|
-
throw new Error(
|
|
2945
|
-
'Bad argument type. Starting with v5, only the "Object" form is allowed when calling query related functions. Please use the error stack to find the culprit call. More info here: https://tanstack.com/query/latest/docs/react/guides/migrating-to-v5#supports-a-single-signature-one-object'
|
|
2946
|
-
);
|
|
2947
|
-
const n = wo(), s = Oo(), o = Wr(), i = o.defaultQueryOptions(e);
|
|
2948
|
-
(y = (h = o.getDefaultOptions().queries) == null ? void 0 : h._experimental_beforeQuery) == null || y.call(
|
|
2949
|
-
h,
|
|
2950
|
-
i
|
|
2951
|
-
), process.env.NODE_ENV !== "production" && (i.queryFn || console.error(
|
|
2952
|
-
`[${i.queryHash}]: No queryFn was passed as an option, and no default queryFn was found. The queryFn parameter is only optional when using a default queryFn. More info here: https://tanstack.com/query/latest/docs/framework/react/guides/default-query-function`
|
|
2953
|
-
)), i._optimisticResults = n ? "isRestoring" : "optimistic", Ao(i), vo(i, s), To(s);
|
|
2954
|
-
const a = !o.getQueryCache().get(i.queryHash), [f] = _.useState(
|
|
2955
|
-
() => new t(
|
|
2956
|
-
o,
|
|
2957
|
-
i
|
|
2958
|
-
)
|
|
2959
|
-
), u = f.getOptimisticResult(i), c = !n && e.subscribed !== !1;
|
|
2960
|
-
if (_.useSyncExternalStore(
|
|
2961
|
-
_.useCallback(
|
|
2962
|
-
(m) => {
|
|
2963
|
-
const E = c ? f.subscribe(nt.batchCalls(m)) : We;
|
|
2964
|
-
return f.updateResult(), E;
|
|
2965
|
-
},
|
|
2966
|
-
[f, c]
|
|
2967
|
-
),
|
|
2968
|
-
() => f.getCurrentResult(),
|
|
2969
|
-
() => f.getCurrentResult()
|
|
2970
|
-
), _.useEffect(() => {
|
|
2971
|
-
f.setOptions(i);
|
|
2972
|
-
}, [i, f]), Po(i, u))
|
|
2973
|
-
throw ur(i, f, s);
|
|
2974
|
-
if (Co({
|
|
2975
|
-
result: u,
|
|
2976
|
-
errorResetBoundary: s,
|
|
2977
|
-
throwOnError: i.throwOnError,
|
|
2978
|
-
query: o.getQueryCache().get(i.queryHash),
|
|
2979
|
-
suspense: i.suspense
|
|
2980
|
-
}))
|
|
2981
|
-
throw u.error;
|
|
2982
|
-
if ((p = (g = o.getDefaultOptions().queries) == null ? void 0 : g._experimental_afterQuery) == null || p.call(
|
|
2983
|
-
g,
|
|
2984
|
-
i,
|
|
2985
|
-
u
|
|
2986
|
-
), i.experimental_prefetchInRender && !_e && xo(u, n)) {
|
|
2987
|
-
const m = a ? (
|
|
2988
|
-
// Fetch immediately on render in order to ensure `.promise` is resolved even if the component is unmounted
|
|
2989
|
-
ur(i, f, s)
|
|
2990
|
-
) : (
|
|
2991
|
-
// subscribe to the "cache promise" so that we can finalize the currentThenable once data comes in
|
|
2992
|
-
(b = o.getQueryCache().get(i.queryHash)) == null ? void 0 : b.promise
|
|
2993
|
-
);
|
|
2994
|
-
m == null || m.catch(We).finally(() => {
|
|
2995
|
-
f.updateResult();
|
|
2996
|
-
});
|
|
2997
|
-
}
|
|
2998
|
-
return i.notifyOnChangeProps ? u : f.trackResult(u);
|
|
2999
|
-
}
|
|
3000
|
-
function No(e, t) {
|
|
3001
|
-
return Fo(e, po);
|
|
3002
|
-
}
|
|
3003
|
-
function Lo(e, t) {
|
|
3004
|
-
const r = Wr(), [n] = _.useState(
|
|
3005
|
-
() => new go(
|
|
3006
|
-
r,
|
|
3007
|
-
e
|
|
3008
|
-
)
|
|
3009
|
-
);
|
|
3010
|
-
_.useEffect(() => {
|
|
3011
|
-
n.setOptions(e);
|
|
3012
|
-
}, [n, e]);
|
|
3013
|
-
const s = _.useSyncExternalStore(
|
|
3014
|
-
_.useCallback(
|
|
3015
|
-
(i) => n.subscribe(nt.batchCalls(i)),
|
|
3016
|
-
[n]
|
|
3017
|
-
),
|
|
3018
|
-
() => n.getCurrentResult(),
|
|
3019
|
-
() => n.getCurrentResult()
|
|
3020
|
-
), o = _.useCallback(
|
|
3021
|
-
(i, a) => {
|
|
3022
|
-
n.mutate(i, a).catch(We);
|
|
3023
|
-
},
|
|
3024
|
-
[n]
|
|
3025
|
-
);
|
|
3026
|
-
if (s.error && Jr(n.options.throwOnError, [s.error]))
|
|
3027
|
-
throw s.error;
|
|
3028
|
-
return { ...s, mutate: o, mutateAsync: s.mutate };
|
|
3029
|
-
}
|
|
3030
|
-
const _o = () => {
|
|
3031
|
-
const e = en(void 0);
|
|
3032
|
-
return {
|
|
3033
|
-
Provider: (n) => {
|
|
3034
|
-
const s = Tt.c(3), {
|
|
2179
|
+
Provider: (r) => {
|
|
2180
|
+
const s = W.c(3), {
|
|
3035
2181
|
children: o,
|
|
3036
2182
|
value: i
|
|
3037
|
-
} =
|
|
3038
|
-
let
|
|
3039
|
-
return s[0] !== o || s[1] !== i ? (
|
|
2183
|
+
} = r;
|
|
2184
|
+
let c;
|
|
2185
|
+
return s[0] !== o || s[1] !== i ? (c = /* @__PURE__ */ et(e.Provider, { value: i, children: o }), s[0] = o, s[1] = i, s[2] = c) : c = s[2], c;
|
|
3040
2186
|
},
|
|
3041
2187
|
useContext: () => {
|
|
3042
|
-
const
|
|
3043
|
-
if (
|
|
2188
|
+
const r = _t(e);
|
|
2189
|
+
if (r === void 0)
|
|
3044
2190
|
throw new Error("Context is missing a provider");
|
|
3045
|
-
return
|
|
2191
|
+
return r;
|
|
3046
2192
|
}
|
|
3047
2193
|
};
|
|
3048
|
-
},
|
|
3049
|
-
|
|
3050
|
-
|
|
3051
|
-
}) => {
|
|
3052
|
-
const [o, i] = tn(n);
|
|
3053
|
-
return {
|
|
3054
|
-
...No({
|
|
3055
|
-
// Ignoring type check for variable due to the following scenarios:
|
|
3056
|
-
// - Vars is an object: then variables is an object, all is good.
|
|
3057
|
-
// - Vars is optional: then variables is either an object or undefined, all is good.
|
|
3058
|
-
// - Vars is never: then variables is undefined, all is good.
|
|
3059
|
-
// Since all cases are handled, we can use any. Also, we can't check type at runtime.
|
|
3060
|
-
queryFn: () => t(o),
|
|
3061
|
-
queryKey: [e, t, o, ...s.queryKey]
|
|
3062
|
-
}),
|
|
3063
|
-
setVariables: i,
|
|
3064
|
-
variables: o
|
|
3065
|
-
};
|
|
3066
|
-
}], Uo = (e, t) => [t, (n) => Lo({
|
|
3067
|
-
...n,
|
|
3068
|
-
mutationFn: t,
|
|
3069
|
-
mutationKey: [e, t, ...n.mutationKey ?? []]
|
|
3070
|
-
})], st = (e, t, r) => {
|
|
2194
|
+
}, vt = (e, t, n) => {
|
|
2195
|
+
const r = n;
|
|
2196
|
+
return r.serviceMethodKey = t, r.serviceMethodType = e, r;
|
|
2197
|
+
}, Mr = (e, t) => vt("mutation", e, t), hs = (e, t) => vt("query", e, t), de = (e, t, n) => {
|
|
3071
2198
|
const {
|
|
3072
|
-
useContext:
|
|
2199
|
+
useContext: r,
|
|
3073
2200
|
Provider: s
|
|
3074
|
-
} =
|
|
3075
|
-
const f =
|
|
3076
|
-
let
|
|
3077
|
-
f[0] !==
|
|
3078
|
-
children:
|
|
3079
|
-
...
|
|
3080
|
-
} =
|
|
3081
|
-
const
|
|
2201
|
+
} = Br(), o = (c) => {
|
|
2202
|
+
const f = W.c(6);
|
|
2203
|
+
let l, a;
|
|
2204
|
+
f[0] !== c ? ({
|
|
2205
|
+
children: l,
|
|
2206
|
+
...a
|
|
2207
|
+
} = c, f[0] = c, f[1] = l, f[2] = a) : (l = f[1], a = f[2]);
|
|
2208
|
+
const p = t(a);
|
|
3082
2209
|
let y;
|
|
3083
|
-
return f[3] !==
|
|
2210
|
+
return f[3] !== l || f[4] !== p ? (y = /* @__PURE__ */ et(s, { value: p, children: l }), f[3] = l, f[4] = p, f[5] = y) : y = f[5], y;
|
|
3084
2211
|
};
|
|
3085
|
-
return o.serviceName = Symbol(e), o.serviceDependencies =
|
|
2212
|
+
return o.serviceName = Symbol(e), o.serviceDependencies = n, {
|
|
3086
2213
|
ServiceProvider: o,
|
|
3087
|
-
useService:
|
|
2214
|
+
useService: r
|
|
3088
2215
|
};
|
|
3089
|
-
},
|
|
2216
|
+
}, ie = (e) => e.useService(), ms = (e, t) => {
|
|
2217
|
+
const n = W.c(7);
|
|
2218
|
+
let r;
|
|
2219
|
+
n[0] !== e || n[1] !== t.mutationKey ? (r = Ze([e.serviceMethodKey, e, ...t.mutationKey ?? []]), n[0] = e, n[1] = t.mutationKey, n[2] = r) : r = n[2];
|
|
2220
|
+
let s;
|
|
2221
|
+
return n[3] !== e || n[4] !== t || n[5] !== r ? (s = {
|
|
2222
|
+
...t,
|
|
2223
|
+
mutationFn: e,
|
|
2224
|
+
mutationKey: r
|
|
2225
|
+
}, n[3] = e, n[4] = t, n[5] = r, n[6] = s) : s = n[6], Bt(s);
|
|
2226
|
+
}, ys = (e, t) => {
|
|
2227
|
+
const n = W.c(10), {
|
|
2228
|
+
initialVariables: r,
|
|
2229
|
+
...s
|
|
2230
|
+
} = t, [o, i] = kt(r);
|
|
2231
|
+
let c;
|
|
2232
|
+
n[0] !== e || n[1] !== o ? (c = () => e(o), n[0] = e, n[1] = o, n[2] = c) : c = n[2];
|
|
2233
|
+
const f = Ze([e.serviceMethodKey, e, o, ...s.queryKey]);
|
|
2234
|
+
let l;
|
|
2235
|
+
n[3] !== s || n[4] !== c || n[5] !== f ? (l = {
|
|
2236
|
+
...s,
|
|
2237
|
+
queryFn: c,
|
|
2238
|
+
queryKey: f
|
|
2239
|
+
}, n[3] = s, n[4] = c, n[5] = f, n[6] = l) : l = n[6];
|
|
2240
|
+
const a = Mt(l);
|
|
2241
|
+
let p;
|
|
2242
|
+
return n[7] !== a || n[8] !== o ? (p = {
|
|
2243
|
+
...a,
|
|
2244
|
+
setVariables: i,
|
|
2245
|
+
variables: o
|
|
2246
|
+
}, n[7] = a, n[8] = o, n[9] = p) : p = n[9], p;
|
|
2247
|
+
};
|
|
3090
2248
|
export {
|
|
3091
|
-
|
|
3092
|
-
|
|
3093
|
-
|
|
3094
|
-
|
|
3095
|
-
|
|
3096
|
-
|
|
3097
|
-
|
|
3098
|
-
|
|
3099
|
-
|
|
3100
|
-
|
|
3101
|
-
|
|
3102
|
-
|
|
3103
|
-
|
|
2249
|
+
_r as ServiceMethodType,
|
|
2250
|
+
us as createAxiosHttpAdapter,
|
|
2251
|
+
zr as createErrorService,
|
|
2252
|
+
Jr as createEventBasedErrorAdapter,
|
|
2253
|
+
Kr as createHttpService,
|
|
2254
|
+
fs as createJsLogLoggerAdapter,
|
|
2255
|
+
Pr as createLoggerBuilder,
|
|
2256
|
+
ls as createLoggerService,
|
|
2257
|
+
ps as createPosthogTrackerAdapter,
|
|
2258
|
+
de as createService,
|
|
2259
|
+
ds as createTrackerService,
|
|
2260
|
+
Mr as useBuildMutation,
|
|
2261
|
+
hs as useBuildQuery,
|
|
2262
|
+
ie as useService,
|
|
2263
|
+
ms as useServiceMutation,
|
|
2264
|
+
ys as useServiceQuery
|
|
3104
2265
|
};
|