@plyaz/ui 0.7.19 → 0.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (32) hide show
  1. package/dist/client/accordion.cjs.js +1 -1
  2. package/dist/client/accordion.es.js +3 -3
  3. package/dist/client/calendar.cjs.js +1 -1
  4. package/dist/client/calendar.es.js +34 -35
  5. package/dist/client/popover.cjs.js +1 -1
  6. package/dist/client/popover.es.js +5 -5
  7. package/dist/client/slider.cjs.js +1 -1
  8. package/dist/client/slider.es.js +2 -2
  9. package/dist/client.cjs.js +1 -1
  10. package/dist/client.es.js +736 -527
  11. package/dist/types/components/Accordion/Accordion.stories.d.ts +1 -1
  12. package/dist/types/components/Accordion/Accordion.stories.d.ts.map +1 -1
  13. package/dist/types/components/AlertDialog/AlertDialog.stories.d.ts.map +1 -1
  14. package/dist/types/components/Calendar/Calendar.d.ts +1 -1
  15. package/dist/types/components/Calendar/Calendar.d.ts.map +1 -1
  16. package/dist/types/components/Dialog/Dialog.stories.d.ts +0 -1
  17. package/dist/types/components/Dialog/Dialog.stories.d.ts.map +1 -1
  18. package/dist/types/components/MultiSelect/MultiSelect.d.ts +32 -0
  19. package/dist/types/components/MultiSelect/MultiSelect.d.ts.map +1 -0
  20. package/dist/types/components/MultiSelect/MultiSelect.stories.d.ts +17 -0
  21. package/dist/types/components/MultiSelect/MultiSelect.stories.d.ts.map +1 -0
  22. package/dist/types/components/Sidebar/Sidebar.stories.d.ts +6 -1
  23. package/dist/types/components/Sidebar/Sidebar.stories.d.ts.map +1 -1
  24. package/dist/types/components/Tooltip/Tooltip.stories.d.ts +1 -1
  25. package/dist/types/components/Tooltip/Tooltip.stories.d.ts.map +1 -1
  26. package/dist/types/components/client.d.ts +1 -0
  27. package/dist/types/components/client.d.ts.map +1 -1
  28. package/dist/types/hooks/useDebounce.d.ts +2 -0
  29. package/dist/types/hooks/useDebounce.d.ts.map +1 -0
  30. package/dist/ui.css +1 -1
  31. package/package.json +1 -1
  32. package/styles/utilities.css +4 -0
package/dist/client.es.js CHANGED
@@ -1,44 +1,46 @@
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";
1
+ import { TextReveal as zr } from "./client/reveal-text.es.js";
2
+ import { AlertDialog as Kr, AlertDialogAction as Wr, AlertDialogCancel as $r, AlertDialogContent as Jr, AlertDialogDescription as Qr, AlertDialogFooter as Zr, AlertDialogHeader as qr, AlertDialogOverlay as Xr, AlertDialogPortal as jr, AlertDialogTitle as Yr, AlertDialogTrigger as ea } from "./client/alert-dialog.es.js";
3
+ import { Calendar as ra, CalendarDayButton as aa } from "./client/calendar.es.js";
4
+ import { Carousel as na, CarouselContent as ia, CarouselItem as sa, CarouselNext as da, CarouselPrevious as la } from "./client/carousel.es.js";
5
+ import { Combobox as ca } from "./client/combobox.es.js";
6
+ import { InputOTP as fa, InputOTPGroup as pa, InputOTPSeparator as ba, InputOTPSlot as ga } from "./client/input-otp.es.js";
7
+ import { Slider as xa } from "./client/slider.es.js";
8
+ import { Progress as Aa } from "./client/progress.es.js";
9
+ import { Accordion as ya, AccordionContent as Sa, AccordionItem as Ca, AccordionTrigger as Ma } from "./client/accordion.es.js";
10
+ import { Avatar as Na, AvatarFallback as Da, AvatarImage as _a } from "./client/avatar.es.js";
11
+ import { Checkbox as Ta } from "./client/checkbox.es.js";
12
+ import { ContextMenu as Ra, ContextMenuCheckboxItem as Fa, ContextMenuContent as Pa, ContextMenuGroup as Oa, ContextMenuItem as Va, ContextMenuLabel as Ba, ContextMenuPortal as La, ContextMenuRadioGroup as Ga, ContextMenuRadioItem as Ha, ContextMenuSeparator as za, ContextMenuShortcut as Ua, ContextMenuSub as Ka, ContextMenuSubContent as Wa, ContextMenuSubTrigger as $a, ContextMenuTrigger as Ja } from "./client/context-menu.es.js";
13
+ import { DropdownMenu as Za, DropdownMenuCheckboxItem as qa, DropdownMenuContent as Xa, DropdownMenuGroup as ja, DropdownMenuItem as Ya, DropdownMenuLabel as eo, DropdownMenuPortal as to, DropdownMenuRadioGroup as ro, DropdownMenuRadioItem as ao, DropdownMenuSeparator as oo, DropdownMenuShortcut as no, DropdownMenuSub as io, DropdownMenuSubContent as so, DropdownMenuSubTrigger as lo, DropdownMenuTrigger as uo } from "./client/dropdown-menu.es.js";
14
+ import { HoverCard as mo, HoverCardContent as fo, HoverCardTrigger as po } from "./client/hover-card.es.js";
15
+ import { RadioGroup as go, RadioGroupItem as ho } from "./client/radio-group.es.js";
16
+ import { ScrollArea as vo, ScrollBar as Ao } from "./client/scroll-area.es.js";
17
+ import { Switch as yo } from "./client/switch.es.js";
18
+ import { Tabs as Co, TabsContent as Mo, TabsList as Io, TabsTrigger as No } from "./client/tabs.es.js";
19
+ import { Tooltip as fe, TooltipTrigger as pe, TooltipContent as be, TooltipProvider as ge } from "./client/tooltip.es.js";
20
+ import { Command as W, CommandList as $, CommandInput as he, CommandEmpty as xe, CommandGroup as ve, CommandItem as Ae } from "./client/command.es.js";
21
+ import { CommandDialog as _o, CommandSeparator as Eo, CommandShortcut as To } from "./client/command.es.js";
22
+ import { Dialog as Ro, DialogClose as Fo, DialogContent as Po, DialogDescription as Oo, DialogFooter as Vo, DialogHeader as Bo, DialogOverlay as Lo, DialogPortal as Go, DialogTitle as Ho, DialogTrigger as zo } from "./client/dialog.es.js";
23
+ import { Drawer as Ko, DrawerClose as Wo, DrawerContent as $o, DrawerDescription as Jo, DrawerFooter as Qo, DrawerHeader as Zo, DrawerOverlay as qo, DrawerPortal as Xo, DrawerTitle as jo, DrawerTrigger as Yo } from "./client/drawer.es.js";
24
+ import { Sheet as we, SheetContent as ye, SheetHeader as Se, SheetTitle as Ce, SheetDescription as Me } from "./client/sheet.es.js";
25
+ import { SheetClose as tn, SheetFooter as rn, SheetTrigger as an } from "./client/sheet.es.js";
26
+ import { Toaster as nn } from "./client/toaster.es.js";
27
+ import { Toggle as dn } from "./client/toggle.es.js";
28
+ import { Label as Ie } from "./client/label.es.js";
29
+ import { Menubar as un, MenubarCheckboxItem as cn, MenubarContent as mn, MenubarGroup as fn, MenubarItem as pn, MenubarLabel as bn, MenubarMenu as gn, MenubarPortal as hn, MenubarRadioGroup as xn, MenubarRadioItem as vn, MenubarSeparator as An, MenubarShortcut as wn, MenubarSub as yn, MenubarSubContent as Sn, MenubarSubTrigger as Cn, MenubarTrigger as Mn } from "./client/menu-bar.es.js";
30
+ import { Popover as Ne, PopoverContent as De, PopoverTrigger as _e } from "./client/popover.es.js";
31
+ import { PopoverAnchor as Nn } from "./client/popover.es.js";
32
+ import { jsx as n, jsxs as N, Fragment as Ee } from "react/jsx-runtime";
33
+ import * as v from "react";
34
+ import c, { createContext as Te, useState as R, useCallback as G, useEffect as ke, useRef as J, useContext as Re } from "react";
35
+ import { Slot as T } from "@radix-ui/react-slot";
36
+ import { cva as Fe } from "class-variance-authority";
37
+ import { PanelLeftIcon as Pe, CheckIcon as Oe, ChevronsUpDownIcon as Ve, XIcon as Be } from "lucide-react";
36
38
  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";
39
+ import { I as Le, B as Q } from "./Textarea-BTbJSVLU.js";
40
+ import { B as te } from "./Button-B7sEajdG.js";
39
41
  import "@radix-ui/react-select";
40
42
  import "next-intl";
41
- import { a as G, S as he } from "./Skeleton-Cj9Od_Nd.js";
43
+ import { a as Z, S as Ge } from "./Skeleton-Cj9Od_Nd.js";
42
44
  import "@radix-ui/react-alert-dialog";
43
45
  import "react-day-picker";
44
46
  import "cmdk";
@@ -64,113 +66,116 @@ import "@radix-ui/react-label";
64
66
  import "@radix-ui/react-menubar";
65
67
  import "@radix-ui/react-separator";
66
68
  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);
69
+ var i = { US: "US", CA: "CA", MX: "MX", BR: "BR", AR: "AR", CL: "CL", CO: "CO", PE: "PE", VE: "VE", GB: "GB", FR: "FR", DE: "DE", IT: "IT", ES: "ES", PT: "PT", NL: "NL", CH: "CH", SE: "SE", NO: "NO", FI: "FI", PL: "PL", GR: "GR", UA: "UA", RU: "RU", CN: "CN", JP: "JP", KR: "KR", IN: "IN", PK: "PK", BD: "BD", TH: "TH", VN: "VN", MY: "MY", SG: "SG", ID: "ID", PH: "PH", SA: "SA", AE: "AE", QA: "QA", KW: "KW", IQ: "IQ", IR: "IR", IL: "IL", TR: "TR", EG: "EG", MA: "MA", ET: "ET", KE: "KE", TZ: "TZ", ZA: "ZA", NG: "NG", GH: "GH", SN: "SN", AU: "AU", NZ: "NZ", PG: "PG", FJ: "FJ", AQ: "AQ" }, He = 7, ze = 6, Ue = { WEEK: 6048e5 }, Ke = { [i.US]: ["America/New_York", "America/Chicago", "America/Denver", "America/Los_Angeles", "America/Anchorage", "Pacific/Honolulu"], [i.CA]: ["America/Toronto", "America/Vancouver", "America/Edmonton", "America/Halifax", "America/St_Johns"], [i.MX]: ["America/Mexico_City", "America/Monterrey", "America/Tijuana"], [i.BR]: ["America/Sao_Paulo", "America/Manaus", "America/Fortaleza"], [i.AR]: ["America/Argentina/Buenos_Aires"], [i.CL]: ["America/Santiago"], [i.CO]: ["America/Bogota"], [i.PE]: ["America/Lima"], [i.VE]: ["America/Caracas"], [i.GB]: ["Europe/London"], [i.FR]: ["Europe/Paris"], [i.DE]: ["Europe/Berlin"], [i.IT]: ["Europe/Rome"], [i.ES]: ["Europe/Madrid"], [i.PT]: ["Europe/Lisbon"], [i.NL]: ["Europe/Amsterdam"], [i.SE]: ["Europe/Stockholm"], [i.PL]: ["Europe/Warsaw"], [i.FI]: ["Europe/Helsinki"], [i.NO]: ["Europe/Oslo"], [i.CH]: ["Europe/Zurich"], [i.RU]: ["Europe/Moscow", "Asia/Yekaterinburg", "Asia/Irkutsk", "Asia/Vladivostok"], [i.UA]: ["Europe/Kyiv"], [i.GR]: ["Europe/Athens"], [i.TR]: ["Europe/Istanbul"], [i.CN]: ["Asia/Shanghai", "Asia/Urumqi"], [i.JP]: ["Asia/Tokyo"], [i.KR]: ["Asia/Seoul"], [i.IN]: ["Asia/Kolkata"], [i.PK]: ["Asia/Karachi"], [i.BD]: ["Asia/Dhaka"], [i.TH]: ["Asia/Bangkok"], [i.VN]: ["Asia/Ho_Chi_Minh"], [i.MY]: ["Asia/Kuala_Lumpur"], [i.SG]: ["Asia/Singapore"], [i.ID]: ["Asia/Jakarta", "Asia/Makassar", "Asia/Jayapura"], [i.PH]: ["Asia/Manila"], [i.AE]: ["Asia/Dubai"], [i.SA]: ["Asia/Riyadh"], [i.IR]: ["Asia/Tehran"], [i.IQ]: ["Asia/Baghdad"], [i.IL]: ["Asia/Jerusalem"], [i.QA]: ["Asia/Qatar"], [i.KW]: ["Asia/Kuwait"], [i.EG]: ["Africa/Cairo"], [i.NG]: ["Africa/Lagos"], [i.ZA]: ["Africa/Johannesburg"], [i.KE]: ["Africa/Nairobi"], [i.MA]: ["Africa/Casablanca"], [i.GH]: ["Africa/Accra"], [i.ET]: ["Africa/Addis_Ababa"], [i.TZ]: ["Africa/Dar_es_Salaam"], [i.SN]: ["Africa/Dakar"], [i.AU]: ["Australia/Sydney", "Australia/Melbourne", "Australia/Perth", "Australia/Brisbane"], [i.NZ]: ["Pacific/Auckland"], [i.FJ]: ["Pacific/Fiji"], [i.PG]: ["Pacific/Port_Moresby"], [i.AQ]: ["Antarctica/McMurdo", "Antarctica/Palmer", "Antarctica/Casey"] };
70
+ Array.from(new Set(Object.values(Ke).flat()));
71
+ Array.from({ length: He }, (e, r) => r);
72
+ Array.from({ length: ze }, (e, r) => r);
73
+ const B = 768;
74
+ function We() {
75
+ const [e, r] = v.useState(void 0);
76
+ return v.useEffect(() => {
77
+ const t = window.matchMedia(`(max-width: ${B - 1}px)`), a = () => {
78
+ r(window.innerWidth < B);
74
79
  };
75
- return t.addEventListener("change", o), r(window.innerWidth < V), () => t.removeEventListener("change", o);
80
+ return t.addEventListener("change", a), r(window.innerWidth < B), () => t.removeEventListener("change", a);
76
81
  }, []), !!e;
77
82
  }
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);
83
+ const $e = "sidebar_state", Je = Ue.WEEK, Qe = "16rem", Ze = "18rem", qe = "3rem", re = v.createContext(null);
84
+ function ae() {
85
+ const e = v.useContext(re);
81
86
  if (!e)
82
87
  throw new Error("useSidebar must be used within a SidebarProvider.");
83
88
  return e;
84
89
  }
85
- function Ot({
90
+ function lr({
86
91
  defaultOpen: e = !0,
87
92
  open: r,
88
93
  onOpenChange: t,
89
- className: o,
90
- style: a,
91
- children: i,
92
- ...s
94
+ className: a,
95
+ style: o,
96
+ children: s,
97
+ ...d
93
98
  }) {
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}`;
99
+ const l = We(), [p, m] = v.useState(!1), [g, A] = v.useState(e), y = r ?? g, S = v.useCallback(
100
+ (x) => {
101
+ const M = typeof x == "function" ? x(y) : x;
102
+ t ? t(M) : A(M), document.cookie = `${$e}=${M}; path=/; max-age=${Je}`;
98
103
  },
99
- [t, x]
100
- ), S = f.useCallback(() => {
101
- }, []), M = x ? "expanded" : "collapsed", D = f.useMemo(
104
+ [t, y]
105
+ ), w = v.useCallback(() => {
106
+ }, []), C = y ? "expanded" : "collapsed", f = v.useMemo(
102
107
  () => ({
103
- state: M,
104
- open: x,
105
- setOpen: I,
108
+ state: C,
109
+ open: y,
110
+ setOpen: S,
106
111
  isMobile: l,
107
- openMobile: m,
108
- setOpenMobile: c,
109
- toggleSidebar: S
112
+ openMobile: p,
113
+ setOpenMobile: m,
114
+ toggleSidebar: w
110
115
  }),
111
- [M, x, I, l, m, c, S]
116
+ [C, y, S, l, p, m, w]
112
117
  );
113
- return /* @__PURE__ */ n(q.Provider, { value: D, children: /* @__PURE__ */ n(ie, { delayDuration: 0, children: /* @__PURE__ */ n(
118
+ return /* @__PURE__ */ n(re.Provider, { value: f, children: /* @__PURE__ */ n(ge, { delayDuration: 0, children: /* @__PURE__ */ n(
114
119
  "div",
115
120
  {
116
121
  "data-slot": "sidebar-wrapper",
117
122
  style: {
118
- "--sidebar-width": ye,
119
- "--sidebar-width-icon": Me,
120
- ...a
123
+ "--sidebar-width": Qe,
124
+ "--sidebar-width-icon": qe,
125
+ ...o
121
126
  },
122
127
  className: u(
123
128
  "group/sidebar-wrapper has-data-[variant=inset]:bg-sidebar flex min-h-svh w-full",
124
- o
129
+ a
125
130
  ),
126
- ...s,
127
- children: i
131
+ ...d,
132
+ children: s
128
133
  }
129
134
  ) }) });
130
135
  }
131
- function De({
136
+ function Xe({
132
137
  side: e,
133
138
  openMobile: r,
134
139
  setOpenMobile: t,
135
- children: o,
136
- ...a
140
+ children: a,
141
+ ...o
137
142
  }) {
138
- return /* @__PURE__ */ n(se, { open: r, onOpenChange: t, ...a, children: /* @__PURE__ */ A(
139
- de,
143
+ return /* @__PURE__ */ n(we, { open: r, onOpenChange: t, ...o, children: /* @__PURE__ */ N(
144
+ ye,
140
145
  {
141
146
  "data-sidebar": "sidebar",
142
147
  "data-slot": "sidebar",
143
148
  "data-mobile": "true",
144
149
  className: "bg-sidebar text-sidebar-foreground w-(--sidebar-width) p-0 [&>button]:hidden",
145
150
  style: {
146
- "--sidebar-width": Se
151
+ "--sidebar-width": Ze
147
152
  },
148
153
  side: e,
149
154
  children: [
150
- /* @__PURE__ */ A(le, { className: "sr-only", children: [
151
- /* @__PURE__ */ n(ue, { children: "Sidebar" }),
152
- /* @__PURE__ */ n(ce, { children: "Displays the mobile sidebar." })
155
+ /* @__PURE__ */ N(Se, { className: "sr-only", children: [
156
+ /* @__PURE__ */ n(Ce, { children: "Sidebar" }),
157
+ /* @__PURE__ */ n(Me, { children: "Displays the mobile sidebar." })
153
158
  ] }),
154
- /* @__PURE__ */ n("div", { className: "flex h-full w-full flex-col", children: o })
159
+ /* @__PURE__ */ n("div", { className: "flex h-full w-full flex-col", children: a })
155
160
  ]
156
161
  }
157
162
  ) });
158
163
  }
159
- function _e({
164
+ function je({
160
165
  side: e,
161
166
  variant: r,
162
167
  collapsible: t,
163
- state: o,
164
- className: a,
165
- children: i,
166
- ...s
168
+ state: a,
169
+ className: o,
170
+ children: s,
171
+ ...d
167
172
  }) {
168
- return /* @__PURE__ */ A(
173
+ return /* @__PURE__ */ N(
169
174
  "div",
170
175
  {
171
176
  className: "group peer text-sidebar-foreground hidden md:block",
172
- "data-state": o,
173
- "data-collapsible": o === "collapsed" ? t : "",
177
+ "data-state": a,
178
+ "data-collapsible": a === "collapsed" ? t : "",
174
179
  "data-variant": r,
175
180
  "data-side": e,
176
181
  "data-slot": "sidebar",
@@ -196,16 +201,16 @@ function _e({
196
201
  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)]",
197
202
  // Adjust the padding for floating and inset variants.
198
203
  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
204
+ o
200
205
  ),
201
- ...s,
206
+ ...d,
202
207
  children: /* @__PURE__ */ n(
203
208
  "div",
204
209
  {
205
210
  "data-sidebar": "sidebar",
206
211
  "data-slot": "sidebar-inner",
207
212
  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",
208
- children: i
213
+ children: s
209
214
  }
210
215
  )
211
216
  }
@@ -214,61 +219,61 @@ function _e({
214
219
  }
215
220
  );
216
221
  }
217
- function Rt({
222
+ function ur({
218
223
  side: e = "left",
219
224
  variant: r = "sidebar",
220
225
  collapsible: t = "offcanvas",
221
- className: o,
222
- children: a,
223
- ...i
226
+ className: a,
227
+ children: o,
228
+ ...s
224
229
  }) {
225
- const { isMobile: s, state: l, openMobile: m, setOpenMobile: c } = X();
230
+ const { isMobile: d, state: l, openMobile: p, setOpenMobile: m } = ae();
226
231
  return t === "none" ? /* @__PURE__ */ n(
227
232
  "div",
228
233
  {
229
234
  "data-slot": "sidebar",
230
235
  className: u(
231
236
  "bg-sidebar text-sidebar-foreground flex h-full w-(--sidebar-width) flex-col",
232
- o
237
+ a
233
238
  ),
234
- ...i,
235
- children: a
239
+ ...s,
240
+ children: o
236
241
  }
237
- ) : s ? /* @__PURE__ */ n(De, { side: e, openMobile: m, setOpenMobile: c, ...i, children: a }) : /* @__PURE__ */ n(
238
- _e,
242
+ ) : d ? /* @__PURE__ */ n(Xe, { side: e, openMobile: p, setOpenMobile: m, ...s, children: o }) : /* @__PURE__ */ n(
243
+ je,
239
244
  {
240
245
  side: e,
241
246
  variant: r,
242
247
  collapsible: t,
243
248
  state: l,
244
- className: o,
245
- ...i,
246
- children: a
249
+ className: a,
250
+ ...s,
251
+ children: o
247
252
  }
248
253
  );
249
254
  }
250
- function Vt({ className: e, onClick: r, ...t }) {
251
- return /* @__PURE__ */ A(
252
- ge,
255
+ function cr({ className: e, onClick: r, ...t }) {
256
+ return /* @__PURE__ */ N(
257
+ te,
253
258
  {
254
259
  "data-sidebar": "trigger",
255
260
  "data-slot": "sidebar-trigger",
256
261
  variant: "ghost",
257
262
  size: "icon",
258
263
  className: u("size-7", e),
259
- onClick: (o) => {
260
- r == null || r(o);
264
+ onClick: (a) => {
265
+ r == null || r(a);
261
266
  },
262
267
  disabled: !0,
263
268
  ...t,
264
269
  children: [
265
- /* @__PURE__ */ n(be, {}),
270
+ /* @__PURE__ */ n(Pe, {}),
266
271
  /* @__PURE__ */ n("span", { className: "sr-only", children: "Toggle Sidebar" })
267
272
  ]
268
273
  }
269
274
  );
270
275
  }
271
- function Pt({ className: e, ...r }) {
276
+ function mr({ className: e, ...r }) {
272
277
  return /* @__PURE__ */ n(
273
278
  "button",
274
279
  {
@@ -293,7 +298,7 @@ function Pt({ className: e, ...r }) {
293
298
  }
294
299
  );
295
300
  }
296
- function Bt({ className: e, ...r }) {
301
+ function fr({ className: e, ...r }) {
297
302
  return /* @__PURE__ */ n(
298
303
  "main",
299
304
  {
@@ -307,9 +312,9 @@ function Bt({ className: e, ...r }) {
307
312
  }
308
313
  );
309
314
  }
310
- function Lt({ className: e, ...r }) {
315
+ function pr({ className: e, ...r }) {
311
316
  return /* @__PURE__ */ n(
312
- pe,
317
+ Le,
313
318
  {
314
319
  "data-slot": "sidebar-input",
315
320
  "data-sidebar": "input",
@@ -318,7 +323,7 @@ function Lt({ className: e, ...r }) {
318
323
  }
319
324
  );
320
325
  }
321
- function zt({ className: e, ...r }) {
326
+ function br({ className: e, ...r }) {
322
327
  return /* @__PURE__ */ n(
323
328
  "div",
324
329
  {
@@ -329,7 +334,7 @@ function zt({ className: e, ...r }) {
329
334
  }
330
335
  );
331
336
  }
332
- function Gt({ className: e, ...r }) {
337
+ function gr({ className: e, ...r }) {
333
338
  return /* @__PURE__ */ n(
334
339
  "div",
335
340
  {
@@ -340,9 +345,9 @@ function Gt({ className: e, ...r }) {
340
345
  }
341
346
  );
342
347
  }
343
- function Ht({ className: e, ...r }) {
348
+ function hr({ className: e, ...r }) {
344
349
  return /* @__PURE__ */ n(
345
- he,
350
+ Ge,
346
351
  {
347
352
  "data-slot": "sidebar-separator",
348
353
  "data-sidebar": "separator",
@@ -351,7 +356,7 @@ function Ht({ className: e, ...r }) {
351
356
  }
352
357
  );
353
358
  }
354
- function Wt({ className: e, ...r }) {
359
+ function xr({ className: e, ...r }) {
355
360
  return /* @__PURE__ */ n(
356
361
  "div",
357
362
  {
@@ -365,7 +370,7 @@ function Wt({ className: e, ...r }) {
365
370
  }
366
371
  );
367
372
  }
368
- function $t({ className: e, ...r }) {
373
+ function vr({ className: e, ...r }) {
369
374
  return /* @__PURE__ */ n(
370
375
  "div",
371
376
  {
@@ -376,13 +381,13 @@ function $t({ className: e, ...r }) {
376
381
  }
377
382
  );
378
383
  }
379
- function Ut({
384
+ function Ar({
380
385
  className: e,
381
386
  asChild: r = !1,
382
387
  ...t
383
388
  }) {
384
389
  return /* @__PURE__ */ n(
385
- r ? F : "div",
390
+ r ? T : "div",
386
391
  {
387
392
  "data-slot": "sidebar-group-label",
388
393
  "data-sidebar": "group-label",
@@ -395,13 +400,13 @@ function Ut({
395
400
  }
396
401
  );
397
402
  }
398
- function Kt({
403
+ function wr({
399
404
  className: e,
400
405
  asChild: r = !1,
401
406
  ...t
402
407
  }) {
403
408
  return /* @__PURE__ */ n(
404
- r ? F : "button",
409
+ r ? T : "button",
405
410
  {
406
411
  "data-slot": "sidebar-group-action",
407
412
  "data-sidebar": "group-action",
@@ -416,7 +421,7 @@ function Kt({
416
421
  }
417
422
  );
418
423
  }
419
- function qt({ className: e, ...r }) {
424
+ function yr({ className: e, ...r }) {
420
425
  return /* @__PURE__ */ n(
421
426
  "div",
422
427
  {
@@ -427,7 +432,7 @@ function qt({ className: e, ...r }) {
427
432
  }
428
433
  );
429
434
  }
430
- function Xt({ className: e, ...r }) {
435
+ function Sr({ className: e, ...r }) {
431
436
  return /* @__PURE__ */ n(
432
437
  "ul",
433
438
  {
@@ -438,7 +443,7 @@ function Xt({ className: e, ...r }) {
438
443
  }
439
444
  );
440
445
  }
441
- function Jt({ className: e, ...r }) {
446
+ function Cr({ className: e, ...r }) {
442
447
  return /* @__PURE__ */ n(
443
448
  "li",
444
449
  {
@@ -449,7 +454,7 @@ function Jt({ className: e, ...r }) {
449
454
  }
450
455
  );
451
456
  }
452
- const Ie = me(
457
+ const Ye = Fe(
453
458
  "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",
454
459
  {
455
460
  variants: {
@@ -469,49 +474,49 @@ const Ie = me(
469
474
  }
470
475
  }
471
476
  );
472
- function Qt({
477
+ function Mr({
473
478
  asChild: e = !1,
474
479
  isActive: r = !1,
475
480
  variant: t = "default",
476
- size: o = "default",
477
- tooltip: a,
478
- className: i,
479
- ...s
481
+ size: a = "default",
482
+ tooltip: o,
483
+ className: s,
484
+ ...d
480
485
  }) {
481
- const l = e ? F : "button", { isMobile: m, state: c } = X(), b = /* @__PURE__ */ n(
486
+ const l = e ? T : "button", { isMobile: p, state: m } = ae(), g = /* @__PURE__ */ n(
482
487
  l,
483
488
  {
484
489
  "data-slot": "sidebar-menu-button",
485
490
  "data-sidebar": "menu-button",
486
- "data-size": o,
491
+ "data-size": a,
487
492
  "data-active": r,
488
- className: u(Ie({ variant: t, size: o }), i),
489
- ...s
493
+ className: u(Ye({ variant: t, size: a }), s),
494
+ ...d
490
495
  }
491
496
  );
492
- return a ? (typeof a == "string" && (a = {
493
- children: a
494
- }), /* @__PURE__ */ A(ae, { children: [
495
- /* @__PURE__ */ n(oe, { asChild: !0, children: b }),
497
+ return o ? (typeof o == "string" && (o = {
498
+ children: o
499
+ }), /* @__PURE__ */ N(fe, { children: [
500
+ /* @__PURE__ */ n(pe, { asChild: !0, children: g }),
496
501
  /* @__PURE__ */ n(
497
- ne,
502
+ be,
498
503
  {
499
504
  side: "right",
500
505
  align: "center",
501
- hidden: c !== "collapsed" || m,
502
- ...a
506
+ hidden: m !== "collapsed" || p,
507
+ ...o
503
508
  }
504
509
  )
505
- ] })) : b;
510
+ ] })) : g;
506
511
  }
507
- function Yt({
512
+ function Ir({
508
513
  className: e,
509
514
  asChild: r = !1,
510
515
  showOnHover: t = !1,
511
- ...o
516
+ ...a
512
517
  }) {
513
518
  return /* @__PURE__ */ n(
514
- r ? F : "button",
519
+ r ? T : "button",
515
520
  {
516
521
  "data-slot": "sidebar-menu-action",
517
522
  "data-sidebar": "menu-action",
@@ -526,11 +531,11 @@ function Yt({
526
531
  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
532
  e
528
533
  ),
529
- ...o
534
+ ...a
530
535
  }
531
536
  );
532
537
  }
533
- function Zt({ className: e, ...r }) {
538
+ function Nr({ className: e, ...r }) {
534
539
  return /* @__PURE__ */ n(
535
540
  "div",
536
541
  {
@@ -549,14 +554,14 @@ function Zt({ className: e, ...r }) {
549
554
  }
550
555
  );
551
556
  }
552
- const Ne = 50, Ae = 40;
553
- function jt({
557
+ const et = 50, tt = 40;
558
+ function Dr({
554
559
  className: e,
555
560
  showIcon: r = !1,
556
561
  ...t
557
562
  }) {
558
- const o = f.useMemo(() => `${Math.floor(Math.random() * Ae) + Ne}%`, []);
559
- return /* @__PURE__ */ A(
563
+ const a = v.useMemo(() => `${Math.floor(Math.random() * tt) + et}%`, []);
564
+ return /* @__PURE__ */ N(
560
565
  "div",
561
566
  {
562
567
  "data-slot": "sidebar-menu-skeleton",
@@ -564,14 +569,14 @@ function jt({
564
569
  className: u("flex h-10 items-center gap-3 rounded-md px-2", e),
565
570
  ...t,
566
571
  children: [
567
- r && /* @__PURE__ */ n(G, { className: "size-6 rounded-md", "data-sidebar": "menu-skeleton-icon" }),
572
+ r && /* @__PURE__ */ n(Z, { className: "size-6 rounded-md", "data-sidebar": "menu-skeleton-icon" }),
568
573
  /* @__PURE__ */ n(
569
- G,
574
+ Z,
570
575
  {
571
576
  className: "h-4 max-w-(--skeleton-width) flex-1",
572
577
  "data-sidebar": "menu-skeleton-text",
573
578
  style: {
574
- "--skeleton-width": o
579
+ "--skeleton-width": a
575
580
  }
576
581
  }
577
582
  )
@@ -579,7 +584,7 @@ function jt({
579
584
  }
580
585
  );
581
586
  }
582
- function er({ className: e, ...r }) {
587
+ function _r({ className: e, ...r }) {
583
588
  return /* @__PURE__ */ n(
584
589
  "ul",
585
590
  {
@@ -594,7 +599,7 @@ function er({ className: e, ...r }) {
594
599
  }
595
600
  );
596
601
  }
597
- function tr({ className: e, ...r }) {
602
+ function Er({ className: e, ...r }) {
598
603
  return /* @__PURE__ */ n(
599
604
  "li",
600
605
  {
@@ -605,15 +610,15 @@ function tr({ className: e, ...r }) {
605
610
  }
606
611
  );
607
612
  }
608
- function rr({
613
+ function Tr({
609
614
  asChild: e = !1,
610
615
  size: r = "md",
611
616
  isActive: t = !1,
612
- className: o,
613
- ...a
617
+ className: a,
618
+ ...o
614
619
  }) {
615
620
  return /* @__PURE__ */ n(
616
- e ? F : "a",
621
+ e ? T : "a",
617
622
  {
618
623
  "data-slot": "sidebar-menu-sub-button",
619
624
  "data-sidebar": "menu-sub-button",
@@ -625,80 +630,80 @@ function rr({
625
630
  r === "sm" && "text-xs",
626
631
  r === "md" && "text-sm",
627
632
  "group-data-[collapsible=icon]:hidden",
628
- o
633
+ a
629
634
  ),
630
- ...a
635
+ ...o
631
636
  }
632
637
  );
633
638
  }
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) => {
639
+ var rt = (e) => e.type === "checkbox", k = (e) => e instanceof Date, z = (e) => e == null;
640
+ const oe = (e) => typeof e == "object";
641
+ var E = (e) => !z(e) && !Array.isArray(e) && oe(e) && !k(e), at = (e) => E(e) && e.target ? rt(e.target) ? e.target.checked : e.target.value : e, ot = (e) => e.substring(0, e.search(/\.\d+(\.|$)/)) || e, nt = (e, r) => e.has(ot(r)), it = (e) => {
637
642
  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) {
643
+ return E(r) && r.hasOwnProperty("isPrototypeOf");
644
+ }, st = typeof window < "u" && typeof window.HTMLElement < "u" && typeof document < "u";
645
+ function ne(e) {
641
646
  let r;
642
- const t = Array.isArray(e), o = typeof FileList < "u" ? e instanceof FileList : !1;
647
+ const t = Array.isArray(e), a = typeof FileList < "u" ? e instanceof FileList : !1;
643
648
  if (e instanceof Date)
644
649
  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))
650
+ else if (!(st && (e instanceof Blob || a)) && (t || E(e)))
651
+ if (r = t ? [] : Object.create(Object.getPrototypeOf(e)), !t && !it(e))
647
652
  r = e;
648
653
  else
649
- for (const a in e)
650
- e.hasOwnProperty(a) && (r[a] = Q(e[a]));
654
+ for (const o in e)
655
+ e.hasOwnProperty(o) && (r[o] = ne(e[o]));
651
656
  else
652
657
  return e;
653
658
  return r;
654
659
  }
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))
660
+ var ie = (e) => /^\w*$/.test(e), H = (e) => e === void 0, dt = (e) => Array.isArray(e) ? e.filter(Boolean) : [], se = (e) => dt(e.replace(/["|']|\]/g, "").split(/\.|\[/)), I = (e, r, t) => {
661
+ if (!r || !E(e))
657
662
  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]) ? {} : [];
663
+ const a = (ie(r) ? [r] : se(r)).reduce((o, s) => z(o) ? o : o[s], e);
664
+ return H(a) || a === e ? H(e[r]) ? t : e[r] : a;
665
+ }, L = (e) => typeof e == "boolean", q = (e, r, t) => {
666
+ let a = -1;
667
+ const o = ie(r) ? [r] : se(r), s = o.length, d = s - 1;
668
+ for (; ++a < s; ) {
669
+ const l = o[a];
670
+ let p = t;
671
+ if (a !== d) {
672
+ const m = e[l];
673
+ p = E(m) || Array.isArray(m) ? m : isNaN(+o[a + 1]) ? {} : [];
669
674
  }
670
675
  if (l === "__proto__" || l === "constructor" || l === "prototype")
671
676
  return;
672
- e[l] = m, e = e[l];
677
+ e[l] = p, e = e[l];
673
678
  }
674
679
  };
675
- const W = {
680
+ const X = {
676
681
  BLUR: "blur",
677
682
  CHANGE: "change"
678
- }, $ = {
683
+ }, j = {
679
684
  all: "all"
680
- }, z = d.createContext(null);
681
- z.displayName = "HookFormContext";
682
- const E = () => d.useContext(z), Pe = (e) => {
685
+ }, U = c.createContext(null);
686
+ U.displayName = "HookFormContext";
687
+ const P = () => c.useContext(U), lt = (e) => {
683
688
  const { children: r, ...t } = e;
684
- return d.createElement(z.Provider, { value: t }, r);
689
+ return c.createElement(U.Provider, { value: t }, r);
685
690
  };
686
- var Be = (e, r, t, o = !0) => {
687
- const a = {
691
+ var ut = (e, r, t, a = !0) => {
692
+ const o = {
688
693
  defaultValues: r._defaultValues
689
694
  };
690
- for (const i in e)
691
- Object.defineProperty(a, i, {
695
+ for (const s in e)
696
+ Object.defineProperty(o, s, {
692
697
  get: () => {
693
- const s = i;
694
- return r._proxyFormState[s] !== $.all && (r._proxyFormState[s] = !o || $.all), t && (t[s] = !0), e[s];
698
+ const d = s;
699
+ return r._proxyFormState[d] !== j.all && (r._proxyFormState[d] = !a || j.all), t && (t[d] = !0), e[d];
695
700
  }
696
701
  });
697
- return a;
702
+ return o;
698
703
  };
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({
704
+ const de = typeof window < "u" ? c.useLayoutEffect : c.useEffect;
705
+ function ct(e) {
706
+ const r = P(), { control: t = r.control, disabled: a, name: o, exact: s } = e || {}, [d, l] = c.useState(t._formState), p = c.useRef({
702
707
  isDirty: !1,
703
708
  isLoading: !1,
704
709
  dirtyFields: !1,
@@ -708,423 +713,627 @@ function Le(e) {
708
713
  isValid: !1,
709
714
  errors: !1
710
715
  });
711
- return j(() => t._subscribe({
712
- name: a,
713
- formState: m.current,
714
- exact: i,
715
- callback: (c) => {
716
- !o && l({
716
+ return de(() => t._subscribe({
717
+ name: o,
718
+ formState: p.current,
719
+ exact: s,
720
+ callback: (m) => {
721
+ !a && l({
717
722
  ...t._formState,
718
- ...c
723
+ ...m
719
724
  });
720
725
  }
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]);
726
+ }), [o, a, s]), c.useEffect(() => {
727
+ p.current.isValid && t._setValid(!0);
728
+ }, [t]), c.useMemo(() => ut(d, t, p.current, !1), [d, t]);
724
729
  }
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
+ var mt = (e) => typeof e == "string", Y = (e, r, t, a, o) => mt(e) ? I(t, e, o) : Array.isArray(e) ? e.map((s) => I(t, s)) : t, ee = (e) => z(e) || !oe(e);
731
+ function F(e, r, t = /* @__PURE__ */ new WeakSet()) {
732
+ if (ee(e) || ee(r))
733
+ return Object.is(e, r);
734
+ if (k(e) && k(r))
730
735
  return e.getTime() === r.getTime();
731
- const o = Object.keys(e), a = Object.keys(r);
732
- if (o.length !== a.length)
736
+ const a = Object.keys(e), o = Object.keys(r);
737
+ if (a.length !== o.length)
733
738
  return !1;
734
739
  if (t.has(e) || t.has(r))
735
740
  return !0;
736
741
  t.add(e), t.add(r);
737
- for (const i of o) {
738
- const s = e[i];
739
- if (!a.includes(i))
742
+ for (const s of a) {
743
+ const d = e[s];
744
+ if (!o.includes(s))
740
745
  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)
746
+ if (s !== "ref") {
747
+ const l = r[s];
748
+ if (k(d) && k(l) || E(d) && E(l) || Array.isArray(d) && Array.isArray(l) ? !F(d, l, t) : !Object.is(d, l))
744
749
  return !1;
745
750
  }
746
751
  }
747
752
  return !0;
748
753
  }
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 = _);
754
+ function ft(e) {
755
+ const r = P(), { control: t = r.control, name: a, defaultValue: o, disabled: s, exact: d, compute: l } = e || {}, p = c.useRef(o), m = c.useRef(l), g = c.useRef(void 0), A = c.useRef(t), y = c.useRef(a);
756
+ m.current = l;
757
+ const [S, w] = c.useState(() => {
758
+ const b = t._getWatch(a, p.current);
759
+ return m.current ? m.current(b) : b;
760
+ }), C = c.useCallback((b) => {
761
+ const D = Y(a, t._names, b || t._formValues, !1, p.current);
762
+ return m.current ? m.current(D) : D;
763
+ }, [t._formValues, t._names, a]), f = c.useCallback((b) => {
764
+ if (!s) {
765
+ const D = Y(a, t._names, b || t._formValues, !1, p.current);
766
+ if (m.current) {
767
+ const _ = m.current(D);
768
+ F(_, g.current) || (w(_), g.current = _);
764
769
  } else
765
- S(w);
770
+ w(D);
766
771
  }
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,
772
+ }, [t._formValues, t._names, s, a]);
773
+ de(() => ((A.current !== t || !F(y.current, a)) && (A.current = t, y.current = a, f()), t._subscribe({
774
+ name: a,
770
775
  formState: {
771
776
  values: !0
772
777
  },
773
- exact: s,
774
- callback: (p) => {
775
- D(p.values);
778
+ exact: d,
779
+ callback: (b) => {
780
+ f(b.values);
776
781
  }
777
- })), [t, s, o, D]), d.useEffect(() => t._removeUnmounted());
778
- const C = v.current !== t, y = x.current, g = d.useMemo(() => {
779
- if (i)
782
+ })), [t, d, a, f]), c.useEffect(() => t._removeUnmounted());
783
+ const x = A.current !== t, M = y.current, h = c.useMemo(() => {
784
+ if (s)
780
785
  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;
786
+ const b = !x && !F(M, a);
787
+ return x || b ? C() : null;
788
+ }, [s, x, a, M, C]);
789
+ return h !== null ? h : S;
785
790
  }
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,
791
+ function pt(e) {
792
+ const r = P(), { name: t, disabled: a, control: o = r.control, shouldUnregister: s, defaultValue: d } = e, l = nt(o._names.array, t), p = c.useMemo(() => I(o._formValues, t, I(o._defaultValues, t, d)), [o, t, d]), m = ft({
793
+ control: o,
789
794
  name: t,
790
- defaultValue: m,
795
+ defaultValue: p,
791
796
  exact: !0
792
- }), b = Le({
793
- control: a,
797
+ }), g = ct({
798
+ control: o,
794
799
  name: t,
795
800
  exact: !0
796
- }), v = d.useRef(e), x = d.useRef(void 0), I = d.useRef(a.register(t, {
801
+ }), A = c.useRef(e), y = c.useRef(void 0), S = c.useRef(o.register(t, {
797
802
  ...e.rules,
798
- value: c,
799
- ...P(e.disabled) ? { disabled: e.disabled } : {}
803
+ value: m,
804
+ ...L(e.disabled) ? { disabled: e.disabled } : {}
800
805
  }));
801
- v.current = e;
802
- const S = d.useMemo(() => Object.defineProperties({}, {
806
+ A.current = e;
807
+ const w = c.useMemo(() => Object.defineProperties({}, {
803
808
  invalid: {
804
809
  enumerable: !0,
805
- get: () => !!h(b.errors, t)
810
+ get: () => !!I(g.errors, t)
806
811
  },
807
812
  isDirty: {
808
813
  enumerable: !0,
809
- get: () => !!h(b.dirtyFields, t)
814
+ get: () => !!I(g.dirtyFields, t)
810
815
  },
811
816
  isTouched: {
812
817
  enumerable: !0,
813
- get: () => !!h(b.touchedFields, t)
818
+ get: () => !!I(g.touchedFields, t)
814
819
  },
815
820
  isValidating: {
816
821
  enumerable: !0,
817
- get: () => !!h(b.validatingFields, t)
822
+ get: () => !!I(g.validatingFields, t)
818
823
  },
819
824
  error: {
820
825
  enumerable: !0,
821
- get: () => h(b.errors, t)
826
+ get: () => I(g.errors, t)
822
827
  }
823
- }), [b, t]), M = d.useCallback((g) => I.current.onChange({
828
+ }), [g, t]), C = c.useCallback((h) => S.current.onChange({
824
829
  target: {
825
- value: Te(g),
830
+ value: at(h),
826
831
  name: t
827
832
  },
828
- type: W.CHANGE
829
- }), [t]), D = d.useCallback(() => I.current.onBlur({
833
+ type: X.CHANGE
834
+ }), [t]), f = c.useCallback(() => S.current.onBlur({
830
835
  target: {
831
- value: h(a._formValues, t),
836
+ value: I(o._formValues, t),
832
837
  name: t
833
838
  },
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()
839
+ type: X.BLUR
840
+ }), [t, o._formValues]), x = c.useCallback((h) => {
841
+ const b = I(o._fields, t);
842
+ b && h && (b._f.ref = {
843
+ focus: () => h.focus && h.focus(),
844
+ select: () => h.select && h.select(),
845
+ setCustomValidity: (D) => h.setCustomValidity(D),
846
+ reportValidity: () => h.reportValidity()
842
847
  });
843
- }, [a._fields, t]), y = d.useMemo(() => ({
848
+ }, [o._fields, t]), M = c.useMemo(() => ({
844
849
  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 } : {}
850
+ value: m,
851
+ ...L(a) || g.disabled ? { disabled: g.disabled || a } : {},
852
+ onChange: C,
853
+ onBlur: f,
854
+ ref: x
855
+ }), [t, a, g.disabled, C, f, x, m]);
856
+ return c.useEffect(() => {
857
+ const h = o._options.shouldUnregister || s, b = y.current;
858
+ b && b !== t && !l && o.unregister(b), o.register(t, {
859
+ ...A.current.rules,
860
+ ...L(A.current.disabled) ? { disabled: A.current.disabled } : {}
856
861
  });
857
- const w = (_, re) => {
858
- const R = h(a._fields, _);
859
- R && R._f && (R._f.mount = re);
862
+ const D = (_, me) => {
863
+ const V = I(o._fields, _);
864
+ V && V._f && (V._f.mount = me);
860
865
  };
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, _);
866
+ if (D(t, !0), h) {
867
+ const _ = ne(I(o._options.defaultValues, t, A.current.defaultValue));
868
+ q(o._defaultValues, t, _), H(I(o._formValues, t)) && q(o._formValues, t, _);
864
869
  }
865
- return !l && a.register(t), x.current = t, () => {
866
- (l ? g && !a._state.action : g) ? a.unregister(t) : w(t, !1);
870
+ return !l && o.register(t), y.current = t, () => {
871
+ (l ? h && !o._state.action : h) ? o.unregister(t) : D(t, !1);
867
872
  };
868
- }, [t, a, l, i]), d.useEffect(() => {
869
- a._setDisabledField({
870
- disabled: o,
873
+ }, [t, o, l, s]), c.useEffect(() => {
874
+ o._setDisabledField({
875
+ disabled: a,
871
876
  name: t
872
877
  });
873
- }, [o, t, a]), d.useMemo(() => ({
874
- field: y,
875
- formState: b,
876
- fieldState: S
877
- }), [y, b, S]);
878
+ }, [a, t, o]), c.useMemo(() => ({
879
+ field: M,
880
+ formState: g,
881
+ fieldState: w
882
+ }), [M, g, w]);
878
883
  }
879
- const We = (e) => e.render(He(e)), ar = Pe, ee = f.createContext(null), or = ({
884
+ const bt = (e) => e.render(pt(e)), kr = lt, le = v.createContext(null), Rr = ({
880
885
  ...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();
886
+ }) => /* @__PURE__ */ n(le.Provider, { value: { name: e.name }, children: /* @__PURE__ */ n(bt, { ...e }) }), O = () => {
887
+ const e = v.useContext(le), r = v.useContext(ue), { getFieldState: t, formState: a } = P();
883
888
  if (!e)
884
889
  throw new Error("useFormField should be used within <FormField>");
885
890
  if (!r)
886
891
  throw new Error("useFormField should be used within <FormItem>");
887
- const a = t(e.name, o), { id: i } = r;
892
+ const o = t(e.name, a), { id: s } = r;
888
893
  return {
889
- id: i,
894
+ id: s,
890
895
  name: e.name,
891
- formItemId: `${i}-form-item`,
892
- formDescriptionId: `${i}-form-item-description`,
893
- formMessageId: `${i}-form-item-message`,
894
- ...a
896
+ formItemId: `${s}-form-item`,
897
+ formDescriptionId: `${s}-form-item-description`,
898
+ formMessageId: `${s}-form-item-message`,
899
+ ...o
895
900
  };
896
- }, te = f.createContext(null), $e = f.forwardRef(
901
+ }, ue = v.createContext(null), gt = v.forwardRef(
897
902
  ({ 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 }) });
903
+ const a = v.useId();
904
+ return /* @__PURE__ */ n(ue.Provider, { value: { id: a }, children: /* @__PURE__ */ n("div", { ref: t, className: u("space-y-2", e), ...r }) });
900
905
  }
901
906
  );
902
- $e.displayName = "FormItem";
903
- const Ue = f.forwardRef(({ className: e, ...r }, t) => {
904
- const { error: o, formItemId: a } = O();
907
+ gt.displayName = "FormItem";
908
+ const ht = v.forwardRef(({ className: e, ...r }, t) => {
909
+ const { error: a, formItemId: o } = O();
905
910
  return /* @__PURE__ */ n(
906
- fe,
911
+ Ie,
907
912
  {
908
913
  ref: t,
909
- className: u(o && "text-destructive", e),
910
- htmlFor: a,
914
+ className: u(a && "text-destructive", e),
915
+ htmlFor: o,
911
916
  ...r
912
917
  }
913
918
  );
914
919
  });
915
- Ue.displayName = "FormLabel";
916
- const Ke = f.forwardRef(({ ...e }, r) => {
917
- const { error: t, formItemId: o, formDescriptionId: a, formMessageId: i } = O();
920
+ ht.displayName = "FormLabel";
921
+ const xt = v.forwardRef(({ ...e }, r) => {
922
+ const { error: t, formItemId: a, formDescriptionId: o, formMessageId: s } = O();
918
923
  return /* @__PURE__ */ n(
919
- F,
924
+ T,
920
925
  {
921
926
  ref: r,
922
- id: o,
923
- "aria-describedby": t ? `${a} ${i}` : `${a}`,
927
+ id: a,
928
+ "aria-describedby": t ? `${o} ${s}` : `${o}`,
924
929
  "aria-invalid": !!t,
925
930
  ...e
926
931
  }
927
932
  );
928
933
  });
929
- Ke.displayName = "FormControl";
930
- const qe = f.forwardRef(({ className: e, ...r }, t) => {
931
- const { formDescriptionId: o } = O();
934
+ xt.displayName = "FormControl";
935
+ const vt = v.forwardRef(({ className: e, ...r }, t) => {
936
+ const { formDescriptionId: a } = O();
932
937
  return /* @__PURE__ */ n(
933
938
  "p",
934
939
  {
935
940
  ref: t,
936
- id: o,
941
+ id: a,
937
942
  className: u("text-[0.8rem] text-muted-foreground", e),
938
943
  ...r
939
944
  }
940
945
  );
941
946
  });
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(
947
+ vt.displayName = "FormDescription";
948
+ const At = v.forwardRef(({ className: e, children: r, ...t }, a) => {
949
+ const { error: o, formMessageId: s } = O(), d = o ? String((o == null ? void 0 : o.message) ?? "") : r;
950
+ return d ? /* @__PURE__ */ n(
946
951
  "p",
947
952
  {
948
- ref: o,
949
- id: i,
953
+ ref: a,
954
+ id: s,
950
955
  className: u("font-medium text-[0.8rem] text-destructive", e),
951
956
  ...t,
952
- children: s
957
+ children: d
953
958
  }
954
959
  ) : null;
955
960
  });
956
- Xe.displayName = "FormMessage";
961
+ At.displayName = "FormMessage";
962
+ function wt(e, r) {
963
+ let t = null;
964
+ return function(...a) {
965
+ t && clearTimeout(t), t = setTimeout(() => e.apply(this, a), r);
966
+ };
967
+ }
968
+ const ce = Te(null);
969
+ function Fr({
970
+ children: e,
971
+ values: r,
972
+ defaultValues: t,
973
+ onValuesChange: a
974
+ }) {
975
+ const [o, s] = R(!1), [d, l] = R(new Set(r ?? t)), p = r ? new Set(r) : d, [m, g] = R(/* @__PURE__ */ new Map());
976
+ function A(S) {
977
+ const w = (C) => {
978
+ const f = new Set(C);
979
+ return f.has(S) ? f.delete(S) : f.add(S), f;
980
+ };
981
+ l(w), a == null || a([...w(p)]);
982
+ }
983
+ const y = G((S, w) => {
984
+ g((C) => C.get(S) === w ? C : new Map(C).set(S, w));
985
+ }, []);
986
+ return /* @__PURE__ */ n(
987
+ ce,
988
+ {
989
+ value: {
990
+ open: o,
991
+ setOpen: s,
992
+ selectedValues: p,
993
+ toggleValue: A,
994
+ items: m,
995
+ onItemAdded: y
996
+ },
997
+ children: /* @__PURE__ */ n(Ne, { open: o, onOpenChange: s, modal: !0, children: e })
998
+ }
999
+ );
1000
+ }
1001
+ function Pr({
1002
+ className: e,
1003
+ children: r,
1004
+ ...t
1005
+ }) {
1006
+ const { open: a } = K();
1007
+ return /* @__PURE__ */ n(_e, { asChild: !0, children: /* @__PURE__ */ N(
1008
+ te,
1009
+ {
1010
+ ...t,
1011
+ variant: t.variant ?? "outline",
1012
+ role: t.role ?? "combobox",
1013
+ "aria-expanded": t["aria-expanded"] ?? a,
1014
+ className: u(
1015
+ "flex text-secondary cursor-pointer h-auto min-h-9 w-fit items-center justify-between gap-2 overflow-hidden rounded-md border border-input bg-transparent px-3 py-1.5 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 data-[placeholder]:text-muted-foreground dark:bg-input/30 dark:hover:bg-input/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground",
1016
+ e
1017
+ ),
1018
+ children: [
1019
+ r,
1020
+ /* @__PURE__ */ n(Ve, { className: "opacity-50 size-4 shrink-0" })
1021
+ ]
1022
+ }
1023
+ ) });
1024
+ }
1025
+ function Or({
1026
+ placeholder: e,
1027
+ clickToRemove: r = !0,
1028
+ className: t,
1029
+ overflowBehavior: a = "wrap-when-open",
1030
+ ...o
1031
+ }) {
1032
+ const { selectedValues: s, toggleValue: d, items: l, open: p } = K(), [m, g] = R(0), A = J(null), y = J(null), S = a === "wrap" || a === "wrap-when-open" && p, w = G(() => {
1033
+ if (A.current == null) return;
1034
+ const f = A.current, x = y.current, M = f.querySelectorAll("[data-selected-item]");
1035
+ x != null && (x.style.display = "none"), M.forEach((b) => b.style.removeProperty("display"));
1036
+ let h = 0;
1037
+ for (let b = M.length - 1; b >= 0; b--) {
1038
+ const D = M[b];
1039
+ if (f.scrollWidth <= f.clientWidth)
1040
+ break;
1041
+ h = M.length - b, D.style.display = "none", x == null || x.style.removeProperty("display");
1042
+ }
1043
+ g(h);
1044
+ }, []), C = G(
1045
+ (f) => {
1046
+ A.current = f;
1047
+ const x = new MutationObserver(w), M = 100, h = new ResizeObserver(wt(w, M));
1048
+ return x.observe(f, {
1049
+ childList: !0,
1050
+ attributes: !0,
1051
+ attributeFilter: ["class", "style"]
1052
+ }), h.observe(f), () => {
1053
+ h.disconnect(), x.disconnect(), A.current = null;
1054
+ };
1055
+ },
1056
+ [w]
1057
+ );
1058
+ return s.size === 0 && e ? /* @__PURE__ */ n("span", { className: "min-w-0 overflow-hidden font-normal text-muted-foreground", children: e }) : /* @__PURE__ */ N(
1059
+ "div",
1060
+ {
1061
+ ...o,
1062
+ ref: C,
1063
+ className: u(
1064
+ "flex gap-1.5 w-full overflow-hidden",
1065
+ S && "h-full flex-wrap",
1066
+ t
1067
+ ),
1068
+ children: [
1069
+ [...s].filter((f) => l.has(f)).map((f) => /* @__PURE__ */ N(
1070
+ Q,
1071
+ {
1072
+ variant: "outline",
1073
+ "data-selected-item": !0,
1074
+ className: "group flex items-center gap-1 text-secondary",
1075
+ onClick: r ? (x) => {
1076
+ x.stopPropagation(), d(f);
1077
+ } : void 0,
1078
+ children: [
1079
+ l.get(f),
1080
+ r && /* @__PURE__ */ n(Be, { className: "size-2 text-muted-foreground group-hover:text-destructive hover:cursor-pointer group-hover:cursor-pointer" })
1081
+ ]
1082
+ },
1083
+ f
1084
+ )),
1085
+ /* @__PURE__ */ N(
1086
+ Q,
1087
+ {
1088
+ className: "text-secondary cursor-pointer",
1089
+ style: {
1090
+ display: m > 0 && !S ? "block" : "none"
1091
+ },
1092
+ variant: "outline",
1093
+ ref: y,
1094
+ children: [
1095
+ "+",
1096
+ m
1097
+ ]
1098
+ }
1099
+ )
1100
+ ]
1101
+ }
1102
+ );
1103
+ }
1104
+ function Vr({
1105
+ search: e = !0,
1106
+ children: r,
1107
+ ...t
1108
+ }) {
1109
+ const a = typeof e == "object" ? !0 : e;
1110
+ return /* @__PURE__ */ N(Ee, { children: [
1111
+ /* @__PURE__ */ n("div", { style: { display: "none" }, children: /* @__PURE__ */ n(W, { children: /* @__PURE__ */ n($, { children: r }) }) }),
1112
+ /* @__PURE__ */ n(De, { className: "p-0 min-w-[var(--radix-popover-trigger-width)]", children: /* @__PURE__ */ N(W, { ...t, children: [
1113
+ a ? /* @__PURE__ */ n(
1114
+ he,
1115
+ {
1116
+ placeholder: typeof e == "object" ? e.placeholder : void 0
1117
+ }
1118
+ ) : /* @__PURE__ */ n("button", { className: "sr-only" }),
1119
+ /* @__PURE__ */ N($, { children: [
1120
+ a && /* @__PURE__ */ n(xe, { children: typeof e == "object" ? e.emptyMessage : void 0 }),
1121
+ r
1122
+ ] })
1123
+ ] }) })
1124
+ ] });
1125
+ }
1126
+ function Br({
1127
+ value: e,
1128
+ children: r,
1129
+ badgeLabel: t,
1130
+ onSelect: a,
1131
+ ...o
1132
+ }) {
1133
+ const { toggleValue: s, selectedValues: d, onItemAdded: l } = K(), p = d.has(e);
1134
+ return ke(() => {
1135
+ l(e, t ?? r);
1136
+ }, [e, r, l, t]), /* @__PURE__ */ N(
1137
+ Ae,
1138
+ {
1139
+ ...o,
1140
+ onSelect: () => {
1141
+ s(e), a == null || a(e);
1142
+ },
1143
+ className: "text-secondary cursor-pointer",
1144
+ children: [
1145
+ /* @__PURE__ */ n(Oe, { className: u("mr-2 size-4", p ? "opacity-100" : "opacity-0") }),
1146
+ r
1147
+ ]
1148
+ }
1149
+ );
1150
+ }
1151
+ function Lr(e) {
1152
+ return /* @__PURE__ */ n(ve, { ...e });
1153
+ }
1154
+ function K() {
1155
+ const e = Re(ce);
1156
+ if (e == null)
1157
+ throw new Error("useMultiSelectContext must be used within a MultiSelectContext");
1158
+ return e;
1159
+ }
957
1160
  export {
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,
1029
- ba as DropdownMenu,
1030
- pa as DropdownMenuCheckboxItem,
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,
1038
- Sa as DropdownMenuSeparator,
1039
- Ma as DropdownMenuShortcut,
1040
- Da as DropdownMenuSub,
1041
- _a as DropdownMenuSubContent,
1042
- Ia as DropdownMenuSubTrigger,
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,
1118
- Wa as TabsContent,
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,
1161
+ ya as Accordion,
1162
+ Sa as AccordionContent,
1163
+ Ca as AccordionItem,
1164
+ Ma as AccordionTrigger,
1165
+ Kr as AlertDialog,
1166
+ Wr as AlertDialogAction,
1167
+ $r as AlertDialogCancel,
1168
+ Jr as AlertDialogContent,
1169
+ Qr as AlertDialogDescription,
1170
+ Zr as AlertDialogFooter,
1171
+ qr as AlertDialogHeader,
1172
+ Xr as AlertDialogOverlay,
1173
+ jr as AlertDialogPortal,
1174
+ Yr as AlertDialogTitle,
1175
+ ea as AlertDialogTrigger,
1176
+ Na as Avatar,
1177
+ Da as AvatarFallback,
1178
+ _a as AvatarImage,
1179
+ ra as Calendar,
1180
+ aa as CalendarDayButton,
1181
+ na as Carousel,
1182
+ ia as CarouselContent,
1183
+ sa as CarouselItem,
1184
+ da as CarouselNext,
1185
+ la as CarouselPrevious,
1186
+ Ta as Checkbox,
1187
+ ca as Combobox,
1188
+ W as Command,
1189
+ _o as CommandDialog,
1190
+ xe as CommandEmpty,
1191
+ ve as CommandGroup,
1192
+ he as CommandInput,
1193
+ Ae as CommandItem,
1194
+ $ as CommandList,
1195
+ Eo as CommandSeparator,
1196
+ To as CommandShortcut,
1197
+ Ra as ContextMenu,
1198
+ Fa as ContextMenuCheckboxItem,
1199
+ Pa as ContextMenuContent,
1200
+ Oa as ContextMenuGroup,
1201
+ Va as ContextMenuItem,
1202
+ Ba as ContextMenuLabel,
1203
+ La as ContextMenuPortal,
1204
+ Ga as ContextMenuRadioGroup,
1205
+ Ha as ContextMenuRadioItem,
1206
+ za as ContextMenuSeparator,
1207
+ Ua as ContextMenuShortcut,
1208
+ Ka as ContextMenuSub,
1209
+ Wa as ContextMenuSubContent,
1210
+ $a as ContextMenuSubTrigger,
1211
+ Ja as ContextMenuTrigger,
1212
+ Ro as Dialog,
1213
+ Fo as DialogClose,
1214
+ Po as DialogContent,
1215
+ Oo as DialogDescription,
1216
+ Vo as DialogFooter,
1217
+ Bo as DialogHeader,
1218
+ Lo as DialogOverlay,
1219
+ Go as DialogPortal,
1220
+ Ho as DialogTitle,
1221
+ zo as DialogTrigger,
1222
+ Ko as Drawer,
1223
+ Wo as DrawerClose,
1224
+ $o as DrawerContent,
1225
+ Jo as DrawerDescription,
1226
+ Qo as DrawerFooter,
1227
+ Zo as DrawerHeader,
1228
+ qo as DrawerOverlay,
1229
+ Xo as DrawerPortal,
1230
+ jo as DrawerTitle,
1231
+ Yo as DrawerTrigger,
1232
+ Za as DropdownMenu,
1233
+ qa as DropdownMenuCheckboxItem,
1234
+ Xa as DropdownMenuContent,
1235
+ ja as DropdownMenuGroup,
1236
+ Ya as DropdownMenuItem,
1237
+ eo as DropdownMenuLabel,
1238
+ to as DropdownMenuPortal,
1239
+ ro as DropdownMenuRadioGroup,
1240
+ ao as DropdownMenuRadioItem,
1241
+ oo as DropdownMenuSeparator,
1242
+ no as DropdownMenuShortcut,
1243
+ io as DropdownMenuSub,
1244
+ so as DropdownMenuSubContent,
1245
+ lo as DropdownMenuSubTrigger,
1246
+ uo as DropdownMenuTrigger,
1247
+ kr as Form,
1248
+ xt as FormControl,
1249
+ vt as FormDescription,
1250
+ Rr as FormField,
1251
+ gt as FormItem,
1252
+ ht as FormLabel,
1253
+ At as FormMessage,
1254
+ mo as HoverCard,
1255
+ fo as HoverCardContent,
1256
+ po as HoverCardTrigger,
1257
+ fa as InputOTP,
1258
+ pa as InputOTPGroup,
1259
+ ba as InputOTPSeparator,
1260
+ ga as InputOTPSlot,
1261
+ Ie as Label,
1262
+ un as Menubar,
1263
+ cn as MenubarCheckboxItem,
1264
+ mn as MenubarContent,
1265
+ fn as MenubarGroup,
1266
+ pn as MenubarItem,
1267
+ bn as MenubarLabel,
1268
+ gn as MenubarMenu,
1269
+ hn as MenubarPortal,
1270
+ xn as MenubarRadioGroup,
1271
+ vn as MenubarRadioItem,
1272
+ An as MenubarSeparator,
1273
+ wn as MenubarShortcut,
1274
+ yn as MenubarSub,
1275
+ Sn as MenubarSubContent,
1276
+ Cn as MenubarSubTrigger,
1277
+ Mn as MenubarTrigger,
1278
+ Fr as MultiSelect,
1279
+ Vr as MultiSelectContent,
1280
+ Lr as MultiSelectGroup,
1281
+ Br as MultiSelectItem,
1282
+ Pr as MultiSelectTrigger,
1283
+ Or as MultiSelectValue,
1284
+ Ne as Popover,
1285
+ Nn as PopoverAnchor,
1286
+ De as PopoverContent,
1287
+ _e as PopoverTrigger,
1288
+ Aa as Progress,
1289
+ go as RadioGroup,
1290
+ ho as RadioGroupItem,
1291
+ vo as ScrollArea,
1292
+ Ao as ScrollBar,
1293
+ we as Sheet,
1294
+ tn as SheetClose,
1295
+ ye as SheetContent,
1296
+ Me as SheetDescription,
1297
+ rn as SheetFooter,
1298
+ Se as SheetHeader,
1299
+ Ce as SheetTitle,
1300
+ an as SheetTrigger,
1301
+ ur as Sidebar,
1302
+ xr as SidebarContent,
1303
+ gr as SidebarFooter,
1304
+ vr as SidebarGroup,
1305
+ wr as SidebarGroupAction,
1306
+ yr as SidebarGroupContent,
1307
+ Ar as SidebarGroupLabel,
1308
+ br as SidebarHeader,
1309
+ pr as SidebarInput,
1310
+ fr as SidebarInset,
1311
+ Sr as SidebarMenu,
1312
+ Ir as SidebarMenuAction,
1313
+ Nr as SidebarMenuBadge,
1314
+ Mr as SidebarMenuButton,
1315
+ Cr as SidebarMenuItem,
1316
+ Dr as SidebarMenuSkeleton,
1317
+ _r as SidebarMenuSub,
1318
+ Tr as SidebarMenuSubButton,
1319
+ Er as SidebarMenuSubItem,
1320
+ lr as SidebarProvider,
1321
+ mr as SidebarRail,
1322
+ hr as SidebarSeparator,
1323
+ cr as SidebarTrigger,
1324
+ xa as Slider,
1325
+ yo as Switch,
1326
+ Co as Tabs,
1327
+ Mo as TabsContent,
1328
+ Io as TabsList,
1329
+ No as TabsTrigger,
1330
+ zr as TextReveal,
1331
+ nn as Toaster,
1332
+ dn as Toggle,
1333
+ fe as Tooltip,
1334
+ be as TooltipContent,
1335
+ ge as TooltipProvider,
1336
+ pe as TooltipTrigger,
1128
1337
  O as useFormField,
1129
- X as useSidebar
1338
+ ae as useSidebar
1130
1339
  };