@coderabbitai/carrot-ui 0.1.19

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js ADDED
@@ -0,0 +1,2731 @@
1
+ import { clsx as e } from "clsx";
2
+ import { twMerge as t } from "tailwind-merge";
3
+ import { Button as n } from "@base-ui/react/button";
4
+ import { createContext as r, forwardRef as i, useCallback as a, useContext as o, useEffect as s, useLayoutEffect as c, useMemo as l, useRef as u, useState as d } from "react";
5
+ import { Fragment as f, jsx as p, jsxs as m } from "react/jsx-runtime";
6
+ import { Switch as h } from "@base-ui/react/switch";
7
+ import { Checkbox as g } from "@base-ui/react/checkbox";
8
+ import { ArrowRightStartOnRectangleIcon as _, CheckCircleIcon as v, CheckIcon as y, ChevronDownIcon as b, ChevronLeftIcon as x, ChevronRightIcon as S, ChevronUpDownIcon as C, ChevronUpIcon as w, ComputerDesktopIcon as T, ExclamationTriangleIcon as E, InformationCircleIcon as ee, MagnifyingGlassIcon as D, MinusIcon as O, MoonIcon as k, PlusCircleIcon as A, SunIcon as j, XCircleIcon as te, XMarkIcon as M } from "@heroicons/react/16/solid";
9
+ import { Combobox as N } from "@base-ui/react/combobox";
10
+ import { Select as P } from "@base-ui/react/select";
11
+ import { Separator as ne } from "@base-ui/react/separator";
12
+ import { Field as F } from "@base-ui/react/field";
13
+ import { Menu as I } from "@base-ui/react/menu";
14
+ import { Dialog as L } from "@base-ui/react/dialog";
15
+ import { flexRender as re, getCoreRowModel as ie, getFilteredRowModel as ae, getPaginationRowModel as oe, getSortedRowModel as se, useReactTable as ce } from "@tanstack/react-table";
16
+ import { Popover as R } from "@base-ui/react/popover";
17
+ import { Tooltip as z } from "@base-ui/react/tooltip";
18
+ import { AlertDialog as B } from "@base-ui/react/alert-dialog";
19
+ import { Accordion as V } from "@base-ui/react/accordion";
20
+ import { Tabs as H } from "@base-ui/react/tabs";
21
+ import { Drawer as U } from "@base-ui/react/drawer";
22
+ import { Command as W } from "cmdk";
23
+ //#region src/lib/cn.ts
24
+ function G(...n) {
25
+ return t(e(n));
26
+ }
27
+ //#endregion
28
+ //#region src/components/spinner/pixel-spinner.tsx
29
+ var le = [
30
+ 0,
31
+ 1,
32
+ 2,
33
+ 5,
34
+ 8,
35
+ 7,
36
+ 6,
37
+ 3
38
+ ], ue = [
39
+ 0,
40
+ 1,
41
+ 2,
42
+ 1,
43
+ 2,
44
+ 3,
45
+ 2,
46
+ 3,
47
+ 4
48
+ ], de = {
49
+ xs: 10,
50
+ sm: 14,
51
+ md: 20,
52
+ lg: 32
53
+ }, fe = !1;
54
+ function pe() {
55
+ if (fe || typeof document > "u") return;
56
+ let e = document.createElement("style");
57
+ e.setAttribute("data-pxs", ""), e.textContent = "\n@keyframes pxs-ring-on {\n 0% { opacity: var(--hi); }\n 12.5%, 100% { opacity: var(--lo); }\n}\n@keyframes pxs-ring-off {\n 0% { opacity: var(--lo); }\n 12.5%, 100% { opacity: var(--hi); }\n}\n@keyframes pxs-trail-5 {\n 0% { opacity: var(--hi); }\n 12.5% { opacity: 0.75; }\n 25% { opacity: var(--mid); }\n 37.5% { opacity: 0.25; }\n 50% { opacity: var(--lo); }\n 100% { opacity: var(--lo); }\n}\n@keyframes pxs-wave {\n 0%, 100% { opacity: var(--lo); }\n 40%, 60% { opacity: var(--hi); }\n}\n@keyframes pxs-radiate {\n 0%, 100% { opacity: var(--lo); }\n 20%, 40% { opacity: var(--hi); }\n}\n@keyframes pxs-pulse {\n 0%, 100% { opacity: var(--lo); }\n 50% { opacity: var(--hi); }\n}\n@keyframes pxs-flicker-a { 0%, 100% { opacity: var(--hi); } 33% { opacity: var(--lo); } 66% { opacity: var(--mid); } }\n@keyframes pxs-flicker-b { 0%, 100% { opacity: var(--lo); } 25% { opacity: var(--hi); } 75% { opacity: var(--mid); } }\n@keyframes pxs-flicker-c { 0%, 100% { opacity: var(--mid); } 40% { opacity: var(--hi); } 80% { opacity: var(--lo); } }\n@media (prefers-reduced-motion: reduce) {\n .pxs-cell { animation: none !important; opacity: var(--mid) !important; }\n}\n", document.head.appendChild(e), fe = !0;
58
+ }
59
+ function me(e, t, n) {
60
+ let r = `${n}s`;
61
+ switch (e) {
62
+ case "hole": return t === 4 ? null : `pxs-ring-off ${r} ${(-(le.indexOf(t) / 8) * n).toFixed(3)}s steps(1) infinite`;
63
+ case "trail": return t === 4 ? null : `pxs-trail-5 ${r} ${(-(le.indexOf(t) / 8) * n).toFixed(3)}s linear infinite`;
64
+ case "wave": return `pxs-wave ${r} ${(-((ue[t] ?? 0) / 5) * n).toFixed(3)}s ease-in-out infinite`;
65
+ case "radiate": return `pxs-radiate ${r} ${(-((t === 4 ? 0 : [
66
+ 1,
67
+ 3,
68
+ 5,
69
+ 7
70
+ ].includes(t) ? 1 : 2) / 3) * n).toFixed(3)}s ease-in-out infinite`;
71
+ case "pulse": return `pxs-pulse ${r} ${(-(t / 9) * n * .3).toFixed(3)}s ease-in-out infinite`;
72
+ case "static": return `${[
73
+ "pxs-flicker-a",
74
+ "pxs-flicker-b",
75
+ "pxs-flicker-c"
76
+ ][t % 3]} ${r} ${(-(t * .17 % 1) * n).toFixed(3)}s ease-in-out infinite`;
77
+ }
78
+ }
79
+ function he(e, t) {
80
+ return t === 4 ? +(e === "hole") : 0;
81
+ }
82
+ function ge({ variant: e = "wave", size: t = "xs", gap: n = .25, duration: r = 1.2, className: i }) {
83
+ typeof document < "u" && pe();
84
+ let a = typeof t == "number" ? t : de[t], o = a / (3 + 2 * n), s = o * (1 + n), c = Array.from({ length: 9 }, (e, t) => ({
85
+ row: Math.floor(t / 3),
86
+ col: t % 3,
87
+ cellIndex: t
88
+ }));
89
+ return /* @__PURE__ */ p("span", {
90
+ "aria-label": "Loading",
91
+ role: "status",
92
+ className: G("inline-block text-current", i),
93
+ style: {
94
+ width: a,
95
+ height: a,
96
+ "--lo": "0",
97
+ "--mid": "0.5",
98
+ "--hi": "1"
99
+ },
100
+ children: /* @__PURE__ */ p("svg", {
101
+ width: a,
102
+ height: a,
103
+ viewBox: `0 0 ${a} ${a}`,
104
+ "aria-hidden": "true",
105
+ children: c.map(({ row: t, col: n, cellIndex: i }) => {
106
+ let a = me(e, i, r), c = he(e, i);
107
+ return /* @__PURE__ */ p("rect", {
108
+ className: "pxs-cell",
109
+ x: n * s,
110
+ y: t * s,
111
+ width: o,
112
+ height: o,
113
+ fill: "currentColor",
114
+ style: {
115
+ opacity: c,
116
+ animation: a ?? "none"
117
+ }
118
+ }, i);
119
+ })
120
+ })
121
+ });
122
+ }
123
+ //#endregion
124
+ //#region src/components/spinner/spinner.tsx
125
+ var _e = {
126
+ sm: 10,
127
+ md: 12
128
+ }, ve = i(function({ label: e, showDots: t = !0, showSpinner: n = !0, size: r = "md", variant: i = "wave", className: a }, o) {
129
+ let s = r === "sm" ? "text-xs" : "text-[13px]", c = _e[r];
130
+ return /* @__PURE__ */ m("span", {
131
+ ref: o,
132
+ className: G("inline-flex items-center gap-1.5", a),
133
+ children: [n && /* @__PURE__ */ p(ge, {
134
+ variant: i,
135
+ size: c,
136
+ duration: 1.2
137
+ }), e && /* @__PURE__ */ m("span", {
138
+ className: G("text-current", s),
139
+ children: [e, t && /* @__PURE__ */ p("span", { className: "after:animate-cui-dot-cycle inline-block w-[2ch] text-left after:content-['.']" })]
140
+ })]
141
+ });
142
+ }), ye = {
143
+ primary: {
144
+ active: !0,
145
+ bg: "bg-cui-inverse",
146
+ bgClassName: "shadow-xs inset-shadow-cui-primary group-hover/btn:bg-cui-inverse/90",
147
+ text: "text-cui-inverse"
148
+ },
149
+ outline: {
150
+ active: !0,
151
+ bg: "bg-cui-base-2",
152
+ bgClassName: "border border-cui-neutral shadow-xs group-hover/btn:bg-cui-subtle group-active/btn:bg-cui-subtle",
153
+ text: "text-cui-primary"
154
+ },
155
+ secondary: {
156
+ active: !0,
157
+ bg: "bg-cui-subtle",
158
+ bgClassName: "group-hover/btn:bg-cui-subtle/70",
159
+ text: "text-cui-primary"
160
+ },
161
+ transparent: {
162
+ active: !1,
163
+ bg: "",
164
+ bgClassName: "group-hover/btn:bg-cui-subtle group-active/btn:bg-cui-subtle",
165
+ text: "text-cui-secondary"
166
+ },
167
+ danger: {
168
+ active: !0,
169
+ bg: "bg-cui-danger",
170
+ bgClassName: "border border-cui-danger shadow-xs group-hover/btn:bg-cui-danger-strong group-active/btn:bg-cui-danger-strong",
171
+ text: "text-cui-danger-on"
172
+ },
173
+ "danger-light": {
174
+ active: !0,
175
+ bg: "bg-cui-danger-subtle",
176
+ bgClassName: "group-hover/btn:bg-cui-danger/30 group-active/btn:bg-cui-danger/50",
177
+ text: "text-cui-danger"
178
+ }
179
+ }, be = {
180
+ xs: {
181
+ height: "h-6",
182
+ padding: "px-1.5",
183
+ textPadding: "px-1",
184
+ icon: "w-6"
185
+ },
186
+ sm: {
187
+ height: "h-7",
188
+ padding: "px-1.5",
189
+ textPadding: "px-1",
190
+ icon: "w-7"
191
+ },
192
+ md: {
193
+ height: "h-8",
194
+ padding: "px-2",
195
+ textPadding: "px-1",
196
+ icon: "w-8"
197
+ }
198
+ }, K = i(function({ variant: e = "outline", size: t = "md", iconLeft: r, iconRight: i, loading: a = !1, disabled: o, className: s, children: c, ...l }, u) {
199
+ let d = ye[e], f = be[t], h = !c && !i ? G(f.height, f.icon) : G(f.height, f.padding, "w-fit");
200
+ return /* @__PURE__ */ m(n, {
201
+ ref: u,
202
+ disabled: o,
203
+ className: G("group/btn relative inline-flex min-w-fit cursor-default items-center justify-center", "rounded text-sm whitespace-pre select-none", "ring-cui-focus outline-none focus-visible:ring-2 focus-visible:ring-offset-2 ", o && "pointer-events-none opacity-50", d.text, h, s),
204
+ ...l,
205
+ children: [
206
+ /* @__PURE__ */ p("div", { className: G("absolute rounded-[inherit]", d.bg, d.bgClassName, d.active ? "opacity-100 inset-0" : "opacity-0 inset-1", !o && [
207
+ "transition-[inset,opacity,background-color] duration-150 ease-cui-out-expo motion-reduce:transition-none",
208
+ "group-hover/btn:inset-0 group-hover/btn:opacity-100",
209
+ "group-active/btn:inset-px"
210
+ ]) }),
211
+ r && /* @__PURE__ */ p("span", {
212
+ className: G("relative z-[1] size-5 shrink-0 flex items-center justify-center [&>svg]:size-4", a && "opacity-0"),
213
+ children: r
214
+ }),
215
+ c && /* @__PURE__ */ p("span", {
216
+ className: G("relative z-[1] inline", f.textPadding, a && "opacity-0"),
217
+ children: c
218
+ }),
219
+ i && /* @__PURE__ */ p("span", {
220
+ className: G("relative z-[1] size-5 shrink-0 flex items-center justify-center [&>svg]:size-4", a && "opacity-0"),
221
+ children: i
222
+ }),
223
+ a && /* @__PURE__ */ p("span", {
224
+ className: "absolute inset-0 z-[2] flex items-center justify-center",
225
+ children: /* @__PURE__ */ p(ve, {
226
+ showDots: !1,
227
+ size: "sm"
228
+ })
229
+ })
230
+ ]
231
+ });
232
+ }), xe = r(null);
233
+ function Se(e) {
234
+ return {
235
+ left: e.offsetLeft,
236
+ top: e.offsetTop,
237
+ width: e.offsetWidth,
238
+ height: e.offsetHeight
239
+ };
240
+ }
241
+ function Ce({ children: e, background: t = "bg-cui-subtle", borderRadius: n = "rounded-sm", className: r }) {
242
+ let i = u(/* @__PURE__ */ new Map()), [o, s] = d(null), c = u(null), [f, h] = d("idle"), g = a((e, t) => {
243
+ t ? i.current.set(e, t) : i.current.delete(e);
244
+ }, []), _ = a((e) => {
245
+ let t = i.current.get(e);
246
+ if (!t) return;
247
+ let n = Se(t);
248
+ h((e) => e === "idle" ? "fade" : "slide"), s(n);
249
+ }, []), v = a(() => {
250
+ h("idle"), s(null);
251
+ }, []), y = a(() => {
252
+ h("idle"), s(null);
253
+ }, []), b = o !== null, x = o ?? c.current;
254
+ o && (c.current = o);
255
+ let S = l(() => ({
256
+ registerItem: g,
257
+ onItemHover: _,
258
+ dismissHover: y
259
+ }), [
260
+ g,
261
+ _,
262
+ y
263
+ ]);
264
+ return /* @__PURE__ */ p(xe.Provider, {
265
+ value: S,
266
+ children: /* @__PURE__ */ m("div", {
267
+ onPointerLeave: v,
268
+ className: G("group/h relative flex items-center", r),
269
+ children: [/* @__PURE__ */ p("div", {
270
+ "aria-hidden": !0,
271
+ className: G("pointer-events-none absolute left-0 top-0 z-0", "motion-reduce:transition-none", f === "slide" ? "transition-[translate,width,height,opacity,scale] duration-200 ease-cui-out-expo" : "transition-[opacity,scale] duration-200 ease-cui-out-expo", b ? "scale-100 opacity-100" : "scale-95 opacity-0"),
272
+ style: x ? {
273
+ width: x.width,
274
+ height: x.height,
275
+ translate: `${x.left}px ${x.top}px`
276
+ } : void 0,
277
+ children: /* @__PURE__ */ p("div", { className: G("absolute inset-0", t, n, "transition-[inset] duration-150 ease-cui-out-expo", "group-active/h:inset-px", "motion-reduce:transition-none") })
278
+ }), e]
279
+ })
280
+ });
281
+ }
282
+ function q({ children: e, active: t = !1, background: n = "bg-cui-subtle", backgroundClassName: r, borderRadius: i = "rounded", focus: a = !0, interactive: s = !0, instantHover: c = !1, disabled: l = !1, fullWidth: u = !1, className: d }) {
283
+ let f = o(xe);
284
+ return f ? /* @__PURE__ */ p(we, {
285
+ group: f,
286
+ active: t,
287
+ background: n,
288
+ backgroundClassName: r,
289
+ borderRadius: i,
290
+ interactive: s,
291
+ disabled: l,
292
+ fullWidth: u,
293
+ className: d,
294
+ children: e
295
+ }) : /* @__PURE__ */ m("div", {
296
+ className: G("group/h relative flex items-center text-cui-primary text-sm", u ? "w-full" : "w-fit", d),
297
+ children: [/* @__PURE__ */ p("div", { className: G("absolute", c ? "transition-[inset] duration-150 ease-cui-out-expo motion-reduce:transition-none" : "transition-[inset,opacity,background-color] duration-150 ease-cui-out-expo motion-reduce:transition-none", n, r, i, !l && "group-hover/h:inset-0 group-hover/h:opacity-100", s && !l && "group-active/h:inset-px", t ? "opacity-100 inset-0" : c ? "opacity-0 inset-0" : "opacity-0 inset-1", a && !l && "group-has-focus-visible/h:inset-0 group-has-focus-visible/h:opacity-100 group-has-focus-visible/h:ring-cui-focus group-has-focus-visible/h:ring-2 group-has-focus-visible/h:ring-offset-2") }), /* @__PURE__ */ p("div", {
298
+ className: "relative z-[2] flex w-full items-center gap-2",
299
+ children: e
300
+ })]
301
+ });
302
+ }
303
+ function we({ children: e, group: t, active: n, background: r, backgroundClassName: i, borderRadius: a, interactive: o, disabled: s, fullWidth: l, className: d }) {
304
+ let f = u(null), h = u(null);
305
+ h.current === null && (h.current = Math.random());
306
+ let g = h.current, _ = u(t);
307
+ _.current = t, c(() => {
308
+ let e = _.current;
309
+ return e.registerItem(g, f.current), () => e.registerItem(g, null);
310
+ }, [g]);
311
+ let v = u(n);
312
+ return c(() => {
313
+ n && !v.current && t.dismissHover(), v.current = n;
314
+ }, [n, t]), /* @__PURE__ */ m("div", {
315
+ ref: f,
316
+ onPointerEnter: () => {
317
+ s || (n ? t.dismissHover() : t.onItemHover(g));
318
+ },
319
+ className: G("group/hi relative z-[1] flex items-center text-cui-primary text-sm", l ? "w-full" : "w-fit", d),
320
+ children: [/* @__PURE__ */ p("div", { className: G("absolute", r, i, a, "transition-[inset,opacity,scale] duration-150 ease-cui-out-expo", o && !s && "group-active/hi:inset-px", "motion-reduce:transition-none", n ? "inset-0 scale-100 opacity-100" : "inset-1 scale-95 opacity-0") }), /* @__PURE__ */ p("div", {
321
+ className: "relative z-[2] flex w-full items-center gap-2",
322
+ children: e
323
+ })]
324
+ });
325
+ }
326
+ //#endregion
327
+ //#region src/components/toggle/toggle.tsx
328
+ var Te = {
329
+ sm: {
330
+ track: "w-9 h-5",
331
+ thumb: "h-4 w-4 group-active/toggle:w-5"
332
+ },
333
+ md: {
334
+ track: "w-11 h-6",
335
+ thumb: "h-5 w-5 group-active/toggle:w-6"
336
+ }
337
+ }, Ee = i(function({ checked: e, defaultChecked: t, onCheckedChange: n, disabled: r, size: i = "md", className: a }, o) {
338
+ let s = Te[i];
339
+ return /* @__PURE__ */ p(h.Root, {
340
+ ref: o,
341
+ checked: e,
342
+ defaultChecked: t,
343
+ onCheckedChange: n ? (e) => n(e) : void 0,
344
+ disabled: r,
345
+ className: G("group/toggle relative inline-flex shrink-0 cursor-pointer items-center rounded-full", "bg-cui-subtle data-[checked]:bg-cui-accent", "ring-cui-focus outline-none focus-visible:ring-2 focus-visible:ring-offset-2", "transition-colors duration-150 ease-cui-out-expo", r && "opacity-50 pointer-events-none", s.track, a),
346
+ children: /* @__PURE__ */ p(h.Thumb, { className: G("block rounded-full bg-cui-accent-on shadow-sm", "translate-x-0.5 transition-all duration-150 ease-cui-out-expo", i === "sm" && "data-[checked]:translate-x-[18px] data-[checked]:group-active/toggle:translate-x-[14px]", i === "md" && "data-[checked]:translate-x-[22px] data-[checked]:group-active/toggle:translate-x-[18px]", s.thumb) })
347
+ });
348
+ }), De = {
349
+ sm: {
350
+ root: "size-4 rounded-[4px]",
351
+ icon: "size-3",
352
+ label: "text-xs"
353
+ },
354
+ md: {
355
+ root: "size-[18px] rounded-[5px]",
356
+ icon: "size-3.5",
357
+ label: "text-sm"
358
+ }
359
+ };
360
+ function Oe({ checked: e, defaultChecked: t, onCheckedChange: n, indeterminate: r = !1, disabled: i = !1, required: a, size: o = "md", label: s, name: c, className: l }) {
361
+ let u = De[o], d = /* @__PURE__ */ p(g.Root, {
362
+ checked: e,
363
+ defaultChecked: t,
364
+ onCheckedChange: n ? (e) => n(e) : void 0,
365
+ indeterminate: r,
366
+ disabled: i,
367
+ required: a,
368
+ name: c,
369
+ className: G("group/checkbox relative inline-flex shrink-0 items-center justify-center", "outline-none focus-visible:ring-2 focus-visible:ring-cui-focus focus-visible:ring-offset-2", "transition-colors duration-150 ease-out", "motion-reduce:transition-none", "before:absolute before:inset-1/2 before:size-8 before:-translate-1/2", i ? "pointer-events-none cursor-not-allowed border border-cui-neutral bg-cui-subtle" : "cursor-pointer border border-cui-neutral bg-cui-base-2 data-[checked]:border-cui-accent data-[checked]:bg-cui-accent data-[indeterminate]:border-cui-neutral-strong data-[indeterminate]:bg-cui-subtle", u.root, !s && l),
370
+ children: /* @__PURE__ */ p(g.Indicator, {
371
+ keepMounted: !0,
372
+ className: G("flex items-center justify-center", i ? "text-cui-tertiary" : "data-[checked]:text-cui-accent-on data-[indeterminate]:text-cui-secondary", "scale-100 opacity-100", "data-[unchecked]:scale-50 data-[unchecked]:opacity-0", "data-[starting-style]:scale-50 data-[starting-style]:opacity-0", "data-[ending-style]:scale-50 data-[ending-style]:opacity-0", "transition-[scale,opacity] duration-300 ease-cui-out-expo", "motion-reduce:transition-none"),
373
+ children: p(r ? O : y, { className: u.icon })
374
+ })
375
+ });
376
+ return s ? /* @__PURE__ */ m("label", {
377
+ className: G("inline-flex items-center gap-2 select-none", i ? "cursor-not-allowed" : "cursor-pointer", l),
378
+ children: [d, /* @__PURE__ */ p("span", {
379
+ className: G(u.label, i ? "text-cui-tertiary" : "text-cui-primary"),
380
+ children: s
381
+ })]
382
+ }) : d;
383
+ }
384
+ //#endregion
385
+ //#region src/components/card/card.tsx
386
+ var ke = {
387
+ default: "bg-cui-base-1 rounded-lg shadow-xs ring-1 ring-cui-neutral",
388
+ nested: "bg-cui-base-2 rounded-sm shadow-sm ring-1 ring-cui-neutral"
389
+ }, Ae = i(function({ className: e, children: t }, n) {
390
+ return /* @__PURE__ */ p("div", {
391
+ ref: n,
392
+ className: G("flex flex-col gap-1 p-1", e),
393
+ children: t
394
+ });
395
+ }), je = i(function({ className: e, children: t }, n) {
396
+ return /* @__PURE__ */ p("div", {
397
+ ref: n,
398
+ className: G("px-4 py-3", e),
399
+ children: t
400
+ });
401
+ }), Me = i(function({ className: e, children: t }, n) {
402
+ return /* @__PURE__ */ p("div", {
403
+ ref: n,
404
+ className: G("p-4", e),
405
+ children: t
406
+ });
407
+ }), Ne = i(function({ className: e, children: t }, n) {
408
+ return /* @__PURE__ */ p("div", {
409
+ ref: n,
410
+ className: G("border-b border-cui-neutral last:border-b-0 p-4", e),
411
+ children: t
412
+ });
413
+ }), J = i(function({ variant: e = "default", className: t, children: n }, r) {
414
+ return /* @__PURE__ */ p("div", {
415
+ ref: r,
416
+ className: G(ke[e], t),
417
+ children: n
418
+ });
419
+ });
420
+ J.Content = Ae, J.Header = je, J.Body = Me, J.Section = Ne;
421
+ //#endregion
422
+ //#region src/components/nav-link/nav-link.tsx
423
+ function Pe({ className: e, children: t }) {
424
+ return /* @__PURE__ */ p(Ce, {
425
+ background: "bg-cui-subtle",
426
+ className: G("gap-1 p-2 flex-nowrap", e),
427
+ children: t
428
+ });
429
+ }
430
+ function Fe({ active: e = !1, icon: t, href: n, onClick: r, className: i, children: a }) {
431
+ return /* @__PURE__ */ p(q, {
432
+ active: e,
433
+ background: "bg-cui-subtle",
434
+ className: i,
435
+ children: /* @__PURE__ */ m(n ? "a" : "button", {
436
+ ...n ? {
437
+ href: n,
438
+ onClick: r
439
+ } : {
440
+ type: "button",
441
+ onClick: r
442
+ },
443
+ className: G("flex items-center h-8 px-1.5 text-sm font-medium cursor-pointer select-none whitespace-nowrap", "outline-none", e ? "text-cui-primary" : "text-cui-secondary"),
444
+ children: [t && /* @__PURE__ */ p("span", {
445
+ className: "flex size-5 shrink-0 items-center justify-center [&>svg]:size-4",
446
+ children: t
447
+ }), /* @__PURE__ */ p("span", {
448
+ className: "px-1",
449
+ children: a
450
+ })]
451
+ })
452
+ });
453
+ }
454
+ //#endregion
455
+ //#region src/components/logo/logo.tsx
456
+ var Ie = i(function({ variant: e = "mark", size: t = 18, className: n }, r) {
457
+ return e === "circle" ? /* @__PURE__ */ m("svg", {
458
+ ref: r,
459
+ width: t,
460
+ height: t,
461
+ viewBox: "0 0 1201 1200",
462
+ fill: "none",
463
+ xmlns: "http://www.w3.org/2000/svg",
464
+ className: G("shrink-0", n),
465
+ "aria-label": "CodeRabbit",
466
+ children: [/* @__PURE__ */ p("path", {
467
+ d: "M600.867 1200C932.238 1200 1200.87 931.37 1200.87 600C1200.87 268.629 932.238 -0.000488281 600.867 -0.000488281C269.496 -0.000488281 0.867188 268.629 0.867188 600C0.867188 931.37 269.496 1200 600.867 1200Z",
468
+ fill: "currentColor"
469
+ }), /* @__PURE__ */ p("path", {
470
+ d: "M1008.3 500.615C1008.3 500.615 924.706 393.751 819.62 387.639C751.807 383.636 735.379 392.696 732.434 399.444C728.226 364.456 698.322 202.361 491.729 168.008C518.102 357.589 627.02 308.191 691.161 438.86C691.161 438.86 582.921 291.734 404.969 345.903C404.969 345.903 469.83 482.07 661.676 509.891C661.676 509.891 677.05 562.586 681.684 571.862C681.684 571.862 386.224 417.779 296.512 713.505C229.747 698.382 207.352 770.859 284.09 820.369C284.09 820.369 297.147 768.519 328.943 753.131C328.943 753.131 260.711 829.226 340.946 920.36H628.925C635.883 908.834 666.68 848.19 590.514 802.285C644.278 801.516 688.042 902.932 735.128 921.058H803.61C805.927 915.428 810.771 898.567 799.395 883.395C781.857 863.278 743.46 866.002 743.802 828.8C757.062 655.746 1016.55 708.888 1008.3 500.615Z",
471
+ fill: "var(--background-color-cui-base-1)"
472
+ })]
473
+ }) : /* @__PURE__ */ p("svg", {
474
+ ref: r,
475
+ width: t,
476
+ height: t,
477
+ viewBox: "0 0 18 18",
478
+ fill: "none",
479
+ xmlns: "http://www.w3.org/2000/svg",
480
+ className: G("shrink-0", n),
481
+ "aria-label": "CodeRabbit",
482
+ children: /* @__PURE__ */ p("path", {
483
+ d: "M17.9955 7.95021C17.9955 7.95021 16.0484 5.39587 13.6007 5.24977C12.0212 5.15411 11.6385 5.37067 11.5699 5.53194C11.4719 4.69563 10.7754 0.821109 5.96335 0C6.57764 4.53152 9.1146 3.35077 10.6086 6.47412C10.6086 6.47412 8.08743 2.9574 3.94251 4.25219C3.94251 4.25219 5.45327 7.50694 9.92182 8.17196C9.92182 8.17196 10.2799 9.43152 10.3879 9.65324C10.3879 9.65324 3.50589 5.97023 1.41629 13.0389C-0.138828 12.6774 -0.660461 14.4098 1.12695 15.5933C1.12695 15.5933 1.43108 14.3539 2.17168 13.9861C2.17168 13.9861 0.582397 15.805 2.45126 17.9833H9.15897C9.32104 17.7078 10.0384 16.2583 8.26429 15.161C9.51658 15.1426 10.5359 17.5667 11.6327 18H13.2278C13.2818 17.8654 13.3946 17.4624 13.1296 17.0998C12.7211 16.6189 11.8268 16.684 11.8347 15.7948C12.1436 11.6583 18.1877 12.9285 17.9955 7.95021Z",
484
+ fill: "currentColor"
485
+ })
486
+ });
487
+ }), Y = {
488
+ Panel: i(function({ minWidth: e, className: t, children: n, ...r }, i) {
489
+ return /* @__PURE__ */ p("div", {
490
+ ref: i,
491
+ className: G("flex flex-col bg-cui-base-2 border border-cui-neutral rounded-md shadow-md p-1", e, "origin-[var(--transform-origin)] will-change-[transform,opacity]", "transition-[transform,scale,opacity] duration-200 ease-cui-out-expo", "data-[starting-style]:scale-[0.96] data-[starting-style]:opacity-0", "data-[ending-style]:scale-[0.96] data-[ending-style]:opacity-0 data-[ending-style]:duration-150", "motion-reduce:transition-none", t),
492
+ ...r,
493
+ children: n
494
+ });
495
+ }),
496
+ Item: i(function({ icon: e, indicator: t, variant: n = "default", className: r, children: i, ...a }, o) {
497
+ return /* @__PURE__ */ m("div", {
498
+ ref: o,
499
+ className: G("group relative flex items-center gap-2 px-2 py-1.5 text-sm cursor-pointer rounded-sm select-none outline-none", n === "danger" ? "text-cui-danger data-[highlighted]:text-cui-danger" : "text-cui-primary", r),
500
+ ...a,
501
+ children: [
502
+ /* @__PURE__ */ p("div", { className: G("absolute inset-0 rounded-[inherit] bg-cui-subtle opacity-0", "group-data-[highlighted]:opacity-100", "group-data-[selected]:opacity-100", "group-data-[selected=true]:opacity-100", "transition-[inset] duration-150 ease-cui-out-expo motion-reduce:transition-none", "group-active:inset-px") }),
503
+ e && /* @__PURE__ */ p("span", {
504
+ className: G("relative z-[1] flex size-5 shrink-0 items-center justify-center [&>svg]:size-4", n === "danger" ? "text-cui-danger" : "text-cui-tertiary group-data-[highlighted]:text-cui-primary group-data-[selected]:text-cui-primary group-data-[selected=true]:text-cui-primary"),
505
+ children: e
506
+ }),
507
+ i,
508
+ t && /* @__PURE__ */ p("span", {
509
+ className: "text-cui-accent relative z-[1] ml-auto [&>svg]:size-4",
510
+ children: t
511
+ })
512
+ ]
513
+ });
514
+ }),
515
+ ItemIndicator: i(function({ className: e }, t) {
516
+ return /* @__PURE__ */ p("span", {
517
+ ref: t,
518
+ className: G("relative z-[1] ml-auto text-cui-secondary [&>svg]:size-4", e),
519
+ children: /* @__PURE__ */ p(y, {})
520
+ });
521
+ }),
522
+ List: i(function({ className: e, children: t, ...n }, r) {
523
+ return /* @__PURE__ */ p("div", {
524
+ ref: r,
525
+ className: G("flex max-h-[min(var(--available-height),280px)] flex-col gap-0.5 overflow-y-auto overscroll-contain outline-none", "[scrollbar-width:none] [&::-webkit-scrollbar]:hidden", e),
526
+ ...n,
527
+ children: t
528
+ });
529
+ }),
530
+ Separator: i(function({ className: e, ...t }, n) {
531
+ return /* @__PURE__ */ p("div", {
532
+ ref: n,
533
+ className: G("my-1 border-t border-cui-neutral", e),
534
+ ...t
535
+ });
536
+ }),
537
+ GroupLabel: i(function({ className: e, children: t, ...n }, r) {
538
+ return /* @__PURE__ */ p("div", {
539
+ ref: r,
540
+ className: G("px-2 py-1.5 text-xs font-medium text-cui-tertiary select-none", e),
541
+ ...n,
542
+ children: t
543
+ });
544
+ }),
545
+ Positioner: i(function({ className: e, children: t, ...n }, r) {
546
+ return /* @__PURE__ */ p("div", {
547
+ ref: r,
548
+ className: G("z-50 outline-none", e),
549
+ ...n,
550
+ children: t
551
+ });
552
+ }),
553
+ SearchInput: i(function({ className: e, children: t, ...n }, r) {
554
+ return /* @__PURE__ */ m("div", {
555
+ ref: r,
556
+ className: G("bg-cui-subtle border-cui-neutral mb-0.5 flex items-center gap-2 rounded-sm border px-2 py-1.5", e),
557
+ ...n,
558
+ children: [/* @__PURE__ */ p(D, { className: "text-cui-tertiary size-4 shrink-0" }), t]
559
+ });
560
+ }),
561
+ Empty: i(function({ className: e, children: t, ...n }, r) {
562
+ return /* @__PURE__ */ p("div", {
563
+ ref: r,
564
+ className: G("text-cui-secondary px-2 py-4 text-center text-sm empty:hidden", e),
565
+ ...n,
566
+ children: t
567
+ });
568
+ })
569
+ };
570
+ //#endregion
571
+ //#region src/components/combobox/combobox.tsx
572
+ function Le({ value: e, defaultValue: t, onValueChange: n, items: r, children: i, className: a }) {
573
+ let [o, s] = d("");
574
+ return /* @__PURE__ */ p(N.Root, {
575
+ value: e,
576
+ defaultValue: t,
577
+ onValueChange: n ? (e) => {
578
+ e != null && n(e);
579
+ } : void 0,
580
+ items: r,
581
+ inputValue: o,
582
+ onInputValueChange: s,
583
+ onOpenChange: (e) => {
584
+ e && s("");
585
+ },
586
+ autoHighlight: !0,
587
+ children: a ? /* @__PURE__ */ p("div", {
588
+ className: a,
589
+ children: i
590
+ }) : i
591
+ });
592
+ }
593
+ var Re = i(function({ children: e, className: t }, n) {
594
+ return /* @__PURE__ */ p(N.Trigger, {
595
+ ref: n,
596
+ className: G("cursor-pointer outline-none focus-visible:ring-2 focus-visible:ring-cui-focus focus-visible:ring-offset-2 rounded", t),
597
+ children: e
598
+ });
599
+ }), ze = i(function({ placeholder: e, className: t }, n) {
600
+ return /* @__PURE__ */ p(N.Trigger, {
601
+ ref: n,
602
+ render: /* @__PURE__ */ p(K, {
603
+ variant: "outline",
604
+ iconRight: /* @__PURE__ */ p(C, {}),
605
+ className: t,
606
+ children: /* @__PURE__ */ p(N.Value, { placeholder: e })
607
+ })
608
+ });
609
+ });
610
+ function Be({ align: e = "start", searchPlaceholder: t = "Search...", emptyMessage: n = "No results found.", minWidth: r = "min-w-[220px]", children: i, className: a }) {
611
+ let o = i ?? ((e) => /* @__PURE__ */ p(Ve, {
612
+ value: e.value,
613
+ icon: e.icon,
614
+ children: e.label
615
+ }, e.value));
616
+ return /* @__PURE__ */ p(N.Portal, { children: /* @__PURE__ */ p(N.Positioner, {
617
+ align: e,
618
+ sideOffset: 4,
619
+ render: /* @__PURE__ */ p(Y.Positioner, {}),
620
+ children: /* @__PURE__ */ m(N.Popup, {
621
+ render: /* @__PURE__ */ p(Y.Panel, {
622
+ minWidth: r,
623
+ className: a
624
+ }),
625
+ children: [
626
+ /* @__PURE__ */ p(Y.SearchInput, { children: /* @__PURE__ */ p(N.Input, {
627
+ placeholder: t,
628
+ className: "text-cui-primary placeholder:text-cui-tertiary flex-1 bg-transparent text-sm outline-none"
629
+ }) }),
630
+ /* @__PURE__ */ p(N.Empty, {
631
+ render: /* @__PURE__ */ p(Y.Empty, {}),
632
+ children: n
633
+ }),
634
+ /* @__PURE__ */ p(N.List, {
635
+ render: /* @__PURE__ */ p(Y.List, {}),
636
+ children: o
637
+ })
638
+ ]
639
+ })
640
+ }) });
641
+ }
642
+ var Ve = i(function({ value: e, icon: t, children: n, className: r }, i) {
643
+ return /* @__PURE__ */ m(N.Item, {
644
+ ref: i,
645
+ value: e,
646
+ render: /* @__PURE__ */ p(Y.Item, {
647
+ icon: t,
648
+ className: r
649
+ }),
650
+ children: [/* @__PURE__ */ p("span", {
651
+ className: "relative z-[1] flex-1",
652
+ children: n
653
+ }), /* @__PURE__ */ p(N.ItemIndicator, { render: /* @__PURE__ */ p(Y.ItemIndicator, {}) })]
654
+ });
655
+ }), He = {
656
+ xs: {
657
+ outer: "size-5",
658
+ text: "text-[8px]",
659
+ px: 20
660
+ },
661
+ sm: {
662
+ outer: "size-6",
663
+ text: "text-[10px]",
664
+ px: 24
665
+ },
666
+ md: {
667
+ outer: "size-8",
668
+ text: "text-xs",
669
+ px: 32
670
+ },
671
+ lg: {
672
+ outer: "size-10",
673
+ text: "text-sm",
674
+ px: 40
675
+ },
676
+ xl: {
677
+ outer: "size-16",
678
+ text: "text-lg",
679
+ px: 64
680
+ }
681
+ }, Ue = {
682
+ circle: "rounded-full",
683
+ square: "rounded-md"
684
+ }, We = {
685
+ neutral: "bg-cui-subtle text-cui-primary",
686
+ accent: "bg-cui-accent text-cui-accent-on",
687
+ danger: "bg-cui-danger text-cui-danger-on",
688
+ warning: "bg-cui-warn text-cui-warn-on",
689
+ success: "bg-cui-success text-cui-success-on"
690
+ };
691
+ function X(e, t = 0) {
692
+ let n = 3735928559 ^ t, r = 1103547991 ^ t;
693
+ for (let t = 0; t < e.length; t++) {
694
+ let i = e.charCodeAt(t);
695
+ n = Math.imul(n ^ i, 2654435761), r = Math.imul(r ^ i, 1597334677);
696
+ }
697
+ return n = Math.imul(n ^ n >>> 16, 2246822507), n ^= Math.imul(r ^ r >>> 13, 3266489909), r = Math.imul(r ^ r >>> 16, 2246822507), r ^= Math.imul(n ^ n >>> 13, 3266489909), 4294967296 * (2097151 & r) + (n >>> 0);
698
+ }
699
+ function Ge(e) {
700
+ return [
701
+ X(e, 0),
702
+ X(e, 1),
703
+ X(e, 2),
704
+ X(e, 3)
705
+ ];
706
+ }
707
+ function Ke(e, t, n, r) {
708
+ let i = e.filter(Boolean).length, a = Math.ceil(t * n);
709
+ if (i >= a) return;
710
+ let o = a - i, s = 0;
711
+ for (let n = 0; n < t && o > 0; n++) {
712
+ let i = (n * 7 + (r & 15)) % t;
713
+ e[i] || (e[i] = !0, o--), s++;
714
+ }
715
+ }
716
+ function qe(e, t) {
717
+ let n = Ge(e), r = n[0] ?? 0, i = n[1] ?? r, a = n[2] ?? r, o = (e) => n[e % n.length] ?? r;
718
+ switch (t) {
719
+ case "grid": {
720
+ let e = [];
721
+ for (let t = 0; t < 25; t++) {
722
+ let n = o(Math.floor(t / 26));
723
+ e.push((n >> t % 26 & 1) == 1);
724
+ }
725
+ return Ke(e, 25, .3, a), {
726
+ cols: 5,
727
+ rows: 5,
728
+ cells: e
729
+ };
730
+ }
731
+ case "symmetric": {
732
+ for (let e = 0; e < 4; e++) {
733
+ let t = Array(25).fill(!1), n = o(e), r = 0;
734
+ for (let e = 0; e < 5; e++) for (let i = 0; i <= 2; i++) {
735
+ let a = (n >> r % 26 & 1) == 1;
736
+ r++, t[e * 5 + i] = a, t[e * 5 + (4 - i)] = a;
737
+ }
738
+ let i = t.filter(Boolean).length / 25;
739
+ if (i >= .3 && i <= .8) return {
740
+ cols: 5,
741
+ rows: 5,
742
+ cells: t
743
+ };
744
+ }
745
+ let e = Array(25).fill(!1), t = r, n = 0;
746
+ for (let r = 0; r < 5; r++) for (let i = 0; i <= 2; i++) {
747
+ let a = (t >> n % 26 & 1) == 1;
748
+ n++, e[r * 5 + i] = a, e[r * 5 + (4 - i)] = a;
749
+ }
750
+ return {
751
+ cols: 5,
752
+ rows: 5,
753
+ cells: e
754
+ };
755
+ }
756
+ case "dense": {
757
+ let e = [];
758
+ for (let t = 0; t < 49; t++) {
759
+ let n = o(Math.floor(t / 26));
760
+ e.push((n >> t % 26 & 1) == 1);
761
+ }
762
+ return {
763
+ cols: 7,
764
+ rows: 7,
765
+ cells: e
766
+ };
767
+ }
768
+ case "quad": {
769
+ for (let e = 0; e < 4; e++) {
770
+ let t = Array(36).fill(!1), n = o(e), r = 0;
771
+ for (let e = 0; e < 3; e++) for (let i = 0; i < 3; i++) {
772
+ let a = (n >> r % 26 & 1) == 1;
773
+ r++, t[e * 6 + i] = a, t[e * 6 + (5 - i)] = a, t[(5 - e) * 6 + i] = a, t[(5 - e) * 6 + (5 - i)] = a;
774
+ }
775
+ let i = t.filter(Boolean).length / 36;
776
+ if (i >= .25 && i <= .8) return {
777
+ cols: 6,
778
+ rows: 6,
779
+ cells: t
780
+ };
781
+ }
782
+ let e = Array(36).fill(!1), t = r, n = 0;
783
+ for (let r = 0; r < 3; r++) for (let i = 0; i < 3; i++) {
784
+ let a = (t >> n % 26 & 1) == 1;
785
+ n++, e[r * 6 + i] = a, e[r * 6 + (5 - i)] = a, e[(5 - r) * 6 + i] = a, e[(5 - r) * 6 + (5 - i)] = a;
786
+ }
787
+ return {
788
+ cols: 6,
789
+ rows: 6,
790
+ cells: e
791
+ };
792
+ }
793
+ case "quad-dense": {
794
+ for (let e = 0; e < 4; e++) {
795
+ let t = Array(49).fill(!1), n = o(e), r = 0;
796
+ for (let e = 0; e <= 3; e++) for (let i = 0; i <= 3; i++) {
797
+ let a = (n >> r % 26 & 1) == 1;
798
+ r++, t[e * 7 + i] = a, t[e * 7 + (6 - i)] = a, t[(6 - e) * 7 + i] = a, t[(6 - e) * 7 + (6 - i)] = a;
799
+ }
800
+ let i = t.filter(Boolean).length / 49;
801
+ if (i >= .25 && i <= .8) return {
802
+ cols: 7,
803
+ rows: 7,
804
+ cells: t
805
+ };
806
+ }
807
+ let e = Array(49).fill(!1), t = r, n = 0;
808
+ for (let r = 0; r <= 3; r++) for (let i = 0; i <= 3; i++) {
809
+ let a = (t >> n % 26 & 1) == 1;
810
+ n++, e[r * 7 + i] = a, e[r * 7 + (6 - i)] = a, e[(6 - r) * 7 + i] = a, e[(6 - r) * 7 + (6 - i)] = a;
811
+ }
812
+ return {
813
+ cols: 7,
814
+ rows: 7,
815
+ cells: e
816
+ };
817
+ }
818
+ case "diagonal": {
819
+ let e = Array(36).fill(!1), t = r, n = i, a = 0;
820
+ for (let r = 0; r < 6; r++) for (let i = 0; i <= r; i++) {
821
+ let o = (t >> a % 26 & 1) == 1, s = (n >> a % 26 & 1) == 1, c = o || s;
822
+ a++, e[r * 6 + i] = c, e[i * 6 + r] = c;
823
+ }
824
+ return {
825
+ cols: 6,
826
+ rows: 6,
827
+ cells: e
828
+ };
829
+ }
830
+ case "sierpinski": {
831
+ let e = r, t = e & 7, n = e >> 3 & 7, i = (e >> 6 & 1) == 1, a = [];
832
+ for (let e = 0; e < 7; e++) for (let r = 0; r < 7; r++) {
833
+ let o = (e + n & 7 & r + t & 7) == 0;
834
+ a.push(i ? !o : o);
835
+ }
836
+ return {
837
+ cols: 7,
838
+ rows: 7,
839
+ cells: a
840
+ };
841
+ }
842
+ }
843
+ }
844
+ function Je(e) {
845
+ return X(e, 42) % 360;
846
+ }
847
+ function Ye(e) {
848
+ return {
849
+ "--ga-pixel": `light-dark(oklch(0.55 0.15 ${e}), oklch(0.7 0.14 ${e}))`,
850
+ "--ga-bg": `light-dark(oklch(0.92 0.03 ${e}), oklch(0.25 0.03 ${e}))`
851
+ };
852
+ }
853
+ function Xe({ seed: e, pattern: t, px: n, isCircle: r, className: i }) {
854
+ let { grid: a, hue: o } = l(() => ({
855
+ grid: qe(e, t),
856
+ hue: Je(e)
857
+ }), [e, t]), { cols: s, rows: c, cells: u } = a, d = t === "dense" || t === "quad-dense" ? 3 : 4, f = (100 - d * 2 - 3 * (s - 1)) / s, h = c * f + (c - 1) * 3, g = s * f + (s - 1) * 3, _ = d + (100 - d * 2 - h) / 2, v = d + (100 - d * 2 - g) / 2, y = X(e, 99), b = (e) => .55 + (y >> e % 26 & 3) * .15, x = `av-${X(e + t, 7) >>> 0}`, S = Ye(o), C = X(e, 77), w = (e) => {
858
+ let t = C >> e % 26 & 7, n = y >> (e + 5) % 26 & 7;
859
+ return {
860
+ duration: 1.5 + t * .35,
861
+ delay: n * .4
862
+ };
863
+ }, T = `ga-flk-${x}`;
864
+ return /* @__PURE__ */ m("svg", {
865
+ width: n,
866
+ height: n,
867
+ viewBox: "0 0 100 100",
868
+ className: G("shrink-0", i),
869
+ style: {
870
+ ...S,
871
+ "--ga-anim": "none"
872
+ },
873
+ onMouseEnter: (e) => e.currentTarget.style.setProperty("--ga-anim", T),
874
+ onMouseLeave: (e) => e.currentTarget.style.setProperty("--ga-anim", "none"),
875
+ role: "img",
876
+ "aria-label": `Avatar for ${e}`,
877
+ children: [
878
+ /* @__PURE__ */ p("style", { children: `
879
+ @keyframes ${T} {
880
+ 0%, 100% { opacity: var(--ga-o); }
881
+ 50% { opacity: calc(var(--ga-o) * 0.25); }
882
+ }
883
+ ` }),
884
+ r ? /* @__PURE__ */ p("circle", {
885
+ cx: 50,
886
+ cy: 50,
887
+ r: 50,
888
+ fill: "var(--ga-bg)"
889
+ }) : /* @__PURE__ */ p("rect", {
890
+ x: 0,
891
+ y: 0,
892
+ width: 100,
893
+ height: 100,
894
+ rx: 8,
895
+ fill: "var(--ga-bg)"
896
+ }),
897
+ /* @__PURE__ */ p("defs", { children: /* @__PURE__ */ p("clipPath", {
898
+ id: x,
899
+ children: r ? /* @__PURE__ */ p("circle", {
900
+ cx: 50,
901
+ cy: 50,
902
+ r: 50
903
+ }) : /* @__PURE__ */ p("rect", {
904
+ x: 0,
905
+ y: 0,
906
+ width: 100,
907
+ height: 100,
908
+ rx: 8
909
+ })
910
+ }) }),
911
+ /* @__PURE__ */ p("g", {
912
+ clipPath: `url(#${x})`,
913
+ children: u.map((e, t) => {
914
+ if (!e) return null;
915
+ let n = t % s, r = Math.floor(t / s), i = b(t), { duration: a, delay: o } = w(t);
916
+ return /* @__PURE__ */ p("rect", {
917
+ x: v + n * (f + 3),
918
+ y: _ + r * (f + 3),
919
+ width: f,
920
+ height: f,
921
+ fill: "var(--ga-pixel)",
922
+ opacity: i,
923
+ style: {
924
+ "--ga-o": i,
925
+ "animation-name": "var(--ga-anim)",
926
+ "animation-duration": `${a}s`,
927
+ "animation-timing-function": "ease-in-out",
928
+ "animation-delay": `${o}s`,
929
+ "animation-iteration-count": "infinite",
930
+ transition: "opacity 0.6s ease-out"
931
+ }
932
+ }, `${n}-${r}`);
933
+ })
934
+ })
935
+ ]
936
+ });
937
+ }
938
+ function Z({ src: e, initials: t, seed: n, generativePattern: r = "grid", alt: i, variant: a = "circle", size: o = "md", color: s = "neutral", className: c }) {
939
+ let l = He[o], u = Ue[a];
940
+ return e ? /* @__PURE__ */ p("img", {
941
+ src: e,
942
+ alt: i ?? t ?? n ?? "",
943
+ className: G("shrink-0 object-cover", l.outer, u, c)
944
+ }) : t ? /* @__PURE__ */ p("span", {
945
+ className: G("flex shrink-0 items-center justify-center font-semibold select-none", l.outer, l.text, u, We[s], c),
946
+ children: t
947
+ }) : n ? /* @__PURE__ */ p(Xe, {
948
+ seed: n,
949
+ pattern: r,
950
+ px: l.px,
951
+ isCircle: a === "circle",
952
+ className: c
953
+ }) : /* @__PURE__ */ p("span", { className: G("flex shrink-0 items-center justify-center font-semibold select-none", l.outer, l.text, u, We[s], c) });
954
+ }
955
+ //#endregion
956
+ //#region src/components/app-header/app-header.tsx
957
+ function Ze({ to: e, href: t, className: n, children: r }) {
958
+ return /* @__PURE__ */ p("a", {
959
+ href: e ?? t,
960
+ className: n,
961
+ children: r
962
+ });
963
+ }
964
+ function Qe() {
965
+ return /* @__PURE__ */ p("div", {
966
+ className: "flex w-4 shrink-0 items-center justify-center self-stretch",
967
+ children: /* @__PURE__ */ p("div", { className: "h-4 w-px rotate-[20deg] bg-[var(--text-color-cui-tertiary)] opacity-50" })
968
+ });
969
+ }
970
+ function $e({ item: e, asLink: t, LinkEl: n }) {
971
+ let r = G("flex items-center gap-2 h-8 px-2 text-sm font-medium text-cui-primary select-none", t && "outline-none rounded focus-visible:ring-2 focus-visible:ring-cui-focus focus-visible:ring-offset-2"), i = /* @__PURE__ */ m(f, { children: [e.icon && /* @__PURE__ */ p("span", {
972
+ className: "flex size-5 shrink-0 items-center justify-center [&>svg]:size-4",
973
+ children: e.icon
974
+ }), /* @__PURE__ */ p("span", { children: e.label })] });
975
+ return t && e.href ? /* @__PURE__ */ p(n, {
976
+ to: e.href,
977
+ href: e.href,
978
+ className: r,
979
+ children: i
980
+ }) : /* @__PURE__ */ p("span", {
981
+ className: r,
982
+ children: i
983
+ });
984
+ }
985
+ function et() {
986
+ return /* @__PURE__ */ p(Re, {
987
+ className: "rounded-sm",
988
+ children: /* @__PURE__ */ p(q, {
989
+ background: "bg-cui-subtle",
990
+ interactive: !0,
991
+ children: /* @__PURE__ */ p("span", {
992
+ className: "flex h-8 items-center justify-center px-0.5 select-none",
993
+ children: /* @__PURE__ */ p(C, { className: "text-cui-tertiary size-4" })
994
+ })
995
+ })
996
+ });
997
+ }
998
+ function tt({ item: e, LinkEl: t }) {
999
+ return e.selector && e.options ? /* @__PURE__ */ m(Le, {
1000
+ value: e.value,
1001
+ onValueChange: e.onSelect,
1002
+ items: e.options,
1003
+ children: [/* @__PURE__ */ m("span", {
1004
+ className: "flex items-center",
1005
+ children: [/* @__PURE__ */ p(q, {
1006
+ background: "bg-cui-subtle",
1007
+ interactive: !0,
1008
+ children: /* @__PURE__ */ p($e, {
1009
+ item: e,
1010
+ asLink: !!e.href,
1011
+ LinkEl: t
1012
+ })
1013
+ }), /* @__PURE__ */ p(et, {})]
1014
+ }), /* @__PURE__ */ p(Be, { searchPlaceholder: "Search..." })]
1015
+ }) : e.href ? /* @__PURE__ */ p(q, {
1016
+ background: "bg-cui-subtle",
1017
+ interactive: !0,
1018
+ children: /* @__PURE__ */ p($e, {
1019
+ item: e,
1020
+ asLink: !0,
1021
+ LinkEl: t
1022
+ })
1023
+ }) : /* @__PURE__ */ p(q, {
1024
+ background: "bg-cui-subtle",
1025
+ interactive: !0,
1026
+ children: /* @__PURE__ */ m("span", {
1027
+ className: "text-cui-primary flex h-8 items-center gap-2 px-2 text-sm font-medium select-none",
1028
+ children: [
1029
+ e.icon && /* @__PURE__ */ p("span", {
1030
+ className: "flex size-5 shrink-0 items-center justify-center [&>svg]:size-4",
1031
+ children: e.icon
1032
+ }),
1033
+ /* @__PURE__ */ p("span", { children: e.label }),
1034
+ e.selector && /* @__PURE__ */ p(C, { className: "text-cui-tertiary size-4" })
1035
+ ]
1036
+ })
1037
+ });
1038
+ }
1039
+ function nt({ items: e, linkComponent: t = Ze, className: n }) {
1040
+ return /* @__PURE__ */ m("nav", {
1041
+ className: G("flex items-center gap-1", n),
1042
+ children: [
1043
+ /* @__PURE__ */ p(t, {
1044
+ to: "/",
1045
+ href: "/",
1046
+ className: "focus-visible:ring-cui-focus flex size-8 shrink-0 items-center justify-center rounded outline-none focus-visible:ring-2 focus-visible:ring-offset-2",
1047
+ children: /* @__PURE__ */ p(Ie, {
1048
+ variant: "circle",
1049
+ className: "text-cui-primary"
1050
+ })
1051
+ }),
1052
+ /* @__PURE__ */ p(Qe, {}),
1053
+ e.map((e, n) => /* @__PURE__ */ m("span", {
1054
+ className: "flex items-center gap-1",
1055
+ children: [n > 0 && /* @__PURE__ */ p(Qe, {}), /* @__PURE__ */ p(tt, {
1056
+ item: e,
1057
+ LinkEl: t
1058
+ })]
1059
+ }, e.label))
1060
+ ]
1061
+ });
1062
+ }
1063
+ var rt = i(function({ children: e, className: t }, n) {
1064
+ return /* @__PURE__ */ p("div", {
1065
+ ref: n,
1066
+ className: G("flex items-center gap-2", t),
1067
+ children: e
1068
+ });
1069
+ }), it = i(function({ children: e, className: t }, n) {
1070
+ return /* @__PURE__ */ p("header", {
1071
+ ref: n,
1072
+ className: G("flex items-center justify-between px-3 py-2", t),
1073
+ children: e
1074
+ });
1075
+ });
1076
+ it.Breadcrumb = nt, it.Actions = rt, it.Avatar = Z;
1077
+ //#endregion
1078
+ //#region src/components/settings-card/settings-card.tsx
1079
+ var at = i(function({ title: e, description: t, toggle: n, toggled: r, onToggleChange: i, defaultToggled: a = !1, children: o, className: s }, c) {
1080
+ let [l, u] = d(a), f = r !== void 0, h = f ? r : l, g = n && h;
1081
+ function _(e) {
1082
+ f || u(e), i?.(e);
1083
+ }
1084
+ return /* @__PURE__ */ p(J, {
1085
+ ref: c,
1086
+ className: s,
1087
+ children: /* @__PURE__ */ m(J.Content, { children: [(e || t || n) && /* @__PURE__ */ p(J.Header, { children: /* @__PURE__ */ m("div", {
1088
+ className: "flex items-start justify-between gap-4",
1089
+ children: [/* @__PURE__ */ m("div", {
1090
+ className: "flex flex-1 flex-col",
1091
+ children: [e && /* @__PURE__ */ p("span", {
1092
+ className: "text-cui-primary text-sm font-medium",
1093
+ children: e
1094
+ }), t && /* @__PURE__ */ p("p", {
1095
+ className: "text-cui-secondary mt-1 text-sm leading-relaxed",
1096
+ children: t
1097
+ })]
1098
+ }), n && /* @__PURE__ */ p("div", {
1099
+ className: "shrink-0 pt-0.5",
1100
+ children: /* @__PURE__ */ p(Ee, {
1101
+ checked: h,
1102
+ onCheckedChange: _
1103
+ })
1104
+ })]
1105
+ }) }), /* @__PURE__ */ p(J, {
1106
+ variant: "nested",
1107
+ className: G("transition-opacity duration-150 ease-out", g && "opacity-50 pointer-events-none select-none"),
1108
+ children: o
1109
+ })] })
1110
+ });
1111
+ }), ot = i(function({ label: e, description: t, children: n, className: r }, i) {
1112
+ return /* @__PURE__ */ m(J.Section, {
1113
+ ref: i,
1114
+ className: G("flex justify-between items-start", r),
1115
+ children: [/* @__PURE__ */ m("div", {
1116
+ className: "mr-4 flex flex-1 flex-col gap-1",
1117
+ children: [/* @__PURE__ */ p("span", {
1118
+ className: "text-cui-primary text-sm font-medium",
1119
+ children: e
1120
+ }), t && /* @__PURE__ */ p("span", {
1121
+ className: "text-cui-secondary text-sm leading-relaxed",
1122
+ children: t
1123
+ })]
1124
+ }), n && /* @__PURE__ */ p("div", {
1125
+ className: "flex w-[340px] shrink-0 flex-col items-end",
1126
+ children: n
1127
+ })]
1128
+ });
1129
+ }), st = i(function({ header: e, nav: t, className: n, children: r }, i) {
1130
+ return /* @__PURE__ */ m("div", {
1131
+ ref: i,
1132
+ className: G("flex h-screen flex-col bg-cui-base-0", n),
1133
+ children: [e, /* @__PURE__ */ p("div", {
1134
+ className: "flex min-h-0 flex-1 px-2 pb-2",
1135
+ children: /* @__PURE__ */ m("div", {
1136
+ className: "bg-cui-base-1 ring-cui-neutral flex min-h-0 flex-1 flex-col rounded-lg ring-1",
1137
+ children: [/* @__PURE__ */ p("div", {
1138
+ className: "border-cui-neutral shrink-0 border-b",
1139
+ children: t
1140
+ }), /* @__PURE__ */ p("div", {
1141
+ className: "min-h-0 flex-1 overflow-auto",
1142
+ children: r
1143
+ })]
1144
+ })
1145
+ })]
1146
+ });
1147
+ });
1148
+ //#endregion
1149
+ //#region src/components/select/select.tsx
1150
+ function ct({ value: e, defaultValue: t, onValueChange: n, items: r, disabled: i, children: a, className: o }) {
1151
+ return /* @__PURE__ */ p(P.Root, {
1152
+ value: e,
1153
+ defaultValue: t,
1154
+ onValueChange: n ? (e) => {
1155
+ e != null && n(e);
1156
+ } : void 0,
1157
+ items: r,
1158
+ disabled: i,
1159
+ children: o ? /* @__PURE__ */ p("div", {
1160
+ className: o,
1161
+ children: a
1162
+ }) : a
1163
+ });
1164
+ }
1165
+ var lt = i(function({ children: e, className: t }, n) {
1166
+ return /* @__PURE__ */ p(P.Trigger, {
1167
+ ref: n,
1168
+ className: G("cursor-pointer outline-none focus-visible:ring-2 focus-visible:ring-cui-focus focus-visible:ring-offset-2 rounded", t),
1169
+ children: e
1170
+ });
1171
+ }), ut = i(function({ placeholder: e, className: t }, n) {
1172
+ return /* @__PURE__ */ p(P.Trigger, {
1173
+ ref: n,
1174
+ render: /* @__PURE__ */ p(K, {
1175
+ variant: "outline",
1176
+ iconRight: /* @__PURE__ */ p(C, {}),
1177
+ className: t,
1178
+ children: /* @__PURE__ */ p(P.Value, { placeholder: e })
1179
+ })
1180
+ });
1181
+ });
1182
+ function dt({ align: e = "start", side: t = "bottom", sideOffset: n = 4, minWidth: r = "min-w-[220px]", children: i, className: a }) {
1183
+ return /* @__PURE__ */ p(P.Portal, { children: /* @__PURE__ */ p(P.Positioner, {
1184
+ align: e,
1185
+ side: t,
1186
+ sideOffset: n,
1187
+ alignItemWithTrigger: !1,
1188
+ render: /* @__PURE__ */ p(Y.Positioner, {}),
1189
+ children: /* @__PURE__ */ p(P.Popup, {
1190
+ render: /* @__PURE__ */ p(Y.Panel, {
1191
+ minWidth: r,
1192
+ className: a
1193
+ }),
1194
+ children: /* @__PURE__ */ p(P.List, {
1195
+ render: /* @__PURE__ */ p(Y.List, {}),
1196
+ children: i
1197
+ })
1198
+ })
1199
+ }) });
1200
+ }
1201
+ var ft = i(function({ value: e, icon: t, children: n, className: r }, i) {
1202
+ return /* @__PURE__ */ m(P.Item, {
1203
+ ref: i,
1204
+ value: e,
1205
+ render: /* @__PURE__ */ p(Y.Item, {
1206
+ icon: t,
1207
+ className: r
1208
+ }),
1209
+ children: [/* @__PURE__ */ p(P.ItemText, {
1210
+ className: "relative z-[1] flex-1",
1211
+ children: n
1212
+ }), /* @__PURE__ */ p(P.ItemIndicator, { render: /* @__PURE__ */ p(Y.ItemIndicator, {}) })]
1213
+ });
1214
+ }), pt = i(function({ className: e }, t) {
1215
+ return /* @__PURE__ */ p(P.Separator, {
1216
+ ref: t,
1217
+ render: /* @__PURE__ */ p(Y.Separator, { className: e })
1218
+ });
1219
+ }), mt = i(function({ className: e, children: t }, n) {
1220
+ return /* @__PURE__ */ p(P.Group, {
1221
+ ref: n,
1222
+ className: G("flex flex-col", e),
1223
+ children: t
1224
+ });
1225
+ }), ht = i(function({ className: e, children: t }, n) {
1226
+ return /* @__PURE__ */ p(P.GroupLabel, {
1227
+ ref: n,
1228
+ render: /* @__PURE__ */ p(Y.GroupLabel, { className: e }),
1229
+ children: t
1230
+ });
1231
+ }), gt = i(function({ orientation: e = "horizontal", className: t, ...n }, r) {
1232
+ return /* @__PURE__ */ p(ne, {
1233
+ ref: r,
1234
+ orientation: e,
1235
+ className: G(e === "horizontal" ? "w-full border-t border-cui-neutral" : "self-stretch border-l border-cui-neutral", "shrink-0", t),
1236
+ ...n
1237
+ });
1238
+ }), _t = {
1239
+ neutral: "bg-cui-subtle text-cui-secondary",
1240
+ accent: "bg-cui-accent-subtle text-cui-accent",
1241
+ danger: "bg-cui-danger-subtle text-cui-danger",
1242
+ warning: "bg-cui-warn-subtle text-cui-warn",
1243
+ success: "bg-cui-success-subtle text-cui-success"
1244
+ }, vt = i(function({ variant: e = "neutral", className: t, children: n }, r) {
1245
+ return /* @__PURE__ */ p("span", {
1246
+ ref: r,
1247
+ className: G("inline-flex items-center rounded-md px-1.5 py-0.5 text-xs font-medium leading-tight", _t[e], t),
1248
+ children: n
1249
+ });
1250
+ }), yt = i(function({ className: e, ...t }, n) {
1251
+ return /* @__PURE__ */ p(F.Root, {
1252
+ ref: n,
1253
+ className: G("flex flex-col gap-1.5", e),
1254
+ ...t
1255
+ });
1256
+ }), bt = i(function({ required: e, className: t, children: n, ...r }, i) {
1257
+ return /* @__PURE__ */ m(F.Label, {
1258
+ ref: i,
1259
+ className: G("text-sm font-medium text-cui-primary", "data-[disabled]:text-cui-tertiary data-[disabled]:cursor-not-allowed", t),
1260
+ ...r,
1261
+ children: [n, e && /* @__PURE__ */ p("span", {
1262
+ className: "text-cui-danger ml-0.5",
1263
+ "aria-hidden": "true",
1264
+ children: "*"
1265
+ })]
1266
+ });
1267
+ }), xt = [
1268
+ "w-full rounded-md border border-cui-neutral bg-cui-base-2 px-3 py-1.5 text-sm text-cui-primary",
1269
+ "outline-none",
1270
+ "placeholder:text-cui-tertiary",
1271
+ "ring-cui-neutral ring-0 transition-[box-shadow,color,border-color] duration-150 ease-out",
1272
+ "focus:ring-2 focus:border-cui-neutral-strong",
1273
+ "motion-reduce:transition-none",
1274
+ "data-[disabled]:cursor-not-allowed data-[disabled]:opacity-50",
1275
+ "data-[invalid]:border-cui-danger data-[invalid]:focus:ring-cui-danger/30",
1276
+ "data-[valid]:border-cui-success"
1277
+ ], St = [
1278
+ "rounded-md border border-cui-neutral bg-cui-base-2 py-1.5 text-sm",
1279
+ "ring-cui-neutral ring-0 transition-[box-shadow,color,border-color] duration-150 ease-out",
1280
+ "has-[:focus]:ring-2 has-[:focus]:border-cui-neutral-strong",
1281
+ "motion-reduce:transition-none",
1282
+ "has-[*[data-disabled]]:cursor-not-allowed has-[*[data-disabled]]:opacity-50",
1283
+ "has-[*[data-invalid]]:border-cui-danger has-[*[data-invalid]:focus]:ring-cui-danger/30",
1284
+ "has-[*[data-valid]]:border-cui-success"
1285
+ ], Ct = {
1286
+ Field: yt,
1287
+ Label: bt,
1288
+ Input: i(function({ iconLeft: e, iconRight: t, wrapperClassName: n, className: r, ...i }, a) {
1289
+ return e || t ? /* @__PURE__ */ m("div", {
1290
+ className: G("flex items-center gap-2 px-2.5", St, n),
1291
+ children: [
1292
+ e && /* @__PURE__ */ p("span", {
1293
+ className: "text-cui-tertiary flex size-5 shrink-0 items-center justify-center [&>svg]:size-4",
1294
+ children: e
1295
+ }),
1296
+ /* @__PURE__ */ p(F.Control, {
1297
+ ref: a,
1298
+ className: G("flex-1 min-w-0 h-full bg-transparent text-sm text-cui-primary outline-none placeholder:text-cui-tertiary", r),
1299
+ ...i
1300
+ }),
1301
+ t && /* @__PURE__ */ p("span", {
1302
+ className: "text-cui-tertiary flex size-5 shrink-0 items-center justify-center [&>svg]:size-4",
1303
+ children: t
1304
+ })
1305
+ ]
1306
+ }) : /* @__PURE__ */ p(F.Control, {
1307
+ ref: a,
1308
+ className: G(xt, r),
1309
+ ...i
1310
+ });
1311
+ }),
1312
+ Textarea: i(function({ className: e, ...t }, n) {
1313
+ return /* @__PURE__ */ p(F.Control, {
1314
+ ref: n,
1315
+ render: /* @__PURE__ */ p("textarea", {}),
1316
+ className: G(xt, "min-h-20 resize-y", e),
1317
+ ...t
1318
+ });
1319
+ }),
1320
+ Hint: i(function({ className: e, ...t }, n) {
1321
+ return /* @__PURE__ */ p(F.Description, {
1322
+ ref: n,
1323
+ className: G("text-xs text-cui-tertiary data-[invalid]:text-cui-danger", e),
1324
+ ...t
1325
+ });
1326
+ })
1327
+ };
1328
+ //#endregion
1329
+ //#region src/components/flickering-grid/flickering-grid.tsx
1330
+ function wt(e, t) {
1331
+ let n = e.style.color;
1332
+ e.style.color = t;
1333
+ let r = getComputedStyle(e).color;
1334
+ return e.style.color = n, r || "#000";
1335
+ }
1336
+ function Tt({ squareSize: e = 6, gridGap: t = 0, flickerChance: n = .3, color: r = "currentColor", maxOpacity: i = .3, sweep: a = !1, sweepDirection: o = "left", sweepDuration: c = 2.5, sweepWidth: l = .15, sweepOnly: d = !1, sweepNoise: f = .12, className: m }) {
1337
+ let h = u(null), g = u(null);
1338
+ return s(() => {
1339
+ let s = h.current, u = g.current;
1340
+ if (!s || !u) return;
1341
+ let p = u.getContext("2d");
1342
+ if (!p) return;
1343
+ let m = wt(s, r), _ = 0, v = 0, y = new Float32Array(), b = new Float32Array(), x = 1, S = 0, C = 0, w = performance.now();
1344
+ function T() {
1345
+ if (!u || !s) return;
1346
+ x = window.devicePixelRatio || 1, S = s.clientWidth, C = s.clientHeight, u.width = S * x, u.height = C * x, u.style.width = `${S}px`, u.style.height = `${C}px`;
1347
+ let n = e + t;
1348
+ _ = Math.max(1, Math.floor((S + t) / n)), v = Math.max(1, Math.floor((C + t) / n)), y = new Float32Array(_ * v), b = new Float32Array(_ * v);
1349
+ for (let e = 0; e < y.length; e++) y[e] = Math.random() * i, b[e] = (Math.random() - .5) * 2 * f;
1350
+ }
1351
+ function E(e) {
1352
+ if (!d) for (let t = 0; t < y.length; t++) Math.random() < n * e && (y[t] = Math.random() * i);
1353
+ }
1354
+ function ee(n) {
1355
+ if (!p || !u) return;
1356
+ p.clearRect(0, 0, u.width, u.height), p.fillStyle = m;
1357
+ let r = e + t, s = 0;
1358
+ if (a) {
1359
+ let e = (n - w) / 1e3 / c % 1;
1360
+ s = o === "left" ? 1 - e : e, s = s * (1 + l * 2) - l;
1361
+ }
1362
+ for (let t = 0; t < _; t++) for (let n = 0; n < v; n++) {
1363
+ let o = t * v + n, c;
1364
+ if (d && a) {
1365
+ let e = (_ > 1 ? t / (_ - 1) : 0) + (b[o] ?? 0), n = Math.abs(e - s), r = Math.max(0, 1 - n / l);
1366
+ c = r * r * (3 - 2 * r) * i;
1367
+ } else if (c = y[o] ?? 0, a) {
1368
+ let e = _ > 1 ? t / (_ - 1) : 0, n = Math.abs(e - s), r = Math.max(0, 1 - n / l), a = r * r * (3 - 2 * r);
1369
+ c = Math.min(i * 1.5, c + a * i);
1370
+ }
1371
+ c < .01 || (p.globalAlpha = c, p.fillRect(t * r * x, n * r * x, e * x, e * x));
1372
+ }
1373
+ p.globalAlpha = 1;
1374
+ }
1375
+ T();
1376
+ let D = 0, O = performance.now(), k = !0;
1377
+ function A(e) {
1378
+ if (!k) return;
1379
+ let t = (e - O) / 1e3;
1380
+ O = e, E(t), ee(e), D = requestAnimationFrame(A);
1381
+ }
1382
+ let j = new ResizeObserver(() => {
1383
+ T();
1384
+ });
1385
+ j.observe(s);
1386
+ let te = new IntersectionObserver(([e]) => {
1387
+ k = e?.isIntersecting ?? !1, k ? (O = performance.now(), D = requestAnimationFrame(A)) : cancelAnimationFrame(D);
1388
+ }, { threshold: 0 });
1389
+ te.observe(u);
1390
+ let M = new MutationObserver(() => {
1391
+ m = wt(s, r);
1392
+ });
1393
+ return M.observe(document.documentElement, {
1394
+ attributes: !0,
1395
+ attributeFilter: ["data-theme", "class"]
1396
+ }), () => {
1397
+ cancelAnimationFrame(D), j.disconnect(), te.disconnect(), M.disconnect();
1398
+ };
1399
+ }, [
1400
+ e,
1401
+ t,
1402
+ n,
1403
+ r,
1404
+ i,
1405
+ a,
1406
+ o,
1407
+ c,
1408
+ l,
1409
+ d,
1410
+ f
1411
+ ]), /* @__PURE__ */ p("div", {
1412
+ ref: h,
1413
+ className: G("pointer-events-none size-full", m),
1414
+ "aria-hidden": "true",
1415
+ children: /* @__PURE__ */ p("canvas", { ref: g })
1416
+ });
1417
+ }
1418
+ //#endregion
1419
+ //#region src/components/skeleton/skeleton.tsx
1420
+ var Et = i(function({ circular: e, className: t }, n) {
1421
+ return /* @__PURE__ */ p("div", {
1422
+ ref: n,
1423
+ className: G("relative overflow-hidden bg-cui-subtle", e ? "rounded-full" : "rounded-xs", t),
1424
+ "aria-hidden": "true",
1425
+ children: /* @__PURE__ */ p(Tt, {
1426
+ squareSize: 4,
1427
+ gridGap: 2,
1428
+ color: "var(--text-color-cui-secondary)",
1429
+ maxOpacity: .05,
1430
+ sweep: !0,
1431
+ sweepOnly: !0,
1432
+ sweepDirection: "right",
1433
+ sweepDuration: 1.5,
1434
+ sweepWidth: .4,
1435
+ sweepNoise: .1
1436
+ })
1437
+ });
1438
+ });
1439
+ //#endregion
1440
+ //#region src/components/dropdown-menu/dropdown-menu.tsx
1441
+ function Dt({ open: e, defaultOpen: t, onOpenChange: n, modal: r = !0, children: i }) {
1442
+ return /* @__PURE__ */ p(I.Root, {
1443
+ open: e,
1444
+ defaultOpen: t,
1445
+ onOpenChange: n ? (e) => n(e) : void 0,
1446
+ modal: r,
1447
+ children: i
1448
+ });
1449
+ }
1450
+ var Ot = i(function({ className: e, ...t }, n) {
1451
+ return /* @__PURE__ */ p(I.Trigger, {
1452
+ ref: n,
1453
+ className: G("cursor-pointer outline-none", e),
1454
+ ...t
1455
+ });
1456
+ });
1457
+ function kt({ side: e = "bottom", align: t = "end", sideOffset: n = 4, minWidth: r = "min-w-[180px]", className: i, children: a }) {
1458
+ return /* @__PURE__ */ p(I.Portal, { children: /* @__PURE__ */ p(I.Positioner, {
1459
+ side: e,
1460
+ align: t,
1461
+ sideOffset: n,
1462
+ render: /* @__PURE__ */ p(Y.Positioner, {}),
1463
+ children: /* @__PURE__ */ p(I.Popup, {
1464
+ render: /* @__PURE__ */ p(Y.Panel, {
1465
+ minWidth: r,
1466
+ className: i
1467
+ }),
1468
+ children: a
1469
+ })
1470
+ }) });
1471
+ }
1472
+ var Q = {
1473
+ Root: Dt,
1474
+ Trigger: Ot,
1475
+ Content: kt,
1476
+ Item: i(function({ variant: e = "default", icon: t, onClick: n, closeOnClick: r, disabled: i, className: a, children: o }, s) {
1477
+ return /* @__PURE__ */ p(I.Item, {
1478
+ ref: s,
1479
+ onClick: n,
1480
+ closeOnClick: r,
1481
+ disabled: i,
1482
+ render: /* @__PURE__ */ p(Y.Item, {
1483
+ icon: t,
1484
+ variant: e,
1485
+ className: a
1486
+ }),
1487
+ children: /* @__PURE__ */ p("span", {
1488
+ className: "relative z-[1]",
1489
+ children: o
1490
+ })
1491
+ });
1492
+ }),
1493
+ Separator: i(function({ className: e }, t) {
1494
+ return /* @__PURE__ */ p(I.Separator, {
1495
+ ref: t,
1496
+ render: /* @__PURE__ */ p(Y.Separator, { className: e })
1497
+ });
1498
+ }),
1499
+ Label: i(function({ className: e, children: t }, n) {
1500
+ return /* @__PURE__ */ p(I.GroupLabel, {
1501
+ ref: n,
1502
+ render: /* @__PURE__ */ p(Y.GroupLabel, { className: e }),
1503
+ children: t
1504
+ });
1505
+ }),
1506
+ Group: i(function({ className: e, children: t }, n) {
1507
+ return /* @__PURE__ */ p(I.Group, {
1508
+ ref: n,
1509
+ className: G("flex flex-col", e),
1510
+ children: t
1511
+ });
1512
+ })
1513
+ };
1514
+ //#endregion
1515
+ //#region src/components/dialog/dialog.tsx
1516
+ function At({ ...e }) {
1517
+ return /* @__PURE__ */ p(L.Root, { ...e });
1518
+ }
1519
+ var jt = i(function({ className: e, ...t }, n) {
1520
+ return /* @__PURE__ */ p(L.Trigger, {
1521
+ ref: n,
1522
+ className: G(e),
1523
+ ...t
1524
+ });
1525
+ }), Mt = i(function({ className: e, ...t }, n) {
1526
+ return /* @__PURE__ */ p(L.Backdrop, {
1527
+ ref: n,
1528
+ className: G("fixed inset-0 z-40 bg-cui-overlay backdrop-blur-[2px]", "transition-opacity duration-150", "data-[starting-style]:opacity-0", "data-[ending-style]:opacity-0", "motion-reduce:transition-none", e),
1529
+ ...t
1530
+ });
1531
+ }), Nt = {
1532
+ md: "max-w-[450px]",
1533
+ lg: "max-w-[550px]"
1534
+ };
1535
+ function Pt({ size: e = "md", className: t, children: n, ...r }) {
1536
+ return /* @__PURE__ */ m(L.Portal, { children: [/* @__PURE__ */ p(Mt, {}), /* @__PURE__ */ p(L.Popup, {
1537
+ className: G("bg-cui-base-1 fixed top-1/2 left-1/2 z-50 max-h-[85vh] w-[90vw] -translate-x-1/2 -translate-y-1/2 rounded-lg p-0.5 shadow-xl", "transition-[opacity,scale] duration-150 ease-out", "data-[starting-style]:opacity-0 data-[starting-style]:scale-[0.96]", "data-[ending-style]:opacity-0 data-[ending-style]:scale-[0.98]", "motion-reduce:transition-none", "focus:outline-none", Nt[e], t),
1538
+ ...r,
1539
+ children: n
1540
+ })] });
1541
+ }
1542
+ var Ft = {
1543
+ Root: At,
1544
+ Trigger: jt,
1545
+ Content: Pt,
1546
+ Panel: i(function({ className: e, children: t }, n) {
1547
+ return /* @__PURE__ */ p("div", {
1548
+ ref: n,
1549
+ className: G("bg-cui-base-2 border-cui-neutral rounded-md border", e),
1550
+ children: t
1551
+ });
1552
+ }),
1553
+ Title: i(function({ className: e, ...t }, n) {
1554
+ return /* @__PURE__ */ p(L.Title, {
1555
+ ref: n,
1556
+ className: G("text-cui-primary border-cui-neutral border-b px-4 py-3 text-sm font-medium", e),
1557
+ ...t
1558
+ });
1559
+ }),
1560
+ Body: i(function({ className: e, children: t }, n) {
1561
+ return /* @__PURE__ */ p("div", {
1562
+ ref: n,
1563
+ className: G("p-4", e),
1564
+ children: t
1565
+ });
1566
+ }),
1567
+ Footer: i(function({ className: e, children: t }, n) {
1568
+ return /* @__PURE__ */ p("div", {
1569
+ ref: n,
1570
+ className: G("flex items-center justify-between p-2", e),
1571
+ children: t
1572
+ });
1573
+ }),
1574
+ Close: i(function({ className: e, ...t }, n) {
1575
+ return /* @__PURE__ */ p(L.Close, {
1576
+ ref: n,
1577
+ className: G(e),
1578
+ ...t
1579
+ });
1580
+ }),
1581
+ Description: i(function({ className: e, ...t }, n) {
1582
+ return /* @__PURE__ */ p(L.Description, {
1583
+ ref: n,
1584
+ className: G("text-cui-secondary", e),
1585
+ ...t
1586
+ });
1587
+ })
1588
+ }, $ = i(function({ className: e, children: t }, n) {
1589
+ return /* @__PURE__ */ p("div", {
1590
+ ref: n,
1591
+ className: G("overflow-hidden rounded ring-1 ring-cui-neutral", e),
1592
+ children: /* @__PURE__ */ p("table", {
1593
+ className: "w-full table-fixed border-separate border-spacing-0",
1594
+ children: t
1595
+ })
1596
+ });
1597
+ }), It = i(function({ className: e, children: t }, n) {
1598
+ return /* @__PURE__ */ p("thead", {
1599
+ ref: n,
1600
+ className: G("[&>tr]:bg-cui-subtle [&>tr]:text-sm [&>tr]:font-medium [&>tr]:text-cui-secondary", e),
1601
+ children: t
1602
+ });
1603
+ }), Lt = i(function({ className: e, children: t }, n) {
1604
+ return /* @__PURE__ */ p("tbody", {
1605
+ ref: n,
1606
+ className: G("[&>tr:not(:last-child)>td]:border-b [&>tr:not(:last-child)>td]:border-cui-neutral", e),
1607
+ children: t
1608
+ });
1609
+ }), Rt = i(function({ className: e, children: t, onClick: n, ...r }, i) {
1610
+ return /* @__PURE__ */ p("tr", {
1611
+ ref: i,
1612
+ className: G("bg-cui-base-1 hover:bg-cui-subtle", "transition-colors duration-100 ease-out motion-reduce:transition-none", n && "cursor-pointer", e),
1613
+ onClick: n,
1614
+ ...r,
1615
+ children: t
1616
+ });
1617
+ }), zt = i(function({ width: e, colSpan: t, className: n, children: r }, i) {
1618
+ return /* @__PURE__ */ p("th", {
1619
+ ref: i,
1620
+ style: e == null ? void 0 : { width: e },
1621
+ colSpan: t,
1622
+ className: G("px-4 py-2.5 text-left font-medium border-b border-cui-neutral", n),
1623
+ children: r
1624
+ });
1625
+ }), Bt = i(function({ width: e, colSpan: t, className: n, children: r }, i) {
1626
+ return /* @__PURE__ */ p("td", {
1627
+ ref: i,
1628
+ style: e == null ? void 0 : { width: e },
1629
+ colSpan: t,
1630
+ className: G("px-4 py-3 text-sm", n),
1631
+ children: r
1632
+ });
1633
+ });
1634
+ $.Header = It, $.Body = Lt, $.Row = Rt, $.HeaderCell = zt, $.Cell = Bt;
1635
+ //#endregion
1636
+ //#region src/components/pagination/pagination.tsx
1637
+ function Vt(e, t) {
1638
+ let n = [];
1639
+ for (let r = e; r <= t; r++) n.push(r);
1640
+ return n;
1641
+ }
1642
+ function Ht(e, t, n) {
1643
+ if (t <= n * 2 + 5) return Vt(1, t);
1644
+ let r = Math.max(e - n, 1), i = Math.min(e + n, t), a = r > 2, o = i < t - 1;
1645
+ return !a && o ? [
1646
+ ...Vt(1, n * 2 + 3),
1647
+ "ellipsis-end",
1648
+ t
1649
+ ] : a && !o ? [
1650
+ 1,
1651
+ "ellipsis-start",
1652
+ ...Vt(t - (n * 2 + 3) + 1, t)
1653
+ ] : [
1654
+ 1,
1655
+ "ellipsis-start",
1656
+ ...Vt(r, i),
1657
+ "ellipsis-end",
1658
+ t
1659
+ ];
1660
+ }
1661
+ function Ut({ page: e, active: t, onClick: n }) {
1662
+ return /* @__PURE__ */ p("button", {
1663
+ type: "button",
1664
+ "aria-current": t ? "page" : void 0,
1665
+ onClick: n,
1666
+ className: G("size-7 rounded-sm flex items-center justify-center text-sm tabular-nums select-none cursor-pointer", "outline-none focus-visible:ring-2 focus-visible:ring-cui-focus", "transition-colors duration-150 motion-reduce:transition-none", t ? "bg-cui-base-2 text-cui-primary font-medium shadow-sm" : "text-cui-secondary hover:text-cui-primary hover:bg-cui-subtle"),
1667
+ children: e
1668
+ });
1669
+ }
1670
+ function Wt() {
1671
+ return /* @__PURE__ */ p("span", {
1672
+ className: "text-cui-tertiary flex size-7 items-center justify-center text-sm select-none",
1673
+ children: "..."
1674
+ });
1675
+ }
1676
+ function Gt({ direction: e, disabled: t, onClick: n }) {
1677
+ let r = e === "prev" ? x : S;
1678
+ return /* @__PURE__ */ p("button", {
1679
+ type: "button",
1680
+ "aria-label": e === "prev" ? "Previous page" : "Next page",
1681
+ disabled: t,
1682
+ onClick: n,
1683
+ className: G("size-7 rounded-sm flex items-center justify-center cursor-pointer select-none", "outline-none focus-visible:ring-2 focus-visible:ring-cui-focus", "transition-colors duration-150 motion-reduce:transition-none", t ? "text-disabled pointer-events-none" : "text-cui-secondary hover:text-cui-primary hover:bg-cui-subtle"),
1684
+ children: /* @__PURE__ */ p(r, { className: "size-4" })
1685
+ });
1686
+ }
1687
+ function Kt({ page: e, pageCount: t, onPageChange: n, totalItems: r, rowsPerPage: i = 10, onRowsPerPageChange: a, rowOptions: o = [
1688
+ 10,
1689
+ 25,
1690
+ 50
1691
+ ], siblingCount: s = 1, className: c }) {
1692
+ let l = a !== void 0, u = r !== void 0, d = t > 1, f = (e - 1) * i + 1, h = r ? Math.min(e * i, r) : e * i;
1693
+ if (!d && !l && !u) return null;
1694
+ let g = d ? Ht(e, t, s) : [];
1695
+ return /* @__PURE__ */ m("nav", {
1696
+ "aria-label": "Pagination",
1697
+ className: G("flex items-center bg-cui-subtle rounded-md ring-1 ring-cui-neutral", c),
1698
+ children: [
1699
+ l && /* @__PURE__ */ m("div", {
1700
+ className: "flex h-9 items-center gap-2 px-3",
1701
+ children: [/* @__PURE__ */ p("span", {
1702
+ className: "text-cui-tertiary text-sm whitespace-nowrap",
1703
+ children: "Rows per page"
1704
+ }), /* @__PURE__ */ m(Q.Root, { children: [/* @__PURE__ */ p(Q.Trigger, { children: /* @__PURE__ */ m("button", {
1705
+ type: "button",
1706
+ className: G("flex items-center gap-1 h-6 px-1.5 rounded-sm text-sm text-cui-primary tabular-nums cursor-pointer select-none", "outline-none focus-visible:ring-2 focus-visible:ring-cui-focus", "hover:bg-cui-subtle transition-colors duration-150 motion-reduce:transition-none"),
1707
+ children: [i, /* @__PURE__ */ p(C, { className: "text-cui-tertiary size-3.5" })]
1708
+ }) }), /* @__PURE__ */ p(Q.Content, {
1709
+ align: "start",
1710
+ sideOffset: 4,
1711
+ minWidth: "min-w-[80px]",
1712
+ children: o.map((e) => /* @__PURE__ */ p(Q.Item, {
1713
+ onClick: () => a?.(e),
1714
+ children: e
1715
+ }, e))
1716
+ })] })]
1717
+ }),
1718
+ l && d && /* @__PURE__ */ p("div", { className: "w-px self-stretch bg-[var(--border-color-cui-neutral)]" }),
1719
+ d && /* @__PURE__ */ m("div", {
1720
+ className: "flex h-9 items-center gap-0.5 px-1.5",
1721
+ children: [
1722
+ /* @__PURE__ */ p(Gt, {
1723
+ direction: "prev",
1724
+ disabled: e <= 1,
1725
+ onClick: () => n?.(e - 1)
1726
+ }),
1727
+ g.map((t) => typeof t == "number" ? /* @__PURE__ */ p(Ut, {
1728
+ page: t,
1729
+ active: t === e,
1730
+ onClick: () => n?.(t)
1731
+ }, t) : /* @__PURE__ */ p(Wt, {}, t)),
1732
+ /* @__PURE__ */ p(Gt, {
1733
+ direction: "next",
1734
+ disabled: e >= t,
1735
+ onClick: () => n?.(e + 1)
1736
+ })
1737
+ ]
1738
+ }),
1739
+ u && (d || l) && /* @__PURE__ */ p("div", { className: "w-px self-stretch bg-[var(--border-color-cui-neutral)]" }),
1740
+ u && /* @__PURE__ */ p("div", {
1741
+ className: "flex h-9 items-center px-3",
1742
+ children: /* @__PURE__ */ m("span", {
1743
+ className: "text-cui-tertiary text-sm whitespace-nowrap tabular-nums",
1744
+ children: [
1745
+ f,
1746
+ "–",
1747
+ h,
1748
+ " / ",
1749
+ r
1750
+ ]
1751
+ })
1752
+ })
1753
+ ]
1754
+ });
1755
+ }
1756
+ //#endregion
1757
+ //#region src/components/data-table/data-table.tsx
1758
+ function qt({ direction: e }) {
1759
+ return e === "asc" ? /* @__PURE__ */ p(w, { className: "text-cui-primary size-3.5" }) : e === "desc" ? /* @__PURE__ */ p(b, { className: "text-cui-primary size-3.5" }) : /* @__PURE__ */ p(C, { className: "text-cui-tertiary size-3.5 opacity-0 transition-opacity group-hover:opacity-100" });
1760
+ }
1761
+ function Jt({ columns: e, data: t, sortable: n = !1, paginated: r = !1, pageSize: i = 10, pageSizeOptions: a = [
1762
+ 10,
1763
+ 25,
1764
+ 50
1765
+ ], selectable: o = !1, rowSelection: s, onRowSelectionChange: c, onRowClick: l, emptyMessage: u = "No results.", className: f, tableOptions: h }) {
1766
+ let [g, _] = d([]), [v, y] = d([]), [b, x] = d({}), [S, C] = d({}), w = s ?? S, T = c ? (e) => {
1767
+ c(typeof e == "function" ? e(w) : e);
1768
+ } : C, E = o ? [{
1769
+ id: "_select",
1770
+ header: ({ table: e }) => /* @__PURE__ */ p(Oe, {
1771
+ checked: e.getIsAllPageRowsSelected(),
1772
+ indeterminate: e.getIsSomePageRowsSelected(),
1773
+ onCheckedChange: (t) => e.toggleAllPageRowsSelected(t)
1774
+ }),
1775
+ cell: ({ row: e }) => /* @__PURE__ */ p(Oe, {
1776
+ checked: e.getIsSelected(),
1777
+ disabled: !e.getCanSelect(),
1778
+ onCheckedChange: (t) => e.toggleSelected(t)
1779
+ }),
1780
+ enableSorting: !1,
1781
+ enableHiding: !1,
1782
+ size: 40
1783
+ }, ...e] : e, { state: ee, ...D } = h ?? {}, O = ce({
1784
+ data: t,
1785
+ columns: E,
1786
+ state: {
1787
+ sorting: g,
1788
+ columnFilters: v,
1789
+ columnVisibility: b,
1790
+ rowSelection: w,
1791
+ ...ee
1792
+ },
1793
+ onSortingChange: _,
1794
+ onColumnFiltersChange: y,
1795
+ onColumnVisibilityChange: x,
1796
+ onRowSelectionChange: T,
1797
+ getCoreRowModel: ie(),
1798
+ getSortedRowModel: se(),
1799
+ getFilteredRowModel: ae(),
1800
+ ...r && { getPaginationRowModel: oe() },
1801
+ enableRowSelection: o,
1802
+ initialState: { pagination: { pageSize: i } },
1803
+ ...D
1804
+ }), k = O.getPageCount(), A = O.getState().pagination.pageIndex + 1, j = O.getState().pagination.pageSize;
1805
+ return /* @__PURE__ */ m("div", {
1806
+ className: G("flex flex-col gap-3", f),
1807
+ children: [/* @__PURE__ */ m($, { children: [/* @__PURE__ */ p($.Header, { children: O.getHeaderGroups().map((e) => /* @__PURE__ */ p($.Row, { children: e.headers.map((e) => {
1808
+ let t = n && e.column.getCanSort(), r = e.column.getIsSorted();
1809
+ return /* @__PURE__ */ p($.HeaderCell, {
1810
+ width: e.getSize() === 150 ? void 0 : e.getSize(),
1811
+ className: G(t && "cursor-pointer select-none group"),
1812
+ children: e.isPlaceholder ? null : /* @__PURE__ */ m("button", {
1813
+ type: "button",
1814
+ className: G("flex items-center gap-1", t && "cursor-pointer"),
1815
+ onClick: t ? e.column.getToggleSortingHandler() : void 0,
1816
+ tabIndex: t ? 0 : -1,
1817
+ children: [re(e.column.columnDef.header, e.getContext()), t && /* @__PURE__ */ p(qt, { direction: r })]
1818
+ })
1819
+ }, e.id);
1820
+ }) }, e.id)) }), /* @__PURE__ */ p($.Body, { children: O.getRowModel().rows.length > 0 ? O.getRowModel().rows.map((e) => /* @__PURE__ */ p($.Row, {
1821
+ onClick: l ? () => l(e) : void 0,
1822
+ className: G(e.getIsSelected() && "bg-cui-subtle"),
1823
+ children: e.getVisibleCells().map((e) => /* @__PURE__ */ p($.Cell, {
1824
+ width: e.column.getSize() === 150 ? void 0 : e.column.getSize(),
1825
+ children: re(e.column.columnDef.cell, e.getContext())
1826
+ }, e.id))
1827
+ }, e.id)) : /* @__PURE__ */ p($.Row, { children: /* @__PURE__ */ p($.Cell, {
1828
+ colSpan: E.length,
1829
+ className: "text-cui-tertiary py-8 text-center",
1830
+ children: u
1831
+ }) }) })] }), r && k > 0 && /* @__PURE__ */ m("div", {
1832
+ className: "flex items-center justify-between",
1833
+ children: [o && /* @__PURE__ */ m("span", {
1834
+ className: "text-cui-secondary text-sm",
1835
+ children: [
1836
+ O.getFilteredSelectedRowModel().rows.length,
1837
+ " of",
1838
+ " ",
1839
+ O.getFilteredRowModel().rows.length,
1840
+ " row(s) selected"
1841
+ ]
1842
+ }), /* @__PURE__ */ p("div", {
1843
+ className: G(!o && "ml-auto"),
1844
+ children: /* @__PURE__ */ p(Kt, {
1845
+ page: A,
1846
+ pageCount: k,
1847
+ onPageChange: (e) => O.setPageIndex(e - 1),
1848
+ totalItems: O.getFilteredRowModel().rows.length,
1849
+ rowsPerPage: j,
1850
+ onRowsPerPageChange: (e) => O.setPageSize(e),
1851
+ rowOptions: a
1852
+ })
1853
+ })]
1854
+ })]
1855
+ });
1856
+ }
1857
+ //#endregion
1858
+ //#region src/components/data-table/data-table-toolbar.tsx
1859
+ function Yt({ children: e, className: t }) {
1860
+ return /* @__PURE__ */ p("div", {
1861
+ className: G("flex flex-wrap items-center gap-2", t),
1862
+ children: e
1863
+ });
1864
+ }
1865
+ //#endregion
1866
+ //#region src/components/data-table/data-table-search.tsx
1867
+ function Xt({ value: e, onChange: t, placeholder: n = "Search...", className: r }) {
1868
+ let i = u(null), o = a(() => {
1869
+ t(""), i.current?.focus();
1870
+ }, [t]);
1871
+ return /* @__PURE__ */ m("div", {
1872
+ className: G("border-cui-neutral bg-cui-base-2 flex h-8 max-w-sm items-center gap-2 rounded-md border px-2.5", "ring-cui-neutral ring-0 transition-[box-shadow,border-color] duration-150 ease-out", "has-[:focus]:ring-2 has-[:focus]:border-cui-neutral-strong", "motion-reduce:transition-none", r),
1873
+ children: [
1874
+ /* @__PURE__ */ p(D, { className: "text-cui-tertiary size-4 shrink-0" }),
1875
+ /* @__PURE__ */ p("input", {
1876
+ ref: i,
1877
+ type: "text",
1878
+ value: e,
1879
+ onChange: (e) => t(e.target.value),
1880
+ placeholder: n,
1881
+ className: "text-cui-primary placeholder:text-cui-tertiary min-w-0 flex-1 bg-transparent text-sm outline-none"
1882
+ }),
1883
+ e && /* @__PURE__ */ p("button", {
1884
+ type: "button",
1885
+ onClick: o,
1886
+ className: "text-cui-tertiary hover:text-cui-secondary shrink-0 rounded-sm p-0.5 transition-colors",
1887
+ children: /* @__PURE__ */ p(M, { className: "size-3.5" })
1888
+ })
1889
+ ]
1890
+ });
1891
+ }
1892
+ //#endregion
1893
+ //#region src/components/popover/popover.tsx
1894
+ function Zt(e) {
1895
+ return /* @__PURE__ */ p(R.Root, { ...e });
1896
+ }
1897
+ var Qt = i(function({ className: e, ...t }, n) {
1898
+ return /* @__PURE__ */ p(R.Trigger, {
1899
+ ref: n,
1900
+ className: G("cursor-pointer outline-none", e),
1901
+ ...t
1902
+ });
1903
+ });
1904
+ function $t({ side: e = "bottom", align: t = "center", sideOffset: n = 4, className: r, children: i, ...a }) {
1905
+ return /* @__PURE__ */ p(R.Portal, { children: /* @__PURE__ */ p(R.Positioner, {
1906
+ side: e,
1907
+ align: t,
1908
+ sideOffset: n,
1909
+ className: "z-50 outline-none",
1910
+ children: /* @__PURE__ */ p(R.Popup, {
1911
+ className: G("bg-cui-base-2 border border-cui-neutral rounded-md shadow-md p-3", "origin-[var(--transform-origin)] will-change-[transform,opacity]", "transition-[transform,scale,opacity] duration-200 ease-cui-out-expo", "data-[starting-style]:scale-[0.96] data-[starting-style]:opacity-0", "data-[ending-style]:scale-[0.96] data-[ending-style]:opacity-0 data-[ending-style]:duration-150", "motion-reduce:transition-none", "focus:outline-none", r),
1912
+ ...a,
1913
+ children: i
1914
+ })
1915
+ }) });
1916
+ }
1917
+ var en = {
1918
+ Root: Zt,
1919
+ Trigger: Qt,
1920
+ Content: $t,
1921
+ Arrow: i(function({ className: e, ...t }, n) {
1922
+ return /* @__PURE__ */ p(R.Arrow, {
1923
+ ref: n,
1924
+ className: G("fill-base-2 stroke-neutral [stroke-width:1px]", "data-[side=top]:bottom-[-5px]", "data-[side=bottom]:top-[-5px]", "data-[side=left]:right-[-5px]", "data-[side=right]:left-[-5px]", e),
1925
+ ...t
1926
+ });
1927
+ }),
1928
+ Close: i(function({ className: e, ...t }, n) {
1929
+ return /* @__PURE__ */ p(R.Close, {
1930
+ ref: n,
1931
+ className: G(e),
1932
+ ...t
1933
+ });
1934
+ }),
1935
+ Title: i(function({ className: e, children: t }, n) {
1936
+ return /* @__PURE__ */ p("p", {
1937
+ ref: n,
1938
+ className: G("text-cui-primary text-sm font-medium", e),
1939
+ children: t
1940
+ });
1941
+ }),
1942
+ Description: i(function({ className: e, ...t }, n) {
1943
+ return /* @__PURE__ */ p(R.Description, {
1944
+ ref: n,
1945
+ className: G("text-cui-secondary mt-1 text-sm", e),
1946
+ ...t
1947
+ });
1948
+ })
1949
+ };
1950
+ //#endregion
1951
+ //#region src/components/data-table/data-table-faceted-filter.tsx
1952
+ function tn({ column: e, title: t, options: n, value: r, onValueChange: i }) {
1953
+ let [a, o] = d(""), s = u(null), c = e?.getFacetedUniqueValues(), l = r ?? e?.getFilterValue() ?? [], h = new Set(l), g = h.size > 0, _ = a ? n.filter((e) => e.label.toLowerCase().includes(a.toLowerCase())) : n;
1954
+ function v(t) {
1955
+ i ? i(t) : e?.setFilterValue(t.length ? t : void 0);
1956
+ }
1957
+ function b(e) {
1958
+ let t = new Set(h);
1959
+ t.has(e) ? t.delete(e) : t.add(e), v(Array.from(t));
1960
+ }
1961
+ return /* @__PURE__ */ m(en.Root, {
1962
+ onOpenChange: (e) => {
1963
+ e ? requestAnimationFrame(() => {
1964
+ s.current?.focus({ preventScroll: !0 });
1965
+ }) : o("");
1966
+ },
1967
+ children: [/* @__PURE__ */ m(en.Trigger, {
1968
+ render: /* @__PURE__ */ p("button", { type: "button" }),
1969
+ className: G("border-cui-neutral inline-flex h-8 items-center rounded-md border text-sm", g ? "gap-1 border-solid py-1 pl-2.5 pr-2.5" : "gap-1.5 border-dashed px-3", "hover:bg-cui-subtle cursor-pointer transition-colors", "ring-cui-focus outline-none focus-visible:ring-2 focus-visible:ring-offset-2"),
1970
+ children: [
1971
+ /* @__PURE__ */ p(A, { className: "text-cui-tertiary size-4 shrink-0" }),
1972
+ /* @__PURE__ */ p("span", {
1973
+ className: "text-cui-primary",
1974
+ children: t
1975
+ }),
1976
+ g && /* @__PURE__ */ m(f, { children: [
1977
+ /* @__PURE__ */ p("div", { className: "border-cui-neutral mx-0.5 h-4 w-px border-l" }),
1978
+ /* @__PURE__ */ p(vt, {
1979
+ className: "rounded-sm px-1 font-normal lg:hidden",
1980
+ children: h.size
1981
+ }),
1982
+ /* @__PURE__ */ p("span", {
1983
+ className: "hidden items-center gap-1 lg:flex",
1984
+ children: h.size > 2 ? /* @__PURE__ */ m(vt, {
1985
+ className: "rounded-sm px-1 font-normal",
1986
+ children: [h.size, " selected"]
1987
+ }) : n.filter((e) => h.has(e.value)).map((e) => /* @__PURE__ */ p(vt, {
1988
+ className: "rounded-sm px-1 font-normal",
1989
+ children: e.label
1990
+ }, e.value))
1991
+ })
1992
+ ] })
1993
+ ]
1994
+ }), /* @__PURE__ */ m(en.Content, {
1995
+ side: "bottom",
1996
+ align: "start",
1997
+ sideOffset: 4,
1998
+ className: "w-[220px] p-1",
1999
+ children: [
2000
+ /* @__PURE__ */ p(Y.SearchInput, {
2001
+ className: "mx-0 mt-0",
2002
+ children: /* @__PURE__ */ p("input", {
2003
+ ref: s,
2004
+ value: a,
2005
+ onChange: (e) => o(e.target.value),
2006
+ placeholder: t,
2007
+ className: "text-cui-primary placeholder:text-cui-tertiary flex-1 bg-transparent text-sm outline-none"
2008
+ })
2009
+ }),
2010
+ /* @__PURE__ */ m(Y.List, { children: [_.length === 0 && /* @__PURE__ */ p(Y.Empty, { children: "No results found." }), _.map((e) => {
2011
+ let t = h.has(e.value);
2012
+ return /* @__PURE__ */ m(Y.Item, {
2013
+ onClick: () => b(e.value),
2014
+ icon: /* @__PURE__ */ p("div", {
2015
+ className: G("flex size-4 items-center justify-center rounded border", t ? "border-cui-accent bg-cui-accent text-cui-inverse" : "border-cui-neutral [&_svg]:invisible"),
2016
+ children: /* @__PURE__ */ p(y, { className: "size-3" })
2017
+ }),
2018
+ indicator: c?.get(e.value) == null ? void 0 : /* @__PURE__ */ p("span", {
2019
+ className: "text-cui-tertiary font-mono text-xs",
2020
+ children: c.get(e.value)
2021
+ }),
2022
+ children: [e.icon && /* @__PURE__ */ p("span", {
2023
+ className: "text-cui-secondary flex size-4 shrink-0 items-center justify-center [&>svg]:size-3.5",
2024
+ children: e.icon
2025
+ }), /* @__PURE__ */ p("span", {
2026
+ className: "relative z-[1]",
2027
+ children: e.label
2028
+ })]
2029
+ }, e.value);
2030
+ })] }),
2031
+ g && /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p(Y.Separator, {}), /* @__PURE__ */ p(Y.Item, {
2032
+ onClick: () => v([]),
2033
+ className: "justify-center",
2034
+ children: /* @__PURE__ */ p("span", {
2035
+ className: "relative z-[1]",
2036
+ children: "Clear filters"
2037
+ })
2038
+ })] })
2039
+ ]
2040
+ })]
2041
+ });
2042
+ }
2043
+ //#endregion
2044
+ //#region src/components/segmented-group/segmented-group.tsx
2045
+ var nn = i(function({ activeIndex: e, itemCount: t, layout: n = "fill", className: r, children: i }, o) {
2046
+ let s = n === "fill", l = u(null), [f, h] = d(null), g = u(!1), _ = a(() => {
2047
+ if (n !== "fit") return;
2048
+ let t = l.current;
2049
+ if (!t) return;
2050
+ let r = t.querySelectorAll("[data-segmented-item]")[e];
2051
+ if (!r) return;
2052
+ let i = !g.current;
2053
+ g.current = !0, h({
2054
+ left: r.offsetLeft,
2055
+ width: r.offsetWidth
2056
+ }), i && r.offsetHeight;
2057
+ }, [e, n]);
2058
+ c(() => {
2059
+ _();
2060
+ let e = l.current;
2061
+ if (!e || n !== "fit") return;
2062
+ let t = new ResizeObserver(_);
2063
+ return t.observe(e), () => t.disconnect();
2064
+ }, [_, n]);
2065
+ let v = s ? {
2066
+ width: `calc(100% / ${t})`,
2067
+ transform: `translateX(${e * 100}%)`
2068
+ } : f ? {
2069
+ left: f.left,
2070
+ width: f.width,
2071
+ transition: g.current ? void 0 : "none"
2072
+ } : { opacity: 0 };
2073
+ return /* @__PURE__ */ m("div", {
2074
+ ref: (e) => {
2075
+ l.current = e, typeof o == "function" ? o(e) : o && (o.current = e);
2076
+ },
2077
+ className: G("relative bg-cui-base-0 rounded-md ring-1 ring-cui-neutral", s ? "grid" : "inline-flex", r),
2078
+ style: s ? { gridTemplateColumns: `repeat(${t}, 1fr)` } : void 0,
2079
+ children: [/* @__PURE__ */ p("div", {
2080
+ "aria-hidden": !0,
2081
+ className: G("absolute inset-y-0 p-0.5", "transition-all duration-200 ease-cui-out-expo", "motion-reduce:transition-none", !s && !g.current && "transition-none"),
2082
+ style: v,
2083
+ children: /* @__PURE__ */ p("div", { className: "bg-cui-base-2 h-full rounded-sm shadow-sm" })
2084
+ }), i]
2085
+ });
2086
+ }), rn = i(function({ active: e = !1, className: t, children: n, ...r }, i) {
2087
+ return /* @__PURE__ */ p("button", {
2088
+ ref: i,
2089
+ type: "button",
2090
+ "data-segmented-item": "",
2091
+ className: G("relative z-10 flex items-center justify-center gap-1.5 px-2.5 h-7 rounded-sm", "text-sm font-medium select-none cursor-pointer", "outline-none focus-visible:ring-2 focus-visible:ring-cui-focus", "transition-colors duration-150", "motion-reduce:transition-none", e ? "text-cui-primary" : "text-cui-tertiary hover:text-cui-secondary", t),
2092
+ ...r,
2093
+ children: n
2094
+ });
2095
+ });
2096
+ //#endregion
2097
+ //#region src/components/segmented-control/segmented-control.tsx
2098
+ function an({ options: e, value: t, defaultValue: n, onValueChange: r, layout: i = "fill", className: a }) {
2099
+ let [o, s] = d(() => n ?? e[0]?.value ?? ""), c = t !== void 0, l = c ? t : o, u = e.findIndex((e) => e.value === l);
2100
+ function f(e) {
2101
+ c || s(e), r?.(e);
2102
+ }
2103
+ return /* @__PURE__ */ p(nn, {
2104
+ activeIndex: u,
2105
+ itemCount: e.length,
2106
+ layout: i,
2107
+ className: a,
2108
+ children: e.map((e) => /* @__PURE__ */ m(rn, {
2109
+ active: e.value === l,
2110
+ "aria-pressed": e.value === l,
2111
+ onClick: () => f(e.value),
2112
+ children: [e.icon && /* @__PURE__ */ p("span", {
2113
+ className: "flex size-4 shrink-0 items-center justify-center [&>svg]:size-4",
2114
+ children: e.icon
2115
+ }), e.label && /* @__PURE__ */ p("span", { children: e.label })]
2116
+ }, e.value))
2117
+ });
2118
+ }
2119
+ //#endregion
2120
+ //#region src/components/user-menu/user-menu.tsx
2121
+ var on = [
2122
+ {
2123
+ value: "light",
2124
+ icon: /* @__PURE__ */ p(j, {})
2125
+ },
2126
+ {
2127
+ value: "dark",
2128
+ icon: /* @__PURE__ */ p(k, {})
2129
+ },
2130
+ {
2131
+ value: "system",
2132
+ icon: /* @__PURE__ */ p(T, {})
2133
+ }
2134
+ ];
2135
+ function sn({ user: e, theme: t = "system", onThemeChange: n, items: r, onLogout: i, className: a }) {
2136
+ return /* @__PURE__ */ m(Q.Root, { children: [/* @__PURE__ */ p(Q.Trigger, {
2137
+ className: a,
2138
+ children: /* @__PURE__ */ p(Z, {
2139
+ initials: e.initials,
2140
+ src: e.avatarUrl,
2141
+ size: "sm",
2142
+ className: "cursor-pointer"
2143
+ })
2144
+ }), /* @__PURE__ */ m(Q.Content, {
2145
+ align: "end",
2146
+ sideOffset: 8,
2147
+ minWidth: "min-w-[260px]",
2148
+ children: [
2149
+ /* @__PURE__ */ m("div", {
2150
+ className: "flex items-center gap-3 px-2 py-2",
2151
+ children: [/* @__PURE__ */ p(Z, {
2152
+ initials: e.initials,
2153
+ src: e.avatarUrl,
2154
+ size: "md"
2155
+ }), /* @__PURE__ */ m("div", {
2156
+ className: "flex flex-col gap-0.5",
2157
+ children: [/* @__PURE__ */ p("span", {
2158
+ className: "text-cui-primary text-sm font-medium",
2159
+ children: e.name
2160
+ }), e.org && /* @__PURE__ */ p("span", {
2161
+ className: "text-cui-secondary text-xs",
2162
+ children: e.org
2163
+ })]
2164
+ })]
2165
+ }),
2166
+ /* @__PURE__ */ p(Q.Separator, {}),
2167
+ /* @__PURE__ */ m("div", {
2168
+ className: "flex items-center justify-between px-2 py-1.5",
2169
+ children: [/* @__PURE__ */ p("span", {
2170
+ className: "text-cui-primary text-sm",
2171
+ children: "Appearance"
2172
+ }), /* @__PURE__ */ p(an, {
2173
+ options: on,
2174
+ value: t,
2175
+ onValueChange: n
2176
+ })]
2177
+ }),
2178
+ r && r.length > 0 && /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p(Q.Separator, {}), r.map((e) => /* @__PURE__ */ p(Q.Item, {
2179
+ icon: e.icon,
2180
+ onClick: e.onClick,
2181
+ children: e.label
2182
+ }, e.label))] }),
2183
+ i && /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p(Q.Separator, {}), /* @__PURE__ */ p(Q.Item, {
2184
+ icon: /* @__PURE__ */ p(_, {}),
2185
+ onClick: i,
2186
+ children: "Log out"
2187
+ })] })
2188
+ ]
2189
+ })] });
2190
+ }
2191
+ //#endregion
2192
+ //#region src/components/tooltip/tooltip.tsx
2193
+ function cn(e) {
2194
+ return /* @__PURE__ */ p(z.Provider, { ...e });
2195
+ }
2196
+ function ln(e) {
2197
+ return /* @__PURE__ */ p(z.Root, { ...e });
2198
+ }
2199
+ var un = i(function({ className: e, ...t }, n) {
2200
+ return /* @__PURE__ */ p(z.Trigger, {
2201
+ ref: n,
2202
+ className: G("outline-none", e),
2203
+ ...t
2204
+ });
2205
+ });
2206
+ function dn({ side: e = "top", align: t = "center", sideOffset: n = 6, className: r, children: i, ...a }) {
2207
+ return /* @__PURE__ */ p(z.Portal, { children: /* @__PURE__ */ p(z.Positioner, {
2208
+ side: e,
2209
+ align: t,
2210
+ sideOffset: n,
2211
+ className: G("z-50 outline-none", "h-[var(--positioner-height)] w-[var(--positioner-width)] max-w-[var(--available-width)]", "transition-[top,left,right,bottom,transform] duration-350 ease-cui-out-expo", "data-[instant]:transition-none"),
2212
+ children: /* @__PURE__ */ p(z.Popup, {
2213
+ className: G("bg-cui-inverse text-cui-inverse rounded px-2 py-1 text-xs font-medium", "max-w-[280px]", "origin-[var(--transform-origin)]", "transition-[transform,scale,opacity] duration-150 ease-cui-out-expo", "data-[starting-style]:scale-95 data-[starting-style]:opacity-0", "data-[ending-style]:scale-95 data-[ending-style]:opacity-0", "data-[instant]:transition-none", "motion-reduce:transition-none", r),
2214
+ ...a,
2215
+ children: i
2216
+ })
2217
+ }) });
2218
+ }
2219
+ var fn = i(function({ className: e, ...t }, n) {
2220
+ return /* @__PURE__ */ p(z.Viewport, {
2221
+ ref: n,
2222
+ className: G("relative h-full w-full overflow-clip", "[&_[data-previous]]:transition-[translate,opacity] [&_[data-previous]]:duration-350 [&_[data-previous]]:ease-cui-out-expo", "[&_[data-current]]:transition-[translate,opacity] [&_[data-current]]:duration-350 [&_[data-current]]:ease-cui-out-expo", "[&_[data-instant]_[data-current]]:transition-none [&_[data-instant]_[data-previous]]:transition-none", "[&[data-activation-direction*=left]_[data-current][data-starting-style]]:-translate-x-1/2 [&[data-activation-direction*=left]_[data-current][data-starting-style]]:opacity-0", "[&[data-activation-direction*=right]_[data-current][data-starting-style]]:translate-x-1/2 [&[data-activation-direction*=right]_[data-current][data-starting-style]]:opacity-0", "[&[data-activation-direction*=up]_[data-current][data-starting-style]]:-translate-y-1/2 [&[data-activation-direction*=up]_[data-current][data-starting-style]]:opacity-0", "[&[data-activation-direction*=down]_[data-current][data-starting-style]]:translate-y-1/2 [&[data-activation-direction*=down]_[data-current][data-starting-style]]:opacity-0", "[&[data-activation-direction*=left]_[data-previous][data-ending-style]]:translate-x-1/2 [&[data-activation-direction*=left]_[data-previous][data-ending-style]]:opacity-0", "[&[data-activation-direction*=right]_[data-previous][data-ending-style]]:-translate-x-1/2 [&[data-activation-direction*=right]_[data-previous][data-ending-style]]:opacity-0", "[&[data-activation-direction*=up]_[data-previous][data-ending-style]]:translate-y-1/2 [&[data-activation-direction*=up]_[data-previous][data-ending-style]]:opacity-0", "[&[data-activation-direction*=down]_[data-previous][data-ending-style]]:-translate-y-1/2 [&[data-activation-direction*=down]_[data-previous][data-ending-style]]:opacity-0", "motion-reduce:[&_[data-current]]:!transition-none motion-reduce:[&_[data-previous]]:!transition-none", e),
2223
+ ...t
2224
+ });
2225
+ }), pn = z.createHandle, mn = {
2226
+ Provider: cn,
2227
+ Root: ln,
2228
+ Trigger: un,
2229
+ Content: dn,
2230
+ Viewport: fn,
2231
+ createHandle: z.createHandle
2232
+ }, hn = {
2233
+ info: {
2234
+ container: "bg-cui-accent-subtle",
2235
+ icon: "text-cui-accent",
2236
+ text: "text-cui-accent [&_a]:underline [&_a]:underline-offset-2 [&_a]:hover:opacity-80",
2237
+ pattern: "text-cui-accent",
2238
+ defaultIcon: ee
2239
+ },
2240
+ success: {
2241
+ container: "bg-cui-success-subtle",
2242
+ icon: "text-cui-success",
2243
+ text: "text-cui-success [&_a]:underline [&_a]:underline-offset-2 [&_a]:hover:opacity-80",
2244
+ pattern: "text-cui-success",
2245
+ defaultIcon: v
2246
+ },
2247
+ warning: {
2248
+ container: "bg-cui-warn-subtle",
2249
+ icon: "text-cui-warn",
2250
+ text: "text-cui-warn [&_a]:underline [&_a]:underline-offset-2 [&_a]:hover:opacity-80",
2251
+ pattern: "text-cui-warn",
2252
+ defaultIcon: E
2253
+ },
2254
+ danger: {
2255
+ container: "bg-cui-danger-subtle",
2256
+ icon: "text-cui-danger",
2257
+ text: "text-cui-danger [&_a]:underline [&_a]:underline-offset-2 [&_a]:hover:opacity-80",
2258
+ pattern: "text-cui-danger",
2259
+ defaultIcon: te
2260
+ }
2261
+ }, gn = {
2262
+ maskImage: "linear-gradient(to left, black, transparent)",
2263
+ WebkitMaskImage: "linear-gradient(to left, black, transparent)"
2264
+ }, _n = i(function({ variant: e = "info", icon: t, action: n, onDismiss: r, className: i, children: a }, o) {
2265
+ let s = hn[e], c = s.defaultIcon;
2266
+ return /* @__PURE__ */ m("div", {
2267
+ ref: o,
2268
+ role: "alert",
2269
+ className: G("relative flex min-h-10 items-center gap-3 overflow-hidden rounded-md py-1.5 pl-3 pr-1.5", s.container, i),
2270
+ children: [
2271
+ /* @__PURE__ */ p("div", {
2272
+ className: G("pointer-events-none absolute top-0 right-0 h-full w-1/2", s.pattern),
2273
+ style: gn,
2274
+ children: /* @__PURE__ */ p(Tt, {
2275
+ squareSize: 4,
2276
+ gridGap: 2,
2277
+ flickerChance: .4,
2278
+ maxOpacity: .2
2279
+ })
2280
+ }),
2281
+ /* @__PURE__ */ p("span", {
2282
+ className: G("relative flex size-5 shrink-0 items-center justify-center [&>svg]:size-4", s.icon),
2283
+ children: t ?? /* @__PURE__ */ p(c, {})
2284
+ }),
2285
+ /* @__PURE__ */ p("span", {
2286
+ className: G("relative flex-1 text-sm font-medium", s.text),
2287
+ children: a
2288
+ }),
2289
+ n && /* @__PURE__ */ p("div", {
2290
+ className: "relative ml-auto shrink-0",
2291
+ children: n
2292
+ }),
2293
+ r && /* @__PURE__ */ p("div", {
2294
+ className: "relative ml-auto shrink-0",
2295
+ children: /* @__PURE__ */ p(K, {
2296
+ variant: "transparent",
2297
+ size: "xs",
2298
+ iconLeft: /* @__PURE__ */ p(M, {}),
2299
+ onClick: r,
2300
+ "aria-label": "Dismiss"
2301
+ })
2302
+ })
2303
+ ]
2304
+ });
2305
+ });
2306
+ //#endregion
2307
+ //#region src/components/alert-dialog/alert-dialog.tsx
2308
+ function vn(e) {
2309
+ return /* @__PURE__ */ p(B.Root, { ...e });
2310
+ }
2311
+ var yn = i(function({ className: e, ...t }, n) {
2312
+ return /* @__PURE__ */ p(B.Trigger, {
2313
+ ref: n,
2314
+ className: G(e),
2315
+ ...t
2316
+ });
2317
+ }), bn = i(function({ className: e, ...t }, n) {
2318
+ return /* @__PURE__ */ p(B.Backdrop, {
2319
+ ref: n,
2320
+ className: G("fixed inset-0 z-40 bg-cui-overlay backdrop-blur-[2px]", "transition-opacity duration-150", "data-[starting-style]:opacity-0", "data-[ending-style]:opacity-0", "motion-reduce:transition-none", e),
2321
+ ...t
2322
+ });
2323
+ });
2324
+ function xn({ className: e, children: t, ...n }) {
2325
+ return /* @__PURE__ */ m(B.Portal, { children: [/* @__PURE__ */ p(bn, {}), /* @__PURE__ */ p(B.Popup, {
2326
+ className: G("bg-cui-base-1 fixed top-1/2 left-1/2 z-50 max-h-[85vh] w-[90vw] max-w-[450px] -translate-x-1/2 -translate-y-1/2 rounded-lg p-0.5 shadow-xl", "transition-[opacity,scale] duration-150 ease-out", "data-[starting-style]:opacity-0 data-[starting-style]:scale-[0.96]", "data-[ending-style]:opacity-0 data-[ending-style]:scale-[0.98]", "motion-reduce:transition-none", "focus:outline-none", e),
2327
+ ...n,
2328
+ children: t
2329
+ })] });
2330
+ }
2331
+ var Sn = {
2332
+ Root: vn,
2333
+ Trigger: yn,
2334
+ Content: xn,
2335
+ Panel: i(function({ className: e, children: t }, n) {
2336
+ return /* @__PURE__ */ p("div", {
2337
+ ref: n,
2338
+ className: G("bg-cui-base-2 border-cui-neutral rounded-md border", e),
2339
+ children: t
2340
+ });
2341
+ }),
2342
+ Title: i(function({ className: e, ...t }, n) {
2343
+ return /* @__PURE__ */ p(B.Title, {
2344
+ ref: n,
2345
+ className: G("text-cui-primary border-cui-neutral border-b px-4 py-3 text-sm font-medium", e),
2346
+ ...t
2347
+ });
2348
+ }),
2349
+ Description: i(function({ className: e, ...t }, n) {
2350
+ return /* @__PURE__ */ p(B.Description, {
2351
+ ref: n,
2352
+ className: G("text-cui-secondary p-4 text-sm", e),
2353
+ ...t
2354
+ });
2355
+ }),
2356
+ Actions: i(function({ className: e, children: t }, n) {
2357
+ return /* @__PURE__ */ p("div", {
2358
+ ref: n,
2359
+ className: G("flex items-center justify-end gap-2 p-2", e),
2360
+ children: t
2361
+ });
2362
+ }),
2363
+ Close: i(function({ className: e, ...t }, n) {
2364
+ return /* @__PURE__ */ p(B.Close, {
2365
+ ref: n,
2366
+ className: G(e),
2367
+ ...t
2368
+ });
2369
+ })
2370
+ }, Cn = {
2371
+ Root: i(function({ className: e, ...t }, n) {
2372
+ return /* @__PURE__ */ p(V.Root, {
2373
+ ref: n,
2374
+ className: G("flex flex-col", e),
2375
+ ...t
2376
+ });
2377
+ }),
2378
+ Item: i(function({ className: e, ...t }, n) {
2379
+ return /* @__PURE__ */ p(V.Item, {
2380
+ ref: n,
2381
+ className: G("border-cui-neutral border-b last:border-b-0", e),
2382
+ ...t
2383
+ });
2384
+ }),
2385
+ Trigger: i(function({ icon: e, className: t, children: n, ...r }, i) {
2386
+ return /* @__PURE__ */ m(V.Trigger, {
2387
+ ref: i,
2388
+ className: G("group flex w-full cursor-pointer items-center gap-2 py-3 text-sm font-medium outline-none", "text-cui-primary hover:text-cui-primary", "focus-visible:ring-cui-focus focus-visible:ring-2 focus-visible:ring-offset-2 rounded-sm", t),
2389
+ ...r,
2390
+ children: [
2391
+ /* @__PURE__ */ p(S, { className: G("text-cui-tertiary size-4 shrink-0", "transition-transform duration-200 ease-cui-out-expo", "group-data-[panel-open]:rotate-90", "motion-reduce:transition-none") }),
2392
+ e && /* @__PURE__ */ p("span", {
2393
+ className: "flex size-5 shrink-0 items-center justify-center [&>svg]:size-4",
2394
+ children: e
2395
+ }),
2396
+ /* @__PURE__ */ p("span", {
2397
+ className: "flex-1 text-left",
2398
+ children: n
2399
+ })
2400
+ ]
2401
+ });
2402
+ }),
2403
+ Content: i(function({ className: e, children: t, ...n }, r) {
2404
+ return /* @__PURE__ */ p(V.Panel, {
2405
+ ref: r,
2406
+ className: G("overflow-hidden", "h-[var(--accordion-panel-height)]", "transition-[height] duration-200 ease-cui-out-expo", "data-[starting-style]:h-0", "data-[ending-style]:h-0", "motion-reduce:transition-none", e),
2407
+ ...n,
2408
+ children: /* @__PURE__ */ p("div", {
2409
+ className: "text-cui-secondary pb-3 text-sm",
2410
+ children: t
2411
+ })
2412
+ });
2413
+ })
2414
+ }, wn = {
2415
+ Root: i(function({ className: e, ...t }, n) {
2416
+ return /* @__PURE__ */ p(H.Root, {
2417
+ ref: n,
2418
+ className: G("flex flex-col", e),
2419
+ ...t
2420
+ });
2421
+ }),
2422
+ List: i(function({ className: e, layout: t = "fit", children: n, ...r }, i) {
2423
+ let o = u(null), [s, l] = d(0), [f, m] = d(0), h = a(() => {
2424
+ let e = o.current;
2425
+ if (!e) return;
2426
+ let t = e.querySelectorAll("[role='tab']");
2427
+ l(t.length);
2428
+ let n = -1;
2429
+ t.forEach((e, t) => {
2430
+ (e.getAttribute("data-active") !== null || e.getAttribute("aria-selected") === "true") && (n = t);
2431
+ }), n < 0 && (n = 0), m(n);
2432
+ }, []);
2433
+ return c(() => {
2434
+ h();
2435
+ let e = o.current;
2436
+ if (!e) return;
2437
+ let t = new MutationObserver(h);
2438
+ t.observe(e, {
2439
+ attributes: !0,
2440
+ attributeFilter: ["data-active", "aria-selected"],
2441
+ subtree: !0
2442
+ });
2443
+ let n = new ResizeObserver(h);
2444
+ return n.observe(e), () => {
2445
+ t.disconnect(), n.disconnect();
2446
+ };
2447
+ }, [h]), /* @__PURE__ */ p(nn, {
2448
+ ref: (e) => {
2449
+ o.current = e, typeof i == "function" ? i(e) : i && (i.current = e);
2450
+ },
2451
+ activeIndex: f,
2452
+ itemCount: s,
2453
+ layout: t,
2454
+ className: typeof e == "string" ? e : void 0,
2455
+ children: /* @__PURE__ */ p(H.List, {
2456
+ className: "contents",
2457
+ ...r,
2458
+ children: n
2459
+ })
2460
+ });
2461
+ }),
2462
+ Tab: i(function({ className: e, children: t, ...n }, r) {
2463
+ return /* @__PURE__ */ p(H.Tab, {
2464
+ ref: r,
2465
+ "data-segmented-item": "",
2466
+ className: G("relative z-10 flex items-center justify-center gap-1.5 px-2.5 h-7 rounded-sm", "text-sm font-medium select-none cursor-pointer", "outline-none focus-visible:ring-2 focus-visible:ring-cui-focus", "transition-colors duration-150", "motion-reduce:transition-none", "text-cui-tertiary hover:text-cui-secondary", "data-[active]:text-cui-primary", e),
2467
+ ...n,
2468
+ children: t
2469
+ });
2470
+ }),
2471
+ Panel: i(function({ className: e, ...t }, n) {
2472
+ return /* @__PURE__ */ p(H.Panel, {
2473
+ ref: n,
2474
+ className: G("pt-3 outline-none", "focus-visible:ring-cui-focus focus-visible:ring-2 focus-visible:ring-offset-2 rounded-sm", e),
2475
+ ...t
2476
+ });
2477
+ })
2478
+ }, Tn = {
2479
+ right: "right",
2480
+ left: "left",
2481
+ bottom: "down",
2482
+ top: "up"
2483
+ }, En = {
2484
+ right: "inset-y-0 right-0 w-[min(420px,90vw)] p-2",
2485
+ left: "inset-y-0 left-0 w-[min(420px,90vw)] p-2",
2486
+ bottom: "inset-x-0 bottom-0 max-h-[85vh] p-2",
2487
+ top: "inset-x-0 top-0 max-h-[85vh] p-2"
2488
+ };
2489
+ function Dn({ side: e = "right", responsive: t, children: n, ...r }) {
2490
+ return /* @__PURE__ */ p(U.Root, {
2491
+ swipeDirection: Tn[e],
2492
+ ...r,
2493
+ children: n
2494
+ });
2495
+ }
2496
+ var On = i(function({ className: e, ...t }, n) {
2497
+ return /* @__PURE__ */ p(U.Trigger, {
2498
+ ref: n,
2499
+ className: G(e),
2500
+ ...t
2501
+ });
2502
+ }), kn = i(function({ className: e, ...t }, n) {
2503
+ return /* @__PURE__ */ p(U.Backdrop, {
2504
+ ref: n,
2505
+ className: G("fixed inset-0 z-40 bg-cui-overlay backdrop-blur-[2px]", "transition-opacity duration-200", "data-[starting-style]:opacity-0", "data-[ending-style]:opacity-0", "motion-reduce:transition-none", e),
2506
+ ...t
2507
+ });
2508
+ });
2509
+ function An({ side: e = "right", responsive: t = !0, className: n, children: r, ...i }) {
2510
+ return /* @__PURE__ */ m(U.Portal, { children: [/* @__PURE__ */ p(kn, {}), /* @__PURE__ */ p(U.Popup, {
2511
+ className: G("group/drawer fixed z-50 flex outline-none", En[e], "transition-transform duration-500 ease-cui-out-expo", e === "right" && ["data-[starting-style]:translate-x-[20%]", "data-[ending-style]:translate-x-[20%]"], e === "left" && ["data-[starting-style]:-translate-x-[20%]", "data-[ending-style]:-translate-x-[20%]"], e === "bottom" && ["data-[starting-style]:translate-y-[20%]", "data-[ending-style]:translate-y-[20%]"], e === "top" && ["data-[starting-style]:-translate-y-[20%]", "data-[ending-style]:-translate-y-[20%]"], "motion-reduce:transition-none", t && [
2512
+ "max-md:inset-x-0 max-md:inset-y-auto max-md:bottom-0 max-md:right-auto max-md:left-auto",
2513
+ "max-md:w-full max-md:max-h-[85vh]",
2514
+ "max-md:data-[starting-style]:translate-x-0 max-md:data-[starting-style]:translate-y-[20%]",
2515
+ "max-md:data-[ending-style]:translate-x-0 max-md:data-[ending-style]:translate-y-[20%]"
2516
+ ]),
2517
+ ...i,
2518
+ children: /* @__PURE__ */ p("div", {
2519
+ className: G("bg-cui-base-1 flex min-h-0 flex-1 rounded-lg p-0.5 shadow-xl", "transition-[opacity,scale] duration-500 ease-cui-out-expo", "group-data-[starting-style]/drawer:scale-95 group-data-[starting-style]/drawer:opacity-0", "group-data-[ending-style]/drawer:scale-95 group-data-[ending-style]/drawer:opacity-0", "motion-reduce:transition-none", n),
2520
+ children: /* @__PURE__ */ p("div", {
2521
+ className: "bg-cui-base-2 border-cui-neutral flex min-h-0 flex-1 flex-col overflow-hidden rounded-md border",
2522
+ children: r
2523
+ })
2524
+ })
2525
+ })] });
2526
+ }
2527
+ var jn = {
2528
+ Root: Dn,
2529
+ Trigger: On,
2530
+ Content: An,
2531
+ Header: i(function({ className: e, children: t }, n) {
2532
+ return /* @__PURE__ */ p("div", {
2533
+ ref: n,
2534
+ className: G("border-cui-neutral flex items-center justify-between border-b px-4 py-3", e),
2535
+ children: t
2536
+ });
2537
+ }),
2538
+ Title: i(function({ className: e, ...t }, n) {
2539
+ return /* @__PURE__ */ p(U.Title, {
2540
+ ref: n,
2541
+ className: G("text-cui-primary text-sm font-medium", e),
2542
+ ...t
2543
+ });
2544
+ }),
2545
+ Description: i(function({ className: e, ...t }, n) {
2546
+ return /* @__PURE__ */ p(U.Description, {
2547
+ ref: n,
2548
+ className: G("text-cui-secondary text-sm", e),
2549
+ ...t
2550
+ });
2551
+ }),
2552
+ Body: i(function({ className: e, children: t }, n) {
2553
+ return /* @__PURE__ */ p("div", {
2554
+ ref: n,
2555
+ className: G("flex-1 overflow-y-auto p-4", e),
2556
+ children: t
2557
+ });
2558
+ }),
2559
+ Footer: i(function({ className: e, children: t }, n) {
2560
+ return /* @__PURE__ */ p("div", {
2561
+ ref: n,
2562
+ className: G("border-cui-neutral flex items-center justify-end gap-2 border-t p-3", e),
2563
+ children: t
2564
+ });
2565
+ }),
2566
+ Close: i(function({ asIcon: e, className: t, children: n, ...r }, i) {
2567
+ return e ?? !n ? /* @__PURE__ */ p(U.Close, {
2568
+ ref: i,
2569
+ className: G("text-cui-tertiary hover:text-cui-primary -m-1 flex size-7 cursor-pointer items-center justify-center rounded-sm outline-none", "transition-colors duration-150", "focus-visible:ring-cui-focus focus-visible:ring-2", "motion-reduce:transition-none", t),
2570
+ ...r,
2571
+ children: /* @__PURE__ */ p(M, { className: "size-4" })
2572
+ }) : /* @__PURE__ */ p(U.Close, {
2573
+ ref: i,
2574
+ className: G(t),
2575
+ ...r,
2576
+ children: n
2577
+ });
2578
+ })
2579
+ }, Mn = i(function({ className: e, ...t }, n) {
2580
+ return /* @__PURE__ */ p(W, {
2581
+ ref: n,
2582
+ className: G("bg-cui-base-2 border-cui-neutral flex h-full w-full flex-col overflow-hidden rounded-md border", e),
2583
+ ...t
2584
+ });
2585
+ }), Nn = i(function({ className: e, ...t }, n) {
2586
+ return /* @__PURE__ */ p(Y.SearchInput, {
2587
+ className: "mb-0 rounded-none border-x-0 border-t-0 border-b bg-transparent px-3",
2588
+ children: /* @__PURE__ */ p(W.Input, {
2589
+ ref: n,
2590
+ className: G("text-cui-primary placeholder:text-cui-tertiary flex-1 bg-transparent py-2.5 text-sm outline-none", e),
2591
+ ...t
2592
+ })
2593
+ });
2594
+ }), Pn = i(function({ className: e, ...t }, n) {
2595
+ return /* @__PURE__ */ p(W.List, {
2596
+ ref: n,
2597
+ className: G("max-h-[300px] overflow-y-auto overscroll-contain p-1 [scrollbar-width:none] [&::-webkit-scrollbar]:hidden", e),
2598
+ ...t
2599
+ });
2600
+ }), Fn = i(function({ className: e, ...t }, n) {
2601
+ return /* @__PURE__ */ p(W.Empty, {
2602
+ ref: n,
2603
+ className: G("text-cui-secondary px-2 py-4 text-center text-sm", e),
2604
+ ...t
2605
+ });
2606
+ }), In = i(function({ className: e, ...t }, n) {
2607
+ return /* @__PURE__ */ p(W.Group, {
2608
+ ref: n,
2609
+ className: G("[&_[cmdk-group-heading]]:text-cui-tertiary [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:select-none", e),
2610
+ ...t
2611
+ });
2612
+ }), Ln = i(function({ icon: e, shortcut: t, className: n, children: r, ...i }, a) {
2613
+ return /* @__PURE__ */ m(W.Item, {
2614
+ ref: a,
2615
+ className: G("group relative flex cursor-pointer items-center gap-2 rounded-sm px-2 py-1.5 text-sm select-none outline-none", "text-cui-primary", "data-[disabled=true]:pointer-events-none data-[disabled=true]:text-cui-tertiary", n),
2616
+ ...i,
2617
+ children: [
2618
+ /* @__PURE__ */ p("div", { className: G("absolute inset-0 rounded-[inherit] bg-cui-subtle opacity-0", "group-data-[selected=true]:opacity-100", "transition-[inset] duration-150 ease-cui-out-expo motion-reduce:transition-none", "group-active:inset-px") }),
2619
+ e && /* @__PURE__ */ p("span", {
2620
+ className: G("relative z-[1] flex size-5 shrink-0 items-center justify-center [&>svg]:size-4", "text-cui-tertiary group-data-[selected=true]:text-cui-primary"),
2621
+ children: e
2622
+ }),
2623
+ /* @__PURE__ */ p("span", {
2624
+ className: "relative z-[1] flex-1",
2625
+ children: r
2626
+ }),
2627
+ t && /* @__PURE__ */ p("kbd", {
2628
+ className: "text-cui-tertiary pointer-events-none relative z-[1] ml-auto text-xs tracking-widest",
2629
+ children: t
2630
+ })
2631
+ ]
2632
+ });
2633
+ }), Rn = i(function({ className: e, ...t }, n) {
2634
+ return /* @__PURE__ */ p(W.Separator, {
2635
+ ref: n,
2636
+ className: G("border-cui-neutral my-1 border-t", e),
2637
+ ...t
2638
+ });
2639
+ });
2640
+ function zn({ open: e, onOpenChange: t, children: n, className: r }) {
2641
+ return /* @__PURE__ */ p(L.Root, {
2642
+ open: e,
2643
+ onOpenChange: t,
2644
+ children: /* @__PURE__ */ m(L.Portal, { children: [/* @__PURE__ */ p(L.Backdrop, { className: G("fixed inset-0 z-40 bg-cui-overlay backdrop-blur-[2px]", "transition-opacity duration-150", "data-[starting-style]:opacity-0", "data-[ending-style]:opacity-0", "motion-reduce:transition-none") }), /* @__PURE__ */ p(L.Popup, {
2645
+ className: G("bg-cui-base-1 fixed top-[20%] left-1/2 z-50 w-[90vw] max-w-[520px] -translate-x-1/2 rounded-lg p-0.5 shadow-xl", "transition-[opacity,scale] duration-150 ease-out", "data-[starting-style]:opacity-0 data-[starting-style]:scale-[0.96]", "data-[ending-style]:opacity-0 data-[ending-style]:scale-[0.98]", "motion-reduce:transition-none", "focus:outline-none", r),
2646
+ children: n
2647
+ })] })
2648
+ });
2649
+ }
2650
+ var Bn = {
2651
+ Root: Mn,
2652
+ Input: Nn,
2653
+ List: Pn,
2654
+ Empty: Fn,
2655
+ Group: In,
2656
+ Item: Ln,
2657
+ Separator: Rn,
2658
+ Dialog: zn
2659
+ }, Vn = i(function({ show: e, message: t = "You have unsaved changes", discardLabel: n = "Reset", saveLabel: r = "Save changes", onDiscard: i, onSave: a, saving: o = !1, saveDisabled: s = !1, shake: c = !1, className: l }, u) {
2660
+ return /* @__PURE__ */ p("div", {
2661
+ ref: u,
2662
+ "aria-live": "polite",
2663
+ className: G("pointer-events-none fixed inset-x-0 bottom-0 z-50 flex justify-center pb-6", l),
2664
+ children: /* @__PURE__ */ m("div", {
2665
+ className: G("pointer-events-auto", "bg-cui-base-2 border-cui-neutral shadow-lg", "flex items-center gap-5 rounded-xl border py-1.5 pr-1.5 pl-3.5", "transition-all duration-500 ease-cui-out-expo", "motion-reduce:transition-none", e ? "translate-y-0 scale-100 opacity-100" : "pointer-events-none translate-y-4 scale-95 opacity-0", c && "animate-cui-shake"),
2666
+ children: [/* @__PURE__ */ p("span", {
2667
+ className: "text-cui-primary text-sm font-medium",
2668
+ children: t
2669
+ }), /* @__PURE__ */ m("div", {
2670
+ className: "flex items-center gap-1.5",
2671
+ children: [/* @__PURE__ */ p(K, {
2672
+ variant: "danger-light",
2673
+ size: "sm",
2674
+ onClick: i,
2675
+ children: n
2676
+ }), /* @__PURE__ */ p(K, {
2677
+ variant: "primary",
2678
+ size: "sm",
2679
+ onClick: a,
2680
+ loading: o,
2681
+ disabled: s,
2682
+ children: r
2683
+ })]
2684
+ })]
2685
+ })
2686
+ });
2687
+ }), Hn = {
2688
+ narrow: "max-w-[800px]",
2689
+ wide: "max-w-[1100px]"
2690
+ }, Un = i(function({ title: e, maxWidth: t = "narrow", leading: n, children: r, className: i }, a) {
2691
+ return /* @__PURE__ */ p("div", {
2692
+ ref: a,
2693
+ className: "flex flex-1 flex-col items-center gap-6 py-6",
2694
+ children: /* @__PURE__ */ m("div", {
2695
+ className: G("flex w-full flex-col gap-6 px-8", Hn[t], i),
2696
+ children: [
2697
+ n,
2698
+ e && /* @__PURE__ */ p("span", {
2699
+ className: "text-cui-primary text-lg font-semibold",
2700
+ children: e
2701
+ }),
2702
+ r
2703
+ ]
2704
+ })
2705
+ });
2706
+ });
2707
+ //#endregion
2708
+ //#region src/lib/use-dirty-state.ts
2709
+ function Wn(e) {
2710
+ let [t, n] = d(e), [r, i] = d(e);
2711
+ return {
2712
+ draft: r,
2713
+ saved: t,
2714
+ dirty: l(() => JSON.stringify(r) !== JSON.stringify(t), [r, t]),
2715
+ setDraft: i,
2716
+ update: a((e, t) => {
2717
+ i((n) => ({
2718
+ ...n,
2719
+ [e]: t
2720
+ }));
2721
+ }, []),
2722
+ discard: a(() => {
2723
+ i(t);
2724
+ }, [t]),
2725
+ save: a(() => {
2726
+ n(r);
2727
+ }, [r])
2728
+ };
2729
+ }
2730
+ //#endregion
2731
+ export { Cn as Accordion, _n as Alert, Sn as AlertDialog, it as AppHeader, Z as Avatar, vt as Badge, K as Button, J as Card, Oe as Checkbox, Le as Combobox, ze as ComboboxButton, Be as ComboboxContent, Ve as ComboboxOption, Re as ComboboxTrigger, Bn as Command, Jt as DataTable, tn as DataTableFacetedFilter, Xt as DataTableSearch, Yt as DataTableToolbar, Ft as Dialog, jn as Drawer, Q as DropdownMenu, Tt as FlickeringGrid, Ct as Form, q as Hover, Ce as HoverGroup, Ie as Logo, Fe as NavLink, Pe as NavLinks, st as PageLayout, Kt as Pagination, ge as PixelSpinner, en as Popover, Vn as SaveBar, an as SegmentedControl, ct as Select, ut as SelectButton, dt as SelectContent, mt as SelectGroup, ht as SelectGroupLabel, ft as SelectOption, pt as SelectSeparator, lt as SelectTrigger, gt as Separator, at as SettingsCard, Un as SettingsPage, ot as SettingsRow, Et as Skeleton, ve as Spinner, $ as Table, wn as Tabs, Ee as Toggle, mn as Tooltip, sn as UserMenu, G as cn, pn as createTooltipHandle, Wn as useDirtyState };