@vezham/hooks 0.1.0
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/README.md +1 -0
- package/index.d.ts +9 -0
- package/index.mjs +2685 -0
- package/package.json +49 -0
- package/usehooks-ts/index.d.ts +3 -0
package/index.mjs
ADDED
|
@@ -0,0 +1,2685 @@
|
|
|
1
|
+
import p, { useState as ke, useCallback as J, useRef as Ne, useLayoutEffect as Qn, useEffect as _e, useMemo as Zn, forwardRef as er, isValidElement as lt } from "react";
|
|
2
|
+
import tr from "react-dom";
|
|
3
|
+
var je = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
4
|
+
function nr(e) {
|
|
5
|
+
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
6
|
+
}
|
|
7
|
+
var rr = "Expected a function", Ft = NaN, or = "[object Symbol]", sr = /^\s+|\s+$/g, ar = /^[-+]0x[0-9a-f]+$/i, ir = /^0b[01]+$/i, lr = /^0o[0-7]+$/i, cr = parseInt, ur = typeof je == "object" && je && je.Object === Object && je, dr = typeof self == "object" && self && self.Object === Object && self, fr = ur || dr || Function("return this")(), pr = Object.prototype, hr = pr.toString, mr = Math.max, gr = Math.min, ct = function() {
|
|
8
|
+
return fr.Date.now();
|
|
9
|
+
};
|
|
10
|
+
function wr(e, t, n) {
|
|
11
|
+
var r, o, s, a, i, d, u = 0, f = !1, h = !1, y = !0;
|
|
12
|
+
if (typeof e != "function")
|
|
13
|
+
throw new TypeError(rr);
|
|
14
|
+
t = jt(t) || 0, wt(n) && (f = !!n.leading, h = "maxWait" in n, s = h ? mr(jt(n.maxWait) || 0, t) : s, y = "trailing" in n ? !!n.trailing : y);
|
|
15
|
+
function l(x) {
|
|
16
|
+
var M = r, F = o;
|
|
17
|
+
return r = o = void 0, u = x, a = e.apply(F, M), a;
|
|
18
|
+
}
|
|
19
|
+
function w(x) {
|
|
20
|
+
return u = x, i = setTimeout(S, t), f ? l(x) : a;
|
|
21
|
+
}
|
|
22
|
+
function g(x) {
|
|
23
|
+
var M = x - d, F = x - u, Q = t - M;
|
|
24
|
+
return h ? gr(Q, s - F) : Q;
|
|
25
|
+
}
|
|
26
|
+
function m(x) {
|
|
27
|
+
var M = x - d, F = x - u;
|
|
28
|
+
return d === void 0 || M >= t || M < 0 || h && F >= s;
|
|
29
|
+
}
|
|
30
|
+
function S() {
|
|
31
|
+
var x = ct();
|
|
32
|
+
if (m(x))
|
|
33
|
+
return T(x);
|
|
34
|
+
i = setTimeout(S, g(x));
|
|
35
|
+
}
|
|
36
|
+
function T(x) {
|
|
37
|
+
return i = void 0, y && r ? l(x) : (r = o = void 0, a);
|
|
38
|
+
}
|
|
39
|
+
function R() {
|
|
40
|
+
i !== void 0 && clearTimeout(i), u = 0, r = d = o = i = void 0;
|
|
41
|
+
}
|
|
42
|
+
function D() {
|
|
43
|
+
return i === void 0 ? a : T(ct());
|
|
44
|
+
}
|
|
45
|
+
function _() {
|
|
46
|
+
var x = ct(), M = m(x);
|
|
47
|
+
if (r = arguments, o = this, d = x, M) {
|
|
48
|
+
if (i === void 0)
|
|
49
|
+
return w(d);
|
|
50
|
+
if (h)
|
|
51
|
+
return i = setTimeout(S, t), l(d);
|
|
52
|
+
}
|
|
53
|
+
return i === void 0 && (i = setTimeout(S, t)), a;
|
|
54
|
+
}
|
|
55
|
+
return _.cancel = R, _.flush = D, _;
|
|
56
|
+
}
|
|
57
|
+
function wt(e) {
|
|
58
|
+
var t = typeof e;
|
|
59
|
+
return !!e && (t == "object" || t == "function");
|
|
60
|
+
}
|
|
61
|
+
function yr(e) {
|
|
62
|
+
return !!e && typeof e == "object";
|
|
63
|
+
}
|
|
64
|
+
function br(e) {
|
|
65
|
+
return typeof e == "symbol" || yr(e) && hr.call(e) == or;
|
|
66
|
+
}
|
|
67
|
+
function jt(e) {
|
|
68
|
+
if (typeof e == "number")
|
|
69
|
+
return e;
|
|
70
|
+
if (br(e))
|
|
71
|
+
return Ft;
|
|
72
|
+
if (wt(e)) {
|
|
73
|
+
var t = typeof e.valueOf == "function" ? e.valueOf() : e;
|
|
74
|
+
e = wt(t) ? t + "" : t;
|
|
75
|
+
}
|
|
76
|
+
if (typeof e != "string")
|
|
77
|
+
return e === 0 ? e : +e;
|
|
78
|
+
e = e.replace(sr, "");
|
|
79
|
+
var n = ir.test(e);
|
|
80
|
+
return n || lr.test(e) ? cr(e.slice(2), n ? 2 : 8) : ar.test(e) ? Ft : +e;
|
|
81
|
+
}
|
|
82
|
+
var vr = wr;
|
|
83
|
+
const Ht = /* @__PURE__ */ nr(vr);
|
|
84
|
+
function Us(e = !1) {
|
|
85
|
+
if (typeof e != "boolean")
|
|
86
|
+
throw new Error("defaultValue must be `true` or `false`");
|
|
87
|
+
const [t, n] = ke(e), r = J(() => {
|
|
88
|
+
n(!0);
|
|
89
|
+
}, []), o = J(() => {
|
|
90
|
+
n(!1);
|
|
91
|
+
}, []), s = J(() => {
|
|
92
|
+
n((a) => !a);
|
|
93
|
+
}, []);
|
|
94
|
+
return { value: t, setValue: n, setTrue: r, setFalse: o, toggle: s };
|
|
95
|
+
}
|
|
96
|
+
var ye = typeof window < "u" ? Qn : _e;
|
|
97
|
+
function Oe(e, t, n, r) {
|
|
98
|
+
const o = Ne(t);
|
|
99
|
+
ye(() => {
|
|
100
|
+
o.current = t;
|
|
101
|
+
}, [t]), _e(() => {
|
|
102
|
+
const s = (n == null ? void 0 : n.current) ?? window;
|
|
103
|
+
if (!(s && s.addEventListener))
|
|
104
|
+
return;
|
|
105
|
+
const a = (i) => {
|
|
106
|
+
o.current(i);
|
|
107
|
+
};
|
|
108
|
+
return s.addEventListener(e, a, r), () => {
|
|
109
|
+
s.removeEventListener(e, a, r);
|
|
110
|
+
};
|
|
111
|
+
}, [e, n, r]);
|
|
112
|
+
}
|
|
113
|
+
function Ut(e) {
|
|
114
|
+
const t = Ne(() => {
|
|
115
|
+
throw new Error("Cannot call an event handler while rendering.");
|
|
116
|
+
});
|
|
117
|
+
return ye(() => {
|
|
118
|
+
t.current = e;
|
|
119
|
+
}, [e]), J((...n) => {
|
|
120
|
+
var r;
|
|
121
|
+
return (r = t.current) == null ? void 0 : r.call(t, ...n);
|
|
122
|
+
}, [t]);
|
|
123
|
+
}
|
|
124
|
+
var ut = typeof window > "u";
|
|
125
|
+
function qs(e, t, n = {}) {
|
|
126
|
+
const { initializeWithValue: r = !0 } = n, o = J(
|
|
127
|
+
(y) => n.serializer ? n.serializer(y) : JSON.stringify(y),
|
|
128
|
+
[n]
|
|
129
|
+
), s = J(
|
|
130
|
+
(y) => {
|
|
131
|
+
if (n.deserializer)
|
|
132
|
+
return n.deserializer(y);
|
|
133
|
+
if (y === "undefined")
|
|
134
|
+
return;
|
|
135
|
+
const l = t instanceof Function ? t() : t;
|
|
136
|
+
let w;
|
|
137
|
+
try {
|
|
138
|
+
w = JSON.parse(y);
|
|
139
|
+
} catch (g) {
|
|
140
|
+
return console.error("Error parsing JSON:", g), l;
|
|
141
|
+
}
|
|
142
|
+
return w;
|
|
143
|
+
},
|
|
144
|
+
[n, t]
|
|
145
|
+
), a = J(() => {
|
|
146
|
+
const y = t instanceof Function ? t() : t;
|
|
147
|
+
if (ut)
|
|
148
|
+
return y;
|
|
149
|
+
try {
|
|
150
|
+
const l = window.localStorage.getItem(e);
|
|
151
|
+
return l ? s(l) : y;
|
|
152
|
+
} catch (l) {
|
|
153
|
+
return console.warn(`Error reading localStorage key “${e}”:`, l), y;
|
|
154
|
+
}
|
|
155
|
+
}, [t, e, s]), [i, d] = ke(() => r ? a() : t instanceof Function ? t() : t), u = Ut((y) => {
|
|
156
|
+
ut && console.warn(
|
|
157
|
+
`Tried setting localStorage key “${e}” even though environment is not a client`
|
|
158
|
+
);
|
|
159
|
+
try {
|
|
160
|
+
const l = y instanceof Function ? y(a()) : y;
|
|
161
|
+
window.localStorage.setItem(e, o(l)), d(l), window.dispatchEvent(new StorageEvent("local-storage", { key: e }));
|
|
162
|
+
} catch (l) {
|
|
163
|
+
console.warn(`Error setting localStorage key “${e}”:`, l);
|
|
164
|
+
}
|
|
165
|
+
}), f = Ut(() => {
|
|
166
|
+
ut && console.warn(
|
|
167
|
+
`Tried removing localStorage key “${e}” even though environment is not a client`
|
|
168
|
+
);
|
|
169
|
+
const y = t instanceof Function ? t() : t;
|
|
170
|
+
window.localStorage.removeItem(e), d(y), window.dispatchEvent(new StorageEvent("local-storage", { key: e }));
|
|
171
|
+
});
|
|
172
|
+
_e(() => {
|
|
173
|
+
d(a());
|
|
174
|
+
}, [e]);
|
|
175
|
+
const h = J(
|
|
176
|
+
(y) => {
|
|
177
|
+
y.key && y.key !== e || d(a());
|
|
178
|
+
},
|
|
179
|
+
[e, a]
|
|
180
|
+
);
|
|
181
|
+
return Oe("storage", h), Oe("local-storage", h), [i, u, f];
|
|
182
|
+
}
|
|
183
|
+
var xr = typeof window > "u";
|
|
184
|
+
function zs(e, {
|
|
185
|
+
defaultValue: t = !1,
|
|
186
|
+
initializeWithValue: n = !0
|
|
187
|
+
} = {}) {
|
|
188
|
+
const r = (i) => xr ? t : window.matchMedia(i).matches, [o, s] = ke(() => n ? r(e) : t);
|
|
189
|
+
function a() {
|
|
190
|
+
s(r(e));
|
|
191
|
+
}
|
|
192
|
+
return ye(() => {
|
|
193
|
+
const i = window.matchMedia(e);
|
|
194
|
+
return a(), i.addListener ? i.addListener(a) : i.addEventListener("change", a), () => {
|
|
195
|
+
i.removeListener ? i.removeListener(a) : i.removeEventListener("change", a);
|
|
196
|
+
};
|
|
197
|
+
}, [e]), o;
|
|
198
|
+
}
|
|
199
|
+
function un(e) {
|
|
200
|
+
const t = Ne(e);
|
|
201
|
+
t.current = e, _e(
|
|
202
|
+
() => () => {
|
|
203
|
+
t.current();
|
|
204
|
+
},
|
|
205
|
+
[]
|
|
206
|
+
);
|
|
207
|
+
}
|
|
208
|
+
function Er(e, t = 500, n) {
|
|
209
|
+
const r = Ne();
|
|
210
|
+
un(() => {
|
|
211
|
+
r.current && r.current.cancel();
|
|
212
|
+
});
|
|
213
|
+
const o = Zn(() => {
|
|
214
|
+
const s = Ht(e, t, n), a = (...i) => s(...i);
|
|
215
|
+
return a.cancel = () => {
|
|
216
|
+
s.cancel();
|
|
217
|
+
}, a.isPending = () => !!r.current, a.flush = () => s.flush(), a;
|
|
218
|
+
}, [e, t, n]);
|
|
219
|
+
return _e(() => {
|
|
220
|
+
r.current = Ht(e, t, n);
|
|
221
|
+
}, [e, t, n]), o;
|
|
222
|
+
}
|
|
223
|
+
function $s(e, t = {}) {
|
|
224
|
+
const { preserveTitleOnUnmount: n = !0 } = t, r = Ne(null);
|
|
225
|
+
ye(() => {
|
|
226
|
+
r.current = window.document.title;
|
|
227
|
+
}, []), ye(() => {
|
|
228
|
+
window.document.title = e;
|
|
229
|
+
}, [e]), un(() => {
|
|
230
|
+
!n && r.current && (window.document.title = r.current);
|
|
231
|
+
});
|
|
232
|
+
}
|
|
233
|
+
function Ws(e = /* @__PURE__ */ new Map()) {
|
|
234
|
+
const [t, n] = ke(new Map(e)), r = {
|
|
235
|
+
set: J((o, s) => {
|
|
236
|
+
n((a) => {
|
|
237
|
+
const i = new Map(a);
|
|
238
|
+
return i.set(o, s), i;
|
|
239
|
+
});
|
|
240
|
+
}, []),
|
|
241
|
+
setAll: J((o) => {
|
|
242
|
+
n(() => new Map(o));
|
|
243
|
+
}, []),
|
|
244
|
+
remove: J((o) => {
|
|
245
|
+
n((s) => {
|
|
246
|
+
const a = new Map(s);
|
|
247
|
+
return a.delete(o), a;
|
|
248
|
+
});
|
|
249
|
+
}, []),
|
|
250
|
+
reset: J(() => {
|
|
251
|
+
n(() => /* @__PURE__ */ new Map());
|
|
252
|
+
}, [])
|
|
253
|
+
};
|
|
254
|
+
return [t, r];
|
|
255
|
+
}
|
|
256
|
+
function Js(e, t, n = "mousedown", r = {}) {
|
|
257
|
+
Oe(
|
|
258
|
+
n,
|
|
259
|
+
(o) => {
|
|
260
|
+
const s = o.target;
|
|
261
|
+
if (!s || !s.isConnected)
|
|
262
|
+
return;
|
|
263
|
+
(Array.isArray(e) ? e.filter((i) => !!i.current).every((i) => i.current && !i.current.contains(s)) : e.current && !e.current.contains(s)) && t(o);
|
|
264
|
+
},
|
|
265
|
+
void 0,
|
|
266
|
+
r
|
|
267
|
+
);
|
|
268
|
+
}
|
|
269
|
+
var Sr = typeof window > "u";
|
|
270
|
+
function Vs(e = {}) {
|
|
271
|
+
let { initializeWithValue: t = !0 } = e;
|
|
272
|
+
Sr && (t = !1);
|
|
273
|
+
const [n, r] = ke(() => t ? {
|
|
274
|
+
width: window.innerWidth,
|
|
275
|
+
height: window.innerHeight
|
|
276
|
+
} : {
|
|
277
|
+
width: void 0,
|
|
278
|
+
height: void 0
|
|
279
|
+
}), o = Er(
|
|
280
|
+
r,
|
|
281
|
+
e.debounceDelay
|
|
282
|
+
);
|
|
283
|
+
function s() {
|
|
284
|
+
(e.debounceDelay ? o : r)({
|
|
285
|
+
width: window.innerWidth,
|
|
286
|
+
height: window.innerHeight
|
|
287
|
+
});
|
|
288
|
+
}
|
|
289
|
+
return Oe("resize", s), ye(() => {
|
|
290
|
+
s();
|
|
291
|
+
}, []), n;
|
|
292
|
+
}
|
|
293
|
+
function dn(e, t) {
|
|
294
|
+
return function() {
|
|
295
|
+
return e.apply(t, arguments);
|
|
296
|
+
};
|
|
297
|
+
}
|
|
298
|
+
const { toString: Tr } = Object.prototype, { getPrototypeOf: At } = Object, Ye = /* @__PURE__ */ ((e) => (t) => {
|
|
299
|
+
const n = Tr.call(t);
|
|
300
|
+
return e[n] || (e[n] = n.slice(8, -1).toLowerCase());
|
|
301
|
+
})(/* @__PURE__ */ Object.create(null)), G = (e) => (e = e.toLowerCase(), (t) => Ye(t) === e), Xe = (e) => (t) => typeof t === e, { isArray: be } = Array, Ae = Xe("undefined");
|
|
302
|
+
function Rr(e) {
|
|
303
|
+
return e !== null && !Ae(e) && e.constructor !== null && !Ae(e.constructor) && z(e.constructor.isBuffer) && e.constructor.isBuffer(e);
|
|
304
|
+
}
|
|
305
|
+
const fn = G("ArrayBuffer");
|
|
306
|
+
function Or(e) {
|
|
307
|
+
let t;
|
|
308
|
+
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer && fn(e.buffer), t;
|
|
309
|
+
}
|
|
310
|
+
const Ar = Xe("string"), z = Xe("function"), pn = Xe("number"), Ge = (e) => e !== null && typeof e == "object", kr = (e) => e === !0 || e === !1, $e = (e) => {
|
|
311
|
+
if (Ye(e) !== "object")
|
|
312
|
+
return !1;
|
|
313
|
+
const t = At(e);
|
|
314
|
+
return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(Symbol.toStringTag in e) && !(Symbol.iterator in e);
|
|
315
|
+
}, Nr = G("Date"), _r = G("File"), Lr = G("Blob"), Cr = G("FileList"), Mr = (e) => Ge(e) && z(e.pipe), Pr = (e) => {
|
|
316
|
+
let t;
|
|
317
|
+
return e && (typeof FormData == "function" && e instanceof FormData || z(e.append) && ((t = Ye(e)) === "formdata" || // detect form-data instance
|
|
318
|
+
t === "object" && z(e.toString) && e.toString() === "[object FormData]"));
|
|
319
|
+
}, Br = G("URLSearchParams"), [Ir, Dr, Fr, jr] = ["ReadableStream", "Request", "Response", "Headers"].map(G), Hr = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
|
|
320
|
+
function Le(e, t, { allOwnKeys: n = !1 } = {}) {
|
|
321
|
+
if (e === null || typeof e > "u")
|
|
322
|
+
return;
|
|
323
|
+
let r, o;
|
|
324
|
+
if (typeof e != "object" && (e = [e]), be(e))
|
|
325
|
+
for (r = 0, o = e.length; r < o; r++)
|
|
326
|
+
t.call(null, e[r], r, e);
|
|
327
|
+
else {
|
|
328
|
+
const s = n ? Object.getOwnPropertyNames(e) : Object.keys(e), a = s.length;
|
|
329
|
+
let i;
|
|
330
|
+
for (r = 0; r < a; r++)
|
|
331
|
+
i = s[r], t.call(null, e[i], i, e);
|
|
332
|
+
}
|
|
333
|
+
}
|
|
334
|
+
function hn(e, t) {
|
|
335
|
+
t = t.toLowerCase();
|
|
336
|
+
const n = Object.keys(e);
|
|
337
|
+
let r = n.length, o;
|
|
338
|
+
for (; r-- > 0; )
|
|
339
|
+
if (o = n[r], t === o.toLowerCase())
|
|
340
|
+
return o;
|
|
341
|
+
return null;
|
|
342
|
+
}
|
|
343
|
+
const ce = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, mn = (e) => !Ae(e) && e !== ce;
|
|
344
|
+
function yt() {
|
|
345
|
+
const { caseless: e } = mn(this) && this || {}, t = {}, n = (r, o) => {
|
|
346
|
+
const s = e && hn(t, o) || o;
|
|
347
|
+
$e(t[s]) && $e(r) ? t[s] = yt(t[s], r) : $e(r) ? t[s] = yt({}, r) : be(r) ? t[s] = r.slice() : t[s] = r;
|
|
348
|
+
};
|
|
349
|
+
for (let r = 0, o = arguments.length; r < o; r++)
|
|
350
|
+
arguments[r] && Le(arguments[r], n);
|
|
351
|
+
return t;
|
|
352
|
+
}
|
|
353
|
+
const Ur = (e, t, n, { allOwnKeys: r } = {}) => (Le(t, (o, s) => {
|
|
354
|
+
n && z(o) ? e[s] = dn(o, n) : e[s] = o;
|
|
355
|
+
}, { allOwnKeys: r }), e), qr = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e), zr = (e, t, n, r) => {
|
|
356
|
+
e.prototype = Object.create(t.prototype, r), e.prototype.constructor = e, Object.defineProperty(e, "super", {
|
|
357
|
+
value: t.prototype
|
|
358
|
+
}), n && Object.assign(e.prototype, n);
|
|
359
|
+
}, $r = (e, t, n, r) => {
|
|
360
|
+
let o, s, a;
|
|
361
|
+
const i = {};
|
|
362
|
+
if (t = t || {}, e == null) return t;
|
|
363
|
+
do {
|
|
364
|
+
for (o = Object.getOwnPropertyNames(e), s = o.length; s-- > 0; )
|
|
365
|
+
a = o[s], (!r || r(a, e, t)) && !i[a] && (t[a] = e[a], i[a] = !0);
|
|
366
|
+
e = n !== !1 && At(e);
|
|
367
|
+
} while (e && (!n || n(e, t)) && e !== Object.prototype);
|
|
368
|
+
return t;
|
|
369
|
+
}, Wr = (e, t, n) => {
|
|
370
|
+
e = String(e), (n === void 0 || n > e.length) && (n = e.length), n -= t.length;
|
|
371
|
+
const r = e.indexOf(t, n);
|
|
372
|
+
return r !== -1 && r === n;
|
|
373
|
+
}, Jr = (e) => {
|
|
374
|
+
if (!e) return null;
|
|
375
|
+
if (be(e)) return e;
|
|
376
|
+
let t = e.length;
|
|
377
|
+
if (!pn(t)) return null;
|
|
378
|
+
const n = new Array(t);
|
|
379
|
+
for (; t-- > 0; )
|
|
380
|
+
n[t] = e[t];
|
|
381
|
+
return n;
|
|
382
|
+
}, Vr = /* @__PURE__ */ ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" && At(Uint8Array)), Kr = (e, t) => {
|
|
383
|
+
const r = (e && e[Symbol.iterator]).call(e);
|
|
384
|
+
let o;
|
|
385
|
+
for (; (o = r.next()) && !o.done; ) {
|
|
386
|
+
const s = o.value;
|
|
387
|
+
t.call(e, s[0], s[1]);
|
|
388
|
+
}
|
|
389
|
+
}, Yr = (e, t) => {
|
|
390
|
+
let n;
|
|
391
|
+
const r = [];
|
|
392
|
+
for (; (n = e.exec(t)) !== null; )
|
|
393
|
+
r.push(n);
|
|
394
|
+
return r;
|
|
395
|
+
}, Xr = G("HTMLFormElement"), Gr = (e) => e.toLowerCase().replace(
|
|
396
|
+
/[-_\s]([a-z\d])(\w*)/g,
|
|
397
|
+
function(n, r, o) {
|
|
398
|
+
return r.toUpperCase() + o;
|
|
399
|
+
}
|
|
400
|
+
), qt = (({ hasOwnProperty: e }) => (t, n) => e.call(t, n))(Object.prototype), Qr = G("RegExp"), gn = (e, t) => {
|
|
401
|
+
const n = Object.getOwnPropertyDescriptors(e), r = {};
|
|
402
|
+
Le(n, (o, s) => {
|
|
403
|
+
let a;
|
|
404
|
+
(a = t(o, s, e)) !== !1 && (r[s] = a || o);
|
|
405
|
+
}), Object.defineProperties(e, r);
|
|
406
|
+
}, Zr = (e) => {
|
|
407
|
+
gn(e, (t, n) => {
|
|
408
|
+
if (z(e) && ["arguments", "caller", "callee"].indexOf(n) !== -1)
|
|
409
|
+
return !1;
|
|
410
|
+
const r = e[n];
|
|
411
|
+
if (z(r)) {
|
|
412
|
+
if (t.enumerable = !1, "writable" in t) {
|
|
413
|
+
t.writable = !1;
|
|
414
|
+
return;
|
|
415
|
+
}
|
|
416
|
+
t.set || (t.set = () => {
|
|
417
|
+
throw Error("Can not rewrite read-only method '" + n + "'");
|
|
418
|
+
});
|
|
419
|
+
}
|
|
420
|
+
});
|
|
421
|
+
}, eo = (e, t) => {
|
|
422
|
+
const n = {}, r = (o) => {
|
|
423
|
+
o.forEach((s) => {
|
|
424
|
+
n[s] = !0;
|
|
425
|
+
});
|
|
426
|
+
};
|
|
427
|
+
return be(e) ? r(e) : r(String(e).split(t)), n;
|
|
428
|
+
}, to = () => {
|
|
429
|
+
}, no = (e, t) => e != null && Number.isFinite(e = +e) ? e : t, dt = "abcdefghijklmnopqrstuvwxyz", zt = "0123456789", wn = {
|
|
430
|
+
DIGIT: zt,
|
|
431
|
+
ALPHA: dt,
|
|
432
|
+
ALPHA_DIGIT: dt + dt.toUpperCase() + zt
|
|
433
|
+
}, ro = (e = 16, t = wn.ALPHA_DIGIT) => {
|
|
434
|
+
let n = "";
|
|
435
|
+
const { length: r } = t;
|
|
436
|
+
for (; e--; )
|
|
437
|
+
n += t[Math.random() * r | 0];
|
|
438
|
+
return n;
|
|
439
|
+
};
|
|
440
|
+
function oo(e) {
|
|
441
|
+
return !!(e && z(e.append) && e[Symbol.toStringTag] === "FormData" && e[Symbol.iterator]);
|
|
442
|
+
}
|
|
443
|
+
const so = (e) => {
|
|
444
|
+
const t = new Array(10), n = (r, o) => {
|
|
445
|
+
if (Ge(r)) {
|
|
446
|
+
if (t.indexOf(r) >= 0)
|
|
447
|
+
return;
|
|
448
|
+
if (!("toJSON" in r)) {
|
|
449
|
+
t[o] = r;
|
|
450
|
+
const s = be(r) ? [] : {};
|
|
451
|
+
return Le(r, (a, i) => {
|
|
452
|
+
const d = n(a, o + 1);
|
|
453
|
+
!Ae(d) && (s[i] = d);
|
|
454
|
+
}), t[o] = void 0, s;
|
|
455
|
+
}
|
|
456
|
+
}
|
|
457
|
+
return r;
|
|
458
|
+
};
|
|
459
|
+
return n(e, 0);
|
|
460
|
+
}, ao = G("AsyncFunction"), io = (e) => e && (Ge(e) || z(e)) && z(e.then) && z(e.catch), yn = ((e, t) => e ? setImmediate : t ? ((n, r) => (ce.addEventListener("message", ({ source: o, data: s }) => {
|
|
461
|
+
o === ce && s === n && r.length && r.shift()();
|
|
462
|
+
}, !1), (o) => {
|
|
463
|
+
r.push(o), ce.postMessage(n, "*");
|
|
464
|
+
}))(`axios@${Math.random()}`, []) : (n) => setTimeout(n))(
|
|
465
|
+
typeof setImmediate == "function",
|
|
466
|
+
z(ce.postMessage)
|
|
467
|
+
), lo = typeof queueMicrotask < "u" ? queueMicrotask.bind(ce) : typeof process < "u" && process.nextTick || yn, c = {
|
|
468
|
+
isArray: be,
|
|
469
|
+
isArrayBuffer: fn,
|
|
470
|
+
isBuffer: Rr,
|
|
471
|
+
isFormData: Pr,
|
|
472
|
+
isArrayBufferView: Or,
|
|
473
|
+
isString: Ar,
|
|
474
|
+
isNumber: pn,
|
|
475
|
+
isBoolean: kr,
|
|
476
|
+
isObject: Ge,
|
|
477
|
+
isPlainObject: $e,
|
|
478
|
+
isReadableStream: Ir,
|
|
479
|
+
isRequest: Dr,
|
|
480
|
+
isResponse: Fr,
|
|
481
|
+
isHeaders: jr,
|
|
482
|
+
isUndefined: Ae,
|
|
483
|
+
isDate: Nr,
|
|
484
|
+
isFile: _r,
|
|
485
|
+
isBlob: Lr,
|
|
486
|
+
isRegExp: Qr,
|
|
487
|
+
isFunction: z,
|
|
488
|
+
isStream: Mr,
|
|
489
|
+
isURLSearchParams: Br,
|
|
490
|
+
isTypedArray: Vr,
|
|
491
|
+
isFileList: Cr,
|
|
492
|
+
forEach: Le,
|
|
493
|
+
merge: yt,
|
|
494
|
+
extend: Ur,
|
|
495
|
+
trim: Hr,
|
|
496
|
+
stripBOM: qr,
|
|
497
|
+
inherits: zr,
|
|
498
|
+
toFlatObject: $r,
|
|
499
|
+
kindOf: Ye,
|
|
500
|
+
kindOfTest: G,
|
|
501
|
+
endsWith: Wr,
|
|
502
|
+
toArray: Jr,
|
|
503
|
+
forEachEntry: Kr,
|
|
504
|
+
matchAll: Yr,
|
|
505
|
+
isHTMLForm: Xr,
|
|
506
|
+
hasOwnProperty: qt,
|
|
507
|
+
hasOwnProp: qt,
|
|
508
|
+
// an alias to avoid ESLint no-prototype-builtins detection
|
|
509
|
+
reduceDescriptors: gn,
|
|
510
|
+
freezeMethods: Zr,
|
|
511
|
+
toObjectSet: eo,
|
|
512
|
+
toCamelCase: Gr,
|
|
513
|
+
noop: to,
|
|
514
|
+
toFiniteNumber: no,
|
|
515
|
+
findKey: hn,
|
|
516
|
+
global: ce,
|
|
517
|
+
isContextDefined: mn,
|
|
518
|
+
ALPHABET: wn,
|
|
519
|
+
generateString: ro,
|
|
520
|
+
isSpecCompliantForm: oo,
|
|
521
|
+
toJSONObject: so,
|
|
522
|
+
isAsyncFn: ao,
|
|
523
|
+
isThenable: io,
|
|
524
|
+
setImmediate: yn,
|
|
525
|
+
asap: lo
|
|
526
|
+
};
|
|
527
|
+
function v(e, t, n, r, o) {
|
|
528
|
+
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), o && (this.response = o, this.status = o.status ? o.status : null);
|
|
529
|
+
}
|
|
530
|
+
c.inherits(v, Error, {
|
|
531
|
+
toJSON: function() {
|
|
532
|
+
return {
|
|
533
|
+
// Standard
|
|
534
|
+
message: this.message,
|
|
535
|
+
name: this.name,
|
|
536
|
+
// Microsoft
|
|
537
|
+
description: this.description,
|
|
538
|
+
number: this.number,
|
|
539
|
+
// Mozilla
|
|
540
|
+
fileName: this.fileName,
|
|
541
|
+
lineNumber: this.lineNumber,
|
|
542
|
+
columnNumber: this.columnNumber,
|
|
543
|
+
stack: this.stack,
|
|
544
|
+
// Axios
|
|
545
|
+
config: c.toJSONObject(this.config),
|
|
546
|
+
code: this.code,
|
|
547
|
+
status: this.status
|
|
548
|
+
};
|
|
549
|
+
}
|
|
550
|
+
});
|
|
551
|
+
const bn = v.prototype, vn = {};
|
|
552
|
+
[
|
|
553
|
+
"ERR_BAD_OPTION_VALUE",
|
|
554
|
+
"ERR_BAD_OPTION",
|
|
555
|
+
"ECONNABORTED",
|
|
556
|
+
"ETIMEDOUT",
|
|
557
|
+
"ERR_NETWORK",
|
|
558
|
+
"ERR_FR_TOO_MANY_REDIRECTS",
|
|
559
|
+
"ERR_DEPRECATED",
|
|
560
|
+
"ERR_BAD_RESPONSE",
|
|
561
|
+
"ERR_BAD_REQUEST",
|
|
562
|
+
"ERR_CANCELED",
|
|
563
|
+
"ERR_NOT_SUPPORT",
|
|
564
|
+
"ERR_INVALID_URL"
|
|
565
|
+
// eslint-disable-next-line func-names
|
|
566
|
+
].forEach((e) => {
|
|
567
|
+
vn[e] = { value: e };
|
|
568
|
+
});
|
|
569
|
+
Object.defineProperties(v, vn);
|
|
570
|
+
Object.defineProperty(bn, "isAxiosError", { value: !0 });
|
|
571
|
+
v.from = (e, t, n, r, o, s) => {
|
|
572
|
+
const a = Object.create(bn);
|
|
573
|
+
return c.toFlatObject(e, a, function(d) {
|
|
574
|
+
return d !== Error.prototype;
|
|
575
|
+
}, (i) => i !== "isAxiosError"), v.call(a, e.message, t, n, r, o), a.cause = e, a.name = e.name, s && Object.assign(a, s), a;
|
|
576
|
+
};
|
|
577
|
+
const co = null;
|
|
578
|
+
function bt(e) {
|
|
579
|
+
return c.isPlainObject(e) || c.isArray(e);
|
|
580
|
+
}
|
|
581
|
+
function xn(e) {
|
|
582
|
+
return c.endsWith(e, "[]") ? e.slice(0, -2) : e;
|
|
583
|
+
}
|
|
584
|
+
function $t(e, t, n) {
|
|
585
|
+
return e ? e.concat(t).map(function(o, s) {
|
|
586
|
+
return o = xn(o), !n && s ? "[" + o + "]" : o;
|
|
587
|
+
}).join(n ? "." : "") : t;
|
|
588
|
+
}
|
|
589
|
+
function uo(e) {
|
|
590
|
+
return c.isArray(e) && !e.some(bt);
|
|
591
|
+
}
|
|
592
|
+
const fo = c.toFlatObject(c, {}, null, function(t) {
|
|
593
|
+
return /^is[A-Z]/.test(t);
|
|
594
|
+
});
|
|
595
|
+
function Qe(e, t, n) {
|
|
596
|
+
if (!c.isObject(e))
|
|
597
|
+
throw new TypeError("target must be an object");
|
|
598
|
+
t = t || new FormData(), n = c.toFlatObject(n, {
|
|
599
|
+
metaTokens: !0,
|
|
600
|
+
dots: !1,
|
|
601
|
+
indexes: !1
|
|
602
|
+
}, !1, function(g, m) {
|
|
603
|
+
return !c.isUndefined(m[g]);
|
|
604
|
+
});
|
|
605
|
+
const r = n.metaTokens, o = n.visitor || f, s = n.dots, a = n.indexes, d = (n.Blob || typeof Blob < "u" && Blob) && c.isSpecCompliantForm(t);
|
|
606
|
+
if (!c.isFunction(o))
|
|
607
|
+
throw new TypeError("visitor must be a function");
|
|
608
|
+
function u(w) {
|
|
609
|
+
if (w === null) return "";
|
|
610
|
+
if (c.isDate(w))
|
|
611
|
+
return w.toISOString();
|
|
612
|
+
if (!d && c.isBlob(w))
|
|
613
|
+
throw new v("Blob is not supported. Use a Buffer instead.");
|
|
614
|
+
return c.isArrayBuffer(w) || c.isTypedArray(w) ? d && typeof Blob == "function" ? new Blob([w]) : Buffer.from(w) : w;
|
|
615
|
+
}
|
|
616
|
+
function f(w, g, m) {
|
|
617
|
+
let S = w;
|
|
618
|
+
if (w && !m && typeof w == "object") {
|
|
619
|
+
if (c.endsWith(g, "{}"))
|
|
620
|
+
g = r ? g : g.slice(0, -2), w = JSON.stringify(w);
|
|
621
|
+
else if (c.isArray(w) && uo(w) || (c.isFileList(w) || c.endsWith(g, "[]")) && (S = c.toArray(w)))
|
|
622
|
+
return g = xn(g), S.forEach(function(R, D) {
|
|
623
|
+
!(c.isUndefined(R) || R === null) && t.append(
|
|
624
|
+
// eslint-disable-next-line no-nested-ternary
|
|
625
|
+
a === !0 ? $t([g], D, s) : a === null ? g : g + "[]",
|
|
626
|
+
u(R)
|
|
627
|
+
);
|
|
628
|
+
}), !1;
|
|
629
|
+
}
|
|
630
|
+
return bt(w) ? !0 : (t.append($t(m, g, s), u(w)), !1);
|
|
631
|
+
}
|
|
632
|
+
const h = [], y = Object.assign(fo, {
|
|
633
|
+
defaultVisitor: f,
|
|
634
|
+
convertValue: u,
|
|
635
|
+
isVisitable: bt
|
|
636
|
+
});
|
|
637
|
+
function l(w, g) {
|
|
638
|
+
if (!c.isUndefined(w)) {
|
|
639
|
+
if (h.indexOf(w) !== -1)
|
|
640
|
+
throw Error("Circular reference detected in " + g.join("."));
|
|
641
|
+
h.push(w), c.forEach(w, function(S, T) {
|
|
642
|
+
(!(c.isUndefined(S) || S === null) && o.call(
|
|
643
|
+
t,
|
|
644
|
+
S,
|
|
645
|
+
c.isString(T) ? T.trim() : T,
|
|
646
|
+
g,
|
|
647
|
+
y
|
|
648
|
+
)) === !0 && l(S, g ? g.concat(T) : [T]);
|
|
649
|
+
}), h.pop();
|
|
650
|
+
}
|
|
651
|
+
}
|
|
652
|
+
if (!c.isObject(e))
|
|
653
|
+
throw new TypeError("data must be an object");
|
|
654
|
+
return l(e), t;
|
|
655
|
+
}
|
|
656
|
+
function Wt(e) {
|
|
657
|
+
const t = {
|
|
658
|
+
"!": "%21",
|
|
659
|
+
"'": "%27",
|
|
660
|
+
"(": "%28",
|
|
661
|
+
")": "%29",
|
|
662
|
+
"~": "%7E",
|
|
663
|
+
"%20": "+",
|
|
664
|
+
"%00": "\0"
|
|
665
|
+
};
|
|
666
|
+
return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g, function(r) {
|
|
667
|
+
return t[r];
|
|
668
|
+
});
|
|
669
|
+
}
|
|
670
|
+
function kt(e, t) {
|
|
671
|
+
this._pairs = [], e && Qe(e, this, t);
|
|
672
|
+
}
|
|
673
|
+
const En = kt.prototype;
|
|
674
|
+
En.append = function(t, n) {
|
|
675
|
+
this._pairs.push([t, n]);
|
|
676
|
+
};
|
|
677
|
+
En.toString = function(t) {
|
|
678
|
+
const n = t ? function(r) {
|
|
679
|
+
return t.call(this, r, Wt);
|
|
680
|
+
} : Wt;
|
|
681
|
+
return this._pairs.map(function(o) {
|
|
682
|
+
return n(o[0]) + "=" + n(o[1]);
|
|
683
|
+
}, "").join("&");
|
|
684
|
+
};
|
|
685
|
+
function po(e) {
|
|
686
|
+
return encodeURIComponent(e).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]");
|
|
687
|
+
}
|
|
688
|
+
function Sn(e, t, n) {
|
|
689
|
+
if (!t)
|
|
690
|
+
return e;
|
|
691
|
+
const r = n && n.encode || po;
|
|
692
|
+
c.isFunction(n) && (n = {
|
|
693
|
+
serialize: n
|
|
694
|
+
});
|
|
695
|
+
const o = n && n.serialize;
|
|
696
|
+
let s;
|
|
697
|
+
if (o ? s = o(t, n) : s = c.isURLSearchParams(t) ? t.toString() : new kt(t, n).toString(r), s) {
|
|
698
|
+
const a = e.indexOf("#");
|
|
699
|
+
a !== -1 && (e = e.slice(0, a)), e += (e.indexOf("?") === -1 ? "?" : "&") + s;
|
|
700
|
+
}
|
|
701
|
+
return e;
|
|
702
|
+
}
|
|
703
|
+
class Jt {
|
|
704
|
+
constructor() {
|
|
705
|
+
this.handlers = [];
|
|
706
|
+
}
|
|
707
|
+
/**
|
|
708
|
+
* Add a new interceptor to the stack
|
|
709
|
+
*
|
|
710
|
+
* @param {Function} fulfilled The function to handle `then` for a `Promise`
|
|
711
|
+
* @param {Function} rejected The function to handle `reject` for a `Promise`
|
|
712
|
+
*
|
|
713
|
+
* @return {Number} An ID used to remove interceptor later
|
|
714
|
+
*/
|
|
715
|
+
use(t, n, r) {
|
|
716
|
+
return this.handlers.push({
|
|
717
|
+
fulfilled: t,
|
|
718
|
+
rejected: n,
|
|
719
|
+
synchronous: r ? r.synchronous : !1,
|
|
720
|
+
runWhen: r ? r.runWhen : null
|
|
721
|
+
}), this.handlers.length - 1;
|
|
722
|
+
}
|
|
723
|
+
/**
|
|
724
|
+
* Remove an interceptor from the stack
|
|
725
|
+
*
|
|
726
|
+
* @param {Number} id The ID that was returned by `use`
|
|
727
|
+
*
|
|
728
|
+
* @returns {Boolean} `true` if the interceptor was removed, `false` otherwise
|
|
729
|
+
*/
|
|
730
|
+
eject(t) {
|
|
731
|
+
this.handlers[t] && (this.handlers[t] = null);
|
|
732
|
+
}
|
|
733
|
+
/**
|
|
734
|
+
* Clear all interceptors from the stack
|
|
735
|
+
*
|
|
736
|
+
* @returns {void}
|
|
737
|
+
*/
|
|
738
|
+
clear() {
|
|
739
|
+
this.handlers && (this.handlers = []);
|
|
740
|
+
}
|
|
741
|
+
/**
|
|
742
|
+
* Iterate over all the registered interceptors
|
|
743
|
+
*
|
|
744
|
+
* This method is particularly useful for skipping over any
|
|
745
|
+
* interceptors that may have become `null` calling `eject`.
|
|
746
|
+
*
|
|
747
|
+
* @param {Function} fn The function to call for each interceptor
|
|
748
|
+
*
|
|
749
|
+
* @returns {void}
|
|
750
|
+
*/
|
|
751
|
+
forEach(t) {
|
|
752
|
+
c.forEach(this.handlers, function(r) {
|
|
753
|
+
r !== null && t(r);
|
|
754
|
+
});
|
|
755
|
+
}
|
|
756
|
+
}
|
|
757
|
+
const Tn = {
|
|
758
|
+
silentJSONParsing: !0,
|
|
759
|
+
forcedJSONParsing: !0,
|
|
760
|
+
clarifyTimeoutError: !1
|
|
761
|
+
}, ho = typeof URLSearchParams < "u" ? URLSearchParams : kt, mo = typeof FormData < "u" ? FormData : null, go = typeof Blob < "u" ? Blob : null, wo = {
|
|
762
|
+
isBrowser: !0,
|
|
763
|
+
classes: {
|
|
764
|
+
URLSearchParams: ho,
|
|
765
|
+
FormData: mo,
|
|
766
|
+
Blob: go
|
|
767
|
+
},
|
|
768
|
+
protocols: ["http", "https", "file", "blob", "url", "data"]
|
|
769
|
+
}, Nt = typeof window < "u" && typeof document < "u", vt = typeof navigator == "object" && navigator || void 0, yo = Nt && (!vt || ["ReactNative", "NativeScript", "NS"].indexOf(vt.product) < 0), bo = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
|
|
770
|
+
self instanceof WorkerGlobalScope && typeof self.importScripts == "function", vo = Nt && window.location.href || "http://localhost", xo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
771
|
+
__proto__: null,
|
|
772
|
+
hasBrowserEnv: Nt,
|
|
773
|
+
hasStandardBrowserEnv: yo,
|
|
774
|
+
hasStandardBrowserWebWorkerEnv: bo,
|
|
775
|
+
navigator: vt,
|
|
776
|
+
origin: vo
|
|
777
|
+
}, Symbol.toStringTag, { value: "Module" })), I = {
|
|
778
|
+
...xo,
|
|
779
|
+
...wo
|
|
780
|
+
};
|
|
781
|
+
function Eo(e, t) {
|
|
782
|
+
return Qe(e, new I.classes.URLSearchParams(), Object.assign({
|
|
783
|
+
visitor: function(n, r, o, s) {
|
|
784
|
+
return I.isNode && c.isBuffer(n) ? (this.append(r, n.toString("base64")), !1) : s.defaultVisitor.apply(this, arguments);
|
|
785
|
+
}
|
|
786
|
+
}, t));
|
|
787
|
+
}
|
|
788
|
+
function So(e) {
|
|
789
|
+
return c.matchAll(/\w+|\[(\w*)]/g, e).map((t) => t[0] === "[]" ? "" : t[1] || t[0]);
|
|
790
|
+
}
|
|
791
|
+
function To(e) {
|
|
792
|
+
const t = {}, n = Object.keys(e);
|
|
793
|
+
let r;
|
|
794
|
+
const o = n.length;
|
|
795
|
+
let s;
|
|
796
|
+
for (r = 0; r < o; r++)
|
|
797
|
+
s = n[r], t[s] = e[s];
|
|
798
|
+
return t;
|
|
799
|
+
}
|
|
800
|
+
function Rn(e) {
|
|
801
|
+
function t(n, r, o, s) {
|
|
802
|
+
let a = n[s++];
|
|
803
|
+
if (a === "__proto__") return !0;
|
|
804
|
+
const i = Number.isFinite(+a), d = s >= n.length;
|
|
805
|
+
return a = !a && c.isArray(o) ? o.length : a, d ? (c.hasOwnProp(o, a) ? o[a] = [o[a], r] : o[a] = r, !i) : ((!o[a] || !c.isObject(o[a])) && (o[a] = []), t(n, r, o[a], s) && c.isArray(o[a]) && (o[a] = To(o[a])), !i);
|
|
806
|
+
}
|
|
807
|
+
if (c.isFormData(e) && c.isFunction(e.entries)) {
|
|
808
|
+
const n = {};
|
|
809
|
+
return c.forEachEntry(e, (r, o) => {
|
|
810
|
+
t(So(r), o, n, 0);
|
|
811
|
+
}), n;
|
|
812
|
+
}
|
|
813
|
+
return null;
|
|
814
|
+
}
|
|
815
|
+
function Ro(e, t, n) {
|
|
816
|
+
if (c.isString(e))
|
|
817
|
+
try {
|
|
818
|
+
return (t || JSON.parse)(e), c.trim(e);
|
|
819
|
+
} catch (r) {
|
|
820
|
+
if (r.name !== "SyntaxError")
|
|
821
|
+
throw r;
|
|
822
|
+
}
|
|
823
|
+
return (n || JSON.stringify)(e);
|
|
824
|
+
}
|
|
825
|
+
const Ce = {
|
|
826
|
+
transitional: Tn,
|
|
827
|
+
adapter: ["xhr", "http", "fetch"],
|
|
828
|
+
transformRequest: [function(t, n) {
|
|
829
|
+
const r = n.getContentType() || "", o = r.indexOf("application/json") > -1, s = c.isObject(t);
|
|
830
|
+
if (s && c.isHTMLForm(t) && (t = new FormData(t)), c.isFormData(t))
|
|
831
|
+
return o ? JSON.stringify(Rn(t)) : t;
|
|
832
|
+
if (c.isArrayBuffer(t) || c.isBuffer(t) || c.isStream(t) || c.isFile(t) || c.isBlob(t) || c.isReadableStream(t))
|
|
833
|
+
return t;
|
|
834
|
+
if (c.isArrayBufferView(t))
|
|
835
|
+
return t.buffer;
|
|
836
|
+
if (c.isURLSearchParams(t))
|
|
837
|
+
return n.setContentType("application/x-www-form-urlencoded;charset=utf-8", !1), t.toString();
|
|
838
|
+
let i;
|
|
839
|
+
if (s) {
|
|
840
|
+
if (r.indexOf("application/x-www-form-urlencoded") > -1)
|
|
841
|
+
return Eo(t, this.formSerializer).toString();
|
|
842
|
+
if ((i = c.isFileList(t)) || r.indexOf("multipart/form-data") > -1) {
|
|
843
|
+
const d = this.env && this.env.FormData;
|
|
844
|
+
return Qe(
|
|
845
|
+
i ? { "files[]": t } : t,
|
|
846
|
+
d && new d(),
|
|
847
|
+
this.formSerializer
|
|
848
|
+
);
|
|
849
|
+
}
|
|
850
|
+
}
|
|
851
|
+
return s || o ? (n.setContentType("application/json", !1), Ro(t)) : t;
|
|
852
|
+
}],
|
|
853
|
+
transformResponse: [function(t) {
|
|
854
|
+
const n = this.transitional || Ce.transitional, r = n && n.forcedJSONParsing, o = this.responseType === "json";
|
|
855
|
+
if (c.isResponse(t) || c.isReadableStream(t))
|
|
856
|
+
return t;
|
|
857
|
+
if (t && c.isString(t) && (r && !this.responseType || o)) {
|
|
858
|
+
const a = !(n && n.silentJSONParsing) && o;
|
|
859
|
+
try {
|
|
860
|
+
return JSON.parse(t);
|
|
861
|
+
} catch (i) {
|
|
862
|
+
if (a)
|
|
863
|
+
throw i.name === "SyntaxError" ? v.from(i, v.ERR_BAD_RESPONSE, this, null, this.response) : i;
|
|
864
|
+
}
|
|
865
|
+
}
|
|
866
|
+
return t;
|
|
867
|
+
}],
|
|
868
|
+
/**
|
|
869
|
+
* A timeout in milliseconds to abort a request. If set to 0 (default) a
|
|
870
|
+
* timeout is not created.
|
|
871
|
+
*/
|
|
872
|
+
timeout: 0,
|
|
873
|
+
xsrfCookieName: "XSRF-TOKEN",
|
|
874
|
+
xsrfHeaderName: "X-XSRF-TOKEN",
|
|
875
|
+
maxContentLength: -1,
|
|
876
|
+
maxBodyLength: -1,
|
|
877
|
+
env: {
|
|
878
|
+
FormData: I.classes.FormData,
|
|
879
|
+
Blob: I.classes.Blob
|
|
880
|
+
},
|
|
881
|
+
validateStatus: function(t) {
|
|
882
|
+
return t >= 200 && t < 300;
|
|
883
|
+
},
|
|
884
|
+
headers: {
|
|
885
|
+
common: {
|
|
886
|
+
Accept: "application/json, text/plain, */*",
|
|
887
|
+
"Content-Type": void 0
|
|
888
|
+
}
|
|
889
|
+
}
|
|
890
|
+
};
|
|
891
|
+
c.forEach(["delete", "get", "head", "post", "put", "patch"], (e) => {
|
|
892
|
+
Ce.headers[e] = {};
|
|
893
|
+
});
|
|
894
|
+
const Oo = c.toObjectSet([
|
|
895
|
+
"age",
|
|
896
|
+
"authorization",
|
|
897
|
+
"content-length",
|
|
898
|
+
"content-type",
|
|
899
|
+
"etag",
|
|
900
|
+
"expires",
|
|
901
|
+
"from",
|
|
902
|
+
"host",
|
|
903
|
+
"if-modified-since",
|
|
904
|
+
"if-unmodified-since",
|
|
905
|
+
"last-modified",
|
|
906
|
+
"location",
|
|
907
|
+
"max-forwards",
|
|
908
|
+
"proxy-authorization",
|
|
909
|
+
"referer",
|
|
910
|
+
"retry-after",
|
|
911
|
+
"user-agent"
|
|
912
|
+
]), Ao = (e) => {
|
|
913
|
+
const t = {};
|
|
914
|
+
let n, r, o;
|
|
915
|
+
return e && e.split(`
|
|
916
|
+
`).forEach(function(a) {
|
|
917
|
+
o = a.indexOf(":"), n = a.substring(0, o).trim().toLowerCase(), r = a.substring(o + 1).trim(), !(!n || t[n] && Oo[n]) && (n === "set-cookie" ? t[n] ? t[n].push(r) : t[n] = [r] : t[n] = t[n] ? t[n] + ", " + r : r);
|
|
918
|
+
}), t;
|
|
919
|
+
}, Vt = Symbol("internals");
|
|
920
|
+
function Te(e) {
|
|
921
|
+
return e && String(e).trim().toLowerCase();
|
|
922
|
+
}
|
|
923
|
+
function We(e) {
|
|
924
|
+
return e === !1 || e == null ? e : c.isArray(e) ? e.map(We) : String(e);
|
|
925
|
+
}
|
|
926
|
+
function ko(e) {
|
|
927
|
+
const t = /* @__PURE__ */ Object.create(null), n = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
|
|
928
|
+
let r;
|
|
929
|
+
for (; r = n.exec(e); )
|
|
930
|
+
t[r[1]] = r[2];
|
|
931
|
+
return t;
|
|
932
|
+
}
|
|
933
|
+
const No = (e) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());
|
|
934
|
+
function ft(e, t, n, r, o) {
|
|
935
|
+
if (c.isFunction(r))
|
|
936
|
+
return r.call(this, t, n);
|
|
937
|
+
if (o && (t = n), !!c.isString(t)) {
|
|
938
|
+
if (c.isString(r))
|
|
939
|
+
return t.indexOf(r) !== -1;
|
|
940
|
+
if (c.isRegExp(r))
|
|
941
|
+
return r.test(t);
|
|
942
|
+
}
|
|
943
|
+
}
|
|
944
|
+
function _o(e) {
|
|
945
|
+
return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (t, n, r) => n.toUpperCase() + r);
|
|
946
|
+
}
|
|
947
|
+
function Lo(e, t) {
|
|
948
|
+
const n = c.toCamelCase(" " + t);
|
|
949
|
+
["get", "set", "has"].forEach((r) => {
|
|
950
|
+
Object.defineProperty(e, r + n, {
|
|
951
|
+
value: function(o, s, a) {
|
|
952
|
+
return this[r].call(this, t, o, s, a);
|
|
953
|
+
},
|
|
954
|
+
configurable: !0
|
|
955
|
+
});
|
|
956
|
+
});
|
|
957
|
+
}
|
|
958
|
+
let U = class {
|
|
959
|
+
constructor(t) {
|
|
960
|
+
t && this.set(t);
|
|
961
|
+
}
|
|
962
|
+
set(t, n, r) {
|
|
963
|
+
const o = this;
|
|
964
|
+
function s(i, d, u) {
|
|
965
|
+
const f = Te(d);
|
|
966
|
+
if (!f)
|
|
967
|
+
throw new Error("header name must be a non-empty string");
|
|
968
|
+
const h = c.findKey(o, f);
|
|
969
|
+
(!h || o[h] === void 0 || u === !0 || u === void 0 && o[h] !== !1) && (o[h || d] = We(i));
|
|
970
|
+
}
|
|
971
|
+
const a = (i, d) => c.forEach(i, (u, f) => s(u, f, d));
|
|
972
|
+
if (c.isPlainObject(t) || t instanceof this.constructor)
|
|
973
|
+
a(t, n);
|
|
974
|
+
else if (c.isString(t) && (t = t.trim()) && !No(t))
|
|
975
|
+
a(Ao(t), n);
|
|
976
|
+
else if (c.isHeaders(t))
|
|
977
|
+
for (const [i, d] of t.entries())
|
|
978
|
+
s(d, i, r);
|
|
979
|
+
else
|
|
980
|
+
t != null && s(n, t, r);
|
|
981
|
+
return this;
|
|
982
|
+
}
|
|
983
|
+
get(t, n) {
|
|
984
|
+
if (t = Te(t), t) {
|
|
985
|
+
const r = c.findKey(this, t);
|
|
986
|
+
if (r) {
|
|
987
|
+
const o = this[r];
|
|
988
|
+
if (!n)
|
|
989
|
+
return o;
|
|
990
|
+
if (n === !0)
|
|
991
|
+
return ko(o);
|
|
992
|
+
if (c.isFunction(n))
|
|
993
|
+
return n.call(this, o, r);
|
|
994
|
+
if (c.isRegExp(n))
|
|
995
|
+
return n.exec(o);
|
|
996
|
+
throw new TypeError("parser must be boolean|regexp|function");
|
|
997
|
+
}
|
|
998
|
+
}
|
|
999
|
+
}
|
|
1000
|
+
has(t, n) {
|
|
1001
|
+
if (t = Te(t), t) {
|
|
1002
|
+
const r = c.findKey(this, t);
|
|
1003
|
+
return !!(r && this[r] !== void 0 && (!n || ft(this, this[r], r, n)));
|
|
1004
|
+
}
|
|
1005
|
+
return !1;
|
|
1006
|
+
}
|
|
1007
|
+
delete(t, n) {
|
|
1008
|
+
const r = this;
|
|
1009
|
+
let o = !1;
|
|
1010
|
+
function s(a) {
|
|
1011
|
+
if (a = Te(a), a) {
|
|
1012
|
+
const i = c.findKey(r, a);
|
|
1013
|
+
i && (!n || ft(r, r[i], i, n)) && (delete r[i], o = !0);
|
|
1014
|
+
}
|
|
1015
|
+
}
|
|
1016
|
+
return c.isArray(t) ? t.forEach(s) : s(t), o;
|
|
1017
|
+
}
|
|
1018
|
+
clear(t) {
|
|
1019
|
+
const n = Object.keys(this);
|
|
1020
|
+
let r = n.length, o = !1;
|
|
1021
|
+
for (; r--; ) {
|
|
1022
|
+
const s = n[r];
|
|
1023
|
+
(!t || ft(this, this[s], s, t, !0)) && (delete this[s], o = !0);
|
|
1024
|
+
}
|
|
1025
|
+
return o;
|
|
1026
|
+
}
|
|
1027
|
+
normalize(t) {
|
|
1028
|
+
const n = this, r = {};
|
|
1029
|
+
return c.forEach(this, (o, s) => {
|
|
1030
|
+
const a = c.findKey(r, s);
|
|
1031
|
+
if (a) {
|
|
1032
|
+
n[a] = We(o), delete n[s];
|
|
1033
|
+
return;
|
|
1034
|
+
}
|
|
1035
|
+
const i = t ? _o(s) : String(s).trim();
|
|
1036
|
+
i !== s && delete n[s], n[i] = We(o), r[i] = !0;
|
|
1037
|
+
}), this;
|
|
1038
|
+
}
|
|
1039
|
+
concat(...t) {
|
|
1040
|
+
return this.constructor.concat(this, ...t);
|
|
1041
|
+
}
|
|
1042
|
+
toJSON(t) {
|
|
1043
|
+
const n = /* @__PURE__ */ Object.create(null);
|
|
1044
|
+
return c.forEach(this, (r, o) => {
|
|
1045
|
+
r != null && r !== !1 && (n[o] = t && c.isArray(r) ? r.join(", ") : r);
|
|
1046
|
+
}), n;
|
|
1047
|
+
}
|
|
1048
|
+
[Symbol.iterator]() {
|
|
1049
|
+
return Object.entries(this.toJSON())[Symbol.iterator]();
|
|
1050
|
+
}
|
|
1051
|
+
toString() {
|
|
1052
|
+
return Object.entries(this.toJSON()).map(([t, n]) => t + ": " + n).join(`
|
|
1053
|
+
`);
|
|
1054
|
+
}
|
|
1055
|
+
get [Symbol.toStringTag]() {
|
|
1056
|
+
return "AxiosHeaders";
|
|
1057
|
+
}
|
|
1058
|
+
static from(t) {
|
|
1059
|
+
return t instanceof this ? t : new this(t);
|
|
1060
|
+
}
|
|
1061
|
+
static concat(t, ...n) {
|
|
1062
|
+
const r = new this(t);
|
|
1063
|
+
return n.forEach((o) => r.set(o)), r;
|
|
1064
|
+
}
|
|
1065
|
+
static accessor(t) {
|
|
1066
|
+
const r = (this[Vt] = this[Vt] = {
|
|
1067
|
+
accessors: {}
|
|
1068
|
+
}).accessors, o = this.prototype;
|
|
1069
|
+
function s(a) {
|
|
1070
|
+
const i = Te(a);
|
|
1071
|
+
r[i] || (Lo(o, a), r[i] = !0);
|
|
1072
|
+
}
|
|
1073
|
+
return c.isArray(t) ? t.forEach(s) : s(t), this;
|
|
1074
|
+
}
|
|
1075
|
+
};
|
|
1076
|
+
U.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]);
|
|
1077
|
+
c.reduceDescriptors(U.prototype, ({ value: e }, t) => {
|
|
1078
|
+
let n = t[0].toUpperCase() + t.slice(1);
|
|
1079
|
+
return {
|
|
1080
|
+
get: () => e,
|
|
1081
|
+
set(r) {
|
|
1082
|
+
this[n] = r;
|
|
1083
|
+
}
|
|
1084
|
+
};
|
|
1085
|
+
});
|
|
1086
|
+
c.freezeMethods(U);
|
|
1087
|
+
function pt(e, t) {
|
|
1088
|
+
const n = this || Ce, r = t || n, o = U.from(r.headers);
|
|
1089
|
+
let s = r.data;
|
|
1090
|
+
return c.forEach(e, function(i) {
|
|
1091
|
+
s = i.call(n, s, o.normalize(), t ? t.status : void 0);
|
|
1092
|
+
}), o.normalize(), s;
|
|
1093
|
+
}
|
|
1094
|
+
function On(e) {
|
|
1095
|
+
return !!(e && e.__CANCEL__);
|
|
1096
|
+
}
|
|
1097
|
+
function ve(e, t, n) {
|
|
1098
|
+
v.call(this, e ?? "canceled", v.ERR_CANCELED, t, n), this.name = "CanceledError";
|
|
1099
|
+
}
|
|
1100
|
+
c.inherits(ve, v, {
|
|
1101
|
+
__CANCEL__: !0
|
|
1102
|
+
});
|
|
1103
|
+
function An(e, t, n) {
|
|
1104
|
+
const r = n.config.validateStatus;
|
|
1105
|
+
!n.status || !r || r(n.status) ? e(n) : t(new v(
|
|
1106
|
+
"Request failed with status code " + n.status,
|
|
1107
|
+
[v.ERR_BAD_REQUEST, v.ERR_BAD_RESPONSE][Math.floor(n.status / 100) - 4],
|
|
1108
|
+
n.config,
|
|
1109
|
+
n.request,
|
|
1110
|
+
n
|
|
1111
|
+
));
|
|
1112
|
+
}
|
|
1113
|
+
function Co(e) {
|
|
1114
|
+
const t = /^([-+\w]{1,25})(:?\/\/|:)/.exec(e);
|
|
1115
|
+
return t && t[1] || "";
|
|
1116
|
+
}
|
|
1117
|
+
function Mo(e, t) {
|
|
1118
|
+
e = e || 10;
|
|
1119
|
+
const n = new Array(e), r = new Array(e);
|
|
1120
|
+
let o = 0, s = 0, a;
|
|
1121
|
+
return t = t !== void 0 ? t : 1e3, function(d) {
|
|
1122
|
+
const u = Date.now(), f = r[s];
|
|
1123
|
+
a || (a = u), n[o] = d, r[o] = u;
|
|
1124
|
+
let h = s, y = 0;
|
|
1125
|
+
for (; h !== o; )
|
|
1126
|
+
y += n[h++], h = h % e;
|
|
1127
|
+
if (o = (o + 1) % e, o === s && (s = (s + 1) % e), u - a < t)
|
|
1128
|
+
return;
|
|
1129
|
+
const l = f && u - f;
|
|
1130
|
+
return l ? Math.round(y * 1e3 / l) : void 0;
|
|
1131
|
+
};
|
|
1132
|
+
}
|
|
1133
|
+
function Po(e, t) {
|
|
1134
|
+
let n = 0, r = 1e3 / t, o, s;
|
|
1135
|
+
const a = (u, f = Date.now()) => {
|
|
1136
|
+
n = f, o = null, s && (clearTimeout(s), s = null), e.apply(null, u);
|
|
1137
|
+
};
|
|
1138
|
+
return [(...u) => {
|
|
1139
|
+
const f = Date.now(), h = f - n;
|
|
1140
|
+
h >= r ? a(u, f) : (o = u, s || (s = setTimeout(() => {
|
|
1141
|
+
s = null, a(o);
|
|
1142
|
+
}, r - h)));
|
|
1143
|
+
}, () => o && a(o)];
|
|
1144
|
+
}
|
|
1145
|
+
const Ve = (e, t, n = 3) => {
|
|
1146
|
+
let r = 0;
|
|
1147
|
+
const o = Mo(50, 250);
|
|
1148
|
+
return Po((s) => {
|
|
1149
|
+
const a = s.loaded, i = s.lengthComputable ? s.total : void 0, d = a - r, u = o(d), f = a <= i;
|
|
1150
|
+
r = a;
|
|
1151
|
+
const h = {
|
|
1152
|
+
loaded: a,
|
|
1153
|
+
total: i,
|
|
1154
|
+
progress: i ? a / i : void 0,
|
|
1155
|
+
bytes: d,
|
|
1156
|
+
rate: u || void 0,
|
|
1157
|
+
estimated: u && i && f ? (i - a) / u : void 0,
|
|
1158
|
+
event: s,
|
|
1159
|
+
lengthComputable: i != null,
|
|
1160
|
+
[t ? "download" : "upload"]: !0
|
|
1161
|
+
};
|
|
1162
|
+
e(h);
|
|
1163
|
+
}, n);
|
|
1164
|
+
}, Kt = (e, t) => {
|
|
1165
|
+
const n = e != null;
|
|
1166
|
+
return [(r) => t[0]({
|
|
1167
|
+
lengthComputable: n,
|
|
1168
|
+
total: e,
|
|
1169
|
+
loaded: r
|
|
1170
|
+
}), t[1]];
|
|
1171
|
+
}, Yt = (e) => (...t) => c.asap(() => e(...t)), Bo = I.hasStandardBrowserEnv ? /* @__PURE__ */ ((e, t) => (n) => (n = new URL(n, I.origin), e.protocol === n.protocol && e.host === n.host && (t || e.port === n.port)))(
|
|
1172
|
+
new URL(I.origin),
|
|
1173
|
+
I.navigator && /(msie|trident)/i.test(I.navigator.userAgent)
|
|
1174
|
+
) : () => !0, Io = I.hasStandardBrowserEnv ? (
|
|
1175
|
+
// Standard browser envs support document.cookie
|
|
1176
|
+
{
|
|
1177
|
+
write(e, t, n, r, o, s) {
|
|
1178
|
+
const a = [e + "=" + encodeURIComponent(t)];
|
|
1179
|
+
c.isNumber(n) && a.push("expires=" + new Date(n).toGMTString()), c.isString(r) && a.push("path=" + r), c.isString(o) && a.push("domain=" + o), s === !0 && a.push("secure"), document.cookie = a.join("; ");
|
|
1180
|
+
},
|
|
1181
|
+
read(e) {
|
|
1182
|
+
const t = document.cookie.match(new RegExp("(^|;\\s*)(" + e + ")=([^;]*)"));
|
|
1183
|
+
return t ? decodeURIComponent(t[3]) : null;
|
|
1184
|
+
},
|
|
1185
|
+
remove(e) {
|
|
1186
|
+
this.write(e, "", Date.now() - 864e5);
|
|
1187
|
+
}
|
|
1188
|
+
}
|
|
1189
|
+
) : (
|
|
1190
|
+
// Non-standard browser env (web workers, react-native) lack needed support.
|
|
1191
|
+
{
|
|
1192
|
+
write() {
|
|
1193
|
+
},
|
|
1194
|
+
read() {
|
|
1195
|
+
return null;
|
|
1196
|
+
},
|
|
1197
|
+
remove() {
|
|
1198
|
+
}
|
|
1199
|
+
}
|
|
1200
|
+
);
|
|
1201
|
+
function Do(e) {
|
|
1202
|
+
return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(e);
|
|
1203
|
+
}
|
|
1204
|
+
function Fo(e, t) {
|
|
1205
|
+
return t ? e.replace(/\/?\/$/, "") + "/" + t.replace(/^\/+/, "") : e;
|
|
1206
|
+
}
|
|
1207
|
+
function kn(e, t) {
|
|
1208
|
+
return e && !Do(t) ? Fo(e, t) : t;
|
|
1209
|
+
}
|
|
1210
|
+
const Xt = (e) => e instanceof U ? { ...e } : e;
|
|
1211
|
+
function de(e, t) {
|
|
1212
|
+
t = t || {};
|
|
1213
|
+
const n = {};
|
|
1214
|
+
function r(u, f, h, y) {
|
|
1215
|
+
return c.isPlainObject(u) && c.isPlainObject(f) ? c.merge.call({ caseless: y }, u, f) : c.isPlainObject(f) ? c.merge({}, f) : c.isArray(f) ? f.slice() : f;
|
|
1216
|
+
}
|
|
1217
|
+
function o(u, f, h, y) {
|
|
1218
|
+
if (c.isUndefined(f)) {
|
|
1219
|
+
if (!c.isUndefined(u))
|
|
1220
|
+
return r(void 0, u, h, y);
|
|
1221
|
+
} else return r(u, f, h, y);
|
|
1222
|
+
}
|
|
1223
|
+
function s(u, f) {
|
|
1224
|
+
if (!c.isUndefined(f))
|
|
1225
|
+
return r(void 0, f);
|
|
1226
|
+
}
|
|
1227
|
+
function a(u, f) {
|
|
1228
|
+
if (c.isUndefined(f)) {
|
|
1229
|
+
if (!c.isUndefined(u))
|
|
1230
|
+
return r(void 0, u);
|
|
1231
|
+
} else return r(void 0, f);
|
|
1232
|
+
}
|
|
1233
|
+
function i(u, f, h) {
|
|
1234
|
+
if (h in t)
|
|
1235
|
+
return r(u, f);
|
|
1236
|
+
if (h in e)
|
|
1237
|
+
return r(void 0, u);
|
|
1238
|
+
}
|
|
1239
|
+
const d = {
|
|
1240
|
+
url: s,
|
|
1241
|
+
method: s,
|
|
1242
|
+
data: s,
|
|
1243
|
+
baseURL: a,
|
|
1244
|
+
transformRequest: a,
|
|
1245
|
+
transformResponse: a,
|
|
1246
|
+
paramsSerializer: a,
|
|
1247
|
+
timeout: a,
|
|
1248
|
+
timeoutMessage: a,
|
|
1249
|
+
withCredentials: a,
|
|
1250
|
+
withXSRFToken: a,
|
|
1251
|
+
adapter: a,
|
|
1252
|
+
responseType: a,
|
|
1253
|
+
xsrfCookieName: a,
|
|
1254
|
+
xsrfHeaderName: a,
|
|
1255
|
+
onUploadProgress: a,
|
|
1256
|
+
onDownloadProgress: a,
|
|
1257
|
+
decompress: a,
|
|
1258
|
+
maxContentLength: a,
|
|
1259
|
+
maxBodyLength: a,
|
|
1260
|
+
beforeRedirect: a,
|
|
1261
|
+
transport: a,
|
|
1262
|
+
httpAgent: a,
|
|
1263
|
+
httpsAgent: a,
|
|
1264
|
+
cancelToken: a,
|
|
1265
|
+
socketPath: a,
|
|
1266
|
+
responseEncoding: a,
|
|
1267
|
+
validateStatus: i,
|
|
1268
|
+
headers: (u, f, h) => o(Xt(u), Xt(f), h, !0)
|
|
1269
|
+
};
|
|
1270
|
+
return c.forEach(Object.keys(Object.assign({}, e, t)), function(f) {
|
|
1271
|
+
const h = d[f] || o, y = h(e[f], t[f], f);
|
|
1272
|
+
c.isUndefined(y) && h !== i || (n[f] = y);
|
|
1273
|
+
}), n;
|
|
1274
|
+
}
|
|
1275
|
+
const Nn = (e) => {
|
|
1276
|
+
const t = de({}, e);
|
|
1277
|
+
let { data: n, withXSRFToken: r, xsrfHeaderName: o, xsrfCookieName: s, headers: a, auth: i } = t;
|
|
1278
|
+
t.headers = a = U.from(a), t.url = Sn(kn(t.baseURL, t.url), e.params, e.paramsSerializer), i && a.set(
|
|
1279
|
+
"Authorization",
|
|
1280
|
+
"Basic " + btoa((i.username || "") + ":" + (i.password ? unescape(encodeURIComponent(i.password)) : ""))
|
|
1281
|
+
);
|
|
1282
|
+
let d;
|
|
1283
|
+
if (c.isFormData(n)) {
|
|
1284
|
+
if (I.hasStandardBrowserEnv || I.hasStandardBrowserWebWorkerEnv)
|
|
1285
|
+
a.setContentType(void 0);
|
|
1286
|
+
else if ((d = a.getContentType()) !== !1) {
|
|
1287
|
+
const [u, ...f] = d ? d.split(";").map((h) => h.trim()).filter(Boolean) : [];
|
|
1288
|
+
a.setContentType([u || "multipart/form-data", ...f].join("; "));
|
|
1289
|
+
}
|
|
1290
|
+
}
|
|
1291
|
+
if (I.hasStandardBrowserEnv && (r && c.isFunction(r) && (r = r(t)), r || r !== !1 && Bo(t.url))) {
|
|
1292
|
+
const u = o && s && Io.read(s);
|
|
1293
|
+
u && a.set(o, u);
|
|
1294
|
+
}
|
|
1295
|
+
return t;
|
|
1296
|
+
}, jo = typeof XMLHttpRequest < "u", Ho = jo && function(e) {
|
|
1297
|
+
return new Promise(function(n, r) {
|
|
1298
|
+
const o = Nn(e);
|
|
1299
|
+
let s = o.data;
|
|
1300
|
+
const a = U.from(o.headers).normalize();
|
|
1301
|
+
let { responseType: i, onUploadProgress: d, onDownloadProgress: u } = o, f, h, y, l, w;
|
|
1302
|
+
function g() {
|
|
1303
|
+
l && l(), w && w(), o.cancelToken && o.cancelToken.unsubscribe(f), o.signal && o.signal.removeEventListener("abort", f);
|
|
1304
|
+
}
|
|
1305
|
+
let m = new XMLHttpRequest();
|
|
1306
|
+
m.open(o.method.toUpperCase(), o.url, !0), m.timeout = o.timeout;
|
|
1307
|
+
function S() {
|
|
1308
|
+
if (!m)
|
|
1309
|
+
return;
|
|
1310
|
+
const R = U.from(
|
|
1311
|
+
"getAllResponseHeaders" in m && m.getAllResponseHeaders()
|
|
1312
|
+
), _ = {
|
|
1313
|
+
data: !i || i === "text" || i === "json" ? m.responseText : m.response,
|
|
1314
|
+
status: m.status,
|
|
1315
|
+
statusText: m.statusText,
|
|
1316
|
+
headers: R,
|
|
1317
|
+
config: e,
|
|
1318
|
+
request: m
|
|
1319
|
+
};
|
|
1320
|
+
An(function(M) {
|
|
1321
|
+
n(M), g();
|
|
1322
|
+
}, function(M) {
|
|
1323
|
+
r(M), g();
|
|
1324
|
+
}, _), m = null;
|
|
1325
|
+
}
|
|
1326
|
+
"onloadend" in m ? m.onloadend = S : m.onreadystatechange = function() {
|
|
1327
|
+
!m || m.readyState !== 4 || m.status === 0 && !(m.responseURL && m.responseURL.indexOf("file:") === 0) || setTimeout(S);
|
|
1328
|
+
}, m.onabort = function() {
|
|
1329
|
+
m && (r(new v("Request aborted", v.ECONNABORTED, e, m)), m = null);
|
|
1330
|
+
}, m.onerror = function() {
|
|
1331
|
+
r(new v("Network Error", v.ERR_NETWORK, e, m)), m = null;
|
|
1332
|
+
}, m.ontimeout = function() {
|
|
1333
|
+
let D = o.timeout ? "timeout of " + o.timeout + "ms exceeded" : "timeout exceeded";
|
|
1334
|
+
const _ = o.transitional || Tn;
|
|
1335
|
+
o.timeoutErrorMessage && (D = o.timeoutErrorMessage), r(new v(
|
|
1336
|
+
D,
|
|
1337
|
+
_.clarifyTimeoutError ? v.ETIMEDOUT : v.ECONNABORTED,
|
|
1338
|
+
e,
|
|
1339
|
+
m
|
|
1340
|
+
)), m = null;
|
|
1341
|
+
}, s === void 0 && a.setContentType(null), "setRequestHeader" in m && c.forEach(a.toJSON(), function(D, _) {
|
|
1342
|
+
m.setRequestHeader(_, D);
|
|
1343
|
+
}), c.isUndefined(o.withCredentials) || (m.withCredentials = !!o.withCredentials), i && i !== "json" && (m.responseType = o.responseType), u && ([y, w] = Ve(u, !0), m.addEventListener("progress", y)), d && m.upload && ([h, l] = Ve(d), m.upload.addEventListener("progress", h), m.upload.addEventListener("loadend", l)), (o.cancelToken || o.signal) && (f = (R) => {
|
|
1344
|
+
m && (r(!R || R.type ? new ve(null, e, m) : R), m.abort(), m = null);
|
|
1345
|
+
}, o.cancelToken && o.cancelToken.subscribe(f), o.signal && (o.signal.aborted ? f() : o.signal.addEventListener("abort", f)));
|
|
1346
|
+
const T = Co(o.url);
|
|
1347
|
+
if (T && I.protocols.indexOf(T) === -1) {
|
|
1348
|
+
r(new v("Unsupported protocol " + T + ":", v.ERR_BAD_REQUEST, e));
|
|
1349
|
+
return;
|
|
1350
|
+
}
|
|
1351
|
+
m.send(s || null);
|
|
1352
|
+
});
|
|
1353
|
+
}, Uo = (e, t) => {
|
|
1354
|
+
const { length: n } = e = e ? e.filter(Boolean) : [];
|
|
1355
|
+
if (t || n) {
|
|
1356
|
+
let r = new AbortController(), o;
|
|
1357
|
+
const s = function(u) {
|
|
1358
|
+
if (!o) {
|
|
1359
|
+
o = !0, i();
|
|
1360
|
+
const f = u instanceof Error ? u : this.reason;
|
|
1361
|
+
r.abort(f instanceof v ? f : new ve(f instanceof Error ? f.message : f));
|
|
1362
|
+
}
|
|
1363
|
+
};
|
|
1364
|
+
let a = t && setTimeout(() => {
|
|
1365
|
+
a = null, s(new v(`timeout ${t} of ms exceeded`, v.ETIMEDOUT));
|
|
1366
|
+
}, t);
|
|
1367
|
+
const i = () => {
|
|
1368
|
+
e && (a && clearTimeout(a), a = null, e.forEach((u) => {
|
|
1369
|
+
u.unsubscribe ? u.unsubscribe(s) : u.removeEventListener("abort", s);
|
|
1370
|
+
}), e = null);
|
|
1371
|
+
};
|
|
1372
|
+
e.forEach((u) => u.addEventListener("abort", s));
|
|
1373
|
+
const { signal: d } = r;
|
|
1374
|
+
return d.unsubscribe = () => c.asap(i), d;
|
|
1375
|
+
}
|
|
1376
|
+
}, qo = function* (e, t) {
|
|
1377
|
+
let n = e.byteLength;
|
|
1378
|
+
if (n < t) {
|
|
1379
|
+
yield e;
|
|
1380
|
+
return;
|
|
1381
|
+
}
|
|
1382
|
+
let r = 0, o;
|
|
1383
|
+
for (; r < n; )
|
|
1384
|
+
o = r + t, yield e.slice(r, o), r = o;
|
|
1385
|
+
}, zo = async function* (e, t) {
|
|
1386
|
+
for await (const n of $o(e))
|
|
1387
|
+
yield* qo(n, t);
|
|
1388
|
+
}, $o = async function* (e) {
|
|
1389
|
+
if (e[Symbol.asyncIterator]) {
|
|
1390
|
+
yield* e;
|
|
1391
|
+
return;
|
|
1392
|
+
}
|
|
1393
|
+
const t = e.getReader();
|
|
1394
|
+
try {
|
|
1395
|
+
for (; ; ) {
|
|
1396
|
+
const { done: n, value: r } = await t.read();
|
|
1397
|
+
if (n)
|
|
1398
|
+
break;
|
|
1399
|
+
yield r;
|
|
1400
|
+
}
|
|
1401
|
+
} finally {
|
|
1402
|
+
await t.cancel();
|
|
1403
|
+
}
|
|
1404
|
+
}, Gt = (e, t, n, r) => {
|
|
1405
|
+
const o = zo(e, t);
|
|
1406
|
+
let s = 0, a, i = (d) => {
|
|
1407
|
+
a || (a = !0, r && r(d));
|
|
1408
|
+
};
|
|
1409
|
+
return new ReadableStream({
|
|
1410
|
+
async pull(d) {
|
|
1411
|
+
try {
|
|
1412
|
+
const { done: u, value: f } = await o.next();
|
|
1413
|
+
if (u) {
|
|
1414
|
+
i(), d.close();
|
|
1415
|
+
return;
|
|
1416
|
+
}
|
|
1417
|
+
let h = f.byteLength;
|
|
1418
|
+
if (n) {
|
|
1419
|
+
let y = s += h;
|
|
1420
|
+
n(y);
|
|
1421
|
+
}
|
|
1422
|
+
d.enqueue(new Uint8Array(f));
|
|
1423
|
+
} catch (u) {
|
|
1424
|
+
throw i(u), u;
|
|
1425
|
+
}
|
|
1426
|
+
},
|
|
1427
|
+
cancel(d) {
|
|
1428
|
+
return i(d), o.return();
|
|
1429
|
+
}
|
|
1430
|
+
}, {
|
|
1431
|
+
highWaterMark: 2
|
|
1432
|
+
});
|
|
1433
|
+
}, Ze = typeof fetch == "function" && typeof Request == "function" && typeof Response == "function", _n = Ze && typeof ReadableStream == "function", Wo = Ze && (typeof TextEncoder == "function" ? /* @__PURE__ */ ((e) => (t) => e.encode(t))(new TextEncoder()) : async (e) => new Uint8Array(await new Response(e).arrayBuffer())), Ln = (e, ...t) => {
|
|
1434
|
+
try {
|
|
1435
|
+
return !!e(...t);
|
|
1436
|
+
} catch {
|
|
1437
|
+
return !1;
|
|
1438
|
+
}
|
|
1439
|
+
}, Jo = _n && Ln(() => {
|
|
1440
|
+
let e = !1;
|
|
1441
|
+
const t = new Request(I.origin, {
|
|
1442
|
+
body: new ReadableStream(),
|
|
1443
|
+
method: "POST",
|
|
1444
|
+
get duplex() {
|
|
1445
|
+
return e = !0, "half";
|
|
1446
|
+
}
|
|
1447
|
+
}).headers.has("Content-Type");
|
|
1448
|
+
return e && !t;
|
|
1449
|
+
}), Qt = 64 * 1024, xt = _n && Ln(() => c.isReadableStream(new Response("").body)), Ke = {
|
|
1450
|
+
stream: xt && ((e) => e.body)
|
|
1451
|
+
};
|
|
1452
|
+
Ze && ((e) => {
|
|
1453
|
+
["text", "arrayBuffer", "blob", "formData", "stream"].forEach((t) => {
|
|
1454
|
+
!Ke[t] && (Ke[t] = c.isFunction(e[t]) ? (n) => n[t]() : (n, r) => {
|
|
1455
|
+
throw new v(`Response type '${t}' is not supported`, v.ERR_NOT_SUPPORT, r);
|
|
1456
|
+
});
|
|
1457
|
+
});
|
|
1458
|
+
})(new Response());
|
|
1459
|
+
const Vo = async (e) => {
|
|
1460
|
+
if (e == null)
|
|
1461
|
+
return 0;
|
|
1462
|
+
if (c.isBlob(e))
|
|
1463
|
+
return e.size;
|
|
1464
|
+
if (c.isSpecCompliantForm(e))
|
|
1465
|
+
return (await new Request(I.origin, {
|
|
1466
|
+
method: "POST",
|
|
1467
|
+
body: e
|
|
1468
|
+
}).arrayBuffer()).byteLength;
|
|
1469
|
+
if (c.isArrayBufferView(e) || c.isArrayBuffer(e))
|
|
1470
|
+
return e.byteLength;
|
|
1471
|
+
if (c.isURLSearchParams(e) && (e = e + ""), c.isString(e))
|
|
1472
|
+
return (await Wo(e)).byteLength;
|
|
1473
|
+
}, Ko = async (e, t) => {
|
|
1474
|
+
const n = c.toFiniteNumber(e.getContentLength());
|
|
1475
|
+
return n ?? Vo(t);
|
|
1476
|
+
}, Yo = Ze && (async (e) => {
|
|
1477
|
+
let {
|
|
1478
|
+
url: t,
|
|
1479
|
+
method: n,
|
|
1480
|
+
data: r,
|
|
1481
|
+
signal: o,
|
|
1482
|
+
cancelToken: s,
|
|
1483
|
+
timeout: a,
|
|
1484
|
+
onDownloadProgress: i,
|
|
1485
|
+
onUploadProgress: d,
|
|
1486
|
+
responseType: u,
|
|
1487
|
+
headers: f,
|
|
1488
|
+
withCredentials: h = "same-origin",
|
|
1489
|
+
fetchOptions: y
|
|
1490
|
+
} = Nn(e);
|
|
1491
|
+
u = u ? (u + "").toLowerCase() : "text";
|
|
1492
|
+
let l = Uo([o, s && s.toAbortSignal()], a), w;
|
|
1493
|
+
const g = l && l.unsubscribe && (() => {
|
|
1494
|
+
l.unsubscribe();
|
|
1495
|
+
});
|
|
1496
|
+
let m;
|
|
1497
|
+
try {
|
|
1498
|
+
if (d && Jo && n !== "get" && n !== "head" && (m = await Ko(f, r)) !== 0) {
|
|
1499
|
+
let _ = new Request(t, {
|
|
1500
|
+
method: "POST",
|
|
1501
|
+
body: r,
|
|
1502
|
+
duplex: "half"
|
|
1503
|
+
}), x;
|
|
1504
|
+
if (c.isFormData(r) && (x = _.headers.get("content-type")) && f.setContentType(x), _.body) {
|
|
1505
|
+
const [M, F] = Kt(
|
|
1506
|
+
m,
|
|
1507
|
+
Ve(Yt(d))
|
|
1508
|
+
);
|
|
1509
|
+
r = Gt(_.body, Qt, M, F);
|
|
1510
|
+
}
|
|
1511
|
+
}
|
|
1512
|
+
c.isString(h) || (h = h ? "include" : "omit");
|
|
1513
|
+
const S = "credentials" in Request.prototype;
|
|
1514
|
+
w = new Request(t, {
|
|
1515
|
+
...y,
|
|
1516
|
+
signal: l,
|
|
1517
|
+
method: n.toUpperCase(),
|
|
1518
|
+
headers: f.normalize().toJSON(),
|
|
1519
|
+
body: r,
|
|
1520
|
+
duplex: "half",
|
|
1521
|
+
credentials: S ? h : void 0
|
|
1522
|
+
});
|
|
1523
|
+
let T = await fetch(w);
|
|
1524
|
+
const R = xt && (u === "stream" || u === "response");
|
|
1525
|
+
if (xt && (i || R && g)) {
|
|
1526
|
+
const _ = {};
|
|
1527
|
+
["status", "statusText", "headers"].forEach((Q) => {
|
|
1528
|
+
_[Q] = T[Q];
|
|
1529
|
+
});
|
|
1530
|
+
const x = c.toFiniteNumber(T.headers.get("content-length")), [M, F] = i && Kt(
|
|
1531
|
+
x,
|
|
1532
|
+
Ve(Yt(i), !0)
|
|
1533
|
+
) || [];
|
|
1534
|
+
T = new Response(
|
|
1535
|
+
Gt(T.body, Qt, M, () => {
|
|
1536
|
+
F && F(), g && g();
|
|
1537
|
+
}),
|
|
1538
|
+
_
|
|
1539
|
+
);
|
|
1540
|
+
}
|
|
1541
|
+
u = u || "text";
|
|
1542
|
+
let D = await Ke[c.findKey(Ke, u) || "text"](T, e);
|
|
1543
|
+
return !R && g && g(), await new Promise((_, x) => {
|
|
1544
|
+
An(_, x, {
|
|
1545
|
+
data: D,
|
|
1546
|
+
headers: U.from(T.headers),
|
|
1547
|
+
status: T.status,
|
|
1548
|
+
statusText: T.statusText,
|
|
1549
|
+
config: e,
|
|
1550
|
+
request: w
|
|
1551
|
+
});
|
|
1552
|
+
});
|
|
1553
|
+
} catch (S) {
|
|
1554
|
+
throw g && g(), S && S.name === "TypeError" && /fetch/i.test(S.message) ? Object.assign(
|
|
1555
|
+
new v("Network Error", v.ERR_NETWORK, e, w),
|
|
1556
|
+
{
|
|
1557
|
+
cause: S.cause || S
|
|
1558
|
+
}
|
|
1559
|
+
) : v.from(S, S && S.code, e, w);
|
|
1560
|
+
}
|
|
1561
|
+
}), Et = {
|
|
1562
|
+
http: co,
|
|
1563
|
+
xhr: Ho,
|
|
1564
|
+
fetch: Yo
|
|
1565
|
+
};
|
|
1566
|
+
c.forEach(Et, (e, t) => {
|
|
1567
|
+
if (e) {
|
|
1568
|
+
try {
|
|
1569
|
+
Object.defineProperty(e, "name", { value: t });
|
|
1570
|
+
} catch {
|
|
1571
|
+
}
|
|
1572
|
+
Object.defineProperty(e, "adapterName", { value: t });
|
|
1573
|
+
}
|
|
1574
|
+
});
|
|
1575
|
+
const Zt = (e) => `- ${e}`, Xo = (e) => c.isFunction(e) || e === null || e === !1, Cn = {
|
|
1576
|
+
getAdapter: (e) => {
|
|
1577
|
+
e = c.isArray(e) ? e : [e];
|
|
1578
|
+
const { length: t } = e;
|
|
1579
|
+
let n, r;
|
|
1580
|
+
const o = {};
|
|
1581
|
+
for (let s = 0; s < t; s++) {
|
|
1582
|
+
n = e[s];
|
|
1583
|
+
let a;
|
|
1584
|
+
if (r = n, !Xo(n) && (r = Et[(a = String(n)).toLowerCase()], r === void 0))
|
|
1585
|
+
throw new v(`Unknown adapter '${a}'`);
|
|
1586
|
+
if (r)
|
|
1587
|
+
break;
|
|
1588
|
+
o[a || "#" + s] = r;
|
|
1589
|
+
}
|
|
1590
|
+
if (!r) {
|
|
1591
|
+
const s = Object.entries(o).map(
|
|
1592
|
+
([i, d]) => `adapter ${i} ` + (d === !1 ? "is not supported by the environment" : "is not available in the build")
|
|
1593
|
+
);
|
|
1594
|
+
let a = t ? s.length > 1 ? `since :
|
|
1595
|
+
` + s.map(Zt).join(`
|
|
1596
|
+
`) : " " + Zt(s[0]) : "as no adapter specified";
|
|
1597
|
+
throw new v(
|
|
1598
|
+
"There is no suitable adapter to dispatch the request " + a,
|
|
1599
|
+
"ERR_NOT_SUPPORT"
|
|
1600
|
+
);
|
|
1601
|
+
}
|
|
1602
|
+
return r;
|
|
1603
|
+
},
|
|
1604
|
+
adapters: Et
|
|
1605
|
+
};
|
|
1606
|
+
function ht(e) {
|
|
1607
|
+
if (e.cancelToken && e.cancelToken.throwIfRequested(), e.signal && e.signal.aborted)
|
|
1608
|
+
throw new ve(null, e);
|
|
1609
|
+
}
|
|
1610
|
+
function en(e) {
|
|
1611
|
+
return ht(e), e.headers = U.from(e.headers), e.data = pt.call(
|
|
1612
|
+
e,
|
|
1613
|
+
e.transformRequest
|
|
1614
|
+
), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), Cn.getAdapter(e.adapter || Ce.adapter)(e).then(function(r) {
|
|
1615
|
+
return ht(e), r.data = pt.call(
|
|
1616
|
+
e,
|
|
1617
|
+
e.transformResponse,
|
|
1618
|
+
r
|
|
1619
|
+
), r.headers = U.from(r.headers), r;
|
|
1620
|
+
}, function(r) {
|
|
1621
|
+
return On(r) || (ht(e), r && r.response && (r.response.data = pt.call(
|
|
1622
|
+
e,
|
|
1623
|
+
e.transformResponse,
|
|
1624
|
+
r.response
|
|
1625
|
+
), r.response.headers = U.from(r.response.headers))), Promise.reject(r);
|
|
1626
|
+
});
|
|
1627
|
+
}
|
|
1628
|
+
const Mn = "1.7.9", et = {};
|
|
1629
|
+
["object", "boolean", "number", "function", "string", "symbol"].forEach((e, t) => {
|
|
1630
|
+
et[e] = function(r) {
|
|
1631
|
+
return typeof r === e || "a" + (t < 1 ? "n " : " ") + e;
|
|
1632
|
+
};
|
|
1633
|
+
});
|
|
1634
|
+
const tn = {};
|
|
1635
|
+
et.transitional = function(t, n, r) {
|
|
1636
|
+
function o(s, a) {
|
|
1637
|
+
return "[Axios v" + Mn + "] Transitional option '" + s + "'" + a + (r ? ". " + r : "");
|
|
1638
|
+
}
|
|
1639
|
+
return (s, a, i) => {
|
|
1640
|
+
if (t === !1)
|
|
1641
|
+
throw new v(
|
|
1642
|
+
o(a, " has been removed" + (n ? " in " + n : "")),
|
|
1643
|
+
v.ERR_DEPRECATED
|
|
1644
|
+
);
|
|
1645
|
+
return n && !tn[a] && (tn[a] = !0, console.warn(
|
|
1646
|
+
o(
|
|
1647
|
+
a,
|
|
1648
|
+
" has been deprecated since v" + n + " and will be removed in the near future"
|
|
1649
|
+
)
|
|
1650
|
+
)), t ? t(s, a, i) : !0;
|
|
1651
|
+
};
|
|
1652
|
+
};
|
|
1653
|
+
et.spelling = function(t) {
|
|
1654
|
+
return (n, r) => (console.warn(`${r} is likely a misspelling of ${t}`), !0);
|
|
1655
|
+
};
|
|
1656
|
+
function Go(e, t, n) {
|
|
1657
|
+
if (typeof e != "object")
|
|
1658
|
+
throw new v("options must be an object", v.ERR_BAD_OPTION_VALUE);
|
|
1659
|
+
const r = Object.keys(e);
|
|
1660
|
+
let o = r.length;
|
|
1661
|
+
for (; o-- > 0; ) {
|
|
1662
|
+
const s = r[o], a = t[s];
|
|
1663
|
+
if (a) {
|
|
1664
|
+
const i = e[s], d = i === void 0 || a(i, s, e);
|
|
1665
|
+
if (d !== !0)
|
|
1666
|
+
throw new v("option " + s + " must be " + d, v.ERR_BAD_OPTION_VALUE);
|
|
1667
|
+
continue;
|
|
1668
|
+
}
|
|
1669
|
+
if (n !== !0)
|
|
1670
|
+
throw new v("Unknown option " + s, v.ERR_BAD_OPTION);
|
|
1671
|
+
}
|
|
1672
|
+
}
|
|
1673
|
+
const Je = {
|
|
1674
|
+
assertOptions: Go,
|
|
1675
|
+
validators: et
|
|
1676
|
+
}, Z = Je.validators;
|
|
1677
|
+
let ue = class {
|
|
1678
|
+
constructor(t) {
|
|
1679
|
+
this.defaults = t, this.interceptors = {
|
|
1680
|
+
request: new Jt(),
|
|
1681
|
+
response: new Jt()
|
|
1682
|
+
};
|
|
1683
|
+
}
|
|
1684
|
+
/**
|
|
1685
|
+
* Dispatch a request
|
|
1686
|
+
*
|
|
1687
|
+
* @param {String|Object} configOrUrl The config specific for this request (merged with this.defaults)
|
|
1688
|
+
* @param {?Object} config
|
|
1689
|
+
*
|
|
1690
|
+
* @returns {Promise} The Promise to be fulfilled
|
|
1691
|
+
*/
|
|
1692
|
+
async request(t, n) {
|
|
1693
|
+
try {
|
|
1694
|
+
return await this._request(t, n);
|
|
1695
|
+
} catch (r) {
|
|
1696
|
+
if (r instanceof Error) {
|
|
1697
|
+
let o = {};
|
|
1698
|
+
Error.captureStackTrace ? Error.captureStackTrace(o) : o = new Error();
|
|
1699
|
+
const s = o.stack ? o.stack.replace(/^.+\n/, "") : "";
|
|
1700
|
+
try {
|
|
1701
|
+
r.stack ? s && !String(r.stack).endsWith(s.replace(/^.+\n.+\n/, "")) && (r.stack += `
|
|
1702
|
+
` + s) : r.stack = s;
|
|
1703
|
+
} catch {
|
|
1704
|
+
}
|
|
1705
|
+
}
|
|
1706
|
+
throw r;
|
|
1707
|
+
}
|
|
1708
|
+
}
|
|
1709
|
+
_request(t, n) {
|
|
1710
|
+
typeof t == "string" ? (n = n || {}, n.url = t) : n = t || {}, n = de(this.defaults, n);
|
|
1711
|
+
const { transitional: r, paramsSerializer: o, headers: s } = n;
|
|
1712
|
+
r !== void 0 && Je.assertOptions(r, {
|
|
1713
|
+
silentJSONParsing: Z.transitional(Z.boolean),
|
|
1714
|
+
forcedJSONParsing: Z.transitional(Z.boolean),
|
|
1715
|
+
clarifyTimeoutError: Z.transitional(Z.boolean)
|
|
1716
|
+
}, !1), o != null && (c.isFunction(o) ? n.paramsSerializer = {
|
|
1717
|
+
serialize: o
|
|
1718
|
+
} : Je.assertOptions(o, {
|
|
1719
|
+
encode: Z.function,
|
|
1720
|
+
serialize: Z.function
|
|
1721
|
+
}, !0)), Je.assertOptions(n, {
|
|
1722
|
+
baseUrl: Z.spelling("baseURL"),
|
|
1723
|
+
withXsrfToken: Z.spelling("withXSRFToken")
|
|
1724
|
+
}, !0), n.method = (n.method || this.defaults.method || "get").toLowerCase();
|
|
1725
|
+
let a = s && c.merge(
|
|
1726
|
+
s.common,
|
|
1727
|
+
s[n.method]
|
|
1728
|
+
);
|
|
1729
|
+
s && c.forEach(
|
|
1730
|
+
["delete", "get", "head", "post", "put", "patch", "common"],
|
|
1731
|
+
(w) => {
|
|
1732
|
+
delete s[w];
|
|
1733
|
+
}
|
|
1734
|
+
), n.headers = U.concat(a, s);
|
|
1735
|
+
const i = [];
|
|
1736
|
+
let d = !0;
|
|
1737
|
+
this.interceptors.request.forEach(function(g) {
|
|
1738
|
+
typeof g.runWhen == "function" && g.runWhen(n) === !1 || (d = d && g.synchronous, i.unshift(g.fulfilled, g.rejected));
|
|
1739
|
+
});
|
|
1740
|
+
const u = [];
|
|
1741
|
+
this.interceptors.response.forEach(function(g) {
|
|
1742
|
+
u.push(g.fulfilled, g.rejected);
|
|
1743
|
+
});
|
|
1744
|
+
let f, h = 0, y;
|
|
1745
|
+
if (!d) {
|
|
1746
|
+
const w = [en.bind(this), void 0];
|
|
1747
|
+
for (w.unshift.apply(w, i), w.push.apply(w, u), y = w.length, f = Promise.resolve(n); h < y; )
|
|
1748
|
+
f = f.then(w[h++], w[h++]);
|
|
1749
|
+
return f;
|
|
1750
|
+
}
|
|
1751
|
+
y = i.length;
|
|
1752
|
+
let l = n;
|
|
1753
|
+
for (h = 0; h < y; ) {
|
|
1754
|
+
const w = i[h++], g = i[h++];
|
|
1755
|
+
try {
|
|
1756
|
+
l = w(l);
|
|
1757
|
+
} catch (m) {
|
|
1758
|
+
g.call(this, m);
|
|
1759
|
+
break;
|
|
1760
|
+
}
|
|
1761
|
+
}
|
|
1762
|
+
try {
|
|
1763
|
+
f = en.call(this, l);
|
|
1764
|
+
} catch (w) {
|
|
1765
|
+
return Promise.reject(w);
|
|
1766
|
+
}
|
|
1767
|
+
for (h = 0, y = u.length; h < y; )
|
|
1768
|
+
f = f.then(u[h++], u[h++]);
|
|
1769
|
+
return f;
|
|
1770
|
+
}
|
|
1771
|
+
getUri(t) {
|
|
1772
|
+
t = de(this.defaults, t);
|
|
1773
|
+
const n = kn(t.baseURL, t.url);
|
|
1774
|
+
return Sn(n, t.params, t.paramsSerializer);
|
|
1775
|
+
}
|
|
1776
|
+
};
|
|
1777
|
+
c.forEach(["delete", "get", "head", "options"], function(t) {
|
|
1778
|
+
ue.prototype[t] = function(n, r) {
|
|
1779
|
+
return this.request(de(r || {}, {
|
|
1780
|
+
method: t,
|
|
1781
|
+
url: n,
|
|
1782
|
+
data: (r || {}).data
|
|
1783
|
+
}));
|
|
1784
|
+
};
|
|
1785
|
+
});
|
|
1786
|
+
c.forEach(["post", "put", "patch"], function(t) {
|
|
1787
|
+
function n(r) {
|
|
1788
|
+
return function(s, a, i) {
|
|
1789
|
+
return this.request(de(i || {}, {
|
|
1790
|
+
method: t,
|
|
1791
|
+
headers: r ? {
|
|
1792
|
+
"Content-Type": "multipart/form-data"
|
|
1793
|
+
} : {},
|
|
1794
|
+
url: s,
|
|
1795
|
+
data: a
|
|
1796
|
+
}));
|
|
1797
|
+
};
|
|
1798
|
+
}
|
|
1799
|
+
ue.prototype[t] = n(), ue.prototype[t + "Form"] = n(!0);
|
|
1800
|
+
});
|
|
1801
|
+
let Qo = class Pn {
|
|
1802
|
+
constructor(t) {
|
|
1803
|
+
if (typeof t != "function")
|
|
1804
|
+
throw new TypeError("executor must be a function.");
|
|
1805
|
+
let n;
|
|
1806
|
+
this.promise = new Promise(function(s) {
|
|
1807
|
+
n = s;
|
|
1808
|
+
});
|
|
1809
|
+
const r = this;
|
|
1810
|
+
this.promise.then((o) => {
|
|
1811
|
+
if (!r._listeners) return;
|
|
1812
|
+
let s = r._listeners.length;
|
|
1813
|
+
for (; s-- > 0; )
|
|
1814
|
+
r._listeners[s](o);
|
|
1815
|
+
r._listeners = null;
|
|
1816
|
+
}), this.promise.then = (o) => {
|
|
1817
|
+
let s;
|
|
1818
|
+
const a = new Promise((i) => {
|
|
1819
|
+
r.subscribe(i), s = i;
|
|
1820
|
+
}).then(o);
|
|
1821
|
+
return a.cancel = function() {
|
|
1822
|
+
r.unsubscribe(s);
|
|
1823
|
+
}, a;
|
|
1824
|
+
}, t(function(s, a, i) {
|
|
1825
|
+
r.reason || (r.reason = new ve(s, a, i), n(r.reason));
|
|
1826
|
+
});
|
|
1827
|
+
}
|
|
1828
|
+
/**
|
|
1829
|
+
* Throws a `CanceledError` if cancellation has been requested.
|
|
1830
|
+
*/
|
|
1831
|
+
throwIfRequested() {
|
|
1832
|
+
if (this.reason)
|
|
1833
|
+
throw this.reason;
|
|
1834
|
+
}
|
|
1835
|
+
/**
|
|
1836
|
+
* Subscribe to the cancel signal
|
|
1837
|
+
*/
|
|
1838
|
+
subscribe(t) {
|
|
1839
|
+
if (this.reason) {
|
|
1840
|
+
t(this.reason);
|
|
1841
|
+
return;
|
|
1842
|
+
}
|
|
1843
|
+
this._listeners ? this._listeners.push(t) : this._listeners = [t];
|
|
1844
|
+
}
|
|
1845
|
+
/**
|
|
1846
|
+
* Unsubscribe from the cancel signal
|
|
1847
|
+
*/
|
|
1848
|
+
unsubscribe(t) {
|
|
1849
|
+
if (!this._listeners)
|
|
1850
|
+
return;
|
|
1851
|
+
const n = this._listeners.indexOf(t);
|
|
1852
|
+
n !== -1 && this._listeners.splice(n, 1);
|
|
1853
|
+
}
|
|
1854
|
+
toAbortSignal() {
|
|
1855
|
+
const t = new AbortController(), n = (r) => {
|
|
1856
|
+
t.abort(r);
|
|
1857
|
+
};
|
|
1858
|
+
return this.subscribe(n), t.signal.unsubscribe = () => this.unsubscribe(n), t.signal;
|
|
1859
|
+
}
|
|
1860
|
+
/**
|
|
1861
|
+
* Returns an object that contains a new `CancelToken` and a function that, when called,
|
|
1862
|
+
* cancels the `CancelToken`.
|
|
1863
|
+
*/
|
|
1864
|
+
static source() {
|
|
1865
|
+
let t;
|
|
1866
|
+
return {
|
|
1867
|
+
token: new Pn(function(o) {
|
|
1868
|
+
t = o;
|
|
1869
|
+
}),
|
|
1870
|
+
cancel: t
|
|
1871
|
+
};
|
|
1872
|
+
}
|
|
1873
|
+
};
|
|
1874
|
+
function Zo(e) {
|
|
1875
|
+
return function(n) {
|
|
1876
|
+
return e.apply(null, n);
|
|
1877
|
+
};
|
|
1878
|
+
}
|
|
1879
|
+
function es(e) {
|
|
1880
|
+
return c.isObject(e) && e.isAxiosError === !0;
|
|
1881
|
+
}
|
|
1882
|
+
const St = {
|
|
1883
|
+
Continue: 100,
|
|
1884
|
+
SwitchingProtocols: 101,
|
|
1885
|
+
Processing: 102,
|
|
1886
|
+
EarlyHints: 103,
|
|
1887
|
+
Ok: 200,
|
|
1888
|
+
Created: 201,
|
|
1889
|
+
Accepted: 202,
|
|
1890
|
+
NonAuthoritativeInformation: 203,
|
|
1891
|
+
NoContent: 204,
|
|
1892
|
+
ResetContent: 205,
|
|
1893
|
+
PartialContent: 206,
|
|
1894
|
+
MultiStatus: 207,
|
|
1895
|
+
AlreadyReported: 208,
|
|
1896
|
+
ImUsed: 226,
|
|
1897
|
+
MultipleChoices: 300,
|
|
1898
|
+
MovedPermanently: 301,
|
|
1899
|
+
Found: 302,
|
|
1900
|
+
SeeOther: 303,
|
|
1901
|
+
NotModified: 304,
|
|
1902
|
+
UseProxy: 305,
|
|
1903
|
+
Unused: 306,
|
|
1904
|
+
TemporaryRedirect: 307,
|
|
1905
|
+
PermanentRedirect: 308,
|
|
1906
|
+
BadRequest: 400,
|
|
1907
|
+
Unauthorized: 401,
|
|
1908
|
+
PaymentRequired: 402,
|
|
1909
|
+
Forbidden: 403,
|
|
1910
|
+
NotFound: 404,
|
|
1911
|
+
MethodNotAllowed: 405,
|
|
1912
|
+
NotAcceptable: 406,
|
|
1913
|
+
ProxyAuthenticationRequired: 407,
|
|
1914
|
+
RequestTimeout: 408,
|
|
1915
|
+
Conflict: 409,
|
|
1916
|
+
Gone: 410,
|
|
1917
|
+
LengthRequired: 411,
|
|
1918
|
+
PreconditionFailed: 412,
|
|
1919
|
+
PayloadTooLarge: 413,
|
|
1920
|
+
UriTooLong: 414,
|
|
1921
|
+
UnsupportedMediaType: 415,
|
|
1922
|
+
RangeNotSatisfiable: 416,
|
|
1923
|
+
ExpectationFailed: 417,
|
|
1924
|
+
ImATeapot: 418,
|
|
1925
|
+
MisdirectedRequest: 421,
|
|
1926
|
+
UnprocessableEntity: 422,
|
|
1927
|
+
Locked: 423,
|
|
1928
|
+
FailedDependency: 424,
|
|
1929
|
+
TooEarly: 425,
|
|
1930
|
+
UpgradeRequired: 426,
|
|
1931
|
+
PreconditionRequired: 428,
|
|
1932
|
+
TooManyRequests: 429,
|
|
1933
|
+
RequestHeaderFieldsTooLarge: 431,
|
|
1934
|
+
UnavailableForLegalReasons: 451,
|
|
1935
|
+
InternalServerError: 500,
|
|
1936
|
+
NotImplemented: 501,
|
|
1937
|
+
BadGateway: 502,
|
|
1938
|
+
ServiceUnavailable: 503,
|
|
1939
|
+
GatewayTimeout: 504,
|
|
1940
|
+
HttpVersionNotSupported: 505,
|
|
1941
|
+
VariantAlsoNegotiates: 506,
|
|
1942
|
+
InsufficientStorage: 507,
|
|
1943
|
+
LoopDetected: 508,
|
|
1944
|
+
NotExtended: 510,
|
|
1945
|
+
NetworkAuthenticationRequired: 511
|
|
1946
|
+
};
|
|
1947
|
+
Object.entries(St).forEach(([e, t]) => {
|
|
1948
|
+
St[t] = e;
|
|
1949
|
+
});
|
|
1950
|
+
function Bn(e) {
|
|
1951
|
+
const t = new ue(e), n = dn(ue.prototype.request, t);
|
|
1952
|
+
return c.extend(n, ue.prototype, t, { allOwnKeys: !0 }), c.extend(n, t, null, { allOwnKeys: !0 }), n.create = function(o) {
|
|
1953
|
+
return Bn(de(e, o));
|
|
1954
|
+
}, n;
|
|
1955
|
+
}
|
|
1956
|
+
const A = Bn(Ce);
|
|
1957
|
+
A.Axios = ue;
|
|
1958
|
+
A.CanceledError = ve;
|
|
1959
|
+
A.CancelToken = Qo;
|
|
1960
|
+
A.isCancel = On;
|
|
1961
|
+
A.VERSION = Mn;
|
|
1962
|
+
A.toFormData = Qe;
|
|
1963
|
+
A.AxiosError = v;
|
|
1964
|
+
A.Cancel = A.CanceledError;
|
|
1965
|
+
A.all = function(t) {
|
|
1966
|
+
return Promise.all(t);
|
|
1967
|
+
};
|
|
1968
|
+
A.spread = Zo;
|
|
1969
|
+
A.isAxiosError = es;
|
|
1970
|
+
A.mergeConfig = de;
|
|
1971
|
+
A.AxiosHeaders = U;
|
|
1972
|
+
A.formToJSON = (e) => Rn(c.isHTMLForm(e) ? new FormData(e) : e);
|
|
1973
|
+
A.getAdapter = Cn.getAdapter;
|
|
1974
|
+
A.HttpStatusCode = St;
|
|
1975
|
+
A.default = A;
|
|
1976
|
+
const {
|
|
1977
|
+
Axios: Xs,
|
|
1978
|
+
AxiosError: Gs,
|
|
1979
|
+
CanceledError: Qs,
|
|
1980
|
+
isCancel: Zs,
|
|
1981
|
+
CancelToken: ea,
|
|
1982
|
+
VERSION: ta,
|
|
1983
|
+
all: na,
|
|
1984
|
+
Cancel: ra,
|
|
1985
|
+
isAxiosError: oa,
|
|
1986
|
+
spread: sa,
|
|
1987
|
+
toFormData: aa,
|
|
1988
|
+
AxiosHeaders: ia,
|
|
1989
|
+
HttpStatusCode: la,
|
|
1990
|
+
formToJSON: ca,
|
|
1991
|
+
getAdapter: ua,
|
|
1992
|
+
mergeConfig: da
|
|
1993
|
+
} = A, ts = process.env.NODE_ENV !== "production";
|
|
1994
|
+
process.env.NODE_ENV;
|
|
1995
|
+
process.env.NODE_ENV;
|
|
1996
|
+
const Re = "vapp", ns = () => (/* @__PURE__ */ new Date()).toISOString(), He = (e, t, n) => `[vezham] [${ns()}] [${e}] [${t}] ${n}`, mt = () => !ts, se = {
|
|
1997
|
+
log: (e = Re, t, n) => {
|
|
1998
|
+
console.log(
|
|
1999
|
+
He("LOG", e, t),
|
|
2000
|
+
n || ""
|
|
2001
|
+
);
|
|
2002
|
+
},
|
|
2003
|
+
debug: (e = Re, t, n) => {
|
|
2004
|
+
},
|
|
2005
|
+
info: (e = Re, t, n) => {
|
|
2006
|
+
mt() || console.info(
|
|
2007
|
+
He("INFO", e, t),
|
|
2008
|
+
n || ""
|
|
2009
|
+
);
|
|
2010
|
+
},
|
|
2011
|
+
warn: (e = Re, t, n) => {
|
|
2012
|
+
mt() || console.warn(
|
|
2013
|
+
He("WARN", e, t),
|
|
2014
|
+
n || ""
|
|
2015
|
+
);
|
|
2016
|
+
},
|
|
2017
|
+
error: (e = Re, t, n) => {
|
|
2018
|
+
mt() || console.error(
|
|
2019
|
+
He("ERROR", e, t),
|
|
2020
|
+
n || ""
|
|
2021
|
+
);
|
|
2022
|
+
}
|
|
2023
|
+
// trace: (namespace = APP_NAME, message: string, object?: any) => {
|
|
2024
|
+
// if (strictLog()) return
|
|
2025
|
+
// let log_msg = getLoggerMessage(logs_type.Trace, namespace, message);
|
|
2026
|
+
// if (!(object instanceof Error)) console.trace(log_msg, object);
|
|
2027
|
+
// else console.trace(log_msg, object)
|
|
2028
|
+
// }
|
|
2029
|
+
};
|
|
2030
|
+
var Tt = /* @__PURE__ */ ((e) => (e[e.DEFAULT = 0] = "DEFAULT", e[e.SANDBOX = 1] = "SANDBOX", e[e.DC = 2] = "DC", e))(Tt || {});
|
|
2031
|
+
const Rt = "useAxios", rs = async (e = (n) => {
|
|
2032
|
+
}, t) => (t.domain_type === Tt.SANDBOX || (t.domain_type, Tt.DC), t.baseURL = void 0, se.debug(Rt, `baseURL::${t.baseURL}`), e(t), t), os = async (e = (n) => {
|
|
2033
|
+
}, t) => {
|
|
2034
|
+
var r;
|
|
2035
|
+
if (e(t), t.response.status !== 500) {
|
|
2036
|
+
if (t.response.status <= 401)
|
|
2037
|
+
return se.info(Rt, t.response.data.meta), Promise.reject(t.response.data.meta);
|
|
2038
|
+
if (t.response.status === 404)
|
|
2039
|
+
return se.info(Rt, t.response.data.meta), Promise.reject(t.response.data.meta);
|
|
2040
|
+
}
|
|
2041
|
+
let n;
|
|
2042
|
+
try {
|
|
2043
|
+
let o = "";
|
|
2044
|
+
t.request.config && t.request.config.token_type ? o = t.request.config.token_type : t.response.config && t.response.config.token_type && (o = t.response.config.token_type), n = A(t.response.config);
|
|
2045
|
+
} catch (o) {
|
|
2046
|
+
(r = o == null ? void 0 : o.data) != null && r.meta ? n = Promise.reject(o.data.meta) : o.data ? n = Promise.reject(o.data) : n = Promise.reject(o);
|
|
2047
|
+
}
|
|
2048
|
+
return n;
|
|
2049
|
+
}, Ue = "useAxios", fa = ({ onRequest: e, onError: t }) => {
|
|
2050
|
+
A.interceptors.request.use((n) => rs(e, n)), A.interceptors.response.use(
|
|
2051
|
+
(n) => n.data.data,
|
|
2052
|
+
(n) => os(t, n)
|
|
2053
|
+
), A.defaults.headers.common["content-type"] = "application/json";
|
|
2054
|
+
}, pa = {
|
|
2055
|
+
get: async (e, t) => (se.debug(Ue, `[get] url | ${e}`), A.get(e, t)),
|
|
2056
|
+
post: async (e, t, n) => (se.debug(Ue, `[post] url | ${e} | payload | ${t}`), A.post(e, t, n)),
|
|
2057
|
+
put: async (e, t, n) => (se.debug(Ue, `[put] url | ${e} | payload | ${t}`), A.put(e, t, n)),
|
|
2058
|
+
delete: async (e, t) => (se.debug(Ue, `[delete] url | ${e}`), A.delete(e, t))
|
|
2059
|
+
};
|
|
2060
|
+
var W = /* @__PURE__ */ ((e) => (e.MINI_MOBILE = "mob-sm", e.MOBILE_PORTRAIT = "mob", e.MOBILE_LANDSCAPE = "mob-l", e.MOBILE_LANDSCAPE_XL = "mob-xl", e.TAB_PORTRAIT = "tab", e.TAB_LANDSCAPE = "tab-l", e.LAPTOP = "lap", e.DESKTOP = "desk", e))(W || {});
|
|
2061
|
+
const nn = {
|
|
2062
|
+
/* suresh/NOTE: iPhone 15 device size */
|
|
2063
|
+
iphone_15: { width: { min: 850, max: 854 }, height: { min: 390, max: 395 } },
|
|
2064
|
+
/* suresh/NOTE: Iphone 14 pro max device size */
|
|
2065
|
+
iphone_14_pro_max: {
|
|
2066
|
+
width: { min: 925, max: 935 },
|
|
2067
|
+
height: { min: 427, max: 435 }
|
|
2068
|
+
},
|
|
2069
|
+
/* suresh/NOTE: Iphone 12 pro device size */
|
|
2070
|
+
iphone_12_pro: {
|
|
2071
|
+
width: { min: 840, max: 845 },
|
|
2072
|
+
height: { min: 388, max: 392 }
|
|
2073
|
+
},
|
|
2074
|
+
/* suresh/NOTE: iPhone 13 Mini device size */
|
|
2075
|
+
iphone_13_mini: {
|
|
2076
|
+
width: { min: 810, max: 815 },
|
|
2077
|
+
height: { min: 370, max: 377 }
|
|
2078
|
+
},
|
|
2079
|
+
/* suresh/NOTE: iPhone SE 2022 device size */
|
|
2080
|
+
iphone_se_22: {
|
|
2081
|
+
width: { min: 664, max: 668 },
|
|
2082
|
+
height: { min: 370, max: 377 }
|
|
2083
|
+
},
|
|
2084
|
+
/* suresh/NOTE: Iphone XR device size */
|
|
2085
|
+
iphone_xr: { width: { min: 894, max: 898 }, height: { min: 410, max: 417 } },
|
|
2086
|
+
/* suresh/NOTE: Google Pixel 6 Pro device size */
|
|
2087
|
+
gpixel_6_pro: {
|
|
2088
|
+
width: { min: 890, max: 895 },
|
|
2089
|
+
height: { min: 408, max: 415 }
|
|
2090
|
+
},
|
|
2091
|
+
/* suresh/NOTE: Google Pixel 4 XL device size */
|
|
2092
|
+
gpixel_4xl: { width: { min: 865, max: 972 }, height: { min: 408, max: 415 } },
|
|
2093
|
+
/* suresh/NOTE: Pixel 3 Xl device size */
|
|
2094
|
+
gpixel_3xl: { width: { min: 784, max: 788 }, height: { min: 390, max: 395 } },
|
|
2095
|
+
/* suresh/NOTE: Samsung Galaxy S22 device size */
|
|
2096
|
+
sam_galaxy_s22: {
|
|
2097
|
+
width: { min: 778, max: 783 },
|
|
2098
|
+
height: { min: 357, max: 365 }
|
|
2099
|
+
},
|
|
2100
|
+
/* suresh/NOTE: Samsung Galaxy S22 Plus device size */
|
|
2101
|
+
sam_galaxy_s22_plus: {
|
|
2102
|
+
width: { min: 830, max: 835 },
|
|
2103
|
+
height: { min: 380, max: 387 }
|
|
2104
|
+
},
|
|
2105
|
+
/* suresh/NOTE: Samsung Galaxy S22 Ultra device size */
|
|
2106
|
+
sam_galaxy_s22_ultra: {
|
|
2107
|
+
width: { min: 820, max: 825 },
|
|
2108
|
+
height: { min: 380, max: 387 }
|
|
2109
|
+
},
|
|
2110
|
+
/* suresh/NOTE: Samsung Galaxy S21 device size */
|
|
2111
|
+
sam_galaxy_s21: {
|
|
2112
|
+
width: { min: 798, max: 805 },
|
|
2113
|
+
height: { min: 358, max: 365 }
|
|
2114
|
+
},
|
|
2115
|
+
/* suresh/NOTE: Samsung Galaxy S21 Plus device size */
|
|
2116
|
+
sam_galaxy_s21_plus: {
|
|
2117
|
+
width: { min: 850, max: 857 },
|
|
2118
|
+
height: { min: 380, max: 387 }
|
|
2119
|
+
},
|
|
2120
|
+
/* suresh/NOTE: Samsung Galaxy s20 Ultra device size */
|
|
2121
|
+
sam_galaxy_s20_ultra: {
|
|
2122
|
+
width: { min: 910, max: 918 },
|
|
2123
|
+
height: { min: 408, max: 415 }
|
|
2124
|
+
},
|
|
2125
|
+
/* suresh/NOTE: Nokia N9 device size */
|
|
2126
|
+
nokia_n9: { width: { min: 853, max: 855 }, height: { min: 478, max: 482 } }
|
|
2127
|
+
}, In = () => ({ width: window.innerWidth, height: window.innerHeight }), ss = ({ width: e, height: t }) => {
|
|
2128
|
+
const { width: n, height: r } = In();
|
|
2129
|
+
return e.min <= n && e.max >= n && t.min <= r && t.max >= r;
|
|
2130
|
+
}, as = () => {
|
|
2131
|
+
for (const r of Object.keys(nn)) {
|
|
2132
|
+
const o = nn[r];
|
|
2133
|
+
if (ss(o))
|
|
2134
|
+
return o.vdevice || W.MOBILE_LANDSCAPE_XL;
|
|
2135
|
+
}
|
|
2136
|
+
const { width: e, height: t } = In(), n = t >= e;
|
|
2137
|
+
return e <= 320 ? W.MINI_MOBILE : e <= 480 && e >= 320 ? W.MOBILE_PORTRAIT : e <= 767 && e >= 481 ? W.MOBILE_LANDSCAPE : e <= 1024 && e >= 768 ? n ? W.TAB_PORTRAIT : W.TAB_LANDSCAPE : e <= 1280 && e >= 1025 ? W.LAPTOP : (e >= 1281, W.DESKTOP);
|
|
2138
|
+
}, is = ["h1", "h3", "blockquote", "br"], ls = {
|
|
2139
|
+
strong: "*",
|
|
2140
|
+
b: "*",
|
|
2141
|
+
i: "_",
|
|
2142
|
+
u: "__",
|
|
2143
|
+
s: "~",
|
|
2144
|
+
strike: "~",
|
|
2145
|
+
highlight: "`",
|
|
2146
|
+
blockquote: ">",
|
|
2147
|
+
h1: "# ",
|
|
2148
|
+
h3: "### ",
|
|
2149
|
+
br: `
|
|
2150
|
+
`
|
|
2151
|
+
}, B = {
|
|
2152
|
+
bold: /(^|\s|[{\[])\*{1,2}(.*?\S *)?\*{1,2}(?=$|\s|[\.,\?:;\-}\]](?:$|\s))/g,
|
|
2153
|
+
// *md*
|
|
2154
|
+
italic: /(^|\s|[{\[])\_(.*?\S *)?\_(?=$|\s|[\.,\?:;\-}\]](?:$|\s))/g,
|
|
2155
|
+
// _md_
|
|
2156
|
+
underline: /(^|\s|[{\[])\_{2}(.*?\S *)?\_{2}(?=$|\s|[\.,\?:;\-}\]](?:$|\s))/g,
|
|
2157
|
+
// __md__
|
|
2158
|
+
strike: /(^|\s|[{\[])\~(.*?\S *)?\~(?=$|\s|[\.,\?:;\-}\]](?:$|\s))/g,
|
|
2159
|
+
// ~md~
|
|
2160
|
+
heading: /(?:^|\n)(\#{1,6}) (.*?\S *)(?:\n|$)/gm,
|
|
2161
|
+
// # md
|
|
2162
|
+
blockquote: /(?:^|\n)(?:>|>\s|>\s) (.+?)(?:\n|$)/gm,
|
|
2163
|
+
// > md
|
|
2164
|
+
monospace: /(^|\s)\`(.*?\S *)?\`(?=$|\s)/g,
|
|
2165
|
+
// `md`
|
|
2166
|
+
codeblock: /(^|\s)`{3}((?:(?:.*?$)\n)?(?:[\s\S]*?))`{3}(?=$|\s)/g,
|
|
2167
|
+
// ```md```
|
|
2168
|
+
nextline: /(.*)(\n)(.*)/gm,
|
|
2169
|
+
// /n
|
|
2170
|
+
line: /(^|[\n])(\*{3,}|\-{3,})(?=$|[\n])(.*)/g,
|
|
2171
|
+
// ---
|
|
2172
|
+
link: /(^|\s)\[(.+?)\]\(((?:(?:https?:\/\/(?:www\.)?|www\.)|(?:mailto:)).*?)\)(?:{:(.*)})?/gi,
|
|
2173
|
+
// [md](link)
|
|
2174
|
+
image: /!\[(.*)\]\((.*?)\s*(?:(?:'|"|")(.*)(?:'|"|"))?\s*\)(?:{:(.*)})?/gi,
|
|
2175
|
+
// {: vtype="$vtype" height="36px" width="36px"}
|
|
2176
|
+
video: /(?:\[\!\[(.*)\]\((.*?)\s*(?:(?:'|"|")(.*)(?:'|"|"))?\s*\)(?:{:(.*)})?]\((.*?)\s*(?:(?:'|"|")(.*)(?:'|"|"))?\s*\))(?:{:(.*)})?/gi,
|
|
2177
|
+
// [{: vtype="$vtype" height="36px" width="36px"}](link title){: vtype="$vtype" height="36px" width="36px"}
|
|
2178
|
+
bullet: (
|
|
2179
|
+
// /(?:^\s|\n|^)(?:[\-|●|○] (?!\[( |x)\])){1}(.*?\S [\-|●|○])*(?:(?:.*?$)\n)?((?:^\s|\n|^)*(?:[\-|●|○] ){1}(.*?\S [\-|●|○])*(?:(?:.*?$)\n)?)*/gm,
|
|
2180
|
+
/(^\s|\n|^)([\*|\-|●|○] )(.*?\S *)*(?:(?:.*?$)\n)?((\s)*([\*|\-|●|○] )(.*?\S *)*(?:(?:.*?$)\n)?)*/gm
|
|
2181
|
+
),
|
|
2182
|
+
// /(^\s|\n|^)(\-) (.*?\S -)*(?:(?:.*?$)\n)?((\s)*(\-)(.*?\S -)*(?:(?:.*?$)\n)?)*/gm, // - md
|
|
2183
|
+
numlist: /(^\s|\n|^)(\d)+(\.) (.*?\S *)*(?:(?:.*?$)\n)?((\s)*(\d)+(\.)(.*?\S *)*(?:(?:.*?$)\n)?)*/gm,
|
|
2184
|
+
// 1. md
|
|
2185
|
+
// tag support's
|
|
2186
|
+
anchor_tag: /<a(>| .*?>)(.*?)<\/a>/g,
|
|
2187
|
+
// to match <a> tag
|
|
2188
|
+
href: /href=(?:'|")(.*?)(?:'|") ?/g,
|
|
2189
|
+
// href inside a tag
|
|
2190
|
+
// vtypes
|
|
2191
|
+
gdrive_url: /(?:https:\/\/drive\.google\.com\/file\/d\/(.*?)\/view)/,
|
|
2192
|
+
vtype: /(?:vtype=(?:'|"|")(image|audio|video)(?:'|"|"))/
|
|
2193
|
+
}, gt = (e) => e.replace(/\*/g, "*").replace(/\_/g, "_").replace(/\~/g, "~"), cs = (e) => e.replace(/*/g, "*").replace(/_/g, "_").replace(/~/g, "~"), rn = (e) => (e && typeof e == "string" && (e = e.replace(/'|'/g, "'").replace(/"/g, '"').replace(/>/g, ">").replace(/</g, "<").replace(/&/g, "&").replace(///g, "/").replace(/ /g, " ").replace(/%2C/g, ",")), e), we = (e, t) => {
|
|
2194
|
+
let n = "", r = "";
|
|
2195
|
+
return (e[0] === `
|
|
2196
|
+
` || e[0] === " ") && (n = e[0]), (e[e.length - 1] === `
|
|
2197
|
+
` || e[e.length - 1] === " ") && (r = e[e.length - 1]), n + t + r;
|
|
2198
|
+
}, on = (e) => new RegExp(`<${e}.*?/?>`, "gm"), sn = (e) => {
|
|
2199
|
+
let t = e.match(B.gdrive_url);
|
|
2200
|
+
if (t && t.length > 1 && t[1])
|
|
2201
|
+
return `http://docs.google.com/uc?export=open&id=${t[1]}`;
|
|
2202
|
+
if (e.startsWith("@")) {
|
|
2203
|
+
let n = e.split("@")[1].split(":");
|
|
2204
|
+
if (n[0] === "gdrive")
|
|
2205
|
+
return `http://docs.google.com/uc?export=open&id=${n[1]}`;
|
|
2206
|
+
}
|
|
2207
|
+
return e;
|
|
2208
|
+
}, an = (e = "", t = "", n = "", r = "") => {
|
|
2209
|
+
let o = "image";
|
|
2210
|
+
if (r.length) {
|
|
2211
|
+
let s = r.match(B.vtype);
|
|
2212
|
+
s && s.length > 1 && s[1] && (o = s[1]);
|
|
2213
|
+
}
|
|
2214
|
+
return o == "audio" ? `<audio vmd="audio" controls ${r}>
|
|
2215
|
+
<source src="${n}" type="audio/mp3"/>
|
|
2216
|
+
</audio>` : o == "video" ? `<video vmd="video" controls ${r}>
|
|
2217
|
+
<source src="${n}" type="video/mp4"/>
|
|
2218
|
+
</video>` : `<img vmd="image" src="${n}" alt="${e}" title="${t}" ${r}>`;
|
|
2219
|
+
}, ha = {
|
|
2220
|
+
applyReverseMarkdown: (e) => (e = e.replace(on("br"), `
|
|
2221
|
+
`), e = rn(e), e = Markdown.reverseAnchor(e), e = e.replace(on("hr"), " --- "), e = Markdown.reverseRecursive(e), e.trim()),
|
|
2222
|
+
reverseRecursive: (e) => {
|
|
2223
|
+
let n = new DOMParser().parseFromString(e, "text/html").body.childNodes, r = e === `
|
|
2224
|
+
` ? `
|
|
2225
|
+
` : "";
|
|
2226
|
+
return Array.from(n).forEach((o) => {
|
|
2227
|
+
let s = o.nodeType === Node.TEXT_NODE, a = !s && o.tagName.toLowerCase();
|
|
2228
|
+
const i = o.innerText;
|
|
2229
|
+
if (i && (i.trim() || i.includes(`
|
|
2230
|
+
`)) || s || a === "br") {
|
|
2231
|
+
if (s)
|
|
2232
|
+
return r += o.data;
|
|
2233
|
+
let d = ls[a] || "", u = o.childNodes.length ? Markdown.reverseRecursive(o.innerHTML) : i;
|
|
2234
|
+
r += !u.trim() && u.includes(`
|
|
2235
|
+
`) ? `
|
|
2236
|
+
` : "";
|
|
2237
|
+
let f = u[u.length - 1] === `
|
|
2238
|
+
`, h = is.includes(a) ? "" : d;
|
|
2239
|
+
r += d + (f ? u.slice(0, u.length - 1) + h + `
|
|
2240
|
+
` : u + h);
|
|
2241
|
+
}
|
|
2242
|
+
}), r;
|
|
2243
|
+
},
|
|
2244
|
+
reverseAnchor: (e) => {
|
|
2245
|
+
let { anchor_tag: t, href: n } = B;
|
|
2246
|
+
return e.replace(t, (r, o, s) => {
|
|
2247
|
+
const a = s;
|
|
2248
|
+
let i;
|
|
2249
|
+
return o.replace(n, (d, u) => {
|
|
2250
|
+
i = u;
|
|
2251
|
+
}), i.includes("mailto:") ? i.replace("mailto:", "") : `${e[e.indexOf(r) - 1] !== " " ? " " : ""}[${a}](${encodeURI(i)})`;
|
|
2252
|
+
});
|
|
2253
|
+
},
|
|
2254
|
+
// md-apply
|
|
2255
|
+
applyMarkdown: (e, t = !1) => typeof e != "string" ? e : (e = rn(e), e = e.replace(/</g, "<").replace(/>/g, ">").replace(/<br>/g, `
|
|
2256
|
+
`).trim(), e = Markdown.applyRecursive(e, t), e = Markdown.applyOnce(e), e = Markdown.applyNextLine(e), e = cs(e), '<div class="vmd">' + e + "</div>"),
|
|
2257
|
+
applyRecursive: (e, t = !1) => (e = e.replace(B.bold, Markdown.getBoldHTML), e = e.replace(B.italic, Markdown.getItalicHTML), e = e.replace(B.underline, Markdown.getUnderLineHTML), e = e.replace(B.strike, Markdown.getStrikeHTML), e = e.replace(B.line, Markdown.getLineHTML), e = e.replace(B.bullet, Markdown.getBulletHTML), e = e.replace(B.numlist, Markdown.getNumlistHTML), t || (e = e.replace(B.video, Markdown.getVideoHTML), e = e.replace(B.image, Markdown.getImageHTML)), e = e.replace(B.link, Markdown.getLinkHTML), e),
|
|
2258
|
+
applyOnce: (e) => (e = e.replace(B.blockquote, Markdown.getBlockQuoteHTML), e = e.replace(B.heading, Markdown.getHeadingHTML), e = e.replace(B.codeblock, Markdown.getCodeblockHTML), e = e.replace(B.monospace, Markdown.getMonoSpaceHTML), e),
|
|
2259
|
+
applyNextLine: (e) => e.replace(B.nextline, Markdown.getNextLineHTML),
|
|
2260
|
+
// md-helper
|
|
2261
|
+
getBoldHTML: (e, t, n) => !n || !n.match(/[^_*`~]/) || n[0] === "*" || n[n.length - 1] === "*" || n[0] === " " && n[n.length - 1] === " " || !n ? e : t + ' <strong vmd="bold">' + Markdown.applyRecursive(n) + "</strong> ",
|
|
2262
|
+
getItalicHTML: (e, t, n) => !n || !n.match(/[^_*`~]/) || n[0] === "_" || n[n.length - 1] === "_" || n[0] === " " && n[n.length - 1] === " " || !n ? e : t + ' <i vmd="italic">' + Markdown.applyRecursive(n) + "</i> ",
|
|
2263
|
+
getUnderLineHTML: (e, t, n) => !n || !n.match(/[^_*`~]/) || n[0] === "__" || n[n.length - 1] === "__" || n[0] === " " && n[n.length - 1] === " " || !n ? e : t + ' <u vmd="underline">' + Markdown.applyRecursive(n) + "</u>",
|
|
2264
|
+
getStrikeHTML: (e, t, n) => !n || !n.match(/[^_*`~]/) || n[0] === "~" || n[n.length - 1] === "~" || n[0] === " " && n[n.length - 1] === " " || !n ? e : t + ' <strike vmd="strike">' + Markdown.applyRecursive(n) + "</strike> ",
|
|
2265
|
+
getHeadingHTML: (e, t, n) => {
|
|
2266
|
+
let r = t.length;
|
|
2267
|
+
return we(
|
|
2268
|
+
e,
|
|
2269
|
+
" <h" + r + ` vmd="h${r}">` + gt(n) + "</h" + r + "> "
|
|
2270
|
+
);
|
|
2271
|
+
},
|
|
2272
|
+
getBlockQuoteHTML: (e, t) => (t = t.trim(), t.length ? we(
|
|
2273
|
+
e,
|
|
2274
|
+
' <blockquote vmd="blockquote"><p>' + Markdown.applyRecursive(t) + "</p></blockquote> "
|
|
2275
|
+
) : e),
|
|
2276
|
+
getMonoSpaceHTML: (e, t, n) => !n || !n.match(/[^_*`~]/) || n[0] === "`" || n[n.length - 1] === "`" || n[0] === " " && n[n.length - 1] === " " ? e : t + ' <code vmd="monospace" class="code">“' + gt(n) + "”</code> ",
|
|
2277
|
+
getCodeblockHTML: (e, t, n) => n.trim().length === 0 ? e : t + ' <pre vmd="codeblock"> ' + Markdown.applyRecursive(n) + "</pre>",
|
|
2278
|
+
getNextLineHTML: (e, t, n, r) => t + ' <br vmd="br" > ' + r,
|
|
2279
|
+
getLineHTML: (e, t, n, r) => t + '<hr vmd="line" class="hr w100">' + Markdown.applyRecursive(r.trim()),
|
|
2280
|
+
getLinkHTML: (e, t, n, r, o) => {
|
|
2281
|
+
var s = r.startsWith("www.") ? "http://" + r : r;
|
|
2282
|
+
return t + ` <a vmd="link" href="${encodeURI(
|
|
2283
|
+
s
|
|
2284
|
+
)}" rel="noopener noreferrer" ${o}>${gt(n)}</a>`;
|
|
2285
|
+
},
|
|
2286
|
+
getImageHTML: (e, t, n, r, o) => {
|
|
2287
|
+
let s = an(t, r, sn(n), o);
|
|
2288
|
+
return we(e, s);
|
|
2289
|
+
},
|
|
2290
|
+
getVideoHTML: (e, t, n, r, o, s, a, i) => {
|
|
2291
|
+
let d = an(t, r, sn(n), o);
|
|
2292
|
+
return we(
|
|
2293
|
+
e,
|
|
2294
|
+
`<a vmd="hyperlink" href="${s}" title="${a}" rel="noreferrer" ${i}>${d}</a>`
|
|
2295
|
+
);
|
|
2296
|
+
},
|
|
2297
|
+
getBulletHTML: (e) => {
|
|
2298
|
+
if (isNaN(e)) {
|
|
2299
|
+
if (e.replace(/\s/g, "").replace(/\*/g, "").length == 0)
|
|
2300
|
+
return e;
|
|
2301
|
+
} else return e;
|
|
2302
|
+
return we(
|
|
2303
|
+
e,
|
|
2304
|
+
' <ul vmd="list-bullet" style="list-style-type: disc; list-style: inherit;">' + ((n) => {
|
|
2305
|
+
let r = "";
|
|
2306
|
+
for (var o = n.split(`
|
|
2307
|
+
`), s = 0; s < o.length; s++)
|
|
2308
|
+
o[s] = o[s].replace(/[\-|●|○]/, "-"), o[s].includes("-") && (r += o[s].replace(/\-/, ' <li style="list-style: inherit"> ') + "</li> ");
|
|
2309
|
+
return r;
|
|
2310
|
+
})(e) + "</ul> "
|
|
2311
|
+
);
|
|
2312
|
+
},
|
|
2313
|
+
getNumlistHTML: (e) => isNaN(e) ? we(
|
|
2314
|
+
e,
|
|
2315
|
+
' <ol vmd="list-number">' + ((n) => {
|
|
2316
|
+
let r = "";
|
|
2317
|
+
for (var o = n.split(`
|
|
2318
|
+
`), s = 0; s < o.length; s++)
|
|
2319
|
+
o[s] = o[s].replace(/(\d)*(\.)/, "-"), o[s].includes("-") && (r += o[s].replace(/\-/, '<li style="list-style: decimal"> ') + "</li>");
|
|
2320
|
+
return r;
|
|
2321
|
+
})(e) + "</ol> "
|
|
2322
|
+
) : e
|
|
2323
|
+
};
|
|
2324
|
+
function ma() {
|
|
2325
|
+
return { toTop: () => {
|
|
2326
|
+
window.scrollTo({
|
|
2327
|
+
top: 0,
|
|
2328
|
+
behavior: "smooth"
|
|
2329
|
+
});
|
|
2330
|
+
}, toNextPage: () => {
|
|
2331
|
+
window.scrollTo({
|
|
2332
|
+
top: window.innerHeight,
|
|
2333
|
+
behavior: "smooth"
|
|
2334
|
+
});
|
|
2335
|
+
}, byId: (o = "", s = !0) => {
|
|
2336
|
+
const a = document.getElementById(o);
|
|
2337
|
+
let i = "start";
|
|
2338
|
+
if (s) {
|
|
2339
|
+
const d = as();
|
|
2340
|
+
i = d === W.MINI_MOBILE || d === W.MOBILE_PORTRAIT ? "start" : "center";
|
|
2341
|
+
}
|
|
2342
|
+
a == null || a.scrollIntoView({
|
|
2343
|
+
behavior: "smooth",
|
|
2344
|
+
block: i
|
|
2345
|
+
});
|
|
2346
|
+
}, byIdOffSet: (o = "") => {
|
|
2347
|
+
const s = document.getElementById(o), a = 75, i = document.body.getBoundingClientRect().top, f = s.getBoundingClientRect().top - i - a;
|
|
2348
|
+
window.scroll({
|
|
2349
|
+
top: f,
|
|
2350
|
+
behavior: "smooth"
|
|
2351
|
+
});
|
|
2352
|
+
} };
|
|
2353
|
+
}
|
|
2354
|
+
function ga({
|
|
2355
|
+
meta: e = !1,
|
|
2356
|
+
ctrl: t = !1,
|
|
2357
|
+
shift: n = !1,
|
|
2358
|
+
key: r,
|
|
2359
|
+
handler: o
|
|
2360
|
+
}) {
|
|
2361
|
+
Oe("keydown", (s) => {
|
|
2362
|
+
if (s.metaKey === e) {
|
|
2363
|
+
if (s.ctrlKey !== t) return;
|
|
2364
|
+
if (s.shiftKey !== n) return;
|
|
2365
|
+
s.key === r && (s.stopImmediatePropagation(), s.preventDefault(), s.stopPropagation(), o());
|
|
2366
|
+
}
|
|
2367
|
+
});
|
|
2368
|
+
}
|
|
2369
|
+
const us = "useStore";
|
|
2370
|
+
let Dn = "vapp", Fn = "1.0.4";
|
|
2371
|
+
function qe(e) {
|
|
2372
|
+
return `vezham-ls-${Dn}-${Fn}-${e}`;
|
|
2373
|
+
}
|
|
2374
|
+
const wa = (e) => {
|
|
2375
|
+
e.pretext && (Dn = e.pretext), e.version && (Fn = e.version);
|
|
2376
|
+
}, ds = {
|
|
2377
|
+
get: (e, t) => {
|
|
2378
|
+
try {
|
|
2379
|
+
const n = window.localStorage.getItem(qe(e));
|
|
2380
|
+
return n && n !== "undefined" ? n : t || "";
|
|
2381
|
+
} catch (n) {
|
|
2382
|
+
return se.error(us, `key | ${qe(e)} | err: `, n), t || "";
|
|
2383
|
+
}
|
|
2384
|
+
},
|
|
2385
|
+
has: (e) => !!ds.get(e),
|
|
2386
|
+
set: (e, t) => window.localStorage.setItem(qe(e), t),
|
|
2387
|
+
delete: (e) => window.localStorage.removeItem(qe(e)),
|
|
2388
|
+
purge: () => window.localStorage.clear()
|
|
2389
|
+
};
|
|
2390
|
+
var fs = (e) => {
|
|
2391
|
+
switch (e) {
|
|
2392
|
+
case "success":
|
|
2393
|
+
return ms;
|
|
2394
|
+
case "info":
|
|
2395
|
+
return ws;
|
|
2396
|
+
case "warning":
|
|
2397
|
+
return gs;
|
|
2398
|
+
case "error":
|
|
2399
|
+
return ys;
|
|
2400
|
+
default:
|
|
2401
|
+
return null;
|
|
2402
|
+
}
|
|
2403
|
+
}, ps = Array(12).fill(0), hs = ({ visible: e, className: t }) => p.createElement("div", { className: ["sonner-loading-wrapper", t].filter(Boolean).join(" "), "data-visible": e }, p.createElement("div", { className: "sonner-spinner" }, ps.map((n, r) => p.createElement("div", { className: "sonner-loading-bar", key: `spinner-bar-${r}` })))), ms = p.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 20 20", fill: "currentColor", height: "20", width: "20" }, p.createElement("path", { fillRule: "evenodd", d: "M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z", clipRule: "evenodd" })), gs = p.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "currentColor", height: "20", width: "20" }, p.createElement("path", { fillRule: "evenodd", d: "M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z", clipRule: "evenodd" })), ws = p.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 20 20", fill: "currentColor", height: "20", width: "20" }, p.createElement("path", { fillRule: "evenodd", d: "M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z", clipRule: "evenodd" })), ys = p.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 20 20", fill: "currentColor", height: "20", width: "20" }, p.createElement("path", { fillRule: "evenodd", d: "M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z", clipRule: "evenodd" })), bs = p.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: "12", height: "12", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }, p.createElement("line", { x1: "18", y1: "6", x2: "6", y2: "18" }), p.createElement("line", { x1: "6", y1: "6", x2: "18", y2: "18" })), vs = () => {
|
|
2404
|
+
let [e, t] = p.useState(document.hidden);
|
|
2405
|
+
return p.useEffect(() => {
|
|
2406
|
+
let n = () => {
|
|
2407
|
+
t(document.hidden);
|
|
2408
|
+
};
|
|
2409
|
+
return document.addEventListener("visibilitychange", n), () => window.removeEventListener("visibilitychange", n);
|
|
2410
|
+
}, []), e;
|
|
2411
|
+
}, Ot = 1, xs = class {
|
|
2412
|
+
constructor() {
|
|
2413
|
+
this.subscribe = (e) => (this.subscribers.push(e), () => {
|
|
2414
|
+
let t = this.subscribers.indexOf(e);
|
|
2415
|
+
this.subscribers.splice(t, 1);
|
|
2416
|
+
}), this.publish = (e) => {
|
|
2417
|
+
this.subscribers.forEach((t) => t(e));
|
|
2418
|
+
}, this.addToast = (e) => {
|
|
2419
|
+
this.publish(e), this.toasts = [...this.toasts, e];
|
|
2420
|
+
}, this.create = (e) => {
|
|
2421
|
+
var t;
|
|
2422
|
+
let { message: n, ...r } = e, o = typeof (e == null ? void 0 : e.id) == "number" || ((t = e.id) == null ? void 0 : t.length) > 0 ? e.id : Ot++, s = this.toasts.find((i) => i.id === o), a = e.dismissible === void 0 ? !0 : e.dismissible;
|
|
2423
|
+
return this.dismissedToasts.has(o) && this.dismissedToasts.delete(o), s ? this.toasts = this.toasts.map((i) => i.id === o ? (this.publish({ ...i, ...e, id: o, title: n }), { ...i, ...e, id: o, dismissible: a, title: n }) : i) : this.addToast({ title: n, ...r, dismissible: a, id: o }), o;
|
|
2424
|
+
}, this.dismiss = (e) => (this.dismissedToasts.add(e), e || this.toasts.forEach((t) => {
|
|
2425
|
+
this.subscribers.forEach((n) => n({ id: t.id, dismiss: !0 }));
|
|
2426
|
+
}), this.subscribers.forEach((t) => t({ id: e, dismiss: !0 })), e), this.message = (e, t) => this.create({ ...t, message: e }), this.error = (e, t) => this.create({ ...t, message: e, type: "error" }), this.success = (e, t) => this.create({ ...t, type: "success", message: e }), this.info = (e, t) => this.create({ ...t, type: "info", message: e }), this.warning = (e, t) => this.create({ ...t, type: "warning", message: e }), this.loading = (e, t) => this.create({ ...t, type: "loading", message: e }), this.promise = (e, t) => {
|
|
2427
|
+
if (!t) return;
|
|
2428
|
+
let n;
|
|
2429
|
+
t.loading !== void 0 && (n = this.create({ ...t, promise: e, type: "loading", message: t.loading, description: typeof t.description != "function" ? t.description : void 0 }));
|
|
2430
|
+
let r = e instanceof Promise ? e : e(), o = n !== void 0, s, a = r.then(async (d) => {
|
|
2431
|
+
if (s = ["resolve", d], p.isValidElement(d)) o = !1, this.create({ id: n, type: "default", message: d });
|
|
2432
|
+
else if (Ss(d) && !d.ok) {
|
|
2433
|
+
o = !1;
|
|
2434
|
+
let u = typeof t.error == "function" ? await t.error(`HTTP error! status: ${d.status}`) : t.error, f = typeof t.description == "function" ? await t.description(`HTTP error! status: ${d.status}`) : t.description;
|
|
2435
|
+
this.create({ id: n, type: "error", message: u, description: f });
|
|
2436
|
+
} else if (t.success !== void 0) {
|
|
2437
|
+
o = !1;
|
|
2438
|
+
let u = typeof t.success == "function" ? await t.success(d) : t.success, f = typeof t.description == "function" ? await t.description(d) : t.description;
|
|
2439
|
+
this.create({ id: n, type: "success", message: u, description: f });
|
|
2440
|
+
}
|
|
2441
|
+
}).catch(async (d) => {
|
|
2442
|
+
if (s = ["reject", d], t.error !== void 0) {
|
|
2443
|
+
o = !1;
|
|
2444
|
+
let u = typeof t.error == "function" ? await t.error(d) : t.error, f = typeof t.description == "function" ? await t.description(d) : t.description;
|
|
2445
|
+
this.create({ id: n, type: "error", message: u, description: f });
|
|
2446
|
+
}
|
|
2447
|
+
}).finally(() => {
|
|
2448
|
+
var d;
|
|
2449
|
+
o && (this.dismiss(n), n = void 0), (d = t.finally) == null || d.call(t);
|
|
2450
|
+
}), i = () => new Promise((d, u) => a.then(() => s[0] === "reject" ? u(s[1]) : d(s[1])).catch(u));
|
|
2451
|
+
return typeof n != "string" && typeof n != "number" ? { unwrap: i } : Object.assign(n, { unwrap: i });
|
|
2452
|
+
}, this.custom = (e, t) => {
|
|
2453
|
+
let n = (t == null ? void 0 : t.id) || Ot++;
|
|
2454
|
+
return this.create({ jsx: e(n), id: n, ...t }), n;
|
|
2455
|
+
}, this.getActiveToasts = () => this.toasts.filter((e) => !this.dismissedToasts.has(e.id)), this.subscribers = [], this.toasts = [], this.dismissedToasts = /* @__PURE__ */ new Set();
|
|
2456
|
+
}
|
|
2457
|
+
}, H = new xs(), Es = (e, t) => {
|
|
2458
|
+
let n = (t == null ? void 0 : t.id) || Ot++;
|
|
2459
|
+
return H.addToast({ title: e, ...t, id: n }), n;
|
|
2460
|
+
}, Ss = (e) => e && typeof e == "object" && "ok" in e && typeof e.ok == "boolean" && "status" in e && typeof e.status == "number", Ts = Es, Rs = () => H.toasts, Os = () => H.getActiveToasts(), As = Object.assign(Ts, { success: H.success, info: H.info, warning: H.warning, error: H.error, custom: H.custom, message: H.message, promise: H.promise, dismiss: H.dismiss, loading: H.loading }, { getHistory: Rs, getToasts: Os });
|
|
2461
|
+
function ks(e, { insertAt: t } = {}) {
|
|
2462
|
+
if (typeof document > "u") return;
|
|
2463
|
+
let n = document.head || document.getElementsByTagName("head")[0], r = document.createElement("style");
|
|
2464
|
+
r.type = "text/css", t === "top" && n.firstChild ? n.insertBefore(r, n.firstChild) : n.appendChild(r), r.styleSheet ? r.styleSheet.cssText = e : r.appendChild(document.createTextNode(e));
|
|
2465
|
+
}
|
|
2466
|
+
ks(`:where(html[dir="ltr"]),:where([data-sonner-toaster][dir="ltr"]){--toast-icon-margin-start: -3px;--toast-icon-margin-end: 4px;--toast-svg-margin-start: -1px;--toast-svg-margin-end: 0px;--toast-button-margin-start: auto;--toast-button-margin-end: 0;--toast-close-button-start: 0;--toast-close-button-end: unset;--toast-close-button-transform: translate(-35%, -35%)}:where(html[dir="rtl"]),:where([data-sonner-toaster][dir="rtl"]){--toast-icon-margin-start: 4px;--toast-icon-margin-end: -3px;--toast-svg-margin-start: 0px;--toast-svg-margin-end: -1px;--toast-button-margin-start: 0;--toast-button-margin-end: auto;--toast-close-button-start: unset;--toast-close-button-end: 0;--toast-close-button-transform: translate(35%, -35%)}:where([data-sonner-toaster]){position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1: hsl(0, 0%, 99%);--gray2: hsl(0, 0%, 97.3%);--gray3: hsl(0, 0%, 95.1%);--gray4: hsl(0, 0%, 93%);--gray5: hsl(0, 0%, 90.9%);--gray6: hsl(0, 0%, 88.7%);--gray7: hsl(0, 0%, 85.8%);--gray8: hsl(0, 0%, 78%);--gray9: hsl(0, 0%, 56.1%);--gray10: hsl(0, 0%, 52.3%);--gray11: hsl(0, 0%, 43.5%);--gray12: hsl(0, 0%, 9%);--border-radius: 8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:none;z-index:999999999;transition:transform .4s ease}:where([data-sonner-toaster][data-lifted="true"]){transform:translateY(-10px)}@media (hover: none) and (pointer: coarse){:where([data-sonner-toaster][data-lifted="true"]){transform:none}}:where([data-sonner-toaster][data-x-position="right"]){right:var(--offset-right)}:where([data-sonner-toaster][data-x-position="left"]){left:var(--offset-left)}:where([data-sonner-toaster][data-x-position="center"]){left:50%;transform:translate(-50%)}:where([data-sonner-toaster][data-y-position="top"]){top:var(--offset-top)}:where([data-sonner-toaster][data-y-position="bottom"]){bottom:var(--offset-bottom)}:where([data-sonner-toast]){--y: translateY(100%);--lift-amount: calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);filter:blur(0);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:none;overflow-wrap:anywhere}:where([data-sonner-toast][data-styled="true"]){padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px #0000001a;width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}:where([data-sonner-toast]:focus-visible){box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast][data-y-position="top"]){top:0;--y: translateY(-100%);--lift: 1;--lift-amount: calc(1 * var(--gap))}:where([data-sonner-toast][data-y-position="bottom"]){bottom:0;--y: translateY(100%);--lift: -1;--lift-amount: calc(var(--lift) * var(--gap))}:where([data-sonner-toast]) :where([data-description]){font-weight:400;line-height:1.4;color:inherit}:where([data-sonner-toast]) :where([data-title]){font-weight:500;line-height:1.5;color:inherit}:where([data-sonner-toast]) :where([data-icon]){display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}:where([data-sonner-toast][data-promise="true"]) :where([data-icon])>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}:where([data-sonner-toast]) :where([data-icon])>*{flex-shrink:0}:where([data-sonner-toast]) :where([data-icon]) svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}:where([data-sonner-toast]) :where([data-content]){display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;cursor:pointer;outline:none;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}:where([data-sonner-toast]) :where([data-button]):focus-visible{box-shadow:0 0 0 2px #0006}:where([data-sonner-toast]) :where([data-button]):first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}:where([data-sonner-toast]) :where([data-cancel]){color:var(--normal-text);background:rgba(0,0,0,.08)}:where([data-sonner-toast][data-theme="dark"]) :where([data-cancel]){background:rgba(255,255,255,.3)}:where([data-sonner-toast]) :where([data-close-button]){position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast] [data-close-button]{background:var(--gray1)}:where([data-sonner-toast]) :where([data-close-button]):focus-visible{box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast]) :where([data-disabled="true"]){cursor:not-allowed}:where([data-sonner-toast]):hover :where([data-close-button]):hover{background:var(--gray2);border-color:var(--gray5)}:where([data-sonner-toast][data-swiping="true"]):before{content:"";position:absolute;left:-50%;right:-50%;height:100%;z-index:-1}:where([data-sonner-toast][data-y-position="top"][data-swiping="true"]):before{bottom:50%;transform:scaleY(3) translateY(50%)}:where([data-sonner-toast][data-y-position="bottom"][data-swiping="true"]):before{top:50%;transform:scaleY(3) translateY(-50%)}:where([data-sonner-toast][data-swiping="false"][data-removed="true"]):before{content:"";position:absolute;inset:0;transform:scaleY(2)}:where([data-sonner-toast]):after{content:"";position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}:where([data-sonner-toast][data-mounted="true"]){--y: translateY(0);opacity:1}:where([data-sonner-toast][data-expanded="false"][data-front="false"]){--scale: var(--toasts-before) * .05 + 1;--y: translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}:where([data-sonner-toast])>*{transition:opacity .4s}:where([data-sonner-toast][data-expanded="false"][data-front="false"][data-styled="true"])>*{opacity:0}:where([data-sonner-toast][data-visible="false"]){opacity:0;pointer-events:none}:where([data-sonner-toast][data-mounted="true"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}:where([data-sonner-toast][data-removed="true"][data-front="true"][data-swipe-out="false"]){--y: translateY(calc(var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="false"]){--y: translateY(40%);opacity:0;transition:transform .5s,opacity .2s}:where([data-sonner-toast][data-removed="true"][data-front="false"]):before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y, 0px)) translate(var(--swipe-amount-x, 0px));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width: 600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-theme=light]{--normal-bg: #fff;--normal-border: var(--gray4);--normal-text: var(--gray12);--success-bg: hsl(143, 85%, 96%);--success-border: hsl(145, 92%, 91%);--success-text: hsl(140, 100%, 27%);--info-bg: hsl(208, 100%, 97%);--info-border: hsl(221, 91%, 91%);--info-text: hsl(210, 92%, 45%);--warning-bg: hsl(49, 100%, 97%);--warning-border: hsl(49, 91%, 91%);--warning-text: hsl(31, 92%, 45%);--error-bg: hsl(359, 100%, 97%);--error-border: hsl(359, 100%, 94%);--error-text: hsl(360, 100%, 45%)}[data-sonner-toaster][data-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg: #000;--normal-border: hsl(0, 0%, 20%);--normal-text: var(--gray1)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg: #fff;--normal-border: var(--gray3);--normal-text: var(--gray12)}[data-sonner-toaster][data-theme=dark]{--normal-bg: #000;--normal-bg-hover: hsl(0, 0%, 12%);--normal-border: hsl(0, 0%, 20%);--normal-border-hover: hsl(0, 0%, 25%);--normal-text: var(--gray1);--success-bg: hsl(150, 100%, 6%);--success-border: hsl(147, 100%, 12%);--success-text: hsl(150, 86%, 65%);--info-bg: hsl(215, 100%, 6%);--info-border: hsl(223, 100%, 12%);--info-text: hsl(216, 87%, 65%);--warning-bg: hsl(64, 100%, 6%);--warning-border: hsl(60, 100%, 12%);--warning-text: hsl(46, 87%, 65%);--error-bg: hsl(358, 76%, 10%);--error-border: hsl(357, 89%, 16%);--error-text: hsl(358, 100%, 81%)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success],[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info],[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning],[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error],[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size: 16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:nth-child(1){animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}to{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}to{opacity:.15}}@media (prefers-reduced-motion){[data-sonner-toast],[data-sonner-toast]>*,.sonner-loading-bar{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}
|
|
2467
|
+
`);
|
|
2468
|
+
function ze(e) {
|
|
2469
|
+
return e.label !== void 0;
|
|
2470
|
+
}
|
|
2471
|
+
var Ns = 3, _s = "32px", Ls = "16px", ln = 4e3, Cs = 356, Ms = 14, Ps = 20, Bs = 200;
|
|
2472
|
+
function X(...e) {
|
|
2473
|
+
return e.filter(Boolean).join(" ");
|
|
2474
|
+
}
|
|
2475
|
+
function Is(e) {
|
|
2476
|
+
let [t, n] = e.split("-"), r = [];
|
|
2477
|
+
return t && r.push(t), n && r.push(n), r;
|
|
2478
|
+
}
|
|
2479
|
+
var Ds = (e) => {
|
|
2480
|
+
var t, n, r, o, s, a, i, d, u, f, h;
|
|
2481
|
+
let { invert: y, toast: l, unstyled: w, interacting: g, setHeights: m, visibleToasts: S, heights: T, index: R, toasts: D, expanded: _, removeToast: x, defaultRichColors: M, closeButton: F, style: Q, cancelButtonStyle: tt, actionButtonStyle: Me, className: ee = "", descriptionClassName: Pe = "", duration: fe, position: Be, gap: ae, loadingIcon: te, expandByDefault: Ie, classNames: E, icons: q, closeButtonAriaLabel: nt = "Close toast", pauseWhenPageIsHidden: k } = e, [N, C] = p.useState(null), [j, pe] = p.useState(null), [P, rt] = p.useState(!1), [xe, De] = p.useState(!1), [Ee, ot] = p.useState(!1), [_t, jn] = p.useState(!1), [Hn, Lt] = p.useState(!1), [Un, st] = p.useState(0), [qn, Ct] = p.useState(0), Se = p.useRef(l.duration || fe || ln), Mt = p.useRef(null), ie = p.useRef(null), zn = R === 0, $n = R + 1 <= S, $ = l.type, he = l.dismissible !== !1, Wn = l.className || "", Jn = l.descriptionClassName || "", Fe = p.useMemo(() => T.findIndex((b) => b.toastId === l.id) || 0, [T, l.id]), Vn = p.useMemo(() => {
|
|
2482
|
+
var b;
|
|
2483
|
+
return (b = l.closeButton) != null ? b : F;
|
|
2484
|
+
}, [l.closeButton, F]), Pt = p.useMemo(() => l.duration || fe || ln, [l.duration, fe]), at = p.useRef(0), me = p.useRef(0), Bt = p.useRef(0), ge = p.useRef(null), [Kn, Yn] = Be.split("-"), It = p.useMemo(() => T.reduce((b, O, L) => L >= Fe ? b : b + O.height, 0), [T, Fe]), Dt = vs(), Xn = l.invert || y, it = $ === "loading";
|
|
2485
|
+
me.current = p.useMemo(() => Fe * ae + It, [Fe, It]), p.useEffect(() => {
|
|
2486
|
+
Se.current = Pt;
|
|
2487
|
+
}, [Pt]), p.useEffect(() => {
|
|
2488
|
+
rt(!0);
|
|
2489
|
+
}, []), p.useEffect(() => {
|
|
2490
|
+
let b = ie.current;
|
|
2491
|
+
if (b) {
|
|
2492
|
+
let O = b.getBoundingClientRect().height;
|
|
2493
|
+
return Ct(O), m((L) => [{ toastId: l.id, height: O, position: l.position }, ...L]), () => m((L) => L.filter((V) => V.toastId !== l.id));
|
|
2494
|
+
}
|
|
2495
|
+
}, [m, l.id]), p.useLayoutEffect(() => {
|
|
2496
|
+
if (!P) return;
|
|
2497
|
+
let b = ie.current, O = b.style.height;
|
|
2498
|
+
b.style.height = "auto";
|
|
2499
|
+
let L = b.getBoundingClientRect().height;
|
|
2500
|
+
b.style.height = O, Ct(L), m((V) => V.find((K) => K.toastId === l.id) ? V.map((K) => K.toastId === l.id ? { ...K, height: L } : K) : [{ toastId: l.id, height: L, position: l.position }, ...V]);
|
|
2501
|
+
}, [P, l.title, l.description, m, l.id]);
|
|
2502
|
+
let ne = p.useCallback(() => {
|
|
2503
|
+
De(!0), st(me.current), m((b) => b.filter((O) => O.toastId !== l.id)), setTimeout(() => {
|
|
2504
|
+
x(l);
|
|
2505
|
+
}, Bs);
|
|
2506
|
+
}, [l, x, m, me]);
|
|
2507
|
+
p.useEffect(() => {
|
|
2508
|
+
if (l.promise && $ === "loading" || l.duration === 1 / 0 || l.type === "loading") return;
|
|
2509
|
+
let b;
|
|
2510
|
+
return _ || g || k && Dt ? (() => {
|
|
2511
|
+
if (Bt.current < at.current) {
|
|
2512
|
+
let O = (/* @__PURE__ */ new Date()).getTime() - at.current;
|
|
2513
|
+
Se.current = Se.current - O;
|
|
2514
|
+
}
|
|
2515
|
+
Bt.current = (/* @__PURE__ */ new Date()).getTime();
|
|
2516
|
+
})() : Se.current !== 1 / 0 && (at.current = (/* @__PURE__ */ new Date()).getTime(), b = setTimeout(() => {
|
|
2517
|
+
var O;
|
|
2518
|
+
(O = l.onAutoClose) == null || O.call(l, l), ne();
|
|
2519
|
+
}, Se.current)), () => clearTimeout(b);
|
|
2520
|
+
}, [_, g, l, $, k, Dt, ne]), p.useEffect(() => {
|
|
2521
|
+
l.delete && ne();
|
|
2522
|
+
}, [ne, l.delete]);
|
|
2523
|
+
function Gn() {
|
|
2524
|
+
var b, O, L;
|
|
2525
|
+
return q != null && q.loading ? p.createElement("div", { className: X(E == null ? void 0 : E.loader, (b = l == null ? void 0 : l.classNames) == null ? void 0 : b.loader, "sonner-loader"), "data-visible": $ === "loading" }, q.loading) : te ? p.createElement("div", { className: X(E == null ? void 0 : E.loader, (O = l == null ? void 0 : l.classNames) == null ? void 0 : O.loader, "sonner-loader"), "data-visible": $ === "loading" }, te) : p.createElement(hs, { className: X(E == null ? void 0 : E.loader, (L = l == null ? void 0 : l.classNames) == null ? void 0 : L.loader), visible: $ === "loading" });
|
|
2526
|
+
}
|
|
2527
|
+
return p.createElement("li", { tabIndex: 0, ref: ie, className: X(ee, Wn, E == null ? void 0 : E.toast, (t = l == null ? void 0 : l.classNames) == null ? void 0 : t.toast, E == null ? void 0 : E.default, E == null ? void 0 : E[$], (n = l == null ? void 0 : l.classNames) == null ? void 0 : n[$]), "data-sonner-toast": "", "data-rich-colors": (r = l.richColors) != null ? r : M, "data-styled": !(l.jsx || l.unstyled || w), "data-mounted": P, "data-promise": !!l.promise, "data-swiped": Hn, "data-removed": xe, "data-visible": $n, "data-y-position": Kn, "data-x-position": Yn, "data-index": R, "data-front": zn, "data-swiping": Ee, "data-dismissible": he, "data-type": $, "data-invert": Xn, "data-swipe-out": _t, "data-swipe-direction": j, "data-expanded": !!(_ || Ie && P), style: { "--index": R, "--toasts-before": R, "--z-index": D.length - R, "--offset": `${xe ? Un : me.current}px`, "--initial-height": Ie ? "auto" : `${qn}px`, ...Q, ...l.style }, onDragEnd: () => {
|
|
2528
|
+
ot(!1), C(null), ge.current = null;
|
|
2529
|
+
}, onPointerDown: (b) => {
|
|
2530
|
+
it || !he || (Mt.current = /* @__PURE__ */ new Date(), st(me.current), b.target.setPointerCapture(b.pointerId), b.target.tagName !== "BUTTON" && (ot(!0), ge.current = { x: b.clientX, y: b.clientY }));
|
|
2531
|
+
}, onPointerUp: () => {
|
|
2532
|
+
var b, O, L, V;
|
|
2533
|
+
if (_t || !he) return;
|
|
2534
|
+
ge.current = null;
|
|
2535
|
+
let K = Number(((b = ie.current) == null ? void 0 : b.style.getPropertyValue("--swipe-amount-x").replace("px", "")) || 0), re = Number(((O = ie.current) == null ? void 0 : O.style.getPropertyValue("--swipe-amount-y").replace("px", "")) || 0), le = (/* @__PURE__ */ new Date()).getTime() - ((L = Mt.current) == null ? void 0 : L.getTime()), Y = N === "x" ? K : re, oe = Math.abs(Y) / le;
|
|
2536
|
+
if (Math.abs(Y) >= Ps || oe > 0.11) {
|
|
2537
|
+
st(me.current), (V = l.onDismiss) == null || V.call(l, l), pe(N === "x" ? K > 0 ? "right" : "left" : re > 0 ? "down" : "up"), ne(), jn(!0), Lt(!1);
|
|
2538
|
+
return;
|
|
2539
|
+
}
|
|
2540
|
+
ot(!1), C(null);
|
|
2541
|
+
}, onPointerMove: (b) => {
|
|
2542
|
+
var O, L, V, K;
|
|
2543
|
+
if (!ge.current || !he || ((O = window.getSelection()) == null ? void 0 : O.toString().length) > 0) return;
|
|
2544
|
+
let re = b.clientY - ge.current.y, le = b.clientX - ge.current.x, Y = (L = e.swipeDirections) != null ? L : Is(Be);
|
|
2545
|
+
!N && (Math.abs(le) > 1 || Math.abs(re) > 1) && C(Math.abs(le) > Math.abs(re) ? "x" : "y");
|
|
2546
|
+
let oe = { x: 0, y: 0 };
|
|
2547
|
+
N === "y" ? (Y.includes("top") || Y.includes("bottom")) && (Y.includes("top") && re < 0 || Y.includes("bottom") && re > 0) && (oe.y = re) : N === "x" && (Y.includes("left") || Y.includes("right")) && (Y.includes("left") && le < 0 || Y.includes("right") && le > 0) && (oe.x = le), (Math.abs(oe.x) > 0 || Math.abs(oe.y) > 0) && Lt(!0), (V = ie.current) == null || V.style.setProperty("--swipe-amount-x", `${oe.x}px`), (K = ie.current) == null || K.style.setProperty("--swipe-amount-y", `${oe.y}px`);
|
|
2548
|
+
} }, Vn && !l.jsx ? p.createElement("button", { "aria-label": nt, "data-disabled": it, "data-close-button": !0, onClick: it || !he ? () => {
|
|
2549
|
+
} : () => {
|
|
2550
|
+
var b;
|
|
2551
|
+
ne(), (b = l.onDismiss) == null || b.call(l, l);
|
|
2552
|
+
}, className: X(E == null ? void 0 : E.closeButton, (o = l == null ? void 0 : l.classNames) == null ? void 0 : o.closeButton) }, (s = q == null ? void 0 : q.close) != null ? s : bs) : null, l.jsx || lt(l.title) ? l.jsx ? l.jsx : typeof l.title == "function" ? l.title() : l.title : p.createElement(p.Fragment, null, $ || l.icon || l.promise ? p.createElement("div", { "data-icon": "", className: X(E == null ? void 0 : E.icon, (a = l == null ? void 0 : l.classNames) == null ? void 0 : a.icon) }, l.promise || l.type === "loading" && !l.icon ? l.icon || Gn() : null, l.type !== "loading" ? l.icon || (q == null ? void 0 : q[$]) || fs($) : null) : null, p.createElement("div", { "data-content": "", className: X(E == null ? void 0 : E.content, (i = l == null ? void 0 : l.classNames) == null ? void 0 : i.content) }, p.createElement("div", { "data-title": "", className: X(E == null ? void 0 : E.title, (d = l == null ? void 0 : l.classNames) == null ? void 0 : d.title) }, typeof l.title == "function" ? l.title() : l.title), l.description ? p.createElement("div", { "data-description": "", className: X(Pe, Jn, E == null ? void 0 : E.description, (u = l == null ? void 0 : l.classNames) == null ? void 0 : u.description) }, typeof l.description == "function" ? l.description() : l.description) : null), lt(l.cancel) ? l.cancel : l.cancel && ze(l.cancel) ? p.createElement("button", { "data-button": !0, "data-cancel": !0, style: l.cancelButtonStyle || tt, onClick: (b) => {
|
|
2553
|
+
var O, L;
|
|
2554
|
+
ze(l.cancel) && he && ((L = (O = l.cancel).onClick) == null || L.call(O, b), ne());
|
|
2555
|
+
}, className: X(E == null ? void 0 : E.cancelButton, (f = l == null ? void 0 : l.classNames) == null ? void 0 : f.cancelButton) }, l.cancel.label) : null, lt(l.action) ? l.action : l.action && ze(l.action) ? p.createElement("button", { "data-button": !0, "data-action": !0, style: l.actionButtonStyle || Me, onClick: (b) => {
|
|
2556
|
+
var O, L;
|
|
2557
|
+
ze(l.action) && ((L = (O = l.action).onClick) == null || L.call(O, b), !b.defaultPrevented && ne());
|
|
2558
|
+
}, className: X(E == null ? void 0 : E.actionButton, (h = l == null ? void 0 : l.classNames) == null ? void 0 : h.actionButton) }, l.action.label) : null));
|
|
2559
|
+
};
|
|
2560
|
+
function cn() {
|
|
2561
|
+
if (typeof window > "u" || typeof document > "u") return "ltr";
|
|
2562
|
+
let e = document.documentElement.getAttribute("dir");
|
|
2563
|
+
return e === "auto" || !e ? window.getComputedStyle(document.documentElement).direction : e;
|
|
2564
|
+
}
|
|
2565
|
+
function Fs(e, t) {
|
|
2566
|
+
let n = {};
|
|
2567
|
+
return [e, t].forEach((r, o) => {
|
|
2568
|
+
let s = o === 1, a = s ? "--mobile-offset" : "--offset", i = s ? Ls : _s;
|
|
2569
|
+
function d(u) {
|
|
2570
|
+
["top", "right", "bottom", "left"].forEach((f) => {
|
|
2571
|
+
n[`${a}-${f}`] = typeof u == "number" ? `${u}px` : u;
|
|
2572
|
+
});
|
|
2573
|
+
}
|
|
2574
|
+
typeof r == "number" || typeof r == "string" ? d(r) : typeof r == "object" ? ["top", "right", "bottom", "left"].forEach((u) => {
|
|
2575
|
+
r[u] === void 0 ? n[`${a}-${u}`] = i : n[`${a}-${u}`] = typeof r[u] == "number" ? `${r[u]}px` : r[u];
|
|
2576
|
+
}) : d(i);
|
|
2577
|
+
}), n;
|
|
2578
|
+
}
|
|
2579
|
+
er(function(e, t) {
|
|
2580
|
+
let { invert: n, position: r = "bottom-right", hotkey: o = ["altKey", "KeyT"], expand: s, closeButton: a, className: i, offset: d, mobileOffset: u, theme: f = "light", richColors: h, duration: y, style: l, visibleToasts: w = Ns, toastOptions: g, dir: m = cn(), gap: S = Ms, loadingIcon: T, icons: R, containerAriaLabel: D = "Notifications", pauseWhenPageIsHidden: _ } = e, [x, M] = p.useState([]), F = p.useMemo(() => Array.from(new Set([r].concat(x.filter((k) => k.position).map((k) => k.position)))), [x, r]), [Q, tt] = p.useState([]), [Me, ee] = p.useState(!1), [Pe, fe] = p.useState(!1), [Be, ae] = p.useState(f !== "system" ? f : typeof window < "u" && window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light"), te = p.useRef(null), Ie = o.join("+").replace(/Key/g, "").replace(/Digit/g, ""), E = p.useRef(null), q = p.useRef(!1), nt = p.useCallback((k) => {
|
|
2581
|
+
M((N) => {
|
|
2582
|
+
var C;
|
|
2583
|
+
return (C = N.find((j) => j.id === k.id)) != null && C.delete || H.dismiss(k.id), N.filter(({ id: j }) => j !== k.id);
|
|
2584
|
+
});
|
|
2585
|
+
}, []);
|
|
2586
|
+
return p.useEffect(() => H.subscribe((k) => {
|
|
2587
|
+
if (k.dismiss) {
|
|
2588
|
+
M((N) => N.map((C) => C.id === k.id ? { ...C, delete: !0 } : C));
|
|
2589
|
+
return;
|
|
2590
|
+
}
|
|
2591
|
+
setTimeout(() => {
|
|
2592
|
+
tr.flushSync(() => {
|
|
2593
|
+
M((N) => {
|
|
2594
|
+
let C = N.findIndex((j) => j.id === k.id);
|
|
2595
|
+
return C !== -1 ? [...N.slice(0, C), { ...N[C], ...k }, ...N.slice(C + 1)] : [k, ...N];
|
|
2596
|
+
});
|
|
2597
|
+
});
|
|
2598
|
+
});
|
|
2599
|
+
}), []), p.useEffect(() => {
|
|
2600
|
+
if (f !== "system") {
|
|
2601
|
+
ae(f);
|
|
2602
|
+
return;
|
|
2603
|
+
}
|
|
2604
|
+
if (f === "system" && (window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches ? ae("dark") : ae("light")), typeof window > "u") return;
|
|
2605
|
+
let k = window.matchMedia("(prefers-color-scheme: dark)");
|
|
2606
|
+
try {
|
|
2607
|
+
k.addEventListener("change", ({ matches: N }) => {
|
|
2608
|
+
ae(N ? "dark" : "light");
|
|
2609
|
+
});
|
|
2610
|
+
} catch {
|
|
2611
|
+
k.addListener(({ matches: C }) => {
|
|
2612
|
+
try {
|
|
2613
|
+
ae(C ? "dark" : "light");
|
|
2614
|
+
} catch (j) {
|
|
2615
|
+
console.error(j);
|
|
2616
|
+
}
|
|
2617
|
+
});
|
|
2618
|
+
}
|
|
2619
|
+
}, [f]), p.useEffect(() => {
|
|
2620
|
+
x.length <= 1 && ee(!1);
|
|
2621
|
+
}, [x]), p.useEffect(() => {
|
|
2622
|
+
let k = (N) => {
|
|
2623
|
+
var C, j;
|
|
2624
|
+
o.every((pe) => N[pe] || N.code === pe) && (ee(!0), (C = te.current) == null || C.focus()), N.code === "Escape" && (document.activeElement === te.current || (j = te.current) != null && j.contains(document.activeElement)) && ee(!1);
|
|
2625
|
+
};
|
|
2626
|
+
return document.addEventListener("keydown", k), () => document.removeEventListener("keydown", k);
|
|
2627
|
+
}, [o]), p.useEffect(() => {
|
|
2628
|
+
if (te.current) return () => {
|
|
2629
|
+
E.current && (E.current.focus({ preventScroll: !0 }), E.current = null, q.current = !1);
|
|
2630
|
+
};
|
|
2631
|
+
}, [te.current]), p.createElement("section", { ref: t, "aria-label": `${D} ${Ie}`, tabIndex: -1, "aria-live": "polite", "aria-relevant": "additions text", "aria-atomic": "false", suppressHydrationWarning: !0 }, F.map((k, N) => {
|
|
2632
|
+
var C;
|
|
2633
|
+
let [j, pe] = k.split("-");
|
|
2634
|
+
return x.length ? p.createElement("ol", { key: k, dir: m === "auto" ? cn() : m, tabIndex: -1, ref: te, className: i, "data-sonner-toaster": !0, "data-theme": Be, "data-y-position": j, "data-lifted": Me && x.length > 1 && !s, "data-x-position": pe, style: { "--front-toast-height": `${((C = Q[0]) == null ? void 0 : C.height) || 0}px`, "--width": `${Cs}px`, "--gap": `${S}px`, ...l, ...Fs(d, u) }, onBlur: (P) => {
|
|
2635
|
+
q.current && !P.currentTarget.contains(P.relatedTarget) && (q.current = !1, E.current && (E.current.focus({ preventScroll: !0 }), E.current = null));
|
|
2636
|
+
}, onFocus: (P) => {
|
|
2637
|
+
P.target instanceof HTMLElement && P.target.dataset.dismissible === "false" || q.current || (q.current = !0, E.current = P.relatedTarget);
|
|
2638
|
+
}, onMouseEnter: () => ee(!0), onMouseMove: () => ee(!0), onMouseLeave: () => {
|
|
2639
|
+
Pe || ee(!1);
|
|
2640
|
+
}, onDragEnd: () => ee(!1), onPointerDown: (P) => {
|
|
2641
|
+
P.target instanceof HTMLElement && P.target.dataset.dismissible === "false" || fe(!0);
|
|
2642
|
+
}, onPointerUp: () => fe(!1) }, x.filter((P) => !P.position && N === 0 || P.position === k).map((P, rt) => {
|
|
2643
|
+
var xe, De;
|
|
2644
|
+
return p.createElement(Ds, { key: P.id, icons: R, index: rt, toast: P, defaultRichColors: h, duration: (xe = g == null ? void 0 : g.duration) != null ? xe : y, className: g == null ? void 0 : g.className, descriptionClassName: g == null ? void 0 : g.descriptionClassName, invert: n, visibleToasts: w, closeButton: (De = g == null ? void 0 : g.closeButton) != null ? De : a, interacting: Pe, position: k, style: g == null ? void 0 : g.style, unstyled: g == null ? void 0 : g.unstyled, classNames: g == null ? void 0 : g.classNames, cancelButtonStyle: g == null ? void 0 : g.cancelButtonStyle, actionButtonStyle: g == null ? void 0 : g.actionButtonStyle, removeToast: nt, toasts: x.filter((Ee) => Ee.position == P.position), heights: Q.filter((Ee) => Ee.position == P.position), setHeights: tt, expandByDefault: s, gap: S, loadingIcon: T, expanded: Me, pauseWhenPageIsHidden: _, swipeDirections: e.swipeDirections });
|
|
2645
|
+
})) : null;
|
|
2646
|
+
}));
|
|
2647
|
+
});
|
|
2648
|
+
function ya() {
|
|
2649
|
+
return { toast: async ({
|
|
2650
|
+
id: t,
|
|
2651
|
+
title: n,
|
|
2652
|
+
description: r,
|
|
2653
|
+
action: o = {
|
|
2654
|
+
label: "",
|
|
2655
|
+
onClick: () => {
|
|
2656
|
+
}
|
|
2657
|
+
},
|
|
2658
|
+
...s
|
|
2659
|
+
}) => {
|
|
2660
|
+
const a = { description: r };
|
|
2661
|
+
o.label && (a.action = { label: o.label, onClick: o.onClick }), As(n, a);
|
|
2662
|
+
} };
|
|
2663
|
+
}
|
|
2664
|
+
export {
|
|
2665
|
+
as as GetDevice,
|
|
2666
|
+
W as Vdevice,
|
|
2667
|
+
fa as startAxios,
|
|
2668
|
+
wa as startStore,
|
|
2669
|
+
pa as useAxios,
|
|
2670
|
+
Us as useBoolean,
|
|
2671
|
+
$s as useDocumentTitle,
|
|
2672
|
+
Oe as useEventListener,
|
|
2673
|
+
qs as useLocalStorage,
|
|
2674
|
+
se as useLogger,
|
|
2675
|
+
Ws as useMap,
|
|
2676
|
+
ha as useMarkdown,
|
|
2677
|
+
zs as useMediaQuery,
|
|
2678
|
+
Js as useOnClickOutside,
|
|
2679
|
+
ma as useScrollTo,
|
|
2680
|
+
ga as useShortcut,
|
|
2681
|
+
ds as useStore,
|
|
2682
|
+
ya as useToast,
|
|
2683
|
+
un as useUnmount,
|
|
2684
|
+
Vs as useWindowSize
|
|
2685
|
+
};
|