@matthiaskrijgsman/mat-ui 0.0.32 → 0.0.33

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,48 +1,48 @@
1
1
  "use client";
2
- import { jsx as e, jsxs as d, Fragment as Z } from "react/jsx-runtime";
2
+ import { jsx as e, jsxs as d, Fragment as ee } from "react/jsx-runtime";
3
3
  import * as y from "react";
4
- import { createContext as Ye, useContext as Je, useEffect as _, useState as B, useRef as we, useCallback as Oe, useLayoutEffect as Nt, useMemo as oe } from "react";
5
- import { AnimatePresence as Ie, motion as K, animate as Wt } from "motion/react";
6
- import { IconExclamationCircleFilled as Qe, IconEyeOff as Ht, IconEye as _t, IconPaperclip as $t, IconCircleCheckFilled as qe, IconX as ae, IconCloudUpload as Xt, IconCheck as kt, IconChevronDown as he, IconBold as jt, IconItalic as Vt, IconUnderline as Kt, IconList as Ke, IconListNumbers as Gt, IconLink as Yt, IconArrowBackUp as Jt, IconArrowForwardUp as Qt, IconDots as qt, IconSearch as Le, IconSearchOff as Ze, IconInfoCircleFilled as Zt, IconAlertTriangleFilled as en, IconChevronRight as tn, IconChevronUp as nn, IconSettings as it, IconPlus as ct, IconTrash as rn, IconMailFilled as ln } from "@tabler/icons-react";
7
- import { FloatingPortal as Pe, FloatingOverlay as et, size as tt, useFloating as nt, autoUpdate as rt, offset as on, flip as sn, shift as an, useListNavigation as cn, useInteractions as dn } from "@floating-ui/react";
8
- import { mergeRefs as un } from "react-merge-refs";
9
- import { useDropzone as yt } from "react-dropzone";
10
- import { LexicalComposer as mn } from "@lexical/react/LexicalComposer";
11
- import { RichTextPlugin as fn } from "@lexical/react/LexicalRichTextPlugin";
12
- import { ContentEditable as hn } from "@lexical/react/LexicalContentEditable";
13
- import { HistoryPlugin as pn } from "@lexical/react/LexicalHistoryPlugin";
14
- import { ListPlugin as gn } from "@lexical/react/LexicalListPlugin";
15
- import { LinkPlugin as bn } from "@lexical/react/LexicalLinkPlugin";
16
- import { OnChangePlugin as vn } from "@lexical/react/LexicalOnChangePlugin";
17
- import { AutoFocusPlugin as xn } from "@lexical/react/LexicalAutoFocusPlugin";
18
- import { LexicalErrorBoundary as wn } from "@lexical/react/LexicalErrorBoundary";
19
- import { HeadingNode as Nn, QuoteNode as kn, $isHeadingNode as yn, $createHeadingNode as Cn } from "@lexical/rich-text";
20
- import { ListNode as Ct, ListItemNode as In, $isListNode as Rn, REMOVE_LIST_COMMAND as dt, INSERT_UNORDERED_LIST_COMMAND as Sn, INSERT_ORDERED_LIST_COMMAND as Dn } from "@lexical/list";
21
- import { LinkNode as On, $isLinkNode as ut, TOGGLE_LINK_COMMAND as mt } from "@lexical/link";
22
- import { useLexicalComposerContext as ie } from "@lexical/react/LexicalComposerContext";
23
- import { CAN_UNDO_COMMAND as zn, COMMAND_PRIORITY_LOW as ze, CAN_REDO_COMMAND as Tn, $getSelection as It, $isRangeSelection as Rt, $createParagraphNode as Ln, FORMAT_TEXT_COMMAND as He, UNDO_COMMAND as Pn, REDO_COMMAND as En, FOCUS_COMMAND as Mn, BLUR_COMMAND as Fn } from "lexical";
24
- import { mergeRegister as St, $getNearestNodeOfType as Bn } from "@lexical/utils";
25
- import { $setBlocksType as ft } from "@lexical/selection";
26
- const f = (...n) => n.filter(Boolean).join(" "), An = [
4
+ import { createContext as Qe, useContext as qe, useEffect as $, useState as A, useRef as ke, useCallback as Te, useLayoutEffect as yt, useMemo as se } from "react";
5
+ import { AnimatePresence as Se, motion as G, animate as _t } from "motion/react";
6
+ import { IconExclamationCircleFilled as Ze, IconEyeOff as $t, IconEye as Xt, IconPaperclip as jt, IconCircleCheckFilled as et, IconX as ie, IconCloudUpload as Vt, IconCheck as Ct, IconChevronDown as pe, IconBold as Kt, IconItalic as Gt, IconUnderline as Yt, IconList as Ye, IconListNumbers as Jt, IconLink as Qt, IconArrowBackUp as qt, IconArrowForwardUp as Zt, IconDots as en, IconSearch as Ee, IconSearchOff as tt, IconInfoCircleFilled as tn, IconAlertTriangleFilled as nn, IconChevronRight as rn, IconChevronUp as ln, IconSettings as dt, IconPlus as ut, IconTrash as on, IconMailFilled as sn } from "@tabler/icons-react";
7
+ import { FloatingPortal as Me, FloatingOverlay as nt, size as rt, useFloating as lt, autoUpdate as ot, offset as an, flip as cn, shift as dn, useListNavigation as un, useInteractions as fn } from "@floating-ui/react";
8
+ import { mergeRefs as mn } from "react-merge-refs";
9
+ import { useDropzone as It } from "react-dropzone";
10
+ import { LexicalComposer as hn } from "@lexical/react/LexicalComposer";
11
+ import { RichTextPlugin as pn } from "@lexical/react/LexicalRichTextPlugin";
12
+ import { ContentEditable as gn } from "@lexical/react/LexicalContentEditable";
13
+ import { HistoryPlugin as bn } from "@lexical/react/LexicalHistoryPlugin";
14
+ import { ListPlugin as vn } from "@lexical/react/LexicalListPlugin";
15
+ import { LinkPlugin as xn } from "@lexical/react/LexicalLinkPlugin";
16
+ import { OnChangePlugin as wn } from "@lexical/react/LexicalOnChangePlugin";
17
+ import { AutoFocusPlugin as Nn } from "@lexical/react/LexicalAutoFocusPlugin";
18
+ import { LexicalErrorBoundary as kn } from "@lexical/react/LexicalErrorBoundary";
19
+ import { HeadingNode as yn, QuoteNode as Cn, $isHeadingNode as In, $createHeadingNode as Rn } from "@lexical/rich-text";
20
+ import { ListNode as Rt, ListItemNode as Sn, $isListNode as Dn, REMOVE_LIST_COMMAND as ft, INSERT_UNORDERED_LIST_COMMAND as On, INSERT_ORDERED_LIST_COMMAND as zn } from "@lexical/list";
21
+ import { LinkNode as Tn, $isLinkNode as mt, TOGGLE_LINK_COMMAND as ht } from "@lexical/link";
22
+ import { useLexicalComposerContext as ce } from "@lexical/react/LexicalComposerContext";
23
+ import { CAN_UNDO_COMMAND as Ln, COMMAND_PRIORITY_LOW as Le, CAN_REDO_COMMAND as Pn, $getSelection as St, $isRangeSelection as Dt, $createParagraphNode as En, FORMAT_TEXT_COMMAND as $e, UNDO_COMMAND as Mn, REDO_COMMAND as Fn, FOCUS_COMMAND as Bn, BLUR_COMMAND as An } from "lexical";
24
+ import { mergeRegister as Ot, $getNearestNodeOfType as Un } from "@lexical/utils";
25
+ import { $setBlocksType as pt } from "@lexical/selection";
26
+ const h = (...n) => n.filter(Boolean).join(" "), Wn = [
27
27
  "polygon(50% 50%,0 0,0 0,0 0,0 0,0 0)",
28
28
  "polygon(50% 50%,0 0,100% 0,100% 0,100% 0,100% 0)",
29
29
  "polygon(50% 50%,0 0,100% 0,100% 100%,100% 100%,100% 100%)",
30
30
  "polygon(50% 50%,0 0,100% 0,100% 100%,0 100%,0 100%)",
31
31
  "polygon(50% 50%,0 0,100% 0,100% 100%,0 100%,0 0)"
32
- ], Ce = (n) => {
32
+ ], Re = (n) => {
33
33
  const {
34
34
  speed: t = 1,
35
35
  className: o
36
36
  } = n, s = 1 / t, r = 2 / t;
37
- return /* @__PURE__ */ e(Ie, { children: /* @__PURE__ */ e(
38
- K.div,
37
+ return /* @__PURE__ */ e(Se, { children: /* @__PURE__ */ e(
38
+ G.div,
39
39
  {
40
40
  role: "status",
41
- className: f("relative rounded-full", o),
41
+ className: h("relative rounded-full", o),
42
42
  animate: { rotate: 360 },
43
43
  transition: { repeat: 1 / 0, ease: "linear", duration: s },
44
44
  children: /* @__PURE__ */ e(
45
- K.div,
45
+ G.div,
46
46
  {
47
47
  className: "absolute inset-0 rounded-full",
48
48
  style: {
@@ -50,7 +50,7 @@ const f = (...n) => n.filter(Boolean).join(" "), An = [
50
50
  borderStyle: "solid",
51
51
  borderWidth: 2
52
52
  },
53
- animate: { clipPath: An },
53
+ animate: { clipPath: Wn },
54
54
  transition: {
55
55
  repeat: 1 / 0,
56
56
  ease: "linear",
@@ -61,76 +61,76 @@ const f = (...n) => n.filter(Boolean).join(" "), An = [
61
61
  )
62
62
  }
63
63
  ) });
64
- }, ee = {
64
+ }, te = {
65
65
  sm: "h-[var(--control-size-sm-height)]",
66
66
  md: "h-[var(--control-size-md-height)]",
67
67
  lg: "h-[var(--control-size-lg-height)]"
68
- }, Dt = {
68
+ }, zt = {
69
69
  sm: "min-h-[var(--control-size-sm-height)]",
70
70
  md: "min-h-[var(--control-size-md-height)]",
71
71
  lg: "min-h-[var(--control-size-lg-height)]"
72
- }, G = {
72
+ }, Y = {
73
73
  sm: "text-[length:var(--control-size-sm-font-size)]",
74
74
  md: "text-[length:var(--control-size-md-font-size)]",
75
75
  lg: "text-[length:var(--control-size-lg-font-size)]"
76
- }, Un = {
76
+ }, Hn = {
77
77
  sm: "gap-[var(--control-size-sm-gap)]",
78
78
  md: "gap-[var(--control-size-md-gap)]",
79
79
  lg: "gap-[var(--control-size-lg-gap)]"
80
- }, Wn = {
80
+ }, _n = {
81
81
  sm: "px-[var(--control-size-sm-px)]",
82
82
  md: "px-[var(--control-size-md-px)]",
83
83
  lg: "px-[var(--control-size-lg-px)]"
84
- }, ce = {
84
+ }, de = {
85
85
  sm: "pl-[var(--control-size-sm-px)]",
86
86
  md: "pl-[var(--control-size-md-px)]",
87
87
  lg: "pl-[var(--control-size-lg-px)]"
88
- }, lt = {
88
+ }, st = {
89
89
  sm: "pr-[var(--control-size-sm-px)]",
90
90
  md: "pr-[var(--control-size-md-px)]",
91
91
  lg: "pr-[var(--control-size-lg-px)]"
92
- }, de = {
92
+ }, ue = {
93
93
  sm: "pr-[calc(var(--control-size-sm-px)+2rem)]",
94
94
  md: "pr-[calc(var(--control-size-md-px)+2rem)]",
95
95
  lg: "pr-[calc(var(--control-size-lg-px)+2rem)]"
96
- }, Ee = {
96
+ }, Fe = {
97
97
  sm: "pr-[calc(var(--control-size-sm-px)+3.75rem)]",
98
98
  md: "pr-[calc(var(--control-size-md-px)+3.75rem)]",
99
99
  lg: "pr-[calc(var(--control-size-lg-px)+3.75rem)]"
100
- }, Ot = {
100
+ }, Tt = {
101
101
  sm: "pl-[calc(var(--control-size-sm-icon-offset)+var(--control-size-sm-icon)+0.75rem)]",
102
102
  md: "pl-[calc(var(--control-size-md-icon-offset)+var(--control-size-md-icon)+0.75rem)]",
103
103
  lg: "pl-[calc(var(--control-size-lg-icon-offset)+var(--control-size-lg-icon)+0.75rem)]"
104
- }, zt = {
104
+ }, Lt = {
105
105
  sm: "left-[var(--control-size-sm-icon-offset)]",
106
106
  md: "left-[var(--control-size-md-icon-offset)]",
107
107
  lg: "left-[var(--control-size-lg-icon-offset)]"
108
- }, Hn = {
108
+ }, $n = {
109
109
  sm: "right-[var(--control-size-sm-px)]",
110
110
  md: "right-[var(--control-size-md-px)]",
111
111
  lg: "right-[var(--control-size-lg-px)]"
112
- }, fe = {
112
+ }, he = {
113
113
  sm: "h-[var(--control-size-sm-icon)] w-[var(--control-size-sm-icon)]",
114
114
  md: "h-[var(--control-size-md-icon)] w-[var(--control-size-md-icon)]",
115
115
  lg: "h-[var(--control-size-lg-icon)] w-[var(--control-size-lg-icon)]"
116
- }, Tt = {
116
+ }, Pt = {
117
117
  sm: "h-[var(--control-size-sm-height)] w-[var(--control-size-sm-height)]",
118
118
  md: "h-[var(--control-size-md-height)] w-[var(--control-size-md-height)]",
119
119
  lg: "h-[var(--control-size-lg-height)] w-[var(--control-size-lg-height)]"
120
- }, _n = `
120
+ }, Xn = `
121
121
  inline-flex flex-row items-center justify-center
122
122
  button-ring font-semibold ring-0 disabled:hover:ring-0 hover:ring-4 active:ring-1
123
123
  rounded-[var(--border-radius-input)]
124
124
  cursor-pointer transition-all duration-150 select-none focus:outline-none focus:ring-4
125
125
  disabled:cursor-default
126
- `, $n = {
126
+ `, jn = {
127
127
  primary: "border button-primary shadow-sm",
128
128
  secondary: "border button-secondary shadow-sm",
129
129
  tertiary: "border button-tertiary",
130
130
  white: "border button-white shadow-sm",
131
131
  black: "border button-black shadow-sm",
132
132
  transparent: "border button-transparent"
133
- }, Xn = y.forwardRef((n, t) => {
133
+ }, Vn = y.forwardRef((n, t) => {
134
134
  const {
135
135
  variant: o = "white",
136
136
  size: s = "md",
@@ -144,39 +144,39 @@ const f = (...n) => n.filter(Boolean).join(" "), An = [
144
144
  "button",
145
145
  {
146
146
  ref: t,
147
- className: f(
148
- _n,
149
- $n[o],
150
- ee[s],
151
- Wn[s],
152
- G[s],
153
- Un[s],
147
+ className: h(
148
+ Xn,
149
+ jn[o],
150
+ te[s],
151
+ _n[s],
152
+ Y[s],
153
+ Hn[s],
154
154
  r
155
155
  ),
156
156
  ...c,
157
157
  children: [
158
- a && /* @__PURE__ */ e(Ce, { className: f(fe[s]) }),
159
- !a && /* @__PURE__ */ d(Z, { children: [
160
- i && /* @__PURE__ */ e(i, { className: f(fe[s], "-ml-1") }),
158
+ a && /* @__PURE__ */ e(Re, { className: h(he[s]) }),
159
+ !a && /* @__PURE__ */ d(ee, { children: [
160
+ i && /* @__PURE__ */ e(i, { className: h(he[s], "-ml-1") }),
161
161
  l
162
162
  ] })
163
163
  ]
164
164
  }
165
165
  );
166
- }), jn = `
166
+ }), Kn = `
167
167
  inline-flex flex-row items-center justify-center
168
168
  button-ring font-semibold ring-0 disabled:hover:ring-0 hover:ring-4 active:ring-1
169
169
  rounded-[var(--border-radius-input)]
170
170
  cursor-pointer transition-all duration-150 select-none focus:outline-none focus:ring-4
171
171
  disabled:cursor-default
172
- `, Vn = {
172
+ `, Gn = {
173
173
  primary: "border button-primary shadow-sm",
174
174
  secondary: "border button-secondary shadow-sm",
175
175
  tertiary: "border button-tertiary",
176
176
  white: "border button-white shadow-sm",
177
177
  black: "border button-black shadow-sm",
178
178
  transparent: "border button-transparent"
179
- }, Ge = y.forwardRef((n, t) => {
179
+ }, Je = y.forwardRef((n, t) => {
180
180
  const {
181
181
  variant: o = "white",
182
182
  size: s = "md",
@@ -188,28 +188,28 @@ const f = (...n) => n.filter(Boolean).join(" "), An = [
188
188
  "button",
189
189
  {
190
190
  ref: t,
191
- className: f(
192
- jn,
193
- Vn[o],
194
- Tt[s],
191
+ className: h(
192
+ Kn,
193
+ Gn[o],
194
+ Pt[s],
195
195
  r
196
196
  ),
197
197
  ...a,
198
- children: /* @__PURE__ */ e(l, { className: fe[s] })
198
+ children: /* @__PURE__ */ e(l, { className: he[s] })
199
199
  }
200
200
  );
201
- }), Kn = `
201
+ }), Yn = `
202
202
  inline-flex flex-row items-center justify-center
203
203
  button-ring font-semibold ring-0 disabled:hover:ring-0 hover:ring-4 active:ring-1 rounded-full cursor-pointer transition-all duration-150 select-none focus:outline-none focus:ring-4
204
204
  disabled:cursor-default
205
- `, Gn = {
205
+ `, Jn = {
206
206
  primary: "border button-primary shadow-sm",
207
207
  secondary: "border button-secondary shadow-sm",
208
208
  tertiary: "border button-tertiary",
209
209
  white: "border button-white shadow-sm",
210
210
  black: "border button-black shadow-sm",
211
211
  transparent: "border button-transparent"
212
- }, Lt = y.forwardRef((n, t) => {
212
+ }, Et = y.forwardRef((n, t) => {
213
213
  const {
214
214
  variant: o = "white",
215
215
  size: s = "md",
@@ -221,49 +221,49 @@ const f = (...n) => n.filter(Boolean).join(" "), An = [
221
221
  "button",
222
222
  {
223
223
  ref: t,
224
- className: f(
225
- Kn,
226
- Gn[o],
227
- Tt[s],
224
+ className: h(
225
+ Yn,
226
+ Jn[o],
227
+ Pt[s],
228
228
  r
229
229
  ),
230
230
  ...a,
231
- children: /* @__PURE__ */ e(l, { className: fe[s] })
231
+ children: /* @__PURE__ */ e(l, { className: he[s] })
232
232
  }
233
233
  );
234
- }), Y = (n) => {
234
+ }), J = (n) => {
235
235
  const {
236
236
  children: t
237
237
  } = n;
238
238
  return t ? /* @__PURE__ */ e("label", { className: "input-label font-medium mb-1", children: t }) : null;
239
- }, te = () => /* @__PURE__ */ e("div", { className: "h-5 w-5", children: /* @__PURE__ */ e(Qe, { className: "h-5 w-5 input-error-icon" }) }), J = Ye("md"), Yn = () => Je(J), ue = y.forwardRef((n, t) => {
239
+ }, ne = () => /* @__PURE__ */ e("div", { className: "h-5 w-5", children: /* @__PURE__ */ e(Ze, { className: "h-5 w-5 input-error-icon" }) }), Q = Qe("md"), Qn = () => qe(Q), fe = y.forwardRef((n, t) => {
240
240
  const {
241
241
  children: o,
242
242
  className: s
243
- } = n, r = Yn();
243
+ } = n, r = Qn();
244
244
  return /* @__PURE__ */ e(
245
245
  "div",
246
246
  {
247
247
  ref: t,
248
- className: f(
249
- "absolute top-1/2 -translate-y-1/2 flex flex-row items-center gap-1",
250
- Hn[r],
248
+ className: h(
249
+ "absolute top-1/2 -translate-y-1/2 flex flex-row items-center gap-1 pointer-events-none",
250
+ $n[r],
251
251
  s
252
252
  ),
253
253
  children: o
254
254
  }
255
255
  );
256
- }), j = (n) => {
256
+ }), V = (n) => {
257
257
  const {
258
258
  children: t
259
259
  } = n;
260
260
  return t ? /* @__PURE__ */ e("div", { className: "input-description text-sm font-medium mt-2", children: t }) : null;
261
- }, V = (n) => {
261
+ }, K = (n) => {
262
262
  const {
263
263
  children: t
264
264
  } = n;
265
265
  return t ? /* @__PURE__ */ e("div", { className: "input-error-text text-sm font-medium mt-2", children: t }) : null;
266
- }, Pt = (n) => {
266
+ }, Mt = (n) => {
267
267
  const {
268
268
  className: t,
269
269
  label: o,
@@ -273,71 +273,71 @@ const f = (...n) => n.filter(Boolean).join(" "), An = [
273
273
  buttonTray: a,
274
274
  size: i = "md",
275
275
  ...c
276
- } = n, h = !!l || !!a;
277
- return /* @__PURE__ */ e(J.Provider, { value: i, children: /* @__PURE__ */ d(
276
+ } = n, g = !!l || !!a;
277
+ return /* @__PURE__ */ e(Q.Provider, { value: i, children: /* @__PURE__ */ d(
278
278
  "div",
279
279
  {
280
- className: f(
280
+ className: h(
281
281
  "flex flex-col",
282
282
  t
283
283
  ),
284
284
  children: [
285
- /* @__PURE__ */ e(Y, { children: o }),
285
+ /* @__PURE__ */ e(J, { children: o }),
286
286
  /* @__PURE__ */ d("div", { className: "flex flex-col relative", children: [
287
- r && /* @__PURE__ */ e(r, { className: f(
287
+ r && /* @__PURE__ */ e(r, { className: h(
288
288
  "input-icon absolute top-1/2 -translate-y-1/2",
289
- fe[i],
290
- zt[i]
289
+ he[i],
290
+ Lt[i]
291
291
  ) }),
292
292
  /* @__PURE__ */ e(
293
293
  "input",
294
294
  {
295
- className: f(
295
+ className: h(
296
296
  "border input-base transition-all duration-150 rounded-xl shadow-sm ring-0 focus:ring-4 focus:outline-none",
297
- ee[i],
298
- G[i],
299
- r ? Ot[i] : ce[i],
300
- h ? de[i] : lt[i],
297
+ te[i],
298
+ Y[i],
299
+ r ? Tt[i] : de[i],
300
+ g ? ue[i] : st[i],
301
301
  l && "input-error"
302
302
  ),
303
303
  ...c
304
304
  }
305
305
  ),
306
- /* @__PURE__ */ d(ue, { children: [
307
- l && /* @__PURE__ */ e(te, {}),
306
+ /* @__PURE__ */ d(fe, { children: [
307
+ l && /* @__PURE__ */ e(ne, {}),
308
308
  a
309
309
  ] })
310
310
  ] }),
311
- /* @__PURE__ */ e(j, { children: s }),
312
- /* @__PURE__ */ e(V, { children: l })
311
+ /* @__PURE__ */ e(V, { children: s }),
312
+ /* @__PURE__ */ e(K, { children: l })
313
313
  ]
314
314
  }
315
315
  ) });
316
- }, Jn = (n) => {
316
+ }, qn = (n) => {
317
317
  const t = n.match(/^#?([0-9a-fA-F]{6})$/);
318
318
  if (!t) return null;
319
319
  const o = parseInt(t[1], 16);
320
320
  return [(o >> 16 & 255) / 255, (o >> 8 & 255) / 255, (o & 255) / 255];
321
- }, Qn = (n, t, o) => {
321
+ }, Zn = (n, t, o) => {
322
322
  const s = (r) => Math.round(r * 255).toString(16).padStart(2, "0").toUpperCase();
323
323
  return "#" + s(n) + s(t) + s(o);
324
- }, qn = (n, t, o) => {
324
+ }, er = (n, t, o) => {
325
325
  const s = Math.max(n, t, o), r = Math.min(n, t, o), l = s - r;
326
326
  let a = 0;
327
327
  return l !== 0 && (s === n ? a = ((t - o) / l + 6) % 6 : s === t ? a = (o - n) / l + 2 : a = (n - t) / l + 4, a *= 60), [a, s === 0 ? 0 : l / s, s];
328
- }, Zn = (n, t, o) => {
328
+ }, tr = (n, t, o) => {
329
329
  const s = o * t, r = n / 60, l = s * (1 - Math.abs(r % 2 - 1));
330
330
  let a = 0, i = 0, c = 0;
331
331
  r < 1 ? (a = s, i = l) : r < 2 ? (a = l, i = s) : r < 3 ? (i = s, c = l) : r < 4 ? (i = l, c = s) : r < 5 ? (a = l, c = s) : (a = s, c = l);
332
- const h = o - s;
333
- return [a + h, i + h, c + h];
334
- }, ye = (n, t, o) => {
335
- const [s, r, l] = Zn(n, t, o);
336
- return Qn(s, r, l);
337
- }, ht = (n) => {
338
- const t = Jn(n);
339
- return t ? qn(t[0], t[1], t[2]) : null;
340
- }, er = (n) => {
332
+ const g = o - s;
333
+ return [a + g, i + g, c + g];
334
+ }, Ie = (n, t, o) => {
335
+ const [s, r, l] = tr(n, t, o);
336
+ return Zn(s, r, l);
337
+ }, gt = (n) => {
338
+ const t = qn(n);
339
+ return t ? er(t[0], t[1], t[2]) : null;
340
+ }, nr = (n) => {
341
341
  const t = n.trim();
342
342
  if (!t) return null;
343
343
  const o = t.match(/^#?([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/);
@@ -353,7 +353,7 @@ const f = (...n) => n.filter(Boolean).join(" "), An = [
353
353
  document.body.removeChild(s);
354
354
  const l = r.match(/rgba?\((\d+),\s*(\d+),\s*(\d+)/);
355
355
  return l ? "#" + [l[1], l[2], l[3]].map((a) => parseInt(a, 10).toString(16).padStart(2, "0")).join("").toUpperCase() : null;
356
- }, _e = (n) => {
356
+ }, Xe = (n) => {
357
357
  const t = y.useRef(null), [o, s] = y.useState(!1), r = (l) => {
358
358
  t.current = null, s(!1), l.currentTarget.releasePointerCapture?.(l.pointerId);
359
359
  };
@@ -371,11 +371,11 @@ const f = (...n) => n.filter(Boolean).join(" "), An = [
371
371
  onPointerCancel: r
372
372
  }
373
373
  };
374
- }, tr = "flex flex-col dropdown-panel border mt-1 rounded-xl shadow-lg overflow-y-auto relative space-y-1", nr = {
374
+ }, rr = "flex flex-col dropdown-panel border mt-1 rounded-xl shadow-lg overflow-y-auto relative space-y-1", lr = {
375
375
  sm: "p-2",
376
376
  md: "p-3",
377
377
  lg: "p-4"
378
- }, pe = (n) => {
378
+ }, ge = (n) => {
379
379
  const {
380
380
  className: t,
381
381
  children: o,
@@ -385,12 +385,12 @@ const f = (...n) => n.filter(Boolean).join(" "), An = [
385
385
  return /* @__PURE__ */ e(
386
386
  "div",
387
387
  {
388
- className: f(tr, nr[s], t),
388
+ className: h(rr, lr[s], t),
389
389
  ...r,
390
390
  children: o
391
391
  }
392
392
  );
393
- }, rr = {
393
+ }, or = {
394
394
  top: "bottom center",
395
395
  "top-start": "bottom left",
396
396
  "top-end": "bottom right",
@@ -403,14 +403,14 @@ const f = (...n) => n.filter(Boolean).join(" "), An = [
403
403
  left: "right center",
404
404
  "left-start": "top right",
405
405
  "left-end": "bottom right"
406
- }, Et = y.memo(
407
- ({ open: n, children: t, className: o, onOutsideClick: s, floatingStyles: r, setFloating: l, placement: a, floatingProps: i }) => /* @__PURE__ */ e(Pe, { children: /* @__PURE__ */ e(Ie, { children: n && /* @__PURE__ */ d(Z, { children: [
408
- s && /* @__PURE__ */ e(et, { onClick: s }),
406
+ }, Ft = y.memo(
407
+ ({ open: n, children: t, className: o, onOutsideClick: s, floatingStyles: r, setFloating: l, placement: a, floatingProps: i }) => /* @__PURE__ */ e(Me, { children: /* @__PURE__ */ e(Se, { children: n && /* @__PURE__ */ d(ee, { children: [
408
+ s && /* @__PURE__ */ e(nt, { onClick: s }),
409
409
  /* @__PURE__ */ e("div", { ref: l, style: r, className: "z-50", ...i, children: /* @__PURE__ */ e(
410
- K.div,
410
+ G.div,
411
411
  {
412
412
  className: o,
413
- style: { transformOrigin: rr[a] },
413
+ style: { transformOrigin: or[a] },
414
414
  initial: { opacity: 0, scale: 0.95 },
415
415
  animate: { opacity: 1, scale: 1 },
416
416
  exit: { opacity: 0, scale: 0.95 },
@@ -419,53 +419,53 @@ const f = (...n) => n.filter(Boolean).join(" "), An = [
419
419
  }
420
420
  ) })
421
421
  ] }) }) })
422
- ), ot = (n) => {
422
+ ), at = (n) => {
423
423
  const { placement: t = "bottom", onOutsideClick: o, fullWidth: s, minWidth: r, maxWidth: l } = n, a = y.useMemo(() => [
424
- tt({
425
- apply({ rects: v, elements: u }) {
426
- s && (u.floating.style.width = `${v.reference.width}px`), r && (u.floating.style.minWidth = `${r}px`), l && (u.floating.style.maxWidth = `${l}px`);
424
+ rt({
425
+ apply({ rects: x, elements: m }) {
426
+ s && (m.floating.style.width = `${x.reference.width}px`), r && (m.floating.style.minWidth = `${r}px`), l && (m.floating.style.maxWidth = `${l}px`);
427
427
  }
428
428
  })
429
- ], [s, l, r]), { refs: i, floatingStyles: c } = nt({
429
+ ], [s, l, r]), { refs: i, floatingStyles: c } = lt({
430
430
  placement: t,
431
431
  middleware: a,
432
- whileElementsMounted: rt
433
- }), h = y.useRef({
432
+ whileElementsMounted: ot
433
+ }), g = y.useRef({
434
434
  onOutsideClick: o,
435
435
  floatingStyles: c,
436
436
  setFloating: i.setFloating,
437
437
  placement: t
438
438
  });
439
- h.current = {
439
+ g.current = {
440
440
  onOutsideClick: o,
441
441
  floatingStyles: c,
442
442
  setFloating: i.setFloating,
443
443
  placement: t
444
444
  };
445
- const x = y.useMemo(() => {
446
- const v = (u) => {
447
- const { floatingStyles: g, setFloating: p, onOutsideClick: b, placement: k } = h.current, { className: m, open: N, children: C } = u;
445
+ const w = y.useMemo(() => {
446
+ const x = (m) => {
447
+ const { floatingStyles: b, setFloating: p, onOutsideClick: f, placement: v } = g.current, { className: u, open: R, children: C } = m;
448
448
  return /* @__PURE__ */ e(
449
- Et,
449
+ Ft,
450
450
  {
451
- open: N,
452
- className: m,
453
- onOutsideClick: b,
454
- floatingStyles: g,
451
+ open: R,
452
+ className: u,
453
+ onOutsideClick: f,
454
+ floatingStyles: b,
455
455
  setFloating: p,
456
- placement: k,
456
+ placement: v,
457
457
  children: C
458
458
  }
459
459
  );
460
460
  };
461
- return y.memo(v);
461
+ return y.memo(x);
462
462
  }, []);
463
463
  return {
464
464
  anchorRef: i.setReference,
465
- Popover: x
465
+ Popover: w
466
466
  };
467
- }, ge = (n, t) => {
468
- _(() => {
467
+ }, be = (n, t) => {
468
+ $(() => {
469
469
  if (!n) return;
470
470
  const o = (s) => {
471
471
  s.key === "Escape" && t();
@@ -474,41 +474,41 @@ const f = (...n) => n.filter(Boolean).join(" "), An = [
474
474
  document.removeEventListener("keydown", o);
475
475
  };
476
476
  }, [n, t]);
477
- }, lr = "linear-gradient(to right, #f00 0%, #ff0 16.66%, #0f0 33.33%, #0ff 50%, #00f 66.66%, #f0f 83.33%, #f00 100%)", or = "linear-gradient(to right, #fff, rgba(255,255,255,0))", sr = "linear-gradient(to top, #000, rgba(0,0,0,0))", $e = "0 0 0 1px rgba(0,0,0,0.15)", ar = 14, ir = 28, cr = 6, dr = 8, Xe = { type: "spring", stiffness: 500, damping: 18, mass: 0.6 }, ve = (n) => {
478
- const t = n ? ir : ar, o = t / 2;
477
+ }, sr = "linear-gradient(to right, #f00 0%, #ff0 16.66%, #0f0 33.33%, #0ff 50%, #00f 66.66%, #f0f 83.33%, #f00 100%)", ar = "linear-gradient(to right, #fff, rgba(255,255,255,0))", ir = "linear-gradient(to top, #000, rgba(0,0,0,0))", je = "0 0 0 1px rgba(0,0,0,0.15)", cr = 14, dr = 28, ur = 6, fr = 8, Ve = { type: "spring", stiffness: 500, damping: 18, mass: 0.6 }, we = (n) => {
478
+ const t = n ? dr : cr, o = t / 2;
479
479
  return {
480
480
  width: t,
481
481
  height: t,
482
482
  marginLeft: -o,
483
483
  marginTop: -o,
484
- borderRadius: n ? dr : cr
484
+ borderRadius: n ? fr : ur
485
485
  };
486
- }, De = (n) => Math.max(0, Math.min(1, n)), pt = (n, t) => {
486
+ }, ze = (n) => Math.max(0, Math.min(1, n)), bt = (n, t) => {
487
487
  Object.getOwnPropertyDescriptor(HTMLInputElement.prototype, "value")?.set?.call(n, t), n.dispatchEvent(new Event("input", { bubbles: !0 }));
488
- }, ur = ({ value: n, onChange: t }) => {
489
- const [o, s] = B(() => ht(n) ?? [0, 0, 1]), r = we(ye(o[0], o[1], o[2]));
490
- _(() => {
488
+ }, mr = ({ value: n, onChange: t }) => {
489
+ const [o, s] = A(() => gt(n) ?? [0, 0, 1]), r = ke(Ie(o[0], o[1], o[2]));
490
+ $(() => {
491
491
  if ((n || "").toUpperCase() === r.current) return;
492
- const b = ht(n);
493
- b && s(b);
492
+ const f = gt(n);
493
+ f && s(f);
494
494
  }, [n]);
495
- const l = (b) => {
496
- s(b);
497
- const k = ye(b[0], b[1], b[2]);
498
- r.current = k, t(k);
499
- }, [a, i, c] = o, h = ye(a, 1, 1), x = ye(a, i, 1), v = ye(a, i, c), u = _e((b, k, m) => {
500
- l([a, De((b - m.left) / m.width), 1 - De((k - m.top) / m.height)]);
501
- }), g = _e((b, k, m) => {
502
- l([De((b - m.left) / m.width) * 360, i, c]);
503
- }), p = _e((b, k, m) => {
504
- l([a, i, De((b - m.left) / m.width)]);
495
+ const l = (f) => {
496
+ s(f);
497
+ const v = Ie(f[0], f[1], f[2]);
498
+ r.current = v, t(v);
499
+ }, [a, i, c] = o, g = Ie(a, 1, 1), w = Ie(a, i, 1), x = Ie(a, i, c), m = Xe((f, v, u) => {
500
+ l([a, ze((f - u.left) / u.width), 1 - ze((v - u.top) / u.height)]);
501
+ }), b = Xe((f, v, u) => {
502
+ l([ze((f - u.left) / u.width) * 360, i, c]);
503
+ }), p = Xe((f, v, u) => {
504
+ l([a, i, ze((f - u.left) / u.width)]);
505
505
  });
506
506
  return /* @__PURE__ */ d(
507
507
  "div",
508
508
  {
509
509
  className: "flex flex-col gap-3",
510
510
  style: { width: 220, userSelect: "none" },
511
- onMouseDown: (b) => b.preventDefault(),
511
+ onMouseDown: (f) => f.preventDefault(),
512
512
  children: [
513
513
  /* @__PURE__ */ d(
514
514
  "div",
@@ -519,44 +519,44 @@ const f = (...n) => n.filter(Boolean).join(" "), An = [
519
519
  touchAction: "none",
520
520
  cursor: "crosshair"
521
521
  },
522
- ...u.bind,
522
+ ...m.bind,
523
523
  children: [
524
524
  /* @__PURE__ */ d(
525
525
  "div",
526
526
  {
527
527
  className: "absolute inset-0 rounded-md overflow-hidden border color-picker-surface",
528
- style: { backgroundColor: h },
528
+ style: { backgroundColor: g },
529
529
  children: [
530
530
  /* @__PURE__ */ e(
531
531
  "div",
532
532
  {
533
533
  className: "absolute inset-0 pointer-events-none",
534
- style: { background: or }
534
+ style: { background: ar }
535
535
  }
536
536
  ),
537
537
  /* @__PURE__ */ e(
538
538
  "div",
539
539
  {
540
540
  className: "absolute inset-0 pointer-events-none",
541
- style: { background: sr }
541
+ style: { background: ir }
542
542
  }
543
543
  )
544
544
  ]
545
545
  }
546
546
  ),
547
547
  /* @__PURE__ */ e(
548
- K.div,
548
+ G.div,
549
549
  {
550
550
  className: "absolute pointer-events-none border-1 border-white",
551
551
  style: {
552
552
  left: `${i * 100}%`,
553
553
  top: `${(1 - c) * 100}%`,
554
- boxShadow: $e,
555
- backgroundColor: v
554
+ boxShadow: je,
555
+ backgroundColor: x
556
556
  },
557
- initial: ve(!1),
558
- animate: ve(u.isDragging),
559
- transition: Xe
557
+ initial: we(!1),
558
+ animate: we(m.isDragging),
559
+ transition: Ve
560
560
  }
561
561
  )
562
562
  ]
@@ -568,24 +568,24 @@ const f = (...n) => n.filter(Boolean).join(" "), An = [
568
568
  className: "relative w-full rounded-md",
569
569
  style: {
570
570
  height: 12,
571
- background: lr,
571
+ background: sr,
572
572
  touchAction: "none",
573
573
  cursor: "ew-resize"
574
574
  },
575
- ...g.bind,
575
+ ...b.bind,
576
576
  children: /* @__PURE__ */ e(
577
- K.div,
577
+ G.div,
578
578
  {
579
579
  className: "absolute pointer-events-none border-1 border-white",
580
580
  style: {
581
581
  top: "50%",
582
582
  left: `${a / 360 * 100}%`,
583
- backgroundColor: h,
584
- boxShadow: $e
583
+ backgroundColor: g,
584
+ boxShadow: je
585
585
  },
586
- initial: ve(!1),
587
- animate: ve(g.isDragging),
588
- transition: Xe
586
+ initial: we(!1),
587
+ animate: we(b.isDragging),
588
+ transition: Ve
589
589
  }
590
590
  )
591
591
  }
@@ -596,24 +596,24 @@ const f = (...n) => n.filter(Boolean).join(" "), An = [
596
596
  className: "relative w-full rounded-md",
597
597
  style: {
598
598
  height: 12,
599
- background: `linear-gradient(to right, #000, ${x})`,
599
+ background: `linear-gradient(to right, #000, ${w})`,
600
600
  touchAction: "none",
601
601
  cursor: "ew-resize"
602
602
  },
603
603
  ...p.bind,
604
604
  children: /* @__PURE__ */ e(
605
- K.div,
605
+ G.div,
606
606
  {
607
607
  className: "absolute pointer-events-none border-1 border-white",
608
608
  style: {
609
609
  top: "50%",
610
610
  left: `${c * 100}%`,
611
- backgroundColor: v,
612
- boxShadow: $e
611
+ backgroundColor: x,
612
+ boxShadow: je
613
613
  },
614
- initial: ve(!1),
615
- animate: ve(p.isDragging),
616
- transition: Xe
614
+ initial: we(!1),
615
+ animate: we(p.isDragging),
616
+ transition: Ve
617
617
  }
618
618
  )
619
619
  }
@@ -621,7 +621,7 @@ const f = (...n) => n.filter(Boolean).join(" "), An = [
621
621
  ]
622
622
  }
623
623
  );
624
- }, pl = (n) => {
624
+ }, bl = (n) => {
625
625
  const {
626
626
  className: t,
627
627
  label: o,
@@ -631,44 +631,44 @@ const f = (...n) => n.filter(Boolean).join(" "), An = [
631
631
  size: a = "md",
632
632
  value: i,
633
633
  defaultValue: c,
634
- onChange: h,
635
- onBlur: x,
636
- onFocus: v,
637
- ...u
638
- } = n, [g, p] = B(
634
+ onChange: g,
635
+ onBlur: w,
636
+ onFocus: x,
637
+ ...m
638
+ } = n, [b, p] = A(
639
639
  i != null ? String(i) : c != null ? String(c) : ""
640
- ), [b, k] = B(!1), m = we(null), N = i != null ? String(i) : g, C = N || "white";
641
- ge(b, () => k(!1));
642
- const { anchorRef: D, Popover: O } = ot({
640
+ ), [f, v] = A(!1), u = ke(null), R = i != null ? String(i) : b, C = R || "white";
641
+ be(f, () => v(!1));
642
+ const { anchorRef: I, Popover: D } = at({
643
643
  placement: "bottom-start",
644
- onOutsideClick: () => k(!1)
645
- }), T = (R) => {
646
- p(R.target.value), h?.(R);
647
- }, P = (R) => {
648
- k(!0), v?.(R);
649
- }, w = (R) => {
650
- const H = R.target.value, M = er(H);
651
- M && M !== H && m.current && pt(m.current, M), k(!1), x?.(R);
652
- }, I = (R) => {
653
- m.current && pt(m.current, R);
654
- }, L = !!r || !!l;
655
- return /* @__PURE__ */ e(J.Provider, { value: a, children: /* @__PURE__ */ d(
644
+ onOutsideClick: () => v(!1)
645
+ }), T = (k) => {
646
+ p(k.target.value), g?.(k);
647
+ }, E = (k) => {
648
+ v(!0), x?.(k);
649
+ }, L = (k) => {
650
+ const B = k.target.value, O = nr(B);
651
+ O && O !== B && u.current && bt(u.current, O), v(!1), w?.(k);
652
+ }, P = (k) => {
653
+ u.current && bt(u.current, k);
654
+ }, N = !!r || !!l;
655
+ return /* @__PURE__ */ e(Q.Provider, { value: a, children: /* @__PURE__ */ d(
656
656
  "div",
657
657
  {
658
- className: f(
658
+ className: h(
659
659
  "flex flex-col",
660
660
  t
661
661
  ),
662
662
  children: [
663
- /* @__PURE__ */ e(Y, { children: o }),
664
- /* @__PURE__ */ d("div", { className: "flex flex-col relative", ref: D, children: [
663
+ /* @__PURE__ */ e(J, { children: o }),
664
+ /* @__PURE__ */ d("div", { className: "flex flex-col relative", ref: I, children: [
665
665
  /* @__PURE__ */ e(
666
666
  "div",
667
667
  {
668
- className: f(
668
+ className: h(
669
669
  "absolute top-1/2 -translate-y-1/2 rounded-md border color-swatch",
670
- fe[a],
671
- zt[a]
670
+ he[a],
671
+ Lt[a]
672
672
  ),
673
673
  style: { backgroundColor: C }
674
674
  }
@@ -676,35 +676,35 @@ const f = (...n) => n.filter(Boolean).join(" "), An = [
676
676
  /* @__PURE__ */ e(
677
677
  "input",
678
678
  {
679
- ref: m,
680
- className: f(
679
+ ref: u,
680
+ className: h(
681
681
  "border input-base transition-all duration-150 rounded-xl shadow-sm ring-0 focus:ring-4 focus:outline-none",
682
- ee[a],
683
- G[a],
684
- Ot[a],
685
- L ? de[a] : lt[a],
682
+ te[a],
683
+ Y[a],
684
+ Tt[a],
685
+ N ? ue[a] : st[a],
686
686
  r && "input-error"
687
687
  ),
688
- value: i ?? g,
688
+ value: i ?? b,
689
689
  onChange: T,
690
- onFocus: P,
691
- onBlur: w,
692
- onClick: () => k(!0),
693
- ...u
690
+ onFocus: E,
691
+ onBlur: L,
692
+ onClick: () => v(!0),
693
+ ...m
694
694
  }
695
695
  ),
696
- /* @__PURE__ */ d(ue, { children: [
697
- r && /* @__PURE__ */ e(te, {}),
696
+ /* @__PURE__ */ d(fe, { children: [
697
+ r && /* @__PURE__ */ e(ne, {}),
698
698
  l
699
699
  ] }),
700
- /* @__PURE__ */ e(O, { open: b, children: /* @__PURE__ */ e(pe, { padding: "md", children: /* @__PURE__ */ e(ur, { value: N, onChange: I }) }) })
700
+ /* @__PURE__ */ e(D, { open: f, children: /* @__PURE__ */ e(ge, { padding: "md", children: /* @__PURE__ */ e(mr, { value: R, onChange: P }) }) })
701
701
  ] }),
702
- /* @__PURE__ */ e(j, { children: s }),
703
- /* @__PURE__ */ e(V, { children: r })
702
+ /* @__PURE__ */ e(V, { children: s }),
703
+ /* @__PURE__ */ e(K, { children: r })
704
704
  ]
705
705
  }
706
706
  ) });
707
- }, Q = (n) => {
707
+ }, q = (n) => {
708
708
  const {
709
709
  onClick: t,
710
710
  Icon: o
@@ -713,30 +713,30 @@ const f = (...n) => n.filter(Boolean).join(" "), An = [
713
713
  "div",
714
714
  {
715
715
  onClick: t,
716
- className: f(
716
+ className: h(
717
717
  "h-6 w-6 select-none rounded-full p-0.5",
718
- t && "ring-0 transition-all duration-150 input-icon-button-interactive active:ring-2 cursor-pointer hover:ring-4 group"
718
+ t && "ring-0 transition-all duration-150 input-icon-button-interactive active:ring-2 cursor-pointer hover:ring-4 group pointer-events-auto"
719
719
  ),
720
- children: /* @__PURE__ */ e(o, { className: f("h-5 w-5 input-icon-button-icon", t && "group-active:scale-[0.8] transition-transform origin-center") })
720
+ children: /* @__PURE__ */ e(o, { className: h("h-5 w-5 input-icon-button-icon", t && "group-active:scale-[0.8] transition-transform origin-center") })
721
721
  }
722
722
  );
723
- }, gl = (n) => {
723
+ }, vl = (n) => {
724
724
  const {
725
725
  type: t = "password",
726
726
  enableShowPasswordToggle: o = !0,
727
727
  ...s
728
- } = n, [r, l] = B(!1);
728
+ } = n, [r, l] = A(!1);
729
729
  return /* @__PURE__ */ e(
730
- Pt,
730
+ Mt,
731
731
  {
732
732
  type: r ? "text" : t,
733
- buttonTray: o ? /* @__PURE__ */ e(Q, { Icon: r ? Ht : _t, onClick: () => {
733
+ buttonTray: o ? /* @__PURE__ */ e(q, { Icon: r ? $t : Xt, onClick: () => {
734
734
  l(!r);
735
735
  } }) : void 0,
736
736
  ...s
737
737
  }
738
738
  );
739
- }, bl = (n) => {
739
+ }, xl = (n) => {
740
740
  const {
741
741
  className: t,
742
742
  label: o,
@@ -746,64 +746,64 @@ const f = (...n) => n.filter(Boolean).join(" "), An = [
746
746
  autogrow: a = !1,
747
747
  maxRows: i,
748
748
  ref: c,
749
- onChange: h,
750
- ...x
751
- } = n, v = y.useRef(null), u = y.useCallback(() => {
752
- const p = v.current;
749
+ onChange: g,
750
+ ...w
751
+ } = n, x = y.useRef(null), m = y.useCallback(() => {
752
+ const p = x.current;
753
753
  if (!p) return;
754
754
  p.style.height = "auto";
755
- let b = p.scrollHeight;
755
+ let f = p.scrollHeight;
756
756
  if (i) {
757
- const k = window.getComputedStyle(p), m = parseFloat(k.lineHeight), N = parseFloat(k.paddingTop), C = parseFloat(k.paddingBottom), D = parseFloat(k.borderTopWidth), O = parseFloat(k.borderBottomWidth), T = m * i + N + C + D + O;
758
- b = Math.min(p.scrollHeight, T);
757
+ const v = window.getComputedStyle(p), u = parseFloat(v.lineHeight), R = parseFloat(v.paddingTop), C = parseFloat(v.paddingBottom), I = parseFloat(v.borderTopWidth), D = parseFloat(v.borderBottomWidth), T = u * i + R + C + I + D;
758
+ f = Math.min(p.scrollHeight, T);
759
759
  }
760
- p.style.height = `${b}px`;
760
+ p.style.height = `${f}px`;
761
761
  }, [i]);
762
762
  y.useLayoutEffect(() => {
763
763
  if (!a) {
764
- v.current && (v.current.style.height = "");
764
+ x.current && (x.current.style.height = "");
765
765
  return;
766
766
  }
767
- u();
768
- }, [a, u, n.value, n.defaultValue, l]);
769
- const g = (p) => {
770
- h?.(p), a && u();
767
+ m();
768
+ }, [a, m, n.value, n.defaultValue, l]);
769
+ const b = (p) => {
770
+ g?.(p), a && m();
771
771
  };
772
- return /* @__PURE__ */ e(J.Provider, { value: l, children: /* @__PURE__ */ d(
772
+ return /* @__PURE__ */ e(Q.Provider, { value: l, children: /* @__PURE__ */ d(
773
773
  "div",
774
774
  {
775
- className: f(
775
+ className: h(
776
776
  "flex flex-col",
777
777
  t
778
778
  ),
779
779
  children: [
780
- /* @__PURE__ */ e(Y, { children: o }),
780
+ /* @__PURE__ */ e(J, { children: o }),
781
781
  /* @__PURE__ */ d("div", { className: "flex flex-col relative", children: [
782
782
  /* @__PURE__ */ e(
783
783
  "textarea",
784
784
  {
785
- ref: c ? un([c, v]) : v,
786
- onChange: g,
787
- className: f(
785
+ ref: c ? mn([c, x]) : x,
786
+ onChange: b,
787
+ className: h(
788
788
  "py-2.5 border input-base transition-all duration-150 rounded-xl shadow-sm ring-0 focus:ring-4 focus:outline-none",
789
- Dt[l],
790
- G[l],
791
- ce[l],
792
- r ? de[l] : lt[l],
789
+ zt[l],
790
+ Y[l],
791
+ de[l],
792
+ r ? ue[l] : st[l],
793
793
  r && "input-error",
794
794
  a && (i ? "resize-none overflow-y-auto [scrollbar-width:none] [&::-webkit-scrollbar]:hidden" : "resize-none overflow-hidden")
795
795
  ),
796
- ...x
796
+ ...w
797
797
  }
798
798
  ),
799
- /* @__PURE__ */ e(ue, { className: "top-3.5 translate-y-0", children: r && /* @__PURE__ */ e(te, {}) })
799
+ /* @__PURE__ */ e(fe, { className: "top-3.5 translate-y-0", children: r && /* @__PURE__ */ e(ne, {}) })
800
800
  ] }),
801
- /* @__PURE__ */ e(j, { children: s }),
802
- /* @__PURE__ */ e(V, { children: r })
801
+ /* @__PURE__ */ e(V, { children: s }),
802
+ /* @__PURE__ */ e(K, { children: r })
803
803
  ]
804
804
  }
805
805
  ) });
806
- }, vl = (n) => {
806
+ }, wl = (n) => {
807
807
  const {
808
808
  className: t,
809
809
  label: o,
@@ -814,7 +814,7 @@ const f = (...n) => n.filter(Boolean).join(" "), An = [
814
814
  return /* @__PURE__ */ d(
815
815
  "div",
816
816
  {
817
- className: f(
817
+ className: h(
818
818
  "flex flex-col",
819
819
  t
820
820
  ),
@@ -828,17 +828,17 @@ const f = (...n) => n.filter(Boolean).join(" "), An = [
828
828
  ...l
829
829
  }
830
830
  ),
831
- o && /* @__PURE__ */ e("label", { htmlFor: n.id, className: f(
831
+ o && /* @__PURE__ */ e("label", { htmlFor: n.id, className: h(
832
832
  "input-label font-medium mb-1",
833
833
  n.id && "cursor-pointer"
834
834
  ), children: o })
835
835
  ] }),
836
- /* @__PURE__ */ e(j, { children: s }),
837
- /* @__PURE__ */ e(V, { children: r })
836
+ /* @__PURE__ */ e(V, { children: s }),
837
+ /* @__PURE__ */ e(K, { children: r })
838
838
  ]
839
839
  }
840
840
  );
841
- }, xl = (n) => {
841
+ }, Nl = (n) => {
842
842
  const {
843
843
  className: t,
844
844
  label: o,
@@ -849,7 +849,7 @@ const f = (...n) => n.filter(Boolean).join(" "), An = [
849
849
  return /* @__PURE__ */ d(
850
850
  "div",
851
851
  {
852
- className: f(
852
+ className: h(
853
853
  "flex flex-col",
854
854
  t
855
855
  ),
@@ -864,25 +864,25 @@ const f = (...n) => n.filter(Boolean).join(" "), An = [
864
864
  ...l
865
865
  }
866
866
  ),
867
- /* @__PURE__ */ e("div", { className: f(
867
+ /* @__PURE__ */ e("div", { className: h(
868
868
  "rounded-full absolute border inset-0 mt-[2px] pointer-events-none transition-colors duration-150 ",
869
869
  n.checked ? "toggle-track-on" : "toggle-track-off"
870
- ), children: /* @__PURE__ */ e("div", { className: f(
870
+ ), children: /* @__PURE__ */ e("div", { className: h(
871
871
  "absolute top-1/2 -translate-y-1/2 left-1 h-4 w-4 rounded-full toggle-thumb shadow-md transition-all duration-150",
872
872
  n.checked && "translate-x-3.5 "
873
873
  ) }) })
874
874
  ] }),
875
- o && /* @__PURE__ */ e("label", { htmlFor: n.id, className: f(
875
+ o && /* @__PURE__ */ e("label", { htmlFor: n.id, className: h(
876
876
  "input-label font-medium mb-1",
877
877
  n.id && "cursor-pointer"
878
878
  ), children: o })
879
879
  ] }),
880
- /* @__PURE__ */ e(j, { children: s }),
881
- /* @__PURE__ */ e(V, { children: r })
880
+ /* @__PURE__ */ e(V, { children: s }),
881
+ /* @__PURE__ */ e(K, { children: r })
882
882
  ]
883
883
  }
884
884
  );
885
- }, wl = (n) => {
885
+ }, kl = (n) => {
886
886
  const {
887
887
  className: t,
888
888
  label: o,
@@ -893,7 +893,7 @@ const f = (...n) => n.filter(Boolean).join(" "), An = [
893
893
  return /* @__PURE__ */ d(
894
894
  "div",
895
895
  {
896
- className: f(
896
+ className: h(
897
897
  "flex flex-col",
898
898
  t
899
899
  ),
@@ -907,118 +907,118 @@ const f = (...n) => n.filter(Boolean).join(" "), An = [
907
907
  ...l
908
908
  }
909
909
  ),
910
- o && /* @__PURE__ */ e("label", { htmlFor: n.id, className: f(
910
+ o && /* @__PURE__ */ e("label", { htmlFor: n.id, className: h(
911
911
  "input-label font-medium mb-1",
912
912
  n.id && "cursor-pointer"
913
913
  ), children: o })
914
914
  ] }),
915
- /* @__PURE__ */ e(j, { children: s }),
916
- /* @__PURE__ */ e(V, { children: r })
915
+ /* @__PURE__ */ e(V, { children: s }),
916
+ /* @__PURE__ */ e(K, { children: r })
917
917
  ]
918
918
  }
919
919
  );
920
- }, mr = {
920
+ }, hr = {
921
921
  sm: "h-7",
922
922
  md: "h-8",
923
923
  lg: "h-10"
924
- }, fr = {
924
+ }, pr = {
925
925
  sm: "px-2.5",
926
926
  md: "px-3",
927
927
  lg: "px-4"
928
- }, hr = {
928
+ }, gr = {
929
929
  sm: "text-xs",
930
930
  md: "text-sm",
931
931
  lg: "text-sm"
932
- }, Nl = (n) => {
932
+ }, yl = (n) => {
933
933
  const {
934
934
  label: t,
935
935
  description: o,
936
936
  error: s,
937
937
  placeholder: r = "No file chosen",
938
938
  buttonText: l = "Choose",
939
- Icon: a = $t,
939
+ Icon: a = jt,
940
940
  size: i = "md",
941
941
  value: c,
942
- isUploaded: h = !1,
943
- isUploading: x = !1,
944
- onChange: v,
945
- onDropRejected: u,
946
- accept: g,
942
+ isUploaded: g = !1,
943
+ isUploading: w = !1,
944
+ onChange: x,
945
+ onDropRejected: m,
946
+ accept: b,
947
947
  maxSize: p,
948
- minSize: b,
949
- disabled: k = !1,
950
- className: m
951
- } = n, N = async (I) => {
952
- const [L] = I;
953
- L && await v?.(L);
948
+ minSize: f,
949
+ disabled: v = !1,
950
+ className: u
951
+ } = n, R = async (P) => {
952
+ const [N] = P;
953
+ N && await x?.(N);
954
954
  }, {
955
955
  getRootProps: C,
956
- getInputProps: D,
957
- open: O,
956
+ getInputProps: I,
957
+ open: D,
958
958
  isDragActive: T,
959
- isFocused: P
960
- } = yt({
959
+ isFocused: E
960
+ } = It({
961
961
  multiple: !1,
962
- accept: g,
962
+ accept: b,
963
963
  maxSize: p,
964
- minSize: b,
965
- disabled: k,
966
- onDrop: N,
967
- onDropRejected: u
968
- }), w = c?.name;
969
- return /* @__PURE__ */ e(J.Provider, { value: i, children: /* @__PURE__ */ d("div", { className: f("flex flex-col", m), children: [
970
- /* @__PURE__ */ e(Y, { children: t }),
964
+ minSize: f,
965
+ disabled: v,
966
+ onDrop: R,
967
+ onDropRejected: m
968
+ }), L = c?.name;
969
+ return /* @__PURE__ */ e(Q.Provider, { value: i, children: /* @__PURE__ */ d("div", { className: h("flex flex-col", u), children: [
970
+ /* @__PURE__ */ e(J, { children: t }),
971
971
  /* @__PURE__ */ d(
972
972
  "div",
973
973
  {
974
974
  ...C({
975
- className: f(
975
+ className: h(
976
976
  "flex flex-row items-center",
977
977
  "border input-base rounded-xl shadow-sm transition-all duration-150",
978
978
  "ring-0 focus:outline-none",
979
- (P || T) && "ring-4",
979
+ (E || T) && "ring-4",
980
980
  s && "input-error",
981
- k && "opacity-60 cursor-not-allowed",
982
- ee[i],
983
- ce[i],
981
+ v && "opacity-60 cursor-not-allowed",
982
+ te[i],
983
+ de[i],
984
984
  "gap-3"
985
985
  )
986
986
  }),
987
987
  children: [
988
- /* @__PURE__ */ e("input", { ...D() }),
989
- /* @__PURE__ */ e(a, { className: f("input-icon shrink-0", fe[i]) }),
988
+ /* @__PURE__ */ e("input", { ...I() }),
989
+ /* @__PURE__ */ e(a, { className: h("input-icon shrink-0", he[i]) }),
990
990
  /* @__PURE__ */ e(
991
991
  "span",
992
992
  {
993
- className: f(
993
+ className: h(
994
994
  "flex-1 truncate",
995
- G[i],
996
- !w && "text-[var(--color-input-placeholder)]"
995
+ Y[i],
996
+ !L && "text-[var(--color-input-placeholder)]"
997
997
  ),
998
- children: w ?? r
998
+ children: L ?? r
999
999
  }
1000
1000
  ),
1001
- s && /* @__PURE__ */ e(te, {}),
1002
- x && !s && /* @__PURE__ */ e("div", { className: "h-5 w-5 flex items-center justify-center", children: /* @__PURE__ */ e(Ce, { className: "h-4 w-4 text-[var(--color-input-icon)]" }) }),
1003
- h && !x && !s && /* @__PURE__ */ e("div", { className: "h-5 w-5", children: /* @__PURE__ */ e(qe, { className: "h-5 w-5 text-[var(--color-status-success)]" }) }),
1001
+ s && /* @__PURE__ */ e(ne, {}),
1002
+ w && !s && /* @__PURE__ */ e("div", { className: "h-5 w-5 flex items-center justify-center", children: /* @__PURE__ */ e(Re, { className: "h-4 w-4 text-[var(--color-input-icon)]" }) }),
1003
+ g && !w && !s && /* @__PURE__ */ e("div", { className: "h-5 w-5", children: /* @__PURE__ */ e(et, { className: "h-5 w-5 text-[var(--color-status-success)]" }) }),
1004
1004
  /* @__PURE__ */ e(
1005
1005
  "button",
1006
1006
  {
1007
1007
  type: "button",
1008
- disabled: k,
1009
- onClick: (I) => {
1010
- I.stopPropagation(), O();
1008
+ disabled: v,
1009
+ onClick: (P) => {
1010
+ P.stopPropagation(), D();
1011
1011
  },
1012
- className: f(
1012
+ className: h(
1013
1013
  "inline-flex flex-row items-center justify-center shrink-0",
1014
1014
  "border button-white shadow-sm rounded-[calc(var(--border-radius-input)-0.25rem)]",
1015
1015
  "font-semibold cursor-pointer select-none transition-all duration-150",
1016
1016
  "button-ring ring-0 hover:ring-4 active:ring-1 focus:outline-none focus:ring-4",
1017
1017
  "disabled:cursor-default",
1018
1018
  "mr-1.5",
1019
- mr[i],
1020
- fr[i],
1021
- hr[i]
1019
+ hr[i],
1020
+ pr[i],
1021
+ gr[i]
1022
1022
  ),
1023
1023
  children: l
1024
1024
  }
@@ -1026,10 +1026,10 @@ const f = (...n) => n.filter(Boolean).join(" "), An = [
1026
1026
  ]
1027
1027
  }
1028
1028
  ),
1029
- /* @__PURE__ */ e(j, { children: o }),
1030
- /* @__PURE__ */ e(V, { children: s })
1029
+ /* @__PURE__ */ e(V, { children: o }),
1030
+ /* @__PURE__ */ e(K, { children: s })
1031
1031
  ] }) });
1032
- }, pr = (n) => n < 1024 ? `${n} B` : n < 1024 * 1024 ? `${(n / 1024).toFixed(1)} KB` : n < 1024 * 1024 * 1024 ? `${(n / (1024 * 1024)).toFixed(1)} MB` : `${(n / (1024 * 1024 * 1024)).toFixed(1)} GB`, gr = (n) => {
1032
+ }, br = (n) => n < 1024 ? `${n} B` : n < 1024 * 1024 ? `${(n / 1024).toFixed(1)} KB` : n < 1024 * 1024 * 1024 ? `${(n / (1024 * 1024)).toFixed(1)} MB` : `${(n / (1024 * 1024 * 1024)).toFixed(1)} GB`, vr = (n) => {
1033
1033
  const {
1034
1034
  file: t,
1035
1035
  isUploaded: o = !1,
@@ -1041,7 +1041,7 @@ const f = (...n) => n.filter(Boolean).join(" "), An = [
1041
1041
  return /* @__PURE__ */ d(
1042
1042
  "div",
1043
1043
  {
1044
- className: f(
1044
+ className: h(
1045
1045
  "flex flex-row items-center gap-3",
1046
1046
  "border input-base rounded-xl shadow-sm",
1047
1047
  "pl-4 pr-1 py-1",
@@ -1049,15 +1049,15 @@ const f = (...n) => n.filter(Boolean).join(" "), An = [
1049
1049
  a
1050
1050
  ),
1051
1051
  children: [
1052
- i && /* @__PURE__ */ e("div", { className: "shrink-0 h-5 w-5 flex items-center justify-center", children: r ? /* @__PURE__ */ e(Qe, { className: "h-5 w-5 input-error-icon" }) : s ? /* @__PURE__ */ e(Ce, { className: "h-4 w-4 text-[var(--color-input-icon)]" }) : /* @__PURE__ */ e(qe, { className: "h-5 w-5 text-[var(--color-status-success)]" }) }),
1052
+ i && /* @__PURE__ */ e("div", { className: "shrink-0 h-5 w-5 flex items-center justify-center", children: r ? /* @__PURE__ */ e(Ze, { className: "h-5 w-5 input-error-icon" }) : s ? /* @__PURE__ */ e(Re, { className: "h-4 w-4 text-[var(--color-input-icon)]" }) : /* @__PURE__ */ e(et, { className: "h-5 w-5 text-[var(--color-status-success)]" }) }),
1053
1053
  /* @__PURE__ */ e("div", { className: "flex-1 min-w-0 font-medium truncate", children: t.name }),
1054
- /* @__PURE__ */ e("div", { className: "shrink-0 text-sm text-[var(--color-input-description-text)]", children: pr(t.size) }),
1054
+ /* @__PURE__ */ e("div", { className: "shrink-0 text-sm text-[var(--color-input-description-text)]", children: br(t.size) }),
1055
1055
  l && /* @__PURE__ */ e(
1056
- Ge,
1056
+ Je,
1057
1057
  {
1058
1058
  variant: "transparent",
1059
1059
  size: "sm",
1060
- Icon: ae,
1060
+ Icon: ie,
1061
1061
  onClick: l,
1062
1062
  "aria-label": "Remove file",
1063
1063
  className: "shrink-0"
@@ -1066,103 +1066,103 @@ const f = (...n) => n.filter(Boolean).join(" "), An = [
1066
1066
  ]
1067
1067
  }
1068
1068
  );
1069
- }, kl = (n) => {
1069
+ }, Cl = (n) => {
1070
1070
  const {
1071
1071
  label: t,
1072
1072
  description: o,
1073
1073
  error: s,
1074
1074
  title: r = "Drop files here",
1075
1075
  hint: l,
1076
- Icon: a = Xt,
1076
+ Icon: a = Vt,
1077
1077
  onUpload: i,
1078
1078
  onFileRemoved: c,
1079
- onDropRejected: h,
1080
- renderFileTile: x,
1081
- accept: v,
1082
- maxSize: u,
1083
- minSize: g,
1079
+ onDropRejected: g,
1080
+ renderFileTile: w,
1081
+ accept: x,
1082
+ maxSize: m,
1083
+ minSize: b,
1084
1084
  maxFiles: p,
1085
- disabled: b = !1,
1086
- className: k
1087
- } = n, [m, N] = B([]), C = we(0), D = (R, H) => {
1088
- N((M) => M.map(($) => $.id === R ? { ...$, ...H } : $));
1089
- }, O = (R) => {
1090
- if (R.length === 0) return;
1091
- const H = R.map((M) => ({
1085
+ disabled: f = !1,
1086
+ className: v
1087
+ } = n, [u, R] = A([]), C = ke(0), I = (k, B) => {
1088
+ R((O) => O.map((_) => _.id === k ? { ..._, ...B } : _));
1089
+ }, D = (k) => {
1090
+ if (k.length === 0) return;
1091
+ const B = k.map((O) => ({
1092
1092
  id: String(++C.current),
1093
- file: M,
1093
+ file: O,
1094
1094
  status: i ? "uploading" : "idle"
1095
1095
  }));
1096
- if (N((M) => [...M, ...H]), !!i)
1097
- for (const M of H)
1098
- Promise.resolve().then(() => i(M.file)).then(() => D(M.id, { status: "uploaded" })).catch(($) => {
1099
- D(M.id, {
1096
+ if (R((O) => [...O, ...B]), !!i)
1097
+ for (const O of B)
1098
+ Promise.resolve().then(() => i(O.file)).then(() => I(O.id, { status: "uploaded" })).catch((_) => {
1099
+ I(O.id, {
1100
1100
  status: "error",
1101
- error: $ instanceof Error ? $ : new Error(String($))
1101
+ error: _ instanceof Error ? _ : new Error(String(_))
1102
1102
  });
1103
1103
  });
1104
- }, T = (R) => {
1105
- const H = m.find((M) => M.id === R);
1106
- N((M) => M.filter(($) => $.id !== R)), H && c?.(H.file);
1104
+ }, T = (k) => {
1105
+ const B = u.find((O) => O.id === k);
1106
+ R((O) => O.filter((_) => _.id !== k)), B && c?.(B.file);
1107
1107
  }, {
1108
- getRootProps: P,
1109
- getInputProps: w,
1110
- isDragActive: I,
1111
- isFocused: L
1112
- } = yt({
1108
+ getRootProps: E,
1109
+ getInputProps: L,
1110
+ isDragActive: P,
1111
+ isFocused: N
1112
+ } = It({
1113
1113
  multiple: !0,
1114
- accept: v,
1115
- maxSize: u,
1116
- minSize: g,
1114
+ accept: x,
1115
+ maxSize: m,
1116
+ minSize: b,
1117
1117
  maxFiles: p,
1118
- disabled: b,
1119
- onDrop: O,
1120
- onDropRejected: h
1118
+ disabled: f,
1119
+ onDrop: D,
1120
+ onDropRejected: g
1121
1121
  });
1122
- return /* @__PURE__ */ d("div", { className: f("flex flex-col", k), children: [
1123
- /* @__PURE__ */ e(Y, { children: t }),
1122
+ return /* @__PURE__ */ d("div", { className: h("flex flex-col", v), children: [
1123
+ /* @__PURE__ */ e(J, { children: t }),
1124
1124
  /* @__PURE__ */ d(
1125
1125
  "div",
1126
1126
  {
1127
- ...P({
1128
- className: f(
1127
+ ...E({
1128
+ className: h(
1129
1129
  "flex flex-col items-center justify-center gap-1",
1130
1130
  "border-2 border-dashed input-base rounded-xl bg-transparent!",
1131
1131
  "py-10 px-6 cursor-pointer transition-all duration-150",
1132
1132
  "ring-0 focus:outline-none",
1133
- (L || I) && "ring-4",
1133
+ (N || P) && "ring-4",
1134
1134
  s && "input-error",
1135
- b && "opacity-60 cursor-not-allowed"
1135
+ f && "opacity-60 cursor-not-allowed"
1136
1136
  )
1137
1137
  }),
1138
1138
  children: [
1139
- /* @__PURE__ */ e("input", { ...w() }),
1139
+ /* @__PURE__ */ e("input", { ...L() }),
1140
1140
  /* @__PURE__ */ e("div", { className: "h-14 w-14 rounded-xl flex items-center justify-center bg-[var(--color-input-file-icon-bg)] mb-2", children: /* @__PURE__ */ e(a, { className: "h-7 w-7 input-icon" }) }),
1141
1141
  /* @__PURE__ */ e("div", { className: "text-base font-semibold", children: r }),
1142
1142
  l && /* @__PURE__ */ e("div", { className: "text-sm text-[var(--color-input-description-text)] ", children: l })
1143
1143
  ]
1144
1144
  }
1145
1145
  ),
1146
- m.length > 0 && /* @__PURE__ */ e("div", { className: "flex flex-col gap-2 mt-3", children: m.map((R) => {
1147
- const H = {
1148
- file: R.file,
1149
- isUploading: R.status === "uploading",
1150
- isUploaded: R.status === "uploaded",
1151
- error: R.status === "error" ? R.error?.message : void 0,
1152
- onRemove: () => T(R.id)
1146
+ u.length > 0 && /* @__PURE__ */ e("div", { className: "flex flex-col gap-2 mt-3", children: u.map((k) => {
1147
+ const B = {
1148
+ file: k.file,
1149
+ isUploading: k.status === "uploading",
1150
+ isUploaded: k.status === "uploaded",
1151
+ error: k.status === "error" ? k.error?.message : void 0,
1152
+ onRemove: () => T(k.id)
1153
1153
  };
1154
- return /* @__PURE__ */ e(y.Fragment, { children: x ? x(R.file, H) : /* @__PURE__ */ e(gr, { ...H }) }, R.id);
1154
+ return /* @__PURE__ */ e(y.Fragment, { children: w ? w(k.file, B) : /* @__PURE__ */ e(vr, { ...B }) }, k.id);
1155
1155
  }) }),
1156
- /* @__PURE__ */ e(j, { children: o }),
1157
- /* @__PURE__ */ e(V, { children: s })
1156
+ /* @__PURE__ */ e(V, { children: o }),
1157
+ /* @__PURE__ */ e(K, { children: s })
1158
1158
  ] });
1159
- }, br = [
1160
- Nn,
1161
- kn,
1162
- Ct,
1163
- In,
1164
- On
1165
- ], gt = {
1159
+ }, xr = [
1160
+ yn,
1161
+ Cn,
1162
+ Rt,
1163
+ Sn,
1164
+ Tn
1165
+ ], vt = {
1166
1166
  paragraph: "lexical-paragraph",
1167
1167
  heading: {
1168
1168
  h1: "lexical-h1",
@@ -1185,7 +1185,7 @@ const f = (...n) => n.filter(Boolean).join(" "), An = [
1185
1185
  italic: "lexical-italic",
1186
1186
  underline: "lexical-underline"
1187
1187
  }
1188
- }, Mt = {
1188
+ }, Bt = {
1189
1189
  isBold: !1,
1190
1190
  isItalic: !1,
1191
1191
  isUnderline: !1,
@@ -1195,65 +1195,65 @@ const f = (...n) => n.filter(Boolean).join(" "), An = [
1195
1195
  blockType: "paragraph",
1196
1196
  canUndo: !1,
1197
1197
  canRedo: !1
1198
- }, Me = Ye({
1199
- state: Mt,
1198
+ }, Be = Qe({
1199
+ state: Bt,
1200
1200
  tone: "light",
1201
1201
  orientation: "horizontal"
1202
- }), be = () => Je(Me), Ft = () => {
1203
- const [n] = ie(), [t, o] = B(Mt);
1204
- return _(() => {
1202
+ }), ve = () => qe(Be), At = () => {
1203
+ const [n] = ce(), [t, o] = A(Bt);
1204
+ return $(() => {
1205
1205
  const s = () => {
1206
1206
  n.getEditorState().read(() => {
1207
- const r = It();
1208
- if (!Rt(r))
1207
+ const r = St();
1208
+ if (!Dt(r))
1209
1209
  return;
1210
- const l = r.anchor.getNode(), a = Bn(l, Ct), i = a && Rn(a) ? a.getListType() : null;
1210
+ const l = r.anchor.getNode(), a = Un(l, Rt), i = a && Dn(a) ? a.getListType() : null;
1211
1211
  let c = "paragraph";
1212
1212
  if (!i) {
1213
- const g = l.getKey() === "root" ? l : l.getTopLevelElementOrThrow();
1214
- yn(g) && (c = g.getTag());
1213
+ const b = l.getKey() === "root" ? l : l.getTopLevelElementOrThrow();
1214
+ In(b) && (c = b.getTag());
1215
1215
  }
1216
- const h = r.hasFormat("bold"), x = r.hasFormat("italic"), v = r.hasFormat("underline"), u = ut(l.getParent()) || ut(l);
1217
- o((g) => ({
1218
- ...g,
1219
- isBold: h,
1220
- isItalic: x,
1221
- isUnderline: v,
1222
- isLink: u,
1216
+ const g = r.hasFormat("bold"), w = r.hasFormat("italic"), x = r.hasFormat("underline"), m = mt(l.getParent()) || mt(l);
1217
+ o((b) => ({
1218
+ ...b,
1219
+ isBold: g,
1220
+ isItalic: w,
1221
+ isUnderline: x,
1222
+ isLink: m,
1223
1223
  isUnorderedList: i === "bullet",
1224
1224
  isOrderedList: i === "number",
1225
1225
  blockType: c
1226
1226
  }));
1227
1227
  });
1228
1228
  };
1229
- return St(
1229
+ return Ot(
1230
1230
  n.registerUpdateListener(() => s()),
1231
1231
  n.registerCommand(
1232
- zn,
1232
+ Ln,
1233
1233
  (r) => (o((l) => ({ ...l, canUndo: r })), !1),
1234
- ze
1234
+ Le
1235
1235
  ),
1236
1236
  n.registerCommand(
1237
- Tn,
1237
+ Pn,
1238
1238
  (r) => (o((l) => ({ ...l, canRedo: r })), !1),
1239
- ze
1239
+ Le
1240
1240
  )
1241
1241
  );
1242
1242
  }, [n]), t;
1243
- }, Bt = Ye(void 0), vr = () => ({
1244
- dismiss: Je(Bt) || (() => {
1243
+ }, Ut = Qe(void 0), wr = () => ({
1244
+ dismiss: qe(Ut) || (() => {
1245
1245
  })
1246
- }), Fe = (n) => {
1247
- const { trigger: t, children: o, placement: s = "bottom-end", minWidth: r = 200, className: l } = n, [a, i] = B(!1), { Popover: c, anchorRef: h } = ot({
1246
+ }), Ae = (n) => {
1247
+ const { trigger: t, children: o, placement: s = "bottom-end", minWidth: r = 200, className: l } = n, [a, i] = A(!1), { Popover: c, anchorRef: g } = at({
1248
1248
  placement: s,
1249
1249
  onOutsideClick: () => i(!1),
1250
1250
  minWidth: r
1251
1251
  });
1252
- return /* @__PURE__ */ d(Z, { children: [
1253
- /* @__PURE__ */ e("div", { ref: h, className: l, onClick: () => i(!a), children: t }),
1254
- /* @__PURE__ */ e(c, { open: a, children: /* @__PURE__ */ e(pe, { padding: "sm", children: /* @__PURE__ */ e(Bt.Provider, { value: () => i(!1), children: o }) }) })
1252
+ return /* @__PURE__ */ d(ee, { children: [
1253
+ /* @__PURE__ */ e("div", { ref: g, className: l, onClick: () => i(!a), children: t }),
1254
+ /* @__PURE__ */ e(c, { open: a, children: /* @__PURE__ */ e(ge, { padding: "sm", children: /* @__PURE__ */ e(Ut.Provider, { value: () => i(!1), children: o }) }) })
1255
1255
  ] });
1256
- }, xr = "inline-flex flex-row items-center gap-3 h-10 px-3 font-semibold ring-0 dropdown-item rounded-lg cursor-pointer transition-all duration-150 select-none focus:outline-none focus:ring-0 border border-transparent bg-transparent", X = y.forwardRef((n, t) => {
1256
+ }, Nr = "inline-flex flex-row items-center gap-3 h-10 px-3 font-semibold ring-0 dropdown-item rounded-lg cursor-pointer transition-all duration-150 select-none focus:outline-none focus:ring-0 border border-transparent bg-transparent", j = y.forwardRef((n, t) => {
1257
1257
  const {
1258
1258
  className: o,
1259
1259
  children: s,
@@ -1261,18 +1261,18 @@ const f = (...n) => n.filter(Boolean).join(" "), An = [
1261
1261
  onClick: l,
1262
1262
  dismissOnClick: a = !0,
1263
1263
  ...i
1264
- } = n, { dismiss: c } = vr(), h = (x) => {
1265
- l && l(x), a && c();
1264
+ } = n, { dismiss: c } = wr(), g = (w) => {
1265
+ l && l(w), a && c();
1266
1266
  };
1267
1267
  return /* @__PURE__ */ d(
1268
1268
  "button",
1269
1269
  {
1270
1270
  ref: t,
1271
- className: f(
1272
- xr,
1271
+ className: h(
1272
+ Nr,
1273
1273
  o
1274
1274
  ),
1275
- onClick: h,
1275
+ onClick: g,
1276
1276
  ...i,
1277
1277
  children: [
1278
1278
  r && /* @__PURE__ */ e(r, { className: "h-5 w-5" }),
@@ -1280,21 +1280,21 @@ const f = (...n) => n.filter(Boolean).join(" "), An = [
1280
1280
  ]
1281
1281
  }
1282
1282
  );
1283
- }), je = [
1283
+ }), Ke = [
1284
1284
  { value: "paragraph", label: "Paragraph" },
1285
1285
  { value: "h1", label: "Heading 1" },
1286
1286
  { value: "h2", label: "Heading 2" },
1287
1287
  { value: "h3", label: "Heading 3" },
1288
1288
  { value: "h4", label: "Heading 4" }
1289
- ], wr = () => {
1290
- const [n] = ie(), { state: t, tone: o } = be(), s = (l) => {
1289
+ ], kr = () => {
1290
+ const [n] = ce(), { state: t, tone: o } = ve(), s = (l) => {
1291
1291
  n.update(() => {
1292
- const a = It();
1293
- Rt(a) && (l === "paragraph" ? ft(a, () => Ln()) : ft(a, () => Cn(l)));
1292
+ const a = St();
1293
+ Dt(a) && (l === "paragraph" ? pt(a, () => En()) : pt(a, () => Rn(l)));
1294
1294
  });
1295
- }, r = je.find((l) => l.value === t.blockType) ?? je[0];
1295
+ }, r = Ke.find((l) => l.value === t.blockType) ?? Ke[0];
1296
1296
  return /* @__PURE__ */ e(
1297
- Fe,
1297
+ Ae,
1298
1298
  {
1299
1299
  placement: "bottom-start",
1300
1300
  minWidth: 180,
@@ -1303,20 +1303,20 @@ const f = (...n) => n.filter(Boolean).join(" "), An = [
1303
1303
  {
1304
1304
  type: "button",
1305
1305
  onMouseDown: (l) => l.preventDefault(),
1306
- className: f(
1306
+ className: h(
1307
1307
  "lexical-tb-btn h-8 px-2 gap-1 text-sm font-medium",
1308
1308
  o === "dark" ? "lexical-tb-btn-dark" : "lexical-tb-btn-light"
1309
1309
  ),
1310
1310
  children: [
1311
1311
  r.label,
1312
- /* @__PURE__ */ e(he, { className: "h-4 w-4" })
1312
+ /* @__PURE__ */ e(pe, { className: "h-4 w-4" })
1313
1313
  ]
1314
1314
  }
1315
1315
  ),
1316
- children: je.map((l) => /* @__PURE__ */ e(
1317
- X,
1316
+ children: Ke.map((l) => /* @__PURE__ */ e(
1317
+ j,
1318
1318
  {
1319
- Icon: l.value === t.blockType ? kt : void 0,
1319
+ Icon: l.value === t.blockType ? Ct : void 0,
1320
1320
  onClick: () => s(l.value),
1321
1321
  className: l.value === t.blockType ? void 0 : "pl-11",
1322
1322
  children: l.label
@@ -1325,10 +1325,10 @@ const f = (...n) => n.filter(Boolean).join(" "), An = [
1325
1325
  ))
1326
1326
  }
1327
1327
  );
1328
- }, Nr = {
1328
+ }, yr = {
1329
1329
  light: "lexical-tb-btn-light",
1330
1330
  dark: "lexical-tb-btn-dark"
1331
- }, se = y.forwardRef(
1331
+ }, ae = y.forwardRef(
1332
1332
  (n, t) => {
1333
1333
  const { Icon: o, active: s = !1, tone: r = "light", className: l, onMouseDown: a, ...i } = n;
1334
1334
  return /* @__PURE__ */ e(
@@ -1336,12 +1336,12 @@ const f = (...n) => n.filter(Boolean).join(" "), An = [
1336
1336
  {
1337
1337
  ref: t,
1338
1338
  type: "button",
1339
- onMouseDown: (h) => {
1340
- h.preventDefault(), a?.(h);
1339
+ onMouseDown: (g) => {
1340
+ g.preventDefault(), a?.(g);
1341
1341
  },
1342
- className: f(
1342
+ className: h(
1343
1343
  "lexical-tb-btn h-8 w-8",
1344
- Nr[r],
1344
+ yr[r],
1345
1345
  s && "lexical-tb-btn-active",
1346
1346
  l
1347
1347
  ),
@@ -1350,57 +1350,57 @@ const f = (...n) => n.filter(Boolean).join(" "), An = [
1350
1350
  }
1351
1351
  );
1352
1352
  }
1353
- ), kr = () => {
1354
- const [n] = ie(), { state: t, tone: o } = be();
1355
- return /* @__PURE__ */ d(Z, { children: [
1353
+ ), Cr = () => {
1354
+ const [n] = ce(), { state: t, tone: o } = ve();
1355
+ return /* @__PURE__ */ d(ee, { children: [
1356
1356
  /* @__PURE__ */ e(
1357
- se,
1357
+ ae,
1358
1358
  {
1359
- Icon: jt,
1359
+ Icon: Kt,
1360
1360
  tone: o,
1361
1361
  active: t.isBold,
1362
1362
  "aria-label": "Bold",
1363
- onClick: () => n.dispatchCommand(He, "bold")
1363
+ onClick: () => n.dispatchCommand($e, "bold")
1364
1364
  }
1365
1365
  ),
1366
1366
  /* @__PURE__ */ e(
1367
- se,
1367
+ ae,
1368
1368
  {
1369
- Icon: Vt,
1369
+ Icon: Gt,
1370
1370
  tone: o,
1371
1371
  active: t.isItalic,
1372
1372
  "aria-label": "Italic",
1373
- onClick: () => n.dispatchCommand(He, "italic")
1373
+ onClick: () => n.dispatchCommand($e, "italic")
1374
1374
  }
1375
1375
  ),
1376
1376
  /* @__PURE__ */ e(
1377
- se,
1377
+ ae,
1378
1378
  {
1379
- Icon: Kt,
1379
+ Icon: Yt,
1380
1380
  tone: o,
1381
1381
  active: t.isUnderline,
1382
1382
  "aria-label": "Underline",
1383
- onClick: () => n.dispatchCommand(He, "underline")
1383
+ onClick: () => n.dispatchCommand($e, "underline")
1384
1384
  }
1385
1385
  )
1386
1386
  ] });
1387
- }, yr = () => {
1388
- const [n] = ie(), { state: t, tone: o } = be(), s = () => {
1387
+ }, Ir = () => {
1388
+ const [n] = ce(), { state: t, tone: o } = ve(), s = () => {
1389
1389
  n.dispatchCommand(
1390
- t.isUnorderedList ? dt : Sn,
1390
+ t.isUnorderedList ? ft : On,
1391
1391
  void 0
1392
1392
  );
1393
1393
  }, r = () => {
1394
1394
  n.dispatchCommand(
1395
- t.isOrderedList ? dt : Dn,
1395
+ t.isOrderedList ? ft : zn,
1396
1396
  void 0
1397
1397
  );
1398
1398
  };
1399
- return /* @__PURE__ */ d(Z, { children: [
1399
+ return /* @__PURE__ */ d(ee, { children: [
1400
1400
  /* @__PURE__ */ e(
1401
- se,
1401
+ ae,
1402
1402
  {
1403
- Icon: Ke,
1403
+ Icon: Ye,
1404
1404
  tone: o,
1405
1405
  active: t.isUnorderedList,
1406
1406
  "aria-label": "Bullet list",
@@ -1408,9 +1408,9 @@ const f = (...n) => n.filter(Boolean).join(" "), An = [
1408
1408
  }
1409
1409
  ),
1410
1410
  /* @__PURE__ */ e(
1411
- se,
1411
+ ae,
1412
1412
  {
1413
- Icon: Gt,
1413
+ Icon: Jt,
1414
1414
  tone: o,
1415
1415
  active: t.isOrderedList,
1416
1416
  "aria-label": "Numbered list",
@@ -1418,96 +1418,96 @@ const f = (...n) => n.filter(Boolean).join(" "), An = [
1418
1418
  }
1419
1419
  )
1420
1420
  ] });
1421
- }, Cr = () => {
1422
- const [n] = ie(), { state: t, tone: o } = be(), s = () => {
1421
+ }, Rr = () => {
1422
+ const [n] = ce(), { state: t, tone: o } = ve(), s = () => {
1423
1423
  if (t.isLink) {
1424
- n.dispatchCommand(mt, null);
1424
+ n.dispatchCommand(ht, null);
1425
1425
  return;
1426
1426
  }
1427
1427
  const r = window.prompt("Enter URL");
1428
- r && n.dispatchCommand(mt, r);
1428
+ r && n.dispatchCommand(ht, r);
1429
1429
  };
1430
1430
  return /* @__PURE__ */ e(
1431
- se,
1431
+ ae,
1432
1432
  {
1433
- Icon: Yt,
1433
+ Icon: Qt,
1434
1434
  tone: o,
1435
1435
  active: t.isLink,
1436
1436
  "aria-label": "Link",
1437
1437
  onClick: s
1438
1438
  }
1439
1439
  );
1440
- }, Ir = () => {
1441
- const [n] = ie(), { state: t, tone: o } = be();
1442
- return /* @__PURE__ */ d(Z, { children: [
1440
+ }, Sr = () => {
1441
+ const [n] = ce(), { state: t, tone: o } = ve();
1442
+ return /* @__PURE__ */ d(ee, { children: [
1443
1443
  /* @__PURE__ */ e(
1444
- se,
1444
+ ae,
1445
1445
  {
1446
- Icon: Jt,
1446
+ Icon: qt,
1447
1447
  tone: o,
1448
1448
  disabled: !t.canUndo,
1449
1449
  "aria-label": "Undo",
1450
- onClick: () => n.dispatchCommand(Pn, void 0)
1450
+ onClick: () => n.dispatchCommand(Mn, void 0)
1451
1451
  }
1452
1452
  ),
1453
1453
  /* @__PURE__ */ e(
1454
- se,
1454
+ ae,
1455
1455
  {
1456
- Icon: Qt,
1456
+ Icon: Zt,
1457
1457
  tone: o,
1458
1458
  disabled: !t.canRedo,
1459
1459
  "aria-label": "Redo",
1460
- onClick: () => n.dispatchCommand(En, void 0)
1460
+ onClick: () => n.dispatchCommand(Fn, void 0)
1461
1461
  }
1462
1462
  )
1463
1463
  ] });
1464
- }, Rr = {
1464
+ }, Dr = {
1465
1465
  light: "lexical-tb-divider-light",
1466
1466
  dark: "lexical-tb-divider-dark"
1467
- }, Ve = (n) => {
1468
- const { tone: t, className: o } = n, { tone: s, orientation: r } = be();
1467
+ }, Ge = (n) => {
1468
+ const { tone: t, className: o } = n, { tone: s, orientation: r } = ve();
1469
1469
  return /* @__PURE__ */ e(
1470
1470
  "div",
1471
1471
  {
1472
- className: f(
1472
+ className: h(
1473
1473
  r === "vertical" ? "h-px w-full my-1" : "w-px h-5 my-auto mx-1",
1474
1474
  "shrink-0",
1475
- Rr[t ?? s],
1475
+ Dr[t ?? s],
1476
1476
  o
1477
1477
  )
1478
1478
  }
1479
1479
  );
1480
- }, bt = 4, Sr = 36, At = (n) => {
1480
+ }, xt = 4, Or = 36, Wt = (n) => {
1481
1481
  const t = [];
1482
1482
  return y.Children.forEach(n, (o) => {
1483
- y.isValidElement(o) && o.type === y.Fragment ? t.push(...At(o.props.children)) : t.push(o);
1483
+ y.isValidElement(o) && o.type === y.Fragment ? t.push(...Wt(o.props.children)) : t.push(o);
1484
1484
  }), t;
1485
- }, Ut = (n) => {
1486
- const { children: t } = n, { state: o, tone: s } = be(), r = At(t), l = we(null), a = we(null), [i, c] = B(r.length), h = Oe(() => {
1487
- const u = l.current, g = a.current;
1488
- if (!u || !g) return;
1489
- const p = u.clientWidth, b = Array.from(g.children).map((C) => C.offsetWidth);
1490
- if (b.reduce((C, D, O) => C + D + (O > 0 ? bt : 0), 0) <= p) {
1491
- c(b.length);
1485
+ }, Ht = (n) => {
1486
+ const { children: t } = n, { state: o, tone: s } = ve(), r = Wt(t), l = ke(null), a = ke(null), [i, c] = A(r.length), g = Te(() => {
1487
+ const m = l.current, b = a.current;
1488
+ if (!m || !b) return;
1489
+ const p = m.clientWidth, f = Array.from(b.children).map((C) => C.offsetWidth);
1490
+ if (f.reduce((C, I, D) => C + I + (D > 0 ? xt : 0), 0) <= p) {
1491
+ c(f.length);
1492
1492
  return;
1493
1493
  }
1494
- let m = 0, N = 0;
1495
- for (let C = 0; C < b.length; C++) {
1496
- const D = b[C] + (C > 0 ? bt : 0);
1497
- if (m + D + Sr > p) break;
1498
- m += D, N++;
1494
+ let u = 0, R = 0;
1495
+ for (let C = 0; C < f.length; C++) {
1496
+ const I = f[C] + (C > 0 ? xt : 0);
1497
+ if (u + I + Or > p) break;
1498
+ u += I, R++;
1499
1499
  }
1500
- c(N);
1500
+ c(R);
1501
1501
  }, []);
1502
- Nt(() => {
1503
- h();
1504
- }), _(() => {
1505
- const u = l.current, g = a.current;
1506
- if (!u) return;
1507
- const p = new ResizeObserver(() => h());
1508
- return p.observe(u), g && p.observe(g), () => p.disconnect();
1509
- }, [h]);
1510
- const x = r.slice(0, i), v = r.slice(i);
1502
+ yt(() => {
1503
+ g();
1504
+ }), $(() => {
1505
+ const m = l.current, b = a.current;
1506
+ if (!m) return;
1507
+ const p = new ResizeObserver(() => g());
1508
+ return p.observe(m), b && p.observe(b), () => p.disconnect();
1509
+ }, [g]);
1510
+ const w = r.slice(0, i), x = r.slice(i);
1511
1511
  return /* @__PURE__ */ d(
1512
1512
  "div",
1513
1513
  {
@@ -1520,12 +1520,12 @@ const f = (...n) => n.filter(Boolean).join(" "), An = [
1520
1520
  ref: a,
1521
1521
  "aria-hidden": !0,
1522
1522
  className: "pointer-events-none invisible absolute left-0 top-0 flex flex-row items-center gap-1 w-max",
1523
- children: r.map((u, g) => /* @__PURE__ */ e("div", { className: "flex flex-row items-center", children: u }, g))
1523
+ children: r.map((m, b) => /* @__PURE__ */ e("div", { className: "flex flex-row items-center", children: m }, b))
1524
1524
  }
1525
1525
  ),
1526
- x.map((u, g) => /* @__PURE__ */ e(y.Fragment, { children: u }, g)),
1527
- v.length > 0 && /* @__PURE__ */ e(
1528
- Fe,
1526
+ w.map((m, b) => /* @__PURE__ */ e(y.Fragment, { children: m }, b)),
1527
+ x.length > 0 && /* @__PURE__ */ e(
1528
+ Ae,
1529
1529
  {
1530
1530
  placement: "bottom-end",
1531
1531
  minWidth: 0,
@@ -1534,20 +1534,20 @@ const f = (...n) => n.filter(Boolean).join(" "), An = [
1534
1534
  {
1535
1535
  type: "button",
1536
1536
  "aria-label": "More",
1537
- onMouseDown: (u) => u.preventDefault(),
1538
- className: f(
1537
+ onMouseDown: (m) => m.preventDefault(),
1538
+ className: h(
1539
1539
  "lexical-tb-btn h-8 w-8 shrink-0",
1540
1540
  s === "dark" ? "lexical-tb-btn-dark" : "lexical-tb-btn-light"
1541
1541
  ),
1542
- children: /* @__PURE__ */ e(qt, { className: "h-[18px] w-[18px]" })
1542
+ children: /* @__PURE__ */ e(en, { className: "h-[18px] w-[18px]" })
1543
1543
  }
1544
1544
  ),
1545
- children: /* @__PURE__ */ e(Me.Provider, { value: { state: o, tone: "light", orientation: "vertical" }, children: /* @__PURE__ */ e(
1545
+ children: /* @__PURE__ */ e(Be.Provider, { value: { state: o, tone: "light", orientation: "vertical" }, children: /* @__PURE__ */ e(
1546
1546
  "div",
1547
1547
  {
1548
1548
  className: "flex flex-col items-stretch gap-1",
1549
- onMouseDown: (u) => u.preventDefault(),
1550
- children: v.map((u, g) => /* @__PURE__ */ e(y.Fragment, { children: u }, g))
1549
+ onMouseDown: (m) => m.preventDefault(),
1550
+ children: x.map((m, b) => /* @__PURE__ */ e(y.Fragment, { children: m }, b))
1551
1551
  }
1552
1552
  ) })
1553
1553
  }
@@ -1555,66 +1555,66 @@ const f = (...n) => n.filter(Boolean).join(" "), An = [
1555
1555
  ]
1556
1556
  }
1557
1557
  );
1558
- }, st = () => /* @__PURE__ */ d(Z, { children: [
1559
- /* @__PURE__ */ e(wr, {}),
1560
- /* @__PURE__ */ e(Ve, {}),
1558
+ }, it = () => /* @__PURE__ */ d(ee, { children: [
1561
1559
  /* @__PURE__ */ e(kr, {}),
1562
- /* @__PURE__ */ e(Ve, {}),
1563
- /* @__PURE__ */ e(yr, {}),
1560
+ /* @__PURE__ */ e(Ge, {}),
1564
1561
  /* @__PURE__ */ e(Cr, {}),
1565
- /* @__PURE__ */ e(Ve, {}),
1566
- /* @__PURE__ */ e(Ir, {})
1567
- ] }), yl = () => st(), Dr = (n) => {
1568
- const { render: t, className: o } = n, [s] = ie(), r = Ft();
1569
- return /* @__PURE__ */ e(Me.Provider, { value: { state: r, tone: "light" }, children: /* @__PURE__ */ e(
1562
+ /* @__PURE__ */ e(Ge, {}),
1563
+ /* @__PURE__ */ e(Ir, {}),
1564
+ /* @__PURE__ */ e(Rr, {}),
1565
+ /* @__PURE__ */ e(Ge, {}),
1566
+ /* @__PURE__ */ e(Sr, {})
1567
+ ] }), Il = () => it(), zr = (n) => {
1568
+ const { render: t, className: o } = n, [s] = ce(), r = At();
1569
+ return /* @__PURE__ */ e(Be.Provider, { value: { state: r, tone: "light" }, children: /* @__PURE__ */ e(
1570
1570
  "div",
1571
1571
  {
1572
- className: f(
1572
+ className: h(
1573
1573
  "lexical-toolbar flex flex-row items-center p-1.5",
1574
1574
  o
1575
1575
  ),
1576
- children: /* @__PURE__ */ e(Ut, { children: t ? t({ editor: s, state: r, tone: "light" }) : st() })
1576
+ children: /* @__PURE__ */ e(Ht, { children: t ? t({ editor: s, state: r, tone: "light" }) : it() })
1577
1577
  }
1578
1578
  ) });
1579
- }, Or = (n) => {
1580
- const { render: t } = n, [o] = ie(), s = Ft(), [r, l] = B(!1), { refs: a, floatingStyles: i } = nt({
1579
+ }, Tr = (n) => {
1580
+ const { render: t } = n, [o] = ce(), s = At(), [r, l] = A(!1), { refs: a, floatingStyles: i } = lt({
1581
1581
  placement: "top-start",
1582
1582
  strategy: "fixed",
1583
1583
  middleware: [
1584
- on(8),
1585
- sn(),
1586
- an({ padding: 8 }),
1587
- tt({
1588
- apply({ rects: c, elements: h }) {
1589
- h.floating.style.width = `${c.reference.width}px`;
1584
+ an(8),
1585
+ cn(),
1586
+ dn({ padding: 8 }),
1587
+ rt({
1588
+ apply({ rects: c, elements: g }) {
1589
+ g.floating.style.width = `${c.reference.width}px`;
1590
1590
  }
1591
1591
  })
1592
1592
  ],
1593
- whileElementsMounted: rt
1593
+ whileElementsMounted: ot
1594
1594
  });
1595
- return _(() => o.registerRootListener((c) => a.setReference(c ?? null)), [o, a]), _(() => St(
1595
+ return $(() => o.registerRootListener((c) => a.setReference(c ?? null)), [o, a]), $(() => Ot(
1596
1596
  o.registerCommand(
1597
- Mn,
1597
+ Bn,
1598
1598
  () => (l(!0), !1),
1599
- ze
1599
+ Le
1600
1600
  ),
1601
1601
  o.registerCommand(
1602
- Fn,
1602
+ An,
1603
1603
  () => (l(!1), !1),
1604
- ze
1604
+ Le
1605
1605
  )
1606
- ), [o]), /* @__PURE__ */ e(Me.Provider, { value: { state: s, tone: "dark" }, children: /* @__PURE__ */ e(Pe, { children: /* @__PURE__ */ e(Ie, { children: r && /* @__PURE__ */ e("div", { ref: a.setFloating, style: i, className: "z-50", children: /* @__PURE__ */ e(
1607
- K.div,
1606
+ ), [o]), /* @__PURE__ */ e(Be.Provider, { value: { state: s, tone: "dark" }, children: /* @__PURE__ */ e(Me, { children: /* @__PURE__ */ e(Se, { children: r && /* @__PURE__ */ e("div", { ref: a.setFloating, style: i, className: "z-50", children: /* @__PURE__ */ e(
1607
+ G.div,
1608
1608
  {
1609
1609
  className: "lexical-floating-toolbar flex w-full flex-row items-center p-1 rounded-xl",
1610
1610
  initial: { opacity: 0, y: 4 },
1611
1611
  animate: { opacity: 1, y: 0 },
1612
1612
  exit: { opacity: 0, y: 4 },
1613
1613
  transition: { duration: 0.1, ease: "easeInOut" },
1614
- children: /* @__PURE__ */ e(Ut, { children: t ? t({ editor: o, state: s, tone: "dark" }) : st() })
1614
+ children: /* @__PURE__ */ e(Ht, { children: t ? t({ editor: o, state: s, tone: "dark" }) : it() })
1615
1615
  }
1616
1616
  ) }) }) }) });
1617
- }, Cl = (n) => {
1617
+ }, Rl = (n) => {
1618
1618
  const {
1619
1619
  label: t,
1620
1620
  description: o,
@@ -1624,87 +1624,87 @@ const f = (...n) => n.filter(Boolean).join(" "), An = [
1624
1624
  onChange: a,
1625
1625
  size: i = "md",
1626
1626
  toolbar: c = "static",
1627
- renderToolbar: h,
1628
- minRows: x = 4,
1629
- maxRows: v,
1630
- autogrow: u = !1,
1631
- namespace: g = "InputLexical",
1627
+ renderToolbar: g,
1628
+ minRows: w = 4,
1629
+ maxRows: x,
1630
+ autogrow: m = !1,
1631
+ namespace: b = "InputLexical",
1632
1632
  nodes: p,
1633
- theme: b,
1634
- autoFocus: k = !1,
1635
- children: m,
1636
- className: N
1637
- } = n, C = oe(
1633
+ theme: f,
1634
+ autoFocus: v = !1,
1635
+ children: u,
1636
+ className: R
1637
+ } = n, C = se(
1638
1638
  () => ({
1639
- namespace: g,
1640
- theme: b ? { ...gt, ...b } : gt,
1641
- nodes: [...br, ...p ?? []],
1639
+ namespace: b,
1640
+ theme: f ? { ...vt, ...f } : vt,
1641
+ nodes: [...xr, ...p ?? []],
1642
1642
  editorState: l ?? null,
1643
- onError: (I) => {
1644
- throw I;
1643
+ onError: (P) => {
1644
+ throw P;
1645
1645
  }
1646
1646
  }),
1647
1647
  // Lexical reads initialConfig once on mount; later prop changes are ignored by design.
1648
1648
  // eslint-disable-next-line react-hooks/exhaustive-deps
1649
1649
  []
1650
- ), D = Oe(
1651
- (I) => {
1652
- a?.(JSON.stringify(I.toJSON()));
1650
+ ), I = Te(
1651
+ (P) => {
1652
+ a?.(JSON.stringify(P.toJSON()));
1653
1653
  },
1654
1654
  [a]
1655
- ), O = G[i], T = !!s, P = (I) => `calc(${I} * 1lh + 1.5rem)`, w = u ? { minHeight: P(x), maxHeight: v ? P(v) : void 0 } : { height: P(x) };
1656
- return /* @__PURE__ */ e(J.Provider, { value: i, children: /* @__PURE__ */ d("div", { className: f("flex flex-col", N), children: [
1657
- /* @__PURE__ */ e(Y, { children: t }),
1658
- /* @__PURE__ */ e(mn, { initialConfig: C, children: /* @__PURE__ */ d(
1655
+ ), D = Y[i], T = !!s, E = (P) => `calc(${P} * 1lh + 1.5rem)`, L = m ? { minHeight: E(w), maxHeight: x ? E(x) : void 0 } : { height: E(w) };
1656
+ return /* @__PURE__ */ e(Q.Provider, { value: i, children: /* @__PURE__ */ d("div", { className: h("flex flex-col", R), children: [
1657
+ /* @__PURE__ */ e(J, { children: t }),
1658
+ /* @__PURE__ */ e(hn, { initialConfig: C, children: /* @__PURE__ */ d(
1659
1659
  "div",
1660
1660
  {
1661
- className: f(
1661
+ className: h(
1662
1662
  "relative flex flex-col border input-base rounded-xl shadow-sm overflow-hidden transition-all duration-150 ring-0 focus-within:ring-4 focus-within:outline-none",
1663
1663
  T && "input-error"
1664
1664
  ),
1665
1665
  children: [
1666
- c === "static" && /* @__PURE__ */ e(Dr, { render: h }),
1666
+ c === "static" && /* @__PURE__ */ e(zr, { render: g }),
1667
1667
  /* @__PURE__ */ e("div", { className: "relative flex-1 min-h-0", children: /* @__PURE__ */ e(
1668
- fn,
1668
+ pn,
1669
1669
  {
1670
1670
  contentEditable: /* @__PURE__ */ e(
1671
- hn,
1671
+ gn,
1672
1672
  {
1673
- className: f(
1673
+ className: h(
1674
1674
  "lexical-content w-full outline-none px-3 py-3 leading-[1.55] overflow-y-auto mat-ui-hide-scrollbars",
1675
- O
1675
+ D
1676
1676
  ),
1677
- style: w,
1677
+ style: L,
1678
1678
  "aria-placeholder": r ?? "",
1679
1679
  placeholder: /* @__PURE__ */ e(
1680
1680
  "div",
1681
1681
  {
1682
- className: f(
1682
+ className: h(
1683
1683
  "lexical-placeholder pointer-events-none absolute left-3 top-3",
1684
- O
1684
+ D
1685
1685
  ),
1686
1686
  children: r ?? ""
1687
1687
  }
1688
1688
  )
1689
1689
  }
1690
1690
  ),
1691
- ErrorBoundary: wn
1691
+ ErrorBoundary: kn
1692
1692
  }
1693
1693
  ) }),
1694
- /* @__PURE__ */ e(pn, {}),
1695
- /* @__PURE__ */ e(gn, {}),
1696
1694
  /* @__PURE__ */ e(bn, {}),
1697
- k && /* @__PURE__ */ e(xn, {}),
1698
- a && /* @__PURE__ */ e(vn, { onChange: D }),
1699
- m,
1700
- c === "floating" && /* @__PURE__ */ e(Or, { render: h })
1695
+ /* @__PURE__ */ e(vn, {}),
1696
+ /* @__PURE__ */ e(xn, {}),
1697
+ v && /* @__PURE__ */ e(Nn, {}),
1698
+ a && /* @__PURE__ */ e(wn, { onChange: I }),
1699
+ u,
1700
+ c === "floating" && /* @__PURE__ */ e(Tr, { render: g })
1701
1701
  ]
1702
1702
  }
1703
1703
  ) }),
1704
- /* @__PURE__ */ e(j, { children: o }),
1705
- /* @__PURE__ */ e(V, { children: s })
1704
+ /* @__PURE__ */ e(V, { children: o }),
1705
+ /* @__PURE__ */ e(K, { children: s })
1706
1706
  ] }) });
1707
- }, Il = (n) => {
1707
+ }, Sl = (n) => {
1708
1708
  const {
1709
1709
  className: t,
1710
1710
  label: o,
@@ -1714,49 +1714,49 @@ const f = (...n) => n.filter(Boolean).join(" "), An = [
1714
1714
  size: a = "md",
1715
1715
  ...i
1716
1716
  } = n;
1717
- return /* @__PURE__ */ e(J.Provider, { value: a, children: /* @__PURE__ */ d(
1717
+ return /* @__PURE__ */ e(Q.Provider, { value: a, children: /* @__PURE__ */ d(
1718
1718
  "div",
1719
1719
  {
1720
- className: f(
1720
+ className: h(
1721
1721
  "flex flex-col",
1722
1722
  t
1723
1723
  ),
1724
1724
  children: [
1725
- /* @__PURE__ */ e(Y, { children: o }),
1725
+ /* @__PURE__ */ e(J, { children: o }),
1726
1726
  /* @__PURE__ */ d("div", { className: "relative flex w-full flex-col", children: [
1727
1727
  /* @__PURE__ */ e(
1728
1728
  "select",
1729
1729
  {
1730
- className: f(
1730
+ className: h(
1731
1731
  "appearance-none border input-base bg-none transition-all duration-150 rounded-xl shadow-sm ring-0 focus:ring-4 focus:outline-none",
1732
- ee[a],
1733
- G[a],
1734
- ce[a],
1735
- de[a]
1732
+ te[a],
1733
+ Y[a],
1734
+ de[a],
1735
+ ue[a]
1736
1736
  ),
1737
1737
  ...i,
1738
- children: r && r.map((c, h) => /* @__PURE__ */ e(
1738
+ children: r && r.map((c, g) => /* @__PURE__ */ e(
1739
1739
  "option",
1740
1740
  {
1741
1741
  value: c.value,
1742
1742
  disabled: c.disabled,
1743
1743
  children: c.label
1744
1744
  },
1745
- h
1745
+ g
1746
1746
  ))
1747
1747
  }
1748
1748
  ),
1749
- /* @__PURE__ */ d(ue, { children: [
1750
- l && /* @__PURE__ */ e(te, {}),
1751
- /* @__PURE__ */ e(Q, { Icon: he })
1749
+ /* @__PURE__ */ d(fe, { children: [
1750
+ l && /* @__PURE__ */ e(ne, {}),
1751
+ /* @__PURE__ */ e(q, { Icon: pe })
1752
1752
  ] })
1753
1753
  ] }),
1754
- /* @__PURE__ */ e(j, { children: s }),
1755
- /* @__PURE__ */ e(V, { children: l })
1754
+ /* @__PURE__ */ e(V, { children: s }),
1755
+ /* @__PURE__ */ e(K, { children: l })
1756
1756
  ]
1757
1757
  }
1758
1758
  ) });
1759
- }, Be = y.forwardRef((n, t) => {
1759
+ }, Ue = y.forwardRef((n, t) => {
1760
1760
  const {
1761
1761
  children: o,
1762
1762
  onClick: s,
@@ -1772,7 +1772,7 @@ const f = (...n) => n.filter(Boolean).join(" "), An = [
1772
1772
  ref: t,
1773
1773
  ...c,
1774
1774
  onClick: () => !l && s && s(),
1775
- className: f(
1775
+ className: h(
1776
1776
  "option-base px-4 py-2 rounded-xl cursor-pointer transition-all duration-150 select-none flex flex-row gap-3 items-center",
1777
1777
  r && !l && "option-selected",
1778
1778
  a && !l && "option-active",
@@ -1781,38 +1781,38 @@ const f = (...n) => n.filter(Boolean).join(" "), An = [
1781
1781
  ),
1782
1782
  children: [
1783
1783
  /* @__PURE__ */ e("div", { className: "flex-1 min-w-0 break-all line-clamp-1", children: o }),
1784
- r && !l && /* @__PURE__ */ e("div", { className: "shrink-0", children: /* @__PURE__ */ e(kt, { className: "h-5 w-5" }) })
1784
+ r && !l && /* @__PURE__ */ e("div", { className: "shrink-0", children: /* @__PURE__ */ e(Ct, { className: "h-5 w-5" }) })
1785
1785
  ]
1786
1786
  }
1787
1787
  );
1788
- }), Ae = y.forwardRef((n, t) => {
1788
+ }), We = y.forwardRef((n, t) => {
1789
1789
  const { children: o, className: s, ...r } = n;
1790
1790
  return /* @__PURE__ */ e(
1791
1791
  "div",
1792
1792
  {
1793
1793
  ref: t,
1794
1794
  ...r,
1795
- className: f(
1795
+ className: h(
1796
1796
  "option-group-header px-4 pt-3 pb-1 text-xs font-semibold uppercase tracking-wide select-none",
1797
1797
  s
1798
1798
  ),
1799
1799
  children: o
1800
1800
  }
1801
1801
  );
1802
- }), Ue = y.forwardRef((n, t) => {
1802
+ }), He = y.forwardRef((n, t) => {
1803
1803
  const { className: o, ...s } = n;
1804
1804
  return /* @__PURE__ */ e(
1805
1805
  "div",
1806
1806
  {
1807
1807
  ref: t,
1808
1808
  ...s,
1809
- className: f(
1809
+ className: h(
1810
1810
  "option-divider my-1 h-px",
1811
1811
  o
1812
1812
  )
1813
1813
  }
1814
1814
  );
1815
- }), W = (n) => !("kind" in n), We = (n) => {
1815
+ }), H = (n) => !("kind" in n), _e = (n) => {
1816
1816
  const {
1817
1817
  placement: t = "bottom",
1818
1818
  onOutsideClick: o,
@@ -1822,70 +1822,70 @@ const f = (...n) => n.filter(Boolean).join(" "), An = [
1822
1822
  open: a,
1823
1823
  onOpenChange: i,
1824
1824
  listRef: c,
1825
- activeIndex: h,
1826
- onNavigate: x,
1827
- loop: v = !0,
1828
- disabledIndices: u
1829
- } = n, g = y.useMemo(() => [
1830
- tt({
1831
- apply({ rects: P, elements: w }) {
1832
- s && (w.floating.style.width = `${P.reference.width}px`), r && (w.floating.style.minWidth = `${r}px`), l && (w.floating.style.maxWidth = `${l}px`);
1825
+ activeIndex: g,
1826
+ onNavigate: w,
1827
+ loop: x = !0,
1828
+ disabledIndices: m
1829
+ } = n, b = y.useMemo(() => [
1830
+ rt({
1831
+ apply({ rects: E, elements: L }) {
1832
+ s && (L.floating.style.width = `${E.reference.width}px`), r && (L.floating.style.minWidth = `${r}px`), l && (L.floating.style.maxWidth = `${l}px`);
1833
1833
  }
1834
1834
  })
1835
- ], [s, l, r]), { refs: p, floatingStyles: b, context: k } = nt({
1835
+ ], [s, l, r]), { refs: p, floatingStyles: f, context: v } = lt({
1836
1836
  placement: t,
1837
1837
  open: a,
1838
1838
  onOpenChange: i,
1839
- middleware: g,
1840
- whileElementsMounted: rt
1841
- }), m = cn(k, {
1839
+ middleware: b,
1840
+ whileElementsMounted: ot
1841
+ }), u = un(v, {
1842
1842
  listRef: c,
1843
- activeIndex: h,
1844
- onNavigate: x,
1845
- loop: v,
1843
+ activeIndex: g,
1844
+ onNavigate: w,
1845
+ loop: x,
1846
1846
  virtual: !0,
1847
1847
  focusItemOnOpen: !1,
1848
- disabledIndices: u
1849
- }), { getReferenceProps: N, getFloatingProps: C, getItemProps: D } = dn([m]), O = y.useRef({
1848
+ disabledIndices: m
1849
+ }), { getReferenceProps: R, getFloatingProps: C, getItemProps: I } = fn([u]), D = y.useRef({
1850
1850
  onOutsideClick: o,
1851
- floatingStyles: b,
1851
+ floatingStyles: f,
1852
1852
  setFloating: p.setFloating,
1853
1853
  placement: t,
1854
1854
  getFloatingProps: C
1855
1855
  });
1856
- O.current = {
1856
+ D.current = {
1857
1857
  onOutsideClick: o,
1858
- floatingStyles: b,
1858
+ floatingStyles: f,
1859
1859
  setFloating: p.setFloating,
1860
1860
  placement: t,
1861
1861
  getFloatingProps: C
1862
1862
  };
1863
1863
  const T = y.useMemo(() => {
1864
- const P = (w) => {
1865
- const { floatingStyles: I, setFloating: L, onOutsideClick: R, placement: H, getFloatingProps: M } = O.current, { className: $, open: ne, children: z } = w;
1864
+ const E = (L) => {
1865
+ const { floatingStyles: P, setFloating: N, onOutsideClick: k, placement: B, getFloatingProps: O } = D.current, { className: _, open: X, children: re } = L;
1866
1866
  return /* @__PURE__ */ e(
1867
- Et,
1867
+ Ft,
1868
1868
  {
1869
- open: ne,
1870
- className: $,
1871
- onOutsideClick: R,
1872
- floatingStyles: I,
1873
- setFloating: L,
1874
- placement: H,
1875
- floatingProps: M(),
1876
- children: z
1869
+ open: X,
1870
+ className: _,
1871
+ onOutsideClick: k,
1872
+ floatingStyles: P,
1873
+ setFloating: N,
1874
+ placement: B,
1875
+ floatingProps: O(),
1876
+ children: re
1877
1877
  }
1878
1878
  );
1879
1879
  };
1880
- return y.memo(P);
1880
+ return y.memo(E);
1881
1881
  }, []);
1882
1882
  return {
1883
1883
  anchorRef: p.setReference,
1884
1884
  Popover: T,
1885
- getReferenceProps: N,
1886
- getItemProps: D
1885
+ getReferenceProps: R,
1886
+ getItemProps: I
1887
1887
  };
1888
- }, zr = (n) => {
1888
+ }, Lr = (n) => {
1889
1889
  const {
1890
1890
  className: t,
1891
1891
  label: o,
@@ -1895,126 +1895,131 @@ const f = (...n) => n.filter(Boolean).join(" "), An = [
1895
1895
  value: a,
1896
1896
  placeholder: i,
1897
1897
  maxHeight: c = 300,
1898
- error: h,
1899
- size: x = "md"
1900
- } = n, [v, u] = B(!1), [g, p] = B(null), b = y.useRef(null), k = y.useRef([]), m = r?.find((w) => W(w) && w.value === a), N = oe(
1901
- () => r.map((w, I) => !W(w) || w.disabled ? I : -1).filter((w) => w !== -1),
1898
+ error: g,
1899
+ size: w = "md",
1900
+ disabled: x = !1,
1901
+ clearable: m = !0
1902
+ } = n, [b, p] = A(!1), [f, v] = A(null), u = y.useRef(null), R = y.useRef([]), C = r?.find((N) => H(N) && N.value === a), I = se(
1903
+ () => r.map((N, k) => !H(N) || N.disabled ? k : -1).filter((N) => N !== -1),
1902
1904
  [r]
1903
1905
  );
1904
- ge(v, () => u(!1)), _(() => {
1905
- if (v) {
1906
- b.current?.focus({ preventScroll: !0 });
1907
- const w = r.findIndex((I) => W(I) && I.value === a);
1908
- if (w >= 0)
1909
- p(w);
1906
+ be(b, () => p(!1)), $(() => {
1907
+ if (b) {
1908
+ u.current?.focus({ preventScroll: !0 });
1909
+ const N = r.findIndex((k) => H(k) && k.value === a);
1910
+ if (N >= 0)
1911
+ v(N);
1910
1912
  else {
1911
- const I = r.findIndex((L) => W(L) && !L.disabled);
1912
- p(I >= 0 ? I : null);
1913
+ const k = r.findIndex((B) => H(B) && !B.disabled);
1914
+ v(k >= 0 ? k : null);
1913
1915
  }
1914
1916
  } else
1915
- p(null);
1916
- }, [v]);
1917
- const { anchorRef: C, Popover: D, getReferenceProps: O, getItemProps: T } = We({
1917
+ v(null);
1918
+ }, [b]);
1919
+ const { anchorRef: D, Popover: T, getReferenceProps: E, getItemProps: L } = _e({
1918
1920
  placement: "bottom",
1919
1921
  fullWidth: !0,
1920
- onOutsideClick: () => u(!1),
1921
- open: v,
1922
- onOpenChange: u,
1923
- listRef: k,
1924
- activeIndex: g,
1925
- onNavigate: p,
1926
- disabledIndices: N
1927
- }), P = (w) => {
1928
- const I = r[w];
1929
- I && W(I) && !I.disabled && (l(I.value), u(!1));
1922
+ onOutsideClick: () => p(!1),
1923
+ open: b,
1924
+ onOpenChange: p,
1925
+ listRef: R,
1926
+ activeIndex: f,
1927
+ onNavigate: v,
1928
+ disabledIndices: I
1929
+ }), P = (N) => {
1930
+ const k = r[N];
1931
+ k && H(k) && !k.disabled && (l(k.value), p(!1));
1930
1932
  };
1931
- return /* @__PURE__ */ e(J.Provider, { value: x, children: /* @__PURE__ */ d(
1933
+ return /* @__PURE__ */ e(Q.Provider, { value: w, children: /* @__PURE__ */ d(
1932
1934
  "div",
1933
1935
  {
1934
- className: f(
1936
+ className: h(
1935
1937
  "flex flex-col",
1936
1938
  t
1937
1939
  ),
1938
1940
  children: [
1939
- /* @__PURE__ */ e(Y, { children: o }),
1940
- /* @__PURE__ */ d("div", { className: "relative flex w-full flex-col", ref: C, children: [
1941
+ /* @__PURE__ */ e(J, { children: o }),
1942
+ /* @__PURE__ */ d("div", { className: "relative flex w-full flex-col", ref: D, children: [
1941
1943
  /* @__PURE__ */ d(
1942
1944
  "div",
1943
1945
  {
1944
- ...O({
1945
- ref: b,
1946
+ ...E({
1947
+ ref: u,
1946
1948
  role: "button",
1947
- tabIndex: 0,
1948
- onClick: () => u(!v),
1949
- onKeyDown: (w) => {
1950
- w.key === " " ? (w.preventDefault(), u((I) => !I)) : w.key === "Enter" && (w.preventDefault(), v && g != null ? P(g) : u(!0));
1949
+ tabIndex: x ? -1 : 0,
1950
+ "aria-disabled": x,
1951
+ onClick: () => {
1952
+ x || p(!b);
1953
+ },
1954
+ onKeyDown: (N) => {
1955
+ x || (N.key === " " ? (N.preventDefault(), p((k) => !k)) : N.key === "Enter" && (N.preventDefault(), b && f != null ? P(f) : p(!0)));
1951
1956
  }
1952
1957
  }),
1953
- className: f(
1958
+ className: h(
1954
1959
  "flex flex-row items-center border select-trigger transition-all duration-150 rounded-xl shadow-sm ring-0 focus:ring-4 focus:outline-none select-none",
1955
- ee[x],
1956
- G[x],
1957
- ce[x],
1958
- a ? Ee[x] : de[x],
1959
- h && "select-trigger-error",
1960
- v && "ring-4"
1960
+ te[w],
1961
+ Y[w],
1962
+ de[w],
1963
+ m && a ? Fe[w] : ue[w],
1964
+ x ? "select-trigger-disabled" : g && "select-trigger-error",
1965
+ !x && b && "ring-4"
1961
1966
  ),
1962
1967
  children: [
1963
- m && /* @__PURE__ */ e("span", { className: "flex-1 min-w-0 break-all line-clamp-1 text-left", children: m.label }),
1964
- !m && i && /* @__PURE__ */ e("span", { className: "flex-1 min-w-0 break-all line-clamp-1 text-left select-placeholder", children: i })
1968
+ C && /* @__PURE__ */ e("span", { className: "flex-1 min-w-0 break-all line-clamp-1 text-left", children: C.label }),
1969
+ !C && i && /* @__PURE__ */ e("span", { className: "flex-1 min-w-0 break-all line-clamp-1 text-left select-placeholder", children: i })
1965
1970
  ]
1966
1971
  }
1967
1972
  ),
1968
- /* @__PURE__ */ d(ue, { children: [
1969
- h && /* @__PURE__ */ e(te, {}),
1970
- !!a && /* @__PURE__ */ e(Q, { Icon: ae, onClick: () => l(null) }),
1971
- /* @__PURE__ */ e(Q, { Icon: he })
1973
+ /* @__PURE__ */ d(fe, { children: [
1974
+ !x && g && /* @__PURE__ */ e(ne, {}),
1975
+ m && !!a && !x && /* @__PURE__ */ e(q, { Icon: ie, onClick: () => l(null) }),
1976
+ /* @__PURE__ */ e(q, { Icon: pe })
1972
1977
  ] }),
1973
- /* @__PURE__ */ e(D, { open: v, children: /* @__PURE__ */ e(pe, { className: "!p-0", style: { maxHeight: c }, children: /* @__PURE__ */ e("div", { className: "flex flex-col p-2 gap-1", children: r.map((w, I) => {
1974
- if (!W(w))
1975
- return w.kind === "header" ? /* @__PURE__ */ e(
1976
- Ae,
1978
+ /* @__PURE__ */ e(T, { open: b, children: /* @__PURE__ */ e(ge, { className: "!p-0", style: { maxHeight: c }, children: /* @__PURE__ */ e("div", { className: "flex flex-col p-2 gap-1", children: r.map((N, k) => {
1979
+ if (!H(N))
1980
+ return N.kind === "header" ? /* @__PURE__ */ e(
1981
+ We,
1977
1982
  {
1978
- ref: (R) => {
1979
- k.current[I] = R;
1983
+ ref: (O) => {
1984
+ R.current[k] = O;
1980
1985
  },
1981
- children: w.label
1986
+ children: N.label
1982
1987
  },
1983
- `header-${I}`
1988
+ `header-${k}`
1984
1989
  ) : /* @__PURE__ */ e(
1985
- Ue,
1990
+ He,
1986
1991
  {
1987
- ref: (R) => {
1988
- k.current[I] = R;
1992
+ ref: (O) => {
1993
+ R.current[k] = O;
1989
1994
  }
1990
1995
  },
1991
- `divider-${I}`
1996
+ `divider-${k}`
1992
1997
  );
1993
- const L = w.value === a;
1998
+ const B = N.value === a;
1994
1999
  return /* @__PURE__ */ e(
1995
- Be,
2000
+ Ue,
1996
2001
  {
1997
- ...T({
1998
- ref(R) {
1999
- k.current[I] = R;
2002
+ ...L({
2003
+ ref(O) {
2004
+ R.current[k] = O;
2000
2005
  }
2001
2006
  }),
2002
- onClick: () => P(I),
2003
- selected: L,
2004
- active: g === I,
2005
- disabled: w.disabled,
2006
- children: w.label
2007
+ onClick: () => P(k),
2008
+ selected: B,
2009
+ active: f === k,
2010
+ disabled: N.disabled,
2011
+ children: N.label
2007
2012
  },
2008
- String(w.value)
2013
+ String(N.value)
2009
2014
  );
2010
2015
  }) }) }) })
2011
2016
  ] }),
2012
- /* @__PURE__ */ e(j, { children: s }),
2013
- /* @__PURE__ */ e(V, { children: h })
2017
+ /* @__PURE__ */ e(V, { children: s }),
2018
+ /* @__PURE__ */ e(K, { children: g })
2014
2019
  ]
2015
2020
  }
2016
2021
  ) });
2017
- }, Rl = (n) => {
2022
+ }, Dl = (n) => {
2018
2023
  const {
2019
2024
  className: t,
2020
2025
  label: o,
@@ -2024,76 +2029,81 @@ const f = (...n) => n.filter(Boolean).join(" "), An = [
2024
2029
  onSearch: a,
2025
2030
  value: i,
2026
2031
  placeholder: c,
2027
- maxHeight: h = 300,
2028
- error: x,
2029
- size: v = "md"
2030
- } = n, [u, g] = B(!1), [p, b] = B(r), [k, m] = B(""), [N, C] = B(null), D = y.useRef(null), O = y.useRef(null), T = y.useRef([]), P = r?.find((z) => W(z) && z.value === i), w = oe(() => k !== "" ? p : r, [k, p, r]), I = oe(
2031
- () => w.map((z, A) => !W(z) || z.disabled ? A : -1).filter((z) => z !== -1),
2032
- [w]
2032
+ maxHeight: g = 300,
2033
+ error: w,
2034
+ size: x = "md",
2035
+ disabled: m = !1,
2036
+ clearable: b = !0
2037
+ } = n, [p, f] = A(!1), [v, u] = A(r), [R, C] = A(""), [I, D] = A(null), T = y.useRef(null), E = y.useRef(null), L = y.useRef([]), P = r?.find((z) => H(z) && z.value === i), N = se(() => R !== "" ? v : r, [R, v, r]), k = se(
2038
+ () => N.map((z, U) => !H(z) || z.disabled ? U : -1).filter((z) => z !== -1),
2039
+ [N]
2033
2040
  );
2034
- ge(u, () => g(!1)), _(() => {
2035
- b(a(k));
2036
- }, [k, r, a]), _(() => {
2037
- if (u) {
2038
- setTimeout(() => O.current?.focus(), 100);
2039
- const z = r.findIndex((A) => W(A) && A.value === i);
2041
+ be(p, () => f(!1)), $(() => {
2042
+ u(a(R));
2043
+ }, [R, r, a]), $(() => {
2044
+ if (p) {
2045
+ setTimeout(() => E.current?.focus(), 100);
2046
+ const z = r.findIndex((U) => H(U) && U.value === i);
2040
2047
  if (z >= 0)
2041
- C(z);
2048
+ D(z);
2042
2049
  else {
2043
- const A = r.findIndex((re) => W(re) && !re.disabled);
2044
- C(A >= 0 ? A : null);
2050
+ const U = r.findIndex((le) => H(le) && !le.disabled);
2051
+ D(U >= 0 ? U : null);
2045
2052
  }
2046
2053
  } else
2047
- C(null), m("");
2048
- }, [u]), _(() => {
2049
- if (!u) return;
2050
- const z = w.findIndex((A) => W(A) && !A.disabled);
2051
- C(z >= 0 ? z : null);
2052
- }, [k, u, w]);
2053
- const { anchorRef: L, Popover: R, getReferenceProps: H, getItemProps: M } = We({
2054
+ D(null), C("");
2055
+ }, [p]), $(() => {
2056
+ if (!p) return;
2057
+ const z = N.findIndex((U) => H(U) && !U.disabled);
2058
+ D(z >= 0 ? z : null);
2059
+ }, [R, p, N]);
2060
+ const { anchorRef: B, Popover: O, getReferenceProps: _, getItemProps: X } = _e({
2054
2061
  placement: "bottom",
2055
2062
  fullWidth: !0,
2056
- onOutsideClick: () => g(!1),
2057
- open: u,
2058
- onOpenChange: g,
2059
- listRef: T,
2060
- activeIndex: N,
2061
- onNavigate: C,
2062
- disabledIndices: I
2063
- }), $ = (z) => {
2064
- const A = w[z];
2065
- A && W(A) && !A.disabled && (l(A.value), g(!1));
2066
- }, ne = w.some((z) => W(z));
2067
- return /* @__PURE__ */ e(J.Provider, { value: v, children: /* @__PURE__ */ d(
2063
+ onOutsideClick: () => f(!1),
2064
+ open: p,
2065
+ onOpenChange: f,
2066
+ listRef: L,
2067
+ activeIndex: I,
2068
+ onNavigate: D,
2069
+ disabledIndices: k
2070
+ }), re = (z) => {
2071
+ const U = N[z];
2072
+ U && H(U) && !U.disabled && (l(U.value), f(!1));
2073
+ }, xe = N.some((z) => H(z));
2074
+ return /* @__PURE__ */ e(Q.Provider, { value: x, children: /* @__PURE__ */ d(
2068
2075
  "div",
2069
2076
  {
2070
- className: f(
2077
+ className: h(
2071
2078
  "flex flex-col",
2072
2079
  t
2073
2080
  ),
2074
2081
  children: [
2075
- /* @__PURE__ */ e(Y, { children: o }),
2076
- /* @__PURE__ */ d("div", { className: "relative flex w-full flex-col", ref: L, children: [
2082
+ /* @__PURE__ */ e(J, { children: o }),
2083
+ /* @__PURE__ */ d("div", { className: "relative flex w-full flex-col", ref: B, children: [
2077
2084
  /* @__PURE__ */ d(
2078
2085
  "div",
2079
2086
  {
2080
- ...H({
2081
- ref: D,
2087
+ ..._({
2088
+ ref: T,
2082
2089
  role: "button",
2083
- tabIndex: 0,
2084
- onClick: () => g(!u),
2090
+ tabIndex: m ? -1 : 0,
2091
+ "aria-disabled": m,
2092
+ onClick: () => {
2093
+ m || f(!p);
2094
+ },
2085
2095
  onKeyDown: (z) => {
2086
- z.key === " " ? (z.preventDefault(), g((A) => !A)) : z.key === "Enter" && !u && (z.preventDefault(), g(!0));
2096
+ m || (z.key === " " ? (z.preventDefault(), f((U) => !U)) : z.key === "Enter" && !p && (z.preventDefault(), f(!0)));
2087
2097
  }
2088
2098
  }),
2089
- className: f(
2099
+ className: h(
2090
2100
  "flex flex-row items-center border select-trigger transition-all duration-150 rounded-xl shadow-sm ring-0 focus:ring-4 focus:outline-none select-none",
2091
- ee[v],
2092
- G[v],
2093
- ce[v],
2094
- i ? Ee[v] : de[v],
2095
- x && "select-trigger-error",
2096
- u && "ring-4"
2101
+ te[x],
2102
+ Y[x],
2103
+ de[x],
2104
+ b && i ? Fe[x] : ue[x],
2105
+ m ? "select-trigger-disabled" : w && "select-trigger-error",
2106
+ !m && p && "ring-4"
2097
2107
  ),
2098
2108
  children: [
2099
2109
  P && /* @__PURE__ */ e("span", { className: "flex-1 min-w-0 break-all line-clamp-1 text-left", children: P.label }),
@@ -2101,63 +2111,63 @@ const f = (...n) => n.filter(Boolean).join(" "), An = [
2101
2111
  ]
2102
2112
  }
2103
2113
  ),
2104
- /* @__PURE__ */ d(ue, { children: [
2105
- x && /* @__PURE__ */ e(te, {}),
2106
- !!i && /* @__PURE__ */ e(Q, { Icon: ae, onClick: () => l(null) }),
2107
- /* @__PURE__ */ e(Q, { Icon: he })
2114
+ /* @__PURE__ */ d(fe, { children: [
2115
+ !m && w && /* @__PURE__ */ e(ne, {}),
2116
+ b && !!i && !m && /* @__PURE__ */ e(q, { Icon: ie, onClick: () => l(null) }),
2117
+ /* @__PURE__ */ e(q, { Icon: pe })
2108
2118
  ] }),
2109
- /* @__PURE__ */ e(R, { open: u, children: /* @__PURE__ */ d(pe, { className: "gap-0 !p-0", style: { maxHeight: h }, children: [
2119
+ /* @__PURE__ */ e(O, { open: p, children: /* @__PURE__ */ d(ge, { className: "gap-0 !p-0", style: { maxHeight: g }, children: [
2110
2120
  /* @__PURE__ */ d("div", { className: "sticky top-0 border-b select-search-bar py-1 backdrop-blur-sm", children: [
2111
2121
  /* @__PURE__ */ e(
2112
2122
  "input",
2113
2123
  {
2114
- ref: O,
2124
+ ref: E,
2115
2125
  type: "text",
2116
2126
  placeholder: "Search",
2117
- value: k,
2127
+ value: R,
2118
2128
  className: "appearance-none border-none w-full bg-transparent rounded- pl-10 transition-all duration-150 focus:outline-none ring-0 placeholder:text-[var(--color-input-placeholder)]",
2119
- onChange: (z) => m(z.target.value),
2129
+ onChange: (z) => C(z.target.value),
2120
2130
  onKeyDown: (z) => {
2121
- z.key === "Enter" && N != null && (z.preventDefault(), $(N));
2131
+ z.key === "Enter" && I != null && (z.preventDefault(), re(I));
2122
2132
  }
2123
2133
  }
2124
2134
  ),
2125
- /* @__PURE__ */ e(Le, { className: "absolute select-search-icon left-4 top-4 h-4 w-4" })
2135
+ /* @__PURE__ */ e(Ee, { className: "absolute select-search-icon left-4 top-4 h-4 w-4" })
2126
2136
  ] }),
2127
2137
  /* @__PURE__ */ d("div", { className: "flex flex-col gap-1 p-2", children: [
2128
- k !== "" && !ne && /* @__PURE__ */ e("div", { className: "flex flex-col items-center justify-center py-6", children: /* @__PURE__ */ e(Ze, { className: "h-6 w-6 text-[var(--color-input-text)]" }) }),
2129
- w.map((z, A) => {
2130
- if (!W(z))
2138
+ R !== "" && !xe && /* @__PURE__ */ e("div", { className: "flex flex-col items-center justify-center py-6", children: /* @__PURE__ */ e(tt, { className: "h-6 w-6 text-[var(--color-input-text)]" }) }),
2139
+ N.map((z, U) => {
2140
+ if (!H(z))
2131
2141
  return z.kind === "header" ? /* @__PURE__ */ e(
2132
- Ae,
2142
+ We,
2133
2143
  {
2134
- ref: (q) => {
2135
- T.current[A] = q;
2144
+ ref: (Z) => {
2145
+ L.current[U] = Z;
2136
2146
  },
2137
2147
  children: z.label
2138
2148
  },
2139
- `header-${A}`
2149
+ `header-${U}`
2140
2150
  ) : /* @__PURE__ */ e(
2141
- Ue,
2151
+ He,
2142
2152
  {
2143
- ref: (q) => {
2144
- T.current[A] = q;
2153
+ ref: (Z) => {
2154
+ L.current[U] = Z;
2145
2155
  }
2146
2156
  },
2147
- `divider-${A}`
2157
+ `divider-${U}`
2148
2158
  );
2149
- const re = z.value === i;
2159
+ const le = z.value === i;
2150
2160
  return /* @__PURE__ */ e(
2151
- Be,
2161
+ Ue,
2152
2162
  {
2153
- ...M({
2154
- ref(q) {
2155
- T.current[A] = q;
2163
+ ...X({
2164
+ ref(Z) {
2165
+ L.current[U] = Z;
2156
2166
  }
2157
2167
  }),
2158
- onClick: () => $(A),
2159
- selected: re,
2160
- active: N === A,
2168
+ onClick: () => re(U),
2169
+ selected: le,
2170
+ active: I === U,
2161
2171
  disabled: z.disabled,
2162
2172
  children: z.label
2163
2173
  },
@@ -2167,14 +2177,14 @@ const f = (...n) => n.filter(Boolean).join(" "), An = [
2167
2177
  ] })
2168
2178
  ] }) })
2169
2179
  ] }),
2170
- /* @__PURE__ */ e(j, { children: s }),
2171
- /* @__PURE__ */ e(V, { children: x })
2180
+ /* @__PURE__ */ e(V, { children: s }),
2181
+ /* @__PURE__ */ e(K, { children: w })
2172
2182
  ]
2173
2183
  }
2174
2184
  ) });
2175
- }, Tr = (n, t) => {
2176
- const [o, s] = B(n);
2177
- return _(() => {
2185
+ }, Pr = (n, t) => {
2186
+ const [o, s] = A(n);
2187
+ return $(() => {
2178
2188
  const r = setTimeout(() => {
2179
2189
  s(n);
2180
2190
  }, t);
@@ -2182,7 +2192,7 @@ const f = (...n) => n.filter(Boolean).join(" "), An = [
2182
2192
  clearTimeout(r);
2183
2193
  };
2184
2194
  }, [n, t]), o;
2185
- }, Sl = (n) => {
2195
+ }, Ol = (n) => {
2186
2196
  const {
2187
2197
  className: t,
2188
2198
  label: o,
@@ -2192,165 +2202,170 @@ const f = (...n) => n.filter(Boolean).join(" "), An = [
2192
2202
  fetchOptionByValue: a,
2193
2203
  onSearchDebounceMs: i = 300,
2194
2204
  value: c,
2195
- placeholder: h,
2196
- maxHeight: x = 300,
2197
- error: v,
2198
- size: u = "md"
2199
- } = n, [g, p] = B(!1), b = y.useRef(null), [k, m] = B(""), [N, C] = B([]), [D, O] = B(null), T = y.useRef(null), [P, w] = B(!1), [I, L] = B(!1), [R, H] = B(null), M = y.useRef([]), $ = oe(
2200
- () => N.map((E, F) => !W(E) || E.disabled ? F : -1).filter((E) => E !== -1),
2201
- [N]
2205
+ placeholder: g,
2206
+ maxHeight: w = 300,
2207
+ error: x,
2208
+ size: m = "md",
2209
+ disabled: b = !1,
2210
+ clearable: p = !0
2211
+ } = n, [f, v] = A(!1), u = y.useRef(null), [R, C] = A(""), [I, D] = A([]), [T, E] = A(null), L = y.useRef(null), [P, N] = A(!1), [k, B] = A(!1), [O, _] = A(null), X = y.useRef([]), re = se(
2212
+ () => I.map((M, F) => !H(M) || M.disabled ? F : -1).filter((M) => M !== -1),
2213
+ [I]
2202
2214
  );
2203
- ge(g, () => p(!1));
2204
- const ne = Tr(k, i);
2205
- _(() => {
2215
+ be(f, () => v(!1));
2216
+ const xe = Pr(R, i);
2217
+ $(() => {
2206
2218
  (async () => {
2207
- w(!0);
2208
- const F = await l(ne);
2209
- C(F), w(!1);
2219
+ N(!0);
2220
+ const F = await l(xe);
2221
+ D(F), N(!1);
2210
2222
  })();
2211
- }, [ne, l]), _(() => {
2223
+ }, [xe, l]), $(() => {
2212
2224
  if (c == null) {
2213
- O(null);
2225
+ E(null);
2214
2226
  return;
2215
2227
  }
2216
- const E = N?.find((F) => W(F) && F.value === c);
2217
- E ? O(E) : (async () => {
2218
- L(!0);
2219
- const le = await a(c);
2220
- O(le), L(!1);
2228
+ const M = I?.find((F) => H(F) && F.value === c);
2229
+ M ? E(M) : (async () => {
2230
+ B(!0);
2231
+ const oe = await a(c);
2232
+ E(oe), B(!1);
2221
2233
  })();
2222
- }, [a, N, c]), _(() => {
2223
- g ? setTimeout(() => T.current?.focus(), 100) : (H(null), m(""));
2224
- }, [g]), _(() => {
2225
- if (!g) return;
2226
- const E = N.findIndex((F) => W(F) && !F.disabled);
2227
- H(E >= 0 ? E : null);
2228
- }, [N, g]);
2229
- const { anchorRef: z, Popover: A, getReferenceProps: re, getItemProps: q } = We({
2234
+ }, [a, I, c]), $(() => {
2235
+ f ? setTimeout(() => L.current?.focus(), 100) : (_(null), C(""));
2236
+ }, [f]), $(() => {
2237
+ if (!f) return;
2238
+ const M = I.findIndex((F) => H(F) && !F.disabled);
2239
+ _(M >= 0 ? M : null);
2240
+ }, [I, f]);
2241
+ const { anchorRef: z, Popover: U, getReferenceProps: le, getItemProps: Z } = _e({
2230
2242
  placement: "bottom",
2231
2243
  fullWidth: !0,
2232
- onOutsideClick: () => p(!1),
2233
- open: g,
2234
- onOpenChange: p,
2235
- listRef: M,
2236
- activeIndex: R,
2237
- onNavigate: H,
2238
- disabledIndices: $
2239
- }), Re = (E) => {
2240
- const F = N[E];
2241
- F && W(F) && !F.disabled && (r(F.value), p(!1));
2242
- }, Se = N.some((E) => W(E));
2243
- return /* @__PURE__ */ e(J.Provider, { value: u, children: /* @__PURE__ */ d(
2244
+ onOutsideClick: () => v(!1),
2245
+ open: f,
2246
+ onOpenChange: v,
2247
+ listRef: X,
2248
+ activeIndex: O,
2249
+ onNavigate: _,
2250
+ disabledIndices: re
2251
+ }), De = (M) => {
2252
+ const F = I[M];
2253
+ F && H(F) && !F.disabled && (r(F.value), v(!1));
2254
+ }, Oe = I.some((M) => H(M));
2255
+ return /* @__PURE__ */ e(Q.Provider, { value: m, children: /* @__PURE__ */ d(
2244
2256
  "div",
2245
2257
  {
2246
- className: f(
2258
+ className: h(
2247
2259
  "flex flex-col",
2248
2260
  t
2249
2261
  ),
2250
2262
  children: [
2251
- /* @__PURE__ */ e(Y, { children: o }),
2263
+ /* @__PURE__ */ e(J, { children: o }),
2252
2264
  /* @__PURE__ */ d("div", { className: "relative flex w-full flex-col", ref: z, children: [
2253
2265
  /* @__PURE__ */ d(
2254
2266
  "div",
2255
2267
  {
2256
- ...re({
2257
- ref: b,
2268
+ ...le({
2269
+ ref: u,
2258
2270
  role: "button",
2259
- tabIndex: 0,
2260
- onClick: () => p(!g),
2261
- onKeyDown: (E) => {
2262
- E.key === " " ? (E.preventDefault(), p((F) => !F)) : E.key === "Enter" && !g && (E.preventDefault(), p(!0));
2271
+ tabIndex: b ? -1 : 0,
2272
+ "aria-disabled": b,
2273
+ onClick: () => {
2274
+ b || v(!f);
2275
+ },
2276
+ onKeyDown: (M) => {
2277
+ b || (M.key === " " ? (M.preventDefault(), v((F) => !F)) : M.key === "Enter" && !f && (M.preventDefault(), v(!0)));
2263
2278
  }
2264
2279
  }),
2265
- className: f(
2280
+ className: h(
2266
2281
  "flex flex-row items-center border select-trigger transition-all duration-150 rounded-xl shadow-sm ring-0 focus:ring-4 focus:outline-none select-none",
2267
- ee[u],
2268
- G[u],
2269
- ce[u],
2270
- c ? Ee[u] : de[u],
2271
- v && "select-trigger-error",
2272
- g && "ring-4"
2282
+ te[m],
2283
+ Y[m],
2284
+ de[m],
2285
+ p && c ? Fe[m] : ue[m],
2286
+ b ? "select-trigger-disabled" : x && "select-trigger-error",
2287
+ !b && f && "ring-4"
2273
2288
  ),
2274
2289
  children: [
2275
- !I && D && /* @__PURE__ */ e("span", { className: "flex-1 min-w-0 break-all line-clamp-1 text-left", children: D.label }),
2276
- !I && !D && h && /* @__PURE__ */ e("span", { className: "flex-1 min-w-0 break-all line-clamp-1 text-left select-placeholder", children: h }),
2277
- I && /* @__PURE__ */ e(Ce, { className: "h-4 w-4 text-[var(--color-input-text)]" })
2290
+ !k && T && /* @__PURE__ */ e("span", { className: "flex-1 min-w-0 break-all line-clamp-1 text-left", children: T.label }),
2291
+ !k && !T && g && /* @__PURE__ */ e("span", { className: "flex-1 min-w-0 break-all line-clamp-1 text-left select-placeholder", children: g }),
2292
+ k && /* @__PURE__ */ e(Re, { className: "h-4 w-4 text-[var(--color-input-text)]" })
2278
2293
  ]
2279
2294
  }
2280
2295
  ),
2281
- /* @__PURE__ */ d(ue, { children: [
2282
- v && /* @__PURE__ */ e(te, {}),
2283
- !!c && /* @__PURE__ */ e(Q, { Icon: ae, onClick: () => r(null) }),
2284
- /* @__PURE__ */ e(Q, { Icon: he })
2296
+ /* @__PURE__ */ d(fe, { children: [
2297
+ !b && x && /* @__PURE__ */ e(ne, {}),
2298
+ p && !!c && !b && /* @__PURE__ */ e(q, { Icon: ie, onClick: () => r(null) }),
2299
+ /* @__PURE__ */ e(q, { Icon: pe })
2285
2300
  ] }),
2286
- /* @__PURE__ */ e(A, { open: g, children: /* @__PURE__ */ d(pe, { className: "gap-0 !p-0", style: { maxHeight: x }, children: [
2301
+ /* @__PURE__ */ e(U, { open: f, children: /* @__PURE__ */ d(ge, { className: "gap-0 !p-0", style: { maxHeight: w }, children: [
2287
2302
  /* @__PURE__ */ d("div", { className: "sticky top-0 border-b select-search-bar py-1 backdrop-blur-sm", children: [
2288
2303
  /* @__PURE__ */ e(
2289
2304
  "input",
2290
2305
  {
2291
- ref: T,
2306
+ ref: L,
2292
2307
  type: "text",
2293
2308
  placeholder: "Search",
2294
- value: k,
2309
+ value: R,
2295
2310
  className: "appearance-none border-none w-full bg-transparent rounded- pl-10 transition-all duration-150 focus:outline-none ring-0 placeholder:text-[var(--color-input-placeholder)]",
2296
- onChange: (E) => m(E.target.value),
2297
- onKeyDown: (E) => {
2298
- E.key === "Enter" && R != null && (E.preventDefault(), Re(R));
2311
+ onChange: (M) => C(M.target.value),
2312
+ onKeyDown: (M) => {
2313
+ M.key === "Enter" && O != null && (M.preventDefault(), De(O));
2299
2314
  }
2300
2315
  }
2301
2316
  ),
2302
- /* @__PURE__ */ e(Le, { className: "absolute select-search-icon left-4 top-4 h-4 w-4" })
2317
+ /* @__PURE__ */ e(Ee, { className: "absolute select-search-icon left-4 top-4 h-4 w-4" })
2303
2318
  ] }),
2304
2319
  /* @__PURE__ */ d("div", { className: "flex flex-col gap-1 p-2", children: [
2305
- !P && !Se && /* @__PURE__ */ e("div", { className: "flex flex-col items-center justify-center py-6", children: /* @__PURE__ */ e(Ze, { className: "h-6 w-6 text-[var(--color-input-text)]" }) }),
2306
- P && /* @__PURE__ */ e("div", { className: "flex flex-col items-center justify-center py-6", children: /* @__PURE__ */ e(Ce, { className: "h-6 w-6 text-[var(--color-input-text)]" }) }),
2307
- !P && N.map((E, F) => {
2308
- if (!W(E))
2309
- return E.kind === "header" ? /* @__PURE__ */ e(
2310
- Ae,
2320
+ !P && !Oe && /* @__PURE__ */ e("div", { className: "flex flex-col items-center justify-center py-6", children: /* @__PURE__ */ e(tt, { className: "h-6 w-6 text-[var(--color-input-text)]" }) }),
2321
+ P && /* @__PURE__ */ e("div", { className: "flex flex-col items-center justify-center py-6", children: /* @__PURE__ */ e(Re, { className: "h-6 w-6 text-[var(--color-input-text)]" }) }),
2322
+ !P && I.map((M, F) => {
2323
+ if (!H(M))
2324
+ return M.kind === "header" ? /* @__PURE__ */ e(
2325
+ We,
2311
2326
  {
2312
2327
  ref: (me) => {
2313
- M.current[F] = me;
2328
+ X.current[F] = me;
2314
2329
  },
2315
- children: E.label
2330
+ children: M.label
2316
2331
  },
2317
2332
  `header-${F}`
2318
2333
  ) : /* @__PURE__ */ e(
2319
- Ue,
2334
+ He,
2320
2335
  {
2321
2336
  ref: (me) => {
2322
- M.current[F] = me;
2337
+ X.current[F] = me;
2323
2338
  }
2324
2339
  },
2325
2340
  `divider-${F}`
2326
2341
  );
2327
- const le = E.value === c;
2342
+ const oe = M.value === c;
2328
2343
  return /* @__PURE__ */ e(
2329
- Be,
2344
+ Ue,
2330
2345
  {
2331
- ...q({
2346
+ ...Z({
2332
2347
  ref(me) {
2333
- M.current[F] = me;
2348
+ X.current[F] = me;
2334
2349
  }
2335
2350
  }),
2336
- onClick: () => Re(F),
2337
- selected: le,
2338
- active: R === F,
2339
- disabled: E.disabled,
2340
- children: E.label
2351
+ onClick: () => De(F),
2352
+ selected: oe,
2353
+ active: O === F,
2354
+ disabled: M.disabled,
2355
+ children: M.label
2341
2356
  },
2342
- String(E.value)
2357
+ String(M.value)
2343
2358
  );
2344
2359
  })
2345
2360
  ] })
2346
2361
  ] }) })
2347
2362
  ] }),
2348
- /* @__PURE__ */ e(j, { children: s }),
2349
- /* @__PURE__ */ e(V, { children: v })
2363
+ /* @__PURE__ */ e(V, { children: s }),
2364
+ /* @__PURE__ */ e(K, { children: x })
2350
2365
  ]
2351
2366
  }
2352
2367
  ) });
2353
- }, Lr = {
2368
+ }, Er = {
2354
2369
  red: "bg-red-100 text-red-700 ring-red-200 dark:bg-red-950 dark:text-red-300 dark:ring-red-800",
2355
2370
  orange: "bg-orange-100 text-orange-700 ring-orange-200 dark:bg-orange-950 dark:text-orange-300 dark:ring-orange-800",
2356
2371
  amber: "bg-amber-100 text-amber-700 ring-amber-200 dark:bg-amber-950 dark:text-amber-300 dark:ring-amber-800",
@@ -2375,7 +2390,7 @@ const f = (...n) => n.filter(Boolean).join(" "), An = [
2375
2390
  stone: "bg-stone-100 text-stone-700 ring-stone-200 dark:bg-stone-950 dark:text-stone-300 dark:ring-stone-800",
2376
2391
  white: "bg-[var(--color-badge-white-bg)] text-[var(--color-badge-white-text)] ring-[var(--color-badge-white-ring)]",
2377
2392
  black: "bg-[var(--color-badge-black-bg)] text-[var(--color-badge-black-text)] ring-[var(--color-badge-black-ring)]"
2378
- }, Te = y.forwardRef((n, t) => {
2393
+ }, Pe = y.forwardRef((n, t) => {
2379
2394
  const {
2380
2395
  className: o,
2381
2396
  children: s,
@@ -2383,21 +2398,21 @@ const f = (...n) => n.filter(Boolean).join(" "), An = [
2383
2398
  showCloseIcon: l,
2384
2399
  Icon: a,
2385
2400
  color: i = "gray"
2386
- } = n, c = f(
2401
+ } = n, c = h(
2387
2402
  "inline-flex align-top items-center gap-2 px-3 h-7 rounded-lg font-semibold",
2388
- Lr[i],
2403
+ Er[i],
2389
2404
  o
2390
2405
  );
2391
2406
  return r ? /* @__PURE__ */ e("div", { ref: t, children: /* @__PURE__ */ d(
2392
2407
  "button",
2393
2408
  {
2394
- className: f("cursor-pointer ring-0 hover:ring-4 active:ring-1 transition-all duration-100 select-none focus:outline-none focus:ring-4", c),
2409
+ className: h("cursor-pointer ring-0 hover:ring-4 active:ring-1 transition-all duration-100 select-none focus:outline-none focus:ring-4", c),
2395
2410
  onClick: r,
2396
2411
  children: [
2397
2412
  a && /* @__PURE__ */ e(a, { className: "h-4 w-4 shrink-0" }),
2398
2413
  /* @__PURE__ */ e("div", { className: "break-all line-clamp-1 text-left", children: s }),
2399
2414
  l && /* @__PURE__ */ e(
2400
- ae,
2415
+ ie,
2401
2416
  {
2402
2417
  className: "h-4 w-4 shrink-0"
2403
2418
  }
@@ -2409,7 +2424,7 @@ const f = (...n) => n.filter(Boolean).join(" "), An = [
2409
2424
  /* @__PURE__ */ e("div", { className: "break-all line-clamp-1 text-left", children: s })
2410
2425
  ] });
2411
2426
  });
2412
- function Pr(n) {
2427
+ function Mr(n) {
2413
2428
  const {
2414
2429
  enabled: t,
2415
2430
  triggerRef: o,
@@ -2418,49 +2433,49 @@ function Pr(n) {
2418
2433
  itemCount: l,
2419
2434
  deps: a = [],
2420
2435
  gap: i = 4
2421
- } = n, [c, h] = B(0);
2422
- return Nt(() => {
2436
+ } = n, [c, g] = A(0);
2437
+ return yt(() => {
2423
2438
  if (!t) return;
2424
- const x = o.current, v = s.current;
2425
- if (!x || !v) return;
2426
- const u = () => {
2439
+ const w = o.current, x = s.current;
2440
+ if (!w || !x) return;
2441
+ const m = () => {
2427
2442
  if (l === 0) {
2428
- h(0);
2443
+ g(0);
2429
2444
  return;
2430
2445
  }
2431
2446
  if (l === 1) {
2432
- h(1);
2447
+ g(1);
2433
2448
  return;
2434
2449
  }
2435
- const p = window.getComputedStyle(x), b = parseFloat(p.paddingLeft || "0"), k = x.getBoundingClientRect(), m = k.left + b;
2436
- let N = k.right - parseFloat(p.paddingRight || "0");
2450
+ const p = window.getComputedStyle(w), f = parseFloat(p.paddingLeft || "0"), v = w.getBoundingClientRect(), u = v.left + f;
2451
+ let R = v.right - parseFloat(p.paddingRight || "0");
2437
2452
  const C = r?.current;
2438
2453
  if (C) {
2439
- const L = C.getBoundingClientRect();
2440
- L.width > 0 && (N = Math.min(N, L.left - i));
2454
+ const N = C.getBoundingClientRect();
2455
+ N.width > 0 && (R = Math.min(R, N.left - i));
2441
2456
  }
2442
- const D = Math.max(0, N - m), O = Array.from(v.children);
2443
- if (O.length < l + 1) return;
2457
+ const I = Math.max(0, R - u), D = Array.from(x.children);
2458
+ if (D.length < l + 1) return;
2444
2459
  let T = 0;
2445
- for (let L = 0; L < l; L++)
2446
- T += O[L].offsetWidth + (L > 0 ? i : 0);
2447
- if (T <= D) {
2448
- h(l);
2460
+ for (let N = 0; N < l; N++)
2461
+ T += D[N].offsetWidth + (N > 0 ? i : 0);
2462
+ if (T <= I) {
2463
+ g(l);
2449
2464
  return;
2450
2465
  }
2451
- const P = O[l].offsetWidth;
2452
- let w = 0, I = 0;
2453
- for (let L = 0; L < l; L++) {
2454
- const R = O[L].offsetWidth, H = w + R + (L > 0 ? i : 0);
2455
- if (H + P + i > D) break;
2456
- w = H, I++;
2466
+ const E = D[l].offsetWidth;
2467
+ let L = 0, P = 0;
2468
+ for (let N = 0; N < l; N++) {
2469
+ const k = D[N].offsetWidth, B = L + k + (N > 0 ? i : 0);
2470
+ if (B + E + i > I) break;
2471
+ L = B, P++;
2457
2472
  }
2458
- h(Math.max(1, I));
2459
- }, g = new ResizeObserver(u);
2460
- return g.observe(x), r?.current && g.observe(r.current), u(), () => g.disconnect();
2473
+ g(Math.max(1, P));
2474
+ }, b = new ResizeObserver(m);
2475
+ return b.observe(w), r?.current && b.observe(r.current), m(), () => b.disconnect();
2461
2476
  }, [t, l, ...a]), c;
2462
2477
  }
2463
- const Dl = (n) => {
2478
+ const zl = (n) => {
2464
2479
  const {
2465
2480
  className: t,
2466
2481
  label: o,
@@ -2470,138 +2485,143 @@ const Dl = (n) => {
2470
2485
  onSearch: a,
2471
2486
  value: i,
2472
2487
  placeholder: c,
2473
- maxHeight: h = 300,
2474
- error: x,
2475
- size: v = "md",
2476
- singleLine: u = !1,
2477
- color: g = "blue"
2478
- } = n, [p, b] = B(!1), [k, m] = B(r), [N, C] = B(""), [D, O] = B(null), T = y.useRef(null), P = y.useRef(null), w = y.useRef([]), I = y.useRef(null), L = y.useRef(null), R = oe(
2479
- () => i.map((S) => r.find((U) => W(U) && U.value === S)).filter((S) => S !== void 0),
2488
+ maxHeight: g = 300,
2489
+ error: w,
2490
+ size: x = "md",
2491
+ singleLine: m = !1,
2492
+ color: b = "blue",
2493
+ disabled: p = !1,
2494
+ clearable: f = !0
2495
+ } = n, [v, u] = A(!1), [R, C] = A(r), [I, D] = A(""), [T, E] = A(null), L = y.useRef(null), P = y.useRef(null), N = y.useRef([]), k = y.useRef(null), B = y.useRef(null), O = se(
2496
+ () => i.map((S) => r.find((W) => H(W) && W.value === S)).filter((S) => S !== void 0),
2480
2497
  [i, r]
2481
- ), H = (S) => {
2498
+ ), _ = (S) => {
2482
2499
  if (S === "") return r;
2483
- const U = S.toLowerCase();
2484
- return r.filter((Ne) => W(Ne) && typeof Ne.label == "string" ? Ne.label.toLowerCase().includes(U) : !0);
2485
- }, M = oe(
2486
- () => N !== "" ? k : r,
2487
- [N, k, r]
2488
- ), $ = oe(
2489
- () => M.map((S, U) => !W(S) || S.disabled ? U : -1).filter((S) => S !== -1),
2490
- [M]
2500
+ const W = S.toLowerCase();
2501
+ return r.filter((ye) => H(ye) && typeof ye.label == "string" ? ye.label.toLowerCase().includes(W) : !0);
2502
+ }, X = se(
2503
+ () => I !== "" ? R : r,
2504
+ [I, R, r]
2505
+ ), re = se(
2506
+ () => X.map((S, W) => !H(S) || S.disabled ? W : -1).filter((S) => S !== -1),
2507
+ [X]
2491
2508
  );
2492
- ge(p, () => b(!1)), _(() => {
2493
- m((a ?? H)(N));
2494
- }, [N, r, a]), _(() => {
2495
- if (p) {
2509
+ be(v, () => u(!1)), $(() => {
2510
+ C((a ?? _)(I));
2511
+ }, [I, r, a]), $(() => {
2512
+ if (v) {
2496
2513
  setTimeout(() => P.current?.focus(), 100);
2497
- const S = r.findIndex((U) => W(U) && !U.disabled);
2498
- O(S >= 0 ? S : null);
2514
+ const S = r.findIndex((W) => H(W) && !W.disabled);
2515
+ E(S >= 0 ? S : null);
2499
2516
  } else
2500
- O(null), C("");
2501
- }, [p]), _(() => {
2502
- if (!p) return;
2503
- const S = M.findIndex((U) => W(U) && !U.disabled);
2504
- O(S >= 0 ? S : null);
2505
- }, [N, p, M]);
2506
- const ne = Pr({
2507
- enabled: u,
2508
- triggerRef: T,
2509
- measureRef: I,
2510
- trayRef: L,
2511
- itemCount: R.length,
2512
- deps: [R, x]
2513
- }), { anchorRef: z, Popover: A, getReferenceProps: re, getItemProps: q } = We({
2517
+ E(null), D("");
2518
+ }, [v]), $(() => {
2519
+ if (!v) return;
2520
+ const S = X.findIndex((W) => H(W) && !W.disabled);
2521
+ E(S >= 0 ? S : null);
2522
+ }, [I, v, X]);
2523
+ const xe = Mr({
2524
+ enabled: m,
2525
+ triggerRef: L,
2526
+ measureRef: k,
2527
+ trayRef: B,
2528
+ itemCount: O.length,
2529
+ deps: [O, w]
2530
+ }), { anchorRef: z, Popover: U, getReferenceProps: le, getItemProps: Z } = _e({
2514
2531
  placement: "bottom",
2515
2532
  fullWidth: !0,
2516
- onOutsideClick: () => b(!1),
2517
- open: p,
2518
- onOpenChange: b,
2519
- listRef: w,
2520
- activeIndex: D,
2521
- onNavigate: O,
2522
- disabledIndices: $
2523
- }), Re = (S) => {
2524
- i.includes(S) ? l(i.filter((U) => U !== S)) : l([...i, S]);
2525
- }, Se = (S) => {
2526
- const U = M[S];
2527
- U && W(U) && !U.disabled && Re(U.value);
2528
- }, E = M.some((S) => W(S)), F = i.length > 0, le = u ? ne : R.length, me = R.slice(0, le), at = R.length - le;
2529
- return /* @__PURE__ */ e(J.Provider, { value: v, children: /* @__PURE__ */ d(
2533
+ onOutsideClick: () => u(!1),
2534
+ open: v,
2535
+ onOpenChange: u,
2536
+ listRef: N,
2537
+ activeIndex: T,
2538
+ onNavigate: E,
2539
+ disabledIndices: re
2540
+ }), De = (S) => {
2541
+ i.includes(S) ? l(i.filter((W) => W !== S)) : l([...i, S]);
2542
+ }, Oe = (S) => {
2543
+ const W = X[S];
2544
+ W && H(W) && !W.disabled && De(W.value);
2545
+ }, M = X.some((S) => H(S)), F = i.length > 0, oe = m ? xe : O.length, me = O.slice(0, oe), ct = O.length - oe;
2546
+ return /* @__PURE__ */ e(Q.Provider, { value: x, children: /* @__PURE__ */ d(
2530
2547
  "div",
2531
2548
  {
2532
- className: f(
2549
+ className: h(
2533
2550
  "flex flex-col",
2534
2551
  t
2535
2552
  ),
2536
2553
  children: [
2537
- /* @__PURE__ */ e(Y, { children: o }),
2554
+ /* @__PURE__ */ e(J, { children: o }),
2538
2555
  /* @__PURE__ */ d("div", { className: "relative flex w-full flex-col", ref: z, children: [
2539
2556
  /* @__PURE__ */ d(
2540
2557
  "div",
2541
2558
  {
2542
- ...re({
2543
- ref: T,
2559
+ ...le({
2560
+ ref: L,
2544
2561
  role: "button",
2545
- tabIndex: 0,
2546
- onClick: () => b(!p),
2562
+ tabIndex: p ? -1 : 0,
2563
+ "aria-disabled": p,
2564
+ onClick: () => {
2565
+ p || u(!v);
2566
+ },
2547
2567
  onKeyDown: (S) => {
2548
- S.key === " " ? (S.preventDefault(), b((U) => !U)) : S.key === "Enter" && !p ? (S.preventDefault(), b(!0)) : S.key === "Backspace" && !p && F && (S.preventDefault(), l(i.slice(0, -1)));
2568
+ p || (S.key === " " ? (S.preventDefault(), u((W) => !W)) : S.key === "Enter" && !v ? (S.preventDefault(), u(!0)) : S.key === "Backspace" && !v && F && (S.preventDefault(), l(i.slice(0, -1))));
2549
2569
  }
2550
2570
  }),
2551
- className: f(
2571
+ className: h(
2552
2572
  "flex flex-row items-center gap-1 border select-trigger transition-all duration-150 rounded-xl shadow-sm ring-0 focus:ring-4 focus:outline-none select-none",
2553
- u && f("flex-nowrap overflow-hidden", ee[v]),
2554
- !u && f("flex-wrap py-1.5", Dt[v]),
2555
- G[v],
2556
- ce[v],
2557
- F ? Ee[v] : de[v],
2558
- x && "select-trigger-error",
2559
- p && "ring-4"
2573
+ m && h("flex-nowrap overflow-hidden", te[x]),
2574
+ !m && h("flex-wrap py-1.5", zt[x]),
2575
+ Y[x],
2576
+ de[x],
2577
+ f && F ? Fe[x] : ue[x],
2578
+ p ? "select-trigger-disabled" : w && "select-trigger-error",
2579
+ !p && v && "ring-4"
2560
2580
  ),
2561
2581
  children: [
2562
2582
  F && me.map((S) => /* @__PURE__ */ e(
2563
- Te,
2583
+ Pe,
2564
2584
  {
2565
- color: g,
2566
- className: f(
2567
- u && le > 1 && "shrink-0",
2568
- (!u || le === 1) && "max-w-full min-w-0"
2585
+ color: b,
2586
+ className: h(
2587
+ m && oe > 1 && "shrink-0",
2588
+ (!m || oe === 1) && "max-w-full min-w-0"
2569
2589
  ),
2570
2590
  children: S.label
2571
2591
  },
2572
2592
  String(S.value)
2573
2593
  )),
2574
- F && at > 0 && /* @__PURE__ */ d("span", { className: "shrink-0 text-sm font-medium select-placeholder px-1", children: [
2594
+ F && ct > 0 && /* @__PURE__ */ d("span", { className: "shrink-0 text-sm font-medium select-placeholder px-1", children: [
2575
2595
  "+",
2576
- at,
2596
+ ct,
2577
2597
  " more"
2578
2598
  ] }),
2579
2599
  !F && c && /* @__PURE__ */ e("span", { className: "select-placeholder", children: c })
2580
2600
  ]
2581
2601
  }
2582
2602
  ),
2583
- u && /* @__PURE__ */ d(
2603
+ m && /* @__PURE__ */ d(
2584
2604
  "div",
2585
2605
  {
2586
- ref: I,
2606
+ ref: k,
2587
2607
  "aria-hidden": !0,
2588
2608
  className: "absolute top-0 left-0 invisible pointer-events-none flex flex-row flex-nowrap items-center gap-1 w-max",
2589
2609
  children: [
2590
- R.map((S) => /* @__PURE__ */ e(Te, { color: g, children: S.label }, String(S.value))),
2591
- R.length > 0 && /* @__PURE__ */ d("span", { className: "text-sm font-medium px-1", children: [
2610
+ O.map((S) => /* @__PURE__ */ e(Pe, { color: b, children: S.label }, String(S.value))),
2611
+ O.length > 0 && /* @__PURE__ */ d("span", { className: "text-sm font-medium px-1", children: [
2592
2612
  "+",
2593
- R.length,
2613
+ O.length,
2594
2614
  " more"
2595
2615
  ] })
2596
2616
  ]
2597
2617
  }
2598
2618
  ),
2599
- /* @__PURE__ */ d(ue, { ref: L, children: [
2600
- x && /* @__PURE__ */ e(te, {}),
2601
- F && /* @__PURE__ */ e(Q, { Icon: ae, onClick: () => l([]) }),
2602
- /* @__PURE__ */ e(Q, { Icon: he })
2619
+ /* @__PURE__ */ d(fe, { ref: B, children: [
2620
+ !p && w && /* @__PURE__ */ e(ne, {}),
2621
+ f && F && !p && /* @__PURE__ */ e(q, { Icon: ie, onClick: () => l([]) }),
2622
+ /* @__PURE__ */ e(q, { Icon: pe })
2603
2623
  ] }),
2604
- /* @__PURE__ */ e(A, { open: p, children: /* @__PURE__ */ d(pe, { className: "gap-0 !p-0", style: { maxHeight: h }, children: [
2624
+ /* @__PURE__ */ e(U, { open: v, children: /* @__PURE__ */ d(ge, { className: "gap-0 !p-0", style: { maxHeight: g }, children: [
2605
2625
  /* @__PURE__ */ d("div", { className: "sticky top-0 border-b select-search-bar py-1 backdrop-blur-sm", children: [
2606
2626
  /* @__PURE__ */ e(
2607
2627
  "input",
@@ -2609,50 +2629,50 @@ const Dl = (n) => {
2609
2629
  ref: P,
2610
2630
  type: "text",
2611
2631
  placeholder: "Search",
2612
- value: N,
2632
+ value: I,
2613
2633
  className: "appearance-none border-none w-full bg-transparent rounded- pl-10 transition-all duration-150 focus:outline-none ring-0 placeholder:text-[var(--color-input-placeholder)]",
2614
- onChange: (S) => C(S.target.value),
2634
+ onChange: (S) => D(S.target.value),
2615
2635
  onKeyDown: (S) => {
2616
- S.key === "Enter" && D != null ? (S.preventDefault(), Se(D)) : S.key === "Backspace" && N === "" && F && (S.preventDefault(), l(i.slice(0, -1)));
2636
+ S.key === "Enter" && T != null ? (S.preventDefault(), Oe(T)) : S.key === "Backspace" && I === "" && F && (S.preventDefault(), l(i.slice(0, -1)));
2617
2637
  }
2618
2638
  }
2619
2639
  ),
2620
- /* @__PURE__ */ e(Le, { className: "absolute select-search-icon left-4 top-4 h-4 w-4" })
2640
+ /* @__PURE__ */ e(Ee, { className: "absolute select-search-icon left-4 top-4 h-4 w-4" })
2621
2641
  ] }),
2622
2642
  /* @__PURE__ */ d("div", { className: "flex flex-col gap-1 p-2", children: [
2623
- N !== "" && !E && /* @__PURE__ */ e("div", { className: "flex flex-col items-center justify-center py-6", children: /* @__PURE__ */ e(Ze, { className: "h-6 w-6 text-[var(--color-input-text)]" }) }),
2624
- M.map((S, U) => {
2625
- if (!W(S))
2643
+ I !== "" && !M && /* @__PURE__ */ e("div", { className: "flex flex-col items-center justify-center py-6", children: /* @__PURE__ */ e(tt, { className: "h-6 w-6 text-[var(--color-input-text)]" }) }),
2644
+ X.map((S, W) => {
2645
+ if (!H(S))
2626
2646
  return S.kind === "header" ? /* @__PURE__ */ e(
2627
- Ae,
2647
+ We,
2628
2648
  {
2629
- ref: (ke) => {
2630
- w.current[U] = ke;
2649
+ ref: (Ce) => {
2650
+ N.current[W] = Ce;
2631
2651
  },
2632
2652
  children: S.label
2633
2653
  },
2634
- `header-${U}`
2654
+ `header-${W}`
2635
2655
  ) : /* @__PURE__ */ e(
2636
- Ue,
2656
+ He,
2637
2657
  {
2638
- ref: (ke) => {
2639
- w.current[U] = ke;
2658
+ ref: (Ce) => {
2659
+ N.current[W] = Ce;
2640
2660
  }
2641
2661
  },
2642
- `divider-${U}`
2662
+ `divider-${W}`
2643
2663
  );
2644
- const Ne = i.includes(S.value);
2664
+ const ye = i.includes(S.value);
2645
2665
  return /* @__PURE__ */ e(
2646
- Be,
2666
+ Ue,
2647
2667
  {
2648
- ...q({
2649
- ref(ke) {
2650
- w.current[U] = ke;
2668
+ ...Z({
2669
+ ref(Ce) {
2670
+ N.current[W] = Ce;
2651
2671
  }
2652
2672
  }),
2653
- onClick: () => Se(U),
2654
- selected: Ne,
2655
- active: D === U,
2673
+ onClick: () => Oe(W),
2674
+ selected: ye,
2675
+ active: T === W,
2656
2676
  disabled: S.disabled,
2657
2677
  children: S.label
2658
2678
  },
@@ -2662,12 +2682,12 @@ const Dl = (n) => {
2662
2682
  ] })
2663
2683
  ] }) })
2664
2684
  ] }),
2665
- /* @__PURE__ */ e(j, { children: s }),
2666
- /* @__PURE__ */ e(V, { children: x })
2685
+ /* @__PURE__ */ e(V, { children: s }),
2686
+ /* @__PURE__ */ e(K, { children: w })
2667
2687
  ]
2668
2688
  }
2669
2689
  ) });
2670
- }, Ol = y.forwardRef((n, t) => {
2690
+ }, Tl = y.forwardRef((n, t) => {
2671
2691
  const {
2672
2692
  className: o,
2673
2693
  children: s,
@@ -2677,7 +2697,7 @@ const Dl = (n) => {
2677
2697
  "div",
2678
2698
  {
2679
2699
  ref: t,
2680
- className: f(
2700
+ className: h(
2681
2701
  "flex flex-col gap-6 border panel-base rounded-2xl shadow-sm px-6 py-6",
2682
2702
  o
2683
2703
  ),
@@ -2685,7 +2705,7 @@ const Dl = (n) => {
2685
2705
  children: s
2686
2706
  }
2687
2707
  );
2688
- }), zl = y.forwardRef((n, t) => {
2708
+ }), Ll = y.forwardRef((n, t) => {
2689
2709
  const {
2690
2710
  className: o,
2691
2711
  children: s,
@@ -2695,7 +2715,7 @@ const Dl = (n) => {
2695
2715
  "div",
2696
2716
  {
2697
2717
  ref: t,
2698
- className: f(
2718
+ className: h(
2699
2719
  "flex flex-col gap-1 border panel-base rounded-2xl shadow-sm p-2",
2700
2720
  o
2701
2721
  ),
@@ -2703,7 +2723,7 @@ const Dl = (n) => {
2703
2723
  children: s
2704
2724
  }
2705
2725
  );
2706
- }), vt = "input-description text-sm font-medium", Tl = (n) => {
2726
+ }), wt = "input-description text-sm font-medium", Pl = (n) => {
2707
2727
  const {
2708
2728
  className: t,
2709
2729
  label: o,
@@ -2714,65 +2734,65 @@ const Dl = (n) => {
2714
2734
  return r === "horizontal" ? /* @__PURE__ */ d(
2715
2735
  "div",
2716
2736
  {
2717
- className: f(
2737
+ className: h(
2718
2738
  "flex flex-row items-center gap-3 px-3 py-2",
2719
2739
  t
2720
2740
  ),
2721
2741
  ...l,
2722
2742
  children: [
2723
- /* @__PURE__ */ e("div", { className: f(vt, "w-1/2 line-clamp-1 break-all"), children: o }),
2743
+ /* @__PURE__ */ e("div", { className: h(wt, "w-1/2 line-clamp-1 break-all"), children: o }),
2724
2744
  /* @__PURE__ */ e("div", { className: "w-1/2 line-clamp-1 break-all", children: s })
2725
2745
  ]
2726
2746
  }
2727
2747
  ) : /* @__PURE__ */ d(
2728
2748
  "div",
2729
2749
  {
2730
- className: f(
2750
+ className: h(
2731
2751
  "flex flex-col gap-1 px-3 py-2",
2732
2752
  t
2733
2753
  ),
2734
2754
  ...l,
2735
2755
  children: [
2736
- o && /* @__PURE__ */ e("div", { className: vt, children: o }),
2756
+ o && /* @__PURE__ */ e("div", { className: wt, children: o }),
2737
2757
  /* @__PURE__ */ e("div", { children: s })
2738
2758
  ]
2739
2759
  }
2740
2760
  );
2741
- }, Er = {
2742
- error: Qe,
2743
- warning: en,
2744
- success: qe,
2745
- info: Zt
2746
- }, Mr = {
2761
+ }, Fr = {
2762
+ error: Ze,
2763
+ warning: nn,
2764
+ success: et,
2765
+ info: tn
2766
+ }, Br = {
2747
2767
  error: "text-[var(--color-status-error)]",
2748
2768
  warning: "text-[var(--color-status-warning)]",
2749
2769
  success: "text-[var(--color-status-success)]",
2750
2770
  info: "text-[var(--color-status-info)]"
2751
- }, xt = "inline-flex flex-row gap-3 items-center justify-between h-10 px-3 font-semibold ring-0 dropdown-item rounded-lg cursor-pointer transition-all duration-150 select-none focus:outline-none focus:ring-0 border border-transparent bg-transparent", Ll = (n) => {
2771
+ }, Nt = "inline-flex flex-row gap-3 items-center justify-between h-10 px-3 font-semibold ring-0 dropdown-item rounded-lg cursor-pointer transition-all duration-150 select-none focus:outline-none focus:ring-0 border border-transparent bg-transparent", El = (n) => {
2752
2772
  const {
2753
2773
  className: t,
2754
2774
  children: o,
2755
2775
  Icon: s,
2756
2776
  status: r,
2757
2777
  ...l
2758
- } = n, a = r ? Er[r] : null, i = /* @__PURE__ */ d(Z, { children: [
2778
+ } = n, a = r ? Fr[r] : null, i = /* @__PURE__ */ d(ee, { children: [
2759
2779
  /* @__PURE__ */ d("span", { className: "inline-flex flex-row items-center gap-3 min-w-0", children: [
2760
2780
  s && /* @__PURE__ */ e(s, { className: "h-5 w-5 shrink-0" }),
2761
2781
  /* @__PURE__ */ e("span", { className: "truncate", children: o })
2762
2782
  ] }),
2763
2783
  /* @__PURE__ */ d("span", { className: "inline-flex flex-row items-center gap-2 shrink-0", children: [
2764
- a && r && /* @__PURE__ */ e(a, { className: f("h-5 w-5", Mr[r]) }),
2765
- /* @__PURE__ */ e(tn, { className: "h-5 w-5 text-[var(--color-input-icon-button-icon)]" })
2784
+ a && r && /* @__PURE__ */ e(a, { className: h("h-5 w-5", Br[r]) }),
2785
+ /* @__PURE__ */ e(rn, { className: "h-5 w-5 text-[var(--color-input-icon-button-icon)]" })
2766
2786
  ] })
2767
2787
  ] });
2768
2788
  if (l.href !== void 0) {
2769
- const { href: c, ...h } = l;
2789
+ const { href: c, ...g } = l;
2770
2790
  return /* @__PURE__ */ e(
2771
2791
  "a",
2772
2792
  {
2773
2793
  href: c,
2774
- className: f(xt, t),
2775
- ...h,
2794
+ className: h(Nt, t),
2795
+ ...g,
2776
2796
  children: i
2777
2797
  }
2778
2798
  );
@@ -2780,12 +2800,12 @@ const Dl = (n) => {
2780
2800
  return /* @__PURE__ */ e(
2781
2801
  "button",
2782
2802
  {
2783
- className: f(xt, t),
2803
+ className: h(Nt, t),
2784
2804
  ...l,
2785
2805
  children: i
2786
2806
  }
2787
2807
  );
2788
- }, Pl = (n) => {
2808
+ }, Ml = (n) => {
2789
2809
  const {
2790
2810
  className: t,
2791
2811
  vertical: o = !1,
@@ -2794,14 +2814,14 @@ const Dl = (n) => {
2794
2814
  return /* @__PURE__ */ e(
2795
2815
  "div",
2796
2816
  {
2797
- className: f(
2817
+ className: h(
2798
2818
  o ? "w-px h-full bg-[var(--color-divider)]" : "w-full h-px bg-[var(--color-divider)]",
2799
2819
  t
2800
2820
  ),
2801
2821
  ...s
2802
2822
  }
2803
2823
  );
2804
- }, El = (n) => {
2824
+ }, Fl = (n) => {
2805
2825
  const {
2806
2826
  children: t,
2807
2827
  content: o,
@@ -2809,7 +2829,7 @@ const Dl = (n) => {
2809
2829
  placement: r = "top",
2810
2830
  minWidth: l = 100,
2811
2831
  maxWidth: a = 200
2812
- } = n, [i, c] = B(!1), { anchorRef: h, Popover: x } = ot({
2832
+ } = n, [i, c] = A(!1), { anchorRef: g, Popover: w } = at({
2813
2833
  placement: r,
2814
2834
  minWidth: l,
2815
2835
  maxWidth: a
@@ -2817,17 +2837,17 @@ const Dl = (n) => {
2817
2837
  return /* @__PURE__ */ d(
2818
2838
  "span",
2819
2839
  {
2820
- ref: h,
2840
+ ref: g,
2821
2841
  className: s,
2822
2842
  onMouseEnter: () => c(!0),
2823
2843
  onMouseLeave: () => c(!1),
2824
2844
  children: [
2825
2845
  t,
2826
- /* @__PURE__ */ e(x, { open: i, children: /* @__PURE__ */ e(pe, { children: o }) })
2846
+ /* @__PURE__ */ e(w, { open: i, children: /* @__PURE__ */ e(ge, { children: o }) })
2827
2847
  ]
2828
2848
  }
2829
2849
  );
2830
- }, Ml = (n) => {
2850
+ }, Bl = (n) => {
2831
2851
  const {
2832
2852
  open: t,
2833
2853
  onDismiss: o,
@@ -2838,10 +2858,10 @@ const Dl = (n) => {
2838
2858
  children: i,
2839
2859
  maxWidth: c = 600
2840
2860
  } = n;
2841
- return ge(!!r && t, o || (() => {
2842
- })), /* @__PURE__ */ e(Ie, { children: t && /* @__PURE__ */ d(Pe, { children: [
2861
+ return be(!!r && t, o || (() => {
2862
+ })), /* @__PURE__ */ e(Se, { children: t && /* @__PURE__ */ d(Me, { children: [
2843
2863
  /* @__PURE__ */ e(
2844
- K.div,
2864
+ G.div,
2845
2865
  {
2846
2866
  className: "z-40",
2847
2867
  style: { transformOrigin: "center" },
@@ -2850,7 +2870,7 @@ const Dl = (n) => {
2850
2870
  exit: { opacity: 0 },
2851
2871
  transition: { duration: 0.15, ease: "easeInOut" },
2852
2872
  children: /* @__PURE__ */ e(
2853
- et,
2873
+ nt,
2854
2874
  {
2855
2875
  className: "modal-overlay backdrop-blur-[1px]",
2856
2876
  onClick: s ? o : void 0,
@@ -2860,9 +2880,9 @@ const Dl = (n) => {
2860
2880
  }
2861
2881
  ),
2862
2882
  /* @__PURE__ */ e("div", { className: "fixed inset-0 flex flex-col items-center pointer-events-none p-4 lg:p-12 overflow-y-auto z-50", children: /* @__PURE__ */ d(
2863
- K.div,
2883
+ G.div,
2864
2884
  {
2865
- className: f(
2885
+ className: h(
2866
2886
  "flex flex-col modal-content rounded-2xl shadow-xl p-6 lg:p-12 pointer-events-auto w-full relative",
2867
2887
  a
2868
2888
  ),
@@ -2873,9 +2893,9 @@ const Dl = (n) => {
2873
2893
  transition: { duration: 0.15, ease: "easeInOut" },
2874
2894
  children: [
2875
2895
  l && /* @__PURE__ */ e(
2876
- Lt,
2896
+ Et,
2877
2897
  {
2878
- Icon: ae,
2898
+ Icon: ie,
2879
2899
  className: "absolute top-4 right-4",
2880
2900
  variant: "transparent",
2881
2901
  size: "sm",
@@ -2887,7 +2907,7 @@ const Dl = (n) => {
2887
2907
  }
2888
2908
  ) })
2889
2909
  ] }) });
2890
- }, Fl = (n) => {
2910
+ }, Al = (n) => {
2891
2911
  const {
2892
2912
  open: t,
2893
2913
  onDismiss: o,
@@ -2898,10 +2918,10 @@ const Dl = (n) => {
2898
2918
  children: i,
2899
2919
  maxWidth: c = 480
2900
2920
  } = n;
2901
- return ge(!!r && t, o || (() => {
2902
- })), /* @__PURE__ */ e(Ie, { children: t && /* @__PURE__ */ d(Pe, { children: [
2921
+ return be(!!r && t, o || (() => {
2922
+ })), /* @__PURE__ */ e(Se, { children: t && /* @__PURE__ */ d(Me, { children: [
2903
2923
  /* @__PURE__ */ e(
2904
- K.div,
2924
+ G.div,
2905
2925
  {
2906
2926
  className: "z-40",
2907
2927
  style: { transformOrigin: "center" },
@@ -2910,7 +2930,7 @@ const Dl = (n) => {
2910
2930
  exit: { opacity: 0 },
2911
2931
  transition: { duration: 0.15, ease: "easeInOut" },
2912
2932
  children: /* @__PURE__ */ e(
2913
- et,
2933
+ nt,
2914
2934
  {
2915
2935
  className: "modal-overlay backdrop-blur-[1px]",
2916
2936
  onClick: s ? o : void 0,
@@ -2920,9 +2940,9 @@ const Dl = (n) => {
2920
2940
  }
2921
2941
  ),
2922
2942
  /* @__PURE__ */ e("div", { className: "fixed inset-0 flex flex-row justify-end pointer-events-none z-50", children: /* @__PURE__ */ d(
2923
- K.div,
2943
+ G.div,
2924
2944
  {
2925
- className: f(
2945
+ className: h(
2926
2946
  "flex flex-col modal-content shadow-xl p-6 lg:p-12 pointer-events-auto h-full w-full overflow-y-auto relative",
2927
2947
  a
2928
2948
  ),
@@ -2933,9 +2953,9 @@ const Dl = (n) => {
2933
2953
  transition: { duration: 0.25, ease: [0.32, 0.72, 0, 1] },
2934
2954
  children: [
2935
2955
  l && /* @__PURE__ */ e(
2936
- Lt,
2956
+ Et,
2937
2957
  {
2938
- Icon: ae,
2958
+ Icon: ie,
2939
2959
  className: "absolute top-4 right-4",
2940
2960
  variant: "transparent",
2941
2961
  size: "sm",
@@ -2947,16 +2967,16 @@ const Dl = (n) => {
2947
2967
  }
2948
2968
  ) })
2949
2969
  ] }) });
2950
- }, Fr = (n) => {
2970
+ }, Ar = (n) => {
2951
2971
  const {
2952
2972
  className: t,
2953
2973
  tabs: o
2954
2974
  } = n;
2955
- return /* @__PURE__ */ e("div", { className: f(
2975
+ return /* @__PURE__ */ e("div", { className: h(
2956
2976
  "h-12 tab-container p-1 rounded-xl inline-flex flex-row space-x-1 overflow-x-auto mat-ui-hide-scrollbars",
2957
2977
  t
2958
2978
  ), children: o.map((s, r) => {
2959
- const l = f(
2979
+ const l = h(
2960
2980
  "shrink-0 px-4 h-full inline-flex flex-row items-center font-semibold rounded-xl cursor-pointer border border-transparent ing-0 tab-button transition-all duration-150 select-none focus:outline-none focus:ring-0",
2961
2981
  s.active && "tab-button-active shadow-sm"
2962
2982
  );
@@ -2984,7 +3004,7 @@ const Dl = (n) => {
2984
3004
  r
2985
3005
  );
2986
3006
  }) });
2987
- }, Bl = (n) => {
3007
+ }, Ul = (n) => {
2988
3008
  const {
2989
3009
  duration: t = 0.3,
2990
3010
  ease: o = "easeInOut",
@@ -2992,35 +3012,35 @@ const Dl = (n) => {
2992
3012
  children: r,
2993
3013
  className: l,
2994
3014
  ...a
2995
- } = n, i = y.useRef(null), c = y.useRef(null), h = y.useRef(null);
3015
+ } = n, i = y.useRef(null), c = y.useRef(null), g = y.useRef(null);
2996
3016
  return y.useEffect(() => {
2997
- const x = i.current, v = c.current;
2998
- if (!x || !v) return;
2999
- let u = !0;
3000
- const g = () => {
3001
- const b = s ? x.scrollWidth - x.clientWidth : x.scrollHeight - x.clientHeight, k = s ? x.scrollLeft : x.scrollTop;
3002
- if (!(b <= 0 || Math.abs(b - k) < 1)) {
3003
- if (u) {
3004
- u = !1, s ? x.scrollLeft = b : x.scrollTop = b;
3017
+ const w = i.current, x = c.current;
3018
+ if (!w || !x) return;
3019
+ let m = !0;
3020
+ const b = () => {
3021
+ const f = s ? w.scrollWidth - w.clientWidth : w.scrollHeight - w.clientHeight, v = s ? w.scrollLeft : w.scrollTop;
3022
+ if (!(f <= 0 || Math.abs(f - v) < 1)) {
3023
+ if (m) {
3024
+ m = !1, s ? w.scrollLeft = f : w.scrollTop = f;
3005
3025
  return;
3006
3026
  }
3007
- h.current?.stop(), h.current = Wt(k, b, {
3027
+ g.current?.stop(), g.current = _t(v, f, {
3008
3028
  duration: t,
3009
3029
  ease: o,
3010
- onUpdate: (m) => {
3011
- s ? x.scrollLeft = m : x.scrollTop = m;
3030
+ onUpdate: (u) => {
3031
+ s ? w.scrollLeft = u : w.scrollTop = u;
3012
3032
  }
3013
3033
  });
3014
3034
  }
3015
- }, p = new ResizeObserver(g);
3016
- return p.observe(v), () => {
3017
- p.disconnect(), h.current?.stop();
3035
+ }, p = new ResizeObserver(b);
3036
+ return p.observe(x), () => {
3037
+ p.disconnect(), g.current?.stop();
3018
3038
  };
3019
3039
  }, [t, o, s]), /* @__PURE__ */ e(
3020
3040
  "div",
3021
3041
  {
3022
3042
  ref: i,
3023
- className: f(
3043
+ className: h(
3024
3044
  "min-h-0 min-w-0",
3025
3045
  s ? "overflow-x-auto" : "overflow-y-auto",
3026
3046
  l
@@ -3030,7 +3050,7 @@ const Dl = (n) => {
3030
3050
  }
3031
3051
  );
3032
3052
  };
3033
- function Br(n) {
3053
+ function Ur(n) {
3034
3054
  const {
3035
3055
  onDelta: t,
3036
3056
  onDragStart: o,
@@ -3038,67 +3058,67 @@ function Br(n) {
3038
3058
  disabled: r = !1,
3039
3059
  primaryButtonOnly: l = !0,
3040
3060
  preventScrollOnMove: a = !0
3041
- } = n, [i, c] = y.useState(!1), h = y.useRef(!1), x = y.useRef(0), v = y.useRef(0), u = y.useRef(0), g = y.useRef(null), p = y.useRef(null), b = y.useRef({ onDelta: t, onDragStart: o, onDragEnd: s, preventScrollOnMove: a });
3061
+ } = n, [i, c] = y.useState(!1), g = y.useRef(!1), w = y.useRef(0), x = y.useRef(0), m = y.useRef(0), b = y.useRef(null), p = y.useRef(null), f = y.useRef({ onDelta: t, onDragStart: o, onDragEnd: s, preventScrollOnMove: a });
3042
3062
  y.useEffect(() => {
3043
- b.current = { onDelta: t, onDragStart: o, onDragEnd: s, preventScrollOnMove: a };
3063
+ f.current = { onDelta: t, onDragStart: o, onDragEnd: s, preventScrollOnMove: a };
3044
3064
  });
3045
- const k = y.useRef({}), m = y.useCallback((C) => {
3046
- if (!h.current) return;
3047
- const D = {
3048
- clientX: C ?? v.current,
3049
- startX: x.current,
3050
- totalDeltaX: u.current,
3051
- target: g.current
3065
+ const v = y.useRef({}), u = y.useCallback((C) => {
3066
+ if (!g.current) return;
3067
+ const I = {
3068
+ clientX: C ?? x.current,
3069
+ startX: w.current,
3070
+ totalDeltaX: m.current,
3071
+ target: b.current
3052
3072
  };
3053
- h.current = !1, c(!1);
3054
- const { move: O, up: T, keydown: P } = k.current;
3055
- O && window.removeEventListener("pointermove", O, !0), T && (window.removeEventListener("pointerup", T, !0), window.removeEventListener("pointercancel", T, !0)), P && window.removeEventListener("keydown", P, !0), k.current = {}, p.current != null && (cancelAnimationFrame(p.current), p.current = null), b.current.onDragEnd?.(D), g.current = null, u.current = 0;
3056
- }, []), N = y.useCallback((C) => {
3073
+ g.current = !1, c(!1);
3074
+ const { move: D, up: T, keydown: E } = v.current;
3075
+ D && window.removeEventListener("pointermove", D, !0), T && (window.removeEventListener("pointerup", T, !0), window.removeEventListener("pointercancel", T, !0)), E && window.removeEventListener("keydown", E, !0), v.current = {}, p.current != null && (cancelAnimationFrame(p.current), p.current = null), f.current.onDragEnd?.(I), b.current = null, m.current = 0;
3076
+ }, []), R = y.useCallback((C) => {
3057
3077
  if (r || l && C.button !== 0) return;
3058
- C.target.setPointerCapture?.(C.pointerId), x.current = C.clientX, v.current = C.clientX, u.current = 0, g.current = C.target, h.current = !0, c(!0);
3059
- const D = {
3078
+ C.target.setPointerCapture?.(C.pointerId), w.current = C.clientX, x.current = C.clientX, m.current = 0, b.current = C.target, g.current = !0, c(!0);
3079
+ const I = {
3060
3080
  clientX: C.clientX,
3061
3081
  startX: C.clientX,
3062
3082
  totalDeltaX: 0,
3063
3083
  target: C.target
3064
3084
  };
3065
- b.current.onDragStart?.(D);
3066
- const O = (w) => {
3067
- h.current && p.current == null && (p.current = requestAnimationFrame(() => {
3085
+ f.current.onDragStart?.(I);
3086
+ const D = (L) => {
3087
+ g.current && p.current == null && (p.current = requestAnimationFrame(() => {
3068
3088
  p.current = null;
3069
- const I = w.clientX, L = I - v.current;
3070
- if (L === 0) return;
3071
- v.current = I, u.current += L;
3072
- const R = {
3073
- clientX: I,
3074
- startX: x.current,
3075
- totalDeltaX: u.current,
3076
- target: g.current
3089
+ const P = L.clientX, N = P - x.current;
3090
+ if (N === 0) return;
3091
+ x.current = P, m.current += N;
3092
+ const k = {
3093
+ clientX: P,
3094
+ startX: w.current,
3095
+ totalDeltaX: m.current,
3096
+ target: b.current
3077
3097
  };
3078
- b.current.preventScrollOnMove && w.preventDefault(), b.current.onDelta(L, R);
3098
+ f.current.preventScrollOnMove && L.preventDefault(), f.current.onDelta(N, k);
3079
3099
  }));
3080
- }, T = (w) => {
3081
- m(w.clientX);
3082
- }, P = (w) => {
3083
- w.key === "Escape" && (w.preventDefault(), m());
3100
+ }, T = (L) => {
3101
+ u(L.clientX);
3102
+ }, E = (L) => {
3103
+ L.key === "Escape" && (L.preventDefault(), u());
3084
3104
  };
3085
- k.current = { move: O, up: T, keydown: P }, window.addEventListener("pointermove", O, {
3105
+ v.current = { move: D, up: T, keydown: E }, window.addEventListener("pointermove", D, {
3086
3106
  passive: !a,
3087
3107
  capture: !0
3088
- }), window.addEventListener("pointerup", T, { capture: !0 }), window.addEventListener("pointercancel", T, { capture: !0 }), window.addEventListener("keydown", P, !0);
3089
- }, [m, r, a, l]);
3108
+ }), window.addEventListener("pointerup", T, { capture: !0 }), window.addEventListener("pointercancel", T, { capture: !0 }), window.addEventListener("keydown", E, !0);
3109
+ }, [u, r, a, l]);
3090
3110
  return y.useEffect(() => () => {
3091
- h.current && m();
3092
- }, [m]), {
3111
+ g.current && u();
3112
+ }, [u]), {
3093
3113
  isDragging: i,
3094
3114
  bind: {
3095
- onPointerDown: N,
3115
+ onPointerDown: R,
3096
3116
  role: "separator",
3097
3117
  style: { touchAction: "none", cursor: "col-resize", userSelect: "none" }
3098
3118
  }
3099
3119
  };
3100
3120
  }
3101
- const Ar = (n) => {
3121
+ const Wr = (n) => {
3102
3122
  const {
3103
3123
  column: t,
3104
3124
  width: o,
@@ -3106,8 +3126,8 @@ const Ar = (n) => {
3106
3126
  onResize: r,
3107
3127
  sortDirection: l,
3108
3128
  onSortClick: a
3109
- } = n, i = !!t.sortable, { bind: c } = Br({
3110
- onDelta: (h) => r(h)
3129
+ } = n, i = !!t.sortable, { bind: c } = Ur({
3130
+ onDelta: (g) => r(g)
3111
3131
  });
3112
3132
  return /* @__PURE__ */ d(
3113
3133
  "div",
@@ -3118,15 +3138,15 @@ const Ar = (n) => {
3118
3138
  /* @__PURE__ */ d(
3119
3139
  "div",
3120
3140
  {
3121
- className: f(
3141
+ className: h(
3122
3142
  "flex-1 min-w-0 px-4 table-header-cell transition-colors duration-100 flex flex-row items-center gap-2",
3123
3143
  i && "cursor-pointer"
3124
3144
  ),
3125
3145
  onClick: i ? a : void 0,
3126
3146
  children: [
3127
3147
  /* @__PURE__ */ e("span", { className: "truncate", children: t.header }),
3128
- i && l === "asc" && /* @__PURE__ */ e(nn, { className: "h-4 w-4 shrink-0" }),
3129
- i && l === "desc" && /* @__PURE__ */ e(he, { className: "h-4 w-4 shrink-0" })
3148
+ i && l === "asc" && /* @__PURE__ */ e(ln, { className: "h-4 w-4 shrink-0" }),
3149
+ i && l === "desc" && /* @__PURE__ */ e(pe, { className: "h-4 w-4 shrink-0" })
3130
3150
  ]
3131
3151
  }
3132
3152
  ),
@@ -3146,12 +3166,12 @@ const Ar = (n) => {
3146
3166
  ]
3147
3167
  }
3148
3168
  );
3149
- }, xe = 200, Ur = 60, Wr = (n) => {
3169
+ }, Ne = 200, Hr = 60, _r = (n) => {
3150
3170
  const t = {};
3151
3171
  for (const o of n)
3152
- t[o.id] = o.defaultWidth ?? xe;
3172
+ t[o.id] = o.defaultWidth ?? Ne;
3153
3173
  return t;
3154
- }, Hr = (n) => {
3174
+ }, $r = (n) => {
3155
3175
  const {
3156
3176
  columns: t,
3157
3177
  rows: o,
@@ -3161,63 +3181,63 @@ const Ar = (n) => {
3161
3181
  onSortChange: a,
3162
3182
  className: i,
3163
3183
  rowHeight: c = 44,
3164
- headerHeight: h = 44
3165
- } = n, [x, v] = B(() => Wr(t));
3166
- _(() => {
3167
- v((m) => {
3168
- const N = {};
3169
- let C = Object.keys(m).length !== t.length;
3170
- for (const D of t)
3171
- D.id in m ? N[D.id] = m[D.id] : (N[D.id] = D.defaultWidth ?? xe, C = !0);
3172
- return C ? N : m;
3184
+ headerHeight: g = 44
3185
+ } = n, [w, x] = A(() => _r(t));
3186
+ $(() => {
3187
+ x((u) => {
3188
+ const R = {};
3189
+ let C = Object.keys(u).length !== t.length;
3190
+ for (const I of t)
3191
+ I.id in u ? R[I.id] = u[I.id] : (R[I.id] = I.defaultWidth ?? Ne, C = !0);
3192
+ return C ? R : u;
3173
3193
  });
3174
3194
  }, [t]);
3175
- const u = Oe((m, N, C) => {
3176
- v((D) => {
3177
- const O = D[m] ?? xe, T = Math.max(C, O + N);
3178
- return T === O ? D : { ...D, [m]: T };
3195
+ const m = Te((u, R, C) => {
3196
+ x((I) => {
3197
+ const D = I[u] ?? Ne, T = Math.max(C, D + R);
3198
+ return T === D ? I : { ...I, [u]: T };
3179
3199
  });
3180
- }, []), g = Oe((m) => {
3200
+ }, []), b = Te((u) => {
3181
3201
  if (a) {
3182
- if (!l || l.columnId !== m) {
3183
- a({ columnId: m, direction: "asc" });
3202
+ if (!l || l.columnId !== u) {
3203
+ a({ columnId: u, direction: "asc" });
3184
3204
  return;
3185
3205
  }
3186
3206
  if (l.direction === "asc") {
3187
- a({ columnId: m, direction: "desc" });
3207
+ a({ columnId: u, direction: "desc" });
3188
3208
  return;
3189
3209
  }
3190
3210
  a(null);
3191
3211
  }
3192
3212
  }, [l, a]), p = t.reduce(
3193
- (m, N) => m + (x[N.id] ?? N.defaultWidth ?? xe),
3213
+ (u, R) => u + (w[R.id] ?? R.defaultWidth ?? Ne),
3194
3214
  0
3195
- ), b = we(null), k = (m) => {
3196
- b.current && (b.current.scrollLeft = m.currentTarget.scrollLeft);
3215
+ ), f = ke(null), v = (u) => {
3216
+ f.current && (f.current.scrollLeft = u.currentTarget.scrollLeft);
3197
3217
  };
3198
- return /* @__PURE__ */ d("div", { className: f("flex flex-col h-full w-full", i), children: [
3218
+ return /* @__PURE__ */ d("div", { className: h("flex flex-col h-full w-full", i), children: [
3199
3219
  /* @__PURE__ */ e(
3200
3220
  "div",
3201
3221
  {
3202
- ref: b,
3222
+ ref: f,
3203
3223
  className: "overflow-hidden shrink-0 table-header-strip",
3204
- style: { height: h },
3224
+ style: { height: g },
3205
3225
  children: /* @__PURE__ */ e(
3206
3226
  "div",
3207
3227
  {
3208
3228
  className: "flex flex-row table-header font-medium",
3209
3229
  style: { width: p, minWidth: "100%" },
3210
- children: t.map((m) => /* @__PURE__ */ e(
3211
- Ar,
3230
+ children: t.map((u) => /* @__PURE__ */ e(
3231
+ Wr,
3212
3232
  {
3213
- column: m,
3214
- width: x[m.id] ?? m.defaultWidth ?? xe,
3215
- height: h,
3216
- onResize: (N) => u(m.id, N, m.minWidth ?? Ur),
3217
- sortDirection: l?.columnId === m.id ? l.direction : null,
3218
- onSortClick: () => g(m.id)
3233
+ column: u,
3234
+ width: w[u.id] ?? u.defaultWidth ?? Ne,
3235
+ height: g,
3236
+ onResize: (R) => m(u.id, R, u.minWidth ?? Hr),
3237
+ sortDirection: l?.columnId === u.id ? l.direction : null,
3238
+ onSortClick: () => b(u.id)
3219
3239
  },
3220
- m.id
3240
+ u.id
3221
3241
  ))
3222
3242
  }
3223
3243
  )
@@ -3227,47 +3247,47 @@ const Ar = (n) => {
3227
3247
  "div",
3228
3248
  {
3229
3249
  className: "flex-1 overflow-auto",
3230
- onScroll: k,
3250
+ onScroll: v,
3231
3251
  children: /* @__PURE__ */ e(
3232
3252
  "div",
3233
3253
  {
3234
3254
  className: "flex flex-col",
3235
3255
  style: { width: p, minWidth: "100%" },
3236
- children: o.map((m, N) => /* @__PURE__ */ e(
3256
+ children: o.map((u, R) => /* @__PURE__ */ e(
3237
3257
  "div",
3238
3258
  {
3239
- className: f(
3259
+ className: h(
3240
3260
  "flex flex-row table-body-row transition-colors duration-100",
3241
3261
  r && "cursor-pointer"
3242
3262
  ),
3243
- onClick: r ? () => r(m, N) : void 0,
3263
+ onClick: r ? () => r(u, R) : void 0,
3244
3264
  children: t.map((C) => /* @__PURE__ */ e(
3245
3265
  "div",
3246
3266
  {
3247
3267
  className: "shrink-0 content-center px-4 relative",
3248
3268
  style: {
3249
- width: x[C.id] ?? C.defaultWidth ?? xe,
3269
+ width: w[C.id] ?? C.defaultWidth ?? Ne,
3250
3270
  height: c
3251
3271
  },
3252
- children: /* @__PURE__ */ e("div", { className: "break-all line-clamp-1", children: C.renderCell(m, N) })
3272
+ children: /* @__PURE__ */ e("div", { className: "break-all line-clamp-1", children: C.renderCell(u, R) })
3253
3273
  },
3254
3274
  C.id
3255
3275
  ))
3256
3276
  },
3257
- s(m, N)
3277
+ s(u, R)
3258
3278
  ))
3259
3279
  }
3260
3280
  )
3261
3281
  }
3262
3282
  )
3263
3283
  ] });
3264
- }, wt = (n) => {
3284
+ }, kt = (n) => {
3265
3285
  const { label: t, children: o, className: s } = n;
3266
- return /* @__PURE__ */ d("div", { className: f("flex flex-col dropdown-button-group", s), children: [
3286
+ return /* @__PURE__ */ d("div", { className: h("flex flex-col dropdown-button-group", s), children: [
3267
3287
  t && /* @__PURE__ */ e("div", { className: "mb-2 text-sm dropdown-group-label font-semibold px-3", children: t }),
3268
3288
  o
3269
3289
  ] });
3270
- }, _r = () => /* @__PURE__ */ e("div", {}), $r = [
3290
+ }, Xr = () => /* @__PURE__ */ e("div", {}), jr = [
3271
3291
  { id: 1, email: "sarah.jennings@example.com", firstname: "Sarah", lastname: "Jennings", status: "active" },
3272
3292
  { id: 2, email: "liam.patel@outlook.com", firstname: "Liam", lastname: "Patel", status: "inactive" },
3273
3293
  { id: 3, email: "emily.wong@gmail.com", firstname: "Emily", lastname: "Wong", status: "active" },
@@ -3280,12 +3300,12 @@ const Ar = (n) => {
3280
3300
  { id: 10, email: "jackson.rivera@outlook.com", firstname: "Jackson", lastname: "Rivera", status: "active" },
3281
3301
  { id: 11, email: "ava.sanders@example.com", firstname: "Ava", lastname: "Sanders", status: "active" },
3282
3302
  { id: 12, email: "logan.bennett@company.io", firstname: "Logan", lastname: "Bennett", status: "inactive" }
3283
- ], Xr = [
3303
+ ], Vr = [
3284
3304
  { id: "id", header: "ID", renderCell: (n) => n.id },
3285
3305
  {
3286
3306
  id: "email",
3287
3307
  header: "Email",
3288
- renderCell: (n) => /* @__PURE__ */ e(Te, { Icon: ln, onClick: () => {
3308
+ renderCell: (n) => /* @__PURE__ */ e(Pe, { Icon: sn, onClick: () => {
3289
3309
  }, children: n.email })
3290
3310
  },
3291
3311
  { id: "firstname", header: "First Name", renderCell: (n) => n.firstname },
@@ -3293,39 +3313,39 @@ const Ar = (n) => {
3293
3313
  {
3294
3314
  id: "status",
3295
3315
  header: "Status",
3296
- renderCell: () => /* @__PURE__ */ e(jr, {})
3316
+ renderCell: () => /* @__PURE__ */ e(Kr, {})
3297
3317
  }
3298
- ], Al = () => /* @__PURE__ */ d("div", { className: "flex flex-col gap-6", children: [
3318
+ ], Wl = () => /* @__PURE__ */ d("div", { className: "flex flex-col gap-6", children: [
3299
3319
  /* @__PURE__ */ d("div", { className: "flex flex-row items-center justify-start gap-3", children: [
3300
- /* @__PURE__ */ e(Pt, { Icon: Le, placeholder: "Search..." }),
3301
- /* @__PURE__ */ e(Ge, { Icon: it }),
3302
- /* @__PURE__ */ e(Xn, { Icon: ct, children: "New" }),
3320
+ /* @__PURE__ */ e(Mt, { Icon: Ee, placeholder: "Search..." }),
3321
+ /* @__PURE__ */ e(Je, { Icon: dt }),
3322
+ /* @__PURE__ */ e(Vn, { Icon: ut, children: "New" }),
3303
3323
  /* @__PURE__ */ d(
3304
- Fe,
3324
+ Ae,
3305
3325
  {
3306
- trigger: /* @__PURE__ */ e(Ge, { Icon: it }),
3326
+ trigger: /* @__PURE__ */ e(Je, { Icon: dt }),
3307
3327
  children: [
3308
- /* @__PURE__ */ e(X, { dismissOnClick: !1, Icon: ct, children: "Add new" }),
3309
- /* @__PURE__ */ e(X, { Icon: rn, children: "Remove" }),
3310
- /* @__PURE__ */ d(wt, { label: "Test", className: "mt-2", children: [
3311
- /* @__PURE__ */ e(X, { children: "Item 1" }),
3312
- /* @__PURE__ */ e(X, { children: "Item 2" }),
3313
- /* @__PURE__ */ e(X, { children: "Item 3" }),
3314
- /* @__PURE__ */ e(X, { children: "Item 4" })
3328
+ /* @__PURE__ */ e(j, { dismissOnClick: !1, Icon: ut, children: "Add new" }),
3329
+ /* @__PURE__ */ e(j, { Icon: on, children: "Remove" }),
3330
+ /* @__PURE__ */ d(kt, { label: "Test", className: "mt-2", children: [
3331
+ /* @__PURE__ */ e(j, { children: "Item 1" }),
3332
+ /* @__PURE__ */ e(j, { children: "Item 2" }),
3333
+ /* @__PURE__ */ e(j, { children: "Item 3" }),
3334
+ /* @__PURE__ */ e(j, { children: "Item 4" })
3315
3335
  ] }),
3316
- /* @__PURE__ */ d(wt, { label: "Test", className: "mt-2", children: [
3317
- /* @__PURE__ */ e(X, { children: "Item 1" }),
3318
- /* @__PURE__ */ e(X, { children: "Item 2" }),
3319
- /* @__PURE__ */ e(X, { children: "Item 3" }),
3320
- /* @__PURE__ */ e(X, { children: "Item 4" })
3336
+ /* @__PURE__ */ d(kt, { label: "Test", className: "mt-2", children: [
3337
+ /* @__PURE__ */ e(j, { children: "Item 1" }),
3338
+ /* @__PURE__ */ e(j, { children: "Item 2" }),
3339
+ /* @__PURE__ */ e(j, { children: "Item 3" }),
3340
+ /* @__PURE__ */ e(j, { children: "Item 4" })
3321
3341
  ] })
3322
3342
  ]
3323
3343
  }
3324
3344
  ),
3325
- /* @__PURE__ */ e(Fr, { tabs: [
3345
+ /* @__PURE__ */ e(Ar, { tabs: [
3326
3346
  {
3327
3347
  label: "Tab 1",
3328
- Icon: Ke,
3348
+ Icon: Ye,
3329
3349
  active: !0,
3330
3350
  onClick: () => {
3331
3351
  }
@@ -3338,110 +3358,110 @@ const Ar = (n) => {
3338
3358
  },
3339
3359
  {
3340
3360
  label: "Tab 3",
3341
- Icon: Ke,
3361
+ Icon: Ye,
3342
3362
  active: !1,
3343
3363
  onClick: () => {
3344
3364
  }
3345
3365
  }
3346
3366
  ] })
3347
3367
  ] }),
3348
- /* @__PURE__ */ e(zr, { options: [
3368
+ /* @__PURE__ */ e(Lr, { options: [
3349
3369
  { label: "Option 1", value: 1 },
3350
3370
  { label: "Option 2", value: 2 },
3351
3371
  { label: "Option 3", value: 3 }
3352
3372
  ], value: null, onChange: () => {
3353
3373
  } }),
3354
3374
  /* @__PURE__ */ e(
3355
- Hr,
3375
+ $r,
3356
3376
  {
3357
3377
  className: "h-[300px] w-[300px]",
3358
- columns: Xr,
3359
- rows: $r,
3378
+ columns: Vr,
3379
+ rows: jr,
3360
3380
  getRowId: (n) => n.id
3361
3381
  }
3362
3382
  ),
3363
- /* @__PURE__ */ e(_r, {})
3364
- ] }), jr = () => /* @__PURE__ */ e(Z, { children: /* @__PURE__ */ d(
3365
- Fe,
3383
+ /* @__PURE__ */ e(Xr, {})
3384
+ ] }), Kr = () => /* @__PURE__ */ e(ee, { children: /* @__PURE__ */ d(
3385
+ Ae,
3366
3386
  {
3367
3387
  placement: "bottom-end",
3368
3388
  className: "inline-block",
3369
- trigger: /* @__PURE__ */ e(Te, { onClick: () => {
3389
+ trigger: /* @__PURE__ */ e(Pe, { onClick: () => {
3370
3390
  }, children: "Test" }),
3371
3391
  children: [
3372
- /* @__PURE__ */ e(X, { children: "Option 1" }),
3373
- /* @__PURE__ */ e(X, { children: "Option 2" }),
3374
- /* @__PURE__ */ e(X, { children: "Option 3" })
3392
+ /* @__PURE__ */ e(j, { children: "Option 1" }),
3393
+ /* @__PURE__ */ e(j, { children: "Option 2" }),
3394
+ /* @__PURE__ */ e(j, { children: "Option 3" })
3375
3395
  ]
3376
3396
  }
3377
3397
  ) });
3378
3398
  export {
3379
- Bl as AutoScroll,
3380
- Te as Badge,
3381
- Lr as BadgeColor,
3382
- Xn as Button,
3383
- Lt as ButtonIconRound,
3384
- Ge as ButtonIconSquare,
3385
- Pl as Divider,
3386
- X as DropdownButton,
3387
- wt as DropdownButtonGroup,
3388
- Fe as DropdownMenu,
3389
- pe as DropdownPanel,
3390
- Pt as Input,
3391
- wl as InputCheck,
3392
- pl as InputColor,
3393
- j as InputDescription,
3394
- V as InputError,
3395
- te as InputErrorIcon,
3396
- kl as InputFileMultiple,
3397
- Nl as InputFileSingle,
3398
- Q as InputIconButton,
3399
- ue as InputIconButtonTray,
3400
- Y as InputLabel,
3401
- Cl as InputLexical,
3402
- gl as InputPassword,
3403
- vl as InputRadio,
3404
- zr as InputSelect,
3405
- Ue as InputSelectDivider,
3406
- Ae as InputSelectGroupHeader,
3407
- Dl as InputSelectMultiple,
3408
- Il as InputSelectNative,
3409
- Be as InputSelectOption,
3410
- Rl as InputSelectSearchable,
3411
- Sl as InputSelectSearchableAsync,
3412
- bl as InputTextArea,
3413
- xl as InputToggle,
3414
- br as LEXICAL_NODES,
3415
- wr as LexicalBlockTypeSelect,
3416
- yl as LexicalDefaultToolbarContent,
3417
- Or as LexicalFloatingToolbar,
3418
- kr as LexicalFormatButtons,
3419
- Ir as LexicalHistoryButtons,
3420
- Cr as LexicalLinkButton,
3421
- yr as LexicalListButtons,
3422
- Dr as LexicalToolbar,
3423
- se as LexicalToolbarButton,
3424
- Ve as LexicalToolbarDivider,
3425
- Ut as LexicalToolbarItems,
3426
- Ml as Modal,
3427
- Ol as Panel,
3428
- Tl as PanelField,
3429
- Ll as PanelLink,
3430
- zl as PanelStack,
3431
- Et as PopoverBase,
3432
- Fl as SidebarModal,
3433
- Ce as Spinner,
3434
- Fr as TabButtons,
3435
- Hr as Table,
3436
- Ar as TableColumnHead,
3437
- Al as Test,
3438
- El as Tooltip,
3439
- gr as UploadFileTile,
3440
- W as isSelectOption,
3441
- gt as lexicalTheme,
3442
- be as useLexicalToolbar,
3443
- Ft as useLexicalToolbarState,
3444
- ot as usePopover,
3445
- We as useSelectPopover
3399
+ Ul as AutoScroll,
3400
+ Pe as Badge,
3401
+ Er as BadgeColor,
3402
+ Vn as Button,
3403
+ Et as ButtonIconRound,
3404
+ Je as ButtonIconSquare,
3405
+ Ml as Divider,
3406
+ j as DropdownButton,
3407
+ kt as DropdownButtonGroup,
3408
+ Ae as DropdownMenu,
3409
+ ge as DropdownPanel,
3410
+ Mt as Input,
3411
+ kl as InputCheck,
3412
+ bl as InputColor,
3413
+ V as InputDescription,
3414
+ K as InputError,
3415
+ ne as InputErrorIcon,
3416
+ Cl as InputFileMultiple,
3417
+ yl as InputFileSingle,
3418
+ q as InputIconButton,
3419
+ fe as InputIconButtonTray,
3420
+ J as InputLabel,
3421
+ Rl as InputLexical,
3422
+ vl as InputPassword,
3423
+ wl as InputRadio,
3424
+ Lr as InputSelect,
3425
+ He as InputSelectDivider,
3426
+ We as InputSelectGroupHeader,
3427
+ zl as InputSelectMultiple,
3428
+ Sl as InputSelectNative,
3429
+ Ue as InputSelectOption,
3430
+ Dl as InputSelectSearchable,
3431
+ Ol as InputSelectSearchableAsync,
3432
+ xl as InputTextArea,
3433
+ Nl as InputToggle,
3434
+ xr as LEXICAL_NODES,
3435
+ kr as LexicalBlockTypeSelect,
3436
+ Il as LexicalDefaultToolbarContent,
3437
+ Tr as LexicalFloatingToolbar,
3438
+ Cr as LexicalFormatButtons,
3439
+ Sr as LexicalHistoryButtons,
3440
+ Rr as LexicalLinkButton,
3441
+ Ir as LexicalListButtons,
3442
+ zr as LexicalToolbar,
3443
+ ae as LexicalToolbarButton,
3444
+ Ge as LexicalToolbarDivider,
3445
+ Ht as LexicalToolbarItems,
3446
+ Bl as Modal,
3447
+ Tl as Panel,
3448
+ Pl as PanelField,
3449
+ El as PanelLink,
3450
+ Ll as PanelStack,
3451
+ Ft as PopoverBase,
3452
+ Al as SidebarModal,
3453
+ Re as Spinner,
3454
+ Ar as TabButtons,
3455
+ $r as Table,
3456
+ Wr as TableColumnHead,
3457
+ Wl as Test,
3458
+ Fl as Tooltip,
3459
+ vr as UploadFileTile,
3460
+ H as isSelectOption,
3461
+ vt as lexicalTheme,
3462
+ ve as useLexicalToolbar,
3463
+ At as useLexicalToolbarState,
3464
+ at as usePopover,
3465
+ _e as useSelectPopover
3446
3466
  };
3447
3467
  //# sourceMappingURL=index.js.map