@dlbcodes/ui 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 (147) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +70 -0
  3. package/dist/index.js +3252 -0
  4. package/dist/lib/components/form/Checkbox.test.d.ts +1 -0
  5. package/dist/lib/components/form/Checkbox.vue.d.ts +24 -0
  6. package/dist/lib/components/form/Input.test.d.ts +1 -0
  7. package/dist/lib/components/form/Input.vue.d.ts +49 -0
  8. package/dist/lib/components/form/Switch.test.d.ts +1 -0
  9. package/dist/lib/components/form/Switch.vue.d.ts +17 -0
  10. package/dist/lib/components/form/Textarea.test.d.ts +1 -0
  11. package/dist/lib/components/form/Textarea.vue.d.ts +52 -0
  12. package/dist/lib/components/form/_shared/SearchInput.vue.d.ts +15 -0
  13. package/dist/lib/components/form/combobox/Combobox.test.d.ts +1 -0
  14. package/dist/lib/components/form/combobox/Combobox.vue.d.ts +31 -0
  15. package/dist/lib/components/form/combobox/ComboboxContent.vue.d.ts +24 -0
  16. package/dist/lib/components/form/combobox/ComboboxEmpty.vue.d.ts +17 -0
  17. package/dist/lib/components/form/combobox/ComboboxInput.vue.d.ts +13 -0
  18. package/dist/lib/components/form/combobox/ComboboxItem.vue.d.ts +29 -0
  19. package/dist/lib/components/form/combobox/context.d.ts +18 -0
  20. package/dist/lib/components/form/combobox/index.d.ts +5 -0
  21. package/dist/lib/components/form/dropdown/Dropdown.test.d.ts +1 -0
  22. package/dist/lib/components/form/dropdown/Dropdown.vue.d.ts +27 -0
  23. package/dist/lib/components/form/dropdown/DropdownContent.vue.d.ts +25 -0
  24. package/dist/lib/components/form/dropdown/DropdownItem.vue.d.ts +28 -0
  25. package/dist/lib/components/form/dropdown/DropdownTrigger.vue.d.ts +24 -0
  26. package/dist/lib/components/form/dropdown/index.d.ts +4 -0
  27. package/dist/lib/components/form/field/Field.test.d.ts +1 -0
  28. package/dist/lib/components/form/field/Field.vue.d.ts +31 -0
  29. package/dist/lib/components/form/field/FieldContent.vue.d.ts +21 -0
  30. package/dist/lib/components/form/field/FieldDescription.vue.d.ts +21 -0
  31. package/dist/lib/components/form/field/FieldError.vue.d.ts +21 -0
  32. package/dist/lib/components/form/field/FieldLabel.vue.d.ts +22 -0
  33. package/dist/lib/components/form/field/index.d.ts +5 -0
  34. package/dist/lib/components/form/multiselect/MultiSelect.test.d.ts +1 -0
  35. package/dist/lib/components/form/multiselect/MultiSelect.vue.d.ts +51 -0
  36. package/dist/lib/components/form/multiselect/MultiSelectContent.vue.d.ts +25 -0
  37. package/dist/lib/components/form/multiselect/MultiSelectItem.vue.d.ts +24 -0
  38. package/dist/lib/components/form/multiselect/MultiSelectSearch.vue.d.ts +7 -0
  39. package/dist/lib/components/form/multiselect/MultiSelectTrigger.vue.d.ts +29 -0
  40. package/dist/lib/components/form/multiselect/context.d.ts +13 -0
  41. package/dist/lib/components/form/multiselect/index.d.ts +5 -0
  42. package/dist/lib/components/form/multiselect/use-context.d.ts +2 -0
  43. package/dist/lib/components/form/select/Select.test.d.ts +1 -0
  44. package/dist/lib/components/form/select/Select.vue.d.ts +33 -0
  45. package/dist/lib/components/form/select/SelectContent.vue.d.ts +28 -0
  46. package/dist/lib/components/form/select/SelectItem.vue.d.ts +34 -0
  47. package/dist/lib/components/form/select/SelectSearch.vue.d.ts +7 -0
  48. package/dist/lib/components/form/select/SelectTrigger.vue.d.ts +31 -0
  49. package/dist/lib/components/form/select/context.d.ts +32 -0
  50. package/dist/lib/components/form/select/index.d.ts +6 -0
  51. package/dist/lib/components/overlays/modal/Modal.test.d.ts +1 -0
  52. package/dist/lib/components/overlays/modal/Modal.vue.d.ts +49 -0
  53. package/dist/lib/components/overlays/modal/ModalClose.vue.d.ts +21 -0
  54. package/dist/lib/components/overlays/modal/ModalContent.vue.d.ts +21 -0
  55. package/dist/lib/components/overlays/modal/ModalDescription.vue.d.ts +21 -0
  56. package/dist/lib/components/overlays/modal/ModalFooter.vue.d.ts +21 -0
  57. package/dist/lib/components/overlays/modal/ModalHeader.vue.d.ts +21 -0
  58. package/dist/lib/components/overlays/modal/ModalTitle.vue.d.ts +21 -0
  59. package/dist/lib/components/overlays/modal/index.d.ts +7 -0
  60. package/dist/lib/components/overlays/modal/modal-context.d.ts +17 -0
  61. package/dist/lib/components/overlays/popover/Popover.test.d.ts +1 -0
  62. package/dist/lib/components/overlays/popover/Popover.vue.d.ts +27 -0
  63. package/dist/lib/components/overlays/popover/PopoverContent.vue.d.ts +27 -0
  64. package/dist/lib/components/overlays/popover/PopoverTrigger.vue.d.ts +24 -0
  65. package/dist/lib/components/overlays/popover/index.d.ts +3 -0
  66. package/dist/lib/components/primitives/Avatar.test.d.ts +1 -0
  67. package/dist/lib/components/primitives/Avatar.vue.d.ts +14 -0
  68. package/dist/lib/components/primitives/Badge.test.d.ts +1 -0
  69. package/dist/lib/components/primitives/Badge.vue.d.ts +25 -0
  70. package/dist/lib/components/primitives/Button.test.d.ts +1 -0
  71. package/dist/lib/components/primitives/Button.vue.d.ts +37 -0
  72. package/dist/lib/components/primitives/Kbd.test.d.ts +1 -0
  73. package/dist/lib/components/primitives/Kbd.vue.d.ts +21 -0
  74. package/dist/lib/components/primitives/KbdGroup.test.d.ts +1 -0
  75. package/dist/lib/components/primitives/KbdGroup.vue.d.ts +27 -0
  76. package/dist/lib/components/primitives/Label.test.d.ts +1 -0
  77. package/dist/lib/components/primitives/Label.vue.d.ts +23 -0
  78. package/dist/lib/components/primitives/Progress.test.d.ts +1 -0
  79. package/dist/lib/components/primitives/Progress.vue.d.ts +13 -0
  80. package/dist/lib/components/primitives/Separator.test.d.ts +1 -0
  81. package/dist/lib/components/primitives/Separator.vue.d.ts +12 -0
  82. package/dist/lib/components/primitives/Skeleton.test.d.ts +1 -0
  83. package/dist/lib/components/primitives/Skeleton.vue.d.ts +6 -0
  84. package/dist/lib/components/primitives/Spinner.test.d.ts +1 -0
  85. package/dist/lib/components/primitives/Spinner.vue.d.ts +9 -0
  86. package/dist/lib/components/primitives/alert/Alert.test.d.ts +1 -0
  87. package/dist/lib/components/primitives/alert/Alert.vue.d.ts +27 -0
  88. package/dist/lib/components/primitives/alert/AlertDescription.vue.d.ts +21 -0
  89. package/dist/lib/components/primitives/alert/AlertTitle.vue.d.ts +21 -0
  90. package/dist/lib/components/primitives/alert/index.d.ts +3 -0
  91. package/dist/lib/components/primitives/disclosure/Disclosure.test.d.ts +1 -0
  92. package/dist/lib/components/primitives/disclosure/Disclosure.vue.d.ts +27 -0
  93. package/dist/lib/components/primitives/disclosure/DisclosureContent.vue.d.ts +21 -0
  94. package/dist/lib/components/primitives/disclosure/DisclosureTrigger.vue.d.ts +23 -0
  95. package/dist/lib/components/primitives/disclosure/index.d.ts +3 -0
  96. package/dist/lib/components/primitives/empty/Empty.test.d.ts +1 -0
  97. package/dist/lib/components/primitives/empty/Empty.vue.d.ts +21 -0
  98. package/dist/lib/components/primitives/empty/EmptyContent.vue.d.ts +21 -0
  99. package/dist/lib/components/primitives/empty/EmptyDescription.vue.d.ts +21 -0
  100. package/dist/lib/components/primitives/empty/EmptyHeader.vue.d.ts +21 -0
  101. package/dist/lib/components/primitives/empty/EmptyMedia.vue.d.ts +25 -0
  102. package/dist/lib/components/primitives/empty/EmptyTitle.vue.d.ts +21 -0
  103. package/dist/lib/components/primitives/empty/index.d.ts +6 -0
  104. package/dist/lib/components/primitives/index.d.ts +16 -0
  105. package/dist/lib/components/primitives/panel/Panel.test.d.ts +1 -0
  106. package/dist/lib/components/primitives/panel/Panel.vue.d.ts +21 -0
  107. package/dist/lib/components/primitives/panel/PanelContent.vue.d.ts +21 -0
  108. package/dist/lib/components/primitives/panel/PanelFooter.vue.d.ts +21 -0
  109. package/dist/lib/components/primitives/panel/PanelHeader.vue.d.ts +21 -0
  110. package/dist/lib/components/primitives/panel/index.d.ts +4 -0
  111. package/dist/lib/components/primitives/sidebar/Sidebar.test.d.ts +1 -0
  112. package/dist/lib/components/primitives/sidebar/Sidebar.vue.d.ts +22 -0
  113. package/dist/lib/components/primitives/sidebar/SidebarContent.vue.d.ts +21 -0
  114. package/dist/lib/components/primitives/sidebar/SidebarFooter.vue.d.ts +21 -0
  115. package/dist/lib/components/primitives/sidebar/SidebarGroup.vue.d.ts +23 -0
  116. package/dist/lib/components/primitives/sidebar/SidebarHeader.vue.d.ts +21 -0
  117. package/dist/lib/components/primitives/sidebar/SidebarItem.vue.d.ts +34 -0
  118. package/dist/lib/components/primitives/sidebar/SidebarProvider.vue.d.ts +17 -0
  119. package/dist/lib/components/primitives/sidebar/SidebarTrigger.vue.d.ts +6 -0
  120. package/dist/lib/components/primitives/sidebar/context.d.ts +12 -0
  121. package/dist/lib/components/primitives/sidebar/index.d.ts +9 -0
  122. package/dist/lib/components/primitives/tabs/Tabs.test.d.ts +1 -0
  123. package/dist/lib/components/primitives/tabs/Tabs.vue.d.ts +34 -0
  124. package/dist/lib/components/primitives/tabs/TabsContent.vue.d.ts +21 -0
  125. package/dist/lib/components/primitives/tabs/TabsList.vue.d.ts +21 -0
  126. package/dist/lib/components/primitives/tabs/TabsPanels.vue.d.ts +21 -0
  127. package/dist/lib/components/primitives/tabs/TabsTrigger.vue.d.ts +24 -0
  128. package/dist/lib/components/primitives/tabs/index.d.ts +5 -0
  129. package/dist/lib/core/field-context.d.ts +24 -0
  130. package/dist/lib/core/placement.d.ts +1 -0
  131. package/dist/lib/core/transitions.d.ts +8 -0
  132. package/dist/lib/index.d.ts +19 -0
  133. package/dist/lib/styles/tokens.css +125 -0
  134. package/dist/lib/utils/cn.d.ts +2 -0
  135. package/dist/lib/variants/alert.d.ts +5 -0
  136. package/dist/lib/variants/avatar.d.ts +5 -0
  137. package/dist/lib/variants/badge.d.ts +5 -0
  138. package/dist/lib/variants/button.d.ts +6 -0
  139. package/dist/lib/variants/empty.d.ts +5 -0
  140. package/dist/lib/variants/input.d.ts +7 -0
  141. package/dist/lib/variants/menu-item.d.ts +5 -0
  142. package/dist/lib/variants/modal.d.ts +5 -0
  143. package/dist/lib/variants/popover.d.ts +5 -0
  144. package/dist/lib/variants/separator.d.ts +5 -0
  145. package/dist/lib/variants/sidebar.d.ts +5 -0
  146. package/dist/lib/variants/tabs.d.ts +6 -0
  147. package/package.json +68 -0
package/dist/index.js ADDED
@@ -0,0 +1,3252 @@
1
+ import { Fragment as e, Teleport as t, Transition as n, computed as r, createBlock as i, createCommentVNode as a, createElementBlock as o, createElementVNode as s, createTextVNode as c, createVNode as l, defineComponent as u, inject as d, mergeModels as f, mergeProps as p, nextTick as m, normalizeClass as h, normalizeStyle as g, onBeforeUnmount as _, onMounted as v, onUnmounted as y, openBlock as b, provide as x, ref as S, renderSlot as C, resolveDynamicComponent as w, shallowRef as T, toDisplayString as E, toValue as ee, unref as D, useId as O, useModel as te, useSlots as ne, vShow as re, watch as k, watchEffect as ie, withCtx as A, withDirectives as ae, withModifiers as oe } from "vue";
2
+ import { RouterLink as se } from "vue-router";
3
+ import { twMerge as ce } from "tailwind-merge";
4
+ import { clsx as le } from "clsx";
5
+ import { cva as j } from "class-variance-authority";
6
+ import { Combobox as ue, ComboboxButton as de, ComboboxInput as fe, ComboboxOption as pe, ComboboxOptions as me, Disclosure as he, DisclosureButton as ge, DisclosurePanel as _e, Listbox as ve, ListboxButton as ye, ListboxOption as be, ListboxOptions as xe, Menu as Se, MenuButton as Ce, MenuItem as we, MenuItems as Te, Popover as Ee, PopoverButton as De, PopoverPanel as Oe, Tab as ke, TabGroup as Ae, TabList as je, TabPanel as Me, TabPanels as Ne } from "@headlessui/vue";
7
+ import { PhCaretDown as Pe, PhCaretUpDown as Fe, PhCheck as Ie, PhList as Le, PhMagnifyingGlass as Re, PhX as ze } from "@phosphor-icons/vue";
8
+ import { onKeyStroke as Be, toArray as Ve, tryOnScopeDispose as He, unrefElement as Ue, useMediaQuery as We, useScrollLock as Ge, useTextareaAutosize as Ke } from "@vueuse/core";
9
+ import { Float as M, FloatContent as N, FloatReference as P } from "@headlessui-float/vue";
10
+ //#region lib/utils/cn.ts
11
+ function F(...e) {
12
+ return ce(le(e));
13
+ }
14
+ var qe = j([
15
+ "group",
16
+ "inline-flex",
17
+ "items-center",
18
+ "justify-center",
19
+ "gap-2",
20
+ "cursor-pointer",
21
+ "select-none",
22
+ "font-semibold",
23
+ "transition-all",
24
+ "duration-100",
25
+ "ease-linear",
26
+ "active:not-aria-[haspopup]:translate-y-px",
27
+ "disabled:pointer-events-none",
28
+ "disabled:opacity-50",
29
+ "focus-visible:outline-none",
30
+ "focus-visible:ring-2",
31
+ "focus-visible:ring-offset-2",
32
+ "focus-visible:ring-border-strong",
33
+ "[&_svg]:pointer-events-none",
34
+ "[&_svg]:shrink-0",
35
+ "[&_svg:not([class*='size-'])]:size-4"
36
+ ].join(" "), {
37
+ variants: {
38
+ variant: {
39
+ primary: "border border-brand-200 bg-brand-200 text-text-inverse hover:brightness-110",
40
+ secondary: "border border-border-default bg-bg-base text-text-primary hover:bg-bg-subtle aria-expanded:bg-bg-subtle",
41
+ destructive: "border border-danger-text bg-danger-text text-text-inverse hover:brightness-110",
42
+ outline: "border border-border-default bg-transparent text-text-secondary hover:bg-bg-subtle hover:text-text-primary aria-expanded:bg-bg-subtle aria-expanded:text-text-primary",
43
+ ghost: "text-text-primary hover:bg-bg-subtle aria-expanded:bg-bg-subtle",
44
+ link: "inline-flex text-brand-200 hover:underline",
45
+ icon: "relative inline-grid place-items-center text-text-secondary hover:bg-bg-subtle aria-expanded:bg-bg-subtle aria-expanded:text-text-primary"
46
+ },
47
+ size: {
48
+ xl: "h-14 rounded-xl px-6 text-base",
49
+ lg: "h-12 rounded-xl px-6 text-base",
50
+ base: "h-10 rounded-xl px-6 text-sm",
51
+ sm: "h-8 rounded-lg px-4 text-sm",
52
+ icon: "rounded-xl p-1.5",
53
+ "icon-sm": "rounded-lg p-1"
54
+ }
55
+ },
56
+ defaultVariants: {
57
+ variant: "primary",
58
+ size: "base"
59
+ }
60
+ }), Je = {
61
+ role: "status",
62
+ class: "inline-flex"
63
+ }, Ye = { class: "sr-only" }, Xe = /* @__PURE__ */ u({
64
+ __name: "Spinner",
65
+ props: {
66
+ label: { default: "Loading" },
67
+ class: { type: [
68
+ Boolean,
69
+ null,
70
+ String,
71
+ Object,
72
+ Array
73
+ ] }
74
+ },
75
+ setup(e) {
76
+ let t = e;
77
+ return (n, r) => (b(), o("span", Je, [(b(), o("svg", {
78
+ class: h(D(F)("size-6 animate-spin text-text-tertiary", t.class)),
79
+ xmlns: "http://www.w3.org/2000/svg",
80
+ fill: "none",
81
+ viewBox: "0 0 24 24",
82
+ "aria-hidden": "true"
83
+ }, [...r[0] ||= [s("circle", {
84
+ class: "opacity-25",
85
+ cx: "12",
86
+ cy: "12",
87
+ r: "10",
88
+ stroke: "currentColor",
89
+ "stroke-width": "4"
90
+ }, null, -1), s("path", {
91
+ class: "opacity-75",
92
+ fill: "currentColor",
93
+ d: "M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"
94
+ }, null, -1)]], 2)), s("span", Ye, E(e.label), 1)]));
95
+ }
96
+ }), Ze = /* @__PURE__ */ u({
97
+ __name: "Button",
98
+ props: {
99
+ variant: { default: "primary" },
100
+ size: { default: "base" },
101
+ class: { type: [
102
+ Boolean,
103
+ null,
104
+ String,
105
+ Object,
106
+ Array
107
+ ] },
108
+ to: {},
109
+ as: {},
110
+ type: { default: "button" },
111
+ loading: {
112
+ type: Boolean,
113
+ default: !1
114
+ },
115
+ disabled: {
116
+ type: Boolean,
117
+ default: !1
118
+ },
119
+ loadingText: { default: "Loading…" }
120
+ },
121
+ setup(t) {
122
+ let n = t, a = r(() => !!n.to), c = r(() => n.loading || n.disabled), u = r(() => a.value ? n.as ?? se : "button"), d = r(() => a.value && n.as === "a"), f = r(() => !a.value || c.value ? {} : d.value ? { href: n.to } : { to: n.to }), m = r(() => F(qe({
123
+ variant: n.variant,
124
+ size: n.size
125
+ }), c.value && "pointer-events-none opacity-60", n.class));
126
+ return (r, d) => (b(), i(w(u.value), p(f.value, {
127
+ type: a.value ? void 0 : n.type,
128
+ disabled: a.value ? void 0 : c.value,
129
+ "aria-disabled": c.value || void 0,
130
+ "aria-busy": t.loading || void 0,
131
+ class: m.value
132
+ }), {
133
+ default: A(() => [t.loading ? (b(), o(e, { key: 0 }, [l(Xe, {
134
+ class: "size-4 shrink-0",
135
+ label: t.loadingText
136
+ }, null, 8, ["label"]), s("span", null, E(t.loadingText), 1)], 64)) : C(r.$slots, "default", { key: 1 })]),
137
+ _: 3
138
+ }, 16, [
139
+ "type",
140
+ "disabled",
141
+ "aria-disabled",
142
+ "aria-busy",
143
+ "class"
144
+ ]));
145
+ }
146
+ }), Qe = j([
147
+ "inline-flex",
148
+ "items-center",
149
+ "justify-center",
150
+ "gap-1",
151
+ "w-fit",
152
+ "shrink-0",
153
+ "overflow-hidden",
154
+ "whitespace-nowrap",
155
+ "rounded",
156
+ "border",
157
+ "px-2",
158
+ "py-0.5",
159
+ "text-[10px]",
160
+ "font-bold",
161
+ "uppercase",
162
+ "tracking-tight",
163
+ "transition-colors",
164
+ "[&>svg]:size-3"
165
+ ].join(" "), {
166
+ variants: { variant: {
167
+ success: "border-success-border bg-success-surface text-success-text",
168
+ pending: "border-warning-border bg-warning-surface text-warning-text",
169
+ info: "border-info-border bg-info-surface text-info-text",
170
+ destructive: "border-danger-border bg-danger-surface text-danger-text",
171
+ neutral: "border-border-default bg-bg-subtle text-text-secondary",
172
+ primary: "border-brand-200 bg-brand-200 text-text-inverse",
173
+ outline: "border-border-default bg-transparent text-text-secondary"
174
+ } },
175
+ defaultVariants: { variant: "neutral" }
176
+ }), $e = /* @__PURE__ */ u({
177
+ __name: "Badge",
178
+ props: {
179
+ variant: { default: "neutral" },
180
+ class: { type: [
181
+ Boolean,
182
+ null,
183
+ String,
184
+ Object,
185
+ Array
186
+ ] }
187
+ },
188
+ setup(e) {
189
+ let t = e;
190
+ return (e, n) => (b(), o("span", { class: h(D(F)(D(Qe)({ variant: t.variant }), t.class)) }, [C(e.$slots, "default")], 2));
191
+ }
192
+ }), et = j([[
193
+ "flex",
194
+ "flex-col",
195
+ "items-center",
196
+ "justify-center",
197
+ "w-full",
198
+ "uppercase",
199
+ "text-text-primary",
200
+ "bg-bg-surface",
201
+ "border",
202
+ "border-border-default",
203
+ "overflow-hidden"
204
+ ].join(" "), [
205
+ "*:overflow-hidden",
206
+ "*:bg-white",
207
+ "*:shadow-xs",
208
+ "*:rounded-2xl",
209
+ "*:dark:bg-dark-950",
210
+ "*:dark:border",
211
+ "*:dark:border-black",
212
+ "*:dark:shadow-[inset_-1px_1px_2px_0px_rgba(71,71,71,0.56)]"
213
+ ].join(" ")].join(" "), {
214
+ variants: { size: {
215
+ "10xl": "text-3xl size-30 xl:size-40 p-1 rounded-3xl *:rounded-[20px]",
216
+ "9xl": "text-3xl size-30 p-1 rounded-3xl *:rounded-[20px]",
217
+ "8xl": "text-3xl size-28 p-1 rounded-3xl *:rounded-[20px]",
218
+ "7xl": "text-3xl size-26 p-1 rounded-3xl *:rounded-[20px]",
219
+ "6xl": "text-3xl size-24 p-1 rounded-3xl *:rounded-[20px]",
220
+ "5xl": "text-3xl size-22 p-1 rounded-3xl *:rounded-[20px]",
221
+ "4xl": "text-4xl size-20 p-1 rounded-3xl *:rounded-[20px]",
222
+ "3xl": "text-xl size-18 p-1 rounded-2xl *:rounded-xl",
223
+ "2xl": "size-16",
224
+ xl: "size-14 rounded-xl *:rounded-[10px]",
225
+ lg: "size-12 p-0.5 rounded-xl *:rounded-[10px]",
226
+ base: "size-10 rounded-xl *:rounded-[10px]",
227
+ sm: "size-8 rounded-xl *:rounded-[10px]",
228
+ xs: "size-6 rounded-md"
229
+ } },
230
+ defaultVariants: { size: "base" }
231
+ }), tt = ["src", "alt"], nt = {
232
+ key: 1,
233
+ class: "flex size-full items-center justify-center"
234
+ }, rt = /* @__PURE__ */ u({
235
+ __name: "Avatar",
236
+ props: {
237
+ size: { default: "base" },
238
+ src: { default: null },
239
+ name: { default: null },
240
+ class: { type: [
241
+ Boolean,
242
+ null,
243
+ String,
244
+ Object,
245
+ Array
246
+ ] }
247
+ },
248
+ setup(e) {
249
+ let t = e, n = r(() => {
250
+ let e = t.name?.trim();
251
+ return e ? e.charAt(0).toUpperCase() : "?";
252
+ }), i = r(() => t.name?.trim() ?? "");
253
+ return (r, a) => (b(), o("div", { class: h(D(F)(D(et)({ size: e.size }), t.class)) }, [e.src ? (b(), o("img", {
254
+ key: 0,
255
+ src: e.src,
256
+ alt: i.value,
257
+ class: "size-full rounded-full object-cover"
258
+ }, null, 8, tt)) : (b(), o("div", nt, E(n.value), 1))], 2));
259
+ }
260
+ }), it = /* @__PURE__ */ u({
261
+ __name: "Kbd",
262
+ props: { class: { type: [
263
+ Boolean,
264
+ null,
265
+ String,
266
+ Object,
267
+ Array
268
+ ] } },
269
+ setup(e) {
270
+ let t = e;
271
+ return (e, n) => (b(), o("kbd", { class: h(D(F)("pointer-events-none inline-flex h-5 w-fit min-w-5 select-none items-center justify-center gap-1 rounded-sm bg-bg-subtle px-1 font-sans text-xs font-medium text-text-secondary", t.class)) }, [C(e.$slots, "default")], 2));
272
+ }
273
+ }), at = ["aria-label", "role"], ot = /* @__PURE__ */ u({
274
+ __name: "KbdGroup",
275
+ props: {
276
+ ariaLabel: {},
277
+ class: { type: [
278
+ Boolean,
279
+ null,
280
+ String,
281
+ Object,
282
+ Array
283
+ ] }
284
+ },
285
+ setup(e) {
286
+ let t = e;
287
+ return (n, r) => (b(), o("div", {
288
+ class: h(D(F)("inline-flex items-center gap-1", t.class)),
289
+ "aria-label": e.ariaLabel,
290
+ role: e.ariaLabel ? "group" : void 0
291
+ }, [C(n.$slots, "default")], 10, at));
292
+ }
293
+ }), st = ["for"], ct = /* @__PURE__ */ u({
294
+ __name: "Label",
295
+ props: {
296
+ for: {},
297
+ class: { type: [
298
+ Boolean,
299
+ null,
300
+ String,
301
+ Object,
302
+ Array
303
+ ] }
304
+ },
305
+ setup(e) {
306
+ let t = e;
307
+ return (e, n) => (b(), o("label", {
308
+ for: t.for,
309
+ class: h(D(F)("cursor-pointer select-none text-sm font-medium text-text-primary", t.class))
310
+ }, [C(e.$slots, "default")], 10, st));
311
+ }
312
+ }), lt = j("shrink-0 bg-border-subtle", {
313
+ variants: { orientation: {
314
+ horizontal: "h-px w-full",
315
+ vertical: "h-full w-px"
316
+ } },
317
+ defaultVariants: { orientation: "horizontal" }
318
+ }), ut = ["role", "aria-orientation"], dt = /* @__PURE__ */ u({
319
+ __name: "Separator",
320
+ props: {
321
+ orientation: { default: "horizontal" },
322
+ decorative: {
323
+ type: Boolean,
324
+ default: !0
325
+ },
326
+ class: { type: [
327
+ Boolean,
328
+ null,
329
+ String,
330
+ Object,
331
+ Array
332
+ ] }
333
+ },
334
+ setup(e) {
335
+ let t = e;
336
+ return (n, r) => (b(), o("div", {
337
+ class: h(D(F)(D(lt)({ orientation: e.orientation }), t.class)),
338
+ role: e.decorative ? "none" : "separator",
339
+ "aria-orientation": e.decorative ? void 0 : e.orientation
340
+ }, null, 10, ut));
341
+ }
342
+ }), ft = /* @__PURE__ */ u({
343
+ __name: "Skeleton",
344
+ props: { class: { type: [
345
+ Boolean,
346
+ null,
347
+ String,
348
+ Object,
349
+ Array
350
+ ] } },
351
+ setup(e) {
352
+ let t = e;
353
+ return (e, n) => (b(), o("div", {
354
+ class: h(D(F)("animate-pulse rounded-md bg-bg-surface", t.class)),
355
+ "aria-hidden": "true"
356
+ }, null, 2));
357
+ }
358
+ }), pt = [
359
+ "aria-valuemax",
360
+ "aria-valuenow",
361
+ "aria-label"
362
+ ], mt = /* @__PURE__ */ u({
363
+ __name: "Progress",
364
+ props: {
365
+ value: {},
366
+ max: { default: 100 },
367
+ label: {},
368
+ class: { type: [
369
+ Boolean,
370
+ null,
371
+ String,
372
+ Object,
373
+ Array
374
+ ] }
375
+ },
376
+ setup(e) {
377
+ let t = e, n = r(() => t.value === void 0 ? 0 : Math.min(Math.max(t.value, 0), t.max) / t.max * 100);
378
+ return (r, i) => (b(), o("div", {
379
+ role: "progressbar",
380
+ "aria-valuemin": 0,
381
+ "aria-valuemax": e.max,
382
+ "aria-valuenow": e.value,
383
+ "aria-label": e.label,
384
+ class: h(D(F)("relative h-1 w-full overflow-hidden rounded-full bg-bg-surface", t.class))
385
+ }, [s("div", {
386
+ class: "size-full flex-1 rounded-full bg-brand-200 transition-transform duration-300",
387
+ style: g({ transform: `translateX(-${100 - n.value}%)` })
388
+ }, null, 4)], 10, pt));
389
+ }
390
+ }), ht = /* @__PURE__ */ u({
391
+ __name: "Panel",
392
+ props: { class: { type: [
393
+ Boolean,
394
+ null,
395
+ String,
396
+ Object,
397
+ Array
398
+ ] } },
399
+ setup(e) {
400
+ let t = e;
401
+ return (e, n) => (b(), o("div", { class: h(D(F)("flex flex-col shrink-0 w-full p-1 bg-bg-surface border border-border-default rounded-3xl shadow-xs overflow-hidden", t.class)) }, [C(e.$slots, "default")], 2));
402
+ }
403
+ }), gt = /* @__PURE__ */ u({
404
+ __name: "PanelHeader",
405
+ props: { class: { type: [
406
+ Boolean,
407
+ null,
408
+ String,
409
+ Object,
410
+ Array
411
+ ] } },
412
+ setup(e) {
413
+ let t = e;
414
+ return (e, n) => (b(), o("div", { class: h(D(F)("flex items-center px-3 py-2", t.class)) }, [C(e.$slots, "default")], 2));
415
+ }
416
+ }), _t = /* @__PURE__ */ u({
417
+ __name: "PanelContent",
418
+ props: { class: { type: [
419
+ Boolean,
420
+ null,
421
+ String,
422
+ Object,
423
+ Array
424
+ ] } },
425
+ setup(e) {
426
+ let t = e;
427
+ return (e, n) => (b(), o("div", { class: h(D(F)("h-full overflow-hidden p-2 bg-bg-raised shadow-xs rounded-[20px]", t.class)) }, [C(e.$slots, "default")], 2));
428
+ }
429
+ }), vt = /* @__PURE__ */ u({
430
+ __name: "PanelFooter",
431
+ props: { class: { type: [
432
+ Boolean,
433
+ null,
434
+ String,
435
+ Object,
436
+ Array
437
+ ] } },
438
+ setup(e) {
439
+ let t = e;
440
+ return (e, n) => (b(), o("div", { class: h(D(F)("flex items-center px-3 py-2", t.class)) }, [C(e.$slots, "default")], 2));
441
+ }
442
+ }), yt = /* @__PURE__ */ u({
443
+ __name: "Tabs",
444
+ props: {
445
+ defaultIndex: { default: 0 },
446
+ selectedIndex: {},
447
+ manual: {
448
+ type: Boolean,
449
+ default: !1
450
+ },
451
+ class: { type: [
452
+ Boolean,
453
+ null,
454
+ String,
455
+ Object,
456
+ Array
457
+ ] }
458
+ },
459
+ emits: ["change"],
460
+ setup(e, { emit: t }) {
461
+ let n = e, r = t;
462
+ return (t, a) => (b(), i(D(Ae), {
463
+ as: "div",
464
+ "default-index": e.defaultIndex,
465
+ "selected-index": e.selectedIndex,
466
+ manual: e.manual,
467
+ class: h(D(F)("flex flex-col gap-4", n.class)),
468
+ onChange: a[0] ||= (e) => r("change", e)
469
+ }, {
470
+ default: A(() => [C(t.$slots, "default")]),
471
+ _: 3
472
+ }, 8, [
473
+ "default-index",
474
+ "selected-index",
475
+ "manual",
476
+ "class"
477
+ ]));
478
+ }
479
+ }), bt = j("flex w-fit items-center gap-1 rounded-full border border-border-default bg-bg-surface p-1"), xt = j([
480
+ "flex items-center gap-x-2 rounded-full px-4 py-1.5 text-sm font-medium transition-all",
481
+ "outline-none focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-border-strong focus-visible:ring-offset-1 focus-visible:ring-offset-bg-surface",
482
+ "disabled:cursor-not-allowed disabled:opacity-50"
483
+ ].join(" "), {
484
+ variants: { selected: {
485
+ true: "bg-bg-raised text-text-primary shadow-sm",
486
+ false: "text-text-secondary not-disabled:hover:text-text-primary"
487
+ } },
488
+ defaultVariants: { selected: !1 }
489
+ }), St = /* @__PURE__ */ u({
490
+ __name: "TabsList",
491
+ props: { class: { type: [
492
+ Boolean,
493
+ null,
494
+ String,
495
+ Object,
496
+ Array
497
+ ] } },
498
+ setup(e) {
499
+ let t = e;
500
+ return (e, n) => (b(), i(D(je), { class: h(D(F)(D(bt)(), t.class)) }, {
501
+ default: A(() => [C(e.$slots, "default")]),
502
+ _: 3
503
+ }, 8, ["class"]));
504
+ }
505
+ }), Ct = /* @__PURE__ */ u({
506
+ __name: "TabsTrigger",
507
+ props: {
508
+ disabled: { type: Boolean },
509
+ class: { type: [
510
+ Boolean,
511
+ null,
512
+ String,
513
+ Object,
514
+ Array
515
+ ] }
516
+ },
517
+ setup(e) {
518
+ let t = e;
519
+ return (n, r) => (b(), i(D(ke), {
520
+ as: "template",
521
+ disabled: e.disabled
522
+ }, {
523
+ default: A(({ selected: e }) => [s("button", {
524
+ type: "button",
525
+ class: h(D(F)(D(xt)({ selected: e }), t.class))
526
+ }, [C(n.$slots, "default", { selected: e })], 2)]),
527
+ _: 3
528
+ }, 8, ["disabled"]));
529
+ }
530
+ }), wt = /* @__PURE__ */ u({
531
+ __name: "TabsPanels",
532
+ props: { class: { type: [
533
+ Boolean,
534
+ null,
535
+ String,
536
+ Object,
537
+ Array
538
+ ] } },
539
+ setup(e) {
540
+ let t = e;
541
+ return (e, n) => (b(), i(D(Ne), { class: h(t.class) }, {
542
+ default: A(() => [C(e.$slots, "default")]),
543
+ _: 3
544
+ }, 8, ["class"]));
545
+ }
546
+ }), Tt = /* @__PURE__ */ u({
547
+ __name: "TabsContent",
548
+ props: { class: { type: [
549
+ Boolean,
550
+ null,
551
+ String,
552
+ Object,
553
+ Array
554
+ ] } },
555
+ setup(e) {
556
+ let t = e;
557
+ return (e, n) => (b(), i(D(Me), { class: h(D(F)("outline-none focus-visible:ring-2 focus-visible:ring-border-strong rounded-xl", t.class)) }, {
558
+ default: A(() => [C(e.$slots, "default")]),
559
+ _: 3
560
+ }, 8, ["class"]));
561
+ }
562
+ }), Et = /* @__PURE__ */ u({
563
+ __name: "Disclosure",
564
+ props: {
565
+ defaultOpen: {
566
+ type: Boolean,
567
+ default: !1
568
+ },
569
+ class: { type: [
570
+ Boolean,
571
+ null,
572
+ String,
573
+ Object,
574
+ Array
575
+ ] }
576
+ },
577
+ setup(e) {
578
+ let t = e;
579
+ return (n, r) => (b(), i(D(he), {
580
+ "default-open": e.defaultOpen,
581
+ as: "div",
582
+ class: h(D(F)("border-b border-border-subtle", t.class))
583
+ }, {
584
+ default: A(({ open: e }) => [C(n.$slots, "default", { open: e })]),
585
+ _: 3
586
+ }, 8, ["default-open", "class"]));
587
+ }
588
+ }), Dt = { class: "flex-1 outline-none" }, Ot = /* @__PURE__ */ u({
589
+ __name: "DisclosureTrigger",
590
+ props: { class: { type: [
591
+ Boolean,
592
+ null,
593
+ String,
594
+ Object,
595
+ Array
596
+ ] } },
597
+ setup(e) {
598
+ let t = e;
599
+ return (e, n) => (b(), i(D(ge), { class: h(D(F)("flex w-full items-center justify-between gap-2 py-4 text-left text-sm font-medium text-text-primary transition-colors", "focus-visible:outline-none hover:text-text-secondary focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:ring-border-strong focus-visible:ring-offset-bg-base rounded-lg", t.class)) }, {
600
+ default: A(({ open: t }) => [s("span", Dt, [C(e.$slots, "default", { open: t })]), l(D(Pe), {
601
+ class: h(["size-4 shrink-0 text-text-tertiary transition-transform duration-200", t && "rotate-180"]),
602
+ "aria-hidden": "true"
603
+ }, null, 8, ["class"])]),
604
+ _: 3
605
+ }, 8, ["class"]));
606
+ }
607
+ }), kt = /* @__PURE__ */ u({
608
+ __name: "DisclosureContent",
609
+ props: { class: { type: [
610
+ Boolean,
611
+ null,
612
+ String,
613
+ Object,
614
+ Array
615
+ ] } },
616
+ setup(e) {
617
+ let t = e;
618
+ return (e, n) => (b(), i(D(_e), { class: h(D(F)("pb-4 text-sm text-text-secondary", t.class)) }, {
619
+ default: A(() => [C(e.$slots, "default")]),
620
+ _: 3
621
+ }, 8, ["class"]));
622
+ }
623
+ }), At = j("relative flex w-full gap-3 rounded-xl border px-4 py-3 text-sm", {
624
+ variants: { variant: {
625
+ neutral: "bg-bg-surface border-border-default text-text-primary",
626
+ info: "bg-info-surface border-info-border text-info-text",
627
+ success: "bg-success-surface border-success-border text-success-text",
628
+ warning: "bg-warning-surface border-warning-border text-warning-text",
629
+ danger: "bg-danger-surface border-danger-border text-danger-text"
630
+ } },
631
+ defaultVariants: { variant: "neutral" }
632
+ }), jt = {
633
+ key: 0,
634
+ class: "mt-0.5 shrink-0 [&>svg]:size-5"
635
+ }, Mt = { class: "flex min-w-0 flex-1 flex-col gap-0.5" }, Nt = {
636
+ key: 1,
637
+ class: "shrink-0"
638
+ }, Pt = /* @__PURE__ */ u({
639
+ __name: "Alert",
640
+ props: {
641
+ variant: { default: "neutral" },
642
+ class: { type: [
643
+ Boolean,
644
+ null,
645
+ String,
646
+ Object,
647
+ Array
648
+ ] }
649
+ },
650
+ setup(e) {
651
+ let t = e;
652
+ return (n, r) => (b(), o("div", {
653
+ role: "alert",
654
+ class: h(D(F)(D(At)({ variant: e.variant }), t.class))
655
+ }, [
656
+ n.$slots.icon ? (b(), o("span", jt, [C(n.$slots, "icon")])) : a("", !0),
657
+ s("div", Mt, [C(n.$slots, "default")]),
658
+ n.$slots.action ? (b(), o("div", Nt, [C(n.$slots, "action")])) : a("", !0)
659
+ ], 2));
660
+ }
661
+ }), Ft = /* @__PURE__ */ u({
662
+ __name: "AlertTitle",
663
+ props: { class: { type: [
664
+ Boolean,
665
+ null,
666
+ String,
667
+ Object,
668
+ Array
669
+ ] } },
670
+ setup(e) {
671
+ let t = e;
672
+ return (e, n) => (b(), o("div", { class: h(D(F)("font-medium", t.class)) }, [C(e.$slots, "default")], 2));
673
+ }
674
+ }), It = /* @__PURE__ */ u({
675
+ __name: "AlertDescription",
676
+ props: { class: { type: [
677
+ Boolean,
678
+ null,
679
+ String,
680
+ Object,
681
+ Array
682
+ ] } },
683
+ setup(e) {
684
+ let t = e;
685
+ return (e, n) => (b(), o("div", { class: h(D(F)("text-sm opacity-90", t.class)) }, [C(e.$slots, "default")], 2));
686
+ }
687
+ }), Lt = /* @__PURE__ */ u({
688
+ __name: "Empty",
689
+ props: { class: { type: [
690
+ Boolean,
691
+ null,
692
+ String,
693
+ Object,
694
+ Array
695
+ ] } },
696
+ setup(e) {
697
+ let t = e;
698
+ return (e, n) => (b(), o("div", { class: h(D(F)("flex w-full min-w-0 flex-1 flex-col items-center justify-center gap-4 rounded-xl border border-dashed border-border-default p-8 text-center text-balance", t.class)) }, [C(e.$slots, "default")], 2));
699
+ }
700
+ }), Rt = /* @__PURE__ */ u({
701
+ __name: "EmptyHeader",
702
+ props: { class: { type: [
703
+ Boolean,
704
+ null,
705
+ String,
706
+ Object,
707
+ Array
708
+ ] } },
709
+ setup(e) {
710
+ let t = e;
711
+ return (e, n) => (b(), o("div", { class: h(D(F)("flex max-w-sm flex-col items-center gap-2", t.class)) }, [C(e.$slots, "default")], 2));
712
+ }
713
+ }), zt = j("mb-2 flex shrink-0 items-center justify-center [&_svg]:pointer-events-none [&_svg]:shrink-0", {
714
+ variants: { variant: {
715
+ default: "bg-transparent",
716
+ icon: "flex size-10 items-center justify-center rounded-xl bg-bg-elevated text-text-primary [&_svg:not([class*='size-'])]:size-5"
717
+ } },
718
+ defaultVariants: { variant: "default" }
719
+ }), Bt = /* @__PURE__ */ u({
720
+ __name: "EmptyMedia",
721
+ props: {
722
+ variant: { default: "default" },
723
+ class: { type: [
724
+ Boolean,
725
+ null,
726
+ String,
727
+ Object,
728
+ Array
729
+ ] }
730
+ },
731
+ setup(e) {
732
+ let t = e;
733
+ return (e, n) => (b(), o("div", { class: h(D(F)(D(zt)({ variant: t.variant }), t.class)) }, [C(e.$slots, "default")], 2));
734
+ }
735
+ }), Vt = /* @__PURE__ */ u({
736
+ __name: "EmptyTitle",
737
+ props: { class: { type: [
738
+ Boolean,
739
+ null,
740
+ String,
741
+ Object,
742
+ Array
743
+ ] } },
744
+ setup(e) {
745
+ let t = e;
746
+ return (e, n) => (b(), o("p", { class: h(D(F)("text-base font-medium tracking-tight text-text-primary", t.class)) }, [C(e.$slots, "default")], 2));
747
+ }
748
+ }), Ht = /* @__PURE__ */ u({
749
+ __name: "EmptyDescription",
750
+ props: { class: { type: [
751
+ Boolean,
752
+ null,
753
+ String,
754
+ Object,
755
+ Array
756
+ ] } },
757
+ setup(e) {
758
+ let t = e;
759
+ return (e, n) => (b(), o("p", { class: h(D(F)("text-sm leading-relaxed text-text-secondary [&>a]:underline [&>a]:underline-offset-4 hover:[&>a]:text-brand-200", t.class)) }, [C(e.$slots, "default")], 2));
760
+ }
761
+ }), Ut = /* @__PURE__ */ u({
762
+ __name: "EmptyContent",
763
+ props: { class: { type: [
764
+ Boolean,
765
+ null,
766
+ String,
767
+ Object,
768
+ Array
769
+ ] } },
770
+ setup(e) {
771
+ let t = e;
772
+ return (e, n) => (b(), o("div", { class: h(D(F)("flex w-full max-w-sm min-w-0 flex-col items-center gap-3 text-sm text-balance", t.class)) }, [C(e.$slots, "default")], 2));
773
+ }
774
+ }), Wt = Symbol("SidebarContext"), Gt = (e) => {
775
+ x(Wt, e);
776
+ }, I = () => {
777
+ let e = d(Wt);
778
+ if (!e) throw Error("Sidebar components must be used within a <SidebarProvider>.");
779
+ return e;
780
+ }, Kt = /* @__PURE__ */ u({
781
+ __name: "SidebarProvider",
782
+ setup(e) {
783
+ let t = We("(max-width: 767px)"), n = S(!1), r = S(!1);
784
+ return k(t, (e) => {
785
+ e || (n.value = !1);
786
+ }), Gt({
787
+ isMobile: t,
788
+ mobileOpen: n,
789
+ collapsed: r,
790
+ open: () => {
791
+ t.value ? n.value = !0 : r.value = !1;
792
+ },
793
+ close: () => {
794
+ t.value ? n.value = !1 : r.value = !0;
795
+ },
796
+ toggle: () => {
797
+ t.value ? n.value = !n.value : r.value = !r.value;
798
+ }
799
+ }), (e, t) => C(e.$slots, "default");
800
+ }
801
+ }), qt = /* @__PURE__ */ u({
802
+ __name: "Sidebar",
803
+ props: { class: { type: [
804
+ Boolean,
805
+ null,
806
+ String,
807
+ Object,
808
+ Array
809
+ ] } },
810
+ setup(t) {
811
+ let r = t, { isMobile: i, mobileOpen: s, collapsed: c, close: u } = I(), d = Ge(typeof document < "u" ? document.body : null);
812
+ k(s, (e) => {
813
+ d.value = e && i.value;
814
+ });
815
+ let f = (e) => {
816
+ e.key === "Escape" && u();
817
+ };
818
+ return (t, d) => D(i) ? (b(), o(e, { key: 1 }, [l(n, {
819
+ "enter-active-class": "transition-opacity duration-200",
820
+ "enter-from-class": "opacity-0",
821
+ "leave-active-class": "transition-opacity duration-200",
822
+ "leave-to-class": "opacity-0"
823
+ }, {
824
+ default: A(() => [D(s) ? (b(), o("div", {
825
+ key: 0,
826
+ class: "fixed inset-0 z-40 bg-black/40",
827
+ onClick: d[0] ||= (...e) => D(u) && D(u)(...e)
828
+ })) : a("", !0)]),
829
+ _: 1
830
+ }), l(n, {
831
+ "enter-active-class": "transition-transform duration-200 ease-out",
832
+ "enter-from-class": "-translate-x-full",
833
+ "leave-active-class": "transition-transform duration-200 ease-in",
834
+ "leave-to-class": "-translate-x-full"
835
+ }, {
836
+ default: A(() => [D(s) ? (b(), o("aside", {
837
+ key: 0,
838
+ class: h(D(F)("fixed inset-y-0 left-0 z-50 flex h-full w-64 flex-col border-r border-border-subtle bg-bg-surface", r.class)),
839
+ tabindex: "-1",
840
+ onKeydown: f
841
+ }, [C(t.$slots, "default")], 34)) : a("", !0)]),
842
+ _: 3
843
+ })], 64)) : (b(), o(e, { key: 0 }, [D(c) ? a("", !0) : (b(), o("aside", {
844
+ key: 0,
845
+ class: h(D(F)("flex h-full w-64 flex-col border-r border-border-subtle bg-bg-surface", r.class))
846
+ }, [C(t.$slots, "default")], 2))], 64));
847
+ }
848
+ }), Jt = /* @__PURE__ */ u({
849
+ __name: "SidebarTrigger",
850
+ props: { class: { type: [
851
+ Boolean,
852
+ null,
853
+ String,
854
+ Object,
855
+ Array
856
+ ] } },
857
+ setup(e) {
858
+ let t = e, { toggle: n } = I();
859
+ return (e, r) => (b(), o("button", {
860
+ type: "button",
861
+ class: h(D(F)("inline-flex size-9 items-center justify-center rounded-lg text-text-secondary transition-colors hover:bg-bg-subtle hover:text-text-primary", "outline-none focus-visible:ring-2 focus-visible:ring-border-strong", t.class)),
862
+ "aria-label": "Toggle navigation",
863
+ onClick: r[0] ||= (...e) => D(n) && D(n)(...e)
864
+ }, [l(D(Le), { class: "size-5" })], 2));
865
+ }
866
+ }), Yt = /* @__PURE__ */ u({
867
+ __name: "SidebarHeader",
868
+ props: { class: { type: [
869
+ Boolean,
870
+ null,
871
+ String,
872
+ Object,
873
+ Array
874
+ ] } },
875
+ setup(e) {
876
+ let t = e;
877
+ return (e, n) => (b(), o("div", { class: h(D(F)("flex items-center gap-2 px-4 py-4", t.class)) }, [C(e.$slots, "default")], 2));
878
+ }
879
+ }), Xt = /* @__PURE__ */ u({
880
+ __name: "SidebarContent",
881
+ props: { class: { type: [
882
+ Boolean,
883
+ null,
884
+ String,
885
+ Object,
886
+ Array
887
+ ] } },
888
+ setup(e) {
889
+ let t = e;
890
+ return (e, n) => (b(), o("div", { class: h(D(F)("flex-1 overflow-y-auto scrollbar-thin px-2 py-2", t.class)) }, [C(e.$slots, "default")], 2));
891
+ }
892
+ }), Zt = /* @__PURE__ */ u({
893
+ __name: "SidebarFooter",
894
+ props: { class: { type: [
895
+ Boolean,
896
+ null,
897
+ String,
898
+ Object,
899
+ Array
900
+ ] } },
901
+ setup(e) {
902
+ let t = e;
903
+ return (e, n) => (b(), o("div", { class: h(D(F)("mt-auto px-4 py-4", t.class)) }, [C(e.$slots, "default")], 2));
904
+ }
905
+ }), Qt = {
906
+ key: 0,
907
+ class: "px-3 pb-1 text-xs font-medium uppercase tracking-wider text-text-tertiary"
908
+ }, $t = /* @__PURE__ */ u({
909
+ __name: "SidebarGroup",
910
+ props: {
911
+ label: {},
912
+ class: { type: [
913
+ Boolean,
914
+ null,
915
+ String,
916
+ Object,
917
+ Array
918
+ ] }
919
+ },
920
+ setup(e) {
921
+ let t = e;
922
+ return (n, r) => (b(), o("div", { class: h(D(F)("flex flex-col gap-0.5 py-2", t.class)) }, [e.label ? (b(), o("p", Qt, E(e.label), 1)) : a("", !0), C(n.$slots, "default")], 2));
923
+ }
924
+ }), en = j([
925
+ "flex w-full items-center gap-2 rounded-lg px-3 py-2 text-sm font-medium transition-colors",
926
+ "outline-none focus-visible:ring-2 focus-visible:ring-border-strong",
927
+ "[&_svg]:size-4 [&_svg]:shrink-0"
928
+ ].join(" "), {
929
+ variants: { active: {
930
+ true: "bg-bg-subtle text-text-primary",
931
+ false: "text-text-secondary hover:bg-bg-subtle hover:text-text-primary"
932
+ } },
933
+ defaultVariants: { active: !1 }
934
+ }), tn = /* @__PURE__ */ u({
935
+ __name: "SidebarItem",
936
+ props: {
937
+ as: { default: "a" },
938
+ active: {
939
+ type: Boolean,
940
+ default: !1
941
+ },
942
+ disabled: {
943
+ type: Boolean,
944
+ default: !1
945
+ },
946
+ class: { type: [
947
+ Boolean,
948
+ null,
949
+ String,
950
+ Object,
951
+ Array
952
+ ] }
953
+ },
954
+ setup(e) {
955
+ let t = e, n = I(), r = (e) => {
956
+ if (t.disabled) {
957
+ e.preventDefault(), e.stopPropagation();
958
+ return;
959
+ }
960
+ n.isMobile.value && n.close();
961
+ };
962
+ return (n, a) => (b(), i(w(e.disabled ? "span" : e.as), {
963
+ class: h(D(F)(D(en)({ active: e.active }), e.disabled && "pointer-events-none opacity-50", t.class)),
964
+ "aria-disabled": e.disabled || void 0,
965
+ tabindex: e.disabled ? -1 : void 0,
966
+ onClick: r
967
+ }, {
968
+ default: A(() => [C(n.$slots, "default")]),
969
+ _: 3
970
+ }, 8, [
971
+ "class",
972
+ "aria-disabled",
973
+ "tabindex"
974
+ ]));
975
+ }
976
+ }), L = Symbol("Field"), nn = ["data-invalid", "data-disabled"], rn = /* @__PURE__ */ u({
977
+ __name: "Field",
978
+ props: {
979
+ id: {},
980
+ orientation: { default: "vertical" },
981
+ invalid: {
982
+ type: Boolean,
983
+ default: !1
984
+ },
985
+ disabled: {
986
+ type: Boolean,
987
+ default: !1
988
+ },
989
+ required: {
990
+ type: Boolean,
991
+ default: !1
992
+ },
993
+ class: { type: [
994
+ Boolean,
995
+ null,
996
+ String,
997
+ Object,
998
+ Array
999
+ ] }
1000
+ },
1001
+ setup(e) {
1002
+ let t = e, n = O(), i = r(() => t.id ?? n), a = r(() => `${i.value}-description`), s = r(() => `${i.value}-error`);
1003
+ x(L, {
1004
+ id: i,
1005
+ descriptionId: a,
1006
+ errorId: s,
1007
+ describedById: r(() => t.invalid ? `${a.value} ${s.value}` : a.value),
1008
+ invalid: r(() => t.invalid),
1009
+ disabled: r(() => t.disabled),
1010
+ required: r(() => t.required)
1011
+ });
1012
+ let c = r(() => t.orientation === "horizontal" ? "flex items-center gap-x-2" : "flex flex-col gap-y-1.5");
1013
+ return (n, r) => (b(), o("div", {
1014
+ role: "group",
1015
+ "data-invalid": e.invalid || void 0,
1016
+ "data-disabled": e.disabled || void 0,
1017
+ class: h(D(F)(c.value, t.class))
1018
+ }, [C(n.$slots, "default")], 10, nn));
1019
+ }
1020
+ }), an = ["for"], on = /* @__PURE__ */ u({
1021
+ __name: "FieldLabel",
1022
+ props: {
1023
+ for: {},
1024
+ class: { type: [
1025
+ Boolean,
1026
+ null,
1027
+ String,
1028
+ Object,
1029
+ Array
1030
+ ] }
1031
+ },
1032
+ setup(e) {
1033
+ let t = e, n = d(L, null), i = r(() => t.for ?? n?.id.value), a = r(() => n?.required.value ?? !1);
1034
+ return (e, n) => (b(), o("label", {
1035
+ for: i.value,
1036
+ class: h(D(F)("w-fit select-none text-sm font-medium text-text-secondary", a.value && "after:ml-0.5 after:text-danger-text after:content-['*']", t.class))
1037
+ }, [C(e.$slots, "default")], 10, an));
1038
+ }
1039
+ }), sn = ["id"], cn = /* @__PURE__ */ u({
1040
+ __name: "FieldDescription",
1041
+ props: { class: { type: [
1042
+ Boolean,
1043
+ null,
1044
+ String,
1045
+ Object,
1046
+ Array
1047
+ ] } },
1048
+ setup(e) {
1049
+ let t = e, n = d(L, null);
1050
+ return (e, r) => (b(), o("p", {
1051
+ id: D(n)?.descriptionId.value,
1052
+ class: h(D(F)("text-xs text-text-secondary", t.class))
1053
+ }, [C(e.$slots, "default")], 10, sn));
1054
+ }
1055
+ }), ln = ["id"], un = /* @__PURE__ */ u({
1056
+ __name: "FieldError",
1057
+ props: { class: { type: [
1058
+ Boolean,
1059
+ null,
1060
+ String,
1061
+ Object,
1062
+ Array
1063
+ ] } },
1064
+ setup(e) {
1065
+ let t = e, n = d(L, null);
1066
+ return (e, r) => (b(), o("p", {
1067
+ id: D(n)?.errorId.value,
1068
+ role: "alert",
1069
+ class: h(D(F)("text-sm text-danger-text", t.class))
1070
+ }, [C(e.$slots, "default")], 10, ln));
1071
+ }
1072
+ }), dn = /* @__PURE__ */ u({
1073
+ __name: "FieldContent",
1074
+ props: { class: { type: [
1075
+ Boolean,
1076
+ null,
1077
+ String,
1078
+ Object,
1079
+ Array
1080
+ ] } },
1081
+ setup(e) {
1082
+ let t = e;
1083
+ return (e, n) => (b(), o("div", { class: h(D(F)("flex flex-col gap-y-0.5", t.class)) }, [C(e.$slots, "default")], 2));
1084
+ }
1085
+ }), R = Symbol("Select"), z = j("flex w-full items-center rounded-lg cursor-pointer select-none text-base outline-none transition-colors data-active:bg-bg-surface disabled:pointer-events-none disabled:opacity-50", {
1086
+ variants: { indicator: {
1087
+ none: "gap-x-2 px-2 py-1.5",
1088
+ "trailing-check": "relative gap-x-2 py-2 pl-3 pr-9",
1089
+ "leading-control": "gap-x-2 px-3 py-2"
1090
+ } },
1091
+ defaultVariants: { indicator: "none" }
1092
+ }), fn = ["data-active"], pn = {
1093
+ key: 0,
1094
+ class: "absolute inset-y-0 right-0 flex items-center pr-3 text-accent-pro-200"
1095
+ }, mn = /* @__PURE__ */ u({
1096
+ __name: "SelectItem",
1097
+ props: {
1098
+ value: {},
1099
+ label: {},
1100
+ disabled: { type: Boolean }
1101
+ },
1102
+ setup(e) {
1103
+ let t = e, n = d(R);
1104
+ if (!n) throw Error("SelectItem must be used inside Select");
1105
+ let u = S(), f = () => t.label ?? u.value?.textContent?.trim() ?? "";
1106
+ t.label && n.registerLabel(t.value, t.label), v(() => {
1107
+ t.label || n.registerLabel(t.value, f());
1108
+ }), k(() => t.label, (e) => {
1109
+ e && n.registerLabel(t.value, e);
1110
+ });
1111
+ let p = r(() => {
1112
+ if (!n.searchable.value) return !0;
1113
+ let e = n.query.value.trim().toLowerCase();
1114
+ return !e || f().toLowerCase().includes(e);
1115
+ }), m = () => {
1116
+ t.disabled || n.select(t.value, f());
1117
+ };
1118
+ return (t, n) => ae((b(), i(D(be), {
1119
+ value: e.value,
1120
+ disabled: e.disabled,
1121
+ as: "template"
1122
+ }, {
1123
+ default: A(({ active: n, selected: r }) => [s("div", {
1124
+ role: "option",
1125
+ "data-active": n || void 0,
1126
+ class: h(D(F)(D(z)({ indicator: "trailing-check" }), e.disabled && "pointer-events-none opacity-50")),
1127
+ onClick: m
1128
+ }, [s("span", {
1129
+ ref_key: "labelEl",
1130
+ ref: u,
1131
+ class: h(["block truncate", r && "font-semibold"])
1132
+ }, [C(t.$slots, "default", {
1133
+ active: n,
1134
+ selected: r
1135
+ }, () => [c(E(e.label), 1)])], 2), r ? (b(), o("span", pn, [l(D(Ie), {
1136
+ class: "size-5",
1137
+ "aria-hidden": "true"
1138
+ })])) : a("", !0)], 10, fn)]),
1139
+ _: 3
1140
+ }, 8, ["value", "disabled"])), [[re, p.value]]);
1141
+ }
1142
+ }), hn = /* @__PURE__ */ u({
1143
+ __name: "Select",
1144
+ props: {
1145
+ modelValue: {},
1146
+ searchable: {
1147
+ type: Boolean,
1148
+ default: !1
1149
+ },
1150
+ placement: { default: "bottom-start" },
1151
+ offset: { default: 4 },
1152
+ class: {}
1153
+ },
1154
+ emits: ["update:modelValue"],
1155
+ setup(e, { emit: t }) {
1156
+ let n = e, a = t, o = S(""), s = ne(), c = r(() => {
1157
+ let e = {}, t = (n) => {
1158
+ if (n == null) return;
1159
+ if (Array.isArray(n)) {
1160
+ n.forEach(t);
1161
+ return;
1162
+ }
1163
+ if (typeof n != "object") return;
1164
+ let r = n;
1165
+ r.type === mn && r.props?.value && r.props?.label && (e[r.props.value] = r.props.label), Array.isArray(r.children) && t(r.children);
1166
+ let i = r.children;
1167
+ if (i && typeof i == "object" && !Array.isArray(i)) {
1168
+ let e = i.default;
1169
+ if (typeof e == "function") try {
1170
+ t(e());
1171
+ } catch {}
1172
+ }
1173
+ };
1174
+ return t(s.default?.({})), e;
1175
+ }), u = S(""), d = S(""), f = r(() => d.value === n.modelValue && u.value ? u.value : c.value[n.modelValue] || n.modelValue), p = r({
1176
+ get: () => n.modelValue,
1177
+ set: (e) => a("update:modelValue", e)
1178
+ });
1179
+ return x(R, {
1180
+ selected: r(() => n.modelValue),
1181
+ selectedLabel: f,
1182
+ select: (e, t) => {
1183
+ d.value = e, u.value = t, p.value = e, o.value = "";
1184
+ },
1185
+ isSelected: (e) => n.modelValue === e,
1186
+ registerLabel: () => {},
1187
+ query: o,
1188
+ searchable: r(() => n.searchable),
1189
+ id: O()
1190
+ }), (t, r) => (b(), i(D(ve), {
1191
+ modelValue: p.value,
1192
+ "onUpdate:modelValue": r[0] ||= (e) => p.value = e,
1193
+ as: "div",
1194
+ class: "w-full"
1195
+ }, {
1196
+ default: A(() => [l(D(M), {
1197
+ as: "div",
1198
+ class: h(D(F)("relative", n.class)),
1199
+ composable: "",
1200
+ "floating-as": "template",
1201
+ placement: e.placement,
1202
+ offset: e.offset,
1203
+ flip: "",
1204
+ "z-index": 50
1205
+ }, {
1206
+ default: A(() => [C(t.$slots, "default")]),
1207
+ _: 3
1208
+ }, 8, [
1209
+ "class",
1210
+ "placement",
1211
+ "offset"
1212
+ ])]),
1213
+ _: 3
1214
+ }, 8, ["modelValue"]));
1215
+ }
1216
+ }), B = j([
1217
+ "group",
1218
+ "flex",
1219
+ "items-center",
1220
+ "gap-x-2",
1221
+ "w-full",
1222
+ "min-w-0",
1223
+ "border",
1224
+ "transition-[color,box-shadow]",
1225
+ "outline-none",
1226
+ "focus-visible:outline-none",
1227
+ "focus-within:border-border-dark",
1228
+ "focus-within:ring-1",
1229
+ "focus-within:ring-border-dark",
1230
+ "disabled:pointer-events-none",
1231
+ "disabled:opacity-50"
1232
+ ].join(" "), {
1233
+ variants: {
1234
+ variant: {
1235
+ primary: "bg-bg-surface border-border-default text-text-primary font-medium",
1236
+ contrast: "bg-bg-raised border-border-default text-text-primary font-medium"
1237
+ },
1238
+ size: {
1239
+ base: "h-12 rounded-xl px-3.5",
1240
+ sm: "h-9 rounded-lg px-1 text-sm"
1241
+ },
1242
+ invalid: {
1243
+ true: "border-danger-border ring-1 ring-danger-border focus-within:border-danger-border focus-within:ring-danger-border",
1244
+ false: ""
1245
+ }
1246
+ },
1247
+ defaultVariants: {
1248
+ variant: "primary",
1249
+ size: "base",
1250
+ invalid: !1
1251
+ }
1252
+ }), gn = { class: "pointer-events-none absolute inset-y-0 right-0 flex items-center pr-2" }, _n = /* @__PURE__ */ u({
1253
+ __name: "SelectTrigger",
1254
+ props: {
1255
+ placeholder: { default: "Select an option" },
1256
+ variant: { default: "primary" },
1257
+ size: { default: "base" },
1258
+ class: {}
1259
+ },
1260
+ setup(e) {
1261
+ let t = e, n = d(R);
1262
+ if (!n) throw Error("SelectTrigger must be used inside Select");
1263
+ let r = d(L, null);
1264
+ return (a, o) => (b(), i(D(P), null, {
1265
+ default: A(() => [l(D(ye), {
1266
+ as: "button",
1267
+ type: "button",
1268
+ id: D(r)?.id.value,
1269
+ "aria-describedby": D(r)?.describedById.value,
1270
+ "aria-invalid": D(r)?.invalid.value || void 0,
1271
+ "data-invalid": D(r)?.invalid.value || void 0,
1272
+ class: h(D(F)(D(B)({
1273
+ variant: e.variant,
1274
+ size: e.size
1275
+ }), "relative cursor-pointer", t.class))
1276
+ }, {
1277
+ default: A(() => [s("span", { class: h(["block truncate", !D(n).selected.value && "text-text-tertiary"]) }, [C(a.$slots, "default", {
1278
+ selected: D(n).selected.value,
1279
+ label: D(n).selectedLabel.value
1280
+ }, () => [c(E(D(n).selected.value ? D(n).selectedLabel.value : e.placeholder), 1)])], 2), s("span", gn, [l(D(Fe), {
1281
+ class: "size-5 text-text-tertiary",
1282
+ "aria-hidden": "true"
1283
+ })])]),
1284
+ _: 3
1285
+ }, 8, [
1286
+ "id",
1287
+ "aria-describedby",
1288
+ "aria-invalid",
1289
+ "data-invalid",
1290
+ "class"
1291
+ ])]),
1292
+ _: 3
1293
+ }));
1294
+ }
1295
+ }), V = j("max-h-80 overflow-y-auto rounded-2xl bg-bg-raised p-2 shadow-lg ring-1 ring-border-default focus-visible:outline-none", {
1296
+ variants: { size: {
1297
+ fit: "w-fit",
1298
+ full: "w-full",
1299
+ "3xs": "w-3xs",
1300
+ "2xs": "w-2xs",
1301
+ xs: "w-xs",
1302
+ sm: "w-sm",
1303
+ md: "w-md",
1304
+ lg: "w-lg"
1305
+ } },
1306
+ defaultVariants: { size: "fit" }
1307
+ }), H = {
1308
+ enter: "transition ease-out duration-150 motion-reduce:transition-none",
1309
+ enterFrom: "opacity-0 scale-95 motion-reduce:scale-100",
1310
+ enterTo: "opacity-100 scale-100",
1311
+ leave: "transition-none",
1312
+ leaveFrom: "opacity-100",
1313
+ leaveTo: "opacity-0"
1314
+ }, vn = /* @__PURE__ */ u({
1315
+ __name: "SelectContent",
1316
+ props: {
1317
+ width: { default: "full" },
1318
+ class: {}
1319
+ },
1320
+ setup(e) {
1321
+ let t = e, n = r(() => F(V({ size: t.width }), "max-h-80 overflow-y-auto", t.class));
1322
+ return (e, t) => (b(), i(D(N), {
1323
+ as: "template",
1324
+ enter: D(H).enter,
1325
+ "enter-from": D(H).enterFrom,
1326
+ "enter-to": D(H).enterTo,
1327
+ leave: D(H).leave,
1328
+ "leave-from": D(H).leaveFrom,
1329
+ "leave-to": D(H).leaveTo
1330
+ }, {
1331
+ default: A(() => [l(D(xe), {
1332
+ as: "div",
1333
+ class: h(n.value)
1334
+ }, {
1335
+ default: A(() => [C(e.$slots, "default")]),
1336
+ _: 3
1337
+ }, 8, ["class"])]),
1338
+ _: 3
1339
+ }, 8, [
1340
+ "enter",
1341
+ "enter-from",
1342
+ "enter-to",
1343
+ "leave",
1344
+ "leave-from",
1345
+ "leave-to"
1346
+ ]));
1347
+ }
1348
+ }), yn = [
1349
+ "id",
1350
+ "value",
1351
+ "placeholder",
1352
+ "aria-label"
1353
+ ], bn = /* @__PURE__ */ u({
1354
+ __name: "SearchInput",
1355
+ props: {
1356
+ modelValue: {},
1357
+ placeholder: { default: "Search..." },
1358
+ class: {}
1359
+ },
1360
+ emits: ["update:modelValue"],
1361
+ setup(e, { emit: t }) {
1362
+ let n = t, r = O(), i = (e) => {
1363
+ n("update:modelValue", e.target.value);
1364
+ };
1365
+ return (t, n) => (b(), o("div", { class: h(["sticky top-0 z-10 flex items-center gap-x-2 border border-border-subtle px-2 py-2 rounded-xl bg-bg-base", t.$props.class]) }, [l(D(Re), {
1366
+ class: "size-4 shrink-0 text-text-tertiary",
1367
+ "aria-hidden": "true"
1368
+ }), s("input", {
1369
+ id: D(r),
1370
+ value: e.modelValue,
1371
+ type: "text",
1372
+ role: "searchbox",
1373
+ placeholder: e.placeholder,
1374
+ "aria-label": e.placeholder,
1375
+ autocomplete: "off",
1376
+ autocorrect: "off",
1377
+ autocapitalize: "off",
1378
+ spellcheck: "false",
1379
+ class: "w-full bg-transparent text-sm font-medium text-text-primary outline-none placeholder:text-text-tertiary",
1380
+ onInput: i,
1381
+ onClick: n[0] ||= oe(() => {}, ["stop"]),
1382
+ onKeydown: n[1] ||= oe(() => {}, ["stop"])
1383
+ }, null, 40, yn)], 2));
1384
+ }
1385
+ }), xn = /* @__PURE__ */ u({
1386
+ __name: "SelectSearch",
1387
+ props: { placeholder: { default: "Search..." } },
1388
+ setup(e) {
1389
+ let t = d(R);
1390
+ if (!t) throw Error("SelectSearch must be used inside Select");
1391
+ return (n, r) => (b(), i(bn, {
1392
+ modelValue: D(t).query.value,
1393
+ "onUpdate:modelValue": r[0] ||= (e) => D(t).query.value = e,
1394
+ placeholder: e.placeholder
1395
+ }, null, 8, ["modelValue", "placeholder"]));
1396
+ }
1397
+ }), Sn = Symbol("MultiSelect"), Cn = /* @__PURE__ */ u({
1398
+ __name: "MultiSelect",
1399
+ props: /*@__PURE__*/ f({
1400
+ options: {},
1401
+ placeholder: { default: "Select options" },
1402
+ searchable: {
1403
+ type: Boolean,
1404
+ default: !1
1405
+ },
1406
+ placement: { default: "bottom-start" },
1407
+ offset: { default: 4 },
1408
+ summarize: {
1409
+ type: Function,
1410
+ default: (e) => `${e} selected`
1411
+ },
1412
+ class: { type: [
1413
+ Boolean,
1414
+ null,
1415
+ String,
1416
+ Object,
1417
+ Array
1418
+ ] }
1419
+ }, {
1420
+ modelValue: { default: () => [] },
1421
+ modelModifiers: {}
1422
+ }),
1423
+ emits: ["update:modelValue"],
1424
+ setup(e) {
1425
+ let t = e, n = te(e, "modelValue"), a = S(""), o = r(() => new Set(n.value)), s = r(() => {
1426
+ if (!t.searchable || !a.value.trim()) return t.options;
1427
+ let e = a.value.toLowerCase();
1428
+ return t.options.filter((t) => t.label.toLowerCase().includes(e));
1429
+ }), c = r(() => s.value.length > 0 && s.value.every((e) => o.value.has(e.value))), u = r(() => n.value.length === 0 ? t.placeholder : n.value.length === 1 ? t.options.find((e) => e.value === n.value[0])?.label ?? t.placeholder : t.summarize(n.value.length, t.options.length)), d = (e) => {
1430
+ let t = new Set(n.value);
1431
+ t.has(e) ? t.delete(e) : t.add(e), n.value = Array.from(t);
1432
+ }, f = () => {
1433
+ let e = new Set(n.value);
1434
+ c.value ? s.value.forEach((t) => e.delete(t.value)) : s.value.forEach((t) => e.add(t.value)), n.value = Array.from(e);
1435
+ }, p = () => {
1436
+ n.value = [];
1437
+ };
1438
+ return x(Sn, {
1439
+ isSelected: (e) => o.value.has(e),
1440
+ toggle: d,
1441
+ query: a,
1442
+ searchable: r(() => t.searchable),
1443
+ matchesQuery: (e) => {
1444
+ if (!t.searchable) return !0;
1445
+ let n = a.value.trim().toLowerCase();
1446
+ return !n || e.toLowerCase().includes(n);
1447
+ }
1448
+ }), (r, a) => (b(), i(D(Ee), {
1449
+ as: "div",
1450
+ class: h(D(F)("relative w-full", t.class))
1451
+ }, {
1452
+ default: A(() => [l(D(M), {
1453
+ composable: "",
1454
+ placement: e.placement,
1455
+ offset: e.offset,
1456
+ flip: "",
1457
+ "z-index": 50,
1458
+ "adaptive-width": ""
1459
+ }, {
1460
+ default: A(() => [C(r.$slots, "default", {
1461
+ label: u.value,
1462
+ count: n.value.length,
1463
+ empty: n.value.length === 0,
1464
+ allSelected: c.value,
1465
+ visibleCount: s.value.length,
1466
+ toggleAll: f,
1467
+ clear: p
1468
+ })]),
1469
+ _: 3
1470
+ }, 8, ["placement", "offset"])]),
1471
+ _: 3
1472
+ }, 8, ["class"]));
1473
+ }
1474
+ }), wn = { class: "pointer-events-none absolute inset-y-0 right-0 flex items-center pr-2" }, Tn = /* @__PURE__ */ u({
1475
+ __name: "MultiSelectTrigger",
1476
+ props: {
1477
+ label: {},
1478
+ empty: { type: Boolean },
1479
+ variant: { default: "primary" },
1480
+ size: { default: "base" },
1481
+ class: { type: [
1482
+ Boolean,
1483
+ null,
1484
+ String,
1485
+ Object,
1486
+ Array
1487
+ ] }
1488
+ },
1489
+ setup(e) {
1490
+ let t = e, n = d(L, null);
1491
+ return (r, a) => (b(), i(D(P), null, {
1492
+ default: A(() => [l(D(De), {
1493
+ as: "button",
1494
+ id: D(n)?.id.value,
1495
+ "aria-describedby": D(n)?.describedById.value,
1496
+ "aria-invalid": D(n)?.invalid.value || void 0,
1497
+ "data-invalid": D(n)?.invalid.value || void 0,
1498
+ class: h(D(F)(D(B)({
1499
+ variant: e.variant,
1500
+ size: e.size
1501
+ }), "relative cursor-pointer", t.class))
1502
+ }, {
1503
+ default: A(() => [s("span", { class: h(["block truncate", e.empty && "text-text-tertiary"]) }, [C(r.$slots, "default", {}, () => [c(E(e.label), 1)])], 2), s("span", wn, [l(D(Fe), {
1504
+ class: "size-4 text-text-tertiary",
1505
+ "aria-hidden": "true"
1506
+ })])]),
1507
+ _: 3
1508
+ }, 8, [
1509
+ "id",
1510
+ "aria-describedby",
1511
+ "aria-invalid",
1512
+ "data-invalid",
1513
+ "class"
1514
+ ])]),
1515
+ _: 3
1516
+ }));
1517
+ }
1518
+ }), En = /* @__PURE__ */ u({
1519
+ __name: "MultiSelectContent",
1520
+ props: {
1521
+ size: { default: "xs" },
1522
+ class: { type: [
1523
+ Boolean,
1524
+ null,
1525
+ String,
1526
+ Object,
1527
+ Array
1528
+ ] }
1529
+ },
1530
+ setup(e) {
1531
+ let t = e;
1532
+ return (e, n) => (b(), i(D(N), {
1533
+ as: "template",
1534
+ enter: D(H).enter,
1535
+ "enter-from": D(H).enterFrom,
1536
+ "enter-to": D(H).enterTo,
1537
+ leave: D(H).leave,
1538
+ "leave-from": D(H).leaveFrom,
1539
+ "leave-to": D(H).leaveTo
1540
+ }, {
1541
+ default: A(() => [l(D(Oe), {
1542
+ static: "",
1543
+ class: h(D(F)(D(V)({ size: t.size }), "p-1", t.class))
1544
+ }, {
1545
+ default: A(() => [C(e.$slots, "default")]),
1546
+ _: 3
1547
+ }, 8, ["class"])]),
1548
+ _: 3
1549
+ }, 8, [
1550
+ "enter",
1551
+ "enter-from",
1552
+ "enter-to",
1553
+ "leave",
1554
+ "leave-from",
1555
+ "leave-to"
1556
+ ]));
1557
+ }
1558
+ }), Dn = (e) => {
1559
+ let t = d(Sn, null);
1560
+ if (!t) throw Error(`${e} must be used inside <MultiSelect>.`);
1561
+ return t;
1562
+ }, On = /* @__PURE__ */ u({
1563
+ __name: "MultiSelectSearch",
1564
+ props: { placeholder: { default: "Search..." } },
1565
+ setup(e) {
1566
+ let t = Dn("MultiSelectSearch");
1567
+ return (n, r) => (b(), i(bn, {
1568
+ modelValue: D(t).query.value,
1569
+ "onUpdate:modelValue": r[0] ||= (e) => D(t).query.value = e,
1570
+ placeholder: e.placeholder
1571
+ }, null, 8, ["modelValue", "placeholder"]));
1572
+ }
1573
+ }), kn = {
1574
+ key: 0,
1575
+ xmlns: "http://www.w3.org/2000/svg",
1576
+ viewBox: "0 0 24 24",
1577
+ fill: "none",
1578
+ stroke: "currentColor",
1579
+ "stroke-width": "3",
1580
+ "stroke-linecap": "round",
1581
+ "stroke-linejoin": "round",
1582
+ class: "pointer-events-none size-3 text-text-inverse"
1583
+ }, An = [
1584
+ "id",
1585
+ "checked",
1586
+ "required",
1587
+ "disabled",
1588
+ "aria-invalid",
1589
+ "aria-required",
1590
+ "aria-describedby"
1591
+ ], jn = {
1592
+ key: 0,
1593
+ xmlns: "http://www.w3.org/2000/svg",
1594
+ viewBox: "0 0 24 24",
1595
+ fill: "none",
1596
+ stroke: "currentColor",
1597
+ "stroke-width": "3",
1598
+ "stroke-linecap": "round",
1599
+ "stroke-linejoin": "round",
1600
+ class: "pointer-events-none size-3 text-text-inverse"
1601
+ }, Mn = /* @__PURE__ */ u({
1602
+ __name: "Checkbox",
1603
+ props: {
1604
+ id: {},
1605
+ modelValue: {
1606
+ type: Boolean,
1607
+ default: !1
1608
+ },
1609
+ required: { type: Boolean },
1610
+ disabled: { type: Boolean },
1611
+ invalid: { type: Boolean },
1612
+ visual: {
1613
+ type: Boolean,
1614
+ default: !1
1615
+ },
1616
+ class: { type: [
1617
+ Boolean,
1618
+ null,
1619
+ String,
1620
+ Object,
1621
+ Array
1622
+ ] }
1623
+ },
1624
+ emits: ["update:modelValue"],
1625
+ setup(e, { emit: t }) {
1626
+ let n = e, i = t, c = d(L, null), l = r(() => ({
1627
+ id: n.id ?? c?.id.value,
1628
+ required: n.required || (c?.required.value ?? !1),
1629
+ disabled: n.disabled || (c?.disabled.value ?? !1),
1630
+ invalid: n.invalid || (c?.invalid.value ?? !1),
1631
+ describedById: c?.describedById.value
1632
+ })), u = r(() => F("flex size-4 shrink-0 items-center justify-center rounded border transition-colors", l.value.invalid ? "border-danger-text bg-danger-text/10" : n.modelValue ? "border-bg-inverse bg-bg-inverse" : "border-border-strong bg-bg-base", n.class)), f = (e) => {
1633
+ i("update:modelValue", e.target.checked);
1634
+ };
1635
+ return (t, n) => e.visual ? (b(), o("div", {
1636
+ key: 0,
1637
+ class: h(u.value)
1638
+ }, [e.modelValue ? (b(), o("svg", kn, [...n[0] ||= [s("path", { d: "M5 13l4 4L19 7" }, null, -1)]])) : a("", !0)], 2)) : (b(), o("label", {
1639
+ key: 1,
1640
+ class: h(["inline-flex", l.value.disabled && "opacity-60"])
1641
+ }, [s("input", {
1642
+ id: l.value.id,
1643
+ type: "checkbox",
1644
+ checked: e.modelValue,
1645
+ required: l.value.required,
1646
+ disabled: l.value.disabled,
1647
+ "aria-invalid": l.value.invalid || void 0,
1648
+ "aria-required": l.value.required || void 0,
1649
+ "aria-describedby": l.value.describedById,
1650
+ class: "peer sr-only",
1651
+ onChange: f
1652
+ }, null, 40, An), s("div", { class: h(D(F)(u.value, "cursor-pointer peer-focus-visible:ring-1 peer-focus-visible:ring-border-strong peer-disabled:cursor-not-allowed")) }, [e.modelValue ? (b(), o("svg", jn, [...n[1] ||= [s("path", { d: "M5 13l4 4L19 7" }, null, -1)]])) : a("", !0)], 2)], 2));
1653
+ }
1654
+ }), Nn = ["disabled", "aria-pressed"], Pn = /* @__PURE__ */ u({
1655
+ __name: "MultiSelectItem",
1656
+ props: {
1657
+ value: {},
1658
+ label: {},
1659
+ disabled: { type: Boolean }
1660
+ },
1661
+ setup(e) {
1662
+ let t = e, n = Dn("MultiSelectItem"), i = r(() => n.isSelected(t.value)), a = r(() => n.matchesQuery(t.label));
1663
+ return (t, r) => ae((b(), o("button", {
1664
+ type: "button",
1665
+ disabled: e.disabled,
1666
+ "aria-pressed": i.value,
1667
+ class: h(D(F)(D(z)({ indicator: "leading-control" }), "text-left hover:bg-bg-surface")),
1668
+ onClick: r[0] ||= (t) => D(n).toggle(e.value)
1669
+ }, [l(Mn, {
1670
+ "model-value": i.value,
1671
+ visual: ""
1672
+ }, null, 8, ["model-value"]), C(t.$slots, "default", { selected: i.value }, () => [s("span", { class: h(["truncate", i.value ? "font-medium" : "font-normal"]) }, E(e.label), 3)])], 10, Nn)), [[re, a.value]]);
1673
+ }
1674
+ }), Fn = /* @__PURE__ */ u({
1675
+ __name: "Dropdown",
1676
+ props: {
1677
+ placement: { default: "bottom-start" },
1678
+ offset: { default: 4 },
1679
+ class: { type: [
1680
+ Boolean,
1681
+ null,
1682
+ String,
1683
+ Object,
1684
+ Array
1685
+ ] }
1686
+ },
1687
+ setup(e) {
1688
+ let t = e;
1689
+ return (n, r) => (b(), i(D(Se), {
1690
+ as: "div",
1691
+ class: h(D(F)("relative inline-flex text-left", t.class))
1692
+ }, {
1693
+ default: A(() => [l(D(M), {
1694
+ composable: "",
1695
+ "floating-as": "template",
1696
+ placement: e.placement,
1697
+ offset: e.offset,
1698
+ flip: "",
1699
+ shift: "",
1700
+ "z-index": 50
1701
+ }, {
1702
+ default: A(() => [C(n.$slots, "default")]),
1703
+ _: 3
1704
+ }, 8, ["placement", "offset"])]),
1705
+ _: 3
1706
+ }, 8, ["class"]));
1707
+ }
1708
+ }), In = /* @__PURE__ */ u({
1709
+ __name: "DropdownTrigger",
1710
+ props: {
1711
+ asChild: { type: Boolean },
1712
+ class: { type: [
1713
+ Boolean,
1714
+ null,
1715
+ String,
1716
+ Object,
1717
+ Array
1718
+ ] }
1719
+ },
1720
+ setup(e) {
1721
+ let t = e;
1722
+ return (n, r) => (b(), i(D(P), null, {
1723
+ default: A(() => [l(D(Ce), {
1724
+ as: e.asChild ? "template" : void 0,
1725
+ class: h(e.asChild ? void 0 : D(F)("cursor-pointer rounded-lg focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:ring-border-strong", t.class))
1726
+ }, {
1727
+ default: A(({ open: e }) => [C(n.$slots, "default", { open: e })]),
1728
+ _: 3
1729
+ }, 8, ["as", "class"])]),
1730
+ _: 3
1731
+ }));
1732
+ }
1733
+ }), Ln = /* @__PURE__ */ u({
1734
+ __name: "DropdownContent",
1735
+ props: {
1736
+ size: { default: "full" },
1737
+ class: { type: [
1738
+ Boolean,
1739
+ null,
1740
+ String,
1741
+ Object,
1742
+ Array
1743
+ ] }
1744
+ },
1745
+ setup(e) {
1746
+ let t = e;
1747
+ return (e, n) => (b(), i(D(N), {
1748
+ as: "template",
1749
+ enter: D(H).enter,
1750
+ "enter-from": D(H).enterFrom,
1751
+ "enter-to": D(H).enterTo,
1752
+ leave: D(H).leave,
1753
+ "leave-from": D(H).leaveFrom,
1754
+ "leave-to": D(H).leaveTo
1755
+ }, {
1756
+ default: A(() => [l(D(Te), { class: h(D(F)(D(V)({ size: t.size }), t.class)) }, {
1757
+ default: A(() => [C(e.$slots, "default")]),
1758
+ _: 3
1759
+ }, 8, ["class"])]),
1760
+ _: 3
1761
+ }, 8, [
1762
+ "enter",
1763
+ "enter-from",
1764
+ "enter-to",
1765
+ "leave",
1766
+ "leave-from",
1767
+ "leave-to"
1768
+ ]));
1769
+ }
1770
+ }), Rn = ["disabled", "data-active"], zn = /* @__PURE__ */ u({
1771
+ __name: "DropdownItem",
1772
+ props: {
1773
+ disabled: { type: Boolean },
1774
+ class: { type: [
1775
+ Boolean,
1776
+ null,
1777
+ String,
1778
+ Object,
1779
+ Array
1780
+ ] }
1781
+ },
1782
+ emits: ["select"],
1783
+ setup(e, { emit: t }) {
1784
+ let n = e, r = t;
1785
+ return (t, a) => (b(), i(D(we), { disabled: e.disabled }, {
1786
+ default: A(({ active: i }) => [s("button", {
1787
+ type: "button",
1788
+ disabled: e.disabled,
1789
+ "data-active": i || void 0,
1790
+ class: h(D(F)(D(z)(), "text-text-primary text-sm", n.class)),
1791
+ onClick: a[0] ||= (e) => r("select")
1792
+ }, [C(t.$slots, "default", { active: i })], 10, Rn)]),
1793
+ _: 3
1794
+ }, 8, ["disabled"]));
1795
+ }
1796
+ }), U = Symbol("Combobox"), Bn = ["data-active"], Vn = {
1797
+ key: 0,
1798
+ class: "absolute inset-y-0 right-0 flex items-center pr-3 text-accent-pro-200"
1799
+ }, Hn = /* @__PURE__ */ u({
1800
+ __name: "ComboboxItem",
1801
+ props: {
1802
+ value: {},
1803
+ label: {},
1804
+ disabled: { type: Boolean }
1805
+ },
1806
+ setup(e) {
1807
+ let t = e, n = d(U);
1808
+ if (!n) throw Error("ComboboxItem must be used inside Combobox");
1809
+ let u = O(), f = S(), p = () => t.label ?? f.value?.textContent?.trim() ?? "";
1810
+ t.label && n.registerLabel(t.value, t.label), v(() => {
1811
+ t.label || n.registerLabel(t.value, p());
1812
+ }), k(() => t.label, (e) => {
1813
+ e && n.registerLabel(t.value, e);
1814
+ });
1815
+ let m = r(() => n.matchesQuery(p()));
1816
+ ie(() => n.setItemVisible(u, m.value)), _(() => n.setItemVisible(u, !1));
1817
+ let g = () => {
1818
+ t.disabled || n.select(t.value, p());
1819
+ };
1820
+ return (t, n) => ae((b(), i(D(pe), {
1821
+ value: e.value,
1822
+ disabled: e.disabled,
1823
+ as: "template"
1824
+ }, {
1825
+ default: A(({ active: n, selected: r }) => [s("div", {
1826
+ role: "option",
1827
+ "data-active": n || void 0,
1828
+ class: h(D(F)(D(z)({ indicator: "trailing-check" }), e.disabled && "pointer-events-none opacity-50")),
1829
+ onClick: g
1830
+ }, [s("span", {
1831
+ ref_key: "labelEl",
1832
+ ref: f,
1833
+ class: h(["block truncate", r && "font-semibold"])
1834
+ }, [C(t.$slots, "default", {
1835
+ active: n,
1836
+ selected: r
1837
+ }, () => [c(E(e.label), 1)])], 2), r ? (b(), o("span", Vn, [l(D(Ie), {
1838
+ class: "size-5",
1839
+ "aria-hidden": "true"
1840
+ })])) : a("", !0)], 10, Bn)]),
1841
+ _: 3
1842
+ }, 8, ["value", "disabled"])), [[re, m.value]]);
1843
+ }
1844
+ }), Un = /* @__PURE__ */ u({
1845
+ __name: "Combobox",
1846
+ props: {
1847
+ modelValue: {},
1848
+ placement: { default: "bottom-start" },
1849
+ offset: { default: 4 },
1850
+ class: {}
1851
+ },
1852
+ emits: ["update:modelValue"],
1853
+ setup(e, { emit: t }) {
1854
+ let n = e, a = t, o = S(""), s = ne(), c = r(() => {
1855
+ let e = {}, t = (n) => {
1856
+ if (n == null) return;
1857
+ if (Array.isArray(n)) {
1858
+ n.forEach(t);
1859
+ return;
1860
+ }
1861
+ if (typeof n != "object") return;
1862
+ let r = n;
1863
+ r.type === Hn && r.props?.value && r.props?.label && (e[r.props.value] = r.props.label), Array.isArray(r.children) && t(r.children);
1864
+ let i = r.children;
1865
+ if (i && typeof i == "object" && !Array.isArray(i)) {
1866
+ let e = i.default;
1867
+ if (typeof e == "function") try {
1868
+ t(e());
1869
+ } catch {}
1870
+ }
1871
+ };
1872
+ return t(s.default?.({})), e;
1873
+ }), u = S(""), d = S(""), f = r(() => d.value === n.modelValue && u.value ? u.value : c.value[n.modelValue] || n.modelValue), p = r({
1874
+ get: () => n.modelValue,
1875
+ set: (e) => a("update:modelValue", e)
1876
+ }), m = (e) => {
1877
+ let t = o.value.trim().toLowerCase();
1878
+ return !t || e.toLowerCase().includes(t);
1879
+ }, g = S({}), _ = (e, t) => {
1880
+ g.value[e] !== t && (g.value = {
1881
+ ...g.value,
1882
+ [e]: t
1883
+ });
1884
+ }, v = r(() => Object.values(g.value).filter(Boolean).length), y = r(() => o.value.trim().length > 0);
1885
+ return x(U, {
1886
+ selected: r(() => n.modelValue),
1887
+ selectedLabel: f,
1888
+ select: (e, t) => {
1889
+ d.value = e, u.value = t, p.value = e, o.value = "";
1890
+ },
1891
+ isSelected: (e) => n.modelValue === e,
1892
+ registerLabel: () => {},
1893
+ query: o,
1894
+ matchesQuery: m,
1895
+ setItemVisible: _,
1896
+ visibleCount: v,
1897
+ hasQuery: y,
1898
+ id: O()
1899
+ }), (t, r) => (b(), i(D(ue), {
1900
+ modelValue: p.value,
1901
+ "onUpdate:modelValue": r[0] ||= (e) => p.value = e,
1902
+ as: "div",
1903
+ class: "w-full"
1904
+ }, {
1905
+ default: A(() => [l(D(M), {
1906
+ as: "div",
1907
+ class: h(D(F)("relative", n.class)),
1908
+ composable: "",
1909
+ "floating-as": "template",
1910
+ placement: e.placement,
1911
+ offset: e.offset,
1912
+ flip: "",
1913
+ "z-index": 50
1914
+ }, {
1915
+ default: A(() => [C(t.$slots, "default")]),
1916
+ _: 3
1917
+ }, 8, [
1918
+ "class",
1919
+ "placement",
1920
+ "offset"
1921
+ ])]),
1922
+ _: 3
1923
+ }, 8, ["modelValue"]));
1924
+ }
1925
+ }), Wn = ["data-invalid"], Gn = /* @__PURE__ */ u({
1926
+ __name: "ComboboxInput",
1927
+ props: {
1928
+ placeholder: { default: "Search..." },
1929
+ variant: { default: "primary" },
1930
+ size: { default: "base" },
1931
+ class: {}
1932
+ },
1933
+ setup(e) {
1934
+ let t = e, n = d(U);
1935
+ if (!n) throw Error("ComboboxInput must be used inside Combobox");
1936
+ let r = d(L, null), a = () => n.selectedLabel.value, o = (e) => {
1937
+ n.query.value = e.target.value;
1938
+ };
1939
+ return (n, c) => (b(), i(D(P), null, {
1940
+ default: A(() => [s("div", {
1941
+ class: h(D(F)(D(B)({
1942
+ variant: e.variant,
1943
+ size: e.size
1944
+ }), "relative cursor-text", t.class)),
1945
+ "data-invalid": D(r)?.invalid.value || void 0
1946
+ }, [l(D(fe), {
1947
+ id: D(r)?.id.value,
1948
+ "aria-describedby": D(r)?.describedById.value,
1949
+ "aria-invalid": D(r)?.invalid.value || void 0,
1950
+ displayValue: a,
1951
+ placeholder: e.placeholder,
1952
+ class: "w-full bg-transparent text-text-primary outline-none placeholder:text-text-tertiary",
1953
+ onInput: o
1954
+ }, null, 8, [
1955
+ "id",
1956
+ "aria-describedby",
1957
+ "aria-invalid",
1958
+ "placeholder"
1959
+ ]), l(D(de), {
1960
+ "aria-label": "Toggle options",
1961
+ class: "absolute inset-y-0 right-0 flex items-center pr-2"
1962
+ }, {
1963
+ default: A(() => [l(D(Fe), {
1964
+ class: "size-5 text-text-tertiary",
1965
+ "aria-hidden": "true"
1966
+ })]),
1967
+ _: 1
1968
+ })], 10, Wn)]),
1969
+ _: 1
1970
+ }));
1971
+ }
1972
+ }), Kn = /* @__PURE__ */ u({
1973
+ __name: "ComboboxContent",
1974
+ props: {
1975
+ width: { default: "full" },
1976
+ class: {}
1977
+ },
1978
+ setup(e) {
1979
+ let t = e, n = r(() => F(V({ size: t.width }), "max-h-80 overflow-y-auto", t.class));
1980
+ return (e, t) => (b(), i(D(N), {
1981
+ as: "template",
1982
+ enter: D(H).enter,
1983
+ "enter-from": D(H).enterFrom,
1984
+ "enter-to": D(H).enterTo,
1985
+ leave: D(H).leave,
1986
+ "leave-from": D(H).leaveFrom,
1987
+ "leave-to": D(H).leaveTo
1988
+ }, {
1989
+ default: A(() => [l(D(me), {
1990
+ as: "div",
1991
+ static: "",
1992
+ class: h(n.value)
1993
+ }, {
1994
+ default: A(() => [C(e.$slots, "default")]),
1995
+ _: 3
1996
+ }, 8, ["class"])]),
1997
+ _: 3
1998
+ }, 8, [
1999
+ "enter",
2000
+ "enter-from",
2001
+ "enter-to",
2002
+ "leave",
2003
+ "leave-from",
2004
+ "leave-to"
2005
+ ]));
2006
+ }
2007
+ }), qn = {
2008
+ key: 0,
2009
+ class: "px-3 py-6 text-center text-sm text-text-tertiary"
2010
+ }, Jn = /* @__PURE__ */ u({
2011
+ __name: "ComboboxEmpty",
2012
+ setup(e) {
2013
+ let t = d(U);
2014
+ if (!t) throw Error("ComboboxEmpty must be used inside Combobox");
2015
+ let n = r(() => t.hasQuery.value && t.visibleCount.value === 0);
2016
+ return (e, t) => n.value ? (b(), o("div", qn, [C(e.$slots, "default", {}, () => [t[0] ||= c("No results found.", -1)])])) : a("", !0);
2017
+ }
2018
+ }), Yn = ["data-invalid"], Xn = { class: "flex items-center gap-1 text-text-secondary" }, Zn = [
2019
+ "id",
2020
+ "type",
2021
+ "value",
2022
+ "disabled",
2023
+ "placeholder",
2024
+ "required",
2025
+ "aria-invalid",
2026
+ "aria-required",
2027
+ "aria-describedby",
2028
+ "data-invalid"
2029
+ ], Qn = /* @__PURE__ */ u({
2030
+ inheritAttrs: !1,
2031
+ __name: "Input",
2032
+ props: /*@__PURE__*/ f({
2033
+ variant: { default: "primary" },
2034
+ size: { default: "base" },
2035
+ id: {},
2036
+ placeholder: {},
2037
+ type: { default: "text" },
2038
+ required: {
2039
+ type: Boolean,
2040
+ default: void 0
2041
+ },
2042
+ disabled: {
2043
+ type: Boolean,
2044
+ default: void 0
2045
+ },
2046
+ invalid: {
2047
+ type: Boolean,
2048
+ default: void 0
2049
+ },
2050
+ class: { type: [
2051
+ Boolean,
2052
+ null,
2053
+ String,
2054
+ Object,
2055
+ Array
2056
+ ] }
2057
+ }, {
2058
+ modelValue: {},
2059
+ modelModifiers: {}
2060
+ }),
2061
+ emits: ["update:modelValue"],
2062
+ setup(e) {
2063
+ let t = e, n = te(e, "modelValue"), i = d(L, null), a = O(), c = r(() => t.id ?? i?.id.value ?? a), l = r(() => t.invalid ?? i?.invalid.value ?? !1), u = r(() => t.disabled ?? i?.disabled.value ?? !1), f = r(() => t.required ?? i?.required.value ?? !1), m = r(() => i?.describedById.value), g = r(() => F(B({
2064
+ variant: t.variant,
2065
+ size: t.size,
2066
+ invalid: l.value
2067
+ }), t.class)), _ = S(null), v = (e) => {
2068
+ let t = e.target;
2069
+ t !== _.value && (t.closest("button, a, input, select, textarea, [tabindex]") || _.value?.focus());
2070
+ }, y = (e) => {
2071
+ n.value = e.target.value;
2072
+ };
2073
+ return (t, r) => (b(), o("div", {
2074
+ class: h(g.value),
2075
+ "data-invalid": l.value || void 0,
2076
+ onClick: v
2077
+ }, [s("span", Xn, [C(t.$slots, "default")]), s("input", p({
2078
+ ref_key: "inputRef",
2079
+ ref: _
2080
+ }, t.$attrs, {
2081
+ id: c.value,
2082
+ type: e.type,
2083
+ value: n.value ?? "",
2084
+ disabled: u.value,
2085
+ placeholder: e.placeholder,
2086
+ required: f.value,
2087
+ "aria-invalid": l.value || void 0,
2088
+ "aria-required": f.value || void 0,
2089
+ "aria-describedby": m.value,
2090
+ "data-invalid": l.value || void 0,
2091
+ class: "h-full w-full bg-transparent text-text-primary/70 outline-none transition-colors group-hover:text-text-primary focus:text-text-primary disabled:cursor-not-allowed",
2092
+ onInput: y
2093
+ }), null, 16, Zn)], 10, Yn));
2094
+ }
2095
+ }), $n = ["data-invalid"], er = {
2096
+ key: 0,
2097
+ class: "flex items-center gap-1 text-text-secondary"
2098
+ }, tr = [
2099
+ "id",
2100
+ "rows",
2101
+ "value",
2102
+ "disabled",
2103
+ "placeholder",
2104
+ "required",
2105
+ "aria-invalid",
2106
+ "aria-required",
2107
+ "aria-describedby",
2108
+ "data-invalid"
2109
+ ], nr = /* @__PURE__ */ u({
2110
+ __name: "Textarea",
2111
+ props: /*@__PURE__*/ f({
2112
+ variant: { default: "primary" },
2113
+ size: { default: "base" },
2114
+ id: {},
2115
+ placeholder: {},
2116
+ rows: { default: 4 },
2117
+ autosize: {
2118
+ type: Boolean,
2119
+ default: !1
2120
+ },
2121
+ required: {
2122
+ type: Boolean,
2123
+ default: void 0
2124
+ },
2125
+ disabled: {
2126
+ type: Boolean,
2127
+ default: void 0
2128
+ },
2129
+ invalid: {
2130
+ type: Boolean,
2131
+ default: void 0
2132
+ },
2133
+ class: { type: [
2134
+ Boolean,
2135
+ null,
2136
+ String,
2137
+ Object,
2138
+ Array
2139
+ ] }
2140
+ }, {
2141
+ modelValue: {},
2142
+ modelModifiers: {}
2143
+ }),
2144
+ emits: ["update:modelValue"],
2145
+ setup(e) {
2146
+ let t = e, n = te(e, "modelValue"), i = d(L, null), c = O(), l = r(() => t.id ?? i?.id.value ?? c), u = r(() => t.invalid ?? i?.invalid.value ?? !1), f = r(() => t.disabled ?? i?.disabled.value ?? !1), p = r(() => t.required ?? i?.required.value ?? !1), _ = r(() => i?.describedById.value), v = r(() => ({ minHeight: `${t.rows * 1.5 + 1}rem` })), y = S(), { triggerResize: x } = Ke({
2147
+ element: y,
2148
+ input: r(() => String(n.value ?? "")),
2149
+ styleProp: "height"
2150
+ });
2151
+ k(() => n.value, async () => {
2152
+ t.autosize && (await m(), x());
2153
+ });
2154
+ let w = r(() => F(B({
2155
+ variant: t.variant,
2156
+ size: t.size,
2157
+ invalid: u.value
2158
+ }), "h-auto", t.autosize && "pr-0", t.class)), T = (e) => {
2159
+ n.value = e.target.value;
2160
+ };
2161
+ return (t, r) => (b(), o("div", {
2162
+ class: h(w.value),
2163
+ "data-invalid": u.value || void 0
2164
+ }, [t.$slots.default ? (b(), o("span", er, [C(t.$slots, "default")])) : a("", !0), s("textarea", {
2165
+ id: l.value,
2166
+ ref_key: "textareaEl",
2167
+ ref: y,
2168
+ rows: e.rows,
2169
+ style: g(v.value),
2170
+ value: n.value ?? "",
2171
+ disabled: f.value,
2172
+ placeholder: e.placeholder,
2173
+ required: p.value,
2174
+ "aria-invalid": u.value || void 0,
2175
+ "aria-required": p.value || void 0,
2176
+ "aria-describedby": _.value,
2177
+ "data-invalid": u.value || void 0,
2178
+ class: h(D(F)("w-full bg-transparent py-2 text-text-primary/70 outline-none transition-colors group-hover:text-text-primary focus:text-text-primary disabled:cursor-not-allowed", e.autosize ? "resize-none max-h-60 overflow-y-auto scrollbar-thin pr-3.5" : "resize-none")),
2179
+ onInput: T
2180
+ }, null, 46, tr)], 10, $n));
2181
+ }
2182
+ }), rr = [
2183
+ "id",
2184
+ "checked",
2185
+ "aria-checked",
2186
+ "aria-label",
2187
+ "aria-describedby",
2188
+ "disabled"
2189
+ ], ir = /* @__PURE__ */ u({
2190
+ __name: "Switch",
2191
+ props: {
2192
+ modelValue: { type: Boolean },
2193
+ id: {},
2194
+ disabled: {
2195
+ type: Boolean,
2196
+ default: !1
2197
+ },
2198
+ ariaLabel: {},
2199
+ class: { type: [
2200
+ Boolean,
2201
+ null,
2202
+ String,
2203
+ Object,
2204
+ Array
2205
+ ] }
2206
+ },
2207
+ emits: ["update:modelValue"],
2208
+ setup(e, { emit: t }) {
2209
+ let n = e, i = t, a = d(L, null), c = O(), l = r(() => ({
2210
+ id: n.id ?? a?.id.value ?? c,
2211
+ disabled: n.disabled || (a?.disabled.value ?? !1),
2212
+ describedById: a?.describedById.value
2213
+ })), u = (e) => {
2214
+ i("update:modelValue", e.target.checked);
2215
+ };
2216
+ return (t, r) => (b(), o("label", { class: h(["relative inline-flex", l.value.disabled && "opacity-60"]) }, [s("input", {
2217
+ id: l.value.id,
2218
+ type: "checkbox",
2219
+ role: "switch",
2220
+ checked: e.modelValue,
2221
+ "aria-checked": e.modelValue,
2222
+ "aria-label": e.ariaLabel,
2223
+ "aria-describedby": l.value.describedById,
2224
+ disabled: l.value.disabled,
2225
+ class: "peer sr-only",
2226
+ onChange: u
2227
+ }, null, 40, rr), s("div", { class: h(D(F)("h-6 w-11 cursor-pointer rounded-full bg-bg-subtle transition-colors", "after:absolute after:inset-s-0.5 after:top-0.5 after:size-5 after:rounded-full after:border after:border-border-strong after:bg-bg-base after:transition-all after:content-['']", "peer-checked:bg-bg-inverse peer-checked:after:translate-x-5 peer-checked:after:border-bg-inverse", "peer-focus-visible:ring-2 peer-focus-visible:ring-offset-2 peer-focus-visible:ring-border-strong", "peer-disabled:cursor-not-allowed", n.class)) }, null, 2)], 2));
2228
+ }
2229
+ }), ar = /* @__PURE__ */ u({
2230
+ __name: "Popover",
2231
+ props: {
2232
+ placement: { default: "bottom-end" },
2233
+ offset: { default: 4 },
2234
+ class: { type: [
2235
+ Boolean,
2236
+ null,
2237
+ String,
2238
+ Object,
2239
+ Array
2240
+ ] }
2241
+ },
2242
+ setup(e) {
2243
+ let t = e;
2244
+ return (n, r) => (b(), i(D(Ee), {
2245
+ as: "div",
2246
+ class: h(D(F)("relative", t.class))
2247
+ }, {
2248
+ default: A(() => [l(D(M), {
2249
+ composable: "",
2250
+ placement: e.placement,
2251
+ offset: e.offset,
2252
+ flip: "",
2253
+ "z-index": 50
2254
+ }, {
2255
+ default: A(() => [C(n.$slots, "default")]),
2256
+ _: 3
2257
+ }, 8, ["placement", "offset"])]),
2258
+ _: 3
2259
+ }, 8, ["class"]));
2260
+ }
2261
+ }), or = /* @__PURE__ */ u({
2262
+ __name: "PopoverTrigger",
2263
+ props: {
2264
+ asChild: { type: Boolean },
2265
+ class: { type: [
2266
+ Boolean,
2267
+ null,
2268
+ String,
2269
+ Object,
2270
+ Array
2271
+ ] }
2272
+ },
2273
+ setup(e) {
2274
+ let t = e;
2275
+ return (n, r) => (b(), i(D(P), null, {
2276
+ default: A(() => [l(D(De), {
2277
+ as: e.asChild ? "template" : void 0,
2278
+ class: h(e.asChild ? void 0 : D(F)("cursor-pointer rounded-lg focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:ring-border-strong", t.class))
2279
+ }, {
2280
+ default: A(({ open: e }) => [C(n.$slots, "default", { open: e })]),
2281
+ _: 3
2282
+ }, 8, ["as", "class"])]),
2283
+ _: 3
2284
+ }));
2285
+ }
2286
+ }), sr = /* @__PURE__ */ u({
2287
+ __name: "PopoverContent",
2288
+ props: {
2289
+ size: { default: "xs" },
2290
+ class: { type: [
2291
+ Boolean,
2292
+ null,
2293
+ String,
2294
+ Object,
2295
+ Array
2296
+ ] }
2297
+ },
2298
+ setup(e) {
2299
+ let t = e;
2300
+ return (e, n) => (b(), i(D(N), {
2301
+ as: "template",
2302
+ enter: D(H).enter,
2303
+ "enter-from": D(H).enterFrom,
2304
+ "enter-to": D(H).enterTo,
2305
+ leave: D(H).leave,
2306
+ "leave-from": D(H).leaveFrom,
2307
+ "leave-to": D(H).leaveTo
2308
+ }, {
2309
+ default: A(() => [l(D(Oe), { class: h(D(F)(D(V)({ size: t.size }), t.class)) }, {
2310
+ default: A(({ close: t }) => [C(e.$slots, "default", { close: t })]),
2311
+ _: 3
2312
+ }, 8, ["class"])]),
2313
+ _: 3
2314
+ }, 8, [
2315
+ "enter",
2316
+ "enter-from",
2317
+ "enter-to",
2318
+ "leave",
2319
+ "leave-from",
2320
+ "leave-to"
2321
+ ]));
2322
+ }
2323
+ });
2324
+ typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
2325
+ var cr = (e) => e != null, lr = [
2326
+ "input:not([inert]):not([inert] *)",
2327
+ "select:not([inert]):not([inert] *)",
2328
+ "textarea:not([inert]):not([inert] *)",
2329
+ "a[href]:not([inert]):not([inert] *)",
2330
+ "button:not([inert]):not([inert] *)",
2331
+ "[tabindex]:not(slot):not([inert]):not([inert] *)",
2332
+ "audio[controls]:not([inert]):not([inert] *)",
2333
+ "video[controls]:not([inert]):not([inert] *)",
2334
+ "[contenteditable]:not([contenteditable=\"false\"]):not([inert]):not([inert] *)",
2335
+ "details>summary:first-of-type:not([inert]):not([inert] *)",
2336
+ "details:not([inert]):not([inert] *)"
2337
+ ], W = /* #__PURE__ */ lr.join(","), ur = typeof Element > "u", G = ur ? function() {} : Element.prototype.matches || Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector, K = !ur && Element.prototype.getRootNode ? function(e) {
2338
+ return e?.getRootNode?.call(e);
2339
+ } : function(e) {
2340
+ return e?.ownerDocument;
2341
+ }, q = function(e, t) {
2342
+ t === void 0 && (t = !0);
2343
+ var n = e?.getAttribute?.call(e, "inert");
2344
+ return n === "" || n === "true" || t && e && (typeof e.closest == "function" ? e.closest("[inert]") : q(e.parentNode));
2345
+ }, dr = function(e) {
2346
+ var t = e?.getAttribute?.call(e, "contenteditable");
2347
+ return t === "" || t === "true";
2348
+ }, fr = function(e, t, n) {
2349
+ if (q(e)) return [];
2350
+ var r = Array.prototype.slice.apply(e.querySelectorAll(W));
2351
+ return t && G.call(e, W) && r.unshift(e), r = r.filter(n), r;
2352
+ }, J = function(e, t, n) {
2353
+ for (var r = [], i = Array.from(e); i.length;) {
2354
+ var a = i.shift();
2355
+ if (!q(a, !1)) if (a.tagName === "SLOT") {
2356
+ var o = a.assignedElements(), s = J(o.length ? o : a.children, !0, n);
2357
+ n.flatten ? r.push.apply(r, s) : r.push({
2358
+ scopeParent: a,
2359
+ candidates: s
2360
+ });
2361
+ } else {
2362
+ G.call(a, W) && n.filter(a) && (t || !e.includes(a)) && r.push(a);
2363
+ var c = a.shadowRoot || typeof n.getShadowRoot == "function" && n.getShadowRoot(a), l = !q(c, !1) && (!n.shadowRootFilter || n.shadowRootFilter(a));
2364
+ if (c && l) {
2365
+ var u = J(c === !0 ? a.children : c.children, !0, n);
2366
+ n.flatten ? r.push.apply(r, u) : r.push({
2367
+ scopeParent: a,
2368
+ candidates: u
2369
+ });
2370
+ } else i.unshift.apply(i, a.children);
2371
+ }
2372
+ }
2373
+ return r;
2374
+ }, pr = function(e) {
2375
+ return !isNaN(parseInt(e.getAttribute("tabindex"), 10));
2376
+ }, Y = function(e) {
2377
+ if (!e) throw Error("No node provided");
2378
+ return e.tabIndex < 0 && (/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName) || dr(e)) && !pr(e) ? 0 : e.tabIndex;
2379
+ }, mr = function(e, t) {
2380
+ var n = Y(e);
2381
+ return n < 0 && t && !pr(e) ? 0 : n;
2382
+ }, hr = function(e, t) {
2383
+ return e.tabIndex === t.tabIndex ? e.documentOrder - t.documentOrder : e.tabIndex - t.tabIndex;
2384
+ }, gr = function(e) {
2385
+ return e.tagName === "INPUT";
2386
+ }, _r = function(e) {
2387
+ return gr(e) && e.type === "hidden";
2388
+ }, vr = function(e) {
2389
+ return e.tagName === "DETAILS" && Array.prototype.slice.apply(e.children).some(function(e) {
2390
+ return e.tagName === "SUMMARY";
2391
+ });
2392
+ }, yr = function(e, t) {
2393
+ for (var n = 0; n < e.length; n++) if (e[n].checked && e[n].form === t) return e[n];
2394
+ }, br = function(e) {
2395
+ if (!e.name) return !0;
2396
+ var t = e.form || K(e), n = function(e) {
2397
+ return t.querySelectorAll("input[type=\"radio\"][name=\"" + e + "\"]");
2398
+ }, r;
2399
+ if (typeof window < "u" && window.CSS !== void 0 && typeof window.CSS.escape == "function") r = n(window.CSS.escape(e.name));
2400
+ else try {
2401
+ r = n(e.name);
2402
+ } catch (e) {
2403
+ return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s", e.message), !1;
2404
+ }
2405
+ var i = yr(r, e.form);
2406
+ return !i || i === e;
2407
+ }, xr = function(e) {
2408
+ return gr(e) && e.type === "radio";
2409
+ }, Sr = function(e) {
2410
+ return xr(e) && !br(e);
2411
+ }, Cr = function(e) {
2412
+ var t = e && K(e), n = t?.host, r = !1;
2413
+ if (t && t !== e) {
2414
+ var i, a, o;
2415
+ for (r = !!((i = n) != null && (a = i.ownerDocument) != null && a.contains(n) || e != null && (o = e.ownerDocument) != null && o.contains(e)); !r && n;) {
2416
+ var s, c;
2417
+ t = K(n), n = t?.host, r = !!((s = n) != null && (c = s.ownerDocument) != null && c.contains(n));
2418
+ }
2419
+ }
2420
+ return r;
2421
+ }, wr = function(e) {
2422
+ var t = e.getBoundingClientRect(), n = t.width, r = t.height;
2423
+ return n === 0 && r === 0;
2424
+ }, Tr = function(e, t) {
2425
+ var n = t.displayCheck, r = t.getShadowRoot;
2426
+ if (n === "full-native" && "checkVisibility" in e) return !e.checkVisibility({
2427
+ checkOpacity: !1,
2428
+ opacityProperty: !1,
2429
+ contentVisibilityAuto: !0,
2430
+ visibilityProperty: !0,
2431
+ checkVisibilityCSS: !0
2432
+ });
2433
+ if (getComputedStyle(e).visibility === "hidden") return !0;
2434
+ var i = G.call(e, "details>summary:first-of-type") ? e.parentElement : e;
2435
+ if (G.call(i, "details:not([open]) *")) return !0;
2436
+ if (!n || n === "full" || n === "full-native" || n === "legacy-full") {
2437
+ if (typeof r == "function") {
2438
+ for (var a = e; e;) {
2439
+ var o = e.parentElement, s = K(e);
2440
+ if (o && !o.shadowRoot && r(o) === !0) return wr(e);
2441
+ e = e.assignedSlot ? e.assignedSlot : !o && s !== e.ownerDocument ? s.host : o;
2442
+ }
2443
+ e = a;
2444
+ }
2445
+ if (Cr(e)) return !e.getClientRects().length;
2446
+ if (n !== "legacy-full") return !0;
2447
+ } else if (n === "non-zero-area") return wr(e);
2448
+ return !1;
2449
+ }, Er = function(e) {
2450
+ if (/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName)) for (var t = e.parentElement; t;) {
2451
+ if (t.tagName === "FIELDSET" && t.disabled) {
2452
+ for (var n = 0; n < t.children.length; n++) {
2453
+ var r = t.children.item(n);
2454
+ if (r.tagName === "LEGEND") return G.call(t, "fieldset[disabled] *") ? !0 : !r.contains(e);
2455
+ }
2456
+ return !0;
2457
+ }
2458
+ t = t.parentElement;
2459
+ }
2460
+ return !1;
2461
+ }, Dr = function(e, t) {
2462
+ return !(t.disabled || _r(t) || Tr(t, e) || vr(t) || Er(t));
2463
+ }, Or = function(e, t) {
2464
+ return !(Sr(t) || Y(t) < 0 || !Dr(e, t));
2465
+ }, kr = function(e) {
2466
+ var t = parseInt(e.getAttribute("tabindex"), 10);
2467
+ return !!(isNaN(t) || t >= 0);
2468
+ }, Ar = function(e) {
2469
+ var t = [], n = [];
2470
+ return e.forEach(function(e, r) {
2471
+ var i = !!e.scopeParent, a = i ? e.scopeParent : e, o = mr(a, i), s = i ? Ar(e.candidates) : a;
2472
+ o === 0 ? i ? t.push.apply(t, s) : t.push(a) : n.push({
2473
+ documentOrder: r,
2474
+ tabIndex: o,
2475
+ item: e,
2476
+ isScope: i,
2477
+ content: s
2478
+ });
2479
+ }), n.sort(hr).reduce(function(e, t) {
2480
+ return t.isScope ? e.push.apply(e, t.content) : e.push(t.content), e;
2481
+ }, []).concat(t);
2482
+ }, jr = function(e, t) {
2483
+ return t ||= {}, Ar(t.getShadowRoot ? J([e], t.includeContainer, {
2484
+ filter: Or.bind(null, t),
2485
+ flatten: !1,
2486
+ getShadowRoot: t.getShadowRoot,
2487
+ shadowRootFilter: kr
2488
+ }) : fr(e, t.includeContainer, Or.bind(null, t)));
2489
+ }, Mr = function(e, t) {
2490
+ return t ||= {}, t.getShadowRoot ? J([e], t.includeContainer, {
2491
+ filter: Dr.bind(null, t),
2492
+ flatten: !0,
2493
+ getShadowRoot: t.getShadowRoot
2494
+ }) : fr(e, t.includeContainer, Dr.bind(null, t));
2495
+ }, X = function(e, t) {
2496
+ if (t ||= {}, !e) throw Error("No node provided");
2497
+ return G.call(e, W) === !1 ? !1 : Or(t, e);
2498
+ }, Nr = /* #__PURE__ */ lr.concat("iframe:not([inert]):not([inert] *)").join(","), Pr = function(e, t) {
2499
+ if (t ||= {}, !e) throw Error("No node provided");
2500
+ return G.call(e, Nr) === !1 ? !1 : Dr(t, e);
2501
+ };
2502
+ //#endregion
2503
+ //#region node_modules/focus-trap/dist/focus-trap.esm.js
2504
+ function Fr(e, t) {
2505
+ (t == null || t > e.length) && (t = e.length);
2506
+ for (var n = 0, r = Array(t); n < t; n++) r[n] = e[n];
2507
+ return r;
2508
+ }
2509
+ function Ir(e) {
2510
+ if (Array.isArray(e)) return Fr(e);
2511
+ }
2512
+ function Lr(e, t) {
2513
+ var n = typeof Symbol < "u" && e[Symbol.iterator] || e["@@iterator"];
2514
+ if (!n) {
2515
+ if (Array.isArray(e) || (n = Kr(e)) || t) {
2516
+ n && (e = n);
2517
+ var r = 0, i = function() {};
2518
+ return {
2519
+ s: i,
2520
+ n: function() {
2521
+ return r >= e.length ? { done: !0 } : {
2522
+ done: !1,
2523
+ value: e[r++]
2524
+ };
2525
+ },
2526
+ e: function(e) {
2527
+ throw e;
2528
+ },
2529
+ f: i
2530
+ };
2531
+ }
2532
+ throw TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
2533
+ }
2534
+ var a, o = !0, s = !1;
2535
+ return {
2536
+ s: function() {
2537
+ n = n.call(e);
2538
+ },
2539
+ n: function() {
2540
+ var e = n.next();
2541
+ return o = e.done, e;
2542
+ },
2543
+ e: function(e) {
2544
+ s = !0, a = e;
2545
+ },
2546
+ f: function() {
2547
+ try {
2548
+ o || n.return == null || n.return();
2549
+ } finally {
2550
+ if (s) throw a;
2551
+ }
2552
+ }
2553
+ };
2554
+ }
2555
+ function Rr(e, t, n) {
2556
+ return (t = Gr(t)) in e ? Object.defineProperty(e, t, {
2557
+ value: n,
2558
+ enumerable: !0,
2559
+ configurable: !0,
2560
+ writable: !0
2561
+ }) : e[t] = n, e;
2562
+ }
2563
+ function zr(e) {
2564
+ if (typeof Symbol < "u" && e[Symbol.iterator] != null || e["@@iterator"] != null) return Array.from(e);
2565
+ }
2566
+ function Br() {
2567
+ throw TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
2568
+ }
2569
+ function Vr(e, t) {
2570
+ var n = Object.keys(e);
2571
+ if (Object.getOwnPropertySymbols) {
2572
+ var r = Object.getOwnPropertySymbols(e);
2573
+ t && (r = r.filter(function(t) {
2574
+ return Object.getOwnPropertyDescriptor(e, t).enumerable;
2575
+ })), n.push.apply(n, r);
2576
+ }
2577
+ return n;
2578
+ }
2579
+ function Hr(e) {
2580
+ for (var t = 1; t < arguments.length; t++) {
2581
+ var n = arguments[t] == null ? {} : arguments[t];
2582
+ t % 2 ? Vr(Object(n), !0).forEach(function(t) {
2583
+ Rr(e, t, n[t]);
2584
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : Vr(Object(n)).forEach(function(t) {
2585
+ Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t));
2586
+ });
2587
+ }
2588
+ return e;
2589
+ }
2590
+ function Ur(e) {
2591
+ return Ir(e) || zr(e) || Kr(e) || Br();
2592
+ }
2593
+ function Wr(e, t) {
2594
+ if (typeof e != "object" || !e) return e;
2595
+ var n = e[Symbol.toPrimitive];
2596
+ if (n !== void 0) {
2597
+ var r = n.call(e, t);
2598
+ if (typeof r != "object") return r;
2599
+ throw TypeError("@@toPrimitive must return a primitive value.");
2600
+ }
2601
+ return (t === "string" ? String : Number)(e);
2602
+ }
2603
+ function Gr(e) {
2604
+ var t = Wr(e, "string");
2605
+ return typeof t == "symbol" ? t : t + "";
2606
+ }
2607
+ function Kr(e, t) {
2608
+ if (e) {
2609
+ if (typeof e == "string") return Fr(e, t);
2610
+ var n = {}.toString.call(e).slice(8, -1);
2611
+ return n === "Object" && e.constructor && (n = e.constructor.name), n === "Map" || n === "Set" ? Array.from(e) : n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n) ? Fr(e, t) : void 0;
2612
+ }
2613
+ }
2614
+ var Z = {
2615
+ getActiveTrap: function(e) {
2616
+ return e?.length > 0 ? e[e.length - 1] : null;
2617
+ },
2618
+ activateTrap: function(e, t) {
2619
+ t !== Z.getActiveTrap(e) && Z.pauseTrap(e);
2620
+ var n = e.indexOf(t);
2621
+ n === -1 || e.splice(n, 1), e.push(t);
2622
+ },
2623
+ deactivateTrap: function(e, t) {
2624
+ var n = e.indexOf(t);
2625
+ n !== -1 && e.splice(n, 1), Z.unpauseTrap(e);
2626
+ },
2627
+ pauseTrap: function(e) {
2628
+ Z.getActiveTrap(e)?._setPausedState(!0);
2629
+ },
2630
+ unpauseTrap: function(e) {
2631
+ var t = Z.getActiveTrap(e);
2632
+ t && !t._isManuallyPaused() && t._setPausedState(!1);
2633
+ }
2634
+ }, qr = function(e) {
2635
+ return e.tagName && e.tagName.toLowerCase() === "input" && typeof e.select == "function";
2636
+ }, Jr = function(e) {
2637
+ return e?.key === "Escape" || e?.key === "Esc" || e?.keyCode === 27;
2638
+ }, Q = function(e) {
2639
+ return e?.key === "Tab" || e?.keyCode === 9;
2640
+ }, Yr = function(e) {
2641
+ return Q(e) && !e.shiftKey;
2642
+ }, Xr = function(e) {
2643
+ return Q(e) && e.shiftKey;
2644
+ }, Zr = function(e) {
2645
+ return setTimeout(e, 0);
2646
+ }, $ = function(e) {
2647
+ var t = [...arguments].slice(1);
2648
+ return typeof e == "function" ? e.apply(void 0, t) : e;
2649
+ }, Qr = function(e) {
2650
+ return e.target.shadowRoot && typeof e.composedPath == "function" ? e.composedPath()[0] : e.target;
2651
+ }, $r = [], ei = function(e, t) {
2652
+ var n = t?.document || document, r = t?.trapStack || $r, i = Hr({
2653
+ returnFocusOnDeactivate: !0,
2654
+ escapeDeactivates: !0,
2655
+ delayInitialFocus: !0,
2656
+ delayReturnFocus: !0,
2657
+ isolateSubtrees: !1,
2658
+ isKeyForward: Yr,
2659
+ isKeyBackward: Xr
2660
+ }, t), a = {
2661
+ containers: [],
2662
+ containerGroups: [],
2663
+ tabbableGroups: [],
2664
+ adjacentElements: /* @__PURE__ */ new Set(),
2665
+ alreadySilent: /* @__PURE__ */ new Set(),
2666
+ nodeFocusedBeforeActivation: null,
2667
+ mostRecentlyFocusedNode: null,
2668
+ active: !1,
2669
+ paused: !1,
2670
+ manuallyPaused: !1,
2671
+ delayInitialFocusTimer: void 0,
2672
+ recentNavEvent: void 0
2673
+ }, o, s = function(e, t, n) {
2674
+ return e && e[t] !== void 0 ? e[t] : i[n || t];
2675
+ }, c = function(e, t) {
2676
+ var n = typeof t?.composedPath == "function" ? t.composedPath() : void 0;
2677
+ return a.containerGroups.findIndex(function(t) {
2678
+ var r = t.container, i = t.tabbableNodes;
2679
+ return r.contains(e) || n?.includes(r) || i.find(function(t) {
2680
+ return t === e;
2681
+ });
2682
+ });
2683
+ }, l = function(e) {
2684
+ var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, r = t.hasFallback, a = r === void 0 ? !1 : r, o = t.params, s = o === void 0 ? [] : o, c = i[e];
2685
+ if (typeof c == "function" && (c = c.apply(void 0, Ur(s))), c === !0 && (c = void 0), !c) {
2686
+ if (c === void 0 || c === !1) return c;
2687
+ throw Error(`\`${e}\` was specified but was not a node, or did not return a node`);
2688
+ }
2689
+ var l = c;
2690
+ if (typeof c == "string") {
2691
+ try {
2692
+ l = n.querySelector(c);
2693
+ } catch (t) {
2694
+ throw Error(`\`${e}\` appears to be an invalid selector; error="${t.message}"`);
2695
+ }
2696
+ if (!l && !a) throw Error(`\`${e}\` as selector refers to no known node`);
2697
+ }
2698
+ return l;
2699
+ }, u = function(e) {
2700
+ var t = e.activeElement;
2701
+ return t ? t.shadowRoot && t.shadowRoot.activeElement !== null ? u(t.shadowRoot) : t : null;
2702
+ }, d = function() {
2703
+ var e = l("initialFocus", { hasFallback: !0 });
2704
+ if (e === !1) return !1;
2705
+ if (e === void 0 || e && !Pr(e, i.tabbableOptions)) {
2706
+ var t = u(n);
2707
+ if (c(t) >= 0) e = t;
2708
+ else {
2709
+ var r = a.tabbableGroups[0];
2710
+ e = r && r.firstTabbableNode || l("fallbackFocus");
2711
+ }
2712
+ } else e === null && (e = l("fallbackFocus"));
2713
+ if (!e) throw Error("Your focus-trap needs to have at least one focusable element");
2714
+ return e;
2715
+ }, f = function() {
2716
+ if (a.containerGroups = a.containers.map(function(e) {
2717
+ var t = jr(e, i.tabbableOptions), n = Mr(e, i.tabbableOptions), r = t.length > 0 ? t[0] : void 0, a = t.length > 0 ? t[t.length - 1] : void 0, o = n.find(function(e) {
2718
+ return X(e);
2719
+ }), s = n.slice().reverse().find(function(e) {
2720
+ return X(e);
2721
+ });
2722
+ return {
2723
+ container: e,
2724
+ tabbableNodes: t,
2725
+ focusableNodes: n,
2726
+ posTabIndexesFound: !!t.find(function(e) {
2727
+ return Y(e) > 0;
2728
+ }),
2729
+ firstTabbableNode: r,
2730
+ lastTabbableNode: a,
2731
+ firstDomTabbableNode: o,
2732
+ lastDomTabbableNode: s,
2733
+ nextTabbableNode: function(e) {
2734
+ var r = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0, i = t.indexOf(e);
2735
+ return i < 0 ? r ? n.slice(n.indexOf(e) + 1).find(function(e) {
2736
+ return X(e);
2737
+ }) : n.slice(0, n.indexOf(e)).reverse().find(function(e) {
2738
+ return X(e);
2739
+ }) : t[i + (r ? 1 : -1)];
2740
+ }
2741
+ };
2742
+ }), a.tabbableGroups = a.containerGroups.filter(function(e) {
2743
+ return e.tabbableNodes.length > 0;
2744
+ }), a.tabbableGroups.length <= 0 && !l("fallbackFocus")) throw Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times");
2745
+ if (a.containerGroups.find(function(e) {
2746
+ return e.posTabIndexesFound;
2747
+ }) && a.containerGroups.length > 1) throw Error("At least one node with a positive tabindex was found in one of your focus-trap's multiple containers. Positive tabindexes are only supported in single-container focus-traps.");
2748
+ }, p = function(e) {
2749
+ if (e !== !1 && e !== u(document)) {
2750
+ if (!e || !e.focus) {
2751
+ p(d());
2752
+ return;
2753
+ }
2754
+ e.focus({ preventScroll: !!i.preventScroll }), a.mostRecentlyFocusedNode = e, qr(e) && e.select();
2755
+ }
2756
+ }, m = function(e) {
2757
+ var t = l("setReturnFocus", { params: [e] });
2758
+ return t || (t === !1 ? !1 : e);
2759
+ }, h = function(e) {
2760
+ var t = e.target, n = e.event, r = e.isBackward, o = r === void 0 ? !1 : r;
2761
+ t ||= Qr(n), f();
2762
+ var s = null;
2763
+ if (a.tabbableGroups.length > 0) {
2764
+ var u = c(t, n), d = u >= 0 ? a.containerGroups[u] : void 0;
2765
+ if (u < 0) s = o ? a.tabbableGroups[a.tabbableGroups.length - 1].lastTabbableNode : a.tabbableGroups[0].firstTabbableNode;
2766
+ else if (o) {
2767
+ var p = a.tabbableGroups.findIndex(function(e) {
2768
+ var n = e.firstTabbableNode;
2769
+ return t === n;
2770
+ });
2771
+ if (p < 0 && (d.container === t || Pr(t, i.tabbableOptions) && !X(t, i.tabbableOptions) && !d.nextTabbableNode(t, !1)) && (p = u), p >= 0) {
2772
+ var m = p === 0 ? a.tabbableGroups.length - 1 : p - 1, h = a.tabbableGroups[m];
2773
+ s = Y(t) >= 0 ? h.lastTabbableNode : h.lastDomTabbableNode;
2774
+ } else Q(n) || (s = d.nextTabbableNode(t, !1));
2775
+ } else {
2776
+ var g = a.tabbableGroups.findIndex(function(e) {
2777
+ var n = e.lastTabbableNode;
2778
+ return t === n;
2779
+ });
2780
+ if (g < 0 && (d.container === t || Pr(t, i.tabbableOptions) && !X(t, i.tabbableOptions) && !d.nextTabbableNode(t)) && (g = u), g >= 0) {
2781
+ var _ = g === a.tabbableGroups.length - 1 ? 0 : g + 1, v = a.tabbableGroups[_];
2782
+ s = Y(t) >= 0 ? v.firstTabbableNode : v.firstDomTabbableNode;
2783
+ } else Q(n) || (s = d.nextTabbableNode(t));
2784
+ }
2785
+ } else s = l("fallbackFocus");
2786
+ return s;
2787
+ }, g = function(e) {
2788
+ if (!(c(Qr(e), e) >= 0)) {
2789
+ if ($(i.clickOutsideDeactivates, e)) {
2790
+ o.deactivate({ returnFocus: i.returnFocusOnDeactivate });
2791
+ return;
2792
+ }
2793
+ $(i.allowOutsideClick, e) || e.preventDefault();
2794
+ }
2795
+ }, _ = function(e) {
2796
+ var t = Qr(e), n = c(t, e) >= 0;
2797
+ if (n || t instanceof Document) n && (a.mostRecentlyFocusedNode = t);
2798
+ else {
2799
+ e.stopImmediatePropagation();
2800
+ var r, o = !0;
2801
+ if (a.mostRecentlyFocusedNode) if (Y(a.mostRecentlyFocusedNode) > 0) {
2802
+ var s = c(a.mostRecentlyFocusedNode), l = a.containerGroups[s].tabbableNodes;
2803
+ if (l.length > 0) {
2804
+ var u = l.findIndex(function(e) {
2805
+ return e === a.mostRecentlyFocusedNode;
2806
+ });
2807
+ u >= 0 && (i.isKeyForward(a.recentNavEvent) ? u + 1 < l.length && (r = l[u + 1], o = !1) : u - 1 >= 0 && (r = l[u - 1], o = !1));
2808
+ }
2809
+ } else a.containerGroups.some(function(e) {
2810
+ return e.tabbableNodes.some(function(e) {
2811
+ return Y(e) > 0;
2812
+ });
2813
+ }) || (o = !1);
2814
+ else o = !1;
2815
+ o && (r = h({
2816
+ target: a.mostRecentlyFocusedNode,
2817
+ isBackward: i.isKeyBackward(a.recentNavEvent)
2818
+ })), p(r || a.mostRecentlyFocusedNode || d());
2819
+ }
2820
+ a.recentNavEvent = void 0;
2821
+ }, v = function(e) {
2822
+ var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1;
2823
+ a.recentNavEvent = e;
2824
+ var n = h({
2825
+ event: e,
2826
+ isBackward: t
2827
+ });
2828
+ n && (Q(e) && e.preventDefault(), p(n));
2829
+ }, y = function(e) {
2830
+ (i.isKeyForward(e) || i.isKeyBackward(e)) && v(e, i.isKeyBackward(e));
2831
+ }, b = function(e) {
2832
+ Jr(e) && $(i.escapeDeactivates, e) !== !1 && (e.preventDefault(), o.deactivate());
2833
+ }, x = function(e) {
2834
+ c(Qr(e), e) >= 0 || $(i.clickOutsideDeactivates, e) || $(i.allowOutsideClick, e) || (e.preventDefault(), e.stopImmediatePropagation());
2835
+ }, S = function() {
2836
+ if (a.active) {
2837
+ Z.activateTrap(r, o);
2838
+ var e;
2839
+ return i.delayInitialFocus ? e = new Promise(function(e) {
2840
+ a.delayInitialFocusTimer = Zr(function() {
2841
+ p(d()), e();
2842
+ });
2843
+ }) : p(d()), n.addEventListener("focusin", _, !0), n.addEventListener("mousedown", g, {
2844
+ capture: !0,
2845
+ passive: !1
2846
+ }), n.addEventListener("touchstart", g, {
2847
+ capture: !0,
2848
+ passive: !1
2849
+ }), n.addEventListener("click", x, {
2850
+ capture: !0,
2851
+ passive: !1
2852
+ }), n.addEventListener("keydown", y, {
2853
+ capture: !0,
2854
+ passive: !1
2855
+ }), n.addEventListener("keydown", b), e;
2856
+ }
2857
+ }, C = function(e) {
2858
+ a.active && !a.paused && o._setSubtreeIsolation(!1), a.adjacentElements.clear(), a.alreadySilent.clear();
2859
+ var t = /* @__PURE__ */ new Set(), n = /* @__PURE__ */ new Set(), r = Lr(e), i;
2860
+ try {
2861
+ for (r.s(); !(i = r.n()).done;) {
2862
+ var s = i.value;
2863
+ t.add(s);
2864
+ for (var c = typeof ShadowRoot < "u" && s.getRootNode() instanceof ShadowRoot, l = s; l;) {
2865
+ t.add(l);
2866
+ var u = l.parentElement, d = [];
2867
+ u ? d = u.children : !u && c && (d = l.getRootNode().children, u = l.getRootNode().host, c = typeof ShadowRoot < "u" && u.getRootNode() instanceof ShadowRoot);
2868
+ var f = Lr(d), p;
2869
+ try {
2870
+ for (f.s(); !(p = f.n()).done;) {
2871
+ var m = p.value;
2872
+ n.add(m);
2873
+ }
2874
+ } catch (e) {
2875
+ f.e(e);
2876
+ } finally {
2877
+ f.f();
2878
+ }
2879
+ l = u;
2880
+ }
2881
+ }
2882
+ } catch (e) {
2883
+ r.e(e);
2884
+ } finally {
2885
+ r.f();
2886
+ }
2887
+ t.forEach(function(e) {
2888
+ n.delete(e);
2889
+ }), a.adjacentElements = n;
2890
+ }, w = function() {
2891
+ if (a.active) return n.removeEventListener("focusin", _, !0), n.removeEventListener("mousedown", g, !0), n.removeEventListener("touchstart", g, !0), n.removeEventListener("click", x, !0), n.removeEventListener("keydown", y, !0), n.removeEventListener("keydown", b), o;
2892
+ }, T = typeof window < "u" && "MutationObserver" in window ? new MutationObserver(function(e) {
2893
+ var t = a.mostRecentlyFocusedNode;
2894
+ t && e.some(function(e) {
2895
+ return Array.from(e.removedNodes).some(function(e) {
2896
+ return e === t || typeof e.contains == "function" && e.contains(t);
2897
+ });
2898
+ }) && a.containers.some(function(e) {
2899
+ return e?.isConnected;
2900
+ }) && (f(), p(d()));
2901
+ }) : void 0, E = function() {
2902
+ T && (T.disconnect(), a.active && !a.paused && a.containers.map(function(e) {
2903
+ T.observe(e, {
2904
+ subtree: !0,
2905
+ childList: !0
2906
+ });
2907
+ }));
2908
+ };
2909
+ return o = {
2910
+ get active() {
2911
+ return a.active;
2912
+ },
2913
+ get paused() {
2914
+ return a.paused;
2915
+ },
2916
+ activate: function(e) {
2917
+ if (a.active) return this;
2918
+ var t = s(e, "onActivate"), i = s(e, "onPostActivate"), c = s(e, "checkCanFocusTrap"), l = Z.getActiveTrap(r), d = !1;
2919
+ if (l && !l.paused) {
2920
+ var p;
2921
+ (p = l._setSubtreeIsolation) == null || p.call(l, !1), d = !0;
2922
+ }
2923
+ try {
2924
+ c || f(), a.active = !0, a.paused = !1, a.nodeFocusedBeforeActivation = u(n), t?.({ trap: o });
2925
+ var m = function() {
2926
+ c && f();
2927
+ var e = function() {
2928
+ o._setSubtreeIsolation(!0), E(), i?.({ trap: o });
2929
+ }, t = S();
2930
+ t ? t.then(e) : e();
2931
+ };
2932
+ if (c) return c(a.containers.concat()).then(m, m), this;
2933
+ m();
2934
+ } catch (e) {
2935
+ if (l === Z.getActiveTrap(r) && d) {
2936
+ var h;
2937
+ (h = l._setSubtreeIsolation) == null || h.call(l, !0);
2938
+ }
2939
+ throw e;
2940
+ }
2941
+ return this;
2942
+ },
2943
+ deactivate: function(e) {
2944
+ if (!a.active) return this;
2945
+ var t = Hr({
2946
+ onDeactivate: i.onDeactivate,
2947
+ onPostDeactivate: i.onPostDeactivate,
2948
+ checkCanReturnFocus: i.checkCanReturnFocus
2949
+ }, e);
2950
+ clearTimeout(a.delayInitialFocusTimer), a.delayInitialFocusTimer = void 0, a.paused || o._setSubtreeIsolation(!1), a.alreadySilent.clear(), w(), a.active = !1, a.paused = !1, E(), Z.deactivateTrap(r, o);
2951
+ var n = s(t, "onDeactivate"), c = s(t, "onPostDeactivate"), l = s(t, "checkCanReturnFocus"), u = s(t, "delayReturnFocus"), d = s(t, "returnFocus", "returnFocusOnDeactivate");
2952
+ n?.({ trap: o });
2953
+ var f = function() {
2954
+ d && p(m(a.nodeFocusedBeforeActivation)), c?.({ trap: o });
2955
+ }, h = function() {
2956
+ u && d ? Zr(f) : f();
2957
+ };
2958
+ return d && l ? (l(m(a.nodeFocusedBeforeActivation)).then(h, h), this) : (h(), this);
2959
+ },
2960
+ pause: function(e) {
2961
+ return a.active ? (a.manuallyPaused = !0, this._setPausedState(!0, e)) : this;
2962
+ },
2963
+ unpause: function(e) {
2964
+ return !a.active || (a.manuallyPaused = !1, r[r.length - 1] !== this) ? this : this._setPausedState(!1, e);
2965
+ },
2966
+ updateContainerElements: function(e) {
2967
+ return a.containers = [].concat(e).filter(Boolean).map(function(e) {
2968
+ return typeof e == "string" ? n.querySelector(e) : e;
2969
+ }), i.isolateSubtrees && C(a.containers), a.active && (f(), a.paused || o._setSubtreeIsolation(!0)), E(), this;
2970
+ }
2971
+ }, Object.defineProperties(o, {
2972
+ _isManuallyPaused: { value: function() {
2973
+ return a.manuallyPaused;
2974
+ } },
2975
+ _setPausedState: { value: function(e, t) {
2976
+ if (a.paused === e) return this;
2977
+ if (a.paused = e, e) {
2978
+ var n = s(t, "onPause"), r = s(t, "onPostPause");
2979
+ n?.({ trap: o }), w(), o._setSubtreeIsolation(!1), E(), r?.({ trap: o });
2980
+ } else {
2981
+ var i = s(t, "onUnpause"), c = s(t, "onPostUnpause");
2982
+ i?.({ trap: o }), (function() {
2983
+ f();
2984
+ var e = function() {
2985
+ o._setSubtreeIsolation(!0), E(), c?.({ trap: o });
2986
+ }, t = S();
2987
+ t ? t.then(e) : e();
2988
+ })();
2989
+ }
2990
+ return this;
2991
+ } },
2992
+ _setSubtreeIsolation: { value: function(e) {
2993
+ i.isolateSubtrees && a.adjacentElements.forEach(function(t) {
2994
+ if (e) switch (i.isolateSubtrees) {
2995
+ case "aria-hidden":
2996
+ (t.ariaHidden === "true" || t.getAttribute("aria-hidden")?.toLowerCase() === "true") && a.alreadySilent.add(t), t.setAttribute("aria-hidden", "true");
2997
+ break;
2998
+ default:
2999
+ (t.inert || t.hasAttribute("inert")) && a.alreadySilent.add(t), t.setAttribute("inert", !0);
3000
+ break;
3001
+ }
3002
+ else if (!a.alreadySilent.has(t)) switch (i.isolateSubtrees) {
3003
+ case "aria-hidden":
3004
+ t.removeAttribute("aria-hidden");
3005
+ break;
3006
+ default:
3007
+ t.removeAttribute("inert");
3008
+ break;
3009
+ }
3010
+ });
3011
+ } }
3012
+ }), o.updateContainerElements(e), o;
3013
+ };
3014
+ //#endregion
3015
+ //#region node_modules/@vueuse/integrations/dist/useFocusTrap.js
3016
+ function ti(e, t = {}) {
3017
+ let n, { immediate: i, ...a } = t, o = T(!1), s = T(!1), c = (e) => n && n.activate(e), l = (e) => n && n.deactivate(e);
3018
+ return k(r(() => Ve(ee(e)).map((e) => {
3019
+ let t = ee(e);
3020
+ return typeof t == "string" ? t : Ue(t);
3021
+ }).filter(cr)), (e) => {
3022
+ if (e.length) if (!n) n = ei(e, {
3023
+ ...a,
3024
+ onActivate(e) {
3025
+ o.value = !0, t.onActivate && t.onActivate(e);
3026
+ },
3027
+ onDeactivate(e) {
3028
+ o.value = !1, t.onDeactivate && t.onDeactivate(e);
3029
+ }
3030
+ }), i && c();
3031
+ else {
3032
+ let t = n?.active;
3033
+ n?.updateContainerElements(e), !t && i && c();
3034
+ }
3035
+ }, { flush: "post" }), He(() => l()), {
3036
+ hasFocus: o,
3037
+ isPaused: s,
3038
+ activate: c,
3039
+ deactivate: l,
3040
+ pause: () => {
3041
+ n && (n.pause(), s.value = !0);
3042
+ },
3043
+ unpause: () => {
3044
+ n && (n.unpause(), s.value = !1);
3045
+ }
3046
+ };
3047
+ }
3048
+ //#endregion
3049
+ //#region lib/components/overlays/modal/modal-context.ts
3050
+ var ni = Symbol("ModalContext"), ri = (e) => x(ni, e), ii = () => {
3051
+ let e = d(ni, null);
3052
+ if (!e) throw Error("Modal parts must be used inside <Modal>.");
3053
+ return e;
3054
+ }, ai = j(["relative flex max-h-[calc(100vh-100px)] w-full flex-col overflow-y-auto", "rounded-t-3xl md:rounded-3xl border border-border-subtle bg-bg-raised shadow-xs"].join(" "), {
3055
+ variants: { size: {
3056
+ sm: "md:max-w-sm",
3057
+ md: "md:max-w-md",
3058
+ lg: "md:max-w-lg",
3059
+ xl: "md:max-w-xl",
3060
+ "2xl": "md:max-w-2xl",
3061
+ "3xl": "md:max-w-3xl",
3062
+ "4xl": "md:max-w-4xl",
3063
+ "5xl": "md:max-w-5xl",
3064
+ full: "md:max-w-full h-full rounded-t-none md:rounded-none"
3065
+ } },
3066
+ defaultVariants: { size: "md" }
3067
+ }), oi = ["aria-labelledby", "aria-describedby"], si = /* @__PURE__ */ u({
3068
+ __name: "Modal",
3069
+ props: {
3070
+ modelValue: { type: Boolean },
3071
+ size: { default: "md" },
3072
+ closeOnBackdrop: {
3073
+ type: Boolean,
3074
+ default: !0
3075
+ },
3076
+ persistent: {
3077
+ type: Boolean,
3078
+ default: !1
3079
+ },
3080
+ beforeClose: {},
3081
+ class: { type: [
3082
+ Boolean,
3083
+ null,
3084
+ String,
3085
+ Object,
3086
+ Array
3087
+ ] }
3088
+ },
3089
+ emits: ["update:modelValue", "close"],
3090
+ setup(e, { emit: r }) {
3091
+ let c = e, u = r, d = async (e) => {
3092
+ c.persistent && e !== "close-button" && e !== "programmatic" || e === "backdrop" && !c.closeOnBackdrop || c.beforeClose && !await c.beforeClose(e) || (u("close", e), u("update:modelValue", !1));
3093
+ }, f = () => {
3094
+ d("programmatic");
3095
+ }, p = () => {
3096
+ d("backdrop");
3097
+ };
3098
+ Be("Escape", (e) => {
3099
+ c.modelValue && (e.preventDefault(), d("escape"));
3100
+ });
3101
+ let m = Ge(typeof document < "u" ? document.body : null), g = S(null), { activate: _, deactivate: v } = ti(g, {
3102
+ immediate: !1,
3103
+ escapeDeactivates: !1,
3104
+ allowOutsideClick: !0
3105
+ }), y = S(void 0), x = S(void 0);
3106
+ return ri({
3107
+ attemptClose: (e) => {
3108
+ d(e);
3109
+ },
3110
+ close: f,
3111
+ labelId: y,
3112
+ setLabelId: (e) => {
3113
+ y.value = e;
3114
+ },
3115
+ descriptionId: x,
3116
+ setDescriptionId: (e) => {
3117
+ x.value = e;
3118
+ }
3119
+ }), k(() => c.modelValue, (e) => {
3120
+ m.value = e, e || v();
3121
+ }), (r, u) => (b(), i(t, { to: "body" }, [l(n, {
3122
+ "enter-active-class": "transition-opacity duration-200",
3123
+ "enter-from-class": "opacity-0",
3124
+ "enter-to-class": "opacity-100",
3125
+ "leave-active-class": "transition-opacity duration-200",
3126
+ "leave-from-class": "opacity-100",
3127
+ "leave-to-class": "opacity-0"
3128
+ }, {
3129
+ default: A(() => [e.modelValue ? (b(), o("div", {
3130
+ key: 0,
3131
+ class: "fixed inset-0 z-50 flex items-end justify-center bg-bg-inverse/50 md:items-center",
3132
+ onClick: oe(p, ["self"])
3133
+ }, [l(n, {
3134
+ appear: "",
3135
+ "enter-active-class": "transition-all duration-200",
3136
+ "enter-from-class": "opacity-0 scale-95",
3137
+ "enter-to-class": "opacity-100 scale-100",
3138
+ "leave-active-class": "transition-all duration-200",
3139
+ "leave-from-class": "opacity-100 scale-100",
3140
+ "leave-to-class": "opacity-0 scale-95",
3141
+ onAfterEnter: u[0] ||= () => D(_)()
3142
+ }, {
3143
+ default: A(() => [s("div", {
3144
+ ref_key: "dialogRef",
3145
+ ref: g,
3146
+ class: h(D(F)(D(ai)({ size: e.size }), c.class)),
3147
+ role: "dialog",
3148
+ "aria-modal": "true",
3149
+ "aria-labelledby": y.value,
3150
+ "aria-describedby": x.value
3151
+ }, [C(r.$slots, "default", { close: f })], 10, oi)]),
3152
+ _: 3
3153
+ })])) : a("", !0)]),
3154
+ _: 3
3155
+ })]));
3156
+ }
3157
+ }), ci = /* @__PURE__ */ u({
3158
+ __name: "ModalHeader",
3159
+ props: { class: { type: [
3160
+ Boolean,
3161
+ null,
3162
+ String,
3163
+ Object,
3164
+ Array
3165
+ ] } },
3166
+ setup(e) {
3167
+ let t = e;
3168
+ return (e, n) => (b(), o("div", { class: h(D(F)("relative flex flex-col px-6 pb-2 pr-12 pt-4", t.class)) }, [C(e.$slots, "default")], 2));
3169
+ }
3170
+ }), li = ["id"], ui = /* @__PURE__ */ u({
3171
+ __name: "ModalTitle",
3172
+ props: { class: { type: [
3173
+ Boolean,
3174
+ null,
3175
+ String,
3176
+ Object,
3177
+ Array
3178
+ ] } },
3179
+ setup(e) {
3180
+ let t = e, { setLabelId: n } = ii(), r = O();
3181
+ return v(() => n(r)), y(() => n(void 0)), (e, n) => (b(), o("h2", {
3182
+ id: D(r),
3183
+ class: h(D(F)("text-lg font-medium text-text-primary", t.class))
3184
+ }, [C(e.$slots, "default")], 10, li));
3185
+ }
3186
+ }), di = ["id"], fi = /* @__PURE__ */ u({
3187
+ __name: "ModalDescription",
3188
+ props: { class: { type: [
3189
+ Boolean,
3190
+ null,
3191
+ String,
3192
+ Object,
3193
+ Array
3194
+ ] } },
3195
+ setup(e) {
3196
+ let t = e, { setDescriptionId: n } = ii(), r = O();
3197
+ return v(() => n(r)), y(() => n(void 0)), (e, n) => (b(), o("p", {
3198
+ id: D(r),
3199
+ class: h(D(F)("text-sm text-text-secondary", t.class))
3200
+ }, [C(e.$slots, "default")], 10, di));
3201
+ }
3202
+ }), pi = /* @__PURE__ */ u({
3203
+ __name: "ModalContent",
3204
+ props: { class: { type: [
3205
+ Boolean,
3206
+ null,
3207
+ String,
3208
+ Object,
3209
+ Array
3210
+ ] } },
3211
+ setup(e) {
3212
+ let t = e;
3213
+ return (e, n) => (b(), o("div", { class: h(D(F)("px-6 py-2 text-text-primary", t.class)) }, [C(e.$slots, "default")], 2));
3214
+ }
3215
+ }), mi = /* @__PURE__ */ u({
3216
+ __name: "ModalFooter",
3217
+ props: { class: { type: [
3218
+ Boolean,
3219
+ null,
3220
+ String,
3221
+ Object,
3222
+ Array
3223
+ ] } },
3224
+ setup(e) {
3225
+ let t = e;
3226
+ return (e, n) => (b(), o("div", { class: h(D(F)("flex items-center justify-end gap-3 px-6 pb-4 pt-2", t.class)) }, [C(e.$slots, "default")], 2));
3227
+ }
3228
+ }), hi = /* @__PURE__ */ u({
3229
+ __name: "ModalClose",
3230
+ props: { class: { type: [
3231
+ Boolean,
3232
+ null,
3233
+ String,
3234
+ Object,
3235
+ Array
3236
+ ] } },
3237
+ setup(e) {
3238
+ let t = e, { attemptClose: n } = ii();
3239
+ return (e, r) => (b(), i(Ze, {
3240
+ variant: "icon",
3241
+ size: "icon",
3242
+ "aria-label": "Close",
3243
+ class: h(D(F)("absolute right-4 top-4", t.class)),
3244
+ onClick: r[0] ||= (e) => D(n)("close-button")
3245
+ }, {
3246
+ default: A(() => [C(e.$slots, "default", {}, () => [l(D(ze), { class: "size-5" })])]),
3247
+ _: 3
3248
+ }, 8, ["class"]));
3249
+ }
3250
+ });
3251
+ //#endregion
3252
+ export { Pt as Alert, It as AlertDescription, Ft as AlertTitle, rt as Avatar, $e as Badge, Ze as Button, Mn as Checkbox, Un as Combobox, Kn as ComboboxContent, Jn as ComboboxEmpty, Gn as ComboboxInput, Hn as ComboboxItem, Et as Disclosure, kt as DisclosureContent, Ot as DisclosureTrigger, Fn as Dropdown, Ln as DropdownContent, zn as DropdownItem, In as DropdownTrigger, Lt as Empty, Ut as EmptyContent, Ht as EmptyDescription, Rt as EmptyHeader, Bt as EmptyMedia, Vt as EmptyTitle, rn as Field, dn as FieldContent, cn as FieldDescription, un as FieldError, L as FieldKey, on as FieldLabel, Qn as Input, it as Kbd, ot as KbdGroup, ct as Label, si as Modal, hi as ModalClose, pi as ModalContent, fi as ModalDescription, mi as ModalFooter, ci as ModalHeader, ui as ModalTitle, Cn as MultiSelect, En as MultiSelectContent, Pn as MultiSelectItem, On as MultiSelectSearch, Tn as MultiSelectTrigger, ht as Panel, _t as PanelContent, vt as PanelFooter, gt as PanelHeader, ar as Popover, sr as PopoverContent, or as PopoverTrigger, mt as Progress, hn as Select, vn as SelectContent, mn as SelectItem, xn as SelectSearch, _n as SelectTrigger, dt as Separator, qt as Sidebar, Xt as SidebarContent, Zt as SidebarFooter, $t as SidebarGroup, Yt as SidebarHeader, tn as SidebarItem, Kt as SidebarProvider, Jt as SidebarTrigger, ft as Skeleton, Xe as Spinner, ir as Switch, yt as Tabs, Tt as TabsContent, St as TabsList, wt as TabsPanels, Ct as TabsTrigger, nr as Textarea, Qe as badgeVariants, qe as buttonVariants, F as cn, B as inputVariants, V as popoverVariants, I as useSidebar };