@vezham/hooks 0.2.1 → 0.2.2
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/index.mjs +182 -182
- package/package.json +9 -9
- package/index.js +0 -25
package/index.mjs
CHANGED
|
@@ -1,47 +1,47 @@
|
|
|
1
1
|
import w, { forwardRef as sr, isValidElement as dt, useLayoutEffect as ar, useEffect as z, useState as I, useCallback as O, useRef as H, useMemo as ir } from "react";
|
|
2
2
|
import lr from "react-dom";
|
|
3
3
|
let de = {
|
|
4
|
-
|
|
4
|
+
__DEV__: !1,
|
|
5
5
|
__DEBUG__: !0,
|
|
6
|
-
|
|
6
|
+
APP_NAME: ""
|
|
7
7
|
};
|
|
8
8
|
const ra = ({
|
|
9
|
-
|
|
9
|
+
__DEV__: e = !0,
|
|
10
10
|
__DEBUG__: t = !0,
|
|
11
|
-
|
|
11
|
+
APP_NAME: n = "",
|
|
12
12
|
...r
|
|
13
|
-
}) => de = {
|
|
14
|
-
log: (e = de.
|
|
13
|
+
}) => de = { __DEV__: e, __DEBUG__: t, APP_NAME: n, ...r }, cr = () => (/* @__PURE__ */ new Date()).toISOString(), Ce = (e, t, n) => `[vezham] [${cr()}] [${e}] [${t}] ${n}`, ft = () => !de.__DEV__, U = {
|
|
14
|
+
log: (e = de.APP_NAME, t, n) => {
|
|
15
15
|
console.log(
|
|
16
|
-
|
|
16
|
+
Ce("LOG", e, t),
|
|
17
17
|
n || ""
|
|
18
18
|
);
|
|
19
19
|
},
|
|
20
|
-
debug: (e = de.
|
|
20
|
+
debug: (e = de.APP_NAME, t, n) => {
|
|
21
21
|
de.__DEBUG__ && console.info(
|
|
22
|
-
|
|
22
|
+
Ce("DEBUG", e, t),
|
|
23
23
|
n || ""
|
|
24
24
|
);
|
|
25
25
|
},
|
|
26
|
-
info: (e = de.
|
|
26
|
+
info: (e = de.APP_NAME, t, n) => {
|
|
27
27
|
ft() || console.info(
|
|
28
|
-
|
|
28
|
+
Ce("INFO", e, t),
|
|
29
29
|
n || ""
|
|
30
30
|
);
|
|
31
31
|
},
|
|
32
|
-
warn: (e = de.
|
|
32
|
+
warn: (e = de.APP_NAME, t, n) => {
|
|
33
33
|
ft() || console.warn(
|
|
34
|
-
|
|
34
|
+
Ce("WARN", e, t),
|
|
35
35
|
n || ""
|
|
36
36
|
);
|
|
37
37
|
},
|
|
38
|
-
error: (e = de.
|
|
38
|
+
error: (e = de.APP_NAME, t, n) => {
|
|
39
39
|
ft() || console.error(
|
|
40
|
-
|
|
40
|
+
Ce("ERROR", e, t),
|
|
41
41
|
n || ""
|
|
42
42
|
);
|
|
43
43
|
}
|
|
44
|
-
// trace: (namespace = config.
|
|
44
|
+
// trace: (namespace = config.APP_NAME, message: string, object?: any) => {
|
|
45
45
|
// if (strictLog()) return
|
|
46
46
|
// let log_msg = getLoggerMessage(logs_type.Trace, namespace, message);
|
|
47
47
|
// if (!(object instanceof Error)) console.trace(log_msg, object);
|
|
@@ -118,7 +118,7 @@ var ur = (e) => {
|
|
|
118
118
|
}, W = new br(), vr = (e, t) => {
|
|
119
119
|
let n = (t == null ? void 0 : t.id) || St++;
|
|
120
120
|
return W.addToast({ title: e, ...t, id: n }), n;
|
|
121
|
-
}, Sr = (e) => e && typeof e == "object" && "ok" in e && typeof e.ok == "boolean" && "status" in e && typeof e.status == "number",
|
|
121
|
+
}, Sr = (e) => e && typeof e == "object" && "ok" in e && typeof e.ok == "boolean" && "status" in e && typeof e.status == "number", Er = vr, xr = () => W.toasts, Tr = () => W.getActiveToasts(), Rr = Object.assign(Er, { success: W.success, info: W.info, warning: W.warning, error: W.error, custom: W.custom, message: W.message, promise: W.promise, dismiss: W.dismiss, loading: W.loading }, { getHistory: xr, getToasts: Tr });
|
|
122
122
|
function Or(e, { insertAt: t } = {}) {
|
|
123
123
|
if (typeof document > "u") return;
|
|
124
124
|
let n = document.head || document.getElementsByTagName("head")[0], r = document.createElement("style");
|
|
@@ -129,7 +129,7 @@ Or(`:where(html[dir="ltr"]),:where([data-sonner-toaster][dir="ltr"]){--toast-ico
|
|
|
129
129
|
function ze(e) {
|
|
130
130
|
return e.label !== void 0;
|
|
131
131
|
}
|
|
132
|
-
var
|
|
132
|
+
var Ar = 3, kr = "32px", Cr = "16px", Ht = 4e3, _r = 356, Lr = 14, Nr = 20, Mr = 200;
|
|
133
133
|
function te(...e) {
|
|
134
134
|
return e.filter(Boolean).join(" ");
|
|
135
135
|
}
|
|
@@ -139,70 +139,70 @@ function Pr(e) {
|
|
|
139
139
|
}
|
|
140
140
|
var Br = (e) => {
|
|
141
141
|
var t, n, r, o, a, s, i, u, c, f, p;
|
|
142
|
-
let { invert: h, toast: l, unstyled: g, interacting: m, setHeights: y, visibleToasts: T, heights:
|
|
142
|
+
let { invert: h, toast: l, unstyled: g, interacting: m, setHeights: y, visibleToasts: T, heights: E, index: R, toasts: F, expanded: L, removeToast: S, defaultRichColors: P, closeButton: q, style: oe, cancelButtonStyle: ot, actionButtonStyle: Be, className: ae = "", descriptionClassName: Ie = "", duration: ye, position: De, gap: fe, loadingIcon: ie, expandByDefault: Fe, classNames: x, icons: V, closeButtonAriaLabel: st = "Close toast", pauseWhenPageIsHidden: C } = e, [_, M] = w.useState(null), [$, be] = w.useState(null), [B, at] = w.useState(!1), [Oe, Ue] = w.useState(!1), [Ae, it] = w.useState(!1), [Pt, Jn] = w.useState(!1), [Vn, Bt] = w.useState(!1), [Kn, lt] = w.useState(0), [Yn, It] = w.useState(0), ke = w.useRef(l.duration || ye || Ht), Dt = w.useRef(null), he = w.useRef(null), Gn = R === 0, Xn = R + 1 <= T, G = l.type, ve = l.dismissible !== !1, Qn = l.className || "", Zn = l.descriptionClassName || "", je = w.useMemo(() => E.findIndex((b) => b.toastId === l.id) || 0, [E, l.id]), er = w.useMemo(() => {
|
|
143
143
|
var b;
|
|
144
144
|
return (b = l.closeButton) != null ? b : q;
|
|
145
|
-
}, [l.closeButton, q]), Ft = w.useMemo(() => l.duration || ye || Ht, [l.duration, ye]), ct = w.useRef(0), Se = w.useRef(0), Ut = w.useRef(0),
|
|
145
|
+
}, [l.closeButton, q]), Ft = w.useMemo(() => l.duration || ye || Ht, [l.duration, ye]), ct = w.useRef(0), Se = w.useRef(0), Ut = w.useRef(0), Ee = w.useRef(null), [tr, nr] = De.split("-"), jt = w.useMemo(() => E.reduce((b, A, N) => N >= je ? b : b + A.height, 0), [E, je]), zt = yr(), rr = l.invert || h, ut = G === "loading";
|
|
146
146
|
Se.current = w.useMemo(() => je * fe + jt, [je, jt]), w.useEffect(() => {
|
|
147
|
-
|
|
147
|
+
ke.current = Ft;
|
|
148
148
|
}, [Ft]), w.useEffect(() => {
|
|
149
149
|
at(!0);
|
|
150
150
|
}, []), w.useEffect(() => {
|
|
151
151
|
let b = he.current;
|
|
152
152
|
if (b) {
|
|
153
|
-
let
|
|
154
|
-
return It(
|
|
153
|
+
let A = b.getBoundingClientRect().height;
|
|
154
|
+
return It(A), y((N) => [{ toastId: l.id, height: A, position: l.position }, ...N]), () => y((N) => N.filter((Q) => Q.toastId !== l.id));
|
|
155
155
|
}
|
|
156
156
|
}, [y, l.id]), w.useLayoutEffect(() => {
|
|
157
157
|
if (!B) return;
|
|
158
|
-
let b = he.current,
|
|
158
|
+
let b = he.current, A = b.style.height;
|
|
159
159
|
b.style.height = "auto";
|
|
160
160
|
let N = b.getBoundingClientRect().height;
|
|
161
|
-
b.style.height =
|
|
161
|
+
b.style.height = A, It(N), y((Q) => Q.find((Z) => Z.toastId === l.id) ? Q.map((Z) => Z.toastId === l.id ? { ...Z, height: N } : Z) : [{ toastId: l.id, height: N, position: l.position }, ...Q]);
|
|
162
162
|
}, [B, l.title, l.description, y, l.id]);
|
|
163
163
|
let le = w.useCallback(() => {
|
|
164
|
-
Ue(!0), lt(Se.current), y((b) => b.filter((
|
|
164
|
+
Ue(!0), lt(Se.current), y((b) => b.filter((A) => A.toastId !== l.id)), setTimeout(() => {
|
|
165
165
|
S(l);
|
|
166
166
|
}, Mr);
|
|
167
167
|
}, [l, S, y, Se]);
|
|
168
168
|
w.useEffect(() => {
|
|
169
169
|
if (l.promise && G === "loading" || l.duration === 1 / 0 || l.type === "loading") return;
|
|
170
170
|
let b;
|
|
171
|
-
return L || m ||
|
|
171
|
+
return L || m || C && zt ? (() => {
|
|
172
172
|
if (Ut.current < ct.current) {
|
|
173
|
-
let
|
|
174
|
-
|
|
173
|
+
let A = (/* @__PURE__ */ new Date()).getTime() - ct.current;
|
|
174
|
+
ke.current = ke.current - A;
|
|
175
175
|
}
|
|
176
176
|
Ut.current = (/* @__PURE__ */ new Date()).getTime();
|
|
177
|
-
})() :
|
|
178
|
-
var
|
|
179
|
-
(
|
|
180
|
-
},
|
|
181
|
-
}, [L, m, l, G,
|
|
177
|
+
})() : ke.current !== 1 / 0 && (ct.current = (/* @__PURE__ */ new Date()).getTime(), b = setTimeout(() => {
|
|
178
|
+
var A;
|
|
179
|
+
(A = l.onAutoClose) == null || A.call(l, l), le();
|
|
180
|
+
}, ke.current)), () => clearTimeout(b);
|
|
181
|
+
}, [L, m, l, G, C, zt, le]), w.useEffect(() => {
|
|
182
182
|
l.delete && le();
|
|
183
183
|
}, [le, l.delete]);
|
|
184
184
|
function or() {
|
|
185
|
-
var b,
|
|
186
|
-
return V != null && V.loading ? w.createElement("div", { className: te(
|
|
185
|
+
var b, A, N;
|
|
186
|
+
return V != null && V.loading ? w.createElement("div", { className: te(x == null ? void 0 : x.loader, (b = l == null ? void 0 : l.classNames) == null ? void 0 : b.loader, "sonner-loader"), "data-visible": G === "loading" }, V.loading) : ie ? w.createElement("div", { className: te(x == null ? void 0 : x.loader, (A = l == null ? void 0 : l.classNames) == null ? void 0 : A.loader, "sonner-loader"), "data-visible": G === "loading" }, ie) : w.createElement(fr, { className: te(x == null ? void 0 : x.loader, (N = l == null ? void 0 : l.classNames) == null ? void 0 : N.loader), visible: G === "loading" });
|
|
187
187
|
}
|
|
188
|
-
return w.createElement("li", { tabIndex: 0, ref: he, className: te(ae, Qn,
|
|
189
|
-
it(!1), M(null),
|
|
188
|
+
return w.createElement("li", { tabIndex: 0, ref: he, className: te(ae, Qn, x == null ? void 0 : x.toast, (t = l == null ? void 0 : l.classNames) == null ? void 0 : t.toast, x == null ? void 0 : x.default, x == null ? void 0 : x[G], (n = l == null ? void 0 : l.classNames) == null ? void 0 : n[G]), "data-sonner-toast": "", "data-rich-colors": (r = l.richColors) != null ? r : P, "data-styled": !(l.jsx || l.unstyled || g), "data-mounted": B, "data-promise": !!l.promise, "data-swiped": Vn, "data-removed": Oe, "data-visible": Xn, "data-y-position": tr, "data-x-position": nr, "data-index": R, "data-front": Gn, "data-swiping": Ae, "data-dismissible": ve, "data-type": G, "data-invert": rr, "data-swipe-out": Pt, "data-swipe-direction": $, "data-expanded": !!(L || Fe && B), style: { "--index": R, "--toasts-before": R, "--z-index": F.length - R, "--offset": `${Oe ? Kn : Se.current}px`, "--initial-height": Fe ? "auto" : `${Yn}px`, ...oe, ...l.style }, onDragEnd: () => {
|
|
189
|
+
it(!1), M(null), Ee.current = null;
|
|
190
190
|
}, onPointerDown: (b) => {
|
|
191
|
-
ut || !ve || (Dt.current = /* @__PURE__ */ new Date(), lt(Se.current), b.target.setPointerCapture(b.pointerId), b.target.tagName !== "BUTTON" && (it(!0),
|
|
191
|
+
ut || !ve || (Dt.current = /* @__PURE__ */ new Date(), lt(Se.current), b.target.setPointerCapture(b.pointerId), b.target.tagName !== "BUTTON" && (it(!0), Ee.current = { x: b.clientX, y: b.clientY }));
|
|
192
192
|
}, onPointerUp: () => {
|
|
193
|
-
var b,
|
|
193
|
+
var b, A, N, Q;
|
|
194
194
|
if (Pt || !ve) return;
|
|
195
|
-
|
|
196
|
-
let Z = Number(((b = he.current) == null ? void 0 : b.style.getPropertyValue("--swipe-amount-x").replace("px", "")) || 0), ce = Number(((
|
|
195
|
+
Ee.current = null;
|
|
196
|
+
let Z = Number(((b = he.current) == null ? void 0 : b.style.getPropertyValue("--swipe-amount-x").replace("px", "")) || 0), ce = Number(((A = he.current) == null ? void 0 : A.style.getPropertyValue("--swipe-amount-y").replace("px", "")) || 0), pe = (/* @__PURE__ */ new Date()).getTime() - ((N = Dt.current) == null ? void 0 : N.getTime()), ee = _ === "x" ? Z : ce, ue = Math.abs(ee) / pe;
|
|
197
197
|
if (Math.abs(ee) >= Nr || ue > 0.11) {
|
|
198
198
|
lt(Se.current), (Q = l.onDismiss) == null || Q.call(l, l), be(_ === "x" ? Z > 0 ? "right" : "left" : ce > 0 ? "down" : "up"), le(), Jn(!0), Bt(!1);
|
|
199
199
|
return;
|
|
200
200
|
}
|
|
201
201
|
it(!1), M(null);
|
|
202
202
|
}, onPointerMove: (b) => {
|
|
203
|
-
var
|
|
204
|
-
if (!
|
|
205
|
-
let ce = b.clientY -
|
|
203
|
+
var A, N, Q, Z;
|
|
204
|
+
if (!Ee.current || !ve || ((A = window.getSelection()) == null ? void 0 : A.toString().length) > 0) return;
|
|
205
|
+
let ce = b.clientY - Ee.current.y, pe = b.clientX - Ee.current.x, ee = (N = e.swipeDirections) != null ? N : Pr(De);
|
|
206
206
|
!_ && (Math.abs(pe) > 1 || Math.abs(ce) > 1) && M(Math.abs(pe) > Math.abs(ce) ? "x" : "y");
|
|
207
207
|
let ue = { x: 0, y: 0 };
|
|
208
208
|
_ === "y" ? (ee.includes("top") || ee.includes("bottom")) && (ee.includes("top") && ce < 0 || ee.includes("bottom") && ce > 0) && (ue.y = ce) : _ === "x" && (ee.includes("left") || ee.includes("right")) && (ee.includes("left") && pe < 0 || ee.includes("right") && pe > 0) && (ue.x = pe), (Math.abs(ue.x) > 0 || Math.abs(ue.y) > 0) && Bt(!0), (Q = he.current) == null || Q.style.setProperty("--swipe-amount-x", `${ue.x}px`), (Z = he.current) == null || Z.style.setProperty("--swipe-amount-y", `${ue.y}px`);
|
|
@@ -210,13 +210,13 @@ var Br = (e) => {
|
|
|
210
210
|
} : () => {
|
|
211
211
|
var b;
|
|
212
212
|
le(), (b = l.onDismiss) == null || b.call(l, l);
|
|
213
|
-
}, className: te(
|
|
214
|
-
var
|
|
215
|
-
ze(l.cancel) && ve && ((N = (
|
|
216
|
-
}, className: te(
|
|
217
|
-
var
|
|
218
|
-
ze(l.action) && ((N = (
|
|
219
|
-
}, className: te(
|
|
213
|
+
}, className: te(x == null ? void 0 : x.closeButton, (o = l == null ? void 0 : l.classNames) == null ? void 0 : o.closeButton) }, (a = V == null ? void 0 : V.close) != null ? a : wr) : null, l.jsx || dt(l.title) ? l.jsx ? l.jsx : typeof l.title == "function" ? l.title() : l.title : w.createElement(w.Fragment, null, G || l.icon || l.promise ? w.createElement("div", { "data-icon": "", className: te(x == null ? void 0 : x.icon, (s = l == null ? void 0 : l.classNames) == null ? void 0 : s.icon) }, l.promise || l.type === "loading" && !l.icon ? l.icon || or() : null, l.type !== "loading" ? l.icon || (V == null ? void 0 : V[G]) || ur(G) : null) : null, w.createElement("div", { "data-content": "", className: te(x == null ? void 0 : x.content, (i = l == null ? void 0 : l.classNames) == null ? void 0 : i.content) }, w.createElement("div", { "data-title": "", className: te(x == null ? void 0 : x.title, (u = l == null ? void 0 : l.classNames) == null ? void 0 : u.title) }, typeof l.title == "function" ? l.title() : l.title), l.description ? w.createElement("div", { "data-description": "", className: te(Ie, Zn, x == null ? void 0 : x.description, (c = l == null ? void 0 : l.classNames) == null ? void 0 : c.description) }, typeof l.description == "function" ? l.description() : l.description) : null), dt(l.cancel) ? l.cancel : l.cancel && ze(l.cancel) ? w.createElement("button", { "data-button": !0, "data-cancel": !0, style: l.cancelButtonStyle || ot, onClick: (b) => {
|
|
214
|
+
var A, N;
|
|
215
|
+
ze(l.cancel) && ve && ((N = (A = l.cancel).onClick) == null || N.call(A, b), le());
|
|
216
|
+
}, className: te(x == null ? void 0 : x.cancelButton, (f = l == null ? void 0 : l.classNames) == null ? void 0 : f.cancelButton) }, l.cancel.label) : null, dt(l.action) ? l.action : l.action && ze(l.action) ? w.createElement("button", { "data-button": !0, "data-action": !0, style: l.actionButtonStyle || Be, onClick: (b) => {
|
|
217
|
+
var A, N;
|
|
218
|
+
ze(l.action) && ((N = (A = l.action).onClick) == null || N.call(A, b), !b.defaultPrevented && le());
|
|
219
|
+
}, className: te(x == null ? void 0 : x.actionButton, (p = l == null ? void 0 : l.classNames) == null ? void 0 : p.actionButton) }, l.action.label) : null));
|
|
220
220
|
};
|
|
221
221
|
function qt() {
|
|
222
222
|
if (typeof window > "u" || typeof document > "u") return "ltr";
|
|
@@ -226,7 +226,7 @@ function qt() {
|
|
|
226
226
|
function Ir(e, t) {
|
|
227
227
|
let n = {};
|
|
228
228
|
return [e, t].forEach((r, o) => {
|
|
229
|
-
let a = o === 1, s = a ? "--mobile-offset" : "--offset", i = a ?
|
|
229
|
+
let a = o === 1, s = a ? "--mobile-offset" : "--offset", i = a ? Cr : kr;
|
|
230
230
|
function u(c) {
|
|
231
231
|
["top", "right", "bottom", "left"].forEach((f) => {
|
|
232
232
|
n[`${s}-${f}`] = typeof c == "number" ? `${c}px` : c;
|
|
@@ -238,22 +238,22 @@ function Ir(e, t) {
|
|
|
238
238
|
}), n;
|
|
239
239
|
}
|
|
240
240
|
sr(function(e, t) {
|
|
241
|
-
let { invert: n, position: r = "bottom-right", hotkey: o = ["altKey", "KeyT"], expand: a, closeButton: s, className: i, offset: u, mobileOffset: c, theme: f = "light", richColors: p, duration: h, style: l, visibleToasts: g =
|
|
241
|
+
let { invert: n, position: r = "bottom-right", hotkey: o = ["altKey", "KeyT"], expand: a, closeButton: s, className: i, offset: u, mobileOffset: c, theme: f = "light", richColors: p, duration: h, style: l, visibleToasts: g = Ar, toastOptions: m, dir: y = qt(), gap: T = Lr, loadingIcon: E, icons: R, containerAriaLabel: F = "Notifications", pauseWhenPageIsHidden: L } = e, [S, P] = w.useState([]), q = w.useMemo(() => Array.from(new Set([r].concat(S.filter((C) => C.position).map((C) => C.position)))), [S, r]), [oe, ot] = w.useState([]), [Be, ae] = w.useState(!1), [Ie, ye] = w.useState(!1), [De, fe] = w.useState(f !== "system" ? f : typeof window < "u" && window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light"), ie = w.useRef(null), Fe = o.join("+").replace(/Key/g, "").replace(/Digit/g, ""), x = w.useRef(null), V = w.useRef(!1), st = w.useCallback((C) => {
|
|
242
242
|
P((_) => {
|
|
243
243
|
var M;
|
|
244
|
-
return (M = _.find(($) => $.id ===
|
|
244
|
+
return (M = _.find(($) => $.id === C.id)) != null && M.delete || W.dismiss(C.id), _.filter(({ id: $ }) => $ !== C.id);
|
|
245
245
|
});
|
|
246
246
|
}, []);
|
|
247
|
-
return w.useEffect(() => W.subscribe((
|
|
248
|
-
if (
|
|
249
|
-
P((_) => _.map((M) => M.id ===
|
|
247
|
+
return w.useEffect(() => W.subscribe((C) => {
|
|
248
|
+
if (C.dismiss) {
|
|
249
|
+
P((_) => _.map((M) => M.id === C.id ? { ...M, delete: !0 } : M));
|
|
250
250
|
return;
|
|
251
251
|
}
|
|
252
252
|
setTimeout(() => {
|
|
253
253
|
lr.flushSync(() => {
|
|
254
254
|
P((_) => {
|
|
255
|
-
let M = _.findIndex(($) => $.id ===
|
|
256
|
-
return M !== -1 ? [..._.slice(0, M), { ..._[M], ...
|
|
255
|
+
let M = _.findIndex(($) => $.id === C.id);
|
|
256
|
+
return M !== -1 ? [..._.slice(0, M), { ..._[M], ...C }, ..._.slice(M + 1)] : [C, ..._];
|
|
257
257
|
});
|
|
258
258
|
});
|
|
259
259
|
});
|
|
@@ -263,13 +263,13 @@ sr(function(e, t) {
|
|
|
263
263
|
return;
|
|
264
264
|
}
|
|
265
265
|
if (f === "system" && (window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches ? fe("dark") : fe("light")), typeof window > "u") return;
|
|
266
|
-
let
|
|
266
|
+
let C = window.matchMedia("(prefers-color-scheme: dark)");
|
|
267
267
|
try {
|
|
268
|
-
|
|
268
|
+
C.addEventListener("change", ({ matches: _ }) => {
|
|
269
269
|
fe(_ ? "dark" : "light");
|
|
270
270
|
});
|
|
271
271
|
} catch {
|
|
272
|
-
|
|
272
|
+
C.addListener(({ matches: M }) => {
|
|
273
273
|
try {
|
|
274
274
|
fe(M ? "dark" : "light");
|
|
275
275
|
} catch ($) {
|
|
@@ -280,29 +280,29 @@ sr(function(e, t) {
|
|
|
280
280
|
}, [f]), w.useEffect(() => {
|
|
281
281
|
S.length <= 1 && ae(!1);
|
|
282
282
|
}, [S]), w.useEffect(() => {
|
|
283
|
-
let
|
|
283
|
+
let C = (_) => {
|
|
284
284
|
var M, $;
|
|
285
285
|
o.every((be) => _[be] || _.code === be) && (ae(!0), (M = ie.current) == null || M.focus()), _.code === "Escape" && (document.activeElement === ie.current || ($ = ie.current) != null && $.contains(document.activeElement)) && ae(!1);
|
|
286
286
|
};
|
|
287
|
-
return document.addEventListener("keydown",
|
|
287
|
+
return document.addEventListener("keydown", C), () => document.removeEventListener("keydown", C);
|
|
288
288
|
}, [o]), w.useEffect(() => {
|
|
289
289
|
if (ie.current) return () => {
|
|
290
|
-
|
|
290
|
+
x.current && (x.current.focus({ preventScroll: !0 }), x.current = null, V.current = !1);
|
|
291
291
|
};
|
|
292
|
-
}, [ie.current]), w.createElement("section", { ref: t, "aria-label": `${F} ${Fe}`, tabIndex: -1, "aria-live": "polite", "aria-relevant": "additions text", "aria-atomic": "false", suppressHydrationWarning: !0 }, q.map((
|
|
292
|
+
}, [ie.current]), w.createElement("section", { ref: t, "aria-label": `${F} ${Fe}`, tabIndex: -1, "aria-live": "polite", "aria-relevant": "additions text", "aria-atomic": "false", suppressHydrationWarning: !0 }, q.map((C, _) => {
|
|
293
293
|
var M;
|
|
294
|
-
let [$, be] =
|
|
295
|
-
return S.length ? w.createElement("ol", { key:
|
|
296
|
-
V.current && !B.currentTarget.contains(B.relatedTarget) && (V.current = !1,
|
|
294
|
+
let [$, be] = C.split("-");
|
|
295
|
+
return S.length ? w.createElement("ol", { key: C, dir: y === "auto" ? qt() : y, tabIndex: -1, ref: ie, className: i, "data-sonner-toaster": !0, "data-theme": De, "data-y-position": $, "data-lifted": Be && S.length > 1 && !a, "data-x-position": be, style: { "--front-toast-height": `${((M = oe[0]) == null ? void 0 : M.height) || 0}px`, "--width": `${_r}px`, "--gap": `${T}px`, ...l, ...Ir(u, c) }, onBlur: (B) => {
|
|
296
|
+
V.current && !B.currentTarget.contains(B.relatedTarget) && (V.current = !1, x.current && (x.current.focus({ preventScroll: !0 }), x.current = null));
|
|
297
297
|
}, onFocus: (B) => {
|
|
298
|
-
B.target instanceof HTMLElement && B.target.dataset.dismissible === "false" || V.current || (V.current = !0,
|
|
298
|
+
B.target instanceof HTMLElement && B.target.dataset.dismissible === "false" || V.current || (V.current = !0, x.current = B.relatedTarget);
|
|
299
299
|
}, onMouseEnter: () => ae(!0), onMouseMove: () => ae(!0), onMouseLeave: () => {
|
|
300
300
|
Ie || ae(!1);
|
|
301
301
|
}, onDragEnd: () => ae(!1), onPointerDown: (B) => {
|
|
302
302
|
B.target instanceof HTMLElement && B.target.dataset.dismissible === "false" || ye(!0);
|
|
303
|
-
}, onPointerUp: () => ye(!1) }, S.filter((B) => !B.position && _ === 0 || B.position ===
|
|
303
|
+
}, onPointerUp: () => ye(!1) }, S.filter((B) => !B.position && _ === 0 || B.position === C).map((B, at) => {
|
|
304
304
|
var Oe, Ue;
|
|
305
|
-
return w.createElement(Br, { key: B.id, icons: R, index: at, toast: B, defaultRichColors: p, duration: (Oe = m == null ? void 0 : m.duration) != null ? Oe : h, className: m == null ? void 0 : m.className, descriptionClassName: m == null ? void 0 : m.descriptionClassName, invert: n, visibleToasts: g, closeButton: (Ue = m == null ? void 0 : m.closeButton) != null ? Ue : s, interacting: Ie, position:
|
|
305
|
+
return w.createElement(Br, { key: B.id, icons: R, index: at, toast: B, defaultRichColors: p, duration: (Oe = m == null ? void 0 : m.duration) != null ? Oe : h, className: m == null ? void 0 : m.className, descriptionClassName: m == null ? void 0 : m.descriptionClassName, invert: n, visibleToasts: g, closeButton: (Ue = m == null ? void 0 : m.closeButton) != null ? Ue : s, interacting: Ie, position: C, style: m == null ? void 0 : m.style, unstyled: m == null ? void 0 : m.unstyled, classNames: m == null ? void 0 : m.classNames, cancelButtonStyle: m == null ? void 0 : m.cancelButtonStyle, actionButtonStyle: m == null ? void 0 : m.actionButtonStyle, removeToast: st, toasts: S.filter((Ae) => Ae.position == B.position), heights: oe.filter((Ae) => Ae.position == B.position), setHeights: ot, expandByDefault: a, gap: T, loadingIcon: E, expanded: Be, pauseWhenPageIsHidden: L, swipeDirections: e.swipeDirections });
|
|
306
306
|
})) : null;
|
|
307
307
|
}));
|
|
308
308
|
});
|
|
@@ -333,7 +333,7 @@ function Zr(e, t, n) {
|
|
|
333
333
|
var r, o, a, s, i, u, c = 0, f = !1, p = !1, h = !0;
|
|
334
334
|
if (typeof e != "function")
|
|
335
335
|
throw new TypeError(Ur);
|
|
336
|
-
t = Wt(t) || 0,
|
|
336
|
+
t = Wt(t) || 0, Et(n) && (f = !!n.leading, p = "maxWait" in n, a = p ? Xr(Wt(n.maxWait) || 0, t) : a, h = "trailing" in n ? !!n.trailing : h);
|
|
337
337
|
function l(S) {
|
|
338
338
|
var P = r, q = o;
|
|
339
339
|
return r = o = void 0, c = S, s = e.apply(q, P), s;
|
|
@@ -352,17 +352,17 @@ function Zr(e, t, n) {
|
|
|
352
352
|
function T() {
|
|
353
353
|
var S = ht();
|
|
354
354
|
if (y(S))
|
|
355
|
-
return
|
|
355
|
+
return E(S);
|
|
356
356
|
i = setTimeout(T, m(S));
|
|
357
357
|
}
|
|
358
|
-
function
|
|
358
|
+
function E(S) {
|
|
359
359
|
return i = void 0, h && r ? l(S) : (r = o = void 0, s);
|
|
360
360
|
}
|
|
361
361
|
function R() {
|
|
362
362
|
i !== void 0 && clearTimeout(i), c = 0, r = u = o = i = void 0;
|
|
363
363
|
}
|
|
364
364
|
function F() {
|
|
365
|
-
return i === void 0 ? s :
|
|
365
|
+
return i === void 0 ? s : E(ht());
|
|
366
366
|
}
|
|
367
367
|
function L() {
|
|
368
368
|
var S = ht(), P = y(S);
|
|
@@ -376,7 +376,7 @@ function Zr(e, t, n) {
|
|
|
376
376
|
}
|
|
377
377
|
return L.cancel = R, L.flush = F, L;
|
|
378
378
|
}
|
|
379
|
-
function
|
|
379
|
+
function Et(e) {
|
|
380
380
|
var t = typeof e;
|
|
381
381
|
return !!e && (t == "object" || t == "function");
|
|
382
382
|
}
|
|
@@ -391,9 +391,9 @@ function Wt(e) {
|
|
|
391
391
|
return e;
|
|
392
392
|
if (to(e))
|
|
393
393
|
return $t;
|
|
394
|
-
if (
|
|
394
|
+
if (Et(e)) {
|
|
395
395
|
var t = typeof e.valueOf == "function" ? e.valueOf() : e;
|
|
396
|
-
e =
|
|
396
|
+
e = Et(t) ? t + "" : t;
|
|
397
397
|
}
|
|
398
398
|
if (typeof e != "string")
|
|
399
399
|
return e === 0 ? e : +e;
|
|
@@ -718,9 +718,9 @@ function fa({
|
|
|
718
718
|
const m = new IntersectionObserver(
|
|
719
719
|
(y) => {
|
|
720
720
|
const T = Array.isArray(m.thresholds) ? m.thresholds : [m.thresholds];
|
|
721
|
-
y.forEach((
|
|
722
|
-
const R =
|
|
723
|
-
f({ isIntersecting: R, entry:
|
|
721
|
+
y.forEach((E) => {
|
|
722
|
+
const R = E.isIntersecting && T.some((F) => E.intersectionRatio >= F);
|
|
723
|
+
f({ isIntersecting: R, entry: E }), p.current && p.current(R, E);
|
|
724
724
|
});
|
|
725
725
|
},
|
|
726
726
|
{ threshold: e, root: t, rootMargin: n }
|
|
@@ -1031,7 +1031,7 @@ function Sa(e, t, n = {}) {
|
|
|
1031
1031
|
);
|
|
1032
1032
|
return Y("storage", p), Y("session-storage", p), [i, c, f];
|
|
1033
1033
|
}
|
|
1034
|
-
function
|
|
1034
|
+
function Ea(e) {
|
|
1035
1035
|
const [t, n] = I(1), r = t + 1 <= e, o = t - 1 > 0, a = O(
|
|
1036
1036
|
(c) => {
|
|
1037
1037
|
const f = c instanceof Function ? c(t) : c;
|
|
@@ -1062,7 +1062,7 @@ function xa(e) {
|
|
|
1062
1062
|
];
|
|
1063
1063
|
}
|
|
1064
1064
|
var po = "(prefers-color-scheme: dark)", mo = "usehooks-ts-ternary-dark-mode";
|
|
1065
|
-
function
|
|
1065
|
+
function xa({
|
|
1066
1066
|
defaultValue: e = "system",
|
|
1067
1067
|
localStorageKey: t = mo,
|
|
1068
1068
|
initializeWithValue: n = !0
|
|
@@ -1150,11 +1150,11 @@ const vo = Ze("string"), K = Ze("function"), Sn = Ze("number"), et = (e) => e !=
|
|
|
1150
1150
|
return !1;
|
|
1151
1151
|
const t = Lt(e);
|
|
1152
1152
|
return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(Symbol.toStringTag in e) && !(Symbol.iterator in e);
|
|
1153
|
-
},
|
|
1153
|
+
}, Eo = re("Date"), xo = re("File"), To = re("Blob"), Ro = re("FileList"), Oo = (e) => et(e) && K(e.pipe), Ao = (e) => {
|
|
1154
1154
|
let t;
|
|
1155
1155
|
return e && (typeof FormData == "function" && e instanceof FormData || K(e.append) && ((t = Qe(e)) === "formdata" || // detect form-data instance
|
|
1156
1156
|
t === "object" && K(e.toString) && e.toString() === "[object FormData]"));
|
|
1157
|
-
},
|
|
1157
|
+
}, ko = re("URLSearchParams"), [Co, _o, Lo, No] = ["ReadableStream", "Request", "Response", "Headers"].map(re), Mo = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
|
|
1158
1158
|
function Me(e, t, { allOwnKeys: n = !1 } = {}) {
|
|
1159
1159
|
if (e === null || typeof e > "u")
|
|
1160
1160
|
return;
|
|
@@ -1169,7 +1169,7 @@ function Me(e, t, { allOwnKeys: n = !1 } = {}) {
|
|
|
1169
1169
|
i = a[r], t.call(null, e[i], i, e);
|
|
1170
1170
|
}
|
|
1171
1171
|
}
|
|
1172
|
-
function
|
|
1172
|
+
function En(e, t) {
|
|
1173
1173
|
t = t.toLowerCase();
|
|
1174
1174
|
const n = Object.keys(e);
|
|
1175
1175
|
let r = n.length, o;
|
|
@@ -1178,11 +1178,11 @@ function xn(e, t) {
|
|
|
1178
1178
|
return o;
|
|
1179
1179
|
return null;
|
|
1180
1180
|
}
|
|
1181
|
-
const me = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global,
|
|
1182
|
-
function
|
|
1183
|
-
const { caseless: e } =
|
|
1184
|
-
const a = e &&
|
|
1185
|
-
Je(t[a]) && Je(r) ? t[a] =
|
|
1181
|
+
const me = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, xn = (e) => !Ne(e) && e !== me;
|
|
1182
|
+
function xt() {
|
|
1183
|
+
const { caseless: e } = xn(this) && this || {}, t = {}, n = (r, o) => {
|
|
1184
|
+
const a = e && En(t, o) || o;
|
|
1185
|
+
Je(t[a]) && Je(r) ? t[a] = xt(t[a], r) : Je(r) ? t[a] = xt({}, r) : Te(r) ? t[a] = r.slice() : t[a] = r;
|
|
1186
1186
|
};
|
|
1187
1187
|
for (let r = 0, o = arguments.length; r < o; r++)
|
|
1188
1188
|
arguments[r] && Me(arguments[r], n);
|
|
@@ -1296,29 +1296,29 @@ const Xo = (e) => {
|
|
|
1296
1296
|
isArray: Te,
|
|
1297
1297
|
isArrayBuffer: vn,
|
|
1298
1298
|
isBuffer: yo,
|
|
1299
|
-
isFormData:
|
|
1299
|
+
isFormData: Ao,
|
|
1300
1300
|
isArrayBufferView: bo,
|
|
1301
1301
|
isString: vo,
|
|
1302
1302
|
isNumber: Sn,
|
|
1303
1303
|
isBoolean: So,
|
|
1304
1304
|
isObject: et,
|
|
1305
1305
|
isPlainObject: Je,
|
|
1306
|
-
isReadableStream:
|
|
1306
|
+
isReadableStream: Co,
|
|
1307
1307
|
isRequest: _o,
|
|
1308
1308
|
isResponse: Lo,
|
|
1309
1309
|
isHeaders: No,
|
|
1310
1310
|
isUndefined: Ne,
|
|
1311
|
-
isDate:
|
|
1312
|
-
isFile:
|
|
1311
|
+
isDate: Eo,
|
|
1312
|
+
isFile: xo,
|
|
1313
1313
|
isBlob: To,
|
|
1314
1314
|
isRegExp: Wo,
|
|
1315
1315
|
isFunction: K,
|
|
1316
1316
|
isStream: Oo,
|
|
1317
|
-
isURLSearchParams:
|
|
1317
|
+
isURLSearchParams: ko,
|
|
1318
1318
|
isTypedArray: jo,
|
|
1319
1319
|
isFileList: Ro,
|
|
1320
1320
|
forEach: Me,
|
|
1321
|
-
merge:
|
|
1321
|
+
merge: xt,
|
|
1322
1322
|
extend: Po,
|
|
1323
1323
|
trim: Mo,
|
|
1324
1324
|
stripBOM: Bo,
|
|
@@ -1340,9 +1340,9 @@ const Xo = (e) => {
|
|
|
1340
1340
|
toCamelCase: $o,
|
|
1341
1341
|
noop: Ko,
|
|
1342
1342
|
toFiniteNumber: Yo,
|
|
1343
|
-
findKey:
|
|
1343
|
+
findKey: En,
|
|
1344
1344
|
global: me,
|
|
1345
|
-
isContextDefined:
|
|
1345
|
+
isContextDefined: xn,
|
|
1346
1346
|
isSpecCompliantForm: Go,
|
|
1347
1347
|
toJSONObject: Xo,
|
|
1348
1348
|
isAsyncFn: Qo,
|
|
@@ -1374,7 +1374,7 @@ d.inherits(v, Error, {
|
|
|
1374
1374
|
};
|
|
1375
1375
|
}
|
|
1376
1376
|
});
|
|
1377
|
-
const On = v.prototype,
|
|
1377
|
+
const On = v.prototype, An = {};
|
|
1378
1378
|
[
|
|
1379
1379
|
"ERR_BAD_OPTION_VALUE",
|
|
1380
1380
|
"ERR_BAD_OPTION",
|
|
@@ -1390,9 +1390,9 @@ const On = v.prototype, kn = {};
|
|
|
1390
1390
|
"ERR_INVALID_URL"
|
|
1391
1391
|
// eslint-disable-next-line func-names
|
|
1392
1392
|
].forEach((e) => {
|
|
1393
|
-
|
|
1393
|
+
An[e] = { value: e };
|
|
1394
1394
|
});
|
|
1395
|
-
Object.defineProperties(v,
|
|
1395
|
+
Object.defineProperties(v, An);
|
|
1396
1396
|
Object.defineProperty(On, "isAxiosError", { value: !0 });
|
|
1397
1397
|
v.from = (e, t, n, r, o, a) => {
|
|
1398
1398
|
const s = Object.create(On);
|
|
@@ -1404,12 +1404,12 @@ const ts = null;
|
|
|
1404
1404
|
function Tt(e) {
|
|
1405
1405
|
return d.isPlainObject(e) || d.isArray(e);
|
|
1406
1406
|
}
|
|
1407
|
-
function
|
|
1407
|
+
function kn(e) {
|
|
1408
1408
|
return d.endsWith(e, "[]") ? e.slice(0, -2) : e;
|
|
1409
1409
|
}
|
|
1410
1410
|
function Qt(e, t, n) {
|
|
1411
1411
|
return e ? e.concat(t).map(function(o, a) {
|
|
1412
|
-
return o =
|
|
1412
|
+
return o = kn(o), !n && a ? "[" + o + "]" : o;
|
|
1413
1413
|
}).join(n ? "." : "") : t;
|
|
1414
1414
|
}
|
|
1415
1415
|
function ns(e) {
|
|
@@ -1445,7 +1445,7 @@ function tt(e, t, n) {
|
|
|
1445
1445
|
if (d.endsWith(m, "{}"))
|
|
1446
1446
|
m = r ? m : m.slice(0, -2), g = JSON.stringify(g);
|
|
1447
1447
|
else if (d.isArray(g) && ns(g) || (d.isFileList(g) || d.endsWith(m, "[]")) && (T = d.toArray(g)))
|
|
1448
|
-
return m =
|
|
1448
|
+
return m = kn(m), T.forEach(function(R, F) {
|
|
1449
1449
|
!(d.isUndefined(R) || R === null) && t.append(
|
|
1450
1450
|
// eslint-disable-next-line no-nested-ternary
|
|
1451
1451
|
s === !0 ? Qt([m], F, a) : s === null ? m : m + "[]",
|
|
@@ -1464,14 +1464,14 @@ function tt(e, t, n) {
|
|
|
1464
1464
|
if (!d.isUndefined(g)) {
|
|
1465
1465
|
if (p.indexOf(g) !== -1)
|
|
1466
1466
|
throw Error("Circular reference detected in " + m.join("."));
|
|
1467
|
-
p.push(g), d.forEach(g, function(T,
|
|
1467
|
+
p.push(g), d.forEach(g, function(T, E) {
|
|
1468
1468
|
(!(d.isUndefined(T) || T === null) && o.call(
|
|
1469
1469
|
t,
|
|
1470
1470
|
T,
|
|
1471
|
-
d.isString(
|
|
1471
|
+
d.isString(E) ? E.trim() : E,
|
|
1472
1472
|
m,
|
|
1473
1473
|
h
|
|
1474
|
-
)) === !0 && l(T, m ? m.concat(
|
|
1474
|
+
)) === !0 && l(T, m ? m.concat(E) : [E]);
|
|
1475
1475
|
}), p.pop();
|
|
1476
1476
|
}
|
|
1477
1477
|
}
|
|
@@ -1496,11 +1496,11 @@ function Zt(e) {
|
|
|
1496
1496
|
function Nt(e, t) {
|
|
1497
1497
|
this._pairs = [], e && tt(e, this, t);
|
|
1498
1498
|
}
|
|
1499
|
-
const
|
|
1500
|
-
|
|
1499
|
+
const Cn = Nt.prototype;
|
|
1500
|
+
Cn.append = function(t, n) {
|
|
1501
1501
|
this._pairs.push([t, n]);
|
|
1502
1502
|
};
|
|
1503
|
-
|
|
1503
|
+
Cn.toString = function(t) {
|
|
1504
1504
|
const n = t ? function(r) {
|
|
1505
1505
|
return t.call(this, r, Zt);
|
|
1506
1506
|
} : Zt;
|
|
@@ -1770,7 +1770,7 @@ function wt(e, t, n, r, o) {
|
|
|
1770
1770
|
function Ss(e) {
|
|
1771
1771
|
return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (t, n, r) => n.toUpperCase() + r);
|
|
1772
1772
|
}
|
|
1773
|
-
function
|
|
1773
|
+
function Es(e, t) {
|
|
1774
1774
|
const n = d.toCamelCase(" " + t);
|
|
1775
1775
|
["get", "set", "has"].forEach((r) => {
|
|
1776
1776
|
Object.defineProperty(e, r + n, {
|
|
@@ -1894,7 +1894,7 @@ let J = class {
|
|
|
1894
1894
|
}).accessors, o = this.prototype;
|
|
1895
1895
|
function a(s) {
|
|
1896
1896
|
const i = Le(s);
|
|
1897
|
-
r[i] || (
|
|
1897
|
+
r[i] || (Es(o, s), r[i] = !0);
|
|
1898
1898
|
}
|
|
1899
1899
|
return d.isArray(t) ? t.forEach(a) : a(t), this;
|
|
1900
1900
|
}
|
|
@@ -1936,7 +1936,7 @@ function Pn(e, t, n) {
|
|
|
1936
1936
|
n
|
|
1937
1937
|
));
|
|
1938
1938
|
}
|
|
1939
|
-
function
|
|
1939
|
+
function xs(e) {
|
|
1940
1940
|
const t = /^([-+\w]{1,25})(:?\/\/|:)/.exec(e);
|
|
1941
1941
|
return t && t[1] || "";
|
|
1942
1942
|
}
|
|
@@ -1997,7 +1997,7 @@ const Ge = (e, t, n = 3) => {
|
|
|
1997
1997
|
}, rn = (e) => (...t) => d.asap(() => e(...t)), Os = j.hasStandardBrowserEnv ? /* @__PURE__ */ ((e, t) => (n) => (n = new URL(n, j.origin), e.protocol === n.protocol && e.host === n.host && (t || e.port === n.port)))(
|
|
1998
1998
|
new URL(j.origin),
|
|
1999
1999
|
j.navigator && /(msie|trident)/i.test(j.navigator.userAgent)
|
|
2000
|
-
) : () => !0,
|
|
2000
|
+
) : () => !0, As = j.hasStandardBrowserEnv ? (
|
|
2001
2001
|
// Standard browser envs support document.cookie
|
|
2002
2002
|
{
|
|
2003
2003
|
write(e, t, n, r, o, a) {
|
|
@@ -2024,15 +2024,15 @@ const Ge = (e, t, n = 3) => {
|
|
|
2024
2024
|
}
|
|
2025
2025
|
}
|
|
2026
2026
|
);
|
|
2027
|
-
function
|
|
2027
|
+
function ks(e) {
|
|
2028
2028
|
return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(e);
|
|
2029
2029
|
}
|
|
2030
|
-
function
|
|
2030
|
+
function Cs(e, t) {
|
|
2031
2031
|
return t ? e.replace(/\/?\/$/, "") + "/" + t.replace(/^\/+/, "") : e;
|
|
2032
2032
|
}
|
|
2033
2033
|
function Bn(e, t, n) {
|
|
2034
|
-
let r = !
|
|
2035
|
-
return e && r || n == !1 ?
|
|
2034
|
+
let r = !ks(t);
|
|
2035
|
+
return e && r || n == !1 ? Cs(e, t) : t;
|
|
2036
2036
|
}
|
|
2037
2037
|
const on = (e) => e instanceof J ? { ...e } : e;
|
|
2038
2038
|
function we(e, t) {
|
|
@@ -2116,7 +2116,7 @@ const In = (e) => {
|
|
|
2116
2116
|
}
|
|
2117
2117
|
}
|
|
2118
2118
|
if (j.hasStandardBrowserEnv && (r && d.isFunction(r) && (r = r(t)), r || r !== !1 && Os(t.url))) {
|
|
2119
|
-
const c = o && a &&
|
|
2119
|
+
const c = o && a && As.read(a);
|
|
2120
2120
|
c && s.set(o, c);
|
|
2121
2121
|
}
|
|
2122
2122
|
return t;
|
|
@@ -2170,9 +2170,9 @@ const In = (e) => {
|
|
|
2170
2170
|
}), d.isUndefined(o.withCredentials) || (y.withCredentials = !!o.withCredentials), i && i !== "json" && (y.responseType = o.responseType), c && ([h, g] = Ge(c, !0), y.addEventListener("progress", h)), u && y.upload && ([p, l] = Ge(u), y.upload.addEventListener("progress", p), y.upload.addEventListener("loadend", l)), (o.cancelToken || o.signal) && (f = (R) => {
|
|
2171
2171
|
y && (r(!R || R.type ? new Re(null, e, y) : R), y.abort(), y = null);
|
|
2172
2172
|
}, o.cancelToken && o.cancelToken.subscribe(f), o.signal && (o.signal.aborted ? f() : o.signal.addEventListener("abort", f)));
|
|
2173
|
-
const
|
|
2174
|
-
if (
|
|
2175
|
-
r(new v("Unsupported protocol " +
|
|
2173
|
+
const E = xs(o.url);
|
|
2174
|
+
if (E && j.protocols.indexOf(E) === -1) {
|
|
2175
|
+
r(new v("Unsupported protocol " + E + ":", v.ERR_BAD_REQUEST, e));
|
|
2176
2176
|
return;
|
|
2177
2177
|
}
|
|
2178
2178
|
y.send(a || null);
|
|
@@ -2347,32 +2347,32 @@ const Fs = async (e) => {
|
|
|
2347
2347
|
duplex: "half",
|
|
2348
2348
|
credentials: T ? p : void 0
|
|
2349
2349
|
});
|
|
2350
|
-
let
|
|
2350
|
+
let E = await fetch(g);
|
|
2351
2351
|
const R = Ot && (c === "stream" || c === "response");
|
|
2352
2352
|
if (Ot && (i || R && m)) {
|
|
2353
2353
|
const L = {};
|
|
2354
2354
|
["status", "statusText", "headers"].forEach((oe) => {
|
|
2355
|
-
L[oe] =
|
|
2355
|
+
L[oe] = E[oe];
|
|
2356
2356
|
});
|
|
2357
|
-
const S = d.toFiniteNumber(
|
|
2357
|
+
const S = d.toFiniteNumber(E.headers.get("content-length")), [P, q] = i && nn(
|
|
2358
2358
|
S,
|
|
2359
2359
|
Ge(rn(i), !0)
|
|
2360
2360
|
) || [];
|
|
2361
|
-
|
|
2362
|
-
sn(
|
|
2361
|
+
E = new Response(
|
|
2362
|
+
sn(E.body, an, P, () => {
|
|
2363
2363
|
q && q(), m && m();
|
|
2364
2364
|
}),
|
|
2365
2365
|
L
|
|
2366
2366
|
);
|
|
2367
2367
|
}
|
|
2368
2368
|
c = c || "text";
|
|
2369
|
-
let F = await Xe[d.findKey(Xe, c) || "text"](
|
|
2369
|
+
let F = await Xe[d.findKey(Xe, c) || "text"](E, e);
|
|
2370
2370
|
return !R && m && m(), await new Promise((L, S) => {
|
|
2371
2371
|
Pn(L, S, {
|
|
2372
2372
|
data: F,
|
|
2373
|
-
headers: J.from(
|
|
2374
|
-
status:
|
|
2375
|
-
statusText:
|
|
2373
|
+
headers: J.from(E.headers),
|
|
2374
|
+
status: E.status,
|
|
2375
|
+
statusText: E.statusText,
|
|
2376
2376
|
config: e,
|
|
2377
2377
|
request: g
|
|
2378
2378
|
});
|
|
@@ -2385,12 +2385,12 @@ const Fs = async (e) => {
|
|
|
2385
2385
|
}
|
|
2386
2386
|
) : v.from(T, T && T.code, e, g);
|
|
2387
2387
|
}
|
|
2388
|
-
}),
|
|
2388
|
+
}), At = {
|
|
2389
2389
|
http: ts,
|
|
2390
2390
|
xhr: Ls,
|
|
2391
2391
|
fetch: js
|
|
2392
2392
|
};
|
|
2393
|
-
d.forEach(
|
|
2393
|
+
d.forEach(At, (e, t) => {
|
|
2394
2394
|
if (e) {
|
|
2395
2395
|
try {
|
|
2396
2396
|
Object.defineProperty(e, "name", { value: t });
|
|
@@ -2408,7 +2408,7 @@ const ln = (e) => `- ${e}`, zs = (e) => d.isFunction(e) || e === null || e === !
|
|
|
2408
2408
|
for (let a = 0; a < t; a++) {
|
|
2409
2409
|
n = e[a];
|
|
2410
2410
|
let s;
|
|
2411
|
-
if (r = n, !zs(n) && (r =
|
|
2411
|
+
if (r = n, !zs(n) && (r = At[(s = String(n)).toLowerCase()], r === void 0))
|
|
2412
2412
|
throw new v(`Unknown adapter '${s}'`);
|
|
2413
2413
|
if (r)
|
|
2414
2414
|
break;
|
|
@@ -2428,7 +2428,7 @@ const ln = (e) => `- ${e}`, zs = (e) => d.isFunction(e) || e === null || e === !
|
|
|
2428
2428
|
}
|
|
2429
2429
|
return r;
|
|
2430
2430
|
},
|
|
2431
|
-
adapters:
|
|
2431
|
+
adapters: At
|
|
2432
2432
|
};
|
|
2433
2433
|
function bt(e) {
|
|
2434
2434
|
if (e.cancelToken && e.cancelToken.throwIfRequested(), e.signal && e.signal.aborted)
|
|
@@ -2706,7 +2706,7 @@ function $s(e) {
|
|
|
2706
2706
|
function Ws(e) {
|
|
2707
2707
|
return d.isObject(e) && e.isAxiosError === !0;
|
|
2708
2708
|
}
|
|
2709
|
-
const
|
|
2709
|
+
const kt = {
|
|
2710
2710
|
Continue: 100,
|
|
2711
2711
|
SwitchingProtocols: 101,
|
|
2712
2712
|
Processing: 102,
|
|
@@ -2771,8 +2771,8 @@ const Ct = {
|
|
|
2771
2771
|
NotExtended: 510,
|
|
2772
2772
|
NetworkAuthenticationRequired: 511
|
|
2773
2773
|
};
|
|
2774
|
-
Object.entries(
|
|
2775
|
-
|
|
2774
|
+
Object.entries(kt).forEach(([e, t]) => {
|
|
2775
|
+
kt[t] = e;
|
|
2776
2776
|
});
|
|
2777
2777
|
function Hn(e) {
|
|
2778
2778
|
const t = new ge(e), n = bn(ge.prototype.request, t);
|
|
@@ -2780,28 +2780,28 @@ function Hn(e) {
|
|
|
2780
2780
|
return Hn(we(e, o));
|
|
2781
2781
|
}, n;
|
|
2782
2782
|
}
|
|
2783
|
-
const
|
|
2784
|
-
|
|
2785
|
-
|
|
2786
|
-
|
|
2787
|
-
|
|
2788
|
-
|
|
2789
|
-
|
|
2790
|
-
|
|
2791
|
-
|
|
2792
|
-
|
|
2783
|
+
const k = Hn(Pe);
|
|
2784
|
+
k.Axios = ge;
|
|
2785
|
+
k.CanceledError = Re;
|
|
2786
|
+
k.CancelToken = qs;
|
|
2787
|
+
k.isCancel = Mn;
|
|
2788
|
+
k.VERSION = jn;
|
|
2789
|
+
k.toFormData = tt;
|
|
2790
|
+
k.AxiosError = v;
|
|
2791
|
+
k.Cancel = k.CanceledError;
|
|
2792
|
+
k.all = function(t) {
|
|
2793
2793
|
return Promise.all(t);
|
|
2794
2794
|
};
|
|
2795
|
-
|
|
2796
|
-
|
|
2797
|
-
|
|
2798
|
-
|
|
2799
|
-
|
|
2800
|
-
|
|
2801
|
-
|
|
2802
|
-
|
|
2795
|
+
k.spread = $s;
|
|
2796
|
+
k.isAxiosError = Ws;
|
|
2797
|
+
k.mergeConfig = we;
|
|
2798
|
+
k.AxiosHeaders = J;
|
|
2799
|
+
k.formToJSON = (e) => Nn(d.isHTMLForm(e) ? new FormData(e) : e);
|
|
2800
|
+
k.getAdapter = Un.getAdapter;
|
|
2801
|
+
k.HttpStatusCode = kt;
|
|
2802
|
+
k.default = k;
|
|
2803
2803
|
const {
|
|
2804
|
-
Axios:
|
|
2804
|
+
Axios: Ca,
|
|
2805
2805
|
AxiosError: _a,
|
|
2806
2806
|
CanceledError: La,
|
|
2807
2807
|
isCancel: Na,
|
|
@@ -2817,36 +2817,36 @@ const {
|
|
|
2817
2817
|
formToJSON: Ha,
|
|
2818
2818
|
getAdapter: qa,
|
|
2819
2819
|
mergeConfig: $a
|
|
2820
|
-
} =
|
|
2821
|
-
}) => (e.baseURL = t(e), U.debug(
|
|
2820
|
+
} = k, Ct = "useAxios", Js = async (e, t = (r) => "", n = (r) => {
|
|
2821
|
+
}) => (e.baseURL = t(e), U.debug(Ct, `baseURL::${e.baseURL}`), n(e), e), Vs = async (e = (n) => {
|
|
2822
2822
|
}, t) => {
|
|
2823
2823
|
var r;
|
|
2824
2824
|
if (e(t), t.response.status !== 500) {
|
|
2825
2825
|
if (t.response.status <= 401)
|
|
2826
|
-
return U.info(
|
|
2826
|
+
return U.info(Ct, t.response.data.meta), Promise.reject(t.response.data.meta);
|
|
2827
2827
|
if (t.response.status === 404)
|
|
2828
|
-
return U.info(
|
|
2828
|
+
return U.info(Ct, t.response.data.meta), Promise.reject(t.response.data.meta);
|
|
2829
2829
|
}
|
|
2830
2830
|
let n;
|
|
2831
2831
|
try {
|
|
2832
2832
|
let o = "";
|
|
2833
|
-
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 =
|
|
2833
|
+
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 = k(t.response.config);
|
|
2834
2834
|
} catch (o) {
|
|
2835
2835
|
(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);
|
|
2836
2836
|
}
|
|
2837
2837
|
return n;
|
|
2838
|
-
}, $e = "useAxios", Wa = ({ onRequest: e, onError: t,
|
|
2839
|
-
|
|
2838
|
+
}, $e = "useAxios", Wa = ({ onRequest: e, onError: t, defineServerEnv: n }) => {
|
|
2839
|
+
k.interceptors.request.use(
|
|
2840
2840
|
(r) => Js(r, n, e)
|
|
2841
|
-
),
|
|
2841
|
+
), k.interceptors.response.use(
|
|
2842
2842
|
(r) => r.data.data,
|
|
2843
2843
|
(r) => Vs(t, r)
|
|
2844
|
-
),
|
|
2844
|
+
), k.defaults.headers.common["content-type"] = "application/json";
|
|
2845
2845
|
}, Ja = {
|
|
2846
|
-
get: async (e, t) => (U.debug($e, `[get] url | ${e}`),
|
|
2847
|
-
post: async (e, t, n) => (U.debug($e, `[post] url | ${e} | payload | ${t}`),
|
|
2848
|
-
put: async (e, t, n) => (U.debug($e, `[put] url | ${e} | payload | ${t}`),
|
|
2849
|
-
delete: async (e, t) => (U.debug($e, `[delete] url | ${e}`),
|
|
2846
|
+
get: async (e, t) => (U.debug($e, `[get] url | ${e}`), k.get(e, t)),
|
|
2847
|
+
post: async (e, t, n) => (U.debug($e, `[post] url | ${e} | payload | ${t}`), k.post(e, t, n)),
|
|
2848
|
+
put: async (e, t, n) => (U.debug($e, `[put] url | ${e} | payload | ${t}`), k.put(e, t, n)),
|
|
2849
|
+
delete: async (e, t) => (U.debug($e, `[delete] url | ${e}`), k.delete(e, t))
|
|
2850
2850
|
};
|
|
2851
2851
|
var X = /* @__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))(X || {});
|
|
2852
2852
|
const dn = {
|
|
@@ -2981,7 +2981,7 @@ const dn = {
|
|
|
2981
2981
|
// vtypes
|
|
2982
2982
|
gdrive_url: /(?:https:\/\/drive\.google\.com\/file\/d\/(.*?)\/view)/,
|
|
2983
2983
|
vtype: /(?:vtype=(?:'|"|")(image|audio|video)(?:'|"|"))/
|
|
2984
|
-
}, vt = (e) => e.replace(/\*/g, "*").replace(/\_/g, "_").replace(/\~/g, "~"), Qs = (e) => e.replace(/*/g, "*").replace(/_/g, "_").replace(/~/g, "~"), fn = (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),
|
|
2984
|
+
}, vt = (e) => e.replace(/\*/g, "*").replace(/\_/g, "_").replace(/\~/g, "~"), Qs = (e) => e.replace(/*/g, "*").replace(/_/g, "_").replace(/~/g, "~"), fn = (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), xe = (e, t) => {
|
|
2985
2985
|
let n = "", r = "";
|
|
2986
2986
|
return (e[0] === `
|
|
2987
2987
|
` || e[0] === " ") && (n = e[0]), (e[e.length - 1] === `
|
|
@@ -3055,12 +3055,12 @@ const dn = {
|
|
|
3055
3055
|
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> ",
|
|
3056
3056
|
getHeadingHTML: (e, t, n) => {
|
|
3057
3057
|
let r = t.length;
|
|
3058
|
-
return
|
|
3058
|
+
return xe(
|
|
3059
3059
|
e,
|
|
3060
3060
|
" <h" + r + ` vmd="h${r}">` + vt(n) + "</h" + r + "> "
|
|
3061
3061
|
);
|
|
3062
3062
|
},
|
|
3063
|
-
getBlockQuoteHTML: (e, t) => (t = t.trim(), t.length ?
|
|
3063
|
+
getBlockQuoteHTML: (e, t) => (t = t.trim(), t.length ? xe(
|
|
3064
3064
|
e,
|
|
3065
3065
|
' <blockquote vmd="blockquote"><p>' + Markdown.applyRecursive(t) + "</p></blockquote> "
|
|
3066
3066
|
) : e),
|
|
@@ -3076,11 +3076,11 @@ const dn = {
|
|
|
3076
3076
|
},
|
|
3077
3077
|
getImageHTML: (e, t, n, r, o) => {
|
|
3078
3078
|
let a = mn(t, r, pn(n), o);
|
|
3079
|
-
return
|
|
3079
|
+
return xe(e, a);
|
|
3080
3080
|
},
|
|
3081
3081
|
getVideoHTML: (e, t, n, r, o, a, s, i) => {
|
|
3082
3082
|
let u = mn(t, r, pn(n), o);
|
|
3083
|
-
return
|
|
3083
|
+
return xe(
|
|
3084
3084
|
e,
|
|
3085
3085
|
`<a vmd="hyperlink" href="${a}" title="${s}" rel="noreferrer" ${i}>${u}</a>`
|
|
3086
3086
|
);
|
|
@@ -3090,7 +3090,7 @@ const dn = {
|
|
|
3090
3090
|
if (e.replace(/\s/g, "").replace(/\*/g, "").length == 0)
|
|
3091
3091
|
return e;
|
|
3092
3092
|
} else return e;
|
|
3093
|
-
return
|
|
3093
|
+
return xe(
|
|
3094
3094
|
e,
|
|
3095
3095
|
' <ul vmd="list-bullet" style="list-style-type: disc; list-style: inherit;">' + ((n) => {
|
|
3096
3096
|
let r = "";
|
|
@@ -3101,7 +3101,7 @@ const dn = {
|
|
|
3101
3101
|
})(e) + "</ul> "
|
|
3102
3102
|
);
|
|
3103
3103
|
},
|
|
3104
|
-
getNumlistHTML: (e) => isNaN(e) ?
|
|
3104
|
+
getNumlistHTML: (e) => isNaN(e) ? xe(
|
|
3105
3105
|
e,
|
|
3106
3106
|
' <ol vmd="list-number">' + ((n) => {
|
|
3107
3107
|
let r = "";
|
|
@@ -3218,9 +3218,9 @@ export {
|
|
|
3218
3218
|
Ka as useScrollTo,
|
|
3219
3219
|
Sa as useSessionStorage,
|
|
3220
3220
|
Ya as useShortcut,
|
|
3221
|
-
|
|
3221
|
+
Ea as useStep,
|
|
3222
3222
|
ea as useStore,
|
|
3223
|
-
|
|
3223
|
+
xa as useTernaryDarkMode,
|
|
3224
3224
|
Ta as useTimeout,
|
|
3225
3225
|
Dr as useToast,
|
|
3226
3226
|
Ra as useToggle,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vezham/hooks",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.2",
|
|
4
4
|
"description": "A package for managing hooks",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -44,13 +44,13 @@
|
|
|
44
44
|
"@v0xoss/use-theme": "0.0.1",
|
|
45
45
|
"@v0xoss/use-update-effect": "0.0.1",
|
|
46
46
|
"@v0xoss/usehooks-ts": "^0.0.2",
|
|
47
|
-
"@vezham/use-axios": "0.2.
|
|
48
|
-
"@vezham/use-get-device": "0.2.
|
|
49
|
-
"@vezham/use-logger": "0.2.
|
|
50
|
-
"@vezham/use-markdown": "0.2.
|
|
51
|
-
"@vezham/use-scroll-to": "0.2.
|
|
52
|
-
"@vezham/use-shortcut": "0.2.
|
|
53
|
-
"@vezham/use-store": "0.2.
|
|
54
|
-
"@vezham/use-toast": "0.2.
|
|
47
|
+
"@vezham/use-axios": "0.2.2",
|
|
48
|
+
"@vezham/use-get-device": "0.2.2",
|
|
49
|
+
"@vezham/use-logger": "0.2.2",
|
|
50
|
+
"@vezham/use-markdown": "0.2.2",
|
|
51
|
+
"@vezham/use-scroll-to": "0.2.2",
|
|
52
|
+
"@vezham/use-shortcut": "0.2.2",
|
|
53
|
+
"@vezham/use-store": "0.2.2",
|
|
54
|
+
"@vezham/use-toast": "0.2.2"
|
|
55
55
|
}
|
|
56
56
|
}
|
package/index.js
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("react"),lr=require("react-dom");let ie={app:"",__DEBUG__:!0,__DEV__:!1};const cr=({app:e="",__DEBUG__:t=!0,__DEV__:n=!0,...r})=>ie={app:e,__DEBUG__:t,__DEV__:n,...r},ur=()=>new Date().toISOString(),Te=(e,t,n)=>`[vezham] [${ur()}] [${e}] [${t}] ${n}`,lt=()=>!ie.__DEV__,B={log:(e=ie.app,t,n)=>{console.log(Te("LOG",e,t),n||"")},debug:(e=ie.app,t,n)=>{ie.__DEBUG__&&console.info(Te("DEBUG",e,t),n||"")},info:(e=ie.app,t,n)=>{lt()||console.info(Te("INFO",e,t),n||"")},warn:(e=ie.app,t,n)=>{lt()||console.warn(Te("WARN",e,t),n||"")},error:(e=ie.app,t,n)=>{lt()||console.error(Te("ERROR",e,t),n||"")}};var dr=e=>{switch(e){case"success":return pr;case"info":return gr;case"warning":return mr;case"error":return wr;default:return null}},fr=Array(12).fill(0),hr=({visible:e,className:t})=>c.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},c.createElement("div",{className:"sonner-spinner"},fr.map((n,r)=>c.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),pr=c.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},c.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"})),mr=c.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},c.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"})),gr=c.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},c.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"})),wr=c.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},c.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"})),br=c.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"},c.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),c.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),yr=()=>{let[e,t]=c.useState(document.hidden);return c.useEffect(()=>{let n=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),e},wt=1,vr=class{constructor(){this.subscribe=e=>(this.subscribers.push(e),()=>{let t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)}),this.publish=e=>{this.subscribers.forEach(t=>t(e))},this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e]},this.create=e=>{var t;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:wt++,a=this.toasts.find(i=>i.id===o),s=e.dismissible===void 0?!0:e.dismissible;return this.dismissedToasts.has(o)&&this.dismissedToasts.delete(o),a?this.toasts=this.toasts.map(i=>i.id===o?(this.publish({...i,...e,id:o,title:n}),{...i,...e,id:o,dismissible:s,title:n}):i):this.addToast({title:n,...r,dismissible:s,id:o}),o},this.dismiss=e=>(this.dismissedToasts.add(e),e||this.toasts.forEach(t=>{this.subscribers.forEach(n=>n({id:t.id,dismiss:!0}))}),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)=>{if(!t)return;let n;t.loading!==void 0&&(n=this.create({...t,promise:e,type:"loading",message:t.loading,description:typeof t.description!="function"?t.description:void 0}));let r=e instanceof Promise?e:e(),o=n!==void 0,a,s=r.then(async d=>{if(a=["resolve",d],c.isValidElement(d))o=!1,this.create({id:n,type:"default",message:d});else if(Er(d)&&!d.ok){o=!1;let u=typeof t.error=="function"?await t.error(`HTTP error! status: ${d.status}`):t.error,h=typeof t.description=="function"?await t.description(`HTTP error! status: ${d.status}`):t.description;this.create({id:n,type:"error",message:u,description:h})}else if(t.success!==void 0){o=!1;let u=typeof t.success=="function"?await t.success(d):t.success,h=typeof t.description=="function"?await t.description(d):t.description;this.create({id:n,type:"success",message:u,description:h})}}).catch(async d=>{if(a=["reject",d],t.error!==void 0){o=!1;let u=typeof t.error=="function"?await t.error(d):t.error,h=typeof t.description=="function"?await t.description(d):t.description;this.create({id:n,type:"error",message:u,description:h})}}).finally(()=>{var d;o&&(this.dismiss(n),n=void 0),(d=t.finally)==null||d.call(t)}),i=()=>new Promise((d,u)=>s.then(()=>a[0]==="reject"?u(a[1]):d(a[1])).catch(u));return typeof n!="string"&&typeof n!="number"?{unwrap:i}:Object.assign(n,{unwrap:i})},this.custom=(e,t)=>{let n=(t==null?void 0:t.id)||wt++;return this.create({jsx:e(n),id:n,...t}),n},this.getActiveToasts=()=>this.toasts.filter(e=>!this.dismissedToasts.has(e.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}},z=new vr,Sr=(e,t)=>{let n=(t==null?void 0:t.id)||wt++;return z.addToast({title:e,...t,id:n}),n},Er=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",xr=Sr,Rr=()=>z.toasts,Tr=()=>z.getActiveToasts(),kr=Object.assign(xr,{success:z.success,info:z.info,warning:z.warning,error:z.error,custom:z.custom,message:z.message,promise:z.promise,dismiss:z.dismiss,loading:z.loading},{getHistory:Rr,getToasts:Tr});function Cr(e,{insertAt:t}={}){if(typeof document>"u")return;let n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");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))}Cr(`: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%)}
|
|
2
|
-
`);function Fe(e){return e.label!==void 0}var Or=3,Ar="32px",Lr="16px",jt=4e3,_r=356,Nr=14,Mr=20,Pr=200;function Q(...e){return e.filter(Boolean).join(" ")}function Ir(e){let[t,n]=e.split("-"),r=[];return t&&r.push(t),n&&r.push(n),r}var Dr=e=>{var t,n,r,o,a,s,i,d,u,h,m;let{invert:p,toast:l,unstyled:w,interacting:g,setHeights:b,visibleToasts:R,heights:E,index:T,toasts:D,expanded:L,removeToast:S,defaultRichColors:M,closeButton:U,style:ee,cancelButtonStyle:tt,actionButtonStyle:Ne,className:ne="",descriptionClassName:Me="",duration:pe,position:Pe,gap:le,loadingIcon:re,expandByDefault:Ie,classNames:x,icons:$,closeButtonAriaLabel:nt="Close toast",pauseWhenPageIsHidden:O}=e,[A,N]=c.useState(null),[j,me]=c.useState(null),[P,rt]=c.useState(!1),[Ee,De]=c.useState(!1),[xe,ot]=c.useState(!1),[Nt,Yn]=c.useState(!1),[Gn,Mt]=c.useState(!1),[Xn,st]=c.useState(0),[Qn,Pt]=c.useState(0),Re=c.useRef(l.duration||pe||jt),It=c.useRef(null),ce=c.useRef(null),Zn=T===0,er=T+1<=R,J=l.type,ge=l.dismissible!==!1,tr=l.className||"",nr=l.descriptionClassName||"",Be=c.useMemo(()=>E.findIndex(y=>y.toastId===l.id)||0,[E,l.id]),rr=c.useMemo(()=>{var y;return(y=l.closeButton)!=null?y:U},[l.closeButton,U]),Dt=c.useMemo(()=>l.duration||pe||jt,[l.duration,pe]),at=c.useRef(0),we=c.useRef(0),Bt=c.useRef(0),be=c.useRef(null),[or,sr]=Pe.split("-"),Ft=c.useMemo(()=>E.reduce((y,k,_)=>_>=Be?y:y+k.height,0),[E,Be]),Ut=yr(),ar=l.invert||p,it=J==="loading";we.current=c.useMemo(()=>Be*le+Ft,[Be,Ft]),c.useEffect(()=>{Re.current=Dt},[Dt]),c.useEffect(()=>{rt(!0)},[]),c.useEffect(()=>{let y=ce.current;if(y){let k=y.getBoundingClientRect().height;return Pt(k),b(_=>[{toastId:l.id,height:k,position:l.position},..._]),()=>b(_=>_.filter(Y=>Y.toastId!==l.id))}},[b,l.id]),c.useLayoutEffect(()=>{if(!P)return;let y=ce.current,k=y.style.height;y.style.height="auto";let _=y.getBoundingClientRect().height;y.style.height=k,Pt(_),b(Y=>Y.find(G=>G.toastId===l.id)?Y.map(G=>G.toastId===l.id?{...G,height:_}:G):[{toastId:l.id,height:_,position:l.position},...Y])},[P,l.title,l.description,b,l.id]);let oe=c.useCallback(()=>{De(!0),st(we.current),b(y=>y.filter(k=>k.toastId!==l.id)),setTimeout(()=>{S(l)},Pr)},[l,S,b,we]);c.useEffect(()=>{if(l.promise&&J==="loading"||l.duration===1/0||l.type==="loading")return;let y;return L||g||O&&Ut?(()=>{if(Bt.current<at.current){let k=new Date().getTime()-at.current;Re.current=Re.current-k}Bt.current=new Date().getTime()})():Re.current!==1/0&&(at.current=new Date().getTime(),y=setTimeout(()=>{var k;(k=l.onAutoClose)==null||k.call(l,l),oe()},Re.current)),()=>clearTimeout(y)},[L,g,l,J,O,Ut,oe]),c.useEffect(()=>{l.delete&&oe()},[oe,l.delete]);function ir(){var y,k,_;return $!=null&&$.loading?c.createElement("div",{className:Q(x==null?void 0:x.loader,(y=l==null?void 0:l.classNames)==null?void 0:y.loader,"sonner-loader"),"data-visible":J==="loading"},$.loading):re?c.createElement("div",{className:Q(x==null?void 0:x.loader,(k=l==null?void 0:l.classNames)==null?void 0:k.loader,"sonner-loader"),"data-visible":J==="loading"},re):c.createElement(hr,{className:Q(x==null?void 0:x.loader,(_=l==null?void 0:l.classNames)==null?void 0:_.loader),visible:J==="loading"})}return c.createElement("li",{tabIndex:0,ref:ce,className:Q(ne,tr,x==null?void 0:x.toast,(t=l==null?void 0:l.classNames)==null?void 0:t.toast,x==null?void 0:x.default,x==null?void 0:x[J],(n=l==null?void 0:l.classNames)==null?void 0:n[J]),"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":Gn,"data-removed":Ee,"data-visible":er,"data-y-position":or,"data-x-position":sr,"data-index":T,"data-front":Zn,"data-swiping":xe,"data-dismissible":ge,"data-type":J,"data-invert":ar,"data-swipe-out":Nt,"data-swipe-direction":j,"data-expanded":!!(L||Ie&&P),style:{"--index":T,"--toasts-before":T,"--z-index":D.length-T,"--offset":`${Ee?Xn:we.current}px`,"--initial-height":Ie?"auto":`${Qn}px`,...ee,...l.style},onDragEnd:()=>{ot(!1),N(null),be.current=null},onPointerDown:y=>{it||!ge||(It.current=new Date,st(we.current),y.target.setPointerCapture(y.pointerId),y.target.tagName!=="BUTTON"&&(ot(!0),be.current={x:y.clientX,y:y.clientY}))},onPointerUp:()=>{var y,k,_,Y;if(Nt||!ge)return;be.current=null;let G=Number(((y=ce.current)==null?void 0:y.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),se=Number(((k=ce.current)==null?void 0:k.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),ue=new Date().getTime()-((_=It.current)==null?void 0:_.getTime()),X=A==="x"?G:se,ae=Math.abs(X)/ue;if(Math.abs(X)>=Mr||ae>.11){st(we.current),(Y=l.onDismiss)==null||Y.call(l,l),me(A==="x"?G>0?"right":"left":se>0?"down":"up"),oe(),Yn(!0),Mt(!1);return}ot(!1),N(null)},onPointerMove:y=>{var k,_,Y,G;if(!be.current||!ge||((k=window.getSelection())==null?void 0:k.toString().length)>0)return;let se=y.clientY-be.current.y,ue=y.clientX-be.current.x,X=(_=e.swipeDirections)!=null?_:Ir(Pe);!A&&(Math.abs(ue)>1||Math.abs(se)>1)&&N(Math.abs(ue)>Math.abs(se)?"x":"y");let ae={x:0,y:0};A==="y"?(X.includes("top")||X.includes("bottom"))&&(X.includes("top")&&se<0||X.includes("bottom")&&se>0)&&(ae.y=se):A==="x"&&(X.includes("left")||X.includes("right"))&&(X.includes("left")&&ue<0||X.includes("right")&&ue>0)&&(ae.x=ue),(Math.abs(ae.x)>0||Math.abs(ae.y)>0)&&Mt(!0),(Y=ce.current)==null||Y.style.setProperty("--swipe-amount-x",`${ae.x}px`),(G=ce.current)==null||G.style.setProperty("--swipe-amount-y",`${ae.y}px`)}},rr&&!l.jsx?c.createElement("button",{"aria-label":nt,"data-disabled":it,"data-close-button":!0,onClick:it||!ge?()=>{}:()=>{var y;oe(),(y=l.onDismiss)==null||y.call(l,l)},className:Q(x==null?void 0:x.closeButton,(o=l==null?void 0:l.classNames)==null?void 0:o.closeButton)},(a=$==null?void 0:$.close)!=null?a:br):null,l.jsx||c.isValidElement(l.title)?l.jsx?l.jsx:typeof l.title=="function"?l.title():l.title:c.createElement(c.Fragment,null,J||l.icon||l.promise?c.createElement("div",{"data-icon":"",className:Q(x==null?void 0:x.icon,(s=l==null?void 0:l.classNames)==null?void 0:s.icon)},l.promise||l.type==="loading"&&!l.icon?l.icon||ir():null,l.type!=="loading"?l.icon||($==null?void 0:$[J])||dr(J):null):null,c.createElement("div",{"data-content":"",className:Q(x==null?void 0:x.content,(i=l==null?void 0:l.classNames)==null?void 0:i.content)},c.createElement("div",{"data-title":"",className:Q(x==null?void 0:x.title,(d=l==null?void 0:l.classNames)==null?void 0:d.title)},typeof l.title=="function"?l.title():l.title),l.description?c.createElement("div",{"data-description":"",className:Q(Me,nr,x==null?void 0:x.description,(u=l==null?void 0:l.classNames)==null?void 0:u.description)},typeof l.description=="function"?l.description():l.description):null),c.isValidElement(l.cancel)?l.cancel:l.cancel&&Fe(l.cancel)?c.createElement("button",{"data-button":!0,"data-cancel":!0,style:l.cancelButtonStyle||tt,onClick:y=>{var k,_;Fe(l.cancel)&&ge&&((_=(k=l.cancel).onClick)==null||_.call(k,y),oe())},className:Q(x==null?void 0:x.cancelButton,(h=l==null?void 0:l.classNames)==null?void 0:h.cancelButton)},l.cancel.label):null,c.isValidElement(l.action)?l.action:l.action&&Fe(l.action)?c.createElement("button",{"data-button":!0,"data-action":!0,style:l.actionButtonStyle||Ne,onClick:y=>{var k,_;Fe(l.action)&&((_=(k=l.action).onClick)==null||_.call(k,y),!y.defaultPrevented&&oe())},className:Q(x==null?void 0:x.actionButton,(m=l==null?void 0:l.classNames)==null?void 0:m.actionButton)},l.action.label):null))};function zt(){if(typeof window>"u"||typeof document>"u")return"ltr";let e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}function Br(e,t){let n={};return[e,t].forEach((r,o)=>{let a=o===1,s=a?"--mobile-offset":"--offset",i=a?Lr:Ar;function d(u){["top","right","bottom","left"].forEach(h=>{n[`${s}-${h}`]=typeof u=="number"?`${u}px`:u})}typeof r=="number"||typeof r=="string"?d(r):typeof r=="object"?["top","right","bottom","left"].forEach(u=>{r[u]===void 0?n[`${s}-${u}`]=i:n[`${s}-${u}`]=typeof r[u]=="number"?`${r[u]}px`:r[u]}):d(i)}),n}c.forwardRef(function(e,t){let{invert:n,position:r="bottom-right",hotkey:o=["altKey","KeyT"],expand:a,closeButton:s,className:i,offset:d,mobileOffset:u,theme:h="light",richColors:m,duration:p,style:l,visibleToasts:w=Or,toastOptions:g,dir:b=zt(),gap:R=Nr,loadingIcon:E,icons:T,containerAriaLabel:D="Notifications",pauseWhenPageIsHidden:L}=e,[S,M]=c.useState([]),U=c.useMemo(()=>Array.from(new Set([r].concat(S.filter(O=>O.position).map(O=>O.position)))),[S,r]),[ee,tt]=c.useState([]),[Ne,ne]=c.useState(!1),[Me,pe]=c.useState(!1),[Pe,le]=c.useState(h!=="system"?h:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),re=c.useRef(null),Ie=o.join("+").replace(/Key/g,"").replace(/Digit/g,""),x=c.useRef(null),$=c.useRef(!1),nt=c.useCallback(O=>{M(A=>{var N;return(N=A.find(j=>j.id===O.id))!=null&&N.delete||z.dismiss(O.id),A.filter(({id:j})=>j!==O.id)})},[]);return c.useEffect(()=>z.subscribe(O=>{if(O.dismiss){M(A=>A.map(N=>N.id===O.id?{...N,delete:!0}:N));return}setTimeout(()=>{lr.flushSync(()=>{M(A=>{let N=A.findIndex(j=>j.id===O.id);return N!==-1?[...A.slice(0,N),{...A[N],...O},...A.slice(N+1)]:[O,...A]})})})}),[]),c.useEffect(()=>{if(h!=="system"){le(h);return}if(h==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?le("dark"):le("light")),typeof window>"u")return;let O=window.matchMedia("(prefers-color-scheme: dark)");try{O.addEventListener("change",({matches:A})=>{le(A?"dark":"light")})}catch{O.addListener(({matches:N})=>{try{le(N?"dark":"light")}catch(j){console.error(j)}})}},[h]),c.useEffect(()=>{S.length<=1&&ne(!1)},[S]),c.useEffect(()=>{let O=A=>{var N,j;o.every(me=>A[me]||A.code===me)&&(ne(!0),(N=re.current)==null||N.focus()),A.code==="Escape"&&(document.activeElement===re.current||(j=re.current)!=null&&j.contains(document.activeElement))&&ne(!1)};return document.addEventListener("keydown",O),()=>document.removeEventListener("keydown",O)},[o]),c.useEffect(()=>{if(re.current)return()=>{x.current&&(x.current.focus({preventScroll:!0}),x.current=null,$.current=!1)}},[re.current]),c.createElement("section",{ref:t,"aria-label":`${D} ${Ie}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},U.map((O,A)=>{var N;let[j,me]=O.split("-");return S.length?c.createElement("ol",{key:O,dir:b==="auto"?zt():b,tabIndex:-1,ref:re,className:i,"data-sonner-toaster":!0,"data-theme":Pe,"data-y-position":j,"data-lifted":Ne&&S.length>1&&!a,"data-x-position":me,style:{"--front-toast-height":`${((N=ee[0])==null?void 0:N.height)||0}px`,"--width":`${_r}px`,"--gap":`${R}px`,...l,...Br(d,u)},onBlur:P=>{$.current&&!P.currentTarget.contains(P.relatedTarget)&&($.current=!1,x.current&&(x.current.focus({preventScroll:!0}),x.current=null))},onFocus:P=>{P.target instanceof HTMLElement&&P.target.dataset.dismissible==="false"||$.current||($.current=!0,x.current=P.relatedTarget)},onMouseEnter:()=>ne(!0),onMouseMove:()=>ne(!0),onMouseLeave:()=>{Me||ne(!1)},onDragEnd:()=>ne(!1),onPointerDown:P=>{P.target instanceof HTMLElement&&P.target.dataset.dismissible==="false"||pe(!0)},onPointerUp:()=>pe(!1)},S.filter(P=>!P.position&&A===0||P.position===O).map((P,rt)=>{var Ee,De;return c.createElement(Dr,{key:P.id,icons:T,index:rt,toast:P,defaultRichColors:m,duration:(Ee=g==null?void 0:g.duration)!=null?Ee:p,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:s,interacting:Me,position:O,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:S.filter(xe=>xe.position==P.position),heights:ee.filter(xe=>xe.position==P.position),setHeights:tt,expandByDefault:a,gap:R,loadingIcon:E,expanded:Ne,pauseWhenPageIsHidden:L,swipeDirections:e.swipeDirections})})):null}))});function pn(){return{toast:async({id:t,title:n,description:r,action:o={label:"",onClick:()=>{}},...a})=>{const s={description:r};o.label&&(s.action={label:o.label,onClick:o.onClick}),kr(n,s)}}}var Ue=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Fr(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ur="Expected a function",Ht=NaN,jr="[object Symbol]",zr=/^\s+|\s+$/g,Hr=/^[-+]0x[0-9a-f]+$/i,qr=/^0b[01]+$/i,$r=/^0o[0-7]+$/i,Wr=parseInt,Vr=typeof Ue=="object"&&Ue&&Ue.Object===Object&&Ue,Jr=typeof self=="object"&&self&&self.Object===Object&&self,Kr=Vr||Jr||Function("return this")(),Yr=Object.prototype,Gr=Yr.toString,Xr=Math.max,Qr=Math.min,ct=function(){return Kr.Date.now()};function Zr(e,t,n){var r,o,a,s,i,d,u=0,h=!1,m=!1,p=!0;if(typeof e!="function")throw new TypeError(Ur);t=qt(t)||0,bt(n)&&(h=!!n.leading,m="maxWait"in n,a=m?Xr(qt(n.maxWait)||0,t):a,p="trailing"in n?!!n.trailing:p);function l(S){var M=r,U=o;return r=o=void 0,u=S,s=e.apply(U,M),s}function w(S){return u=S,i=setTimeout(R,t),h?l(S):s}function g(S){var M=S-d,U=S-u,ee=t-M;return m?Qr(ee,a-U):ee}function b(S){var M=S-d,U=S-u;return d===void 0||M>=t||M<0||m&&U>=a}function R(){var S=ct();if(b(S))return E(S);i=setTimeout(R,g(S))}function E(S){return i=void 0,p&&r?l(S):(r=o=void 0,s)}function T(){i!==void 0&&clearTimeout(i),u=0,r=d=o=i=void 0}function D(){return i===void 0?s:E(ct())}function L(){var S=ct(),M=b(S);if(r=arguments,o=this,d=S,M){if(i===void 0)return w(d);if(m)return i=setTimeout(R,t),l(d)}return i===void 0&&(i=setTimeout(R,t)),s}return L.cancel=T,L.flush=D,L}function bt(e){var t=typeof e;return!!e&&(t=="object"||t=="function")}function eo(e){return!!e&&typeof e=="object"}function to(e){return typeof e=="symbol"||eo(e)&&Gr.call(e)==jr}function qt(e){if(typeof e=="number")return e;if(to(e))return Ht;if(bt(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=bt(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=e.replace(zr,"");var n=qr.test(e);return n||$r.test(e)?Wr(e.slice(2),n?2:8):Hr.test(e)?Ht:+e}var no=Zr;const $t=Fr(no);function mn(e=!1){if(typeof e!="boolean")throw new Error("defaultValue must be `true` or `false`");const[t,n]=c.useState(e),r=c.useCallback(()=>{n(!0)},[]),o=c.useCallback(()=>{n(!1)},[]),a=c.useCallback(()=>{n(s=>!s)},[]);return{value:t,setValue:n,setTrue:r,setFalse:o,toggle:a}}var K=typeof window<"u"?c.useLayoutEffect:c.useEffect;function q(e,t,n,r){const o=c.useRef(t);K(()=>{o.current=t},[t]),c.useEffect(()=>{const a=(n==null?void 0:n.current)??window;if(!(a&&a.addEventListener))return;const s=i=>{o.current(i)};return a.addEventListener(e,s,r),()=>{a.removeEventListener(e,s,r)}},[e,n,r])}function ro(e){q("click",t=>{e(t)})}var ut="useCopyToClipboard";function oo(){const[e,t]=c.useState(null),{toast:n}=pn(),r=c.useCallback(async a=>{if(!(navigator!=null&&navigator.clipboard))return B.log(ut,"not supported"),!1;try{return await navigator.clipboard.writeText(a),t(a),!0}catch(s){return B.error(ut,"Copy failed",s),t(null),!1}},[]);return{value:e,copy:r,copyWithToast:async(a="",s="copied to clipboard")=>{const i=await r(a);return i&&(B.debug(ut,s),n({title:s})),i}}}function gn(e){const[t,n]=c.useState(e??0),r=c.useCallback(()=>{n(s=>s+1)},[]),o=c.useCallback(()=>{n(s=>s-1)},[]),a=c.useCallback(()=>{n(e??0)},[e]);return{count:t,increment:r,decrement:o,reset:a,setCount:n}}function wn(e,t){const n=c.useRef(e);K(()=>{n.current=e},[e]),c.useEffect(()=>{if(t===null)return;const r=setInterval(()=>{n.current()},t);return()=>{clearInterval(r)}},[t])}function so({countStart:e,countStop:t=0,intervalMs:n=1e3,isIncrement:r=!1}){const{count:o,increment:a,decrement:s,reset:i}=gn(e),{value:d,setTrue:u,setFalse:h}=mn(!1),m=c.useCallback(()=>{h(),i()},[h,i]),p=c.useCallback(()=>{if(o===t){h();return}r?a():s()},[o,t,s,a,r,h]);return wn(p,d?n:null),[o,{startCountdown:u,stopCountdown:h,resetCountdown:m}]}function Oe(e){const t=c.useRef(()=>{throw new Error("Cannot call an event handler while rendering.")});return K(()=>{t.current=e},[e]),c.useCallback((...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[t])}var ke="useLocalStorage",dt=typeof window>"u";function kt(e,t,n={}){const{initializeWithValue:r=!0}=n,o=c.useCallback(p=>n.serializer?n.serializer(p):JSON.stringify(p),[n]),a=c.useCallback(p=>{if(n.deserializer)return n.deserializer(p);if(p==="undefined")return;const l=t instanceof Function?t():t;let w;try{w=JSON.parse(p)}catch(g){return B.error(ke,"Error parsing JSON:",g),l}return w},[n,t]),s=c.useCallback(()=>{const p=t instanceof Function?t():t;if(dt)return p;try{const l=window.localStorage.getItem(e);return l?a(l):p}catch(l){return B.error(ke,`Error reading localStorage key “${e}”:`,l),p}},[t,e,a]),[i,d]=c.useState(()=>r?s():t instanceof Function?t():t),u=Oe(p=>{dt&&B.warn(ke,`Tried setting localStorage key “${e}” even though environment is not a client`);try{const l=p instanceof Function?p(s()):p;window.localStorage.setItem(e,o(l)),d(l),window.dispatchEvent(new StorageEvent("local-storage",{key:e}))}catch(l){B.warn(ke,`Error setting localStorage key “${e}”:`,l)}}),h=Oe(()=>{dt&&B.warn(ke,`Tried removing localStorage key “${e}” even though environment is not a client`);const p=t instanceof Function?t():t;window.localStorage.removeItem(e),d(p),window.dispatchEvent(new StorageEvent("local-storage",{key:e}))});c.useEffect(()=>{d(s())},[e]);const m=c.useCallback(p=>{p.key&&p.key!==e||d(s())},[e,s]);return q("storage",m),q("local-storage",m),[i,u,h]}var ao=typeof window>"u";function Ct(e,{defaultValue:t=!1,initializeWithValue:n=!0}={}){const r=i=>ao?t:window.matchMedia(i).matches,[o,a]=c.useState(()=>n?r(e):t);function s(){a(r(e))}return K(()=>{const i=window.matchMedia(e);return s(),i.addListener?i.addListener(s):i.addEventListener("change",s),()=>{i.removeListener?i.removeListener(s):i.removeEventListener("change",s)}},[e]),o}var io="(prefers-color-scheme: dark)",lo="usehooks-ts-dark-mode";function co(e={}){const{defaultValue:t,localStorageKey:n=lo,initializeWithValue:r=!0}=e,o=Ct(io,{initializeWithValue:r,defaultValue:t}),[a,s]=kt(n,t??o??!1,{initializeWithValue:r});return K(()=>{o!==a&&s(o)},[o]),{isDarkMode:a,toggle:()=>{s(i=>!i)},enable:()=>{s(!0)},disable:()=>{s(!1)},set:i=>{s(i)}}}function Ot(e){const t=c.useRef(e);t.current=e,c.useEffect(()=>()=>{t.current()},[])}function Ke(e,t=500,n){const r=c.useRef();Ot(()=>{r.current&&r.current.cancel()});const o=c.useMemo(()=>{const a=$t(e,t,n),s=(...i)=>a(...i);return s.cancel=()=>{a.cancel()},s.isPending=()=>!!r.current,s.flush=()=>a.flush(),s},[e,t,n]);return c.useEffect(()=>{r.current=$t(e,t,n)},[e,t,n]),o}function uo(e,t,n){const r=(n==null?void 0:n.equalityFn)??((u,h)=>u===h),o=e instanceof Function?e():e,[a,s]=c.useState(o),i=c.useRef(o),d=Ke(s,t,n);return r(i.current,o)||(d(o),i.current=o),[a,d]}function fo(e,t={}){const{preserveTitleOnUnmount:n=!0}=t,r=c.useRef(null);K(()=>{r.current=window.document.title},[]),K(()=>{window.document.title=e},[e]),Ot(()=>{!n&&r.current&&(window.document.title=r.current)})}function bn(){const e=c.useRef(!0);return e.current?(e.current=!1,!0):e.current}function ho(e,t){const n=bn();c.useEffect(()=>{if(!n)return e()},t)}function po(e){const[t,n]=c.useState(!1),r=()=>{n(!0)},o=()=>{n(!1)};return q("mouseenter",r,e),q("mouseleave",o,e),t}function mo({threshold:e=0,root:t=null,rootMargin:n="0%",freezeOnceVisible:r=!1,initialIsIntersecting:o=!1,onChange:a}={}){var s;const[i,d]=c.useState(null),[u,h]=c.useState(()=>({isIntersecting:o,entry:void 0})),m=c.useRef();m.current=a;const p=((s=u.entry)==null?void 0:s.isIntersecting)&&r;c.useEffect(()=>{if(!i||!("IntersectionObserver"in window)||p)return;const g=new IntersectionObserver(b=>{const R=Array.isArray(g.thresholds)?g.thresholds:[g.thresholds];b.forEach(E=>{const T=E.isIntersecting&&R.some(D=>E.intersectionRatio>=D);h({isIntersecting:T,entry:E}),m.current&&m.current(T,E)})},{threshold:e,root:t,rootMargin:n});return g.observe(i),()=>{g.disconnect()}},[i,JSON.stringify(e),t,n,p,r]);const l=c.useRef(null);c.useEffect(()=>{var g;!i&&((g=u.entry)!=null&&g.target)&&!r&&!p&&l.current!==u.entry.target&&(l.current=u.entry.target,h({isIntersecting:o,entry:void 0}))},[i,u.entry,r,p,o]);const w=[d,!!u.isIntersecting,u.entry];return w.ref=w[0],w.isIntersecting=w[1],w.entry=w[2],w}function go(){const[e,t]=c.useState(!1);return c.useEffect(()=>{t(!0)},[]),e}function yn(){const e=c.useRef(!1);return c.useEffect(()=>(e.current=!0,()=>{e.current=!1}),[]),c.useCallback(()=>e.current,[])}function wo(e=new Map){const[t,n]=c.useState(new Map(e)),r={set:c.useCallback((o,a)=>{n(s=>{const i=new Map(s);return i.set(o,a),i})},[]),setAll:c.useCallback(o=>{n(()=>new Map(o))},[]),remove:c.useCallback(o=>{n(a=>{const s=new Map(a);return s.delete(o),s})},[]),reset:c.useCallback(()=>{n(()=>new Map)},[])};return[t,r]}function bo(e,t,n="mousedown",r={}){q(n,o=>{const a=o.target;if(!(a!=null&&a.isConnected))return;(Array.isArray(e)?e.filter(i=>!!i.current).every(i=>i.current&&!i.current.contains(a)):e.current&&!e.current.contains(a))&&t(o)},void 0,r)}var Wt=typeof window>"u";function yo(e,t={}){let{initializeWithValue:n=!0}=t;Wt&&(n=!1);const r=c.useCallback(d=>{if(t.deserializer)return t.deserializer(d);if(d==="undefined")return;let u;try{u=JSON.parse(d)}catch(h){return console.error("Error parsing JSON:",h),null}return u},[t]),o=c.useCallback(()=>{if(Wt)return null;try{const d=window.localStorage.getItem(e);return d?r(d):null}catch(d){return console.warn(`Error reading localStorage key “${e}”:`,d),null}},[e,r]),[a,s]=c.useState(()=>{if(n)return o()});c.useEffect(()=>{s(o())},[e]);const i=c.useCallback(d=>{d.key&&d.key!==e||s(o())},[e,o]);return q("storage",i),q("local-storage",i),a}var Vt={width:void 0,height:void 0};function vo(e){const{ref:t,box:n="content-box"}=e,[{width:r,height:o},a]=c.useState(Vt),s=yn(),i=c.useRef({...Vt}),d=c.useRef(void 0);return d.current=e.onResize,c.useEffect(()=>{if(!t.current||typeof window>"u"||!("ResizeObserver"in window))return;const u=new ResizeObserver(([h])=>{const m=n==="border-box"?"borderBoxSize":n==="device-pixel-content-box"?"devicePixelContentBoxSize":"contentBoxSize",p=Jt(h,m,"inlineSize"),l=Jt(h,m,"blockSize");if(i.current.width!==p||i.current.height!==l){const g={width:p,height:l};i.current.width=p,i.current.height=l,d.current?d.current(g):s()&&a(g)}});return u.observe(t.current,{box:n}),()=>{u.disconnect()}},[n,t,s]),{width:r,height:o}}function Jt(e,t,n){return e[t]?Array.isArray(e[t])?e[t][0][n]:e[t][n]:t==="contentBoxSize"?e.contentRect[n==="inlineSize"?"width":"height"]:void 0}var Kt=typeof window>"u";function So(e={}){let{initializeWithValue:t=!0}=e;Kt&&(t=!1);const n=()=>{if(!Kt)return window.screen},[r,o]=c.useState(()=>{if(t)return n()}),a=Ke(o,e.debounceDelay);function s(){const i=n(),d=e.debounceDelay?a:o;if(i){const{width:u,height:h,availHeight:m,availWidth:p,colorDepth:l,orientation:w,pixelDepth:g}=i;d({width:u,height:h,availHeight:m,availWidth:p,colorDepth:l,orientation:w,pixelDepth:g})}}return q("resize",s),K(()=>{s()},[]),r}var je=new Map;function Eo(e){const t=document.querySelector(`script[src="${e}"]`),n=t==null?void 0:t.getAttribute("data-status");return{node:t,status:n}}function xo(e,t){const[n,r]=c.useState(()=>!e||t!=null&&t.shouldPreventLoad?"idle":typeof window>"u"?"loading":je.get(e)??"loading");return c.useEffect(()=>{if(!e||t!=null&&t.shouldPreventLoad)return;const o=je.get(e);if(o==="ready"||o==="error"){r(o);return}const a=Eo(e);let s=a.node;if(s)r(a.status??o??"loading");else{s=document.createElement("script"),s.src=e,s.async=!0,t!=null&&t.id&&(s.id=t.id),s.setAttribute("data-status","loading"),document.body.appendChild(s);const d=u=>{const h=u.type==="load"?"ready":"error";s==null||s.setAttribute("data-status",h)};s.addEventListener("load",d),s.addEventListener("error",d)}const i=d=>{const u=d.type==="load"?"ready":"error";r(u),je.set(e,u)};return s.addEventListener("load",i),s.addEventListener("error",i),()=>{s&&(s.removeEventListener("load",i),s.removeEventListener("error",i)),s&&(t!=null&&t.removeOnUnmount)&&(s.remove(),je.delete(e))}},[e,t==null?void 0:t.shouldPreventLoad,t==null?void 0:t.removeOnUnmount,t==null?void 0:t.id]),n}var Ro=typeof window>"u";function To(e={}){const{autoLock:t=!0,lockTarget:n,widthReflow:r=!0}=e,[o,a]=c.useState(!1),s=c.useRef(null),i=c.useRef(null),d=()=>{if(s.current){const{overflow:h,paddingRight:m}=s.current.style;if(i.current={overflow:h,paddingRight:m},r){const p=s.current===document.body?window.innerWidth:s.current.offsetWidth,l=parseInt(window.getComputedStyle(s.current).paddingRight,10)||0,w=p-s.current.scrollWidth;s.current.style.paddingRight=`${w+l}px`}s.current.style.overflow="hidden",a(!0)}},u=()=>{s.current&&i.current&&(s.current.style.overflow=i.current.overflow,r&&(s.current.style.paddingRight=i.current.paddingRight)),a(!1)};return K(()=>{if(!Ro)return n&&(s.current=typeof n=="string"?document.querySelector(n):n),s.current||(s.current=document.body),t&&d(),()=>{u()}},[t,n,r]),{isLocked:o,lock:d,unlock:u}}var ft=typeof window>"u";function ko(e,t,n={}){const{initializeWithValue:r=!0}=n,o=c.useCallback(p=>n.serializer?n.serializer(p):JSON.stringify(p),[n]),a=c.useCallback(p=>{if(n.deserializer)return n.deserializer(p);if(p==="undefined")return;const l=t instanceof Function?t():t;let w;try{w=JSON.parse(p)}catch(g){return console.error("Error parsing JSON:",g),l}return w},[n,t]),s=c.useCallback(()=>{const p=t instanceof Function?t():t;if(ft)return p;try{const l=window.sessionStorage.getItem(e);return l?a(l):p}catch(l){return console.warn(`Error reading sessionStorage key “${e}”:`,l),p}},[t,e,a]),[i,d]=c.useState(()=>r?s():t instanceof Function?t():t),u=Oe(p=>{ft&&console.warn(`Tried setting sessionStorage key “${e}” even though environment is not a client`);try{const l=p instanceof Function?p(s()):p;window.sessionStorage.setItem(e,o(l)),d(l),window.dispatchEvent(new StorageEvent("session-storage",{key:e}))}catch(l){console.warn(`Error setting sessionStorage key “${e}”:`,l)}}),h=Oe(()=>{ft&&console.warn(`Tried removing sessionStorage key “${e}” even though environment is not a client`);const p=t instanceof Function?t():t;window.sessionStorage.removeItem(e),d(p),window.dispatchEvent(new StorageEvent("session-storage",{key:e}))});c.useEffect(()=>{d(s())},[e]);const m=c.useCallback(p=>{p.key&&p.key!==e||d(s())},[e,s]);return q("storage",m),q("session-storage",m),[i,u,h]}function Co(e){const[t,n]=c.useState(1),r=t+1<=e,o=t-1>0,a=c.useCallback(u=>{const h=u instanceof Function?u(t):u;if(h>=1&&h<=e){n(h);return}throw new Error("Step not valid")},[e,t]),s=c.useCallback(()=>{r&&n(u=>u+1)},[r]),i=c.useCallback(()=>{o&&n(u=>u-1)},[o]),d=c.useCallback(()=>{n(1)},[]);return[t,{goToNextStep:s,goToPrevStep:i,canGoToNextStep:r,canGoToPrevStep:o,setStep:a,reset:d}]}var Oo="(prefers-color-scheme: dark)",Ao="usehooks-ts-ternary-dark-mode";function Lo({defaultValue:e="system",localStorageKey:t=Ao,initializeWithValue:n=!0}={}){const r=Ct(Oo,{initializeWithValue:n}),[o,a]=kt(t,e,{initializeWithValue:n});return{isDarkMode:o==="dark"||o==="system"&&r,ternaryDarkMode:o,setTernaryDarkMode:a,toggleTernaryDarkMode:()=>{const d=["light","system","dark"];a(u=>{const h=(d.indexOf(u)+1)%d.length;return d[h]})}}}function _o(e,t){const n=c.useRef(e);K(()=>{n.current=e},[e]),c.useEffect(()=>{if(!t&&t!==0)return;const r=setTimeout(()=>{n.current()},t);return()=>{clearTimeout(r)}},[t])}function No(e){const[t,n]=c.useState(!!e),r=c.useCallback(()=>{n(o=>!o)},[]);return[t,r,n]}var Mo=typeof window>"u";function Po(e={}){let{initializeWithValue:t=!0}=e;Mo&&(t=!1);const[n,r]=c.useState(()=>t?{width:window.innerWidth,height:window.innerHeight}:{width:void 0,height:void 0}),o=Ke(r,e.debounceDelay);function a(){(e.debounceDelay?o:r)({width:window.innerWidth,height:window.innerHeight})}return q("resize",a),K(()=>{a()},[]),n}function vn(e,t){return function(){return e.apply(t,arguments)}}const{toString:Io}=Object.prototype,{getPrototypeOf:At}=Object,Ye=(e=>t=>{const n=Io.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Z=e=>(e=e.toLowerCase(),t=>Ye(t)===e),Ge=e=>t=>typeof t===e,{isArray:ve}=Array,Ae=Ge("undefined");function Do(e){return e!==null&&!Ae(e)&&e.constructor!==null&&!Ae(e.constructor)&&V(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const Sn=Z("ArrayBuffer");function Bo(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&Sn(e.buffer),t}const Fo=Ge("string"),V=Ge("function"),En=Ge("number"),Xe=e=>e!==null&&typeof e=="object",Uo=e=>e===!0||e===!1,qe=e=>{if(Ye(e)!=="object")return!1;const t=At(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},jo=Z("Date"),zo=Z("File"),Ho=Z("Blob"),qo=Z("FileList"),$o=e=>Xe(e)&&V(e.pipe),Wo=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||V(e.append)&&((t=Ye(e))==="formdata"||t==="object"&&V(e.toString)&&e.toString()==="[object FormData]"))},Vo=Z("URLSearchParams"),[Jo,Ko,Yo,Go]=["ReadableStream","Request","Response","Headers"].map(Z),Xo=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Le(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,o;if(typeof e!="object"&&(e=[e]),ve(e))for(r=0,o=e.length;r<o;r++)t.call(null,e[r],r,e);else{const a=n?Object.getOwnPropertyNames(e):Object.keys(e),s=a.length;let i;for(r=0;r<s;r++)i=a[r],t.call(null,e[i],i,e)}}function xn(e,t){t=t.toLowerCase();const n=Object.keys(e);let r=n.length,o;for(;r-- >0;)if(o=n[r],t===o.toLowerCase())return o;return null}const de=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Rn=e=>!Ae(e)&&e!==de;function yt(){const{caseless:e}=Rn(this)&&this||{},t={},n=(r,o)=>{const a=e&&xn(t,o)||o;qe(t[a])&&qe(r)?t[a]=yt(t[a],r):qe(r)?t[a]=yt({},r):ve(r)?t[a]=r.slice():t[a]=r};for(let r=0,o=arguments.length;r<o;r++)arguments[r]&&Le(arguments[r],n);return t}const Qo=(e,t,n,{allOwnKeys:r}={})=>(Le(t,(o,a)=>{n&&V(o)?e[a]=vn(o,n):e[a]=o},{allOwnKeys:r}),e),Zo=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),es=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},ts=(e,t,n,r)=>{let o,a,s;const i={};if(t=t||{},e==null)return t;do{for(o=Object.getOwnPropertyNames(e),a=o.length;a-- >0;)s=o[a],(!r||r(s,e,t))&&!i[s]&&(t[s]=e[s],i[s]=!0);e=n!==!1&&At(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},ns=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},rs=e=>{if(!e)return null;if(ve(e))return e;let t=e.length;if(!En(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},os=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&At(Uint8Array)),ss=(e,t)=>{const r=(e&&e[Symbol.iterator]).call(e);let o;for(;(o=r.next())&&!o.done;){const a=o.value;t.call(e,a[0],a[1])}},as=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},is=Z("HTMLFormElement"),ls=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,o){return r.toUpperCase()+o}),Yt=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),cs=Z("RegExp"),Tn=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};Le(n,(o,a)=>{let s;(s=t(o,a,e))!==!1&&(r[a]=s||o)}),Object.defineProperties(e,r)},us=e=>{Tn(e,(t,n)=>{if(V(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(V(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},ds=(e,t)=>{const n={},r=o=>{o.forEach(a=>{n[a]=!0})};return ve(e)?r(e):r(String(e).split(t)),n},fs=()=>{},hs=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function ps(e){return!!(e&&V(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const ms=e=>{const t=new Array(10),n=(r,o)=>{if(Xe(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[o]=r;const a=ve(r)?[]:{};return Le(r,(s,i)=>{const d=n(s,o+1);!Ae(d)&&(a[i]=d)}),t[o]=void 0,a}}return r};return n(e,0)},gs=Z("AsyncFunction"),ws=e=>e&&(Xe(e)||V(e))&&V(e.then)&&V(e.catch),kn=((e,t)=>e?setImmediate:t?((n,r)=>(de.addEventListener("message",({source:o,data:a})=>{o===de&&a===n&&r.length&&r.shift()()},!1),o=>{r.push(o),de.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",V(de.postMessage)),bs=typeof queueMicrotask<"u"?queueMicrotask.bind(de):typeof process<"u"&&process.nextTick||kn,f={isArray:ve,isArrayBuffer:Sn,isBuffer:Do,isFormData:Wo,isArrayBufferView:Bo,isString:Fo,isNumber:En,isBoolean:Uo,isObject:Xe,isPlainObject:qe,isReadableStream:Jo,isRequest:Ko,isResponse:Yo,isHeaders:Go,isUndefined:Ae,isDate:jo,isFile:zo,isBlob:Ho,isRegExp:cs,isFunction:V,isStream:$o,isURLSearchParams:Vo,isTypedArray:os,isFileList:qo,forEach:Le,merge:yt,extend:Qo,trim:Xo,stripBOM:Zo,inherits:es,toFlatObject:ts,kindOf:Ye,kindOfTest:Z,endsWith:ns,toArray:rs,forEachEntry:ss,matchAll:as,isHTMLForm:is,hasOwnProperty:Yt,hasOwnProp:Yt,reduceDescriptors:Tn,freezeMethods:us,toObjectSet:ds,toCamelCase:ls,noop:fs,toFiniteNumber:hs,findKey:xn,global:de,isContextDefined:Rn,isSpecCompliantForm:ps,toJSONObject:ms,isAsyncFn:gs,isThenable:ws,setImmediate:kn,asap:bs};function v(e,t,n,r,o){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)}f.inherits(v,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:f.toJSONObject(this.config),code:this.code,status:this.status}}});const Cn=v.prototype,On={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{On[e]={value:e}});Object.defineProperties(v,On);Object.defineProperty(Cn,"isAxiosError",{value:!0});v.from=(e,t,n,r,o,a)=>{const s=Object.create(Cn);return f.toFlatObject(e,s,function(d){return d!==Error.prototype},i=>i!=="isAxiosError"),v.call(s,e.message,t,n,r,o),s.cause=e,s.name=e.name,a&&Object.assign(s,a),s};const ys=null;function vt(e){return f.isPlainObject(e)||f.isArray(e)}function An(e){return f.endsWith(e,"[]")?e.slice(0,-2):e}function Gt(e,t,n){return e?e.concat(t).map(function(o,a){return o=An(o),!n&&a?"["+o+"]":o}).join(n?".":""):t}function vs(e){return f.isArray(e)&&!e.some(vt)}const Ss=f.toFlatObject(f,{},null,function(t){return/^is[A-Z]/.test(t)});function Qe(e,t,n){if(!f.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=f.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(g,b){return!f.isUndefined(b[g])});const r=n.metaTokens,o=n.visitor||h,a=n.dots,s=n.indexes,d=(n.Blob||typeof Blob<"u"&&Blob)&&f.isSpecCompliantForm(t);if(!f.isFunction(o))throw new TypeError("visitor must be a function");function u(w){if(w===null)return"";if(f.isDate(w))return w.toISOString();if(!d&&f.isBlob(w))throw new v("Blob is not supported. Use a Buffer instead.");return f.isArrayBuffer(w)||f.isTypedArray(w)?d&&typeof Blob=="function"?new Blob([w]):Buffer.from(w):w}function h(w,g,b){let R=w;if(w&&!b&&typeof w=="object"){if(f.endsWith(g,"{}"))g=r?g:g.slice(0,-2),w=JSON.stringify(w);else if(f.isArray(w)&&vs(w)||(f.isFileList(w)||f.endsWith(g,"[]"))&&(R=f.toArray(w)))return g=An(g),R.forEach(function(T,D){!(f.isUndefined(T)||T===null)&&t.append(s===!0?Gt([g],D,a):s===null?g:g+"[]",u(T))}),!1}return vt(w)?!0:(t.append(Gt(b,g,a),u(w)),!1)}const m=[],p=Object.assign(Ss,{defaultVisitor:h,convertValue:u,isVisitable:vt});function l(w,g){if(!f.isUndefined(w)){if(m.indexOf(w)!==-1)throw Error("Circular reference detected in "+g.join("."));m.push(w),f.forEach(w,function(R,E){(!(f.isUndefined(R)||R===null)&&o.call(t,R,f.isString(E)?E.trim():E,g,p))===!0&&l(R,g?g.concat(E):[E])}),m.pop()}}if(!f.isObject(e))throw new TypeError("data must be an object");return l(e),t}function Xt(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function Lt(e,t){this._pairs=[],e&&Qe(e,this,t)}const Ln=Lt.prototype;Ln.append=function(t,n){this._pairs.push([t,n])};Ln.toString=function(t){const n=t?function(r){return t.call(this,r,Xt)}:Xt;return this._pairs.map(function(o){return n(o[0])+"="+n(o[1])},"").join("&")};function Es(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function _n(e,t,n){if(!t)return e;const r=n&&n.encode||Es;f.isFunction(n)&&(n={serialize:n});const o=n&&n.serialize;let a;if(o?a=o(t,n):a=f.isURLSearchParams(t)?t.toString():new Lt(t,n).toString(r),a){const s=e.indexOf("#");s!==-1&&(e=e.slice(0,s)),e+=(e.indexOf("?")===-1?"?":"&")+a}return e}class Qt{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){f.forEach(this.handlers,function(r){r!==null&&t(r)})}}const Nn={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},xs=typeof URLSearchParams<"u"?URLSearchParams:Lt,Rs=typeof FormData<"u"?FormData:null,Ts=typeof Blob<"u"?Blob:null,ks={isBrowser:!0,classes:{URLSearchParams:xs,FormData:Rs,Blob:Ts},protocols:["http","https","file","blob","url","data"]},_t=typeof window<"u"&&typeof document<"u",St=typeof navigator=="object"&&navigator||void 0,Cs=_t&&(!St||["ReactNative","NativeScript","NS"].indexOf(St.product)<0),Os=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",As=_t&&window.location.href||"http://localhost",Ls=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:_t,hasStandardBrowserEnv:Cs,hasStandardBrowserWebWorkerEnv:Os,navigator:St,origin:As},Symbol.toStringTag,{value:"Module"})),F={...Ls,...ks};function _s(e,t){return Qe(e,new F.classes.URLSearchParams,Object.assign({visitor:function(n,r,o,a){return F.isNode&&f.isBuffer(n)?(this.append(r,n.toString("base64")),!1):a.defaultVisitor.apply(this,arguments)}},t))}function Ns(e){return f.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function Ms(e){const t={},n=Object.keys(e);let r;const o=n.length;let a;for(r=0;r<o;r++)a=n[r],t[a]=e[a];return t}function Mn(e){function t(n,r,o,a){let s=n[a++];if(s==="__proto__")return!0;const i=Number.isFinite(+s),d=a>=n.length;return s=!s&&f.isArray(o)?o.length:s,d?(f.hasOwnProp(o,s)?o[s]=[o[s],r]:o[s]=r,!i):((!o[s]||!f.isObject(o[s]))&&(o[s]=[]),t(n,r,o[s],a)&&f.isArray(o[s])&&(o[s]=Ms(o[s])),!i)}if(f.isFormData(e)&&f.isFunction(e.entries)){const n={};return f.forEachEntry(e,(r,o)=>{t(Ns(r),o,n,0)}),n}return null}function Ps(e,t,n){if(f.isString(e))try{return(t||JSON.parse)(e),f.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const _e={transitional:Nn,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",o=r.indexOf("application/json")>-1,a=f.isObject(t);if(a&&f.isHTMLForm(t)&&(t=new FormData(t)),f.isFormData(t))return o?JSON.stringify(Mn(t)):t;if(f.isArrayBuffer(t)||f.isBuffer(t)||f.isStream(t)||f.isFile(t)||f.isBlob(t)||f.isReadableStream(t))return t;if(f.isArrayBufferView(t))return t.buffer;if(f.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let i;if(a){if(r.indexOf("application/x-www-form-urlencoded")>-1)return _s(t,this.formSerializer).toString();if((i=f.isFileList(t))||r.indexOf("multipart/form-data")>-1){const d=this.env&&this.env.FormData;return Qe(i?{"files[]":t}:t,d&&new d,this.formSerializer)}}return a||o?(n.setContentType("application/json",!1),Ps(t)):t}],transformResponse:[function(t){const n=this.transitional||_e.transitional,r=n&&n.forcedJSONParsing,o=this.responseType==="json";if(f.isResponse(t)||f.isReadableStream(t))return t;if(t&&f.isString(t)&&(r&&!this.responseType||o)){const s=!(n&&n.silentJSONParsing)&&o;try{return JSON.parse(t)}catch(i){if(s)throw i.name==="SyntaxError"?v.from(i,v.ERR_BAD_RESPONSE,this,null,this.response):i}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:F.classes.FormData,Blob:F.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};f.forEach(["delete","get","head","post","put","patch"],e=>{_e.headers[e]={}});const Is=f.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Ds=e=>{const t={};let n,r,o;return e&&e.split(`
|
|
3
|
-
`).forEach(function(s){o=s.indexOf(":"),n=s.substring(0,o).trim().toLowerCase(),r=s.substring(o+1).trim(),!(!n||t[n]&&Is[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},Zt=Symbol("internals");function Ce(e){return e&&String(e).trim().toLowerCase()}function $e(e){return e===!1||e==null?e:f.isArray(e)?e.map($e):String(e)}function Bs(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}const Fs=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function ht(e,t,n,r,o){if(f.isFunction(r))return r.call(this,t,n);if(o&&(t=n),!!f.isString(t)){if(f.isString(r))return t.indexOf(r)!==-1;if(f.isRegExp(r))return r.test(t)}}function Us(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function js(e,t){const n=f.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(o,a,s){return this[r].call(this,t,o,a,s)},configurable:!0})})}let H=class{constructor(t){t&&this.set(t)}set(t,n,r){const o=this;function a(i,d,u){const h=Ce(d);if(!h)throw new Error("header name must be a non-empty string");const m=f.findKey(o,h);(!m||o[m]===void 0||u===!0||u===void 0&&o[m]!==!1)&&(o[m||d]=$e(i))}const s=(i,d)=>f.forEach(i,(u,h)=>a(u,h,d));if(f.isPlainObject(t)||t instanceof this.constructor)s(t,n);else if(f.isString(t)&&(t=t.trim())&&!Fs(t))s(Ds(t),n);else if(f.isHeaders(t))for(const[i,d]of t.entries())a(d,i,r);else t!=null&&a(n,t,r);return this}get(t,n){if(t=Ce(t),t){const r=f.findKey(this,t);if(r){const o=this[r];if(!n)return o;if(n===!0)return Bs(o);if(f.isFunction(n))return n.call(this,o,r);if(f.isRegExp(n))return n.exec(o);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=Ce(t),t){const r=f.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||ht(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let o=!1;function a(s){if(s=Ce(s),s){const i=f.findKey(r,s);i&&(!n||ht(r,r[i],i,n))&&(delete r[i],o=!0)}}return f.isArray(t)?t.forEach(a):a(t),o}clear(t){const n=Object.keys(this);let r=n.length,o=!1;for(;r--;){const a=n[r];(!t||ht(this,this[a],a,t,!0))&&(delete this[a],o=!0)}return o}normalize(t){const n=this,r={};return f.forEach(this,(o,a)=>{const s=f.findKey(r,a);if(s){n[s]=$e(o),delete n[a];return}const i=t?Us(a):String(a).trim();i!==a&&delete n[a],n[i]=$e(o),r[i]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return f.forEach(this,(r,o)=>{r!=null&&r!==!1&&(n[o]=t&&f.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(`
|
|
4
|
-
`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(o=>r.set(o)),r}static accessor(t){const r=(this[Zt]=this[Zt]={accessors:{}}).accessors,o=this.prototype;function a(s){const i=Ce(s);r[i]||(js(o,s),r[i]=!0)}return f.isArray(t)?t.forEach(a):a(t),this}};H.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);f.reduceDescriptors(H.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}});f.freezeMethods(H);function pt(e,t){const n=this||_e,r=t||n,o=H.from(r.headers);let a=r.data;return f.forEach(e,function(i){a=i.call(n,a,o.normalize(),t?t.status:void 0)}),o.normalize(),a}function Pn(e){return!!(e&&e.__CANCEL__)}function Se(e,t,n){v.call(this,e??"canceled",v.ERR_CANCELED,t,n),this.name="CanceledError"}f.inherits(Se,v,{__CANCEL__:!0});function In(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new v("Request failed with status code "+n.status,[v.ERR_BAD_REQUEST,v.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function zs(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function Hs(e,t){e=e||10;const n=new Array(e),r=new Array(e);let o=0,a=0,s;return t=t!==void 0?t:1e3,function(d){const u=Date.now(),h=r[a];s||(s=u),n[o]=d,r[o]=u;let m=a,p=0;for(;m!==o;)p+=n[m++],m=m%e;if(o=(o+1)%e,o===a&&(a=(a+1)%e),u-s<t)return;const l=h&&u-h;return l?Math.round(p*1e3/l):void 0}}function qs(e,t){let n=0,r=1e3/t,o,a;const s=(u,h=Date.now())=>{n=h,o=null,a&&(clearTimeout(a),a=null),e.apply(null,u)};return[(...u)=>{const h=Date.now(),m=h-n;m>=r?s(u,h):(o=u,a||(a=setTimeout(()=>{a=null,s(o)},r-m)))},()=>o&&s(o)]}const Ve=(e,t,n=3)=>{let r=0;const o=Hs(50,250);return qs(a=>{const s=a.loaded,i=a.lengthComputable?a.total:void 0,d=s-r,u=o(d),h=s<=i;r=s;const m={loaded:s,total:i,progress:i?s/i:void 0,bytes:d,rate:u||void 0,estimated:u&&i&&h?(i-s)/u:void 0,event:a,lengthComputable:i!=null,[t?"download":"upload"]:!0};e(m)},n)},en=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},tn=e=>(...t)=>f.asap(()=>e(...t)),$s=F.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,F.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(F.origin),F.navigator&&/(msie|trident)/i.test(F.navigator.userAgent)):()=>!0,Ws=F.hasStandardBrowserEnv?{write(e,t,n,r,o,a){const s=[e+"="+encodeURIComponent(t)];f.isNumber(n)&&s.push("expires="+new Date(n).toGMTString()),f.isString(r)&&s.push("path="+r),f.isString(o)&&s.push("domain="+o),a===!0&&s.push("secure"),document.cookie=s.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function Vs(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function Js(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function Dn(e,t,n){let r=!Vs(t);return e&&r||n==!1?Js(e,t):t}const nn=e=>e instanceof H?{...e}:e;function he(e,t){t=t||{};const n={};function r(u,h,m,p){return f.isPlainObject(u)&&f.isPlainObject(h)?f.merge.call({caseless:p},u,h):f.isPlainObject(h)?f.merge({},h):f.isArray(h)?h.slice():h}function o(u,h,m,p){if(f.isUndefined(h)){if(!f.isUndefined(u))return r(void 0,u,m,p)}else return r(u,h,m,p)}function a(u,h){if(!f.isUndefined(h))return r(void 0,h)}function s(u,h){if(f.isUndefined(h)){if(!f.isUndefined(u))return r(void 0,u)}else return r(void 0,h)}function i(u,h,m){if(m in t)return r(u,h);if(m in e)return r(void 0,u)}const d={url:a,method:a,data:a,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:i,headers:(u,h,m)=>o(nn(u),nn(h),m,!0)};return f.forEach(Object.keys(Object.assign({},e,t)),function(h){const m=d[h]||o,p=m(e[h],t[h],h);f.isUndefined(p)&&m!==i||(n[h]=p)}),n}const Bn=e=>{const t=he({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:o,xsrfCookieName:a,headers:s,auth:i}=t;t.headers=s=H.from(s),t.url=_n(Dn(t.baseURL,t.url),e.params,e.paramsSerializer),i&&s.set("Authorization","Basic "+btoa((i.username||"")+":"+(i.password?unescape(encodeURIComponent(i.password)):"")));let d;if(f.isFormData(n)){if(F.hasStandardBrowserEnv||F.hasStandardBrowserWebWorkerEnv)s.setContentType(void 0);else if((d=s.getContentType())!==!1){const[u,...h]=d?d.split(";").map(m=>m.trim()).filter(Boolean):[];s.setContentType([u||"multipart/form-data",...h].join("; "))}}if(F.hasStandardBrowserEnv&&(r&&f.isFunction(r)&&(r=r(t)),r||r!==!1&&$s(t.url))){const u=o&&a&&Ws.read(a);u&&s.set(o,u)}return t},Ks=typeof XMLHttpRequest<"u",Ys=Ks&&function(e){return new Promise(function(n,r){const o=Bn(e);let a=o.data;const s=H.from(o.headers).normalize();let{responseType:i,onUploadProgress:d,onDownloadProgress:u}=o,h,m,p,l,w;function g(){l&&l(),w&&w(),o.cancelToken&&o.cancelToken.unsubscribe(h),o.signal&&o.signal.removeEventListener("abort",h)}let b=new XMLHttpRequest;b.open(o.method.toUpperCase(),o.url,!0),b.timeout=o.timeout;function R(){if(!b)return;const T=H.from("getAllResponseHeaders"in b&&b.getAllResponseHeaders()),L={data:!i||i==="text"||i==="json"?b.responseText:b.response,status:b.status,statusText:b.statusText,headers:T,config:e,request:b};In(function(M){n(M),g()},function(M){r(M),g()},L),b=null}"onloadend"in b?b.onloadend=R:b.onreadystatechange=function(){!b||b.readyState!==4||b.status===0&&!(b.responseURL&&b.responseURL.indexOf("file:")===0)||setTimeout(R)},b.onabort=function(){b&&(r(new v("Request aborted",v.ECONNABORTED,e,b)),b=null)},b.onerror=function(){r(new v("Network Error",v.ERR_NETWORK,e,b)),b=null},b.ontimeout=function(){let D=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const L=o.transitional||Nn;o.timeoutErrorMessage&&(D=o.timeoutErrorMessage),r(new v(D,L.clarifyTimeoutError?v.ETIMEDOUT:v.ECONNABORTED,e,b)),b=null},a===void 0&&s.setContentType(null),"setRequestHeader"in b&&f.forEach(s.toJSON(),function(D,L){b.setRequestHeader(L,D)}),f.isUndefined(o.withCredentials)||(b.withCredentials=!!o.withCredentials),i&&i!=="json"&&(b.responseType=o.responseType),u&&([p,w]=Ve(u,!0),b.addEventListener("progress",p)),d&&b.upload&&([m,l]=Ve(d),b.upload.addEventListener("progress",m),b.upload.addEventListener("loadend",l)),(o.cancelToken||o.signal)&&(h=T=>{b&&(r(!T||T.type?new Se(null,e,b):T),b.abort(),b=null)},o.cancelToken&&o.cancelToken.subscribe(h),o.signal&&(o.signal.aborted?h():o.signal.addEventListener("abort",h)));const E=zs(o.url);if(E&&F.protocols.indexOf(E)===-1){r(new v("Unsupported protocol "+E+":",v.ERR_BAD_REQUEST,e));return}b.send(a||null)})},Gs=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let r=new AbortController,o;const a=function(u){if(!o){o=!0,i();const h=u instanceof Error?u:this.reason;r.abort(h instanceof v?h:new Se(h instanceof Error?h.message:h))}};let s=t&&setTimeout(()=>{s=null,a(new v(`timeout ${t} of ms exceeded`,v.ETIMEDOUT))},t);const i=()=>{e&&(s&&clearTimeout(s),s=null,e.forEach(u=>{u.unsubscribe?u.unsubscribe(a):u.removeEventListener("abort",a)}),e=null)};e.forEach(u=>u.addEventListener("abort",a));const{signal:d}=r;return d.unsubscribe=()=>f.asap(i),d}},Xs=function*(e,t){let n=e.byteLength;if(n<t){yield e;return}let r=0,o;for(;r<n;)o=r+t,yield e.slice(r,o),r=o},Qs=async function*(e,t){for await(const n of Zs(e))yield*Xs(n,t)},Zs=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:n,value:r}=await t.read();if(n)break;yield r}}finally{await t.cancel()}},rn=(e,t,n,r)=>{const o=Qs(e,t);let a=0,s,i=d=>{s||(s=!0,r&&r(d))};return new ReadableStream({async pull(d){try{const{done:u,value:h}=await o.next();if(u){i(),d.close();return}let m=h.byteLength;if(n){let p=a+=m;n(p)}d.enqueue(new Uint8Array(h))}catch(u){throw i(u),u}},cancel(d){return i(d),o.return()}},{highWaterMark:2})},Ze=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",Fn=Ze&&typeof ReadableStream=="function",ea=Ze&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),Un=(e,...t)=>{try{return!!e(...t)}catch{return!1}},ta=Fn&&Un(()=>{let e=!1;const t=new Request(F.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),on=64*1024,Et=Fn&&Un(()=>f.isReadableStream(new Response("").body)),Je={stream:Et&&(e=>e.body)};Ze&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!Je[t]&&(Je[t]=f.isFunction(e[t])?n=>n[t]():(n,r)=>{throw new v(`Response type '${t}' is not supported`,v.ERR_NOT_SUPPORT,r)})})})(new Response);const na=async e=>{if(e==null)return 0;if(f.isBlob(e))return e.size;if(f.isSpecCompliantForm(e))return(await new Request(F.origin,{method:"POST",body:e}).arrayBuffer()).byteLength;if(f.isArrayBufferView(e)||f.isArrayBuffer(e))return e.byteLength;if(f.isURLSearchParams(e)&&(e=e+""),f.isString(e))return(await ea(e)).byteLength},ra=async(e,t)=>{const n=f.toFiniteNumber(e.getContentLength());return n??na(t)},oa=Ze&&(async e=>{let{url:t,method:n,data:r,signal:o,cancelToken:a,timeout:s,onDownloadProgress:i,onUploadProgress:d,responseType:u,headers:h,withCredentials:m="same-origin",fetchOptions:p}=Bn(e);u=u?(u+"").toLowerCase():"text";let l=Gs([o,a&&a.toAbortSignal()],s),w;const g=l&&l.unsubscribe&&(()=>{l.unsubscribe()});let b;try{if(d&&ta&&n!=="get"&&n!=="head"&&(b=await ra(h,r))!==0){let L=new Request(t,{method:"POST",body:r,duplex:"half"}),S;if(f.isFormData(r)&&(S=L.headers.get("content-type"))&&h.setContentType(S),L.body){const[M,U]=en(b,Ve(tn(d)));r=rn(L.body,on,M,U)}}f.isString(m)||(m=m?"include":"omit");const R="credentials"in Request.prototype;w=new Request(t,{...p,signal:l,method:n.toUpperCase(),headers:h.normalize().toJSON(),body:r,duplex:"half",credentials:R?m:void 0});let E=await fetch(w);const T=Et&&(u==="stream"||u==="response");if(Et&&(i||T&&g)){const L={};["status","statusText","headers"].forEach(ee=>{L[ee]=E[ee]});const S=f.toFiniteNumber(E.headers.get("content-length")),[M,U]=i&&en(S,Ve(tn(i),!0))||[];E=new Response(rn(E.body,on,M,()=>{U&&U(),g&&g()}),L)}u=u||"text";let D=await Je[f.findKey(Je,u)||"text"](E,e);return!T&&g&&g(),await new Promise((L,S)=>{In(L,S,{data:D,headers:H.from(E.headers),status:E.status,statusText:E.statusText,config:e,request:w})})}catch(R){throw g&&g(),R&&R.name==="TypeError"&&/fetch/i.test(R.message)?Object.assign(new v("Network Error",v.ERR_NETWORK,e,w),{cause:R.cause||R}):v.from(R,R&&R.code,e,w)}}),xt={http:ys,xhr:Ys,fetch:oa};f.forEach(xt,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const sn=e=>`- ${e}`,sa=e=>f.isFunction(e)||e===null||e===!1,jn={getAdapter:e=>{e=f.isArray(e)?e:[e];const{length:t}=e;let n,r;const o={};for(let a=0;a<t;a++){n=e[a];let s;if(r=n,!sa(n)&&(r=xt[(s=String(n)).toLowerCase()],r===void 0))throw new v(`Unknown adapter '${s}'`);if(r)break;o[s||"#"+a]=r}if(!r){const a=Object.entries(o).map(([i,d])=>`adapter ${i} `+(d===!1?"is not supported by the environment":"is not available in the build"));let s=t?a.length>1?`since :
|
|
5
|
-
`+a.map(sn).join(`
|
|
6
|
-
`):" "+sn(a[0]):"as no adapter specified";throw new v("There is no suitable adapter to dispatch the request "+s,"ERR_NOT_SUPPORT")}return r},adapters:xt};function mt(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Se(null,e)}function an(e){return mt(e),e.headers=H.from(e.headers),e.data=pt.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),jn.getAdapter(e.adapter||_e.adapter)(e).then(function(r){return mt(e),r.data=pt.call(e,e.transformResponse,r),r.headers=H.from(r.headers),r},function(r){return Pn(r)||(mt(e),r&&r.response&&(r.response.data=pt.call(e,e.transformResponse,r.response),r.response.headers=H.from(r.response.headers))),Promise.reject(r)})}const zn="1.8.2",et={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{et[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const ln={};et.transitional=function(t,n,r){function o(a,s){return"[Axios v"+zn+"] Transitional option '"+a+"'"+s+(r?". "+r:"")}return(a,s,i)=>{if(t===!1)throw new v(o(s," has been removed"+(n?" in "+n:"")),v.ERR_DEPRECATED);return n&&!ln[s]&&(ln[s]=!0,console.warn(o(s," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(a,s,i):!0}};et.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function aa(e,t,n){if(typeof e!="object")throw new v("options must be an object",v.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let o=r.length;for(;o-- >0;){const a=r[o],s=t[a];if(s){const i=e[a],d=i===void 0||s(i,a,e);if(d!==!0)throw new v("option "+a+" must be "+d,v.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new v("Unknown option "+a,v.ERR_BAD_OPTION)}}const We={assertOptions:aa,validators:et},te=We.validators;let fe=class{constructor(t){this.defaults=t,this.interceptors={request:new Qt,response:new Qt}}async request(t,n){try{return await this._request(t,n)}catch(r){if(r instanceof Error){let o={};Error.captureStackTrace?Error.captureStackTrace(o):o=new Error;const a=o.stack?o.stack.replace(/^.+\n/,""):"";try{r.stack?a&&!String(r.stack).endsWith(a.replace(/^.+\n.+\n/,""))&&(r.stack+=`
|
|
7
|
-
`+a):r.stack=a}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=he(this.defaults,n);const{transitional:r,paramsSerializer:o,headers:a}=n;r!==void 0&&We.assertOptions(r,{silentJSONParsing:te.transitional(te.boolean),forcedJSONParsing:te.transitional(te.boolean),clarifyTimeoutError:te.transitional(te.boolean)},!1),o!=null&&(f.isFunction(o)?n.paramsSerializer={serialize:o}:We.assertOptions(o,{encode:te.function,serialize:te.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),We.assertOptions(n,{baseUrl:te.spelling("baseURL"),withXsrfToken:te.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let s=a&&f.merge(a.common,a[n.method]);a&&f.forEach(["delete","get","head","post","put","patch","common"],w=>{delete a[w]}),n.headers=H.concat(s,a);const i=[];let d=!0;this.interceptors.request.forEach(function(g){typeof g.runWhen=="function"&&g.runWhen(n)===!1||(d=d&&g.synchronous,i.unshift(g.fulfilled,g.rejected))});const u=[];this.interceptors.response.forEach(function(g){u.push(g.fulfilled,g.rejected)});let h,m=0,p;if(!d){const w=[an.bind(this),void 0];for(w.unshift.apply(w,i),w.push.apply(w,u),p=w.length,h=Promise.resolve(n);m<p;)h=h.then(w[m++],w[m++]);return h}p=i.length;let l=n;for(m=0;m<p;){const w=i[m++],g=i[m++];try{l=w(l)}catch(b){g.call(this,b);break}}try{h=an.call(this,l)}catch(w){return Promise.reject(w)}for(m=0,p=u.length;m<p;)h=h.then(u[m++],u[m++]);return h}getUri(t){t=he(this.defaults,t);const n=Dn(t.baseURL,t.url,t.allowAbsoluteUrls);return _n(n,t.params,t.paramsSerializer)}};f.forEach(["delete","get","head","options"],function(t){fe.prototype[t]=function(n,r){return this.request(he(r||{},{method:t,url:n,data:(r||{}).data}))}});f.forEach(["post","put","patch"],function(t){function n(r){return function(a,s,i){return this.request(he(i||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:a,data:s}))}}fe.prototype[t]=n(),fe.prototype[t+"Form"]=n(!0)});let ia=class Hn{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(a){n=a});const r=this;this.promise.then(o=>{if(!r._listeners)return;let a=r._listeners.length;for(;a-- >0;)r._listeners[a](o);r._listeners=null}),this.promise.then=o=>{let a;const s=new Promise(i=>{r.subscribe(i),a=i}).then(o);return s.cancel=function(){r.unsubscribe(a)},s},t(function(a,s,i){r.reason||(r.reason=new Se(a,s,i),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new Hn(function(o){t=o}),cancel:t}}};function la(e){return function(n){return e.apply(null,n)}}function ca(e){return f.isObject(e)&&e.isAxiosError===!0}const Rt={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Rt).forEach(([e,t])=>{Rt[t]=e});function qn(e){const t=new fe(e),n=vn(fe.prototype.request,t);return f.extend(n,fe.prototype,t,{allOwnKeys:!0}),f.extend(n,t,null,{allOwnKeys:!0}),n.create=function(o){return qn(he(e,o))},n}const C=qn(_e);C.Axios=fe;C.CanceledError=Se;C.CancelToken=ia;C.isCancel=Pn;C.VERSION=zn;C.toFormData=Qe;C.AxiosError=v;C.Cancel=C.CanceledError;C.all=function(t){return Promise.all(t)};C.spread=la;C.isAxiosError=ca;C.mergeConfig=he;C.AxiosHeaders=H;C.formToJSON=e=>Mn(f.isHTMLForm(e)?new FormData(e):e);C.getAdapter=jn.getAdapter;C.HttpStatusCode=Rt;C.default=C;const{Axios:Ta,AxiosError:ka,CanceledError:Ca,isCancel:Oa,CancelToken:Aa,VERSION:La,all:_a,Cancel:Na,isAxiosError:Ma,spread:Pa,toFormData:Ia,AxiosHeaders:Da,HttpStatusCode:Ba,formToJSON:Fa,getAdapter:Ua,mergeConfig:ja}=C,Tt="useAxios",ua=async(e,t=r=>"",n=r=>{})=>(e.baseURL=t(e),B.debug(Tt,`baseURL::${e.baseURL}`),n(e),e),da=async(e=n=>{},t)=>{var r;if(e(t),t.response.status!==500){if(t.response.status<=401)return B.info(Tt,t.response.data.meta),Promise.reject(t.response.data.meta);if(t.response.status===404)return B.info(Tt,t.response.data.meta),Promise.reject(t.response.data.meta)}let n;try{let o="";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=C(t.response.config)}catch(o){(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)}return n},ze="useAxios",fa=({onRequest:e,onError:t,defineEnv:n})=>{C.interceptors.request.use(r=>ua(r,n,e)),C.interceptors.response.use(r=>r.data.data,r=>da(t,r)),C.defaults.headers.common["content-type"]="application/json"},ha={get:async(e,t)=>(B.debug(ze,`[get] url | ${e}`),C.get(e,t)),post:async(e,t,n)=>(B.debug(ze,`[post] url | ${e} | payload | ${t}`),C.post(e,t,n)),put:async(e,t,n)=>(B.debug(ze,`[put] url | ${e} | payload | ${t}`),C.put(e,t,n)),delete:async(e,t)=>(B.debug(ze,`[delete] url | ${e}`),C.delete(e,t))};var W=(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||{});const cn={iphone_15:{width:{min:850,max:854},height:{min:390,max:395}},iphone_14_pro_max:{width:{min:925,max:935},height:{min:427,max:435}},iphone_12_pro:{width:{min:840,max:845},height:{min:388,max:392}},iphone_13_mini:{width:{min:810,max:815},height:{min:370,max:377}},iphone_se_22:{width:{min:664,max:668},height:{min:370,max:377}},iphone_xr:{width:{min:894,max:898},height:{min:410,max:417}},gpixel_6_pro:{width:{min:890,max:895},height:{min:408,max:415}},gpixel_4xl:{width:{min:865,max:972},height:{min:408,max:415}},gpixel_3xl:{width:{min:784,max:788},height:{min:390,max:395}},sam_galaxy_s22:{width:{min:778,max:783},height:{min:357,max:365}},sam_galaxy_s22_plus:{width:{min:830,max:835},height:{min:380,max:387}},sam_galaxy_s22_ultra:{width:{min:820,max:825},height:{min:380,max:387}},sam_galaxy_s21:{width:{min:798,max:805},height:{min:358,max:365}},sam_galaxy_s21_plus:{width:{min:850,max:857},height:{min:380,max:387}},sam_galaxy_s20_ultra:{width:{min:910,max:918},height:{min:408,max:415}},nokia_n9:{width:{min:853,max:855},height:{min:478,max:482}}},$n=()=>({width:window.innerWidth,height:window.innerHeight}),pa=({width:e,height:t})=>{const{width:n,height:r}=$n();return e.min<=n&&e.max>=n&&t.min<=r&&t.max>=r},Wn=()=>{for(const r of Object.keys(cn)){const o=cn[r];if(pa(o))return o.vdevice||W.MOBILE_LANDSCAPE_XL}const{width:e,height:t}=$n(),n=t>=e;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)},ma=["h1","h3","blockquote","br"],ga={strong:"*",b:"*",i:"_",u:"__",s:"~",strike:"~",highlight:"`",blockquote:">",h1:"# ",h3:"### ",br:`
|
|
8
|
-
`},I={bold:/(^|\s|[{\[])\*{1,2}(.*?\S *)?\*{1,2}(?=$|\s|[\.,\?:;\-}\]](?:$|\s))/g,italic:/(^|\s|[{\[])\_(.*?\S *)?\_(?=$|\s|[\.,\?:;\-}\]](?:$|\s))/g,underline:/(^|\s|[{\[])\_{2}(.*?\S *)?\_{2}(?=$|\s|[\.,\?:;\-}\]](?:$|\s))/g,strike:/(^|\s|[{\[])\~(.*?\S *)?\~(?=$|\s|[\.,\?:;\-}\]](?:$|\s))/g,heading:/(?:^|\n)(\#{1,6}) (.*?\S *)(?:\n|$)/gm,blockquote:/(?:^|\n)(?:>|>\s|>\s) (.+?)(?:\n|$)/gm,monospace:/(^|\s)\`(.*?\S *)?\`(?=$|\s)/g,codeblock:/(^|\s)`{3}((?:(?:.*?$)\n)?(?:[\s\S]*?))`{3}(?=$|\s)/g,nextline:/(.*)(\n)(.*)/gm,line:/(^|[\n])(\*{3,}|\-{3,})(?=$|[\n])(.*)/g,link:/(^|\s)\[(.+?)\]\(((?:(?:https?:\/\/(?:www\.)?|www\.)|(?:mailto:)).*?)\)(?:{:(.*)})?/gi,image:/!\[(.*)\]\((.*?)\s*(?:(?:'|"|")(.*)(?:'|"|"))?\s*\)(?:{:(.*)})?/gi,video:/(?:\[\!\[(.*)\]\((.*?)\s*(?:(?:'|"|")(.*)(?:'|"|"))?\s*\)(?:{:(.*)})?]\((.*?)\s*(?:(?:'|"|")(.*)(?:'|"|"))?\s*\))(?:{:(.*)})?/gi,bullet:/(^\s|\n|^)([\*|\-|●|○] )(.*?\S *)*(?:(?:.*?$)\n)?((\s)*([\*|\-|●|○] )(.*?\S *)*(?:(?:.*?$)\n)?)*/gm,numlist:/(^\s|\n|^)(\d)+(\.) (.*?\S *)*(?:(?:.*?$)\n)?((\s)*(\d)+(\.)(.*?\S *)*(?:(?:.*?$)\n)?)*/gm,anchor_tag:/<a(>| .*?>)(.*?)<\/a>/g,href:/href=(?:'|")(.*?)(?:'|") ?/g,gdrive_url:/(?:https:\/\/drive\.google\.com\/file\/d\/(.*?)\/view)/,vtype:/(?:vtype=(?:'|"|")(image|audio|video)(?:'|"|"))/},gt=e=>e.replace(/\*/g,"*").replace(/\_/g,"_").replace(/\~/g,"~"),wa=e=>e.replace(/*/g,"*").replace(/_/g,"_").replace(/~/g,"~"),un=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),ye=(e,t)=>{let n="",r="";return(e[0]===`
|
|
9
|
-
`||e[0]===" ")&&(n=e[0]),(e[e.length-1]===`
|
|
10
|
-
`||e[e.length-1]===" ")&&(r=e[e.length-1]),n+t+r},dn=e=>new RegExp(`<${e}.*?/?>`,"gm"),fn=e=>{let t=e.match(I.gdrive_url);if(t&&t.length>1&&t[1])return`http://docs.google.com/uc?export=open&id=${t[1]}`;if(e.startsWith("@")){let n=e.split("@")[1].split(":");if(n[0]==="gdrive")return`http://docs.google.com/uc?export=open&id=${n[1]}`}return e},hn=(e="",t="",n="",r="")=>{let o="image";if(r.length){let a=r.match(I.vtype);a&&a.length>1&&a[1]&&(o=a[1])}return o=="audio"?`<audio vmd="audio" controls ${r}>
|
|
11
|
-
<source src="${n}" type="audio/mp3"/>
|
|
12
|
-
</audio>`:o=="video"?`<video vmd="video" controls ${r}>
|
|
13
|
-
<source src="${n}" type="video/mp4"/>
|
|
14
|
-
</video>`:`<img vmd="image" src="${n}" alt="${e}" title="${t}" ${r}>`},ba={applyReverseMarkdown:e=>(e=e.replace(dn("br"),`
|
|
15
|
-
`),e=un(e),e=Markdown.reverseAnchor(e),e=e.replace(dn("hr")," --- "),e=Markdown.reverseRecursive(e),e.trim()),reverseRecursive:e=>{let n=new DOMParser().parseFromString(e,"text/html").body.childNodes,r=e===`
|
|
16
|
-
`?`
|
|
17
|
-
`:"";return Array.from(n).forEach(o=>{let a=o.nodeType===Node.TEXT_NODE,s=!a&&o.tagName.toLowerCase();const i=o.innerText;if(i&&(i.trim()||i.includes(`
|
|
18
|
-
`))||a||s==="br"){if(a)return r+=o.data;let d=ga[s]||"",u=o.childNodes.length?Markdown.reverseRecursive(o.innerHTML):i;r+=!u.trim()&&u.includes(`
|
|
19
|
-
`)?`
|
|
20
|
-
`:"";let h=u[u.length-1]===`
|
|
21
|
-
`,m=ma.includes(s)?"":d;r+=d+(h?u.slice(0,u.length-1)+m+`
|
|
22
|
-
`:u+m)}}),r},reverseAnchor:e=>{let{anchor_tag:t,href:n}=I;return e.replace(t,(r,o,a)=>{const s=a;let i;return o.replace(n,(d,u)=>{i=u}),i.includes("mailto:")?i.replace("mailto:",""):`${e[e.indexOf(r)-1]!==" "?" ":""}[${s}](${encodeURI(i)})`})},applyMarkdown:(e,t=!1)=>typeof e!="string"?e:(e=un(e),e=e.replace(/</g,"<").replace(/>/g,">").replace(/<br>/g,`
|
|
23
|
-
`).trim(),e=Markdown.applyRecursive(e,t),e=Markdown.applyOnce(e),e=Markdown.applyNextLine(e),e=wa(e),'<div class="vmd">'+e+"</div>"),applyRecursive:(e,t=!1)=>(e=e.replace(I.bold,Markdown.getBoldHTML),e=e.replace(I.italic,Markdown.getItalicHTML),e=e.replace(I.underline,Markdown.getUnderLineHTML),e=e.replace(I.strike,Markdown.getStrikeHTML),e=e.replace(I.line,Markdown.getLineHTML),e=e.replace(I.bullet,Markdown.getBulletHTML),e=e.replace(I.numlist,Markdown.getNumlistHTML),t||(e=e.replace(I.video,Markdown.getVideoHTML),e=e.replace(I.image,Markdown.getImageHTML)),e=e.replace(I.link,Markdown.getLinkHTML),e),applyOnce:e=>(e=e.replace(I.blockquote,Markdown.getBlockQuoteHTML),e=e.replace(I.heading,Markdown.getHeadingHTML),e=e.replace(I.codeblock,Markdown.getCodeblockHTML),e=e.replace(I.monospace,Markdown.getMonoSpaceHTML),e),applyNextLine:e=>e.replace(I.nextline,Markdown.getNextLineHTML),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> ",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> ",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>",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> ",getHeadingHTML:(e,t,n)=>{let r=t.length;return ye(e," <h"+r+` vmd="h${r}">`+gt(n)+"</h"+r+"> ")},getBlockQuoteHTML:(e,t)=>(t=t.trim(),t.length?ye(e,' <blockquote vmd="blockquote"><p>'+Markdown.applyRecursive(t)+"</p></blockquote> "):e),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> ",getCodeblockHTML:(e,t,n)=>n.trim().length===0?e:t+' <pre vmd="codeblock"> '+Markdown.applyRecursive(n)+"</pre>",getNextLineHTML:(e,t,n,r)=>t+' <br vmd="br" > '+r,getLineHTML:(e,t,n,r)=>t+'<hr vmd="line" class="hr w100">'+Markdown.applyRecursive(r.trim()),getLinkHTML:(e,t,n,r,o)=>{var a=r.startsWith("www.")?"http://"+r:r;return t+` <a vmd="link" href="${encodeURI(a)}" rel="noopener noreferrer" ${o}>${gt(n)}</a>`},getImageHTML:(e,t,n,r,o)=>{let a=hn(t,r,fn(n),o);return ye(e,a)},getVideoHTML:(e,t,n,r,o,a,s,i)=>{let d=hn(t,r,fn(n),o);return ye(e,`<a vmd="hyperlink" href="${a}" title="${s}" rel="noreferrer" ${i}>${d}</a>`)},getBulletHTML:e=>{if(isNaN(e)){if(e.replace(/\s/g,"").replace(/\*/g,"").length==0)return e}else return e;return ye(e,' <ul vmd="list-bullet" style="list-style-type: disc; list-style: inherit;">'+(n=>{let r="";for(var o=n.split(`
|
|
24
|
-
`),a=0;a<o.length;a++)o[a]=o[a].replace(/[\-|●|○]/,"-"),o[a].includes("-")&&(r+=o[a].replace(/\-/,' <li style="list-style: inherit"> ')+"</li> ");return r})(e)+"</ul> ")},getNumlistHTML:e=>isNaN(e)?ye(e,' <ol vmd="list-number">'+(n=>{let r="";for(var o=n.split(`
|
|
25
|
-
`),a=0;a<o.length;a++)o[a]=o[a].replace(/(\d)*(\.)/,"-"),o[a].includes("-")&&(r+=o[a].replace(/\-/,'<li style="list-style: decimal"> ')+"</li>");return r})(e)+"</ol> "):e};function ya(){return{toTop:()=>{window.scrollTo({top:0,behavior:"smooth"})},toNextPage:()=>{window.scrollTo({top:window.innerHeight,behavior:"smooth"})},byId:(o="",a=!0)=>{const s=document.getElementById(o);let i="start";if(a){const d=Wn();i=d===W.MINI_MOBILE||d===W.MOBILE_PORTRAIT?"start":"center"}s==null||s.scrollIntoView({behavior:"smooth",block:i})},byIdOffSet:(o="")=>{const a=document.getElementById(o),s=75,i=document.body.getBoundingClientRect().top,h=a.getBoundingClientRect().top-i-s;window.scroll({top:h,behavior:"smooth"})}}}function va({meta:e=!1,ctrl:t=!1,shift:n=!1,key:r,handler:o}){q("keydown",a=>{if(a.metaKey===e){if(a.ctrlKey!==t)return;if(a.shiftKey!==n)return;a.key===r&&(a.stopImmediatePropagation(),a.preventDefault(),a.stopPropagation(),o())}})}const Sa="useStore";let Vn="v0xapp",Jn="1.0.5-alpha";function He(e){return`vezham-ls-${Vn}-${Jn}-${e}`}const Ea=e=>{e.pretext&&(Vn=e.pretext),e.version&&(Jn=e.version)},Kn={get:(e,t)=>{try{const n=window.localStorage.getItem(He(e));return n&&n!=="undefined"?n:t||""}catch(n){return B.error(Sa,`key | ${He(e)} | err: `,n),t||""}},has:e=>!!Kn.get(e),set:(e,t)=>window.localStorage.setItem(He(e),t),delete:e=>window.localStorage.removeItem(He(e)),purge:()=>window.localStorage.clear()};exports.GetDevice=Wn;exports.Vdevice=W;exports.defineAxios=fa;exports.defineLogger=cr;exports.defineStore=Ea;exports.useAxios=ha;exports.useBoolean=mn;exports.useClickAnyWhere=ro;exports.useCopyToClipboard=oo;exports.useCountdown=so;exports.useCounter=gn;exports.useDarkMode=co;exports.useDebounceCallback=Ke;exports.useDebounceValue=uo;exports.useDocumentTitle=fo;exports.useEffect=ho;exports.useEventCallback=Oe;exports.useEventListener=q;exports.useHover=po;exports.useIntersectionObserver=mo;exports.useInterval=wn;exports.useIsClient=go;exports.useIsFirstRender=bn;exports.useIsMounted=yn;exports.useIsomorphicLayoutEffect=K;exports.useLocalStorage=kt;exports.useLogger=B;exports.useMap=wo;exports.useMarkdown=ba;exports.useMediaQuery=Ct;exports.useOnClickOutside=bo;exports.useReadLocalStorage=yo;exports.useResizeObserver=vo;exports.useScreen=So;exports.useScript=xo;exports.useScrollLock=To;exports.useScrollTo=ya;exports.useSessionStorage=ko;exports.useShortcut=va;exports.useStep=Co;exports.useStore=Kn;exports.useTernaryDarkMode=Lo;exports.useTimeout=_o;exports.useToast=pn;exports.useToggle=No;exports.useUnmount=Ot;exports.useWindowSize=Po;
|