@jinaan/uikit 0.1.51 → 0.1.53

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 CHANGED
@@ -1,38 +1,39 @@
1
- import { jsx as e, jsxs as s, Fragment as je } from "react/jsx-runtime";
2
- import { CircleNotch as ha, Robot as ga, Terminal as xa, Check as ae, Copy as gt, XCircle as va, Warning as Na, CheckCircle as ya, Info as wa, Minus as Ca, X as be, CaretDown as Y, CaretRight as xt, MagnifyingGlass as Sa, Columns as za, Lock as ka, DotsSixVertical as Da, FunnelSimple as ct, WarningCircle as Ta, CaretUp as Ma, CaretUpDown as Pa, CaretLeft as Ia } from "@phosphor-icons/react";
3
- import { forwardRef as f, useState as T, Children as vt, isValidElement as Nt, useRef as _, useEffect as Z, useContext as O, useCallback as yt, createContext as re, useId as ge, useMemo as De, useLayoutEffect as Ra, Fragment as ja } from "react";
4
- import { Slot as _a } from "@radix-ui/react-slot";
5
- import { cva as _e } from "class-variance-authority";
6
- import { clsx as Ea } from "clsx";
7
- import { twMerge as La } from "tailwind-merge";
8
- import * as Ee from "@radix-ui/react-avatar";
9
- import * as ut from "@radix-ui/react-checkbox";
10
- import * as E from "@radix-ui/react-dialog";
11
- import * as P from "@radix-ui/react-dropdown-menu";
12
- import * as R from "@radix-ui/react-select";
13
- import * as Aa from "@radix-ui/react-label";
14
- import * as Ba from "@radix-ui/react-separator";
15
- import * as te from "@radix-ui/react-tooltip";
16
- function i(...t) {
17
- return La(Ea(t));
1
+ import { jsx as e, jsxs as s, Fragment as Ge } from "react/jsx-runtime";
2
+ import { CircleNotch as va, Robot as Na, Terminal as ya, Check as ie, Copy as St, XCircle as wa, Warning as Ca, CheckCircle as za, Info as ka, Minus as Sa, X as ye, CaretDown as Y, MagnifyingGlass as Dt, CaretRight as Tt, Columns as Da, Lock as Ta, DotsSixVertical as Ma, FunnelSimple as vt, WarningCircle as Pa, CaretUp as Ia, CaretUpDown as Ra, CaretLeft as ja } from "@phosphor-icons/react";
3
+ import { forwardRef as h, useState as P, Children as Mt, isValidElement as Pt, useRef as B, useEffect as V, useContext as Z, useCallback as It, createContext as se, useId as Ce, useMemo as ge, useLayoutEffect as Ea, Fragment as _a } from "react";
4
+ import { Slot as La } from "@radix-ui/react-slot";
5
+ import { cva as Oe } from "class-variance-authority";
6
+ import { clsx as Aa } from "clsx";
7
+ import { twMerge as Ba } from "tailwind-merge";
8
+ import * as Ve from "@radix-ui/react-avatar";
9
+ import * as Nt from "@radix-ui/react-checkbox";
10
+ import * as $ from "@radix-ui/react-dialog";
11
+ import * as he from "@radix-ui/react-popover";
12
+ import * as j from "@radix-ui/react-dropdown-menu";
13
+ import * as _ from "@radix-ui/react-select";
14
+ import * as $a from "@radix-ui/react-label";
15
+ import * as Fa from "@radix-ui/react-separator";
16
+ import * as oe from "@radix-ui/react-tooltip";
17
+ function o(...t) {
18
+ return Ba(Aa(t));
18
19
  }
19
- function $a(t, a, n) {
20
+ function qa(t, a, n) {
20
21
  if (a === n || a < 0 || n < 0 || a >= t.length || n >= t.length)
21
22
  return t;
22
- const l = [...t], [o] = l.splice(a, 1);
23
- return l.splice(n, 0, o), l;
23
+ const l = [...t], [i] = l.splice(a, 1);
24
+ return l.splice(n, 0, i), l;
24
25
  }
25
- function Fa({ className: t }) {
26
+ function Rt({ className: t }) {
26
27
  return /* @__PURE__ */ e(
27
- ha,
28
+ va,
28
29
  {
29
- className: i("size-4 animate-spin text-muted", t),
30
+ className: o("size-4 animate-spin text-muted", t),
30
31
  weight: "bold",
31
32
  "aria-hidden": !0
32
33
  }
33
34
  );
34
35
  }
35
- const qa = _e(
36
+ const Ha = Oe(
36
37
  "relative inline-flex select-none items-center justify-center gap-[var(--control-gap)] whitespace-nowrap rounded-[var(--control-radius)] border border-transparent font-medium transition-[color,background-color,border-color,box-shadow,transform] duration-[120ms] active:scale-[0.97] focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-line-strong disabled:pointer-events-none disabled:opacity-50",
37
38
  {
38
39
  variants: {
@@ -65,49 +66,49 @@ const qa = _e(
65
66
  lg: "[&_svg]:size-[var(--control-icon-lg)]",
66
67
  xl: "[&_svg]:size-[var(--control-icon-xl)]",
67
68
  icon: "[&_svg]:size-[var(--control-icon-md)]"
68
- }, M = f(
69
+ }, R = h(
69
70
  ({
70
71
  className: t,
71
72
  variant: a,
72
73
  size: n = "md",
73
74
  asChild: l = !1,
74
- leadingIcon: o,
75
- trailingIcon: m,
76
- iconOnly: u = !1,
77
- loading: c = !1,
75
+ leadingIcon: i,
76
+ trailingIcon: c,
77
+ iconOnly: m = !1,
78
+ loading: u = !1,
78
79
  fullWidth: x = !1,
79
- disabled: b,
80
- children: h,
80
+ disabled: f,
81
+ children: g,
81
82
  ...N
82
- }, k) => {
83
- const v = l ? _a : "button", D = Ga[n ?? "md"];
83
+ }, z) => {
84
+ const y = l ? La : "button", D = Ga[n ?? "md"];
84
85
  return /* @__PURE__ */ e(
85
- v,
86
+ y,
86
87
  {
87
- ref: k,
88
- "aria-busy": c || void 0,
89
- disabled: l ? void 0 : b || c,
90
- className: i(
91
- qa({ variant: a, size: n }),
92
- u && "aspect-square px-0",
88
+ ref: z,
89
+ "aria-busy": u || void 0,
90
+ disabled: l ? void 0 : f || u,
91
+ className: o(
92
+ Ha({ variant: a, size: n }),
93
+ m && "aspect-square px-0",
93
94
  x && "w-full",
94
- c && "disabled:opacity-100",
95
+ u && "disabled:opacity-100",
95
96
  t
96
97
  ),
97
98
  ...N,
98
- children: l ? h : /* @__PURE__ */ s("span", { className: "relative inline-flex w-full items-center [justify-content:inherit] gap-(--control-gap)", children: [
99
+ children: l ? g : /* @__PURE__ */ s("span", { className: "relative inline-flex w-full items-center [justify-content:inherit] gap-(--control-gap)", children: [
99
100
  /* @__PURE__ */ s(
100
101
  "span",
101
102
  {
102
- className: i(
103
+ className: o(
103
104
  "inline-flex w-full items-center [justify-content:inherit] gap-(--control-gap) transition-[opacity,translate] duration-150 ease-out motion-reduce:transition-none",
104
- c && "translate-y-2 opacity-0"
105
+ u && "translate-y-2 opacity-0"
105
106
  ),
106
- "aria-hidden": c || void 0,
107
+ "aria-hidden": u || void 0,
107
108
  children: [
108
- !c && o ? /* @__PURE__ */ e("span", { className: i("inline-flex shrink-0", D), "aria-hidden": !0, children: o }) : null,
109
- h,
110
- !c && m ? /* @__PURE__ */ e("span", { className: i("inline-flex shrink-0", D), "aria-hidden": !0, children: m }) : null
109
+ !u && i ? /* @__PURE__ */ e("span", { className: o("inline-flex shrink-0", D), "aria-hidden": !0, children: i }) : null,
110
+ g,
111
+ !u && c ? /* @__PURE__ */ e("span", { className: o("inline-flex shrink-0", D), "aria-hidden": !0, children: c }) : null
111
112
  ]
112
113
  }
113
114
  ),
@@ -115,12 +116,12 @@ const qa = _e(
115
116
  "span",
116
117
  {
117
118
  "data-button-spinner": !0,
118
- className: i(
119
+ className: o(
119
120
  "pointer-events-none absolute inset-0 flex items-center justify-center transition-[opacity,translate] duration-150 ease-out motion-reduce:transition-none",
120
- c ? "translate-y-0 opacity-100" : "-translate-y-2 opacity-0"
121
+ u ? "translate-y-0 opacity-100" : "-translate-y-2 opacity-0"
121
122
  ),
122
123
  "aria-hidden": !0,
123
- children: /* @__PURE__ */ e(Fa, { className: i("text-current", D) })
124
+ children: /* @__PURE__ */ e(Rt, { className: o("text-current", D) })
124
125
  }
125
126
  )
126
127
  ] })
@@ -128,76 +129,76 @@ const qa = _e(
128
129
  );
129
130
  }
130
131
  );
131
- M.displayName = "Button";
132
- function Ar({
132
+ R.displayName = "Button";
133
+ function Br({
133
134
  command: t,
134
135
  tag: a = "Build with agents",
135
136
  icon: n,
136
137
  className: l
137
138
  }) {
138
- const [o, m] = T(!1), u = async () => {
139
+ const [i, c] = P(!1), m = async () => {
139
140
  try {
140
- await navigator.clipboard.writeText(t), m(!0), window.setTimeout(() => m(!1), 1500);
141
+ await navigator.clipboard.writeText(t), c(!0), window.setTimeout(() => c(!1), 1500);
141
142
  } catch {
142
143
  }
143
144
  };
144
- return /* @__PURE__ */ s("div", { className: i("relative inline-flex max-w-full", l), children: [
145
+ return /* @__PURE__ */ s("div", { className: o("relative inline-flex max-w-full", l), children: [
145
146
  /* @__PURE__ */ s("span", { className: "absolute -top-2.5 left-4 z-10 inline-flex items-center gap-1.5 rounded-md bg-fg px-2 py-1 text-[11px] font-medium text-canvas shadow-sm", children: [
146
- n ?? /* @__PURE__ */ e(ga, { className: "size-3.5", weight: "fill" }),
147
+ n ?? /* @__PURE__ */ e(Na, { className: "size-3.5", weight: "fill" }),
147
148
  a
148
149
  ] }),
149
150
  /* @__PURE__ */ s("div", { className: "mt-2 flex w-full items-center gap-2 rounded-xl border border-line bg-surface py-2 pl-3 pr-2 shadow-sm", children: [
150
- /* @__PURE__ */ e(xa, { className: "size-4 shrink-0 text-subtle", "aria-hidden": !0 }),
151
+ /* @__PURE__ */ e(ya, { className: "size-4 shrink-0 text-subtle", "aria-hidden": !0 }),
151
152
  /* @__PURE__ */ e("span", { className: "truncate font-mono text-sm text-fg", children: t }),
152
153
  /* @__PURE__ */ e(
153
- M,
154
+ R,
154
155
  {
155
156
  variant: "ghost",
156
157
  size: "sm",
157
158
  iconOnly: !0,
158
159
  "aria-label": "Copy prompt",
159
160
  className: "ml-auto",
160
- onClick: u,
161
- children: o ? /* @__PURE__ */ e(ae, { className: "text-success", weight: "bold" }) : /* @__PURE__ */ e(gt, {})
161
+ onClick: m,
162
+ children: i ? /* @__PURE__ */ e(ie, { className: "text-success", weight: "bold" }) : /* @__PURE__ */ e(St, {})
162
163
  }
163
164
  )
164
165
  ] })
165
166
  ] });
166
167
  }
167
- const wt = f(({ className: t, ...a }, n) => /* @__PURE__ */ e(
168
- Ee.Root,
168
+ const jt = h(({ className: t, ...a }, n) => /* @__PURE__ */ e(
169
+ Ve.Root,
169
170
  {
170
171
  ref: n,
171
- className: i(
172
+ className: o(
172
173
  "relative flex size-8 shrink-0 overflow-hidden rounded-full border border-line",
173
174
  t
174
175
  ),
175
176
  ...a
176
177
  }
177
178
  ));
178
- wt.displayName = "Avatar";
179
- const Ct = f(({ className: t, ...a }, n) => /* @__PURE__ */ e(
180
- Ee.Image,
179
+ jt.displayName = "Avatar";
180
+ const Et = h(({ className: t, ...a }, n) => /* @__PURE__ */ e(
181
+ Ve.Image,
181
182
  {
182
183
  ref: n,
183
- className: i("aspect-square size-full object-cover", t),
184
+ className: o("aspect-square size-full object-cover", t),
184
185
  ...a
185
186
  }
186
187
  ));
187
- Ct.displayName = "AvatarImage";
188
- const St = f(({ className: t, ...a }, n) => /* @__PURE__ */ e(
189
- Ee.Fallback,
188
+ Et.displayName = "AvatarImage";
189
+ const _t = h(({ className: t, ...a }, n) => /* @__PURE__ */ e(
190
+ Ve.Fallback,
190
191
  {
191
192
  ref: n,
192
- className: i(
193
+ className: o(
193
194
  "flex size-full items-center justify-center bg-elevated text-xs font-medium text-muted",
194
195
  t
195
196
  ),
196
197
  ...a
197
198
  }
198
199
  ));
199
- St.displayName = "AvatarFallback";
200
- const Ha = _e(
200
+ _t.displayName = "AvatarFallback";
201
+ const Oa = Oe(
201
202
  "inline-flex items-center gap-1.5 rounded-md border px-2 py-0.5 text-xs font-medium",
202
203
  {
203
204
  variants: {
@@ -213,7 +214,7 @@ const Ha = _e(
213
214
  },
214
215
  defaultVariants: { variant: "neutral" }
215
216
  }
216
- ), Va = _e("size-1.5 shrink-0 rounded-full", {
217
+ ), Va = Oe("size-1.5 shrink-0 rounded-full", {
217
218
  variants: {
218
219
  variant: {
219
220
  neutral: "bg-subtle",
@@ -227,54 +228,54 @@ const Ha = _e(
227
228
  },
228
229
  defaultVariants: { variant: "neutral" }
229
230
  });
230
- function Wa({ className: t, variant: a, dot: n = !1, children: l, ...o }) {
231
- return /* @__PURE__ */ s("span", { className: i(Ha({ variant: a }), t), ...o, children: [
232
- n ? /* @__PURE__ */ e("span", { className: i(Va({ variant: a })), "aria-hidden": !0 }) : null,
231
+ function Wa({ className: t, variant: a, dot: n = !1, children: l, ...i }) {
232
+ return /* @__PURE__ */ s("span", { className: o(Oa({ variant: a }), t), ...i, children: [
233
+ n ? /* @__PURE__ */ e("span", { className: o(Va({ variant: a })), "aria-hidden": !0 }) : null,
233
234
  l
234
235
  ] });
235
236
  }
236
- const Oa = {
237
+ const Ua = {
237
238
  info: {
238
- Icon: wa,
239
+ Icon: ka,
239
240
  className: "border-info/30 bg-info/10",
240
241
  iconClassName: "text-info"
241
242
  },
242
243
  success: {
243
- Icon: ya,
244
+ Icon: za,
244
245
  className: "border-success/30 bg-success/10",
245
246
  iconClassName: "text-success"
246
247
  },
247
248
  warning: {
248
- Icon: Na,
249
+ Icon: Ca,
249
250
  className: "border-warning/30 bg-warning/10",
250
251
  iconClassName: "text-warning"
251
252
  },
252
253
  error: {
253
- Icon: va,
254
+ Icon: wa,
254
255
  className: "border-error/30 bg-error/10",
255
256
  iconClassName: "text-error"
256
257
  }
257
258
  };
258
- function Br({
259
+ function $r({
259
260
  variant: t = "info",
260
261
  title: a,
261
262
  children: n,
262
263
  icon: l,
263
- className: o
264
+ className: i
264
265
  }) {
265
- const { Icon: m, className: u, iconClassName: c } = Oa[t];
266
+ const { Icon: c, className: m, iconClassName: u } = Ua[t];
266
267
  return /* @__PURE__ */ s(
267
268
  "div",
268
269
  {
269
270
  role: t === "error" ? "alert" : void 0,
270
- className: i(
271
+ className: o(
271
272
  "flex items-start gap-2.5 rounded-lg border px-3.5 py-3 text-sm",
272
273
  "animate-in fade-in-0 slide-in-from-top-1 duration-200 motion-reduce:animate-none",
273
- u,
274
- o
274
+ m,
275
+ i
275
276
  ),
276
277
  children: [
277
- /* @__PURE__ */ e("span", { className: i("mt-0.5 shrink-0 [&_svg]:size-4", c), children: l ?? /* @__PURE__ */ e(m, { weight: "fill" }) }),
278
+ /* @__PURE__ */ e("span", { className: o("mt-0.5 shrink-0 [&_svg]:size-4", u), children: l ?? /* @__PURE__ */ e(c, { weight: "fill" }) }),
278
279
  /* @__PURE__ */ s("div", { className: "min-w-0 space-y-0.5", children: [
279
280
  a ? /* @__PURE__ */ e("p", { className: "font-medium text-fg", children: a }) : null,
280
281
  n ? /* @__PURE__ */ e("div", { className: "text-muted", children: n }) : null
@@ -283,14 +284,14 @@ function Br({
283
284
  }
284
285
  );
285
286
  }
286
- function Ua({
287
+ function Xa({
287
288
  className: t,
288
289
  ...a
289
290
  }) {
290
291
  return /* @__PURE__ */ e(
291
292
  "div",
292
293
  {
293
- className: i(
294
+ className: o(
294
295
  "w-full overflow-hidden rounded-(--table-radius-outer) bg-table-container p-(--table-inset)",
295
296
  t
296
297
  ),
@@ -298,14 +299,14 @@ function Ua({
298
299
  }
299
300
  );
300
301
  }
301
- function Xa({
302
+ function Ka({
302
303
  className: t,
303
304
  ...a
304
305
  }) {
305
306
  return /* @__PURE__ */ e(
306
307
  "div",
307
308
  {
308
- className: i(
309
+ className: o(
309
310
  "overflow-hidden rounded-(--table-radius-panel) border border-table-panel-border bg-table-panel",
310
311
  t
311
312
  ),
@@ -313,26 +314,26 @@ function Xa({
313
314
  }
314
315
  );
315
316
  }
316
- function $r({ className: t, ...a }) {
317
+ function Fr({ className: t, ...a }) {
317
318
  return /* @__PURE__ */ e(
318
319
  "table",
319
320
  {
320
- className: i("w-full table-fixed border-collapse caption-bottom text-sm", t),
321
+ className: o("w-full table-fixed border-collapse caption-bottom text-sm", t),
321
322
  ...a
322
323
  }
323
324
  );
324
325
  }
325
- function Fr({ className: t, ...a }) {
326
+ function qr({ className: t, ...a }) {
326
327
  return /* @__PURE__ */ e("thead", { className: t, ...a });
327
328
  }
328
329
  function Ja({ className: t, ...a }) {
329
- return /* @__PURE__ */ e("tbody", { className: i("[&_tr:last-child]:border-0", t), ...a });
330
+ return /* @__PURE__ */ e("tbody", { className: o("[&_tr:last-child]:border-0", t), ...a });
330
331
  }
331
- function mt({ className: t, ...a }) {
332
+ function yt({ className: t, ...a }) {
332
333
  return /* @__PURE__ */ e(
333
334
  "tr",
334
335
  {
335
- className: i(
336
+ className: o(
336
337
  "border-b border-table-panel-border transition-colors last:border-0 hover:bg-table-row-hover data-[state=selected]:bg-table-row-selected",
337
338
  t
338
339
  ),
@@ -340,11 +341,11 @@ function mt({ className: t, ...a }) {
340
341
  }
341
342
  );
342
343
  }
343
- function qr({ className: t, ...a }) {
344
+ function Hr({ className: t, ...a }) {
344
345
  return /* @__PURE__ */ e(
345
346
  "th",
346
347
  {
347
- className: i(
348
+ className: o(
348
349
  "h-(--table-header-h) whitespace-nowrap px-(--table-pad-x) text-left align-middle text-[0.8125rem] font-medium text-table-header",
349
350
  t
350
351
  ),
@@ -352,11 +353,11 @@ function qr({ className: t, ...a }) {
352
353
  }
353
354
  );
354
355
  }
355
- function Q({ className: t, ...a }) {
356
+ function ne({ className: t, ...a }) {
356
357
  return /* @__PURE__ */ e(
357
358
  "td",
358
359
  {
359
- className: i(
360
+ className: o(
360
361
  "whitespace-nowrap px-(--table-pad-x) py-3 align-middle text-sm text-table-row data-numeric:font-numeric data-numeric:tabular-nums",
361
362
  t
362
363
  ),
@@ -364,49 +365,49 @@ function Q({ className: t, ...a }) {
364
365
  }
365
366
  );
366
367
  }
367
- const Ka = {
368
+ const Qa = {
368
369
  default: "bg-table-container",
369
370
  muted: "bg-surface border border-line",
370
371
  transparent: "bg-transparent"
371
- }, Qa = {
372
+ }, Ya = {
372
373
  default: "bg-table-panel border-table-panel-border",
373
374
  muted: "bg-elevated border-line",
374
375
  transparent: "bg-transparent border-line"
375
376
  };
376
- function Ya(t) {
377
+ function Za(t) {
377
378
  return typeof t == "object" && t !== null && "label" in t && typeof t.label == "string";
378
379
  }
379
- function xe({
380
+ function ze({
380
381
  title: t,
381
382
  description: a,
382
383
  header: n,
383
384
  children: l,
384
- action: o,
385
- tone: m = "default",
386
- className: u,
387
- headerClassName: c,
385
+ action: i,
386
+ tone: c = "default",
387
+ className: m,
388
+ headerClassName: u,
388
389
  panelClassName: x,
389
- footer: b,
390
- footerClassName: h,
390
+ footer: f,
391
+ footerClassName: g,
391
392
  minHeight: N,
392
- scrollMode: k = "surface",
393
- headerContentRef: v
393
+ scrollMode: z = "surface",
394
+ headerContentRef: y
394
395
  }) {
395
- const D = !!(t || a), S = k === "panel", g = Ya(o) ? /* @__PURE__ */ e(
396
- M,
396
+ const D = !!(t || a), k = z === "panel", b = Za(i) ? /* @__PURE__ */ e(
397
+ R,
397
398
  {
398
- variant: o.variant ?? "primary",
399
+ variant: i.variant ?? "primary",
399
400
  size: "xs",
400
- leadingIcon: o.href ? void 0 : o.icon,
401
- onClick: o.onClick,
402
- disabled: o.disabled,
403
- asChild: !!o.href,
404
- children: o.href ? /* @__PURE__ */ s("a", { href: o.href, children: [
405
- o.icon,
406
- o.label
407
- ] }) : o.label
401
+ leadingIcon: i.href ? void 0 : i.icon,
402
+ onClick: i.onClick,
403
+ disabled: i.disabled,
404
+ asChild: !!i.href,
405
+ children: i.href ? /* @__PURE__ */ s("a", { href: i.href, children: [
406
+ i.icon,
407
+ i.label
408
+ ] }) : i.label
408
409
  }
409
- ) : o, j = n || D ? (
410
+ ) : i, I = n || D ? (
410
411
  // Header rows must not inherit the body row hover surface. Panel mode
411
412
  // clips the band instead of scrolling it; the caller translates the
412
413
  // inner wrapper so titles track the row content. px-px mirrors the
@@ -415,18 +416,18 @@ function xe({
415
416
  /* @__PURE__ */ s(
416
417
  "div",
417
418
  {
418
- className: i(
419
+ className: o(
419
420
  "[--table-row-hover:transparent] text-table-header",
420
- S && "overflow-hidden px-px",
421
- c
421
+ k && "overflow-hidden px-px",
422
+ u
422
423
  ),
423
424
  children: [
424
425
  D ? /* @__PURE__ */ s(
425
426
  "div",
426
427
  {
427
- className: i(
428
+ className: o(
428
429
  "px-(--table-pad-x) pb-3 pt-4",
429
- g && "pr-28"
430
+ b && "pr-28"
430
431
  ),
431
432
  children: [
432
433
  t ? /* @__PURE__ */ e("div", { className: "text-sm font-semibold text-fg", children: t }) : null,
@@ -434,81 +435,81 @@ function xe({
434
435
  ]
435
436
  }
436
437
  ) : null,
437
- S ? /* @__PURE__ */ e("div", { ref: v, children: n }) : n
438
+ k ? /* @__PURE__ */ e("div", { ref: y, children: n }) : n
438
439
  ]
439
440
  }
440
441
  )
441
- ) : null, I = /* @__PURE__ */ e(
442
- Xa,
442
+ ) : null, M = /* @__PURE__ */ e(
443
+ Ka,
443
444
  {
444
- className: i(Qa[m], x),
445
+ className: o(Ya[c], x),
445
446
  style: N ? { minHeight: N } : void 0,
446
447
  children: l
447
448
  }
448
449
  );
449
- return /* @__PURE__ */ s(Ua, { className: i("relative", Ka[m], u), children: [
450
- S ? /* @__PURE__ */ s(je, { children: [
451
- j,
452
- I
450
+ return /* @__PURE__ */ s(Xa, { className: o("relative", Qa[c], m), children: [
451
+ k ? /* @__PURE__ */ s(Ge, { children: [
452
+ I,
453
+ M
453
454
  ] }) : /* @__PURE__ */ s("div", { className: "overflow-x-auto", children: [
454
- j,
455
- I
455
+ I,
456
+ M
456
457
  ] }),
457
- b ? /* @__PURE__ */ e(
458
+ f ? /* @__PURE__ */ e(
458
459
  "div",
459
460
  {
460
- className: i(
461
+ className: o(
461
462
  "border-t border-line px-(--table-pad-x) py-3 text-table-header",
462
- h
463
+ g
463
464
  ),
464
- children: b
465
+ children: f
465
466
  }
466
467
  ) : null,
467
- g ? /* @__PURE__ */ e("div", { className: "pointer-events-none absolute right-4 top-(--table-inset) flex h-(--table-header-h) items-center", children: /* @__PURE__ */ e("div", { className: "pointer-events-auto", children: g }) }) : null
468
+ b ? /* @__PURE__ */ e("div", { className: "pointer-events-none absolute right-4 top-(--table-inset) flex h-(--table-header-h) items-center", children: /* @__PURE__ */ e("div", { className: "pointer-events-auto", children: b }) }) : null
468
469
  ] });
469
470
  }
470
- function Za(t) {
471
- const a = vt.toArray(t), n = a.filter(
472
- (l) => Nt(l) && l.type === zt
471
+ function er(t) {
472
+ const a = Mt.toArray(t), n = a.filter(
473
+ (l) => Pt(l) && l.type === Lt
473
474
  );
474
475
  return {
475
- header: n.length > 0 ? /* @__PURE__ */ e(je, { children: n }) : void 0,
476
+ header: n.length > 0 ? /* @__PURE__ */ e(Ge, { children: n }) : void 0,
476
477
  body: a.filter((l) => !n.includes(l))
477
478
  };
478
479
  }
479
- const er = f(
480
+ const tr = h(
480
481
  ({ className: t, children: a, ...n }, l) => {
481
- const { header: o, body: m } = Za(a);
482
- return /* @__PURE__ */ e("div", { ref: l, ...n, children: /* @__PURE__ */ e(xe, { className: i("shadow-xs", t), header: o, children: m }) });
482
+ const { header: i, body: c } = er(a);
483
+ return /* @__PURE__ */ e("div", { ref: l, ...n, children: /* @__PURE__ */ e(ze, { className: o("shadow-xs", t), header: i, children: c }) });
483
484
  }
484
485
  );
485
- er.displayName = "Card";
486
- const zt = f(({ className: t, ...a }, n) => /* @__PURE__ */ e(
486
+ tr.displayName = "Card";
487
+ const Lt = h(({ className: t, ...a }, n) => /* @__PURE__ */ e(
487
488
  "div",
488
489
  {
489
490
  ref: n,
490
- className: i(
491
+ className: o(
491
492
  "flex flex-col gap-1 px-5 py-4",
492
493
  t
493
494
  ),
494
495
  ...a
495
496
  }
496
497
  ));
497
- zt.displayName = "CardHeader";
498
- const tr = f(({ className: t, ...a }, n) => /* @__PURE__ */ e(
498
+ Lt.displayName = "CardHeader";
499
+ const ar = h(({ className: t, ...a }, n) => /* @__PURE__ */ e(
499
500
  "h2",
500
501
  {
501
502
  ref: n,
502
- className: i("text-sm font-semibold text-fg", t),
503
+ className: o("text-sm font-semibold text-fg", t),
503
504
  ...a
504
505
  }
505
506
  ));
506
- tr.displayName = "CardTitle";
507
- const ar = f(({ className: t, ...a }, n) => /* @__PURE__ */ e(
507
+ ar.displayName = "CardTitle";
508
+ const rr = h(({ className: t, ...a }, n) => /* @__PURE__ */ e(
508
509
  "p",
509
510
  {
510
511
  ref: n,
511
- className: i(
512
+ className: o(
512
513
  "mt-1 border-t border-card-divider pt-2 text-sm text-muted",
513
514
  "first:mt-0 first:border-t-0 first:pt-0",
514
515
  t
@@ -516,26 +517,26 @@ const ar = f(({ className: t, ...a }, n) => /* @__PURE__ */ e(
516
517
  ...a
517
518
  }
518
519
  ));
519
- ar.displayName = "CardDescription";
520
- const rr = f(({ className: t, ...a }, n) => /* @__PURE__ */ e("div", { ref: n, className: i("px-5 py-4", t), ...a }));
521
- rr.displayName = "CardContent";
522
- const nr = f(({ className: t, ...a }, n) => /* @__PURE__ */ e(
520
+ rr.displayName = "CardDescription";
521
+ const nr = h(({ className: t, ...a }, n) => /* @__PURE__ */ e("div", { ref: n, className: o("px-5 py-4", t), ...a }));
522
+ nr.displayName = "CardContent";
523
+ const lr = h(({ className: t, ...a }, n) => /* @__PURE__ */ e(
523
524
  "div",
524
525
  {
525
526
  ref: n,
526
- className: i(
527
+ className: o(
527
528
  "flex items-center gap-3 border-t border-line px-5 py-3",
528
529
  t
529
530
  ),
530
531
  ...a
531
532
  }
532
533
  ));
533
- nr.displayName = "CardFooter";
534
- const Pe = f(({ className: t, ...a }, n) => /* @__PURE__ */ e(
535
- ut.Root,
534
+ lr.displayName = "CardFooter";
535
+ const Fe = h(({ className: t, ...a }, n) => /* @__PURE__ */ e(
536
+ Nt.Root,
536
537
  {
537
538
  ref: n,
538
- className: i(
539
+ className: o(
539
540
  "peer size-4 shrink-0 rounded border border-line-strong bg-transparent transition-colors",
540
541
  "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-focus/40",
541
542
  "disabled:cursor-not-allowed disabled:opacity-50",
@@ -544,27 +545,27 @@ const Pe = f(({ className: t, ...a }, n) => /* @__PURE__ */ e(
544
545
  t
545
546
  ),
546
547
  ...a,
547
- children: /* @__PURE__ */ e(ut.Indicator, { className: "btn-fill btn-inner-border flex size-full items-center justify-center rounded-[3px] border-0 bg-[var(--button-primary-bg)] text-[var(--button-primary-fg)] [--button-inner:var(--button-primary-inner)]", children: a.checked === "indeterminate" ? /* @__PURE__ */ e(Ca, { className: "size-3", weight: "bold" }) : /* @__PURE__ */ e(ae, { className: "size-3", weight: "bold" }) })
548
+ children: /* @__PURE__ */ e(Nt.Indicator, { className: "btn-fill btn-inner-border flex size-full items-center justify-center rounded-[3px] border-0 bg-[var(--button-primary-bg)] text-[var(--button-primary-fg)] [--button-inner:var(--button-primary-inner)]", children: a.checked === "indeterminate" ? /* @__PURE__ */ e(Sa, { className: "size-3", weight: "bold" }) : /* @__PURE__ */ e(ie, { className: "size-3", weight: "bold" }) })
548
549
  }
549
550
  ));
550
- Pe.displayName = "Checkbox";
551
- function pt(t) {
551
+ Fe.displayName = "Checkbox";
552
+ function wt(t) {
552
553
  return t.width > 0 && t.height > 0;
553
554
  }
554
- function ft(t) {
555
+ function Ct(t) {
555
556
  return Math.min(1, Math.max(0.1, t));
556
557
  }
557
- function lr(t, a) {
558
- return !pt(t) || !pt(a) ? null : {
558
+ function or(t, a) {
559
+ return !wt(t) || !wt(a) ? null : {
559
560
  dx: t.left + t.width / 2 - (a.left + a.width / 2),
560
561
  dy: t.top + t.height / 2 - (a.top + a.height / 2),
561
- sx: ft(t.width / a.width),
562
- sy: ft(t.height / a.height)
562
+ sx: Ct(t.width / a.width),
563
+ sy: Ct(t.height / a.height)
563
564
  };
564
565
  }
565
- const kt = 'button, a, [role="button"], [role="menuitem"], [data-dialog-origin]';
566
- let W = null, bt = !1;
567
- function Le(t) {
566
+ const At = 'button, a, [role="button"], [role="menuitem"], [data-dialog-origin]';
567
+ let Q = null, zt = !1;
568
+ function We(t) {
568
569
  const a = t.getBoundingClientRect();
569
570
  return a.width <= 0 || a.height <= 0 ? null : {
570
571
  left: a.left,
@@ -573,152 +574,152 @@ function Le(t) {
573
574
  height: a.height
574
575
  };
575
576
  }
576
- function Ie(t) {
577
+ function qe(t) {
577
578
  if (!(t instanceof Element)) return;
578
- const a = t.closest(kt);
579
+ const a = t.closest(At);
579
580
  if (!a) return;
580
- const n = Le(a);
581
- n && (W = { rect: n, at: Date.now() });
581
+ const n = We(a);
582
+ n && (Q = { rect: n, at: Date.now() });
582
583
  }
583
584
  function ir() {
584
- bt || typeof document > "u" || (bt = !0, document.addEventListener(
585
+ zt || typeof document > "u" || (zt = !0, document.addEventListener(
585
586
  "pointerdown",
586
- (t) => Ie(t.target),
587
+ (t) => qe(t.target),
587
588
  !0
588
589
  ), document.addEventListener(
589
590
  "keydown",
590
591
  (t) => {
591
- t.key !== "Enter" && t.key !== " " || Ie(document.activeElement);
592
+ t.key !== "Enter" && t.key !== " " || qe(document.activeElement);
592
593
  },
593
594
  !0
594
595
  ));
595
596
  }
596
- function or(t) {
597
- if (W && Date.now() - W.at < 2e3) {
598
- const n = W.rect;
599
- return W = null, n;
597
+ function sr(t) {
598
+ if (Q && Date.now() - Q.at < 2e3) {
599
+ const n = Q.rect;
600
+ return Q = null, n;
600
601
  }
601
- W = null;
602
+ Q = null;
602
603
  const a = document.activeElement;
603
- return a instanceof Element && a !== t && !t.contains(a) && a.matches(kt) ? Le(a) : null;
604
+ return a instanceof Element && a !== t && !t.contains(a) && a.matches(At) ? We(a) : null;
604
605
  }
605
- const sr = 250, Dt = re(!1), Tt = re(() => {
606
- }), Ae = re(!1);
607
- function dr({
606
+ const dr = 250, Bt = se(!1), $t = se(() => {
607
+ }), Ue = se(!1);
608
+ function cr({
608
609
  open: t,
609
610
  defaultOpen: a,
610
611
  onOpenChange: n,
611
612
  children: l,
612
- ...o
613
+ ...i
613
614
  }) {
614
- const [m, u] = T(
615
+ const [c, m] = P(
615
616
  a ?? !1
616
- ), [c, x] = T(!1), b = _(!1), h = _(null), N = t ?? m, k = _(N);
617
- k.current = N;
618
- const v = t !== void 0;
619
- Z(() => ir(), []), Z(() => {
620
- t && (h.current && clearTimeout(h.current), b.current = !1, x(!1));
621
- }, [t]), Z(
617
+ ), [u, x] = P(!1), f = B(!1), g = B(null), N = t ?? c, z = B(N);
618
+ z.current = N;
619
+ const y = t !== void 0;
620
+ V(() => ir(), []), V(() => {
621
+ t && (g.current && clearTimeout(g.current), f.current = !1, x(!1));
622
+ }, [t]), V(
622
623
  () => () => {
623
- h.current && clearTimeout(h.current);
624
+ g.current && clearTimeout(g.current);
624
625
  },
625
626
  []
626
627
  );
627
- const D = (S) => {
628
- if (S) {
629
- h.current && clearTimeout(h.current), b.current = !1, x(!1), v || u(!0), n == null || n(!0);
628
+ const D = (k) => {
629
+ if (k) {
630
+ g.current && clearTimeout(g.current), f.current = !1, x(!1), y || m(!0), n == null || n(!0);
630
631
  return;
631
632
  }
632
- if (!N || b.current) return;
633
+ if (!N || f.current) return;
633
634
  if (typeof window < "u" && typeof window.matchMedia == "function" && window.matchMedia("(prefers-reduced-motion: reduce)").matches) {
634
- v || u(!1), n == null || n(!1);
635
+ y || m(!1), n == null || n(!1);
635
636
  return;
636
637
  }
637
- b.current = !0, x(!0), h.current = setTimeout(() => {
638
- v || u(!1), n == null || n(!1), requestAnimationFrame(() => {
639
- k.current && (b.current = !1, x(!1));
638
+ f.current = !0, x(!0), g.current = setTimeout(() => {
639
+ y || m(!1), n == null || n(!1), requestAnimationFrame(() => {
640
+ z.current && (f.current = !1, x(!1));
640
641
  });
641
- }, sr);
642
+ }, dr);
642
643
  };
643
- return /* @__PURE__ */ e(Tt.Provider, { value: () => D(!1), children: /* @__PURE__ */ e(Dt.Provider, { value: c, children: /* @__PURE__ */ e(Ae.Provider, { value: !0, children: /* @__PURE__ */ e(
644
- E.Root,
644
+ return /* @__PURE__ */ e($t.Provider, { value: () => D(!1), children: /* @__PURE__ */ e(Bt.Provider, { value: u, children: /* @__PURE__ */ e(Ue.Provider, { value: !0, children: /* @__PURE__ */ e(
645
+ $.Root,
645
646
  {
646
647
  open: N,
647
648
  onOpenChange: D,
648
- ...o,
649
+ ...i,
649
650
  children: l
650
651
  }
651
652
  ) }) }) });
652
653
  }
653
- const Mt = f(({ onClick: t, ...a }, n) => /* @__PURE__ */ e(
654
- E.Trigger,
654
+ const Ft = h(({ onClick: t, ...a }, n) => /* @__PURE__ */ e(
655
+ $.Trigger,
655
656
  {
656
657
  ref: n,
657
658
  onClick: (l) => {
658
- Ie(l.currentTarget), t == null || t(l);
659
+ qe(l.currentTarget), t == null || t(l);
659
660
  },
660
661
  ...a
661
662
  }
662
663
  ));
663
- Mt.displayName = "DialogTrigger";
664
- const Gr = E.Close, Pt = f(
665
- ({ variant: t = "secondary", children: a = "Cancel", ...n }, l) => /* @__PURE__ */ e(E.Close, { asChild: !0, children: /* @__PURE__ */ e(M, { ref: l, type: "button", variant: t, ...n, children: a }) })
664
+ Ft.displayName = "DialogTrigger";
665
+ const Gr = $.Close, qt = h(
666
+ ({ variant: t = "secondary", children: a = "Cancel", ...n }, l) => /* @__PURE__ */ e($.Close, { asChild: !0, children: /* @__PURE__ */ e(R, { ref: l, type: "button", variant: t, ...n, children: a }) })
666
667
  );
667
- Pt.displayName = "DialogCancel";
668
- function It(t, a = !0) {
668
+ qt.displayName = "DialogCancel";
669
+ function Ht(t, a = !0) {
669
670
  if (t.dataset.dialogMotionStarted === "true" || typeof window < "u" && typeof window.matchMedia == "function" && window.matchMedia("(prefers-reduced-motion: reduce)").matches)
670
671
  return;
671
- const n = Le(t);
672
+ const n = We(t);
672
673
  if (!n) {
673
- a && window.requestAnimationFrame(() => It(t, !1));
674
+ a && window.requestAnimationFrame(() => Ht(t, !1));
674
675
  return;
675
676
  }
676
677
  t.dataset.dialogMotionStarted = "true";
677
- const l = or(t), o = l ? lr(l, n) : null;
678
- o ? (t.style.setProperty("--dialog-dx", `${o.dx}px`), t.style.setProperty("--dialog-dy", `${o.dy}px`), t.style.setProperty("--dialog-sx", String(o.sx)), t.style.setProperty("--dialog-sy", String(o.sy)), t.classList.add("dialog-fly-in")) : (t.style.removeProperty("--dialog-dx"), t.style.removeProperty("--dialog-dy"), t.style.removeProperty("--dialog-sx"), t.style.removeProperty("--dialog-sy"), t.classList.add("dialog-pop-in"));
679
- const m = () => {
678
+ const l = sr(t), i = l ? or(l, n) : null;
679
+ i ? (t.style.setProperty("--dialog-dx", `${i.dx}px`), t.style.setProperty("--dialog-dy", `${i.dy}px`), t.style.setProperty("--dialog-sx", String(i.sx)), t.style.setProperty("--dialog-sy", String(i.sy)), t.classList.add("dialog-fly-in")) : (t.style.removeProperty("--dialog-dx"), t.style.removeProperty("--dialog-dy"), t.style.removeProperty("--dialog-sx"), t.style.removeProperty("--dialog-sy"), t.classList.add("dialog-pop-in"));
680
+ const c = () => {
680
681
  t.classList.remove("dialog-fly-in", "dialog-pop-in");
681
- }, u = (c) => {
682
- c.target === t && (c.animationName !== "dialog-fly-in" && c.animationName !== "dialog-pop-in" || (t.removeEventListener("animationend", u), m()));
682
+ }, m = (u) => {
683
+ u.target === t && (u.animationName !== "dialog-fly-in" && u.animationName !== "dialog-pop-in" || (t.removeEventListener("animationend", m), c()));
683
684
  };
684
- t.addEventListener("animationend", u);
685
+ t.addEventListener("animationend", m);
685
686
  }
686
- function cr(t) {
687
+ function ur(t) {
687
688
  return t.replace(/dvh\b/g, "vh");
688
689
  }
689
- const Rt = f(
690
+ const Gt = h(
690
691
  ({
691
692
  className: t,
692
693
  children: a,
693
694
  placement: n = "center",
694
695
  topOffset: l = "11dvh",
695
- motion: o = "auto",
696
- style: m,
697
- onEscapeKeyDown: u,
698
- onPointerDownOutside: c,
696
+ motion: i = "auto",
697
+ style: c,
698
+ onEscapeKeyDown: m,
699
+ onPointerDownOutside: u,
699
700
  ...x
700
- }, b) => {
701
- const h = O(Dt), N = n === "top", k = N ? {
701
+ }, f) => {
702
+ const g = Z(Bt), N = n === "top", z = N ? {
702
703
  "--dialog-top-offset": l,
703
- "--dialog-top-offset-fallback": cr(l)
704
- } : void 0, v = O(Tt), D = _(null), S = yt(
705
- (g) => {
706
- if (D.current = g, g && o === "auto" && It(g), typeof b == "function") {
707
- b(g);
704
+ "--dialog-top-offset-fallback": ur(l)
705
+ } : void 0, y = Z($t), D = B(null), k = It(
706
+ (b) => {
707
+ if (D.current = b, b && i === "auto" && Ht(b), typeof f == "function") {
708
+ f(b);
708
709
  return;
709
710
  }
710
- b && (b.current = g);
711
+ f && (f.current = b);
711
712
  },
712
- [o, b]
713
+ [i, f]
713
714
  );
714
- return /* @__PURE__ */ s(E.Portal, { children: [
715
+ return /* @__PURE__ */ s($.Portal, { children: [
715
716
  /* @__PURE__ */ e(
716
- E.Overlay,
717
+ $.Overlay,
717
718
  {
718
- className: i(
719
+ className: o(
719
720
  "fixed inset-0 z-50 overflow-hidden bg-overlay backdrop-blur-[3px] data-[state=open]:animate-in data-[state=open]:fade-in-0",
720
- !h && "data-[state=closed]:animate-out data-[state=closed]:fade-out-0",
721
- h && "opacity-0 transition-opacity duration-200"
721
+ !g && "data-[state=closed]:animate-out data-[state=closed]:fade-out-0",
722
+ g && "opacity-0 transition-opacity duration-200"
722
723
  ),
723
724
  children: /* @__PURE__ */ e(
724
725
  "span",
@@ -732,35 +733,35 @@ const Rt = f(
732
733
  /* @__PURE__ */ e(
733
734
  "div",
734
735
  {
735
- className: i(
736
+ className: o(
736
737
  "pointer-events-none fixed inset-0 z-50 flex justify-center overflow-y-auto p-4",
737
738
  N ? "items-start" : "items-center"
738
739
  ),
739
740
  children: /* @__PURE__ */ s(
740
- E.Content,
741
+ $.Content,
741
742
  {
742
- ref: S,
743
- style: k ? { ...k, ...m } : m,
744
- className: i(
743
+ ref: k,
744
+ style: z ? { ...z, ...c } : c,
745
+ className: o(
745
746
  "dialog-content pointer-events-auto relative flex max-h-[min(85vh,44rem)] w-full max-w-[22.4rem] flex-col gap-0 overflow-hidden will-change-[transform,opacity]",
746
747
  "rounded-2xl border border-(--dialog-shell-border) bg-(--dialog-shell-bg) pb-3 shadow-(--dialog-shell-shadow) sm:pb-4",
747
748
  N && "dialog-anchor-top",
748
- o === "command" && "dialog-command-motion",
749
- h && "dialog-closing",
749
+ i === "command" && "dialog-command-motion",
750
+ g && "dialog-closing",
750
751
  "focus:outline-none",
751
752
  t
752
753
  ),
753
- onEscapeKeyDown: (g) => {
754
- u == null || u(g), !g.defaultPrevented && (g.preventDefault(), v());
754
+ onEscapeKeyDown: (b) => {
755
+ m == null || m(b), !b.defaultPrevented && (b.preventDefault(), y());
755
756
  },
756
- onPointerDownOutside: (g) => {
757
- c == null || c(g), !g.defaultPrevented && (g.preventDefault(), v());
757
+ onPointerDownOutside: (b) => {
758
+ u == null || u(b), !b.defaultPrevented && (b.preventDefault(), y());
758
759
  },
759
760
  ...x,
760
761
  children: [
761
762
  a,
762
- /* @__PURE__ */ s(E.Close, { className: "absolute right-3.5 top-3.5 z-10 rounded-sm text-subtle transition-colors hover:text-fg focus-visible:outline-none", children: [
763
- /* @__PURE__ */ e(be, { className: "size-4" }),
763
+ /* @__PURE__ */ s($.Close, { className: "absolute right-3.5 top-3.5 z-10 rounded-sm text-subtle transition-colors hover:text-fg focus-visible:outline-none", children: [
764
+ /* @__PURE__ */ e(ye, { className: "size-4" }),
764
765
  /* @__PURE__ */ e("span", { className: "sr-only", children: "Close" })
765
766
  ] })
766
767
  ]
@@ -771,8 +772,8 @@ const Rt = f(
771
772
  ] });
772
773
  }
773
774
  );
774
- Rt.displayName = "DialogContent";
775
- function ur({
775
+ Gt.displayName = "DialogContent";
776
+ function mr({
776
777
  className: t,
777
778
  ...a
778
779
  }) {
@@ -780,7 +781,7 @@ function ur({
780
781
  "div",
781
782
  {
782
783
  "data-slot": "panel",
783
- className: i(
784
+ className: o(
784
785
  "flex min-h-0 flex-1 flex-col overflow-hidden rounded-b-2xl border-x-0 border-t-0 border-b border-(--dialog-panel-border) bg-(--dialog-panel-bg) shadow-(--dialog-panel-shadow)",
785
786
  t
786
787
  ),
@@ -788,7 +789,7 @@ function ur({
788
789
  }
789
790
  );
790
791
  }
791
- function mr({
792
+ function pr({
792
793
  className: t,
793
794
  ...a
794
795
  }) {
@@ -796,12 +797,12 @@ function mr({
796
797
  "div",
797
798
  {
798
799
  "data-slot": "body",
799
- className: i("min-h-0 flex-1 overflow-y-auto px-5 py-4", t),
800
+ className: o("min-h-0 flex-1 overflow-y-auto px-5 py-4", t),
800
801
  ...a
801
802
  }
802
803
  );
803
804
  }
804
- function pr({
805
+ function fr({
805
806
  className: t,
806
807
  ...a
807
808
  }) {
@@ -809,7 +810,7 @@ function pr({
809
810
  "div",
810
811
  {
811
812
  "data-slot": "header",
812
- className: i(
813
+ className: o(
813
814
  "flex shrink-0 flex-col gap-1.5 border-b border-(--dialog-panel-border) px-5 py-4",
814
815
  t
815
816
  ),
@@ -817,7 +818,7 @@ function pr({
817
818
  }
818
819
  );
819
820
  }
820
- function fr({
821
+ function br({
821
822
  className: t,
822
823
  ...a
823
824
  }) {
@@ -825,7 +826,7 @@ function fr({
825
826
  "div",
826
827
  {
827
828
  "data-slot": "footer",
828
- className: i(
829
+ className: o(
829
830
  "flex shrink-0 flex-col-reverse gap-2 px-3 pt-3 sm:flex-row sm:px-4 sm:pt-3.5 sm:*:flex-1",
830
831
  t
831
832
  ),
@@ -833,81 +834,81 @@ function fr({
833
834
  }
834
835
  );
835
836
  }
836
- const jt = f(({ className: t, ...a }, n) => {
837
- const l = O(Ae) ? E.Title : "h2";
837
+ const Ot = h(({ className: t, ...a }, n) => {
838
+ const l = Z(Ue) ? $.Title : "h2";
838
839
  return /* @__PURE__ */ e(
839
840
  l,
840
841
  {
841
842
  ref: n,
842
- className: i("text-base font-semibold text-fg", t),
843
+ className: o("text-base font-semibold text-fg", t),
843
844
  ...a
844
845
  }
845
846
  );
846
847
  });
847
- jt.displayName = "DialogTitle";
848
- const br = f(({ className: t, ...a }, n) => {
849
- const l = O(Ae) ? E.Description : "p";
848
+ Ot.displayName = "DialogTitle";
849
+ const hr = h(({ className: t, ...a }, n) => {
850
+ const l = Z(Ue) ? $.Description : "p";
850
851
  return /* @__PURE__ */ e(
851
852
  l,
852
853
  {
853
854
  ref: n,
854
- className: i("text-sm text-muted", t),
855
+ className: o("text-sm text-muted", t),
855
856
  ...a
856
857
  }
857
858
  );
858
859
  });
859
- br.displayName = "DialogDescription";
860
- const _t = re(null);
861
- function hr({
860
+ hr.displayName = "DialogDescription";
861
+ const Vt = se(null);
862
+ function gr({
862
863
  label: t,
863
864
  value: a,
864
865
  onChange: n,
865
866
  disabled: l = !1,
866
- name: o,
867
- className: m,
868
- children: u,
869
- ...c
867
+ name: i,
868
+ className: c,
869
+ children: m,
870
+ ...u
870
871
  }) {
871
- const x = ge(), b = o ?? x;
872
- return /* @__PURE__ */ e(_t.Provider, { value: { name: b, value: a, onChange: n, disabled: l }, children: /* @__PURE__ */ s("fieldset", { className: i("flex flex-col gap-6", m), ...c, children: [
872
+ const x = Ce(), f = i ?? x;
873
+ return /* @__PURE__ */ e(Vt.Provider, { value: { name: f, value: a, onChange: n, disabled: l }, children: /* @__PURE__ */ s("fieldset", { className: o("flex flex-col gap-6", c), ...u, children: [
873
874
  /* @__PURE__ */ e("legend", { className: "sr-only", children: t }),
874
- u
875
+ m
875
876
  ] }) });
876
877
  }
877
- function gr({
878
+ function xr({
878
879
  value: t,
879
880
  title: a,
880
881
  description: n,
881
882
  badge: l,
882
- disabled: o = !1,
883
- className: m
883
+ disabled: i = !1,
884
+ className: c
884
885
  }) {
885
- const u = O(_t), c = ge();
886
- if (!u)
886
+ const m = Z(Vt), u = Ce();
887
+ if (!m)
887
888
  throw new Error("RadioCard must be rendered inside a RadioGroup");
888
- const x = o || u.disabled, b = u.value === t;
889
+ const x = i || m.disabled, f = m.value === t;
889
890
  return /* @__PURE__ */ s(
890
891
  "label",
891
892
  {
892
- className: i(
893
+ className: o(
893
894
  "group relative flex items-start gap-3",
894
895
  x ? "cursor-not-allowed opacity-50" : "cursor-pointer",
895
- m
896
+ c
896
897
  ),
897
898
  children: [
898
899
  /* @__PURE__ */ e(
899
900
  "input",
900
901
  {
901
902
  type: "radio",
902
- name: u.name,
903
+ name: m.name,
903
904
  value: t,
904
- checked: b,
905
+ checked: f,
905
906
  disabled: x,
906
907
  onChange: () => {
907
- var h;
908
- return (h = u.onChange) == null ? void 0 : h.call(u, t);
908
+ var g;
909
+ return (g = m.onChange) == null ? void 0 : g.call(m, t);
909
910
  },
910
- "aria-describedby": n ? c : void 0,
911
+ "aria-describedby": n ? u : void 0,
911
912
  className: "peer sr-only"
912
913
  }
913
914
  ),
@@ -915,7 +916,7 @@ function gr({
915
916
  "span",
916
917
  {
917
918
  "aria-hidden": !0,
918
- className: i(
919
+ className: o(
919
920
  "mt-[5px] grid size-3.5 shrink-0 place-items-center rounded-full border-2 border-transparent bg-line-strong transition-colors",
920
921
  "peer-checked:border-4 peer-checked:border-primary peer-checked:bg-primary-fg",
921
922
  "peer-focus-visible:ring-2 peer-focus-visible:ring-focus/40 peer-focus-visible:ring-offset-2 peer-focus-visible:ring-offset-canvas"
@@ -927,53 +928,53 @@ function gr({
927
928
  /* @__PURE__ */ e("span", { className: "text-base font-semibold text-fg", children: a }),
928
929
  l ? /* @__PURE__ */ e(Wa, { variant: "primary", children: l }) : null
929
930
  ] }),
930
- n ? /* @__PURE__ */ e("span", { id: c, className: "mt-1 block text-sm text-muted", children: n }) : null
931
+ n ? /* @__PURE__ */ e("span", { id: u, className: "mt-1 block text-sm text-muted", children: n }) : null
931
932
  ] })
932
933
  ]
933
934
  }
934
935
  );
935
936
  }
936
- function Hr({
937
+ function Or({
937
938
  open: t,
938
939
  onOpenChange: a,
939
940
  trigger: n,
940
941
  title: l,
941
- options: o,
942
- defaultValue: m,
943
- value: u,
944
- onValueChange: c,
942
+ options: i,
943
+ defaultValue: c,
944
+ value: m,
945
+ onValueChange: u,
945
946
  cancelLabel: x = "Cancel",
946
- confirmLabel: b = "Continue",
947
- onConfirm: h
947
+ confirmLabel: f = "Continue",
948
+ onConfirm: g
948
949
  }) {
949
- var S;
950
- const [N, k] = T(m ?? ((S = o[0]) == null ? void 0 : S.value) ?? ""), v = u ?? N;
951
- return /* @__PURE__ */ s(dr, { open: t, onOpenChange: a, children: [
952
- n ? /* @__PURE__ */ e(Mt, { asChild: !0, children: n }) : null,
950
+ var k;
951
+ const [N, z] = P(c ?? ((k = i[0]) == null ? void 0 : k.value) ?? ""), y = m ?? N;
952
+ return /* @__PURE__ */ s(cr, { open: t, onOpenChange: a, children: [
953
+ n ? /* @__PURE__ */ e(Ft, { asChild: !0, children: n }) : null,
953
954
  /* @__PURE__ */ s(
954
- Rt,
955
+ Gt,
955
956
  {
956
957
  "aria-describedby": void 0,
957
958
  className: "max-w-[29.4rem] [&>button]:hidden",
958
959
  children: [
959
- /* @__PURE__ */ s(ur, { children: [
960
- /* @__PURE__ */ e(pr, { children: /* @__PURE__ */ e(jt, { className: "text-xl", children: l }) }),
961
- /* @__PURE__ */ e(mr, { children: /* @__PURE__ */ e(hr, { label: l, value: v, onChange: (g) => {
962
- u === void 0 && k(g), c == null || c(g);
963
- }, children: o.map((g) => /* @__PURE__ */ e(
964
- gr,
960
+ /* @__PURE__ */ s(mr, { children: [
961
+ /* @__PURE__ */ e(fr, { children: /* @__PURE__ */ e(Ot, { className: "text-xl", children: l }) }),
962
+ /* @__PURE__ */ e(pr, { children: /* @__PURE__ */ e(gr, { label: l, value: y, onChange: (b) => {
963
+ m === void 0 && z(b), u == null || u(b);
964
+ }, children: i.map((b) => /* @__PURE__ */ e(
965
+ xr,
965
966
  {
966
- value: g.value,
967
- title: g.title,
968
- description: g.description,
969
- badge: g.badge
967
+ value: b.value,
968
+ title: b.title,
969
+ description: b.description,
970
+ badge: b.badge
970
971
  },
971
- g.value
972
+ b.value
972
973
  )) }) })
973
974
  ] }),
974
- /* @__PURE__ */ s(fr, { className: "gap-3 pt-2.5", children: [
975
- /* @__PURE__ */ e(Pt, { className: "flex-1", children: x }),
976
- /* @__PURE__ */ e(M, { className: "flex-1", onClick: () => h == null ? void 0 : h(v), children: b })
975
+ /* @__PURE__ */ s(br, { className: "gap-3 pt-2.5", children: [
976
+ /* @__PURE__ */ e(qt, { className: "flex-1", children: x }),
977
+ /* @__PURE__ */ e(R, { className: "flex-1", onClick: () => g == null ? void 0 : g(y), children: f })
977
978
  ] })
978
979
  ]
979
980
  }
@@ -981,19 +982,19 @@ function Hr({
981
982
  ] });
982
983
  }
983
984
  function Vr({ code: t, label: a, className: n }) {
984
- const [l, o] = T(!1);
985
+ const [l, i] = P(!1);
985
986
  return /* @__PURE__ */ e(
986
- xe,
987
+ ze,
987
988
  {
988
989
  className: n,
989
990
  header: /* @__PURE__ */ e("div", { className: "flex h-(--table-header-h) items-center px-(--table-pad-x) pr-28", children: /* @__PURE__ */ e("span", { className: "truncate text-[13px] font-medium text-table-header", children: a }) }),
990
991
  action: {
991
992
  label: l ? "Copied" : "Copy",
992
- icon: l ? /* @__PURE__ */ e(ae, { className: "text-success", weight: "bold" }) : /* @__PURE__ */ e(gt, {}),
993
+ icon: l ? /* @__PURE__ */ e(ie, { className: "text-success", weight: "bold" }) : /* @__PURE__ */ e(St, {}),
993
994
  variant: "ghost",
994
995
  onClick: async () => {
995
996
  try {
996
- await navigator.clipboard.writeText(t), o(!0), window.setTimeout(() => o(!1), 1500);
997
+ await navigator.clipboard.writeText(t), i(!0), window.setTimeout(() => i(!1), 1500);
997
998
  } catch {
998
999
  }
999
1000
  }
@@ -1003,189 +1004,317 @@ function Vr({ code: t, label: a, className: n }) {
1003
1004
  }
1004
1005
  );
1005
1006
  }
1006
- const xr = {
1007
+ const vr = {
1007
1008
  sm: "h-[var(--control-h-sm)] text-sm",
1008
1009
  md: "h-[var(--control-h-md)] text-sm",
1009
1010
  lg: "h-[var(--control-h-lg)] text-sm",
1010
1011
  xl: "h-[var(--control-h-xl)] rounded-lg text-base"
1011
- }, vr = {
1012
+ }, Nr = {
1012
1013
  sm: "px-[var(--control-pad-x-sm)]",
1013
1014
  md: "px-[var(--control-pad-x-md)]",
1014
1015
  lg: "px-[var(--control-pad-x-lg)]",
1015
1016
  xl: "px-[var(--control-pad-x-xl)]"
1016
- }, Nr = {
1017
+ }, yr = {
1017
1018
  sm: "left-[var(--control-pad-x-sm)]",
1018
1019
  md: "left-[var(--control-pad-x-md)]",
1019
1020
  lg: "left-[var(--control-pad-x-lg)]",
1020
1021
  xl: "left-[var(--control-pad-x-xl)]"
1021
- }, ht = {
1022
+ }, kt = {
1022
1023
  sm: "right-[var(--control-pad-x-sm)]",
1023
1024
  md: "right-[var(--control-pad-x-md)]",
1024
1025
  lg: "right-[var(--control-pad-x-lg)]",
1025
1026
  xl: "right-[var(--control-pad-x-xl)]"
1026
- }, Te = {
1027
+ }, Be = {
1027
1028
  sm: "size-[var(--control-icon-sm)]",
1028
1029
  md: "size-[var(--control-icon-md)]",
1029
1030
  lg: "size-[var(--control-icon-lg)]",
1030
1031
  xl: "size-[var(--control-icon-xl)]"
1031
- }, Be = f(
1032
+ }, ke = h(
1032
1033
  ({
1033
1034
  className: t,
1034
1035
  containerClassName: a,
1035
1036
  type: n = "text",
1036
1037
  size: l = "md",
1037
- leadingIcon: o,
1038
- trailingIcon: m,
1039
- onClear: u,
1040
- value: c,
1038
+ leadingIcon: i,
1039
+ trailingIcon: c,
1040
+ onClear: m,
1041
+ value: u,
1041
1042
  defaultValue: x,
1042
- error: b = !1,
1043
- helperText: h,
1043
+ error: f = !1,
1044
+ helperText: g,
1044
1045
  id: N,
1045
- "aria-describedby": k,
1046
- disabled: v,
1046
+ "aria-describedby": z,
1047
+ disabled: y,
1047
1048
  readOnly: D,
1048
- ...S
1049
- }, g) => {
1050
- const j = ge(), I = N ?? j, A = !!h, F = !!(u && (c !== void 0 ? String(c).length > 0 : x !== void 0 && String(x).length > 0)), ne = A ? `${I}-description` : void 0, U = [k, ne].filter(Boolean).join(" ") || void 0, le = /* @__PURE__ */ e(
1049
+ ...k
1050
+ }, b) => {
1051
+ const I = Ce(), M = N ?? I, L = !!g, A = !!(m && (u !== void 0 ? String(u).length > 0 : x !== void 0 && String(x).length > 0)), q = L ? `${M}-description` : void 0, F = [z, q].filter(Boolean).join(" ") || void 0, E = /* @__PURE__ */ e(
1051
1052
  "input",
1052
1053
  {
1053
- ref: g,
1054
- id: I,
1054
+ ref: b,
1055
+ id: M,
1055
1056
  type: n,
1056
- disabled: v,
1057
+ disabled: y,
1057
1058
  readOnly: D,
1058
- "aria-invalid": b || void 0,
1059
- "aria-describedby": U,
1060
- style: o || m || F ? {
1061
- paddingInlineStart: o ? `calc(var(--control-pad-x-${l}) + var(--control-icon-${l}) + var(--control-gap))` : void 0,
1062
- paddingInlineEnd: m || F ? `calc(var(--control-pad-x-${l}) + var(--control-icon-${l}) + var(--control-gap))` : void 0
1059
+ "aria-invalid": f || void 0,
1060
+ "aria-describedby": F,
1061
+ style: i || c || A ? {
1062
+ paddingInlineStart: i ? `calc(var(--control-pad-x-${l}) + var(--control-icon-${l}) + var(--control-gap))` : void 0,
1063
+ paddingInlineEnd: c || A ? `calc(var(--control-pad-x-${l}) + var(--control-icon-${l}) + var(--control-gap))` : void 0
1063
1064
  } : void 0,
1064
- className: i(
1065
+ className: o(
1065
1066
  "flex w-full rounded-md border bg-(--input-bg) text-(--input-fg) transition-colors",
1066
- xr[l],
1067
1067
  vr[l],
1068
+ Nr[l],
1068
1069
  "placeholder:text-(--input-placeholder)",
1069
1070
  "hover:border-(--input-border-hover)",
1070
1071
  "focus-visible:outline-none focus-visible:border-(--input-border-focus) focus-visible:ring-2 focus-visible:ring-focus/30",
1071
- b && "border-error hover:border-error focus-visible:border-error focus-visible:ring-error/30",
1072
- !b && "border-(--input-border)",
1072
+ f && "border-error hover:border-error focus-visible:border-error focus-visible:ring-error/30",
1073
+ !f && "border-(--input-border)",
1073
1074
  n === "search" && "[&::-webkit-search-cancel-button]:appearance-none [&::-webkit-search-decoration]:appearance-none [&::-ms-clear]:hidden",
1074
- v && "cursor-not-allowed bg-(--input-bg-disabled) opacity-60 hover:border-(--input-border)",
1075
+ y && "cursor-not-allowed bg-(--input-bg-disabled) opacity-60 hover:border-(--input-border)",
1075
1076
  D && "cursor-default focus-visible:ring-0",
1076
1077
  t
1077
1078
  ),
1078
- value: c,
1079
+ value: u,
1079
1080
  defaultValue: x,
1080
- ...S
1081
+ ...k
1081
1082
  }
1082
1083
  );
1083
- return !o && !m && !F && !A ? le : /* @__PURE__ */ s("div", { className: i("w-full", a), children: [
1084
+ return !i && !c && !A && !L ? E : /* @__PURE__ */ s("div", { className: o("w-full", a), children: [
1084
1085
  /* @__PURE__ */ s("div", { className: "relative", children: [
1085
- o ? /* @__PURE__ */ e(
1086
+ i ? /* @__PURE__ */ e(
1086
1087
  "span",
1087
1088
  {
1088
- className: i(
1089
+ className: o(
1089
1090
  "pointer-events-none absolute inset-y-0 flex items-center text-(--input-placeholder)",
1090
- Nr[l]
1091
+ yr[l]
1091
1092
  ),
1092
1093
  "aria-hidden": !0,
1093
- children: /* @__PURE__ */ e("span", { className: i("inline-flex items-center justify-center", Te[l]), children: o })
1094
+ children: /* @__PURE__ */ e("span", { className: o("inline-flex items-center justify-center", Be[l]), children: i })
1094
1095
  }
1095
1096
  ) : null,
1096
- le,
1097
- F ? /* @__PURE__ */ e(
1097
+ E,
1098
+ A ? /* @__PURE__ */ e(
1098
1099
  "button",
1099
1100
  {
1100
1101
  type: "button",
1101
1102
  "aria-label": "Clear search",
1102
- onClick: u,
1103
- className: i(
1103
+ onClick: m,
1104
+ className: o(
1104
1105
  "absolute inset-y-0 flex items-center text-(--input-placeholder) transition-colors hover:text-(--input-fg)",
1105
- ht[l]
1106
+ kt[l]
1106
1107
  ),
1107
- children: /* @__PURE__ */ e("span", { className: i("inline-flex items-center justify-center", Te[l]), children: /* @__PURE__ */ e(be, {}) })
1108
+ children: /* @__PURE__ */ e("span", { className: o("inline-flex items-center justify-center", Be[l]), children: /* @__PURE__ */ e(ye, {}) })
1108
1109
  }
1109
- ) : m ? /* @__PURE__ */ e(
1110
+ ) : c ? /* @__PURE__ */ e(
1110
1111
  "span",
1111
1112
  {
1112
- className: i(
1113
+ className: o(
1113
1114
  "pointer-events-none absolute inset-y-0 flex items-center text-(--input-placeholder)",
1114
- ht[l]
1115
+ kt[l]
1115
1116
  ),
1116
1117
  "aria-hidden": !0,
1117
- children: /* @__PURE__ */ e("span", { className: i("inline-flex items-center justify-center", Te[l]), children: m })
1118
+ children: /* @__PURE__ */ e("span", { className: o("inline-flex items-center justify-center", Be[l]), children: c })
1118
1119
  }
1119
1120
  ) : null
1120
1121
  ] }),
1121
- A ? /* @__PURE__ */ e(
1122
+ L ? /* @__PURE__ */ e(
1122
1123
  "p",
1123
1124
  {
1124
- id: ne,
1125
- className: i("mt-1.5 text-xs", b ? "text-error" : "text-muted"),
1126
- children: h
1125
+ id: q,
1126
+ className: o("mt-1.5 text-xs", f ? "text-error" : "text-muted"),
1127
+ children: g
1127
1128
  }
1128
1129
  ) : null
1129
1130
  ] });
1130
1131
  }
1131
1132
  );
1132
- Be.displayName = "Input";
1133
- function $e(t, a) {
1133
+ ke.displayName = "Input";
1134
+ function Wr({
1135
+ items: t,
1136
+ value: a,
1137
+ onValueChange: n,
1138
+ onSearchChange: l,
1139
+ loading: i = !1,
1140
+ minSearchLength: c = 3,
1141
+ debounceMs: m = 300,
1142
+ placeholder: u = "Select...",
1143
+ searchPlaceholder: x = "Search",
1144
+ emptyMessage: f = "No results found",
1145
+ hintMessage: g,
1146
+ renderItem: N,
1147
+ renderValue: z,
1148
+ className: y,
1149
+ contentClassName: D,
1150
+ disabled: k = !1
1151
+ }) {
1152
+ const [b, I] = P(!1), [M, L] = P(""), [A, q] = P("");
1153
+ V(() => {
1154
+ const v = M.trim(), W = setTimeout(() => q(v), m);
1155
+ return () => clearTimeout(W);
1156
+ }, [M, m]), V(() => {
1157
+ l && b && A.length >= c && l(A);
1158
+ }, [A, b, c, l]);
1159
+ const F = t.find((v) => v.value === a) ?? null, E = M.trim(), De = E.length > 0 && E.length < c, Te = l !== void 0 && E.length >= c && A !== E, Me = g ?? `Type at least ${c} characters to search`, de = ge(() => {
1160
+ if (l || E.length === 0) return t;
1161
+ const v = E.toLowerCase();
1162
+ return t.filter(
1163
+ (W) => W.label.toLowerCase().includes(v) || (W.description ?? "").toLowerCase().includes(v)
1164
+ );
1165
+ }, [t, E, l]), Pe = (v) => {
1166
+ n(v), I(!1), L(""), q("");
1167
+ }, ee = () => {
1168
+ L(""), q("");
1169
+ };
1170
+ return /* @__PURE__ */ s(
1171
+ he.Root,
1172
+ {
1173
+ open: b,
1174
+ onOpenChange: (v) => {
1175
+ I(v), v || ee();
1176
+ },
1177
+ children: [
1178
+ /* @__PURE__ */ s(
1179
+ he.Trigger,
1180
+ {
1181
+ type: "button",
1182
+ disabled: k,
1183
+ "aria-haspopup": "listbox",
1184
+ className: o(
1185
+ "group btn-fill btn-inner-border btn-interactive flex h-(--control-h-md) w-full items-center justify-between gap-2 rounded-(--control-radius) bg-(--button-secondary-bg) px-(--control-pad-x-sm) font-medium text-fg hover:bg-(--button-surface-hover) active:bg-(--button-surface-active) focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-line-strong",
1186
+ "disabled:cursor-not-allowed disabled:opacity-50",
1187
+ y
1188
+ ),
1189
+ children: [
1190
+ F ? z ? z(F) : /* @__PURE__ */ e("span", { className: "min-w-0 truncate", children: F.label }) : /* @__PURE__ */ e("span", { className: "font-normal text-muted", children: u }),
1191
+ /* @__PURE__ */ e(
1192
+ Y,
1193
+ {
1194
+ "aria-hidden": !0,
1195
+ className: "size-3.5 shrink-0 text-muted transition-transform duration-200 ease-out group-data-[state=open]:rotate-180 motion-reduce:transition-none"
1196
+ }
1197
+ )
1198
+ ]
1199
+ }
1200
+ ),
1201
+ /* @__PURE__ */ e(he.Portal, { children: /* @__PURE__ */ s(
1202
+ he.Content,
1203
+ {
1204
+ role: "listbox",
1205
+ "aria-label": u,
1206
+ align: "start",
1207
+ sideOffset: 4,
1208
+ className: o(
1209
+ "menu-surface btn-inner-border z-50 overflow-hidden rounded-lg border border-line bg-(--button-secondary-bg) p-1",
1210
+ "w-(--radix-popper-anchor-width)",
1211
+ "data-[state=open]:animate-in data-[state=closed]:animate-out",
1212
+ "data-[state=open]:fade-in-0 data-[state=closed]:fade-out-0",
1213
+ "data-[state=open]:zoom-in-95 data-[state=closed]:zoom-out-95",
1214
+ "duration-150 ease-out",
1215
+ D
1216
+ ),
1217
+ onKeyDown: (v) => {
1218
+ v.key === "Escape" && (v.stopPropagation(), I(!1), ee());
1219
+ },
1220
+ children: [
1221
+ /* @__PURE__ */ e("div", { className: "pb-1", children: /* @__PURE__ */ e(
1222
+ ke,
1223
+ {
1224
+ value: M,
1225
+ onChange: (v) => L(v.target.value),
1226
+ onClear: () => ee(),
1227
+ placeholder: x,
1228
+ "aria-label": x,
1229
+ leadingIcon: /* @__PURE__ */ e(Dt, { className: "size-3.5" }),
1230
+ size: "sm",
1231
+ className: "h-(--control-h-xs) border-0 bg-(--combobox-search-bg) focus-visible:border-muted focus-visible:ring-0"
1232
+ }
1233
+ ) }),
1234
+ /* @__PURE__ */ e("div", { className: "max-h-64 overflow-y-auto", role: "presentation", children: De ? /* @__PURE__ */ e("p", { className: "px-2 py-3 text-center text-sm text-muted", children: Me }) : de.length > 0 ? de.map((v) => /* @__PURE__ */ e(
1235
+ "button",
1236
+ {
1237
+ type: "button",
1238
+ role: "option",
1239
+ "aria-selected": v.value === a,
1240
+ onClick: () => Pe(v),
1241
+ className: o(
1242
+ "flex w-full items-center gap-3 rounded-lg px-2 py-2 text-left transition-colors",
1243
+ v.value === a ? "bg-(--button-surface-active)" : "hover:bg-(--button-surface-hover)"
1244
+ ),
1245
+ children: N ? N(v) : /* @__PURE__ */ s("span", { className: "min-w-0", children: [
1246
+ /* @__PURE__ */ s("span", { className: "flex items-center gap-1.5", children: [
1247
+ /* @__PURE__ */ e("span", { className: "truncate text-sm font-medium text-fg", children: v.label }),
1248
+ v.badge && /* @__PURE__ */ e("span", { className: "rounded bg-elevated px-1.5 py-0.5 text-[11px] text-muted", children: v.badge })
1249
+ ] }),
1250
+ v.description && /* @__PURE__ */ e("span", { className: "block truncate text-[13px] text-muted", children: v.description })
1251
+ ] })
1252
+ },
1253
+ v.value
1254
+ )) : i || Te ? /* @__PURE__ */ e("div", { className: "flex justify-center py-4", children: /* @__PURE__ */ e(Rt, { className: "size-5 text-muted" }) }) : /* @__PURE__ */ e("p", { className: "px-2 py-3 text-center text-sm text-muted", children: f }) })
1255
+ ]
1256
+ }
1257
+ ) })
1258
+ ]
1259
+ }
1260
+ );
1261
+ }
1262
+ function Xe(t, a) {
1134
1263
  let n = 0;
1135
- return vt.forEach(t, (l) => {
1136
- if (!Nt(l)) return;
1137
- if (a.some((m) => m === l.type)) {
1264
+ return Mt.forEach(t, (l) => {
1265
+ if (!Pt(l)) return;
1266
+ if (a.some((c) => c === l.type)) {
1138
1267
  n += 1;
1139
1268
  return;
1140
1269
  }
1141
- const o = l.props.children;
1142
- o && (n += $e(o, a));
1270
+ const i = l.props.children;
1271
+ i && (n += Xe(i, a));
1143
1272
  }), n;
1144
1273
  }
1145
- const Et = re(!1);
1146
- function Me({
1274
+ const Wt = se(!1);
1275
+ function $e({
1147
1276
  children: t,
1148
1277
  ...a
1149
1278
  }) {
1150
- const n = $e(t, [
1151
- he,
1152
- ee,
1153
- At
1279
+ const n = Xe(t, [
1280
+ we,
1281
+ le,
1282
+ Xt
1154
1283
  ]) === 0;
1155
- return /* @__PURE__ */ e(Et.Provider, { value: n, children: /* @__PURE__ */ e(P.Root, { ...a, children: t }) });
1284
+ return /* @__PURE__ */ e(Wt.Provider, { value: n, children: /* @__PURE__ */ e(j.Root, { ...a, children: t }) });
1156
1285
  }
1157
- const me = f(({ className: t, disabled: a, ...n }, l) => {
1158
- const o = O(Et);
1286
+ const xe = h(({ className: t, disabled: a, ...n }, l) => {
1287
+ const i = Z(Wt);
1159
1288
  return /* @__PURE__ */ e(
1160
- P.Trigger,
1289
+ j.Trigger,
1161
1290
  {
1162
1291
  ref: l,
1163
- className: i("group", t),
1164
- disabled: a || o,
1292
+ className: o("group", t),
1293
+ disabled: a || i,
1165
1294
  ...n
1166
1295
  }
1167
1296
  );
1168
1297
  });
1169
- me.displayName = "DropdownMenuTrigger";
1170
- const Lt = f(({ className: t, ...a }, n) => /* @__PURE__ */ e(
1298
+ xe.displayName = "DropdownMenuTrigger";
1299
+ const Ut = h(({ className: t, ...a }, n) => /* @__PURE__ */ e(
1171
1300
  Y,
1172
1301
  {
1173
1302
  ref: n,
1174
1303
  "aria-hidden": !0,
1175
- className: i(
1304
+ className: o(
1176
1305
  "ml-auto size-3.5 shrink-0 text-subtle transition-transform duration-200 ease-out group-data-[state=open]:rotate-180 motion-reduce:transition-none",
1177
1306
  t
1178
1307
  ),
1179
1308
  ...a
1180
1309
  }
1181
1310
  ));
1182
- Lt.displayName = "DropdownMenuChevron";
1183
- const Wr = P.Group, Or = P.Portal, pe = f(({ className: t, sideOffset: a = 8, ...n }, l) => /* @__PURE__ */ e(P.Portal, { children: /* @__PURE__ */ e(
1184
- P.Content,
1311
+ Ut.displayName = "DropdownMenuChevron";
1312
+ const Ur = j.Group, Xr = j.Portal, ve = h(({ className: t, sideOffset: a = 8, ...n }, l) => /* @__PURE__ */ e(j.Portal, { children: /* @__PURE__ */ e(
1313
+ j.Content,
1185
1314
  {
1186
1315
  ref: l,
1187
1316
  sideOffset: a,
1188
- className: i(
1317
+ className: o(
1189
1318
  "menu-surface btn-inner-border z-50 min-w-48 overflow-hidden rounded-lg border border-line bg-(--button-secondary-bg) p-1",
1190
1319
  "data-[state=open]:animate-in data-[state=closed]:animate-out",
1191
1320
  "data-[state=open]:fade-in-0 data-[state=closed]:fade-out-0",
@@ -1198,12 +1327,12 @@ const Wr = P.Group, Or = P.Portal, pe = f(({ className: t, sideOffset: a = 8, ..
1198
1327
  ...n
1199
1328
  }
1200
1329
  ) }));
1201
- pe.displayName = "DropdownMenuContent";
1202
- const he = f(({ className: t, inset: a, ...n }, l) => /* @__PURE__ */ e(
1203
- P.Item,
1330
+ ve.displayName = "DropdownMenuContent";
1331
+ const we = h(({ className: t, inset: a, ...n }, l) => /* @__PURE__ */ e(
1332
+ j.Item,
1204
1333
  {
1205
1334
  ref: l,
1206
- className: i(
1335
+ className: o(
1207
1336
  "relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm text-fg outline-none transition-colors",
1208
1337
  "focus:bg-(--menu-highlight) data-disabled:pointer-events-none data-disabled:opacity-50",
1209
1338
  "[&_svg]:size-4 [&_svg]:text-muted",
@@ -1213,38 +1342,38 @@ const he = f(({ className: t, inset: a, ...n }, l) => /* @__PURE__ */ e(
1213
1342
  ...n
1214
1343
  }
1215
1344
  ));
1216
- he.displayName = "DropdownMenuItem";
1217
- const ee = f(({ className: t, children: a, checked: n, ...l }, o) => /* @__PURE__ */ s(
1218
- P.CheckboxItem,
1345
+ we.displayName = "DropdownMenuItem";
1346
+ const le = h(({ className: t, children: a, checked: n, ...l }, i) => /* @__PURE__ */ s(
1347
+ j.CheckboxItem,
1219
1348
  {
1220
- ref: o,
1221
- className: i(
1349
+ ref: i,
1350
+ className: o(
1222
1351
  "group relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm text-fg outline-none transition-colors focus:bg-(--menu-highlight)",
1223
1352
  t
1224
1353
  ),
1225
1354
  checked: n,
1226
1355
  ...l,
1227
1356
  children: [
1228
- /* @__PURE__ */ e("span", { className: "absolute left-2 flex size-4 shrink-0 items-center justify-center rounded border border-line-strong bg-transparent transition-colors group-data-[state=checked]:border-primary", children: /* @__PURE__ */ e(P.ItemIndicator, { className: "btn-fill btn-inner-border flex size-full items-center justify-center rounded-[3px] border-0 bg-(--button-primary-bg) text-(--button-primary-fg) [--button-inner:var(--button-primary-inner)]", children: /* @__PURE__ */ e(ae, { className: "size-3", weight: "bold" }) }) }),
1357
+ /* @__PURE__ */ e("span", { className: "absolute left-2 flex size-4 shrink-0 items-center justify-center rounded border border-line-strong bg-transparent transition-colors group-data-[state=checked]:border-primary", children: /* @__PURE__ */ e(j.ItemIndicator, { className: "btn-fill btn-inner-border flex size-full items-center justify-center rounded-[3px] border-0 bg-(--button-primary-bg) text-(--button-primary-fg) [--button-inner:var(--button-primary-inner)]", children: /* @__PURE__ */ e(ie, { className: "size-3", weight: "bold" }) }) }),
1229
1358
  a
1230
1359
  ]
1231
1360
  }
1232
1361
  ));
1233
- ee.displayName = "DropdownMenuCheckboxItem";
1234
- const fe = f(({ className: t, ...a }, n) => /* @__PURE__ */ e(
1235
- P.Label,
1362
+ le.displayName = "DropdownMenuCheckboxItem";
1363
+ const Ne = h(({ className: t, ...a }, n) => /* @__PURE__ */ e(
1364
+ j.Label,
1236
1365
  {
1237
1366
  ref: n,
1238
- className: i("px-2 py-1.5 text-xs font-medium text-subtle", t),
1367
+ className: o("px-2 py-1.5 text-xs font-medium text-subtle", t),
1239
1368
  ...a
1240
1369
  }
1241
1370
  ));
1242
- fe.displayName = "DropdownMenuLabel";
1243
- const Ur = P.Sub, At = f(({ className: t, inset: a, children: n, ...l }, o) => /* @__PURE__ */ s(
1244
- P.SubTrigger,
1371
+ Ne.displayName = "DropdownMenuLabel";
1372
+ const Kr = j.Sub, Xt = h(({ className: t, inset: a, children: n, ...l }, i) => /* @__PURE__ */ s(
1373
+ j.SubTrigger,
1245
1374
  {
1246
- ref: o,
1247
- className: i(
1375
+ ref: i,
1376
+ className: o(
1248
1377
  "relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm text-fg outline-none transition-colors",
1249
1378
  "focus:bg-(--menu-highlight) data-[state=open]:bg-(--menu-highlight)",
1250
1379
  "[&_svg]:size-4 [&_svg]:text-muted",
@@ -1254,17 +1383,17 @@ const Ur = P.Sub, At = f(({ className: t, inset: a, children: n, ...l }, o) => /
1254
1383
  ...l,
1255
1384
  children: [
1256
1385
  n,
1257
- /* @__PURE__ */ e(xt, { className: "ml-auto shrink-0" })
1386
+ /* @__PURE__ */ e(Tt, { className: "ml-auto shrink-0" })
1258
1387
  ]
1259
1388
  }
1260
1389
  ));
1261
- At.displayName = "DropdownMenuSubTrigger";
1262
- const yr = f(({ className: t, ...a }, n) => /* @__PURE__ */ e(
1263
- P.SubContent,
1390
+ Xt.displayName = "DropdownMenuSubTrigger";
1391
+ const wr = h(({ className: t, ...a }, n) => /* @__PURE__ */ e(
1392
+ j.SubContent,
1264
1393
  {
1265
1394
  ref: n,
1266
1395
  sideOffset: 8,
1267
- className: i(
1396
+ className: o(
1268
1397
  "menu-surface btn-inner-border z-50 min-w-48 overflow-hidden rounded-lg border border-line bg-(--button-secondary-bg) p-1",
1269
1398
  "data-[state=open]:animate-in data-[state=closed]:animate-out",
1270
1399
  "data-[state=open]:fade-in-0 data-[state=closed]:fade-out-0",
@@ -1277,30 +1406,30 @@ const yr = f(({ className: t, ...a }, n) => /* @__PURE__ */ e(
1277
1406
  ...a
1278
1407
  }
1279
1408
  ));
1280
- yr.displayName = "DropdownMenuSubContent";
1281
- const Re = f(({ className: t, ...a }, n) => /* @__PURE__ */ e(
1282
- P.Separator,
1409
+ wr.displayName = "DropdownMenuSubContent";
1410
+ const He = h(({ className: t, ...a }, n) => /* @__PURE__ */ e(
1411
+ j.Separator,
1283
1412
  {
1284
1413
  ref: n,
1285
- className: i("-mx-1 my-1 h-px bg-line-strong", t),
1414
+ className: o("-mx-1 my-1 h-px bg-line-strong", t),
1286
1415
  ...a
1287
1416
  }
1288
1417
  ));
1289
- Re.displayName = "DropdownMenuSeparator";
1290
- const Xr = R.Group, Bt = R.Value;
1291
- function $t({
1418
+ He.displayName = "DropdownMenuSeparator";
1419
+ const Jr = _.Group, Kt = _.Value;
1420
+ function Jt({
1292
1421
  children: t,
1293
1422
  disabled: a,
1294
1423
  ...n
1295
1424
  }) {
1296
- const l = $e(t, [ve]) === 0;
1297
- return /* @__PURE__ */ e(R.Root, { disabled: a || l, ...n, children: t });
1425
+ const l = Xe(t, [Se]) === 0;
1426
+ return /* @__PURE__ */ e(_.Root, { disabled: a || l, ...n, children: t });
1298
1427
  }
1299
- const Fe = f(({ className: t, children: a, variant: n = "field", ...l }, o) => /* @__PURE__ */ s(
1300
- R.Trigger,
1428
+ const Ke = h(({ className: t, children: a, variant: n = "field", ...l }, i) => /* @__PURE__ */ s(
1429
+ _.Trigger,
1301
1430
  {
1302
- ref: o,
1303
- className: i(
1431
+ ref: i,
1432
+ className: o(
1304
1433
  "group flex items-center justify-between gap-2 text-sm text-fg",
1305
1434
  "focus:outline-none disabled:cursor-not-allowed disabled:opacity-50",
1306
1435
  "data-disabled:cursor-not-allowed data-disabled:opacity-50",
@@ -1312,19 +1441,19 @@ const Fe = f(({ className: t, children: a, variant: n = "field", ...l }, o) => /
1312
1441
  ...l,
1313
1442
  children: [
1314
1443
  /* @__PURE__ */ e("span", { className: "min-w-0 flex-1 truncate text-left", children: a }),
1315
- /* @__PURE__ */ e(R.Icon, { asChild: !0, children: /* @__PURE__ */ e("span", { className: "flex size-4 shrink-0 items-center justify-center", children: /* @__PURE__ */ e(Y, { className: "size-3.5 text-muted transition-transform duration-200 ease-out group-data-[state=open]:rotate-180 motion-reduce:transition-none" }) }) })
1444
+ /* @__PURE__ */ e(_.Icon, { asChild: !0, children: /* @__PURE__ */ e("span", { className: "flex size-4 shrink-0 items-center justify-center", children: /* @__PURE__ */ e(Y, { className: "size-3.5 text-muted transition-transform duration-200 ease-out group-data-[state=open]:rotate-180 motion-reduce:transition-none" }) }) })
1316
1445
  ]
1317
1446
  }
1318
1447
  ));
1319
- Fe.displayName = "SelectTrigger";
1320
- const qe = f(
1321
- ({ className: t, children: a, position: n = "popper", sideOffset: l = 8, ...o }, m) => /* @__PURE__ */ e(R.Portal, { children: /* @__PURE__ */ e(
1322
- R.Content,
1448
+ Ke.displayName = "SelectTrigger";
1449
+ const Je = h(
1450
+ ({ className: t, children: a, position: n = "popper", sideOffset: l = 8, ...i }, c) => /* @__PURE__ */ e(_.Portal, { children: /* @__PURE__ */ e(
1451
+ _.Content,
1323
1452
  {
1324
- ref: m,
1453
+ ref: c,
1325
1454
  position: n,
1326
1455
  sideOffset: l,
1327
- className: i(
1456
+ className: o(
1328
1457
  "menu-surface btn-inner-border z-50 min-w-48 overflow-hidden rounded-lg border border-line bg-(--button-secondary-bg) p-1",
1329
1458
  "data-[state=open]:animate-in data-[state=closed]:animate-out",
1330
1459
  "data-[state=open]:fade-in-0 data-[state=closed]:fade-out-0",
@@ -1334,50 +1463,50 @@ const qe = f(
1334
1463
  "duration-150 ease-out",
1335
1464
  t
1336
1465
  ),
1337
- ...o,
1338
- children: /* @__PURE__ */ e(R.Viewport, { className: "p-0", children: a })
1466
+ ...i,
1467
+ children: /* @__PURE__ */ e(_.Viewport, { className: "p-0", children: a })
1339
1468
  }
1340
1469
  ) })
1341
1470
  );
1342
- qe.displayName = "SelectContent";
1343
- const ve = f(({ className: t, children: a, ...n }, l) => /* @__PURE__ */ s(
1344
- R.Item,
1471
+ Je.displayName = "SelectContent";
1472
+ const Se = h(({ className: t, children: a, ...n }, l) => /* @__PURE__ */ s(
1473
+ _.Item,
1345
1474
  {
1346
1475
  ref: l,
1347
- className: i(
1476
+ className: o(
1348
1477
  "relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm text-fg outline-none focus:bg-(--menu-highlight) data-disabled:pointer-events-none data-disabled:opacity-50",
1349
1478
  t
1350
1479
  ),
1351
1480
  ...n,
1352
1481
  children: [
1353
- /* @__PURE__ */ e("span", { className: "absolute left-2 flex size-4 items-center justify-center", children: /* @__PURE__ */ e(R.ItemIndicator, { children: /* @__PURE__ */ e(ae, { className: "size-3.5" }) }) }),
1354
- /* @__PURE__ */ e(R.ItemText, { children: a })
1482
+ /* @__PURE__ */ e("span", { className: "absolute left-2 flex size-4 items-center justify-center", children: /* @__PURE__ */ e(_.ItemIndicator, { children: /* @__PURE__ */ e(ie, { className: "size-3.5" }) }) }),
1483
+ /* @__PURE__ */ e(_.ItemText, { children: a })
1355
1484
  ]
1356
1485
  }
1357
1486
  ));
1358
- ve.displayName = "SelectItem";
1359
- const wr = f(({ className: t, ...a }, n) => /* @__PURE__ */ e(
1360
- R.Label,
1487
+ Se.displayName = "SelectItem";
1488
+ const Cr = h(({ className: t, ...a }, n) => /* @__PURE__ */ e(
1489
+ _.Label,
1361
1490
  {
1362
1491
  ref: n,
1363
- className: i("px-2 py-1.5 text-xs font-medium text-subtle", t),
1492
+ className: o("px-2 py-1.5 text-xs font-medium text-subtle", t),
1364
1493
  ...a
1365
1494
  }
1366
1495
  ));
1367
- wr.displayName = "SelectLabel";
1368
- function Cr({
1496
+ Cr.displayName = "SelectLabel";
1497
+ function zr({
1369
1498
  icon: t,
1370
1499
  title: a,
1371
1500
  description: n,
1372
1501
  action: l,
1373
- className: o
1502
+ className: i
1374
1503
  }) {
1375
1504
  return /* @__PURE__ */ s(
1376
1505
  "div",
1377
1506
  {
1378
- className: i(
1507
+ className: o(
1379
1508
  "flex flex-col items-center justify-center gap-4 px-6 py-12 text-center",
1380
- o
1509
+ i
1381
1510
  ),
1382
1511
  children: [
1383
1512
  t ? /* @__PURE__ */ e("div", { className: "flex size-12 items-center justify-center rounded-xl border border-line bg-elevated text-subtle [&_svg]:size-5", children: t }) : null,
@@ -1390,22 +1519,22 @@ function Cr({
1390
1519
  }
1391
1520
  );
1392
1521
  }
1393
- const Sr = "h-[var(--table-header-h)] whitespace-nowrap px-[var(--table-pad-x)] text-left align-middle text-[0.8125rem] font-medium text-table-header";
1394
- function zr(t) {
1522
+ const kr = "h-[var(--table-header-h)] whitespace-nowrap px-[var(--table-pad-x)] text-left align-middle text-[0.8125rem] font-medium text-table-header";
1523
+ function Sr(t) {
1395
1524
  return t.split(/\s+/).slice(0, 2).map((a) => {
1396
1525
  var n;
1397
1526
  return ((n = a[0]) == null ? void 0 : n.toUpperCase()) ?? "";
1398
1527
  }).join("");
1399
1528
  }
1400
- function Jr({
1529
+ function Qr({
1401
1530
  name: t,
1402
1531
  secondary: a,
1403
1532
  image: n
1404
1533
  }) {
1405
1534
  return /* @__PURE__ */ s("div", { className: "flex items-center gap-3", children: [
1406
- /* @__PURE__ */ s(wt, { className: "size-8", children: [
1407
- n ? /* @__PURE__ */ e(Ct, { src: n, alt: "" }) : null,
1408
- /* @__PURE__ */ e(St, { children: zr(t) })
1535
+ /* @__PURE__ */ s(jt, { className: "size-8", children: [
1536
+ n ? /* @__PURE__ */ e(Et, { src: n, alt: "" }) : null,
1537
+ /* @__PURE__ */ e(_t, { children: Sr(t) })
1409
1538
  ] }),
1410
1539
  /* @__PURE__ */ s("div", { className: "min-w-0", children: [
1411
1540
  /* @__PURE__ */ e("div", { className: "truncate font-medium text-table-header-active", children: t }),
@@ -1413,154 +1542,154 @@ function Jr({
1413
1542
  ] })
1414
1543
  ] });
1415
1544
  }
1416
- function Kr({
1545
+ function Yr({
1417
1546
  rows: t,
1418
1547
  columns: a,
1419
1548
  getRowId: n,
1420
1549
  loading: l = !1,
1421
- error: o,
1422
- empty: m,
1423
- search: u,
1424
- filters: c,
1550
+ error: i,
1551
+ empty: c,
1552
+ search: m,
1553
+ filters: u,
1425
1554
  toolbarStart: x,
1426
- toolbarEnd: b,
1427
- columnPicker: h = !0,
1555
+ toolbarEnd: f,
1556
+ columnPicker: g = !0,
1428
1557
  tabs: N,
1429
- activeTab: k,
1430
- onTabChange: v,
1558
+ activeTab: z,
1559
+ onTabChange: y,
1431
1560
  infoBanner: D,
1432
- selectable: S = !1,
1433
- bulkActions: g,
1434
- rowActions: j,
1435
- renderExpanded: I,
1436
- onRowClick: A,
1437
- defaultSort: F,
1438
- sort: ne,
1439
- onSortChange: U,
1440
- pageSize: le = 25,
1441
- pageSizeOptions: Ft = [10, 25, 50, 100],
1442
- pagination: qt = "auto",
1443
- tone: Gt,
1444
- title: Ht,
1445
- description: Vt,
1446
- headerAction: Wt,
1447
- headerClassName: Ot,
1448
- panelClassName: Ut,
1449
- className: Xt
1561
+ selectable: k = !1,
1562
+ bulkActions: b,
1563
+ rowActions: I,
1564
+ renderExpanded: M,
1565
+ onRowClick: L,
1566
+ defaultSort: A,
1567
+ sort: q,
1568
+ onSortChange: F,
1569
+ pageSize: E = 25,
1570
+ pageSizeOptions: De = [10, 25, 50, 100],
1571
+ pagination: Te = "auto",
1572
+ tone: Me,
1573
+ title: de,
1574
+ description: Pe,
1575
+ headerAction: ee,
1576
+ headerClassName: v,
1577
+ panelClassName: W,
1578
+ className: Qt
1450
1579
  }) {
1451
- const [Ge, He] = T(
1580
+ const [Qe, Ye] = P(
1452
1581
  () => Object.fromEntries(
1453
1582
  a.filter((r) => r.defaultHidden && !r.required).map((r) => [r.id, !0])
1454
1583
  )
1455
- ), [Ve, We] = T(null), [Ne, Oe] = T(null), [Jt, Kt] = T(
1456
- F ?? null
1457
- ), y = U ? ne ?? null : Jt, Qt = (r) => {
1458
- U ? U(r) : Kt(r);
1459
- }, [X, ie] = T(0), [B, Yt] = T(le), [q, ye] = T(/* @__PURE__ */ new Set()), [Zt, ea] = T(/* @__PURE__ */ new Set()), ta = (r) => {
1460
- ea((d) => {
1584
+ ), [Ze, et] = P(null), [Ie, tt] = P(null), [Yt, Zt] = P(
1585
+ A ?? null
1586
+ ), w = F ? q ?? null : Yt, ea = (r) => {
1587
+ F ? F(r) : Zt(r);
1588
+ }, [te, ce] = P(0), [G, ta] = P(E), [U, Re] = P(/* @__PURE__ */ new Set()), [aa, ra] = P(/* @__PURE__ */ new Set()), na = (r) => {
1589
+ ra((d) => {
1461
1590
  const p = new Set(d);
1462
1591
  return p.has(r) ? p.delete(r) : p.add(r), p;
1463
1592
  });
1464
- }, [aa, we] = T([]), Ue = a.map((r) => r.id), Xe = new Map(a.map((r) => [r.id, r])), Je = Ve ? Ve.map((r) => Xe.get(r)).filter((r) => !!r) : a, G = Je.filter((r) => !Ge[r.id]), Ke = Je.filter((r) => Ge[r.id] && !r.required), Qe = (r) => !!r.required, ra = (r) => Xe.get(r), na = (r, d) => {
1465
- const p = d ? ra(d) : void 0;
1466
- !p || Qe(p) || r === d || We((C) => {
1467
- const z = C ?? Ue;
1468
- return $a(z, z.indexOf(r), z.indexOf(d));
1593
+ }, [la, je] = P([]), at = a.map((r) => r.id), rt = new Map(a.map((r) => [r.id, r])), nt = Ze ? Ze.map((r) => rt.get(r)).filter((r) => !!r) : a, X = nt.filter((r) => !Qe[r.id]), lt = nt.filter((r) => Qe[r.id] && !r.required), ot = (r) => !!r.required, oa = (r) => rt.get(r), ia = (r, d) => {
1594
+ const p = d ? oa(d) : void 0;
1595
+ !p || ot(p) || r === d || et((S) => {
1596
+ const T = S ?? at;
1597
+ return qa(T, T.indexOf(r), T.indexOf(d));
1469
1598
  });
1470
- }, la = (r) => {
1471
- He((d) => ({ ...d, [r]: !1 })), We((d) => d && d.includes(r) ? d : [...d ?? Ue, r]);
1472
- }, Ce = (c ?? []).filter((r) => aa.includes(r.id)), ia = (c ?? []).map((r) => `${r.id}:${r.value.join(",")}`).join("|"), oe = De(() => {
1599
+ }, sa = (r) => {
1600
+ Ye((d) => ({ ...d, [r]: !1 })), et((d) => d && d.includes(r) ? d : [...d ?? at, r]);
1601
+ }, Ee = (u ?? []).filter((r) => la.includes(r.id)), da = (u ?? []).map((r) => `${r.id}:${r.value.join(",")}`).join("|"), ue = ge(() => {
1473
1602
  let r = t;
1474
- for (const p of c ?? [])
1475
- p.value.length > 0 && (r = r.filter((C) => p.match(C, p.value)));
1476
- if (!u || !u.value.trim()) return r;
1477
- const d = u.value.trim().toLowerCase();
1478
- return r.filter((p) => u.keys(p).toLowerCase().includes(d));
1479
- }, [t, u, c]), H = De(() => {
1480
- if (!y) return oe;
1481
- const r = a.find((p) => p.id === y.id);
1482
- if (!(r != null && r.sortValue)) return oe;
1483
- const d = y.dir === "asc" ? 1 : -1;
1484
- return [...oe].sort((p, C) => {
1485
- const z = r.sortValue(p), w = r.sortValue(C);
1486
- return z == null && w == null ? 0 : z == null ? 1 : w == null ? -1 : typeof z == "number" && typeof w == "number" ? (z - w) * d : String(z).localeCompare(String(w)) * d;
1603
+ for (const p of u ?? [])
1604
+ p.value.length > 0 && (r = r.filter((S) => p.match(S, p.value)));
1605
+ if (!m || !m.value.trim()) return r;
1606
+ const d = m.value.trim().toLowerCase();
1607
+ return r.filter((p) => m.keys(p).toLowerCase().includes(d));
1608
+ }, [t, m, u]), K = ge(() => {
1609
+ if (!w) return ue;
1610
+ const r = a.find((p) => p.id === w.id);
1611
+ if (!(r != null && r.sortValue)) return ue;
1612
+ const d = w.dir === "asc" ? 1 : -1;
1613
+ return [...ue].sort((p, S) => {
1614
+ const T = r.sortValue(p), C = r.sortValue(S);
1615
+ return T == null && C == null ? 0 : T == null ? 1 : C == null ? -1 : typeof T == "number" && typeof C == "number" ? (T - C) * d : String(T).localeCompare(String(C)) * d;
1487
1616
  });
1488
- }, [oe, y, a]), J = Math.max(1, Math.ceil(H.length / B)), oa = !l && !o && H.length > 0 && (qt === "always" || H.length > B);
1489
- Z(() => {
1490
- ie(0);
1491
- }, [u == null ? void 0 : u.value, B, y == null ? void 0 : y.id, y == null ? void 0 : y.dir, k, ia]), Z(() => {
1492
- X > J - 1 && ie(J - 1);
1493
- }, [X, J]);
1494
- const se = X * B, $ = H.slice(se, se + B), sa = (r) => {
1617
+ }, [ue, w, a]), ae = Math.max(1, Math.ceil(K.length / G)), ca = !l && !i && K.length > 0 && (Te === "always" || K.length > G);
1618
+ V(() => {
1619
+ ce(0);
1620
+ }, [m == null ? void 0 : m.value, G, w == null ? void 0 : w.id, w == null ? void 0 : w.dir, z, da]), V(() => {
1621
+ te > ae - 1 && ce(ae - 1);
1622
+ }, [te, ae]);
1623
+ const me = te * G, O = K.slice(me, me + G), ua = (r) => {
1495
1624
  if (!r.sortable) return;
1496
- const d = y;
1497
- Qt(
1625
+ const d = w;
1626
+ ea(
1498
1627
  (d == null ? void 0 : d.id) === r.id ? d.dir === "asc" ? { id: r.id, dir: "desc" } : null : { id: r.id, dir: "asc" }
1499
1628
  );
1500
- }, Ye = $.length > 0 && $.every((r) => q.has(n(r))), da = $.some((r) => q.has(n(r))), ca = t.filter((r) => q.has(n(r))), ua = () => {
1501
- ye((r) => {
1629
+ }, it = O.length > 0 && O.every((r) => U.has(n(r))), ma = O.some((r) => U.has(n(r))), pa = t.filter((r) => U.has(n(r))), fa = () => {
1630
+ Re((r) => {
1502
1631
  const d = new Set(r);
1503
- return Ye ? $.forEach((p) => d.delete(n(p))) : $.forEach((p) => d.add(n(p))), d;
1632
+ return it ? O.forEach((p) => d.delete(n(p))) : O.forEach((p) => d.add(n(p))), d;
1504
1633
  });
1505
- }, ma = (r) => {
1506
- ye((d) => {
1634
+ }, ba = (r) => {
1635
+ Re((d) => {
1507
1636
  const p = new Set(d);
1508
1637
  return p.has(r) ? p.delete(r) : p.add(r), p;
1509
1638
  });
1510
- }, pa = !!(u || c != null && c.length || x || b), fa = (r) => (y == null ? void 0 : y.id) === r.id ? y.dir === "asc" ? "ascending" : "descending" : void 0, Ze = _(null), et = _(null), tt = _(null), at = _(null), [V, Se] = T([]), ba = G.map((r) => r.id).join("\0"), de = `${S ? "s" : "-"}|${j ? "a" : "-"}|${I ? "e" : "-"}|${ba}`, rt = _(de), ce = De(() => {
1639
+ }, ha = !!(m || u != null && u.length || x || f), ga = (r) => (w == null ? void 0 : w.id) === r.id ? w.dir === "asc" ? "ascending" : "descending" : void 0, st = B(null), dt = B(null), ct = B(null), ut = B(null), [J, _e] = P([]), xa = X.map((r) => r.id).join("\0"), pe = `${k ? "s" : "-"}|${I ? "a" : "-"}|${M ? "e" : "-"}|${xa}`, mt = B(pe), fe = ge(() => {
1511
1640
  try {
1512
1641
  return JSON.stringify(t);
1513
1642
  } catch {
1514
1643
  return `rows:${t.length}`;
1515
1644
  }
1516
- }, [t]), nt = _(ce), lt = V.length > 0, ze = yt(() => {
1517
- const r = tt.current, d = at.current;
1645
+ }, [t]), pt = B(fe), ft = J.length > 0, Le = It(() => {
1646
+ const r = ct.current, d = ut.current;
1518
1647
  r && d && (r.style.transform = `translateX(${-d.scrollLeft}px)`);
1519
1648
  }, []);
1520
- Ra(() => {
1521
- const r = Ze.current;
1649
+ Ea(() => {
1650
+ const r = st.current;
1522
1651
  if (!r) return;
1523
1652
  const d = () => {
1524
- var it, ot, st;
1525
- const C = (ot = (it = r.tBodies[0]) == null ? void 0 : it.rows.item(0)) == null ? void 0 : ot.cells;
1526
- if (!C || C.length === 0) {
1527
- Se((L) => L.length === 0 ? L : []);
1653
+ var bt, ht, gt;
1654
+ const S = (ht = (bt = r.tBodies[0]) == null ? void 0 : bt.rows.item(0)) == null ? void 0 : ht.cells;
1655
+ if (!S || S.length === 0) {
1656
+ _e((H) => H.length === 0 ? H : []);
1528
1657
  return;
1529
1658
  }
1530
- const z = (st = et.current) == null ? void 0 : st.querySelectorAll("thead th"), w = Array.from(
1531
- C,
1532
- (L, ke) => {
1533
- var ue, dt;
1659
+ const T = (gt = dt.current) == null ? void 0 : gt.querySelectorAll("thead th"), C = Array.from(
1660
+ S,
1661
+ (H, Ae) => {
1662
+ var be, xt;
1534
1663
  return Math.max(
1535
- L.getBoundingClientRect().width,
1536
- ((dt = (ue = z == null ? void 0 : z.item(ke)) == null ? void 0 : ue.querySelector("[data-col-sizer]")) == null ? void 0 : dt.getBoundingClientRect().width) ?? 0
1664
+ H.getBoundingClientRect().width,
1665
+ ((xt = (be = T == null ? void 0 : T.item(Ae)) == null ? void 0 : be.querySelector("[data-col-sizer]")) == null ? void 0 : xt.getBoundingClientRect().width) ?? 0
1537
1666
  );
1538
1667
  }
1539
1668
  );
1540
- Se(
1541
- (L) => L.length === w.length && L.every((ke, ue) => ke === w[ue]) ? L : w
1669
+ _e(
1670
+ (H) => H.length === C.length && H.every((Ae, be) => Ae === C[be]) ? H : C
1542
1671
  );
1543
1672
  };
1544
- if ((rt.current !== de || nt.current !== ce) && (rt.current = de, nt.current = ce, lt)) {
1545
- Se([]);
1673
+ if ((mt.current !== pe || pt.current !== fe) && (mt.current = pe, pt.current = fe, ft)) {
1674
+ _e([]);
1546
1675
  return;
1547
1676
  }
1548
- if (d(), ze(), typeof ResizeObserver > "u") return;
1677
+ if (d(), Le(), typeof ResizeObserver > "u") return;
1549
1678
  const p = new ResizeObserver(d);
1550
1679
  return p.observe(r), () => p.disconnect();
1551
- }, [de, ce, lt, l, o, ze]);
1552
- const K = V.reduce((r, d) => r + d, 0);
1553
- return /* @__PURE__ */ s("div", { className: i("space-y-4", Xt), children: [
1680
+ }, [pe, fe, ft, l, i, Le]);
1681
+ const re = J.reduce((r, d) => r + d, 0);
1682
+ return /* @__PURE__ */ s("div", { className: o("space-y-4", Qt), children: [
1554
1683
  N && N.length > 0 && /* @__PURE__ */ e("div", { className: "flex items-center gap-1 border-b border-line", role: "tablist", children: N.map((r) => {
1555
- const d = r.id === k;
1684
+ const d = r.id === z;
1556
1685
  return /* @__PURE__ */ e(
1557
1686
  "button",
1558
1687
  {
1559
1688
  type: "button",
1560
1689
  role: "tab",
1561
1690
  "aria-selected": d,
1562
- onClick: () => v == null ? void 0 : v(r.id),
1563
- className: i(
1691
+ onClick: () => y == null ? void 0 : y(r.id),
1692
+ className: o(
1564
1693
  "-mb-px border-b-2 px-3 py-2 text-sm transition-colors",
1565
1694
  d ? "border-fg font-medium text-fg" : "border-transparent text-muted hover:text-fg"
1566
1695
  ),
@@ -1569,39 +1698,39 @@ function Kr({
1569
1698
  r.id
1570
1699
  );
1571
1700
  }) }),
1572
- pa && /* @__PURE__ */ s("div", { className: "flex flex-wrap items-center gap-2", children: [
1573
- u && /* @__PURE__ */ e(
1574
- Be,
1701
+ ha && /* @__PURE__ */ s("div", { className: "flex flex-wrap items-center gap-2", children: [
1702
+ m && /* @__PURE__ */ e(
1703
+ ke,
1575
1704
  {
1576
1705
  type: "search",
1577
- "aria-label": u.placeholder ?? "Search",
1578
- placeholder: u.placeholder ?? "Search...",
1579
- value: u.value,
1580
- onChange: (r) => u.onChange(r.target.value),
1581
- onClear: () => u.onChange(""),
1582
- leadingIcon: /* @__PURE__ */ e(Sa, {}),
1706
+ "aria-label": m.placeholder ?? "Search",
1707
+ placeholder: m.placeholder ?? "Search...",
1708
+ value: m.value,
1709
+ onChange: (r) => m.onChange(r.target.value),
1710
+ onClear: () => m.onChange(""),
1711
+ leadingIcon: /* @__PURE__ */ e(Dt, {}),
1583
1712
  containerClassName: "w-full sm:w-[280px]",
1584
1713
  className: "rounded-[6px] border-0 bg-surface shadow-xs ring-1 ring-line"
1585
1714
  }
1586
1715
  ),
1587
1716
  x,
1588
- h && /* @__PURE__ */ s(Me, { children: [
1589
- /* @__PURE__ */ e(me, { asChild: !0, children: /* @__PURE__ */ e(
1590
- M,
1717
+ g && /* @__PURE__ */ s($e, { children: [
1718
+ /* @__PURE__ */ e(xe, { asChild: !0, children: /* @__PURE__ */ e(
1719
+ R,
1591
1720
  {
1592
1721
  variant: "secondary",
1593
1722
  size: "md",
1594
- leadingIcon: /* @__PURE__ */ e(za, {}),
1595
- trailingIcon: /* @__PURE__ */ e(Lt, {}),
1723
+ leadingIcon: /* @__PURE__ */ e(Da, {}),
1724
+ trailingIcon: /* @__PURE__ */ e(Ut, {}),
1596
1725
  children: "Columns"
1597
1726
  }
1598
1727
  ) }),
1599
- /* @__PURE__ */ s(pe, { align: "end", className: "w-54", children: [
1600
- /* @__PURE__ */ e(fe, { className: "text-[13px]", children: "Active columns" }),
1601
- G.map((r) => {
1602
- const d = Qe(r);
1728
+ /* @__PURE__ */ s(ve, { align: "end", className: "w-54", children: [
1729
+ /* @__PURE__ */ e(Ne, { className: "text-[13px]", children: "Active columns" }),
1730
+ X.map((r) => {
1731
+ const d = ot(r);
1603
1732
  return /* @__PURE__ */ s(
1604
- ee,
1733
+ le,
1605
1734
  {
1606
1735
  checked: !0,
1607
1736
  draggable: !d,
@@ -1610,27 +1739,27 @@ function Kr({
1610
1739
  p.preventDefault();
1611
1740
  return;
1612
1741
  }
1613
- p.dataTransfer.effectAllowed = "move", p.dataTransfer.setData("text/plain", r.id), Oe(r.id);
1742
+ p.dataTransfer.effectAllowed = "move", p.dataTransfer.setData("text/plain", r.id), tt(r.id);
1614
1743
  },
1615
1744
  onDragOver: (p) => {
1616
- Ne && (p.preventDefault(), na(Ne, r.id));
1745
+ Ie && (p.preventDefault(), ia(Ie, r.id));
1617
1746
  },
1618
1747
  onDrop: (p) => p.preventDefault(),
1619
- onDragEnd: () => Oe(null),
1748
+ onDragEnd: () => tt(null),
1620
1749
  onCheckedChange: (p) => {
1621
- !p && !d && He((C) => ({ ...C, [r.id]: !0 }));
1750
+ !p && !d && Ye((S) => ({ ...S, [r.id]: !0 }));
1622
1751
  },
1623
1752
  onSelect: (p) => p.preventDefault(),
1624
1753
  className: "justify-between",
1625
1754
  children: [
1626
1755
  /* @__PURE__ */ e("span", { className: "truncate", children: r.header }),
1627
- d ? /* @__PURE__ */ e(ka, { className: "size-3.5 shrink-0 text-subtle", "aria-hidden": !0 }) : /* @__PURE__ */ e(
1628
- Da,
1756
+ d ? /* @__PURE__ */ e(Ta, { className: "size-3.5 shrink-0 text-subtle", "aria-hidden": !0 }) : /* @__PURE__ */ e(
1757
+ Ma,
1629
1758
  {
1630
1759
  "aria-hidden": !0,
1631
- className: i(
1760
+ className: o(
1632
1761
  "size-3.5 shrink-0",
1633
- Ne === r.id ? "text-primary" : "text-subtle"
1762
+ Ie === r.id ? "text-primary" : "text-subtle"
1634
1763
  )
1635
1764
  }
1636
1765
  )
@@ -1639,14 +1768,14 @@ function Kr({
1639
1768
  r.id
1640
1769
  );
1641
1770
  }),
1642
- Ke.length > 0 ? /* @__PURE__ */ s(je, { children: [
1643
- /* @__PURE__ */ e(Re, {}),
1644
- /* @__PURE__ */ e(fe, { className: "text-[13px]", children: "Available columns" }),
1645
- Ke.map((r) => /* @__PURE__ */ e(
1646
- ee,
1771
+ lt.length > 0 ? /* @__PURE__ */ s(Ge, { children: [
1772
+ /* @__PURE__ */ e(He, {}),
1773
+ /* @__PURE__ */ e(Ne, { className: "text-[13px]", children: "Available columns" }),
1774
+ lt.map((r) => /* @__PURE__ */ e(
1775
+ le,
1647
1776
  {
1648
1777
  checked: !1,
1649
- onCheckedChange: () => la(r.id),
1778
+ onCheckedChange: () => sa(r.id),
1650
1779
  onSelect: (d) => d.preventDefault(),
1651
1780
  children: r.header
1652
1781
  },
@@ -1655,21 +1784,21 @@ function Kr({
1655
1784
  ] }) : null
1656
1785
  ] })
1657
1786
  ] }),
1658
- c && c.length > 0 ? /* @__PURE__ */ s(Me, { children: [
1659
- /* @__PURE__ */ e(me, { asChild: !0, children: /* @__PURE__ */ e(
1660
- M,
1787
+ u && u.length > 0 ? /* @__PURE__ */ s($e, { children: [
1788
+ /* @__PURE__ */ e(xe, { asChild: !0, children: /* @__PURE__ */ e(
1789
+ R,
1661
1790
  {
1662
1791
  variant: "secondary",
1663
1792
  size: "md",
1664
1793
  iconOnly: !0,
1665
1794
  "aria-label": "Add filter",
1666
- children: /* @__PURE__ */ e(ct, {})
1795
+ children: /* @__PURE__ */ e(vt, {})
1667
1796
  }
1668
1797
  ) }),
1669
- /* @__PURE__ */ e(pe, { align: "start", className: "w-54", children: c.map((r) => /* @__PURE__ */ e(
1670
- he,
1798
+ /* @__PURE__ */ e(ve, { align: "start", className: "w-54", children: u.map((r) => /* @__PURE__ */ e(
1799
+ we,
1671
1800
  {
1672
- onSelect: () => we(
1801
+ onSelect: () => je(
1673
1802
  (d) => d.includes(r.id) ? d : [...d, r.id]
1674
1803
  ),
1675
1804
  children: r.label
@@ -1677,16 +1806,16 @@ function Kr({
1677
1806
  r.id
1678
1807
  )) })
1679
1808
  ] }) : null,
1680
- b ? /* @__PURE__ */ e("div", { className: "flex-0 sm:ml-auto", children: b }) : null
1809
+ f ? /* @__PURE__ */ e("div", { className: "flex-0 sm:ml-auto", children: f }) : null
1681
1810
  ] }),
1682
- Ce.length > 0 ? /* @__PURE__ */ s("div", { className: "flex flex-wrap items-center gap-2", children: [
1683
- Ce.map((r) => {
1811
+ Ee.length > 0 ? /* @__PURE__ */ s("div", { className: "flex flex-wrap items-center gap-2", children: [
1812
+ Ee.map((r) => {
1684
1813
  const d = () => {
1685
- r.onChange([]), we((p) => p.filter((C) => C !== r.id));
1814
+ r.onChange([]), je((p) => p.filter((S) => S !== r.id));
1686
1815
  };
1687
1816
  return /* @__PURE__ */ s("div", { className: "inline-flex items-center", children: [
1688
1817
  /* @__PURE__ */ e(
1689
- M,
1818
+ R,
1690
1819
  {
1691
1820
  variant: "secondary",
1692
1821
  size: "md",
@@ -1694,39 +1823,39 @@ function Kr({
1694
1823
  "aria-label": `Remove ${r.label} filter`,
1695
1824
  className: "rounded-r-none",
1696
1825
  onClick: d,
1697
- children: /* @__PURE__ */ e(be, {})
1826
+ children: /* @__PURE__ */ e(ye, {})
1698
1827
  }
1699
1828
  ),
1700
- /* @__PURE__ */ s(Me, { children: [
1701
- /* @__PURE__ */ e(me, { asChild: !0, children: /* @__PURE__ */ s(M, { variant: "secondary", size: "md", className: "rounded-l-none pl-2", children: [
1702
- /* @__PURE__ */ e(ct, {}),
1829
+ /* @__PURE__ */ s($e, { children: [
1830
+ /* @__PURE__ */ e(xe, { asChild: !0, children: /* @__PURE__ */ s(R, { variant: "secondary", size: "md", className: "rounded-l-none pl-2", children: [
1831
+ /* @__PURE__ */ e(vt, {}),
1703
1832
  /* @__PURE__ */ e("span", { className: "font-medium", children: r.label }),
1704
1833
  /* @__PURE__ */ e("span", { className: "h-4 w-px bg-line", "aria-hidden": !0 }),
1705
1834
  /* @__PURE__ */ e("span", { className: "text-muted", children: r.value.length > 0 ? `${r.value.length} selected` : "Enter value" }),
1706
1835
  /* @__PURE__ */ e(Y, { className: "text-muted" })
1707
1836
  ] }) }),
1708
- /* @__PURE__ */ s(pe, { align: "start", className: "w-56", children: [
1709
- /* @__PURE__ */ s(fe, { className: "text-[13px]", children: [
1837
+ /* @__PURE__ */ s(ve, { align: "start", className: "w-56", children: [
1838
+ /* @__PURE__ */ s(Ne, { className: "text-[13px]", children: [
1710
1839
  "Filter by ",
1711
1840
  r.label
1712
1841
  ] }),
1713
1842
  r.options.map((p) => {
1714
- const C = r.value.includes(p.value);
1843
+ const S = r.value.includes(p.value);
1715
1844
  return /* @__PURE__ */ e(
1716
- ee,
1845
+ le,
1717
1846
  {
1718
- checked: C,
1847
+ checked: S,
1719
1848
  onCheckedChange: () => r.onChange(
1720
- C ? r.value.filter((z) => z !== p.value) : [...r.value, p.value]
1849
+ S ? r.value.filter((T) => T !== p.value) : [...r.value, p.value]
1721
1850
  ),
1722
- onSelect: (z) => z.preventDefault(),
1851
+ onSelect: (T) => T.preventDefault(),
1723
1852
  children: p.label
1724
1853
  },
1725
1854
  p.value
1726
1855
  );
1727
1856
  }),
1728
- /* @__PURE__ */ e(Re, {}),
1729
- /* @__PURE__ */ e(he, { onSelect: d, children: "Clear filter" })
1857
+ /* @__PURE__ */ e(He, {}),
1858
+ /* @__PURE__ */ e(we, { onSelect: d, children: "Clear filter" })
1730
1859
  ] })
1731
1860
  ] })
1732
1861
  ] }, r.id);
@@ -1736,8 +1865,8 @@ function Kr({
1736
1865
  {
1737
1866
  type: "button",
1738
1867
  onClick: () => {
1739
- for (const r of Ce) r.onChange([]);
1740
- we([]);
1868
+ for (const r of Ee) r.onChange([]);
1869
+ je([]);
1741
1870
  },
1742
1871
  className: "text-sm text-muted transition-colors hover:text-fg",
1743
1872
  children: "Clear filters"
@@ -1745,18 +1874,18 @@ function Kr({
1745
1874
  )
1746
1875
  ] }) : null,
1747
1876
  D,
1748
- S && q.size > 0 && /* @__PURE__ */ s("div", { className: "flex flex-wrap items-center gap-3 rounded-lg border border-line bg-elevated px-3 py-2 text-sm", children: [
1877
+ k && U.size > 0 && /* @__PURE__ */ s("div", { className: "flex flex-wrap items-center gap-3 rounded-lg border border-line bg-elevated px-3 py-2 text-sm", children: [
1749
1878
  /* @__PURE__ */ s("span", { className: "font-medium text-fg", children: [
1750
- q.size,
1879
+ U.size,
1751
1880
  " selected"
1752
1881
  ] }),
1753
- /* @__PURE__ */ e("div", { className: "flex items-center gap-2", children: (g ?? []).map((r) => /* @__PURE__ */ s(
1754
- M,
1882
+ /* @__PURE__ */ e("div", { className: "flex items-center gap-2", children: (b ?? []).map((r) => /* @__PURE__ */ s(
1883
+ R,
1755
1884
  {
1756
1885
  size: "md",
1757
1886
  variant: r.variant ?? "outline",
1758
1887
  disabled: r.disabled,
1759
- onClick: () => void r.onRun(ca),
1888
+ onClick: () => void r.onRun(pa),
1760
1889
  children: [
1761
1890
  r.icon,
1762
1891
  r.label
@@ -1768,26 +1897,26 @@ function Kr({
1768
1897
  "button",
1769
1898
  {
1770
1899
  type: "button",
1771
- onClick: () => ye(/* @__PURE__ */ new Set()),
1900
+ onClick: () => Re(/* @__PURE__ */ new Set()),
1772
1901
  className: "ml-auto inline-flex items-center gap-1 text-xs text-muted hover:text-fg",
1773
1902
  children: [
1774
- /* @__PURE__ */ e(be, { className: "size-3.5" }),
1903
+ /* @__PURE__ */ e(ye, { className: "size-3.5" }),
1775
1904
  "Clear"
1776
1905
  ]
1777
1906
  }
1778
1907
  )
1779
1908
  ] }),
1780
1909
  /* @__PURE__ */ e(
1781
- xe,
1910
+ ze,
1782
1911
  {
1783
1912
  scrollMode: "panel",
1784
- headerContentRef: tt,
1785
- action: Wt,
1786
- tone: Gt,
1787
- title: Ht,
1788
- description: Vt,
1789
- headerClassName: Ot,
1790
- panelClassName: Ut,
1913
+ headerContentRef: ct,
1914
+ action: ee,
1915
+ tone: Me,
1916
+ title: de,
1917
+ description: Pe,
1918
+ headerClassName: v,
1919
+ panelClassName: W,
1791
1920
  header: (
1792
1921
  // Visible header band. Presentational (aria-sort lives on the body's
1793
1922
  // sr-only thead); widths are pinned to the measured body columns and
@@ -1795,53 +1924,53 @@ function Kr({
1795
1924
  /* @__PURE__ */ s(
1796
1925
  "table",
1797
1926
  {
1798
- ref: et,
1927
+ ref: dt,
1799
1928
  role: "presentation",
1800
1929
  className: "w-full table-fixed border-collapse",
1801
1930
  style: {
1802
1931
  // Fill the container when it fits; force totalWidth (and the
1803
1932
  // shared scroller) only when the columns need more room.
1804
- minWidth: K > 0 ? K : void 0,
1805
- visibility: K > 0 ? void 0 : "hidden"
1933
+ minWidth: re > 0 ? re : void 0,
1934
+ visibility: re > 0 ? void 0 : "hidden"
1806
1935
  },
1807
1936
  children: [
1808
- /* @__PURE__ */ e("colgroup", { children: V.map((r, d) => /* @__PURE__ */ e("col", { style: { width: r } }, d)) }),
1937
+ /* @__PURE__ */ e("colgroup", { children: J.map((r, d) => /* @__PURE__ */ e("col", { style: { width: r } }, d)) }),
1809
1938
  /* @__PURE__ */ e("thead", { children: /* @__PURE__ */ s("tr", { children: [
1810
- S && /* @__PURE__ */ e("th", { className: "h-(--table-header-h) w-11 px-(--table-pad-x) text-left align-middle", children: /* @__PURE__ */ e(
1811
- Pe,
1939
+ k && /* @__PURE__ */ e("th", { className: "h-(--table-header-h) w-11 px-(--table-pad-x) text-left align-middle", children: /* @__PURE__ */ e(
1940
+ Fe,
1812
1941
  {
1813
1942
  "aria-label": "Select all rows",
1814
- checked: Ye ? !0 : da ? "indeterminate" : !1,
1815
- onCheckedChange: ua
1943
+ checked: it ? !0 : ma ? "indeterminate" : !1,
1944
+ onCheckedChange: fa
1816
1945
  }
1817
1946
  ) }),
1818
- I && /* @__PURE__ */ e("th", { className: "h-(--table-header-h) w-9 px-1.5" }),
1819
- G.map((r) => /* @__PURE__ */ e(
1947
+ M && /* @__PURE__ */ e("th", { className: "h-(--table-header-h) w-9 px-1.5" }),
1948
+ X.map((r) => /* @__PURE__ */ e(
1820
1949
  "th",
1821
1950
  {
1822
- className: i(Sr, r.align === "right" && "text-right", r.className),
1951
+ className: o(kr, r.align === "right" && "text-right", r.className),
1823
1952
  children: /* @__PURE__ */ e(
1824
1953
  "span",
1825
1954
  {
1826
1955
  "data-col-sizer": !0,
1827
1956
  className: "inline-block whitespace-nowrap px-(--table-pad-x) -mx-(--table-pad-x)",
1828
1957
  children: r.sortable ? /* @__PURE__ */ s(
1829
- M,
1958
+ R,
1830
1959
  {
1831
1960
  type: "button",
1832
1961
  variant: "ghost",
1833
1962
  size: "xs",
1834
1963
  "aria-label": `Sort by ${r.header}`,
1835
- onClick: () => sa(r),
1836
- className: i(
1964
+ onClick: () => ua(r),
1965
+ className: o(
1837
1966
  "h-auto gap-1.5 rounded-none px-0 py-0 text-[0.8125rem] text-table-header transition-colors [&_svg]:size-3.5",
1838
1967
  "hover:bg-transparent hover:text-table-header-active hover:shadow-none",
1839
1968
  "active:scale-100 active:bg-transparent active:shadow-none",
1840
- (y == null ? void 0 : y.id) === r.id && "text-table-header-active"
1969
+ (w == null ? void 0 : w.id) === r.id && "text-table-header-active"
1841
1970
  ),
1842
1971
  children: [
1843
1972
  r.header,
1844
- (y == null ? void 0 : y.id) === r.id ? y.dir === "asc" ? /* @__PURE__ */ e(Ma, { className: "size-3.5", weight: "bold" }) : /* @__PURE__ */ e(Y, { className: "size-3.5", weight: "bold" }) : /* @__PURE__ */ e(Pa, { className: "size-3.5 opacity-50" })
1973
+ (w == null ? void 0 : w.id) === r.id ? w.dir === "asc" ? /* @__PURE__ */ e(Ia, { className: "size-3.5", weight: "bold" }) : /* @__PURE__ */ e(Y, { className: "size-3.5", weight: "bold" }) : /* @__PURE__ */ e(Ra, { className: "size-3.5 opacity-50" })
1845
1974
  ]
1846
1975
  }
1847
1976
  ) : r.header
@@ -1850,117 +1979,117 @@ function Kr({
1850
1979
  },
1851
1980
  r.id
1852
1981
  )),
1853
- j && /* @__PURE__ */ e("th", { className: "h-(--table-header-h) w-44 px-4 align-middle", children: /* @__PURE__ */ e("span", { className: "sr-only", children: "Actions" }) })
1982
+ I && /* @__PURE__ */ e("th", { className: "h-(--table-header-h) w-44 px-4 align-middle", children: /* @__PURE__ */ e("span", { className: "sr-only", children: "Actions" }) })
1854
1983
  ] }) })
1855
1984
  ]
1856
1985
  }
1857
1986
  )
1858
1987
  ),
1859
- children: /* @__PURE__ */ e("div", { ref: at, className: "overflow-x-auto", onScroll: ze, children: l ? /* @__PURE__ */ e("div", { className: "space-y-2 p-4", children: [0, 1, 2].map((r) => /* @__PURE__ */ e("div", { className: "h-11 w-full animate-pulse rounded-lg bg-table-row-hover" }, r)) }) : o ? /* @__PURE__ */ s("div", { className: "flex min-h-88 flex-col items-center justify-center gap-4 px-6 py-16 text-center", children: [
1860
- /* @__PURE__ */ e("div", { className: "flex size-(--table-empty-icon) items-center justify-center rounded-2xl border border-table-empty-icon-border bg-table-empty-icon text-error [&_svg]:size-8", children: /* @__PURE__ */ e(Ta, { weight: "duotone" }) }),
1988
+ children: /* @__PURE__ */ e("div", { ref: ut, className: "overflow-x-auto", onScroll: Le, children: l ? /* @__PURE__ */ e("div", { className: "space-y-2 p-4", children: [0, 1, 2].map((r) => /* @__PURE__ */ e("div", { className: "h-11 w-full animate-pulse rounded-lg bg-table-row-hover" }, r)) }) : i ? /* @__PURE__ */ s("div", { className: "flex min-h-88 flex-col items-center justify-center gap-4 px-6 py-16 text-center", children: [
1989
+ /* @__PURE__ */ e("div", { className: "flex size-(--table-empty-icon) items-center justify-center rounded-2xl border border-table-empty-icon-border bg-table-empty-icon text-error [&_svg]:size-8", children: /* @__PURE__ */ e(Pa, { weight: "duotone" }) }),
1861
1990
  /* @__PURE__ */ s("div", { className: "space-y-2", children: [
1862
- /* @__PURE__ */ e("p", { className: "text-[1.75rem] font-semibold text-table-header-active", children: o.title }),
1863
- o.description ? /* @__PURE__ */ e("p", { className: "mx-auto max-w-md text-base leading-relaxed text-table-muted", children: o.description }) : null
1991
+ /* @__PURE__ */ e("p", { className: "text-[1.75rem] font-semibold text-table-header-active", children: i.title }),
1992
+ i.description ? /* @__PURE__ */ e("p", { className: "mx-auto max-w-md text-base leading-relaxed text-table-muted", children: i.description }) : null
1864
1993
  ] }),
1865
- o.action
1866
- ] }) : $.length === 0 ? /* @__PURE__ */ e(
1867
- Cr,
1994
+ i.action
1995
+ ] }) : O.length === 0 ? /* @__PURE__ */ e(
1996
+ zr,
1868
1997
  {
1869
- icon: m == null ? void 0 : m.icon,
1870
- title: (m == null ? void 0 : m.title) ?? "No results",
1871
- description: m == null ? void 0 : m.description,
1872
- action: m == null ? void 0 : m.action
1998
+ icon: c == null ? void 0 : c.icon,
1999
+ title: (c == null ? void 0 : c.title) ?? "No results",
2000
+ description: c == null ? void 0 : c.description,
2001
+ action: c == null ? void 0 : c.action
1873
2002
  }
1874
2003
  ) : /* @__PURE__ */ s(
1875
2004
  "table",
1876
2005
  {
1877
- ref: Ze,
1878
- className: i(
2006
+ ref: st,
2007
+ className: o(
1879
2008
  "border-collapse text-left",
1880
2009
  // Unmeasured: content-sized so intrinsic column widths can be
1881
2010
  // measured (w-full would squeeze columns into the container).
1882
2011
  // Measured: fill the container, pinned to the band's colgroup
1883
2012
  // pixel widths; minWidth forces the shared scroller open only
1884
2013
  // when the columns need more room than the container has.
1885
- V.length > 0 ? "w-full table-fixed" : "table-auto"
2014
+ J.length > 0 ? "w-full table-fixed" : "table-auto"
1886
2015
  ),
1887
- style: { minWidth: K > 0 ? K : void 0 },
2016
+ style: { minWidth: re > 0 ? re : void 0 },
1888
2017
  children: [
1889
- V.length > 0 && /* @__PURE__ */ e("colgroup", { children: V.map((r, d) => /* @__PURE__ */ e("col", { style: { width: r } }, d)) }),
2018
+ J.length > 0 && /* @__PURE__ */ e("colgroup", { children: J.map((r, d) => /* @__PURE__ */ e("col", { style: { width: r } }, d)) }),
1890
2019
  /* @__PURE__ */ e("thead", { className: "sr-only", children: /* @__PURE__ */ s("tr", { children: [
1891
- S && /* @__PURE__ */ e("th", { scope: "col", children: "Select" }),
1892
- I && /* @__PURE__ */ e("th", { scope: "col", children: "Details" }),
1893
- G.map((r) => /* @__PURE__ */ e("th", { scope: "col", "aria-sort": fa(r), children: r.header }, r.id)),
1894
- j && /* @__PURE__ */ e("th", { scope: "col", children: "Actions" })
2020
+ k && /* @__PURE__ */ e("th", { scope: "col", children: "Select" }),
2021
+ M && /* @__PURE__ */ e("th", { scope: "col", children: "Details" }),
2022
+ X.map((r) => /* @__PURE__ */ e("th", { scope: "col", "aria-sort": ga(r), children: r.header }, r.id)),
2023
+ I && /* @__PURE__ */ e("th", { scope: "col", children: "Actions" })
1895
2024
  ] }) }),
1896
- /* @__PURE__ */ e(Ja, { children: $.map((r) => {
1897
- const d = n(r), p = q.has(d), C = Zt.has(d), z = G.length + (S ? 1 : 0) + (I ? 1 : 0) + (j ? 1 : 0);
1898
- return /* @__PURE__ */ s(ja, { children: [
2025
+ /* @__PURE__ */ e(Ja, { children: O.map((r) => {
2026
+ const d = n(r), p = U.has(d), S = aa.has(d), T = X.length + (k ? 1 : 0) + (M ? 1 : 0) + (I ? 1 : 0);
2027
+ return /* @__PURE__ */ s(_a, { children: [
1899
2028
  /* @__PURE__ */ s(
1900
- mt,
2029
+ yt,
1901
2030
  {
1902
2031
  "data-state": p ? "selected" : void 0,
1903
- onClick: A ? () => A(r) : void 0,
1904
- className: A ? "cursor-pointer" : void 0,
2032
+ onClick: L ? () => L(r) : void 0,
2033
+ className: L ? "cursor-pointer" : void 0,
1905
2034
  children: [
1906
- S && /* @__PURE__ */ e(Q, { className: "w-11", onClick: (w) => w.stopPropagation(), children: /* @__PURE__ */ e(
1907
- Pe,
2035
+ k && /* @__PURE__ */ e(ne, { className: "w-11", onClick: (C) => C.stopPropagation(), children: /* @__PURE__ */ e(
2036
+ Fe,
1908
2037
  {
1909
2038
  "aria-label": "Select row",
1910
2039
  checked: p,
1911
- onCheckedChange: () => ma(d)
2040
+ onCheckedChange: () => ba(d)
1912
2041
  }
1913
2042
  ) }),
1914
- I && /* @__PURE__ */ e(Q, { className: "w-9 px-1.5", onClick: (w) => w.stopPropagation(), children: /* @__PURE__ */ e(
1915
- M,
2043
+ M && /* @__PURE__ */ e(ne, { className: "w-9 px-1.5", onClick: (C) => C.stopPropagation(), children: /* @__PURE__ */ e(
2044
+ R,
1916
2045
  {
1917
2046
  type: "button",
1918
2047
  variant: "ghost",
1919
2048
  size: "icon",
1920
2049
  className: "size-7",
1921
- "aria-label": C ? "Collapse row" : "Expand row",
1922
- "aria-expanded": C,
1923
- onClick: () => ta(d),
2050
+ "aria-label": S ? "Collapse row" : "Expand row",
2051
+ "aria-expanded": S,
2052
+ onClick: () => na(d),
1924
2053
  children: /* @__PURE__ */ e(
1925
2054
  Y,
1926
2055
  {
1927
- className: i(
2056
+ className: o(
1928
2057
  "size-3.5 text-muted transition-transform motion-safe:duration-200",
1929
- C ? "" : "-rotate-90"
2058
+ S ? "" : "-rotate-90"
1930
2059
  ),
1931
2060
  weight: "bold"
1932
2061
  }
1933
2062
  )
1934
2063
  }
1935
2064
  ) }),
1936
- G.map((w) => /* @__PURE__ */ e(
1937
- Q,
2065
+ X.map((C) => /* @__PURE__ */ e(
2066
+ ne,
1938
2067
  {
1939
- "data-numeric": w.numeric ? "" : void 0,
1940
- className: i(w.align === "right" && "text-right", w.className),
1941
- children: w.cell(r)
2068
+ "data-numeric": C.numeric ? "" : void 0,
2069
+ className: o(C.align === "right" && "text-right", C.className),
2070
+ children: C.cell(r)
1942
2071
  },
1943
- w.id
2072
+ C.id
1944
2073
  )),
1945
- j && /* @__PURE__ */ e(
1946
- Q,
2074
+ I && /* @__PURE__ */ e(
2075
+ ne,
1947
2076
  {
1948
2077
  className: "w-44 px-4 text-right",
1949
- onClick: (w) => {
1950
- w.target.closest("button, a, input, [role='menuitem']") && w.stopPropagation();
2078
+ onClick: (C) => {
2079
+ C.target.closest("button, a, input, [role='menuitem']") && C.stopPropagation();
1951
2080
  },
1952
- children: j(r)
2081
+ children: I(r)
1953
2082
  }
1954
2083
  )
1955
2084
  ]
1956
2085
  }
1957
2086
  ),
1958
- I && C ? /* @__PURE__ */ e(mt, { className: "hover:bg-inherit", "data-expanded": "", children: /* @__PURE__ */ e(
1959
- Q,
2087
+ M && S ? /* @__PURE__ */ e(yt, { className: "hover:bg-inherit", "data-expanded": "", children: /* @__PURE__ */ e(
2088
+ ne,
1960
2089
  {
1961
- colSpan: z,
2090
+ colSpan: T,
1962
2091
  className: "border-t border-line bg-elevated/60 px-(--table-pad-x) py-3 align-top text-[13px] text-muted",
1963
- children: I(r)
2092
+ children: M(r)
1964
2093
  }
1965
2094
  ) }) : null
1966
2095
  ] }, d);
@@ -1970,40 +2099,40 @@ function Kr({
1970
2099
  ) })
1971
2100
  }
1972
2101
  ),
1973
- oa && /* @__PURE__ */ s("div", { className: "flex flex-wrap items-center justify-between gap-3 text-sm", children: [
2102
+ ca && /* @__PURE__ */ s("div", { className: "flex flex-wrap items-center justify-between gap-3 text-sm", children: [
1974
2103
  /* @__PURE__ */ s("span", { className: "text-muted", children: [
1975
- se + 1,
2104
+ me + 1,
1976
2105
  "–",
1977
- Math.min(se + B, H.length),
2106
+ Math.min(me + G, K.length),
1978
2107
  " of ",
1979
- H.length
2108
+ K.length
1980
2109
  ] }),
1981
2110
  /* @__PURE__ */ s("div", { className: "flex items-center gap-2", children: [
1982
- /* @__PURE__ */ s($t, { value: String(B), onValueChange: (r) => Yt(Number(r)), children: [
1983
- /* @__PURE__ */ e(Fe, { "aria-label": "Rows per page", className: "w-27.5", variant: "inline", children: /* @__PURE__ */ e(Bt, {}) }),
1984
- /* @__PURE__ */ e(qe, { children: Ft.map((r) => /* @__PURE__ */ e(ve, { value: String(r), children: r }, r)) })
2111
+ /* @__PURE__ */ s(Jt, { value: String(G), onValueChange: (r) => ta(Number(r)), children: [
2112
+ /* @__PURE__ */ e(Ke, { "aria-label": "Rows per page", className: "w-27.5", variant: "inline", children: /* @__PURE__ */ e(Kt, {}) }),
2113
+ /* @__PURE__ */ e(Je, { children: De.map((r) => /* @__PURE__ */ e(Se, { value: String(r), children: r }, r)) })
1985
2114
  ] }),
1986
2115
  /* @__PURE__ */ s("div", { className: "flex items-center gap-1", children: [
1987
2116
  /* @__PURE__ */ e(
1988
- M,
2117
+ R,
1989
2118
  {
1990
2119
  variant: "secondary",
1991
2120
  size: "icon",
1992
2121
  "aria-label": "Previous page",
1993
- disabled: X <= 0,
1994
- onClick: () => ie((r) => Math.max(0, r - 1)),
1995
- children: /* @__PURE__ */ e(Ia, {})
2122
+ disabled: te <= 0,
2123
+ onClick: () => ce((r) => Math.max(0, r - 1)),
2124
+ children: /* @__PURE__ */ e(ja, {})
1996
2125
  }
1997
2126
  ),
1998
2127
  /* @__PURE__ */ e(
1999
- M,
2128
+ R,
2000
2129
  {
2001
2130
  variant: "secondary",
2002
2131
  size: "icon",
2003
2132
  "aria-label": "Next page",
2004
- disabled: X >= J - 1,
2005
- onClick: () => ie((r) => Math.min(J - 1, r + 1)),
2006
- children: /* @__PURE__ */ e(xt, {})
2133
+ disabled: te >= ae - 1,
2134
+ onClick: () => ce((r) => Math.min(ae - 1, r + 1)),
2135
+ children: /* @__PURE__ */ e(Tt, {})
2007
2136
  }
2008
2137
  )
2009
2138
  ] })
@@ -2011,8 +2140,8 @@ function Kr({
2011
2140
  ] })
2012
2141
  ] });
2013
2142
  }
2014
- function Qr({ icon: t, title: a, description: n, action: l, className: o }) {
2015
- return /* @__PURE__ */ e(xe, { className: o, children: /* @__PURE__ */ s("div", { className: "flex flex-col items-center justify-center gap-4 px-6 py-16 text-center", children: [
2143
+ function Zr({ icon: t, title: a, description: n, action: l, className: i }) {
2144
+ return /* @__PURE__ */ e(ze, { className: i, children: /* @__PURE__ */ s("div", { className: "flex flex-col items-center justify-center gap-4 px-6 py-16 text-center", children: [
2016
2145
  t ? /* @__PURE__ */ e("div", { className: "flex size-11 items-center justify-center rounded-xl border border-line bg-elevated text-subtle [&_svg]:size-6", children: t }) : null,
2017
2146
  /* @__PURE__ */ s("div", { className: "space-y-1", children: [
2018
2147
  /* @__PURE__ */ e("p", { className: "text-sm font-medium text-fg", children: a }),
@@ -2021,66 +2150,66 @@ function Qr({ icon: t, title: a, description: n, action: l, className: o }) {
2021
2150
  l
2022
2151
  ] }) });
2023
2152
  }
2024
- const kr = f(
2153
+ const Dr = h(
2025
2154
  ({
2026
2155
  className: t,
2027
2156
  inputClassName: a,
2028
2157
  selectClassName: n,
2029
2158
  selectValue: l,
2030
- onSelectChange: o,
2031
- selectOptions: m,
2032
- selectAriaLabel: u,
2033
- selectPlaceholder: c,
2159
+ onSelectChange: i,
2160
+ selectOptions: c,
2161
+ selectAriaLabel: m,
2162
+ selectPlaceholder: u,
2034
2163
  id: x,
2035
- size: b,
2036
- disabled: h,
2164
+ size: f,
2165
+ disabled: g,
2037
2166
  ...N
2038
- }, k) => /* @__PURE__ */ s("div", { className: i("flex w-full items-stretch", t), children: [
2167
+ }, z) => /* @__PURE__ */ s("div", { className: o("flex w-full items-stretch", t), children: [
2039
2168
  /* @__PURE__ */ e(
2040
- Be,
2169
+ ke,
2041
2170
  {
2042
2171
  ...N,
2043
- ref: k,
2172
+ ref: z,
2044
2173
  id: x,
2045
- size: b,
2046
- disabled: h,
2047
- className: i(
2174
+ size: f,
2175
+ disabled: g,
2176
+ className: o(
2048
2177
  "min-w-0 rounded-l-(--control-radius) rounded-r-none",
2049
2178
  a
2050
2179
  )
2051
2180
  }
2052
2181
  ),
2053
2182
  /* @__PURE__ */ s(
2054
- $t,
2183
+ Jt,
2055
2184
  {
2056
2185
  value: l,
2057
- onValueChange: o,
2058
- disabled: h,
2186
+ onValueChange: i,
2187
+ disabled: g,
2059
2188
  children: [
2060
2189
  /* @__PURE__ */ e(
2061
- Fe,
2190
+ Ke,
2062
2191
  {
2063
- "aria-label": u,
2192
+ "aria-label": m,
2064
2193
  variant: "ghost",
2065
- className: i(
2194
+ className: o(
2066
2195
  "min-w-28 shrink-0 rounded-l-none border border-(--input-border) border-l-0 px-3 text-[13px] font-normal",
2067
2196
  n
2068
2197
  ),
2069
- children: /* @__PURE__ */ e(Bt, { placeholder: c })
2198
+ children: /* @__PURE__ */ e(Kt, { placeholder: u })
2070
2199
  }
2071
2200
  ),
2072
- /* @__PURE__ */ e(qe, { children: m.map((v) => /* @__PURE__ */ e(ve, { value: v.value, children: v.label }, v.value)) })
2201
+ /* @__PURE__ */ e(Je, { children: c.map((y) => /* @__PURE__ */ e(Se, { value: y.value, children: y.label }, y.value)) })
2073
2202
  ]
2074
2203
  }
2075
2204
  )
2076
2205
  ] })
2077
2206
  );
2078
- kr.displayName = "InputSelect";
2079
- function Yr({ className: t, ...a }) {
2207
+ Dr.displayName = "InputSelect";
2208
+ function en({ className: t, ...a }) {
2080
2209
  return /* @__PURE__ */ e(
2081
2210
  "kbd",
2082
2211
  {
2083
- className: i(
2212
+ className: o(
2084
2213
  "inline-flex h-5 min-w-5 items-center justify-center rounded border border-line bg-elevated px-1.5 font-mono text-[11px] font-medium text-subtle",
2085
2214
  t
2086
2215
  ),
@@ -2088,43 +2217,43 @@ function Yr({ className: t, ...a }) {
2088
2217
  }
2089
2218
  );
2090
2219
  }
2091
- const Dr = f(({ className: t, ...a }, n) => /* @__PURE__ */ e(
2092
- Aa.Root,
2220
+ const Tr = h(({ className: t, ...a }, n) => /* @__PURE__ */ e(
2221
+ $a.Root,
2093
2222
  {
2094
2223
  ref: n,
2095
- className: i(
2224
+ className: o(
2096
2225
  "mb-2.5 block text-sm font-medium text-fg leading-none last:mb-0 peer-disabled:cursor-not-allowed peer-disabled:opacity-70",
2097
2226
  t
2098
2227
  ),
2099
2228
  ...a
2100
2229
  }
2101
2230
  ));
2102
- Dr.displayName = "Label";
2103
- function Zr({
2231
+ Tr.displayName = "Label";
2232
+ function tn({
2104
2233
  value: t,
2105
2234
  onValueChange: a,
2106
2235
  options: n,
2107
2236
  size: l = "sm",
2108
- className: o,
2109
- ...m
2237
+ className: i,
2238
+ ...c
2110
2239
  }) {
2111
- const u = ge();
2240
+ const m = Ce();
2112
2241
  return /* @__PURE__ */ e(
2113
2242
  "div",
2114
2243
  {
2115
2244
  role: "radiogroup",
2116
- "aria-label": m["aria-label"],
2117
- className: i(
2245
+ "aria-label": c["aria-label"],
2246
+ className: o(
2118
2247
  "inline-flex w-fit items-center rounded-lg border border-line bg-canvas",
2119
2248
  l === "sm" ? "h-(--control-h-sm)" : "h-(--control-h-md)",
2120
- o
2249
+ i
2121
2250
  ),
2122
- children: n.map((c) => {
2123
- const x = c.value === t;
2251
+ children: n.map((u) => {
2252
+ const x = u.value === t;
2124
2253
  return /* @__PURE__ */ s(
2125
2254
  "label",
2126
2255
  {
2127
- className: i(
2256
+ className: o(
2128
2257
  "inline-flex h-full cursor-pointer items-center justify-center gap-1.5 rounded-md text-sm font-medium transition-colors",
2129
2258
  "has-focus-visible:ring-2 has-focus-visible:ring-focus/40",
2130
2259
  l === "sm" ? "px-(--control-pad-x-sm) [&_svg]:size-(--control-icon-sm)" : "px-(--control-pad-x-md) [&_svg]:size-(--control-icon-md)",
@@ -2135,30 +2264,30 @@ function Zr({
2135
2264
  "input",
2136
2265
  {
2137
2266
  type: "radio",
2138
- name: u,
2139
- value: c.value,
2267
+ name: m,
2268
+ value: u.value,
2140
2269
  checked: x,
2141
- onChange: () => a(c.value),
2270
+ onChange: () => a(u.value),
2142
2271
  className: "sr-only"
2143
2272
  }
2144
2273
  ),
2145
- c.icon,
2146
- c.label
2274
+ u.icon,
2275
+ u.label
2147
2276
  ]
2148
2277
  },
2149
- c.value
2278
+ u.value
2150
2279
  );
2151
2280
  })
2152
2281
  }
2153
2282
  );
2154
2283
  }
2155
- const Tr = f(({ className: t, orientation: a = "horizontal", decorative: n = !0, ...l }, o) => /* @__PURE__ */ e(
2156
- Ba.Root,
2284
+ const Mr = h(({ className: t, orientation: a = "horizontal", decorative: n = !0, ...l }, i) => /* @__PURE__ */ e(
2285
+ Fa.Root,
2157
2286
  {
2158
- ref: o,
2287
+ ref: i,
2159
2288
  decorative: n,
2160
2289
  orientation: a,
2161
- className: i(
2290
+ className: o(
2162
2291
  "shrink-0 bg-line",
2163
2292
  a === "horizontal" ? "h-px w-full" : "h-full w-px",
2164
2293
  t
@@ -2166,22 +2295,22 @@ const Tr = f(({ className: t, orientation: a = "horizontal", decorative: n = !0,
2166
2295
  ...l
2167
2296
  }
2168
2297
  ));
2169
- Tr.displayName = "Separator";
2170
- function en({ className: t, ...a }) {
2298
+ Mr.displayName = "Separator";
2299
+ function an({ className: t, ...a }) {
2171
2300
  return /* @__PURE__ */ e(
2172
2301
  "div",
2173
2302
  {
2174
- className: i("animate-pulse rounded-md bg-elevated", t),
2303
+ className: o("animate-pulse rounded-md bg-elevated", t),
2175
2304
  ...a
2176
2305
  }
2177
2306
  );
2178
2307
  }
2179
- const tn = te.Provider, an = te.Root, rn = te.Trigger, Mr = f(({ className: t, sideOffset: a = 6, ...n }, l) => /* @__PURE__ */ e(te.Portal, { children: /* @__PURE__ */ e(
2180
- te.Content,
2308
+ const rn = oe.Provider, nn = oe.Root, ln = oe.Trigger, Pr = h(({ className: t, sideOffset: a = 6, ...n }, l) => /* @__PURE__ */ e(oe.Portal, { children: /* @__PURE__ */ e(
2309
+ oe.Content,
2181
2310
  {
2182
2311
  ref: l,
2183
2312
  sideOffset: a,
2184
- className: i(
2313
+ className: o(
2185
2314
  "z-50 overflow-hidden rounded-md border border-line bg-elevated px-2 py-1 text-xs text-fg shadow-md",
2186
2315
  "data-[state=delayed-open]:animate-in data-[state=closed]:animate-out",
2187
2316
  "data-[state=delayed-open]:fade-in-0 data-[state=closed]:fade-out-0",
@@ -2194,83 +2323,84 @@ const tn = te.Provider, an = te.Root, rn = te.Trigger, Mr = f(({ className: t, s
2194
2323
  ...n
2195
2324
  }
2196
2325
  ) }));
2197
- Mr.displayName = "TooltipContent";
2326
+ Pr.displayName = "TooltipContent";
2198
2327
  export {
2199
- Ar as AgentPrompt,
2200
- wt as Avatar,
2201
- St as AvatarFallback,
2202
- Ct as AvatarImage,
2328
+ Br as AgentPrompt,
2329
+ jt as Avatar,
2330
+ _t as AvatarFallback,
2331
+ Et as AvatarImage,
2203
2332
  Wa as Badge,
2204
- M as Button,
2205
- Br as Callout,
2206
- er as Card,
2207
- rr as CardContent,
2208
- ar as CardDescription,
2209
- nr as CardFooter,
2210
- zt as CardHeader,
2211
- tr as CardTitle,
2212
- Pe as Checkbox,
2213
- Hr as ChoiceDialog,
2333
+ R as Button,
2334
+ $r as Callout,
2335
+ tr as Card,
2336
+ nr as CardContent,
2337
+ rr as CardDescription,
2338
+ lr as CardFooter,
2339
+ Lt as CardHeader,
2340
+ ar as CardTitle,
2341
+ Fe as Checkbox,
2342
+ Or as ChoiceDialog,
2214
2343
  Vr as CodeBlock,
2215
- Kr as DataTable,
2216
- Jr as DataTableIdentity,
2217
- dr as Dialog,
2218
- mr as DialogBody,
2219
- Pt as DialogCancel,
2344
+ Wr as Combobox,
2345
+ Yr as DataTable,
2346
+ Qr as DataTableIdentity,
2347
+ cr as Dialog,
2348
+ pr as DialogBody,
2349
+ qt as DialogCancel,
2220
2350
  Gr as DialogClose,
2221
- Rt as DialogContent,
2222
- br as DialogDescription,
2223
- fr as DialogFooter,
2224
- pr as DialogHeader,
2225
- ur as DialogPanel,
2226
- jt as DialogTitle,
2227
- Mt as DialogTrigger,
2228
- Me as DropdownMenu,
2229
- ee as DropdownMenuCheckboxItem,
2230
- Lt as DropdownMenuChevron,
2231
- pe as DropdownMenuContent,
2232
- Wr as DropdownMenuGroup,
2233
- he as DropdownMenuItem,
2234
- fe as DropdownMenuLabel,
2235
- Or as DropdownMenuPortal,
2236
- Re as DropdownMenuSeparator,
2237
- Ur as DropdownMenuSub,
2238
- yr as DropdownMenuSubContent,
2239
- At as DropdownMenuSubTrigger,
2240
- me as DropdownMenuTrigger,
2241
- Qr as EmptyState,
2242
- Be as Input,
2243
- kr as InputSelect,
2244
- Yr as Kbd,
2245
- Dr as Label,
2246
- gr as RadioCard,
2247
- hr as RadioGroup,
2248
- Zr as Segmented,
2249
- $t as Select,
2250
- qe as SelectContent,
2251
- Xr as SelectGroup,
2252
- ve as SelectItem,
2253
- wr as SelectLabel,
2254
- Fe as SelectTrigger,
2255
- Bt as SelectValue,
2256
- Tr as Separator,
2257
- en as Skeleton,
2258
- Fa as Spinner,
2259
- $r as Table,
2351
+ Gt as DialogContent,
2352
+ hr as DialogDescription,
2353
+ br as DialogFooter,
2354
+ fr as DialogHeader,
2355
+ mr as DialogPanel,
2356
+ Ot as DialogTitle,
2357
+ Ft as DialogTrigger,
2358
+ $e as DropdownMenu,
2359
+ le as DropdownMenuCheckboxItem,
2360
+ Ut as DropdownMenuChevron,
2361
+ ve as DropdownMenuContent,
2362
+ Ur as DropdownMenuGroup,
2363
+ we as DropdownMenuItem,
2364
+ Ne as DropdownMenuLabel,
2365
+ Xr as DropdownMenuPortal,
2366
+ He as DropdownMenuSeparator,
2367
+ Kr as DropdownMenuSub,
2368
+ wr as DropdownMenuSubContent,
2369
+ Xt as DropdownMenuSubTrigger,
2370
+ xe as DropdownMenuTrigger,
2371
+ Zr as EmptyState,
2372
+ ke as Input,
2373
+ Dr as InputSelect,
2374
+ en as Kbd,
2375
+ Tr as Label,
2376
+ xr as RadioCard,
2377
+ gr as RadioGroup,
2378
+ tn as Segmented,
2379
+ Jt as Select,
2380
+ Je as SelectContent,
2381
+ Jr as SelectGroup,
2382
+ Se as SelectItem,
2383
+ Cr as SelectLabel,
2384
+ Ke as SelectTrigger,
2385
+ Kt as SelectValue,
2386
+ Mr as Separator,
2387
+ an as Skeleton,
2388
+ Rt as Spinner,
2389
+ Fr as Table,
2260
2390
  Ja as TableBody,
2261
- Q as TableCell,
2262
- Ua as TableContainer,
2263
- Cr as TableEmptyState,
2264
- qr as TableHead,
2265
- Fr as TableHeader,
2266
- Xa as TablePanel,
2267
- mt as TableRow,
2268
- xe as TableSurface,
2269
- an as Tooltip,
2270
- Mr as TooltipContent,
2271
- tn as TooltipProvider,
2272
- rn as TooltipTrigger,
2273
- Ha as badgeVariants,
2274
- qa as buttonVariants
2391
+ ne as TableCell,
2392
+ Xa as TableContainer,
2393
+ zr as TableEmptyState,
2394
+ Hr as TableHead,
2395
+ qr as TableHeader,
2396
+ Ka as TablePanel,
2397
+ yt as TableRow,
2398
+ ze as TableSurface,
2399
+ nn as Tooltip,
2400
+ Pr as TooltipContent,
2401
+ rn as TooltipProvider,
2402
+ ln as TooltipTrigger,
2403
+ Oa as badgeVariants,
2404
+ Ha as buttonVariants
2275
2405
  };
2276
2406
  //# sourceMappingURL=index.js.map