@noxickon/onyx 0.0.2 → 0.0.4-dev.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.
Files changed (42) hide show
  1. package/dist/chunks/Button-D-v4l8ZE.js +20 -0
  2. package/dist/chunks/{Button-CLMaoxRW.js → Button-bARrxYyo.js} +627 -628
  3. package/dist/chunks/Input-CLi1H63d.js +1 -0
  4. package/dist/chunks/{Input-BQQT5eZ0.js → Input-dfvmdIHi.js} +39 -39
  5. package/dist/chunks/errorHelper--G-SWQzN.js +18 -0
  6. package/dist/chunks/errorHelper-DaP_XxEx.js +1 -0
  7. package/dist/chunks/formatTimestamp-CMxOnPo1.js +12 -0
  8. package/dist/chunks/formatTimestamp-TTsNcy7u.js +1 -0
  9. package/dist/chunks/{jsx-runtime-C5mzlN2N.js → jsx-runtime--oOP9f8K.js} +15 -15
  10. package/dist/chunks/{jsx-runtime-DUiatUiq.js → jsx-runtime-CITbqOLs.js} +2 -2
  11. package/dist/chunks/{index-BgUMV1hv.js → useAuth-DDRXztKj.js} +240 -178
  12. package/dist/chunks/{index-XTQUUzZ1.js → useAuth-DPnpY3XC.js} +18 -9
  13. package/dist/chunks/{useForm-BIKRbGHj.js → useForm-D4co95Vn.js} +785 -801
  14. package/dist/chunks/useForm-DUviJ7xS.js +18 -0
  15. package/dist/chunks/useQuery-BvCyJMae.js +2065 -0
  16. package/dist/chunks/useQuery-DTNHO7so.js +3 -0
  17. package/dist/context/context.cjs.js +1 -1
  18. package/dist/context/context.es.js +1 -1
  19. package/dist/context.d.ts +1 -0
  20. package/dist/hooks/hooks.cjs.js +6 -6
  21. package/dist/hooks/hooks.es.js +117 -118
  22. package/dist/index.css +1 -1
  23. package/dist/index.d.ts +24 -10
  24. package/dist/layout/layout.cjs.js +1 -1
  25. package/dist/layout/layout.es.js +2 -2
  26. package/dist/onyx.cjs.js +1 -12
  27. package/dist/onyx.es.js +779 -2035
  28. package/dist/pages/pages.cjs.js +8 -2
  29. package/dist/pages/pages.es.js +35 -25
  30. package/dist/utils/utils.cjs.js +1 -0
  31. package/dist/utils/utils.es.js +8 -0
  32. package/dist/utils.d.ts +29 -0
  33. package/package.json +31 -27
  34. package/dist/chunks/Button-CZYAHivj.js +0 -20
  35. package/dist/chunks/Input-DJZcvJdP.js +0 -1
  36. package/dist/chunks/index-1-zQ3RaM.js +0 -601
  37. package/dist/chunks/index-CjVXr8mh.js +0 -2
  38. package/dist/chunks/useAuth-C-TIgBfr.js +0 -61
  39. package/dist/chunks/useAuth-CfKOZqhG.js +0 -10
  40. package/dist/chunks/useForm-BZEaiRaa.js +0 -26
  41. package/dist/chunks/useQuery-B_ce5e8f.js +0 -2
  42. package/dist/chunks/useQuery-CJdYhuQu.js +0 -1481
package/dist/onyx.es.js CHANGED
@@ -1,133 +1,133 @@
1
- import { j as i } from "./chunks/jsx-runtime-C5mzlN2N.js";
2
- import * as f from "react";
3
- import ee, { useState as z, useEffect as Y, useId as ue, useRef as ye, useCallback as Fe, createContext as We, useContext as Be } from "react";
4
- import { t as N, b as T, a as U, O as De } from "./chunks/Button-CLMaoxRW.js";
5
- import { c as Ce, d as je, b as Ne } from "./chunks/Input-BQQT5eZ0.js";
6
- import { O as Sn, a as Rn } from "./chunks/Input-BQQT5eZ0.js";
7
- import { createPortal as He } from "react-dom";
8
- import { M as ft } from "./chunks/constants-CDXq37n6.js";
9
- import { u as Ae } from "./chunks/useAuth-C-TIgBfr.js";
10
- import './index.css';const cn = ({ children: e, className: t }) => /* @__PURE__ */ i.jsx("div", { className: N("flex items-center gap-3", t), children: e }), he = {
1
+ import { j as e } from "./chunks/jsx-runtime--oOP9f8K.js";
2
+ import U, { useState as S, useEffect as V, useId as G, useRef as ee, useCallback as oe, createContext as ae, useContext as ie } from "react";
3
+ import { t as b, b as $, a as B, O as le } from "./chunks/Button-bARrxYyo.js";
4
+ import { c as te, d as se, b as re } from "./chunks/Input-dfvmdIHi.js";
5
+ import { O as wt, a as jt } from "./chunks/Input-dfvmdIHi.js";
6
+ import { createPortal as ce } from "react-dom";
7
+ import { M as pe } from "./chunks/constants-CDXq37n6.js";
8
+ import { f as ge } from "./chunks/formatTimestamp-CMxOnPo1.js";
9
+ import { u as de } from "./chunks/useAuth-DDRXztKj.js";
10
+ import './index.css';const tt = ({ children: t, className: s }) => /* @__PURE__ */ e.jsx("div", { className: b("flex items-center gap-3", s), children: t }), Q = {
11
11
  rounded: "rounded-full",
12
12
  square: "rounded-lg"
13
- }, pe = {
13
+ }, X = {
14
14
  sm: "h-6 w-6",
15
15
  md: "h-8 w-8",
16
16
  lg: "h-10 w-10",
17
17
  xl: "h-12 w-12",
18
18
  "2xl": "h-16 w-16"
19
- }, mt = {
19
+ }, ve = {
20
20
  sm: "h-2 w-2",
21
21
  md: "h-2.5 w-2.5",
22
22
  lg: "h-3 w-3",
23
23
  xl: "h-3.5 w-3.5",
24
24
  "2xl": "h-4 w-4"
25
- }, ht = {
25
+ }, we = {
26
26
  online: "bg-green-500",
27
27
  offline: "bg-neutral-500",
28
28
  away: "bg-yellow-500",
29
29
  busy: "bg-red-500"
30
- }, pt = {
30
+ }, je = {
31
31
  sm: "text-xs",
32
32
  md: "text-sm",
33
33
  lg: "text-base",
34
34
  xl: "text-base",
35
35
  "2xl": "text-lg"
36
- }, xt = ({
37
- alt: e,
38
- className: t,
39
- fallback: r,
40
- showStatus: a = !1,
41
- size: n = "md",
42
- skeleton: o = !1,
43
- src: s,
44
- status: u,
45
- type: l = "square"
36
+ }, ye = ({
37
+ alt: t,
38
+ className: s,
39
+ fallback: n,
40
+ showStatus: o = !1,
41
+ size: r = "md",
42
+ skeleton: i = !1,
43
+ src: a,
44
+ status: l,
45
+ type: u = "square"
46
46
  }) => {
47
- const [c, d] = z(!1), [m, h] = z(!1), [b, g] = z(!0);
48
- Y(() => {
49
- if (!s) {
50
- d(!1), h(!0), g(!1);
47
+ const [h, d] = S(!1), [m, p] = S(!1), [f, g] = S(!0);
48
+ V(() => {
49
+ if (!a) {
50
+ d(!1), p(!0), g(!1);
51
51
  return;
52
52
  }
53
53
  g(!0);
54
- const C = new Image();
55
- C.src = s;
56
- const p = () => {
57
- d(!0), h(!1), g(!1);
58
- }, x = () => {
59
- d(!1), h(!0), g(!1);
54
+ const y = new Image();
55
+ y.src = a;
56
+ const k = () => {
57
+ d(!0), p(!1), g(!1);
58
+ }, c = () => {
59
+ d(!1), p(!0), g(!1);
60
60
  };
61
- return C.addEventListener("load", p), C.addEventListener("error", x), () => {
62
- C.removeEventListener("load", p), C.removeEventListener("error", x);
61
+ return y.addEventListener("load", k), y.addEventListener("error", c), () => {
62
+ y.removeEventListener("load", k), y.removeEventListener("error", c);
63
63
  };
64
- }, [s]);
65
- const v = () => b && o ? /* @__PURE__ */ i.jsx("div", { className: T("animate-pulse bg-zinc-800", he[l], pe[n]) }) : c && !m ? /* @__PURE__ */ i.jsx(
64
+ }, [a]);
65
+ const j = () => f && i ? /* @__PURE__ */ e.jsx("div", { className: $("animate-pulse bg-zinc-800", Q[u], X[r]) }) : h && !m ? /* @__PURE__ */ e.jsx(
66
66
  "img",
67
67
  {
68
- alt: e,
69
- className: N(he[l], pe[n], "object-cover", t),
68
+ alt: t,
69
+ className: b(Q[u], X[r], "object-cover", s),
70
70
  loading: "lazy",
71
- src: s
71
+ src: a
72
72
  }
73
- ) : /* @__PURE__ */ i.jsx(
73
+ ) : /* @__PURE__ */ e.jsx(
74
74
  "div",
75
75
  {
76
- "aria-label": e,
77
- className: N(
76
+ "aria-label": t,
77
+ className: b(
78
78
  "flex items-center justify-center bg-zinc-800 font-medium text-white",
79
- he[l],
80
- pe[n],
81
- pt[n],
82
- t
79
+ Q[u],
80
+ X[r],
81
+ je[r],
82
+ s
83
83
  ),
84
84
  role: "img",
85
- children: typeof r == "string" && r.length > 2 ? r.substring(0, 2) : r
85
+ children: typeof n == "string" && n.length > 2 ? n.substring(0, 2) : n
86
86
  }
87
87
  );
88
- return /* @__PURE__ */ i.jsxs("div", { className: "relative shrink-0", children: [
89
- v(),
90
- a && u && /* @__PURE__ */ i.jsx(
88
+ return /* @__PURE__ */ e.jsxs("div", { className: "relative shrink-0", children: [
89
+ j(),
90
+ o && l && /* @__PURE__ */ e.jsx(
91
91
  "span",
92
92
  {
93
- "aria-label": `Status: ${u}`,
94
- className: T(
93
+ "aria-label": `Status: ${l}`,
94
+ className: $(
95
95
  "absolute right-0 bottom-0 rounded-full border-2 border-zinc-900",
96
- mt[n],
97
- ht[u]
96
+ ve[r],
97
+ we[l]
98
98
  ),
99
99
  role: "status"
100
100
  }
101
101
  )
102
102
  ] });
103
- }, dn = ({
104
- className: e,
105
- size: t = "md",
106
- subtext: r,
107
- username: a
103
+ }, st = ({
104
+ className: t,
105
+ size: s = "md",
106
+ subtext: n,
107
+ username: o
108
108
  }) => {
109
- const n = {
109
+ const r = {
110
110
  sm: "text-xs",
111
111
  md: "text-sm",
112
112
  lg: "text-base",
113
113
  xl: "text-lg",
114
114
  "2xl": "text-xl"
115
- }, o = {
115
+ }, i = {
116
116
  sm: "text-xs",
117
117
  md: "text-xs",
118
118
  lg: "text-sm",
119
119
  xl: "text-sm",
120
120
  "2xl": "text-base"
121
121
  };
122
- return /* @__PURE__ */ i.jsxs("div", { className: N("flex flex-col justify-center overflow-hidden", e), children: [
123
- /* @__PURE__ */ i.jsx("span", { className: T("block truncate font-medium text-white", n[t]), children: a }),
124
- r && /* @__PURE__ */ i.jsx("span", { className: T("block truncate text-neutral-400", o[t]), children: r })
122
+ return /* @__PURE__ */ e.jsxs("div", { className: b("flex flex-col justify-center overflow-hidden", t), children: [
123
+ /* @__PURE__ */ e.jsx("span", { className: $("block truncate font-medium text-white", r[s]), children: o }),
124
+ n && /* @__PURE__ */ e.jsx("span", { className: $("block truncate text-neutral-400", i[s]), children: n })
125
125
  ] });
126
- }, gt = {
126
+ }, Ne = {
127
127
  sm: "px-1 py-0.5 text-xs",
128
128
  md: "px-1.5 py-0.5 text-sm",
129
129
  lg: "px-2 py-1 text-base"
130
- }, bt = {
130
+ }, ke = {
131
131
  purple: "bg-purple-500/25 text-purple-400",
132
132
  lime: "bg-lime-400/10 text-lime-300",
133
133
  red: "bg-red-500/25 text-red-400",
@@ -145,49 +145,49 @@ import './index.css';const cn = ({ children: e, className: t }) => /* @__PURE__
145
145
  fuchsia: "bg-fuchsia-500/25 text-fuchsia-400",
146
146
  gray: "bg-gray-500/25 text-gray-400"
147
147
  };
148
- function vt(e) {
149
- const t = e.startsWith("#") ? e.substring(1) : e;
150
- if (!/^[0-9A-Fa-f]{3,6}$/.test(t)) return "#FFFFFF";
151
- const a = parseInt(t.length === 3 ? t[0] + t[0] : t.substr(0, 2), 16), n = parseInt(t.length === 3 ? t[1] + t[1] : t.substr(2, 2), 16), o = parseInt(t.length === 3 ? t[2] + t[2] : t.substr(4, 2), 16);
152
- return (0.299 * a + 0.587 * n + 0.114 * o) / 255 > 0.5 ? "#000000" : "#FFFFFF";
153
- }
154
- const se = ({
155
- bgColor: e,
156
- children: t,
157
- className: r,
158
- color: a = "purple",
159
- size: n = "md",
160
- textColor: o
148
+ function Ce(t) {
149
+ const s = t.startsWith("#") ? t.substring(1) : t;
150
+ if (!/^[0-9A-Fa-f]{3,6}$/.test(s)) return "#FFFFFF";
151
+ const o = parseInt(s.length === 3 ? s[0] + s[0] : s.substr(0, 2), 16), r = parseInt(s.length === 3 ? s[1] + s[1] : s.substr(2, 2), 16), i = parseInt(s.length === 3 ? s[2] + s[2] : s.substr(4, 2), 16);
152
+ return (0.299 * o + 0.587 * r + 0.114 * i) / 255 > 0.5 ? "#000000" : "#FFFFFF";
153
+ }
154
+ const q = ({
155
+ bgColor: t,
156
+ children: s,
157
+ className: n,
158
+ color: o = "purple",
159
+ size: r = "md",
160
+ textColor: i
161
161
  }) => {
162
- const s = !e && !o ? bt[a] : "", u = {};
163
- return e && (u.backgroundColor = e, o || (u.color = vt(e))), o && (u.color = o), /* @__PURE__ */ i.jsx(
162
+ const a = !t && !i ? ke[o] : "", l = {};
163
+ return t && (l.backgroundColor = t, i || (l.color = Ce(t))), i && (l.color = i), /* @__PURE__ */ e.jsx(
164
164
  "span",
165
165
  {
166
- className: N(
166
+ className: b(
167
167
  "inline-flex items-center rounded-md font-medium",
168
- gt[n],
169
- s,
170
- r
168
+ Ne[r],
169
+ a,
170
+ n
171
171
  ),
172
- style: Object.keys(u).length ? u : void 0,
173
- children: t
172
+ style: Object.keys(l).length ? l : void 0,
173
+ children: s
174
174
  }
175
175
  );
176
- }, yt = {
176
+ }, Oe = {
177
177
  default: "bg-zinc-900/90 border border-zinc-800",
178
178
  outline: "bg-transparent border border-zinc-700",
179
179
  gradient: "bg-gradient-to-br from-zinc-900 via-purple-900/20 to-zinc-900 border border-purple-800/30"
180
- }, wt = {
180
+ }, ze = {
181
181
  none: "p-0",
182
182
  sm: "p-3",
183
183
  md: "p-4",
184
184
  lg: "p-6"
185
- }, Ct = {
185
+ }, Ee = {
186
186
  none: "",
187
187
  lift: "hover:scale-[1.01] hover:-translate-y-1",
188
188
  glow: "hover:shadow-lg hover:shadow-purple-500/10",
189
189
  border: "hover:border-purple-500/50"
190
- }, jt = {
190
+ }, Ie = {
191
191
  purple: "hover:border-purple-500/50",
192
192
  blue: "hover:border-blue-500/50",
193
193
  emerald: "hover:border-emerald-500/50",
@@ -196,7 +196,7 @@ const se = ({
196
196
  amber: "hover:border-amber-500/50",
197
197
  cyan: "hover:border-cyan-500/50",
198
198
  indigo: "hover:border-indigo-500/50"
199
- }, Nt = {
199
+ }, Le = {
200
200
  purple: "from-purple-500/5 to-pink-500/5",
201
201
  blue: "from-blue-500/5 to-cyan-500/5",
202
202
  emerald: "from-emerald-500/5 to-teal-500/5",
@@ -205,49 +205,49 @@ const se = ({
205
205
  amber: "from-amber-500/5 to-orange-500/5",
206
206
  cyan: "from-cyan-500/5 to-blue-500/5",
207
207
  indigo: "from-indigo-500/5 to-purple-500/5"
208
- }, fn = ({
209
- backdropBlur: e = !1,
210
- children: t,
211
- className: r,
212
- color: a = "purple",
213
- equalHeight: n = !1,
214
- hoverVariant: o = "lift",
215
- hoverable: s = !1,
216
- padding: u = "md",
217
- variant: l = "default",
218
- ...c
208
+ }, rt = ({
209
+ backdropBlur: t = !1,
210
+ children: s,
211
+ className: n,
212
+ color: o = "purple",
213
+ equalHeight: r = !1,
214
+ hoverVariant: i = "lift",
215
+ hoverable: a = !1,
216
+ padding: l = "md",
217
+ variant: u = "default",
218
+ ...h
219
219
  }) => {
220
- const d = s ? o : "none", m = s && d !== "none";
221
- return /* @__PURE__ */ i.jsxs(
220
+ const d = a ? i : "none", m = a && d !== "none";
221
+ return /* @__PURE__ */ e.jsxs(
222
222
  "div",
223
223
  {
224
- className: N(
224
+ className: b(
225
225
  "relative overflow-hidden rounded-lg transition-all duration-300",
226
- yt[l],
227
- wt[u],
228
- n && "flex flex-col",
229
- e && "backdrop-blur-sm",
230
- m && Ct[d],
226
+ Oe[u],
227
+ ze[l],
228
+ r && "flex flex-col",
229
+ t && "backdrop-blur-sm",
230
+ m && Ee[d],
231
231
  m && "group hover:bg-white/5",
232
- m && jt[a],
233
- r
232
+ m && Ie[o],
233
+ n
234
234
  ),
235
- ...c,
235
+ ...h,
236
236
  children: [
237
- m && /* @__PURE__ */ i.jsx(
237
+ m && /* @__PURE__ */ e.jsx(
238
238
  "div",
239
239
  {
240
- className: N(
240
+ className: b(
241
241
  "absolute inset-0 bg-gradient-to-br opacity-0 transition-opacity duration-300 group-hover:opacity-100",
242
- Nt[a]
242
+ Le[o]
243
243
  )
244
244
  }
245
245
  ),
246
- /* @__PURE__ */ i.jsx("div", { className: "relative z-10", children: t })
246
+ /* @__PURE__ */ e.jsx("div", { className: "relative z-10", children: s })
247
247
  ]
248
248
  }
249
249
  );
250
- }, Et = {
250
+ }, Fe = {
251
251
  purple: {
252
252
  border: "border-purple-500/20",
253
253
  bg: "bg-purple-500/10",
@@ -288,465 +288,457 @@ const se = ({
288
288
  bg: "bg-indigo-500/10",
289
289
  text: "text-indigo-400"
290
290
  }
291
- }, mn = ({
292
- action: e,
293
- children: t,
294
- className: r,
295
- color: a = "purple",
296
- icon: n,
297
- iconColor: o,
298
- subtitle: s,
299
- title: u,
300
- ...l
291
+ }, nt = ({
292
+ action: t,
293
+ children: s,
294
+ className: n,
295
+ color: o = "purple",
296
+ icon: r,
297
+ iconColor: i,
298
+ subtitle: a,
299
+ title: l,
300
+ ...u
301
301
  }) => {
302
- if (t)
303
- return /* @__PURE__ */ i.jsx("div", { className: N("mb-4", r), ...l, children: t });
304
- const d = Et[o || a];
305
- return /* @__PURE__ */ i.jsxs("div", { className: N("mb-4 flex items-start justify-between gap-3", r), ...l, children: [
306
- /* @__PURE__ */ i.jsxs("div", { className: "flex items-center gap-3", children: [
307
- n && /* @__PURE__ */ i.jsx("div", { className: N("rounded-lg border p-2", d.border, d.bg), children: /* @__PURE__ */ i.jsx(U, { className: d.text, icon: n }) }),
308
- /* @__PURE__ */ i.jsxs("div", { children: [
309
- u && /* @__PURE__ */ i.jsx("h3", { className: "text-base font-semibold text-white", children: u }),
310
- s && /* @__PURE__ */ i.jsx("p", { className: "text-sm text-neutral-400", children: s })
302
+ if (s)
303
+ return /* @__PURE__ */ e.jsx("div", { className: b("mb-4", n), ...u, children: s });
304
+ const d = Fe[i || o];
305
+ return /* @__PURE__ */ e.jsxs("div", { className: b("mb-4 flex items-start justify-between gap-3", n), ...u, children: [
306
+ /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-3", children: [
307
+ r && /* @__PURE__ */ e.jsx("div", { className: b("rounded-lg border p-2", d.border, d.bg), children: /* @__PURE__ */ e.jsx(B, { className: d.text, icon: r }) }),
308
+ /* @__PURE__ */ e.jsxs("div", { children: [
309
+ l && /* @__PURE__ */ e.jsx("h3", { className: "text-base font-semibold text-white", children: l }),
310
+ a && /* @__PURE__ */ e.jsx("p", { className: "text-sm text-neutral-400", children: a })
311
311
  ] })
312
312
  ] }),
313
- e && /* @__PURE__ */ i.jsx("div", { children: e })
313
+ t && /* @__PURE__ */ e.jsx("div", { children: t })
314
314
  ] });
315
- }, hn = ({
316
- children: e,
317
- className: t,
318
- flexGrow: r = !0,
319
- ...a
320
- }) => /* @__PURE__ */ i.jsx("div", { className: N("py-2", r && "flex-grow", t), ...a, children: e }), pn = ({ children: e, className: t, ...r }) => /* @__PURE__ */ i.jsx(
315
+ }, ot = ({
316
+ children: t,
317
+ className: s,
318
+ flexGrow: n = !0,
319
+ ...o
320
+ }) => /* @__PURE__ */ e.jsx("div", { className: b("py-2", n && "flex-grow", s), ...o, children: t }), lt = ({ children: t, className: s, ...n }) => /* @__PURE__ */ e.jsx(
321
321
  "div",
322
322
  {
323
- className: N(
323
+ className: b(
324
324
  "mt-4 flex items-center justify-end border-t border-neutral-800 pt-4",
325
- t
325
+ s
326
326
  ),
327
- ...r,
328
- children: e
327
+ ...n,
328
+ children: t
329
329
  }
330
- ), kt = {
330
+ ), Se = {
331
331
  sm: "h-4 w-4",
332
332
  md: "h-5 w-5",
333
333
  lg: "h-6 w-6"
334
- }, Lt = {
334
+ }, $e = {
335
335
  sm: 0.5,
336
336
  md: 0.7,
337
337
  lg: 0.9
338
- }, xn = ({
339
- checked: e,
340
- className: t,
341
- defaultChecked: r,
342
- description: a,
343
- disabled: n = !1,
344
- error: o = !1,
345
- errorMessage: s,
346
- id: u,
347
- label: l,
348
- name: c,
338
+ }, at = ({
339
+ checked: t,
340
+ className: s,
341
+ defaultChecked: n,
342
+ description: o,
343
+ disabled: r = !1,
344
+ error: i = !1,
345
+ errorMessage: a,
346
+ id: l,
347
+ label: u,
348
+ name: h,
349
349
  onChange: d,
350
350
  required: m = !1,
351
- size: h = "md",
352
- value: b,
351
+ size: p = "md",
352
+ value: f,
353
353
  ...g
354
354
  }) => {
355
- const v = ue(), C = u || v, p = `${C}-checkbox`, x = `${C}-description`, y = `${C}-error`, j = o && s, L = /* @__PURE__ */ i.jsxs("div", { className: "relative inline-flex shrink-0", children: [
356
- /* @__PURE__ */ i.jsx(
355
+ const j = G(), y = l || j, k = `${y}-checkbox`, c = `${y}-description`, v = `${y}-error`, N = i && a, E = /* @__PURE__ */ e.jsxs("div", { className: "relative inline-flex shrink-0", children: [
356
+ /* @__PURE__ */ e.jsx(
357
357
  "input",
358
358
  {
359
- id: p,
360
- "aria-describedby": [a ? x : "", j ? y : ""].filter(Boolean).join(" ") || void 0,
361
- "aria-invalid": o,
359
+ id: k,
360
+ "aria-describedby": [o ? c : "", N ? v : ""].filter(Boolean).join(" ") || void 0,
361
+ "aria-invalid": i,
362
362
  "aria-required": m,
363
- checked: e,
364
- className: N(
363
+ checked: t,
364
+ className: b(
365
365
  "peer cursor-pointer appearance-none rounded-sm",
366
366
  "checked:bg-violet-700",
367
367
  "default-outset-focus",
368
368
  "disabled:cursor-not-allowed disabled:opacity-50",
369
- o ? "default-error-border" : "default-border",
370
- kt[h],
371
- t
369
+ i ? "default-error-border" : "default-border",
370
+ Se[p],
371
+ s
372
372
  ),
373
- defaultChecked: r,
374
- disabled: n,
375
- name: c,
373
+ defaultChecked: n,
374
+ disabled: r,
375
+ name: h,
376
376
  type: "checkbox",
377
- value: b,
377
+ value: f,
378
378
  onChange: d,
379
379
  ...g
380
380
  }
381
381
  ),
382
- /* @__PURE__ */ i.jsx(
383
- U,
382
+ /* @__PURE__ */ e.jsx(
383
+ B,
384
384
  {
385
385
  className: "pointer-events-none absolute inset-0 m-auto opacity-0 peer-checked:opacity-80",
386
386
  icon: "mdiCheck",
387
- size: Lt[h] || 0.7
387
+ size: $e[p] || 0.7
388
388
  }
389
389
  )
390
390
  ] });
391
- return /* @__PURE__ */ i.jsxs("div", { className: "flex w-full flex-col gap-1", children: [
392
- /* @__PURE__ */ i.jsxs("div", { className: "flex items-start gap-2", children: [
393
- L,
394
- l && /* @__PURE__ */ i.jsxs("div", { className: "flex w-full flex-col gap-1", children: [
395
- /* @__PURE__ */ i.jsx(Ce, { htmlFor: p, required: m, children: l }),
396
- a ? /* @__PURE__ */ i.jsx(je, { id: x, disabled: n, children: a }) : null
391
+ return /* @__PURE__ */ e.jsxs("div", { className: "flex w-full flex-col gap-1", children: [
392
+ /* @__PURE__ */ e.jsxs("div", { className: "flex items-start gap-2", children: [
393
+ E,
394
+ u && /* @__PURE__ */ e.jsxs("div", { className: "flex w-full flex-col gap-1", children: [
395
+ /* @__PURE__ */ e.jsx(te, { htmlFor: k, required: m, children: u }),
396
+ o ? /* @__PURE__ */ e.jsx(se, { id: c, disabled: r, children: o }) : null
397
397
  ] })
398
398
  ] }),
399
- j ? /* @__PURE__ */ i.jsx(Ne, { id: y, children: s }) : null
399
+ N ? /* @__PURE__ */ e.jsx(re, { id: v, children: a }) : null
400
400
  ] });
401
- }, Ue = ({
402
- align: e = "center",
403
- ariaHaspopup: t,
404
- children: r,
405
- className: a,
406
- content: n,
407
- contentClassName: o,
408
- contentRole: s,
409
- contentStyle: u,
410
- disabled: l = !1,
411
- id: c,
401
+ }, ne = ({
402
+ align: t = "center",
403
+ ariaHaspopup: s,
404
+ children: n,
405
+ className: o,
406
+ content: r,
407
+ contentClassName: i,
408
+ contentRole: a,
409
+ contentStyle: l,
410
+ disabled: u = !1,
411
+ id: h,
412
412
  offset: d = 8,
413
413
  onOpenChange: m,
414
- open: h,
415
- portal: b = !0,
414
+ open: p,
415
+ portal: f = !0,
416
416
  position: g = "top",
417
- trigger: v = "hover",
418
- useAriaControls: C = !1
417
+ trigger: j = "hover",
418
+ useAriaControls: y = !1
419
419
  }) => {
420
- const p = ue(), [x, y] = z(!1), j = ye(null), L = ye(null), F = h !== void 0, k = l ? !1 : F ? h : x, D = c || p, S = Fe(
421
- (w) => {
422
- l || (m == null || m(w), F || y(w));
420
+ const k = G(), [c, v] = S(!1), N = ee(null), E = ee(null), F = p !== void 0, C = u ? !1 : F ? p : c, D = h || k, I = oe(
421
+ (x) => {
422
+ u || (m?.(x), F || v(x));
423
423
  },
424
- [l, F, m]
425
- ), I = Fe(() => {
426
- if (!j.current || !L.current || !k) return;
427
- const w = j.current.getBoundingClientRect(), E = L.current.getBoundingClientRect(), R = {
424
+ [u, F, m]
425
+ ), W = oe(() => {
426
+ if (!N.current || !E.current || !C) return;
427
+ const x = N.current.getBoundingClientRect(), w = E.current.getBoundingClientRect(), z = {
428
428
  width: window.innerWidth,
429
429
  height: window.innerHeight
430
430
  };
431
- let P = g;
432
- g === "top" && w.top < E.height + d ? P = "bottom" : g === "bottom" && w.bottom + E.height + d > R.height ? P = "top" : g === "left" && w.left < E.width + d ? P = "right" : g === "right" && w.right + E.width + d > R.width && (P = "left");
433
- const O = H(w, E, P, e, d);
434
- L.current && (L.current.style.left = `${O.x}px`, L.current.style.top = `${O.y}px`);
435
- }, [k, g, e, d]);
436
- Y(() => {
437
- if (!k || v !== "click") return;
438
- const w = (E) => {
439
- j.current && !j.current.contains(E.target) && L.current && !L.current.contains(E.target) && S(!1);
431
+ let L = g;
432
+ g === "top" && x.top < w.height + d ? L = "bottom" : g === "bottom" && x.bottom + w.height + d > z.height ? L = "top" : g === "left" && x.left < w.width + d ? L = "right" : g === "right" && x.right + w.width + d > z.width && (L = "left");
433
+ const M = H(x, w, L, t, d);
434
+ E.current && (E.current.style.left = `${M.x}px`, E.current.style.top = `${M.y}px`);
435
+ }, [C, g, t, d]);
436
+ V(() => {
437
+ if (!C || j !== "click") return;
438
+ const x = (w) => {
439
+ N.current && !N.current.contains(w.target) && E.current && !E.current.contains(w.target) && I(!1);
440
440
  };
441
- return document.addEventListener("mousedown", w), () => document.removeEventListener("mousedown", w);
442
- }, [k, S, v]), Y(() => {
443
- if (k) {
444
- I();
445
- const w = () => I(), E = () => I();
446
- return window.addEventListener("resize", w), window.addEventListener("scroll", E, !0), () => {
447
- window.removeEventListener("resize", w), window.removeEventListener("scroll", E, !0);
441
+ return document.addEventListener("mousedown", x), () => document.removeEventListener("mousedown", x);
442
+ }, [C, I, j]), V(() => {
443
+ if (C) {
444
+ W();
445
+ const x = () => W(), w = () => W();
446
+ return window.addEventListener("resize", x), window.addEventListener("scroll", w, !0), () => {
447
+ window.removeEventListener("resize", x), window.removeEventListener("scroll", w, !0);
448
448
  };
449
449
  }
450
- }, [k, g, e, d, I]);
451
- const H = (w, E, R, P, O) => {
452
- let J = 0, K = 0;
453
- switch (R) {
450
+ }, [C, g, t, d, W]);
451
+ const H = (x, w, z, L, M) => {
452
+ let P = 0, T = 0;
453
+ switch (z) {
454
454
  case "top":
455
- J = w.left, K = w.top - E.height - O;
455
+ P = x.left, T = x.top - w.height - M;
456
456
  break;
457
457
  case "bottom":
458
- J = w.left, K = w.bottom + O;
458
+ P = x.left, T = x.bottom + M;
459
459
  break;
460
460
  case "left":
461
- J = w.left - E.width - O, K = w.top;
461
+ P = x.left - w.width - M, T = x.top;
462
462
  break;
463
463
  case "right":
464
- J = w.right + O, K = w.top;
464
+ P = x.right + M, T = x.top;
465
465
  break;
466
466
  }
467
- if (R === "top" || R === "bottom")
468
- switch (P) {
467
+ if (z === "top" || z === "bottom")
468
+ switch (L) {
469
469
  case "start":
470
470
  break;
471
471
  case "center":
472
- J = w.left + (w.width - E.width) / 2;
472
+ P = x.left + (x.width - w.width) / 2;
473
473
  break;
474
474
  case "end":
475
- J = w.right - E.width;
475
+ P = x.right - w.width;
476
476
  break;
477
477
  }
478
- else if (R === "left" || R === "right")
479
- switch (P) {
478
+ else if (z === "left" || z === "right")
479
+ switch (L) {
480
480
  case "start":
481
481
  break;
482
482
  case "center":
483
- K = w.top + (w.height - E.height) / 2;
483
+ T = x.top + (x.height - w.height) / 2;
484
484
  break;
485
485
  case "end":
486
- K = w.bottom - E.height;
486
+ T = x.bottom - w.height;
487
487
  break;
488
488
  }
489
- return { x: J, y: K };
490
- }, G = () => {
491
- v === "hover" && S(!0);
492
- }, fe = () => {
493
- v === "hover" && S(!1);
494
- }, X = () => {
495
- v === "click" && S(!k);
496
- }, ne = () => {
497
- v === "focus" && S(!0);
498
- }, me = () => {
499
- v === "focus" && S(!1);
500
- }, Q = k ? /* @__PURE__ */ i.jsx(
489
+ return { x: P, y: T };
490
+ }, A = () => {
491
+ j === "hover" && I(!0);
492
+ }, J = () => {
493
+ j === "hover" && I(!1);
494
+ }, K = () => {
495
+ j === "click" && I(!C);
496
+ }, _ = () => {
497
+ j === "focus" && I(!0);
498
+ }, Y = () => {
499
+ j === "focus" && I(!1);
500
+ }, O = C ? /* @__PURE__ */ e.jsx(
501
501
  "div",
502
502
  {
503
503
  id: D,
504
- "aria-hidden": !k,
505
- className: N(
504
+ "aria-hidden": !C,
505
+ className: b(
506
506
  "fixed z-50 transition-opacity duration-200",
507
- k ? "opacity-100" : "pointer-events-none opacity-0",
508
- o
507
+ C ? "opacity-100" : "pointer-events-none opacity-0",
508
+ i
509
509
  ),
510
- ref: L,
511
- role: s,
512
- style: { left: -9999, top: -9999, ...u },
513
- children: /* @__PURE__ */ i.jsx("div", { className: "relative", children: n })
510
+ ref: E,
511
+ role: a,
512
+ style: { left: -9999, top: -9999, ...l },
513
+ children: /* @__PURE__ */ e.jsx("div", { className: "relative", children: r })
514
514
  }
515
515
  ) : null;
516
- return /* @__PURE__ */ i.jsxs(i.Fragment, { children: [
517
- /* @__PURE__ */ i.jsx(
516
+ return /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
517
+ /* @__PURE__ */ e.jsx(
518
518
  "div",
519
519
  {
520
- "aria-controls": C && k ? D : void 0,
521
- "aria-describedby": !C && k ? D : void 0,
522
- "aria-expanded": C ? k : void 0,
523
- "aria-haspopup": t,
524
- className: N("w-full", a),
525
- ref: j,
526
- onBlur: me,
527
- onClick: X,
528
- onFocus: ne,
529
- onMouseEnter: G,
530
- onMouseLeave: fe,
531
- children: r
520
+ "aria-controls": y && C ? D : void 0,
521
+ "aria-describedby": !y && C ? D : void 0,
522
+ "aria-expanded": y ? C : void 0,
523
+ "aria-haspopup": s,
524
+ className: b("w-full", o),
525
+ ref: N,
526
+ onBlur: Y,
527
+ onClick: K,
528
+ onFocus: _,
529
+ onMouseEnter: A,
530
+ onMouseLeave: J,
531
+ children: n
532
532
  }
533
533
  ),
534
- b && typeof document < "u" ? He(Q, document.body) : Q
534
+ f && typeof document < "u" ? ce(O, document.body) : O
535
535
  ] });
536
- }, _e = ({ children: e }) => /* @__PURE__ */ i.jsx(i.Fragment, { children: e }), St = ({ children: e }) => /* @__PURE__ */ i.jsx(i.Fragment, { children: e }), Ve = ({ children: e, className: t }) => /* @__PURE__ */ i.jsx(
536
+ }, ue = ({ children: t }) => /* @__PURE__ */ e.jsx(e.Fragment, { children: t }), De = ({ children: t }) => /* @__PURE__ */ e.jsx(e.Fragment, { children: t }), xe = ({ children: t, className: s }) => /* @__PURE__ */ e.jsx(
537
537
  "div",
538
538
  {
539
- className: N(
539
+ className: b(
540
540
  "sticky top-0 flex-shrink-0 border-b border-neutral-700 bg-zinc-1000/95 px-3 py-2 backdrop-blur-lg",
541
- t
541
+ s
542
542
  ),
543
- children: e
543
+ children: t
544
544
  }
545
- ), Je = We({
545
+ ), me = ae({
546
546
  open: !1,
547
547
  setOpen: () => {
548
548
  },
549
549
  disabled: !1
550
550
  });
551
- function Ke() {
552
- const e = Be(Je);
553
- if (e === void 0)
551
+ function fe() {
552
+ const t = ie(me);
553
+ if (t === void 0)
554
554
  throw new Error("useDropdownContext must be used within a DropdownProvider");
555
- return e;
555
+ return t;
556
556
  }
557
- const Ye = ({
558
- animateIcon: e = !1,
559
- children: t,
560
- className: r,
561
- disabled: a = !1,
562
- icon: n,
563
- outline: o = !1,
564
- unstyled: s = !1,
565
- ...u
557
+ const be = ({
558
+ animateIcon: t = !1,
559
+ children: s,
560
+ className: n,
561
+ disabled: o = !1,
562
+ icon: r,
563
+ outline: i = !1,
564
+ unstyled: a = !1,
565
+ ...l
566
566
  }) => {
567
- const { disabled: l, open: c } = Ke(), d = a || l;
568
- return /* @__PURE__ */ i.jsxs(
567
+ const { disabled: u, open: h } = fe(), d = o || u;
568
+ return /* @__PURE__ */ e.jsxs(
569
569
  "button",
570
570
  {
571
- "aria-expanded": c,
571
+ "aria-expanded": h,
572
572
  "aria-haspopup": "menu",
573
- className: N(
574
- !s && [
573
+ className: b(
574
+ !a && [
575
575
  "flex h-10 items-center justify-between rounded-lg px-3 py-2 text-sm enabled:cursor-pointer enabled:text-white enabled:hover:bg-white/6",
576
576
  "default-outset-focus",
577
- o ? "default-border" : "bg-transparent",
577
+ i ? "default-border" : "bg-transparent",
578
578
  "default-disabled"
579
579
  ],
580
- r
580
+ n
581
581
  ),
582
582
  disabled: d,
583
583
  type: "button",
584
- ...u,
584
+ ...l,
585
585
  children: [
586
- s ? t : /* @__PURE__ */ i.jsx("span", { className: "flex items-center gap-2", children: t }),
587
- n && /* @__PURE__ */ i.jsx(
588
- U,
586
+ a ? s : /* @__PURE__ */ e.jsx("span", { className: "flex items-center gap-2", children: s }),
587
+ r && /* @__PURE__ */ e.jsx(
588
+ B,
589
589
  {
590
- className: T(
591
- !s && "ml-2",
590
+ className: $(
591
+ !a && "ml-2",
592
592
  d && "text-neutral-500",
593
- e && ["transition-transform duration-200", c && "rotate-180"]
593
+ t && ["transition-transform duration-200", h && "rotate-180"]
594
594
  ),
595
- icon: n,
595
+ icon: r,
596
596
  size: 0.8
597
597
  }
598
598
  )
599
599
  ]
600
600
  }
601
601
  );
602
- }, Rt = ({
603
- children: e,
604
- className: t,
605
- defaultOpen: r = !1,
606
- disabled: a = !1,
607
- onOpenChange: n,
608
- open: o
602
+ }, We = ({
603
+ children: t,
604
+ className: s,
605
+ defaultOpen: n = !1,
606
+ disabled: o = !1,
607
+ onOpenChange: r,
608
+ open: i
609
609
  }) => {
610
- const [s, u] = z(r), l = o !== void 0, c = l ? o : s, d = (x) => {
611
- a || (l || u(x), n == null || n(x));
612
- }, m = { open: c, setOpen: d, disabled: a };
613
- let h = null, b = null;
610
+ const [a, l] = S(n), u = i !== void 0, h = u ? i : a, d = (c) => {
611
+ o || (u || l(c), r?.(c));
612
+ }, m = { open: h, setOpen: d, disabled: o };
613
+ let p = null, f = null;
614
614
  const g = {
615
615
  children: null,
616
616
  className: ""
617
- }, v = {
617
+ }, j = {
618
618
  children: null,
619
619
  className: ""
620
620
  };
621
- let C = {
621
+ let y = {
622
622
  side: "bottom",
623
623
  align: "start",
624
624
  className: ""
625
625
  };
626
- ee.Children.forEach(e, (x) => {
627
- if (ee.isValidElement(x)) {
628
- if (x.type === Ye)
629
- h = x;
630
- else if (x.type === Ve) {
631
- const y = x.props;
632
- g.className = y.className, g.children = y.children;
633
- } else if (x.type === St) {
634
- const y = x.props;
635
- v.className = y.className, v.children = y.children;
636
- } else if (x.type === _e) {
637
- const y = x.props;
638
- b = y.children, C = {
639
- side: y.side || "bottom",
640
- align: y.align || "start",
641
- className: y.className || ""
626
+ U.Children.forEach(t, (c) => {
627
+ if (U.isValidElement(c)) {
628
+ if (c.type === be)
629
+ p = c;
630
+ else if (c.type === xe) {
631
+ const v = c.props;
632
+ g.className = v.className, g.children = v.children;
633
+ } else if (c.type === De) {
634
+ const v = c.props;
635
+ j.className = v.className, j.children = v.children;
636
+ } else if (c.type === ue) {
637
+ const v = c.props;
638
+ f = v.children, y = {
639
+ side: v.side || "bottom",
640
+ align: v.align || "start",
641
+ className: v.className || ""
642
642
  };
643
643
  }
644
644
  }
645
645
  });
646
- const p = /* @__PURE__ */ i.jsxs(
646
+ const k = /* @__PURE__ */ e.jsxs(
647
647
  "div",
648
648
  {
649
- className: N(
649
+ className: b(
650
650
  "default-border z-50 flex max-h-96 min-w-[8rem] flex-col overflow-hidden rounded-lg bg-zinc-1000/50 p-1 backdrop-blur-xl",
651
- C.side === "bottom" && "animate-dropdown-in-bottom",
652
- C.side === "top" && "animate-dropdown-in-top",
653
- C.className
651
+ y.side === "bottom" && "animate-dropdown-in-bottom",
652
+ y.side === "top" && "animate-dropdown-in-top",
653
+ y.className
654
654
  ),
655
655
  children: [
656
- g.children ? /* @__PURE__ */ i.jsx(
656
+ g.children ? /* @__PURE__ */ e.jsx(
657
657
  "div",
658
658
  {
659
- className: N(
659
+ className: b(
660
660
  "flex-shrink-0 border-b border-neutral-700 bg-zinc-1000/95 px-3 py-2 backdrop-blur-sm",
661
661
  g.className
662
662
  ),
663
663
  children: g.children
664
664
  }
665
665
  ) : null,
666
- /* @__PURE__ */ i.jsx("ul", { className: N("min-h-0 flex-1 overflow-y-auto"), children: b }),
667
- v.children ? /* @__PURE__ */ i.jsx(
666
+ /* @__PURE__ */ e.jsx("ul", { className: b("min-h-0 flex-1 overflow-y-auto"), children: f }),
667
+ j.children ? /* @__PURE__ */ e.jsx(
668
668
  "div",
669
669
  {
670
- className: N(
670
+ className: b(
671
671
  "flex-shrink-0 border-t border-neutral-700 bg-zinc-1000/95 px-3 py-2 backdrop-blur-sm",
672
- v.className
672
+ j.className
673
673
  ),
674
- children: v.children
674
+ children: j.children
675
675
  }
676
676
  ) : null
677
677
  ]
678
678
  }
679
679
  );
680
- return /* @__PURE__ */ i.jsx(Je.Provider, { value: m, children: /* @__PURE__ */ i.jsx("div", { className: N("inline-block", t), children: /* @__PURE__ */ i.jsx(
681
- Ue,
680
+ return /* @__PURE__ */ e.jsx(me.Provider, { value: m, children: /* @__PURE__ */ e.jsx("div", { className: b("inline-block", s), children: /* @__PURE__ */ e.jsx(
681
+ ne,
682
682
  {
683
- align: C.align,
684
- content: p,
683
+ align: y.align,
684
+ content: k,
685
685
  contentRole: "menu",
686
- disabled: a,
687
- open: c,
686
+ disabled: o,
687
+ open: h,
688
688
  portal: !0,
689
- position: C.side,
689
+ position: y.side,
690
690
  trigger: "click",
691
691
  onOpenChange: d,
692
- children: h
692
+ children: p
693
693
  }
694
694
  ) }) });
695
- }, Pt = ({
696
- children: e,
697
- className: t,
698
- disabled: r = !1,
699
- icon: a,
700
- onClick: n,
701
- unstyled: o = !1
695
+ }, Be = ({
696
+ children: t,
697
+ className: s,
698
+ disabled: n = !1,
699
+ icon: o,
700
+ onClick: r,
701
+ unstyled: i = !1
702
702
  }) => {
703
- const { setOpen: s } = Ke(), u = (l) => {
704
- r || (n && n(l), s(!1));
703
+ const { setOpen: a } = fe(), l = (u) => {
704
+ n || (r && r(u), a(!1));
705
705
  };
706
- return /* @__PURE__ */ i.jsx("li", { children: /* @__PURE__ */ i.jsxs(
706
+ return /* @__PURE__ */ e.jsx("li", { children: /* @__PURE__ */ e.jsxs(
707
707
  "button",
708
708
  {
709
- className: N(
710
- !o && [
709
+ className: b(
710
+ !i && [
711
711
  "group flex w-full items-center rounded-sm px-2 py-1.5 text-left text-sm enabled:text-white",
712
712
  "enabled:cursor-pointer enabled:hover:bg-white/6",
713
713
  "default-inset-focus",
714
714
  "default-disabled"
715
715
  ],
716
- t
716
+ s
717
717
  ),
718
- disabled: r,
718
+ disabled: n,
719
719
  role: "menuitem",
720
- onClick: u,
720
+ onClick: l,
721
721
  children: [
722
- a && /* @__PURE__ */ i.jsx(
723
- U,
722
+ o && /* @__PURE__ */ e.jsx(
723
+ B,
724
724
  {
725
- className: T("mr-2", r && "text-neutral-500"),
726
- icon: a,
725
+ className: $("mr-2", n && "text-neutral-500"),
726
+ icon: o,
727
727
  size: 0.75
728
728
  }
729
729
  ),
730
- e
730
+ t
731
731
  ]
732
732
  }
733
733
  ) });
734
- }, gn = ({ className: e }) => /* @__PURE__ */ i.jsx("li", { className: "px-1 py-1", children: /* @__PURE__ */ i.jsx("hr", { className: N("border-t-neutral-700", e) }) }), bn = ({ children: e, className: t }) => /* @__PURE__ */ i.jsx(
734
+ }, it = ({ className: t }) => /* @__PURE__ */ e.jsx("li", { className: "px-1 py-1", children: /* @__PURE__ */ e.jsx("hr", { className: b("border-t-neutral-700", t) }) }), ct = ({ children: t, className: s }) => /* @__PURE__ */ e.jsx(
735
735
  "span",
736
736
  {
737
- className: N("ml-auto text-xs tracking-widest text-neutral-500", t),
737
+ className: b("ml-auto text-xs tracking-widest text-neutral-500", s),
738
738
  "data-part": "dropdown-shortcut",
739
- children: e
739
+ children: t
740
740
  }
741
- ), $t = (e) => {
742
- const r = Math.floor(((/* @__PURE__ */ new Date()).getTime() - e.getTime()) / (1e3 * 60));
743
- if (r < 1) return "just now";
744
- if (r < 60) return `${r}m ago`;
745
- const a = Math.floor(r / 60);
746
- if (a < 24) return `${a}h ago`;
747
- const n = Math.floor(a / 24);
748
- return n < 7 ? `${n}d ago` : e.toLocaleDateString();
749
- }, Ot = {
741
+ ), Me = {
750
742
  error: {
751
743
  background: "bg-rose-500/20",
752
744
  iconClass: "text-rose-400",
@@ -772,370 +764,368 @@ const Ye = ({
772
764
  iconClass: "text-neutral-400",
773
765
  icon: "mdiBellOutline"
774
766
  }
775
- }, vn = ({
776
- className: e,
777
- disabled: t = !1,
778
- emptyMessage: r = "No notifications",
779
- maxHeight: a = "max-h-96",
780
- notifications: n,
781
- onMarkAllRead: o,
782
- onNotificationClick: s,
783
- unreadCount: u = 0
767
+ }, dt = ({
768
+ className: t,
769
+ disabled: s = !1,
770
+ emptyMessage: n = "No notifications",
771
+ maxHeight: o = "max-h-96",
772
+ notifications: r,
773
+ onMarkAllRead: i,
774
+ onNotificationClick: a,
775
+ unreadCount: l = 0
784
776
  }) => {
785
- const [l, c] = z(!1), [d, m] = z(!1), h = u > 99 ? "99+" : u.toString(), b = u > 0, g = n.length > 0;
786
- Y(() => {
787
- const x = () => {
788
- const y = window.innerWidth < ft;
789
- m(y), y && l ? document.body.classList.add("overflow-hidden") : document.body.classList.remove("overflow-hidden");
777
+ const [u, h] = S(!1), [d, m] = S(!1), p = l > 99 ? "99+" : l.toString(), f = l > 0, g = r.length > 0;
778
+ V(() => {
779
+ const c = () => {
780
+ const v = window.innerWidth < pe;
781
+ m(v), v && u ? document.body.classList.add("overflow-hidden") : document.body.classList.remove("overflow-hidden");
790
782
  };
791
- return x(), window.addEventListener("resize", x), () => {
792
- document.body.classList.remove("overflow-hidden"), window.removeEventListener("resize", x);
783
+ return c(), window.addEventListener("resize", c), () => {
784
+ document.body.classList.remove("overflow-hidden"), window.removeEventListener("resize", c);
793
785
  };
794
- }, [l]);
795
- const v = (x) => {
796
- s == null || s(x), d && c(!1);
797
- }, C = () => {
798
- o == null || o(), d && c(!1);
799
- }, p = () => /* @__PURE__ */ i.jsx(i.Fragment, { children: g ? /* @__PURE__ */ i.jsx("div", { className: "divide-y divide-neutral-800/50", children: n.map((x, y) => {
800
- const j = Ot[x.type || "default"];
801
- return /* @__PURE__ */ i.jsxs(
802
- Pt,
786
+ }, [u]);
787
+ const j = (c) => {
788
+ a?.(c), d && h(!1);
789
+ }, y = () => {
790
+ i?.(), d && h(!1);
791
+ }, k = () => /* @__PURE__ */ e.jsx(e.Fragment, { children: g ? /* @__PURE__ */ e.jsx("div", { className: "divide-y divide-neutral-800/50", children: r.map((c, v) => {
792
+ const N = Me[c.type || "default"];
793
+ return /* @__PURE__ */ e.jsxs(
794
+ Be,
803
795
  {
804
- className: N(
796
+ className: b(
805
797
  "secondary-inset-focus flex w-full items-start gap-3 px-3 py-3 text-left hover:bg-white/6",
806
- !x.read && "bg-white/3",
807
- y === n.length - 1 && "pb-4"
798
+ !c.read && "bg-white/3",
799
+ v === r.length - 1 && "pb-4"
808
800
  ),
809
801
  unstyled: !0,
810
- onClick: () => v(x),
802
+ onClick: () => j(c),
811
803
  children: [
812
- /* @__PURE__ */ i.jsx(
804
+ /* @__PURE__ */ e.jsx(
813
805
  "div",
814
806
  {
815
- className: N(
807
+ className: b(
816
808
  "mt-0.5 flex h-8 w-8 flex-shrink-0 items-center justify-center rounded-lg",
817
- j.background
809
+ N.background
818
810
  ),
819
- children: x.img ? /* @__PURE__ */ i.jsx(
820
- xt,
811
+ children: c.img ? /* @__PURE__ */ e.jsx(
812
+ ye,
821
813
  {
822
814
  alt: "User avatar",
823
815
  fallback: "NA",
824
816
  size: "md",
825
- src: x.img
817
+ src: c.img
826
818
  }
827
- ) : /* @__PURE__ */ i.jsx(
828
- U,
819
+ ) : /* @__PURE__ */ e.jsx(
820
+ B,
829
821
  {
830
- className: j.iconClass,
831
- icon: x.icon ?? j.icon,
822
+ className: N.iconClass,
823
+ icon: c.icon ?? N.icon,
832
824
  size: 0.75
833
825
  }
834
826
  )
835
827
  }
836
828
  ),
837
- /* @__PURE__ */ i.jsxs("div", { className: "min-w-0 flex-1", children: [
838
- /* @__PURE__ */ i.jsx("p", { className: "mb-1 text-sm leading-5 text-white", children: x.title }),
839
- x.message && /* @__PURE__ */ i.jsx("p", { className: "mb-1 text-xs leading-4 text-neutral-400", children: x.message }),
840
- /* @__PURE__ */ i.jsx("p", { className: "text-xs text-neutral-500", children: $t(x.timestamp) })
829
+ /* @__PURE__ */ e.jsxs("div", { className: "min-w-0 flex-1", children: [
830
+ /* @__PURE__ */ e.jsx("p", { className: "mb-1 text-sm leading-5 text-white", children: c.title }),
831
+ c.message && /* @__PURE__ */ e.jsx("p", { className: "mb-1 text-xs leading-4 text-neutral-400", children: c.message }),
832
+ /* @__PURE__ */ e.jsx("p", { className: "text-xs text-neutral-500", children: ge(c.timestamp) })
841
833
  ] }),
842
- !x.read && /* @__PURE__ */ i.jsx("div", { className: "mt-1.5 h-2 w-2 flex-shrink-0 rounded-full bg-rose-500" })
834
+ !c.read && /* @__PURE__ */ e.jsx("div", { className: "mt-1.5 h-2 w-2 flex-shrink-0 rounded-full bg-rose-500" })
843
835
  ]
844
836
  },
845
- x.id
837
+ c.id
846
838
  );
847
- }) }) : /* @__PURE__ */ i.jsxs(
839
+ }) }) : /* @__PURE__ */ e.jsxs(
848
840
  "div",
849
841
  {
850
842
  "aria-label": "No notifications available",
851
843
  className: "px-3 py-8 text-center",
852
844
  role: "status",
853
845
  children: [
854
- /* @__PURE__ */ i.jsx(U, { className: "mx-auto mb-2 text-neutral-500", icon: "mdiBellOffOutline", size: 2 }),
855
- /* @__PURE__ */ i.jsx("p", { className: "text-sm text-neutral-400", children: r })
846
+ /* @__PURE__ */ e.jsx(B, { className: "mx-auto mb-2 text-neutral-500", icon: "mdiBellOffOutline", size: 2 }),
847
+ /* @__PURE__ */ e.jsx("p", { className: "text-sm text-neutral-400", children: n })
856
848
  ]
857
849
  }
858
850
  ) });
859
- return /* @__PURE__ */ i.jsx(i.Fragment, { children: d ? /* @__PURE__ */ i.jsxs("div", { children: [
860
- /* @__PURE__ */ i.jsxs("div", { className: "relative", children: [
861
- /* @__PURE__ */ i.jsx(
862
- De,
851
+ return /* @__PURE__ */ e.jsx(e.Fragment, { children: d ? /* @__PURE__ */ e.jsxs("div", { children: [
852
+ /* @__PURE__ */ e.jsxs("div", { className: "relative", children: [
853
+ /* @__PURE__ */ e.jsx(
854
+ le,
863
855
  {
864
- "aria-expanded": l,
865
- "aria-label": `Notifications${b ? ` (${u} unread)` : ""}`,
866
- disabled: t,
856
+ "aria-expanded": u,
857
+ "aria-label": `Notifications${f ? ` (${l} unread)` : ""}`,
858
+ disabled: s,
867
859
  icon: "mdiBellOutline",
868
860
  variant: "ghost",
869
- onClick: () => c(!l)
861
+ onClick: () => h(!u)
870
862
  }
871
863
  ),
872
- b ? /* @__PURE__ */ i.jsx(i.Fragment, { children: /* @__PURE__ */ i.jsx("div", { className: "absolute -top-2 -right-2", children: /* @__PURE__ */ i.jsx(se, { className: "min-w-[1.25rem] justify-center px-1", color: "violet", size: "sm", children: h }) }) }) : null
864
+ f ? /* @__PURE__ */ e.jsx(e.Fragment, { children: /* @__PURE__ */ e.jsx("div", { className: "absolute -top-2 -right-2", children: /* @__PURE__ */ e.jsx(q, { className: "min-w-[1.25rem] justify-center px-1", color: "violet", size: "sm", children: p }) }) }) : null
873
865
  ] }),
874
- He(
875
- /* @__PURE__ */ i.jsxs(
866
+ ce(
867
+ /* @__PURE__ */ e.jsxs(
876
868
  "div",
877
869
  {
878
870
  "aria-labelledby": "notifications-title-mobile",
879
871
  "aria-modal": "true",
880
- className: N(
872
+ className: b(
881
873
  "fixed inset-y-0 z-50 flex w-full flex-col bg-zinc-1000/50 backdrop-blur-xl transition-transform duration-300",
882
- l ? "translate-x-0" : "translate-x-full"
874
+ u ? "translate-x-0" : "translate-x-full"
883
875
  ),
884
876
  role: "dialog",
885
877
  children: [
886
- /* @__PURE__ */ i.jsxs("div", { className: "flex h-15 items-center justify-between border-b border-neutral-800 px-4", children: [
887
- d ? /* @__PURE__ */ i.jsx(
888
- De,
878
+ /* @__PURE__ */ e.jsxs("div", { className: "flex h-15 items-center justify-between border-b border-neutral-800 px-4", children: [
879
+ d ? /* @__PURE__ */ e.jsx(
880
+ le,
889
881
  {
890
882
  "aria-label": "Close sidebar",
891
883
  icon: "mdiClose",
892
884
  variant: "ghost",
893
- onClick: () => c(!1)
885
+ onClick: () => h(!1)
894
886
  }
895
887
  ) : null,
896
- /* @__PURE__ */ i.jsx("h3", { id: "notifications-title-mobile", className: "text-sm font-semibold text-white", children: "Notifications" }),
897
- /* @__PURE__ */ i.jsx("div", { className: "flex items-center gap-2", children: b && o && /* @__PURE__ */ i.jsx(
888
+ /* @__PURE__ */ e.jsx("h3", { id: "notifications-title-mobile", className: "text-sm font-semibold text-white", children: "Notifications" }),
889
+ /* @__PURE__ */ e.jsx("div", { className: "flex items-center gap-2", children: f && i && /* @__PURE__ */ e.jsx(
898
890
  "button",
899
891
  {
900
892
  className: "cursor-pointer text-xs text-neutral-400 transition-colors hover:text-white",
901
- onClick: C,
893
+ onClick: y,
902
894
  children: "Mark all read"
903
895
  }
904
896
  ) })
905
897
  ] }),
906
- /* @__PURE__ */ i.jsx("ul", { className: "flex-1 overflow-y-auto", children: /* @__PURE__ */ i.jsx(p, {}) })
898
+ /* @__PURE__ */ e.jsx("ul", { className: "flex-1 overflow-y-auto", children: /* @__PURE__ */ e.jsx(k, {}) })
907
899
  ]
908
900
  }
909
901
  ),
910
902
  document.body
911
903
  )
912
- ] }) : /* @__PURE__ */ i.jsxs(Rt, { className: e, disabled: t, children: [
913
- /* @__PURE__ */ i.jsx(
914
- Ye,
904
+ ] }) : /* @__PURE__ */ e.jsxs(We, { className: t, disabled: s, children: [
905
+ /* @__PURE__ */ e.jsx(
906
+ be,
915
907
  {
916
- "aria-label": `Notifications${b ? ` (${u} unread)` : ""}`,
917
- className: T(
908
+ "aria-label": `Notifications${f ? ` (${l} unread)` : ""}`,
909
+ className: $(
918
910
  "relative flex h-10 w-10 items-center justify-center px-2 text-sm",
919
911
  "secondary-outset-focus group rounded-lg border border-transparent bg-transparent text-white enabled:cursor-pointer enabled:hover:bg-white/6"
920
912
  ),
921
- disabled: t,
913
+ disabled: s,
922
914
  icon: "mdiBellOutline",
923
915
  unstyled: !0,
924
- children: b ? /* @__PURE__ */ i.jsx(i.Fragment, { children: /* @__PURE__ */ i.jsx("div", { className: "absolute -top-2 -right-2", children: /* @__PURE__ */ i.jsx(se, { className: "min-w-[1.25rem] justify-center px-1", color: "violet", size: "sm", children: h }) }) }) : null
916
+ children: f ? /* @__PURE__ */ e.jsx(e.Fragment, { children: /* @__PURE__ */ e.jsx("div", { className: "absolute -top-2 -right-2", children: /* @__PURE__ */ e.jsx(q, { className: "min-w-[1.25rem] justify-center px-1", color: "violet", size: "sm", children: p }) }) }) : null
925
917
  }
926
918
  ),
927
- /* @__PURE__ */ i.jsx(Ve, { children: /* @__PURE__ */ i.jsxs("div", { className: "flex items-center justify-between", children: [
928
- /* @__PURE__ */ i.jsx("h3", { id: "notifications-title", className: "text-sm font-semibold text-white", children: "Notifications" }),
929
- b && o && /* @__PURE__ */ i.jsx(
919
+ /* @__PURE__ */ e.jsx(xe, { children: /* @__PURE__ */ e.jsxs("div", { className: "flex items-center justify-between", children: [
920
+ /* @__PURE__ */ e.jsx("h3", { id: "notifications-title", className: "text-sm font-semibold text-white", children: "Notifications" }),
921
+ f && i && /* @__PURE__ */ e.jsx(
930
922
  "button",
931
923
  {
932
924
  className: "secondary-outset-focus cursor-pointer rounded-lg p-1 text-xs text-neutral-400 transition-colors hover:text-white",
933
- onClick: o,
925
+ onClick: i,
934
926
  children: "Mark all read"
935
927
  }
936
928
  )
937
929
  ] }) }),
938
- /* @__PURE__ */ i.jsx(
939
- _e,
930
+ /* @__PURE__ */ e.jsx(
931
+ ue,
940
932
  {
941
933
  align: "end",
942
934
  "aria-labelledby": "notifications-title",
943
- className: N("flex w-85 flex-col overflow-hidden p-0", a),
935
+ className: b("flex w-85 flex-col overflow-hidden p-0", o),
944
936
  side: "bottom",
945
- children: /* @__PURE__ */ i.jsx(p, {})
937
+ children: /* @__PURE__ */ e.jsx(k, {})
946
938
  }
947
939
  )
948
940
  ] }) });
949
- }, qe = We(void 0), It = () => {
950
- const e = Be(qe);
951
- if (!e)
941
+ }, he = ae(void 0), Pe = () => {
942
+ const t = ie(he);
943
+ if (!t)
952
944
  throw new Error("Select components must be used within an OxSelect");
953
- return e;
954
- }, Ft = ({
955
- children: e,
956
- className: t,
957
- disabled: r = !1,
958
- id: a,
959
- value: n
945
+ return t;
946
+ }, Te = ({
947
+ children: t,
948
+ className: s,
949
+ disabled: n = !1,
950
+ id: o,
951
+ value: r
960
952
  }) => {
961
- const { closeDropdown: o, onSelect: s, selectedValue: u } = It(), l = () => {
962
- s({ value: n, label: e });
963
- }, c = (m) => {
964
- (m.key === "Enter" || m.key === " ") && (m.preventDefault(), s({ value: n, label: e })), m.key === "Escape" && o();
965
- }, d = u.includes(n);
966
- return /* @__PURE__ */ i.jsx("li", { role: "none", children: /* @__PURE__ */ i.jsxs(
953
+ const { closeDropdown: i, onSelect: a, selectedValue: l } = Pe(), u = () => {
954
+ a({ value: r, label: t });
955
+ }, h = (m) => {
956
+ (m.key === "Enter" || m.key === " ") && (m.preventDefault(), a({ value: r, label: t })), m.key === "Escape" && i();
957
+ }, d = l.includes(r);
958
+ return /* @__PURE__ */ e.jsx("li", { role: "none", children: /* @__PURE__ */ e.jsxs(
967
959
  "button",
968
960
  {
969
- id: a,
961
+ id: o,
970
962
  "aria-selected": d,
971
- className: N(
963
+ className: b(
972
964
  "group flex w-full items-center justify-between rounded-sm px-2 py-1.5 text-left text-sm enabled:text-white",
973
965
  "enabled:cursor-pointer enabled:hover:bg-white/6",
974
966
  "default-inset-focus",
975
967
  "default-disabled",
976
968
  d && "bg-white/5",
977
- t
969
+ s
978
970
  ),
979
- disabled: r,
971
+ disabled: n,
980
972
  role: "option",
981
- tabIndex: r ? -1 : 0,
982
- onClick: l,
983
- onKeyDown: c,
973
+ tabIndex: n ? -1 : 0,
974
+ onClick: u,
975
+ onKeyDown: h,
984
976
  children: [
985
- e,
986
- d && !r && /* @__PURE__ */ i.jsx(U, { className: "text-violet-700", icon: "mdiCheck", size: 0.8 })
977
+ t,
978
+ d && !n && /* @__PURE__ */ e.jsx(B, { className: "text-violet-700", icon: "mdiCheck", size: 0.8 })
987
979
  ]
988
980
  }
989
981
  ) });
990
982
  };
991
- let xe = null, ge = null;
992
- const Dt = () => (xe || (xe = document.createElement("canvas"), ge = xe.getContext("2d"), ge.font = "0.875rem system-ui, sans-serif"), ge), zt = (e, t, r) => {
993
- if (e.length === 0) return [];
994
- if (!t.current) return e.slice(0, 1);
995
- const a = t.current.offsetWidth || 0, n = 12, o = 32, s = 32;
996
- let u = a - n - o;
997
- e.length > 1 && (u -= s);
998
- const l = Dt();
999
- if (!l) return e.slice(0, 2);
1000
- const c = r ? 4 : 8, d = r ? 12 : 0;
1001
- let m = 0, h = 0;
1002
- for (let b = 0; b < e.length; b++) {
1003
- const g = e[b], v = String(g.label), p = l.measureText(v).width + (r ? d : 0), x = b > 0 ? m + p + c : m + p;
1004
- if (x <= u)
1005
- m = x, h++;
983
+ let Z = null, R = null;
984
+ const He = () => (Z || (Z = document.createElement("canvas"), R = Z.getContext("2d"), R.font = "0.875rem system-ui, sans-serif"), R), Ve = (t, s, n) => {
985
+ if (t.length === 0) return [];
986
+ if (!s.current) return t.slice(0, 1);
987
+ const o = s.current.offsetWidth || 0, r = 12, i = 32, a = 32;
988
+ let l = o - r - i;
989
+ t.length > 1 && (l -= a);
990
+ const u = He();
991
+ if (!u) return t.slice(0, 2);
992
+ const h = n ? 4 : 8, d = n ? 12 : 0;
993
+ let m = 0, p = 0;
994
+ for (let f = 0; f < t.length; f++) {
995
+ const g = t[f], j = String(g.label), k = u.measureText(j).width + (n ? d : 0), c = f > 0 ? m + k + h : m + k;
996
+ if (c <= l)
997
+ m = c, p++;
1006
998
  else
1007
999
  break;
1008
1000
  }
1009
- return h = Math.max(1, h), e.slice(0, h);
1010
- }, Tt = (e) => e == null ? [] : Array.isArray(e) ? e : [e], yn = ({
1011
- badgeColor: e = "purple",
1012
- children: t,
1013
- className: r,
1014
- defaultValue: a = null,
1015
- description: n,
1016
- disabled: o = !1,
1017
- displayAsBadges: s = !1,
1018
- error: u = !1,
1019
- errorMessage: l,
1020
- id: c,
1001
+ return p = Math.max(1, p), t.slice(0, p);
1002
+ }, Ae = (t) => t == null ? [] : Array.isArray(t) ? t : [t], ut = ({
1003
+ badgeColor: t = "purple",
1004
+ children: s,
1005
+ className: n,
1006
+ defaultValue: o = null,
1007
+ description: r,
1008
+ disabled: i = !1,
1009
+ displayAsBadges: a = !1,
1010
+ error: l = !1,
1011
+ errorMessage: u,
1012
+ id: h,
1021
1013
  label: d,
1022
1014
  multiple: m = !1,
1023
- name: h,
1024
- onChange: b,
1015
+ name: p,
1016
+ onChange: f,
1025
1017
  placeholder: g = "Select an option",
1026
- required: v = !1
1018
+ required: j = !1
1027
1019
  }) => {
1028
- var Q;
1029
- const C = ue(), p = ye(null), [x, y] = z(!1), [j, L] = z([]), F = c || C, k = `${F}-select`, D = `${F}-description`, S = `${F}-error`, I = u && l, H = (w, E) => {
1030
- let R = null;
1031
- return ee.Children.forEach(w, (P) => {
1032
- if (ee.isValidElement(P) && P.type === Ft) {
1033
- const O = P.props;
1034
- O.value === E && (R = { value: O.value, label: O.children });
1020
+ const y = G(), k = ee(null), [c, v] = S(!1), [N, E] = S([]), F = h || y, C = `${F}-select`, D = `${F}-description`, I = `${F}-error`, W = l && u, H = (O, x) => {
1021
+ let w = null;
1022
+ return U.Children.forEach(O, (z) => {
1023
+ if (U.isValidElement(z) && z.type === Te) {
1024
+ const L = z.props;
1025
+ L.value === x && (w = { value: L.value, label: L.children });
1035
1026
  }
1036
- }), R;
1037
- }, G = (w) => {
1038
- var R;
1039
- let E;
1040
- if (m ? j.some((O) => O.value === w.value) ? E = j.filter((O) => O.value !== w.value) : E = [...j, w] : (E = [w], y(!1)), L(E), b) {
1041
- const P = m ? E.map((O) => O.value) : ((R = E[0]) == null ? void 0 : R.value) ?? null;
1042
- b(P);
1027
+ }), w;
1028
+ }, A = (O) => {
1029
+ let x;
1030
+ if (m ? N.some((z) => z.value === O.value) ? x = N.filter((z) => z.value !== O.value) : x = [...N, O] : (x = [O], v(!1)), E(x), f) {
1031
+ const w = m ? x.map((z) => z.value) : x[0]?.value ?? null;
1032
+ f(w);
1043
1033
  }
1044
1034
  };
1045
- Y(() => {
1046
- if (a !== void 0) {
1047
- const w = Tt(a), E = [];
1048
- w.forEach((R) => {
1049
- const P = H(t, R);
1050
- P && E.push(P);
1051
- }), L(m ? E : E.slice(0, 1));
1035
+ V(() => {
1036
+ if (o !== void 0) {
1037
+ const O = Ae(o), x = [];
1038
+ O.forEach((w) => {
1039
+ const z = H(s, w);
1040
+ z && x.push(z);
1041
+ }), E(m ? x : x.slice(0, 1));
1052
1042
  }
1053
- }, [a, t, m]);
1054
- const fe = /* @__PURE__ */ i.jsx(
1043
+ }, [o, s, m]);
1044
+ const J = /* @__PURE__ */ e.jsx(
1055
1045
  "ul",
1056
1046
  {
1057
- id: `${k}-listbox`,
1047
+ id: `${C}-listbox`,
1058
1048
  "aria-multiselectable": m,
1059
1049
  className: "max-h-72 space-y-0.5 overflow-hidden overflow-y-auto",
1060
1050
  role: "listbox",
1061
- children: t
1051
+ children: s
1062
1052
  }
1063
- ), X = zt(j, p, s), ne = j.length - X.length, me = ne > 0;
1064
- return /* @__PURE__ */ i.jsx(
1065
- qe.Provider,
1053
+ ), K = Ve(N, k, a), _ = N.length - K.length, Y = _ > 0;
1054
+ return /* @__PURE__ */ e.jsx(
1055
+ he.Provider,
1066
1056
  {
1067
1057
  value: {
1068
- selectedValue: j.map((w) => w.value),
1058
+ selectedValue: N.map((O) => O.value),
1069
1059
  multiple: m,
1070
- onSelect: G,
1071
- closeDropdown: () => y(!1)
1060
+ onSelect: A,
1061
+ closeDropdown: () => v(!1)
1072
1062
  },
1073
- children: /* @__PURE__ */ i.jsxs("div", { className: N("flex w-full flex-col gap-1", r), children: [
1074
- d && /* @__PURE__ */ i.jsx(Ce, { htmlFor: k, required: v, children: d }),
1075
- /* @__PURE__ */ i.jsx(
1076
- Ue,
1063
+ children: /* @__PURE__ */ e.jsxs("div", { className: b("flex w-full flex-col gap-1", n), children: [
1064
+ d && /* @__PURE__ */ e.jsx(te, { htmlFor: C, required: j, children: d }),
1065
+ /* @__PURE__ */ e.jsx(
1066
+ ne,
1077
1067
  {
1078
1068
  align: "start",
1079
- content: fe,
1069
+ content: J,
1080
1070
  contentClassName: "default-border bg-zinc-1000/70 rounded-lg p-1 backdrop-blur-xl animate-dropdown-in-bottom",
1081
- contentStyle: { minWidth: `${((Q = p.current) == null ? void 0 : Q.offsetWidth) || 200}px` },
1082
- disabled: o,
1083
- open: x,
1071
+ contentStyle: { minWidth: `${k.current?.offsetWidth || 200}px` },
1072
+ disabled: i,
1073
+ open: c,
1084
1074
  position: "bottom",
1085
1075
  trigger: "click",
1086
- onOpenChange: y,
1087
- children: /* @__PURE__ */ i.jsxs(
1076
+ onOpenChange: v,
1077
+ children: /* @__PURE__ */ e.jsxs(
1088
1078
  "button",
1089
1079
  {
1090
- id: k,
1091
- "aria-controls": `${k}-listbox`,
1092
- "aria-describedby": [n ? D : "", I ? S : ""].filter(Boolean).join(" ") || void 0,
1093
- "aria-disabled": o,
1094
- "aria-expanded": x,
1080
+ id: C,
1081
+ "aria-controls": `${C}-listbox`,
1082
+ "aria-describedby": [r ? D : "", W ? I : ""].filter(Boolean).join(" ") || void 0,
1083
+ "aria-disabled": i,
1084
+ "aria-expanded": c,
1095
1085
  "aria-haspopup": "listbox",
1096
- "aria-invalid": u,
1097
- "aria-required": v,
1098
- className: T(
1086
+ "aria-invalid": l,
1087
+ "aria-required": j,
1088
+ className: $(
1099
1089
  "relative flex h-10 w-full gap-x-2 rounded-lg py-2 ps-3 pe-8 text-start text-sm enabled:cursor-pointer enabled:text-white",
1100
1090
  "default-outset-focus default-disabled",
1101
- u ? "default-error-border" : "default-border",
1102
- x && "default-active-border"
1091
+ l ? "default-error-border" : "default-border",
1092
+ c && "default-active-border"
1103
1093
  ),
1104
- disabled: o,
1105
- ref: p,
1094
+ disabled: i,
1095
+ ref: k,
1106
1096
  role: "combobox",
1107
1097
  type: "button",
1108
1098
  children: [
1109
- /* @__PURE__ */ i.jsx(
1099
+ /* @__PURE__ */ e.jsx(
1110
1100
  "span",
1111
1101
  {
1112
- className: T(
1102
+ className: $(
1113
1103
  "w-full overflow-hidden text-ellipsis",
1114
- s ? m && "flex flex-wrap gap-1" : "whitespace-nowrap",
1115
- o && s && "opacity-50"
1104
+ a ? m && "flex flex-wrap gap-1" : "whitespace-nowrap",
1105
+ i && a && "opacity-50"
1116
1106
  ),
1117
- children: j.length > 0 ? /* @__PURE__ */ i.jsxs(i.Fragment, { children: [
1118
- s && m ? X.map((w) => /* @__PURE__ */ i.jsx(se, { color: e, size: "sm", children: w.label }, String(w.value))) : X.map((w, E, R) => /* @__PURE__ */ i.jsxs(ee.Fragment, { children: [
1119
- w.label,
1120
- E < R.length - 1 && ", "
1121
- ] }, String(w.value))),
1122
- me && /* @__PURE__ */ i.jsxs(i.Fragment, { children: [
1123
- !(s && m) && " ",
1124
- /* @__PURE__ */ i.jsxs(se, { color: e, size: "sm", children: [
1107
+ children: N.length > 0 ? /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
1108
+ a && m ? K.map((O) => /* @__PURE__ */ e.jsx(q, { color: t, size: "sm", children: O.label }, String(O.value))) : K.map((O, x, w) => /* @__PURE__ */ e.jsxs(U.Fragment, { children: [
1109
+ O.label,
1110
+ x < w.length - 1 && ", "
1111
+ ] }, String(O.value))),
1112
+ Y && /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
1113
+ !(a && m) && " ",
1114
+ /* @__PURE__ */ e.jsxs(q, { color: t, size: "sm", children: [
1125
1115
  "+",
1126
- ne
1116
+ _
1127
1117
  ] })
1128
1118
  ] })
1129
1119
  ] }) : g
1130
1120
  }
1131
1121
  ),
1132
- /* @__PURE__ */ i.jsx("div", { className: "absolute end-3 top-1/2 -translate-y-1/2", children: /* @__PURE__ */ i.jsx(
1133
- U,
1122
+ /* @__PURE__ */ e.jsx("div", { className: "absolute end-3 top-1/2 -translate-y-1/2", children: /* @__PURE__ */ e.jsx(
1123
+ B,
1134
1124
  {
1135
- className: T(
1125
+ className: $(
1136
1126
  "transition-transform duration-300 ease-in-out",
1137
- o && "text-neutral-500",
1138
- x && "rotate-180"
1127
+ i && "text-neutral-500",
1128
+ c && "rotate-180"
1139
1129
  ),
1140
1130
  icon: "mdiChevronDown",
1141
1131
  size: 0.8
@@ -1146,82 +1136,82 @@ const Dt = () => (xe || (xe = document.createElement("canvas"), ge = xe.getConte
1146
1136
  )
1147
1137
  }
1148
1138
  ),
1149
- h && /* @__PURE__ */ i.jsx(
1139
+ p && /* @__PURE__ */ e.jsx(
1150
1140
  "input",
1151
1141
  {
1152
- name: h,
1142
+ name: p,
1153
1143
  type: "hidden",
1154
- value: j.map((w) => w.value).join(",")
1144
+ value: N.map((O) => O.value).join(",")
1155
1145
  }
1156
1146
  ),
1157
- n && /* @__PURE__ */ i.jsx(je, { id: D, disabled: o, children: n }),
1158
- I && /* @__PURE__ */ i.jsx(Ne, { id: S, children: l })
1147
+ r && /* @__PURE__ */ e.jsx(se, { id: D, disabled: i, children: r }),
1148
+ W && /* @__PURE__ */ e.jsx(re, { id: I, children: u })
1159
1149
  ] })
1160
1150
  }
1161
1151
  );
1162
- }, wn = ({ children: e, className: t }) => /* @__PURE__ */ i.jsx("div", { className: N("px-2 py-1 text-xs font-medium text-neutral-400", t), children: e }), Mt = {
1152
+ }, xt = ({ children: t, className: s }) => /* @__PURE__ */ e.jsx("div", { className: b("px-2 py-1 text-xs font-medium text-neutral-400", s), children: t }), Ke = {
1163
1153
  default: "bg-zinc-800/80",
1164
1154
  purple: "bg-purple-950/50",
1165
1155
  blue: "bg-blue-950/50",
1166
1156
  gray: "bg-gray-800/50"
1167
- }, Wt = {
1157
+ }, Ue = {
1168
1158
  rectangle: "rounded-md",
1169
1159
  circle: "rounded-full"
1170
- }, Bt = ({
1171
- animate: e = !0,
1172
- className: t,
1173
- color: r = "default",
1174
- fullWidth: a = !1,
1175
- height: n,
1176
- shape: o = "rectangle",
1177
- width: s,
1178
- ...u
1160
+ }, _e = ({
1161
+ animate: t = !0,
1162
+ className: s,
1163
+ color: n = "default",
1164
+ fullWidth: o = !1,
1165
+ height: r,
1166
+ shape: i = "rectangle",
1167
+ width: a,
1168
+ ...l
1179
1169
  }) => {
1180
- const l = {
1181
- height: typeof n == "number" ? `${n}px` : n,
1182
- width: typeof s == "number" ? `${s}px` : s
1170
+ const u = {
1171
+ height: typeof r == "number" ? `${r}px` : r,
1172
+ width: typeof a == "number" ? `${a}px` : a
1183
1173
  };
1184
- return /* @__PURE__ */ i.jsx(
1174
+ return /* @__PURE__ */ e.jsx(
1185
1175
  "div",
1186
1176
  {
1187
1177
  "aria-busy": "true",
1188
1178
  "aria-label": "Loading...",
1189
- className: N(
1179
+ className: b(
1190
1180
  "relative overflow-hidden",
1191
- Mt[r],
1192
- Wt[o],
1193
- e && "animate-pulse",
1194
- a && "w-full",
1195
- t
1181
+ Ke[n],
1182
+ Ue[i],
1183
+ t && "animate-pulse",
1184
+ o && "w-full",
1185
+ s
1196
1186
  ),
1197
1187
  role: "status",
1198
- style: l,
1199
- ...u
1188
+ style: u,
1189
+ ...l
1200
1190
  }
1201
1191
  );
1202
- }, Cn = ({
1203
- animate: e = !0,
1204
- className: t,
1205
- color: r = "default",
1206
- fullWidth: a = !1,
1207
- gap: n = 8,
1208
- height: o = 20,
1209
- lines: s = 1,
1210
- width: u,
1211
- ...l
1192
+ }, mt = ({
1193
+ animate: t = !0,
1194
+ className: s,
1195
+ color: n = "default",
1196
+ fullWidth: o = !1,
1197
+ gap: r = 8,
1198
+ height: i = 20,
1199
+ lines: a = 1,
1200
+ width: l,
1201
+ ...u
1212
1202
  }) => {
1213
- const c = (h) => h <= 1 ? `${h * 100}%` : `${h}px`, d = (h) => {
1214
- if (!a) {
1215
- if (Array.isArray(u)) {
1216
- const b = u[h % u.length];
1217
- return b == null ? void 0 : typeof b == "number" ? c(b) : b;
1203
+ const h = (p) => p <= 1 ? `${p * 100}%` : `${p}px`, d = (p) => {
1204
+ if (!o) {
1205
+ if (Array.isArray(l)) {
1206
+ const f = l[p % l.length];
1207
+ return f == null ? void 0 : typeof f == "number" ? h(f) : f;
1218
1208
  }
1219
- if (typeof u == "number") {
1220
- if (s > 1 && h === s - 1) {
1221
- const b = u <= 1 ? u * 0.6 : Math.max(100, u * 0.6);
1222
- return c(b);
1209
+ if (typeof l == "number") {
1210
+ if (a > 1 && p === a - 1) {
1211
+ const f = l <= 1 ? l * 0.6 : Math.max(100, l * 0.6);
1212
+ return h(f);
1223
1213
  }
1224
- return c(u);
1214
+ return h(l);
1225
1215
  }
1226
1216
  return "200px";
1227
1217
  }
@@ -1231,1422 +1221,176 @@ const Dt = () => (xe || (xe = document.createElement("canvas"), ge = xe.getConte
1231
1221
  12: "space-y-3",
1232
1222
  16: "space-y-4",
1233
1223
  20: "space-y-5"
1234
- }[n] || "space-y-2";
1235
- return /* @__PURE__ */ i.jsx("div", { className: N("flex flex-col", m, t), ...l, children: Array.from({ length: s }).map((h, b) => /* @__PURE__ */ i.jsx(
1236
- Bt,
1224
+ }[r] || "space-y-2";
1225
+ return /* @__PURE__ */ e.jsx("div", { className: b("flex flex-col", m, s), ...u, children: Array.from({ length: a }).map((p, f) => /* @__PURE__ */ e.jsx(
1226
+ _e,
1237
1227
  {
1238
- animate: e,
1239
- color: r,
1240
- fullWidth: a,
1241
- height: o,
1242
- width: d(b)
1228
+ animate: t,
1229
+ color: n,
1230
+ fullWidth: o,
1231
+ height: i,
1232
+ width: d(f)
1243
1233
  },
1244
- b
1234
+ f
1245
1235
  )) });
1246
- }, jn = ({
1247
- className: e,
1248
- description: t,
1249
- disabled: r = !1,
1250
- error: a = !1,
1251
- errorMessage: n,
1252
- id: o,
1253
- label: s,
1254
- name: u,
1255
- onChange: l,
1256
- placeholder: c = "Enter text...",
1236
+ }, ft = ({
1237
+ className: t,
1238
+ description: s,
1239
+ disabled: n = !1,
1240
+ error: o = !1,
1241
+ errorMessage: r,
1242
+ id: i,
1243
+ label: a,
1244
+ name: l,
1245
+ onChange: u,
1246
+ placeholder: h = "Enter text...",
1257
1247
  readOnly: d = !1,
1258
1248
  required: m = !1,
1259
- rows: h = 3,
1260
- showMaxLength: b = !1,
1249
+ rows: p = 3,
1250
+ showMaxLength: f = !1,
1261
1251
  value: g,
1262
- ...v
1252
+ ...j
1263
1253
  }) => {
1264
- const C = ue(), [p, x] = z(
1254
+ const y = G(), [k, c] = S(
1265
1255
  typeof g == "string" ? g.length : 0
1266
- ), y = o || C, j = `${y}-textarea`, L = `${y}-description`, F = `${y}-error`, k = v.maxLength, D = a && n;
1267
- Y(() => {
1268
- typeof g == "string" && x(g.length);
1256
+ ), v = i || y, N = `${v}-textarea`, E = `${v}-description`, F = `${v}-error`, C = j.maxLength, D = o && r;
1257
+ V(() => {
1258
+ typeof g == "string" && c(g.length);
1269
1259
  }, [g]);
1270
- const S = (H) => {
1271
- const G = H.target.value.length;
1272
- x(G), l == null || l(H);
1273
- }, I = /* @__PURE__ */ i.jsx(
1260
+ const I = (H) => {
1261
+ const A = H.target.value.length;
1262
+ c(A), u?.(H);
1263
+ }, W = /* @__PURE__ */ e.jsx(
1274
1264
  "textarea",
1275
1265
  {
1276
- id: j,
1277
- "aria-describedby": [t ? L : "", D ? F : ""].filter(Boolean).join(" ") || void 0,
1278
- "aria-invalid": a,
1266
+ id: N,
1267
+ "aria-describedby": [s ? E : "", D ? F : ""].filter(Boolean).join(" ") || void 0,
1268
+ "aria-invalid": o,
1279
1269
  "aria-required": m,
1280
- className: N(
1270
+ className: b(
1281
1271
  "flex min-h-10 w-full resize-y rounded-lg bg-transparent px-2 py-2 text-sm text-white",
1282
1272
  "placeholder:text-neutral-500",
1283
1273
  "default-outset-focus",
1284
1274
  "default-disabled",
1285
- a ? "default-error-border" : "default-border",
1286
- e
1275
+ o ? "default-error-border" : "default-border",
1276
+ t
1287
1277
  ),
1288
- disabled: r,
1289
- name: u,
1290
- placeholder: c,
1278
+ disabled: n,
1279
+ name: l,
1280
+ placeholder: h,
1291
1281
  readOnly: d,
1292
- rows: h,
1282
+ rows: p,
1293
1283
  value: g,
1294
- onChange: S,
1295
- ...v
1284
+ onChange: I,
1285
+ ...j
1296
1286
  }
1297
1287
  );
1298
- return /* @__PURE__ */ i.jsxs("div", { className: "flex w-full flex-col gap-1", children: [
1299
- s ? /* @__PURE__ */ i.jsx(Ce, { htmlFor: j, required: m, children: s }) : null,
1300
- I,
1301
- b && typeof k == "number" ? /* @__PURE__ */ i.jsxs("div", { className: "pointer-events-none mt-1 text-right text-xs text-neutral-400", children: [
1302
- p,
1288
+ return /* @__PURE__ */ e.jsxs("div", { className: "flex w-full flex-col gap-1", children: [
1289
+ a ? /* @__PURE__ */ e.jsx(te, { htmlFor: N, required: m, children: a }) : null,
1290
+ W,
1291
+ f && typeof C == "number" ? /* @__PURE__ */ e.jsxs("div", { className: "pointer-events-none mt-1 text-right text-xs text-neutral-400", children: [
1292
+ k,
1303
1293
  "/",
1304
- k
1294
+ C
1305
1295
  ] }) : null,
1306
- t ? /* @__PURE__ */ i.jsx(je, { id: L, disabled: r, children: t }) : null,
1307
- D ? /* @__PURE__ */ i.jsx(Ne, { id: F, children: n }) : null
1296
+ s ? /* @__PURE__ */ e.jsx(se, { id: E, disabled: n, children: s }) : null,
1297
+ D ? /* @__PURE__ */ e.jsx(re, { id: F, children: r }) : null
1308
1298
  ] });
1309
- };
1310
- /**
1311
- * react-router v7.7.0
1312
- *
1313
- * Copyright (c) Remix Software Inc.
1314
- *
1315
- * This source code is licensed under the MIT license found in the
1316
- * LICENSE.md file in the root directory of this source tree.
1317
- *
1318
- * @license MIT
1319
- */
1320
- function $(e, t) {
1321
- if (e === !1 || e === null || typeof e > "u")
1322
- throw new Error(t);
1323
- }
1324
- function M(e, t) {
1325
- if (!e) {
1326
- typeof console < "u" && console.warn(t);
1327
- try {
1328
- throw new Error(t);
1329
- } catch {
1330
- }
1331
- }
1332
- }
1333
- function we({
1334
- pathname: e = "/",
1335
- search: t = "",
1336
- hash: r = ""
1337
- }) {
1338
- return t && t !== "?" && (e += t.charAt(0) === "?" ? t : "?" + t), r && r !== "#" && (e += r.charAt(0) === "#" ? r : "#" + r), e;
1339
- }
1340
- function Ee(e) {
1341
- let t = {};
1342
- if (e) {
1343
- let r = e.indexOf("#");
1344
- r >= 0 && (t.hash = e.substring(r), e = e.substring(0, r));
1345
- let a = e.indexOf("?");
1346
- a >= 0 && (t.search = e.substring(a), e = e.substring(0, a)), e && (t.pathname = e);
1347
- }
1348
- return t;
1349
- }
1350
- function Ge(e, t, r = "/") {
1351
- return Ht(e, t, r, !1);
1352
- }
1353
- function Ht(e, t, r, a) {
1354
- let n = typeof t == "string" ? Ee(t) : t, o = _(n.pathname || "/", r);
1355
- if (o == null)
1356
- return null;
1357
- let s = Xe(e);
1358
- At(s);
1359
- let u = null;
1360
- for (let l = 0; u == null && l < s.length; ++l) {
1361
- let c = Zt(o);
1362
- u = Xt(
1363
- s[l],
1364
- c,
1365
- a
1366
- );
1367
- }
1368
- return u;
1369
- }
1370
- function Xe(e, t = [], r = [], a = "") {
1371
- let n = (o, s, u) => {
1372
- let l = {
1373
- relativePath: u === void 0 ? o.path || "" : u,
1374
- caseSensitive: o.caseSensitive === !0,
1375
- childrenIndex: s,
1376
- route: o
1377
- };
1378
- l.relativePath.startsWith("/") && ($(
1379
- l.relativePath.startsWith(a),
1380
- `Absolute route path "${l.relativePath}" nested under path "${a}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`
1381
- ), l.relativePath = l.relativePath.slice(a.length));
1382
- let c = A([a, l.relativePath]), d = r.concat(l);
1383
- o.children && o.children.length > 0 && ($(
1384
- // Our types know better, but runtime JS may not!
1385
- // @ts-expect-error
1386
- o.index !== !0,
1387
- `Index routes must not have child routes. Please remove all child routes from route path "${c}".`
1388
- ), Xe(o.children, t, d, c)), !(o.path == null && !o.index) && t.push({
1389
- path: c,
1390
- score: qt(c, o.index),
1391
- routesMeta: d
1392
- });
1393
- };
1394
- return e.forEach((o, s) => {
1395
- var u;
1396
- if (o.path === "" || !((u = o.path) != null && u.includes("?")))
1397
- n(o, s);
1398
- else
1399
- for (let l of Qe(o.path))
1400
- n(o, s, l);
1401
- }), t;
1402
- }
1403
- function Qe(e) {
1404
- let t = e.split("/");
1405
- if (t.length === 0) return [];
1406
- let [r, ...a] = t, n = r.endsWith("?"), o = r.replace(/\?$/, "");
1407
- if (a.length === 0)
1408
- return n ? [o, ""] : [o];
1409
- let s = Qe(a.join("/")), u = [];
1410
- return u.push(
1411
- ...s.map(
1412
- (l) => l === "" ? o : [o, l].join("/")
1413
- )
1414
- ), n && u.push(...s), u.map(
1415
- (l) => e.startsWith("/") && l === "" ? "/" : l
1416
- );
1417
- }
1418
- function At(e) {
1419
- e.sort(
1420
- (t, r) => t.score !== r.score ? r.score - t.score : Gt(
1421
- t.routesMeta.map((a) => a.childrenIndex),
1422
- r.routesMeta.map((a) => a.childrenIndex)
1423
- )
1424
- );
1425
- }
1426
- var Ut = /^:[\w-]+$/, _t = 3, Vt = 2, Jt = 1, Kt = 10, Yt = -2, ze = (e) => e === "*";
1427
- function qt(e, t) {
1428
- let r = e.split("/"), a = r.length;
1429
- return r.some(ze) && (a += Yt), t && (a += Vt), r.filter((n) => !ze(n)).reduce(
1430
- (n, o) => n + (Ut.test(o) ? _t : o === "" ? Jt : Kt),
1431
- a
1432
- );
1433
- }
1434
- function Gt(e, t) {
1435
- return e.length === t.length && e.slice(0, -1).every((a, n) => a === t[n]) ? (
1436
- // If two routes are siblings, we should try to match the earlier sibling
1437
- // first. This allows people to have fine-grained control over the matching
1438
- // behavior by simply putting routes with identical paths in the order they
1439
- // want them tried.
1440
- e[e.length - 1] - t[t.length - 1]
1441
- ) : (
1442
- // Otherwise, it doesn't really make sense to rank non-siblings by index,
1443
- // so they sort equally.
1444
- 0
1445
- );
1446
- }
1447
- function Xt(e, t, r = !1) {
1448
- let { routesMeta: a } = e, n = {}, o = "/", s = [];
1449
- for (let u = 0; u < a.length; ++u) {
1450
- let l = a[u], c = u === a.length - 1, d = o === "/" ? t : t.slice(o.length) || "/", m = ie(
1451
- { path: l.relativePath, caseSensitive: l.caseSensitive, end: c },
1452
- d
1453
- ), h = l.route;
1454
- if (!m && c && r && !a[a.length - 1].route.index && (m = ie(
1455
- {
1456
- path: l.relativePath,
1457
- caseSensitive: l.caseSensitive,
1458
- end: !1
1459
- },
1460
- d
1461
- )), !m)
1462
- return null;
1463
- Object.assign(n, m.params), s.push({
1464
- // TODO: Can this as be avoided?
1465
- params: n,
1466
- pathname: A([o, m.pathname]),
1467
- pathnameBase: nr(
1468
- A([o, m.pathnameBase])
1299
+ }, qe = {
1300
+ default: "default-border backdrop-blur-xl text-white bg-zinc-1000/70",
1301
+ error: "bg-red-900/70 text-red-200 border-red-700",
1302
+ warning: "bg-amber-900/70 text-amber-200 border-amber-700",
1303
+ info: "bg-blue-900/70 text-blue-200 border-blue-700",
1304
+ success: "bg-green-900/70 text-green-200 border-green-700"
1305
+ }, bt = ({
1306
+ align: t = "center",
1307
+ children: s,
1308
+ className: n,
1309
+ content: o,
1310
+ disabled: r = !1,
1311
+ id: i,
1312
+ onOpenChange: a,
1313
+ open: l,
1314
+ position: u = "top",
1315
+ trigger: h = "hover",
1316
+ variant: d = "default"
1317
+ }) => {
1318
+ const m = /* @__PURE__ */ e.jsx(
1319
+ "div",
1320
+ {
1321
+ className: b(
1322
+ "max-w-xs rounded-md border px-2 py-1 text-xs break-words backdrop-blur-sm",
1323
+ qe[d],
1324
+ n
1469
1325
  ),
1470
- route: h
1471
- }), m.pathnameBase !== "/" && (o = A([o, m.pathnameBase]));
1472
- }
1473
- return s;
1474
- }
1475
- function ie(e, t) {
1476
- typeof e == "string" && (e = { path: e, caseSensitive: !1, end: !0 });
1477
- let [r, a] = Qt(
1478
- e.path,
1479
- e.caseSensitive,
1480
- e.end
1481
- ), n = t.match(r);
1482
- if (!n) return null;
1483
- let o = n[0], s = o.replace(/(.)\/+$/, "$1"), u = n.slice(1);
1484
- return {
1485
- params: a.reduce(
1486
- (c, { paramName: d, isOptional: m }, h) => {
1487
- if (d === "*") {
1488
- let g = u[h] || "";
1489
- s = o.slice(0, o.length - g.length).replace(/(.)\/+$/, "$1");
1490
- }
1491
- const b = u[h];
1492
- return m && !b ? c[d] = void 0 : c[d] = (b || "").replace(/%2F/g, "/"), c;
1493
- },
1494
- {}
1495
- ),
1496
- pathname: o,
1497
- pathnameBase: s,
1498
- pattern: e
1499
- };
1500
- }
1501
- function Qt(e, t = !1, r = !0) {
1502
- M(
1503
- e === "*" || !e.endsWith("*") || e.endsWith("/*"),
1504
- `Route path "${e}" will be treated as if it were "${e.replace(/\*$/, "/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/, "/*")}".`
1505
- );
1506
- let a = [], n = "^" + e.replace(/\/*\*?$/, "").replace(/^\/*/, "/").replace(/[\\.*+^${}|()[\]]/g, "\\$&").replace(
1507
- /\/:([\w-]+)(\?)?/g,
1508
- (s, u, l) => (a.push({ paramName: u, isOptional: l != null }), l ? "/?([^\\/]+)?" : "/([^\\/]+)")
1509
- );
1510
- return e.endsWith("*") ? (a.push({ paramName: "*" }), n += e === "*" || e === "/*" ? "(.*)$" : "(?:\\/(.+)|\\/*)$") : r ? n += "\\/*$" : e !== "" && e !== "/" && (n += "(?:(?=\\/|$))"), [new RegExp(n, t ? void 0 : "i"), a];
1511
- }
1512
- function Zt(e) {
1513
- try {
1514
- return e.split("/").map((t) => decodeURIComponent(t).replace(/\//g, "%2F")).join("/");
1515
- } catch (t) {
1516
- return M(
1517
- !1,
1518
- `The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`
1519
- ), e;
1520
- }
1521
- }
1522
- function _(e, t) {
1523
- if (t === "/") return e;
1524
- if (!e.toLowerCase().startsWith(t.toLowerCase()))
1525
- return null;
1526
- let r = t.endsWith("/") ? t.length - 1 : t.length, a = e.charAt(r);
1527
- return a && a !== "/" ? null : e.slice(r) || "/";
1528
- }
1529
- function er(e, t = "/") {
1530
- let {
1531
- pathname: r,
1532
- search: a = "",
1533
- hash: n = ""
1534
- } = typeof e == "string" ? Ee(e) : e;
1535
- return {
1536
- pathname: r ? r.startsWith("/") ? r : tr(r, t) : t,
1537
- search: ar(a),
1538
- hash: or(n)
1539
- };
1540
- }
1541
- function tr(e, t) {
1542
- let r = t.replace(/\/+$/, "").split("/");
1543
- return e.split("/").forEach((n) => {
1544
- n === ".." ? r.length > 1 && r.pop() : n !== "." && r.push(n);
1545
- }), r.length > 1 ? r.join("/") : "/";
1546
- }
1547
- function be(e, t, r, a) {
1548
- return `Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(
1549
- a
1550
- )}]. Please separate it out to the \`to.${r}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`;
1551
- }
1552
- function rr(e) {
1553
- return e.filter(
1554
- (t, r) => r === 0 || t.route.path && t.route.path.length > 0
1555
- );
1556
- }
1557
- function ke(e) {
1558
- let t = rr(e);
1559
- return t.map(
1560
- (r, a) => a === t.length - 1 ? r.pathname : r.pathnameBase
1561
- );
1562
- }
1563
- function Le(e, t, r, a = !1) {
1564
- let n;
1565
- typeof e == "string" ? n = Ee(e) : (n = { ...e }, $(
1566
- !n.pathname || !n.pathname.includes("?"),
1567
- be("?", "pathname", "search", n)
1568
- ), $(
1569
- !n.pathname || !n.pathname.includes("#"),
1570
- be("#", "pathname", "hash", n)
1571
- ), $(
1572
- !n.search || !n.search.includes("#"),
1573
- be("#", "search", "hash", n)
1574
- ));
1575
- let o = e === "" || n.pathname === "", s = o ? "/" : n.pathname, u;
1576
- if (s == null)
1577
- u = r;
1578
- else {
1579
- let m = t.length - 1;
1580
- if (!a && s.startsWith("..")) {
1581
- let h = s.split("/");
1582
- for (; h[0] === ".."; )
1583
- h.shift(), m -= 1;
1584
- n.pathname = h.join("/");
1585
- }
1586
- u = m >= 0 ? t[m] : "/";
1587
- }
1588
- let l = er(n, u), c = s && s !== "/" && s.endsWith("/"), d = (o || s === ".") && r.endsWith("/");
1589
- return !l.pathname.endsWith("/") && (c || d) && (l.pathname += "/"), l;
1590
- }
1591
- var A = (e) => e.join("/").replace(/\/\/+/g, "/"), nr = (e) => e.replace(/\/+$/, "").replace(/^\/*/, "/"), ar = (e) => !e || e === "?" ? "" : e.startsWith("?") ? e : "?" + e, or = (e) => !e || e === "#" ? "" : e.startsWith("#") ? e : "#" + e;
1592
- function lr(e) {
1593
- return e != null && typeof e.status == "number" && typeof e.statusText == "string" && typeof e.internal == "boolean" && "data" in e;
1594
- }
1595
- var Ze = [
1596
- "POST",
1597
- "PUT",
1598
- "PATCH",
1599
- "DELETE"
1600
- ];
1601
- new Set(
1602
- Ze
1603
- );
1604
- var sr = [
1605
- "GET",
1606
- ...Ze
1607
- ];
1608
- new Set(sr);
1609
- var q = f.createContext(null);
1610
- q.displayName = "DataRouter";
1611
- var ce = f.createContext(null);
1612
- ce.displayName = "DataRouterState";
1613
- f.createContext(!1);
1614
- var et = f.createContext({
1615
- isTransitioning: !1
1616
- });
1617
- et.displayName = "ViewTransition";
1618
- var ir = f.createContext(
1619
- /* @__PURE__ */ new Map()
1620
- );
1621
- ir.displayName = "Fetchers";
1622
- var ur = f.createContext(null);
1623
- ur.displayName = "Await";
1624
- var W = f.createContext(
1625
- null
1626
- );
1627
- W.displayName = "Navigation";
1628
- var Se = f.createContext(
1629
- null
1630
- );
1631
- Se.displayName = "Location";
1632
- var B = f.createContext({
1633
- outlet: null,
1634
- matches: [],
1635
- isDataRoute: !1
1636
- });
1637
- B.displayName = "Route";
1638
- var Re = f.createContext(null);
1639
- Re.displayName = "RouteError";
1640
- function cr(e, { relative: t } = {}) {
1641
- $(
1642
- te(),
1643
- // TODO: This error is probably because they somehow have 2 versions of the
1644
- // router loaded. We can help them understand how to avoid that.
1645
- "useHref() may be used only in the context of a <Router> component."
1646
- );
1647
- let { basename: r, navigator: a } = f.useContext(W), { hash: n, pathname: o, search: s } = re(e, { relative: t }), u = o;
1648
- return r !== "/" && (u = o === "/" ? r : A([r, o])), a.createHref({ pathname: u, search: s, hash: n });
1649
- }
1650
- function te() {
1651
- return f.useContext(Se) != null;
1652
- }
1653
- function V() {
1654
- return $(
1655
- te(),
1656
- // TODO: This error is probably because they somehow have 2 versions of the
1657
- // router loaded. We can help them understand how to avoid that.
1658
- "useLocation() may be used only in the context of a <Router> component."
1659
- ), f.useContext(Se).location;
1660
- }
1661
- var tt = "You should call navigate() in a React.useEffect(), not when your component is first rendered.";
1662
- function rt(e) {
1663
- f.useContext(W).static || f.useLayoutEffect(e);
1664
- }
1665
- function nt() {
1666
- let { isDataRoute: e } = f.useContext(B);
1667
- return e ? jr() : dr();
1668
- }
1669
- function dr() {
1670
- $(
1671
- te(),
1672
- // TODO: This error is probably because they somehow have 2 versions of the
1673
- // router loaded. We can help them understand how to avoid that.
1674
- "useNavigate() may be used only in the context of a <Router> component."
1675
- );
1676
- let e = f.useContext(q), { basename: t, navigator: r } = f.useContext(W), { matches: a } = f.useContext(B), { pathname: n } = V(), o = JSON.stringify(ke(a)), s = f.useRef(!1);
1677
- return rt(() => {
1678
- s.current = !0;
1679
- }), f.useCallback(
1680
- (l, c = {}) => {
1681
- if (M(s.current, tt), !s.current) return;
1682
- if (typeof l == "number") {
1683
- r.go(l);
1684
- return;
1685
- }
1686
- let d = Le(
1687
- l,
1688
- JSON.parse(o),
1689
- n,
1690
- c.relative === "path"
1691
- );
1692
- e == null && t !== "/" && (d.pathname = d.pathname === "/" ? t : A([t, d.pathname])), (c.replace ? r.replace : r.push)(
1693
- d,
1694
- c.state,
1695
- c
1696
- );
1697
- },
1698
- [
1699
- t,
1700
- r,
1701
- o,
1702
- n,
1703
- e
1704
- ]
1705
- );
1706
- }
1707
- f.createContext(null);
1708
- function re(e, { relative: t } = {}) {
1709
- let { matches: r } = f.useContext(B), { pathname: a } = V(), n = JSON.stringify(ke(r));
1710
- return f.useMemo(
1711
- () => Le(
1712
- e,
1713
- JSON.parse(n),
1714
- a,
1715
- t === "path"
1716
- ),
1717
- [e, n, a, t]
1718
- );
1719
- }
1720
- function fr(e, t, r, a) {
1721
- $(
1722
- te(),
1723
- // TODO: This error is probably because they somehow have 2 versions of the
1724
- // router loaded. We can help them understand how to avoid that.
1725
- "useRoutes() may be used only in the context of a <Router> component."
1726
- );
1727
- let { navigator: n } = f.useContext(W), { matches: o } = f.useContext(B), s = o[o.length - 1], u = s ? s.params : {}, l = s ? s.pathname : "/", c = s ? s.pathnameBase : "/", d = s && s.route;
1728
- {
1729
- let p = d && d.path || "";
1730
- at(
1731
- l,
1732
- !d || p.endsWith("*") || p.endsWith("*?"),
1733
- `You rendered descendant <Routes> (or called \`useRoutes()\`) at "${l}" (under <Route path="${p}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
1734
-
1735
- Please change the parent <Route path="${p}"> to <Route path="${p === "/" ? "*" : `${p}/*`}">.`
1736
- );
1737
- }
1738
- let m = V(), h;
1739
- h = m;
1740
- let b = h.pathname || "/", g = b;
1741
- if (c !== "/") {
1742
- let p = c.replace(/^\//, "").split("/");
1743
- g = "/" + b.replace(/^\//, "").split("/").slice(p.length).join("/");
1744
- }
1745
- let v = Ge(e, { pathname: g });
1746
- return M(
1747
- d || v != null,
1748
- `No routes matched location "${h.pathname}${h.search}${h.hash}" `
1749
- ), M(
1750
- v == null || v[v.length - 1].route.element !== void 0 || v[v.length - 1].route.Component !== void 0 || v[v.length - 1].route.lazy !== void 0,
1751
- `Matched leaf route at location "${h.pathname}${h.search}${h.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`
1752
- ), gr(
1753
- v && v.map(
1754
- (p) => Object.assign({}, p, {
1755
- params: Object.assign({}, u, p.params),
1756
- pathname: A([
1757
- c,
1758
- // Re-encode pathnames that were decoded inside matchRoutes
1759
- n.encodeLocation ? n.encodeLocation(p.pathname).pathname : p.pathname
1760
- ]),
1761
- pathnameBase: p.pathnameBase === "/" ? c : A([
1762
- c,
1763
- // Re-encode pathnames that were decoded inside matchRoutes
1764
- n.encodeLocation ? n.encodeLocation(p.pathnameBase).pathname : p.pathnameBase
1765
- ])
1766
- })
1767
- ),
1768
- o,
1769
- r,
1770
- a
1771
- );
1772
- }
1773
- function mr() {
1774
- let e = Cr(), t = lr(e) ? `${e.status} ${e.statusText}` : e instanceof Error ? e.message : JSON.stringify(e), r = e instanceof Error ? e.stack : null, a = "rgba(200,200,200, 0.5)", n = { padding: "0.5rem", backgroundColor: a }, o = { padding: "2px 4px", backgroundColor: a }, s = null;
1775
- return console.error(
1776
- "Error handled by React Router default ErrorBoundary:",
1777
- e
1778
- ), s = /* @__PURE__ */ f.createElement(f.Fragment, null, /* @__PURE__ */ f.createElement("p", null, "💿 Hey developer 👋"), /* @__PURE__ */ f.createElement("p", null, "You can provide a way better UX than this when your app throws errors by providing your own ", /* @__PURE__ */ f.createElement("code", { style: o }, "ErrorBoundary"), " or", " ", /* @__PURE__ */ f.createElement("code", { style: o }, "errorElement"), " prop on your route.")), /* @__PURE__ */ f.createElement(f.Fragment, null, /* @__PURE__ */ f.createElement("h2", null, "Unexpected Application Error!"), /* @__PURE__ */ f.createElement("h3", { style: { fontStyle: "italic" } }, t), r ? /* @__PURE__ */ f.createElement("pre", { style: n }, r) : null, s);
1779
- }
1780
- var hr = /* @__PURE__ */ f.createElement(mr, null), pr = class extends f.Component {
1781
- constructor(e) {
1782
- super(e), this.state = {
1783
- location: e.location,
1784
- revalidation: e.revalidation,
1785
- error: e.error
1786
- };
1787
- }
1788
- static getDerivedStateFromError(e) {
1789
- return { error: e };
1790
- }
1791
- static getDerivedStateFromProps(e, t) {
1792
- return t.location !== e.location || t.revalidation !== "idle" && e.revalidation === "idle" ? {
1793
- error: e.error,
1794
- location: e.location,
1795
- revalidation: e.revalidation
1796
- } : {
1797
- error: e.error !== void 0 ? e.error : t.error,
1798
- location: t.location,
1799
- revalidation: e.revalidation || t.revalidation
1800
- };
1801
- }
1802
- componentDidCatch(e, t) {
1803
- console.error(
1804
- "React Router caught the following error during render",
1805
- e,
1806
- t
1807
- );
1808
- }
1809
- render() {
1810
- return this.state.error !== void 0 ? /* @__PURE__ */ f.createElement(B.Provider, { value: this.props.routeContext }, /* @__PURE__ */ f.createElement(
1811
- Re.Provider,
1812
- {
1813
- value: this.state.error,
1814
- children: this.props.component
1815
- }
1816
- )) : this.props.children;
1817
- }
1818
- };
1819
- function xr({ routeContext: e, match: t, children: r }) {
1820
- let a = f.useContext(q);
1821
- return a && a.static && a.staticContext && (t.route.errorElement || t.route.ErrorBoundary) && (a.staticContext._deepestRenderedBoundaryId = t.route.id), /* @__PURE__ */ f.createElement(B.Provider, { value: e }, r);
1822
- }
1823
- function gr(e, t = [], r = null, a = null) {
1824
- if (e == null) {
1825
- if (!r)
1826
- return null;
1827
- if (r.errors)
1828
- e = r.matches;
1829
- else if (t.length === 0 && !r.initialized && r.matches.length > 0)
1830
- e = r.matches;
1831
- else
1832
- return null;
1833
- }
1834
- let n = e, o = r == null ? void 0 : r.errors;
1835
- if (o != null) {
1836
- let l = n.findIndex(
1837
- (c) => c.route.id && (o == null ? void 0 : o[c.route.id]) !== void 0
1838
- );
1839
- $(
1840
- l >= 0,
1841
- `Could not find a matching route for errors on route IDs: ${Object.keys(
1842
- o
1843
- ).join(",")}`
1844
- ), n = n.slice(
1845
- 0,
1846
- Math.min(n.length, l + 1)
1847
- );
1848
- }
1849
- let s = !1, u = -1;
1850
- if (r)
1851
- for (let l = 0; l < n.length; l++) {
1852
- let c = n[l];
1853
- if ((c.route.HydrateFallback || c.route.hydrateFallbackElement) && (u = l), c.route.id) {
1854
- let { loaderData: d, errors: m } = r, h = c.route.loader && !d.hasOwnProperty(c.route.id) && (!m || m[c.route.id] === void 0);
1855
- if (c.route.lazy || h) {
1856
- s = !0, u >= 0 ? n = n.slice(0, u + 1) : n = [n[0]];
1857
- break;
1858
- }
1859
- }
1860
- }
1861
- return n.reduceRight((l, c, d) => {
1862
- let m, h = !1, b = null, g = null;
1863
- r && (m = o && c.route.id ? o[c.route.id] : void 0, b = c.route.errorElement || hr, s && (u < 0 && d === 0 ? (at(
1864
- "route-fallback",
1865
- !1,
1866
- "No `HydrateFallback` element provided to render during initial hydration"
1867
- ), h = !0, g = null) : u === d && (h = !0, g = c.route.hydrateFallbackElement || null)));
1868
- let v = t.concat(n.slice(0, d + 1)), C = () => {
1869
- let p;
1870
- return m ? p = b : h ? p = g : c.route.Component ? p = /* @__PURE__ */ f.createElement(c.route.Component, null) : c.route.element ? p = c.route.element : p = l, /* @__PURE__ */ f.createElement(
1871
- xr,
1872
- {
1873
- match: c,
1874
- routeContext: {
1875
- outlet: l,
1876
- matches: v,
1877
- isDataRoute: r != null
1878
- },
1879
- children: p
1880
- }
1881
- );
1882
- };
1883
- return r && (c.route.ErrorBoundary || c.route.errorElement || d === 0) ? /* @__PURE__ */ f.createElement(
1884
- pr,
1885
- {
1886
- location: r.location,
1887
- revalidation: r.revalidation,
1888
- component: b,
1889
- error: m,
1890
- children: C(),
1891
- routeContext: { outlet: null, matches: v, isDataRoute: !0 }
1892
- }
1893
- ) : C();
1894
- }, null);
1895
- }
1896
- function Pe(e) {
1897
- return `${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`;
1898
- }
1899
- function br(e) {
1900
- let t = f.useContext(q);
1901
- return $(t, Pe(e)), t;
1902
- }
1903
- function vr(e) {
1904
- let t = f.useContext(ce);
1905
- return $(t, Pe(e)), t;
1906
- }
1907
- function yr(e) {
1908
- let t = f.useContext(B);
1909
- return $(t, Pe(e)), t;
1910
- }
1911
- function $e(e) {
1912
- let t = yr(e), r = t.matches[t.matches.length - 1];
1913
- return $(
1914
- r.route.id,
1915
- `${e} can only be used on routes that contain a unique "id"`
1916
- ), r.route.id;
1917
- }
1918
- function wr() {
1919
- return $e(
1920
- "useRouteId"
1921
- /* UseRouteId */
1922
- );
1923
- }
1924
- function Cr() {
1925
- var a;
1926
- let e = f.useContext(Re), t = vr(
1927
- "useRouteError"
1928
- /* UseRouteError */
1929
- ), r = $e(
1930
- "useRouteError"
1931
- /* UseRouteError */
1932
- );
1933
- return e !== void 0 ? e : (a = t.errors) == null ? void 0 : a[r];
1934
- }
1935
- function jr() {
1936
- let { router: e } = br(
1937
- "useNavigate"
1938
- /* UseNavigateStable */
1939
- ), t = $e(
1940
- "useNavigate"
1941
- /* UseNavigateStable */
1942
- ), r = f.useRef(!1);
1943
- return rt(() => {
1944
- r.current = !0;
1945
- }), f.useCallback(
1946
- async (n, o = {}) => {
1947
- M(r.current, tt), r.current && (typeof n == "number" ? e.navigate(n) : await e.navigate(n, { fromRouteId: t, ...o }));
1948
- },
1949
- [e, t]
1950
- );
1951
- }
1952
- var Te = {};
1953
- function at(e, t, r) {
1954
- !t && !Te[e] && (Te[e] = !0, M(!1, r));
1955
- }
1956
- f.memo(Nr);
1957
- function Nr({
1958
- routes: e,
1959
- future: t,
1960
- state: r
1961
- }) {
1962
- return fr(e, void 0, r, t);
1963
- }
1964
- function ot({
1965
- to: e,
1966
- replace: t,
1967
- state: r,
1968
- relative: a
1969
- }) {
1970
- $(
1971
- te(),
1972
- // TODO: This error is probably because they somehow have 2 versions of
1973
- // the router loaded. We can help them understand how to avoid that.
1974
- "<Navigate> may be used only in the context of a <Router> component."
1975
- );
1976
- let { static: n } = f.useContext(W);
1977
- M(
1978
- !n,
1979
- "<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change."
1980
- );
1981
- let { matches: o } = f.useContext(B), { pathname: s } = V(), u = nt(), l = Le(
1982
- e,
1983
- ke(o),
1984
- s,
1985
- a === "path"
1986
- ), c = JSON.stringify(l);
1987
- return f.useEffect(() => {
1988
- u(JSON.parse(c), { replace: t, state: r, relative: a });
1989
- }, [u, c, a, t, r]), null;
1990
- }
1991
- var oe = "get", le = "application/x-www-form-urlencoded";
1992
- function de(e) {
1993
- return e != null && typeof e.tagName == "string";
1994
- }
1995
- function Er(e) {
1996
- return de(e) && e.tagName.toLowerCase() === "button";
1997
- }
1998
- function kr(e) {
1999
- return de(e) && e.tagName.toLowerCase() === "form";
2000
- }
2001
- function Lr(e) {
2002
- return de(e) && e.tagName.toLowerCase() === "input";
2003
- }
2004
- function Sr(e) {
2005
- return !!(e.metaKey || e.altKey || e.ctrlKey || e.shiftKey);
2006
- }
2007
- function Rr(e, t) {
2008
- return e.button === 0 && // Ignore everything but left clicks
2009
- (!t || t === "_self") && // Let browser handle "target=_blank" etc.
2010
- !Sr(e);
2011
- }
2012
- var ae = null;
2013
- function Pr() {
2014
- if (ae === null)
2015
- try {
2016
- new FormData(
2017
- document.createElement("form"),
2018
- // @ts-expect-error if FormData supports the submitter parameter, this will throw
2019
- 0
2020
- ), ae = !1;
2021
- } catch {
2022
- ae = !0;
2023
- }
2024
- return ae;
2025
- }
2026
- var $r = /* @__PURE__ */ new Set([
2027
- "application/x-www-form-urlencoded",
2028
- "multipart/form-data",
2029
- "text/plain"
2030
- ]);
2031
- function ve(e) {
2032
- return e != null && !$r.has(e) ? (M(
2033
- !1,
2034
- `"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${le}"`
2035
- ), null) : e;
2036
- }
2037
- function Or(e, t) {
2038
- let r, a, n, o, s;
2039
- if (kr(e)) {
2040
- let u = e.getAttribute("action");
2041
- a = u ? _(u, t) : null, r = e.getAttribute("method") || oe, n = ve(e.getAttribute("enctype")) || le, o = new FormData(e);
2042
- } else if (Er(e) || Lr(e) && (e.type === "submit" || e.type === "image")) {
2043
- let u = e.form;
2044
- if (u == null)
2045
- throw new Error(
2046
- 'Cannot submit a <button> or <input type="submit"> without a <form>'
2047
- );
2048
- let l = e.getAttribute("formaction") || u.getAttribute("action");
2049
- if (a = l ? _(l, t) : null, r = e.getAttribute("formmethod") || u.getAttribute("method") || oe, n = ve(e.getAttribute("formenctype")) || ve(u.getAttribute("enctype")) || le, o = new FormData(u, e), !Pr()) {
2050
- let { name: c, type: d, value: m } = e;
2051
- if (d === "image") {
2052
- let h = c ? `${c}.` : "";
2053
- o.append(`${h}x`, "0"), o.append(`${h}y`, "0");
2054
- } else c && o.append(c, m);
2055
- }
2056
- } else {
2057
- if (de(e))
2058
- throw new Error(
2059
- 'Cannot submit element that is not <form>, <button>, or <input type="submit|image">'
2060
- );
2061
- r = oe, a = null, n = le, s = e;
2062
- }
2063
- return o && n === "text/plain" && (s = o, o = void 0), { action: a, method: r.toLowerCase(), encType: n, formData: o, body: s };
2064
- }
2065
- Object.getOwnPropertyNames(Object.prototype).sort().join("\0");
2066
- function Oe(e, t) {
2067
- if (e === !1 || e === null || typeof e > "u")
2068
- throw new Error(t);
2069
- }
2070
- function Ir(e, t, r) {
2071
- let a = typeof e == "string" ? new URL(
2072
- e,
2073
- // This can be called during the SSR flow via PrefetchPageLinksImpl so
2074
- // don't assume window is available
2075
- typeof window > "u" ? "server://singlefetch/" : window.location.origin
2076
- ) : e;
2077
- return a.pathname === "/" ? a.pathname = `_root.${r}` : t && _(a.pathname, t) === "/" ? a.pathname = `${t.replace(/\/$/, "")}/_root.${r}` : a.pathname = `${a.pathname.replace(/\/$/, "")}.${r}`, a;
2078
- }
2079
- async function Fr(e, t) {
2080
- if (e.id in t)
2081
- return t[e.id];
2082
- try {
2083
- let r = await import(
2084
- /* @vite-ignore */
2085
- /* webpackIgnore: true */
2086
- e.module
2087
- );
2088
- return t[e.id] = r, r;
2089
- } catch (r) {
2090
- return console.error(
2091
- `Error loading route module \`${e.module}\`, reloading page...`
2092
- ), console.error(r), window.__reactRouterContext && window.__reactRouterContext.isSpaMode, window.location.reload(), new Promise(() => {
2093
- });
2094
- }
2095
- }
2096
- function Dr(e) {
2097
- return e == null ? !1 : e.href == null ? e.rel === "preload" && typeof e.imageSrcSet == "string" && typeof e.imageSizes == "string" : typeof e.rel == "string" && typeof e.href == "string";
2098
- }
2099
- async function zr(e, t, r) {
2100
- let a = await Promise.all(
2101
- e.map(async (n) => {
2102
- let o = t.routes[n.route.id];
2103
- if (o) {
2104
- let s = await Fr(o, r);
2105
- return s.links ? s.links() : [];
2106
- }
2107
- return [];
2108
- })
2109
- );
2110
- return Br(
2111
- a.flat(1).filter(Dr).filter((n) => n.rel === "stylesheet" || n.rel === "preload").map(
2112
- (n) => n.rel === "stylesheet" ? { ...n, rel: "prefetch", as: "style" } : { ...n, rel: "prefetch" }
2113
- )
2114
- );
2115
- }
2116
- function Me(e, t, r, a, n, o) {
2117
- let s = (l, c) => r[c] ? l.route.id !== r[c].route.id : !0, u = (l, c) => {
2118
- var d;
2119
- return (
2120
- // param change, /users/123 -> /users/456
2121
- r[c].pathname !== l.pathname || // splat param changed, which is not present in match.path
2122
- // e.g. /files/images/avatar.jpg -> files/finances.xls
2123
- ((d = r[c].route.path) == null ? void 0 : d.endsWith("*")) && r[c].params["*"] !== l.params["*"]
2124
- );
2125
- };
2126
- return o === "assets" ? t.filter(
2127
- (l, c) => s(l, c) || u(l, c)
2128
- ) : o === "data" ? t.filter((l, c) => {
2129
- var m;
2130
- let d = a.routes[l.route.id];
2131
- if (!d || !d.hasLoader)
2132
- return !1;
2133
- if (s(l, c) || u(l, c))
2134
- return !0;
2135
- if (l.route.shouldRevalidate) {
2136
- let h = l.route.shouldRevalidate({
2137
- currentUrl: new URL(
2138
- n.pathname + n.search + n.hash,
2139
- window.origin
2140
- ),
2141
- currentParams: ((m = r[0]) == null ? void 0 : m.params) || {},
2142
- nextUrl: new URL(e, window.origin),
2143
- nextParams: l.params,
2144
- defaultShouldRevalidate: !0
2145
- });
2146
- if (typeof h == "boolean")
2147
- return h;
1326
+ children: o
2148
1327
  }
2149
- return !0;
2150
- }) : [];
2151
- }
2152
- function Tr(e, t, { includeHydrateFallback: r } = {}) {
2153
- return Mr(
2154
- e.map((a) => {
2155
- let n = t.routes[a.route.id];
2156
- if (!n) return [];
2157
- let o = [n.module];
2158
- return n.clientActionModule && (o = o.concat(n.clientActionModule)), n.clientLoaderModule && (o = o.concat(n.clientLoaderModule)), r && n.hydrateFallbackModule && (o = o.concat(n.hydrateFallbackModule)), n.imports && (o = o.concat(n.imports)), o;
2159
- }).flat(1)
2160
1328
  );
2161
- }
2162
- function Mr(e) {
2163
- return [...new Set(e)];
2164
- }
2165
- function Wr(e) {
2166
- let t = {}, r = Object.keys(e).sort();
2167
- for (let a of r)
2168
- t[a] = e[a];
2169
- return t;
2170
- }
2171
- function Br(e, t) {
2172
- let r = /* @__PURE__ */ new Set();
2173
- return new Set(t), e.reduce((a, n) => {
2174
- let o = JSON.stringify(Wr(n));
2175
- return r.has(o) || (r.add(o), a.push({ key: o, link: n })), a;
2176
- }, []);
2177
- }
2178
- function lt() {
2179
- let e = f.useContext(q);
2180
- return Oe(
2181
- e,
2182
- "You must render this element inside a <DataRouterContext.Provider> element"
2183
- ), e;
2184
- }
2185
- function Hr() {
2186
- let e = f.useContext(ce);
2187
- return Oe(
2188
- e,
2189
- "You must render this element inside a <DataRouterStateContext.Provider> element"
2190
- ), e;
2191
- }
2192
- var Ie = f.createContext(void 0);
2193
- Ie.displayName = "FrameworkContext";
2194
- function st() {
2195
- let e = f.useContext(Ie);
2196
- return Oe(
2197
- e,
2198
- "You must render this element inside a <HydratedRouter> element"
2199
- ), e;
2200
- }
2201
- function Ar(e, t) {
2202
- let r = f.useContext(Ie), [a, n] = f.useState(!1), [o, s] = f.useState(!1), { onFocus: u, onBlur: l, onMouseEnter: c, onMouseLeave: d, onTouchStart: m } = t, h = f.useRef(null);
2203
- f.useEffect(() => {
2204
- if (e === "render" && s(!0), e === "viewport") {
2205
- let v = (p) => {
2206
- p.forEach((x) => {
2207
- s(x.isIntersecting);
2208
- });
2209
- }, C = new IntersectionObserver(v, { threshold: 0.5 });
2210
- return h.current && C.observe(h.current), () => {
2211
- C.disconnect();
2212
- };
2213
- }
2214
- }, [e]), f.useEffect(() => {
2215
- if (a) {
2216
- let v = setTimeout(() => {
2217
- s(!0);
2218
- }, 100);
2219
- return () => {
2220
- clearTimeout(v);
2221
- };
2222
- }
2223
- }, [a]);
2224
- let b = () => {
2225
- n(!0);
2226
- }, g = () => {
2227
- n(!1), s(!1);
2228
- };
2229
- return r ? e !== "intent" ? [o, h, {}] : [
2230
- o,
2231
- h,
1329
+ return /* @__PURE__ */ e.jsx(
1330
+ ne,
2232
1331
  {
2233
- onFocus: Z(u, b),
2234
- onBlur: Z(l, g),
2235
- onMouseEnter: Z(c, b),
2236
- onMouseLeave: Z(d, g),
2237
- onTouchStart: Z(m, b)
2238
- }
2239
- ] : [!1, h, {}];
2240
- }
2241
- function Z(e, t) {
2242
- return (r) => {
2243
- e && e(r), r.defaultPrevented || t(r);
2244
- };
2245
- }
2246
- function Ur({
2247
- page: e,
2248
- ...t
2249
- }) {
2250
- let { router: r } = lt(), a = f.useMemo(
2251
- () => Ge(r.routes, e, r.basename),
2252
- [r.routes, e, r.basename]
2253
- );
2254
- return a ? /* @__PURE__ */ f.createElement(Vr, { page: e, matches: a, ...t }) : null;
2255
- }
2256
- function _r(e) {
2257
- let { manifest: t, routeModules: r } = st(), [a, n] = f.useState([]);
2258
- return f.useEffect(() => {
2259
- let o = !1;
2260
- return zr(e, t, r).then(
2261
- (s) => {
2262
- o || n(s);
2263
- }
2264
- ), () => {
2265
- o = !0;
2266
- };
2267
- }, [e, t, r]), a;
2268
- }
2269
- function Vr({
2270
- page: e,
2271
- matches: t,
2272
- ...r
2273
- }) {
2274
- let a = V(), { manifest: n, routeModules: o } = st(), { basename: s } = lt(), { loaderData: u, matches: l } = Hr(), c = f.useMemo(
2275
- () => Me(
2276
- e,
2277
- t,
2278
- l,
2279
- n,
2280
- a,
2281
- "data"
2282
- ),
2283
- [e, t, l, n, a]
2284
- ), d = f.useMemo(
2285
- () => Me(
2286
- e,
2287
- t,
2288
- l,
2289
- n,
2290
- a,
2291
- "assets"
2292
- ),
2293
- [e, t, l, n, a]
2294
- ), m = f.useMemo(() => {
2295
- if (e === a.pathname + a.search + a.hash)
2296
- return [];
2297
- let g = /* @__PURE__ */ new Set(), v = !1;
2298
- if (t.forEach((p) => {
2299
- var y;
2300
- let x = n.routes[p.route.id];
2301
- !x || !x.hasLoader || (!c.some((j) => j.route.id === p.route.id) && p.route.id in u && ((y = o[p.route.id]) != null && y.shouldRevalidate) || x.hasClientLoader ? v = !0 : g.add(p.route.id));
2302
- }), g.size === 0)
2303
- return [];
2304
- let C = Ir(e, s, "data");
2305
- return v && g.size > 0 && C.searchParams.set(
2306
- "_routes",
2307
- t.filter((p) => g.has(p.route.id)).map((p) => p.route.id).join(",")
2308
- ), [C.pathname + C.search];
2309
- }, [
2310
- s,
2311
- u,
2312
- a,
2313
- n,
2314
- c,
2315
- t,
2316
- e,
2317
- o
2318
- ]), h = f.useMemo(
2319
- () => Tr(d, n),
2320
- [d, n]
2321
- ), b = _r(d);
2322
- return /* @__PURE__ */ f.createElement(f.Fragment, null, m.map((g) => /* @__PURE__ */ f.createElement("link", { key: g, rel: "prefetch", as: "fetch", href: g, ...r })), h.map((g) => /* @__PURE__ */ f.createElement("link", { key: g, rel: "modulepreload", href: g, ...r })), b.map(({ key: g, link: v }) => (
2323
- // these don't spread `linkProps` because they are full link descriptors
2324
- // already with their own props
2325
- /* @__PURE__ */ f.createElement("link", { key: g, ...v })
2326
- )));
2327
- }
2328
- function Jr(...e) {
2329
- return (t) => {
2330
- e.forEach((r) => {
2331
- typeof r == "function" ? r(t) : r != null && (r.current = t);
2332
- });
2333
- };
2334
- }
2335
- var it = typeof window < "u" && typeof window.document < "u" && typeof window.document.createElement < "u";
2336
- try {
2337
- it && (window.__reactRouterVersion = // @ts-expect-error
2338
- "7.7.0");
2339
- } catch {
2340
- }
2341
- var ut = /^(?:[a-z][a-z0-9+.-]*:|\/\/)/i, ct = f.forwardRef(
2342
- function({
2343
- onClick: t,
2344
- discover: r = "render",
2345
- prefetch: a = "none",
2346
- relative: n,
2347
- reloadDocument: o,
2348
- replace: s,
2349
- state: u,
2350
- target: l,
2351
- to: c,
2352
- preventScrollReset: d,
2353
- viewTransition: m,
2354
- ...h
2355
- }, b) {
2356
- let { basename: g } = f.useContext(W), v = typeof c == "string" && ut.test(c), C, p = !1;
2357
- if (typeof c == "string" && v && (C = c, it))
2358
- try {
2359
- let S = new URL(window.location.href), I = c.startsWith("//") ? new URL(S.protocol + c) : new URL(c), H = _(I.pathname, g);
2360
- I.origin === S.origin && H != null ? c = H + I.search + I.hash : p = !0;
2361
- } catch {
2362
- M(
2363
- !1,
2364
- `<Link to="${c}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`
2365
- );
2366
- }
2367
- let x = cr(c, { relative: n }), [y, j, L] = Ar(
2368
- a,
2369
- h
2370
- ), F = Gr(c, {
2371
- replace: s,
2372
- state: u,
2373
- target: l,
2374
- preventScrollReset: d,
2375
- relative: n,
2376
- viewTransition: m
2377
- });
2378
- function k(S) {
2379
- t && t(S), S.defaultPrevented || F(S);
2380
- }
2381
- let D = (
2382
- // eslint-disable-next-line jsx-a11y/anchor-has-content
2383
- /* @__PURE__ */ f.createElement(
2384
- "a",
2385
- {
2386
- ...h,
2387
- ...L,
2388
- href: C || x,
2389
- onClick: p || o ? t : k,
2390
- ref: Jr(b, j),
2391
- target: l,
2392
- "data-discover": !v && r === "render" ? "true" : void 0
2393
- }
2394
- )
2395
- );
2396
- return y && !v ? /* @__PURE__ */ f.createElement(f.Fragment, null, D, /* @__PURE__ */ f.createElement(Ur, { page: x })) : D;
2397
- }
2398
- );
2399
- ct.displayName = "Link";
2400
- var Kr = f.forwardRef(
2401
- function({
2402
- "aria-current": t = "page",
2403
- caseSensitive: r = !1,
2404
- className: a = "",
2405
- end: n = !1,
2406
- style: o,
2407
- to: s,
2408
- viewTransition: u,
2409
- children: l,
2410
- ...c
2411
- }, d) {
2412
- let m = re(s, { relative: c.relative }), h = V(), b = f.useContext(ce), { navigator: g, basename: v } = f.useContext(W), C = b != null && // Conditional usage is OK here because the usage of a data router is static
2413
- // eslint-disable-next-line react-hooks/rules-of-hooks
2414
- tn(m) && u === !0, p = g.encodeLocation ? g.encodeLocation(m).pathname : m.pathname, x = h.pathname, y = b && b.navigation && b.navigation.location ? b.navigation.location.pathname : null;
2415
- r || (x = x.toLowerCase(), y = y ? y.toLowerCase() : null, p = p.toLowerCase()), y && v && (y = _(y, v) || y);
2416
- const j = p !== "/" && p.endsWith("/") ? p.length - 1 : p.length;
2417
- let L = x === p || !n && x.startsWith(p) && x.charAt(j) === "/", F = y != null && (y === p || !n && y.startsWith(p) && y.charAt(p.length) === "/"), k = {
2418
- isActive: L,
2419
- isPending: F,
2420
- isTransitioning: C
2421
- }, D = L ? t : void 0, S;
2422
- typeof a == "function" ? S = a(k) : S = [
2423
- a,
2424
- L ? "active" : null,
2425
- F ? "pending" : null,
2426
- C ? "transitioning" : null
2427
- ].filter(Boolean).join(" ");
2428
- let I = typeof o == "function" ? o(k) : o;
2429
- return /* @__PURE__ */ f.createElement(
2430
- ct,
2431
- {
2432
- ...c,
2433
- "aria-current": D,
2434
- className: S,
2435
- ref: d,
2436
- style: I,
2437
- to: s,
2438
- viewTransition: u
2439
- },
2440
- typeof l == "function" ? l(k) : l
2441
- );
2442
- }
2443
- );
2444
- Kr.displayName = "NavLink";
2445
- var Yr = f.forwardRef(
2446
- ({
2447
- discover: e = "render",
2448
- fetcherKey: t,
2449
- navigate: r,
2450
- reloadDocument: a,
2451
- replace: n,
2452
- state: o,
2453
- method: s = oe,
2454
- action: u,
2455
- onSubmit: l,
2456
- relative: c,
2457
- preventScrollReset: d,
2458
- viewTransition: m,
2459
- ...h
2460
- }, b) => {
2461
- let g = Zr(), v = en(u, { relative: c }), C = s.toLowerCase() === "get" ? "get" : "post", p = typeof u == "string" && ut.test(u), x = (y) => {
2462
- if (l && l(y), y.defaultPrevented) return;
2463
- y.preventDefault();
2464
- let j = y.nativeEvent.submitter, L = (j == null ? void 0 : j.getAttribute("formmethod")) || s;
2465
- g(j || y.currentTarget, {
2466
- fetcherKey: t,
2467
- method: L,
2468
- navigate: r,
2469
- replace: n,
2470
- state: o,
2471
- relative: c,
2472
- preventScrollReset: d,
2473
- viewTransition: m
2474
- });
2475
- };
2476
- return /* @__PURE__ */ f.createElement(
2477
- "form",
2478
- {
2479
- ref: b,
2480
- method: C,
2481
- action: v,
2482
- onSubmit: a ? l : x,
2483
- ...h,
2484
- "data-discover": !p && e === "render" ? "true" : void 0
2485
- }
2486
- );
2487
- }
2488
- );
2489
- Yr.displayName = "Form";
2490
- function qr(e) {
2491
- return `${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`;
2492
- }
2493
- function dt(e) {
2494
- let t = f.useContext(q);
2495
- return $(t, qr(e)), t;
2496
- }
2497
- function Gr(e, {
2498
- target: t,
2499
- replace: r,
2500
- state: a,
2501
- preventScrollReset: n,
2502
- relative: o,
2503
- viewTransition: s
2504
- } = {}) {
2505
- let u = nt(), l = V(), c = re(e, { relative: o });
2506
- return f.useCallback(
2507
- (d) => {
2508
- if (Rr(d, t)) {
2509
- d.preventDefault();
2510
- let m = r !== void 0 ? r : we(l) === we(c);
2511
- u(e, {
2512
- replace: m,
2513
- state: a,
2514
- preventScrollReset: n,
2515
- relative: o,
2516
- viewTransition: s
2517
- });
2518
- }
2519
- },
2520
- [
2521
- l,
2522
- u,
2523
- c,
2524
- r,
2525
- a,
2526
- t,
2527
- e,
2528
- n,
2529
- o,
2530
- s
2531
- ]
2532
- );
2533
- }
2534
- var Xr = 0, Qr = () => `__${String(++Xr)}__`;
2535
- function Zr() {
2536
- let { router: e } = dt(
2537
- "useSubmit"
2538
- /* UseSubmit */
2539
- ), { basename: t } = f.useContext(W), r = wr();
2540
- return f.useCallback(
2541
- async (a, n = {}) => {
2542
- let { action: o, method: s, encType: u, formData: l, body: c } = Or(
2543
- a,
2544
- t
2545
- );
2546
- if (n.navigate === !1) {
2547
- let d = n.fetcherKey || Qr();
2548
- await e.fetch(d, r, n.action || o, {
2549
- preventScrollReset: n.preventScrollReset,
2550
- formData: l,
2551
- body: c,
2552
- formMethod: n.method || s,
2553
- formEncType: n.encType || u,
2554
- flushSync: n.flushSync
2555
- });
2556
- } else
2557
- await e.navigate(n.action || o, {
2558
- preventScrollReset: n.preventScrollReset,
2559
- formData: l,
2560
- body: c,
2561
- formMethod: n.method || s,
2562
- formEncType: n.encType || u,
2563
- replace: n.replace,
2564
- state: n.state,
2565
- fromRouteId: r,
2566
- flushSync: n.flushSync,
2567
- viewTransition: n.viewTransition
2568
- });
2569
- },
2570
- [e, t, r]
2571
- );
2572
- }
2573
- function en(e, { relative: t } = {}) {
2574
- let { basename: r } = f.useContext(W), a = f.useContext(B);
2575
- $(a, "useFormAction must be used inside a RouteContext");
2576
- let [n] = a.matches.slice(-1), o = { ...re(e || ".", { relative: t }) }, s = V();
2577
- if (e == null) {
2578
- o.search = s.search;
2579
- let u = new URLSearchParams(o.search), l = u.getAll("index");
2580
- if (l.some((d) => d === "")) {
2581
- u.delete("index"), l.filter((m) => m).forEach((m) => u.append("index", m));
2582
- let d = u.toString();
2583
- o.search = d ? `?${d}` : "";
1332
+ id: i,
1333
+ align: t,
1334
+ content: m,
1335
+ contentRole: "tooltip",
1336
+ disabled: r,
1337
+ offset: 8,
1338
+ open: l,
1339
+ position: u,
1340
+ trigger: h,
1341
+ useAriaControls: !1,
1342
+ onOpenChange: a,
1343
+ children: s
2584
1344
  }
2585
- }
2586
- return (!e || e === ".") && n.route.index && (o.search = o.search ? o.search.replace(/^\?/, "?index&") : "?index"), r !== "/" && (o.pathname = o.pathname === "/" ? r : A([r, o.pathname])), we(o);
2587
- }
2588
- function tn(e, t = {}) {
2589
- let r = f.useContext(et);
2590
- $(
2591
- r != null,
2592
- "`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?"
2593
1345
  );
2594
- let { basename: a } = dt(
2595
- "useViewTransitionState"
2596
- /* useViewTransitionState */
2597
- ), n = re(e, { relative: t.relative });
2598
- if (!r.isTransitioning)
2599
- return !1;
2600
- let o = _(r.currentLocation.pathname, a) || r.currentLocation.pathname, s = _(r.nextLocation.pathname, a) || r.nextLocation.pathname;
2601
- return ie(n.pathname, s) != null || ie(n.pathname, o) != null;
2602
- }
2603
- const Nn = ({
2604
- children: e,
2605
- fallback: t = null,
2606
- redirectTo: r = "/"
1346
+ }, ht = ({
1347
+ children: t,
1348
+ onAuthenticated: s = null,
1349
+ onLoading: n = null
2607
1350
  }) => {
2608
- const { isLoggedIn: a, loading: n } = Ae();
2609
- return n ? t : a ? /* @__PURE__ */ i.jsx(ot, { replace: !0, to: r }) : e;
2610
- }, En = ({
2611
- children: e,
2612
- fallback: t = null,
2613
- redirectTo: r = "/login"
1351
+ const { isLoggedIn: o, loading: r } = de();
1352
+ return r ? n : o ? s : t;
1353
+ }, pt = ({
1354
+ children: t,
1355
+ onLoading: s = null,
1356
+ onUnauthenticated: n = null
2614
1357
  }) => {
2615
- const { isLoggedIn: a, loading: n } = Ae();
2616
- return n ? t : a ? e : /* @__PURE__ */ i.jsx(ot, { replace: !0, to: r });
1358
+ const { isLoggedIn: o, loading: r } = de();
1359
+ return r ? s : o ? t : n;
2617
1360
  };
2618
1361
  export {
2619
- cn as OxAvatar,
2620
- xt as OxAvatarImage,
2621
- dn as OxAvatarText,
2622
- se as OxBadge,
2623
- De as OxButton,
2624
- fn as OxCard,
2625
- hn as OxCardContent,
2626
- pn as OxCardFooter,
2627
- mn as OxCardHeader,
2628
- xn as OxCheckbox,
2629
- je as OxDescription,
2630
- Rt as OxDropdown,
2631
- _e as OxDropdownContent,
2632
- St as OxDropdownFooter,
2633
- Ve as OxDropdownHeader,
2634
- Pt as OxDropdownItem,
2635
- gn as OxDropdownSeparator,
2636
- bn as OxDropdownShortcut,
2637
- Ye as OxDropdownTrigger,
2638
- Ne as OxErrorMessage,
2639
- Sn as OxForm,
2640
- Nn as OxGuestRoute,
2641
- U as OxIcon,
2642
- Rn as OxInput,
2643
- Ce as OxLabel,
2644
- vn as OxNotificationDropdown,
2645
- En as OxProtectedRoute,
2646
- yn as OxSelect,
2647
- wn as OxSelectLabel,
2648
- Ft as OxSelectOption,
2649
- Bt as OxSkeleton,
2650
- Cn as OxSkeletonText,
2651
- jn as OxTextarea
1362
+ tt as OxAvatar,
1363
+ ye as OxAvatarImage,
1364
+ st as OxAvatarText,
1365
+ q as OxBadge,
1366
+ le as OxButton,
1367
+ rt as OxCard,
1368
+ ot as OxCardContent,
1369
+ lt as OxCardFooter,
1370
+ nt as OxCardHeader,
1371
+ at as OxCheckbox,
1372
+ se as OxDescription,
1373
+ We as OxDropdown,
1374
+ ue as OxDropdownContent,
1375
+ De as OxDropdownFooter,
1376
+ xe as OxDropdownHeader,
1377
+ Be as OxDropdownItem,
1378
+ it as OxDropdownSeparator,
1379
+ ct as OxDropdownShortcut,
1380
+ be as OxDropdownTrigger,
1381
+ re as OxErrorMessage,
1382
+ wt as OxForm,
1383
+ ht as OxGuestRoute,
1384
+ B as OxIcon,
1385
+ jt as OxInput,
1386
+ te as OxLabel,
1387
+ dt as OxNotificationDropdown,
1388
+ pt as OxProtectedRoute,
1389
+ ut as OxSelect,
1390
+ xt as OxSelectLabel,
1391
+ Te as OxSelectOption,
1392
+ _e as OxSkeleton,
1393
+ mt as OxSkeletonText,
1394
+ ft as OxTextarea,
1395
+ bt as OxTooltip
2652
1396
  };