@minimalstuff/ui 5.0.1 → 5.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,17 +1,44 @@
1
1
  import e from "clsx";
2
- import { cloneElement as t, createContext as n, isValidElement as r, useCallback as i, useContext as a, useEffect as o, useId as s, useLayoutEffect as c, useMemo as l, useRef as u, useState as d } from "react";
3
- import { Fragment as f, jsx as p, jsxs as m } from "react/jsx-runtime";
2
+ import { Fragment as t, jsx as n, jsxs as r } from "react/jsx-runtime";
3
+ import { cloneElement as i, createContext as a, isValidElement as o, useCallback as s, useContext as c, useEffect as l, useId as u, useLayoutEffect as d, useMemo as f, useRef as p, useState as m } from "react";
4
4
  import { arrow as h, autoUpdate as g, flip as _, offset as v, shift as y, useFloating as b } from "@floating-ui/react-dom";
5
5
  import { createPortal as x } from "react-dom";
6
6
  import { create as S } from "zustand";
7
7
  import { createCallable as C } from "react-call";
8
+ // src/components/shared/surface_tokens.ts
9
+ var w = "border-gray-300 dark:border-gray-600", T = "bg-white dark:bg-gray-800", E = "border-gray-200 dark:border-gray-700", D = "bg-white dark:bg-gray-900", O = "[scrollbar-color:theme(colors.gray.300)_transparent] hover:[scrollbar-color:theme(colors.gray.400)_transparent] dark:[scrollbar-color:theme(colors.gray.600)_transparent] dark:hover:[scrollbar-color:theme(colors.gray.500)_transparent]", k = `[scrollbar-width:thin] ${O}`;
10
+ `${O}`;
11
+ // src/components/app_bar/app_bar.tsx
12
+ var A = e("grid min-h-8 grid-cols-[minmax(0,1fr)_auto_minmax(0,1fr)] items-center gap-3 border-b text-xs", "pl-[max(0.75rem,env(safe-area-inset-left))] pr-[max(0.75rem,env(safe-area-inset-right))]", "text-gray-700 dark:text-gray-300", D, E);
13
+ function j(t) {
14
+ let { start: i, title: a, end: o, startClassName: s, titleClassName: c, endClassName: l, unstyled: u = !1, className: d, ...f } = t;
15
+ return /* @__PURE__ */ r("header", {
16
+ ...f,
17
+ className: e(!u && A, d),
18
+ children: [
19
+ /* @__PURE__ */ n("div", {
20
+ className: e("flex min-w-0 items-center justify-start", s),
21
+ children: i
22
+ }),
23
+ /* @__PURE__ */ n("div", {
24
+ className: e("min-w-0 truncate text-center", c),
25
+ children: a
26
+ }),
27
+ /* @__PURE__ */ n("div", {
28
+ className: e("flex min-w-0 items-center justify-end", l),
29
+ children: o
30
+ })
31
+ ]
32
+ });
33
+ }
8
34
  // src/components/shared/focus_styles.ts
9
- var w = "outline-hidden focus-visible:outline-2 focus-visible:outline-offset-2", T = "focus:outline-hidden focus:ring-2 focus:ring-blue-500 focus:border-transparent", E = "has-[:focus-visible]:outline-hidden has-[:focus-visible]:ring-2 has-[:focus-visible]:ring-offset-2 has-[:focus-visible]:ring-offset-white dark:has-[:focus-visible]:ring-offset-gray-900", D = "has-[:focus-visible]:ring-blue-500", O = "has-[:focus-visible]:ring-red-500", k = "outline-hidden focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-blue-500 dark:focus-visible:outline-blue-400", A = {
35
+ var M = "outline-hidden focus-visible:outline-2 focus-visible:outline-offset-2", N = "focus:outline-hidden focus:ring-2 focus:ring-blue-500 focus:border-transparent", P = "has-[:focus-visible]:outline-hidden has-[:focus-visible]:ring-2 has-[:focus-visible]:ring-offset-2 has-[:focus-visible]:ring-offset-white dark:has-[:focus-visible]:ring-offset-gray-900", F = "has-[:focus-visible]:ring-blue-500", I = "has-[:focus-visible]:ring-red-500", L = "outline-hidden focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-blue-500 dark:focus-visible:outline-blue-400", R = {
10
36
  primary: {
11
37
  solid: "border-transparent bg-blue-600 text-white interactive:hover:bg-blue-700 interactive:active:bg-blue-800",
12
38
  outline: "border-blue-300 bg-transparent text-blue-700 interactive:hover:bg-blue-50 interactive:active:bg-blue-100 dark:border-blue-800 dark:text-blue-400 dark:interactive:hover:bg-blue-950/40 dark:interactive:active:bg-blue-950/60",
13
39
  ghost: "border-transparent bg-transparent text-blue-700 interactive:hover:bg-blue-50 interactive:active:bg-blue-100 dark:text-blue-400 dark:interactive:hover:bg-blue-950/40 dark:interactive:active:bg-blue-950/60",
14
40
  subtle: "border-transparent bg-blue-50 text-blue-700 interactive:hover:bg-blue-100 interactive:active:bg-blue-200 dark:bg-blue-500/10 dark:text-blue-400 dark:interactive:hover:bg-blue-500/20 dark:interactive:active:bg-blue-500/30",
41
+ pressedSolid: "border-transparent bg-blue-800 text-white ring-2 ring-inset ring-white interactive:hover:bg-blue-900 interactive:active:bg-blue-950",
15
42
  focusOutline: "focus-visible:outline-blue-500"
16
43
  },
17
44
  neutral: {
@@ -19,6 +46,7 @@ var w = "outline-hidden focus-visible:outline-2 focus-visible:outline-offset-2",
19
46
  outline: "border-gray-300 bg-transparent text-gray-700 interactive:hover:bg-gray-50 interactive:active:bg-gray-100 dark:border-gray-600 dark:text-gray-300 dark:interactive:hover:bg-gray-800/50 dark:interactive:active:bg-gray-800/80",
20
47
  ghost: "border-transparent bg-transparent text-gray-700 interactive:hover:bg-gray-100 interactive:active:bg-gray-200 dark:text-gray-300 dark:interactive:hover:bg-gray-700/50 dark:interactive:active:bg-gray-700/80",
21
48
  subtle: "border-transparent bg-gray-100 text-gray-700 interactive:hover:bg-gray-200 interactive:active:bg-gray-300 dark:bg-gray-700/50 dark:text-gray-300 dark:interactive:hover:bg-gray-600/50 dark:interactive:active:bg-gray-600/80",
49
+ pressedSolid: "border-transparent bg-gray-400 text-gray-900 ring-2 ring-inset ring-gray-900 interactive:hover:bg-gray-300 interactive:active:bg-gray-200 dark:bg-gray-400 dark:text-gray-900 dark:interactive:hover:bg-gray-300 dark:interactive:active:bg-gray-200",
22
50
  focusOutline: "focus-visible:outline-gray-500 dark:focus-visible:outline-gray-400"
23
51
  },
24
52
  danger: {
@@ -26,6 +54,7 @@ var w = "outline-hidden focus-visible:outline-2 focus-visible:outline-offset-2",
26
54
  outline: "border-red-300 bg-transparent text-red-700 interactive:hover:bg-red-50 interactive:active:bg-red-100 dark:border-red-800 dark:text-red-400 dark:interactive:hover:bg-red-950/40 dark:interactive:active:bg-red-950/60",
27
55
  ghost: "border-transparent bg-transparent text-red-700 interactive:hover:bg-red-50 interactive:active:bg-red-100 dark:text-red-400 dark:interactive:hover:bg-red-950/40 dark:interactive:active:bg-red-950/60",
28
56
  subtle: "border-transparent bg-red-50 text-red-700 interactive:hover:bg-red-100 interactive:active:bg-red-200 dark:bg-red-500/10 dark:text-red-400 dark:interactive:hover:bg-red-500/20 dark:interactive:active:bg-red-500/30",
57
+ pressedSolid: "border-transparent bg-red-800 text-white ring-2 ring-inset ring-white interactive:hover:bg-red-900 interactive:active:bg-red-950",
29
58
  focusOutline: "focus-visible:outline-red-500"
30
59
  },
31
60
  success: {
@@ -33,6 +62,7 @@ var w = "outline-hidden focus-visible:outline-2 focus-visible:outline-offset-2",
33
62
  outline: "border-green-300 bg-transparent text-green-700 interactive:hover:bg-green-50 interactive:active:bg-green-100 dark:border-green-800 dark:text-green-400 dark:interactive:hover:bg-green-950/40 dark:interactive:active:bg-green-950/60",
34
63
  ghost: "border-transparent bg-transparent text-green-700 interactive:hover:bg-green-50 interactive:active:bg-green-100 dark:text-green-400 dark:interactive:hover:bg-green-950/40 dark:interactive:active:bg-green-950/60",
35
64
  subtle: "border-transparent bg-green-50 text-green-700 interactive:hover:bg-green-100 interactive:active:bg-green-200 dark:bg-green-500/10 dark:text-green-400 dark:interactive:hover:bg-green-500/20 dark:interactive:active:bg-green-500/30",
65
+ pressedSolid: "border-transparent bg-green-900 text-white ring-2 ring-inset ring-white interactive:hover:bg-green-950 interactive:active:bg-green-950",
36
66
  focusOutline: "focus-visible:outline-green-600"
37
67
  },
38
68
  warning: {
@@ -40,64 +70,88 @@ var w = "outline-hidden focus-visible:outline-2 focus-visible:outline-offset-2",
40
70
  outline: "border-yellow-300 bg-transparent text-yellow-700 interactive:hover:bg-yellow-50 interactive:active:bg-yellow-100 dark:border-yellow-800 dark:text-yellow-400 dark:interactive:hover:bg-yellow-950/40 dark:interactive:active:bg-yellow-950/60",
41
71
  ghost: "border-transparent bg-transparent text-yellow-700 interactive:hover:bg-yellow-50 interactive:active:bg-yellow-100 dark:text-yellow-400 dark:interactive:hover:bg-yellow-950/40 dark:interactive:active:bg-yellow-950/60",
42
72
  subtle: "border-transparent bg-yellow-50 text-yellow-700 interactive:hover:bg-yellow-100 interactive:active:bg-yellow-200 dark:bg-yellow-500/10 dark:text-yellow-400 dark:interactive:hover:bg-yellow-500/20 dark:interactive:active:bg-yellow-500/30",
73
+ pressedSolid: "border-transparent bg-yellow-900 text-white ring-2 ring-inset ring-white interactive:hover:bg-yellow-950 interactive:active:bg-yellow-950",
43
74
  focusOutline: "focus-visible:outline-yellow-700 dark:focus-visible:outline-yellow-500"
44
75
  }
45
- }, j = "inline-flex items-center justify-center disabled:opacity-50 disabled:cursor-not-allowed aria-disabled:opacity-50 aria-disabled:cursor-not-allowed", M = `cursor-pointer transition-[color,background-color,border-color,transform] duration-200 interactive:active:duration-75 ms-button-press ${w}`, N = {
76
+ }, z = "inline-flex items-center justify-center disabled:opacity-50 disabled:cursor-not-allowed aria-disabled:opacity-50 aria-disabled:cursor-not-allowed", B = `cursor-pointer transition-[color,background-color,border-color,transform] duration-200 interactive:active:duration-75 ms-button-press ${M}`;
77
+ function V(e, t, n) {
78
+ let r = R[e];
79
+ return n ? r.pressedSolid : r[t];
80
+ }
81
+ // src/components/shared/radius.ts
82
+ var H = {
46
83
  none: "rounded-none",
47
84
  sm: "rounded-sm",
48
85
  md: "rounded-md",
49
86
  lg: "rounded-lg",
50
87
  xl: "rounded-xl",
51
88
  full: "rounded-full"
52
- }, P = {
53
- ...N,
54
- full: N.lg
55
- }, F = {
89
+ }, U = {
90
+ ...H,
91
+ full: H.lg
92
+ }, W = {
56
93
  xs: "h-6 w-6 text-xs",
57
94
  sm: "h-8 w-8 text-sm",
58
95
  md: "h-10 w-10 text-base",
59
96
  lg: "h-12 w-12 text-xl"
60
- }, I = new Intl.Segmenter(void 0, { granularity: "grapheme" });
61
- function L(e) {
97
+ }, G = new Intl.Segmenter(void 0, { granularity: "grapheme" });
98
+ function ee(e) {
62
99
  let t = e.trim();
63
100
  if (t.length === 0) return "";
64
- let [n] = I.segment(t);
101
+ let [n] = G.segment(t);
65
102
  return n.segment.toUpperCase();
66
103
  }
67
- function ee({ name: t, src: n, size: r = "sm", color: i = "primary", radius: a = "full", unstyled: o = !1, className: s }) {
68
- let [c, l] = d(null), u = n !== void 0 && n !== c, f = t.trim().length > 0, m = u ? /* @__PURE__ */ p("img", {
69
- src: n,
104
+ function te({ name: t, src: r, size: i = "sm", color: a = "primary", radius: o = "full", unstyled: s = !1, className: c }) {
105
+ let [l, u] = m(null), d = r !== void 0 && r !== l, f = t.trim().length > 0, p = d ? /* @__PURE__ */ n("img", {
106
+ src: r,
70
107
  alt: "",
71
- onError: () => l(n ?? null),
108
+ onError: () => u(r ?? null),
72
109
  className: "h-full w-full object-cover"
73
- }) : /* @__PURE__ */ p("span", {
110
+ }) : /* @__PURE__ */ n("span", {
74
111
  "aria-hidden": "true",
75
- children: L(t)
112
+ children: ee(t)
76
113
  });
77
- return /* @__PURE__ */ p("span", {
114
+ return /* @__PURE__ */ n("span", {
78
115
  role: f ? "img" : void 0,
79
116
  "aria-label": f ? t : void 0,
80
117
  "aria-hidden": !f || void 0,
81
- className: e("inline-flex flex-shrink-0 items-center justify-center overflow-hidden", F[r], !o && N[a], !o && !u && ["border font-semibold", A[i].solid], s),
82
- children: m
118
+ className: e("inline-flex flex-shrink-0 items-center justify-center overflow-hidden", W[i], !s && H[o], !s && !d && ["border font-semibold", R[a].solid], c),
119
+ children: p
83
120
  });
84
121
  }
85
122
  // src/components/badge/badge.tsx
86
- var R = {
123
+ var ne = {
87
124
  xs: "px-1.5 py-0.5 text-xs",
88
125
  sm: "px-2.5 py-1 text-sm",
89
126
  md: "px-3 py-1 text-base",
90
127
  lg: "px-3.5 py-1.5 text-lg"
91
- }, z = ({ children: t, color: n = "primary", variant: r = "subtle", size: i = "sm", radius: a = "md", unstyled: o = !1, className: s, ...c }) => /* @__PURE__ */ p("span", {
92
- className: e("inline-flex items-center", !o && [
128
+ }, re = ({ children: t, color: r = "primary", variant: i = "subtle", size: a = "sm", radius: o = "md", unstyled: s = !1, className: c, ...l }) => /* @__PURE__ */ n("span", {
129
+ className: e("inline-flex items-center", !s && [
93
130
  "gap-1 border",
94
- N[a],
95
- R[i],
96
- A[n][r]
97
- ], s),
98
- ...c,
131
+ H[o],
132
+ ne[a],
133
+ R[r][i]
134
+ ], c),
135
+ ...l,
99
136
  children: t
100
- }), B = n({
137
+ }), ie = {
138
+ xs: "px-2 py-1 text-xs",
139
+ sm: "px-3 py-1.5 text-sm",
140
+ md: "px-4 py-2 text-sm",
141
+ lg: "px-4 py-3 text-base"
142
+ };
143
+ function K(t = {}) {
144
+ let { variant: n = "solid", color: r = "primary", size: i = "md", radius: a = "md", fullWidth: o = !1, pressed: s = !1, unstyled: c = !1, className: l } = t;
145
+ return e(z, !c && [
146
+ B,
147
+ "gap-2 font-medium border",
148
+ H[a],
149
+ ie[i],
150
+ V(r, n, s),
151
+ R[r].focusOutline
152
+ ], o && "w-full", l);
153
+ }
154
+ var q = a({
101
155
  close: "Close",
102
156
  confirm: "Confirm",
103
157
  cancel: "Cancel",
@@ -108,6 +162,7 @@ var R = {
108
162
  required: "required",
109
163
  copied: "Copied",
110
164
  loading: "Loading",
165
+ copy: "Copy",
111
166
  charactersRemaining: (e) => `${e} ${e === 1 ? "character" : "characters"} remaining`,
112
167
  currentTheme: (e) => `Current theme: ${e}`,
113
168
  overflowCount: (e) => `+${e} more`,
@@ -115,170 +170,165 @@ var R = {
115
170
  maxSelectedHint: (e) => `You can select up to ${e} items`
116
171
  });
117
172
  // src/components/ui_provider/use_labels.ts
118
- function V() {
119
- return a(B);
173
+ function J() {
174
+ return c(q);
120
175
  }
121
176
  // src/components/button/button.tsx
122
- var H = {
123
- xs: "px-2 py-1 text-xs",
124
- sm: "px-3 py-1.5 text-sm",
125
- md: "px-4 py-2 text-sm",
126
- lg: "px-4 py-3 text-base"
127
- }, te = {
177
+ var ae = {
128
178
  xs: "w-3.5 h-3.5",
129
179
  sm: "w-4 h-4",
130
180
  md: "w-4 h-4",
131
181
  lg: "w-5 h-5"
132
182
  };
133
- function U(t) {
134
- let { unstyled: n = !1, variant: r = "solid", color: i = "primary", size: a = "md", radius: o = "md", children: s, className: c, fullWidth: l = !1, loading: u = !1, startIcon: d, endIcon: f, disabled: h, onClick: g, "aria-label": _, ...v } = t, y = V(), b = _ !== void 0, x = u && b ? `${_} ${y.loading}` : _, S = A[i], C = te[a], w = (e) => {
135
- u ? e.preventDefault() : g?.(e);
183
+ function Y(t) {
184
+ let { unstyled: i = !1, variant: a = "solid", color: o = "primary", size: s = "md", radius: c = "md", children: l, className: u, fullWidth: d = !1, loading: f = !1, pressed: p, startIcon: m, endIcon: h, disabled: g, onClick: _, "aria-label": v, ...y } = t, b = J(), x = v !== void 0, S = f && x ? `${v} ${b.loading}` : v, C = ae[s], w = (e) => {
185
+ f ? e.preventDefault() : _?.(e);
136
186
  };
137
- return /* @__PURE__ */ m("button", {
187
+ return /* @__PURE__ */ r("button", {
138
188
  type: "button",
139
- className: e(j, !n && [
140
- M,
141
- "gap-2 font-medium border",
142
- N[o],
143
- H[a],
144
- S[r],
145
- S.focusOutline
146
- ], l && "w-full", c),
147
- disabled: h,
148
- "aria-disabled": u && !h || void 0,
149
- "aria-busy": u || void 0,
150
- "aria-label": x,
151
- ...v,
189
+ className: K({
190
+ variant: a,
191
+ color: o,
192
+ size: s,
193
+ radius: c,
194
+ fullWidth: d,
195
+ pressed: p,
196
+ unstyled: i,
197
+ className: u
198
+ }),
199
+ disabled: g,
200
+ "aria-disabled": f && !g || void 0,
201
+ "aria-busy": f || void 0,
202
+ "aria-pressed": p,
203
+ "aria-label": S,
204
+ ...y,
152
205
  onClick: w,
153
206
  children: [
154
- u && /* @__PURE__ */ p("span", {
207
+ f && /* @__PURE__ */ n("span", {
155
208
  className: e("i-svg-spinners-3-dots-fade", C),
156
209
  "aria-hidden": "true"
157
210
  }),
158
- !u && d && /* @__PURE__ */ p("span", {
159
- className: e(d, C),
211
+ !f && m && /* @__PURE__ */ n("span", {
212
+ className: e(m, C),
160
213
  "aria-hidden": "true"
161
214
  }),
162
- s,
163
- u && !b && /* @__PURE__ */ p("span", {
215
+ l,
216
+ f && !x && /* @__PURE__ */ n("span", {
164
217
  className: "sr-only",
165
- children: y.loading
218
+ children: b.loading
166
219
  }),
167
- !u && f && /* @__PURE__ */ p("span", {
168
- className: e(f, C),
220
+ !f && h && /* @__PURE__ */ n("span", {
221
+ className: e(h, C),
169
222
  "aria-hidden": "true"
170
223
  })
171
224
  ]
172
225
  });
173
226
  }
174
227
  // src/components/card/card_header.tsx
175
- var ne = {
228
+ var oe = {
176
229
  2: "h2",
177
230
  3: "h3",
178
231
  4: "h4"
179
232
  };
180
- function re({ title: e, titleId: t, level: n, description: r, actions: i }) {
181
- let a = ne[n];
182
- return /* @__PURE__ */ m("div", {
233
+ function X({ title: e, titleId: t, level: i, description: a, actions: o }) {
234
+ let s = oe[i];
235
+ return /* @__PURE__ */ r("div", {
183
236
  className: "mb-4",
184
- children: [/* @__PURE__ */ m("div", {
237
+ children: [/* @__PURE__ */ r("div", {
185
238
  className: "flex items-center justify-between gap-4",
186
- children: [/* @__PURE__ */ p(a, {
239
+ children: [/* @__PURE__ */ n(s, {
187
240
  id: t,
188
241
  className: "text-lg font-medium text-gray-900 dark:text-gray-100",
189
242
  children: e
190
- }), i]
191
- }), r && /* @__PURE__ */ p("p", {
243
+ }), o]
244
+ }), a && /* @__PURE__ */ n("p", {
192
245
  className: "mt-1 text-sm text-gray-500 dark:text-gray-400",
193
- children: r
246
+ children: a
194
247
  })]
195
248
  });
196
249
  }
197
- // src/components/shared/surface_tokens.ts
198
- var ie = "border-gray-300 dark:border-gray-600", W = "bg-white dark:bg-gray-800", ae = "border-gray-200 dark:border-gray-700", G = "[scrollbar-color:theme(colors.gray.300)_transparent] hover:[scrollbar-color:theme(colors.gray.400)_transparent] dark:[scrollbar-color:theme(colors.gray.600)_transparent] dark:hover:[scrollbar-color:theme(colors.gray.500)_transparent]", K = `[scrollbar-width:thin] ${G}`;
199
- `${G}`;
200
250
  // src/components/card/card.tsx
201
- var q = {
251
+ var se = {
202
252
  none: "",
203
253
  sm: "p-4",
204
254
  md: "p-6",
205
255
  lg: "p-8"
206
256
  };
207
- function oe({ children: t, title: n, description: r, actions: i, headingLevel: a = 2, padding: o = "md", radius: c = "lg", unstyled: l = !1, className: u }) {
208
- let d = s(), f = !!n;
209
- return /* @__PURE__ */ m("div", {
210
- role: f ? "region" : void 0,
211
- "aria-labelledby": f ? d : void 0,
212
- className: e(!l && [
257
+ function ce({ children: t, title: i, description: a, actions: o, headingLevel: s = 2, padding: c = "md", radius: l = "lg", unstyled: d = !1, className: f }) {
258
+ let p = u(), m = !!i;
259
+ return /* @__PURE__ */ r("div", {
260
+ role: m ? "region" : void 0,
261
+ "aria-labelledby": m ? p : void 0,
262
+ className: e(!d && [
213
263
  "border",
214
264
  "bg-white dark:bg-gray-800",
215
265
  "border-gray-200 dark:border-gray-700",
216
- N[c],
217
- q[o]
218
- ], u),
219
- children: [f && /* @__PURE__ */ p(re, {
220
- title: n,
221
- titleId: d,
222
- level: a,
223
- description: r,
224
- actions: i
266
+ H[l],
267
+ se[c]
268
+ ], f),
269
+ children: [m && /* @__PURE__ */ n(X, {
270
+ title: i,
271
+ titleId: p,
272
+ level: s,
273
+ description: a,
274
+ actions: o
225
275
  }), t]
226
276
  });
227
277
  }
228
278
  // src/components/character_count/character_count.tsx
229
- var se = "text-xs text-gray-500 dark:text-gray-400 mt-1 text-right", J = .1;
230
- function ce(e, t) {
279
+ var le = "text-xs text-gray-500 dark:text-gray-400 mt-1 text-right", ue = .1;
280
+ function de(e, t) {
231
281
  if (t === void 0) return "ok";
232
282
  let n = t - e;
233
- return n <= 0 ? "empty" : n <= Math.max(1, Math.ceil(t * J)) ? "low" : "ok";
283
+ return n <= 0 ? "empty" : n <= Math.max(1, Math.ceil(t * ue)) ? "low" : "ok";
234
284
  }
235
- function Y(e, t) {
285
+ function fe(e, t) {
236
286
  return t ? "" : e === "overLimit" ? "text-red-600 dark:text-red-400" : e === "atLimit" ? "text-amber-700 dark:text-amber-400" : "";
237
287
  }
238
- function le({ current: t, min: n, max: r, showMin: i, showMax: a, unstyled: o = !1, id: s, className: c }) {
239
- let l = V(), u = ce(t, r), [h, g] = d({
240
- zone: u,
288
+ function Z({ current: i, min: a, max: o, showMin: s, showMax: c, unstyled: l = !1, id: u, className: d }) {
289
+ let f = J(), p = de(i, o), [h, g] = m({
290
+ zone: p,
241
291
  message: ""
242
292
  });
243
- if (h.zone !== u) {
244
- let e = Math.max(0, (r ?? 0) - t);
293
+ if (h.zone !== p) {
294
+ let e = Math.max(0, (o ?? 0) - i);
245
295
  g({
246
- zone: u,
247
- message: u === "ok" ? "" : l.charactersRemaining(e)
296
+ zone: p,
297
+ message: p === "ok" ? "" : f.charactersRemaining(e)
248
298
  });
249
299
  }
250
- let _ = i === !0 || a === !0, v = n !== void 0 && t <= n ? "atLimit" : "ok", y = r !== void 0 && t > r ? "overLimit" : r !== void 0 && t >= r ? "atLimit" : "ok", b = _ ? `${t}/${n} min` : `${t} (min ${n})`, x = _ ? `${t}/${r} max` : `${t}/${r}`;
251
- return /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ m("div", {
252
- id: s,
253
- className: e(!o && se, c),
300
+ let _ = s === !0 || c === !0, v = a !== void 0 && i <= a ? "atLimit" : "ok", y = o !== void 0 && i > o ? "overLimit" : o !== void 0 && i >= o ? "atLimit" : "ok", b = _ ? `${i}/${a} min` : `${i} (min ${a})`, x = _ ? `${i}/${o} max` : `${i}/${o}`;
301
+ return /* @__PURE__ */ r(t, { children: [/* @__PURE__ */ r("div", {
302
+ id: u,
303
+ className: e(!l && le, d),
254
304
  children: [
255
- i && n !== void 0 && /* @__PURE__ */ p("span", {
256
- className: Y(v, o),
305
+ s && a !== void 0 && /* @__PURE__ */ n("span", {
306
+ className: fe(v, l),
257
307
  children: b
258
308
  }),
259
- i && a && " · ",
260
- a && r !== void 0 && /* @__PURE__ */ p("span", {
261
- className: Y(y, o),
309
+ s && c && " · ",
310
+ c && o !== void 0 && /* @__PURE__ */ n("span", {
311
+ className: fe(y, l),
262
312
  children: x
263
313
  }),
264
- !i && !a && r !== void 0 && /* @__PURE__ */ p("span", {
265
- className: Y(y, o),
314
+ !s && !c && o !== void 0 && /* @__PURE__ */ n("span", {
315
+ className: fe(y, l),
266
316
  children: x
267
317
  }),
268
- !i && !a && n !== void 0 && r === void 0 && /* @__PURE__ */ p("span", {
269
- className: Y(v, o),
318
+ !s && !c && a !== void 0 && o === void 0 && /* @__PURE__ */ n("span", {
319
+ className: fe(v, l),
270
320
  children: b
271
321
  })
272
322
  ]
273
- }), /* @__PURE__ */ p("span", {
323
+ }), /* @__PURE__ */ n("span", {
274
324
  "aria-live": "polite",
275
325
  className: "sr-only",
276
326
  children: h.message
277
327
  })] });
278
328
  }
279
329
  // src/components/shared/checkmark_icon.tsx
280
- function ue() {
281
- return /* @__PURE__ */ p("svg", {
330
+ function pe() {
331
+ return /* @__PURE__ */ n("svg", {
282
332
  className: "h-3 w-3 text-white",
283
333
  viewBox: "0 0 12 12",
284
334
  fill: "none",
@@ -286,19 +336,19 @@ function ue() {
286
336
  strokeWidth: "2.5",
287
337
  strokeLinecap: "round",
288
338
  strokeLinejoin: "round",
289
- children: /* @__PURE__ */ p("polyline", { points: "2 6 5 9 10 3" })
339
+ children: /* @__PURE__ */ n("polyline", { points: "2 6 5 9 10 3" })
290
340
  });
291
341
  }
292
342
  // src/components/shared/dash_icon.tsx
293
- function de() {
294
- return /* @__PURE__ */ p("svg", {
343
+ function me() {
344
+ return /* @__PURE__ */ n("svg", {
295
345
  className: "h-3 w-3 text-white",
296
346
  viewBox: "0 0 12 12",
297
347
  fill: "none",
298
348
  stroke: "currentColor",
299
349
  strokeWidth: "2.5",
300
350
  strokeLinecap: "round",
301
- children: /* @__PURE__ */ p("line", {
351
+ children: /* @__PURE__ */ n("line", {
302
352
  x1: "2.5",
303
353
  y1: "6",
304
354
  x2: "9.5",
@@ -306,63 +356,63 @@ function de() {
306
356
  })
307
357
  });
308
358
  }
309
- var fe = `w-full border ${ie} ${W} text-gray-900 dark:text-gray-100 placeholder-gray-500 dark:placeholder-gray-400 ${T} transition-all duration-200 disabled:opacity-50 disabled:cursor-not-allowed`, pe = "text-sm font-medium text-gray-700 dark:text-gray-300", me = "text-red-500 dark:text-red-400 ml-1", he = "text-xs text-gray-600 dark:text-gray-400", ge = "text-xs text-red-600 dark:text-red-400", _e = "border-red-500 dark:border-red-400", ve = ({ id: t, description: n, className: r }) => n ? typeof n == "string" ? /* @__PURE__ */ p("p", {
359
+ var he = `w-full border ${w} ${T} text-gray-900 dark:text-gray-100 placeholder-gray-500 dark:placeholder-gray-400 ${N} transition-all duration-200 disabled:opacity-50 disabled:cursor-not-allowed`, ge = "text-sm font-medium text-gray-700 dark:text-gray-300", _e = "text-red-500 dark:text-red-400 ml-1", ve = "text-xs text-gray-600 dark:text-gray-400", ye = "text-xs text-red-600 dark:text-red-400", be = "border-red-500 dark:border-red-400", xe = ({ id: t, description: r, className: i }) => r ? typeof r == "string" ? /* @__PURE__ */ n("p", {
310
360
  id: t,
311
- className: e(he, r),
312
- children: n
313
- }) : /* @__PURE__ */ p("span", {
361
+ className: e(ve, i),
362
+ children: r
363
+ }) : /* @__PURE__ */ n("span", {
314
364
  id: t,
315
- className: e(he, "block", r),
316
- children: n
317
- }) : null, ye = n(!0);
318
- function be() {
319
- return a(ye);
365
+ className: e(ve, "block", i),
366
+ children: r
367
+ }) : null, Se = a(!0);
368
+ function Ce() {
369
+ return c(Se);
320
370
  }
321
371
  // src/components/shared/field_error.tsx
322
- var X = ({ id: t, error: n, className: r }) => {
323
- let i = be();
324
- return n ? /* @__PURE__ */ p("p", {
372
+ var we = ({ id: t, error: r, className: i }) => {
373
+ let a = Ce();
374
+ return r ? /* @__PURE__ */ n("p", {
325
375
  id: t,
326
- className: e(ge, r),
327
- role: i ? "alert" : void 0,
328
- children: n
376
+ className: e(ye, i),
377
+ role: a ? "alert" : void 0,
378
+ children: r
329
379
  }) : null;
330
380
  };
331
381
  // src/components/shared/join_ids.ts
332
- function Z(...e) {
382
+ function Q(...e) {
333
383
  return e.filter(Boolean).join(" ") || void 0;
334
384
  }
335
385
  // src/components/shared/option_card_styles.ts
336
- function xe(t) {
386
+ function Te(t) {
337
387
  let { isSelected: n, isError: r, isDisabled: i, radius: a, unstyled: o } = t;
338
- return e("relative flex cursor-pointer items-start gap-3 transition-colors duration-150", E, r ? O : D, !o && [
339
- N[a],
388
+ return e("relative flex cursor-pointer items-start gap-3 transition-colors duration-150", P, r ? I : F, !o && [
389
+ H[a],
340
390
  "border px-3 py-2.5",
341
391
  n ? r ? e("border-red-500 dark:border-red-400", "bg-red-50 dark:bg-red-950/20") : "border-blue-500 bg-blue-50 dark:border-blue-500 dark:bg-blue-950/25" : r ? "border-red-300 bg-white dark:border-red-800/50 dark:bg-gray-800/50" : e("border-gray-200 dark:border-gray-700", "bg-gray-50 hover:border-gray-300 hover:bg-white dark:bg-gray-800/50 dark:hover:border-gray-600 dark:hover:bg-gray-800")
342
392
  ], i && "cursor-not-allowed opacity-50");
343
393
  }
344
- function Se(e) {
394
+ function Ee(e) {
345
395
  let { isSelected: t, isError: n } = e;
346
- return t ? n ? _e : "border-blue-600 dark:border-blue-500" : n ? "border-red-400 dark:border-red-600" : ie;
396
+ return t ? n ? be : "border-blue-600 dark:border-blue-500" : n ? "border-red-400 dark:border-red-600" : w;
347
397
  }
348
398
  // src/components/shared/required_mark.tsx
349
- function Q() {
350
- return /* @__PURE__ */ p("span", {
351
- className: me,
399
+ function De() {
400
+ return /* @__PURE__ */ n("span", {
401
+ className: _e,
352
402
  "aria-hidden": "true",
353
403
  children: "*"
354
404
  });
355
405
  }
356
406
  // src/components/shared/use_controlled_state.ts
357
- function Ce(e, t) {
358
- let [n, r] = d(t), a = e !== void 0, o = i((e) => {
359
- a || r(e);
360
- }, [a]);
361
- return [a ? e : n, o];
407
+ function Oe(e, t) {
408
+ let [n, r] = m(t), i = e !== void 0, a = s((e) => {
409
+ i || r(e);
410
+ }, [i]);
411
+ return [i ? e : n, a];
362
412
  }
363
413
  // src/components/shared/use_field_ids.ts
364
414
  function $(e) {
365
- let t = s(), n = e ?? t;
415
+ let t = u(), n = e ?? t;
366
416
  return {
367
417
  fieldId: n,
368
418
  errorId: `${n}-error`,
@@ -372,9 +422,9 @@ function $(e) {
372
422
  };
373
423
  }
374
424
  // src/components/shared/use_warn_unnamed.ts
375
- var we = "needs an accessible name. Provide a `label`, `aria-label` or `aria-labelledby` prop.";
376
- function Te(e, t, n = we) {
377
- o(() => {
425
+ var ke = "needs an accessible name. Provide a `label`, `aria-label` or `aria-labelledby` prop.";
426
+ function Ae(e, t, n = ke) {
427
+ l(() => {
378
428
  process.env.NODE_ENV === "production" || t || console.warn(`${e}: ${n}`);
379
429
  }, [
380
430
  e,
@@ -383,114 +433,114 @@ function Te(e, t, n = we) {
383
433
  ]);
384
434
  }
385
435
  // src/lib/merge_refs.ts
386
- function Ee(...e) {
436
+ function je(...e) {
387
437
  return (t) => {
388
438
  for (let n of e) typeof n == "function" ? n(t) : n && (n.current = t);
389
439
  };
390
440
  }
391
441
  // src/components/checkbox/checkbox.tsx
392
- function De(e, t, n) {
393
- return e === void 0 ? null : typeof e == "string" ? /* @__PURE__ */ m("span", {
394
- className: t,
395
- children: [e, n && /* @__PURE__ */ p(Q, {})]
396
- }) : /* @__PURE__ */ m(f, { children: [e, n && /* @__PURE__ */ p(Q, {})] });
397
- }
398
- function Oe({ label: t, indeterminate: n = !1, description: r, error: i, radius: a = "sm", unstyled: s = !1, fullWidth: c = !1, variant: d = "inline", className: f, wrapperClassName: h, checked: g, defaultChecked: _ = !1, onChange: v, id: y, "aria-describedby": b, "aria-label": x, "aria-labelledby": S, ref: C, ...w }) {
399
- let { fieldId: T, errorId: E, descriptionId: D } = $(y), [O, k] = Ce(g, _), A = u(null), j = d === "card", M = O || n, P = Z(b, !!r && D, i && E);
400
- Te("Checkbox", !!t || !!x?.trim() || !!S?.trim());
401
- let F = l(() => Ee(A, C), [C]);
402
- o(() => {
403
- A.current && (A.current.indeterminate = n);
442
+ function Me(e, i, a) {
443
+ return e === void 0 ? null : typeof e == "string" ? /* @__PURE__ */ r("span", {
444
+ className: i,
445
+ children: [e, a && /* @__PURE__ */ n(De, {})]
446
+ }) : /* @__PURE__ */ r(t, { children: [e, a && /* @__PURE__ */ n(De, {})] });
447
+ }
448
+ function Ne({ label: t, indeterminate: i = !1, description: a, error: o, radius: s = "sm", unstyled: c = !1, fullWidth: u = !1, variant: d = "inline", className: m, wrapperClassName: h, checked: g, defaultChecked: _ = !1, onChange: v, id: y, "aria-describedby": b, "aria-label": x, "aria-labelledby": S, ref: C, ...w }) {
449
+ let { fieldId: T, errorId: E, descriptionId: D } = $(y), [O, k] = Oe(g, _), A = p(null), j = d === "card", M = O || i, N = Q(b, !!a && D, o && E);
450
+ Ae("Checkbox", !!t || !!x?.trim() || !!S?.trim());
451
+ let P = f(() => je(A, C), [C]);
452
+ l(() => {
453
+ A.current && (A.current.indeterminate = i);
404
454
  });
405
- let I = (e) => {
406
- e.target.indeterminate = n, k(e.target.checked), v?.(e);
407
- }, L = j ? xe({
455
+ let F = (e) => {
456
+ e.target.indeterminate = i, k(e.target.checked), v?.(e);
457
+ }, I = j ? Te({
408
458
  isSelected: M,
409
- isError: !!i,
459
+ isError: !!o,
410
460
  isDisabled: w.disabled === !0,
411
- radius: a,
412
- unstyled: s
413
- }) : e("flex items-start gap-3 cursor-pointer", w.disabled && "cursor-not-allowed opacity-50"), ee = j ? e("select-none text-sm font-medium", M ? i ? "text-red-700 dark:text-red-300" : "text-blue-700 dark:text-blue-300" : "text-gray-700 dark:text-gray-300") : e(pe, "select-none"), R = e("relative shrink-0", N[a], !j && ["has-[:focus-visible]:outline-hidden has-[:focus-visible]:ring-2 has-[:focus-visible]:ring-offset-2 has-[:focus-visible]:ring-offset-white dark:has-[:focus-visible]:ring-offset-gray-900", i ? "has-[:focus-visible]:ring-red-500" : "has-[:focus-visible]:ring-blue-500"]), z = De(t, ee, w.required === !0);
414
- return /* @__PURE__ */ m("div", {
415
- className: e(c ? "w-full" : "w-fit", h),
461
+ radius: s,
462
+ unstyled: c
463
+ }) : e("flex items-start gap-3 cursor-pointer", w.disabled && "cursor-not-allowed opacity-50"), L = j ? e("select-none text-sm font-medium", M ? o ? "text-red-700 dark:text-red-300" : "text-blue-700 dark:text-blue-300" : "text-gray-700 dark:text-gray-300") : e(ge, "select-none"), R = e("relative shrink-0", H[s], !j && ["has-[:focus-visible]:outline-hidden has-[:focus-visible]:ring-2 has-[:focus-visible]:ring-offset-2 has-[:focus-visible]:ring-offset-white dark:has-[:focus-visible]:ring-offset-gray-900", o ? "has-[:focus-visible]:ring-red-500" : "has-[:focus-visible]:ring-blue-500"]), z = Me(t, L, w.required === !0);
464
+ return /* @__PURE__ */ r("div", {
465
+ className: e(u ? "w-full" : "w-fit", h),
416
466
  children: [
417
- /* @__PURE__ */ m("label", {
467
+ /* @__PURE__ */ r("label", {
418
468
  htmlFor: T,
419
- className: L,
420
- children: [/* @__PURE__ */ m("span", {
469
+ className: I,
470
+ children: [/* @__PURE__ */ r("span", {
421
471
  className: R,
422
- children: [/* @__PURE__ */ p("input", {
472
+ children: [/* @__PURE__ */ n("input", {
423
473
  type: "checkbox",
424
- ref: F,
474
+ ref: P,
425
475
  id: T,
426
476
  className: "sr-only",
427
477
  checked: O,
428
- onChange: I,
429
- "aria-invalid": !!i,
430
- "aria-describedby": P,
478
+ onChange: F,
479
+ "aria-invalid": !!o,
480
+ "aria-describedby": N,
431
481
  "aria-label": x,
432
482
  "aria-labelledby": S,
433
483
  ...w
434
- }), /* @__PURE__ */ p("span", {
435
- className: e("flex h-5 w-5 items-center justify-center transition-all duration-200", !s && [
436
- N[a],
484
+ }), /* @__PURE__ */ n("span", {
485
+ className: e("flex h-5 w-5 items-center justify-center transition-all duration-200", !c && [
486
+ H[s],
437
487
  "border-2",
438
488
  M ? e("border-blue-600 dark:border-blue-500", "bg-blue-600 dark:bg-blue-500") : e("border-gray-300 dark:border-gray-600", "bg-white dark:bg-gray-800"),
439
- i && "border-red-500 dark:border-red-400"
440
- ], f),
489
+ o && "border-red-500 dark:border-red-400"
490
+ ], m),
441
491
  "aria-hidden": !0,
442
- children: n ? /* @__PURE__ */ p(de, {}) : O && /* @__PURE__ */ p(ue, {})
492
+ children: i ? /* @__PURE__ */ n(me, {}) : O && /* @__PURE__ */ n(pe, {})
443
493
  })]
444
- }), j ? /* @__PURE__ */ m("span", {
494
+ }), j ? /* @__PURE__ */ r("span", {
445
495
  className: "flex min-w-0 flex-col",
446
- children: [z, r && /* @__PURE__ */ p("span", {
496
+ children: [z, a && /* @__PURE__ */ n("span", {
447
497
  id: D,
448
498
  className: e("text-xs text-gray-600 dark:text-gray-400", "mt-0.5"),
449
499
  "aria-hidden": "true",
450
- children: r
500
+ children: a
451
501
  })]
452
502
  }) : z]
453
503
  }),
454
- !j && /* @__PURE__ */ p(ve, {
504
+ !j && /* @__PURE__ */ n(xe, {
455
505
  id: D,
456
- description: r,
506
+ description: a,
457
507
  className: "mt-1 ml-8"
458
508
  }),
459
- /* @__PURE__ */ p(X, {
509
+ /* @__PURE__ */ n(we, {
460
510
  id: E,
461
- error: i,
511
+ error: o,
462
512
  className: j ? "mt-1" : "mt-1 ml-8"
463
513
  })
464
514
  ]
465
515
  });
466
516
  }
467
517
  // src/components/shared/option_row.tsx
468
- function ke({ item: t, htmlFor: n, descriptionId: r, orientation: i, isSelected: a, isDisabled: o, isError: s, radius: c, unstyled: l, className: u, control: d, indicator: f }) {
469
- return /* @__PURE__ */ m("label", {
470
- htmlFor: n,
471
- className: e(xe({
472
- isSelected: a,
473
- isError: s,
474
- isDisabled: o,
475
- radius: c,
476
- unstyled: l
477
- }), i === "horizontal" && "flex-1", u),
518
+ function Pe({ item: t, htmlFor: i, descriptionId: a, orientation: o, isSelected: s, isDisabled: c, isError: l, radius: u, unstyled: d, className: f, control: p, indicator: m }) {
519
+ return /* @__PURE__ */ r("label", {
520
+ htmlFor: i,
521
+ className: e(Te({
522
+ isSelected: s,
523
+ isError: l,
524
+ isDisabled: c,
525
+ radius: u,
526
+ unstyled: d
527
+ }), o === "horizontal" && "flex-1", f),
478
528
  children: [
479
- d,
480
- f,
481
- /* @__PURE__ */ m("span", {
529
+ p,
530
+ m,
531
+ /* @__PURE__ */ r("span", {
482
532
  className: "flex min-w-0 flex-col",
483
- children: [/* @__PURE__ */ m("span", {
533
+ children: [/* @__PURE__ */ r("span", {
484
534
  className: "flex items-center gap-1.5",
485
- children: [t.icon && /* @__PURE__ */ p("span", {
486
- className: e(t.icon, "h-4 w-4 shrink-0", a ? s ? "text-red-600 dark:text-red-400" : "text-blue-600 dark:text-blue-400" : "text-gray-500 dark:text-gray-400"),
535
+ children: [t.icon && /* @__PURE__ */ n("span", {
536
+ className: e(t.icon, "h-4 w-4 shrink-0", s ? l ? "text-red-600 dark:text-red-400" : "text-blue-600 dark:text-blue-400" : "text-gray-500 dark:text-gray-400"),
487
537
  "aria-hidden": !0
488
- }), /* @__PURE__ */ p("span", {
489
- className: e("select-none text-sm font-medium", a ? s ? "text-red-700 dark:text-red-300" : "text-blue-700 dark:text-blue-300" : "text-gray-700 dark:text-gray-300"),
538
+ }), /* @__PURE__ */ n("span", {
539
+ className: e("select-none text-sm font-medium", s ? l ? "text-red-700 dark:text-red-300" : "text-blue-700 dark:text-blue-300" : "text-gray-700 dark:text-gray-300"),
490
540
  children: t.label
491
541
  })]
492
- }), t.description && /* @__PURE__ */ p("span", {
493
- id: r,
542
+ }), t.description && /* @__PURE__ */ n("span", {
543
+ id: a,
494
544
  className: e("text-xs text-gray-600 dark:text-gray-400", "mt-0.5"),
495
545
  "aria-hidden": "true",
496
546
  children: t.description
@@ -500,96 +550,96 @@ function ke({ item: t, htmlFor: n, descriptionId: r, orientation: i, isSelected:
500
550
  });
501
551
  }
502
552
  // src/components/checkbox_options/checkbox_option_row.tsx
503
- function Ae({ option: t, optionId: n, descriptionId: r, name: i, orientation: a, isSelected: o, isDisabled: s, error: c, radius: l, unstyled: u, className: d, onToggle: f }) {
504
- let m = !!c;
505
- return /* @__PURE__ */ p(ke, {
553
+ function Fe({ option: t, optionId: r, descriptionId: i, name: a, orientation: o, isSelected: s, isDisabled: c, error: l, radius: u, unstyled: d, className: f, onToggle: p }) {
554
+ let m = !!l;
555
+ return /* @__PURE__ */ n(Pe, {
506
556
  item: t,
507
- htmlFor: n,
508
- descriptionId: r,
509
- orientation: a,
510
- isSelected: o,
511
- isDisabled: s,
557
+ htmlFor: r,
558
+ descriptionId: i,
559
+ orientation: o,
560
+ isSelected: s,
561
+ isDisabled: c,
512
562
  isError: m,
513
- radius: l,
514
- unstyled: u,
515
- className: d,
516
- control: /* @__PURE__ */ p("input", {
563
+ radius: u,
564
+ unstyled: d,
565
+ className: f,
566
+ control: /* @__PURE__ */ n("input", {
517
567
  type: "checkbox",
518
- id: n,
519
- name: i,
568
+ id: r,
569
+ name: a,
520
570
  value: t.value,
521
- checked: o,
522
- onChange: () => f(t.value),
523
- disabled: s,
524
- "aria-invalid": c ? !0 : void 0,
525
- "aria-describedby": t.description ? r : void 0,
571
+ checked: s,
572
+ onChange: () => p(t.value),
573
+ disabled: c,
574
+ "aria-invalid": l ? !0 : void 0,
575
+ "aria-describedby": t.description ? i : void 0,
526
576
  className: "sr-only"
527
577
  }),
528
- indicator: /* @__PURE__ */ p("span", {
529
- className: e("mt-0.5 flex h-4 w-4 shrink-0 items-center justify-center border-2 transition-colors duration-150", N.sm, Se({
530
- isSelected: o,
578
+ indicator: /* @__PURE__ */ n("span", {
579
+ className: e("mt-0.5 flex h-4 w-4 shrink-0 items-center justify-center border-2 transition-colors duration-150", H.sm, Ee({
580
+ isSelected: s,
531
581
  isError: m
532
- }), o && (m ? "bg-red-500 dark:bg-red-400" : "bg-blue-600 dark:bg-blue-500")),
582
+ }), s && (m ? "bg-red-500 dark:bg-red-400" : "bg-blue-600 dark:bg-blue-500")),
533
583
  "aria-hidden": !0,
534
- children: o && /* @__PURE__ */ p(ue, {})
584
+ children: s && /* @__PURE__ */ n(pe, {})
535
585
  })
536
586
  });
537
587
  }
538
588
  // src/components/checkbox_options/checkbox_options.tsx
539
- function je(e, t, n) {
589
+ function Ie(e, t, n) {
540
590
  let r = t.includes(n) ? t.filter((e) => e !== n) : [...t, n];
541
591
  return e.map((e) => e.value).filter((e) => r.includes(e));
542
592
  }
543
- function Me({ options: t, orientation: n = "vertical", values: r, defaultValues: i, onChange: a, name: o, label: s, error: c, required: l, requiredLabel: u, disabled: d, radius: h = "lg", unstyled: g = !1, className: _, wrapperClassName: v, id: y, "aria-describedby": b, ...x }) {
544
- let S = V(), { fieldId: C, errorId: w } = $(y), T = o ?? C, [E, D] = Ce(r, i ?? []), O = t.map((e) => typeof e == "string" ? {
593
+ function Le({ options: i, orientation: a = "vertical", values: o, defaultValues: s, onChange: c, name: l, label: u, error: d, required: f, requiredLabel: p, disabled: m, radius: h = "lg", unstyled: g = !1, className: _, wrapperClassName: v, id: y, "aria-describedby": b, ...x }) {
594
+ let S = J(), { fieldId: C, errorId: w } = $(y), T = l ?? C, [E, D] = Oe(o, s ?? []), O = i.map((e) => typeof e == "string" ? {
545
595
  value: e,
546
596
  label: e
547
597
  } : e), k = (e) => {
548
- let t = je(O, E, e);
549
- D(t), a?.(t);
598
+ let t = Ie(O, E, e);
599
+ D(t), c?.(t);
550
600
  };
551
- return /* @__PURE__ */ m("fieldset", {
601
+ return /* @__PURE__ */ r("fieldset", {
552
602
  className: e("m-0 border-0 p-0", v),
553
- disabled: d,
554
- "aria-describedby": Z(b, c && w),
603
+ disabled: m,
604
+ "aria-describedby": Q(b, d && w),
555
605
  ...x,
556
606
  children: [
557
- s && /* @__PURE__ */ m("legend", {
607
+ u && /* @__PURE__ */ r("legend", {
558
608
  className: e("text-sm font-medium text-gray-700 dark:text-gray-300", "mb-2"),
559
- children: [s, l && /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p(Q, {}), /* @__PURE__ */ p("span", {
609
+ children: [u, f && /* @__PURE__ */ r(t, { children: [/* @__PURE__ */ n(De, {}), /* @__PURE__ */ n("span", {
560
610
  className: "sr-only",
561
- children: ` (${u ?? S.required})`
611
+ children: ` (${p ?? S.required})`
562
612
  })] })]
563
613
  }),
564
- /* @__PURE__ */ p("div", {
565
- className: e(n === "horizontal" ? "flex flex-row gap-2" : "flex flex-col gap-2"),
566
- children: O.map((e, t) => /* @__PURE__ */ p(Ae, {
614
+ /* @__PURE__ */ n("div", {
615
+ className: e(a === "horizontal" ? "flex flex-row gap-2" : "flex flex-col gap-2"),
616
+ children: O.map((e, t) => /* @__PURE__ */ n(Fe, {
567
617
  option: e,
568
618
  optionId: `${C}-${t}`,
569
619
  descriptionId: `${C}-${t}-desc`,
570
620
  name: T,
571
- orientation: n,
621
+ orientation: a,
572
622
  isSelected: E.includes(e.value),
573
- isDisabled: d === !0 || e.disabled === !0,
574
- error: c,
623
+ isDisabled: m === !0 || e.disabled === !0,
624
+ error: d,
575
625
  radius: h,
576
626
  unstyled: g,
577
627
  className: _,
578
628
  onToggle: k
579
629
  }, e.value))
580
630
  }),
581
- /* @__PURE__ */ p(X, {
631
+ /* @__PURE__ */ n(we, {
582
632
  id: w,
583
- error: c,
633
+ error: d,
584
634
  className: "mt-2"
585
635
  })
586
636
  ]
587
637
  });
588
638
  }
589
639
  // src/hooks/use_is_client/use_is_client.tsx
590
- var Ne = () => {
591
- let [e, t] = d(!1);
592
- return o(() => {
640
+ var Re = () => {
641
+ let [e, t] = m(!1);
642
+ return l(() => {
593
643
  let e = requestAnimationFrame(() => {
594
644
  t(!0);
595
645
  });
@@ -599,197 +649,201 @@ var Ne = () => {
599
649
  }, []), e;
600
650
  };
601
651
  // src/components/client_only/client_only.tsx
602
- function Pe({ children: e, fallback: t }) {
603
- return Ne() ? /* @__PURE__ */ p(f, { children: e }) : t ?? null;
652
+ function ze({ children: e, fallback: r }) {
653
+ return Re() ? /* @__PURE__ */ n(t, { children: e }) : r ?? null;
604
654
  }
605
655
  // src/components/shared/field.tsx
606
- var Fe = ({ fieldId: t, errorId: n, descriptionId: r, label: i, description: a, error: o, required: s = !1, wrapperClassName: c, children: l }) => /* @__PURE__ */ m("div", {
607
- className: e("w-full", c),
656
+ var Be = ({ fieldId: t, errorId: i, descriptionId: a, label: o, description: s, error: c, required: l = !1, wrapperClassName: u, children: d }) => /* @__PURE__ */ r("div", {
657
+ className: e("w-full", u),
608
658
  children: [
609
- !!i && (typeof i == "string" ? /* @__PURE__ */ m("label", {
659
+ !!o && (typeof o == "string" ? /* @__PURE__ */ r("label", {
610
660
  id: `${t}-label`,
611
661
  className: e("text-sm font-medium text-gray-700 dark:text-gray-300", "block mb-1"),
612
662
  htmlFor: t,
613
- children: [i, s && /* @__PURE__ */ p("span", {
663
+ children: [o, l && /* @__PURE__ */ n("span", {
614
664
  className: "text-red-500 dark:text-red-400 ml-1",
615
665
  "aria-hidden": "true",
616
666
  children: "*"
617
667
  })]
618
- }) : /* @__PURE__ */ m("span", {
668
+ }) : /* @__PURE__ */ r("span", {
619
669
  id: `${t}-label`,
620
- children: [i, s && /* @__PURE__ */ p("span", {
670
+ children: [o, l && /* @__PURE__ */ n("span", {
621
671
  className: "text-red-500 dark:text-red-400 ml-1",
622
672
  "aria-hidden": "true",
623
673
  children: "*"
624
674
  })]
625
675
  })),
626
- l,
627
- r && /* @__PURE__ */ p(ve, {
628
- id: r,
629
- description: a,
676
+ d,
677
+ a && /* @__PURE__ */ n(xe, {
678
+ id: a,
679
+ description: s,
630
680
  className: "mt-1"
631
681
  }),
632
- /* @__PURE__ */ p(X, {
633
- id: n,
634
- error: o,
682
+ /* @__PURE__ */ n(we, {
683
+ id: i,
684
+ error: c,
635
685
  className: "mt-1"
636
686
  })
637
687
  ]
638
688
  });
639
689
  // src/components/shared/resolve_node_labelled_by.ts
640
- function Ie(e, t, n) {
690
+ function Ve(e, t, n) {
641
691
  if (e && typeof e != "string" && !n) return t;
642
692
  }
643
693
  // src/components/shared/use_active_option.ts
644
- var Le = -1;
645
- function Re(e, t) {
646
- return e >= 0 && e < t ? e : Le;
647
- }
648
- function ze({ optionCount: e, getOptionId: t, isOpen: n }) {
649
- let [r, a] = d(Le), s = Re(r, e), c = i((t) => {
650
- e !== 0 && a((n) => {
651
- let r = Re(n, e) + t;
694
+ var He = -1;
695
+ function Ue(e, t) {
696
+ return e >= 0 && e < t ? e : He;
697
+ }
698
+ function We({ optionCount: e, getOptionId: t, isOpen: n }) {
699
+ let [r, i] = m(He), a = Ue(r, e), o = s((t) => {
700
+ e !== 0 && i((n) => {
701
+ let r = Ue(n, e) + t;
652
702
  return r < 0 ? e - 1 : r >= e ? 0 : r;
653
703
  });
654
- }, [e]), l = i(() => {
655
- a(0);
656
- }, []), u = i(() => {
657
- a(e - 1);
658
- }, [e]), f = i(() => {
659
- a(Le);
660
- }, []), p = n && s >= 0 ? t(s) : void 0;
661
- return o(() => {
662
- p !== void 0 && document.getElementById(p)?.scrollIntoView?.({ block: "nearest" });
663
- }, [p]), {
664
- activeIndex: s,
665
- activeOptionId: p,
666
- move: c,
667
- first: l,
704
+ }, [e]), c = s(() => {
705
+ i(0);
706
+ }, []), u = s(() => {
707
+ i(e - 1);
708
+ }, [e]), d = s(() => {
709
+ i(He);
710
+ }, []), f = n && a >= 0 ? t(a) : void 0;
711
+ return l(() => {
712
+ f !== void 0 && document.getElementById(f)?.scrollIntoView?.({ block: "nearest" });
713
+ }, [f]), {
714
+ activeIndex: a,
715
+ activeOptionId: f,
716
+ move: o,
717
+ first: c,
668
718
  last: u,
669
- reset: f
719
+ reset: d
670
720
  };
671
721
  }
672
722
  // src/components/combobox/combobox.tsx
673
- function Be({ options: t, label: n, description: r, "aria-label": i, error: a, placeholder: o, noResultsText: s, clearLabel: c, radius: f = "md", unstyled: h = !1, disabled: g = !1, required: _ = !1, className: v, wrapperClassName: y, value: b, defaultValue: x = "", onChange: S, id: C }) {
674
- let w = V(), { fieldId: T, errorId: E, descriptionId: D, labelId: O } = $(C), k = `${T}-listbox`, j = u(null), [M, P] = Ce(b, x), F = t.find((e) => e.value === M), [I, L] = d(""), [ee, R] = d(!1), [z, B] = d(!1), H = l(() => ee ? t.filter((e) => e.label.toLowerCase().includes(I.toLowerCase())) : t, [
723
+ function Ge(e, t) {
724
+ return e.label.toLowerCase().includes(t.toLowerCase());
725
+ }
726
+ function Ke({ options: t, filterOption: i = Ge, label: a, description: o, "aria-label": s, error: c, placeholder: l, noResultsText: u, clearLabel: d, radius: h = "md", unstyled: g = !1, disabled: _ = !1, required: v = !1, className: y, wrapperClassName: b, value: x, defaultValue: S = "", onChange: C, id: w }) {
727
+ let T = J(), { fieldId: E, errorId: D, descriptionId: O, labelId: k } = $(w), A = `${E}-listbox`, j = p(null), [M, N] = Oe(x, S), P = t.find((e) => e.value === M), [F, I] = m(""), [L, z] = m(!1), [B, V] = m(!1), U = f(() => L ? t.filter((e) => i(e, F)) : t, [
675
728
  t,
676
- ee,
677
- I
678
- ]), { activeIndex: te, activeOptionId: U, move: ne, first: re, last: ie, reset: W } = ze({
679
- optionCount: H.length,
680
- getOptionId: (e) => `${k}-option-${e}`,
681
- isOpen: z
682
- }), ae = z ? I : F?.label ?? "", G = () => {
683
- g || (L(F?.label ?? ""), R(!1), B(!0), W());
684
- }, K = () => {
685
- B(!1), R(!1), W();
686
- }, q = (e) => {
687
- P(e.value), S?.(e.value), K();
688
- }, oe = () => {
689
- P(""), S?.(""), L(""), j.current?.focus();
729
+ i,
730
+ L,
731
+ F
732
+ ]), { activeIndex: W, activeOptionId: G, move: ee, first: te, last: ne, reset: re } = We({
733
+ optionCount: U.length,
734
+ getOptionId: (e) => `${A}-option-${e}`,
735
+ isOpen: B
736
+ }), ie = B ? F : P?.label ?? "", K = () => {
737
+ _ || (I(P?.label ?? ""), z(!1), V(!0), re());
738
+ }, q = () => {
739
+ V(!1), z(!1), re();
740
+ }, ae = (e) => {
741
+ N(e.value), C?.(e.value), q();
742
+ }, Y = () => {
743
+ N(""), C?.(""), I(""), j.current?.focus();
744
+ }, oe = (e) => {
745
+ I(e.target.value), z(!0), V(!0), te();
746
+ }, X = () => {
747
+ B || K();
690
748
  }, se = (e) => {
691
- L(e.target.value), R(!0), B(!0), re();
692
- }, J = () => {
693
- z || G();
749
+ e.preventDefault(), e.altKey ? B || K() : B ? ee(1) : (K(), te());
694
750
  }, ce = (e) => {
695
- e.preventDefault(), e.altKey ? z || G() : z ? ne(1) : (G(), re());
696
- }, Y = (e) => {
697
- e.preventDefault(), e.altKey ? z && K() : z ? ne(-1) : (G(), ie());
751
+ e.preventDefault(), e.altKey ? B && q() : B ? ee(-1) : (K(), ne());
698
752
  }, le = (e) => {
699
- if (!z) return;
700
- let t = H[te];
701
- t ? (e.preventDefault(), q(t)) : K();
753
+ if (!B) return;
754
+ let t = U[W];
755
+ t ? (e.preventDefault(), ae(t)) : q();
702
756
  }, ue = (e) => {
703
- z && (e.preventDefault(), K());
757
+ B && (e.preventDefault(), q());
704
758
  };
705
- return /* @__PURE__ */ p(Fe, {
706
- fieldId: T,
707
- errorId: E,
708
- descriptionId: D,
709
- label: n,
710
- description: r,
711
- error: a,
712
- required: _,
713
- wrapperClassName: y,
714
- children: /* @__PURE__ */ m("div", {
759
+ return /* @__PURE__ */ n(Be, {
760
+ fieldId: E,
761
+ errorId: D,
762
+ descriptionId: O,
763
+ label: a,
764
+ description: o,
765
+ error: c,
766
+ required: v,
767
+ wrapperClassName: b,
768
+ children: /* @__PURE__ */ r("div", {
715
769
  className: "relative",
716
770
  children: [
717
- !h && /* @__PURE__ */ p("span", {
771
+ !g && /* @__PURE__ */ n("span", {
718
772
  className: "i-mdi-magnify absolute left-2.5 top-1/2 -translate-y-1/2 w-4 h-4 text-gray-400 dark:text-gray-500 pointer-events-none",
719
773
  "aria-hidden": !0
720
774
  }),
721
- /* @__PURE__ */ p("input", {
775
+ /* @__PURE__ */ n("input", {
722
776
  ref: j,
723
- id: T,
777
+ id: E,
724
778
  role: "combobox",
725
779
  type: "text",
726
780
  autoComplete: "off",
727
- disabled: g,
728
- placeholder: o,
729
- value: ae,
730
- onChange: se,
731
- onClick: J,
732
- onBlur: K,
781
+ disabled: _,
782
+ placeholder: l,
783
+ value: ie,
784
+ onChange: oe,
785
+ onClick: X,
786
+ onBlur: q,
733
787
  onKeyDown: (e) => {
734
- if (e.key === "ArrowDown") return ce(e);
735
- if (e.key === "ArrowUp") return Y(e);
788
+ if (e.key === "ArrowDown") return se(e);
789
+ if (e.key === "ArrowUp") return ce(e);
736
790
  if (e.key === "Enter") return le(e);
737
791
  if (e.key === "Escape") return ue(e);
738
792
  },
739
- "aria-expanded": z,
740
- "aria-controls": k,
793
+ "aria-expanded": B,
794
+ "aria-controls": A,
741
795
  "aria-autocomplete": "list",
742
- "aria-label": i,
743
- "aria-labelledby": Ie(n, O, i),
744
- "aria-activedescendant": U,
745
- "aria-invalid": !!a,
746
- "aria-required": _ || void 0,
747
- "aria-describedby": Z(!!r && D, a && E),
748
- className: e("w-full disabled:opacity-50 disabled:cursor-not-allowed", !h && [
749
- fe,
750
- N[f],
796
+ "aria-label": s,
797
+ "aria-labelledby": Ve(a, k, s),
798
+ "aria-activedescendant": G,
799
+ "aria-invalid": !!c,
800
+ "aria-required": v || void 0,
801
+ "aria-describedby": Q(!!o && O, c && D),
802
+ className: e("w-full disabled:opacity-50 disabled:cursor-not-allowed", !g && [
803
+ he,
804
+ H[h],
751
805
  "pl-9 pr-8 py-2 text-sm"
752
- ], !h && a && e("border-red-500 dark:border-red-400", "focus:ring-red-500"), v)
806
+ ], !g && c && e("border-red-500 dark:border-red-400", "focus:ring-red-500"), y)
753
807
  }),
754
- !h && F && !g && /* @__PURE__ */ p("button", {
808
+ !g && P && !_ && /* @__PURE__ */ n("button", {
755
809
  type: "button",
756
- "aria-label": c ?? w.clearSelection,
810
+ "aria-label": d ?? T.clearSelection,
757
811
  onMouseDown: (e) => {
758
812
  e.preventDefault();
759
813
  },
760
- onClick: oe,
761
- className: e("absolute right-2.5 top-1/2 -translate-y-1/2 w-4 h-4 text-gray-400 hover:text-gray-600 dark:text-gray-500 dark:hover:text-gray-300 before:content-[''] before:absolute before:-inset-[4px]", "outline-hidden focus-visible:outline-2 focus-visible:outline-offset-2", A.primary.focusOutline),
762
- children: /* @__PURE__ */ p("span", {
814
+ onClick: Y,
815
+ className: e("absolute right-2.5 top-1/2 -translate-y-1/2 w-4 h-4 text-gray-400 hover:text-gray-600 dark:text-gray-500 dark:hover:text-gray-300 before:content-[''] before:absolute before:-inset-[4px]", "outline-hidden focus-visible:outline-2 focus-visible:outline-offset-2", R.primary.focusOutline),
816
+ children: /* @__PURE__ */ n("span", {
763
817
  className: "i-mdi-close block w-4 h-4",
764
818
  "aria-hidden": !0
765
819
  })
766
820
  }),
767
- z && /* @__PURE__ */ m("div", {
768
- className: e("absolute z-10 mt-1 w-full text-sm shadow-lg", !h && [
821
+ B && /* @__PURE__ */ r("div", {
822
+ className: e("absolute z-10 mt-1 w-full text-sm shadow-lg", !g && [
769
823
  "border",
770
824
  "bg-white dark:bg-gray-900",
771
825
  "border-gray-100 dark:border-gray-800",
772
- N[f]
826
+ H[h]
773
827
  ]),
774
- children: [/* @__PURE__ */ p("ul", {
775
- id: k,
828
+ children: [/* @__PURE__ */ n("ul", {
829
+ id: A,
776
830
  role: "listbox",
777
- "aria-labelledby": n && !i ? O : void 0,
778
- "aria-label": i,
831
+ "aria-labelledby": a && !s ? k : void 0,
832
+ "aria-label": s,
779
833
  className: e("max-h-60 overflow-auto py-1", "[scrollbar-width:thin] [scrollbar-color:theme(colors.gray.300)_transparent] hover:[scrollbar-color:theme(colors.gray.400)_transparent] dark:[scrollbar-color:theme(colors.gray.600)_transparent] dark:hover:[scrollbar-color:theme(colors.gray.500)_transparent]"),
780
- children: H.map((t, n) => /* @__PURE__ */ p("li", {
781
- id: `${k}-option-${n}`,
834
+ children: U.map((t, r) => /* @__PURE__ */ n("li", {
835
+ id: `${A}-option-${r}`,
782
836
  role: "option",
783
837
  "aria-selected": t.value === M,
784
838
  onMouseDown: (e) => e.preventDefault(),
785
- onClick: () => q(t),
786
- className: e("px-3 py-2 cursor-pointer text-gray-900 dark:text-gray-100", n === te ? e("bg-blue-50 dark:bg-blue-900/40", "outline-2 -outline-offset-2 outline-blue-500 dark:outline-blue-400") : "hover:bg-gray-50 dark:hover:bg-gray-800/60", t.value === M && "font-medium"),
839
+ onClick: () => ae(t),
840
+ className: e("px-3 py-2 cursor-pointer text-gray-900 dark:text-gray-100", r === W ? e("bg-blue-50 dark:bg-blue-900/40", "outline-2 -outline-offset-2 outline-blue-500 dark:outline-blue-400") : "hover:bg-gray-50 dark:hover:bg-gray-800/60", t.value === M && "font-medium"),
787
841
  children: t.label
788
842
  }, t.value))
789
- }), /* @__PURE__ */ p("div", {
843
+ }), /* @__PURE__ */ n("div", {
790
844
  role: "status",
791
- className: H.length === 0 ? "px-3 py-2 text-gray-500 dark:text-gray-400" : void 0,
792
- children: H.length === 0 ? s ?? w.noResults : ""
845
+ className: U.length === 0 ? "px-3 py-2 text-gray-500 dark:text-gray-400" : void 0,
846
+ children: U.length === 0 ? u ?? T.noResults : ""
793
847
  })]
794
848
  })
795
849
  ]
@@ -797,112 +851,112 @@ function Be({ options: t, label: n, description: r, "aria-label": i, error: a, p
797
851
  });
798
852
  }
799
853
  // src/components/menu/find_typeahead_index.ts
800
- var Ve = -1;
801
- function He(e, t, n) {
854
+ var qe = -1;
855
+ function Je(e, t, n) {
802
856
  let r = n.toLowerCase(), i = e.length;
803
857
  for (let n = 1; n <= i; n += 1) {
804
858
  let a = (t + n + i) % i;
805
859
  if (e[a]?.toLowerCase().startsWith(r)) return a;
806
860
  }
807
- return Ve;
861
+ return qe;
808
862
  }
809
863
  // src/components/menu/menu_context.ts
810
- var Ue = n(null);
811
- function We() {
812
- return a(Ue);
864
+ var Ye = a(null);
865
+ function Xe() {
866
+ return c(Ye);
813
867
  }
814
868
  // src/components/menu/menu_surface.tsx
815
- var Ge = ":not(:disabled):not([aria-disabled=\"true\"])", Ke = `[role="menuitem"]${Ge}, [role="menuitemradio"]${Ge}`;
816
- function qe(e) {
817
- return Array.from(e.querySelectorAll(Ke));
869
+ var Ze = ":not(:disabled):not([aria-disabled=\"true\"])", Qe = `[role="menuitem"]${Ze}, [role="menuitemradio"]${Ze}`;
870
+ function $e(e) {
871
+ return Array.from(e.querySelectorAll(Qe));
818
872
  }
819
- function Je(e, t) {
820
- let n = qe(e);
873
+ function et(e, t) {
874
+ let n = $e(e);
821
875
  n.length !== 0 && n[(t % n.length + n.length) % n.length]?.focus({ preventScroll: !0 });
822
876
  }
823
- function Ye(e, t, n, r) {
824
- if (e.key === "ArrowDown") Je(t, r + 1);
825
- else if (e.key === "ArrowUp") Je(t, r - 1);
826
- else if (e.key === "Home") Je(t, 0);
827
- else if (e.key === "End") Je(t, n.length - 1);
877
+ function tt(e, t, n, r) {
878
+ if (e.key === "ArrowDown") et(t, r + 1);
879
+ else if (e.key === "ArrowUp") et(t, r - 1);
880
+ else if (e.key === "Home") et(t, 0);
881
+ else if (e.key === "End") et(t, n.length - 1);
828
882
  else return !1;
829
883
  return e.preventDefault(), !0;
830
884
  }
831
- function Xe(e) {
885
+ function nt(e) {
832
886
  return e.key.length === 1 && e.key !== " " && !e.ctrlKey && !e.metaKey && !e.altKey;
833
887
  }
834
- function Ze(e, t, n, r) {
835
- let i = He(t.map((e) => e.textContent?.trim() ?? ""), n, r);
836
- i !== -1 && Je(e, i);
888
+ function rt(e, t, n, r) {
889
+ let i = Je(t.map((e) => e.textContent?.trim() ?? ""), n, r);
890
+ i !== -1 && et(e, i);
837
891
  }
838
- function Qe({ setFloating: t, floatingStyles: n, isVisible: r, isPositioned: i, radius: a, unstyled: s = !1, panelClassName: c, onClose: l, children: d, id: h, labelledBy: g, "aria-label": _, initialFocus: v = "first", portalTarget: y = document.body }) {
839
- let b = u(null);
840
- return o(() => {
841
- if (!i) return;
892
+ function it({ setFloating: i, floatingStyles: a, isVisible: o, isPositioned: s, radius: c, unstyled: u = !1, panelClassName: d, onClose: f, children: m, id: h, labelledBy: g, "aria-label": _, initialFocus: v = "first", portalTarget: y = document.body }) {
893
+ let b = p(null);
894
+ return l(() => {
895
+ if (!s) return;
842
896
  let e = b.current;
843
897
  if (!e) return;
844
- let t = qe(e);
898
+ let t = $e(e);
845
899
  (v === "last" ? t[t.length - 1] : t[0])?.focus({ preventScroll: !0 });
846
- }, [i, v]), x(/* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p("div", {
900
+ }, [s, v]), x(/* @__PURE__ */ r(t, { children: [/* @__PURE__ */ n("div", {
847
901
  className: "fixed inset-0 z-40",
848
- onClick: l,
902
+ onClick: f,
849
903
  "aria-hidden": "true"
850
- }), /* @__PURE__ */ p("div", {
851
- ref: t,
852
- style: n,
904
+ }), /* @__PURE__ */ n("div", {
905
+ ref: i,
906
+ style: a,
853
907
  className: "z-50",
854
- children: /* @__PURE__ */ p("div", {
908
+ children: /* @__PURE__ */ n("div", {
855
909
  ref: b,
856
910
  id: h,
857
911
  role: "menu",
858
912
  "aria-label": _,
859
913
  "aria-labelledby": g,
860
914
  tabIndex: -1,
861
- "data-state": r ? "open" : "closed",
915
+ "data-state": o ? "open" : "closed",
862
916
  onKeyDown: (e) => {
863
917
  let t = b.current;
864
918
  if (!t) return;
865
- let n = qe(t), r = n.indexOf(document.activeElement);
866
- Ye(e, t, n, r) ? e.stopPropagation() : e.key === "Escape" ? (e.preventDefault(), e.stopPropagation(), l()) : e.key === "Tab" ? l() : Xe(e) && (e.stopPropagation(), Ze(t, n, r, e.key));
919
+ let n = $e(t), r = n.indexOf(document.activeElement);
920
+ tt(e, t, n, r) ? e.stopPropagation() : e.key === "Escape" ? (e.preventDefault(), e.stopPropagation(), f()) : e.key === "Tab" ? f() : nt(e) && (e.stopPropagation(), rt(t, n, r, e.key));
867
921
  },
868
- className: e("w-max", !s && [
922
+ className: e("w-max", !u && [
869
923
  "min-w-40 max-w-xs origin-top border py-1 shadow-lg backdrop-blur-sm",
870
924
  "transition-[opacity,transform] duration-150 ease-out",
871
- r ? "scale-100 opacity-100" : "ms-menu-surface-closed",
925
+ o ? "scale-100 opacity-100" : "ms-menu-surface-closed",
872
926
  "bg-white dark:bg-gray-900",
873
927
  "border-gray-100 dark:border-gray-800",
874
- N[a]
875
- ], c),
928
+ H[c]
929
+ ], d),
876
930
  onClick: (e) => e.stopPropagation(),
877
- children: /* @__PURE__ */ p(Ue.Provider, {
878
- value: l,
879
- children: d
931
+ children: /* @__PURE__ */ n(Ye.Provider, {
932
+ value: f,
933
+ children: m
880
934
  })
881
935
  })
882
936
  })] }), y);
883
937
  }
884
938
  // src/components/shared/dialog_portal_target.ts
885
- var $e = "dialog, [role=dialog], [role=alertdialog]";
886
- function et(e) {
887
- return e?.closest($e) ?? (e?.ownerDocument ?? document).body;
939
+ var at = "dialog, [role=dialog], [role=alertdialog]";
940
+ function ot(e) {
941
+ return e?.closest(at) ?? (e?.ownerDocument ?? document).body;
888
942
  }
889
943
  // src/components/shared/use_overlay_state.ts
890
- function tt() {
891
- let [e, t] = d(!1), [n, r] = d(!1), a = u(void 0);
892
- return o(() => () => clearTimeout(a.current), []), {
944
+ function st() {
945
+ let [e, t] = m(!1), [n, r] = m(!1), i = p(void 0);
946
+ return l(() => () => clearTimeout(i.current), []), {
893
947
  isMounted: e,
894
948
  isVisible: n,
895
949
  setIsVisible: r,
896
- open: i((e) => {
897
- clearTimeout(a.current), t(!0), e && r(!0);
950
+ open: s((e) => {
951
+ clearTimeout(i.current), t(!0), e && r(!0);
898
952
  }, []),
899
- close: i(() => {
900
- clearTimeout(a.current), r(!1), a.current = setTimeout(() => t(!1), 150);
953
+ close: s(() => {
954
+ clearTimeout(i.current), r(!1), i.current = setTimeout(() => t(!1), 150);
901
955
  }, [])
902
956
  };
903
957
  }
904
- function nt(e, t, n) {
905
- o(() => {
958
+ function ct(e, t, n) {
959
+ l(() => {
906
960
  if (!e || !t) return;
907
961
  let r = requestAnimationFrame(() => n(!0));
908
962
  return () => cancelAnimationFrame(r);
@@ -913,8 +967,8 @@ function nt(e, t, n) {
913
967
  ]);
914
968
  }
915
969
  // src/components/context_menu/context_menu.tsx
916
- var rt = 2;
917
- function it(e, t) {
970
+ var lt = 2;
971
+ function ut(e, t) {
918
972
  return { getBoundingClientRect: () => ({
919
973
  width: 0,
920
974
  height: 0,
@@ -926,7 +980,7 @@ function it(e, t) {
926
980
  bottom: t
927
981
  }) };
928
982
  }
929
- function at(e) {
983
+ function dt(e) {
930
984
  if (e.clientX !== 0 || e.clientY !== 0) return {
931
985
  x: e.clientX,
932
986
  y: e.clientY
@@ -940,360 +994,365 @@ function at(e) {
940
994
  y: 0
941
995
  };
942
996
  }
943
- function ot({ children: e, items: t, radius: n = "md", unstyled: r = !1, panelClassName: a, className: o, ref: s, "aria-label": c }) {
944
- let l = u(null), [f, h] = d(null), { isMounted: x, isVisible: S, setIsVisible: C, open: w, close: T } = tt(), { refs: E, floatingStyles: D, isPositioned: O } = b({
997
+ function ft({ children: e, items: t, radius: i = "md", unstyled: a = !1, panelClassName: o, className: c, ref: l, "aria-label": u }) {
998
+ let d = p(null), [f, h] = m(null), { isMounted: x, isVisible: S, setIsVisible: C, open: w, close: T } = st(), { refs: E, floatingStyles: D, isPositioned: O } = b({
945
999
  placement: "bottom-start",
946
1000
  strategy: "fixed",
947
1001
  open: x,
948
1002
  whileElementsMounted: g,
949
1003
  middleware: [
950
- v(rt),
1004
+ v(lt),
951
1005
  _(),
952
1006
  y({ padding: 8 })
953
1007
  ]
954
1008
  });
955
- nt(x, O, C);
956
- let k = i((e) => Ee(h, s)(e), [s]), A = i(() => {
957
- T(), l.current?.focus({ preventScroll: !0 });
1009
+ ct(x, O, C);
1010
+ let k = s((e) => je(h, l)(e), [l]), A = s(() => {
1011
+ T(), d.current?.focus({ preventScroll: !0 });
958
1012
  }, [T]);
959
- return /* @__PURE__ */ m("div", {
1013
+ return /* @__PURE__ */ r("div", {
960
1014
  ref: k,
961
- className: o,
1015
+ className: c,
962
1016
  onContextMenu: (e) => {
963
- e.preventDefault(), x || (l.current = document.activeElement);
964
- let { x: t, y: n } = at(e);
965
- E.setReference(it(t, n)), w(!1);
1017
+ e.preventDefault(), x || (d.current = document.activeElement);
1018
+ let { x: t, y: n } = dt(e);
1019
+ E.setReference(ut(t, n)), w(!1);
966
1020
  },
967
- children: [e, x && /* @__PURE__ */ p(Qe, {
968
- "aria-label": c,
1021
+ children: [e, x && /* @__PURE__ */ n(it, {
1022
+ "aria-label": u,
969
1023
  setFloating: E.setFloating,
970
1024
  floatingStyles: D,
971
1025
  isVisible: S,
972
1026
  isPositioned: O,
973
- radius: n,
974
- unstyled: r,
975
- panelClassName: a,
1027
+ radius: i,
1028
+ unstyled: a,
1029
+ panelClassName: o,
976
1030
  onClose: A,
977
- portalTarget: et(f),
1031
+ portalTarget: ot(f),
978
1032
  children: t
979
1033
  })]
980
1034
  });
981
1035
  }
982
- // src/lib/surface_error.ts
983
- function st(e, t) {
984
- t ? t(e) : queueMicrotask(() => {
985
- throw e;
986
- });
987
- }
988
- // src/components/copy_button/copy_button.tsx
989
- var ct = 2e3, lt = 0;
990
- function ut({ value: e, children: t, onError: n }) {
991
- let r = V(), [i, a] = d(!1), [s, c] = d(""), l = u(void 0), h = u(void 0);
992
- o(() => () => {
993
- clearTimeout(l.current), clearTimeout(h.current);
994
- }, []);
995
- let g = () => {
996
- clearTimeout(h.current), c(""), h.current = setTimeout(() => c(r.copied), lt);
997
- }, _ = t({
998
- copied: i,
999
- copy: async () => {
1000
- try {
1001
- await navigator.clipboard.writeText(e), a(!0), g(), clearTimeout(l.current), l.current = setTimeout(() => {
1002
- a(!1), c("");
1003
- }, ct);
1004
- } catch (e) {
1005
- st(e, n);
1006
- }
1007
- }
1008
- });
1009
- return /* @__PURE__ */ m(f, { children: [_, /* @__PURE__ */ p("span", {
1010
- role: "status",
1011
- className: "sr-only",
1012
- children: s
1013
- })] });
1014
- }
1015
- // src/lib/split_into_highlight_segments.ts
1016
- function dt(e, t) {
1017
- if (t.length === 0) return [{
1018
- text: e,
1019
- isMatch: !1
1020
- }];
1021
- let n = [], r = 0;
1022
- for (let i = 0; i < t.length; i += 2) {
1023
- let a = t[i], o = t[i + 1];
1024
- a !== void 0 && o !== void 0 && (a > r && n.push({
1025
- text: e.slice(r, a),
1026
- isMatch: !1
1027
- }), n.push({
1028
- text: e.slice(a, o),
1029
- isMatch: !0
1030
- }), r = o);
1031
- }
1032
- return r < e.length && n.push({
1033
- text: e.slice(r),
1034
- isMatch: !1
1035
- }), n;
1036
- }
1037
- // src/components/highlight/highlight.tsx
1038
- var ft = "bg-yellow-200 text-yellow-900 dark:bg-yellow-800 dark:text-yellow-100";
1039
- function pt(e) {
1040
- let t = 0;
1041
- return e.map((e) => {
1042
- let n = t;
1043
- return t += e.text.length, {
1044
- ...e,
1045
- start: n
1046
- };
1047
- });
1048
- }
1049
- function mt({ text: t, ranges: n, radius: r = "sm", unstyled: i = !1, markClassName: a }) {
1050
- let o = pt(dt(t, n));
1051
- return /* @__PURE__ */ p(f, { children: o.map((t) => t.isMatch ? /* @__PURE__ */ p("mark", {
1052
- className: e(!i && [N[r], ft], a),
1053
- children: t.text
1054
- }, t.start) : /* @__PURE__ */ p("span", { children: t.text }, t.start)) });
1055
- }
1056
- // src/components/drawer/drawer_styles.ts
1057
- var ht = {
1058
- sm: "ms-drawer-width-sm",
1059
- md: "ms-drawer-width-md",
1060
- lg: "ms-drawer-width-lg"
1061
- }, gt = {
1062
- right: "right-0",
1063
- left: "left-0"
1064
- }, _t = {
1065
- right: "ms-drawer-offscreen-right",
1066
- left: "ms-drawer-offscreen-left"
1067
- }, vt = {
1068
- right: {
1069
- none: "rounded-l-none",
1070
- sm: "rounded-l-sm",
1071
- md: "rounded-l-md",
1072
- lg: "rounded-l-lg",
1073
- xl: "rounded-l-xl",
1074
- full: "rounded-l-lg"
1075
- },
1076
- left: {
1077
- none: "rounded-r-none",
1078
- sm: "rounded-r-sm",
1079
- md: "rounded-r-md",
1080
- lg: "rounded-r-lg",
1081
- xl: "rounded-r-xl",
1082
- full: "rounded-r-lg"
1083
- }
1084
- }, yt = n(null);
1085
- // src/components/modal/modal_footer_slot.tsx
1086
- function bt({ onSlotChange: t, children: n, unstyled: r = !1 }) {
1087
- return /* @__PURE__ */ p("div", {
1088
- ref: t,
1089
- className: e("flex items-center justify-end flex-shrink-0 empty:hidden", !r && ["gap-3 px-6 py-4 border-t", "border-gray-100 dark:border-gray-800"]),
1090
- children: n
1091
- });
1092
- }
1093
- // src/components/modal/modal_footer_slot_context.ts
1094
- var xt = n(null);
1095
1036
  // src/components/shared/accessible_name.ts
1096
- function St(e) {
1037
+ function pt(e) {
1097
1038
  return (e ?? "").replace(/\s+/g, " ").trim();
1098
1039
  }
1099
- function Ct(e, t) {
1040
+ function mt(e, t) {
1100
1041
  return t.split(/\s+/).map((t) => e.ownerDocument.getElementById(t)?.textContent).join(" ");
1101
1042
  }
1102
- function wt(e) {
1103
- let t = St(e.getAttribute("aria-label"));
1043
+ function ht(e) {
1044
+ let t = pt(e.getAttribute("aria-label"));
1104
1045
  if (t) return t;
1105
1046
  let n = e.getAttribute("aria-labelledby");
1106
- return (n ? St(Ct(e, n)) : "") || St(e.textContent);
1047
+ return (n ? pt(mt(e, n)) : "") || pt(e.textContent);
1107
1048
  }
1108
1049
  // src/components/shared/portal_target.ts
1109
- var Tt = "main, nav, aside, header, footer, form[aria-label], form[aria-labelledby], section[aria-label], section[aria-labelledby], [role=main], [role=navigation], [role=complementary], [role=banner], [role=contentinfo], [role=region], [role=search], [role=form], dialog, [role=dialog], [role=alertdialog]";
1110
- function Et(e) {
1111
- return e?.closest(Tt) ?? (e?.ownerDocument ?? document).body;
1050
+ var gt = "main, nav, aside, header, footer, form[aria-label], form[aria-labelledby], section[aria-label], section[aria-labelledby], [role=main], [role=navigation], [role=complementary], [role=banner], [role=contentinfo], [role=region], [role=search], [role=form], dialog, [role=dialog], [role=alertdialog]";
1051
+ function _t(e) {
1052
+ return e?.closest(gt) ?? (e?.ownerDocument ?? document).body;
1112
1053
  }
1113
1054
  // src/components/tooltip/tooltip.tsx
1114
- var Dt = 8, Ot = 8, kt = 100, At = {
1055
+ var vt = 8, yt = 8, bt = 100, xt = {
1115
1056
  top: "ms-tooltip-enter-top",
1116
1057
  bottom: "ms-tooltip-enter-bottom",
1117
1058
  left: "ms-tooltip-enter-left",
1118
1059
  right: "ms-tooltip-enter-right"
1119
- }, jt = {
1060
+ }, St = {
1120
1061
  top: "bottom",
1121
1062
  bottom: "top",
1122
1063
  left: "right",
1123
1064
  right: "left"
1124
1065
  };
1125
- function Mt({ content: n, children: a, position: l = "top", showOnClick: S = !1, temporaryContent: C, temporaryDuration: w = 2e3, disabled: T = !1, radius: E = "lg", unstyled: D = !1, panelClassName: O, onTemporaryShow: k, className: A, describeChild: j, hoverable: M = !1, portalContainer: P, ref: F }) {
1126
- let { isMounted: I, isVisible: L, setIsVisible: ee, open: R, close: z } = tt(), [B, V] = d(!1), H = s(), te = u(null), [U, ne] = d(null), [re, ie] = d(null), [W, ae] = d(null), G = u(void 0), K = u(void 0), { refs: q, floatingStyles: oe, placement: se, middlewareData: J, isPositioned: ce } = b({
1127
- placement: l,
1066
+ function Ct({ content: a, children: c, position: f = "top", showOnClick: S = !1, temporaryContent: C, temporaryDuration: w = 2e3, disabled: T = !1, radius: E = "lg", unstyled: D = !1, panelClassName: O, onTemporaryShow: k, className: A, describeChild: j, hoverable: M = !1, portalContainer: N, ref: P }) {
1067
+ let { isMounted: F, isVisible: I, setIsVisible: L, open: R, close: z } = st(), [B, V] = m(!1), U = u(), W = p(null), [G, ee] = m(null), [te, ne] = m(null), [re, ie] = m(null), K = p(void 0), q = p(void 0), { refs: J, floatingStyles: ae, placement: Y, middlewareData: oe, isPositioned: X } = b({
1068
+ placement: f,
1128
1069
  strategy: "fixed",
1129
- open: I,
1070
+ open: F,
1130
1071
  whileElementsMounted: g,
1131
1072
  middleware: [
1132
- v(Dt),
1073
+ v(vt),
1133
1074
  _(),
1134
1075
  y({ padding: 8 }),
1135
- h({ element: te })
1076
+ h({ element: W })
1136
1077
  ]
1137
- }), Y = se.split("-")[0];
1138
- nt(I, ce, ee);
1139
- let le = i((e) => Ee(q.setReference, ne, F)(e), [q, F]), ue = i((e) => Ee(q.setFloating, ie)(e), [q]);
1140
- c(() => {
1141
- let e = U?.firstElementChild;
1142
- ae(re && e ? St(re.textContent) === wt(e) : null);
1078
+ }), se = Y.split("-")[0];
1079
+ ct(F, X, L);
1080
+ let ce = s((e) => je(J.setReference, ee, P)(e), [J, P]), le = s((e) => je(J.setFloating, ne)(e), [J]);
1081
+ d(() => {
1082
+ let e = G?.firstElementChild;
1083
+ ie(te && e ? pt(te.textContent) === ht(e) : null);
1143
1084
  }, [
1144
- U,
1145
- re,
1146
- n,
1085
+ G,
1086
+ te,
1087
+ a,
1147
1088
  C,
1148
1089
  B
1149
1090
  ]);
1150
- let de = i(() => {
1091
+ let ue = s(() => {
1151
1092
  V(!1), z();
1152
- }, [z]), fe = () => {
1153
- !T && C && (V(!0), R(ce), clearTimeout(G.current), G.current = setTimeout(de, w), k?.());
1154
- }, pe = () => {
1155
- T || R(ce);
1156
- }, me = i(() => {
1157
- clearTimeout(G.current), clearTimeout(K.current), de();
1158
- }, [de]), he = () => {
1159
- clearTimeout(K.current);
1160
- }, ge = () => {
1161
- clearTimeout(K.current), K.current = setTimeout(me, kt);
1093
+ }, [z]), de = () => {
1094
+ !T && C && (V(!0), R(X), clearTimeout(K.current), K.current = setTimeout(ue, w), k?.());
1095
+ }, fe = () => {
1096
+ T || R(X);
1097
+ }, Z = s(() => {
1098
+ clearTimeout(K.current), clearTimeout(q.current), ue();
1099
+ }, [ue]), pe = () => {
1100
+ clearTimeout(q.current);
1101
+ }, me = () => {
1102
+ clearTimeout(q.current), q.current = setTimeout(Z, bt);
1103
+ }, he = (e) => {
1104
+ e.target.matches(":focus-visible") && fe();
1105
+ }, ge = (e) => {
1106
+ e.pointerType !== "touch" && (pe(), fe());
1162
1107
  }, _e = (e) => {
1163
- e.target.matches(":focus-visible") && pe();
1108
+ e.pointerType !== "touch" && (M ? me() : Z());
1164
1109
  }, ve = (e) => {
1165
- e.pointerType !== "touch" && (he(), pe());
1166
- }, ye = (e) => {
1167
- e.pointerType !== "touch" && (M ? ge() : me());
1168
- }, be = (e) => {
1169
- e.pointerType !== "touch" && he();
1110
+ e.pointerType !== "touch" && pe();
1170
1111
  };
1171
- o(() => () => {
1172
- clearTimeout(G.current), clearTimeout(K.current);
1173
- }, []), o(() => {
1174
- if (!L || T) return;
1112
+ l(() => () => {
1113
+ clearTimeout(K.current), clearTimeout(q.current);
1114
+ }, []), l(() => {
1115
+ if (!I || T) return;
1175
1116
  let e = (e) => {
1176
- e.key === "Escape" && (e.preventDefault(), me());
1117
+ e.key === "Escape" && (e.preventDefault(), Z());
1177
1118
  };
1178
1119
  return window.addEventListener("keydown", e, !0), () => window.removeEventListener("keydown", e, !0);
1179
1120
  }, [
1180
- L,
1121
+ I,
1181
1122
  T,
1182
- me
1123
+ Z
1183
1124
  ]);
1184
- let X = I && !T, xe = B && C ? C : n, Se = {
1125
+ let ye = F && !T, be = B && C ? C : a, xe = {
1185
1126
  onClick: (e) => {
1186
- S && C && fe(), r(a) && a.props.onClick?.(e);
1127
+ S && C && de(), o(c) && c.props.onClick?.(e);
1187
1128
  },
1188
- "aria-describedby": Z(r(a) ? a.props["aria-describedby"] : void 0, X && (j ?? (W !== null && !W)) && H)
1189
- }, Q = r(a) ? t(a, Se) : a, Ce = J.arrow?.x, $ = J.arrow?.y, we = jt[Y];
1190
- return /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ m("span", {
1191
- ref: le,
1129
+ "aria-describedby": Q(o(c) ? c.props["aria-describedby"] : void 0, ye && (j ?? (re !== null && !re)) && U)
1130
+ }, Se = o(c) ? i(c, xe) : c, Ce = oe.arrow?.x, we = oe.arrow?.y, Te = St[se];
1131
+ return /* @__PURE__ */ r(t, { children: [/* @__PURE__ */ r("span", {
1132
+ ref: ce,
1192
1133
  className: e("inline-flex", A),
1193
- onPointerEnter: ve,
1194
- onPointerLeave: ye,
1195
- onFocus: _e,
1196
- onBlur: me,
1197
- children: [Q, C !== void 0 && /* @__PURE__ */ p("span", {
1134
+ onPointerEnter: ge,
1135
+ onPointerLeave: _e,
1136
+ onFocus: he,
1137
+ onBlur: Z,
1138
+ children: [Se, C !== void 0 && /* @__PURE__ */ n("span", {
1198
1139
  role: "status",
1199
1140
  className: "sr-only",
1200
1141
  children: B ? C : null
1201
1142
  })]
1202
- }), X && x(/* @__PURE__ */ p("div", {
1203
- ref: ue,
1204
- style: oe,
1143
+ }), ye && x(/* @__PURE__ */ n("div", {
1144
+ ref: le,
1145
+ style: ae,
1205
1146
  className: e("z-50 inline-block", !M && "pointer-events-none"),
1206
- onPointerEnter: M ? be : void 0,
1207
- onPointerLeave: M ? ye : void 0,
1208
- children: /* @__PURE__ */ m("div", {
1209
- id: H,
1147
+ onPointerEnter: M ? ve : void 0,
1148
+ onPointerLeave: M ? _e : void 0,
1149
+ children: /* @__PURE__ */ r("div", {
1150
+ id: U,
1210
1151
  role: "tooltip",
1211
- "data-state": L ? "open" : "closed",
1152
+ "data-state": I ? "open" : "closed",
1212
1153
  className: e("whitespace-nowrap", !D && [
1213
1154
  "px-3 py-1.5 text-sm",
1214
1155
  "text-white dark:text-gray-900 bg-gray-900 dark:bg-gray-100 shadow-lg",
1215
1156
  "transition-[opacity,transform] duration-150 ease-out",
1216
- L ? "opacity-100" : "opacity-0",
1217
- At[Y],
1218
- N[E]
1157
+ I ? "opacity-100" : "opacity-0",
1158
+ xt[se],
1159
+ H[E]
1219
1160
  ], O),
1220
- children: [xe, !D && /* @__PURE__ */ p("div", {
1221
- ref: te,
1161
+ children: [be, !D && /* @__PURE__ */ n("div", {
1162
+ ref: W,
1222
1163
  style: {
1223
1164
  position: "absolute",
1224
- width: `${Ot}px`,
1225
- height: `${Ot}px`,
1165
+ width: `${yt}px`,
1166
+ height: `${yt}px`,
1226
1167
  left: Ce === void 0 ? void 0 : `${Ce}px`,
1227
- top: $ === void 0 ? void 0 : `${$}px`,
1228
- [we]: `-${Ot / 2}px`
1168
+ top: we === void 0 ? void 0 : `${we}px`,
1169
+ [Te]: `-${yt / 2}px`
1229
1170
  },
1230
1171
  className: "rotate-45 bg-gray-900 dark:bg-gray-100"
1231
1172
  })]
1232
1173
  })
1233
- }), P ?? Et(U))] });
1174
+ }), N ?? _t(G))] });
1234
1175
  }
1235
1176
  // src/components/icon_button/icon_button.tsx
1236
- var Nt = {
1177
+ var wt = {
1237
1178
  xs: "p-1",
1238
1179
  sm: "p-2",
1239
1180
  md: "p-2",
1240
1181
  lg: "p-3"
1241
- }, Pt = {
1182
+ }, Tt = {
1242
1183
  xs: "w-4 h-4",
1243
1184
  sm: "w-4 h-4",
1244
1185
  md: "w-5 h-5",
1245
1186
  lg: "w-6 h-6"
1246
1187
  };
1247
- function Ft(e) {
1188
+ function Et(e) {
1248
1189
  if (e) return e === !0 ? {} : typeof e == "string" ? { position: e } : e;
1249
1190
  }
1250
- function It(t) {
1251
- let { icon: n, "aria-label": r, unstyled: i = !1, variant: a = "outline", color: o = "neutral", size: s = "md", radius: c = "md", className: l, children: u, tooltip: d, ref: f, ...h } = t, g = A[o], _ = Ft(d), v = /* @__PURE__ */ m("button", {
1252
- ref: f,
1191
+ function Dt(t) {
1192
+ let { icon: i, "aria-label": a, unstyled: o = !1, variant: s = "outline", color: c = "neutral", size: l = "md", radius: u = "md", className: d, children: f, tooltip: p, pressed: m, ref: h, ...g } = t, _ = R[c], v = Et(p), y = /* @__PURE__ */ r("button", {
1193
+ ref: h,
1253
1194
  type: "button",
1254
- "aria-label": r,
1255
- className: e(j, !i && [
1256
- M,
1195
+ "aria-label": a,
1196
+ "aria-pressed": m,
1197
+ className: e(z, !o && [
1198
+ B,
1257
1199
  "border",
1258
- N[c],
1259
- Nt[s],
1260
- g[a],
1261
- g.focusOutline
1262
- ], l),
1263
- ...h,
1264
- children: [/* @__PURE__ */ p("span", { className: e(n, Pt[s], u && "mr-1") }), u]
1200
+ H[u],
1201
+ wt[l],
1202
+ V(c, s, m ?? !1),
1203
+ _.focusOutline
1204
+ ], d),
1205
+ ...g,
1206
+ children: [/* @__PURE__ */ n("span", { className: e(i, Tt[l], f && "mr-1") }), f]
1265
1207
  });
1266
- if (!_) return v;
1267
- let y = _.content !== void 0;
1268
- return /* @__PURE__ */ p(Mt, {
1269
- content: y ? _.content : r,
1270
- position: _.position,
1271
- describeChild: y ? void 0 : !1,
1272
- children: v
1208
+ if (!v) return y;
1209
+ let b = v.content !== void 0;
1210
+ return /* @__PURE__ */ n(Ct, {
1211
+ content: b ? v.content : a,
1212
+ position: v.position,
1213
+ describeChild: b ? void 0 : !1,
1214
+ children: y
1273
1215
  });
1274
1216
  }
1217
+ // src/lib/surface_error.ts
1218
+ function Ot(e, t) {
1219
+ t ? t(e) : queueMicrotask(() => {
1220
+ throw e;
1221
+ });
1222
+ }
1223
+ // src/components/copy_button/copy_button.tsx
1224
+ var kt = 2e3, At = 0;
1225
+ function jt({ value: e, children: i, label: a, onError: o }) {
1226
+ let s = J(), [c, u] = m(!1), [d, f] = m(""), h = p(void 0), g = p(void 0);
1227
+ l(() => () => {
1228
+ clearTimeout(h.current), clearTimeout(g.current);
1229
+ }, []);
1230
+ let _ = () => {
1231
+ clearTimeout(g.current), f(""), g.current = setTimeout(() => f(s.copied), At);
1232
+ }, v = async () => {
1233
+ try {
1234
+ await navigator.clipboard.writeText(e), u(!0), _(), clearTimeout(h.current), h.current = setTimeout(() => {
1235
+ u(!1), f("");
1236
+ }, kt);
1237
+ } catch (e) {
1238
+ Ot(e, o);
1239
+ }
1240
+ }, y = i?.({
1241
+ copied: c,
1242
+ copy: v
1243
+ }) ?? (i ? null : /* @__PURE__ */ n(Dt, {
1244
+ icon: c ? "i-mdi-check" : "i-mdi-content-copy",
1245
+ "aria-label": a ?? s.copy ?? "Copy",
1246
+ onClick: () => void v()
1247
+ }));
1248
+ return /* @__PURE__ */ r(t, { children: [y, /* @__PURE__ */ n("span", {
1249
+ role: "status",
1250
+ className: "sr-only",
1251
+ children: d
1252
+ })] });
1253
+ }
1254
+ // src/lib/split_into_highlight_segments.ts
1255
+ function Mt(e, t) {
1256
+ if (t.length === 0) return [{
1257
+ text: e,
1258
+ isMatch: !1
1259
+ }];
1260
+ let n = [], r = 0;
1261
+ for (let i = 0; i < t.length; i += 2) {
1262
+ let a = t[i], o = t[i + 1];
1263
+ a !== void 0 && o !== void 0 && (a > r && n.push({
1264
+ text: e.slice(r, a),
1265
+ isMatch: !1
1266
+ }), n.push({
1267
+ text: e.slice(a, o),
1268
+ isMatch: !0
1269
+ }), r = o);
1270
+ }
1271
+ return r < e.length && n.push({
1272
+ text: e.slice(r),
1273
+ isMatch: !1
1274
+ }), n;
1275
+ }
1276
+ // src/components/highlight/highlight.tsx
1277
+ var Nt = "bg-yellow-200 text-yellow-900 dark:bg-yellow-800 dark:text-yellow-100";
1278
+ function Pt(e) {
1279
+ let t = 0;
1280
+ return e.map((e) => {
1281
+ let n = t;
1282
+ return t += e.text.length, {
1283
+ ...e,
1284
+ start: n
1285
+ };
1286
+ });
1287
+ }
1288
+ function Ft({ text: r, ranges: i, radius: a = "sm", unstyled: o = !1, markClassName: s }) {
1289
+ let c = Pt(Mt(r, i));
1290
+ return /* @__PURE__ */ n(t, { children: c.map((t) => t.isMatch ? /* @__PURE__ */ n("mark", {
1291
+ className: e(!o && [H[a], Nt], s),
1292
+ children: t.text
1293
+ }, t.start) : /* @__PURE__ */ n("span", { children: t.text }, t.start)) });
1294
+ }
1295
+ // src/components/drawer/drawer_styles.ts
1296
+ var It = {
1297
+ sm: "ms-drawer-width-sm",
1298
+ md: "ms-drawer-width-md",
1299
+ lg: "ms-drawer-width-lg"
1300
+ }, Lt = {
1301
+ right: "right-0",
1302
+ left: "left-0"
1303
+ }, Rt = {
1304
+ right: "ms-drawer-offscreen-right",
1305
+ left: "ms-drawer-offscreen-left"
1306
+ }, zt = {
1307
+ right: {
1308
+ none: "rounded-l-none",
1309
+ sm: "rounded-l-sm",
1310
+ md: "rounded-l-md",
1311
+ lg: "rounded-l-lg",
1312
+ xl: "rounded-l-xl",
1313
+ full: "rounded-l-lg"
1314
+ },
1315
+ left: {
1316
+ none: "rounded-r-none",
1317
+ sm: "rounded-r-sm",
1318
+ md: "rounded-r-md",
1319
+ lg: "rounded-r-lg",
1320
+ xl: "rounded-r-xl",
1321
+ full: "rounded-r-lg"
1322
+ }
1323
+ }, Bt = a(null);
1324
+ // src/components/modal/modal_footer_slot.tsx
1325
+ function Vt({ onSlotChange: t, children: r, unstyled: i = !1 }) {
1326
+ return /* @__PURE__ */ n("div", {
1327
+ ref: t,
1328
+ className: e("flex items-center justify-end flex-shrink-0 empty:hidden", !i && ["gap-3 px-6 py-4 border-t", "border-gray-100 dark:border-gray-800"]),
1329
+ children: r
1330
+ });
1331
+ }
1332
+ // src/components/modal/modal_footer_slot_context.ts
1333
+ var Ht = a(null);
1275
1334
  // src/components/modal/modal_header.tsx
1276
- function Lt({ titleId: t, title: n, onDismiss: r, dismissible: i, closeLabel: a, unstyled: o = !1 }) {
1277
- let s = V(), c = a ?? s.close;
1278
- return /* @__PURE__ */ m("div", {
1279
- className: e("flex items-center justify-between flex-shrink-0", !o && "gap-4 px-6 pt-5 pb-4"),
1335
+ function Ut({ titleId: t, title: i, onDismiss: a, dismissible: o, closeLabel: s, unstyled: c = !1 }) {
1336
+ let l = J(), u = s ?? l.close;
1337
+ return /* @__PURE__ */ r("div", {
1338
+ className: e("flex items-center justify-between flex-shrink-0", !c && "gap-4 px-6 pt-5 pb-4"),
1280
1339
  children: [
1281
- /* @__PURE__ */ p("h2", {
1340
+ /* @__PURE__ */ n("h2", {
1282
1341
  id: t,
1283
- className: e(!o && "text-base font-medium tracking-tight text-gray-900 dark:text-gray-100"),
1284
- children: n
1342
+ className: e(!c && "text-base font-medium tracking-tight text-gray-900 dark:text-gray-100"),
1343
+ children: i
1285
1344
  }),
1286
- i && o && /* @__PURE__ */ p(It, {
1345
+ o && c && /* @__PURE__ */ n(Dt, {
1287
1346
  icon: "i-mdi-close",
1288
- onClick: r,
1289
- "aria-label": c,
1347
+ onClick: a,
1348
+ "aria-label": u,
1290
1349
  className: "min-h-6 min-w-6",
1291
1350
  unstyled: !0
1292
1351
  }),
1293
- i && !o && /* @__PURE__ */ p(It, {
1352
+ o && !c && /* @__PURE__ */ n(Dt, {
1294
1353
  icon: "i-mdi-close",
1295
- onClick: r,
1296
- "aria-label": c,
1354
+ onClick: a,
1355
+ "aria-label": u,
1297
1356
  variant: "subtle",
1298
1357
  size: "sm",
1299
1358
  radius: "full",
@@ -1303,65 +1362,65 @@ function Lt({ titleId: t, title: n, onDismiss: r, dismissible: i, closeLabel: a,
1303
1362
  });
1304
1363
  }
1305
1364
  // src/components/modal/use_guarded_dismiss.ts
1306
- function Rt(e) {
1365
+ function Wt(e) {
1307
1366
  try {
1308
1367
  return e();
1309
1368
  } catch (e) {
1310
- return st(e), null;
1369
+ return Ot(e), null;
1311
1370
  }
1312
1371
  }
1313
- function zt({ onDismiss: e, isEnded: t }) {
1314
- let n = u(e), r = u(t), a = u([]), o = u(!1);
1315
- c(() => {
1372
+ function Gt({ onDismiss: e, isEnded: t }) {
1373
+ let n = p(e), r = p(t), i = p([]), a = p(!1);
1374
+ d(() => {
1316
1375
  n.current = e, r.current = t;
1317
1376
  });
1318
- let [s] = d(() => ({ register: (e) => (a.current = [...a.current, e], () => {
1319
- a.current = a.current.filter((t) => t !== e);
1320
- }) })), l = i((e) => {
1321
- o.current = !0, e.then((e) => {
1322
- o.current = !1, e && !r.current && n.current();
1377
+ let [o] = m(() => ({ register: (e) => (i.current = [...i.current, e], () => {
1378
+ i.current = i.current.filter((t) => t !== e);
1379
+ }) })), c = s((e) => {
1380
+ a.current = !0, e.then((e) => {
1381
+ a.current = !1, e && !r.current && n.current();
1323
1382
  }, (e) => {
1324
- o.current = !1, st(e);
1383
+ a.current = !1, Ot(e);
1325
1384
  });
1326
1385
  }, []);
1327
1386
  return {
1328
- dismiss: i(() => {
1329
- if (o.current) return;
1330
- let e = a.current.at(-1);
1387
+ dismiss: s(() => {
1388
+ if (a.current) return;
1389
+ let e = i.current.at(-1);
1331
1390
  if (!e) {
1332
1391
  n.current();
1333
1392
  return;
1334
1393
  }
1335
- let t = Rt(e.current);
1336
- t !== null && (typeof t == "boolean" ? t && n.current() : l(t));
1337
- }, [l]),
1338
- registry: s
1394
+ let t = Wt(e.current);
1395
+ t !== null && (typeof t == "boolean" ? t && n.current() : c(t));
1396
+ }, [c]),
1397
+ registry: o
1339
1398
  };
1340
1399
  }
1341
1400
  // src/components/modal/keyboard_scroll_region_attribute.ts
1342
- var Bt = "data-keyboard-scroll-region", Vt = "a[href], button, input, select, textarea, summary, audio[controls], video[controls], [contenteditable]:not([contenteditable=\"false\"]), [tabindex]";
1343
- function Ht(e) {
1401
+ var Kt = "data-keyboard-scroll-region", qt = "a[href], button, input, select, textarea, summary, audio[controls], video[controls], [contenteditable]:not([contenteditable=\"false\"]), [tabindex]";
1402
+ function Jt(e) {
1344
1403
  return e.matches(":disabled");
1345
1404
  }
1346
- function Ut(e) {
1405
+ function Yt(e) {
1347
1406
  return e.getAttribute("tabindex") === "-1";
1348
1407
  }
1349
- function Wt(e) {
1408
+ function Xt(e) {
1350
1409
  return e.matches("input[type=\"hidden\"]");
1351
1410
  }
1352
- function Gt(e) {
1411
+ function Zt(e) {
1353
1412
  return e.closest("[inert]") !== null;
1354
1413
  }
1355
- function Kt(e) {
1414
+ function Qt(e) {
1356
1415
  return typeof e.checkVisibility != "function" || e.checkVisibility();
1357
1416
  }
1358
- function qt(e) {
1359
- return !Ht(e) && !Ut(e) && !Wt(e) && !Gt(e) && Kt(e);
1417
+ function $t(e) {
1418
+ return !Jt(e) && !Yt(e) && !Xt(e) && !Zt(e) && Qt(e);
1360
1419
  }
1361
- function Jt(e) {
1420
+ function en(e) {
1362
1421
  return e instanceof HTMLInputElement && e.type === "radio" && e.name !== "";
1363
1422
  }
1364
- function Yt(e) {
1423
+ function tn(e) {
1365
1424
  let t = /* @__PURE__ */ new Map();
1366
1425
  for (let n of e) {
1367
1426
  let e = t.get(n.form) ?? /* @__PURE__ */ new Map();
@@ -1371,24 +1430,24 @@ function Yt(e) {
1371
1430
  }
1372
1431
  return Array.from(t.values()).flatMap((e) => Array.from(e.values()));
1373
1432
  }
1374
- function Xt(e) {
1433
+ function nn(e) {
1375
1434
  return e.find((e) => e.checked) ?? e[0];
1376
1435
  }
1377
- function Zt(e) {
1378
- let t = Array.from(e.querySelectorAll(Vt)).filter(qt), n = t.filter(Jt), r = new Set(Yt(n).map(Xt));
1379
- return t.filter((e) => !Jt(e) || r.has(e));
1436
+ function rn(e) {
1437
+ let t = Array.from(e.querySelectorAll(qt)).filter($t), n = t.filter(en), r = new Set(tn(n).map(nn));
1438
+ return t.filter((e) => !en(e) || r.has(e));
1380
1439
  }
1381
1440
  // src/components/modal/use_keyboard_scrollable.ts
1382
- var Qt = {};
1383
- function $t(e) {
1384
- return e.scrollHeight > e.clientHeight && Zt(e).length === 0;
1441
+ var an = {};
1442
+ function on(e) {
1443
+ return e.scrollHeight > e.clientHeight && rn(e).length === 0;
1385
1444
  }
1386
- function en(e, { labelledBy: t, label: n }) {
1387
- let [r, i] = d(!1);
1388
- return o(() => {
1445
+ function sn(e, { labelledBy: t, label: n }) {
1446
+ let [r, i] = m(!1);
1447
+ return l(() => {
1389
1448
  let t = e.current;
1390
1449
  if (!t) return;
1391
- let n = () => i($t(t));
1450
+ let n = () => i(on(t));
1392
1451
  n();
1393
1452
  let r = new MutationObserver(n);
1394
1453
  r.observe(t, {
@@ -1399,77 +1458,77 @@ function en(e, { labelledBy: t, label: n }) {
1399
1458
  return a?.observe(t), () => {
1400
1459
  r.disconnect(), a?.disconnect();
1401
1460
  };
1402
- }, [e]), !r || !(t || n) ? Qt : {
1461
+ }, [e]), !r || !(t || n) ? an : {
1403
1462
  tabIndex: 0,
1404
1463
  role: "region",
1405
- [Bt]: !0,
1464
+ [Kt]: !0,
1406
1465
  "aria-labelledby": t,
1407
1466
  "aria-label": t ? void 0 : n,
1408
- focusClassName: k
1467
+ focusClassName: L
1409
1468
  };
1410
1469
  }
1411
1470
  // src/components/modal/body_scroll_lock.ts
1412
- var tn = "--scrollbar-compensation", nn = 0, rn;
1413
- function an() {
1471
+ var cn = "--scrollbar-compensation", ln = 0, un;
1472
+ function dn() {
1414
1473
  let { style: e } = document.documentElement;
1415
1474
  return {
1416
1475
  overflow: e.overflow,
1417
1476
  overflowX: e.overflowX,
1418
1477
  overflowY: e.overflowY,
1419
1478
  paddingRight: e.paddingRight,
1420
- scrollbarCompensation: e.getPropertyValue(tn)
1479
+ scrollbarCompensation: e.getPropertyValue(cn)
1421
1480
  };
1422
1481
  }
1423
- function on(e) {
1482
+ function fn(e) {
1424
1483
  let { style: t } = document.documentElement;
1425
- t.overflow = e.overflow, t.overflowX = e.overflowX, t.overflowY = e.overflowY, t.paddingRight = e.paddingRight, e.scrollbarCompensation === "" ? t.removeProperty(tn) : t.setProperty(tn, e.scrollbarCompensation);
1484
+ t.overflow = e.overflow, t.overflowX = e.overflowX, t.overflowY = e.overflowY, t.paddingRight = e.paddingRight, e.scrollbarCompensation === "" ? t.removeProperty(cn) : t.setProperty(cn, e.scrollbarCompensation);
1426
1485
  }
1427
- function sn(e, t) {
1486
+ function pn(e, t) {
1428
1487
  let { style: n } = document.documentElement;
1429
- n.paddingRight = `${t + e}px`, n.setProperty(tn, `${e}px`);
1488
+ n.paddingRight = `${t + e}px`, n.setProperty(cn, `${e}px`);
1430
1489
  }
1431
- function cn() {
1432
- if (nn === 0) {
1490
+ function mn() {
1491
+ if (ln === 0) {
1433
1492
  let e = document.documentElement;
1434
- rn = an();
1493
+ un = dn();
1435
1494
  let t = Number.parseFloat(getComputedStyle(e).paddingRight) || 0, n = e.clientWidth;
1436
1495
  e.style.overflow = "hidden";
1437
1496
  let r = e.clientWidth - n;
1438
- r > 0 && sn(r, t);
1497
+ r > 0 && pn(r, t);
1439
1498
  }
1440
- nn += 1;
1499
+ ln += 1;
1441
1500
  }
1442
- function ln() {
1443
- --nn, nn === 0 && rn && (on(rn), rn = void 0);
1501
+ function hn() {
1502
+ --ln, ln === 0 && un && (fn(un), un = void 0);
1444
1503
  }
1445
- function un() {
1446
- o(() => (cn(), ln), []);
1504
+ function gn() {
1505
+ l(() => (mn(), hn), []);
1447
1506
  }
1448
1507
  // src/components/modal/modal_stack.ts
1449
- var dn = [];
1450
- function fn(e) {
1451
- return dn.push(e), () => {
1452
- let t = dn.indexOf(e);
1453
- t !== -1 && dn.splice(t, 1);
1508
+ var _n = [];
1509
+ function vn(e) {
1510
+ return _n.push(e), () => {
1511
+ let t = _n.indexOf(e);
1512
+ t !== -1 && _n.splice(t, 1);
1454
1513
  };
1455
1514
  }
1456
- function pn(e) {
1457
- return dn[dn.length - 1] === e;
1515
+ function yn(e) {
1516
+ return _n[_n.length - 1] === e;
1458
1517
  }
1459
1518
  // src/components/modal/use_modal_dialog.ts
1460
- function mn(e) {
1461
- return Zt(e).filter((e) => !e.hasAttribute(Bt));
1519
+ function bn(e) {
1520
+ return rn(e).filter((e) => !e.hasAttribute(Kt));
1462
1521
  }
1463
- function hn({ dialog: e, content: t, fallbackScope: n }) {
1464
- let r = t ? mn(t)[0] : void 0;
1465
- return r || n === "content" ? r : e ? mn(e)[0] : void 0;
1522
+ function xn({ dialog: e, content: t, fallbackScope: n }) {
1523
+ let r = t ? bn(t)[0] : void 0;
1524
+ return r || n === "content" ? r : e ? bn(e)[0] : void 0;
1466
1525
  }
1467
- function gn(e) {
1468
- let t = hn(e);
1526
+ function Sn(e) {
1527
+ let t = xn(e);
1469
1528
  (e.initialFocusRef?.current ?? t ?? e.dialog)?.focus();
1470
1529
  }
1471
- function _n(e, t) {
1472
- let n = Zt(t);
1530
+ function Cn(e, t) {
1531
+ let n = rn(t);
1473
1532
  if (n.length === 0) {
1474
1533
  e.preventDefault(), t.focus();
1475
1534
  return;
@@ -1477,27 +1536,27 @@ function _n(e, t) {
1477
1536
  let r = n[0], i = n[n.length - 1], a = document.activeElement;
1478
1537
  (a instanceof HTMLElement ? n.indexOf(a) : -1) === -1 ? (e.preventDefault(), (e.shiftKey ? i : r).focus()) : e.shiftKey && a === r ? (e.preventDefault(), i.focus()) : !e.shiftKey && a === i && (e.preventDefault(), r.focus());
1479
1538
  }
1480
- function vn() {
1539
+ function wn() {
1481
1540
  return typeof document > "u" ? null : document.activeElement instanceof HTMLElement ? document.activeElement : null;
1482
1541
  }
1483
- function yn() {
1484
- let [e, t] = d(!1);
1485
- return o(() => {
1542
+ function Tn() {
1543
+ let [e, t] = m(!1);
1544
+ return l(() => {
1486
1545
  let e = requestAnimationFrame(() => {
1487
1546
  requestAnimationFrame(() => t(!0));
1488
1547
  });
1489
1548
  return () => cancelAnimationFrame(e);
1490
1549
  }, []), e;
1491
1550
  }
1492
- function bn(e, { isEnded: t, onDismiss: n, dismissible: r, modalToken: i }) {
1493
- o(() => {
1551
+ function En(e, { isEnded: t, onDismiss: n, dismissible: r, modalToken: i }) {
1552
+ l(() => {
1494
1553
  if (t) return;
1495
1554
  let a = (t) => {
1496
- if (pn(i)) {
1555
+ if (yn(i)) {
1497
1556
  if (t.key === "Escape") {
1498
1557
  if (t.defaultPrevented) return;
1499
1558
  t.preventDefault(), r && n();
1500
- } else t.key === "Tab" && e.current && _n(t, e.current);
1559
+ } else t.key === "Tab" && e.current && Cn(t, e.current);
1501
1560
  }
1502
1561
  };
1503
1562
  return document.addEventListener("keydown", a), () => document.removeEventListener("keydown", a);
@@ -1509,83 +1568,83 @@ function bn(e, { isEnded: t, onDismiss: n, dismissible: r, modalToken: i }) {
1509
1568
  e
1510
1569
  ]);
1511
1570
  }
1512
- function xn({ isEnded: e, onDismiss: t, dismissible: n, initialFocusRef: r, initialFocusFallbackScope: i = "dialog", getFocusFallback: a }) {
1513
- let [s] = d(() => Symbol("modal")), [c, l] = d(null), f = u(null), p = u(null), [m] = d(vn);
1514
- o(() => {
1515
- if (!e) return fn(s);
1516
- }, [e, s]), un();
1517
- let h = yn();
1518
- return o(() => {
1519
- c && !e && gn({
1520
- dialog: f.current,
1521
- content: p.current,
1571
+ function Dn({ isEnded: e, onDismiss: t, dismissible: n, initialFocusRef: r, initialFocusFallbackScope: i = "dialog", getFocusFallback: a }) {
1572
+ let [o] = m(() => Symbol("modal")), [s, c] = m(null), u = p(null), d = p(null), [f] = m(wn);
1573
+ l(() => {
1574
+ if (!e) return vn(o);
1575
+ }, [e, o]), gn();
1576
+ let h = Tn();
1577
+ return l(() => {
1578
+ s && !e && Sn({
1579
+ dialog: u.current,
1580
+ content: d.current,
1522
1581
  initialFocusRef: r,
1523
1582
  fallbackScope: i
1524
1583
  });
1525
- }, [c, e]), o(() => {
1526
- e && (m?.isConnected ? m : a?.())?.focus({ preventScroll: !0 });
1584
+ }, [s, e]), l(() => {
1585
+ e && (f?.isConnected ? f : a?.())?.focus({ preventScroll: !0 });
1527
1586
  }, [
1528
1587
  e,
1529
- m,
1588
+ f,
1530
1589
  a
1531
- ]), bn(f, {
1590
+ ]), En(u, {
1532
1591
  isEnded: e,
1533
1592
  onDismiss: t,
1534
1593
  dismissible: n,
1535
- modalToken: s
1594
+ modalToken: o
1536
1595
  }), {
1537
- dialogRef: f,
1538
- contentRef: p,
1539
- footerSlot: c,
1540
- setFooterSlot: l,
1596
+ dialogRef: u,
1597
+ contentRef: d,
1598
+ footerSlot: s,
1599
+ setFooterSlot: c,
1541
1600
  isVisible: h && !e,
1542
1601
  handleBackdropClick: () => {
1543
1602
  !e && n && t();
1544
1603
  },
1545
1604
  handleBackdropMouseDown: (e) => {
1546
1605
  let t = e.target;
1547
- e.currentTarget.contains(t) && !f.current?.contains(t) && e.preventDefault();
1606
+ e.currentTarget.contains(t) && !u.current?.contains(t) && e.preventDefault();
1548
1607
  }
1549
1608
  };
1550
1609
  }
1551
1610
  // src/stores/global_hotkeys_store/global_hotkeys_store.ts
1552
- var Sn = S((e) => ({
1611
+ var On = S((e) => ({
1553
1612
  globalHotkeysEnabled: !0,
1554
1613
  setGlobalHotkeysEnabled: (t) => e({ globalHotkeysEnabled: t })
1555
- })), Cn = 0;
1556
- function wn() {
1557
- o(() => (Cn += 1, Cn === 1 && Sn.getState().setGlobalHotkeysEnabled(!1), () => {
1558
- --Cn, Cn === 0 && Sn.getState().setGlobalHotkeysEnabled(!0);
1614
+ })), kn = 0;
1615
+ function An() {
1616
+ l(() => (kn += 1, kn === 1 && On.getState().setGlobalHotkeysEnabled(!1), () => {
1617
+ --kn, kn === 0 && On.getState().setGlobalHotkeysEnabled(!0);
1559
1618
  }), []);
1560
1619
  }
1561
1620
  // src/components/drawer/drawer.tsx
1562
- function Tn() {
1621
+ function jn() {
1563
1622
  let e = document.querySelector("main");
1564
1623
  return e && !e.hasAttribute("tabindex") && (e.tabIndex = -1), e;
1565
1624
  }
1566
- function En({ isEnded: t, onDismiss: n, title: r, children: i, footer: a, size: o, side: c, radius: l, className: u, panelClassName: d, backdropClassName: f, unstyled: h = !1, dismissible: g, closeLabel: _, initialFocusRef: v }) {
1567
- wn();
1568
- let y = s(), { dismiss: b, registry: S } = zt({
1569
- onDismiss: n,
1625
+ function Mn({ isEnded: t, onDismiss: i, title: a, children: o, footer: s, size: c, side: l, radius: d, className: f, panelClassName: p, backdropClassName: m, unstyled: h = !1, dismissible: g, closeLabel: _, initialFocusRef: v }) {
1626
+ An();
1627
+ let y = u(), { dismiss: b, registry: S } = Gt({
1628
+ onDismiss: i,
1570
1629
  isEnded: t
1571
- }), { dialogRef: C, contentRef: w, footerSlot: T, setFooterSlot: E, isVisible: D, handleBackdropClick: O, handleBackdropMouseDown: k } = xn({
1630
+ }), { dialogRef: C, contentRef: w, footerSlot: T, setFooterSlot: E, isVisible: D, handleBackdropClick: O, handleBackdropMouseDown: k } = Dn({
1572
1631
  isEnded: t,
1573
1632
  onDismiss: b,
1574
1633
  dismissible: g,
1575
1634
  initialFocusRef: v,
1576
1635
  initialFocusFallbackScope: "content",
1577
- getFocusFallback: Tn
1578
- }), { focusClassName: A, ...j } = en(w, { labelledBy: y });
1579
- return /* @__PURE__ */ p(yt.Provider, {
1636
+ getFocusFallback: jn
1637
+ }), { focusClassName: A, ...j } = sn(w, { labelledBy: y });
1638
+ return /* @__PURE__ */ n(Bt.Provider, {
1580
1639
  value: S,
1581
- children: x(/* @__PURE__ */ m("div", {
1640
+ children: x(/* @__PURE__ */ r("div", {
1582
1641
  className: e("fixed inset-0 z-50", !h && "transition-opacity duration-200 ease-out", D ? "opacity-100" : "opacity-0"),
1583
1642
  onClick: O,
1584
1643
  onMouseDown: k,
1585
- children: [/* @__PURE__ */ p("div", {
1586
- className: e("fixed inset-0", !h && "bg-black/60 backdrop-blur-md", f),
1644
+ children: [/* @__PURE__ */ n("div", {
1645
+ className: e("fixed inset-0", !h && "bg-black/60 backdrop-blur-md", m),
1587
1646
  "aria-hidden": "true"
1588
- }), /* @__PURE__ */ m("div", {
1647
+ }), /* @__PURE__ */ r("div", {
1589
1648
  ref: C,
1590
1649
  role: "dialog",
1591
1650
  "aria-modal": "true",
@@ -1593,174 +1652,174 @@ function En({ isEnded: t, onDismiss: n, title: r, children: i, footer: a, size:
1593
1652
  tabIndex: -1,
1594
1653
  "data-state": D ? "open" : "closed",
1595
1654
  inert: t,
1596
- className: e("fixed inset-y-0 h-full flex flex-col overflow-hidden", gt[c], ht[o], "focus:outline-none", !h && [
1655
+ className: e("fixed inset-y-0 h-full flex flex-col overflow-hidden", Lt[l], It[c], "focus:outline-none", !h && [
1597
1656
  "bg-white dark:bg-gray-900",
1598
1657
  "[&,&_*]:[scrollbar-width:thin] [scrollbar-color:theme(colors.gray.300)_transparent] hover:[scrollbar-color:theme(colors.gray.400)_transparent] dark:[scrollbar-color:theme(colors.gray.600)_transparent] dark:hover:[scrollbar-color:theme(colors.gray.500)_transparent]",
1599
1658
  "shadow-2xl",
1600
- vt[c][l],
1659
+ zt[l][d],
1601
1660
  "ms-drawer-transition"
1602
- ], !D && _t[c], d),
1661
+ ], !D && Rt[l], p),
1603
1662
  onClick: (e) => e.stopPropagation(),
1604
1663
  children: [
1605
- /* @__PURE__ */ p(Lt, {
1664
+ /* @__PURE__ */ n(Ut, {
1606
1665
  titleId: y,
1607
- title: r,
1666
+ title: a,
1608
1667
  onDismiss: b,
1609
1668
  dismissible: g,
1610
1669
  closeLabel: _,
1611
1670
  unstyled: h
1612
1671
  }),
1613
- /* @__PURE__ */ p("div", {
1672
+ /* @__PURE__ */ n("div", {
1614
1673
  ref: w,
1615
1674
  ...j,
1616
- className: e("flex-1 overflow-y-auto min-h-0", !h && "px-6 pb-6 text-sm leading-relaxed text-gray-600 dark:text-gray-400", A, u),
1617
- children: /* @__PURE__ */ p(xt.Provider, {
1675
+ className: e("flex-1 overflow-y-auto min-h-0", !h && "px-6 pb-6 text-sm leading-relaxed text-gray-600 dark:text-gray-400", A, f),
1676
+ children: /* @__PURE__ */ n(Ht.Provider, {
1618
1677
  value: T,
1619
- children: i
1678
+ children: o
1620
1679
  })
1621
1680
  }),
1622
- /* @__PURE__ */ p(bt, {
1681
+ /* @__PURE__ */ n(Vt, {
1623
1682
  onSlotChange: E,
1624
1683
  unstyled: h,
1625
- children: a
1684
+ children: s
1626
1685
  })
1627
1686
  ]
1628
1687
  })]
1629
1688
  }), document.body)
1630
1689
  });
1631
1690
  }
1632
- function Dn(e) {
1633
- let [t, n] = d(!e);
1634
- return e && t && n(!1), o(() => {
1691
+ function Nn(e) {
1692
+ let [t, n] = m(!e);
1693
+ return e && t && n(!1), l(() => {
1635
1694
  if (e) return;
1636
1695
  let t = setTimeout(() => n(!0), 200);
1637
1696
  return () => clearTimeout(t);
1638
1697
  }, [e]), e || !t;
1639
1698
  }
1640
- function On({ isOpen: e, onClose: t, size: n = "md", side: r = "right", radius: i = "none", dismissible: a = !0, ...o }) {
1641
- return Dn(e) ? /* @__PURE__ */ p(En, {
1642
- ...o,
1699
+ function Pn({ isOpen: e, onClose: t, size: r = "md", side: i = "right", radius: a = "none", dismissible: o = !0, ...s }) {
1700
+ return Nn(e) ? /* @__PURE__ */ n(Mn, {
1701
+ ...s,
1643
1702
  isEnded: !e,
1644
1703
  onDismiss: t,
1645
- size: n,
1646
- side: r,
1647
- radius: i,
1648
- dismissible: a
1704
+ size: r,
1705
+ side: i,
1706
+ radius: a,
1707
+ dismissible: o
1649
1708
  }) : null;
1650
1709
  }
1651
1710
  // src/components/shared/use_controlled_length.ts
1652
- function kn(e) {
1711
+ function Fn(e) {
1653
1712
  return typeof e == "string" ? e.length : 0;
1654
1713
  }
1655
- function An(e, t) {
1656
- let [n, r] = d(kn(t)), i = e !== void 0;
1714
+ function In(e, t) {
1715
+ let [n, r] = m(Fn(t)), i = e !== void 0;
1657
1716
  return {
1658
- length: i ? kn(e) : n,
1717
+ length: i ? Fn(e) : n,
1659
1718
  trackLength: (e) => {
1660
1719
  i || r(e.length);
1661
1720
  }
1662
1721
  };
1663
1722
  }
1664
1723
  // src/components/input/input.tsx
1665
- function jn({ label: t, description: n, error: r, showCharCount: i = !1, minLength: a, maxLength: o, radius: s = "md", unstyled: c = !1, className: l, wrapperClassName: u, value: d, defaultValue: f, onChange: h, id: g, "aria-describedby": _, "aria-label": v, ...y }) {
1666
- let { fieldId: b, errorId: x, descriptionId: S, labelId: C, characterCountId: w } = $(g), { length: T, trackLength: E } = An(d, f), D = i && (a !== void 0 || o !== void 0), O = (e) => {
1724
+ function Ln({ label: t, description: i, error: a, showCharCount: o = !1, minLength: s, maxLength: c, radius: l = "md", unstyled: u = !1, className: d, wrapperClassName: f, value: p, defaultValue: m, onChange: h, id: g, "aria-describedby": _, "aria-label": v, ...y }) {
1725
+ let { fieldId: b, errorId: x, descriptionId: S, labelId: C, characterCountId: w } = $(g), { length: T, trackLength: E } = In(p, m), D = o && (s !== void 0 || c !== void 0), O = (e) => {
1667
1726
  E(e.target.value), h?.(e);
1668
1727
  };
1669
- return /* @__PURE__ */ m(Fe, {
1728
+ return /* @__PURE__ */ r(Be, {
1670
1729
  fieldId: b,
1671
1730
  errorId: x,
1672
1731
  descriptionId: S,
1673
1732
  label: t,
1674
- description: n,
1675
- error: r,
1733
+ description: i,
1734
+ error: a,
1676
1735
  required: y.required,
1677
- wrapperClassName: u,
1678
- children: [/* @__PURE__ */ p("input", {
1736
+ wrapperClassName: f,
1737
+ children: [/* @__PURE__ */ n("input", {
1679
1738
  id: b,
1680
- className: e("w-full disabled:opacity-50 disabled:cursor-not-allowed", !c && [
1681
- fe,
1682
- N[s],
1739
+ className: e("w-full disabled:opacity-50 disabled:cursor-not-allowed", !u && [
1740
+ he,
1741
+ H[l],
1683
1742
  "px-3 py-2 text-sm"
1684
- ], !c && r && e("border-red-500 dark:border-red-400", "focus:ring-red-500"), l),
1685
- ...d === void 0 ? { defaultValue: f } : { value: d },
1686
- minLength: a,
1687
- maxLength: o,
1743
+ ], !u && a && e("border-red-500 dark:border-red-400", "focus:ring-red-500"), d),
1744
+ ...p === void 0 ? { defaultValue: m } : { value: p },
1745
+ minLength: s,
1746
+ maxLength: c,
1688
1747
  onChange: O,
1689
- "aria-invalid": !!r,
1748
+ "aria-invalid": !!a,
1690
1749
  "aria-label": v,
1691
- "aria-labelledby": Ie(t, C, v),
1692
- "aria-describedby": Z(_, !!n && S, r && x, D && w),
1750
+ "aria-labelledby": Ve(t, C, v),
1751
+ "aria-describedby": Q(_, !!i && S, a && x, D && w),
1693
1752
  ...y
1694
- }), D && /* @__PURE__ */ p(le, {
1753
+ }), D && /* @__PURE__ */ n(Z, {
1695
1754
  id: w,
1696
1755
  current: T,
1697
- min: a,
1698
- max: o,
1699
- showMin: a !== void 0,
1700
- showMax: o !== void 0
1756
+ min: s,
1757
+ max: c,
1758
+ showMin: s !== void 0,
1759
+ showMax: c !== void 0
1701
1760
  })]
1702
1761
  });
1703
1762
  }
1704
1763
  // src/components/kbd/kbd.tsx
1705
- var Mn = {
1764
+ var Rn = {
1706
1765
  xs: "px-1.5 py-0.5 text-xs",
1707
1766
  sm: "px-2 py-0.5 text-xs",
1708
1767
  md: "px-2.5 py-1 text-sm",
1709
1768
  lg: "px-3 py-1 text-base"
1710
- }, Nn = ({ children: t, size: n = "sm", radius: r = "sm", unstyled: i = !1, className: a }) => /* @__PURE__ */ p("kbd", {
1711
- className: e("inline-flex items-center", Mn[n], !i && [
1769
+ }, zn = ({ children: t, size: r = "sm", radius: i = "sm", unstyled: a = !1, className: o }) => /* @__PURE__ */ n("kbd", {
1770
+ className: e("inline-flex items-center", Rn[r], !a && [
1712
1771
  "border font-semibold uppercase",
1713
1772
  "text-gray-600 dark:text-gray-300",
1714
1773
  "bg-gray-100 dark:bg-gray-700",
1715
1774
  "border-gray-200 dark:border-gray-600",
1716
- N[r]
1717
- ], a),
1775
+ H[i]
1776
+ ], o),
1718
1777
  children: t
1719
- }), Pn = 4;
1720
- function Fn(e, t) {
1778
+ }), Bn = 4;
1779
+ function Vn(e, t) {
1721
1780
  return t === "center" ? e : `${e}-${t}`;
1722
1781
  }
1723
- function In({ trigger: n, children: a, side: c = "bottom", align: l = "start", radius: f = "md", unstyled: h = !1, panelClassName: x, className: S, disabled: C = !1, ref: w }) {
1724
- let T = u(null), [E, D] = d(null), [O, k] = d("first"), { isMounted: A, isVisible: j, setIsVisible: M, open: N, close: P } = tt(), { refs: F, floatingStyles: I, isPositioned: L } = b({
1725
- placement: Fn(c, l),
1782
+ function Hn({ trigger: t, children: a, side: c = "bottom", align: d = "start", radius: f = "md", unstyled: h = !1, panelClassName: x, className: S, disabled: C = !1, ref: w }) {
1783
+ let T = p(null), [E, D] = m(null), [O, k] = m("first"), { isMounted: A, isVisible: j, setIsVisible: M, open: N, close: P } = st(), { refs: F, floatingStyles: I, isPositioned: L } = b({
1784
+ placement: Vn(c, d),
1726
1785
  strategy: "fixed",
1727
1786
  open: A,
1728
1787
  whileElementsMounted: g,
1729
1788
  middleware: [
1730
- v(Pn),
1789
+ v(Bn),
1731
1790
  _(),
1732
1791
  y({ padding: 8 })
1733
1792
  ]
1734
1793
  });
1735
- nt(A, L, M);
1736
- let ee = s(), R = (r(n) ? n.props.id : void 0) ?? ee, z = `${R}-menu`, B = i(() => {
1794
+ ct(A, L, M);
1795
+ let R = u(), z = (o(t) ? t.props.id : void 0) ?? R, B = `${z}-menu`, V = s(() => {
1737
1796
  P(), T.current?.querySelector("button, [href], [tabindex]")?.focus({ preventScroll: !0 });
1738
- }, [P]), V = i((e) => Ee(F.setReference, T, D, w)(e), [F, w]);
1739
- o(() => {
1797
+ }, [P]), H = s((e) => je(F.setReference, T, D, w)(e), [F, w]);
1798
+ l(() => {
1740
1799
  C && A && P();
1741
1800
  }, [
1742
1801
  C,
1743
1802
  A,
1744
1803
  P
1745
1804
  ]);
1746
- let H = {
1747
- id: R,
1805
+ let U = {
1806
+ id: z,
1748
1807
  onClick: (e) => {
1749
- e.stopPropagation(), !C && (j ? P() : (k("first"), N(L)), r(n) && n.props.onClick?.(e));
1808
+ e.stopPropagation(), !C && (j ? P() : (k("first"), N(L)), o(t) && t.props.onClick?.(e));
1750
1809
  },
1751
1810
  onKeyDown: (e) => {
1752
- C || (!j && e.key === "ArrowDown" ? (e.preventDefault(), k("first"), N(L)) : !j && e.key === "ArrowUp" && (e.preventDefault(), k("last"), N(L)), r(n) && n.props.onKeyDown?.(e));
1811
+ C || (!j && e.key === "ArrowDown" ? (e.preventDefault(), k("first"), N(L)) : !j && e.key === "ArrowUp" && (e.preventDefault(), k("last"), N(L)), o(t) && t.props.onKeyDown?.(e));
1753
1812
  },
1754
1813
  "aria-haspopup": "menu",
1755
1814
  "aria-expanded": A,
1756
- "aria-controls": A ? z : void 0
1757
- }, te = r(n) ? t(n, H) : n;
1758
- return /* @__PURE__ */ m("span", {
1759
- ref: V,
1815
+ "aria-controls": A ? B : void 0
1816
+ }, W = o(t) ? i(t, U) : t;
1817
+ return /* @__PURE__ */ r("span", {
1818
+ ref: H,
1760
1819
  className: e("inline-flex", S),
1761
- children: [te, A && /* @__PURE__ */ p(Qe, {
1762
- id: z,
1763
- labelledBy: R,
1820
+ children: [W, A && /* @__PURE__ */ n(it, {
1821
+ id: B,
1822
+ labelledBy: z,
1764
1823
  setFloating: F.setFloating,
1765
1824
  floatingStyles: I,
1766
1825
  isVisible: j,
@@ -1768,272 +1827,272 @@ function In({ trigger: n, children: a, side: c = "bottom", align: l = "start", r
1768
1827
  radius: f,
1769
1828
  unstyled: h,
1770
1829
  panelClassName: x,
1771
- onClose: B,
1830
+ onClose: V,
1772
1831
  initialFocus: O,
1773
- portalTarget: et(E),
1832
+ portalTarget: ot(E),
1774
1833
  children: a
1775
1834
  })]
1776
1835
  });
1777
1836
  }
1778
1837
  // src/components/menu_group/menu_group.tsx
1779
- function Ln({ label: t, children: n, unstyled: r = !1, className: i, wrapperClassName: a }) {
1780
- let o = s();
1781
- return /* @__PURE__ */ m("div", {
1838
+ function Un({ label: t, children: i, unstyled: a = !1, className: o, wrapperClassName: s }) {
1839
+ let c = u();
1840
+ return /* @__PURE__ */ r("div", {
1782
1841
  role: "group",
1783
- "aria-labelledby": o,
1784
- className: a,
1785
- children: [/* @__PURE__ */ p("div", {
1786
- id: o,
1842
+ "aria-labelledby": c,
1843
+ className: s,
1844
+ children: [/* @__PURE__ */ n("div", {
1845
+ id: c,
1787
1846
  role: "presentation",
1788
- className: e(!r && "px-3 pt-2 pb-1 text-xs font-medium text-gray-500 dark:text-gray-400", i),
1847
+ className: e(!a && "px-3 pt-2 pb-1 text-xs font-medium text-gray-500 dark:text-gray-400", o),
1789
1848
  children: t
1790
- }), n]
1849
+ }), i]
1791
1850
  });
1792
1851
  }
1793
1852
  // src/components/menu_item/menu_item_content.tsx
1794
- var Rn = ({ icon: t, danger: n = !1, unstyled: r = !1, children: i }) => /* @__PURE__ */ m(f, { children: [t && /* @__PURE__ */ p("span", {
1795
- className: e(t, "h-4 w-4 flex-shrink-0", !n && !r && "text-gray-500 dark:text-gray-400"),
1853
+ var Wn = ({ icon: i, danger: a = !1, unstyled: o = !1, children: s }) => /* @__PURE__ */ r(t, { children: [i && /* @__PURE__ */ n("span", {
1854
+ className: e(i, "h-4 w-4 flex-shrink-0", !a && !o && "text-gray-500 dark:text-gray-400"),
1796
1855
  "aria-hidden": "true"
1797
- }), i] });
1856
+ }), s] });
1798
1857
  // src/components/menu_item/menu_item_end.tsx
1799
- function zn({ trailing: t, selected: n, unstyled: r = !1 }) {
1800
- let i = n !== void 0;
1801
- return !t && !i ? null : /* @__PURE__ */ m("span", {
1858
+ function Gn({ trailing: t, selected: i, unstyled: a = !1 }) {
1859
+ let o = i !== void 0;
1860
+ return !t && !o ? null : /* @__PURE__ */ r("span", {
1802
1861
  className: "ml-auto flex flex-shrink-0 items-center gap-2 pl-2",
1803
- children: [t && /* @__PURE__ */ p("span", {
1804
- className: e(!r && "text-xs text-gray-500 dark:text-gray-400"),
1862
+ children: [t && /* @__PURE__ */ n("span", {
1863
+ className: e(!a && "text-xs text-gray-500 dark:text-gray-400"),
1805
1864
  children: t
1806
- }), i && /* @__PURE__ */ p("span", {
1807
- className: e("i-mdi-check h-4 w-4", !r && "text-blue-600 dark:text-blue-400", !n && "invisible"),
1865
+ }), o && /* @__PURE__ */ n("span", {
1866
+ className: e("i-mdi-check h-4 w-4", !a && "text-blue-600 dark:text-blue-400", !i && "invisible"),
1808
1867
  "aria-hidden": "true"
1809
1868
  })]
1810
1869
  });
1811
1870
  }
1812
1871
  // src/components/menu_item/menu_item_styles.ts
1813
- var Bn = "flex w-full cursor-pointer items-center whitespace-nowrap text-left", Vn = "gap-2 px-3 py-2 text-sm transition-colors", Hn = {
1872
+ var Kn = "flex w-full cursor-pointer items-center whitespace-nowrap text-left", qn = "gap-2 px-3 py-2 text-sm transition-colors", Jn = {
1814
1873
  default: "text-gray-900 dark:text-gray-100 focus-visible:bg-blue-50 dark:focus-visible:bg-blue-900/40",
1815
1874
  danger: "text-red-700 dark:text-red-400 focus-visible:bg-red-50 dark:focus-visible:bg-red-950/40"
1816
1875
  };
1817
- function Un({ hoverClasses: t, stateClasses: n, danger: r, unstyled: i, radius: a, className: o }) {
1876
+ function Yn({ hoverClasses: t, stateClasses: n, danger: r, unstyled: i, radius: a, className: o }) {
1818
1877
  let s = r ? "danger" : "default";
1819
- return e(Bn, !i && [
1878
+ return e(Kn, !i && [
1820
1879
  "outline-hidden focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-blue-500 dark:focus-visible:outline-blue-400",
1821
- Vn,
1822
- Hn[s],
1880
+ qn,
1881
+ Jn[s],
1823
1882
  t[s],
1824
- a && N[a]
1883
+ a && H[a]
1825
1884
  ], n, o);
1826
1885
  }
1827
1886
  // src/components/menu_item/menu_item_button.tsx
1828
- var Wn = {
1887
+ var Xn = {
1829
1888
  default: "hover:enabled:bg-gray-50 dark:hover:enabled:bg-gray-800/60",
1830
1889
  danger: "hover:enabled:bg-red-50 dark:hover:enabled:bg-red-950/40"
1831
- }, Gn = ["disabled:cursor-not-allowed disabled:opacity-50"];
1832
- function Kn({ icon: e, trailing: t, onClick: n, selected: r, danger: i = !1, disabled: a = !1, children: o, radius: s, unstyled: c = !1, className: l, ref: u }) {
1833
- let d = We();
1834
- return /* @__PURE__ */ m("button", {
1835
- ref: u,
1890
+ }, Zn = ["disabled:cursor-not-allowed disabled:opacity-50"];
1891
+ function Qn({ icon: e, trailing: t, onClick: i, selected: a, danger: o = !1, disabled: s = !1, children: c, radius: l, unstyled: u = !1, className: d, ref: f }) {
1892
+ let p = Xe();
1893
+ return /* @__PURE__ */ r("button", {
1894
+ ref: f,
1836
1895
  type: "button",
1837
- role: r === void 0 ? "menuitem" : "menuitemradio",
1838
- "aria-checked": r,
1896
+ role: a === void 0 ? "menuitem" : "menuitemradio",
1897
+ "aria-checked": a,
1839
1898
  tabIndex: -1,
1840
1899
  onClick: (e) => {
1841
- e.stopPropagation(), n(e), d?.();
1900
+ e.stopPropagation(), i(e), p?.();
1842
1901
  },
1843
- disabled: a,
1844
- className: Un({
1845
- hoverClasses: Wn,
1846
- stateClasses: Gn,
1847
- danger: i,
1848
- unstyled: c,
1849
- radius: s,
1850
- className: l
1902
+ disabled: s,
1903
+ className: Yn({
1904
+ hoverClasses: Xn,
1905
+ stateClasses: Zn,
1906
+ danger: o,
1907
+ unstyled: u,
1908
+ radius: l,
1909
+ className: d
1851
1910
  }),
1852
- children: [/* @__PURE__ */ p(Rn, {
1911
+ children: [/* @__PURE__ */ n(Wn, {
1853
1912
  icon: e,
1854
- danger: i,
1855
- unstyled: c,
1856
- children: o
1857
- }), /* @__PURE__ */ p(zn, {
1913
+ danger: o,
1914
+ unstyled: u,
1915
+ children: c
1916
+ }), /* @__PURE__ */ n(Gn, {
1858
1917
  trailing: t,
1859
- selected: r,
1860
- unstyled: c
1918
+ selected: a,
1919
+ unstyled: u
1861
1920
  })]
1862
1921
  });
1863
1922
  }
1864
1923
  // src/components/menu_item/menu_item_link.tsx
1865
- var qn = "_blank", Jn = "noopener noreferrer", Yn = {
1924
+ var $n = "_blank", er = "noopener noreferrer", tr = {
1866
1925
  default: "hover:bg-gray-50 dark:hover:bg-gray-800/60",
1867
1926
  danger: "hover:bg-red-50 dark:hover:bg-red-950/40"
1868
- }, Xn = ["no-underline", "aria-disabled:pointer-events-none aria-disabled:cursor-not-allowed aria-disabled:opacity-50"];
1869
- function Zn({ icon: e, trailing: t, href: n, target: r, rel: i, danger: a = !1, disabled: o = !1, children: s, radius: c, unstyled: l = !1, className: u, ref: d }) {
1870
- let f = We();
1871
- return /* @__PURE__ */ m("a", {
1872
- ref: d,
1927
+ }, nr = ["no-underline", "aria-disabled:pointer-events-none aria-disabled:cursor-not-allowed aria-disabled:opacity-50"];
1928
+ function rr({ icon: e, trailing: t, href: i, target: a, rel: o, danger: s = !1, disabled: c = !1, children: l, radius: u, unstyled: d = !1, className: f, ref: p }) {
1929
+ let m = Xe();
1930
+ return /* @__PURE__ */ r("a", {
1931
+ ref: p,
1873
1932
  role: "menuitem",
1874
1933
  tabIndex: -1,
1875
- href: o ? void 0 : n,
1876
- target: r,
1877
- rel: i ?? (r === qn ? Jn : void 0),
1878
- "aria-disabled": o || void 0,
1934
+ href: c ? void 0 : i,
1935
+ target: a,
1936
+ rel: o ?? (a === $n ? er : void 0),
1937
+ "aria-disabled": c || void 0,
1879
1938
  onClick: (e) => {
1880
- e.stopPropagation(), f?.();
1939
+ e.stopPropagation(), m?.();
1881
1940
  },
1882
- className: Un({
1883
- hoverClasses: Yn,
1884
- stateClasses: Xn,
1885
- danger: a,
1886
- unstyled: l,
1887
- radius: c,
1888
- className: u
1941
+ className: Yn({
1942
+ hoverClasses: tr,
1943
+ stateClasses: nr,
1944
+ danger: s,
1945
+ unstyled: d,
1946
+ radius: u,
1947
+ className: f
1889
1948
  }),
1890
- children: [/* @__PURE__ */ p(Rn, {
1949
+ children: [/* @__PURE__ */ n(Wn, {
1891
1950
  icon: e,
1892
- danger: a,
1893
- unstyled: l,
1894
- children: s
1895
- }), /* @__PURE__ */ p(zn, {
1951
+ danger: s,
1952
+ unstyled: d,
1953
+ children: l
1954
+ }), /* @__PURE__ */ n(Gn, {
1896
1955
  trailing: t,
1897
- unstyled: l
1956
+ unstyled: d
1898
1957
  })]
1899
1958
  });
1900
1959
  }
1901
1960
  // src/components/menu_item/menu_item.tsx
1902
- function Qn(e) {
1903
- return e.href === void 0 ? /* @__PURE__ */ p(Kn, { ...e }) : /* @__PURE__ */ p(Zn, { ...e });
1961
+ function ir(e) {
1962
+ return e.href === void 0 ? /* @__PURE__ */ n(Qn, { ...e }) : /* @__PURE__ */ n(rr, { ...e });
1904
1963
  }
1905
1964
  // src/components/menu_separator/menu_separator.tsx
1906
- var $n = ({ unstyled: t = !1, className: n }) => /* @__PURE__ */ p("hr", {
1965
+ var ar = ({ unstyled: t = !1, className: r }) => /* @__PURE__ */ n("hr", {
1907
1966
  "aria-orientation": "horizontal",
1908
- className: e("w-full", !t && ["my-1 border-0 border-t", "border-gray-100 dark:border-gray-800"], n)
1909
- }), er = {
1967
+ className: e("w-full", !t && ["my-1 border-0 border-t", "border-gray-100 dark:border-gray-800"], r)
1968
+ }), or = {
1910
1969
  danger: "i-mdi-alert-circle",
1911
1970
  primary: "i-mdi-help-circle",
1912
1971
  success: "i-mdi-check-circle"
1913
- }, tr = {
1972
+ }, sr = {
1914
1973
  danger: "bg-red-50 text-red-600 dark:bg-red-500/10 dark:text-red-400",
1915
1974
  primary: "bg-blue-50 text-blue-600 dark:bg-blue-500/10 dark:text-blue-400",
1916
1975
  success: "bg-green-50 text-green-600 dark:bg-green-500/10 dark:text-green-400"
1917
1976
  };
1918
- function nr({ title: t, color: n }) {
1919
- return /* @__PURE__ */ m("div", {
1977
+ function cr({ title: t, color: i }) {
1978
+ return /* @__PURE__ */ r("div", {
1920
1979
  className: "flex items-center gap-3",
1921
- children: [/* @__PURE__ */ p("span", {
1922
- className: e("flex h-9 w-9 shrink-0 items-center justify-center rounded-full", tr[n]),
1980
+ children: [/* @__PURE__ */ n("span", {
1981
+ className: e("flex h-9 w-9 shrink-0 items-center justify-center rounded-full", sr[i]),
1923
1982
  "aria-hidden": "true",
1924
- children: /* @__PURE__ */ p("span", { className: e(er[n], "h-5 w-5") })
1983
+ children: /* @__PURE__ */ n("span", { className: e(or[i], "h-5 w-5") })
1925
1984
  }), t]
1926
1985
  });
1927
1986
  }
1928
1987
  // src/components/modal/modal_shell.tsx
1929
- var rr = "a dialog needs an accessible name. Provide a non-empty `title` or `aria-label` prop.", ir = {
1988
+ var lr = "a dialog needs an accessible name. Provide a non-empty `title` or `aria-label` prop.", ur = {
1930
1989
  sm: "max-w-md",
1931
1990
  md: "max-w-lg",
1932
1991
  lg: "max-w-2xl",
1933
1992
  xl: "max-w-4xl"
1934
- }, ar = {
1993
+ }, dr = {
1935
1994
  auto: "",
1936
1995
  fixed: "ms-modal-height-fixed"
1937
- }, or = {
1996
+ }, fr = {
1938
1997
  auto: "overflow-y-auto",
1939
1998
  fixed: "overflow-hidden flex flex-col"
1940
1999
  };
1941
- function sr({ isEnded: t, onDismiss: n, title: r, children: i, footer: a, size: o = "md", height: c = "auto", radius: l = "xl", className: u, panelClassName: d, backdropClassName: f, unstyled: h = !1, dismissible: g = !0, closeLabel: _, role: v = "dialog", initialFocusRef: y, "aria-label": b }) {
1942
- let S = s(), C = s(), { dialogRef: w, contentRef: T, footerSlot: E, setFooterSlot: D, isVisible: O, handleBackdropClick: k, handleBackdropMouseDown: A } = xn({
2000
+ function pr({ isEnded: t, onDismiss: i, title: a, children: o, footer: s, size: c = "md", height: l = "auto", radius: d = "xl", className: f, panelClassName: p, backdropClassName: m, unstyled: h = !1, dismissible: g = !0, closeLabel: _, role: v = "dialog", initialFocusRef: y, "aria-label": b }) {
2001
+ let S = u(), C = u(), { dialogRef: w, contentRef: T, footerSlot: E, setFooterSlot: D, isVisible: O, handleBackdropClick: k, handleBackdropMouseDown: A } = Dn({
1943
2002
  isEnded: t,
1944
- onDismiss: n,
2003
+ onDismiss: i,
1945
2004
  dismissible: g,
1946
2005
  initialFocusRef: y
1947
2006
  });
1948
- Te("Modal", !!r || !!b?.trim(), rr);
1949
- let { focusClassName: j, ...M } = en(T, {
1950
- labelledBy: r ? S : void 0,
2007
+ Ae("Modal", !!a || !!b?.trim(), lr);
2008
+ let { focusClassName: j, ...M } = sn(T, {
2009
+ labelledBy: a ? S : void 0,
1951
2010
  label: b
1952
- }), P = c === "auto", F = v === "alertdialog" && !!i;
1953
- return x(/* @__PURE__ */ m("div", {
2011
+ }), N = l === "auto", P = v === "alertdialog" && !!o;
2012
+ return x(/* @__PURE__ */ r("div", {
1954
2013
  className: e("fixed inset-0 z-50 flex items-start justify-center", "ms-modal-backdrop-padding", !h && "transition-opacity duration-200 ease-out", O ? "opacity-100" : "opacity-0"),
1955
2014
  onClick: k,
1956
2015
  onMouseDown: A,
1957
- children: [/* @__PURE__ */ p("div", {
2016
+ children: [/* @__PURE__ */ n("div", {
1958
2017
  className: e("fixed inset-0", !h && [
1959
2018
  "bg-black/60 backdrop-blur-md",
1960
2019
  "transition-opacity duration-200 ease-out",
1961
2020
  O ? "opacity-100" : "opacity-0"
1962
- ], f),
2021
+ ], m),
1963
2022
  "aria-hidden": "true"
1964
- }), /* @__PURE__ */ m("div", {
2023
+ }), /* @__PURE__ */ r("div", {
1965
2024
  ref: w,
1966
2025
  role: v,
1967
2026
  "aria-modal": "true",
1968
- "aria-labelledby": r ? S : void 0,
1969
- "aria-label": r ? void 0 : b,
1970
- "aria-describedby": F ? C : void 0,
2027
+ "aria-labelledby": a ? S : void 0,
2028
+ "aria-label": a ? void 0 : b,
2029
+ "aria-describedby": P ? C : void 0,
1971
2030
  tabIndex: -1,
1972
2031
  "data-state": O ? "open" : "closed",
1973
- className: e("relative w-full", ir[o], ar[c], "ms-modal-max-height overflow-hidden flex flex-col", "focus:outline-none", !h && [
2032
+ className: e("relative w-full", ur[c], dr[l], "ms-modal-max-height overflow-hidden flex flex-col", "focus:outline-none", !h && [
1974
2033
  "bg-white dark:bg-gray-900",
1975
2034
  "[&,&_*]:[scrollbar-width:thin] [scrollbar-color:theme(colors.gray.300)_transparent] hover:[scrollbar-color:theme(colors.gray.400)_transparent] dark:[scrollbar-color:theme(colors.gray.600)_transparent] dark:hover:[scrollbar-color:theme(colors.gray.500)_transparent]",
1976
2035
  "shadow-2xl",
1977
- N[l],
2036
+ H[d],
1978
2037
  "transition-all duration-200 ease-out",
1979
2038
  O ? "opacity-100" : "ms-modal-panel-closed"
1980
- ], d),
2039
+ ], p),
1981
2040
  onClick: (e) => e.stopPropagation(),
1982
2041
  children: [
1983
- r && /* @__PURE__ */ p(Lt, {
2042
+ a && /* @__PURE__ */ n(Ut, {
1984
2043
  titleId: S,
1985
- title: r,
1986
- onDismiss: n,
2044
+ title: a,
2045
+ onDismiss: i,
1987
2046
  dismissible: g,
1988
2047
  closeLabel: _,
1989
2048
  unstyled: h
1990
2049
  }),
1991
- /* @__PURE__ */ p("div", {
2050
+ /* @__PURE__ */ n("div", {
1992
2051
  ref: T,
1993
- id: F ? C : void 0,
1994
- ...P ? M : void 0,
1995
- className: e("flex-1 min-h-0", !h && "px-6 pb-6 text-sm leading-relaxed text-gray-600 dark:text-gray-400", or[c], !h && !r && "pt-6", P && j, u),
1996
- children: /* @__PURE__ */ p(xt.Provider, {
2052
+ id: P ? C : void 0,
2053
+ ...N ? M : void 0,
2054
+ className: e("flex-1 min-h-0", !h && "px-6 pb-6 text-sm leading-relaxed text-gray-600 dark:text-gray-400", fr[l], !h && !a && "pt-6", N && j, f),
2055
+ children: /* @__PURE__ */ n(Ht.Provider, {
1997
2056
  value: E,
1998
- children: i
2057
+ children: o
1999
2058
  })
2000
2059
  }),
2001
- /* @__PURE__ */ p(bt, {
2060
+ /* @__PURE__ */ n(Vt, {
2002
2061
  onSlotChange: D,
2003
2062
  unstyled: h,
2004
- children: a
2063
+ children: s
2005
2064
  })
2006
2065
  ]
2007
2066
  })]
2008
2067
  }), document.body);
2009
2068
  }
2010
2069
  // src/components/modal/confirm_modal.tsx
2011
- var cr = C(({ call: e, title: t, children: n, confirmLabel: r, cancelLabel: i, confirmColor: a, radius: o, closeLabel: s, onConfirm: c, onError: l }) => {
2012
- wn();
2013
- let [h, g] = d(!1), _ = u(null), v = () => e.end(!1), y = async () => {
2014
- if (!c) e.end(!0);
2070
+ var mr = C(({ call: e, title: i, children: a, confirmLabel: o, cancelLabel: s, confirmColor: c, radius: l, closeLabel: u, onConfirm: d, onError: f }) => {
2071
+ An();
2072
+ let [h, g] = m(!1), _ = p(null), v = () => e.end(!1), y = async () => {
2073
+ if (!d) e.end(!0);
2015
2074
  else {
2016
2075
  g(!0);
2017
2076
  try {
2018
- await c(), e.end(!0);
2077
+ await d(), e.end(!0);
2019
2078
  } catch (e) {
2020
- g(!1), st(e, l);
2079
+ g(!1), Ot(e, f);
2021
2080
  }
2022
2081
  }
2023
- }, b = V(), x = r ?? b.confirm, S = i ?? b.cancel, C = a ?? "primary";
2024
- return /* @__PURE__ */ p(sr, {
2082
+ }, b = J(), x = o ?? b.confirm, S = s ?? b.cancel, C = c ?? "primary";
2083
+ return /* @__PURE__ */ n(pr, {
2025
2084
  isEnded: e.ended,
2026
2085
  onDismiss: v,
2027
- title: /* @__PURE__ */ p(nr, {
2028
- title: t,
2086
+ title: /* @__PURE__ */ n(cr, {
2087
+ title: i,
2029
2088
  color: C
2030
2089
  }),
2031
2090
  size: "sm",
2032
- radius: o,
2033
- closeLabel: s,
2091
+ radius: l,
2092
+ closeLabel: u,
2034
2093
  role: "alertdialog",
2035
2094
  initialFocusRef: _,
2036
- footer: /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p(U, {
2095
+ footer: /* @__PURE__ */ r(t, { children: [/* @__PURE__ */ n(Y, {
2037
2096
  ref: _,
2038
2097
  variant: "outline",
2039
2098
  color: "neutral",
@@ -2041,7 +2100,7 @@ var cr = C(({ call: e, title: t, children: n, confirmLabel: r, cancelLabel: i, c
2041
2100
  disabled: h,
2042
2101
  size: "sm",
2043
2102
  children: S
2044
- }), /* @__PURE__ */ p(U, {
2103
+ }), /* @__PURE__ */ n(Y, {
2045
2104
  color: C,
2046
2105
  onClick: () => {
2047
2106
  y();
@@ -2050,68 +2109,68 @@ var cr = C(({ call: e, title: t, children: n, confirmLabel: r, cancelLabel: i, c
2050
2109
  size: "sm",
2051
2110
  children: x
2052
2111
  })] }),
2053
- children: n
2112
+ children: a
2054
2113
  });
2055
2114
  }, 200);
2056
2115
  // src/components/modal/modal.tsx
2057
- function lr(e, t) {
2116
+ function hr(e, t) {
2058
2117
  return typeof e == "function" ? e(t) : e;
2059
2118
  }
2060
- var ur = C(({ call: e, title: t, children: n, size: r, height: i, radius: a, className: o, panelClassName: s, backdropClassName: c, unstyled: l, dismissible: u, closeLabel: d, role: f, initialFocusRef: m, "aria-label": h }) => {
2061
- wn();
2062
- let { dismiss: g, registry: _ } = zt({
2119
+ var gr = C(({ call: e, title: t, children: r, size: i, height: a, radius: o, className: s, panelClassName: c, backdropClassName: l, unstyled: u, dismissible: d, closeLabel: f, role: p, initialFocusRef: m, "aria-label": h }) => {
2120
+ An();
2121
+ let { dismiss: g, registry: _ } = Gt({
2063
2122
  onDismiss: () => e.end(),
2064
2123
  isEnded: e.ended
2065
2124
  });
2066
- return /* @__PURE__ */ p(yt.Provider, {
2125
+ return /* @__PURE__ */ n(Bt.Provider, {
2067
2126
  value: _,
2068
- children: /* @__PURE__ */ p(sr, {
2127
+ children: /* @__PURE__ */ n(pr, {
2069
2128
  isEnded: e.ended,
2070
2129
  onDismiss: g,
2071
2130
  title: t,
2072
- size: r,
2073
- height: i,
2074
- radius: a,
2075
- className: o,
2076
- panelClassName: s,
2077
- backdropClassName: c,
2078
- unstyled: l,
2079
- dismissible: u,
2080
- closeLabel: d,
2081
- role: f,
2131
+ size: i,
2132
+ height: a,
2133
+ radius: o,
2134
+ className: s,
2135
+ panelClassName: c,
2136
+ backdropClassName: l,
2137
+ unstyled: u,
2138
+ dismissible: d,
2139
+ closeLabel: f,
2140
+ role: p,
2082
2141
  initialFocusRef: m,
2083
2142
  "aria-label": h,
2084
- children: lr(n, g)
2143
+ children: hr(r, g)
2085
2144
  })
2086
2145
  });
2087
2146
  }, 200);
2088
2147
  // src/components/modal/modal_footer.tsx
2089
- function dr({ children: e }) {
2090
- let t = a(xt);
2148
+ function _r({ children: e }) {
2149
+ let t = c(Ht);
2091
2150
  return t ? x(e, t) : null;
2092
2151
  }
2093
2152
  // src/components/modal/use_dismiss_guard.ts
2094
- function fr(e, t = !0) {
2095
- let n = a(yt), r = u(e);
2096
- if (c(() => {
2153
+ function vr(e, t = !0) {
2154
+ let n = c(Bt), r = p(e);
2155
+ if (d(() => {
2097
2156
  r.current = e;
2098
- }), o(() => {
2157
+ }), l(() => {
2099
2158
  if (n && t) return n.register(r);
2100
2159
  }, [n, t]), !n) throw Error("useDismissGuard must be used inside a Modal or a Drawer");
2101
2160
  }
2102
2161
  // src/components/modal_provider/modal_provider.tsx
2103
- function pr() {
2104
- return /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p(ur, {}), /* @__PURE__ */ p(cr, {})] });
2162
+ function yr() {
2163
+ return /* @__PURE__ */ r(t, { children: [/* @__PURE__ */ n(gr, {}), /* @__PURE__ */ n(mr, {})] });
2105
2164
  }
2106
2165
  // src/components/multi_combobox/multi_combobox.tsx
2107
- var mr = 2;
2108
- function hr(e, t, n, r) {
2166
+ var br = 2;
2167
+ function xr(e, t, n, r) {
2109
2168
  return r?.(e, t) ? !0 : n === void 0 || t.includes(e) ? !1 : t.length >= n;
2110
2169
  }
2111
- function gr(e, t) {
2170
+ function Sr(e, t) {
2112
2171
  return e.includes(t) ? e.filter((e) => e !== t) : [...e, t];
2113
2172
  }
2114
- function _r(e, t) {
2173
+ function Cr(e, t) {
2115
2174
  if (e.length <= t) return {
2116
2175
  visibleOptions: e,
2117
2176
  hiddenCount: 0
@@ -2122,144 +2181,148 @@ function _r(e, t) {
2122
2181
  hiddenCount: e.length - n
2123
2182
  };
2124
2183
  }
2125
- function vr(e, t, n) {
2184
+ function wr(e, t, n) {
2126
2185
  return typeof e == "string" ? `${e}, ${n}` : t ? `${t}, ${n}` : n;
2127
2186
  }
2128
- var yr = "inline-flex items-center rounded-full bg-gray-200 dark:bg-gray-700 px-2 py-0.5 text-xs text-gray-900 dark:text-gray-100";
2129
- function br({ options: t, label: n, description: r, "aria-label": a, error: s, placeholder: c, searchPlaceholder: h, noResultsText: g, clearLabel: _, clearText: v, maxSelectedValues: y, isOptionDisabled: b, maxDisplayedValues: x = mr, formatOverflowCount: S, formatSelectedCount: C, formatMaxSelectedHint: w, radius: T = "sm", unstyled: E = !1, disabled: D = !1, required: O = !1, className: k, wrapperClassName: j, values: M, defaultValues: F = [], onChange: I, onDropdownClose: L, id: ee }) {
2130
- let R = V(), { fieldId: z, errorId: B, descriptionId: H, labelId: te } = $(ee), U = `${z}-listbox`, ne = `${z}-max-hint`, re = `${z}-selection`, ie = n !== void 0 || !!a, W = u(null), ae = u(null), G = u(null), [K, q] = Ce(M, F), [oe, se] = d(""), [J, ce] = d(!1), Y = l(() => {
2131
- let e = oe.trim().toLowerCase();
2132
- return e ? t.filter((t) => t.label.toLowerCase().includes(e)) : t;
2133
- }, [t, oe]), { activeIndex: le, activeOptionId: ue, move: de, first: pe, last: me, reset: he } = ze({
2134
- optionCount: Y.length,
2135
- getOptionId: (e) => `${U}-option-${e}`,
2136
- isOpen: J
2137
- }), ge = l(() => t.filter((e) => K.includes(e.value)), [t, K]), _e = ie && ge.length > 0, { visibleOptions: ve, hiddenCount: ye } = _r(ge, x), be = () => {
2138
- D || ce(!0);
2139
- }, X = i(() => {
2140
- ce(!1), se(""), he(), L?.(K);
2187
+ function Tr(e, t) {
2188
+ return e.label.toLowerCase().includes(t.trim().toLowerCase());
2189
+ }
2190
+ var Er = "inline-flex items-center rounded-full bg-gray-200 dark:bg-gray-700 px-2 py-0.5 text-xs text-gray-900 dark:text-gray-100";
2191
+ function Dr({ options: i, filterOption: a = Tr, label: o, description: c, "aria-label": u, error: d, placeholder: h, searchPlaceholder: g, noResultsText: _, clearLabel: v, clearText: y, maxSelectedValues: b, isOptionDisabled: x, maxDisplayedValues: S = br, formatOverflowCount: C, formatSelectedCount: w, formatMaxSelectedHint: T, radius: E = "sm", unstyled: D = !1, disabled: O = !1, required: k = !1, className: A, wrapperClassName: j, values: M, defaultValues: N = [], onChange: P, onDropdownClose: F, id: I }) {
2192
+ let L = J(), { fieldId: z, errorId: B, descriptionId: V, labelId: W } = $(I), G = `${z}-listbox`, ee = `${z}-max-hint`, te = `${z}-selection`, ne = o !== void 0 || !!u, re = p(null), ie = p(null), K = p(null), [q, ae] = Oe(M, N), [Y, oe] = m(""), [X, se] = m(!1), ce = f(() => Y.trim() ? i.filter((e) => a(e, Y)) : i, [
2193
+ i,
2194
+ a,
2195
+ Y
2196
+ ]), { activeIndex: le, activeOptionId: ue, move: de, first: fe, last: Z, reset: pe } = We({
2197
+ optionCount: ce.length,
2198
+ getOptionId: (e) => `${G}-option-${e}`,
2199
+ isOpen: X
2200
+ }), me = f(() => i.filter((e) => q.includes(e.value)), [i, q]), ge = ne && me.length > 0, { visibleOptions: _e, hiddenCount: ve } = Cr(me, S), ye = () => {
2201
+ O || se(!0);
2202
+ }, be = s(() => {
2203
+ se(!1), oe(""), pe(), F?.(q);
2141
2204
  }, [
2142
- he,
2143
- L,
2144
- K
2205
+ pe,
2206
+ F,
2207
+ q
2145
2208
  ]), xe = () => {
2146
- J ? X() : be();
2209
+ X ? be() : ye();
2147
2210
  }, Se = (e) => {
2148
- if (hr(e, K, y, b)) return;
2149
- let t = gr(K, e);
2150
- q(t), I?.(t);
2151
- }, Q = () => {
2152
- q([]), I?.([]);
2211
+ if (xr(e, q, b, x)) return;
2212
+ let t = Sr(q, e);
2213
+ ae(t), P?.(t);
2214
+ }, Ce = () => {
2215
+ ae([]), P?.([]);
2153
2216
  }, we = (e) => {
2154
- e.stopPropagation(), Q(), J || L?.([]), W.current?.focus();
2217
+ e.stopPropagation(), Ce(), X || F?.([]), re.current?.focus();
2155
2218
  }, Te = () => {
2156
- Q(), G.current?.focus();
2219
+ Ce(), K.current?.focus();
2157
2220
  }, Ee = () => {
2158
- D || xe();
2221
+ O || xe();
2159
2222
  }, De = (e) => {
2160
- se(e.target.value), he();
2161
- }, Oe = (e) => {
2162
- e.preventDefault(), J ? de(1) : (be(), pe());
2223
+ oe(e.target.value), pe();
2163
2224
  }, ke = (e) => {
2164
- e.preventDefault(), J ? de(-1) : (be(), me());
2225
+ e.preventDefault(), X ? de(1) : (ye(), fe());
2165
2226
  }, Ae = (e) => {
2166
- if (!J) return;
2227
+ e.preventDefault(), X ? de(-1) : (ye(), Z());
2228
+ }, je = (e) => {
2229
+ if (!X) return;
2167
2230
  e.preventDefault();
2168
- let t = Y[le];
2231
+ let t = ce[le];
2169
2232
  t && Se(t.value);
2170
- }, je = (e) => {
2171
- J && (e.preventDefault(), X(), W.current?.focus());
2172
2233
  }, Me = (e) => {
2173
- if (e.key === "ArrowDown") return Oe(e);
2174
- if (e.key === "ArrowUp") return ke(e);
2175
- if (e.key === "Enter") return Ae(e);
2176
- if (e.key === "Escape") return je(e);
2234
+ X && (e.preventDefault(), be(), re.current?.focus());
2235
+ }, Ne = (e) => {
2236
+ if (e.key === "ArrowDown") return ke(e);
2237
+ if (e.key === "ArrowUp") return Ae(e);
2238
+ if (e.key === "Enter") return je(e);
2239
+ if (e.key === "Escape") return Me(e);
2177
2240
  };
2178
- return o(() => {
2179
- if (!J) return;
2241
+ return l(() => {
2242
+ if (!X) return;
2180
2243
  let e = (e) => {
2181
- ae.current && !ae.current.contains(e.target) && X();
2244
+ ie.current && !ie.current.contains(e.target) && be();
2182
2245
  };
2183
2246
  return document.addEventListener("mousedown", e), () => document.removeEventListener("mousedown", e);
2184
- }, [J, X]), /* @__PURE__ */ p(Fe, {
2247
+ }, [X, be]), /* @__PURE__ */ n(Be, {
2185
2248
  fieldId: z,
2186
2249
  errorId: B,
2187
- descriptionId: H,
2188
- label: n,
2189
- description: r,
2190
- error: s,
2191
- required: O,
2250
+ descriptionId: V,
2251
+ label: o,
2252
+ description: c,
2253
+ error: d,
2254
+ required: k,
2192
2255
  wrapperClassName: j,
2193
- children: /* @__PURE__ */ m("div", {
2194
- ref: ae,
2256
+ children: /* @__PURE__ */ r("div", {
2257
+ ref: ie,
2195
2258
  className: "relative",
2196
2259
  onBlur: (e) => {
2197
- if (!J) return;
2260
+ if (!X) return;
2198
2261
  let t = e.relatedTarget;
2199
- t instanceof Node && ae.current?.contains(t) || X();
2262
+ t instanceof Node && ie.current?.contains(t) || be();
2200
2263
  },
2201
2264
  children: [
2202
- _e && /* @__PURE__ */ p("span", {
2203
- id: re,
2265
+ ge && /* @__PURE__ */ n("span", {
2266
+ id: te,
2204
2267
  className: "sr-only",
2205
- children: ge.map((e) => e.label).join(", ")
2268
+ children: me.map((e) => e.label).join(", ")
2206
2269
  }),
2207
- /* @__PURE__ */ p("button", {
2208
- ref: W,
2270
+ /* @__PURE__ */ n("button", {
2271
+ ref: re,
2209
2272
  type: "button",
2210
2273
  id: z,
2211
2274
  role: "combobox",
2212
- disabled: D,
2213
- "aria-expanded": J,
2214
- "aria-controls": U,
2275
+ disabled: O,
2276
+ "aria-expanded": X,
2277
+ "aria-controls": G,
2215
2278
  "aria-haspopup": "listbox",
2216
- "aria-invalid": !!s,
2217
- "aria-required": O || void 0,
2218
- "aria-describedby": Z(_e && re, !!r && H, s && B),
2219
- "aria-labelledby": n && !a ? te : void 0,
2220
- "aria-label": a,
2279
+ "aria-invalid": !!d,
2280
+ "aria-required": k || void 0,
2281
+ "aria-describedby": Q(ge && te, !!c && V, d && B),
2282
+ "aria-labelledby": o && !u ? W : void 0,
2283
+ "aria-label": u,
2221
2284
  onClick: Ee,
2222
- onKeyDown: Me,
2223
- className: e("w-full flex flex-wrap items-center gap-1 text-left disabled:opacity-50 disabled:cursor-not-allowed", !E && [
2224
- fe,
2225
- N[T],
2285
+ onKeyDown: Ne,
2286
+ className: e("w-full flex flex-wrap items-center gap-1 text-left disabled:opacity-50 disabled:cursor-not-allowed", !D && [
2287
+ he,
2288
+ H[E],
2226
2289
  "pl-3 pr-8 py-2 text-sm min-h-10"
2227
- ], !E && s && e("border-red-500 dark:border-red-400", "focus:ring-red-500"), k),
2228
- children: ge.length === 0 ? /* @__PURE__ */ p("span", {
2229
- className: e(!E && "text-gray-500 dark:text-gray-400"),
2230
- children: c
2231
- }) : /* @__PURE__ */ m(f, { children: [ve.map((t) => /* @__PURE__ */ p("span", {
2232
- className: e(!E && yr),
2290
+ ], !D && d && e("border-red-500 dark:border-red-400", "focus:ring-red-500"), A),
2291
+ children: me.length === 0 ? /* @__PURE__ */ n("span", {
2292
+ className: e(!D && "text-gray-500 dark:text-gray-400"),
2293
+ children: h
2294
+ }) : /* @__PURE__ */ r(t, { children: [_e.map((t) => /* @__PURE__ */ n("span", {
2295
+ className: e(!D && Er),
2233
2296
  children: t.label
2234
- }, t.value)), ye > 0 && /* @__PURE__ */ p("span", {
2235
- className: e(!E && yr),
2236
- children: (S ?? R.overflowCount)(ye)
2297
+ }, t.value)), ve > 0 && /* @__PURE__ */ n("span", {
2298
+ className: e(!D && Er),
2299
+ children: (C ?? L.overflowCount)(ve)
2237
2300
  })] })
2238
2301
  }),
2239
- !E && K.length > 0 && !D && /* @__PURE__ */ p("button", {
2302
+ !D && q.length > 0 && !O && /* @__PURE__ */ n("button", {
2240
2303
  type: "button",
2241
- "aria-label": _ ?? R.clearSelection,
2304
+ "aria-label": v ?? L.clearSelection,
2242
2305
  onMouseDown: (e) => e.preventDefault(),
2243
2306
  onClick: we,
2244
- className: e("absolute right-2.5 top-1/2 -translate-y-1/2 w-4 h-4 text-gray-400 hover:text-gray-600 dark:text-gray-500 dark:hover:text-gray-300 before:content-[''] before:absolute before:-inset-[4px]", "outline-hidden focus-visible:outline-2 focus-visible:outline-offset-2", A.primary.focusOutline),
2245
- children: /* @__PURE__ */ p("span", {
2307
+ className: e("absolute right-2.5 top-1/2 -translate-y-1/2 w-4 h-4 text-gray-400 hover:text-gray-600 dark:text-gray-500 dark:hover:text-gray-300 before:content-[''] before:absolute before:-inset-[4px]", "outline-hidden focus-visible:outline-2 focus-visible:outline-offset-2", R.primary.focusOutline),
2308
+ children: /* @__PURE__ */ n("span", {
2246
2309
  className: "i-mdi-close block w-4 h-4",
2247
2310
  "aria-hidden": !0
2248
2311
  })
2249
2312
  }),
2250
- J && /* @__PURE__ */ m("div", {
2313
+ X && /* @__PURE__ */ r("div", {
2251
2314
  onMouseDown: (e) => {
2252
- e.target !== G.current && e.preventDefault();
2315
+ e.target !== K.current && e.preventDefault();
2253
2316
  },
2254
- className: e("absolute z-10 mt-1 w-full text-sm shadow-lg", !E && [
2317
+ className: e("absolute z-10 mt-1 w-full text-sm shadow-lg", !D && [
2255
2318
  "border overflow-hidden",
2256
2319
  "bg-white dark:bg-gray-900",
2257
2320
  "border-gray-100 dark:border-gray-800",
2258
- P[T]
2321
+ U[E]
2259
2322
  ]),
2260
2323
  children: [
2261
- /* @__PURE__ */ p("input", {
2262
- ref: G,
2324
+ /* @__PURE__ */ n("input", {
2325
+ ref: K,
2263
2326
  type: "text",
2264
2327
  autoFocus: !0,
2265
2328
  role: "combobox",
@@ -2267,50 +2330,50 @@ function br({ options: t, label: n, description: r, "aria-label": a, error: s, p
2267
2330
  "aria-autocomplete": "list",
2268
2331
  "aria-haspopup": "listbox",
2269
2332
  autoComplete: "off",
2270
- value: oe,
2333
+ value: Y,
2271
2334
  onChange: De,
2272
- onKeyDown: Me,
2273
- placeholder: h ?? R.search,
2274
- "aria-label": vr(n, a, h ?? R.search),
2275
- "aria-controls": U,
2335
+ onKeyDown: Ne,
2336
+ placeholder: g ?? L.search,
2337
+ "aria-label": wr(o, u, g ?? L.search),
2338
+ "aria-controls": G,
2276
2339
  "aria-activedescendant": ue,
2277
- "aria-describedby": y === void 0 ? void 0 : ne,
2278
- className: e("w-full", !E && [
2340
+ "aria-describedby": b === void 0 ? void 0 : ee,
2341
+ className: e("w-full", !D && [
2279
2342
  "px-3 py-2 border-b bg-transparent",
2280
2343
  "outline-hidden focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-blue-500 dark:focus-visible:outline-blue-400",
2281
2344
  "text-gray-900 dark:text-gray-100 placeholder-gray-500 dark:placeholder-gray-400",
2282
2345
  "border-gray-100 dark:border-gray-800"
2283
2346
  ])
2284
2347
  }),
2285
- y !== void 0 && /* @__PURE__ */ p("div", {
2286
- id: ne,
2287
- className: e("px-3 py-1 text-xs", !E && ["border-b", "border-gray-100 dark:border-gray-800"], !E && "text-gray-500 dark:text-gray-400"),
2288
- children: (w ?? R.maxSelectedHint)(y)
2348
+ b !== void 0 && /* @__PURE__ */ n("div", {
2349
+ id: ee,
2350
+ className: e("px-3 py-1 text-xs", !D && ["border-b", "border-gray-100 dark:border-gray-800"], !D && "text-gray-500 dark:text-gray-400"),
2351
+ children: (T ?? L.maxSelectedHint)(b)
2289
2352
  }),
2290
- /* @__PURE__ */ p("ul", {
2291
- id: U,
2353
+ /* @__PURE__ */ n("ul", {
2354
+ id: G,
2292
2355
  role: "listbox",
2293
- "aria-labelledby": n && !a ? te : void 0,
2294
- "aria-label": a,
2356
+ "aria-labelledby": o && !u ? W : void 0,
2357
+ "aria-label": u,
2295
2358
  "aria-multiselectable": !0,
2296
2359
  className: e("max-h-60 overflow-auto py-1", "[scrollbar-width:thin] [scrollbar-color:theme(colors.gray.300)_transparent] hover:[scrollbar-color:theme(colors.gray.400)_transparent] dark:[scrollbar-color:theme(colors.gray.600)_transparent] dark:hover:[scrollbar-color:theme(colors.gray.500)_transparent]"),
2297
- children: Y.map((t, n) => {
2298
- let r = K.includes(t.value), i = hr(t.value, K, y, b);
2299
- return /* @__PURE__ */ m("li", {
2300
- id: `${U}-option-${n}`,
2360
+ children: ce.map((t, i) => {
2361
+ let a = q.includes(t.value), o = xr(t.value, q, b, x);
2362
+ return /* @__PURE__ */ r("li", {
2363
+ id: `${G}-option-${i}`,
2301
2364
  role: "option",
2302
- "aria-selected": r,
2303
- "aria-disabled": i,
2365
+ "aria-selected": a,
2366
+ "aria-disabled": o,
2304
2367
  onClick: () => Se(t.value),
2305
- className: e("px-3 py-2 flex items-center gap-2 text-gray-900 dark:text-gray-100", i ? "opacity-50 cursor-not-allowed" : "cursor-pointer", n === le ? e("bg-blue-50 dark:bg-blue-900/40", "outline-2 -outline-offset-2 outline-blue-500 dark:outline-blue-400") : !i && "hover:bg-gray-50 dark:hover:bg-gray-800/60"),
2306
- children: [/* @__PURE__ */ p("span", {
2368
+ className: e("px-3 py-2 flex items-center gap-2 text-gray-900 dark:text-gray-100", o ? "opacity-50 cursor-not-allowed" : "cursor-pointer", i === le ? e("bg-blue-50 dark:bg-blue-900/40", "outline-2 -outline-offset-2 outline-blue-500 dark:outline-blue-400") : !o && "hover:bg-gray-50 dark:hover:bg-gray-800/60"),
2369
+ children: [/* @__PURE__ */ n("span", {
2307
2370
  "aria-hidden": !0,
2308
- className: e("flex h-4 w-4 shrink-0 items-center justify-center", !E && [
2371
+ className: e("flex h-4 w-4 shrink-0 items-center justify-center", !D && [
2309
2372
  "border-2",
2310
- N[T],
2311
- r ? e("border-blue-600 dark:border-blue-500", "bg-blue-600 dark:bg-blue-500") : e("border-gray-300 dark:border-gray-600", "bg-white dark:bg-gray-800")
2373
+ H[E],
2374
+ a ? e("border-blue-600 dark:border-blue-500", "bg-blue-600 dark:bg-blue-500") : e("border-gray-300 dark:border-gray-600", "bg-white dark:bg-gray-800")
2312
2375
  ]),
2313
- children: r && /* @__PURE__ */ p("svg", {
2376
+ children: a && /* @__PURE__ */ n("svg", {
2314
2377
  className: "h-3 w-3 text-white",
2315
2378
  viewBox: "0 0 12 12",
2316
2379
  fill: "none",
@@ -2318,28 +2381,28 @@ function br({ options: t, label: n, description: r, "aria-label": a, error: s, p
2318
2381
  strokeWidth: "2.5",
2319
2382
  strokeLinecap: "round",
2320
2383
  strokeLinejoin: "round",
2321
- children: /* @__PURE__ */ p("polyline", { points: "2 6 5 9 10 3" })
2384
+ children: /* @__PURE__ */ n("polyline", { points: "2 6 5 9 10 3" })
2322
2385
  })
2323
2386
  }), t.label]
2324
2387
  }, t.value);
2325
2388
  })
2326
2389
  }),
2327
- /* @__PURE__ */ p("div", {
2390
+ /* @__PURE__ */ n("div", {
2328
2391
  role: "status",
2329
- className: Y.length === 0 ? "px-3 py-2 text-gray-500 dark:text-gray-400" : void 0,
2330
- children: Y.length === 0 ? g ?? R.noResults : ""
2392
+ className: ce.length === 0 ? "px-3 py-2 text-gray-500 dark:text-gray-400" : void 0,
2393
+ children: ce.length === 0 ? _ ?? L.noResults : ""
2331
2394
  }),
2332
- y !== void 0 && /* @__PURE__ */ m("div", {
2333
- className: e("flex items-center justify-between px-3 py-2", !E && ["border-t", "border-gray-100 dark:border-gray-800"]),
2334
- children: [/* @__PURE__ */ p("span", {
2395
+ b !== void 0 && /* @__PURE__ */ r("div", {
2396
+ className: e("flex items-center justify-between px-3 py-2", !D && ["border-t", "border-gray-100 dark:border-gray-800"]),
2397
+ children: [/* @__PURE__ */ n("span", {
2335
2398
  className: "text-xs text-gray-500 dark:text-gray-400",
2336
- children: (C ?? R.selectedCount)(K.length)
2337
- }), /* @__PURE__ */ p("button", {
2399
+ children: (w ?? L.selectedCount)(q.length)
2400
+ }), /* @__PURE__ */ n("button", {
2338
2401
  type: "button",
2339
- disabled: K.length === 0,
2402
+ disabled: q.length === 0,
2340
2403
  onClick: Te,
2341
2404
  className: "text-xs font-medium text-blue-600 hover:text-blue-700 disabled:opacity-50 disabled:cursor-not-allowed dark:text-blue-400 dark:hover:text-blue-300",
2342
- children: v ?? R.clear
2405
+ children: y ?? L.clear
2343
2406
  })]
2344
2407
  })
2345
2408
  ]
@@ -2349,244 +2412,283 @@ function br({ options: t, label: n, description: r, "aria-label": a, error: s, p
2349
2412
  });
2350
2413
  }
2351
2414
  // src/components/radio_options/radio_option_row.tsx
2352
- function xr({ option: t, optionId: n, descriptionId: r, name: i, orientation: a, isSelected: o, isDisabled: s, isFirstOption: c, required: l, error: u, radius: d, unstyled: f, className: m, onSelect: h }) {
2353
- let g = !!u;
2354
- return /* @__PURE__ */ p(ke, {
2415
+ function Or({ option: t, optionId: r, descriptionId: i, name: a, orientation: o, isSelected: s, isDisabled: c, isFirstOption: l, required: u, error: d, radius: f, unstyled: p, className: m, onSelect: h }) {
2416
+ let g = !!d;
2417
+ return /* @__PURE__ */ n(Pe, {
2355
2418
  item: t,
2356
- htmlFor: n,
2357
- descriptionId: r,
2358
- orientation: a,
2359
- isSelected: o,
2360
- isDisabled: s,
2419
+ htmlFor: r,
2420
+ descriptionId: i,
2421
+ orientation: o,
2422
+ isSelected: s,
2423
+ isDisabled: c,
2361
2424
  isError: g,
2362
- radius: d,
2363
- unstyled: f,
2425
+ radius: f,
2426
+ unstyled: p,
2364
2427
  className: m,
2365
- control: /* @__PURE__ */ p("input", {
2428
+ control: /* @__PURE__ */ n("input", {
2366
2429
  type: "radio",
2367
- id: n,
2368
- name: i,
2430
+ id: r,
2431
+ name: a,
2369
2432
  value: t.value,
2370
- checked: o,
2433
+ checked: s,
2371
2434
  onChange: () => h(t.value),
2372
- disabled: s,
2373
- required: l && c,
2374
- "aria-describedby": t.description ? r : void 0,
2435
+ disabled: c,
2436
+ required: u && l,
2437
+ "aria-describedby": t.description ? i : void 0,
2375
2438
  className: "sr-only"
2376
2439
  }),
2377
- indicator: /* @__PURE__ */ p("span", {
2378
- className: e("mt-0.5 flex h-4 w-4 shrink-0 items-center justify-center rounded-full border-2 transition-colors duration-150", Se({
2379
- isSelected: o,
2440
+ indicator: /* @__PURE__ */ n("span", {
2441
+ className: e("mt-0.5 flex h-4 w-4 shrink-0 items-center justify-center rounded-full border-2 transition-colors duration-150", Ee({
2442
+ isSelected: s,
2380
2443
  isError: g
2381
2444
  })),
2382
2445
  "aria-hidden": !0,
2383
- children: o && /* @__PURE__ */ p("span", { className: e("h-2 w-2 rounded-full", u ? "bg-red-500 dark:bg-red-400" : "bg-blue-600 dark:bg-blue-500") })
2446
+ children: s && /* @__PURE__ */ n("span", { className: e("h-2 w-2 rounded-full", d ? "bg-red-500 dark:bg-red-400" : "bg-blue-600 dark:bg-blue-500") })
2384
2447
  })
2385
2448
  });
2386
2449
  }
2387
2450
  // src/components/radio_options/radio_options.tsx
2388
- function Sr({ options: t, orientation: n = "vertical", value: r, defaultValue: i, onChange: a, name: o, label: s, error: c, required: l, disabled: u, radius: d = "lg", unstyled: f = !1, className: h, wrapperClassName: g, id: _, "aria-describedby": v, ...y }) {
2389
- let { fieldId: b, errorId: x } = $(_), S = o ?? b, [C, w] = Ce(r, i ?? ""), T = t.map((e) => typeof e == "string" ? {
2451
+ function kr({ options: t, orientation: i = "vertical", value: a, defaultValue: o, onChange: s, name: c, label: l, error: u, required: d, disabled: f, radius: p = "lg", unstyled: m = !1, className: h, wrapperClassName: g, id: _, "aria-describedby": v, ...y }) {
2452
+ let { fieldId: b, errorId: x } = $(_), S = c ?? b, [C, w] = Oe(a, o ?? ""), T = t.map((e) => typeof e == "string" ? {
2390
2453
  value: e,
2391
2454
  label: e
2392
2455
  } : e), E = (e) => {
2393
- w(e), a?.(e);
2456
+ w(e), s?.(e);
2394
2457
  };
2395
- return /* @__PURE__ */ m("fieldset", {
2458
+ return /* @__PURE__ */ r("fieldset", {
2396
2459
  className: e("m-0 border-0 p-0", g),
2397
2460
  role: "radiogroup",
2398
- disabled: u,
2399
- "aria-invalid": c ? !0 : void 0,
2400
- "aria-describedby": Z(v, c && x),
2461
+ disabled: f,
2462
+ "aria-invalid": u ? !0 : void 0,
2463
+ "aria-describedby": Q(v, u && x),
2401
2464
  ...y,
2402
2465
  children: [
2403
- s && /* @__PURE__ */ m("legend", {
2466
+ l && /* @__PURE__ */ r("legend", {
2404
2467
  className: e("text-sm font-medium text-gray-700 dark:text-gray-300", "mb-2"),
2405
- children: [s, l && /* @__PURE__ */ p(Q, {})]
2468
+ children: [l, d && /* @__PURE__ */ n(De, {})]
2406
2469
  }),
2407
- /* @__PURE__ */ p("div", {
2408
- className: e(n === "horizontal" ? "flex flex-row gap-2" : "flex flex-col gap-2"),
2409
- children: T.map((e, t) => /* @__PURE__ */ p(xr, {
2470
+ /* @__PURE__ */ n("div", {
2471
+ className: e(i === "horizontal" ? "flex flex-row gap-2" : "flex flex-col gap-2"),
2472
+ children: T.map((e, t) => /* @__PURE__ */ n(Or, {
2410
2473
  option: e,
2411
2474
  optionId: `${b}-${t}`,
2412
2475
  descriptionId: `${b}-${t}-desc`,
2413
2476
  name: S,
2414
- orientation: n,
2477
+ orientation: i,
2415
2478
  isSelected: C === e.value,
2416
- isDisabled: u === !0 || e.disabled === !0,
2479
+ isDisabled: f === !0 || e.disabled === !0,
2417
2480
  isFirstOption: t === 0,
2418
- required: l,
2419
- error: c,
2420
- radius: d,
2421
- unstyled: f,
2481
+ required: d,
2482
+ error: u,
2483
+ radius: p,
2484
+ unstyled: m,
2422
2485
  className: h,
2423
2486
  onSelect: E
2424
2487
  }, e.value))
2425
2488
  }),
2426
- /* @__PURE__ */ p(X, {
2489
+ /* @__PURE__ */ n(we, {
2427
2490
  id: x,
2428
- error: c,
2491
+ error: u,
2429
2492
  className: "mt-2"
2430
2493
  })
2431
2494
  ]
2432
2495
  });
2433
2496
  }
2434
2497
  // src/components/select/select.tsx
2435
- function Cr({ options: t, label: n, description: r, error: i, placeholder: a, radius: o = "md", unstyled: s = !1, className: c, wrapperClassName: l, value: u, defaultValue: d, onChange: f, id: h, "aria-describedby": g, "aria-label": _, ...v }) {
2498
+ function Ar({ options: t, label: i, description: a, error: o, placeholder: s, radius: c = "md", unstyled: l = !1, className: u, wrapperClassName: d, value: f, defaultValue: p, onChange: m, id: h, "aria-describedby": g, "aria-label": _, ...v }) {
2436
2499
  let { fieldId: y, errorId: b, descriptionId: x, labelId: S } = $(h);
2437
- return /* @__PURE__ */ p(Fe, {
2500
+ return /* @__PURE__ */ n(Be, {
2438
2501
  fieldId: y,
2439
2502
  errorId: b,
2440
2503
  descriptionId: x,
2441
- label: n,
2442
- description: r,
2443
- error: i,
2504
+ label: i,
2505
+ description: a,
2506
+ error: o,
2444
2507
  required: v.required,
2445
- wrapperClassName: l,
2446
- children: /* @__PURE__ */ m("select", {
2508
+ wrapperClassName: d,
2509
+ children: /* @__PURE__ */ r("select", {
2447
2510
  id: y,
2448
- className: e("w-full disabled:opacity-50 disabled:cursor-not-allowed", !s && [
2449
- fe,
2450
- N[o],
2511
+ className: e("w-full disabled:opacity-50 disabled:cursor-not-allowed", !l && [
2512
+ he,
2513
+ H[c],
2451
2514
  "pl-3 pr-8 py-2 text-sm appearance-none bg-[length:1rem_1rem] bg-[position:right_0.5rem_center] bg-no-repeat",
2452
2515
  "bg-[url(\"data:image/svg+xml,%3csvg xmlns=%27http://www.w3.org/2000/svg%27 fill=%27none%27 viewBox=%270 0 20 20%27%3e%3cpath stroke=%27%236b7280%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27 stroke-width=%271.5%27 d=%27M6 8l4 4 4-4%27/%3e%3c/svg%3e\")]"
2453
- ], !s && i && e("border-red-500 dark:border-red-400", "focus:ring-red-500"), c),
2454
- ...u === void 0 ? { defaultValue: d } : { value: u },
2455
- onChange: f,
2456
- "aria-invalid": !!i,
2516
+ ], !l && o && e("border-red-500 dark:border-red-400", "focus:ring-red-500"), u),
2517
+ ...f === void 0 ? { defaultValue: p } : { value: f },
2518
+ onChange: m,
2519
+ "aria-invalid": !!o,
2457
2520
  "aria-label": _,
2458
- "aria-labelledby": Ie(n, S, _),
2459
- "aria-describedby": Z(g, !!r && x, i && b),
2521
+ "aria-labelledby": Ve(i, S, _),
2522
+ "aria-describedby": Q(g, !!a && x, o && b),
2460
2523
  ...v,
2461
- children: [a !== void 0 && /* @__PURE__ */ p("option", {
2524
+ children: [s !== void 0 && /* @__PURE__ */ n("option", {
2462
2525
  value: "",
2463
- children: a
2464
- }), t.map((e) => /* @__PURE__ */ p("option", {
2526
+ children: s
2527
+ }), t.map((e) => /* @__PURE__ */ n("option", {
2465
2528
  value: e.value,
2466
2529
  children: e.label
2467
2530
  }, e.value))]
2468
2531
  })
2469
2532
  });
2470
2533
  }
2471
- var wr = "!rounded-l-none border-l", Tr = {
2534
+ var jr = "!rounded-l-none border-l", Mr = {
2472
2535
  solid: "!border-l-white/40",
2473
2536
  outline: "!border-l-0",
2474
2537
  ghost: "!border-l-current/25",
2475
2538
  subtle: "!border-l-current/25"
2476
- }, Er = "!border-l-gray-400";
2477
- function Dr(e, t) {
2478
- return [wr, e === "solid" && t === "neutral" ? Er : Tr[e]];
2539
+ }, Nr = "!border-l-gray-400";
2540
+ function Pr(e, t) {
2541
+ return [jr, e === "solid" && t === "neutral" ? Nr : Mr[e]];
2479
2542
  }
2480
2543
  // src/components/split_button/split_button.tsx
2481
- var Or = "i-mdi-chevron-down";
2482
- function kr(t) {
2483
- let { children: n, onClick: r, menu: i, menuLabel: a, menuIcon: o = Or, menuAlign: s = "end", startIcon: c, size: l = "md", loading: u = !1, disabled: d = !1, "aria-label": f, "aria-labelledby": h, className: g, ref: _, unstyled: v = !1, variant: y = "solid", color: b = "primary", radius: x = "md" } = t, S = v ? { unstyled: !0 } : {
2544
+ var Fr = "i-mdi-chevron-down";
2545
+ function Ir(t) {
2546
+ let { children: i, onClick: a, menu: o, menuLabel: s, menuIcon: c = Fr, menuAlign: l = "end", startIcon: u, size: d = "md", loading: f = !1, disabled: p = !1, "aria-label": m, "aria-labelledby": h, className: g, ref: _, unstyled: v = !1, variant: y = "solid", color: b = "primary", radius: x = "md" } = t, S = v ? { unstyled: !0 } : {
2484
2547
  variant: y,
2485
2548
  color: b,
2486
2549
  radius: x
2487
- }, C = /* @__PURE__ */ p(It, {
2488
- icon: o,
2489
- "aria-label": a,
2550
+ }, C = /* @__PURE__ */ n(Dt, {
2551
+ icon: c,
2552
+ "aria-label": s,
2490
2553
  tooltip: !0,
2491
- size: l,
2492
- disabled: d,
2493
- "aria-disabled": u && !d || void 0,
2494
- className: e(!v && ["relative focus-visible:z-10", Dr(y, b)]),
2554
+ size: d,
2555
+ disabled: p,
2556
+ "aria-disabled": f && !p || void 0,
2557
+ className: e(!v && ["relative focus-visible:z-10", Pr(y, b)]),
2495
2558
  ...S
2496
2559
  });
2497
- return /* @__PURE__ */ m("div", {
2560
+ return /* @__PURE__ */ r("div", {
2498
2561
  role: "group",
2499
- "aria-label": f,
2562
+ "aria-label": m,
2500
2563
  "aria-labelledby": h,
2501
2564
  className: e("inline-flex", g),
2502
- children: [/* @__PURE__ */ p(U, {
2565
+ children: [/* @__PURE__ */ n(Y, {
2503
2566
  ref: _,
2504
- size: l,
2505
- startIcon: c,
2506
- loading: u,
2507
- disabled: d,
2508
- onClick: r,
2567
+ size: d,
2568
+ startIcon: u,
2569
+ loading: f,
2570
+ disabled: p,
2571
+ onClick: a,
2509
2572
  className: e(!v && ["relative focus-visible:z-10", "!rounded-r-none"]),
2510
2573
  ...S,
2511
- children: n
2512
- }), /* @__PURE__ */ p(In, {
2574
+ children: i
2575
+ }), /* @__PURE__ */ n(Hn, {
2513
2576
  trigger: C,
2514
- align: s,
2577
+ align: l,
2515
2578
  radius: x,
2516
- disabled: d || u,
2517
- children: i
2579
+ disabled: p || f,
2580
+ children: o
2518
2581
  })]
2519
2582
  });
2520
2583
  }
2584
+ // src/components/spinner/spinner.tsx
2585
+ var Lr = 0, Rr = "inline-flex items-center gap-2", zr = {
2586
+ xs: "text-xs",
2587
+ sm: "text-sm",
2588
+ md: "text-sm",
2589
+ lg: "text-base"
2590
+ }, Br = {
2591
+ xs: "w-3.5 h-3.5",
2592
+ sm: "w-4 h-4",
2593
+ md: "w-5 h-5",
2594
+ lg: "w-6 h-6"
2595
+ };
2596
+ function Vr(t) {
2597
+ let { size: i = "md", label: a, unstyled: o = !1, className: s, iconClassName: c, labelClassName: u, ...d } = t, f = J(), [p, h] = m(!1);
2598
+ l(() => {
2599
+ let e = setTimeout(() => h(!0), Lr);
2600
+ return () => clearTimeout(e);
2601
+ }, []);
2602
+ let g = a ?? f.loading, _ = e(!o && Br[i], c);
2603
+ return /* @__PURE__ */ r("span", {
2604
+ role: "status",
2605
+ ...d,
2606
+ className: e(!o && [Rr, zr[i]], s),
2607
+ children: [
2608
+ /* @__PURE__ */ n("span", {
2609
+ className: e("i-svg-spinners-3-dots-fade ms-spinner-animated", _),
2610
+ "aria-hidden": "true"
2611
+ }),
2612
+ /* @__PURE__ */ n("span", {
2613
+ className: e("i-mdi-loading ms-spinner-static", _),
2614
+ "aria-hidden": "true"
2615
+ }),
2616
+ p && /* @__PURE__ */ n("span", {
2617
+ className: a === void 0 ? "sr-only" : u,
2618
+ children: g
2619
+ })
2620
+ ]
2621
+ });
2622
+ }
2521
2623
  // src/components/switch/switch.tsx
2522
- function Ar({ label: t, description: n, error: r, unstyled: i = !1, fullWidth: a = !1, className: o, wrapperClassName: s, checked: c, defaultChecked: l = !1, onChange: u, id: d, "aria-describedby": h, "aria-label": g, "aria-labelledby": _, ...v }) {
2523
- let { fieldId: y, errorId: b, descriptionId: x } = $(d), [S, C] = Ce(c, l), w = Z(h, !!n && x, r && b);
2524
- return Te("Switch", !!t || !!g?.trim() || !!_?.trim()), /* @__PURE__ */ m("div", {
2525
- className: e(a ? "w-full" : "w-fit", s),
2624
+ function Hr({ label: i, description: a, error: o, unstyled: s = !1, fullWidth: c = !1, className: l, wrapperClassName: u, checked: d, defaultChecked: f = !1, onChange: p, id: m, "aria-describedby": h, "aria-label": g, "aria-labelledby": _, ...v }) {
2625
+ let { fieldId: y, errorId: b, descriptionId: x } = $(m), [S, C] = Oe(d, f), w = Q(h, !!a && x, o && b);
2626
+ return Ae("Switch", !!i || !!g?.trim() || !!_?.trim()), /* @__PURE__ */ r("div", {
2627
+ className: e(c ? "w-full" : "w-fit", u),
2526
2628
  children: [
2527
- /* @__PURE__ */ m("label", {
2629
+ /* @__PURE__ */ r("label", {
2528
2630
  htmlFor: y,
2529
2631
  className: e("flex items-center gap-3 cursor-pointer", v.disabled && "cursor-not-allowed opacity-50"),
2530
- children: [/* @__PURE__ */ m("span", {
2531
- className: e("relative inline-flex w-11 shrink-0", "transition-colors duration-200 ease-in-out", E, D, !i && [
2632
+ children: [/* @__PURE__ */ r("span", {
2633
+ className: e("relative inline-flex w-11 shrink-0", "transition-colors duration-200 ease-in-out", P, F, !s && [
2532
2634
  "rounded-full border-2 border-transparent",
2533
2635
  S ? "bg-blue-600 dark:bg-blue-500" : "bg-gray-200 dark:bg-gray-600",
2534
- r && "ring-2 ring-red-500 dark:ring-red-400"
2535
- ], o),
2536
- children: [/* @__PURE__ */ p("input", {
2636
+ o && "ring-2 ring-red-500 dark:ring-red-400"
2637
+ ], l),
2638
+ children: [/* @__PURE__ */ n("input", {
2537
2639
  type: "checkbox",
2538
2640
  role: "switch",
2539
2641
  id: y,
2540
2642
  className: "sr-only",
2541
2643
  checked: S,
2542
2644
  onChange: (e) => {
2543
- C(e.target.checked), u?.(e);
2645
+ C(e.target.checked), p?.(e);
2544
2646
  },
2545
- "aria-invalid": !!r,
2647
+ "aria-invalid": !!o,
2546
2648
  "aria-describedby": w,
2547
2649
  "aria-label": g,
2548
2650
  "aria-labelledby": _,
2549
2651
  ...v
2550
- }), /* @__PURE__ */ p("span", {
2652
+ }), /* @__PURE__ */ n("span", {
2551
2653
  className: e("pointer-events-none inline-block h-5 w-5 transform rounded-full bg-white shadow ring-0", "ms-switch-thumb-transition", S ? "translate-x-5.25" : "translate-x-0"),
2552
2654
  "aria-hidden": !0
2553
2655
  })]
2554
- }), t && /* @__PURE__ */ p(f, { children: typeof t == "string" ? /* @__PURE__ */ m("span", {
2656
+ }), i && /* @__PURE__ */ n(t, { children: typeof i == "string" ? /* @__PURE__ */ r("span", {
2555
2657
  className: e("text-sm font-medium text-gray-700 dark:text-gray-300", "select-none"),
2556
- children: [t, v.required && /* @__PURE__ */ p(Q, {})]
2557
- }) : /* @__PURE__ */ m(f, { children: [t, v.required && /* @__PURE__ */ p(Q, {})] }) })]
2658
+ children: [i, v.required && /* @__PURE__ */ n(De, {})]
2659
+ }) : /* @__PURE__ */ r(t, { children: [i, v.required && /* @__PURE__ */ n(De, {})] }) })]
2558
2660
  }),
2559
- /* @__PURE__ */ p(ve, {
2661
+ /* @__PURE__ */ n(xe, {
2560
2662
  id: x,
2561
- description: n,
2663
+ description: a,
2562
2664
  className: "mt-1 ml-14"
2563
2665
  }),
2564
- /* @__PURE__ */ p(X, {
2666
+ /* @__PURE__ */ n(we, {
2565
2667
  id: b,
2566
- error: r,
2668
+ error: o,
2567
2669
  className: "mt-1 ml-14"
2568
2670
  })
2569
2671
  ]
2570
2672
  });
2571
2673
  }
2572
2674
  // src/components/tabs/tabs_styles.ts
2573
- var jr = {
2675
+ var Ur = {
2574
2676
  list: "gap-1 p-1 bg-gray-100 dark:bg-gray-800/50",
2575
2677
  tab: "",
2576
- indicator: `absolute inset-0 ${W} border border-gray-200 dark:border-gray-700`
2577
- }, Mr = {
2678
+ indicator: `absolute inset-0 ${T} border border-gray-200 dark:border-gray-700`
2679
+ }, Wr = {
2578
2680
  line: {
2579
2681
  activeTab: "border-transparent text-gray-900 dark:text-gray-100",
2580
2682
  idleTab: "border-transparent text-gray-500 dark:text-gray-400",
2581
2683
  idleHover: "hover:text-gray-900 hover:border-gray-300 dark:hover:text-gray-100 dark:hover:border-gray-600",
2582
2684
  byOrientation: {
2583
2685
  horizontal: {
2584
- list: `gap-1 border-b ${ae}`,
2686
+ list: `gap-1 border-b ${E}`,
2585
2687
  tab: "-mb-px border-b-2",
2586
2688
  indicator: "absolute inset-x-0 -bottom-0.5 h-0.5 bg-blue-600 dark:bg-blue-400"
2587
2689
  },
2588
2690
  vertical: {
2589
- list: `gap-1 border-r ${ae}`,
2691
+ list: `gap-1 border-r ${E}`,
2590
2692
  tab: "border-r-2",
2591
2693
  indicator: "absolute inset-y-0 -right-0.5 w-0.5 bg-blue-600 dark:bg-blue-400"
2592
2694
  }
@@ -2597,118 +2699,118 @@ var jr = {
2597
2699
  idleTab: "text-gray-600 dark:text-gray-400",
2598
2700
  idleHover: "hover:text-gray-900 dark:hover:text-gray-100",
2599
2701
  byOrientation: {
2600
- horizontal: jr,
2601
- vertical: jr
2702
+ horizontal: Ur,
2703
+ vertical: Ur
2602
2704
  }
2603
2705
  }
2604
- }, Nr = {
2706
+ }, Gr = {
2605
2707
  xs: "px-2 py-1 text-xs",
2606
2708
  sm: "px-3 py-1.5 text-sm",
2607
2709
  md: "px-4 py-2.5 text-sm",
2608
2710
  lg: "px-5 py-3 text-base"
2609
- }, Pr = {
2711
+ }, Kr = {
2610
2712
  xs: "w-3.5 h-3.5",
2611
2713
  sm: "w-4 h-4",
2612
2714
  md: "w-4 h-4",
2613
2715
  lg: "w-5 h-5"
2614
- }, Fr = {
2615
- horizontal: e(w, A.primary.focusOutline),
2616
- vertical: e("outline-hidden focus-visible:outline-2", "focus-visible:-outline-offset-2", A.primary.focusOutline)
2617
- }, Ir = "items-center", Lr = e("flex-col items-stretch min-h-0 overflow-y-auto overflow-x-hidden", K), Rr = "w-48 shrink-0", zr = "justify-start text-left whitespace-normal", Br = "whitespace-nowrap", Vr = "flex min-h-0", Hr = e("flex-1 min-w-0 min-h-0 overflow-y-auto", K), Ur = "ml-6", Wr = "mt-4";
2618
- function Gr(t, n) {
2619
- return e("w-full", t === "vertical" && Vr, n);
2620
- }
2621
- function Kr(t) {
2716
+ }, qr = {
2717
+ horizontal: e(M, R.primary.focusOutline),
2718
+ vertical: e("outline-hidden focus-visible:outline-2", "focus-visible:-outline-offset-2", R.primary.focusOutline)
2719
+ }, Jr = "items-center", Yr = e("flex-col items-stretch min-h-0 overflow-y-auto overflow-x-hidden", k), Xr = "w-48 shrink-0", Zr = "justify-start text-left whitespace-normal", Qr = "whitespace-nowrap", $r = "flex min-h-0", ei = e("flex-1 min-w-0 min-h-0 overflow-y-auto", k), ti = "ml-6", ni = "mt-4";
2720
+ function ri(t, n) {
2721
+ return e("w-full", t === "vertical" && $r, n);
2722
+ }
2723
+ function ii(t) {
2622
2724
  let { orientation: n, unstyled: r, className: i } = t, a = n === "vertical";
2623
- return e(a && Hr, !r && [a ? Ur : Wr, Fr[n]], i);
2725
+ return e(a && ei, !r && [a ? ti : ni, qr[n]], i);
2624
2726
  }
2625
- function qr(t) {
2727
+ function ai(t) {
2626
2728
  let { variant: n, orientation: r, radius: i, unstyled: a, isFullWidth: o, className: s } = t, c = r === "vertical";
2627
- return e("flex", c ? Lr : Ir, !c && o && "w-full", !a && c && Rr, !a && Mr[n].byOrientation[r].list, !a && n === "segmented" && N[i], s);
2729
+ return e("flex", c ? Yr : Jr, !c && o && "w-full", !a && c && Xr, !a && Wr[n].byOrientation[r].list, !a && n === "segmented" && H[i], s);
2628
2730
  }
2629
- function Jr(t) {
2630
- let { variant: n, orientation: r, size: i, radius: a, unstyled: o, isActive: s, isDisabled: c, isFullWidth: l, className: u } = t, d = r === "vertical", f = Mr[n];
2631
- return e("relative flex items-center gap-2", d ? zr : Br, !d && l && "flex-1 justify-center", c ? "opacity-50 cursor-not-allowed" : "cursor-pointer", !o && [
2731
+ function oi(t) {
2732
+ let { variant: n, orientation: r, size: i, radius: a, unstyled: o, isActive: s, isDisabled: c, isFullWidth: l, className: u } = t, d = r === "vertical", f = Wr[n];
2733
+ return e("relative flex items-center gap-2", d ? Zr : Qr, !d && l && "flex-1 justify-center", c ? "opacity-50 cursor-not-allowed" : "cursor-pointer", !o && [
2632
2734
  "font-medium transition-colors duration-200",
2633
- Nr[i],
2735
+ Gr[i],
2634
2736
  f.byOrientation[r].tab,
2635
2737
  s ? f.activeTab : [f.idleTab, !c && f.idleHover],
2636
- n === "segmented" && N[a],
2637
- Fr[r]
2738
+ n === "segmented" && H[a],
2739
+ qr[r]
2638
2740
  ], u);
2639
2741
  }
2640
- function Yr(t) {
2742
+ function si(t) {
2641
2743
  let { variant: n, orientation: r, radius: i } = t;
2642
- return e("tabs-indicator pointer-events-none", Mr[n].byOrientation[r].indicator, n === "segmented" && N[i]);
2744
+ return e("tabs-indicator pointer-events-none", Wr[n].byOrientation[r].indicator, n === "segmented" && H[i]);
2643
2745
  }
2644
2746
  // src/components/tabs/tab_button.tsx
2645
- function Xr({ item: t, isActive: n, hasMountedPanel: r, isTabStop: i, isFullWidth: a, variant: o, orientation: s, size: c, radius: l, unstyled: u, tabId: d, panelId: h, onSelect: g, onKeyDown: _, ref: v, indicatorRef: y }) {
2646
- let b = !!t.disabled;
2647
- return /* @__PURE__ */ m("button", {
2747
+ function ci({ item: i, isActive: a, hasMountedPanel: o, isTabStop: s, isFullWidth: c, variant: l, orientation: u, size: d, radius: f, unstyled: p, tabId: m, panelId: h, onSelect: g, onKeyDown: _, ref: v, indicatorRef: y }) {
2748
+ let b = !!i.disabled;
2749
+ return /* @__PURE__ */ r("button", {
2648
2750
  ref: v,
2649
- id: d,
2751
+ id: m,
2650
2752
  role: "tab",
2651
2753
  type: "button",
2652
- "aria-selected": n,
2653
- "aria-disabled": t.disabled,
2654
- "aria-controls": r ? h : void 0,
2655
- tabIndex: i ? 0 : -1,
2656
- disabled: t.disabled,
2754
+ "aria-selected": a,
2755
+ "aria-disabled": i.disabled,
2756
+ "aria-controls": o ? h : void 0,
2757
+ tabIndex: s ? 0 : -1,
2758
+ disabled: i.disabled,
2657
2759
  onClick: g,
2658
2760
  onKeyDown: _,
2659
- className: Jr({
2660
- variant: o,
2661
- orientation: s,
2662
- size: c,
2663
- radius: l,
2664
- unstyled: u,
2665
- isActive: n,
2761
+ className: oi({
2762
+ variant: l,
2763
+ orientation: u,
2764
+ size: d,
2765
+ radius: f,
2766
+ unstyled: p,
2767
+ isActive: a,
2666
2768
  isDisabled: b,
2667
- isFullWidth: a
2769
+ isFullWidth: c
2668
2770
  }),
2669
2771
  children: [
2670
- n && !u && /* @__PURE__ */ p("span", {
2772
+ a && !p && /* @__PURE__ */ n("span", {
2671
2773
  ref: y,
2672
2774
  "aria-hidden": "true",
2673
- className: Yr({
2674
- variant: o,
2675
- orientation: s,
2676
- radius: l
2775
+ className: si({
2776
+ variant: l,
2777
+ orientation: u,
2778
+ radius: f
2677
2779
  })
2678
2780
  }),
2679
- t.icon && /* @__PURE__ */ p("span", {
2781
+ i.icon && /* @__PURE__ */ n("span", {
2680
2782
  "aria-hidden": "true",
2681
- className: e("relative shrink-0", Pr[c], t.icon)
2783
+ className: e("relative shrink-0", Kr[d], i.icon)
2682
2784
  }),
2683
- /* @__PURE__ */ p("span", {
2785
+ /* @__PURE__ */ n("span", {
2684
2786
  className: "relative",
2685
- children: t.title
2787
+ children: i.title
2686
2788
  }),
2687
- t.badge ? /* @__PURE__ */ m(f, { children: [" ", t.badge] }) : null
2789
+ i.badge ? /* @__PURE__ */ r(t, { children: [" ", i.badge] }) : null
2688
2790
  ]
2689
2791
  });
2690
2792
  }
2691
2793
  // src/components/tabs/tab_panel.tsx
2692
- function Zr({ panelId: t, tabId: n, isHidden: r, isAnimated: i, className: a, contentKey: o, children: s }) {
2693
- return /* @__PURE__ */ p("div", {
2794
+ function li({ panelId: t, tabId: r, isHidden: i, isAnimated: a, className: o, contentKey: s, children: c }) {
2795
+ return /* @__PURE__ */ n("div", {
2694
2796
  role: "tabpanel",
2695
2797
  id: t,
2696
- "aria-labelledby": n,
2798
+ "aria-labelledby": r,
2697
2799
  tabIndex: 0,
2698
- hidden: r,
2699
- className: a,
2700
- children: /* @__PURE__ */ p("div", {
2701
- className: e(i && "tabs-panel-inner"),
2702
- children: s
2703
- }, o)
2800
+ hidden: i,
2801
+ className: o,
2802
+ children: /* @__PURE__ */ n("div", {
2803
+ className: e(a && "tabs-panel-inner"),
2804
+ children: c
2805
+ }, s)
2704
2806
  });
2705
2807
  }
2706
2808
  // src/components/tabs/use_tab_indicator_transition.ts
2707
- var Qr = 200, $r = "ease-out", ei = "(prefers-reduced-motion: reduce)";
2708
- function ti() {
2709
- return typeof window > "u" || typeof window.matchMedia != "function" ? !1 : window.matchMedia(ei).matches;
2809
+ var ui = 200, di = "ease-out", fi = "(prefers-reduced-motion: reduce)";
2810
+ function pi() {
2811
+ return typeof window > "u" || typeof window.matchMedia != "function" ? !1 : window.matchMedia(fi).matches;
2710
2812
  }
2711
- function ni(e, t, n) {
2813
+ function mi(e, t, n) {
2712
2814
  return e === "vertical" ? [{
2713
2815
  transform: `translateY(${t.top - n.top}px)`,
2714
2816
  height: `${t.height}px`
@@ -2723,25 +2825,25 @@ function ni(e, t, n) {
2723
2825
  width: `${n.width}px`
2724
2826
  }];
2725
2827
  }
2726
- function ri(e, t, n, r) {
2727
- e.animate(ni(t, n, r), {
2728
- duration: Qr,
2729
- easing: $r
2828
+ function hi(e, t, n, r) {
2829
+ e.animate(mi(t, n, r), {
2830
+ duration: ui,
2831
+ easing: di
2730
2832
  });
2731
2833
  }
2732
- function ii(e, t, n) {
2733
- return !e || !t || !n ? !1 : !ti();
2834
+ function gi(e, t, n) {
2835
+ return !e || !t || !n ? !1 : !pi();
2734
2836
  }
2735
- function ai(e) {
2736
- let { activeIndex: t, indicatorRef: n, isAnimated: r, orientation: i } = e, a = u(null);
2737
- c(() => {
2837
+ function _i(e) {
2838
+ let { activeIndex: t, indicatorRef: n, isAnimated: r, orientation: i } = e, a = p(null);
2839
+ d(() => {
2738
2840
  let e = n.current;
2739
2841
  if (!e) {
2740
2842
  a.current = null;
2741
2843
  return;
2742
2844
  }
2743
2845
  let t = e.getBoundingClientRect(), o = typeof e.animate == "function";
2744
- ii(a.current, r, o) && ri(e, i, a.current, t), a.current = t;
2846
+ gi(a.current, r, o) && hi(e, i, a.current, t), a.current = t;
2745
2847
  }, [
2746
2848
  t,
2747
2849
  n,
@@ -2750,34 +2852,34 @@ function ai(e) {
2750
2852
  ]);
2751
2853
  }
2752
2854
  // src/components/tabs/use_tabs_keyboard_navigation.ts
2753
- var oi = {
2855
+ var vi = {
2754
2856
  Home: () => 0,
2755
2857
  End: (e, t) => t - 1
2756
- }, si = (e, t) => (e + 1) % t, ci = (e, t) => (e - 1 + t) % t, li = {
2858
+ }, yi = (e, t) => (e + 1) % t, bi = (e, t) => (e - 1 + t) % t, xi = {
2757
2859
  horizontal: {
2758
- ...oi,
2759
- ArrowRight: si,
2760
- ArrowLeft: ci
2860
+ ...vi,
2861
+ ArrowRight: yi,
2862
+ ArrowLeft: bi
2761
2863
  },
2762
2864
  vertical: {
2763
- ...oi,
2764
- ArrowDown: si,
2765
- ArrowUp: ci
2865
+ ...vi,
2866
+ ArrowDown: yi,
2867
+ ArrowUp: bi
2766
2868
  }
2767
2869
  };
2768
- function ui(e) {
2870
+ function Si(e) {
2769
2871
  return e.flatMap((e, t) => e.disabled ? [] : [t]);
2770
2872
  }
2771
- function di(e, t) {
2873
+ function Ci(e, t) {
2772
2874
  let n = e[t];
2773
- return n && !n.disabled ? t : ui(e)[0] ?? -1;
2875
+ return n && !n.disabled ? t : Si(e)[0] ?? -1;
2774
2876
  }
2775
- function fi(e) {
2877
+ function wi(e) {
2776
2878
  let { items: t, activeIndex: n, orientation: r, onNavigate: i } = e;
2777
2879
  return (e) => {
2778
- let a = li[r][e.key];
2880
+ let a = xi[r][e.key];
2779
2881
  if (!a) return;
2780
- let o = ui(t);
2882
+ let o = Si(t);
2781
2883
  if (o.length === 0) return;
2782
2884
  e.preventDefault();
2783
2885
  let s = a(o.indexOf(n), o.length);
@@ -2785,69 +2887,69 @@ function fi(e) {
2785
2887
  };
2786
2888
  }
2787
2889
  // src/components/tabs/tabs.tsx
2788
- function pi({ items: e, value: t, defaultIndex: n = 0, variant: r = "line", orientation: i = "horizontal", size: a = "md", radius: o = "md", fullWidth: c = !1, unstyled: l = !1, animated: d = !0, keepMounted: f = !1, "aria-label": h, "aria-labelledby": g, className: _, tabListClassName: v, panelClassName: y, onChange: b }) {
2789
- let [x, S] = Ce(t, n), C = s(), w = u([]), T = u(null), E = (t) => {
2890
+ function Ti({ items: e, value: t, defaultIndex: i = 0, variant: a = "line", orientation: o = "horizontal", size: s = "md", radius: c = "md", fullWidth: l = !1, unstyled: d = !1, animated: f = !0, keepMounted: m = !1, "aria-label": h, "aria-labelledby": g, className: _, tabListClassName: v, panelClassName: y, onChange: b }) {
2891
+ let [x, S] = Oe(t, i), C = u(), w = p([]), T = p(null), E = (t) => {
2790
2892
  e[t]?.disabled || (S(t), b?.(t));
2791
2893
  }, D = (e) => {
2792
2894
  w.current[e]?.focus(), E(e);
2793
- }, O = di(e, x), k = fi({
2895
+ }, O = Ci(e, x), k = wi({
2794
2896
  items: e,
2795
2897
  activeIndex: O,
2796
- orientation: i,
2898
+ orientation: o,
2797
2899
  onNavigate: D
2798
- }), A = Kr({
2799
- orientation: i,
2800
- unstyled: l,
2900
+ }), A = ii({
2901
+ orientation: o,
2902
+ unstyled: d,
2801
2903
  className: y
2802
- }), j = d && !l;
2803
- return ai({
2904
+ }), j = f && !d;
2905
+ return _i({
2804
2906
  activeIndex: x,
2805
2907
  indicatorRef: T,
2806
- isAnimated: d,
2807
- orientation: i
2808
- }), /* @__PURE__ */ m("div", {
2809
- className: Gr(i, _),
2810
- children: [/* @__PURE__ */ p("div", {
2908
+ isAnimated: f,
2909
+ orientation: o
2910
+ }), /* @__PURE__ */ r("div", {
2911
+ className: ri(o, _),
2912
+ children: [/* @__PURE__ */ n("div", {
2811
2913
  role: "tablist",
2812
2914
  "aria-label": h,
2813
2915
  "aria-labelledby": g,
2814
- "aria-orientation": i,
2815
- className: qr({
2816
- variant: r,
2817
- orientation: i,
2818
- radius: o,
2819
- unstyled: l,
2820
- isFullWidth: c,
2916
+ "aria-orientation": o,
2917
+ className: ai({
2918
+ variant: a,
2919
+ orientation: o,
2920
+ radius: c,
2921
+ unstyled: d,
2922
+ isFullWidth: l,
2821
2923
  className: v
2822
2924
  }),
2823
- children: e.map((e, t) => /* @__PURE__ */ p(Xr, {
2925
+ children: e.map((e, t) => /* @__PURE__ */ n(ci, {
2824
2926
  ref: (e) => {
2825
2927
  w.current[t] = e;
2826
2928
  },
2827
2929
  indicatorRef: T,
2828
2930
  item: e,
2829
2931
  isActive: x === t,
2830
- hasMountedPanel: f || x === t,
2932
+ hasMountedPanel: m || x === t,
2831
2933
  isTabStop: O === t,
2832
- isFullWidth: c,
2833
- variant: r,
2834
- orientation: i,
2835
- size: a,
2836
- radius: o,
2837
- unstyled: l,
2934
+ isFullWidth: l,
2935
+ variant: a,
2936
+ orientation: o,
2937
+ size: s,
2938
+ radius: c,
2939
+ unstyled: d,
2838
2940
  tabId: `${C}-tab-${t}`,
2839
2941
  panelId: `${C}-panel-${t}`,
2840
2942
  onSelect: () => E(t),
2841
2943
  onKeyDown: k
2842
2944
  }, e.title))
2843
- }), f ? e.map((e, t) => /* @__PURE__ */ p(Zr, {
2945
+ }), m ? e.map((e, t) => /* @__PURE__ */ n(li, {
2844
2946
  panelId: `${C}-panel-${t}`,
2845
2947
  tabId: `${C}-tab-${t}`,
2846
2948
  isHidden: t !== x,
2847
2949
  isAnimated: j,
2848
2950
  className: A,
2849
2951
  children: e.content
2850
- }, e.title)) : /* @__PURE__ */ p(Zr, {
2952
+ }, e.title)) : /* @__PURE__ */ n(li, {
2851
2953
  panelId: `${C}-panel-${x}`,
2852
2954
  tabId: `${C}-tab-${x}`,
2853
2955
  isHidden: !1,
@@ -2859,47 +2961,47 @@ function pi({ items: e, value: t, defaultIndex: n = 0, variant: r = "line", orie
2859
2961
  });
2860
2962
  }
2861
2963
  // src/components/textarea/textarea.tsx
2862
- function mi({ label: t, description: n, error: r, showCharCount: i = !1, minLength: a, maxLength: o, radius: s = "md", unstyled: c = !1, className: l, wrapperClassName: u, value: d, defaultValue: f, onChange: h, id: g, "aria-describedby": _, "aria-label": v, ...y }) {
2863
- let { fieldId: b, errorId: x, descriptionId: S, labelId: C, characterCountId: w } = $(g), { length: T, trackLength: E } = An(d, f), D = i && (a !== void 0 || o !== void 0), O = (e) => {
2964
+ function Ei({ label: t, description: i, error: a, showCharCount: o = !1, minLength: s, maxLength: c, radius: l = "md", unstyled: u = !1, className: d, wrapperClassName: f, value: p, defaultValue: m, onChange: h, id: g, "aria-describedby": _, "aria-label": v, ...y }) {
2965
+ let { fieldId: b, errorId: x, descriptionId: S, labelId: C, characterCountId: w } = $(g), { length: T, trackLength: E } = In(p, m), D = o && (s !== void 0 || c !== void 0), O = (e) => {
2864
2966
  E(e.target.value), h?.(e);
2865
2967
  };
2866
- return /* @__PURE__ */ m(Fe, {
2968
+ return /* @__PURE__ */ r(Be, {
2867
2969
  fieldId: b,
2868
2970
  errorId: x,
2869
2971
  descriptionId: S,
2870
2972
  label: t,
2871
- description: n,
2872
- error: r,
2973
+ description: i,
2974
+ error: a,
2873
2975
  required: y.required,
2874
- wrapperClassName: u,
2875
- children: [/* @__PURE__ */ p("textarea", {
2976
+ wrapperClassName: f,
2977
+ children: [/* @__PURE__ */ n("textarea", {
2876
2978
  id: b,
2877
- className: e("w-full min-h-[80px] resize-y disabled:opacity-50 disabled:cursor-not-allowed", !c && [
2878
- fe,
2879
- N[s],
2979
+ className: e("w-full min-h-[80px] resize-y disabled:opacity-50 disabled:cursor-not-allowed", !u && [
2980
+ he,
2981
+ H[l],
2880
2982
  "px-3 py-2 text-sm"
2881
- ], !c && r && e("border-red-500 dark:border-red-400", "focus:ring-red-500"), l),
2882
- ...d === void 0 ? { defaultValue: f } : { value: d },
2883
- minLength: a,
2884
- maxLength: o,
2983
+ ], !u && a && e("border-red-500 dark:border-red-400", "focus:ring-red-500"), d),
2984
+ ...p === void 0 ? { defaultValue: m } : { value: p },
2985
+ minLength: s,
2986
+ maxLength: c,
2885
2987
  onChange: O,
2886
- "aria-invalid": !!r,
2988
+ "aria-invalid": !!a,
2887
2989
  "aria-label": v,
2888
- "aria-labelledby": Ie(t, C, v),
2889
- "aria-describedby": Z(_, !!n && S, r && x, D && w),
2990
+ "aria-labelledby": Ve(t, C, v),
2991
+ "aria-describedby": Q(_, !!i && S, a && x, D && w),
2890
2992
  ...y
2891
- }), D && /* @__PURE__ */ p(le, {
2993
+ }), D && /* @__PURE__ */ n(Z, {
2892
2994
  id: w,
2893
2995
  current: T,
2894
- min: a,
2895
- max: o,
2896
- showMin: a !== void 0,
2897
- showMax: o !== void 0
2996
+ min: s,
2997
+ max: c,
2998
+ showMin: s !== void 0,
2999
+ showMax: c !== void 0
2898
3000
  })]
2899
3001
  });
2900
3002
  }
2901
3003
  // src/lib/is_webkit_gtk.ts
2902
- var hi = "AppleWebKit", gi = ["Linux", "X11"], _i = [
3004
+ var Di = "AppleWebKit", Oi = ["Linux", "X11"], ki = [
2903
3005
  "Chrome",
2904
3006
  "Chromium",
2905
3007
  "Edg",
@@ -2907,12 +3009,12 @@ var hi = "AppleWebKit", gi = ["Linux", "X11"], _i = [
2907
3009
  "CriOS",
2908
3010
  "FxiOS"
2909
3011
  ];
2910
- function vi(e) {
2911
- return !e.includes(hi) || !gi.some((t) => e.includes(t)) ? !1 : !_i.some((t) => e.includes(t));
3012
+ function Ai(e) {
3013
+ return !e.includes(Di) || !Oi.some((t) => e.includes(t)) ? !1 : !ki.some((t) => e.includes(t));
2912
3014
  }
2913
3015
  // src/lib/theme_transition.ts
2914
- var yi = 750, bi = "ease-in-out";
2915
- async function xi({ theme: e, element: t, transitionDuration: n = yi, transitionEasing: r = bi, applyThemeCallback: i }) {
3016
+ var ji = 750, Mi = "ease-in-out";
3017
+ async function Ni({ theme: e, element: t, transitionDuration: n = ji, transitionEasing: r = Mi, applyThemeCallback: i }) {
2916
3018
  if (!document.startViewTransition || globalThis.matchMedia("(prefers-reduced-motion: reduce)").matches) {
2917
3019
  i(e);
2918
3020
  return;
@@ -2926,102 +3028,103 @@ async function xi({ theme: e, element: t, transitionDuration: n = yi, transition
2926
3028
  pseudoElement: "::view-transition-new(root)"
2927
3029
  });
2928
3030
  }
2929
- function Si(e) {
3031
+ function Pi(e) {
2930
3032
  return e === "light" ? "dark" : e === "dark" ? "system" : "light";
2931
3033
  }
3034
+ // src/stores/theme_store/theme_storage_key.ts
3035
+ var Fi = "theme";
2932
3036
  // src/stores/theme_store/theme_store.ts
2933
- var Ci = "theme";
2934
- function wi(e) {
3037
+ function Ii(e) {
2935
3038
  return e === "light" || e === "dark" || e === "system";
2936
3039
  }
2937
- function Ti() {
3040
+ function Li() {
2938
3041
  return globalThis.window !== void 0 && globalThis.document !== void 0;
2939
3042
  }
2940
- function Ei(e) {
3043
+ function Ri(e) {
2941
3044
  let t = window.matchMedia("(prefers-color-scheme: dark)").matches, n = e === "dark" || e === "system" && t;
2942
3045
  document.documentElement.classList.toggle("dark", n);
2943
3046
  }
2944
- function Di() {
2945
- if (!Ti()) return "system";
3047
+ function zi() {
3048
+ if (!Li()) return "system";
2946
3049
  try {
2947
- let e = globalThis.localStorage.getItem(Ci);
2948
- return wi(e) ? e : "system";
3050
+ let e = globalThis.localStorage.getItem(Fi);
3051
+ return Ii(e) ? e : "system";
2949
3052
  } catch {
2950
3053
  return "system";
2951
3054
  }
2952
3055
  }
2953
- function Oi(e) {
2954
- if (Ti()) try {
2955
- globalThis.localStorage.setItem(Ci, e);
3056
+ function Bi(e) {
3057
+ if (Li()) try {
3058
+ globalThis.localStorage.setItem(Fi, e);
2956
3059
  } catch {
2957
3060
  return;
2958
3061
  }
2959
3062
  }
2960
- var ki = Di();
2961
- Ti() && Ei(ki);
2962
- var Ai = S((e) => ({
2963
- theme: ki,
3063
+ var Vi = zi();
3064
+ Li() && Ri(Vi);
3065
+ var Hi = S((e) => ({
3066
+ theme: Vi,
2964
3067
  setTheme: (t) => {
2965
- Ei(t), Oi(t), e({ theme: t });
3068
+ Ri(t), Bi(t), e({ theme: t });
2966
3069
  }
2967
3070
  }));
2968
- Ti() && (globalThis.addEventListener("storage", (e) => {
2969
- if (e.key !== Ci) return;
2970
- let t = wi(e.newValue) ? e.newValue : "system";
2971
- Ei(t), Ai.setState({ theme: t });
3071
+ Li() && (globalThis.addEventListener("storage", (e) => {
3072
+ if (e.key !== "theme") return;
3073
+ let t = Ii(e.newValue) ? e.newValue : "system";
3074
+ Ri(t), Hi.setState({ theme: t });
2972
3075
  }), globalThis.matchMedia("(prefers-color-scheme: dark)").addEventListener("change", () => {
2973
- Ai.getState().theme === "system" && Ei("system");
3076
+ Hi.getState().theme === "system" && Ri("system");
2974
3077
  }));
2975
3078
  // src/components/theme_toggle/theme_toggle.tsx
2976
- var ji = {
3079
+ var Ui = {
2977
3080
  light: "i-tabler-sun text-yellow-500",
2978
3081
  dark: "i-tabler-moon-stars text-gray-700 dark:text-yellow-500",
2979
3082
  system: "i-tabler-device-desktop text-blue-500"
2980
- }, Mi = {
3083
+ }, Wi = {
2981
3084
  light: "i-tabler-sun",
2982
3085
  dark: "i-tabler-moon-stars",
2983
3086
  system: "i-tabler-device-desktop"
2984
- }, Ni = "i-tabler-device-desktop text-gray-400", Pi = "i-tabler-device-desktop";
2985
- function Fi(e, t, n) {
3087
+ }, Gi = "i-tabler-device-desktop text-gray-400", Ki = "i-tabler-device-desktop";
3088
+ function qi(e, t, n) {
2986
3089
  return e ? { unstyled: !0 } : {
2987
3090
  radius: t,
2988
3091
  variant: n
2989
3092
  };
2990
3093
  }
2991
- function Ii(e, t, n) {
2992
- return n ? t ? Mi[e] : Pi : t ? ji[e] : Ni;
3094
+ function Ji(e, t, n) {
3095
+ return n ? t ? Wi[e] : Ki : t ? Ui[e] : Gi;
2993
3096
  }
2994
- function Li({ isTransitionEnabled: e, transitionDuration: t, transitionEasing: n, size: r = "md", unstyled: a = !1, radius: o, variant: s, getAriaLabel: c, tooltip: l }) {
2995
- let d = Ai((e) => e.theme), f = Ai((e) => e.setTheme), m = V(), h = Ne(), g = u(null), _ = i(async () => {
2996
- let r = Si(d), i = g.current, a = e ?? !vi(navigator.userAgent);
2997
- i && a ? await xi({
2998
- theme: r,
3097
+ function Yi({ isTransitionEnabled: e, transitionDuration: t, transitionEasing: r, size: i = "md", unstyled: a = !1, radius: o, variant: c, getAriaLabel: l, tooltip: u }) {
3098
+ let d = Hi((e) => e.theme), f = Hi((e) => e.setTheme), m = J(), h = Re(), g = p(null), _ = s(async () => {
3099
+ let n = Pi(d), i = g.current, a = e ?? !Ai(navigator.userAgent);
3100
+ i && a ? await Ni({
3101
+ theme: n,
2999
3102
  element: i,
3000
3103
  transitionDuration: t,
3001
- transitionEasing: n,
3104
+ transitionEasing: r,
3002
3105
  applyThemeCallback: f
3003
- }) : f(r);
3106
+ }) : f(n);
3004
3107
  }, [
3005
3108
  d,
3006
3109
  e,
3007
3110
  t,
3008
- n,
3111
+ r,
3009
3112
  f
3010
- ]), v = Ii(d, h, a), y = Fi(a, o, s);
3011
- return /* @__PURE__ */ p(It, {
3113
+ ]), v = Ji(d, h, a), y = qi(a, o, c);
3114
+ return /* @__PURE__ */ n(Dt, {
3012
3115
  ref: g,
3013
3116
  icon: v,
3014
- "aria-label": (c ?? m.currentTheme)(d),
3015
- size: r,
3117
+ "aria-label": (l ?? m.currentTheme)(d),
3118
+ size: i,
3016
3119
  ...y,
3017
- tooltip: l,
3120
+ tooltip: u,
3018
3121
  onClick: () => {
3019
3122
  _();
3020
3123
  }
3021
3124
  });
3022
3125
  }
3023
3126
  // src/components/toolbar/toolbar_items.ts
3024
- var Ri = "a[href], button, input:not([type=\"hidden\"]), select, textarea, summary, [contenteditable]:not([contenteditable=\"false\"]), [tabindex]", zi = [
3127
+ var Xi = "a[href], button, input:not([type=\"hidden\"]), select, textarea, summary, [contenteditable]:not([contenteditable=\"false\"]), [tabindex]", Zi = [
3025
3128
  "textarea",
3026
3129
  "[contenteditable]:not([contenteditable=\"false\"])",
3027
3130
  `input:not(${[
@@ -3035,48 +3138,48 @@ var Ri = "a[href], button, input:not([type=\"hidden\"]), select, textarea, summa
3035
3138
  "reset",
3036
3139
  "submit"
3037
3140
  ].map((e) => `[type="${e}"]`).join(", ")})`
3038
- ].join(", "), Bi = "select, input[type=\"range\"], input[type=\"radio\"]";
3039
- function Vi(e) {
3141
+ ].join(", "), Qi = "select, input[type=\"range\"], input[type=\"radio\"]";
3142
+ function $i(e) {
3040
3143
  return e.matches(":disabled, [aria-disabled=\"true\"]");
3041
3144
  }
3042
- function Hi(e) {
3043
- return Array.from(e.querySelectorAll(Ri));
3145
+ function ea(e) {
3146
+ return Array.from(e.querySelectorAll(Xi));
3044
3147
  }
3045
- function Ui(e) {
3046
- return Hi(e).filter((e) => !Vi(e));
3148
+ function ta(e) {
3149
+ return ea(e).filter((e) => !$i(e));
3047
3150
  }
3048
- function Wi(e) {
3049
- return e instanceof HTMLElement && e.matches(`${zi}, ${Bi}`);
3151
+ function na(e) {
3152
+ return e instanceof HTMLElement && e.matches(`${Zi}, ${Qi}`);
3050
3153
  }
3051
3154
  // src/components/toolbar/toolbar_navigation.ts
3052
- var Gi = (e, t) => (e + 1) % t, Ki = (e, t) => (e - 1 + t) % t, qi = () => 0, Ji = (e, t) => t - 1, Yi = {
3155
+ var ra = (e, t) => (e + 1) % t, ia = (e, t) => (e - 1 + t) % t, aa = () => 0, oa = (e, t) => t - 1, sa = {
3053
3156
  horizontal: {
3054
- ArrowRight: Gi,
3055
- ArrowLeft: Ki,
3056
- Home: qi,
3057
- End: Ji
3157
+ ArrowRight: ra,
3158
+ ArrowLeft: ia,
3159
+ Home: aa,
3160
+ End: oa
3058
3161
  },
3059
3162
  vertical: {
3060
- ArrowDown: Gi,
3061
- ArrowUp: Ki,
3062
- Home: qi,
3063
- End: Ji
3163
+ ArrowDown: ra,
3164
+ ArrowUp: ia,
3165
+ Home: aa,
3166
+ End: oa
3064
3167
  }
3065
3168
  };
3066
- function Xi(e) {
3067
- let { key: t, orientation: n, currentPosition: r, itemCount: i } = e, a = Yi[n][t];
3169
+ function ca(e) {
3170
+ let { key: t, orientation: n, currentPosition: r, itemCount: i } = e, a = sa[n][t];
3068
3171
  if (a && i !== 0) return a(r, i);
3069
3172
  }
3070
3173
  // src/components/toolbar/use_toolbar_roving_focus.ts
3071
- var Zi = ["disabled", "aria-disabled"];
3072
- function Qi(e, t) {
3073
- let n = u(null), r = i(() => {
3174
+ var la = ["disabled", "aria-disabled"];
3175
+ function ua(e, t) {
3176
+ let n = p(null), r = s(() => {
3074
3177
  let t = e.current;
3075
3178
  if (!t) return;
3076
- let r = Ui(t), i = n.current, a = i && r.includes(i) ? i : r[0];
3077
- for (let e of Hi(t)) e.tabIndex = e === a ? 0 : -1;
3179
+ let r = ta(t), i = n.current, a = i && r.includes(i) ? i : r[0];
3180
+ for (let e of ea(t)) e.tabIndex = e === a ? 0 : -1;
3078
3181
  }, [e]);
3079
- return o(() => {
3182
+ return l(() => {
3080
3183
  let t = e.current;
3081
3184
  if (!t) return;
3082
3185
  r();
@@ -3085,19 +3188,19 @@ function Qi(e, t) {
3085
3188
  subtree: !0,
3086
3189
  childList: !0,
3087
3190
  attributes: !0,
3088
- attributeFilter: Zi
3191
+ attributeFilter: la
3089
3192
  }), () => n.disconnect();
3090
3193
  }, [e, r]), {
3091
3194
  handleFocus: (t) => {
3092
3195
  let i = e.current;
3093
3196
  if (!i) return;
3094
- let a = Ui(i).find((e) => e === t.target);
3197
+ let a = ta(i).find((e) => e === t.target);
3095
3198
  a && (n.current = a, r());
3096
3199
  },
3097
3200
  handleKeyDown: (n) => {
3098
3201
  let r = e.current;
3099
- if (!r || !r.contains(n.target) || Wi(n.target)) return;
3100
- let i = Ui(r), a = Xi({
3202
+ if (!r || !r.contains(n.target) || na(n.target)) return;
3203
+ let i = ta(r), a = ca({
3101
3204
  key: n.key,
3102
3205
  orientation: t,
3103
3206
  currentPosition: i.findIndex((e) => e === n.target),
@@ -3108,48 +3211,71 @@ function Qi(e, t) {
3108
3211
  };
3109
3212
  }
3110
3213
  // src/components/toolbar/toolbar.tsx
3111
- var $i = {
3214
+ var da = {
3112
3215
  horizontal: "flex items-center gap-1",
3113
3216
  vertical: "flex flex-col items-stretch gap-1"
3114
3217
  };
3115
- function ea(t) {
3116
- let { orientation: n = "horizontal", unstyled: r = !1, className: i, ref: a, onFocus: o, onKeyDown: s, ...c } = t, l = u(null), { handleFocus: d, handleKeyDown: f } = Qi(l, n);
3117
- return /* @__PURE__ */ p("div", {
3118
- ...c,
3119
- ref: Ee(l, a),
3218
+ function fa(t) {
3219
+ let { orientation: r = "horizontal", unstyled: i = !1, className: a, ref: o, onFocus: s, onKeyDown: c, ...l } = t, u = p(null), { handleFocus: d, handleKeyDown: f } = ua(u, r);
3220
+ return /* @__PURE__ */ n("div", {
3221
+ ...l,
3222
+ ref: je(u, o),
3120
3223
  role: "toolbar",
3121
- "aria-orientation": n,
3122
- className: e(!r && $i[n], i),
3224
+ "aria-orientation": r,
3225
+ className: e(!i && da[r], a),
3123
3226
  onFocus: (e) => {
3124
- d(e), o?.(e);
3227
+ d(e), s?.(e);
3125
3228
  },
3126
3229
  onKeyDown: (e) => {
3127
- s?.(e), !e.defaultPrevented && f(e);
3230
+ c?.(e), !e.defaultPrevented && f(e);
3128
3231
  }
3129
3232
  });
3130
3233
  }
3234
+ // src/components/ui_provider/french_ui_labels.ts
3235
+ var pa = {
3236
+ light: "clair",
3237
+ dark: "sombre",
3238
+ system: "système"
3239
+ }, ma = {
3240
+ close: "Fermer",
3241
+ confirm: "Confirmer",
3242
+ cancel: "Annuler",
3243
+ noResults: "Aucun résultat",
3244
+ clearSelection: "Effacer la sélection",
3245
+ search: "Rechercher",
3246
+ clear: "Effacer",
3247
+ required: "obligatoire",
3248
+ copied: "Copié",
3249
+ loading: "Chargement",
3250
+ copy: "Copier",
3251
+ charactersRemaining: (e) => `${e} ${e > 1 ? "caractères restants" : "caractère restant"}`,
3252
+ currentTheme: (e) => `Thème actuel : ${pa[e]}`,
3253
+ overflowCount: (e) => `+${e} ${e > 1 ? "autres" : "autre"}`,
3254
+ selectedCount: (e) => `${e} ${e > 1 ? "sélectionnés" : "sélectionné"}`,
3255
+ maxSelectedHint: (e) => `Vous pouvez sélectionner jusqu'à ${e} ${e > 1 ? "éléments" : "élément"}`
3256
+ };
3131
3257
  // src/components/ui_provider/ui_provider.tsx
3132
- function ta(e = {}) {
3258
+ function ha(e = {}) {
3133
3259
  return Object.fromEntries(Object.entries(e).filter(([, e]) => e !== void 0));
3134
3260
  }
3135
- function na({ labels: e, announceFieldErrors: t, children: n }) {
3136
- let r = a(B), i = be(), o = l(() => ({
3137
- ...r,
3138
- ...ta(e)
3139
- }), [r, e]);
3140
- return /* @__PURE__ */ p(B.Provider, {
3261
+ function ga({ labels: e, announceFieldErrors: t, children: r }) {
3262
+ let i = c(q), a = Ce(), o = f(() => ({
3263
+ ...i,
3264
+ ...ha(e)
3265
+ }), [i, e]);
3266
+ return /* @__PURE__ */ n(q.Provider, {
3141
3267
  value: o,
3142
- children: /* @__PURE__ */ p(ye.Provider, {
3143
- value: t ?? i,
3144
- children: n
3268
+ children: /* @__PURE__ */ n(Se.Provider, {
3269
+ value: t ?? a,
3270
+ children: r
3145
3271
  })
3146
3272
  });
3147
3273
  }
3148
3274
  // src/hooks/use_is_client/with_client_only.tsx
3149
- var ra = (e) => {
3275
+ var _a = (e) => {
3150
3276
  function t(t) {
3151
- return Ne() ? /* @__PURE__ */ p(e, { ...t }) : null;
3277
+ return Re() ? /* @__PURE__ */ n(e, { ...t }) : null;
3152
3278
  }
3153
3279
  return t;
3154
- };
3155
- export { ee as Avatar, fe as BASE_INPUT_STYLES, z as Badge, U as Button, oe as Card, le as CharacterCount, Oe as Checkbox, Me as CheckboxOptions, Pe as ClientOnly, Be as Combobox, cr as ConfirmModal, ot as ContextMenu, ut as CopyButton, On as Drawer, mt as Highlight, It as IconButton, jn as Input, Nn as Kbd, In as Menu, Ln as MenuGroup, Qn as MenuItem, $n as MenuSeparator, ur as Modal, dr as ModalFooter, pr as ModalProvider, br as MultiCombobox, Sr as RadioOptions, Cr as Select, kr as SplitButton, Ar as Switch, pi as Tabs, mi as Textarea, Li as ThemeToggle, ea as Toolbar, Mt as Tooltip, na as UIProvider, dt as splitIntoHighlightSegments, wn as useDisableHotkeysWhileMounted, fr as useDismissGuard, Sn as useGlobalHotkeysStore, Ne as useIsClient, Ai as useThemeStore, ra as withClientOnly };
3280
+ }, va = `(function(){var t=null;try{t=localStorage.getItem(${JSON.stringify(Fi)})}catch(e){}var d=t==="dark"||(t!=="light"&&matchMedia("(prefers-color-scheme: dark)").matches);document.documentElement.classList.toggle("dark",d)})()`;
3281
+ export { j as AppBar, te as Avatar, he as BASE_INPUT_STYLES, re as Badge, Y as Button, ce as Card, Z as CharacterCount, Ne as Checkbox, Le as CheckboxOptions, ze as ClientOnly, Ke as Combobox, mr as ConfirmModal, ft as ContextMenu, jt as CopyButton, Pn as Drawer, ma as FRENCH_UI_LABELS, Ft as Highlight, Dt as IconButton, Ln as Input, zn as Kbd, Hn as Menu, Un as MenuGroup, ir as MenuItem, ar as MenuSeparator, gr as Modal, _r as ModalFooter, yr as ModalProvider, Dr as MultiCombobox, kr as RadioOptions, Ar as Select, Vr as Spinner, Ir as SplitButton, Hr as Switch, va as THEME_INIT_SCRIPT, Ti as Tabs, Ei as Textarea, Yi as ThemeToggle, fa as Toolbar, Ct as Tooltip, ga as UIProvider, K as buttonClassName, Mt as splitIntoHighlightSegments, An as useDisableHotkeysWhileMounted, vr as useDismissGuard, On as useGlobalHotkeysStore, Re as useIsClient, Hi as useThemeStore, _a as withClientOnly };