@febkosq8/arc 0.3.0 → 0.7.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 (47) hide show
  1. package/README.md +69 -5
  2. package/components/index.css +319 -114
  3. package/dist/arc.js +1758 -0
  4. package/dist/avatar.d.ts +18 -0
  5. package/dist/button-double-click.d.ts +18 -0
  6. package/dist/button-group.d.ts +8 -0
  7. package/dist/button-long-press.d.ts +20 -0
  8. package/dist/button.d.ts +21 -0
  9. package/dist/card.d.ts +17 -0
  10. package/dist/date-handler.d.ts +13 -0
  11. package/dist/divider.d.ts +2 -0
  12. package/dist/dropdown-multi.d.ts +16 -0
  13. package/dist/dropdown.d.ts +19 -0
  14. package/dist/error-text.d.ts +5 -0
  15. package/dist/grid-loader.d.ts +14 -0
  16. package/dist/hash-navigation.d.ts +34 -0
  17. package/dist/index.d.ts +47 -0
  18. package/dist/input-timestamp.d.ts +7 -0
  19. package/dist/input.d.ts +19 -0
  20. package/dist/label-field.d.ts +9 -0
  21. package/dist/menu.d.ts +29 -0
  22. package/dist/modal.d.ts +15 -0
  23. package/dist/pill-link.d.ts +8 -0
  24. package/dist/pill.d.ts +5 -0
  25. package/dist/preview-card.d.ts +14 -0
  26. package/dist/select.d.ts +18 -0
  27. package/dist/switch.d.ts +10 -0
  28. package/dist/table.d.ts +30 -0
  29. package/dist/tag.d.ts +6 -0
  30. package/dist/text-link.d.ts +6 -0
  31. package/dist/theme-switcher.d.ts +5 -0
  32. package/dist/typing-animation.d.ts +23 -0
  33. package/package.json +51 -35
  34. package/.prettierrc +0 -8
  35. package/components/button.tsx +0 -42
  36. package/components/card.tsx +0 -32
  37. package/components/index.ts +0 -8
  38. package/components/input.tsx +0 -21
  39. package/components/menu.tsx +0 -80
  40. package/components/pill.tsx +0 -20
  41. package/components/switch.tsx +0 -82
  42. package/components/text-area.tsx +0 -21
  43. package/components/theme-switcher.tsx +0 -81
  44. package/eslint.config.mjs +0 -36
  45. package/index.html +0 -11
  46. package/tsconfig.json +0 -27
  47. package/vite.config.ts +0 -37
package/dist/arc.js ADDED
@@ -0,0 +1,1758 @@
1
+ import { cva as e, cx as t } from "@rinzai/zen";
2
+ import { Children as n, Fragment as r, cloneElement as i, isValidElement as a, useEffect as o, useId as s, useMemo as c, useRef as l, useState as u } from "react";
3
+ import { Fragment as d, jsx as f, jsxs as p } from "react/jsx-runtime";
4
+ import { Combobox as m } from "@base-ui/react/combobox";
5
+ import { FaAnglesLeft as h, FaAnglesRight as g, FaArrowDownWideShort as _, FaArrowUpWideShort as v, FaArrowsUpDown as y, FaCheck as b, FaChevronDown as x, FaChevronLeft as S, FaChevronRight as C, FaEye as w, FaEyeSlash as T, FaFilterCircleXmark as E, FaLock as D, FaTableColumns as O } from "react-icons/fa6";
6
+ import { RiInfoCardLine as k } from "react-icons/ri";
7
+ import { Popover as A } from "@base-ui/react/popover";
8
+ import { DateTime as j } from "luxon";
9
+ import { Menu as M } from "@base-ui/react/menu";
10
+ import { FiChevronDown as N, FiChevronRight as P, FiMonitor as F, FiMoon as I, FiSun as L } from "react-icons/fi";
11
+ import { Dialog as R } from "@base-ui/react/dialog";
12
+ import { RxCross1 as z } from "react-icons/rx";
13
+ import { Select as B } from "@base-ui/react/select";
14
+ import { rankItem as ee } from "@tanstack/match-sorter-utils";
15
+ import { columnFilteringFeature as te, columnResizingFeature as ne, columnSizingFeature as re, columnVisibilityFeature as ie, createColumnHelper as ae, createFilteredRowModel as oe, createPaginatedRowModel as se, createSortedRowModel as ce, filterFn_includesString as le, globalFilteringFeature as ue, rowPaginationFeature as de, rowSortingFeature as fe, sortFn_alphanumeric as pe, sortFn_alphanumericCaseSensitive as me, sortFn_basic as he, sortFn_datetime as ge, sortFn_text as _e, sortFn_textCaseSensitive as ve, tableFeatures as ye, useTable as be } from "@tanstack/react-table";
16
+ import { Switch as xe } from "@base-ui/react/switch";
17
+ //#region components/button-group.tsx
18
+ var Se = ({ className: e, orientation: r = "horizontal", selectedVariant: o, children: s, ...c }) => /* @__PURE__ */ f("div", {
19
+ role: "group",
20
+ className: t("arc-button-group inline-flex w-fit gap-0 overflow-hidden rounded-md border border-border", "[&>.arc-button]:rounded-none! [&>.arc-button:not(:first-child)]:border-l [&>.arc-button:not(:first-child)]:border-border", "[&>.arc-double-click-button]:z-1 [&>.arc-double-click-button]:m-0 [&>.arc-double-click-button]:rounded-none! [&>.arc-double-click-button]:p-0", "[&>.arc-double-click-button>.arc-button]:rounded-none! [&>.arc-double-click-button>.arc-double-click-progress-ring]:inset-0 [&>.arc-double-click-button>.arc-double-click-progress-ring]:z-2 [&>.arc-double-click-button>.arc-double-click-progress-ring]:rounded-[inherit]", "[&>.arc-long-press-button]:z-1 [&>.arc-long-press-button]:m-0 [&>.arc-long-press-button]:rounded-none! [&>.arc-long-press-button]:p-0", "[&>.arc-long-press-button>.arc-button]:rounded-none! [&>.arc-long-press-button>.arc-double-click-progress-ring]:inset-0 [&>.arc-long-press-button>.arc-double-click-progress-ring]:z-2 [&>.arc-long-press-button>.arc-double-click-progress-ring]:rounded-[inherit]", r === "vertical" && "flex-col items-stretch [&>.arc-button]:w-full [&>.arc-double-click-button]:w-full [&>.arc-long-press-button]:w-full [&>.arc-button:not(:first-child)]:border-t [&>.arc-button:not(:first-child)]:border-l-0 [&>.arc-double-click-button:not(:first-child)]:border-t [&>.arc-double-click-button:not(:first-child)]:border-l-0 [&>.arc-long-press-button:not(:first-child)]:border-t [&>.arc-long-press-button:not(:first-child)]:border-l-0 [&>.arc-double-click-button:first-child]:rounded-t-md [&>.arc-double-click-button:last-child]:rounded-b-md [&>.arc-long-press-button:first-child]:rounded-t-md [&>.arc-long-press-button:last-child]:rounded-b-md", r === "horizontal" && "[&>.arc-double-click-button:not(:first-child)]:border-l [&>.arc-double-click-button:not(:first-child)]:border-border [&>.arc-long-press-button:not(:first-child)]:border-l [&>.arc-long-press-button:not(:first-child)]:border-border [&>.arc-double-click-button:first-child]:rounded-l-md [&>.arc-double-click-button:last-child]:rounded-r-md [&>.arc-long-press-button:first-child]:rounded-l-md [&>.arc-long-press-button:last-child]:rounded-r-md", e),
21
+ ...c,
22
+ children: n.map(s, (e) => !o || !a(e) ? e : e.props["aria-pressed"] === !0 ? i(e, { variant: o }) : e)
23
+ }), Ce = e("inline-flex items-center justify-center rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 truncate", {
24
+ variants: {
25
+ variant: {
26
+ primary: "bg-primary text-primary-foreground hover:bg-primary/90",
27
+ secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80",
28
+ success: "bg-success text-success-foreground hover:bg-success/90",
29
+ destructive: "bg-destructive text-destructive-foreground hover:bg-destructive/90",
30
+ ghost: "text-foreground hover:bg-accent hover:text-accent-foreground [&>svg]:text-inherit",
31
+ warning: "bg-warning text-warning-foreground hover:bg-warning/90",
32
+ "outline-primary": "border border-primary bg-background text-primary hover:bg-primary hover:text-primary-foreground",
33
+ "outline-secondary": "border border-secondary-foreground bg-background text-secondary-foreground hover:bg-secondary",
34
+ "outline-success": "border border-success bg-background text-success hover:bg-success hover:text-success-foreground",
35
+ "outline-destructive": "border border-destructive bg-background text-destructive hover:bg-destructive hover:text-destructive-foreground",
36
+ "outline-ghost": "border border-transparent bg-background text-foreground hover:bg-accent hover:text-accent-foreground [&>svg]:text-inherit",
37
+ "outline-warning": "border border-warning bg-background text-warning hover:bg-warning hover:text-warning-foreground"
38
+ },
39
+ size: {
40
+ xs: "h-6 rounded-md px-2 text-xs",
41
+ sm: "h-8 pointer-coarse:min-h-10 rounded-md px-3 text-xs",
42
+ md: "h-10 pointer-coarse:min-h-11 px-4 py-2",
43
+ lg: "h-11 rounded-md px-8",
44
+ xl: "h-12 rounded-md px-10",
45
+ "icon-xs": "h-7 w-7",
46
+ "icon-sm": "h-8 w-8",
47
+ "icon-md": "h-10 w-10 pointer-coarse:min-h-11 pointer-coarse:min-w-11",
48
+ "icon-lg": "h-12 w-12",
49
+ "icon-xl": "h-14 w-14"
50
+ }
51
+ },
52
+ defaultVariants: {
53
+ variant: "primary",
54
+ size: "md"
55
+ }
56
+ }), V = Object.assign(({ className: e, variant: n, size: r, ...i }) => /* @__PURE__ */ f("button", {
57
+ className: t("arc-button", Ce({
58
+ variant: n,
59
+ size: r,
60
+ className: e
61
+ })),
62
+ ...i
63
+ }), { Group: Se }), we = ({ doubleClickMsDuration: e = 2e3, feedbackVariant: n = "warning", feedbackContent: r, variant: i = "primary", children: a, onClick: s, onDoubleClick: c, className: d, style: m, ...h }) => {
64
+ let [g, _] = u(!1), [v, y] = u(0), b = l(void 0), x = l(void 0), S = l(0), C = {
65
+ primary: "var(--color-primary)",
66
+ secondary: "var(--color-secondary-foreground)",
67
+ destructive: "var(--color-destructive)",
68
+ warning: "var(--color-warning)"
69
+ }[n ?? "warning"];
70
+ o(() => () => {
71
+ b.current && clearTimeout(b.current), x.current && clearInterval(x.current);
72
+ }, []);
73
+ let w = typeof r == "function" ? r({
74
+ isWaiting: g,
75
+ isActive: !1,
76
+ doubleClickMsDuration: e,
77
+ remainingTime: v,
78
+ variant: i,
79
+ feedbackVariant: n
80
+ }) : r, T = w === void 0 ? a : /* @__PURE__ */ p("span", {
81
+ className: "grid",
82
+ children: [/* @__PURE__ */ f("span", {
83
+ className: t("col-start-1 row-start-1", g ? "invisible" : "visible"),
84
+ "aria-hidden": g,
85
+ children: a
86
+ }), /* @__PURE__ */ f("span", {
87
+ className: t("col-start-1 row-start-1", g ? "visible" : "invisible"),
88
+ "aria-hidden": !g,
89
+ children: w
90
+ })]
91
+ }), E = /* @__PURE__ */ f(V, {
92
+ ...h,
93
+ children: T,
94
+ className: t(d),
95
+ style: { ...m },
96
+ variant: i,
97
+ "data-double-click-state": g ? "waiting" : void 0,
98
+ onClick: (t) => {
99
+ if (g && Date.now() <= S.current) _(!1), y(0), b.current && clearTimeout(b.current), x.current && clearInterval(x.current), c?.(t);
100
+ else {
101
+ let t = Date.now() + e;
102
+ S.current = t, _(!0), y(e), b.current && clearTimeout(b.current), x.current && clearInterval(x.current), x.current = setInterval(() => {
103
+ y(Math.max(0, S.current - Date.now()));
104
+ }, 50), b.current = setTimeout(() => {
105
+ _(!1), y(0), x.current && clearInterval(x.current);
106
+ }, e);
107
+ }
108
+ s?.(t);
109
+ }
110
+ });
111
+ return /* @__PURE__ */ p("span", {
112
+ "aria-label": g ? "Waiting for second click" : void 0,
113
+ className: "arc-double-click-button relative inline-flex",
114
+ "data-double-click-state": g ? "waiting" : void 0,
115
+ children: [E, /* @__PURE__ */ f("span", {
116
+ "aria-hidden": "true",
117
+ className: "arc-double-click-progress-ring pointer-events-none absolute inset-0 rounded-md p-px",
118
+ style: {
119
+ background: g ? `conic-gradient(from 90deg, color-mix(in srgb, ${C} 90%, white) calc(var(--double-click-progress) * 1%), transparent 0)` : "transparent",
120
+ "--double-click-progress": 100,
121
+ "--double-click-timeout": `${e}ms`,
122
+ animation: g ? "double-click-countdown var(--double-click-timeout) linear forwards" : "none"
123
+ }
124
+ })]
125
+ });
126
+ }, Te = ({ longPressMsDuration: e = 2500, onLongPress: n, onClick: r, preventClick: i = !0, feedbackVariant: a = "warning", feedbackContent: s, variant: c = "primary", children: d, ...m }) => {
127
+ let h = l(void 0), g = l(void 0), _ = l(0), v = l(!1), [y, b] = u(!1), [x, S] = u(0), C = () => {
128
+ h.current && clearTimeout(h.current), g.current && clearInterval(g.current), h.current = void 0, g.current = void 0;
129
+ };
130
+ o(() => C, []);
131
+ let w = {
132
+ primary: "var(--color-primary)",
133
+ secondary: "var(--color-secondary-foreground)",
134
+ destructive: "var(--color-destructive)",
135
+ warning: "var(--color-warning)"
136
+ }[a], T = typeof s == "function" ? s({
137
+ isPressing: y,
138
+ isActive: v.current,
139
+ longPressMsDuration: e,
140
+ remainingTime: x,
141
+ variant: c,
142
+ feedbackVariant: a
143
+ }) : s, E = T === void 0 ? d : /* @__PURE__ */ p("span", {
144
+ className: "grid",
145
+ children: [/* @__PURE__ */ f("span", {
146
+ className: t("col-start-1 row-start-1", y ? "invisible" : "visible"),
147
+ "aria-hidden": y,
148
+ children: d
149
+ }), /* @__PURE__ */ f("span", {
150
+ className: t("col-start-1 row-start-1", y ? "visible" : "invisible"),
151
+ "aria-hidden": !y,
152
+ children: T
153
+ })]
154
+ });
155
+ return /* @__PURE__ */ p("span", {
156
+ className: "arc-long-press-button relative inline-flex",
157
+ "data-long-press-state": y ? "pressing" : void 0,
158
+ children: [/* @__PURE__ */ f(V, {
159
+ ...m,
160
+ children: E,
161
+ variant: c,
162
+ className: t(m.className),
163
+ "data-long-press-state": y ? "pressing" : void 0,
164
+ onPointerDown: (t) => {
165
+ m.onPointerDown?.(t), v.current = !1, C();
166
+ let r = Date.now() + e;
167
+ _.current = r, b(!0), S(e), g.current = setInterval(() => {
168
+ S(Math.max(0, _.current - Date.now()));
169
+ }, 50), h.current = setTimeout(() => {
170
+ v.current = !0, b(!1), S(0), C(), n?.(t);
171
+ }, e);
172
+ },
173
+ onPointerUp: (e) => {
174
+ m.onPointerUp?.(e), b(!1), S(0), C();
175
+ },
176
+ onPointerLeave: (e) => {
177
+ m.onPointerLeave?.(e), b(!1), S(0), C();
178
+ },
179
+ onClick: (e) => {
180
+ v.current && i ? (e.preventDefault(), e.stopPropagation(), v.current = !1) : r?.(e);
181
+ }
182
+ }), /* @__PURE__ */ f("span", {
183
+ "aria-hidden": "true",
184
+ className: "arc-double-click-progress-ring pointer-events-none absolute inset-0 rounded-md p-px",
185
+ style: {
186
+ background: y ? `conic-gradient(from 90deg, color-mix(in srgb, ${w} 90%, white) calc(var(--double-click-progress) * 1%), transparent 0)` : "transparent",
187
+ "--double-click-progress": 100,
188
+ "--double-click-timeout": `${e}ms`,
189
+ animation: y ? "double-click-countdown var(--double-click-timeout) linear forwards" : "none"
190
+ }
191
+ })]
192
+ });
193
+ };
194
+ //#endregion
195
+ //#region components/hash-navigation.ts
196
+ function Ee({ intervalMs: e = 500, maxAttempts: t = 20, behavior: n = "smooth", block: r } = {}) {
197
+ if (typeof window > "u") return () => {};
198
+ let i = 0, a = setInterval(() => {
199
+ i += 1;
200
+ let { hash: e } = window.location;
201
+ if (!e || i > t) clearInterval(a);
202
+ else try {
203
+ let t = document.querySelector(e);
204
+ t && (t.scrollIntoView({
205
+ behavior: n,
206
+ block: r
207
+ }), clearInterval(a));
208
+ } catch (t) {
209
+ console.error(`Invalid hash in URL: ${e}`, t), clearInterval(a);
210
+ }
211
+ }, e);
212
+ return () => clearInterval(a);
213
+ }
214
+ function De(e) {
215
+ o(() => Ee(e), []);
216
+ }
217
+ function Oe({ container: e, sectionIds: t, hashFirstSection: n = !0, onActiveChange: r }) {
218
+ let i = t.map((e) => document.getElementById(e)).filter((e) => e !== null), a = window.location.hash.toLowerCase().slice(1) || null, o = () => {
219
+ let t = e.getBoundingClientRect(), o = t.top + t.height / 2, s = i.find((e) => {
220
+ let t = e.getBoundingClientRect();
221
+ return t.top <= o && t.bottom > o;
222
+ }), c = s ? i.indexOf(s) : -1;
223
+ if (r?.(c, i), !s || (a === s.id.toLowerCase() && (a = null), c === 0 && a)) return;
224
+ let l = c === 0 && !n ? "" : `#${s.id}`;
225
+ window.location.hash !== l && (window.history.replaceState(window.history.state, "", `${window.location.pathname}${window.location.search}${l}`), window.dispatchEvent(new HashChangeEvent("hashchange")));
226
+ };
227
+ return o(), e.addEventListener("scroll", o, { passive: !0 }), () => e.removeEventListener("scroll", o);
228
+ }
229
+ //#endregion
230
+ //#region components/avatar.tsx
231
+ var ke = e("arc-avatar inline-flex shrink-0 items-center justify-center overflow-hidden rounded-full bg-muted ring-1 ring-border transition-all", {
232
+ variants: { size: {
233
+ xs: "size-6 text-xs",
234
+ sm: "size-7 text-sm",
235
+ md: "size-8 text-base",
236
+ lg: "size-10 text-lg",
237
+ xl: "size-12 text-xl"
238
+ } },
239
+ defaultVariants: { size: "md" }
240
+ }), Ae = ({ name: e, image: n, size: r, className: i, ...a }) => {
241
+ let [s, l] = u(!1), d = n?.trim(), p = !!d && !s, m = c(() => e?.split(" ", 3)?.map((e) => e[0])?.filter((e) => /[A-Za-z]/.test(e))?.join("") || "U", [e]);
242
+ return o(() => {
243
+ l(!1);
244
+ }, [d]), /* @__PURE__ */ f("span", {
245
+ className: t(ke({
246
+ size: r,
247
+ className: i
248
+ })),
249
+ ...a,
250
+ children: p ? /* @__PURE__ */ f("img", {
251
+ src: d,
252
+ alt: e ?? "User avatar",
253
+ title: e ?? "User",
254
+ className: "h-full w-full object-cover",
255
+ onError: () => l(!0)
256
+ }) : /* @__PURE__ */ f("span", {
257
+ className: "font-medium leading-none text-foreground",
258
+ title: e ?? "User",
259
+ children: m
260
+ })
261
+ });
262
+ }, je = ({ className: e, ...n }) => /* @__PURE__ */ f("div", {
263
+ role: "separator",
264
+ className: t("arc-divider w-full border-b border-border", e),
265
+ ...n
266
+ }), Me = ({ items: e, value: n, onChange: r, className: i, placeholder: a = "Select an option", disabled: o, name: s, preventEmpty: c = !1, "data-name": l, "data-required": u }) => {
267
+ let d = e.find((e) => String(e.key) === String(n)) ?? null;
268
+ return /* @__PURE__ */ f(m.Root, {
269
+ items: e,
270
+ value: d,
271
+ onValueChange: (e) => {
272
+ if (c && e === null) return;
273
+ let t = e !== null && d !== null && String(e.key) === String(d.key);
274
+ r?.(!c && t ? null : e);
275
+ },
276
+ itemToStringLabel: (e) => e?.label ?? "",
277
+ itemToStringValue: (e) => String(e?.key ?? ""),
278
+ isItemEqualToValue: (e, t) => String(e.key) === String(t.key),
279
+ name: s,
280
+ disabled: o,
281
+ children: /* @__PURE__ */ p("div", {
282
+ className: t("arc-dropdown relative", i),
283
+ children: [/* @__PURE__ */ p(m.InputGroup, {
284
+ className: t("relative flex h-8 w-full items-center justify-between gap-5 rounded border border-border bg-background pr-2 text-foreground shadow-xs pointer-coarse:h-9", "focus-within:border-transparent focus-within:outline-hidden focus-within:ring-2 focus-within:ring-ring", "data-disabled:cursor-not-allowed data-disabled:bg-muted data-disabled:text-muted-foreground"),
285
+ children: [/* @__PURE__ */ f(m.Input, {
286
+ className: "h-full grow border-none bg-transparent py-2 pl-3 outline-hidden placeholder:text-muted-foreground focus:ring-0 focus:outline-hidden disabled:cursor-not-allowed",
287
+ placeholder: a,
288
+ "data-name": l,
289
+ "data-required": u,
290
+ "data-disabled": o
291
+ }), /* @__PURE__ */ f(m.Trigger, {
292
+ className: "shrink-0 self-center rounded-md focus:outline-none focus-visible:ring-2 focus-visible:ring-ring",
293
+ "aria-label": "Toggle options",
294
+ children: /* @__PURE__ */ f(x, {
295
+ className: "h-5 w-5 text-foreground",
296
+ "aria-hidden": "true"
297
+ })
298
+ })]
299
+ }), /* @__PURE__ */ f(m.Portal, { children: /* @__PURE__ */ f(m.Positioner, {
300
+ className: "z-50",
301
+ sideOffset: 8,
302
+ children: /* @__PURE__ */ p(m.Popup, {
303
+ className: "max-h-60 min-w-(--anchor-width) overflow-auto rounded-md border border-border bg-popover text-foreground shadow-lg outline-0",
304
+ children: [/* @__PURE__ */ f(m.Empty, {
305
+ className: "relative cursor-default select-none px-4 py-2 text-muted-foreground empty:hidden",
306
+ children: "No values to show."
307
+ }), /* @__PURE__ */ f(m.List, { children: (e) => /* @__PURE__ */ p(m.Item, {
308
+ value: e,
309
+ disabled: e.disabled,
310
+ className: t("relative flex h-8 w-full cursor-default select-none items-center gap-2 border-b border-border px-4 py-1 last:border-b-0", "data-selected:font-medium data-selected:text-primary", "data-highlighted:bg-accent data-highlighted:text-primary", "data-disabled:cursor-not-allowed data-disabled:opacity-50"),
311
+ children: [/* @__PURE__ */ f(m.ItemIndicator, {
312
+ className: "flex items-center",
313
+ children: /* @__PURE__ */ f(b, {
314
+ className: "h-3 w-3",
315
+ "aria-hidden": "true"
316
+ })
317
+ }), /* @__PURE__ */ f("span", {
318
+ title: e.label,
319
+ className: "block truncate",
320
+ children: e.label
321
+ })]
322
+ }, e.key) })]
323
+ })
324
+ }) })]
325
+ })
326
+ });
327
+ }, H = ({ data: e, className: n, ...r }) => {
328
+ let i = Array.isArray(e) ? e.join(", ") : typeof e == "string" ? e : null;
329
+ return /* @__PURE__ */ f("em", {
330
+ role: "alert",
331
+ className: t("arc-error-text animate-pulse whitespace-nowrap text-base font-semibold text-destructive", n),
332
+ title: i ?? void 0,
333
+ ...r,
334
+ children: i
335
+ });
336
+ }, Ne = [
337
+ "(,,> ᴗ <,,)",
338
+ "≽^•⩊•^≼",
339
+ "(╥﹏╥)",
340
+ "(˶ᵔ ᵕ ᵔ˶)",
341
+ "•⩊•",
342
+ "˚₊‧꒰ა ₍ᐢ. ̫.ᐢ₎ ໒꒱ ‧₊˚",
343
+ "٩(ˊᗜˋ )و",
344
+ "(≧◡≦)",
345
+ "⸜(。˃ ᵕ ˂ )⸝♡",
346
+ "(˶˃⤙˂˶)",
347
+ "(˶′◡‵˶)",
348
+ "(^▽^)",
349
+ "˚₊‧꒰ა. .໒꒱ ‧₊˚",
350
+ "( ˶ˆᗜˆ˵ )",
351
+ "⊹ ₊ ⁺‧₊˚ ♡ ପ(๑•ᴗ•๑)ଓ ♡˚₊‧⁺ ₊ ⊹",
352
+ "(つ﹏⊂)",
353
+ "ʕ•̫͡•ʕ•̫͡•ʔ•̫͡•ʔ•̫͡•ʕ•̫͡•ʔ•̫͡ʕ•̫͡•ʕ•̫͡•ʔ•̫͡ʔ•̫͡•",
354
+ "(´・` )♡",
355
+ "(╥_╥)",
356
+ "(♡ˊ͈ ꒳ ˋ͈)",
357
+ "(⸝⸝๑ ̫ ๑⸝⸝⸝)",
358
+ "(˶º⤙º˶)",
359
+ "૮₍。´ᴖ ˔ ᴖ`。₎ა",
360
+ "(•̀ᴗ•́)و ̑̑",
361
+ "(─‿‿─)"
362
+ ];
363
+ function U(e, t, n) {
364
+ let r = Math.sin((e + 1) * 12.9898 + t * 78.233 + n * 37.719) * 43758.5453;
365
+ return r - Math.floor(r);
366
+ }
367
+ var W = [
368
+ "circle",
369
+ "square",
370
+ "diamond",
371
+ "star",
372
+ "heart",
373
+ "hexagon"
374
+ ], Pe = e("arc-grid-loader__cell grid aspect-square w-full place-items-center overflow-hidden text-center leading-none break-all", {
375
+ variants: { shape: {
376
+ circle: "rounded-full",
377
+ square: "rounded-md",
378
+ diamond: "arc-grid-loader__cell--diamond",
379
+ star: "arc-grid-loader__cell--star",
380
+ heart: "arc-grid-loader__cell--heart",
381
+ hexagon: "arc-grid-loader__cell--hexagon"
382
+ } },
383
+ defaultVariants: { shape: "circle" }
384
+ }), Fe = ({ className: e, rows: n = 3, columns: r = 3, size: i = 120, maxSize: a = 24, shape: s = "circle", colors: c = [], label: l = "Loading", symbols: d = Ne, style: p, ...m }) => {
385
+ let [h, g] = u([]), [_, v] = u([]), [y, b] = u([]), [x, S] = u(() => typeof window < "u" && window.matchMedia("(prefers-reduced-motion: reduce)").matches);
386
+ if (o(() => {
387
+ s === "mixed" && v(Array.from({ length: n * r }, () => W[Math.floor(Math.random() * W.length)]));
388
+ }, [
389
+ r,
390
+ n,
391
+ s
392
+ ]), o(() => {
393
+ s === "mixed" && c.length !== 0 && b(Array.from({ length: n * r }, () => Math.floor(Math.random() * c.length)));
394
+ }, [
395
+ r,
396
+ c.length,
397
+ n,
398
+ s
399
+ ]), o(() => {
400
+ let e = window.matchMedia("(prefers-reduced-motion: reduce)"), t = () => S(e.matches);
401
+ return t(), e.addEventListener("change", t), () => e.removeEventListener("change", t);
402
+ }, []), o(() => {
403
+ if (x) return;
404
+ let e = () => {
405
+ let e = Array.from({ length: d.length }, (e, t) => t);
406
+ for (let t = e.length - 1; t > 0; --t) {
407
+ let n = Math.floor(Math.random() * (t + 1));
408
+ [e[t], e[n]] = [e[n], e[t]];
409
+ }
410
+ g(Array.from({ length: n * r }, (t, n) => e[n % e.length]));
411
+ };
412
+ if (e(), d.length < 2) return;
413
+ let t = window.setInterval(() => {
414
+ e();
415
+ }, 900);
416
+ return () => window.clearInterval(t);
417
+ }, [
418
+ r,
419
+ x,
420
+ n,
421
+ d
422
+ ]), !Number.isInteger(n) || n < 1) throw RangeError("GridLoader rows must be a positive integer.");
423
+ if (!Number.isInteger(r) || r < 1) throw RangeError("GridLoader columns must be a positive integer.");
424
+ if (!Number.isFinite(i) || i <= 0) throw RangeError("GridLoader size must be a positive number.");
425
+ if (!Number.isFinite(a) || a <= 0) throw RangeError("GridLoader maxSize must be a positive number.");
426
+ if (d.length === 0) throw RangeError("GridLoader symbols must contain at least one item.");
427
+ return /* @__PURE__ */ f("span", {
428
+ ...m,
429
+ role: "status",
430
+ "aria-live": "polite",
431
+ "aria-label": l,
432
+ className: t("arc-grid-loader inline-flex shrink-0 items-center justify-center align-middle", e),
433
+ style: {
434
+ width: i,
435
+ height: i,
436
+ ...p
437
+ },
438
+ children: /* @__PURE__ */ f("span", {
439
+ "aria-hidden": "true",
440
+ className: "grid h-full w-full place-items-center",
441
+ style: {
442
+ gap: "8%",
443
+ gridTemplateColumns: `repeat(${r}, minmax(0, 1fr))`,
444
+ gridTemplateRows: `repeat(${n}, minmax(0, 1fr))`
445
+ },
446
+ children: Array.from({ length: n * r }, (e, o) => /* @__PURE__ */ f("span", {
447
+ className: t(Pe({ shape: s === "mixed" ? _[o] ?? W[Math.floor(U(o, n, r) * W.length)] : s })),
448
+ onAnimationIteration: () => {
449
+ s === "mixed" && (v((e) => {
450
+ let t = [...e], i = t[o] ?? W[Math.floor(U(o, n, r) * W.length)], a = W.filter((e) => e !== i);
451
+ return t[o] = a[Math.floor(Math.random() * a.length)], t;
452
+ }), c.length > 1 && b((e) => {
453
+ let t = [...e];
454
+ return t[o] = ((t[o] ?? o % c.length) + (1 + Math.floor(Math.random() * (c.length - 1)))) % c.length, t;
455
+ }));
456
+ },
457
+ style: {
458
+ animationDelay: `${-U(o, n, r) * 1200}ms`,
459
+ animationDuration: `${900 + U(o, n, r) * 600}ms`,
460
+ backgroundColor: c.length > 0 ? c[s === "mixed" ? y[o] ?? o % c.length : o % c.length] : void 0,
461
+ fontSize: `${Math.min(i / Math.max(n, r), a) * .3}px`,
462
+ maxWidth: a,
463
+ maxHeight: a
464
+ },
465
+ children: d[h[o] ?? o % d.length]
466
+ }, o))
467
+ })
468
+ });
469
+ }, G = ({ cardContent: e, children: n, trigger: r = "hover", triggerRender: i, side: a = "bottom", align: o = "center", className: s, open: c, onOpenChange: l }) => /* @__PURE__ */ p(A.Root, {
470
+ open: c,
471
+ onOpenChange: l,
472
+ children: [/* @__PURE__ */ f(A.Trigger, {
473
+ nativeButton: !!i,
474
+ openOnHover: r === "hover",
475
+ render: i ?? /* @__PURE__ */ f("span", {}),
476
+ children: n
477
+ }), /* @__PURE__ */ f(A.Portal, { children: /* @__PURE__ */ f(A.Positioner, {
478
+ className: "z-50",
479
+ side: a,
480
+ align: o,
481
+ sideOffset: 8,
482
+ children: /* @__PURE__ */ p(A.Popup, {
483
+ className: t("arc-preview-card relative w-fit max-w-[calc(100vw-1rem)] rounded-md border border-border bg-popover px-2 py-3 text-foreground shadow-lg ring-1 ring-border/60", s),
484
+ children: [/* @__PURE__ */ f(A.Arrow, { className: t("border-border bg-popover h-3 w-3 rotate-45", "data-[side=bottom]:-top-1.5 data-[side=bottom]:border-t data-[side=bottom]:border-l", "data-[side=top]:-bottom-1.5 data-[side=top]:border-r data-[side=top]:border-b", "data-[side=left]:-right-1.5 data-[side=left]:border-t data-[side=left]:border-r", "data-[side=right]:-left-1.5 data-[side=right]:border-b data-[side=right]:border-l") }), e]
485
+ })
486
+ }) })]
487
+ }), Ie = ({ id: e, label: n, help: r, errors: i, className: a, ...o }) => {
488
+ let s = Array.isArray(i) ? i.map((e) => e == null ? "" : String(e)) : typeof i == "string" ? i : null;
489
+ return /* @__PURE__ */ p("div", {
490
+ ...o,
491
+ className: t("flex h-7 w-full items-center justify-start gap-2 overflow-hidden", a),
492
+ children: [
493
+ /* @__PURE__ */ f("label", {
494
+ className: "w-fit text-xl leading-none font-bold whitespace-nowrap",
495
+ title: n,
496
+ htmlFor: e,
497
+ children: n
498
+ }),
499
+ r != null && r !== !1 && /* @__PURE__ */ f(G, {
500
+ trigger: "hover",
501
+ triggerRender: /* @__PURE__ */ f("button", {
502
+ type: "button",
503
+ "aria-label": `Help for ${n}`,
504
+ className: "inline-flex h-5 w-5 shrink-0 items-center justify-center rounded text-muted-foreground transition hover:bg-accent hover:text-primary focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-opacity-75"
505
+ }),
506
+ cardContent: /* @__PURE__ */ f("div", {
507
+ className: "max-w-100 wrap-break-word text-sm leading-5",
508
+ children: r
509
+ }),
510
+ children: /* @__PURE__ */ f(k, {
511
+ className: "h-4 w-4",
512
+ "aria-hidden": "true"
513
+ })
514
+ }),
515
+ s && (Array.isArray(s) ? s.length > 0 && /* @__PURE__ */ f(H, { data: s }) : /* @__PURE__ */ f(H, { data: s }))
516
+ ]
517
+ });
518
+ }, Le = e("arc-input rounded border text-foreground placeholder:text-muted-foreground focus:border-transparent focus:outline-hidden focus:ring-2 focus:ring-ring disabled:cursor-not-allowed disabled:border-muted disabled:bg-muted", {
519
+ variants: {
520
+ variant: {
521
+ default: "border-border bg-background",
522
+ ghost: "border-transparent bg-transparent"
523
+ },
524
+ as: {
525
+ input: "h-8 pointer-coarse:h-9 p-1 pl-2",
526
+ textarea: "min-h-50 max-h-250 resize-y overflow-auto! p-2 whitespace-pre-wrap"
527
+ }
528
+ },
529
+ defaultVariants: {
530
+ variant: "default",
531
+ as: "input"
532
+ }
533
+ }), K = ({ as: e = "input", className: n, variant: r, ...i }) => {
534
+ let a = t(Le({
535
+ as: e,
536
+ variant: r
537
+ }), n);
538
+ return f(e === "textarea" ? "textarea" : "input", {
539
+ ...i,
540
+ autoComplete: "off",
541
+ className: a
542
+ });
543
+ }, Re = e("arc-card group relative rounded-lg border border-foreground/40 bg-card/90 p-3 shadow-xs", {
544
+ variants: { variant: {
545
+ primary: "border-primary bg-primary text-primary-foreground",
546
+ secondary: "border-secondary bg-secondary text-secondary-foreground",
547
+ destructive: "border-destructive bg-destructive text-destructive-foreground",
548
+ warning: "border-warning bg-warning text-warning-foreground",
549
+ "outline-primary": "border-primary bg-background text-primary",
550
+ "outline-secondary": "border-secondary-foreground bg-background text-secondary-foreground",
551
+ "outline-destructive": "border-destructive bg-background text-destructive",
552
+ "outline-warning": "border-warning bg-background text-warning"
553
+ } },
554
+ defaultVariants: { variant: "outline-secondary" }
555
+ }), q = (e) => {
556
+ let { className: n, variant: r, hoverable: i = !0, hoverLift: a = !0, hoverBorder: o = !0, hoverGradient: s = !0, postHeaderBorder: c = !0, preFooterBorder: l = !0, onPointerMove: u, ...d } = e, p = i && a, m = i && o, h = i && s;
557
+ return /* @__PURE__ */ f("div", {
558
+ className: t(Re({ variant: r }), h && "arc-card-cursor-border", c && "[&_.arc-card-header]:border-b", !c && "[&_.arc-card-header]:border-b-0", l && "[&_.arc-card-footer]:border-t", !l && "[&_.arc-card-footer]:border-t-0", (p || m) && "transition-[border-color,transform] duration-300 ease-out", p && "hover:-translate-y-1", m && "hover:border-primary", n),
559
+ onPointerMove: h ? (e) => {
560
+ if (u?.(e), !h) return;
561
+ let t = e.currentTarget.getBoundingClientRect();
562
+ e.currentTarget.style.setProperty("--card-pointer-x", `${e.clientX - t.left}px`), e.currentTarget.style.setProperty("--card-pointer-y", `${e.clientY - t.top}px`);
563
+ } : u,
564
+ ...d
565
+ });
566
+ };
567
+ q.Header = (e) => {
568
+ let { className: n, ...r } = e;
569
+ return /* @__PURE__ */ f("h2", {
570
+ className: t("arc-card-header flex w-full typography-heading-3 flex-col border-foreground/40 px-0 pb-1", n),
571
+ ...r
572
+ });
573
+ }, q.Content = (e) => {
574
+ let { className: n, ...r } = e;
575
+ return /* @__PURE__ */ f("div", {
576
+ className: t("arc-card-content typography-paragraph mt-0! w-full justify-between px-0 py-1 whitespace-pre-wrap", n),
577
+ ...r
578
+ });
579
+ }, q.Footer = (e) => {
580
+ let { className: n, ...r } = e;
581
+ return /* @__PURE__ */ f("div", {
582
+ className: t("arc-card-footer typography-muted mt-auto mb-0 flex w-full items-end justify-start border-foreground/40 px-0 pt-1", n),
583
+ ...r
584
+ });
585
+ };
586
+ //#endregion
587
+ //#region components/date-handler.ts
588
+ var ze = class e {
589
+ static toDateTime(e) {
590
+ if (e == null || e === "") return j.invalid("missing date");
591
+ if (e instanceof Date) return j.fromJSDate(e);
592
+ if (typeof e == "number") return j.fromMillis(e);
593
+ if (typeof e == "bigint") return j.fromMillis(Number(e));
594
+ if (typeof e == "string") {
595
+ let t = e.trim();
596
+ if (t === "") return j.invalid("missing date");
597
+ if (/^-?\d+$/.test(t)) {
598
+ let e = Number(t.length === 10 ? Number(t) * 1e3 : t);
599
+ return j.fromMillis(e);
600
+ }
601
+ return j.fromISO(t);
602
+ }
603
+ return j.fromJSDate(new Date(String(e)));
604
+ }
605
+ static getDateTime(t, n = "dd/MM/yyyy hh:mm:ss a") {
606
+ let r = e.toDateTime(t);
607
+ return r.isValid ? r.toFormat(n) : "";
608
+ }
609
+ static getRelativeTime(t, n) {
610
+ let r = e.toDateTime(t);
611
+ return r.isValid ? r.toRelative(n) ?? "" : "";
612
+ }
613
+ static getTimeDiff(t) {
614
+ let n = e.toDateTime(t);
615
+ if (!n.isValid) return null;
616
+ let r = n.diffNow([
617
+ "years",
618
+ "quarters",
619
+ "months",
620
+ "weeks",
621
+ "days",
622
+ "hours",
623
+ "minutes",
624
+ "seconds"
625
+ ]).toObject(), i = [];
626
+ for (let e of [
627
+ "years",
628
+ "quarters",
629
+ "months",
630
+ "weeks",
631
+ "days",
632
+ "hours",
633
+ "minutes",
634
+ "seconds"
635
+ ]) r[e] && Math.abs(r[e]) >= 1 && i.push(`${Math.abs(Math.floor(r[e]))} ${e}`);
636
+ return i.length > 0 ? i.join(", ") : null;
637
+ }
638
+ static generateOffsetDateTime({ offset: e, future: t = !0, format: n = "dd/MM/yyyy hh:mm:ss a" }) {
639
+ let r = t ? j.now().plus(e) : j.now().minus(e);
640
+ return n ? r.toFormat(n) : r.toISO();
641
+ }
642
+ static getFormattedTime(t, n = "$ISO$ ($RELATIVE$)") {
643
+ let r = e.getDateTime(t), i = e.getRelativeTime(t);
644
+ return n.replace("$ISO$", r).replace("$RELATIVE$", i);
645
+ }
646
+ }, Be = ({ value: e, format: t = "$ISO$ ($RELATIVE$)", ...n }) => {
647
+ let r = c(() => e ? ze.getFormattedTime(e, t) : "", [e, t]);
648
+ return /* @__PURE__ */ f(K, {
649
+ type: "text",
650
+ disabled: !0,
651
+ readOnly: !0,
652
+ value: r,
653
+ size: Math.max(r.length, 1),
654
+ ...n
655
+ });
656
+ }, Ve = e("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2", {
657
+ variants: {
658
+ variant: {
659
+ pill: "arc-pill-link min-w-fit border border-transparent text-base text-muted-foreground transition hover:text-primary hover:outline-none hover:ring-0 focus:outline-none focus-visible:ring-opacity-75",
660
+ primary: "bg-primary text-primary-foreground! hover:bg-primary/90",
661
+ outline: "border border-foreground/40 bg-transparent text-foreground hover:bg-accent hover:text-accent-foreground"
662
+ },
663
+ size: {
664
+ sm: "h-9 px-3",
665
+ md: "h-10 px-4 py-2"
666
+ }
667
+ },
668
+ compoundVariants: [{
669
+ variant: "pill",
670
+ size: "md",
671
+ class: "h-10 pointer-coarse:h-11 px-3 py-2"
672
+ }],
673
+ defaultVariants: {
674
+ variant: "pill",
675
+ size: "md"
676
+ }
677
+ }), He = ({ active: e = !1, className: n, size: r = "md", variant: i = "pill", ...a }) => /* @__PURE__ */ f("a", {
678
+ className: t(Ve({
679
+ variant: i,
680
+ size: r
681
+ }), e && {
682
+ pill: "text-primary!",
683
+ primary: "bg-primary/80 ring-2 ring-ring ring-offset-2",
684
+ outline: "border-primary bg-accent text-primary"
685
+ }[i], n),
686
+ "aria-current": e ? "page" : void 0,
687
+ ...a
688
+ }), J = ({ active: e = !1, className: n, ...r }) => /* @__PURE__ */ f("button", {
689
+ type: "button",
690
+ className: t("arc-pill", "inline-flex h-10 pointer-coarse:h-11 w-full items-center justify-center whitespace-nowrap rounded-md border border-transparent px-3 py-2 text-base font-medium text-foreground transition hover:text-primary hover:outline-none hover:ring-0 focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-opacity-75", e ? "text-primary!" : "text-muted-foreground", n),
691
+ "aria-pressed": e,
692
+ ...r
693
+ }), Ue = ({ children: e }) => n.toArray(e).map((e, t) => /* @__PURE__ */ p(r, { children: [t > 0 && /* @__PURE__ */ f(M.Separator, { className: "mx-2 h-px bg-border" }), e] }, t)), Y = Object.assign(({ className: e, contentClassName: n, active: r, activeClassName: i, buttonText: a, children: o }) => /* @__PURE__ */ p(M.Root, {
694
+ loopFocus: !0,
695
+ children: [/* @__PURE__ */ p(M.Trigger, {
696
+ render: /* @__PURE__ */ f(J, {
697
+ active: r,
698
+ className: t("w-fit", r && i, e)
699
+ }),
700
+ children: [a, /* @__PURE__ */ f(N, {
701
+ className: "-mr-1 ml-2 h-4 w-4",
702
+ "aria-hidden": "true"
703
+ })]
704
+ }), /* @__PURE__ */ f(M.Portal, { children: /* @__PURE__ */ f(M.Positioner, {
705
+ className: "z-50",
706
+ sideOffset: 8,
707
+ collisionPadding: 8,
708
+ children: /* @__PURE__ */ f(M.Popup, {
709
+ className: t("arc-menu-content z-50 flex bg-popover w-fit min-w-40 max-w-[calc(100vw-1rem)] origin-top-right flex-col overflow-hidden rounded-md border border-border text-foreground shadow-lg ring-1 ring-foreground/10 focus:outline-none", n),
710
+ children: /* @__PURE__ */ f(Ue, { children: o })
711
+ })
712
+ }) })]
713
+ }), {
714
+ Item: ({ active: e, asChild: r = !1, className: i, nativeButton: o, children: s, ...c }) => {
715
+ let l = t("flex min-h-10 pointer-coarse:min-h-11 w-full cursor-default items-center justify-start rounded-md border border-transparent px-3 py-2 text-base font-medium text-foreground outline-none select-none", "data-highlighted:bg-accent data-highlighted:text-primary", "focus-visible:ring-0", e && "text-primary!", i);
716
+ if (r) {
717
+ let e = n.only(s);
718
+ if (!a(e)) throw Error("Menu.Item with asChild requires a single React element child.");
719
+ return /* @__PURE__ */ f(M.Item, {
720
+ ...c,
721
+ className: l,
722
+ nativeButton: o ?? !0,
723
+ render: e
724
+ });
725
+ }
726
+ return /* @__PURE__ */ f(M.Item, {
727
+ ...c,
728
+ className: l,
729
+ nativeButton: o,
730
+ children: s
731
+ });
732
+ },
733
+ Sub: ({ active: e, buttonText: r, children: i }) => {
734
+ let o = n.toArray(i).some((e) => a(e) && e.props.active), s = e || o;
735
+ return /* @__PURE__ */ p(M.SubmenuRoot, {
736
+ loopFocus: !0,
737
+ children: [/* @__PURE__ */ p(M.SubmenuTrigger, {
738
+ className: t("arc-pill arc-menu-sub-trigger inline-flex h-10 pointer-coarse:h-11 w-full items-center justify-between whitespace-nowrap rounded-md border border-transparent px-3 py-2 text-base font-medium text-foreground transition focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-opacity-75", "data-highlighted:bg-accent data-highlighted:text-primary", s && "text-primary!"),
739
+ children: [r, /* @__PURE__ */ f(P, {
740
+ className: "-mr-1 ml-2 h-4 w-4",
741
+ "aria-hidden": "true"
742
+ })]
743
+ }), /* @__PURE__ */ f(M.Portal, { children: /* @__PURE__ */ f(M.Positioner, {
744
+ className: "z-50",
745
+ side: "right",
746
+ align: "start",
747
+ sideOffset: 8,
748
+ collisionPadding: 8,
749
+ children: /* @__PURE__ */ f(M.Popup, {
750
+ className: "arc-menu-content z-50 flex bg-popover w-fit min-w-40 max-w-[calc(100vw-1rem)] origin-top-right flex-col overflow-hidden rounded-md border border-border text-foreground shadow-lg ring-1 ring-foreground/10 focus:outline-none",
751
+ children: /* @__PURE__ */ f(Ue, { children: i })
752
+ })
753
+ }) })]
754
+ });
755
+ }
756
+ }), We = ({ open: e = !1, setOpen: n, children: r, initialFocus: i, headerContent: a, footerContent: s, width: c, height: l, className: u, customKeyHandler: d }) => (o(() => {
757
+ if (!e) return;
758
+ let t = (e) => {
759
+ let t = e.key === "Escape" ? "esc" : (e.ctrlKey || e.metaKey) && e.key.toLowerCase() === "s" ? "ctrl+s" : null;
760
+ t && (e.preventDefault(), t === "esc" && n(!1), d?.(t, e));
761
+ };
762
+ return window.addEventListener("keydown", t), () => window.removeEventListener("keydown", t);
763
+ }, [
764
+ e,
765
+ n,
766
+ d
767
+ ]), /* @__PURE__ */ f(R.Root, {
768
+ open: e,
769
+ onOpenChange: n,
770
+ children: /* @__PURE__ */ p(R.Portal, { children: [/* @__PURE__ */ f(R.Backdrop, { className: t("fixed inset-0 z-10 bg-black/80 transition-opacity duration-300", "data-ending-style:opacity-0 data-starting-style:opacity-0") }), /* @__PURE__ */ f(R.Viewport, {
771
+ className: "fixed inset-0 z-10 flex min-h-dvh items-center justify-center p-4",
772
+ children: /* @__PURE__ */ p(R.Popup, {
773
+ initialFocus: i,
774
+ className: t("arc-modal flex max-h-full w-fit max-w-full flex-col overflow-auto rounded-md border border-border bg-card p-6 text-left align-middle text-foreground shadow-xl", "transition-all duration-300", "data-starting-style:scale-95 data-starting-style:opacity-0", "data-ending-style:scale-95 data-ending-style:opacity-0", u),
775
+ style: {
776
+ width: c,
777
+ height: l
778
+ },
779
+ children: [
780
+ /* @__PURE__ */ f(R.Title, {
781
+ className: "mb-4 border-b border-border pb-2 text-lg font-bold leading-6 text-foreground",
782
+ children: a
783
+ }),
784
+ /* @__PURE__ */ f("div", {
785
+ className: "grow",
786
+ children: r
787
+ }),
788
+ s && /* @__PURE__ */ f("div", {
789
+ className: "mt-auto border-t border-border pt-2",
790
+ children: s
791
+ })
792
+ ]
793
+ })
794
+ })] })
795
+ })), Ge = ({ id: e, items: n, value: r, onChange: i, className: a, placeholder: o = "Select options", disabled: s, name: c, preventEmpty: l = !1, "data-name": u, "data-required": d }) => {
796
+ let h = n.filter((e) => r?.includes(String(e.key)));
797
+ return /* @__PURE__ */ f(m.Root, {
798
+ multiple: !0,
799
+ items: n,
800
+ value: h,
801
+ onValueChange: (e) => {
802
+ l && e.length === 0 || i?.(e);
803
+ },
804
+ itemToStringLabel: (e) => e?.label ?? "",
805
+ itemToStringValue: (e) => String(e?.key ?? ""),
806
+ isItemEqualToValue: (e, t) => String(e.key) === String(t.key),
807
+ name: c,
808
+ disabled: s,
809
+ children: /* @__PURE__ */ p("div", {
810
+ className: t("arc-dropdown-multi relative", a),
811
+ children: [/* @__PURE__ */ p(m.InputGroup, {
812
+ className: t("relative flex min-h-8 w-full items-center justify-between gap-1.5 rounded border border-border bg-background py-1 pr-2 pl-2 text-foreground shadow-xs pointer-coarse:min-h-9", "focus-within:border-transparent focus-within:outline-hidden focus-within:ring-2 focus-within:ring-ring", "data-disabled:cursor-not-allowed data-disabled:bg-muted data-disabled:text-muted-foreground"),
813
+ children: [/* @__PURE__ */ f(m.Value, { children: (n) => /* @__PURE__ */ p("div", {
814
+ className: "flex min-w-0 grow flex-wrap items-center gap-1.5",
815
+ children: [/* @__PURE__ */ f(m.Chips, {
816
+ className: "flex flex-wrap gap-1.5",
817
+ children: n.map((e) => /* @__PURE__ */ p(m.Chip, {
818
+ className: "inline-flex items-center gap-1 rounded-md border border-border bg-muted px-2 py-0.5 text-sm text-foreground",
819
+ children: [/* @__PURE__ */ f("span", {
820
+ className: "max-w-32 truncate",
821
+ children: e.label
822
+ }), !s && (!l || n.length > 1) && /* @__PURE__ */ f(m.ChipRemove, {
823
+ className: "ml-0.5 cursor-pointer rounded-md hover:text-destructive focus:outline-none focus-visible:ring-2 focus-visible:ring-ring",
824
+ "aria-label": `Remove ${e.label}`,
825
+ children: /* @__PURE__ */ f(z, {
826
+ className: "h-3 w-3",
827
+ "aria-hidden": "true"
828
+ })
829
+ })]
830
+ }, e.key))
831
+ }), /* @__PURE__ */ f(m.Input, {
832
+ id: e,
833
+ className: t("h-full min-w-20 grow border-none bg-transparent py-0.5 pl-1 outline-hidden placeholder:text-muted-foreground focus:ring-0 focus:outline-hidden disabled:cursor-not-allowed", n.length > 0 && "placeholder-transparent"),
834
+ placeholder: o,
835
+ "data-name": u,
836
+ "data-required": d,
837
+ "data-disabled": s
838
+ })]
839
+ }) }), /* @__PURE__ */ f(m.Trigger, {
840
+ className: "shrink-0 self-center rounded-md focus:outline-none focus-visible:ring-2 focus-visible:ring-ring",
841
+ "aria-label": "Toggle options",
842
+ children: /* @__PURE__ */ f(x, {
843
+ className: "h-5 w-5 text-foreground",
844
+ "aria-hidden": "true"
845
+ })
846
+ })]
847
+ }), /* @__PURE__ */ f(m.Portal, { children: /* @__PURE__ */ f(m.Positioner, {
848
+ className: "z-50",
849
+ sideOffset: 8,
850
+ children: /* @__PURE__ */ p(m.Popup, {
851
+ className: "max-h-60 min-w-(--anchor-width) overflow-auto rounded-md border border-border bg-popover text-foreground shadow-lg outline-0",
852
+ children: [/* @__PURE__ */ f(m.Empty, {
853
+ className: "relative cursor-default select-none px-4 py-2 text-muted-foreground empty:hidden",
854
+ children: "No values to show."
855
+ }), /* @__PURE__ */ f(m.List, { children: (e) => /* @__PURE__ */ p(m.Item, {
856
+ value: e,
857
+ disabled: e.disabled,
858
+ className: t("relative flex h-8 w-full cursor-default select-none items-center gap-2 border-b border-border px-4 py-1 last:border-b-0", "data-selected:font-medium data-selected:text-primary", "data-highlighted:bg-accent data-highlighted:text-primary", "data-disabled:cursor-not-allowed data-disabled:opacity-50"),
859
+ children: [/* @__PURE__ */ f(m.ItemIndicator, {
860
+ className: "flex items-center",
861
+ children: /* @__PURE__ */ f(b, {
862
+ className: "h-3 w-3",
863
+ "aria-hidden": "true"
864
+ })
865
+ }), /* @__PURE__ */ f("span", {
866
+ title: e.label,
867
+ className: "block truncate",
868
+ children: e.label
869
+ })]
870
+ }, e.key) })]
871
+ })
872
+ }) })]
873
+ })
874
+ });
875
+ }, X = ({ id: e, value: n, onChange: r, data: i, className: a, disabled: o, placeholder: s, ...c }) => /* @__PURE__ */ p(B.Root, {
876
+ value: n,
877
+ onValueChange: (e) => {
878
+ e !== null && r(e);
879
+ },
880
+ disabled: o,
881
+ items: i.map((e) => ({
882
+ value: e.key,
883
+ label: typeof e.label == "string" ? e.label : e.key
884
+ })),
885
+ ...c,
886
+ children: [/* @__PURE__ */ p(B.Trigger, {
887
+ id: e,
888
+ className: t("arc-select flex h-8 w-full items-center gap-2 overflow-hidden rounded border border-border bg-background px-2 py-1 text-foreground shadow-xs focus:outline-none focus-visible:ring-2 focus-visible:ring-ring pointer-coarse:h-9", "disabled:cursor-not-allowed disabled:bg-muted disabled:text-muted-foreground", a),
889
+ children: [/* @__PURE__ */ f(B.Value, {
890
+ placeholder: s,
891
+ className: "min-w-0 flex-1 truncate text-left"
892
+ }), /* @__PURE__ */ f(B.Icon, {
893
+ className: "shrink-0",
894
+ children: /* @__PURE__ */ f(x, {
895
+ className: "h-3.5 w-3.5 text-muted-foreground",
896
+ "aria-hidden": "true"
897
+ })
898
+ })]
899
+ }), /* @__PURE__ */ f(B.Portal, { children: /* @__PURE__ */ f(B.Positioner, {
900
+ className: "z-50 outline-none",
901
+ sideOffset: 8,
902
+ alignItemWithTrigger: !1,
903
+ side: "bottom",
904
+ align: "start",
905
+ children: /* @__PURE__ */ f(B.Popup, {
906
+ className: "min-w-(--anchor-width) overflow-hidden rounded-md border border-border bg-popover text-foreground shadow-lg outline-none",
907
+ children: /* @__PURE__ */ f(B.List, {
908
+ className: "max-h-60 overflow-auto outline-none",
909
+ children: i.map((e) => /* @__PURE__ */ p(B.Item, {
910
+ value: e.key,
911
+ disabled: e.disabled ?? !1,
912
+ className: t("relative flex w-full cursor-default select-none items-center gap-2 px-2 py-1 outline-none", "data-highlighted:bg-accent data-highlighted:text-primary", "data-selected:font-medium data-selected:text-primary", "data-disabled:cursor-not-allowed data-disabled:opacity-50"),
913
+ children: [/* @__PURE__ */ f(B.ItemIndicator, {
914
+ className: "flex items-center",
915
+ children: /* @__PURE__ */ f(b, {
916
+ className: "h-3 w-3",
917
+ "aria-hidden": "true"
918
+ })
919
+ }), /* @__PURE__ */ f(B.ItemText, {
920
+ className: "block truncate",
921
+ children: e.label
922
+ })]
923
+ }, e.key))
924
+ })
925
+ })
926
+ }) })]
927
+ }), Ke = e("arc-tag inline-flex w-fit items-center rounded-full border border-transparent px-1.5 py-0.5 text-xs font-bold", {
928
+ variants: { variant: {
929
+ primary: "bg-primary text-primary-foreground",
930
+ secondary: "border-border bg-secondary text-secondary-foreground",
931
+ success: "bg-success text-success-foreground",
932
+ warning: "bg-warning text-warning-foreground",
933
+ destructive: "bg-destructive text-destructive-foreground",
934
+ outline: "border-border bg-transparent text-foreground"
935
+ } },
936
+ defaultVariants: { variant: "primary" }
937
+ }), qe = ({ className: e, variant: n, ...r }) => /* @__PURE__ */ f("div", {
938
+ className: t(Ke({
939
+ variant: n,
940
+ className: e
941
+ })),
942
+ ...r
943
+ }), Je = (e, t, n, r) => {
944
+ let i = e.getValue(t), a = ee(i, n);
945
+ return r({ itemRank: a }), a.passed;
946
+ }, Z = {
947
+ fuzzy: Je,
948
+ includesString: le,
949
+ select: (e, t, n) => {
950
+ let r = e.getValue(t);
951
+ return Array.isArray(r) ? r.some((e) => String(e) === String(n)) : typeof r == "string" && r.includes(",") ? r.split(",").map((e) => e.trim()).includes(String(n)) : String(r) === String(n);
952
+ }
953
+ }, Ye = ye({
954
+ columnMeta: {},
955
+ columnFilteringFeature: te,
956
+ columnResizingFeature: ne,
957
+ columnSizingFeature: re,
958
+ columnVisibilityFeature: ie,
959
+ globalFilteringFeature: ue,
960
+ rowPaginationFeature: de,
961
+ rowSortingFeature: fe,
962
+ filteredRowModel: oe(),
963
+ paginatedRowModel: se(),
964
+ sortedRowModel: ce(),
965
+ sortFns: {
966
+ alphanumeric: pe,
967
+ alphanumericCaseSensitive: me,
968
+ basic: he,
969
+ datetime: ge,
970
+ text: _e,
971
+ textCaseSensitive: ve
972
+ },
973
+ filterFns: Z
974
+ });
975
+ function Xe(e) {
976
+ return Object.prototype.hasOwnProperty.call(Z, e);
977
+ }
978
+ function Ze(e, t) {
979
+ if (e !== !1) {
980
+ if (e === void 0) return t ? "select" : void 0;
981
+ if (typeof e == "function" || e === "auto" || Xe(e)) return e;
982
+ throw Error(`Unsupported table filterFn "${e}". Use "auto" or one of: ${Object.keys(Z).join(", ")}.`);
983
+ }
984
+ }
985
+ var Qe = ae(), $e = ({ data: e, columnDef: n, pageSize: r = 10, className: i, showHeader: a = !0, showFilters: o = !0, showSorting: l = !0 }) => {
986
+ let d = s(), [m, b] = u({
987
+ pageIndex: 0,
988
+ pageSize: r
989
+ }), [x, w] = u([]), [T, D] = u(""), [O, k] = u([]), [A, j] = u({}), M = x.length > 0 || T !== "", N = c(() => n?.map((e) => Qe.accessor(e.accessorKey, {
990
+ id: e.id,
991
+ enableResizing: e.enableResizing,
992
+ enableColumnFilter: e.filterFn !== !1 && e.enableColumnFilter,
993
+ enableSorting: e.enableSorting,
994
+ enableHiding: e.enableHiding ?? !0,
995
+ size: e.size,
996
+ minSize: e.minSize ?? 50,
997
+ maxSize: e.maxSize ?? 1e3,
998
+ filterFn: Ze(e.filterFn, e.filterSelectOptions),
999
+ meta: {
1000
+ headerLabel: e.header,
1001
+ filterSelectOptions: e.filterSelectOptions,
1002
+ mobileFullWidth: e.mobileFullWidth
1003
+ },
1004
+ header: (n) => {
1005
+ let r = n.column.getIsSorted(), i = n.column.getCanSort();
1006
+ return /* @__PURE__ */ f("div", {
1007
+ className: "flex flex-col gap-1.5",
1008
+ children: /* @__PURE__ */ p("div", {
1009
+ className: t("flex items-center gap-1.5", l && i && "cursor-pointer select-none"),
1010
+ onClick: l && i ? n.column.getToggleSortingHandler() : void 0,
1011
+ children: [/* @__PURE__ */ f("span", {
1012
+ className: "min-w-0 truncate text-sm font-semibold tracking-wide",
1013
+ children: e.header
1014
+ }), l && i && /* @__PURE__ */ p("span", {
1015
+ className: "text-muted-foreground ml-auto shrink-0 text-xs",
1016
+ children: [
1017
+ r === "asc" && /* @__PURE__ */ f(v, { className: "text-primary h-3.5 w-3.5" }),
1018
+ r === "desc" && /* @__PURE__ */ f(_, { className: "text-primary h-3.5 w-3.5" }),
1019
+ r === !1 && /* @__PURE__ */ f(y, { className: "h-3 w-3 opacity-60" })
1020
+ ]
1021
+ })]
1022
+ })
1023
+ });
1024
+ },
1025
+ cell: e.cell ?? ((e) => e.getValue())
1026
+ })), [n]), P = be({
1027
+ data: e,
1028
+ columns: N,
1029
+ state: {
1030
+ columnFilters: x,
1031
+ globalFilter: T,
1032
+ sorting: O,
1033
+ pagination: m,
1034
+ columnVisibility: A
1035
+ },
1036
+ enableColumnResizing: !0,
1037
+ columnResizeMode: "onChange",
1038
+ onColumnVisibilityChange: j,
1039
+ onSortingChange: k,
1040
+ onColumnFiltersChange: w,
1041
+ onGlobalFilterChange: D,
1042
+ globalFilterFn: Je,
1043
+ features: Ye,
1044
+ defaultColumn: {
1045
+ size: 200,
1046
+ minSize: 50,
1047
+ maxSize: 1e3
1048
+ }
1049
+ }), F = P.getFilteredRowModel().rows.length, I = P.getVisibleLeafColumns(), L = o && I.some((e) => e.getCanFilter()), R = l && I.some((e) => e.getCanSort()), z = (e) => n.find((t) => (t.id ?? t.accessorKey) === e)?.header ?? e;
1050
+ return /* @__PURE__ */ p("div", {
1051
+ className: t("flex w-full min-w-0 flex-col", i),
1052
+ children: [
1053
+ a && /* @__PURE__ */ p("div", {
1054
+ className: "border-muted-foreground bg-card relative z-10 flex flex-col gap-3 rounded-t-lg border p-3 md:flex-row md:items-center md:gap-4",
1055
+ children: [
1056
+ /* @__PURE__ */ p("div", {
1057
+ className: "flex items-center gap-2",
1058
+ children: [/* @__PURE__ */ p(V, {
1059
+ variant: "outline-secondary",
1060
+ size: "sm",
1061
+ disabled: !M && O.length === 0,
1062
+ onClick: () => {
1063
+ w([]), D(""), k([]);
1064
+ },
1065
+ title: "Clear filters and sorting",
1066
+ type: "button",
1067
+ children: [/* @__PURE__ */ f(E, { className: "mr-1.5 h-3 w-3" }), "Clear filters and sorting"]
1068
+ }), /* @__PURE__ */ f(nt, { table: P })]
1069
+ }),
1070
+ /* @__PURE__ */ p("nav", {
1071
+ "aria-label": "Table pagination",
1072
+ className: "flex w-full items-center justify-between gap-1 md:flex-1 md:justify-center",
1073
+ children: [
1074
+ /* @__PURE__ */ p("div", {
1075
+ className: "flex items-center gap-1",
1076
+ children: [/* @__PURE__ */ f(V, {
1077
+ variant: "outline-secondary",
1078
+ size: "icon-md",
1079
+ className: "h-10 w-10 sm:h-8 sm:w-8",
1080
+ onClick: () => b((e) => ({
1081
+ ...e,
1082
+ pageIndex: 0
1083
+ })),
1084
+ disabled: !P.getCanPreviousPage(),
1085
+ title: "First page",
1086
+ "aria-label": "First page",
1087
+ type: "button",
1088
+ children: /* @__PURE__ */ f(h, {
1089
+ "aria-hidden": "true",
1090
+ className: "h-3.5 w-3.5"
1091
+ })
1092
+ }), /* @__PURE__ */ f(V, {
1093
+ variant: "outline-secondary",
1094
+ size: "icon-md",
1095
+ className: "h-10 w-10 sm:h-8 sm:w-8",
1096
+ onClick: () => b((e) => ({
1097
+ ...e,
1098
+ pageIndex: e.pageIndex - 1
1099
+ })),
1100
+ disabled: !P.getCanPreviousPage(),
1101
+ title: "Previous page",
1102
+ "aria-label": "Previous page",
1103
+ type: "button",
1104
+ children: /* @__PURE__ */ f(S, {
1105
+ "aria-hidden": "true",
1106
+ className: "h-3.5 w-3.5"
1107
+ })
1108
+ })]
1109
+ }),
1110
+ /* @__PURE__ */ f("span", {
1111
+ "aria-hidden": "true",
1112
+ className: "text-muted-foreground px-1",
1113
+ children: "·"
1114
+ }),
1115
+ /* @__PURE__ */ p("span", {
1116
+ className: "text-center text-xs font-medium",
1117
+ children: [/* @__PURE__ */ f("span", {
1118
+ className: "text-foreground",
1119
+ children: F > 0 ? `${F} ${F === 1 ? "row" : "rows"}` : "No rows"
1120
+ }), F > 0 && /* @__PURE__ */ p("span", {
1121
+ className: "text-muted-foreground block",
1122
+ children: [
1123
+ "Page ",
1124
+ P.state.pagination.pageIndex + 1,
1125
+ " of ",
1126
+ P.getPageCount(),
1127
+ M && " · filtered"
1128
+ ]
1129
+ })]
1130
+ }),
1131
+ /* @__PURE__ */ f("span", {
1132
+ "aria-hidden": "true",
1133
+ className: "text-muted-foreground px-1",
1134
+ children: "·"
1135
+ }),
1136
+ /* @__PURE__ */ p("div", {
1137
+ className: "flex items-center gap-1",
1138
+ children: [/* @__PURE__ */ f(V, {
1139
+ variant: "outline-secondary",
1140
+ size: "icon-md",
1141
+ className: "h-10 w-10 sm:h-8 sm:w-8",
1142
+ onClick: () => b((e) => ({
1143
+ ...e,
1144
+ pageIndex: e.pageIndex + 1
1145
+ })),
1146
+ disabled: !P.getCanNextPage(),
1147
+ title: "Next page",
1148
+ "aria-label": "Next page",
1149
+ type: "button",
1150
+ children: /* @__PURE__ */ f(C, {
1151
+ "aria-hidden": "true",
1152
+ className: "h-3.5 w-3.5"
1153
+ })
1154
+ }), /* @__PURE__ */ f(V, {
1155
+ variant: "outline-secondary",
1156
+ size: "icon-md",
1157
+ className: "h-10 w-10 sm:h-8 sm:w-8",
1158
+ onClick: () => b((e) => ({
1159
+ ...e,
1160
+ pageIndex: P.getPageCount() - 1
1161
+ })),
1162
+ disabled: !P.getCanNextPage(),
1163
+ title: "Last page",
1164
+ "aria-label": "Last page",
1165
+ type: "button",
1166
+ children: /* @__PURE__ */ f(g, {
1167
+ "aria-hidden": "true",
1168
+ className: "h-3.5 w-3.5"
1169
+ })
1170
+ })]
1171
+ })
1172
+ ]
1173
+ }),
1174
+ /* @__PURE__ */ p("label", {
1175
+ htmlFor: `${d}-page-size`,
1176
+ className: "text-muted-foreground flex w-full items-center justify-between gap-2 text-xs md:w-auto",
1177
+ children: ["Rows per page", /* @__PURE__ */ f(X, {
1178
+ id: `${d}-page-size`,
1179
+ value: P.state.pagination.pageSize.toString(),
1180
+ onChange: (e) => {
1181
+ b({
1182
+ ...m,
1183
+ pageSize: Number(e)
1184
+ });
1185
+ },
1186
+ className: "w-16",
1187
+ data: [
1188
+ 10,
1189
+ 20,
1190
+ 30,
1191
+ 40,
1192
+ 50
1193
+ ].map((e) => ({
1194
+ key: e.toString(),
1195
+ label: e.toString()
1196
+ }))
1197
+ })]
1198
+ })
1199
+ ]
1200
+ }),
1201
+ (L || R) && /* @__PURE__ */ p("details", {
1202
+ className: "border-muted-foreground border-x border-b px-3 py-2",
1203
+ children: [/* @__PURE__ */ f("summary", {
1204
+ className: "cursor-pointer text-sm font-medium",
1205
+ children: L && R ? "Filters and sorting" : L ? "Filters" : "Sorting"
1206
+ }), /* @__PURE__ */ p("div", {
1207
+ className: "grid gap-3 pt-3 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4",
1208
+ children: [R && /* @__PURE__ */ p("div", {
1209
+ className: "flex min-w-0 items-end gap-2",
1210
+ children: [/* @__PURE__ */ p("div", {
1211
+ className: "min-w-0 flex-1",
1212
+ children: [/* @__PURE__ */ f("label", {
1213
+ htmlFor: `${d}-sort`,
1214
+ className: "text-muted-foreground mb-1 block text-xs font-medium",
1215
+ children: "Sort by"
1216
+ }), /* @__PURE__ */ f(X, {
1217
+ id: `${d}-sort`,
1218
+ value: O[0]?.id ?? "__none__",
1219
+ onChange: (e) => {
1220
+ k((t) => e === "__none__" ? [] : [{
1221
+ id: e,
1222
+ desc: t.find((t) => t.id === e)?.desc ?? !1
1223
+ }]);
1224
+ },
1225
+ data: [{
1226
+ key: "__none__",
1227
+ label: "No sorting"
1228
+ }, ...P.getVisibleLeafColumns().filter((e) => e.getCanSort()).map((e) => ({
1229
+ key: e.id,
1230
+ label: e.columnDef.meta?.headerLabel ?? e.id
1231
+ }))]
1232
+ })]
1233
+ }), /* @__PURE__ */ f(V, {
1234
+ variant: "outline-secondary",
1235
+ size: "icon-sm",
1236
+ disabled: O.length === 0,
1237
+ title: O[0]?.desc ? "Sort ascending" : "Sort descending",
1238
+ "aria-label": O[0]?.desc ? "Sort ascending" : "Sort descending",
1239
+ onClick: () => k((e) => e.map((e, t) => t === 0 ? {
1240
+ ...e,
1241
+ desc: !e.desc
1242
+ } : e)),
1243
+ type: "button",
1244
+ children: O[0]?.desc ? /* @__PURE__ */ f(_, {
1245
+ "aria-hidden": "true",
1246
+ className: "h-3.5 w-3.5"
1247
+ }) : /* @__PURE__ */ f(v, {
1248
+ "aria-hidden": "true",
1249
+ className: "h-3.5 w-3.5"
1250
+ })
1251
+ })]
1252
+ }), L && I.filter((e) => e.getCanFilter()).map((e) => {
1253
+ let t = e.columnDef.meta?.headerLabel ?? e.id, n = `${d}-${e.id}-filter`;
1254
+ return /* @__PURE__ */ p("div", {
1255
+ className: "min-w-0",
1256
+ children: [/* @__PURE__ */ f("label", {
1257
+ htmlFor: n,
1258
+ className: "text-muted-foreground mb-1 block text-xs font-medium",
1259
+ children: t
1260
+ }), /* @__PURE__ */ f(tt, {
1261
+ column: e,
1262
+ idPrefix: `${d}-`
1263
+ })]
1264
+ }, e.id);
1265
+ })]
1266
+ })]
1267
+ }),
1268
+ /* @__PURE__ */ p("div", {
1269
+ className: t("border-muted-foreground w-full min-w-0 overflow-hidden border-x border-b last:rounded-b-lg", !a && "rounded-t-lg border-t"),
1270
+ children: [/* @__PURE__ */ f("div", {
1271
+ className: "hidden w-full min-w-0 overflow-x-auto md:block",
1272
+ children: /* @__PURE__ */ p("table", {
1273
+ className: "w-full table-fixed border-collapse",
1274
+ style: { minWidth: P.getVisibleLeafColumns().reduce((e, t) => e + t.getSize(), 0) },
1275
+ children: [/* @__PURE__ */ f("thead", { children: P.getHeaderGroups().map((e) => /* @__PURE__ */ f("tr", {
1276
+ className: "bg-muted/50",
1277
+ children: e.headers.map((e) => /* @__PURE__ */ p("th", {
1278
+ className: "border-border relative border-r border-b px-3 py-2.5 text-left last:border-r-0",
1279
+ style: { width: e.getSize() },
1280
+ colSpan: e.colSpan,
1281
+ children: [e.isPlaceholder ? null : /* @__PURE__ */ f(P.FlexRender, { header: e }), /* @__PURE__ */ f("div", {
1282
+ onDoubleClick: () => e.column.resetSize(),
1283
+ onMouseDown: e.getResizeHandler(),
1284
+ onTouchStart: e.getResizeHandler(),
1285
+ className: t("absolute top-0 right-0 h-full w-1 cursor-col-resize", "hover:bg-primary/50 active:bg-primary", e.column.getIsResizing() && "bg-primary"),
1286
+ children: e.column.getIsResizing() && /* @__PURE__ */ p("span", {
1287
+ className: "bg-primary text-primary-foreground pointer-events-none absolute top-1/2 right-2 -translate-y-1/2 rounded px-1.5 py-0.5 text-[10px] font-medium whitespace-nowrap shadow",
1288
+ children: [Math.round(e.getSize()), "px"]
1289
+ })
1290
+ })]
1291
+ }, e.id))
1292
+ }, e.id)) }), /* @__PURE__ */ p("tbody", { children: [P.getRowModel().rows.length === 0 && /* @__PURE__ */ f("tr", { children: /* @__PURE__ */ f("td", {
1293
+ colSpan: N.length,
1294
+ className: "text-muted-foreground px-3 py-4 text-center text-sm",
1295
+ children: "No results found."
1296
+ }) }), P.getRowModel().rows.map((e, n) => /* @__PURE__ */ f("tr", {
1297
+ className: t("h-8 transition-colors", "hover:bg-accent/50", n % 2 == 1 && "bg-muted/20", n < P.getRowModel().rows.length - 1 && "border-border border-b"),
1298
+ children: e.getVisibleCells().map((e) => /* @__PURE__ */ f("td", {
1299
+ className: "border-border max-w-0 truncate border-r px-2 text-sm last:border-r-0",
1300
+ children: /* @__PURE__ */ f(P.FlexRender, { cell: e })
1301
+ }, e.id))
1302
+ }, e.id))] })]
1303
+ })
1304
+ }), /* @__PURE__ */ f("div", {
1305
+ className: "flex flex-col gap-3 p-3 md:hidden",
1306
+ children: P.getRowModel().rows.length === 0 ? /* @__PURE__ */ f("div", {
1307
+ className: "text-muted-foreground px-3 py-4 text-center text-sm",
1308
+ children: "No results found."
1309
+ }) : P.getRowModel().rows.map((e, n) => /* @__PURE__ */ f("article", {
1310
+ className: t("border-border bg-background min-w-0 rounded-md border p-4", n % 2 == 1 && "bg-muted/20"),
1311
+ children: /* @__PURE__ */ f("dl", {
1312
+ className: "flex min-w-0 flex-col gap-2",
1313
+ children: e.getVisibleCells().map((e, n) => /* @__PURE__ */ p("div", {
1314
+ className: t("border-border min-w-0 border-b pb-2 last:border-b-0 last:pb-0", n === 0 || e.column.columnDef.meta?.mobileFullWidth ? "flex flex-col gap-1" : "grid grid-cols-[minmax(5rem,1fr)_minmax(0,2fr)] items-start gap-2"),
1315
+ children: [/* @__PURE__ */ f("dt", {
1316
+ className: "text-muted-foreground shrink-0 text-xs font-medium",
1317
+ children: z(e.column.id)
1318
+ }), /* @__PURE__ */ f("dd", {
1319
+ className: t("max-w-full min-w-0 overflow-hidden text-sm break-all *:max-w-full", n === 0 && "font-medium", e.column.columnDef.meta?.mobileFullWidth && "w-full"),
1320
+ children: /* @__PURE__ */ f(P.FlexRender, { cell: e })
1321
+ })]
1322
+ }, e.id))
1323
+ })
1324
+ }, e.id))
1325
+ })]
1326
+ })
1327
+ ]
1328
+ });
1329
+ };
1330
+ function et({ value: e, onChange: t, debounce: n = 500, ...r }) {
1331
+ let [i, a] = u(e);
1332
+ return o(() => {
1333
+ a(e);
1334
+ }, [e]), o(() => {
1335
+ let e = setTimeout(() => {
1336
+ t(i);
1337
+ }, n);
1338
+ return () => clearTimeout(e);
1339
+ }, [
1340
+ i,
1341
+ n,
1342
+ t
1343
+ ]), /* @__PURE__ */ f(K, {
1344
+ ...r,
1345
+ value: i,
1346
+ onChange: (e) => a(e.target.value),
1347
+ autoComplete: "off"
1348
+ });
1349
+ }
1350
+ function tt({ column: e, idPrefix: t = "" }) {
1351
+ let n = `${t}${e.id}-filter`, r = {
1352
+ includesString: "Includes string",
1353
+ equalsString: "Equals string",
1354
+ arrIncludes: "Included in list",
1355
+ equals: "Equals",
1356
+ fuzzy: "Fuzzy"
1357
+ }, i = e.getFilterValue(), a = e.columnDef.meta?.filterSelectOptions;
1358
+ return a ? /* @__PURE__ */ f(X, {
1359
+ id: n,
1360
+ value: i ?? "__all__",
1361
+ onChange: (t) => e.setFilterValue(t === "__all__" ? void 0 : t),
1362
+ className: "w-full text-xs",
1363
+ data: [{
1364
+ key: "__all__",
1365
+ label: "All"
1366
+ }, ...a.map((e) => ({
1367
+ key: e.value,
1368
+ label: e.label
1369
+ }))]
1370
+ }) : /* @__PURE__ */ f(et, {
1371
+ id: n,
1372
+ type: "text",
1373
+ name: e.id,
1374
+ value: i ?? "",
1375
+ onChange: (t) => e.setFilterValue(t),
1376
+ title: `Search (${r[e.columnDef.filterFn]})`,
1377
+ placeholder: "Filter...",
1378
+ className: "border-border text-foreground placeholder:text-muted-foreground focus:ring-ring w-full rounded border bg-transparent px-2 py-1 text-xs shadow-sm focus:border-transparent focus:ring-1 focus:outline-hidden"
1379
+ });
1380
+ }
1381
+ function nt({ table: e }) {
1382
+ return /* @__PURE__ */ p(G, {
1383
+ trigger: "click",
1384
+ triggerRender: /* @__PURE__ */ f(V, {
1385
+ variant: "outline-secondary",
1386
+ size: "sm",
1387
+ title: "Toggle columns",
1388
+ type: "button"
1389
+ }),
1390
+ side: "bottom",
1391
+ align: "start",
1392
+ className: "p-1",
1393
+ cardContent: /* @__PURE__ */ f("div", {
1394
+ className: "flex flex-col",
1395
+ children: e.getAllLeafColumns().map((e) => {
1396
+ let n = e.columnDef.meta?.headerLabel ?? e.id, r = e.getCanHide(), i = e.getIsVisible();
1397
+ return /* @__PURE__ */ p(V, {
1398
+ variant: "ghost",
1399
+ size: "sm",
1400
+ disabled: !r,
1401
+ className: t("border-border flex w-full items-center justify-start gap-2 rounded-none border-x-0 border-t-0 text-xs shadow-none last:border-b-0", !r && "cursor-not-allowed opacity-50"),
1402
+ onClick: () => r && e.toggleVisibility(!i),
1403
+ type: "button",
1404
+ children: [r ? i ? /* @__PURE__ */ f(w, { className: "text-primary h-3 w-3" }) : /* @__PURE__ */ f(T, { className: "text-muted-foreground h-3 w-3" }) : /* @__PURE__ */ f(D, { className: "h-3 w-3" }), n]
1405
+ }, e.id);
1406
+ })
1407
+ }),
1408
+ children: [/* @__PURE__ */ f(O, { className: "mr-1.5 h-3 w-3" }), "Columns"]
1409
+ });
1410
+ }
1411
+ //#endregion
1412
+ //#region components/text-link.tsx
1413
+ var rt = ({ className: e, href: n, text: r, target: i = "_blank", rel: a, ...o }) => /* @__PURE__ */ f("a", {
1414
+ className: t("arc-text-link rounded-md text-primary underline transition hover:text-primary/80 focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-opacity-75", e),
1415
+ href: n,
1416
+ target: i,
1417
+ rel: a ?? (i === "_blank" ? "noopener noreferrer" : void 0),
1418
+ ...o,
1419
+ children: r
1420
+ }), it = ({ checked: e = !1, onChange: n, disabled: r = !1, variant: i = "primary", children: a, ...o }) => /* @__PURE__ */ f(xe.Root, {
1421
+ checked: e,
1422
+ disabled: r,
1423
+ onCheckedChange: n,
1424
+ className: t("arc-switch", at({
1425
+ variant: i,
1426
+ disabled: r
1427
+ })),
1428
+ ...o,
1429
+ children: a ? a(e) : /* @__PURE__ */ f(xe.Thumb, {
1430
+ "aria-hidden": "true",
1431
+ className: ot({
1432
+ variant: i,
1433
+ checked: e,
1434
+ disabled: r
1435
+ })
1436
+ })
1437
+ }), at = e("relative inline-flex h-7 w-12 items-center rounded-full border border-border bg-muted transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 hover:not-data-disabled:ring-2 hover:not-data-disabled:ring-ring/60 data-disabled:cursor-not-allowed data-disabled:opacity-60", { variants: {
1438
+ variant: {
1439
+ danger: "data-checked:bg-destructive",
1440
+ success: "data-checked:bg-success",
1441
+ primary: "data-checked:bg-primary",
1442
+ secondary: "data-checked:bg-secondary"
1443
+ },
1444
+ disabled: {
1445
+ true: "ring-2 ring-border",
1446
+ false: ""
1447
+ }
1448
+ } }), ot = e("absolute top-1/2 inline-block h-5 w-5 -translate-y-1/2 transform rounded-full border shadow-sm transition-[left,background-color,border-color] duration-300 ease-out", {
1449
+ variants: {
1450
+ variant: {
1451
+ primary: "",
1452
+ secondary: "",
1453
+ danger: "",
1454
+ success: ""
1455
+ },
1456
+ checked: {
1457
+ true: "left-6",
1458
+ false: "left-1 border-foreground/60 bg-background"
1459
+ },
1460
+ disabled: {
1461
+ true: "border-muted-foreground bg-muted-foreground",
1462
+ false: ""
1463
+ }
1464
+ },
1465
+ compoundVariants: [
1466
+ {
1467
+ variant: "primary",
1468
+ checked: !0,
1469
+ className: "border-primary-foreground bg-primary-foreground"
1470
+ },
1471
+ {
1472
+ variant: "secondary",
1473
+ checked: !0,
1474
+ className: "border-secondary-foreground bg-secondary-foreground"
1475
+ },
1476
+ {
1477
+ variant: "danger",
1478
+ checked: !0,
1479
+ className: "border-destructive-foreground bg-destructive-foreground"
1480
+ },
1481
+ {
1482
+ variant: "success",
1483
+ checked: !0,
1484
+ className: "border-success-foreground bg-success-foreground"
1485
+ },
1486
+ {
1487
+ variant: "primary",
1488
+ checked: !1,
1489
+ disabled: !1,
1490
+ className: "bg-primary/70"
1491
+ },
1492
+ {
1493
+ variant: "secondary",
1494
+ checked: !1,
1495
+ disabled: !1,
1496
+ className: "bg-secondary/70"
1497
+ },
1498
+ {
1499
+ variant: "danger",
1500
+ checked: !1,
1501
+ disabled: !1,
1502
+ className: "bg-destructive/70"
1503
+ },
1504
+ {
1505
+ variant: "success",
1506
+ checked: !1,
1507
+ disabled: !1,
1508
+ className: "bg-success/70"
1509
+ },
1510
+ {
1511
+ variant: "primary",
1512
+ checked: !1,
1513
+ disabled: !0,
1514
+ className: "border-primary bg-primary/70"
1515
+ },
1516
+ {
1517
+ variant: "secondary",
1518
+ checked: !1,
1519
+ disabled: !0,
1520
+ className: "border-secondary bg-secondary/70"
1521
+ },
1522
+ {
1523
+ variant: "secondary",
1524
+ checked: !1,
1525
+ disabled: !0,
1526
+ className: "border-secondary-foreground/70 bg-secondary-foreground/40"
1527
+ },
1528
+ {
1529
+ variant: "danger",
1530
+ checked: !1,
1531
+ disabled: !0,
1532
+ className: "border-destructive bg-destructive/70"
1533
+ },
1534
+ {
1535
+ variant: "success",
1536
+ checked: !1,
1537
+ disabled: !0,
1538
+ className: "border-success bg-success/70"
1539
+ }
1540
+ ]
1541
+ }), Q = {
1542
+ light: L,
1543
+ dark: I,
1544
+ system: F
1545
+ }, $ = {
1546
+ light: "Light",
1547
+ dark: "Dark",
1548
+ system: "System"
1549
+ }, st = "theme", ct = (e) => e === "dark" || e === "system" && typeof window < "u" && window.matchMedia("(prefers-color-scheme: dark)").matches, lt = () => {
1550
+ if (typeof window > "u") return "system";
1551
+ let e = window.localStorage.getItem(st);
1552
+ return e === "light" || e === "dark" || e === "system" ? e : "system";
1553
+ }, ut = (e) => e === "system" ? "light" : e === "light" ? "dark" : "system";
1554
+ function dt({ variant: e = "dropdown", showLabel: n = !1 }) {
1555
+ let [r, i] = u(lt);
1556
+ o(() => {
1557
+ typeof window < "u" && (document.documentElement.classList.toggle("dark", ct(r)), window.localStorage.setItem(st, r));
1558
+ }, [r]);
1559
+ let a = () => {
1560
+ i(ut(r));
1561
+ };
1562
+ if (e === "toggle") {
1563
+ let e = Q[r], t = ut(r);
1564
+ return /* @__PURE__ */ f("div", {
1565
+ className: "arc-theme-switcher",
1566
+ children: /* @__PURE__ */ p(J, {
1567
+ active: ct(r),
1568
+ "aria-label": `Switch to ${t} theme`,
1569
+ title: `Switch to ${t} theme`,
1570
+ onClick: a,
1571
+ className: "w-fit gap-3",
1572
+ children: [/* @__PURE__ */ f(e, { "aria-hidden": "true" }), n && $[r]]
1573
+ })
1574
+ });
1575
+ }
1576
+ let s = Q[r];
1577
+ return /* @__PURE__ */ f("div", {
1578
+ className: "arc-theme-switcher",
1579
+ children: /* @__PURE__ */ p(Y, {
1580
+ className: "gap-3",
1581
+ contentClassName: "min-w-(--anchor-width)",
1582
+ buttonText: /* @__PURE__ */ p(d, { children: [/* @__PURE__ */ f(s, { "aria-hidden": "true" }), n && $[r]] }),
1583
+ children: [
1584
+ /* @__PURE__ */ f(Y.Item, {
1585
+ asChild: !0,
1586
+ className: t("border-0! focus-visible:outline-none", n ? "px-3!" : "justify-center! p-0!"),
1587
+ children: /* @__PURE__ */ p(J, {
1588
+ active: r === "system",
1589
+ title: "System Theme",
1590
+ onClick: () => {
1591
+ i("system");
1592
+ },
1593
+ className: t("flex w-full gap-3 whitespace-nowrap rounded-t-md rounded-b-none p-2", n ? "justify-start" : "justify-center"),
1594
+ children: [/* @__PURE__ */ f(F, {
1595
+ className: "size-4",
1596
+ "aria-hidden": "true"
1597
+ }), n && $.system]
1598
+ })
1599
+ }),
1600
+ /* @__PURE__ */ f(Y.Item, {
1601
+ asChild: !0,
1602
+ className: t("border-0! focus-visible:outline-none", n ? "px-3!" : "justify-center! p-0!"),
1603
+ children: /* @__PURE__ */ p(J, {
1604
+ active: r === "light",
1605
+ title: "Light Theme",
1606
+ onClick: () => {
1607
+ i("light");
1608
+ },
1609
+ className: t("flex w-full gap-3 whitespace-nowrap rounded-none p-2", n ? "justify-start" : "justify-center"),
1610
+ children: [/* @__PURE__ */ f(L, {
1611
+ className: "size-4",
1612
+ "aria-hidden": "true"
1613
+ }), n && $.light]
1614
+ })
1615
+ }),
1616
+ /* @__PURE__ */ f(Y.Item, {
1617
+ asChild: !0,
1618
+ className: t("border-0! focus-visible:outline-none", n ? "px-3!" : "justify-center! p-0!"),
1619
+ children: /* @__PURE__ */ p(J, {
1620
+ active: r === "dark",
1621
+ title: "Dark Theme",
1622
+ onClick: () => {
1623
+ i("dark");
1624
+ },
1625
+ className: t("flex w-full gap-3 whitespace-nowrap rounded-b-md rounded-t-none p-2", n ? "justify-start" : "justify-center"),
1626
+ children: [/* @__PURE__ */ f(I, {
1627
+ className: "size-4",
1628
+ "aria-hidden": "true"
1629
+ }), n && $.dark]
1630
+ })
1631
+ })
1632
+ ]
1633
+ })
1634
+ });
1635
+ }
1636
+ //#endregion
1637
+ //#region components/typing-animation.tsx
1638
+ function ft(e) {
1639
+ return e === "newline" ? "\n" : e === "comma" ? ", " : "";
1640
+ }
1641
+ function pt(e, t, n, r, i) {
1642
+ if (r === "character") return Math.max(0, Math.min(e.length, t + n * i));
1643
+ let a = [...e.matchAll(/\S+\s*/g)].map((e) => e.index + e[0].length), o = t;
1644
+ for (let t = 0; t < n; t += 1) o = i === 1 ? a.find((e) => e > o) ?? e.length : [...a].reverse().find((e) => e < o) ?? 0;
1645
+ return o;
1646
+ }
1647
+ function mt({ strings: e, placeholder: t, perTick: n = {
1648
+ amount: 1,
1649
+ unit: "character"
1650
+ }, msDelay: r = {
1651
+ typing: 110,
1652
+ deleting: 55,
1653
+ hold: 1800,
1654
+ dot: 500
1655
+ }, waitTillVisible: i = !0, pauseWhenHidden: a = !0, loop: s = e.length > 1, minVisiblePercent: c = 0, afterString: d = "clear", trailingDot: m = !1 }) {
1656
+ let h = r?.typing ?? 110, g = r?.deleting ?? 55, _ = r?.hold ?? 1800, v = r?.dot ?? 500, y = n?.amount ?? 1, b = Number.isFinite(y) ? Math.max(1, Math.floor(y)) : 1, x = n?.unit ?? "character", [S, C] = u(""), [w, T] = u([]), [E, D] = u(!i), [O, k] = u(!1), [A, j] = u(!1), M = l(null), N = l(0), P = l(0), F = l(0), I = l(""), L = l(!1);
1657
+ o(() => {
1658
+ if (!i) return;
1659
+ let e = M.current;
1660
+ if (!e) return;
1661
+ let t = new IntersectionObserver(([e]) => {
1662
+ e.isIntersecting ? D(!0) : a && D(!1);
1663
+ }, {
1664
+ root: e.closest("main"),
1665
+ threshold: Math.min(100, Math.max(0, c)) / 100
1666
+ });
1667
+ return t.observe(e), () => t.disconnect();
1668
+ }, [
1669
+ a,
1670
+ i,
1671
+ c
1672
+ ]), o(() => {
1673
+ if (!E || e.length === 0) return;
1674
+ let t, n = d !== "clear";
1675
+ N.current = 0, P.current = 0, F.current = 0, I.current = "", L.current = !1, C(""), T([]), k(!1);
1676
+ let r = () => {
1677
+ if (!s && N.current >= e.length) return;
1678
+ k(!1);
1679
+ let i = e[N.current], a = i.match(/^<--delay-(\d+)-->$/);
1680
+ if (a) {
1681
+ if (F.current === 0 && (F.current = Number(a[1]), I.current = ""), F.current <= 0) {
1682
+ N.current += 1, t = setTimeout(r, h);
1683
+ return;
1684
+ }
1685
+ I.current += `${I.current ? " " : ""}.`, C(I.current), --F.current, F.current === 0 && (N.current += 1), t = setTimeout(r, 1e3);
1686
+ return;
1687
+ }
1688
+ if (n && i === "<--clearAll-->") {
1689
+ T([]), C(""), N.current += 1, P.current = 0, t = setTimeout(r, _);
1690
+ return;
1691
+ }
1692
+ if (L.current) P.current = pt(i, P.current, b, x, -1), C(i.slice(0, P.current)), P.current === 0 && (L.current = !1, N.current = (N.current + 1) % e.length);
1693
+ else {
1694
+ if (P.current = pt(i, P.current, b, x, 1), C(i.slice(0, P.current)), L.current = !n && P.current === i.length && (s || N.current < e.length - 1), !n && P.current === i.length && !L.current && !s) {
1695
+ k(!0);
1696
+ return;
1697
+ }
1698
+ n && P.current === i.length && (T((e) => [...e, i]), C(""), N.current += 1, P.current = 0);
1699
+ }
1700
+ let o = P.current >= i.length || n && P.current === 0 ? _ : L.current ? g : h;
1701
+ k(o === _), t = setTimeout(r, o);
1702
+ };
1703
+ return r(), () => clearTimeout(t);
1704
+ }, [
1705
+ g,
1706
+ E,
1707
+ s,
1708
+ _,
1709
+ d,
1710
+ e,
1711
+ b,
1712
+ x,
1713
+ h
1714
+ ]), o(() => {
1715
+ if (!m || !O) {
1716
+ j(!1);
1717
+ return;
1718
+ }
1719
+ j(!0);
1720
+ let e = setInterval(() => j((e) => !e), v);
1721
+ return () => clearInterval(e);
1722
+ }, [
1723
+ m,
1724
+ O,
1725
+ v
1726
+ ]);
1727
+ let R = A ? "." : "", z = d !== "clear", B = ft(d), ee = w.reduce((e, t) => e + t.split("\n").length, 0);
1728
+ return z ? /* @__PURE__ */ f("div", {
1729
+ ref: (e) => {
1730
+ M.current = e;
1731
+ },
1732
+ className: "arc-typing-animation overflow-hidden",
1733
+ style: { "--typing-roll-offset": ee },
1734
+ children: /* @__PURE__ */ p("div", {
1735
+ className: "whitespace-pre-line",
1736
+ children: [
1737
+ w.join(B),
1738
+ S && `${w.length > 0 ? B : ""}${S}`,
1739
+ R
1740
+ ]
1741
+ })
1742
+ }) : /* @__PURE__ */ p("span", {
1743
+ ref: (e) => {
1744
+ M.current = e;
1745
+ },
1746
+ className: "arc-typing-animation inline-grid align-top",
1747
+ children: [/* @__PURE__ */ p("span", {
1748
+ "aria-hidden": "true",
1749
+ className: "invisible col-start-1 row-start-1 whitespace-pre-line",
1750
+ children: [t ?? e[0], m && "."]
1751
+ }), /* @__PURE__ */ p("span", {
1752
+ className: "col-start-1 row-start-1 whitespace-pre-line",
1753
+ children: [S, R]
1754
+ })]
1755
+ });
1756
+ }
1757
+ //#endregion
1758
+ export { Ae as Avatar, V as Button, Se as ButtonGroup, q as Card, ze as DateHandler, je as Divider, we as DoubleClickButton, Me as Dropdown, H as ErrorText, Fe as GridLoader, K as Input, Be as InputTimestamp, Ie as LabelField, Te as LongPressButton, Y as Menu, We as Modal, Ge as MultiDropdown, J as Pill, He as PillLink, G as PreviewCard, X as Select, it as Switch, $e as Table, qe as Tag, rt as TextLink, dt as ThemeSwitcher, mt as TypingAnimation, Ee as navigateToHashOnLoad, Oe as updateHashOnScroll, De as useHashNavigationOnLoad };