@plyaz/ui 0.7.17 → 0.7.19

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/client.es.js CHANGED
@@ -1,43 +1,44 @@
1
- import { TextReveal as nt } from "./client/reveal-text.es.js";
2
- import { AlertDialog as dt, AlertDialogAction as st, AlertDialogCancel as lt, AlertDialogContent as ut, AlertDialogDescription as ct, AlertDialogFooter as bt, AlertDialogHeader as pt, AlertDialogOverlay as mt, AlertDialogPortal as gt, AlertDialogTitle as ft, AlertDialogTrigger as ht } from "./client/alert-dialog.es.js";
3
- import { Calendar as vt, CalendarDayButton as wt } from "./client/calendar.es.js";
4
- import { Carousel as Mt, CarouselContent as Ct, CarouselItem as Dt, CarouselNext as It, CarouselPrevious as Tt } from "./client/carousel.es.js";
5
- import { Combobox as At } from "./client/combobox.es.js";
6
- import { InputOTP as _t, InputOTPGroup as kt, InputOTPSeparator as Et, InputOTPSlot as zt } from "./client/input-otp.es.js";
7
- import { Slider as Rt } from "./client/slider.es.js";
8
- import { Progress as Bt } from "./client/progress.es.js";
9
- import { Accordion as Ht, AccordionContent as Lt, AccordionItem as Wt, AccordionTrigger as Ft } from "./client/accordion.es.js";
10
- import { Avatar as Kt, AvatarFallback as $t, AvatarImage as qt } from "./client/avatar.es.js";
11
- import { Checkbox as Ut } from "./client/checkbox.es.js";
12
- import { ContextMenu as Jt, ContextMenuCheckboxItem as Qt, ContextMenuContent as Yt, ContextMenuGroup as Zt, ContextMenuItem as ea, ContextMenuLabel as ta, ContextMenuPortal as aa, ContextMenuRadioGroup as ra, ContextMenuRadioItem as oa, ContextMenuSeparator as na, ContextMenuShortcut as ia, ContextMenuSub as da, ContextMenuSubContent as sa, ContextMenuSubTrigger as la, ContextMenuTrigger as ua } from "./client/context-menu.es.js";
13
- import { DropdownMenu as ba, DropdownMenuCheckboxItem as pa, DropdownMenuContent as ma, DropdownMenuGroup as ga, DropdownMenuItem as fa, DropdownMenuLabel as ha, DropdownMenuPortal as xa, DropdownMenuRadioGroup as va, DropdownMenuRadioItem as wa, DropdownMenuSeparator as Sa, DropdownMenuShortcut as Ma, DropdownMenuSub as Ca, DropdownMenuSubContent as Da, DropdownMenuSubTrigger as Ia, DropdownMenuTrigger as Ta } from "./client/dropdown-menu.es.js";
14
- import { HoverCard as Aa, HoverCardContent as ya, HoverCardTrigger as _a } from "./client/hover-card.es.js";
15
- import { RadioGroup as Ea, RadioGroupItem as za } from "./client/radio-group.es.js";
16
- import { ScrollArea as Ra, ScrollBar as Pa } from "./client/scroll-area.es.js";
17
- import { Switch as Ga } from "./client/switch.es.js";
18
- import { Tabs as La, TabsContent as Wa, TabsList as Fa, TabsTrigger as ja } from "./client/tabs.es.js";
19
- import { Tooltip as N, TooltipTrigger as A, TooltipContent as y, TooltipProvider as _ } from "./client/tooltip.es.js";
20
- import { Command as $a, CommandDialog as qa, CommandEmpty as Va, CommandGroup as Ua, CommandInput as Xa, CommandItem as Ja, CommandList as Qa, CommandSeparator as Ya, CommandShortcut as Za } from "./client/command.es.js";
21
- import { Dialog as tr, DialogClose as ar, DialogContent as rr, DialogDescription as or, DialogFooter as nr, DialogHeader as ir, DialogOverlay as dr, DialogPortal as sr, DialogTitle as lr, DialogTrigger as ur } from "./client/dialog.es.js";
22
- import { Drawer as br, DrawerClose as pr, DrawerContent as mr, DrawerDescription as gr, DrawerFooter as fr, DrawerHeader as hr, DrawerOverlay as xr, DrawerPortal as vr, DrawerTitle as wr, DrawerTrigger as Sr } from "./client/drawer.es.js";
23
- import { Sheet as k, SheetContent as E, SheetHeader as z, SheetTitle as O, SheetDescription as R } from "./client/sheet.es.js";
24
- import { SheetClose as Cr, SheetFooter as Dr, SheetTrigger as Ir } from "./client/sheet.es.js";
25
- import { Toaster as Nr } from "./client/toaster.es.js";
26
- import { Toggle as yr } from "./client/toggle.es.js";
27
- import { Label as kr } from "./client/label.es.js";
28
- import { Menubar as zr, MenubarCheckboxItem as Or, MenubarContent as Rr, MenubarGroup as Pr, MenubarItem as Br, MenubarLabel as Gr, MenubarMenu as Hr, MenubarPortal as Lr, MenubarRadioGroup as Wr, MenubarRadioItem as Fr, MenubarSeparator as jr, MenubarShortcut as Kr, MenubarSub as $r, MenubarSubContent as qr, MenubarSubTrigger as Vr, MenubarTrigger as Ur } from "./client/menu-bar.es.js";
29
- import { Popover as Jr, PopoverAnchor as Qr, PopoverContent as Yr, PopoverTrigger as Zr } from "./client/popover.es.js";
30
- import { jsx as a, jsxs as p } from "react/jsx-runtime";
31
- import * as s from "react";
32
- import { Slot as g } from "@radix-ui/react-slot";
33
- import { cva as P } from "class-variance-authority";
34
- import { PanelLeftIcon as B } from "lucide-react";
35
- import { c as n } from "./utils-B6yFEsav.js";
36
- import { I as G } from "./Textarea-BTbJSVLU.js";
37
- import { B as H } from "./Button-B7sEajdG.js";
1
+ import { TextReveal as sr } from "./client/reveal-text.es.js";
2
+ import { AlertDialog as lr, AlertDialogAction as ur, AlertDialogCancel as cr, AlertDialogContent as fr, AlertDialogDescription as mr, AlertDialogFooter as br, AlertDialogHeader as pr, AlertDialogOverlay as gr, AlertDialogPortal as hr, AlertDialogTitle as xr, AlertDialogTrigger as vr } from "./client/alert-dialog.es.js";
3
+ import { Calendar as Cr, CalendarDayButton as yr } from "./client/calendar.es.js";
4
+ import { Carousel as Mr, CarouselContent as Dr, CarouselItem as _r, CarouselNext as Ir, CarouselPrevious as Nr } from "./client/carousel.es.js";
5
+ import { Combobox as Fr } from "./client/combobox.es.js";
6
+ import { InputOTP as kr, InputOTPGroup as Er, InputOTPSeparator as Or, InputOTPSlot as Rr } from "./client/input-otp.es.js";
7
+ import { Slider as Pr } from "./client/slider.es.js";
8
+ import { Progress as Lr } from "./client/progress.es.js";
9
+ import { Accordion as Gr, AccordionContent as Hr, AccordionItem as Wr, AccordionTrigger as $r } from "./client/accordion.es.js";
10
+ import { Avatar as Kr, AvatarFallback as qr, AvatarImage as Xr } from "./client/avatar.es.js";
11
+ import { Checkbox as Qr } from "./client/checkbox.es.js";
12
+ import { ContextMenu as Zr, ContextMenuCheckboxItem as jr, ContextMenuContent as ea, ContextMenuGroup as ta, ContextMenuItem as ra, ContextMenuLabel as aa, ContextMenuPortal as oa, ContextMenuRadioGroup as na, ContextMenuRadioItem as ia, ContextMenuSeparator as sa, ContextMenuShortcut as da, ContextMenuSub as la, ContextMenuSubContent as ua, ContextMenuSubTrigger as ca, ContextMenuTrigger as fa } from "./client/context-menu.es.js";
13
+ import { DropdownMenu as ba, DropdownMenuCheckboxItem as pa, DropdownMenuContent as ga, DropdownMenuGroup as ha, DropdownMenuItem as xa, DropdownMenuLabel as va, DropdownMenuPortal as wa, DropdownMenuRadioGroup as Ca, DropdownMenuRadioItem as ya, DropdownMenuSeparator as Sa, DropdownMenuShortcut as Ma, DropdownMenuSub as Da, DropdownMenuSubContent as _a, DropdownMenuSubTrigger as Ia, DropdownMenuTrigger as Na } from "./client/dropdown-menu.es.js";
14
+ import { HoverCard as Fa, HoverCardContent as Ta, HoverCardTrigger as ka } from "./client/hover-card.es.js";
15
+ import { RadioGroup as Oa, RadioGroupItem as Ra } from "./client/radio-group.es.js";
16
+ import { ScrollArea as Pa, ScrollBar as Ba } from "./client/scroll-area.es.js";
17
+ import { Switch as za } from "./client/switch.es.js";
18
+ import { Tabs as Ha, TabsContent as Wa, TabsList as $a, TabsTrigger as Ua } from "./client/tabs.es.js";
19
+ import { Tooltip as ae, TooltipTrigger as oe, TooltipContent as ne, TooltipProvider as ie } from "./client/tooltip.es.js";
20
+ import { Command as qa, CommandDialog as Xa, CommandEmpty as Ja, CommandGroup as Qa, CommandInput as Ya, CommandItem as Za, CommandList as ja, CommandSeparator as eo, CommandShortcut as to } from "./client/command.es.js";
21
+ import { Dialog as ao, DialogClose as oo, DialogContent as no, DialogDescription as io, DialogFooter as so, DialogHeader as lo, DialogOverlay as uo, DialogPortal as co, DialogTitle as fo, DialogTrigger as mo } from "./client/dialog.es.js";
22
+ import { Drawer as po, DrawerClose as go, DrawerContent as ho, DrawerDescription as xo, DrawerFooter as vo, DrawerHeader as wo, DrawerOverlay as Co, DrawerPortal as yo, DrawerTitle as So, DrawerTrigger as Mo } from "./client/drawer.es.js";
23
+ import { Sheet as se, SheetContent as de, SheetHeader as le, SheetTitle as ue, SheetDescription as ce } from "./client/sheet.es.js";
24
+ import { SheetClose as _o, SheetFooter as Io, SheetTrigger as No } from "./client/sheet.es.js";
25
+ import { Toaster as Fo } from "./client/toaster.es.js";
26
+ import { Toggle as ko } from "./client/toggle.es.js";
27
+ import { Label as fe } from "./client/label.es.js";
28
+ import { Menubar as Oo, MenubarCheckboxItem as Ro, MenubarContent as Vo, MenubarGroup as Po, MenubarItem as Bo, MenubarLabel as Lo, MenubarMenu as zo, MenubarPortal as Go, MenubarRadioGroup as Ho, MenubarRadioItem as Wo, MenubarSeparator as $o, MenubarShortcut as Uo, MenubarSub as Ko, MenubarSubContent as qo, MenubarSubTrigger as Xo, MenubarTrigger as Jo } from "./client/menu-bar.es.js";
29
+ import { Popover as Yo, PopoverAnchor as Zo, PopoverContent as jo, PopoverTrigger as en } from "./client/popover.es.js";
30
+ import { jsx as n, jsxs as A } from "react/jsx-runtime";
31
+ import * as f from "react";
32
+ import d from "react";
33
+ import { Slot as F } from "@radix-ui/react-slot";
34
+ import { cva as me } from "class-variance-authority";
35
+ import { PanelLeftIcon as be } from "lucide-react";
36
+ import { c as u } from "./utils-B6yFEsav.js";
37
+ import { I as pe } from "./Textarea-BTbJSVLU.js";
38
+ import { B as ge } from "./Button-B7sEajdG.js";
38
39
  import "@radix-ui/react-select";
39
40
  import "next-intl";
40
- import { a as C, S as L } from "./Skeleton-Cj9Od_Nd.js";
41
+ import { a as G, S as he } from "./Skeleton-Cj9Od_Nd.js";
41
42
  import "@radix-ui/react-alert-dialog";
42
43
  import "react-day-picker";
43
44
  import "cmdk";
@@ -61,147 +62,150 @@ import "next-themes";
61
62
  import "sonner";
62
63
  import "@radix-ui/react-label";
63
64
  import "@radix-ui/react-menubar";
64
- var W = { WEEK: 6048e5 };
65
- const w = 768;
66
- function F() {
67
- const [t, e] = s.useState(void 0);
68
- return s.useEffect(() => {
69
- const r = window.matchMedia(`(max-width: ${w - 1}px)`), o = () => {
70
- e(window.innerWidth < w);
65
+ import "@radix-ui/react-separator";
66
+ import "@radix-ui/react-tooltip";
67
+ var xe = { WEEK: 6048e5 };
68
+ const V = 768;
69
+ function ve() {
70
+ const [e, r] = f.useState(void 0);
71
+ return f.useEffect(() => {
72
+ const t = window.matchMedia(`(max-width: ${V - 1}px)`), o = () => {
73
+ r(window.innerWidth < V);
71
74
  };
72
- return r.addEventListener("change", o), e(window.innerWidth < w), () => r.removeEventListener("change", o);
73
- }, []), !!t;
75
+ return t.addEventListener("change", o), r(window.innerWidth < V), () => t.removeEventListener("change", o);
76
+ }, []), !!e;
74
77
  }
75
- const j = "sidebar_state", K = W.WEEK, $ = "16rem", q = "18rem", V = "3rem", D = s.createContext(null);
76
- function h() {
77
- const t = s.useContext(D);
78
- if (!t)
78
+ const we = "sidebar_state", Ce = xe.WEEK, ye = "16rem", Se = "18rem", Me = "3rem", q = f.createContext(null);
79
+ function X() {
80
+ const e = f.useContext(q);
81
+ if (!e)
79
82
  throw new Error("useSidebar must be used within a SidebarProvider.");
80
- return t;
83
+ return e;
81
84
  }
82
- function Oe({
83
- defaultOpen: t = !0,
84
- open: e,
85
- onOpenChange: r,
85
+ function Ot({
86
+ defaultOpen: e = !0,
87
+ open: r,
88
+ onOpenChange: t,
86
89
  className: o,
87
- style: i,
88
- children: d,
89
- ...l
90
+ style: a,
91
+ children: i,
92
+ ...s
90
93
  }) {
91
- const u = F(), [c, b] = s.useState(!1), [f, I] = s.useState(t), m = e ?? f, S = s.useCallback(
92
- (x) => {
93
- const v = typeof x == "function" ? x(m) : x;
94
- r ? r(v) : I(v), document.cookie = `${j}=${v}; path=/; max-age=${K}`;
94
+ const l = ve(), [m, c] = f.useState(!1), [b, v] = f.useState(e), x = r ?? b, I = f.useCallback(
95
+ (C) => {
96
+ const y = typeof C == "function" ? C(x) : C;
97
+ t ? t(y) : v(y), document.cookie = `${we}=${y}; path=/; max-age=${Ce}`;
95
98
  },
96
- [r, m]
97
- ), M = m ? "expanded" : "collapsed", T = s.useMemo(
99
+ [t, x]
100
+ ), S = f.useCallback(() => {
101
+ }, []), M = x ? "expanded" : "collapsed", D = f.useMemo(
98
102
  () => ({
99
103
  state: M,
100
- open: m,
101
- setOpen: S,
102
- isMobile: u,
103
- openMobile: c,
104
- setOpenMobile: b,
105
- toggleSidebar
104
+ open: x,
105
+ setOpen: I,
106
+ isMobile: l,
107
+ openMobile: m,
108
+ setOpenMobile: c,
109
+ toggleSidebar: S
106
110
  }),
107
- [M, m, S, u, c, b, toggleSidebar]
111
+ [M, x, I, l, m, c, S]
108
112
  );
109
- return /* @__PURE__ */ a(D.Provider, { value: T, children: /* @__PURE__ */ a(_, { delayDuration: 0, children: /* @__PURE__ */ a(
113
+ return /* @__PURE__ */ n(q.Provider, { value: D, children: /* @__PURE__ */ n(ie, { delayDuration: 0, children: /* @__PURE__ */ n(
110
114
  "div",
111
115
  {
112
116
  "data-slot": "sidebar-wrapper",
113
117
  style: {
114
- "--sidebar-width": $,
115
- "--sidebar-width-icon": V,
116
- ...i
118
+ "--sidebar-width": ye,
119
+ "--sidebar-width-icon": Me,
120
+ ...a
117
121
  },
118
- className: n(
122
+ className: u(
119
123
  "group/sidebar-wrapper has-data-[variant=inset]:bg-sidebar flex min-h-svh w-full",
120
124
  o
121
125
  ),
122
- ...l,
123
- children: d
126
+ ...s,
127
+ children: i
124
128
  }
125
129
  ) }) });
126
130
  }
127
- function U({
128
- side: t,
129
- openMobile: e,
130
- setOpenMobile: r,
131
+ function De({
132
+ side: e,
133
+ openMobile: r,
134
+ setOpenMobile: t,
131
135
  children: o,
132
- ...i
136
+ ...a
133
137
  }) {
134
- return /* @__PURE__ */ a(k, { open: e, onOpenChange: r, ...i, children: /* @__PURE__ */ p(
135
- E,
138
+ return /* @__PURE__ */ n(se, { open: r, onOpenChange: t, ...a, children: /* @__PURE__ */ A(
139
+ de,
136
140
  {
137
141
  "data-sidebar": "sidebar",
138
142
  "data-slot": "sidebar",
139
143
  "data-mobile": "true",
140
144
  className: "bg-sidebar text-sidebar-foreground w-(--sidebar-width) p-0 [&>button]:hidden",
141
145
  style: {
142
- "--sidebar-width": q
146
+ "--sidebar-width": Se
143
147
  },
144
- side: t,
148
+ side: e,
145
149
  children: [
146
- /* @__PURE__ */ p(z, { className: "sr-only", children: [
147
- /* @__PURE__ */ a(O, { children: "Sidebar" }),
148
- /* @__PURE__ */ a(R, { children: "Displays the mobile sidebar." })
150
+ /* @__PURE__ */ A(le, { className: "sr-only", children: [
151
+ /* @__PURE__ */ n(ue, { children: "Sidebar" }),
152
+ /* @__PURE__ */ n(ce, { children: "Displays the mobile sidebar." })
149
153
  ] }),
150
- /* @__PURE__ */ a("div", { className: "flex h-full w-full flex-col", children: o })
154
+ /* @__PURE__ */ n("div", { className: "flex h-full w-full flex-col", children: o })
151
155
  ]
152
156
  }
153
157
  ) });
154
158
  }
155
- function X({
156
- side: t,
157
- variant: e,
158
- collapsible: r,
159
+ function _e({
160
+ side: e,
161
+ variant: r,
162
+ collapsible: t,
159
163
  state: o,
160
- className: i,
161
- children: d,
162
- ...l
164
+ className: a,
165
+ children: i,
166
+ ...s
163
167
  }) {
164
- return /* @__PURE__ */ p(
168
+ return /* @__PURE__ */ A(
165
169
  "div",
166
170
  {
167
171
  className: "group peer text-sidebar-foreground hidden md:block",
168
172
  "data-state": o,
169
- "data-collapsible": o === "collapsed" ? r : "",
170
- "data-variant": e,
171
- "data-side": t,
173
+ "data-collapsible": o === "collapsed" ? t : "",
174
+ "data-variant": r,
175
+ "data-side": e,
172
176
  "data-slot": "sidebar",
173
177
  children: [
174
- /* @__PURE__ */ a(
178
+ /* @__PURE__ */ n(
175
179
  "div",
176
180
  {
177
181
  "data-slot": "sidebar-gap",
178
- className: n(
182
+ className: u(
179
183
  "relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear",
180
184
  "group-data-[collapsible=offcanvas]:w-0",
181
185
  "group-data-[side=right]:rotate-180",
182
- e === "floating" || e === "inset" ? "group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]" : "group-data-[collapsible=icon]:w-(--sidebar-width-icon)"
186
+ r === "floating" || r === "inset" ? "group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]" : "group-data-[collapsible=icon]:w-(--sidebar-width-icon)"
183
187
  )
184
188
  }
185
189
  ),
186
- /* @__PURE__ */ a(
190
+ /* @__PURE__ */ n(
187
191
  "div",
188
192
  {
189
193
  "data-slot": "sidebar-container",
190
- className: n(
194
+ className: u(
191
195
  "fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear md:flex",
192
- t === "left" ? "left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]" : "right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]",
196
+ e === "left" ? "left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]" : "right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]",
193
197
  // Adjust the padding for floating and inset variants.
194
- e === "floating" || e === "inset" ? "p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]" : "group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l",
195
- i
198
+ r === "floating" || r === "inset" ? "p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]" : "group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l",
199
+ a
196
200
  ),
197
- ...l,
198
- children: /* @__PURE__ */ a(
201
+ ...s,
202
+ children: /* @__PURE__ */ n(
199
203
  "div",
200
204
  {
201
205
  "data-sidebar": "sidebar",
202
206
  "data-slot": "sidebar-inner",
203
207
  className: "bg-sidebar group-data-[variant=floating]:border-sidebar-border flex h-full w-full flex-col group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:shadow-sm",
204
- children: d
208
+ children: i
205
209
  }
206
210
  )
207
211
  }
@@ -210,241 +214,242 @@ function X({
210
214
  }
211
215
  );
212
216
  }
213
- function Re({
214
- side: t = "left",
215
- variant: e = "sidebar",
216
- collapsible: r = "offcanvas",
217
+ function Rt({
218
+ side: e = "left",
219
+ variant: r = "sidebar",
220
+ collapsible: t = "offcanvas",
217
221
  className: o,
218
- children: i,
219
- ...d
222
+ children: a,
223
+ ...i
220
224
  }) {
221
- const { isMobile: l, state: u, openMobile: c, setOpenMobile: b } = h();
222
- return r === "none" ? /* @__PURE__ */ a(
225
+ const { isMobile: s, state: l, openMobile: m, setOpenMobile: c } = X();
226
+ return t === "none" ? /* @__PURE__ */ n(
223
227
  "div",
224
228
  {
225
229
  "data-slot": "sidebar",
226
- className: n(
230
+ className: u(
227
231
  "bg-sidebar text-sidebar-foreground flex h-full w-(--sidebar-width) flex-col",
228
232
  o
229
233
  ),
230
- ...d,
231
- children: i
234
+ ...i,
235
+ children: a
232
236
  }
233
- ) : l ? /* @__PURE__ */ a(U, { side: t, openMobile: c, setOpenMobile: b, ...d, children: i }) : /* @__PURE__ */ a(
234
- X,
237
+ ) : s ? /* @__PURE__ */ n(De, { side: e, openMobile: m, setOpenMobile: c, ...i, children: a }) : /* @__PURE__ */ n(
238
+ _e,
235
239
  {
236
- side: t,
237
- variant: e,
238
- collapsible: r,
239
- state: u,
240
+ side: e,
241
+ variant: r,
242
+ collapsible: t,
243
+ state: l,
240
244
  className: o,
241
- ...d,
242
- children: i
245
+ ...i,
246
+ children: a
243
247
  }
244
248
  );
245
249
  }
246
- function Pe({ className: t, onClick: e, ...r }) {
247
- const { toggleSidebar: o } = h();
248
- return /* @__PURE__ */ p(
249
- H,
250
+ function Vt({ className: e, onClick: r, ...t }) {
251
+ return /* @__PURE__ */ A(
252
+ ge,
250
253
  {
251
254
  "data-sidebar": "trigger",
252
255
  "data-slot": "sidebar-trigger",
253
256
  variant: "ghost",
254
257
  size: "icon",
255
- className: n("size-7", t),
256
- onClick: (i) => {
257
- e == null || e(i), o();
258
+ className: u("size-7", e),
259
+ onClick: (o) => {
260
+ r == null || r(o);
258
261
  },
259
- ...r,
262
+ disabled: !0,
263
+ ...t,
260
264
  children: [
261
- /* @__PURE__ */ a(B, {}),
262
- /* @__PURE__ */ a("span", { className: "sr-only", children: "Toggle Sidebar" })
265
+ /* @__PURE__ */ n(be, {}),
266
+ /* @__PURE__ */ n("span", { className: "sr-only", children: "Toggle Sidebar" })
263
267
  ]
264
268
  }
265
269
  );
266
270
  }
267
- function Be({ className: t, ...e }) {
268
- const { toggleSidebar: r } = h();
269
- return /* @__PURE__ */ a(
271
+ function Pt({ className: e, ...r }) {
272
+ return /* @__PURE__ */ n(
270
273
  "button",
271
274
  {
272
275
  "data-sidebar": "rail",
273
276
  "data-slot": "sidebar-rail",
274
277
  "aria-label": "Toggle Sidebar",
275
278
  tabIndex: -1,
276
- onClick: r,
279
+ onClick: () => {
280
+ },
277
281
  title: "Toggle Sidebar",
278
- className: n(
282
+ disabled: !0,
283
+ className: u(
279
284
  "hover:after:bg-sidebar-border absolute inset-y-0 z-20 hidden w-4 -translate-x-1/2 transition-all ease-linear group-data-[side=left]:-right-4 group-data-[side=right]:left-0 after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] sm:flex",
280
285
  "in-data-[side=left]:cursor-w-resize in-data-[side=right]:cursor-e-resize",
281
286
  "[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize",
282
287
  "hover:group-data-[collapsible=offcanvas]:bg-sidebar group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full",
283
288
  "[[data-side=left][data-collapsible=offcanvas]_&]:-right-2",
284
289
  "[[data-side=right][data-collapsible=offcanvas]_&]:-left-2",
285
- t
290
+ e
286
291
  ),
287
- ...e
292
+ ...r
288
293
  }
289
294
  );
290
295
  }
291
- function Ge({ className: t, ...e }) {
292
- return /* @__PURE__ */ a(
296
+ function Bt({ className: e, ...r }) {
297
+ return /* @__PURE__ */ n(
293
298
  "main",
294
299
  {
295
300
  "data-slot": "sidebar-inset",
296
- className: n(
301
+ className: u(
297
302
  "bg-background relative flex w-full flex-1 flex-col",
298
303
  "md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2",
299
- t
304
+ e
300
305
  ),
301
- ...e
306
+ ...r
302
307
  }
303
308
  );
304
309
  }
305
- function He({ className: t, ...e }) {
306
- return /* @__PURE__ */ a(
307
- G,
310
+ function Lt({ className: e, ...r }) {
311
+ return /* @__PURE__ */ n(
312
+ pe,
308
313
  {
309
314
  "data-slot": "sidebar-input",
310
315
  "data-sidebar": "input",
311
- className: n("bg-background h-10 w-full shadow-none", t),
312
- ...e
316
+ className: u("bg-background h-10 w-full shadow-none", e),
317
+ ...r
313
318
  }
314
319
  );
315
320
  }
316
- function Le({ className: t, ...e }) {
317
- return /* @__PURE__ */ a(
321
+ function zt({ className: e, ...r }) {
322
+ return /* @__PURE__ */ n(
318
323
  "div",
319
324
  {
320
325
  "data-slot": "sidebar-header",
321
326
  "data-sidebar": "header",
322
- className: n("flex flex-col gap-3 p-2", t),
323
- ...e
327
+ className: u("flex flex-col gap-3 p-2", e),
328
+ ...r
324
329
  }
325
330
  );
326
331
  }
327
- function We({ className: t, ...e }) {
328
- return /* @__PURE__ */ a(
332
+ function Gt({ className: e, ...r }) {
333
+ return /* @__PURE__ */ n(
329
334
  "div",
330
335
  {
331
336
  "data-slot": "sidebar-footer",
332
337
  "data-sidebar": "footer",
333
- className: n("flex flex-col gap-3 p-2", t),
334
- ...e
338
+ className: u("flex flex-col gap-3 p-2", e),
339
+ ...r
335
340
  }
336
341
  );
337
342
  }
338
- function Fe({ className: t, ...e }) {
339
- return /* @__PURE__ */ a(
340
- L,
343
+ function Ht({ className: e, ...r }) {
344
+ return /* @__PURE__ */ n(
345
+ he,
341
346
  {
342
347
  "data-slot": "sidebar-separator",
343
348
  "data-sidebar": "separator",
344
- className: n("bg-sidebar-border mx-2 w-auto", t),
345
- ...e
349
+ className: u("bg-sidebar-border mx-2 w-auto", e),
350
+ ...r
346
351
  }
347
352
  );
348
353
  }
349
- function je({ className: t, ...e }) {
350
- return /* @__PURE__ */ a(
354
+ function Wt({ className: e, ...r }) {
355
+ return /* @__PURE__ */ n(
351
356
  "div",
352
357
  {
353
358
  "data-slot": "sidebar-content",
354
359
  "data-sidebar": "content",
355
- className: n(
360
+ className: u(
356
361
  "flex min-h-0 flex-1 flex-col gap-3 overflow-auto group-data-[collapsible=icon]:overflow-hidden",
357
- t
362
+ e
358
363
  ),
359
- ...e
364
+ ...r
360
365
  }
361
366
  );
362
367
  }
363
- function Ke({ className: t, ...e }) {
364
- return /* @__PURE__ */ a(
368
+ function $t({ className: e, ...r }) {
369
+ return /* @__PURE__ */ n(
365
370
  "div",
366
371
  {
367
372
  "data-slot": "sidebar-group",
368
373
  "data-sidebar": "group",
369
- className: n("relative flex w-full min-w-0 flex-col p-2", t),
370
- ...e
374
+ className: u("relative flex w-full min-w-0 flex-col p-2", e),
375
+ ...r
371
376
  }
372
377
  );
373
378
  }
374
- function $e({
375
- className: t,
376
- asChild: e = !1,
377
- ...r
379
+ function Ut({
380
+ className: e,
381
+ asChild: r = !1,
382
+ ...t
378
383
  }) {
379
- return /* @__PURE__ */ a(
380
- e ? g : "div",
384
+ return /* @__PURE__ */ n(
385
+ r ? F : "div",
381
386
  {
382
387
  "data-slot": "sidebar-group-label",
383
388
  "data-sidebar": "group-label",
384
- className: n(
389
+ className: u(
385
390
  "text-sidebar-foreground/70 ring-sidebar-ring flex h-10 shrink-0 items-center rounded-md px-2 text-xs font-medium outline-hidden transition-[margin,opacity] duration-200 ease-linear focus-visible:ring-2 [&>svg]:size-6 [&>svg]:shrink-0 [&>svg]:text-tertiary-foreground",
386
391
  "group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0",
387
- t
392
+ e
388
393
  ),
389
- ...r
394
+ ...t
390
395
  }
391
396
  );
392
397
  }
393
- function qe({
394
- className: t,
395
- asChild: e = !1,
396
- ...r
398
+ function Kt({
399
+ className: e,
400
+ asChild: r = !1,
401
+ ...t
397
402
  }) {
398
- return /* @__PURE__ */ a(
399
- e ? g : "button",
403
+ return /* @__PURE__ */ n(
404
+ r ? F : "button",
400
405
  {
401
406
  "data-slot": "sidebar-group-action",
402
407
  "data-sidebar": "group-action",
403
- className: n(
408
+ className: u(
404
409
  "text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground absolute top-3.5 right-3 flex aspect-square w-5 items-center justify-center rounded-md p-0 outline-hidden transition-transform focus-visible:ring-2 [&>svg]:size-6 [&>svg]:shrink-0 [&>svg]:text-tertiary-foreground",
405
410
  // Increases the hit area of the button on mobile.
406
411
  "after:absolute after:-inset-2 md:after:hidden",
407
412
  "group-data-[collapsible=icon]:hidden",
408
- t
413
+ e
409
414
  ),
410
- ...r
415
+ ...t
411
416
  }
412
417
  );
413
418
  }
414
- function Ve({ className: t, ...e }) {
415
- return /* @__PURE__ */ a(
419
+ function qt({ className: e, ...r }) {
420
+ return /* @__PURE__ */ n(
416
421
  "div",
417
422
  {
418
423
  "data-slot": "sidebar-group-content",
419
424
  "data-sidebar": "group-content",
420
- className: n("w-full text-sm", t),
421
- ...e
425
+ className: u("w-full text-sm", e),
426
+ ...r
422
427
  }
423
428
  );
424
429
  }
425
- function Ue({ className: t, ...e }) {
426
- return /* @__PURE__ */ a(
430
+ function Xt({ className: e, ...r }) {
431
+ return /* @__PURE__ */ n(
427
432
  "ul",
428
433
  {
429
434
  "data-slot": "sidebar-menu",
430
435
  "data-sidebar": "menu",
431
- className: n("flex w-full min-w-0 flex-col gap-1", t),
432
- ...e
436
+ className: u("flex w-full min-w-0 flex-col gap-1", e),
437
+ ...r
433
438
  }
434
439
  );
435
440
  }
436
- function Xe({ className: t, ...e }) {
437
- return /* @__PURE__ */ a(
441
+ function Jt({ className: e, ...r }) {
442
+ return /* @__PURE__ */ n(
438
443
  "li",
439
444
  {
440
445
  "data-slot": "sidebar-menu-item",
441
446
  "data-sidebar": "menu-item",
442
- className: n("group/menu-item relative", t),
443
- ...e
447
+ className: u("group/menu-item relative", e),
448
+ ...r
444
449
  }
445
450
  );
446
451
  }
447
- const J = P(
452
+ const Ie = me(
448
453
  "peer/menu-button flex w-full items-center gap-3 overflow-hidden rounded-md p-2 text-left text-sm font-medium outline-hidden ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-data-[sidebar=menu-action]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! [&>span:last-child]:truncate [&>svg]:size-6 [&>svg]:shrink-0 [&>svg]:text-tertiary-foreground",
449
454
  {
450
455
  variants: {
@@ -464,53 +469,53 @@ const J = P(
464
469
  }
465
470
  }
466
471
  );
467
- function Je({
468
- asChild: t = !1,
469
- isActive: e = !1,
470
- variant: r = "default",
472
+ function Qt({
473
+ asChild: e = !1,
474
+ isActive: r = !1,
475
+ variant: t = "default",
471
476
  size: o = "default",
472
- tooltip: i,
473
- className: d,
474
- ...l
477
+ tooltip: a,
478
+ className: i,
479
+ ...s
475
480
  }) {
476
- const u = t ? g : "button", { isMobile: c, state: b } = h(), f = /* @__PURE__ */ a(
477
- u,
481
+ const l = e ? F : "button", { isMobile: m, state: c } = X(), b = /* @__PURE__ */ n(
482
+ l,
478
483
  {
479
484
  "data-slot": "sidebar-menu-button",
480
485
  "data-sidebar": "menu-button",
481
486
  "data-size": o,
482
- "data-active": e,
483
- className: n(J({ variant: r, size: o }), d),
484
- ...l
487
+ "data-active": r,
488
+ className: u(Ie({ variant: t, size: o }), i),
489
+ ...s
485
490
  }
486
491
  );
487
- return i ? (typeof i == "string" && (i = {
488
- children: i
489
- }), /* @__PURE__ */ p(N, { children: [
490
- /* @__PURE__ */ a(A, { asChild: !0, children: f }),
491
- /* @__PURE__ */ a(
492
- y,
492
+ return a ? (typeof a == "string" && (a = {
493
+ children: a
494
+ }), /* @__PURE__ */ A(ae, { children: [
495
+ /* @__PURE__ */ n(oe, { asChild: !0, children: b }),
496
+ /* @__PURE__ */ n(
497
+ ne,
493
498
  {
494
499
  side: "right",
495
500
  align: "center",
496
- hidden: b !== "collapsed" || c,
497
- ...i
501
+ hidden: c !== "collapsed" || m,
502
+ ...a
498
503
  }
499
504
  )
500
- ] })) : f;
505
+ ] })) : b;
501
506
  }
502
- function Qe({
503
- className: t,
504
- asChild: e = !1,
505
- showOnHover: r = !1,
507
+ function Yt({
508
+ className: e,
509
+ asChild: r = !1,
510
+ showOnHover: t = !1,
506
511
  ...o
507
512
  }) {
508
- return /* @__PURE__ */ a(
509
- e ? g : "button",
513
+ return /* @__PURE__ */ n(
514
+ r ? F : "button",
510
515
  {
511
516
  "data-slot": "sidebar-menu-action",
512
517
  "data-sidebar": "menu-action",
513
- className: n(
518
+ className: u(
514
519
  "text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground peer-hover/menu-button:text-sidebar-accent-foreground absolute top-1.5 right-1 flex aspect-square w-5 items-center justify-center rounded-md p-0 outline-hidden transition-transform focus-visible:ring-2 [&>svg]:size-6 [&>svg]:shrink-0 [&>svg]:text-tertiary-foreground",
515
520
  // Increases the hit area of the button on mobile.
516
521
  "after:absolute after:-inset-2 md:after:hidden",
@@ -518,50 +523,50 @@ function Qe({
518
523
  "peer-data-[size=default]/menu-button:top-1.5",
519
524
  "peer-data-[size=lg]/menu-button:top-2.5",
520
525
  "group-data-[collapsible=icon]:hidden",
521
- r && "peer-data-[active=true]/menu-button:text-sidebar-accent-foreground group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-[state=open]:opacity-100 md:opacity-0",
522
- t
526
+ t && "peer-data-[active=true]/menu-button:text-sidebar-accent-foreground group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-[state=open]:opacity-100 md:opacity-0",
527
+ e
523
528
  ),
524
529
  ...o
525
530
  }
526
531
  );
527
532
  }
528
- function Ye({ className: t, ...e }) {
529
- return /* @__PURE__ */ a(
533
+ function Zt({ className: e, ...r }) {
534
+ return /* @__PURE__ */ n(
530
535
  "div",
531
536
  {
532
537
  "data-slot": "sidebar-menu-badge",
533
538
  "data-sidebar": "menu-badge",
534
- className: n(
539
+ className: u(
535
540
  "text-sidebar-foreground pointer-events-none absolute right-1 flex h-5 min-w-5 items-center justify-center rounded-md px-1 text-xs font-medium tabular-nums select-none",
536
541
  "peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[active=true]/menu-button:text-sidebar-accent-foreground",
537
542
  "peer-data-[size=sm]/menu-button:top-1",
538
543
  "peer-data-[size=default]/menu-button:top-1.5",
539
544
  "peer-data-[size=lg]/menu-button:top-2.5",
540
545
  "group-data-[collapsible=icon]:hidden",
541
- t
546
+ e
542
547
  ),
543
- ...e
548
+ ...r
544
549
  }
545
550
  );
546
551
  }
547
- const Q = 50, Y = 40;
548
- function Ze({
549
- className: t,
550
- showIcon: e = !1,
551
- ...r
552
+ const Ne = 50, Ae = 40;
553
+ function jt({
554
+ className: e,
555
+ showIcon: r = !1,
556
+ ...t
552
557
  }) {
553
- const o = s.useMemo(() => `${Math.floor(Math.random() * Y) + Q}%`, []);
554
- return /* @__PURE__ */ p(
558
+ const o = f.useMemo(() => `${Math.floor(Math.random() * Ae) + Ne}%`, []);
559
+ return /* @__PURE__ */ A(
555
560
  "div",
556
561
  {
557
562
  "data-slot": "sidebar-menu-skeleton",
558
563
  "data-sidebar": "menu-skeleton",
559
- className: n("flex h-10 items-center gap-3 rounded-md px-2", t),
560
- ...r,
564
+ className: u("flex h-10 items-center gap-3 rounded-md px-2", e),
565
+ ...t,
561
566
  children: [
562
- e && /* @__PURE__ */ a(C, { className: "size-6 rounded-md", "data-sidebar": "menu-skeleton-icon" }),
563
- /* @__PURE__ */ a(
564
- C,
567
+ r && /* @__PURE__ */ n(G, { className: "size-6 rounded-md", "data-sidebar": "menu-skeleton-icon" }),
568
+ /* @__PURE__ */ n(
569
+ G,
565
570
  {
566
571
  className: "h-4 max-w-(--skeleton-width) flex-1",
567
572
  "data-sidebar": "menu-skeleton-text",
@@ -574,221 +579,552 @@ function Ze({
574
579
  }
575
580
  );
576
581
  }
577
- function et({ className: t, ...e }) {
578
- return /* @__PURE__ */ a(
582
+ function er({ className: e, ...r }) {
583
+ return /* @__PURE__ */ n(
579
584
  "ul",
580
585
  {
581
586
  "data-slot": "sidebar-menu-sub",
582
587
  "data-sidebar": "menu-sub",
583
- className: n(
588
+ className: u(
584
589
  "border-sidebar-border mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l px-2.5 py-0.5",
585
590
  "group-data-[collapsible=icon]:hidden",
586
- t
591
+ e
587
592
  ),
588
- ...e
593
+ ...r
589
594
  }
590
595
  );
591
596
  }
592
- function tt({ className: t, ...e }) {
593
- return /* @__PURE__ */ a(
597
+ function tr({ className: e, ...r }) {
598
+ return /* @__PURE__ */ n(
594
599
  "li",
595
600
  {
596
601
  "data-slot": "sidebar-menu-sub-item",
597
602
  "data-sidebar": "menu-sub-item",
598
- className: n("group/menu-sub-item relative", t),
599
- ...e
603
+ className: u("group/menu-sub-item relative", e),
604
+ ...r
600
605
  }
601
606
  );
602
607
  }
603
- function at({
604
- asChild: t = !1,
605
- size: e = "md",
606
- isActive: r = !1,
608
+ function rr({
609
+ asChild: e = !1,
610
+ size: r = "md",
611
+ isActive: t = !1,
607
612
  className: o,
608
- ...i
613
+ ...a
609
614
  }) {
610
- return /* @__PURE__ */ a(
611
- t ? g : "a",
615
+ return /* @__PURE__ */ n(
616
+ e ? F : "a",
612
617
  {
613
618
  "data-slot": "sidebar-menu-sub-button",
614
619
  "data-sidebar": "menu-sub-button",
615
- "data-size": e,
616
- "data-active": r,
617
- className: n(
620
+ "data-size": r,
621
+ "data-active": t,
622
+ className: u(
618
623
  "text-sidebar-foreground ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground active:bg-sidebar-accent active:text-sidebar-accent-foreground [&>svg]:text-tertiary-foreground flex h-7 min-w-0 -translate-x-px items-center gap-3 overflow-hidden rounded-md px-2 outline-hidden focus-visible:ring-2 disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:size-6 [&>svg]:shrink-0",
619
624
  "data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground",
620
- e === "sm" && "text-xs",
621
- e === "md" && "text-sm",
625
+ r === "sm" && "text-xs",
626
+ r === "md" && "text-sm",
622
627
  "group-data-[collapsible=icon]:hidden",
623
628
  o
624
629
  ),
625
- ...i
630
+ ...a
626
631
  }
627
632
  );
628
633
  }
634
+ var Fe = (e) => e.type === "checkbox", T = (e) => e instanceof Date, L = (e) => e == null;
635
+ const J = (e) => typeof e == "object";
636
+ var N = (e) => !L(e) && !Array.isArray(e) && J(e) && !T(e), Te = (e) => N(e) && e.target ? Fe(e.target) ? e.target.checked : e.target.value : e, ke = (e) => e.substring(0, e.search(/\.\d+(\.|$)/)) || e, Ee = (e, r) => e.has(ke(r)), Oe = (e) => {
637
+ const r = e.constructor && e.constructor.prototype;
638
+ return N(r) && r.hasOwnProperty("isPrototypeOf");
639
+ }, Re = typeof window < "u" && typeof window.HTMLElement < "u" && typeof document < "u";
640
+ function Q(e) {
641
+ let r;
642
+ const t = Array.isArray(e), o = typeof FileList < "u" ? e instanceof FileList : !1;
643
+ if (e instanceof Date)
644
+ r = new Date(e);
645
+ else if (!(Re && (e instanceof Blob || o)) && (t || N(e)))
646
+ if (r = t ? [] : Object.create(Object.getPrototypeOf(e)), !t && !Oe(e))
647
+ r = e;
648
+ else
649
+ for (const a in e)
650
+ e.hasOwnProperty(a) && (r[a] = Q(e[a]));
651
+ else
652
+ return e;
653
+ return r;
654
+ }
655
+ var Y = (e) => /^\w*$/.test(e), B = (e) => e === void 0, Ve = (e) => Array.isArray(e) ? e.filter(Boolean) : [], Z = (e) => Ve(e.replace(/["|']|\]/g, "").split(/\.|\[/)), h = (e, r, t) => {
656
+ if (!r || !N(e))
657
+ return t;
658
+ const o = (Y(r) ? [r] : Z(r)).reduce((a, i) => L(a) ? a : a[i], e);
659
+ return B(o) || o === e ? B(e[r]) ? t : e[r] : o;
660
+ }, P = (e) => typeof e == "boolean", H = (e, r, t) => {
661
+ let o = -1;
662
+ const a = Y(r) ? [r] : Z(r), i = a.length, s = i - 1;
663
+ for (; ++o < i; ) {
664
+ const l = a[o];
665
+ let m = t;
666
+ if (o !== s) {
667
+ const c = e[l];
668
+ m = N(c) || Array.isArray(c) ? c : isNaN(+a[o + 1]) ? {} : [];
669
+ }
670
+ if (l === "__proto__" || l === "constructor" || l === "prototype")
671
+ return;
672
+ e[l] = m, e = e[l];
673
+ }
674
+ };
675
+ const W = {
676
+ BLUR: "blur",
677
+ CHANGE: "change"
678
+ }, $ = {
679
+ all: "all"
680
+ }, z = d.createContext(null);
681
+ z.displayName = "HookFormContext";
682
+ const E = () => d.useContext(z), Pe = (e) => {
683
+ const { children: r, ...t } = e;
684
+ return d.createElement(z.Provider, { value: t }, r);
685
+ };
686
+ var Be = (e, r, t, o = !0) => {
687
+ const a = {
688
+ defaultValues: r._defaultValues
689
+ };
690
+ for (const i in e)
691
+ Object.defineProperty(a, i, {
692
+ get: () => {
693
+ const s = i;
694
+ return r._proxyFormState[s] !== $.all && (r._proxyFormState[s] = !o || $.all), t && (t[s] = !0), e[s];
695
+ }
696
+ });
697
+ return a;
698
+ };
699
+ const j = typeof window < "u" ? d.useLayoutEffect : d.useEffect;
700
+ function Le(e) {
701
+ const r = E(), { control: t = r.control, disabled: o, name: a, exact: i } = e || {}, [s, l] = d.useState(t._formState), m = d.useRef({
702
+ isDirty: !1,
703
+ isLoading: !1,
704
+ dirtyFields: !1,
705
+ touchedFields: !1,
706
+ validatingFields: !1,
707
+ isValidating: !1,
708
+ isValid: !1,
709
+ errors: !1
710
+ });
711
+ return j(() => t._subscribe({
712
+ name: a,
713
+ formState: m.current,
714
+ exact: i,
715
+ callback: (c) => {
716
+ !o && l({
717
+ ...t._formState,
718
+ ...c
719
+ });
720
+ }
721
+ }), [a, o, i]), d.useEffect(() => {
722
+ m.current.isValid && t._setValid(!0);
723
+ }, [t]), d.useMemo(() => Be(s, t, m.current, !1), [s, t]);
724
+ }
725
+ var ze = (e) => typeof e == "string", U = (e, r, t, o, a) => ze(e) ? h(t, e, a) : Array.isArray(e) ? e.map((i) => h(t, i)) : t, K = (e) => L(e) || !J(e);
726
+ function k(e, r, t = /* @__PURE__ */ new WeakSet()) {
727
+ if (K(e) || K(r))
728
+ return e === r;
729
+ if (T(e) && T(r))
730
+ return e.getTime() === r.getTime();
731
+ const o = Object.keys(e), a = Object.keys(r);
732
+ if (o.length !== a.length)
733
+ return !1;
734
+ if (t.has(e) || t.has(r))
735
+ return !0;
736
+ t.add(e), t.add(r);
737
+ for (const i of o) {
738
+ const s = e[i];
739
+ if (!a.includes(i))
740
+ return !1;
741
+ if (i !== "ref") {
742
+ const l = r[i];
743
+ if (T(s) && T(l) || N(s) && N(l) || Array.isArray(s) && Array.isArray(l) ? !k(s, l, t) : s !== l)
744
+ return !1;
745
+ }
746
+ }
747
+ return !0;
748
+ }
749
+ function Ge(e) {
750
+ const r = E(), { control: t = r.control, name: o, defaultValue: a, disabled: i, exact: s, compute: l } = e || {}, m = d.useRef(a), c = d.useRef(l), b = d.useRef(void 0), v = d.useRef(t), x = d.useRef(o);
751
+ c.current = l;
752
+ const [I, S] = d.useState(() => {
753
+ const p = t._getWatch(o, m.current);
754
+ return c.current ? c.current(p) : p;
755
+ }), M = d.useCallback((p) => {
756
+ const w = U(o, t._names, p || t._formValues, !1, m.current);
757
+ return c.current ? c.current(w) : w;
758
+ }, [t._formValues, t._names, o]), D = d.useCallback((p) => {
759
+ if (!i) {
760
+ const w = U(o, t._names, p || t._formValues, !1, m.current);
761
+ if (c.current) {
762
+ const _ = c.current(w);
763
+ k(_, b.current) || (S(_), b.current = _);
764
+ } else
765
+ S(w);
766
+ }
767
+ }, [t._formValues, t._names, i, o]);
768
+ j(() => ((v.current !== t || !k(x.current, o)) && (v.current = t, x.current = o, D()), t._subscribe({
769
+ name: o,
770
+ formState: {
771
+ values: !0
772
+ },
773
+ exact: s,
774
+ callback: (p) => {
775
+ D(p.values);
776
+ }
777
+ })), [t, s, o, D]), d.useEffect(() => t._removeUnmounted());
778
+ const C = v.current !== t, y = x.current, g = d.useMemo(() => {
779
+ if (i)
780
+ return null;
781
+ const p = !C && !k(y, o);
782
+ return C || p ? M() : null;
783
+ }, [i, C, o, y, M]);
784
+ return g !== null ? g : I;
785
+ }
786
+ function He(e) {
787
+ const r = E(), { name: t, disabled: o, control: a = r.control, shouldUnregister: i, defaultValue: s } = e, l = Ee(a._names.array, t), m = d.useMemo(() => h(a._formValues, t, h(a._defaultValues, t, s)), [a, t, s]), c = Ge({
788
+ control: a,
789
+ name: t,
790
+ defaultValue: m,
791
+ exact: !0
792
+ }), b = Le({
793
+ control: a,
794
+ name: t,
795
+ exact: !0
796
+ }), v = d.useRef(e), x = d.useRef(void 0), I = d.useRef(a.register(t, {
797
+ ...e.rules,
798
+ value: c,
799
+ ...P(e.disabled) ? { disabled: e.disabled } : {}
800
+ }));
801
+ v.current = e;
802
+ const S = d.useMemo(() => Object.defineProperties({}, {
803
+ invalid: {
804
+ enumerable: !0,
805
+ get: () => !!h(b.errors, t)
806
+ },
807
+ isDirty: {
808
+ enumerable: !0,
809
+ get: () => !!h(b.dirtyFields, t)
810
+ },
811
+ isTouched: {
812
+ enumerable: !0,
813
+ get: () => !!h(b.touchedFields, t)
814
+ },
815
+ isValidating: {
816
+ enumerable: !0,
817
+ get: () => !!h(b.validatingFields, t)
818
+ },
819
+ error: {
820
+ enumerable: !0,
821
+ get: () => h(b.errors, t)
822
+ }
823
+ }), [b, t]), M = d.useCallback((g) => I.current.onChange({
824
+ target: {
825
+ value: Te(g),
826
+ name: t
827
+ },
828
+ type: W.CHANGE
829
+ }), [t]), D = d.useCallback(() => I.current.onBlur({
830
+ target: {
831
+ value: h(a._formValues, t),
832
+ name: t
833
+ },
834
+ type: W.BLUR
835
+ }), [t, a._formValues]), C = d.useCallback((g) => {
836
+ const p = h(a._fields, t);
837
+ p && g && (p._f.ref = {
838
+ focus: () => g.focus && g.focus(),
839
+ select: () => g.select && g.select(),
840
+ setCustomValidity: (w) => g.setCustomValidity(w),
841
+ reportValidity: () => g.reportValidity()
842
+ });
843
+ }, [a._fields, t]), y = d.useMemo(() => ({
844
+ name: t,
845
+ value: c,
846
+ ...P(o) || b.disabled ? { disabled: b.disabled || o } : {},
847
+ onChange: M,
848
+ onBlur: D,
849
+ ref: C
850
+ }), [t, o, b.disabled, M, D, C, c]);
851
+ return d.useEffect(() => {
852
+ const g = a._options.shouldUnregister || i, p = x.current;
853
+ p && p !== t && !l && a.unregister(p), a.register(t, {
854
+ ...v.current.rules,
855
+ ...P(v.current.disabled) ? { disabled: v.current.disabled } : {}
856
+ });
857
+ const w = (_, re) => {
858
+ const R = h(a._fields, _);
859
+ R && R._f && (R._f.mount = re);
860
+ };
861
+ if (w(t, !0), g) {
862
+ const _ = Q(h(a._options.defaultValues, t, v.current.defaultValue));
863
+ H(a._defaultValues, t, _), B(h(a._formValues, t)) && H(a._formValues, t, _);
864
+ }
865
+ return !l && a.register(t), x.current = t, () => {
866
+ (l ? g && !a._state.action : g) ? a.unregister(t) : w(t, !1);
867
+ };
868
+ }, [t, a, l, i]), d.useEffect(() => {
869
+ a._setDisabledField({
870
+ disabled: o,
871
+ name: t
872
+ });
873
+ }, [o, t, a]), d.useMemo(() => ({
874
+ field: y,
875
+ formState: b,
876
+ fieldState: S
877
+ }), [y, b, S]);
878
+ }
879
+ const We = (e) => e.render(He(e)), ar = Pe, ee = f.createContext(null), or = ({
880
+ ...e
881
+ }) => /* @__PURE__ */ n(ee.Provider, { value: { name: e.name }, children: /* @__PURE__ */ n(We, { ...e }) }), O = () => {
882
+ const e = f.useContext(ee), r = f.useContext(te), { getFieldState: t, formState: o } = E();
883
+ if (!e)
884
+ throw new Error("useFormField should be used within <FormField>");
885
+ if (!r)
886
+ throw new Error("useFormField should be used within <FormItem>");
887
+ const a = t(e.name, o), { id: i } = r;
888
+ return {
889
+ id: i,
890
+ name: e.name,
891
+ formItemId: `${i}-form-item`,
892
+ formDescriptionId: `${i}-form-item-description`,
893
+ formMessageId: `${i}-form-item-message`,
894
+ ...a
895
+ };
896
+ }, te = f.createContext(null), $e = f.forwardRef(
897
+ ({ className: e, ...r }, t) => {
898
+ const o = f.useId();
899
+ return /* @__PURE__ */ n(te.Provider, { value: { id: o }, children: /* @__PURE__ */ n("div", { ref: t, className: u("space-y-2", e), ...r }) });
900
+ }
901
+ );
902
+ $e.displayName = "FormItem";
903
+ const Ue = f.forwardRef(({ className: e, ...r }, t) => {
904
+ const { error: o, formItemId: a } = O();
905
+ return /* @__PURE__ */ n(
906
+ fe,
907
+ {
908
+ ref: t,
909
+ className: u(o && "text-destructive", e),
910
+ htmlFor: a,
911
+ ...r
912
+ }
913
+ );
914
+ });
915
+ Ue.displayName = "FormLabel";
916
+ const Ke = f.forwardRef(({ ...e }, r) => {
917
+ const { error: t, formItemId: o, formDescriptionId: a, formMessageId: i } = O();
918
+ return /* @__PURE__ */ n(
919
+ F,
920
+ {
921
+ ref: r,
922
+ id: o,
923
+ "aria-describedby": t ? `${a} ${i}` : `${a}`,
924
+ "aria-invalid": !!t,
925
+ ...e
926
+ }
927
+ );
928
+ });
929
+ Ke.displayName = "FormControl";
930
+ const qe = f.forwardRef(({ className: e, ...r }, t) => {
931
+ const { formDescriptionId: o } = O();
932
+ return /* @__PURE__ */ n(
933
+ "p",
934
+ {
935
+ ref: t,
936
+ id: o,
937
+ className: u("text-[0.8rem] text-muted-foreground", e),
938
+ ...r
939
+ }
940
+ );
941
+ });
942
+ qe.displayName = "FormDescription";
943
+ const Xe = f.forwardRef(({ className: e, children: r, ...t }, o) => {
944
+ const { error: a, formMessageId: i } = O(), s = a ? String((a == null ? void 0 : a.message) ?? "") : r;
945
+ return s ? /* @__PURE__ */ n(
946
+ "p",
947
+ {
948
+ ref: o,
949
+ id: i,
950
+ className: u("font-medium text-[0.8rem] text-destructive", e),
951
+ ...t,
952
+ children: s
953
+ }
954
+ ) : null;
955
+ });
956
+ Xe.displayName = "FormMessage";
629
957
  export {
630
- Ht as Accordion,
631
- Lt as AccordionContent,
632
- Wt as AccordionItem,
633
- Ft as AccordionTrigger,
634
- dt as AlertDialog,
635
- st as AlertDialogAction,
636
- lt as AlertDialogCancel,
637
- ut as AlertDialogContent,
638
- ct as AlertDialogDescription,
639
- bt as AlertDialogFooter,
640
- pt as AlertDialogHeader,
641
- mt as AlertDialogOverlay,
642
- gt as AlertDialogPortal,
643
- ft as AlertDialogTitle,
644
- ht as AlertDialogTrigger,
645
- Kt as Avatar,
646
- $t as AvatarFallback,
647
- qt as AvatarImage,
648
- vt as Calendar,
649
- wt as CalendarDayButton,
650
- Mt as Carousel,
651
- Ct as CarouselContent,
652
- Dt as CarouselItem,
653
- It as CarouselNext,
654
- Tt as CarouselPrevious,
655
- Ut as Checkbox,
656
- At as Combobox,
657
- $a as Command,
658
- qa as CommandDialog,
659
- Va as CommandEmpty,
660
- Ua as CommandGroup,
661
- Xa as CommandInput,
662
- Ja as CommandItem,
663
- Qa as CommandList,
664
- Ya as CommandSeparator,
665
- Za as CommandShortcut,
666
- Jt as ContextMenu,
667
- Qt as ContextMenuCheckboxItem,
668
- Yt as ContextMenuContent,
669
- Zt as ContextMenuGroup,
670
- ea as ContextMenuItem,
671
- ta as ContextMenuLabel,
672
- aa as ContextMenuPortal,
673
- ra as ContextMenuRadioGroup,
674
- oa as ContextMenuRadioItem,
675
- na as ContextMenuSeparator,
676
- ia as ContextMenuShortcut,
677
- da as ContextMenuSub,
678
- sa as ContextMenuSubContent,
679
- la as ContextMenuSubTrigger,
680
- ua as ContextMenuTrigger,
681
- tr as Dialog,
682
- ar as DialogClose,
683
- rr as DialogContent,
684
- or as DialogDescription,
685
- nr as DialogFooter,
686
- ir as DialogHeader,
687
- dr as DialogOverlay,
688
- sr as DialogPortal,
689
- lr as DialogTitle,
690
- ur as DialogTrigger,
691
- br as Drawer,
692
- pr as DrawerClose,
693
- mr as DrawerContent,
694
- gr as DrawerDescription,
695
- fr as DrawerFooter,
696
- hr as DrawerHeader,
697
- xr as DrawerOverlay,
698
- vr as DrawerPortal,
699
- wr as DrawerTitle,
700
- Sr as DrawerTrigger,
958
+ Gr as Accordion,
959
+ Hr as AccordionContent,
960
+ Wr as AccordionItem,
961
+ $r as AccordionTrigger,
962
+ lr as AlertDialog,
963
+ ur as AlertDialogAction,
964
+ cr as AlertDialogCancel,
965
+ fr as AlertDialogContent,
966
+ mr as AlertDialogDescription,
967
+ br as AlertDialogFooter,
968
+ pr as AlertDialogHeader,
969
+ gr as AlertDialogOverlay,
970
+ hr as AlertDialogPortal,
971
+ xr as AlertDialogTitle,
972
+ vr as AlertDialogTrigger,
973
+ Kr as Avatar,
974
+ qr as AvatarFallback,
975
+ Xr as AvatarImage,
976
+ Cr as Calendar,
977
+ yr as CalendarDayButton,
978
+ Mr as Carousel,
979
+ Dr as CarouselContent,
980
+ _r as CarouselItem,
981
+ Ir as CarouselNext,
982
+ Nr as CarouselPrevious,
983
+ Qr as Checkbox,
984
+ Fr as Combobox,
985
+ qa as Command,
986
+ Xa as CommandDialog,
987
+ Ja as CommandEmpty,
988
+ Qa as CommandGroup,
989
+ Ya as CommandInput,
990
+ Za as CommandItem,
991
+ ja as CommandList,
992
+ eo as CommandSeparator,
993
+ to as CommandShortcut,
994
+ Zr as ContextMenu,
995
+ jr as ContextMenuCheckboxItem,
996
+ ea as ContextMenuContent,
997
+ ta as ContextMenuGroup,
998
+ ra as ContextMenuItem,
999
+ aa as ContextMenuLabel,
1000
+ oa as ContextMenuPortal,
1001
+ na as ContextMenuRadioGroup,
1002
+ ia as ContextMenuRadioItem,
1003
+ sa as ContextMenuSeparator,
1004
+ da as ContextMenuShortcut,
1005
+ la as ContextMenuSub,
1006
+ ua as ContextMenuSubContent,
1007
+ ca as ContextMenuSubTrigger,
1008
+ fa as ContextMenuTrigger,
1009
+ ao as Dialog,
1010
+ oo as DialogClose,
1011
+ no as DialogContent,
1012
+ io as DialogDescription,
1013
+ so as DialogFooter,
1014
+ lo as DialogHeader,
1015
+ uo as DialogOverlay,
1016
+ co as DialogPortal,
1017
+ fo as DialogTitle,
1018
+ mo as DialogTrigger,
1019
+ po as Drawer,
1020
+ go as DrawerClose,
1021
+ ho as DrawerContent,
1022
+ xo as DrawerDescription,
1023
+ vo as DrawerFooter,
1024
+ wo as DrawerHeader,
1025
+ Co as DrawerOverlay,
1026
+ yo as DrawerPortal,
1027
+ So as DrawerTitle,
1028
+ Mo as DrawerTrigger,
701
1029
  ba as DropdownMenu,
702
1030
  pa as DropdownMenuCheckboxItem,
703
- ma as DropdownMenuContent,
704
- ga as DropdownMenuGroup,
705
- fa as DropdownMenuItem,
706
- ha as DropdownMenuLabel,
707
- xa as DropdownMenuPortal,
708
- va as DropdownMenuRadioGroup,
709
- wa as DropdownMenuRadioItem,
1031
+ ga as DropdownMenuContent,
1032
+ ha as DropdownMenuGroup,
1033
+ xa as DropdownMenuItem,
1034
+ va as DropdownMenuLabel,
1035
+ wa as DropdownMenuPortal,
1036
+ Ca as DropdownMenuRadioGroup,
1037
+ ya as DropdownMenuRadioItem,
710
1038
  Sa as DropdownMenuSeparator,
711
1039
  Ma as DropdownMenuShortcut,
712
- Ca as DropdownMenuSub,
713
- Da as DropdownMenuSubContent,
1040
+ Da as DropdownMenuSub,
1041
+ _a as DropdownMenuSubContent,
714
1042
  Ia as DropdownMenuSubTrigger,
715
- Ta as DropdownMenuTrigger,
716
- Aa as HoverCard,
717
- ya as HoverCardContent,
718
- _a as HoverCardTrigger,
719
- _t as InputOTP,
720
- kt as InputOTPGroup,
721
- Et as InputOTPSeparator,
722
- zt as InputOTPSlot,
723
- kr as Label,
724
- zr as Menubar,
725
- Or as MenubarCheckboxItem,
726
- Rr as MenubarContent,
727
- Pr as MenubarGroup,
728
- Br as MenubarItem,
729
- Gr as MenubarLabel,
730
- Hr as MenubarMenu,
731
- Lr as MenubarPortal,
732
- Wr as MenubarRadioGroup,
733
- Fr as MenubarRadioItem,
734
- jr as MenubarSeparator,
735
- Kr as MenubarShortcut,
736
- $r as MenubarSub,
737
- qr as MenubarSubContent,
738
- Vr as MenubarSubTrigger,
739
- Ur as MenubarTrigger,
740
- Jr as Popover,
741
- Qr as PopoverAnchor,
742
- Yr as PopoverContent,
743
- Zr as PopoverTrigger,
744
- Bt as Progress,
745
- Ea as RadioGroup,
746
- za as RadioGroupItem,
747
- Ra as ScrollArea,
748
- Pa as ScrollBar,
749
- k as Sheet,
750
- Cr as SheetClose,
751
- E as SheetContent,
752
- R as SheetDescription,
753
- Dr as SheetFooter,
754
- z as SheetHeader,
755
- O as SheetTitle,
756
- Ir as SheetTrigger,
757
- Re as Sidebar,
758
- je as SidebarContent,
759
- We as SidebarFooter,
760
- Ke as SidebarGroup,
761
- qe as SidebarGroupAction,
762
- Ve as SidebarGroupContent,
763
- $e as SidebarGroupLabel,
764
- Le as SidebarHeader,
765
- He as SidebarInput,
766
- Ge as SidebarInset,
767
- Ue as SidebarMenu,
768
- Qe as SidebarMenuAction,
769
- Ye as SidebarMenuBadge,
770
- Je as SidebarMenuButton,
771
- Xe as SidebarMenuItem,
772
- Ze as SidebarMenuSkeleton,
773
- et as SidebarMenuSub,
774
- at as SidebarMenuSubButton,
775
- tt as SidebarMenuSubItem,
776
- Oe as SidebarProvider,
777
- Be as SidebarRail,
778
- Fe as SidebarSeparator,
779
- Pe as SidebarTrigger,
780
- Rt as Slider,
781
- Ga as Switch,
782
- La as Tabs,
1043
+ Na as DropdownMenuTrigger,
1044
+ ar as Form,
1045
+ Ke as FormControl,
1046
+ qe as FormDescription,
1047
+ or as FormField,
1048
+ $e as FormItem,
1049
+ Ue as FormLabel,
1050
+ Xe as FormMessage,
1051
+ Fa as HoverCard,
1052
+ Ta as HoverCardContent,
1053
+ ka as HoverCardTrigger,
1054
+ kr as InputOTP,
1055
+ Er as InputOTPGroup,
1056
+ Or as InputOTPSeparator,
1057
+ Rr as InputOTPSlot,
1058
+ fe as Label,
1059
+ Oo as Menubar,
1060
+ Ro as MenubarCheckboxItem,
1061
+ Vo as MenubarContent,
1062
+ Po as MenubarGroup,
1063
+ Bo as MenubarItem,
1064
+ Lo as MenubarLabel,
1065
+ zo as MenubarMenu,
1066
+ Go as MenubarPortal,
1067
+ Ho as MenubarRadioGroup,
1068
+ Wo as MenubarRadioItem,
1069
+ $o as MenubarSeparator,
1070
+ Uo as MenubarShortcut,
1071
+ Ko as MenubarSub,
1072
+ qo as MenubarSubContent,
1073
+ Xo as MenubarSubTrigger,
1074
+ Jo as MenubarTrigger,
1075
+ Yo as Popover,
1076
+ Zo as PopoverAnchor,
1077
+ jo as PopoverContent,
1078
+ en as PopoverTrigger,
1079
+ Lr as Progress,
1080
+ Oa as RadioGroup,
1081
+ Ra as RadioGroupItem,
1082
+ Pa as ScrollArea,
1083
+ Ba as ScrollBar,
1084
+ se as Sheet,
1085
+ _o as SheetClose,
1086
+ de as SheetContent,
1087
+ ce as SheetDescription,
1088
+ Io as SheetFooter,
1089
+ le as SheetHeader,
1090
+ ue as SheetTitle,
1091
+ No as SheetTrigger,
1092
+ Rt as Sidebar,
1093
+ Wt as SidebarContent,
1094
+ Gt as SidebarFooter,
1095
+ $t as SidebarGroup,
1096
+ Kt as SidebarGroupAction,
1097
+ qt as SidebarGroupContent,
1098
+ Ut as SidebarGroupLabel,
1099
+ zt as SidebarHeader,
1100
+ Lt as SidebarInput,
1101
+ Bt as SidebarInset,
1102
+ Xt as SidebarMenu,
1103
+ Yt as SidebarMenuAction,
1104
+ Zt as SidebarMenuBadge,
1105
+ Qt as SidebarMenuButton,
1106
+ Jt as SidebarMenuItem,
1107
+ jt as SidebarMenuSkeleton,
1108
+ er as SidebarMenuSub,
1109
+ rr as SidebarMenuSubButton,
1110
+ tr as SidebarMenuSubItem,
1111
+ Ot as SidebarProvider,
1112
+ Pt as SidebarRail,
1113
+ Ht as SidebarSeparator,
1114
+ Vt as SidebarTrigger,
1115
+ Pr as Slider,
1116
+ za as Switch,
1117
+ Ha as Tabs,
783
1118
  Wa as TabsContent,
784
- Fa as TabsList,
785
- ja as TabsTrigger,
786
- nt as TextReveal,
787
- Nr as Toaster,
788
- yr as Toggle,
789
- N as Tooltip,
790
- y as TooltipContent,
791
- _ as TooltipProvider,
792
- A as TooltipTrigger,
793
- h as useSidebar
1119
+ $a as TabsList,
1120
+ Ua as TabsTrigger,
1121
+ sr as TextReveal,
1122
+ Fo as Toaster,
1123
+ ko as Toggle,
1124
+ ae as Tooltip,
1125
+ ne as TooltipContent,
1126
+ ie as TooltipProvider,
1127
+ oe as TooltipTrigger,
1128
+ O as useFormField,
1129
+ X as useSidebar
794
1130
  };