lizaui 5.0.3 → 5.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (52) hide show
  1. package/dist/button/index.es.js +1 -1
  2. package/dist/calendar/index.cjs.js +10 -57
  3. package/dist/calendar/index.cjs.js.map +1 -1
  4. package/dist/calendar/index.es.js +1674 -3310
  5. package/dist/calendar/index.es.js.map +1 -1
  6. package/dist/checkbox/index.es.js +1 -1
  7. package/dist/chunks/{button-DaCTNWTs.js → button-wlPPnoey.js} +2 -2
  8. package/dist/chunks/{button-DaCTNWTs.js.map → button-wlPPnoey.js.map} +1 -1
  9. package/dist/chunks/{checkbox-CJAWo52b.js → checkbox-DoMayXNj.js} +2 -2
  10. package/dist/chunks/{checkbox-CJAWo52b.js.map → checkbox-DoMayXNj.js.map} +1 -1
  11. package/dist/chunks/{index-Db2rLomN.js → index-Do-g2tEs.js} +3 -3
  12. package/dist/chunks/{index-Db2rLomN.js.map → index-Do-g2tEs.js.map} +1 -1
  13. package/dist/chunks/select-C25qmFpo.js +1321 -0
  14. package/dist/chunks/select-C25qmFpo.js.map +1 -0
  15. package/dist/chunks/select-DW1tRhcQ.js +2 -0
  16. package/dist/chunks/select-DW1tRhcQ.js.map +1 -0
  17. package/dist/chunks/styled-components.browser.esm-CAEXERbT.js +1751 -0
  18. package/dist/chunks/styled-components.browser.esm-CAEXERbT.js.map +1 -0
  19. package/dist/chunks/styled-components.browser.esm-DwaG9BxE.js +49 -0
  20. package/dist/chunks/styled-components.browser.esm-DwaG9BxE.js.map +1 -0
  21. package/dist/chunks/textarea-ClUh9LtQ.js +3793 -0
  22. package/dist/chunks/textarea-ClUh9LtQ.js.map +1 -0
  23. package/dist/chunks/textarea-ZUAx_MBk.js +65 -0
  24. package/dist/chunks/textarea-ZUAx_MBk.js.map +1 -0
  25. package/dist/components/time-input/index.d.ts +2 -0
  26. package/dist/components/time-input/index.d.ts.map +1 -0
  27. package/dist/components/time-input/time-picker-input.d.ts +18 -0
  28. package/dist/components/time-input/time-picker-input.d.ts.map +1 -0
  29. package/dist/components/time-input/time-picker.styled.d.ts +4 -0
  30. package/dist/components/time-input/time-picker.styled.d.ts.map +1 -0
  31. package/dist/divider/index.es.js +1 -1
  32. package/dist/modal/index.es.js +1 -1
  33. package/dist/pagination/index.cjs.js +1 -1
  34. package/dist/pagination/index.cjs.js.map +1 -1
  35. package/dist/pagination/index.es.js +7 -6
  36. package/dist/pagination/index.es.js.map +1 -1
  37. package/dist/select-input/index.es.js +1 -1
  38. package/dist/table/index.es.js +1 -1
  39. package/dist/time-input/index.cjs.js +132 -0
  40. package/dist/time-input/index.cjs.js.map +1 -0
  41. package/dist/time-input/index.es.js +813 -0
  42. package/dist/time-input/index.es.js.map +1 -0
  43. package/dist/time-input.d.ts +2 -0
  44. package/dist/ui/index.cjs.js +4 -4
  45. package/dist/ui/index.cjs.js.map +1 -1
  46. package/dist/ui/index.es.js +344 -342
  47. package/dist/ui/index.es.js.map +1 -1
  48. package/package.json +7 -1
  49. package/dist/chunks/textarea-ELiVeST1.js +0 -5102
  50. package/dist/chunks/textarea-ELiVeST1.js.map +0 -1
  51. package/dist/chunks/textarea-xD71CEWT.js +0 -65
  52. package/dist/chunks/textarea-xD71CEWT.js.map +0 -1
@@ -0,0 +1,3793 @@
1
+ import { j as y } from "./jsx-runtime-Cl_4eDuT.js";
2
+ import * as l from "react";
3
+ import { useId as Cr, useState as ze, useEffect as De, createContext as Pr, forwardRef as vn, createElement as Ve, useContext as gn, useRef as ae, useLayoutEffect as Rr, useImperativeHandle as hn, useCallback as oe, useMemo as Nr } from "react";
4
+ import { c as V } from "./variants-DhZQjbsQ.js";
5
+ import { t as zr } from "./tv-CPk8h_lY.js";
6
+ import { c as yn } from "./index-D29mdTf5.js";
7
+ import { twMerge as se } from "./bundle-mjs-BcJXDvon.js";
8
+ import { c as de } from "./utils-BFAOD39w.js";
9
+ import { c as Ne } from "./clsx-OuTLNxxd.js";
10
+ import { v as Dr } from "./pattern-CdQavADx.js";
11
+ import "./assertion-CrT8p68K.js";
12
+ import { L as bn } from "./label-error-Vg0P1jJJ.js";
13
+ import { m as Et } from "./proxy-kv_Ue2k_.js";
14
+ import { c as xn, u as _e } from "./index-Do-g2tEs.js";
15
+ import * as Ir from "react-dom";
16
+ import Ar from "react-dom";
17
+ import { B as Mr } from "./button-wlPPnoey.js";
18
+ import { A as kr } from "./index-DC9BfnBH.js";
19
+ const Lr = zr({
20
+ slots: {
21
+ base: ["relative", "inline-flex", "shrink-0"],
22
+ badge: [
23
+ "flex",
24
+ "z-10",
25
+ "flex-wrap",
26
+ "absolute",
27
+ "box-border",
28
+ "rounded-full",
29
+ "whitespace-nowrap",
30
+ "place-content-center",
31
+ "origin-center",
32
+ "items-center",
33
+ "text-inherit",
34
+ "select-none",
35
+ "font-regular",
36
+ "scale-100",
37
+ "opacity-100",
38
+ "subpixel-antialiased",
39
+ "data-[invisible=true]:scale-0",
40
+ "data-[invisible=true]:opacity-0"
41
+ ]
42
+ },
43
+ variants: {
44
+ variant: {
45
+ solid: {},
46
+ flat: {},
47
+ faded: {
48
+ badge: "border-medium"
49
+ },
50
+ shadow: {}
51
+ },
52
+ color: {
53
+ default: {},
54
+ primary: {},
55
+ secondary: {},
56
+ success: {},
57
+ warning: {},
58
+ danger: {}
59
+ },
60
+ size: {
61
+ sm: {
62
+ badge: "px-1 text-xs"
63
+ },
64
+ md: {
65
+ badge: "px-1 text-sm"
66
+ },
67
+ lg: {
68
+ badge: "px-1 text-sm"
69
+ }
70
+ },
71
+ placement: {
72
+ "top-right": {},
73
+ "top-left": {},
74
+ "bottom-right": {},
75
+ "bottom-left": {}
76
+ },
77
+ shape: {
78
+ circle: {},
79
+ rectangle: {}
80
+ },
81
+ isInvisible: {
82
+ true: {}
83
+ },
84
+ isOneChar: {
85
+ true: {
86
+ badge: "px-0"
87
+ }
88
+ },
89
+ isDot: {
90
+ true: {}
91
+ },
92
+ disableAnimation: {
93
+ true: {
94
+ badge: "transition-none"
95
+ },
96
+ false: {
97
+ badge: "transition-transform-opacity !ease-soft-spring !duration-300"
98
+ }
99
+ },
100
+ showOutline: {
101
+ true: {
102
+ badge: "border-2 border-background"
103
+ },
104
+ false: {
105
+ badge: "border-transparent border-0"
106
+ }
107
+ }
108
+ },
109
+ defaultVariants: {
110
+ variant: "solid",
111
+ color: "default",
112
+ size: "md",
113
+ shape: "rectangle",
114
+ placement: "top-right",
115
+ showOutline: !0,
116
+ isInvisible: !1
117
+ },
118
+ compoundVariants: [
119
+ // solid / color
120
+ {
121
+ variant: "solid",
122
+ color: "default",
123
+ class: {
124
+ badge: V.solid.default
125
+ }
126
+ },
127
+ {
128
+ variant: "solid",
129
+ color: "primary",
130
+ class: {
131
+ badge: V.solid.primary
132
+ }
133
+ },
134
+ {
135
+ variant: "solid",
136
+ color: "secondary",
137
+ class: {
138
+ badge: V.solid.secondary
139
+ }
140
+ },
141
+ {
142
+ variant: "solid",
143
+ color: "success",
144
+ class: {
145
+ badge: V.solid.success
146
+ }
147
+ },
148
+ {
149
+ variant: "solid",
150
+ color: "warning",
151
+ class: {
152
+ badge: V.solid.warning
153
+ }
154
+ },
155
+ {
156
+ variant: "solid",
157
+ color: "danger",
158
+ class: {
159
+ badge: V.solid.danger
160
+ }
161
+ },
162
+ // shadow / color
163
+ {
164
+ variant: "shadow",
165
+ color: "default",
166
+ class: {
167
+ badge: V.shadow.default
168
+ }
169
+ },
170
+ {
171
+ variant: "shadow",
172
+ color: "primary",
173
+ class: {
174
+ badge: V.shadow.primary
175
+ }
176
+ },
177
+ {
178
+ variant: "shadow",
179
+ color: "secondary",
180
+ class: {
181
+ badge: V.shadow.secondary
182
+ }
183
+ },
184
+ {
185
+ variant: "shadow",
186
+ color: "success",
187
+ class: {
188
+ badge: V.shadow.success
189
+ }
190
+ },
191
+ {
192
+ variant: "shadow",
193
+ color: "warning",
194
+ class: {
195
+ badge: V.shadow.warning
196
+ }
197
+ },
198
+ {
199
+ variant: "shadow",
200
+ color: "danger",
201
+ class: {
202
+ badge: V.shadow.danger
203
+ }
204
+ },
205
+ // flat / color
206
+ {
207
+ variant: "flat",
208
+ color: "default",
209
+ class: {
210
+ badge: V.flat.default
211
+ }
212
+ },
213
+ {
214
+ variant: "flat",
215
+ color: "primary",
216
+ class: {
217
+ badge: V.flat.primary
218
+ }
219
+ },
220
+ {
221
+ variant: "flat",
222
+ color: "secondary",
223
+ class: {
224
+ badge: V.flat.secondary
225
+ }
226
+ },
227
+ {
228
+ variant: "flat",
229
+ color: "success",
230
+ class: {
231
+ badge: V.flat.success
232
+ }
233
+ },
234
+ {
235
+ variant: "flat",
236
+ color: "warning",
237
+ class: {
238
+ badge: V.flat.warning
239
+ }
240
+ },
241
+ {
242
+ variant: "flat",
243
+ color: "danger",
244
+ class: {
245
+ badge: V.flat.danger
246
+ }
247
+ },
248
+ // faded / color
249
+ {
250
+ variant: "faded",
251
+ color: "default",
252
+ class: {
253
+ badge: V.faded.default
254
+ }
255
+ },
256
+ {
257
+ variant: "faded",
258
+ color: "primary",
259
+ class: {
260
+ badge: V.faded.primary
261
+ }
262
+ },
263
+ {
264
+ variant: "faded",
265
+ color: "secondary",
266
+ class: {
267
+ badge: V.faded.secondary
268
+ }
269
+ },
270
+ {
271
+ variant: "faded",
272
+ color: "success",
273
+ class: {
274
+ badge: V.faded.success
275
+ }
276
+ },
277
+ {
278
+ variant: "faded",
279
+ color: "warning",
280
+ class: {
281
+ badge: V.faded.warning
282
+ }
283
+ },
284
+ {
285
+ variant: "faded",
286
+ color: "danger",
287
+ class: {
288
+ badge: V.faded.danger
289
+ }
290
+ },
291
+ // isOneChar / size
292
+ {
293
+ isOneChar: !0,
294
+ size: "sm",
295
+ class: {
296
+ badge: "w-4 h-4 min-w-4 min-h-4"
297
+ }
298
+ },
299
+ {
300
+ isOneChar: !0,
301
+ size: "md",
302
+ class: {
303
+ badge: "w-5 h-5 min-w-5 min-h-5"
304
+ }
305
+ },
306
+ {
307
+ isOneChar: !0,
308
+ size: "lg",
309
+ class: {
310
+ badge: "w-6 h-6 min-w-6 min-h-6"
311
+ }
312
+ },
313
+ // isDot / size
314
+ {
315
+ isDot: !0,
316
+ size: "sm",
317
+ class: {
318
+ badge: "w-3 h-3 min-w-3 min-h-3"
319
+ }
320
+ },
321
+ {
322
+ isDot: !0,
323
+ size: "md",
324
+ class: {
325
+ badge: "w-3.5 h-3.5 min-w-3.5 min-h-3.5"
326
+ }
327
+ },
328
+ {
329
+ isDot: !0,
330
+ size: "lg",
331
+ class: {
332
+ badge: "w-4 h-4 min-w-4 min-h-4"
333
+ }
334
+ },
335
+ // placement / rectangle
336
+ {
337
+ placement: "top-right",
338
+ shape: "rectangle",
339
+ class: {
340
+ badge: "top-[5%] right-[5%] translate-x-1/2 -translate-y-1/2"
341
+ }
342
+ },
343
+ {
344
+ placement: "top-left",
345
+ shape: "rectangle",
346
+ class: {
347
+ badge: "top-[5%] left-[5%] -translate-x-1/2 -translate-y-1/2"
348
+ }
349
+ },
350
+ {
351
+ placement: "bottom-right",
352
+ shape: "rectangle",
353
+ class: {
354
+ badge: "bottom-[5%] right-[5%] translate-x-1/2 translate-y-1/2"
355
+ }
356
+ },
357
+ {
358
+ placement: "bottom-left",
359
+ shape: "rectangle",
360
+ class: {
361
+ badge: "bottom-[5%] left-[5%] -translate-x-1/2 translate-y-1/2"
362
+ }
363
+ },
364
+ // placement / circle
365
+ {
366
+ placement: "top-right",
367
+ shape: "circle",
368
+ class: {
369
+ badge: "top-[10%] right-[10%] translate-x-1/2 -translate-y-1/2"
370
+ }
371
+ },
372
+ {
373
+ placement: "top-left",
374
+ shape: "circle",
375
+ class: {
376
+ badge: "top-[10%] left-[10%] -translate-x-1/2 -translate-y-1/2"
377
+ }
378
+ },
379
+ {
380
+ placement: "bottom-right",
381
+ shape: "circle",
382
+ class: {
383
+ badge: "bottom-[10%] right-[10%] translate-x-1/2 translate-y-1/2"
384
+ }
385
+ },
386
+ {
387
+ placement: "bottom-left",
388
+ shape: "circle",
389
+ class: {
390
+ badge: "bottom-[10%] left-[10%] -translate-x-1/2 translate-y-1/2"
391
+ }
392
+ }
393
+ ]
394
+ }), Ii = l.forwardRef(
395
+ ({ className: e, variant: t, size: n, color: r, children: a, content: o, shape: s, placement: i, ...c }, p) => {
396
+ const { base: m, badge: d } = Lr({ variant: t, size: n, color: r, shape: s, placement: i });
397
+ return /* @__PURE__ */ y.jsxs("div", { className: m(), children: [
398
+ a,
399
+ /* @__PURE__ */ y.jsx(
400
+ "span",
401
+ {
402
+ ref: p,
403
+ className: d({ class: e }),
404
+ ...c,
405
+ children: o
406
+ }
407
+ )
408
+ ] });
409
+ }
410
+ ), Or = yn(
411
+ [
412
+ "bg-white",
413
+ "transition duration-250 ease appearance-none file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input flex w-full min-w-0 border px-3 py-1 text-base transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm focus-visible:border-primary focus-visible:ring-primary/20 focus-visible:ring-[3px] aria-invalid:ring-danger/20 dark:aria-invalid:ring-danger/40 font-normal aria-invalid:border-danger"
414
+ ],
415
+ {
416
+ variants: {
417
+ size: {
418
+ sm: "h-9 text-sm",
419
+ md: "h-input-default text-sm",
420
+ lg: "h-10 text-base"
421
+ },
422
+ radius: {
423
+ none: "rounded-none",
424
+ sm: "rounded-sm",
425
+ md: "rounded-md",
426
+ lg: "rounded-lg",
427
+ full: "rounded-full"
428
+ }
429
+ },
430
+ defaultVariants: {
431
+ size: "md",
432
+ radius: "md"
433
+ }
434
+ }
435
+ ), Tr = l.forwardRef((e, t) => {
436
+ const {
437
+ id: n,
438
+ type: r = "text",
439
+ value: a,
440
+ defaultValue: o,
441
+ className: s,
442
+ classNameContainer: i,
443
+ startClassName: c,
444
+ endClassName: p,
445
+ size: m,
446
+ radius: d,
447
+ startContent: u,
448
+ endContent: v,
449
+ disabled: h,
450
+ error: f,
451
+ touched: b,
452
+ pattern: g,
453
+ isErrorText: S = !0,
454
+ label: E,
455
+ required: R = !1,
456
+ isClearable: L = !1,
457
+ onChange: I,
458
+ onClear: x,
459
+ ...F
460
+ } = e, k = l.useId(), _ = n || k, B = a !== void 0, T = !h && !!f && b, j = Ne("absolute top-0 h-full flex items-center cursor-pointer px-1.5 z-[1]", {
461
+ "text-red-700": T,
462
+ "text-gray-400": h,
463
+ "text-green-700": !f && b,
464
+ "text-gray-500": !T
465
+ }), X = Ne(u && "pl-8", !u && "pl-2.5", v && "pr-8", !v && "pr-2.5"), U = de(Or({ size: m, radius: d }), X, s), q = de("form-control-label block font-normal text-sm text-foreground mb-1", {
466
+ "text-danger": T
467
+ }), pe = (J) => {
468
+ const he = J.target.value;
469
+ g && !Dr(g, he) || I?.(J);
470
+ }, me = (J) => {
471
+ J.preventDefault(), x?.();
472
+ };
473
+ return /* @__PURE__ */ y.jsxs("div", { className: se("w-full relative flex flex-col", i), children: [
474
+ E && /* @__PURE__ */ y.jsxs("label", { htmlFor: _, className: q, children: [
475
+ E,
476
+ " ",
477
+ R && /* @__PURE__ */ y.jsx("span", { className: "text-danger", children: "*" })
478
+ ] }),
479
+ /* @__PURE__ */ y.jsxs("div", { className: "w-full relative", children: [
480
+ u && /* @__PURE__ */ y.jsx("div", { className: se("left-1", j, c), children: u }),
481
+ /* @__PURE__ */ y.jsx(
482
+ "input",
483
+ {
484
+ ref: t,
485
+ id: _,
486
+ ...h ? {} : { "aria-invalid": T },
487
+ type: r,
488
+ autoComplete: "off",
489
+ autoCapitalize: "off",
490
+ disabled: h,
491
+ onChange: pe,
492
+ className: U,
493
+ ...B ? { value: a } : { defaultValue: o },
494
+ ...F
495
+ }
496
+ ),
497
+ L && !h && a ? /* @__PURE__ */ y.jsx(
498
+ "div",
499
+ {
500
+ className: se(
501
+ "absolute top-0 h-full flex items-center px-1.5 z-[1] opacity-70 hover:opacity-100 cursor-pointer rounded-full",
502
+ "right-1"
503
+ ),
504
+ onClick: me,
505
+ children: /* @__PURE__ */ y.jsx("svg", { "aria-hidden": "true", focusable: "false", height: "18", viewBox: "0 0 24 24", width: "18", children: /* @__PURE__ */ y.jsx(
506
+ "path",
507
+ {
508
+ d: "M12 2a10 10 0 1010 10A10.016 10.016 0 0012 2zm3.36 12.3a.754.754 0 010 1.06.748.748 0 01-1.06 0l-2.3-2.3-2.3 2.3a.748.748 0 01-1.06 0 .754.754 0 010-1.06l2.3-2.3-2.3-2.3A.75.75 0 019.7 8.64l2.3 2.3 2.3-2.3a.75.75 0 011.06 1.06l-2.3 2.3z",
509
+ fill: "currentColor"
510
+ }
511
+ ) })
512
+ }
513
+ ) : null,
514
+ v && /* @__PURE__ */ y.jsx("div", { className: se("right-1", j, p), children: v })
515
+ ] }),
516
+ !h && f && b && S && /* @__PURE__ */ y.jsx(bn, { text: f })
517
+ ] });
518
+ });
519
+ Tr.displayName = "Input";
520
+ var _r = [
521
+ "a",
522
+ "button",
523
+ "div",
524
+ "form",
525
+ "h2",
526
+ "h3",
527
+ "img",
528
+ "input",
529
+ "label",
530
+ "li",
531
+ "nav",
532
+ "ol",
533
+ "p",
534
+ "select",
535
+ "span",
536
+ "svg",
537
+ "ul"
538
+ ], we = _r.reduce((e, t) => {
539
+ const n = xn(`Primitive.${t}`), r = l.forwardRef((a, o) => {
540
+ const { asChild: s, ...i } = a, c = s ? n : t;
541
+ return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ y.jsx(c, { ...i, ref: o });
542
+ });
543
+ return r.displayName = `Primitive.${t}`, { ...e, [t]: r };
544
+ }, {});
545
+ function jr(e, t) {
546
+ e && Ir.flushSync(() => e.dispatchEvent(t));
547
+ }
548
+ const Fr = yn(["flex items-center cursor-pointer relative rounded-full p-0.5 px-1 relative overflow-hidden"], {
549
+ variants: {
550
+ color: {
551
+ primary: "bg-primary",
552
+ secondary: "bg-secondary",
553
+ success: "bg-success",
554
+ warning: "bg-warning",
555
+ danger: "bg-danger",
556
+ default: "bg-default"
557
+ },
558
+ size: {
559
+ sm: "w-10 h-6",
560
+ md: "w-12 h-7",
561
+ lg: "w-14 h-8"
562
+ }
563
+ },
564
+ defaultVariants: {
565
+ color: "primary",
566
+ size: "md"
567
+ }
568
+ }), $r = ({
569
+ id: e = null,
570
+ color: t,
571
+ size: n = "md",
572
+ className: r,
573
+ disabled: a = !1,
574
+ label: o,
575
+ description: s,
576
+ positionLabel: i = "end",
577
+ required: c,
578
+ error: p,
579
+ touched: m,
580
+ value: d,
581
+ leftIcon: u,
582
+ rightIcon: v,
583
+ thumbIcon: h,
584
+ onChange: f,
585
+ ...b
586
+ }) => {
587
+ const g = Cr(), S = e || g, [E, R] = ze(!1);
588
+ De(() => {
589
+ R(d);
590
+ }, [d]);
591
+ const L = (B) => {
592
+ f(B.target.checked);
593
+ }, I = () => {
594
+ a || f(!E);
595
+ }, x = se(
596
+ "transition transform bg-white rounded-full shadow-sm flex justify-center items-center",
597
+ Ne(
598
+ n === "sm" && "w-4 h-4",
599
+ n === "md" && "w-5 h-5",
600
+ n === "lg" && "w-6 h-6",
601
+ n === "sm" && E && "translate-x-4",
602
+ n === "md" && E && "translate-x-5",
603
+ n === "lg" && E && "translate-x-6"
604
+ )
605
+ ), F = se(Ne(!E && "bg-default-200", a && "bg-default-100 hover:bg-default-100")), k = se(
606
+ "text-gray-500 leading-none",
607
+ Ne({
608
+ "text-sm": n === "sm" || n === "md",
609
+ "after:content-['*'] after:ml-0.5 after:text-green-500": c,
610
+ "after:text-gray-400 text-gray-400": a
611
+ })
612
+ ), _ = se("text-xs text-gray-500 mt-1", a && "text-gray-400");
613
+ return /* @__PURE__ */ y.jsxs("div", { className: se(r), children: [
614
+ /* @__PURE__ */ y.jsxs("div", { className: Ne("flex gap-2", s && o ? "items-start" : "items-center"), children: [
615
+ i === "start" && (o || s) && /* @__PURE__ */ y.jsxs("div", { onClick: I, className: "cursor-pointer", children: [
616
+ o && /* @__PURE__ */ y.jsx("p", { className: k, children: o }),
617
+ s && /* @__PURE__ */ y.jsx("p", { className: _, children: s })
618
+ ] }),
619
+ /* @__PURE__ */ y.jsxs(
620
+ "label",
621
+ {
622
+ htmlFor: S,
623
+ className: de(Fr({ size: n, color: t }), F),
624
+ children: [
625
+ /* @__PURE__ */ y.jsx(
626
+ "input",
627
+ {
628
+ type: "checkbox",
629
+ id: S,
630
+ className: "sr-only peer",
631
+ onChange: L,
632
+ disabled: a,
633
+ checked: E,
634
+ "data-state": E ? "checked" : "unchecked",
635
+ ...b
636
+ }
637
+ ),
638
+ u && /* @__PURE__ */ y.jsx(
639
+ Et.div,
640
+ {
641
+ initial: !1,
642
+ animate: E ? { scale: 1, opacity: 1 } : { scale: 0, opacity: 0 },
643
+ transition: { type: "spring", bounce: 0 },
644
+ className: "absolute left-1 top-1/2 -translate-y-1/2 text-neutral-400",
645
+ children: u
646
+ }
647
+ ),
648
+ v && /* @__PURE__ */ y.jsx(
649
+ Et.div,
650
+ {
651
+ initial: !1,
652
+ animate: E ? { scale: 0, opacity: 0 } : { scale: 1, opacity: 1 },
653
+ transition: { type: "spring", bounce: 0 },
654
+ className: "absolute right-1 top-1/2 -translate-y-1/2 text-neutral-400",
655
+ children: v
656
+ }
657
+ ),
658
+ /* @__PURE__ */ y.jsx("span", { className: x, children: h && /* @__PURE__ */ y.jsx(
659
+ Et.div,
660
+ {
661
+ initial: !1,
662
+ animate: { scale: 1 },
663
+ className: "flex items-center justify-center",
664
+ children: h
665
+ }
666
+ ) })
667
+ ]
668
+ }
669
+ ),
670
+ i === "end" && (o || s) && /* @__PURE__ */ y.jsxs("div", { onClick: I, className: "cursor-pointer", children: [
671
+ o && /* @__PURE__ */ y.jsx("p", { className: k, children: o }),
672
+ s && /* @__PURE__ */ y.jsx("p", { className: _, children: s })
673
+ ] })
674
+ ] }),
675
+ !a && p && m && /* @__PURE__ */ y.jsx(bn, { text: p })
676
+ ] });
677
+ };
678
+ $r.displayName = "Switch";
679
+ function Ie(e, t, { checkForDefaultPrevented: n = !0 } = {}) {
680
+ return function(a) {
681
+ if (e?.(a), n === !1 || !a.defaultPrevented)
682
+ return t?.(a);
683
+ };
684
+ }
685
+ function Hr(e, t) {
686
+ const n = l.createContext(t), r = (o) => {
687
+ const { children: s, ...i } = o, c = l.useMemo(() => i, Object.values(i));
688
+ return /* @__PURE__ */ y.jsx(n.Provider, { value: c, children: s });
689
+ };
690
+ r.displayName = e + "Provider";
691
+ function a(o) {
692
+ const s = l.useContext(n);
693
+ if (s) return s;
694
+ if (t !== void 0) return t;
695
+ throw new Error(`\`${o}\` must be used within \`${e}\``);
696
+ }
697
+ return [r, a];
698
+ }
699
+ function Wr(e, t = []) {
700
+ let n = [];
701
+ function r(o, s) {
702
+ const i = l.createContext(s), c = n.length;
703
+ n = [...n, s];
704
+ const p = (d) => {
705
+ const { scope: u, children: v, ...h } = d, f = u?.[e]?.[c] || i, b = l.useMemo(() => h, Object.values(h));
706
+ return /* @__PURE__ */ y.jsx(f.Provider, { value: b, children: v });
707
+ };
708
+ p.displayName = o + "Provider";
709
+ function m(d, u) {
710
+ const v = u?.[e]?.[c] || i, h = l.useContext(v);
711
+ if (h) return h;
712
+ if (s !== void 0) return s;
713
+ throw new Error(`\`${d}\` must be used within \`${o}\``);
714
+ }
715
+ return [p, m];
716
+ }
717
+ const a = () => {
718
+ const o = n.map((s) => l.createContext(s));
719
+ return function(i) {
720
+ const c = i?.[e] || o;
721
+ return l.useMemo(
722
+ () => ({ [`__scope${e}`]: { ...i, [e]: c } }),
723
+ [i, c]
724
+ );
725
+ };
726
+ };
727
+ return a.scopeName = e, [r, Br(a, ...t)];
728
+ }
729
+ function Br(...e) {
730
+ const t = e[0];
731
+ if (e.length === 1) return t;
732
+ const n = () => {
733
+ const r = e.map((a) => ({
734
+ useScope: a(),
735
+ scopeName: a.scopeName
736
+ }));
737
+ return function(o) {
738
+ const s = r.reduce((i, { useScope: c, scopeName: p }) => {
739
+ const d = c(o)[`__scope${p}`];
740
+ return { ...i, ...d };
741
+ }, {});
742
+ return l.useMemo(() => ({ [`__scope${t.scopeName}`]: s }), [s]);
743
+ };
744
+ };
745
+ return n.scopeName = t.scopeName, n;
746
+ }
747
+ var Ye = globalThis?.document ? l.useLayoutEffect : () => {
748
+ }, Ur = l[" useInsertionEffect ".trim().toString()] || Ye;
749
+ function Gr({
750
+ prop: e,
751
+ defaultProp: t,
752
+ onChange: n = () => {
753
+ },
754
+ caller: r
755
+ }) {
756
+ const [a, o, s] = Vr({
757
+ defaultProp: t,
758
+ onChange: n
759
+ }), i = e !== void 0, c = i ? e : a;
760
+ {
761
+ const m = l.useRef(e !== void 0);
762
+ l.useEffect(() => {
763
+ const d = m.current;
764
+ if (d !== i) {
765
+ const u = d ? "controlled" : "uncontrolled", v = i ? "controlled" : "uncontrolled";
766
+ }
767
+ m.current = i;
768
+ }, [i, r]);
769
+ }
770
+ const p = l.useCallback(
771
+ (m) => {
772
+ if (i) {
773
+ const d = Kr(m) ? m(e) : m;
774
+ d !== e && s.current?.(d);
775
+ } else
776
+ o(m);
777
+ },
778
+ [i, e, o, s]
779
+ );
780
+ return [c, p];
781
+ }
782
+ function Vr({
783
+ defaultProp: e,
784
+ onChange: t
785
+ }) {
786
+ const [n, r] = l.useState(e), a = l.useRef(n), o = l.useRef(t);
787
+ return Ur(() => {
788
+ o.current = t;
789
+ }, [t]), l.useEffect(() => {
790
+ a.current !== n && (o.current?.(n), a.current = n);
791
+ }, [n, a]), [n, r, o];
792
+ }
793
+ function Kr(e) {
794
+ return typeof e == "function";
795
+ }
796
+ function Ze(e) {
797
+ const t = l.useRef(e);
798
+ return l.useEffect(() => {
799
+ t.current = e;
800
+ }), l.useMemo(() => (...n) => t.current?.(...n), []);
801
+ }
802
+ function Xr(e, t = globalThis?.document) {
803
+ const n = Ze(e);
804
+ l.useEffect(() => {
805
+ const r = (a) => {
806
+ a.key === "Escape" && n(a);
807
+ };
808
+ return t.addEventListener("keydown", r, { capture: !0 }), () => t.removeEventListener("keydown", r, { capture: !0 });
809
+ }, [n, t]);
810
+ }
811
+ var qr = "DismissableLayer", Tt = "dismissableLayer.update", Yr = "dismissableLayer.pointerDownOutside", Zr = "dismissableLayer.focusOutside", Kt, wn = l.createContext({
812
+ layers: /* @__PURE__ */ new Set(),
813
+ layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(),
814
+ branches: /* @__PURE__ */ new Set()
815
+ }), En = l.forwardRef(
816
+ (e, t) => {
817
+ const {
818
+ disableOutsidePointerEvents: n = !1,
819
+ onEscapeKeyDown: r,
820
+ onPointerDownOutside: a,
821
+ onFocusOutside: o,
822
+ onInteractOutside: s,
823
+ onDismiss: i,
824
+ ...c
825
+ } = e, p = l.useContext(wn), [m, d] = l.useState(null), u = m?.ownerDocument ?? globalThis?.document, [, v] = l.useState({}), h = _e(t, (x) => d(x)), f = Array.from(p.layers), [b] = [...p.layersWithOutsidePointerEventsDisabled].slice(-1), g = f.indexOf(b), S = m ? f.indexOf(m) : -1, E = p.layersWithOutsidePointerEventsDisabled.size > 0, R = S >= g, L = eo((x) => {
826
+ const F = x.target, k = [...p.branches].some((_) => _.contains(F));
827
+ !R || k || (a?.(x), s?.(x), x.defaultPrevented || i?.());
828
+ }, u), I = to((x) => {
829
+ const F = x.target;
830
+ [...p.branches].some((_) => _.contains(F)) || (o?.(x), s?.(x), x.defaultPrevented || i?.());
831
+ }, u);
832
+ return Xr((x) => {
833
+ S === p.layers.size - 1 && (r?.(x), !x.defaultPrevented && i && (x.preventDefault(), i()));
834
+ }, u), l.useEffect(() => {
835
+ if (m)
836
+ return n && (p.layersWithOutsidePointerEventsDisabled.size === 0 && (Kt = u.body.style.pointerEvents, u.body.style.pointerEvents = "none"), p.layersWithOutsidePointerEventsDisabled.add(m)), p.layers.add(m), Xt(), () => {
837
+ n && p.layersWithOutsidePointerEventsDisabled.size === 1 && (u.body.style.pointerEvents = Kt);
838
+ };
839
+ }, [m, u, n, p]), l.useEffect(() => () => {
840
+ m && (p.layers.delete(m), p.layersWithOutsidePointerEventsDisabled.delete(m), Xt());
841
+ }, [m, p]), l.useEffect(() => {
842
+ const x = () => v({});
843
+ return document.addEventListener(Tt, x), () => document.removeEventListener(Tt, x);
844
+ }, []), /* @__PURE__ */ y.jsx(
845
+ we.div,
846
+ {
847
+ ...c,
848
+ ref: h,
849
+ style: {
850
+ pointerEvents: E ? R ? "auto" : "none" : void 0,
851
+ ...e.style
852
+ },
853
+ onFocusCapture: Ie(e.onFocusCapture, I.onFocusCapture),
854
+ onBlurCapture: Ie(e.onBlurCapture, I.onBlurCapture),
855
+ onPointerDownCapture: Ie(
856
+ e.onPointerDownCapture,
857
+ L.onPointerDownCapture
858
+ )
859
+ }
860
+ );
861
+ }
862
+ );
863
+ En.displayName = qr;
864
+ var Jr = "DismissableLayerBranch", Qr = l.forwardRef((e, t) => {
865
+ const n = l.useContext(wn), r = l.useRef(null), a = _e(t, r);
866
+ return l.useEffect(() => {
867
+ const o = r.current;
868
+ if (o)
869
+ return n.branches.add(o), () => {
870
+ n.branches.delete(o);
871
+ };
872
+ }, [n.branches]), /* @__PURE__ */ y.jsx(we.div, { ...e, ref: a });
873
+ });
874
+ Qr.displayName = Jr;
875
+ function eo(e, t = globalThis?.document) {
876
+ const n = Ze(e), r = l.useRef(!1), a = l.useRef(() => {
877
+ });
878
+ return l.useEffect(() => {
879
+ const o = (i) => {
880
+ if (i.target && !r.current) {
881
+ let c = function() {
882
+ Sn(
883
+ Yr,
884
+ n,
885
+ p,
886
+ { discrete: !0 }
887
+ );
888
+ };
889
+ const p = { originalEvent: i };
890
+ i.pointerType === "touch" ? (t.removeEventListener("click", a.current), a.current = c, t.addEventListener("click", a.current, { once: !0 })) : c();
891
+ } else
892
+ t.removeEventListener("click", a.current);
893
+ r.current = !1;
894
+ }, s = window.setTimeout(() => {
895
+ t.addEventListener("pointerdown", o);
896
+ }, 0);
897
+ return () => {
898
+ window.clearTimeout(s), t.removeEventListener("pointerdown", o), t.removeEventListener("click", a.current);
899
+ };
900
+ }, [t, n]), {
901
+ // ensures we check React component tree (not just DOM tree)
902
+ onPointerDownCapture: () => r.current = !0
903
+ };
904
+ }
905
+ function to(e, t = globalThis?.document) {
906
+ const n = Ze(e), r = l.useRef(!1);
907
+ return l.useEffect(() => {
908
+ const a = (o) => {
909
+ o.target && !r.current && Sn(Zr, n, { originalEvent: o }, {
910
+ discrete: !1
911
+ });
912
+ };
913
+ return t.addEventListener("focusin", a), () => t.removeEventListener("focusin", a);
914
+ }, [t, n]), {
915
+ onFocusCapture: () => r.current = !0,
916
+ onBlurCapture: () => r.current = !1
917
+ };
918
+ }
919
+ function Xt() {
920
+ const e = new CustomEvent(Tt);
921
+ document.dispatchEvent(e);
922
+ }
923
+ function Sn(e, t, n, { discrete: r }) {
924
+ const a = n.originalEvent.target, o = new CustomEvent(e, { bubbles: !1, cancelable: !0, detail: n });
925
+ t && a.addEventListener(e, t, { once: !0 }), r ? jr(a, o) : a.dispatchEvent(o);
926
+ }
927
+ var St = 0;
928
+ function no() {
929
+ l.useEffect(() => {
930
+ const e = document.querySelectorAll("[data-radix-focus-guard]");
931
+ return document.body.insertAdjacentElement("afterbegin", e[0] ?? qt()), document.body.insertAdjacentElement("beforeend", e[1] ?? qt()), St++, () => {
932
+ St === 1 && document.querySelectorAll("[data-radix-focus-guard]").forEach((t) => t.remove()), St--;
933
+ };
934
+ }, []);
935
+ }
936
+ function qt() {
937
+ const e = document.createElement("span");
938
+ return e.setAttribute("data-radix-focus-guard", ""), e.tabIndex = 0, e.style.outline = "none", e.style.opacity = "0", e.style.position = "fixed", e.style.pointerEvents = "none", e;
939
+ }
940
+ var Ct = "focusScope.autoFocusOnMount", Pt = "focusScope.autoFocusOnUnmount", Yt = { bubbles: !1, cancelable: !0 }, ro = "FocusScope", Cn = l.forwardRef((e, t) => {
941
+ const {
942
+ loop: n = !1,
943
+ trapped: r = !1,
944
+ onMountAutoFocus: a,
945
+ onUnmountAutoFocus: o,
946
+ ...s
947
+ } = e, [i, c] = l.useState(null), p = Ze(a), m = Ze(o), d = l.useRef(null), u = _e(t, (f) => c(f)), v = l.useRef({
948
+ paused: !1,
949
+ pause() {
950
+ this.paused = !0;
951
+ },
952
+ resume() {
953
+ this.paused = !1;
954
+ }
955
+ }).current;
956
+ l.useEffect(() => {
957
+ if (r) {
958
+ let f = function(E) {
959
+ if (v.paused || !i) return;
960
+ const R = E.target;
961
+ i.contains(R) ? d.current = R : Ce(d.current, { select: !0 });
962
+ }, b = function(E) {
963
+ if (v.paused || !i) return;
964
+ const R = E.relatedTarget;
965
+ R !== null && (i.contains(R) || Ce(d.current, { select: !0 }));
966
+ }, g = function(E) {
967
+ if (document.activeElement === document.body)
968
+ for (const L of E)
969
+ L.removedNodes.length > 0 && Ce(i);
970
+ };
971
+ document.addEventListener("focusin", f), document.addEventListener("focusout", b);
972
+ const S = new MutationObserver(g);
973
+ return i && S.observe(i, { childList: !0, subtree: !0 }), () => {
974
+ document.removeEventListener("focusin", f), document.removeEventListener("focusout", b), S.disconnect();
975
+ };
976
+ }
977
+ }, [r, i, v.paused]), l.useEffect(() => {
978
+ if (i) {
979
+ Jt.add(v);
980
+ const f = document.activeElement;
981
+ if (!i.contains(f)) {
982
+ const g = new CustomEvent(Ct, Yt);
983
+ i.addEventListener(Ct, p), i.dispatchEvent(g), g.defaultPrevented || (oo(co(Pn(i)), { select: !0 }), document.activeElement === f && Ce(i));
984
+ }
985
+ return () => {
986
+ i.removeEventListener(Ct, p), setTimeout(() => {
987
+ const g = new CustomEvent(Pt, Yt);
988
+ i.addEventListener(Pt, m), i.dispatchEvent(g), g.defaultPrevented || Ce(f ?? document.body, { select: !0 }), i.removeEventListener(Pt, m), Jt.remove(v);
989
+ }, 0);
990
+ };
991
+ }
992
+ }, [i, p, m, v]);
993
+ const h = l.useCallback(
994
+ (f) => {
995
+ if (!n && !r || v.paused) return;
996
+ const b = f.key === "Tab" && !f.altKey && !f.ctrlKey && !f.metaKey, g = document.activeElement;
997
+ if (b && g) {
998
+ const S = f.currentTarget, [E, R] = ao(S);
999
+ E && R ? !f.shiftKey && g === R ? (f.preventDefault(), n && Ce(E, { select: !0 })) : f.shiftKey && g === E && (f.preventDefault(), n && Ce(R, { select: !0 })) : g === S && f.preventDefault();
1000
+ }
1001
+ },
1002
+ [n, r, v.paused]
1003
+ );
1004
+ return /* @__PURE__ */ y.jsx(we.div, { tabIndex: -1, ...s, ref: u, onKeyDown: h });
1005
+ });
1006
+ Cn.displayName = ro;
1007
+ function oo(e, { select: t = !1 } = {}) {
1008
+ const n = document.activeElement;
1009
+ for (const r of e)
1010
+ if (Ce(r, { select: t }), document.activeElement !== n) return;
1011
+ }
1012
+ function ao(e) {
1013
+ const t = Pn(e), n = Zt(t, e), r = Zt(t.reverse(), e);
1014
+ return [n, r];
1015
+ }
1016
+ function Pn(e) {
1017
+ const t = [], n = document.createTreeWalker(e, NodeFilter.SHOW_ELEMENT, {
1018
+ acceptNode: (r) => {
1019
+ const a = r.tagName === "INPUT" && r.type === "hidden";
1020
+ return r.disabled || r.hidden || a ? NodeFilter.FILTER_SKIP : r.tabIndex >= 0 ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;
1021
+ }
1022
+ });
1023
+ for (; n.nextNode(); ) t.push(n.currentNode);
1024
+ return t;
1025
+ }
1026
+ function Zt(e, t) {
1027
+ for (const n of e)
1028
+ if (!io(n, { upTo: t })) return n;
1029
+ }
1030
+ function io(e, { upTo: t }) {
1031
+ if (getComputedStyle(e).visibility === "hidden") return !0;
1032
+ for (; e; ) {
1033
+ if (t !== void 0 && e === t) return !1;
1034
+ if (getComputedStyle(e).display === "none") return !0;
1035
+ e = e.parentElement;
1036
+ }
1037
+ return !1;
1038
+ }
1039
+ function so(e) {
1040
+ return e instanceof HTMLInputElement && "select" in e;
1041
+ }
1042
+ function Ce(e, { select: t = !1 } = {}) {
1043
+ if (e && e.focus) {
1044
+ const n = document.activeElement;
1045
+ e.focus({ preventScroll: !0 }), e !== n && so(e) && t && e.select();
1046
+ }
1047
+ }
1048
+ var Jt = lo();
1049
+ function lo() {
1050
+ let e = [];
1051
+ return {
1052
+ add(t) {
1053
+ const n = e[0];
1054
+ t !== n && n?.pause(), e = Qt(e, t), e.unshift(t);
1055
+ },
1056
+ remove(t) {
1057
+ e = Qt(e, t), e[0]?.resume();
1058
+ }
1059
+ };
1060
+ }
1061
+ function Qt(e, t) {
1062
+ const n = [...e], r = n.indexOf(t);
1063
+ return r !== -1 && n.splice(r, 1), n;
1064
+ }
1065
+ function co(e) {
1066
+ return e.filter((t) => t.tagName !== "A");
1067
+ }
1068
+ var uo = l[" useId ".trim().toString()] || (() => {
1069
+ }), fo = 0;
1070
+ function Rt(e) {
1071
+ const [t, n] = l.useState(uo());
1072
+ return Ye(() => {
1073
+ n((r) => r ?? String(fo++));
1074
+ }, [e]), e || (t ? `radix-${t}` : "");
1075
+ }
1076
+ var po = "Portal", Rn = l.forwardRef((e, t) => {
1077
+ const { container: n, ...r } = e, [a, o] = l.useState(!1);
1078
+ Ye(() => o(!0), []);
1079
+ const s = n || a && globalThis?.document?.body;
1080
+ return s ? Ar.createPortal(/* @__PURE__ */ y.jsx(we.div, { ...r, ref: t }), s) : null;
1081
+ });
1082
+ Rn.displayName = po;
1083
+ function mo(e, t) {
1084
+ return l.useReducer((n, r) => t[n][r] ?? n, e);
1085
+ }
1086
+ var pt = (e) => {
1087
+ const { present: t, children: n } = e, r = vo(t), a = typeof n == "function" ? n({ present: r.isPresent }) : l.Children.only(n), o = _e(r.ref, go(a));
1088
+ return typeof n == "function" || r.isPresent ? l.cloneElement(a, { ref: o }) : null;
1089
+ };
1090
+ pt.displayName = "Presence";
1091
+ function vo(e) {
1092
+ const [t, n] = l.useState(), r = l.useRef(null), a = l.useRef(e), o = l.useRef("none"), s = e ? "mounted" : "unmounted", [i, c] = mo(s, {
1093
+ mounted: {
1094
+ UNMOUNT: "unmounted",
1095
+ ANIMATION_OUT: "unmountSuspended"
1096
+ },
1097
+ unmountSuspended: {
1098
+ MOUNT: "mounted",
1099
+ ANIMATION_END: "unmounted"
1100
+ },
1101
+ unmounted: {
1102
+ MOUNT: "mounted"
1103
+ }
1104
+ });
1105
+ return l.useEffect(() => {
1106
+ const p = et(r.current);
1107
+ o.current = i === "mounted" ? p : "none";
1108
+ }, [i]), Ye(() => {
1109
+ const p = r.current, m = a.current;
1110
+ if (m !== e) {
1111
+ const u = o.current, v = et(p);
1112
+ e ? c("MOUNT") : v === "none" || p?.display === "none" ? c("UNMOUNT") : c(m && u !== v ? "ANIMATION_OUT" : "UNMOUNT"), a.current = e;
1113
+ }
1114
+ }, [e, c]), Ye(() => {
1115
+ if (t) {
1116
+ let p;
1117
+ const m = t.ownerDocument.defaultView ?? window, d = (v) => {
1118
+ const f = et(r.current).includes(CSS.escape(v.animationName));
1119
+ if (v.target === t && f && (c("ANIMATION_END"), !a.current)) {
1120
+ const b = t.style.animationFillMode;
1121
+ t.style.animationFillMode = "forwards", p = m.setTimeout(() => {
1122
+ t.style.animationFillMode === "forwards" && (t.style.animationFillMode = b);
1123
+ });
1124
+ }
1125
+ }, u = (v) => {
1126
+ v.target === t && (o.current = et(r.current));
1127
+ };
1128
+ return t.addEventListener("animationstart", u), t.addEventListener("animationcancel", d), t.addEventListener("animationend", d), () => {
1129
+ m.clearTimeout(p), t.removeEventListener("animationstart", u), t.removeEventListener("animationcancel", d), t.removeEventListener("animationend", d);
1130
+ };
1131
+ } else
1132
+ c("ANIMATION_END");
1133
+ }, [t, c]), {
1134
+ isPresent: ["mounted", "unmountSuspended"].includes(i),
1135
+ ref: l.useCallback((p) => {
1136
+ r.current = p ? getComputedStyle(p) : null, n(p);
1137
+ }, [])
1138
+ };
1139
+ }
1140
+ function et(e) {
1141
+ return e?.animationName || "none";
1142
+ }
1143
+ function go(e) {
1144
+ let t = Object.getOwnPropertyDescriptor(e.props, "ref")?.get, n = t && "isReactWarning" in t && t.isReactWarning;
1145
+ return n ? e.ref : (t = Object.getOwnPropertyDescriptor(e, "ref")?.get, n = t && "isReactWarning" in t && t.isReactWarning, n ? e.props.ref : e.props.ref || e.ref);
1146
+ }
1147
+ var ho = function(e) {
1148
+ if (typeof document > "u")
1149
+ return null;
1150
+ var t = Array.isArray(e) ? e[0] : e;
1151
+ return t.ownerDocument.body;
1152
+ }, je = /* @__PURE__ */ new WeakMap(), tt = /* @__PURE__ */ new WeakMap(), nt = {}, Nt = 0, Nn = function(e) {
1153
+ return e && (e.host || Nn(e.parentNode));
1154
+ }, yo = function(e, t) {
1155
+ return t.map(function(n) {
1156
+ if (e.contains(n))
1157
+ return n;
1158
+ var r = Nn(n);
1159
+ return r && e.contains(r) ? r : null;
1160
+ }).filter(function(n) {
1161
+ return !!n;
1162
+ });
1163
+ }, bo = function(e, t, n, r) {
1164
+ var a = yo(t, Array.isArray(e) ? e : [e]);
1165
+ nt[n] || (nt[n] = /* @__PURE__ */ new WeakMap());
1166
+ var o = nt[n], s = [], i = /* @__PURE__ */ new Set(), c = new Set(a), p = function(d) {
1167
+ !d || i.has(d) || (i.add(d), p(d.parentNode));
1168
+ };
1169
+ a.forEach(p);
1170
+ var m = function(d) {
1171
+ !d || c.has(d) || Array.prototype.forEach.call(d.children, function(u) {
1172
+ if (i.has(u))
1173
+ m(u);
1174
+ else
1175
+ try {
1176
+ var v = u.getAttribute(r), h = v !== null && v !== "false", f = (je.get(u) || 0) + 1, b = (o.get(u) || 0) + 1;
1177
+ je.set(u, f), o.set(u, b), s.push(u), f === 1 && h && tt.set(u, !0), b === 1 && u.setAttribute(n, "true"), h || u.setAttribute(r, "true");
1178
+ } catch {
1179
+ }
1180
+ });
1181
+ };
1182
+ return m(t), i.clear(), Nt++, function() {
1183
+ s.forEach(function(d) {
1184
+ var u = je.get(d) - 1, v = o.get(d) - 1;
1185
+ je.set(d, u), o.set(d, v), u || (tt.has(d) || d.removeAttribute(r), tt.delete(d)), v || d.removeAttribute(n);
1186
+ }), Nt--, Nt || (je = /* @__PURE__ */ new WeakMap(), je = /* @__PURE__ */ new WeakMap(), tt = /* @__PURE__ */ new WeakMap(), nt = {});
1187
+ };
1188
+ }, xo = function(e, t, n) {
1189
+ n === void 0 && (n = "data-aria-hidden");
1190
+ var r = Array.from(Array.isArray(e) ? e : [e]), a = ho(e);
1191
+ return a ? (r.push.apply(r, Array.from(a.querySelectorAll("[aria-live], script"))), bo(r, a, n, "aria-hidden")) : function() {
1192
+ return null;
1193
+ };
1194
+ }, ge = function() {
1195
+ return ge = Object.assign || function(t) {
1196
+ for (var n, r = 1, a = arguments.length; r < a; r++) {
1197
+ n = arguments[r];
1198
+ for (var o in n) Object.prototype.hasOwnProperty.call(n, o) && (t[o] = n[o]);
1199
+ }
1200
+ return t;
1201
+ }, ge.apply(this, arguments);
1202
+ };
1203
+ function zn(e, t) {
1204
+ var n = {};
1205
+ for (var r in e) Object.prototype.hasOwnProperty.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
1206
+ if (e != null && typeof Object.getOwnPropertySymbols == "function")
1207
+ for (var a = 0, r = Object.getOwnPropertySymbols(e); a < r.length; a++)
1208
+ t.indexOf(r[a]) < 0 && Object.prototype.propertyIsEnumerable.call(e, r[a]) && (n[r[a]] = e[r[a]]);
1209
+ return n;
1210
+ }
1211
+ function wo(e, t, n) {
1212
+ if (n || arguments.length === 2) for (var r = 0, a = t.length, o; r < a; r++)
1213
+ (o || !(r in t)) && (o || (o = Array.prototype.slice.call(t, 0, r)), o[r] = t[r]);
1214
+ return e.concat(o || Array.prototype.slice.call(t));
1215
+ }
1216
+ var it = "right-scroll-bar-position", st = "width-before-scroll-bar", Eo = "with-scroll-bars-hidden", So = "--removed-body-scroll-bar-size";
1217
+ function zt(e, t) {
1218
+ return typeof e == "function" ? e(t) : e && (e.current = t), e;
1219
+ }
1220
+ function Co(e, t) {
1221
+ var n = ze(function() {
1222
+ return {
1223
+ // value
1224
+ value: e,
1225
+ // last callback
1226
+ callback: t,
1227
+ // "memoized" public interface
1228
+ facade: {
1229
+ get current() {
1230
+ return n.value;
1231
+ },
1232
+ set current(r) {
1233
+ var a = n.value;
1234
+ a !== r && (n.value = r, n.callback(r, a));
1235
+ }
1236
+ }
1237
+ };
1238
+ })[0];
1239
+ return n.callback = t, n.facade;
1240
+ }
1241
+ var Po = typeof window < "u" ? l.useLayoutEffect : l.useEffect, en = /* @__PURE__ */ new WeakMap();
1242
+ function Ro(e, t) {
1243
+ var n = Co(null, function(r) {
1244
+ return e.forEach(function(a) {
1245
+ return zt(a, r);
1246
+ });
1247
+ });
1248
+ return Po(function() {
1249
+ var r = en.get(n);
1250
+ if (r) {
1251
+ var a = new Set(r), o = new Set(e), s = n.current;
1252
+ a.forEach(function(i) {
1253
+ o.has(i) || zt(i, null);
1254
+ }), o.forEach(function(i) {
1255
+ a.has(i) || zt(i, s);
1256
+ });
1257
+ }
1258
+ en.set(n, e);
1259
+ }, [e]), n;
1260
+ }
1261
+ function No(e) {
1262
+ return e;
1263
+ }
1264
+ function zo(e, t) {
1265
+ t === void 0 && (t = No);
1266
+ var n = [], r = !1, a = {
1267
+ read: function() {
1268
+ if (r)
1269
+ throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");
1270
+ return n.length ? n[n.length - 1] : e;
1271
+ },
1272
+ useMedium: function(o) {
1273
+ var s = t(o, r);
1274
+ return n.push(s), function() {
1275
+ n = n.filter(function(i) {
1276
+ return i !== s;
1277
+ });
1278
+ };
1279
+ },
1280
+ assignSyncMedium: function(o) {
1281
+ for (r = !0; n.length; ) {
1282
+ var s = n;
1283
+ n = [], s.forEach(o);
1284
+ }
1285
+ n = {
1286
+ push: function(i) {
1287
+ return o(i);
1288
+ },
1289
+ filter: function() {
1290
+ return n;
1291
+ }
1292
+ };
1293
+ },
1294
+ assignMedium: function(o) {
1295
+ r = !0;
1296
+ var s = [];
1297
+ if (n.length) {
1298
+ var i = n;
1299
+ n = [], i.forEach(o), s = n;
1300
+ }
1301
+ var c = function() {
1302
+ var m = s;
1303
+ s = [], m.forEach(o);
1304
+ }, p = function() {
1305
+ return Promise.resolve().then(c);
1306
+ };
1307
+ p(), n = {
1308
+ push: function(m) {
1309
+ s.push(m), p();
1310
+ },
1311
+ filter: function(m) {
1312
+ return s = s.filter(m), n;
1313
+ }
1314
+ };
1315
+ }
1316
+ };
1317
+ return a;
1318
+ }
1319
+ function Do(e) {
1320
+ e === void 0 && (e = {});
1321
+ var t = zo(null);
1322
+ return t.options = ge({ async: !0, ssr: !1 }, e), t;
1323
+ }
1324
+ var Dn = function(e) {
1325
+ var t = e.sideCar, n = zn(e, ["sideCar"]);
1326
+ if (!t)
1327
+ throw new Error("Sidecar: please provide `sideCar` property to import the right car");
1328
+ var r = t.read();
1329
+ if (!r)
1330
+ throw new Error("Sidecar medium not found");
1331
+ return l.createElement(r, ge({}, n));
1332
+ };
1333
+ Dn.isSideCarExport = !0;
1334
+ function Io(e, t) {
1335
+ return e.useMedium(t), Dn;
1336
+ }
1337
+ var In = Do(), Dt = function() {
1338
+ }, mt = l.forwardRef(function(e, t) {
1339
+ var n = l.useRef(null), r = l.useState({
1340
+ onScrollCapture: Dt,
1341
+ onWheelCapture: Dt,
1342
+ onTouchMoveCapture: Dt
1343
+ }), a = r[0], o = r[1], s = e.forwardProps, i = e.children, c = e.className, p = e.removeScrollBar, m = e.enabled, d = e.shards, u = e.sideCar, v = e.noRelative, h = e.noIsolation, f = e.inert, b = e.allowPinchZoom, g = e.as, S = g === void 0 ? "div" : g, E = e.gapMode, R = zn(e, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noRelative", "noIsolation", "inert", "allowPinchZoom", "as", "gapMode"]), L = u, I = Ro([n, t]), x = ge(ge({}, R), a);
1344
+ return l.createElement(
1345
+ l.Fragment,
1346
+ null,
1347
+ m && l.createElement(L, { sideCar: In, removeScrollBar: p, shards: d, noRelative: v, noIsolation: h, inert: f, setCallbacks: o, allowPinchZoom: !!b, lockRef: n, gapMode: E }),
1348
+ s ? l.cloneElement(l.Children.only(i), ge(ge({}, x), { ref: I })) : l.createElement(S, ge({}, x, { className: c, ref: I }), i)
1349
+ );
1350
+ });
1351
+ mt.defaultProps = {
1352
+ enabled: !0,
1353
+ removeScrollBar: !0,
1354
+ inert: !1
1355
+ };
1356
+ mt.classNames = {
1357
+ fullWidth: st,
1358
+ zeroRight: it
1359
+ };
1360
+ var Ao = function() {
1361
+ if (typeof __webpack_nonce__ < "u")
1362
+ return __webpack_nonce__;
1363
+ };
1364
+ function Mo() {
1365
+ if (!document)
1366
+ return null;
1367
+ var e = document.createElement("style");
1368
+ e.type = "text/css";
1369
+ var t = Ao();
1370
+ return t && e.setAttribute("nonce", t), e;
1371
+ }
1372
+ function ko(e, t) {
1373
+ e.styleSheet ? e.styleSheet.cssText = t : e.appendChild(document.createTextNode(t));
1374
+ }
1375
+ function Lo(e) {
1376
+ var t = document.head || document.getElementsByTagName("head")[0];
1377
+ t.appendChild(e);
1378
+ }
1379
+ var Oo = function() {
1380
+ var e = 0, t = null;
1381
+ return {
1382
+ add: function(n) {
1383
+ e == 0 && (t = Mo()) && (ko(t, n), Lo(t)), e++;
1384
+ },
1385
+ remove: function() {
1386
+ e--, !e && t && (t.parentNode && t.parentNode.removeChild(t), t = null);
1387
+ }
1388
+ };
1389
+ }, To = function() {
1390
+ var e = Oo();
1391
+ return function(t, n) {
1392
+ l.useEffect(function() {
1393
+ return e.add(t), function() {
1394
+ e.remove();
1395
+ };
1396
+ }, [t && n]);
1397
+ };
1398
+ }, An = function() {
1399
+ var e = To(), t = function(n) {
1400
+ var r = n.styles, a = n.dynamic;
1401
+ return e(r, a), null;
1402
+ };
1403
+ return t;
1404
+ }, _o = {
1405
+ left: 0,
1406
+ top: 0,
1407
+ right: 0,
1408
+ gap: 0
1409
+ }, It = function(e) {
1410
+ return parseInt(e || "", 10) || 0;
1411
+ }, jo = function(e) {
1412
+ var t = window.getComputedStyle(document.body), n = t[e === "padding" ? "paddingLeft" : "marginLeft"], r = t[e === "padding" ? "paddingTop" : "marginTop"], a = t[e === "padding" ? "paddingRight" : "marginRight"];
1413
+ return [It(n), It(r), It(a)];
1414
+ }, Fo = function(e) {
1415
+ if (e === void 0 && (e = "margin"), typeof window > "u")
1416
+ return _o;
1417
+ var t = jo(e), n = document.documentElement.clientWidth, r = window.innerWidth;
1418
+ return {
1419
+ left: t[0],
1420
+ top: t[1],
1421
+ right: t[2],
1422
+ gap: Math.max(0, r - n + t[2] - t[0])
1423
+ };
1424
+ }, $o = An(), Ue = "data-scroll-locked", Ho = function(e, t, n, r) {
1425
+ var a = e.left, o = e.top, s = e.right, i = e.gap;
1426
+ return n === void 0 && (n = "margin"), `
1427
+ .`.concat(Eo, ` {
1428
+ overflow: hidden `).concat(r, `;
1429
+ padding-right: `).concat(i, "px ").concat(r, `;
1430
+ }
1431
+ body[`).concat(Ue, `] {
1432
+ overflow: hidden `).concat(r, `;
1433
+ overscroll-behavior: contain;
1434
+ `).concat([
1435
+ t && "position: relative ".concat(r, ";"),
1436
+ n === "margin" && `
1437
+ padding-left: `.concat(a, `px;
1438
+ padding-top: `).concat(o, `px;
1439
+ padding-right: `).concat(s, `px;
1440
+ margin-left:0;
1441
+ margin-top:0;
1442
+ margin-right: `).concat(i, "px ").concat(r, `;
1443
+ `),
1444
+ n === "padding" && "padding-right: ".concat(i, "px ").concat(r, ";")
1445
+ ].filter(Boolean).join(""), `
1446
+ }
1447
+
1448
+ .`).concat(it, ` {
1449
+ right: `).concat(i, "px ").concat(r, `;
1450
+ }
1451
+
1452
+ .`).concat(st, ` {
1453
+ margin-right: `).concat(i, "px ").concat(r, `;
1454
+ }
1455
+
1456
+ .`).concat(it, " .").concat(it, ` {
1457
+ right: 0 `).concat(r, `;
1458
+ }
1459
+
1460
+ .`).concat(st, " .").concat(st, ` {
1461
+ margin-right: 0 `).concat(r, `;
1462
+ }
1463
+
1464
+ body[`).concat(Ue, `] {
1465
+ `).concat(So, ": ").concat(i, `px;
1466
+ }
1467
+ `);
1468
+ }, tn = function() {
1469
+ var e = parseInt(document.body.getAttribute(Ue) || "0", 10);
1470
+ return isFinite(e) ? e : 0;
1471
+ }, Wo = function() {
1472
+ l.useEffect(function() {
1473
+ return document.body.setAttribute(Ue, (tn() + 1).toString()), function() {
1474
+ var e = tn() - 1;
1475
+ e <= 0 ? document.body.removeAttribute(Ue) : document.body.setAttribute(Ue, e.toString());
1476
+ };
1477
+ }, []);
1478
+ }, Bo = function(e) {
1479
+ var t = e.noRelative, n = e.noImportant, r = e.gapMode, a = r === void 0 ? "margin" : r;
1480
+ Wo();
1481
+ var o = l.useMemo(function() {
1482
+ return Fo(a);
1483
+ }, [a]);
1484
+ return l.createElement($o, { styles: Ho(o, !t, a, n ? "" : "!important") });
1485
+ }, _t = !1;
1486
+ if (typeof window < "u")
1487
+ try {
1488
+ var rt = Object.defineProperty({}, "passive", {
1489
+ get: function() {
1490
+ return _t = !0, !0;
1491
+ }
1492
+ });
1493
+ window.addEventListener("test", rt, rt), window.removeEventListener("test", rt, rt);
1494
+ } catch {
1495
+ _t = !1;
1496
+ }
1497
+ var Fe = _t ? { passive: !1 } : !1, Uo = function(e) {
1498
+ return e.tagName === "TEXTAREA";
1499
+ }, Mn = function(e, t) {
1500
+ if (!(e instanceof Element))
1501
+ return !1;
1502
+ var n = window.getComputedStyle(e);
1503
+ return (
1504
+ // not-not-scrollable
1505
+ n[t] !== "hidden" && // contains scroll inside self
1506
+ !(n.overflowY === n.overflowX && !Uo(e) && n[t] === "visible")
1507
+ );
1508
+ }, Go = function(e) {
1509
+ return Mn(e, "overflowY");
1510
+ }, Vo = function(e) {
1511
+ return Mn(e, "overflowX");
1512
+ }, nn = function(e, t) {
1513
+ var n = t.ownerDocument, r = t;
1514
+ do {
1515
+ typeof ShadowRoot < "u" && r instanceof ShadowRoot && (r = r.host);
1516
+ var a = kn(e, r);
1517
+ if (a) {
1518
+ var o = Ln(e, r), s = o[1], i = o[2];
1519
+ if (s > i)
1520
+ return !0;
1521
+ }
1522
+ r = r.parentNode;
1523
+ } while (r && r !== n.body);
1524
+ return !1;
1525
+ }, Ko = function(e) {
1526
+ var t = e.scrollTop, n = e.scrollHeight, r = e.clientHeight;
1527
+ return [
1528
+ t,
1529
+ n,
1530
+ r
1531
+ ];
1532
+ }, Xo = function(e) {
1533
+ var t = e.scrollLeft, n = e.scrollWidth, r = e.clientWidth;
1534
+ return [
1535
+ t,
1536
+ n,
1537
+ r
1538
+ ];
1539
+ }, kn = function(e, t) {
1540
+ return e === "v" ? Go(t) : Vo(t);
1541
+ }, Ln = function(e, t) {
1542
+ return e === "v" ? Ko(t) : Xo(t);
1543
+ }, qo = function(e, t) {
1544
+ return e === "h" && t === "rtl" ? -1 : 1;
1545
+ }, Yo = function(e, t, n, r, a) {
1546
+ var o = qo(e, window.getComputedStyle(t).direction), s = o * r, i = n.target, c = t.contains(i), p = !1, m = s > 0, d = 0, u = 0;
1547
+ do {
1548
+ if (!i)
1549
+ break;
1550
+ var v = Ln(e, i), h = v[0], f = v[1], b = v[2], g = f - b - o * h;
1551
+ (h || g) && kn(e, i) && (d += g, u += h);
1552
+ var S = i.parentNode;
1553
+ i = S && S.nodeType === Node.DOCUMENT_FRAGMENT_NODE ? S.host : S;
1554
+ } while (
1555
+ // portaled content
1556
+ !c && i !== document.body || // self content
1557
+ c && (t.contains(i) || t === i)
1558
+ );
1559
+ return (m && Math.abs(d) < 1 || !m && Math.abs(u) < 1) && (p = !0), p;
1560
+ }, ot = function(e) {
1561
+ return "changedTouches" in e ? [e.changedTouches[0].clientX, e.changedTouches[0].clientY] : [0, 0];
1562
+ }, rn = function(e) {
1563
+ return [e.deltaX, e.deltaY];
1564
+ }, on = function(e) {
1565
+ return e && "current" in e ? e.current : e;
1566
+ }, Zo = function(e, t) {
1567
+ return e[0] === t[0] && e[1] === t[1];
1568
+ }, Jo = function(e) {
1569
+ return `
1570
+ .block-interactivity-`.concat(e, ` {pointer-events: none;}
1571
+ .allow-interactivity-`).concat(e, ` {pointer-events: all;}
1572
+ `);
1573
+ }, Qo = 0, $e = [];
1574
+ function ea(e) {
1575
+ var t = l.useRef([]), n = l.useRef([0, 0]), r = l.useRef(), a = l.useState(Qo++)[0], o = l.useState(An)[0], s = l.useRef(e);
1576
+ l.useEffect(function() {
1577
+ s.current = e;
1578
+ }, [e]), l.useEffect(function() {
1579
+ if (e.inert) {
1580
+ document.body.classList.add("block-interactivity-".concat(a));
1581
+ var f = wo([e.lockRef.current], (e.shards || []).map(on), !0).filter(Boolean);
1582
+ return f.forEach(function(b) {
1583
+ return b.classList.add("allow-interactivity-".concat(a));
1584
+ }), function() {
1585
+ document.body.classList.remove("block-interactivity-".concat(a)), f.forEach(function(b) {
1586
+ return b.classList.remove("allow-interactivity-".concat(a));
1587
+ });
1588
+ };
1589
+ }
1590
+ }, [e.inert, e.lockRef.current, e.shards]);
1591
+ var i = l.useCallback(function(f, b) {
1592
+ if ("touches" in f && f.touches.length === 2 || f.type === "wheel" && f.ctrlKey)
1593
+ return !s.current.allowPinchZoom;
1594
+ var g = ot(f), S = n.current, E = "deltaX" in f ? f.deltaX : S[0] - g[0], R = "deltaY" in f ? f.deltaY : S[1] - g[1], L, I = f.target, x = Math.abs(E) > Math.abs(R) ? "h" : "v";
1595
+ if ("touches" in f && x === "h" && I.type === "range")
1596
+ return !1;
1597
+ var F = nn(x, I);
1598
+ if (!F)
1599
+ return !0;
1600
+ if (F ? L = x : (L = x === "v" ? "h" : "v", F = nn(x, I)), !F)
1601
+ return !1;
1602
+ if (!r.current && "changedTouches" in f && (E || R) && (r.current = L), !L)
1603
+ return !0;
1604
+ var k = r.current || L;
1605
+ return Yo(k, b, f, k === "h" ? E : R);
1606
+ }, []), c = l.useCallback(function(f) {
1607
+ var b = f;
1608
+ if (!(!$e.length || $e[$e.length - 1] !== o)) {
1609
+ var g = "deltaY" in b ? rn(b) : ot(b), S = t.current.filter(function(L) {
1610
+ return L.name === b.type && (L.target === b.target || b.target === L.shadowParent) && Zo(L.delta, g);
1611
+ })[0];
1612
+ if (S && S.should) {
1613
+ b.cancelable && b.preventDefault();
1614
+ return;
1615
+ }
1616
+ if (!S) {
1617
+ var E = (s.current.shards || []).map(on).filter(Boolean).filter(function(L) {
1618
+ return L.contains(b.target);
1619
+ }), R = E.length > 0 ? i(b, E[0]) : !s.current.noIsolation;
1620
+ R && b.cancelable && b.preventDefault();
1621
+ }
1622
+ }
1623
+ }, []), p = l.useCallback(function(f, b, g, S) {
1624
+ var E = { name: f, delta: b, target: g, should: S, shadowParent: ta(g) };
1625
+ t.current.push(E), setTimeout(function() {
1626
+ t.current = t.current.filter(function(R) {
1627
+ return R !== E;
1628
+ });
1629
+ }, 1);
1630
+ }, []), m = l.useCallback(function(f) {
1631
+ n.current = ot(f), r.current = void 0;
1632
+ }, []), d = l.useCallback(function(f) {
1633
+ p(f.type, rn(f), f.target, i(f, e.lockRef.current));
1634
+ }, []), u = l.useCallback(function(f) {
1635
+ p(f.type, ot(f), f.target, i(f, e.lockRef.current));
1636
+ }, []);
1637
+ l.useEffect(function() {
1638
+ return $e.push(o), e.setCallbacks({
1639
+ onScrollCapture: d,
1640
+ onWheelCapture: d,
1641
+ onTouchMoveCapture: u
1642
+ }), document.addEventListener("wheel", c, Fe), document.addEventListener("touchmove", c, Fe), document.addEventListener("touchstart", m, Fe), function() {
1643
+ $e = $e.filter(function(f) {
1644
+ return f !== o;
1645
+ }), document.removeEventListener("wheel", c, Fe), document.removeEventListener("touchmove", c, Fe), document.removeEventListener("touchstart", m, Fe);
1646
+ };
1647
+ }, []);
1648
+ var v = e.removeScrollBar, h = e.inert;
1649
+ return l.createElement(
1650
+ l.Fragment,
1651
+ null,
1652
+ h ? l.createElement(o, { styles: Jo(a) }) : null,
1653
+ v ? l.createElement(Bo, { noRelative: e.noRelative, gapMode: e.gapMode }) : null
1654
+ );
1655
+ }
1656
+ function ta(e) {
1657
+ for (var t = null; e !== null; )
1658
+ e instanceof ShadowRoot && (t = e.host, e = e.host), e = e.parentNode;
1659
+ return t;
1660
+ }
1661
+ const na = Io(In, ea);
1662
+ var On = l.forwardRef(function(e, t) {
1663
+ return l.createElement(mt, ge({}, e, { ref: t, sideCar: na }));
1664
+ });
1665
+ On.classNames = mt.classNames;
1666
+ const vt = Pr(null);
1667
+ vt.displayName = "PanelGroupContext";
1668
+ const Y = {
1669
+ group: "data-panel-group",
1670
+ groupDirection: "data-panel-group-direction",
1671
+ groupId: "data-panel-group-id",
1672
+ panel: "data-panel",
1673
+ panelCollapsible: "data-panel-collapsible",
1674
+ panelId: "data-panel-id",
1675
+ panelSize: "data-panel-size",
1676
+ resizeHandle: "data-resize-handle",
1677
+ resizeHandleActive: "data-resize-handle-active",
1678
+ resizeHandleEnabled: "data-panel-resize-handle-enabled",
1679
+ resizeHandleId: "data-panel-resize-handle-id",
1680
+ resizeHandleState: "data-resize-handle-state"
1681
+ }, Ft = 10, Le = Rr, an = l.useId, ra = typeof an == "function" ? an : () => null;
1682
+ let oa = 0;
1683
+ function $t(e = null) {
1684
+ const t = ra(), n = ae(e || t || null);
1685
+ return n.current === null && (n.current = "" + oa++), e ?? n.current;
1686
+ }
1687
+ function Tn({
1688
+ children: e,
1689
+ className: t = "",
1690
+ collapsedSize: n,
1691
+ collapsible: r,
1692
+ defaultSize: a,
1693
+ forwardedRef: o,
1694
+ id: s,
1695
+ maxSize: i,
1696
+ minSize: c,
1697
+ onCollapse: p,
1698
+ onExpand: m,
1699
+ onResize: d,
1700
+ order: u,
1701
+ style: v,
1702
+ tagName: h = "div",
1703
+ ...f
1704
+ }) {
1705
+ const b = gn(vt);
1706
+ if (b === null)
1707
+ throw Error("Panel components must be rendered within a PanelGroup container");
1708
+ const {
1709
+ collapsePanel: g,
1710
+ expandPanel: S,
1711
+ getPanelSize: E,
1712
+ getPanelStyle: R,
1713
+ groupId: L,
1714
+ isPanelCollapsed: I,
1715
+ reevaluatePanelConstraints: x,
1716
+ registerPanel: F,
1717
+ resizePanel: k,
1718
+ unregisterPanel: _
1719
+ } = b, B = $t(s), T = ae({
1720
+ callbacks: {
1721
+ onCollapse: p,
1722
+ onExpand: m,
1723
+ onResize: d
1724
+ },
1725
+ constraints: {
1726
+ collapsedSize: n,
1727
+ collapsible: r,
1728
+ defaultSize: a,
1729
+ maxSize: i,
1730
+ minSize: c
1731
+ },
1732
+ id: B,
1733
+ idIsFromProps: s !== void 0,
1734
+ order: u
1735
+ });
1736
+ ae({
1737
+ didLogMissingDefaultSizeWarning: !1
1738
+ }), Le(() => {
1739
+ const {
1740
+ callbacks: X,
1741
+ constraints: U
1742
+ } = T.current, q = {
1743
+ ...U
1744
+ };
1745
+ T.current.id = B, T.current.idIsFromProps = s !== void 0, T.current.order = u, X.onCollapse = p, X.onExpand = m, X.onResize = d, U.collapsedSize = n, U.collapsible = r, U.defaultSize = a, U.maxSize = i, U.minSize = c, (q.collapsedSize !== U.collapsedSize || q.collapsible !== U.collapsible || q.maxSize !== U.maxSize || q.minSize !== U.minSize) && x(T.current, q);
1746
+ }), Le(() => {
1747
+ const X = T.current;
1748
+ return F(X), () => {
1749
+ _(X);
1750
+ };
1751
+ }, [u, B, F, _]), hn(o, () => ({
1752
+ collapse: () => {
1753
+ g(T.current);
1754
+ },
1755
+ expand: (X) => {
1756
+ S(T.current, X);
1757
+ },
1758
+ getId() {
1759
+ return B;
1760
+ },
1761
+ getSize() {
1762
+ return E(T.current);
1763
+ },
1764
+ isCollapsed() {
1765
+ return I(T.current);
1766
+ },
1767
+ isExpanded() {
1768
+ return !I(T.current);
1769
+ },
1770
+ resize: (X) => {
1771
+ k(T.current, X);
1772
+ }
1773
+ }), [g, S, E, I, B, k]);
1774
+ const j = R(T.current, a);
1775
+ return Ve(h, {
1776
+ ...f,
1777
+ children: e,
1778
+ className: t,
1779
+ id: B,
1780
+ style: {
1781
+ ...j,
1782
+ ...v
1783
+ },
1784
+ // CSS selectors
1785
+ [Y.groupId]: L,
1786
+ [Y.panel]: "",
1787
+ [Y.panelCollapsible]: r || void 0,
1788
+ [Y.panelId]: B,
1789
+ [Y.panelSize]: parseFloat("" + j.flexGrow).toFixed(1)
1790
+ });
1791
+ }
1792
+ const aa = vn((e, t) => Ve(Tn, {
1793
+ ...e,
1794
+ forwardedRef: t
1795
+ }));
1796
+ Tn.displayName = "Panel";
1797
+ aa.displayName = "forwardRef(Panel)";
1798
+ let jt = null, lt = -1, Pe = null;
1799
+ function ia(e, t, n) {
1800
+ const r = (t & Hn) !== 0, a = (t & Wn) !== 0, o = (t & Bn) !== 0, s = (t & Un) !== 0;
1801
+ if (t) {
1802
+ if (r)
1803
+ return o ? "se-resize" : s ? "ne-resize" : "e-resize";
1804
+ if (a)
1805
+ return o ? "sw-resize" : s ? "nw-resize" : "w-resize";
1806
+ if (o)
1807
+ return "s-resize";
1808
+ if (s)
1809
+ return "n-resize";
1810
+ }
1811
+ switch (e) {
1812
+ case "horizontal":
1813
+ return "ew-resize";
1814
+ case "intersection":
1815
+ return "move";
1816
+ case "vertical":
1817
+ return "ns-resize";
1818
+ }
1819
+ }
1820
+ function sa() {
1821
+ Pe !== null && (document.head.removeChild(Pe), jt = null, Pe = null, lt = -1);
1822
+ }
1823
+ function At(e, t, n) {
1824
+ var r, a;
1825
+ const o = ia(e, t);
1826
+ if (jt !== o) {
1827
+ if (jt = o, Pe === null && (Pe = document.createElement("style"), document.head.appendChild(Pe)), lt >= 0) {
1828
+ var s;
1829
+ (s = Pe.sheet) === null || s === void 0 || s.removeRule(lt);
1830
+ }
1831
+ lt = (r = (a = Pe.sheet) === null || a === void 0 ? void 0 : a.insertRule(`*{cursor: ${o} !important;}`)) !== null && r !== void 0 ? r : -1;
1832
+ }
1833
+ }
1834
+ function _n(e) {
1835
+ return e.type === "keydown";
1836
+ }
1837
+ function jn(e) {
1838
+ return e.type.startsWith("pointer");
1839
+ }
1840
+ function Fn(e) {
1841
+ return e.type.startsWith("mouse");
1842
+ }
1843
+ function gt(e) {
1844
+ if (jn(e)) {
1845
+ if (e.isPrimary)
1846
+ return {
1847
+ x: e.clientX,
1848
+ y: e.clientY
1849
+ };
1850
+ } else if (Fn(e))
1851
+ return {
1852
+ x: e.clientX,
1853
+ y: e.clientY
1854
+ };
1855
+ return {
1856
+ x: 1 / 0,
1857
+ y: 1 / 0
1858
+ };
1859
+ }
1860
+ function la() {
1861
+ if (typeof matchMedia == "function")
1862
+ return matchMedia("(pointer:coarse)").matches ? "coarse" : "fine";
1863
+ }
1864
+ function ca(e, t, n) {
1865
+ return e.x < t.x + t.width && e.x + e.width > t.x && e.y < t.y + t.height && e.y + e.height > t.y;
1866
+ }
1867
+ function ua(e, t) {
1868
+ if (e === t) throw new Error("Cannot compare node with itself");
1869
+ const n = {
1870
+ a: cn(e),
1871
+ b: cn(t)
1872
+ };
1873
+ let r;
1874
+ for (; n.a.at(-1) === n.b.at(-1); )
1875
+ e = n.a.pop(), t = n.b.pop(), r = e;
1876
+ O(r, "Stacking order can only be calculated for elements with a common ancestor");
1877
+ const a = {
1878
+ a: ln(sn(n.a)),
1879
+ b: ln(sn(n.b))
1880
+ };
1881
+ if (a.a === a.b) {
1882
+ const o = r.childNodes, s = {
1883
+ a: n.a.at(-1),
1884
+ b: n.b.at(-1)
1885
+ };
1886
+ let i = o.length;
1887
+ for (; i--; ) {
1888
+ const c = o[i];
1889
+ if (c === s.a) return 1;
1890
+ if (c === s.b) return -1;
1891
+ }
1892
+ }
1893
+ return Math.sign(a.a - a.b);
1894
+ }
1895
+ const da = /\b(?:position|zIndex|opacity|transform|webkitTransform|mixBlendMode|filter|webkitFilter|isolation)\b/;
1896
+ function fa(e) {
1897
+ var t;
1898
+ const n = getComputedStyle((t = $n(e)) !== null && t !== void 0 ? t : e).display;
1899
+ return n === "flex" || n === "inline-flex";
1900
+ }
1901
+ function pa(e) {
1902
+ const t = getComputedStyle(e);
1903
+ return !!(t.position === "fixed" || t.zIndex !== "auto" && (t.position !== "static" || fa(e)) || +t.opacity < 1 || "transform" in t && t.transform !== "none" || "webkitTransform" in t && t.webkitTransform !== "none" || "mixBlendMode" in t && t.mixBlendMode !== "normal" || "filter" in t && t.filter !== "none" || "webkitFilter" in t && t.webkitFilter !== "none" || "isolation" in t && t.isolation === "isolate" || da.test(t.willChange) || t.webkitOverflowScrolling === "touch");
1904
+ }
1905
+ function sn(e) {
1906
+ let t = e.length;
1907
+ for (; t--; ) {
1908
+ const n = e[t];
1909
+ if (O(n, "Missing node"), pa(n)) return n;
1910
+ }
1911
+ return null;
1912
+ }
1913
+ function ln(e) {
1914
+ return e && Number(getComputedStyle(e).zIndex) || 0;
1915
+ }
1916
+ function cn(e) {
1917
+ const t = [];
1918
+ for (; e; )
1919
+ t.push(e), e = $n(e);
1920
+ return t;
1921
+ }
1922
+ function $n(e) {
1923
+ const {
1924
+ parentNode: t
1925
+ } = e;
1926
+ return t && t instanceof ShadowRoot ? t.host : t;
1927
+ }
1928
+ const Hn = 1, Wn = 2, Bn = 4, Un = 8, ma = la() === "coarse";
1929
+ let ue = [], Ge = !1, Re = /* @__PURE__ */ new Map(), ht = /* @__PURE__ */ new Map();
1930
+ const Je = /* @__PURE__ */ new Set();
1931
+ function va(e, t, n, r, a) {
1932
+ var o;
1933
+ const {
1934
+ ownerDocument: s
1935
+ } = t, i = {
1936
+ direction: n,
1937
+ element: t,
1938
+ hitAreaMargins: r,
1939
+ setResizeHandlerState: a
1940
+ }, c = (o = Re.get(s)) !== null && o !== void 0 ? o : 0;
1941
+ return Re.set(s, c + 1), Je.add(i), ct(), function() {
1942
+ var m;
1943
+ ht.delete(e), Je.delete(i);
1944
+ const d = (m = Re.get(s)) !== null && m !== void 0 ? m : 1;
1945
+ if (Re.set(s, d - 1), ct(), d === 1 && Re.delete(s), ue.includes(i)) {
1946
+ const u = ue.indexOf(i);
1947
+ u >= 0 && ue.splice(u, 1), yt(), a("up", !0, null);
1948
+ }
1949
+ };
1950
+ }
1951
+ function ga(e) {
1952
+ const {
1953
+ target: t
1954
+ } = e, {
1955
+ x: n,
1956
+ y: r
1957
+ } = gt(e);
1958
+ Ge = !0, Ht({
1959
+ target: t,
1960
+ x: n,
1961
+ y: r
1962
+ }), ct(), ue.length > 0 && (ut("down", e), yt(), e.preventDefault(), Gn(t) || e.stopImmediatePropagation());
1963
+ }
1964
+ function Mt(e) {
1965
+ const {
1966
+ x: t,
1967
+ y: n
1968
+ } = gt(e);
1969
+ if (Ge && e.buttons === 0 && (Ge = !1, ut("up", e)), !Ge) {
1970
+ const {
1971
+ target: r
1972
+ } = e;
1973
+ Ht({
1974
+ target: r,
1975
+ x: t,
1976
+ y: n
1977
+ });
1978
+ }
1979
+ ut("move", e), yt(), ue.length > 0 && e.preventDefault();
1980
+ }
1981
+ function kt(e) {
1982
+ const {
1983
+ target: t
1984
+ } = e, {
1985
+ x: n,
1986
+ y: r
1987
+ } = gt(e);
1988
+ ht.clear(), Ge = !1, ue.length > 0 && (e.preventDefault(), Gn(t) || e.stopImmediatePropagation()), ut("up", e), Ht({
1989
+ target: t,
1990
+ x: n,
1991
+ y: r
1992
+ }), yt(), ct();
1993
+ }
1994
+ function Gn(e) {
1995
+ let t = e;
1996
+ for (; t; ) {
1997
+ if (t.hasAttribute(Y.resizeHandle))
1998
+ return !0;
1999
+ t = t.parentElement;
2000
+ }
2001
+ return !1;
2002
+ }
2003
+ function Ht({
2004
+ target: e,
2005
+ x: t,
2006
+ y: n
2007
+ }) {
2008
+ ue.splice(0);
2009
+ let r = null;
2010
+ (e instanceof HTMLElement || e instanceof SVGElement) && (r = e), Je.forEach((a) => {
2011
+ const {
2012
+ element: o,
2013
+ hitAreaMargins: s
2014
+ } = a, i = o.getBoundingClientRect(), {
2015
+ bottom: c,
2016
+ left: p,
2017
+ right: m,
2018
+ top: d
2019
+ } = i, u = ma ? s.coarse : s.fine;
2020
+ if (t >= p - u && t <= m + u && n >= d - u && n <= c + u) {
2021
+ if (r !== null && document.contains(r) && o !== r && !o.contains(r) && !r.contains(o) && // Calculating stacking order has a cost, so we should avoid it if possible
2022
+ // That is why we only check potentially intersecting handles,
2023
+ // and why we skip if the event target is within the handle's DOM
2024
+ ua(r, o) > 0) {
2025
+ let h = r, f = !1;
2026
+ for (; h && !h.contains(o); ) {
2027
+ if (ca(h.getBoundingClientRect(), i)) {
2028
+ f = !0;
2029
+ break;
2030
+ }
2031
+ h = h.parentElement;
2032
+ }
2033
+ if (f)
2034
+ return;
2035
+ }
2036
+ ue.push(a);
2037
+ }
2038
+ });
2039
+ }
2040
+ function Lt(e, t) {
2041
+ ht.set(e, t);
2042
+ }
2043
+ function yt() {
2044
+ let e = !1, t = !1;
2045
+ ue.forEach((r) => {
2046
+ const {
2047
+ direction: a
2048
+ } = r;
2049
+ a === "horizontal" ? e = !0 : t = !0;
2050
+ });
2051
+ let n = 0;
2052
+ ht.forEach((r) => {
2053
+ n |= r;
2054
+ }), e && t ? At("intersection", n) : e ? At("horizontal", n) : t ? At("vertical", n) : sa();
2055
+ }
2056
+ let Ot;
2057
+ function ct() {
2058
+ var e;
2059
+ (e = Ot) === null || e === void 0 || e.abort(), Ot = new AbortController();
2060
+ const t = {
2061
+ capture: !0,
2062
+ signal: Ot.signal
2063
+ };
2064
+ Je.size && (Ge ? (ue.length > 0 && Re.forEach((n, r) => {
2065
+ const {
2066
+ body: a
2067
+ } = r;
2068
+ n > 0 && (a.addEventListener("contextmenu", kt, t), a.addEventListener("pointerleave", Mt, t), a.addEventListener("pointermove", Mt, t));
2069
+ }), Re.forEach((n, r) => {
2070
+ const {
2071
+ body: a
2072
+ } = r;
2073
+ a.addEventListener("pointerup", kt, t), a.addEventListener("pointercancel", kt, t);
2074
+ })) : Re.forEach((n, r) => {
2075
+ const {
2076
+ body: a
2077
+ } = r;
2078
+ n > 0 && (a.addEventListener("pointerdown", ga, t), a.addEventListener("pointermove", Mt, t));
2079
+ }));
2080
+ }
2081
+ function ut(e, t) {
2082
+ Je.forEach((n) => {
2083
+ const {
2084
+ setResizeHandlerState: r
2085
+ } = n, a = ue.includes(n);
2086
+ r(e, a, t);
2087
+ });
2088
+ }
2089
+ function ha() {
2090
+ const [e, t] = ze(0);
2091
+ return oe(() => t((n) => n + 1), []);
2092
+ }
2093
+ function O(e, t) {
2094
+ if (!e)
2095
+ throw Error(t);
2096
+ }
2097
+ function Oe(e, t, n = Ft) {
2098
+ return e.toFixed(n) === t.toFixed(n) ? 0 : e > t ? 1 : -1;
2099
+ }
2100
+ function xe(e, t, n = Ft) {
2101
+ return Oe(e, t, n) === 0;
2102
+ }
2103
+ function ie(e, t, n) {
2104
+ return Oe(e, t, n) === 0;
2105
+ }
2106
+ function ya(e, t, n) {
2107
+ if (e.length !== t.length)
2108
+ return !1;
2109
+ for (let r = 0; r < e.length; r++) {
2110
+ const a = e[r], o = t[r];
2111
+ if (!ie(a, o, n))
2112
+ return !1;
2113
+ }
2114
+ return !0;
2115
+ }
2116
+ function Be({
2117
+ panelConstraints: e,
2118
+ panelIndex: t,
2119
+ size: n
2120
+ }) {
2121
+ const r = e[t];
2122
+ O(r != null, `Panel constraints not found for index ${t}`);
2123
+ let {
2124
+ collapsedSize: a = 0,
2125
+ collapsible: o,
2126
+ maxSize: s = 100,
2127
+ minSize: i = 0
2128
+ } = r;
2129
+ if (Oe(n, i) < 0)
2130
+ if (o) {
2131
+ const c = (a + i) / 2;
2132
+ Oe(n, c) < 0 ? n = a : n = i;
2133
+ } else
2134
+ n = i;
2135
+ return n = Math.min(s, n), n = parseFloat(n.toFixed(Ft)), n;
2136
+ }
2137
+ function Xe({
2138
+ delta: e,
2139
+ initialLayout: t,
2140
+ panelConstraints: n,
2141
+ pivotIndices: r,
2142
+ prevLayout: a,
2143
+ trigger: o
2144
+ }) {
2145
+ if (ie(e, 0))
2146
+ return t;
2147
+ const s = [...t], [i, c] = r;
2148
+ O(i != null, "Invalid first pivot index"), O(c != null, "Invalid second pivot index");
2149
+ let p = 0;
2150
+ if (o === "keyboard") {
2151
+ {
2152
+ const d = e < 0 ? c : i, u = n[d];
2153
+ O(u, `Panel constraints not found for index ${d}`);
2154
+ const {
2155
+ collapsedSize: v = 0,
2156
+ collapsible: h,
2157
+ minSize: f = 0
2158
+ } = u;
2159
+ if (h) {
2160
+ const b = t[d];
2161
+ if (O(b != null, `Previous layout not found for panel index ${d}`), ie(b, v)) {
2162
+ const g = f - b;
2163
+ Oe(g, Math.abs(e)) > 0 && (e = e < 0 ? 0 - g : g);
2164
+ }
2165
+ }
2166
+ }
2167
+ {
2168
+ const d = e < 0 ? i : c, u = n[d];
2169
+ O(u, `No panel constraints found for index ${d}`);
2170
+ const {
2171
+ collapsedSize: v = 0,
2172
+ collapsible: h,
2173
+ minSize: f = 0
2174
+ } = u;
2175
+ if (h) {
2176
+ const b = t[d];
2177
+ if (O(b != null, `Previous layout not found for panel index ${d}`), ie(b, f)) {
2178
+ const g = b - v;
2179
+ Oe(g, Math.abs(e)) > 0 && (e = e < 0 ? 0 - g : g);
2180
+ }
2181
+ }
2182
+ }
2183
+ }
2184
+ {
2185
+ const d = e < 0 ? 1 : -1;
2186
+ let u = e < 0 ? c : i, v = 0;
2187
+ for (; ; ) {
2188
+ const f = t[u];
2189
+ O(f != null, `Previous layout not found for panel index ${u}`);
2190
+ const g = Be({
2191
+ panelConstraints: n,
2192
+ panelIndex: u,
2193
+ size: 100
2194
+ }) - f;
2195
+ if (v += g, u += d, u < 0 || u >= n.length)
2196
+ break;
2197
+ }
2198
+ const h = Math.min(Math.abs(e), Math.abs(v));
2199
+ e = e < 0 ? 0 - h : h;
2200
+ }
2201
+ {
2202
+ let u = e < 0 ? i : c;
2203
+ for (; u >= 0 && u < n.length; ) {
2204
+ const v = Math.abs(e) - Math.abs(p), h = t[u];
2205
+ O(h != null, `Previous layout not found for panel index ${u}`);
2206
+ const f = h - v, b = Be({
2207
+ panelConstraints: n,
2208
+ panelIndex: u,
2209
+ size: f
2210
+ });
2211
+ if (!ie(h, b) && (p += h - b, s[u] = b, p.toPrecision(3).localeCompare(Math.abs(e).toPrecision(3), void 0, {
2212
+ numeric: !0
2213
+ }) >= 0))
2214
+ break;
2215
+ e < 0 ? u-- : u++;
2216
+ }
2217
+ }
2218
+ if (ya(a, s))
2219
+ return a;
2220
+ {
2221
+ const d = e < 0 ? c : i, u = t[d];
2222
+ O(u != null, `Previous layout not found for panel index ${d}`);
2223
+ const v = u + p, h = Be({
2224
+ panelConstraints: n,
2225
+ panelIndex: d,
2226
+ size: v
2227
+ });
2228
+ if (s[d] = h, !ie(h, v)) {
2229
+ let f = v - h, g = e < 0 ? c : i;
2230
+ for (; g >= 0 && g < n.length; ) {
2231
+ const S = s[g];
2232
+ O(S != null, `Previous layout not found for panel index ${g}`);
2233
+ const E = S + f, R = Be({
2234
+ panelConstraints: n,
2235
+ panelIndex: g,
2236
+ size: E
2237
+ });
2238
+ if (ie(S, R) || (f -= R - S, s[g] = R), ie(f, 0))
2239
+ break;
2240
+ e > 0 ? g-- : g++;
2241
+ }
2242
+ }
2243
+ }
2244
+ const m = s.reduce((d, u) => u + d, 0);
2245
+ return ie(m, 100) ? s : a;
2246
+ }
2247
+ function ba({
2248
+ layout: e,
2249
+ panelsArray: t,
2250
+ pivotIndices: n
2251
+ }) {
2252
+ let r = 0, a = 100, o = 0, s = 0;
2253
+ const i = n[0];
2254
+ O(i != null, "No pivot index found"), t.forEach((d, u) => {
2255
+ const {
2256
+ constraints: v
2257
+ } = d, {
2258
+ maxSize: h = 100,
2259
+ minSize: f = 0
2260
+ } = v;
2261
+ u === i ? (r = f, a = h) : (o += f, s += h);
2262
+ });
2263
+ const c = Math.min(a, 100 - o), p = Math.max(r, 100 - s), m = e[i];
2264
+ return {
2265
+ valueMax: c,
2266
+ valueMin: p,
2267
+ valueNow: m
2268
+ };
2269
+ }
2270
+ function Qe(e, t = document) {
2271
+ return Array.from(t.querySelectorAll(`[${Y.resizeHandleId}][data-panel-group-id="${e}"]`));
2272
+ }
2273
+ function Vn(e, t, n = document) {
2274
+ const a = Qe(e, n).findIndex((o) => o.getAttribute(Y.resizeHandleId) === t);
2275
+ return a ?? null;
2276
+ }
2277
+ function Kn(e, t, n) {
2278
+ const r = Vn(e, t, n);
2279
+ return r != null ? [r, r + 1] : [-1, -1];
2280
+ }
2281
+ function xa(e) {
2282
+ return e instanceof HTMLElement ? !0 : typeof e == "object" && e !== null && "tagName" in e && "getAttribute" in e;
2283
+ }
2284
+ function Xn(e, t = document) {
2285
+ if (xa(t) && t.dataset.panelGroupId == e)
2286
+ return t;
2287
+ const n = t.querySelector(`[data-panel-group][data-panel-group-id="${e}"]`);
2288
+ return n || null;
2289
+ }
2290
+ function bt(e, t = document) {
2291
+ const n = t.querySelector(`[${Y.resizeHandleId}="${e}"]`);
2292
+ return n || null;
2293
+ }
2294
+ function wa(e, t, n, r = document) {
2295
+ var a, o, s, i;
2296
+ const c = bt(t, r), p = Qe(e, r), m = c ? p.indexOf(c) : -1, d = (a = (o = n[m]) === null || o === void 0 ? void 0 : o.id) !== null && a !== void 0 ? a : null, u = (s = (i = n[m + 1]) === null || i === void 0 ? void 0 : i.id) !== null && s !== void 0 ? s : null;
2297
+ return [d, u];
2298
+ }
2299
+ function Ea({
2300
+ committedValuesRef: e,
2301
+ eagerValuesRef: t,
2302
+ groupId: n,
2303
+ layout: r,
2304
+ panelDataArray: a,
2305
+ panelGroupElement: o,
2306
+ setLayout: s
2307
+ }) {
2308
+ ae({
2309
+ didWarnAboutMissingResizeHandle: !1
2310
+ }), Le(() => {
2311
+ if (!o)
2312
+ return;
2313
+ const i = Qe(n, o);
2314
+ for (let c = 0; c < a.length - 1; c++) {
2315
+ const {
2316
+ valueMax: p,
2317
+ valueMin: m,
2318
+ valueNow: d
2319
+ } = ba({
2320
+ layout: r,
2321
+ panelsArray: a,
2322
+ pivotIndices: [c, c + 1]
2323
+ }), u = i[c];
2324
+ if (u != null) {
2325
+ const v = a[c];
2326
+ O(v, `No panel data found for index "${c}"`), u.setAttribute("aria-controls", v.id), u.setAttribute("aria-valuemax", "" + Math.round(p)), u.setAttribute("aria-valuemin", "" + Math.round(m)), u.setAttribute("aria-valuenow", d != null ? "" + Math.round(d) : "");
2327
+ }
2328
+ }
2329
+ return () => {
2330
+ i.forEach((c, p) => {
2331
+ c.removeAttribute("aria-controls"), c.removeAttribute("aria-valuemax"), c.removeAttribute("aria-valuemin"), c.removeAttribute("aria-valuenow");
2332
+ });
2333
+ };
2334
+ }, [n, r, a, o]), De(() => {
2335
+ if (!o)
2336
+ return;
2337
+ const i = t.current;
2338
+ O(i, "Eager values not found");
2339
+ const {
2340
+ panelDataArray: c
2341
+ } = i, p = Xn(n, o);
2342
+ O(p != null, `No group found for id "${n}"`);
2343
+ const m = Qe(n, o);
2344
+ O(m, `No resize handles found for group id "${n}"`);
2345
+ const d = m.map((u) => {
2346
+ const v = u.getAttribute(Y.resizeHandleId);
2347
+ O(v, "Resize handle element has no handle id attribute");
2348
+ const [h, f] = wa(n, v, c, o);
2349
+ if (h == null || f == null)
2350
+ return () => {
2351
+ };
2352
+ const b = (g) => {
2353
+ if (!g.defaultPrevented)
2354
+ switch (g.key) {
2355
+ case "Enter": {
2356
+ g.preventDefault();
2357
+ const S = c.findIndex((E) => E.id === h);
2358
+ if (S >= 0) {
2359
+ const E = c[S];
2360
+ O(E, `No panel data found for index ${S}`);
2361
+ const R = r[S], {
2362
+ collapsedSize: L = 0,
2363
+ collapsible: I,
2364
+ minSize: x = 0
2365
+ } = E.constraints;
2366
+ if (R != null && I) {
2367
+ const F = Xe({
2368
+ delta: ie(R, L) ? x - L : L - R,
2369
+ initialLayout: r,
2370
+ panelConstraints: c.map((k) => k.constraints),
2371
+ pivotIndices: Kn(n, v, o),
2372
+ prevLayout: r,
2373
+ trigger: "keyboard"
2374
+ });
2375
+ r !== F && s(F);
2376
+ }
2377
+ }
2378
+ break;
2379
+ }
2380
+ }
2381
+ };
2382
+ return u.addEventListener("keydown", b), () => {
2383
+ u.removeEventListener("keydown", b);
2384
+ };
2385
+ });
2386
+ return () => {
2387
+ d.forEach((u) => u());
2388
+ };
2389
+ }, [o, e, t, n, r, a, s]);
2390
+ }
2391
+ function un(e, t) {
2392
+ if (e.length !== t.length)
2393
+ return !1;
2394
+ for (let n = 0; n < e.length; n++)
2395
+ if (e[n] !== t[n])
2396
+ return !1;
2397
+ return !0;
2398
+ }
2399
+ function qn(e, t) {
2400
+ const n = e === "horizontal", {
2401
+ x: r,
2402
+ y: a
2403
+ } = gt(t);
2404
+ return n ? r : a;
2405
+ }
2406
+ function Sa(e, t, n, r, a) {
2407
+ const o = n === "horizontal", s = bt(t, a);
2408
+ O(s, `No resize handle element found for id "${t}"`);
2409
+ const i = s.getAttribute(Y.groupId);
2410
+ O(i, "Resize handle element has no group id attribute");
2411
+ let {
2412
+ initialCursorPosition: c
2413
+ } = r;
2414
+ const p = qn(n, e), m = Xn(i, a);
2415
+ O(m, `No group element found for id "${i}"`);
2416
+ const d = m.getBoundingClientRect(), u = o ? d.width : d.height;
2417
+ return (p - c) / u * 100;
2418
+ }
2419
+ function Ca(e, t, n, r, a, o) {
2420
+ if (_n(e)) {
2421
+ const s = n === "horizontal";
2422
+ let i = 0;
2423
+ e.shiftKey ? i = 100 : a != null ? i = a : i = 10;
2424
+ let c = 0;
2425
+ switch (e.key) {
2426
+ case "ArrowDown":
2427
+ c = s ? 0 : i;
2428
+ break;
2429
+ case "ArrowLeft":
2430
+ c = s ? -i : 0;
2431
+ break;
2432
+ case "ArrowRight":
2433
+ c = s ? i : 0;
2434
+ break;
2435
+ case "ArrowUp":
2436
+ c = s ? 0 : -i;
2437
+ break;
2438
+ case "End":
2439
+ c = 100;
2440
+ break;
2441
+ case "Home":
2442
+ c = -100;
2443
+ break;
2444
+ }
2445
+ return c;
2446
+ } else
2447
+ return r == null ? 0 : Sa(e, t, n, r, o);
2448
+ }
2449
+ function Pa({
2450
+ panelDataArray: e
2451
+ }) {
2452
+ const t = Array(e.length), n = e.map((o) => o.constraints);
2453
+ let r = 0, a = 100;
2454
+ for (let o = 0; o < e.length; o++) {
2455
+ const s = n[o];
2456
+ O(s, `Panel constraints not found for index ${o}`);
2457
+ const {
2458
+ defaultSize: i
2459
+ } = s;
2460
+ i != null && (r++, t[o] = i, a -= i);
2461
+ }
2462
+ for (let o = 0; o < e.length; o++) {
2463
+ const s = n[o];
2464
+ O(s, `Panel constraints not found for index ${o}`);
2465
+ const {
2466
+ defaultSize: i
2467
+ } = s;
2468
+ if (i != null)
2469
+ continue;
2470
+ const c = e.length - r, p = a / c;
2471
+ r++, t[o] = p, a -= p;
2472
+ }
2473
+ return t;
2474
+ }
2475
+ function He(e, t, n) {
2476
+ t.forEach((r, a) => {
2477
+ const o = e[a];
2478
+ O(o, `Panel data not found for index ${a}`);
2479
+ const {
2480
+ callbacks: s,
2481
+ constraints: i,
2482
+ id: c
2483
+ } = o, {
2484
+ collapsedSize: p = 0,
2485
+ collapsible: m
2486
+ } = i, d = n[c];
2487
+ if (d == null || r !== d) {
2488
+ n[c] = r;
2489
+ const {
2490
+ onCollapse: u,
2491
+ onExpand: v,
2492
+ onResize: h
2493
+ } = s;
2494
+ h && h(r, d), m && (u || v) && (v && (d == null || xe(d, p)) && !xe(r, p) && v(), u && (d == null || !xe(d, p)) && xe(r, p) && u());
2495
+ }
2496
+ });
2497
+ }
2498
+ function at(e, t) {
2499
+ if (e.length !== t.length)
2500
+ return !1;
2501
+ for (let n = 0; n < e.length; n++)
2502
+ if (e[n] != t[n])
2503
+ return !1;
2504
+ return !0;
2505
+ }
2506
+ function Ra({
2507
+ defaultSize: e,
2508
+ dragState: t,
2509
+ layout: n,
2510
+ panelData: r,
2511
+ panelIndex: a,
2512
+ precision: o = 3
2513
+ }) {
2514
+ const s = n[a];
2515
+ let i;
2516
+ return s == null ? i = e != null ? e.toPrecision(o) : "1" : r.length === 1 ? i = "1" : i = s.toPrecision(o), {
2517
+ flexBasis: 0,
2518
+ flexGrow: i,
2519
+ flexShrink: 1,
2520
+ // Without this, Panel sizes may be unintentionally overridden by their content
2521
+ overflow: "hidden",
2522
+ // Disable pointer events inside of a panel during resize
2523
+ // This avoid edge cases like nested iframes
2524
+ pointerEvents: t !== null ? "none" : void 0
2525
+ };
2526
+ }
2527
+ function Na(e, t = 10) {
2528
+ let n = null;
2529
+ return (...a) => {
2530
+ n !== null && clearTimeout(n), n = setTimeout(() => {
2531
+ e(...a);
2532
+ }, t);
2533
+ };
2534
+ }
2535
+ function dn(e) {
2536
+ try {
2537
+ if (typeof localStorage < "u")
2538
+ e.getItem = (t) => localStorage.getItem(t), e.setItem = (t, n) => {
2539
+ localStorage.setItem(t, n);
2540
+ };
2541
+ else
2542
+ throw new Error("localStorage not supported in this environment");
2543
+ } catch {
2544
+ e.getItem = () => null, e.setItem = () => {
2545
+ };
2546
+ }
2547
+ }
2548
+ function Yn(e) {
2549
+ return `react-resizable-panels:${e}`;
2550
+ }
2551
+ function Zn(e) {
2552
+ return e.map((t) => {
2553
+ const {
2554
+ constraints: n,
2555
+ id: r,
2556
+ idIsFromProps: a,
2557
+ order: o
2558
+ } = t;
2559
+ return a ? r : o ? `${o}:${JSON.stringify(n)}` : JSON.stringify(n);
2560
+ }).sort((t, n) => t.localeCompare(n)).join(",");
2561
+ }
2562
+ function Jn(e, t) {
2563
+ try {
2564
+ const n = Yn(e), r = t.getItem(n);
2565
+ if (r) {
2566
+ const a = JSON.parse(r);
2567
+ if (typeof a == "object" && a != null)
2568
+ return a;
2569
+ }
2570
+ } catch {
2571
+ }
2572
+ return null;
2573
+ }
2574
+ function za(e, t, n) {
2575
+ var r, a;
2576
+ const o = (r = Jn(e, n)) !== null && r !== void 0 ? r : {}, s = Zn(t);
2577
+ return (a = o[s]) !== null && a !== void 0 ? a : null;
2578
+ }
2579
+ function Da(e, t, n, r, a) {
2580
+ var o;
2581
+ const s = Yn(e), i = Zn(t), c = (o = Jn(e, a)) !== null && o !== void 0 ? o : {};
2582
+ c[i] = {
2583
+ expandToSizes: Object.fromEntries(n.entries()),
2584
+ layout: r
2585
+ };
2586
+ try {
2587
+ a.setItem(s, JSON.stringify(c));
2588
+ } catch {
2589
+ }
2590
+ }
2591
+ function fn({
2592
+ layout: e,
2593
+ panelConstraints: t
2594
+ }) {
2595
+ const n = [...e], r = n.reduce((o, s) => o + s, 0);
2596
+ if (n.length !== t.length)
2597
+ throw Error(`Invalid ${t.length} panel layout: ${n.map((o) => `${o}%`).join(", ")}`);
2598
+ if (!ie(r, 100) && n.length > 0)
2599
+ for (let o = 0; o < t.length; o++) {
2600
+ const s = n[o];
2601
+ O(s != null, `No layout data found for index ${o}`);
2602
+ const i = 100 / r * s;
2603
+ n[o] = i;
2604
+ }
2605
+ let a = 0;
2606
+ for (let o = 0; o < t.length; o++) {
2607
+ const s = n[o];
2608
+ O(s != null, `No layout data found for index ${o}`);
2609
+ const i = Be({
2610
+ panelConstraints: t,
2611
+ panelIndex: o,
2612
+ size: s
2613
+ });
2614
+ s != i && (a += s - i, n[o] = i);
2615
+ }
2616
+ if (!ie(a, 0))
2617
+ for (let o = 0; o < t.length; o++) {
2618
+ const s = n[o];
2619
+ O(s != null, `No layout data found for index ${o}`);
2620
+ const i = s + a, c = Be({
2621
+ panelConstraints: t,
2622
+ panelIndex: o,
2623
+ size: i
2624
+ });
2625
+ if (s !== c && (a -= c - s, n[o] = c, ie(a, 0)))
2626
+ break;
2627
+ }
2628
+ return n;
2629
+ }
2630
+ const Ia = 100, qe = {
2631
+ getItem: (e) => (dn(qe), qe.getItem(e)),
2632
+ setItem: (e, t) => {
2633
+ dn(qe), qe.setItem(e, t);
2634
+ }
2635
+ }, pn = {};
2636
+ function Qn({
2637
+ autoSaveId: e = null,
2638
+ children: t,
2639
+ className: n = "",
2640
+ direction: r,
2641
+ forwardedRef: a,
2642
+ id: o = null,
2643
+ onLayout: s = null,
2644
+ keyboardResizeBy: i = null,
2645
+ storage: c = qe,
2646
+ style: p,
2647
+ tagName: m = "div",
2648
+ ...d
2649
+ }) {
2650
+ const u = $t(o), v = ae(null), [h, f] = ze(null), [b, g] = ze([]), S = ha(), E = ae({}), R = ae(/* @__PURE__ */ new Map()), L = ae(0), I = ae({
2651
+ autoSaveId: e,
2652
+ direction: r,
2653
+ dragState: h,
2654
+ id: u,
2655
+ keyboardResizeBy: i,
2656
+ onLayout: s,
2657
+ storage: c
2658
+ }), x = ae({
2659
+ layout: b,
2660
+ panelDataArray: [],
2661
+ panelDataArrayChanged: !1
2662
+ });
2663
+ ae({
2664
+ didLogIdAndOrderWarning: !1,
2665
+ didLogPanelConstraintsWarning: !1,
2666
+ prevPanelIds: []
2667
+ }), hn(a, () => ({
2668
+ getId: () => I.current.id,
2669
+ getLayout: () => {
2670
+ const {
2671
+ layout: w
2672
+ } = x.current;
2673
+ return w;
2674
+ },
2675
+ setLayout: (w) => {
2676
+ const {
2677
+ onLayout: N
2678
+ } = I.current, {
2679
+ layout: D,
2680
+ panelDataArray: z
2681
+ } = x.current, C = fn({
2682
+ layout: w,
2683
+ panelConstraints: z.map((M) => M.constraints)
2684
+ });
2685
+ un(D, C) || (g(C), x.current.layout = C, N && N(C), He(z, C, E.current));
2686
+ }
2687
+ }), []), Le(() => {
2688
+ I.current.autoSaveId = e, I.current.direction = r, I.current.dragState = h, I.current.id = u, I.current.onLayout = s, I.current.storage = c;
2689
+ }), Ea({
2690
+ committedValuesRef: I,
2691
+ eagerValuesRef: x,
2692
+ groupId: u,
2693
+ layout: b,
2694
+ panelDataArray: x.current.panelDataArray,
2695
+ setLayout: g,
2696
+ panelGroupElement: v.current
2697
+ }), De(() => {
2698
+ const {
2699
+ panelDataArray: w
2700
+ } = x.current;
2701
+ if (e) {
2702
+ if (b.length === 0 || b.length !== w.length)
2703
+ return;
2704
+ let N = pn[e];
2705
+ N == null && (N = Na(Da, Ia), pn[e] = N);
2706
+ const D = [...w], z = new Map(R.current);
2707
+ N(e, D, z, b, c);
2708
+ }
2709
+ }, [e, b, c]), De(() => {
2710
+ });
2711
+ const F = oe((w) => {
2712
+ const {
2713
+ onLayout: N
2714
+ } = I.current, {
2715
+ layout: D,
2716
+ panelDataArray: z
2717
+ } = x.current;
2718
+ if (w.constraints.collapsible) {
2719
+ const C = z.map((le) => le.constraints), {
2720
+ collapsedSize: M = 0,
2721
+ panelSize: $,
2722
+ pivotIndices: K
2723
+ } = ke(z, w, D);
2724
+ if (O($ != null, `Panel size not found for panel "${w.id}"`), !xe($, M)) {
2725
+ R.current.set(w.id, $);
2726
+ const ne = We(z, w) === z.length - 1 ? $ - M : M - $, G = Xe({
2727
+ delta: ne,
2728
+ initialLayout: D,
2729
+ panelConstraints: C,
2730
+ pivotIndices: K,
2731
+ prevLayout: D,
2732
+ trigger: "imperative-api"
2733
+ });
2734
+ at(D, G) || (g(G), x.current.layout = G, N && N(G), He(z, G, E.current));
2735
+ }
2736
+ }
2737
+ }, []), k = oe((w, N) => {
2738
+ const {
2739
+ onLayout: D
2740
+ } = I.current, {
2741
+ layout: z,
2742
+ panelDataArray: C
2743
+ } = x.current;
2744
+ if (w.constraints.collapsible) {
2745
+ const M = C.map((P) => P.constraints), {
2746
+ collapsedSize: $ = 0,
2747
+ panelSize: K = 0,
2748
+ minSize: le = 0,
2749
+ pivotIndices: ne
2750
+ } = ke(C, w, z), G = N ?? le;
2751
+ if (xe(K, $)) {
2752
+ const P = R.current.get(w.id), A = P != null && P >= G ? P : G, Q = We(C, w) === C.length - 1 ? K - A : A - K, H = Xe({
2753
+ delta: Q,
2754
+ initialLayout: z,
2755
+ panelConstraints: M,
2756
+ pivotIndices: ne,
2757
+ prevLayout: z,
2758
+ trigger: "imperative-api"
2759
+ });
2760
+ at(z, H) || (g(H), x.current.layout = H, D && D(H), He(C, H, E.current));
2761
+ }
2762
+ }
2763
+ }, []), _ = oe((w) => {
2764
+ const {
2765
+ layout: N,
2766
+ panelDataArray: D
2767
+ } = x.current, {
2768
+ panelSize: z
2769
+ } = ke(D, w, N);
2770
+ return O(z != null, `Panel size not found for panel "${w.id}"`), z;
2771
+ }, []), B = oe((w, N) => {
2772
+ const {
2773
+ panelDataArray: D
2774
+ } = x.current, z = We(D, w);
2775
+ return Ra({
2776
+ defaultSize: N,
2777
+ dragState: h,
2778
+ layout: b,
2779
+ panelData: D,
2780
+ panelIndex: z
2781
+ });
2782
+ }, [h, b]), T = oe((w) => {
2783
+ const {
2784
+ layout: N,
2785
+ panelDataArray: D
2786
+ } = x.current, {
2787
+ collapsedSize: z = 0,
2788
+ collapsible: C,
2789
+ panelSize: M
2790
+ } = ke(D, w, N);
2791
+ return O(M != null, `Panel size not found for panel "${w.id}"`), C === !0 && xe(M, z);
2792
+ }, []), j = oe((w) => {
2793
+ const {
2794
+ layout: N,
2795
+ panelDataArray: D
2796
+ } = x.current, {
2797
+ collapsedSize: z = 0,
2798
+ collapsible: C,
2799
+ panelSize: M
2800
+ } = ke(D, w, N);
2801
+ return O(M != null, `Panel size not found for panel "${w.id}"`), !C || Oe(M, z) > 0;
2802
+ }, []), X = oe((w) => {
2803
+ const {
2804
+ panelDataArray: N
2805
+ } = x.current;
2806
+ N.push(w), N.sort((D, z) => {
2807
+ const C = D.order, M = z.order;
2808
+ return C == null && M == null ? 0 : C == null ? -1 : M == null ? 1 : C - M;
2809
+ }), x.current.panelDataArrayChanged = !0, S();
2810
+ }, [S]);
2811
+ Le(() => {
2812
+ if (x.current.panelDataArrayChanged) {
2813
+ x.current.panelDataArrayChanged = !1;
2814
+ const {
2815
+ autoSaveId: w,
2816
+ onLayout: N,
2817
+ storage: D
2818
+ } = I.current, {
2819
+ layout: z,
2820
+ panelDataArray: C
2821
+ } = x.current;
2822
+ let M = null;
2823
+ if (w) {
2824
+ const K = za(w, C, D);
2825
+ K && (R.current = new Map(Object.entries(K.expandToSizes)), M = K.layout);
2826
+ }
2827
+ M == null && (M = Pa({
2828
+ panelDataArray: C
2829
+ }));
2830
+ const $ = fn({
2831
+ layout: M,
2832
+ panelConstraints: C.map((K) => K.constraints)
2833
+ });
2834
+ un(z, $) || (g($), x.current.layout = $, N && N($), He(C, $, E.current));
2835
+ }
2836
+ }), Le(() => {
2837
+ const w = x.current;
2838
+ return () => {
2839
+ w.layout = [];
2840
+ };
2841
+ }, []);
2842
+ const U = oe((w) => {
2843
+ let N = !1;
2844
+ const D = v.current;
2845
+ return D && window.getComputedStyle(D, null).getPropertyValue("direction") === "rtl" && (N = !0), function(C) {
2846
+ C.preventDefault();
2847
+ const M = v.current;
2848
+ if (!M)
2849
+ return () => null;
2850
+ const {
2851
+ direction: $,
2852
+ dragState: K,
2853
+ id: le,
2854
+ keyboardResizeBy: ne,
2855
+ onLayout: G
2856
+ } = I.current, {
2857
+ layout: P,
2858
+ panelDataArray: A
2859
+ } = x.current, {
2860
+ initialLayout: Z
2861
+ } = K ?? {}, Q = Kn(le, w, M);
2862
+ let H = Ca(C, w, $, K, ne, M);
2863
+ const W = $ === "horizontal";
2864
+ W && N && (H = -H);
2865
+ const ee = A.map((ye) => ye.constraints), ve = Xe({
2866
+ delta: H,
2867
+ initialLayout: Z ?? P,
2868
+ panelConstraints: ee,
2869
+ pivotIndices: Q,
2870
+ prevLayout: P,
2871
+ trigger: _n(C) ? "keyboard" : "mouse-or-touch"
2872
+ }), re = !at(P, ve);
2873
+ (jn(C) || Fn(C)) && L.current != H && (L.current = H, !re && H !== 0 ? W ? Lt(w, H < 0 ? Hn : Wn) : Lt(w, H < 0 ? Bn : Un) : Lt(w, 0)), re && (g(ve), x.current.layout = ve, G && G(ve), He(A, ve, E.current));
2874
+ };
2875
+ }, []), q = oe((w, N) => {
2876
+ const {
2877
+ onLayout: D
2878
+ } = I.current, {
2879
+ layout: z,
2880
+ panelDataArray: C
2881
+ } = x.current, M = C.map((P) => P.constraints), {
2882
+ panelSize: $,
2883
+ pivotIndices: K
2884
+ } = ke(C, w, z);
2885
+ O($ != null, `Panel size not found for panel "${w.id}"`);
2886
+ const ne = We(C, w) === C.length - 1 ? $ - N : N - $, G = Xe({
2887
+ delta: ne,
2888
+ initialLayout: z,
2889
+ panelConstraints: M,
2890
+ pivotIndices: K,
2891
+ prevLayout: z,
2892
+ trigger: "imperative-api"
2893
+ });
2894
+ at(z, G) || (g(G), x.current.layout = G, D && D(G), He(C, G, E.current));
2895
+ }, []), pe = oe((w, N) => {
2896
+ const {
2897
+ layout: D,
2898
+ panelDataArray: z
2899
+ } = x.current, {
2900
+ collapsedSize: C = 0,
2901
+ collapsible: M
2902
+ } = N, {
2903
+ collapsedSize: $ = 0,
2904
+ collapsible: K,
2905
+ maxSize: le = 100,
2906
+ minSize: ne = 0
2907
+ } = w.constraints, {
2908
+ panelSize: G
2909
+ } = ke(z, w, D);
2910
+ G != null && (M && K && xe(G, C) ? xe(C, $) || q(w, $) : G < ne ? q(w, ne) : G > le && q(w, le));
2911
+ }, [q]), me = oe((w, N) => {
2912
+ const {
2913
+ direction: D
2914
+ } = I.current, {
2915
+ layout: z
2916
+ } = x.current;
2917
+ if (!v.current)
2918
+ return;
2919
+ const C = bt(w, v.current);
2920
+ O(C, `Drag handle element not found for id "${w}"`);
2921
+ const M = qn(D, N);
2922
+ f({
2923
+ dragHandleId: w,
2924
+ dragHandleRect: C.getBoundingClientRect(),
2925
+ initialCursorPosition: M,
2926
+ initialLayout: z
2927
+ });
2928
+ }, []), J = oe(() => {
2929
+ f(null);
2930
+ }, []), he = oe((w) => {
2931
+ const {
2932
+ panelDataArray: N
2933
+ } = x.current, D = We(N, w);
2934
+ D >= 0 && (N.splice(D, 1), delete E.current[w.id], x.current.panelDataArrayChanged = !0, S());
2935
+ }, [S]), te = Nr(() => ({
2936
+ collapsePanel: F,
2937
+ direction: r,
2938
+ dragState: h,
2939
+ expandPanel: k,
2940
+ getPanelSize: _,
2941
+ getPanelStyle: B,
2942
+ groupId: u,
2943
+ isPanelCollapsed: T,
2944
+ isPanelExpanded: j,
2945
+ reevaluatePanelConstraints: pe,
2946
+ registerPanel: X,
2947
+ registerResizeHandle: U,
2948
+ resizePanel: q,
2949
+ startDragging: me,
2950
+ stopDragging: J,
2951
+ unregisterPanel: he,
2952
+ panelGroupElement: v.current
2953
+ }), [F, h, r, k, _, B, u, T, j, pe, X, U, q, me, J, he]), ce = {
2954
+ display: "flex",
2955
+ flexDirection: r === "horizontal" ? "row" : "column",
2956
+ height: "100%",
2957
+ overflow: "hidden",
2958
+ width: "100%"
2959
+ };
2960
+ return Ve(vt.Provider, {
2961
+ value: te
2962
+ }, Ve(m, {
2963
+ ...d,
2964
+ children: t,
2965
+ className: n,
2966
+ id: o,
2967
+ ref: v,
2968
+ style: {
2969
+ ...ce,
2970
+ ...p
2971
+ },
2972
+ // CSS selectors
2973
+ [Y.group]: "",
2974
+ [Y.groupDirection]: r,
2975
+ [Y.groupId]: u
2976
+ }));
2977
+ }
2978
+ const Aa = vn((e, t) => Ve(Qn, {
2979
+ ...e,
2980
+ forwardedRef: t
2981
+ }));
2982
+ Qn.displayName = "PanelGroup";
2983
+ Aa.displayName = "forwardRef(PanelGroup)";
2984
+ function We(e, t) {
2985
+ return e.findIndex((n) => n === t || n.id === t.id);
2986
+ }
2987
+ function ke(e, t, n) {
2988
+ const r = We(e, t), o = r === e.length - 1 ? [r - 1, r] : [r, r + 1], s = n[r];
2989
+ return {
2990
+ ...t.constraints,
2991
+ panelSize: s,
2992
+ pivotIndices: o
2993
+ };
2994
+ }
2995
+ function Ma({
2996
+ disabled: e,
2997
+ handleId: t,
2998
+ resizeHandler: n,
2999
+ panelGroupElement: r
3000
+ }) {
3001
+ De(() => {
3002
+ if (e || n == null || r == null)
3003
+ return;
3004
+ const a = bt(t, r);
3005
+ if (a == null)
3006
+ return;
3007
+ const o = (s) => {
3008
+ if (!s.defaultPrevented)
3009
+ switch (s.key) {
3010
+ case "ArrowDown":
3011
+ case "ArrowLeft":
3012
+ case "ArrowRight":
3013
+ case "ArrowUp":
3014
+ case "End":
3015
+ case "Home": {
3016
+ s.preventDefault(), n(s);
3017
+ break;
3018
+ }
3019
+ case "F6": {
3020
+ s.preventDefault();
3021
+ const i = a.getAttribute(Y.groupId);
3022
+ O(i, `No group element found for id "${i}"`);
3023
+ const c = Qe(i, r), p = Vn(i, t, r);
3024
+ O(p !== null, `No resize element found for id "${t}"`);
3025
+ const m = s.shiftKey ? p > 0 ? p - 1 : c.length - 1 : p + 1 < c.length ? p + 1 : 0;
3026
+ c[m].focus();
3027
+ break;
3028
+ }
3029
+ }
3030
+ };
3031
+ return a.addEventListener("keydown", o), () => {
3032
+ a.removeEventListener("keydown", o);
3033
+ };
3034
+ }, [r, e, t, n]);
3035
+ }
3036
+ function ka({
3037
+ children: e = null,
3038
+ className: t = "",
3039
+ disabled: n = !1,
3040
+ hitAreaMargins: r,
3041
+ id: a,
3042
+ onBlur: o,
3043
+ onClick: s,
3044
+ onDragging: i,
3045
+ onFocus: c,
3046
+ onPointerDown: p,
3047
+ onPointerUp: m,
3048
+ style: d = {},
3049
+ tabIndex: u = 0,
3050
+ tagName: v = "div",
3051
+ ...h
3052
+ }) {
3053
+ var f, b;
3054
+ const g = ae(null), S = ae({
3055
+ onClick: s,
3056
+ onDragging: i,
3057
+ onPointerDown: p,
3058
+ onPointerUp: m
3059
+ });
3060
+ De(() => {
3061
+ S.current.onClick = s, S.current.onDragging = i, S.current.onPointerDown = p, S.current.onPointerUp = m;
3062
+ });
3063
+ const E = gn(vt);
3064
+ if (E === null)
3065
+ throw Error("PanelResizeHandle components must be rendered within a PanelGroup container");
3066
+ const {
3067
+ direction: R,
3068
+ groupId: L,
3069
+ registerResizeHandle: I,
3070
+ startDragging: x,
3071
+ stopDragging: F,
3072
+ panelGroupElement: k
3073
+ } = E, _ = $t(a), [B, T] = ze("inactive"), [j, X] = ze(!1), [U, q] = ze(null), pe = ae({
3074
+ state: B
3075
+ });
3076
+ Le(() => {
3077
+ pe.current.state = B;
3078
+ }), De(() => {
3079
+ if (n)
3080
+ q(null);
3081
+ else {
3082
+ const te = I(_);
3083
+ q(() => te);
3084
+ }
3085
+ }, [n, _, I]);
3086
+ const me = (f = r?.coarse) !== null && f !== void 0 ? f : 15, J = (b = r?.fine) !== null && b !== void 0 ? b : 5;
3087
+ return De(() => {
3088
+ if (n || U == null)
3089
+ return;
3090
+ const te = g.current;
3091
+ O(te, "Element ref not attached");
3092
+ let ce = !1;
3093
+ return va(_, te, R, {
3094
+ coarse: me,
3095
+ fine: J
3096
+ }, (N, D, z) => {
3097
+ if (!D) {
3098
+ T("inactive");
3099
+ return;
3100
+ }
3101
+ switch (N) {
3102
+ case "down": {
3103
+ T("drag"), ce = !1, O(z, 'Expected event to be defined for "down" action'), x(_, z);
3104
+ const {
3105
+ onDragging: C,
3106
+ onPointerDown: M
3107
+ } = S.current;
3108
+ C?.(!0), M?.();
3109
+ break;
3110
+ }
3111
+ case "move": {
3112
+ const {
3113
+ state: C
3114
+ } = pe.current;
3115
+ ce = !0, C !== "drag" && T("hover"), O(z, 'Expected event to be defined for "move" action'), U(z);
3116
+ break;
3117
+ }
3118
+ case "up": {
3119
+ T("hover"), F();
3120
+ const {
3121
+ onClick: C,
3122
+ onDragging: M,
3123
+ onPointerUp: $
3124
+ } = S.current;
3125
+ M?.(!1), $?.(), ce || C?.();
3126
+ break;
3127
+ }
3128
+ }
3129
+ });
3130
+ }, [me, R, n, J, I, _, U, x, F]), Ma({
3131
+ disabled: n,
3132
+ handleId: _,
3133
+ resizeHandler: U,
3134
+ panelGroupElement: k
3135
+ }), Ve(v, {
3136
+ ...h,
3137
+ children: e,
3138
+ className: t,
3139
+ id: a,
3140
+ onBlur: () => {
3141
+ X(!1), o?.();
3142
+ },
3143
+ onFocus: () => {
3144
+ X(!0), c?.();
3145
+ },
3146
+ ref: g,
3147
+ role: "separator",
3148
+ style: {
3149
+ ...{
3150
+ touchAction: "none",
3151
+ userSelect: "none"
3152
+ },
3153
+ ...d
3154
+ },
3155
+ tabIndex: u,
3156
+ // CSS selectors
3157
+ [Y.groupDirection]: R,
3158
+ [Y.groupId]: L,
3159
+ [Y.resizeHandle]: "",
3160
+ [Y.resizeHandleActive]: B === "drag" ? "pointer" : j ? "keyboard" : void 0,
3161
+ [Y.resizeHandleEnabled]: !n,
3162
+ [Y.resizeHandleId]: _,
3163
+ [Y.resizeHandleState]: B
3164
+ });
3165
+ }
3166
+ ka.displayName = "PanelResizeHandle";
3167
+ var xt = "Dialog", [er, Ai] = Wr(xt), [La, fe] = er(xt), tr = (e) => {
3168
+ const {
3169
+ __scopeDialog: t,
3170
+ children: n,
3171
+ open: r,
3172
+ defaultOpen: a,
3173
+ onOpenChange: o,
3174
+ modal: s = !0
3175
+ } = e, i = l.useRef(null), c = l.useRef(null), [p, m] = Gr({
3176
+ prop: r,
3177
+ defaultProp: a ?? !1,
3178
+ onChange: o,
3179
+ caller: xt
3180
+ });
3181
+ return /* @__PURE__ */ y.jsx(
3182
+ La,
3183
+ {
3184
+ scope: t,
3185
+ triggerRef: i,
3186
+ contentRef: c,
3187
+ contentId: Rt(),
3188
+ titleId: Rt(),
3189
+ descriptionId: Rt(),
3190
+ open: p,
3191
+ onOpenChange: m,
3192
+ onOpenToggle: l.useCallback(() => m((d) => !d), [m]),
3193
+ modal: s,
3194
+ children: n
3195
+ }
3196
+ );
3197
+ };
3198
+ tr.displayName = xt;
3199
+ var nr = "DialogTrigger", rr = l.forwardRef(
3200
+ (e, t) => {
3201
+ const { __scopeDialog: n, ...r } = e, a = fe(nr, n), o = _e(t, a.triggerRef);
3202
+ return /* @__PURE__ */ y.jsx(
3203
+ we.button,
3204
+ {
3205
+ type: "button",
3206
+ "aria-haspopup": "dialog",
3207
+ "aria-expanded": a.open,
3208
+ "aria-controls": a.contentId,
3209
+ "data-state": Ut(a.open),
3210
+ ...r,
3211
+ ref: o,
3212
+ onClick: Ie(e.onClick, a.onOpenToggle)
3213
+ }
3214
+ );
3215
+ }
3216
+ );
3217
+ rr.displayName = nr;
3218
+ var Wt = "DialogPortal", [Oa, or] = er(Wt, {
3219
+ forceMount: void 0
3220
+ }), ar = (e) => {
3221
+ const { __scopeDialog: t, forceMount: n, children: r, container: a } = e, o = fe(Wt, t);
3222
+ return /* @__PURE__ */ y.jsx(Oa, { scope: t, forceMount: n, children: l.Children.map(r, (s) => /* @__PURE__ */ y.jsx(pt, { present: n || o.open, children: /* @__PURE__ */ y.jsx(Rn, { asChild: !0, container: a, children: s }) })) });
3223
+ };
3224
+ ar.displayName = Wt;
3225
+ var dt = "DialogOverlay", ir = l.forwardRef(
3226
+ (e, t) => {
3227
+ const n = or(dt, e.__scopeDialog), { forceMount: r = n.forceMount, ...a } = e, o = fe(dt, e.__scopeDialog);
3228
+ return o.modal ? /* @__PURE__ */ y.jsx(pt, { present: r || o.open, children: /* @__PURE__ */ y.jsx(_a, { ...a, ref: t }) }) : null;
3229
+ }
3230
+ );
3231
+ ir.displayName = dt;
3232
+ var Ta = xn("DialogOverlay.RemoveScroll"), _a = l.forwardRef(
3233
+ (e, t) => {
3234
+ const { __scopeDialog: n, ...r } = e, a = fe(dt, n);
3235
+ return (
3236
+ // Make sure `Content` is scrollable even when it doesn't live inside `RemoveScroll`
3237
+ // ie. when `Overlay` and `Content` are siblings
3238
+ /* @__PURE__ */ y.jsx(On, { as: Ta, allowPinchZoom: !0, shards: [a.contentRef], children: /* @__PURE__ */ y.jsx(
3239
+ we.div,
3240
+ {
3241
+ "data-state": Ut(a.open),
3242
+ ...r,
3243
+ ref: t,
3244
+ style: { pointerEvents: "auto", ...r.style }
3245
+ }
3246
+ ) })
3247
+ );
3248
+ }
3249
+ ), Te = "DialogContent", sr = l.forwardRef(
3250
+ (e, t) => {
3251
+ const n = or(Te, e.__scopeDialog), { forceMount: r = n.forceMount, ...a } = e, o = fe(Te, e.__scopeDialog);
3252
+ return /* @__PURE__ */ y.jsx(pt, { present: r || o.open, children: o.modal ? /* @__PURE__ */ y.jsx(ja, { ...a, ref: t }) : /* @__PURE__ */ y.jsx(Fa, { ...a, ref: t }) });
3253
+ }
3254
+ );
3255
+ sr.displayName = Te;
3256
+ var ja = l.forwardRef(
3257
+ (e, t) => {
3258
+ const n = fe(Te, e.__scopeDialog), r = l.useRef(null), a = _e(t, n.contentRef, r);
3259
+ return l.useEffect(() => {
3260
+ const o = r.current;
3261
+ if (o) return xo(o);
3262
+ }, []), /* @__PURE__ */ y.jsx(
3263
+ lr,
3264
+ {
3265
+ ...e,
3266
+ ref: a,
3267
+ trapFocus: n.open,
3268
+ disableOutsidePointerEvents: !0,
3269
+ onCloseAutoFocus: Ie(e.onCloseAutoFocus, (o) => {
3270
+ o.preventDefault(), n.triggerRef.current?.focus();
3271
+ }),
3272
+ onPointerDownOutside: Ie(e.onPointerDownOutside, (o) => {
3273
+ const s = o.detail.originalEvent, i = s.button === 0 && s.ctrlKey === !0;
3274
+ (s.button === 2 || i) && o.preventDefault();
3275
+ }),
3276
+ onFocusOutside: Ie(
3277
+ e.onFocusOutside,
3278
+ (o) => o.preventDefault()
3279
+ )
3280
+ }
3281
+ );
3282
+ }
3283
+ ), Fa = l.forwardRef(
3284
+ (e, t) => {
3285
+ const n = fe(Te, e.__scopeDialog), r = l.useRef(!1), a = l.useRef(!1);
3286
+ return /* @__PURE__ */ y.jsx(
3287
+ lr,
3288
+ {
3289
+ ...e,
3290
+ ref: t,
3291
+ trapFocus: !1,
3292
+ disableOutsidePointerEvents: !1,
3293
+ onCloseAutoFocus: (o) => {
3294
+ e.onCloseAutoFocus?.(o), o.defaultPrevented || (r.current || n.triggerRef.current?.focus(), o.preventDefault()), r.current = !1, a.current = !1;
3295
+ },
3296
+ onInteractOutside: (o) => {
3297
+ e.onInteractOutside?.(o), o.defaultPrevented || (r.current = !0, o.detail.originalEvent.type === "pointerdown" && (a.current = !0));
3298
+ const s = o.target;
3299
+ n.triggerRef.current?.contains(s) && o.preventDefault(), o.detail.originalEvent.type === "focusin" && a.current && o.preventDefault();
3300
+ }
3301
+ }
3302
+ );
3303
+ }
3304
+ ), lr = l.forwardRef(
3305
+ (e, t) => {
3306
+ const { __scopeDialog: n, trapFocus: r, onOpenAutoFocus: a, onCloseAutoFocus: o, ...s } = e, i = fe(Te, n), c = l.useRef(null), p = _e(t, c);
3307
+ return no(), /* @__PURE__ */ y.jsxs(y.Fragment, { children: [
3308
+ /* @__PURE__ */ y.jsx(
3309
+ Cn,
3310
+ {
3311
+ asChild: !0,
3312
+ loop: !0,
3313
+ trapped: r,
3314
+ onMountAutoFocus: a,
3315
+ onUnmountAutoFocus: o,
3316
+ children: /* @__PURE__ */ y.jsx(
3317
+ En,
3318
+ {
3319
+ role: "dialog",
3320
+ id: i.contentId,
3321
+ "aria-describedby": i.descriptionId,
3322
+ "aria-labelledby": i.titleId,
3323
+ "data-state": Ut(i.open),
3324
+ ...s,
3325
+ ref: p,
3326
+ onDismiss: () => i.onOpenChange(!1)
3327
+ }
3328
+ )
3329
+ }
3330
+ ),
3331
+ /* @__PURE__ */ y.jsxs(y.Fragment, { children: [
3332
+ /* @__PURE__ */ y.jsx($a, { titleId: i.titleId }),
3333
+ /* @__PURE__ */ y.jsx(Wa, { contentRef: c, descriptionId: i.descriptionId })
3334
+ ] })
3335
+ ] });
3336
+ }
3337
+ ), Bt = "DialogTitle", cr = l.forwardRef(
3338
+ (e, t) => {
3339
+ const { __scopeDialog: n, ...r } = e, a = fe(Bt, n);
3340
+ return /* @__PURE__ */ y.jsx(we.h2, { id: a.titleId, ...r, ref: t });
3341
+ }
3342
+ );
3343
+ cr.displayName = Bt;
3344
+ var ur = "DialogDescription", dr = l.forwardRef(
3345
+ (e, t) => {
3346
+ const { __scopeDialog: n, ...r } = e, a = fe(ur, n);
3347
+ return /* @__PURE__ */ y.jsx(we.p, { id: a.descriptionId, ...r, ref: t });
3348
+ }
3349
+ );
3350
+ dr.displayName = ur;
3351
+ var fr = "DialogClose", pr = l.forwardRef(
3352
+ (e, t) => {
3353
+ const { __scopeDialog: n, ...r } = e, a = fe(fr, n);
3354
+ return /* @__PURE__ */ y.jsx(
3355
+ we.button,
3356
+ {
3357
+ type: "button",
3358
+ ...r,
3359
+ ref: t,
3360
+ onClick: Ie(e.onClick, () => a.onOpenChange(!1))
3361
+ }
3362
+ );
3363
+ }
3364
+ );
3365
+ pr.displayName = fr;
3366
+ function Ut(e) {
3367
+ return e ? "open" : "closed";
3368
+ }
3369
+ var mr = "DialogTitleWarning", [Mi, vr] = Hr(mr, {
3370
+ contentName: Te,
3371
+ titleName: Bt,
3372
+ docsSlug: "dialog"
3373
+ }), $a = ({ titleId: e }) => {
3374
+ const t = vr(mr), n = `\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
3375
+
3376
+ If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
3377
+
3378
+ For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;
3379
+ return l.useEffect(() => {
3380
+ if (e) {
3381
+ const r = document.getElementById(e);
3382
+ }
3383
+ }, [n, e]), null;
3384
+ }, Ha = "DialogDescriptionWarning", Wa = ({ contentRef: e, descriptionId: t }) => {
3385
+ const r = `Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${vr(Ha).contentName}}.`;
3386
+ return l.useEffect(() => {
3387
+ const a = e.current?.getAttribute("aria-describedby");
3388
+ if (t && a) {
3389
+ const o = document.getElementById(t);
3390
+ }
3391
+ }, [r, e, t]), null;
3392
+ }, Ba = tr, Ua = rr, Ga = ar, Va = ir, Ka = sr, Xa = cr, qa = dr, gr = pr;
3393
+ function ki({ ...e }) {
3394
+ return /* @__PURE__ */ y.jsx(Ba, { "data-slot": "dialog", ...e });
3395
+ }
3396
+ function Li({ ...e }) {
3397
+ return /* @__PURE__ */ y.jsx(Ua, { "data-slot": "dialog-trigger", ...e });
3398
+ }
3399
+ function Ya({ ...e }) {
3400
+ return /* @__PURE__ */ y.jsx(Ga, { "data-slot": "dialog-portal", ...e });
3401
+ }
3402
+ function Oi({ ...e }) {
3403
+ return /* @__PURE__ */ y.jsx(gr, { "data-slot": "dialog-close", ...e });
3404
+ }
3405
+ function Za({ className: e, backdrop: t, ...n }) {
3406
+ let r = "";
3407
+ switch (t) {
3408
+ case "transparent":
3409
+ r = "bg-transparent";
3410
+ break;
3411
+ case "opaque":
3412
+ r = "bg-black/50";
3413
+ break;
3414
+ case "blur":
3415
+ r = "backdrop-blur-md backdrop-saturate-150 bg-overlay/30";
3416
+ break;
3417
+ }
3418
+ return /* @__PURE__ */ y.jsx(
3419
+ Va,
3420
+ {
3421
+ "data-slot": "dialog-overlay",
3422
+ className: de(
3423
+ "data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",
3424
+ r,
3425
+ e
3426
+ ),
3427
+ ...n
3428
+ }
3429
+ );
3430
+ }
3431
+ const Ti = l.forwardRef(
3432
+ ({ className: e, children: t, showCloseButton: n = !0, disabled: r = !1, backdrop: a = "opaque", ...o }, s) => /* @__PURE__ */ y.jsx(kr, { children: /* @__PURE__ */ y.jsxs(Ya, { "data-slot": "dialog-portal", children: [
3433
+ /* @__PURE__ */ y.jsx(Za, { backdrop: a }),
3434
+ /* @__PURE__ */ y.jsxs(
3435
+ Ka,
3436
+ {
3437
+ "data-slot": "dialog-content",
3438
+ ref: s,
3439
+ className: de(
3440
+ "bg-content1 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg p-6 shadow-lg duration-200 sm:max-w-lg",
3441
+ e
3442
+ ),
3443
+ ...o,
3444
+ children: [
3445
+ t,
3446
+ n && /* @__PURE__ */ y.jsx(gr, { "data-slot": "dialog-close", asChild: !0, className: "absolute top-3 right-4 disabled:pointer-events-none", children: /* @__PURE__ */ y.jsx("div", { children: /* @__PURE__ */ y.jsxs(
3447
+ Mr,
3448
+ {
3449
+ isIconOnly: !0,
3450
+ variant: "light",
3451
+ radius: "full",
3452
+ "aria-label": "Close",
3453
+ disabled: r,
3454
+ className: "p-0 w-[36px] h-[36px] min-w-auto bg-default-100 hover:bg-default-200 text-default-500 hover:text-default-600 dark:bg-default-100 dark:hover:bg-default-200 dark:text-default-500 dark:hover:text-default-600 disabled:opacity-50 disabled:pointer-events-none",
3455
+ children: [
3456
+ /* @__PURE__ */ y.jsxs("svg", { width: "20", height: "20", fill: "currentColor", role: "img", "aria-hidden": "true", children: [
3457
+ /* @__PURE__ */ y.jsx("path", { fill: "none", d: "M0 0h21v21H0z" }),
3458
+ /* @__PURE__ */ y.jsx("path", { d: "m12.12 10 4.07-4.06a1.5 1.5 0 1 0-2.11-2.12L10 7.88 5.94 3.81a1.5 1.5 0 1 0-2.12 2.12L7.88 10l-4.07 4.06a1.5 1.5 0 0 0 0 2.12 1.51 1.51 0 0 0 2.13 0L10 12.12l4.06 4.07a1.45 1.45 0 0 0 1.06.44 1.5 1.5 0 0 0 1.06-2.56Z" })
3459
+ ] }),
3460
+ /* @__PURE__ */ y.jsx("span", { className: "sr-only", children: "Close" })
3461
+ ]
3462
+ }
3463
+ ) }) })
3464
+ ]
3465
+ }
3466
+ )
3467
+ ] }) })
3468
+ );
3469
+ function _i({ className: e, ...t }) {
3470
+ return /* @__PURE__ */ y.jsx("div", { "data-slot": "dialog-header", className: de("flex flex-col gap-2 text-center sm:text-left", e), ...t });
3471
+ }
3472
+ function ji({ className: e, ...t }) {
3473
+ return /* @__PURE__ */ y.jsx("div", { "data-slot": "dialog-footer", className: de("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end", e), ...t });
3474
+ }
3475
+ function Fi({ className: e, ...t }) {
3476
+ return /* @__PURE__ */ y.jsx(Xa, { "data-slot": "dialog-title", className: de("text-lg leading-none font-semibold", e), ...t });
3477
+ }
3478
+ function $i({ className: e, ...t }) {
3479
+ return /* @__PURE__ */ y.jsx(qa, { "data-slot": "dialog-description", className: de("text-muted-foreground text-sm", e), ...t });
3480
+ }
3481
+ var Ja = Object.defineProperty, Qa = Object.defineProperties, ei = Object.getOwnPropertyDescriptors, ft = Object.getOwnPropertySymbols, hr = Object.prototype.hasOwnProperty, yr = Object.prototype.propertyIsEnumerable, mn = (e, t, n) => t in e ? Ja(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, ti = (e, t) => {
3482
+ for (var n in t || (t = {})) hr.call(t, n) && mn(e, n, t[n]);
3483
+ if (ft) for (var n of ft(t)) yr.call(t, n) && mn(e, n, t[n]);
3484
+ return e;
3485
+ }, ni = (e, t) => Qa(e, ei(t)), ri = (e, t) => {
3486
+ var n = {};
3487
+ for (var r in e) hr.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
3488
+ if (e != null && ft) for (var r of ft(e)) t.indexOf(r) < 0 && yr.call(e, r) && (n[r] = e[r]);
3489
+ return n;
3490
+ };
3491
+ function oi(e) {
3492
+ let t = setTimeout(e, 0), n = setTimeout(e, 10), r = setTimeout(e, 50);
3493
+ return [t, n, r];
3494
+ }
3495
+ function ai(e) {
3496
+ let t = l.useRef();
3497
+ return l.useEffect(() => {
3498
+ t.current = e;
3499
+ }), t.current;
3500
+ }
3501
+ var ii = 18, br = 40, si = `${br}px`, li = ["[data-lastpass-icon-root]", "com-1password-button", "[data-dashlanecreated]", '[style$="2147483647 !important;"]'].join(",");
3502
+ function ci({ containerRef: e, inputRef: t, pushPasswordManagerStrategy: n, isFocused: r }) {
3503
+ let [a, o] = l.useState(!1), [s, i] = l.useState(!1), [c, p] = l.useState(!1), m = l.useMemo(() => n === "none" ? !1 : (n === "increase-width" || n === "experimental-no-flickering") && a && s, [a, s, n]), d = l.useCallback(() => {
3504
+ let u = e.current, v = t.current;
3505
+ if (!u || !v || c || n === "none") return;
3506
+ let h = u, f = h.getBoundingClientRect().left + h.offsetWidth, b = h.getBoundingClientRect().top + h.offsetHeight / 2, g = f - ii, S = b;
3507
+ document.querySelectorAll(li).length === 0 && document.elementFromPoint(g, S) === u || (o(!0), p(!0));
3508
+ }, [e, t, c, n]);
3509
+ return l.useEffect(() => {
3510
+ let u = e.current;
3511
+ if (!u || n === "none") return;
3512
+ function v() {
3513
+ let f = window.innerWidth - u.getBoundingClientRect().right;
3514
+ i(f >= br);
3515
+ }
3516
+ v();
3517
+ let h = setInterval(v, 1e3);
3518
+ return () => {
3519
+ clearInterval(h);
3520
+ };
3521
+ }, [e, n]), l.useEffect(() => {
3522
+ let u = r || document.activeElement === t.current;
3523
+ if (n === "none" || !u) return;
3524
+ let v = setTimeout(d, 0), h = setTimeout(d, 2e3), f = setTimeout(d, 5e3), b = setTimeout(() => {
3525
+ p(!0);
3526
+ }, 6e3);
3527
+ return () => {
3528
+ clearTimeout(v), clearTimeout(h), clearTimeout(f), clearTimeout(b);
3529
+ };
3530
+ }, [t, r, n, d]), { hasPWMBadge: a, willPushPWMBadge: m, PWM_BADGE_SPACE_WIDTH: si };
3531
+ }
3532
+ var ui = l.createContext({}), di = l.forwardRef((e, t) => {
3533
+ var n = e, { value: r, onChange: a, maxLength: o, textAlign: s = "left", pattern: i, placeholder: c, inputMode: p = "numeric", onComplete: m, pushPasswordManagerStrategy: d = "increase-width", pasteTransformer: u, containerClassName: v, noScriptCSSFallback: h = fi, render: f, children: b } = n, g = ri(n, ["value", "onChange", "maxLength", "textAlign", "pattern", "placeholder", "inputMode", "onComplete", "pushPasswordManagerStrategy", "pasteTransformer", "containerClassName", "noScriptCSSFallback", "render", "children"]), S, E, R, L, I;
3534
+ let [x, F] = l.useState(typeof g.defaultValue == "string" ? g.defaultValue : ""), k = r ?? x, _ = ai(k), B = l.useCallback((P) => {
3535
+ a?.(P), F(P);
3536
+ }, [a]), T = l.useMemo(() => i ? typeof i == "string" ? new RegExp(i) : i : null, [i]), j = l.useRef(null), X = l.useRef(null), U = l.useRef({ value: k, onChange: B, isIOS: typeof window < "u" && ((E = (S = window?.CSS) == null ? void 0 : S.supports) == null ? void 0 : E.call(S, "-webkit-touch-callout", "none")) }), q = l.useRef({ prev: [(R = j.current) == null ? void 0 : R.selectionStart, (L = j.current) == null ? void 0 : L.selectionEnd, (I = j.current) == null ? void 0 : I.selectionDirection] });
3537
+ l.useImperativeHandle(t, () => j.current, []), l.useEffect(() => {
3538
+ let P = j.current, A = X.current;
3539
+ if (!P || !A) return;
3540
+ U.current.value !== P.value && U.current.onChange(P.value), q.current.prev = [P.selectionStart, P.selectionEnd, P.selectionDirection];
3541
+ function Z() {
3542
+ if (document.activeElement !== P) {
3543
+ ce(null), N(null);
3544
+ return;
3545
+ }
3546
+ let W = P.selectionStart, ee = P.selectionEnd, ve = P.selectionDirection, re = P.maxLength, ye = P.value, be = q.current.prev, Ee = -1, Se = -1, Ae;
3547
+ if (ye.length !== 0 && W !== null && ee !== null) {
3548
+ let wr = W === ee, Er = W === ye.length && ye.length < re;
3549
+ if (wr && !Er) {
3550
+ let Me = W;
3551
+ if (Me === 0) Ee = 0, Se = 1, Ae = "forward";
3552
+ else if (Me === re) Ee = Me - 1, Se = Me, Ae = "backward";
3553
+ else if (re > 1 && ye.length > 1) {
3554
+ let wt = 0;
3555
+ if (be[0] !== null && be[1] !== null) {
3556
+ Ae = Me < be[1] ? "backward" : "forward";
3557
+ let Sr = be[0] === be[1] && be[0] < re;
3558
+ Ae === "backward" && !Sr && (wt = -1);
3559
+ }
3560
+ Ee = wt + Me, Se = wt + Me + 1;
3561
+ }
3562
+ }
3563
+ Ee !== -1 && Se !== -1 && Ee !== Se && j.current.setSelectionRange(Ee, Se, Ae);
3564
+ }
3565
+ let Gt = Ee !== -1 ? Ee : W, Vt = Se !== -1 ? Se : ee, xr = Ae ?? ve;
3566
+ ce(Gt), N(Vt), q.current.prev = [Gt, Vt, xr];
3567
+ }
3568
+ if (document.addEventListener("selectionchange", Z, { capture: !0 }), Z(), document.activeElement === P && he(!0), !document.getElementById("input-otp-style")) {
3569
+ let W = document.createElement("style");
3570
+ if (W.id = "input-otp-style", document.head.appendChild(W), W.sheet) {
3571
+ let ee = "background: transparent !important; color: transparent !important; border-color: transparent !important; opacity: 0 !important; box-shadow: none !important; -webkit-box-shadow: none !important; -webkit-text-fill-color: transparent !important;";
3572
+ Ke(W.sheet, "[data-input-otp]::selection { background: transparent !important; color: transparent !important; }"), Ke(W.sheet, `[data-input-otp]:autofill { ${ee} }`), Ke(W.sheet, `[data-input-otp]:-webkit-autofill { ${ee} }`), Ke(W.sheet, "@supports (-webkit-touch-callout: none) { [data-input-otp] { letter-spacing: -.6em !important; font-weight: 100 !important; font-stretch: ultra-condensed; font-optical-sizing: none !important; left: -1px !important; right: 1px !important; } }"), Ke(W.sheet, "[data-input-otp] + * { pointer-events: all !important; }");
3573
+ }
3574
+ }
3575
+ let Q = () => {
3576
+ A && A.style.setProperty("--root-height", `${P.clientHeight}px`);
3577
+ };
3578
+ Q();
3579
+ let H = new ResizeObserver(Q);
3580
+ return H.observe(P), () => {
3581
+ document.removeEventListener("selectionchange", Z, { capture: !0 }), H.disconnect();
3582
+ };
3583
+ }, []);
3584
+ let [pe, me] = l.useState(!1), [J, he] = l.useState(!1), [te, ce] = l.useState(null), [w, N] = l.useState(null);
3585
+ l.useEffect(() => {
3586
+ oi(() => {
3587
+ var P, A, Z, Q;
3588
+ (P = j.current) == null || P.dispatchEvent(new Event("input"));
3589
+ let H = (A = j.current) == null ? void 0 : A.selectionStart, W = (Z = j.current) == null ? void 0 : Z.selectionEnd, ee = (Q = j.current) == null ? void 0 : Q.selectionDirection;
3590
+ H !== null && W !== null && (ce(H), N(W), q.current.prev = [H, W, ee]);
3591
+ });
3592
+ }, [k, J]), l.useEffect(() => {
3593
+ _ !== void 0 && k !== _ && _.length < o && k.length === o && m?.(k);
3594
+ }, [o, m, _, k]);
3595
+ let D = ci({ containerRef: X, inputRef: j, pushPasswordManagerStrategy: d, isFocused: J }), z = l.useCallback((P) => {
3596
+ let A = P.currentTarget.value.slice(0, o);
3597
+ if (A.length > 0 && T && !T.test(A)) {
3598
+ P.preventDefault();
3599
+ return;
3600
+ }
3601
+ typeof _ == "string" && A.length < _.length && document.dispatchEvent(new Event("selectionchange")), B(A);
3602
+ }, [o, B, _, T]), C = l.useCallback(() => {
3603
+ var P;
3604
+ if (j.current) {
3605
+ let A = Math.min(j.current.value.length, o - 1), Z = j.current.value.length;
3606
+ (P = j.current) == null || P.setSelectionRange(A, Z), ce(A), N(Z);
3607
+ }
3608
+ he(!0);
3609
+ }, [o]), M = l.useCallback((P) => {
3610
+ var A, Z;
3611
+ let Q = j.current;
3612
+ if (!u && (!U.current.isIOS || !P.clipboardData || !Q)) return;
3613
+ let H = P.clipboardData.getData("text/plain"), W = u ? u(H) : H;
3614
+ P.preventDefault();
3615
+ let ee = (A = j.current) == null ? void 0 : A.selectionStart, ve = (Z = j.current) == null ? void 0 : Z.selectionEnd, re = (ee !== ve ? k.slice(0, ee) + W + k.slice(ve) : k.slice(0, ee) + W + k.slice(ee)).slice(0, o);
3616
+ if (re.length > 0 && T && !T.test(re)) return;
3617
+ Q.value = re, B(re);
3618
+ let ye = Math.min(re.length, o - 1), be = re.length;
3619
+ Q.setSelectionRange(ye, be), ce(ye), N(be);
3620
+ }, [o, B, T, k]), $ = l.useMemo(() => ({ position: "relative", cursor: g.disabled ? "default" : "text", userSelect: "none", WebkitUserSelect: "none", pointerEvents: "none" }), [g.disabled]), K = l.useMemo(() => ({ position: "absolute", inset: 0, width: D.willPushPWMBadge ? `calc(100% + ${D.PWM_BADGE_SPACE_WIDTH})` : "100%", clipPath: D.willPushPWMBadge ? `inset(0 ${D.PWM_BADGE_SPACE_WIDTH} 0 0)` : void 0, height: "100%", display: "flex", textAlign: s, opacity: "1", color: "transparent", pointerEvents: "all", background: "transparent", caretColor: "transparent", border: "0 solid transparent", outline: "0 solid transparent", boxShadow: "none", lineHeight: "1", letterSpacing: "-.5em", fontSize: "var(--root-height)", fontFamily: "monospace", fontVariantNumeric: "tabular-nums" }), [D.PWM_BADGE_SPACE_WIDTH, D.willPushPWMBadge, s]), le = l.useMemo(() => l.createElement("input", ni(ti({ autoComplete: g.autoComplete || "one-time-code" }, g), { "data-input-otp": !0, "data-input-otp-placeholder-shown": k.length === 0 || void 0, "data-input-otp-mss": te, "data-input-otp-mse": w, inputMode: p, pattern: T?.source, "aria-placeholder": c, style: K, maxLength: o, value: k, ref: j, onPaste: (P) => {
3621
+ var A;
3622
+ M(P), (A = g.onPaste) == null || A.call(g, P);
3623
+ }, onChange: z, onMouseOver: (P) => {
3624
+ var A;
3625
+ me(!0), (A = g.onMouseOver) == null || A.call(g, P);
3626
+ }, onMouseLeave: (P) => {
3627
+ var A;
3628
+ me(!1), (A = g.onMouseLeave) == null || A.call(g, P);
3629
+ }, onFocus: (P) => {
3630
+ var A;
3631
+ C(), (A = g.onFocus) == null || A.call(g, P);
3632
+ }, onBlur: (P) => {
3633
+ var A;
3634
+ he(!1), (A = g.onBlur) == null || A.call(g, P);
3635
+ } })), [z, C, M, p, K, o, w, te, g, T?.source, k]), ne = l.useMemo(() => ({ slots: Array.from({ length: o }).map((P, A) => {
3636
+ var Z;
3637
+ let Q = J && te !== null && w !== null && (te === w && A === te || A >= te && A < w), H = k[A] !== void 0 ? k[A] : null, W = k[0] !== void 0 ? null : (Z = c?.[A]) != null ? Z : null;
3638
+ return { char: H, placeholderChar: W, isActive: Q, hasFakeCaret: Q && H === null };
3639
+ }), isFocused: J, isHovering: !g.disabled && pe }), [J, pe, o, w, te, g.disabled, k]), G = l.useMemo(() => f ? f(ne) : l.createElement(ui.Provider, { value: ne }, b), [b, ne, f]);
3640
+ return l.createElement(l.Fragment, null, h !== null && l.createElement("noscript", null, l.createElement("style", null, h)), l.createElement("div", { ref: X, "data-input-otp-container": !0, style: $, className: v }, G, l.createElement("div", { style: { position: "absolute", inset: 0, pointerEvents: "none" } }, le)));
3641
+ });
3642
+ di.displayName = "Input";
3643
+ function Ke(e, t) {
3644
+ try {
3645
+ e.insertRule(t);
3646
+ } catch {
3647
+ }
3648
+ }
3649
+ var fi = `
3650
+ [data-input-otp] {
3651
+ --nojs-bg: white !important;
3652
+ --nojs-fg: black !important;
3653
+
3654
+ background-color: var(--nojs-bg) !important;
3655
+ color: var(--nojs-fg) !important;
3656
+ caret-color: var(--nojs-fg) !important;
3657
+ letter-spacing: .25em !important;
3658
+ text-align: center !important;
3659
+ border: 1px solid var(--nojs-fg) !important;
3660
+ border-radius: 4px !important;
3661
+ width: 100% !important;
3662
+ }
3663
+ @media (prefers-color-scheme: dark) {
3664
+ [data-input-otp] {
3665
+ --nojs-bg: black !important;
3666
+ --nojs-fg: white !important;
3667
+ }
3668
+ }`;
3669
+ const pi = l.forwardRef(
3670
+ ({
3671
+ className: e,
3672
+ classNameContainer: t,
3673
+ label: n,
3674
+ id: r,
3675
+ disabled: a,
3676
+ error: o,
3677
+ touched: s,
3678
+ startContent: i,
3679
+ endContent: c,
3680
+ startClassName: p,
3681
+ endClassName: m,
3682
+ onClear: d,
3683
+ required: u = !1,
3684
+ isClearable: v = !1,
3685
+ value: h,
3686
+ defaultValue: f,
3687
+ ...b
3688
+ }, g) => {
3689
+ const S = l.useId(), E = r || S, R = h !== void 0, L = !a && !!o && s, I = de("block font-normal text-sm text-foreground mb-1", {
3690
+ "text-danger": L
3691
+ }), x = Ne("absolute top-0 h-full flex items-center cursor-pointer px-1.5 z-[1]", {
3692
+ "text-red-700": L,
3693
+ "text-gray-400": a,
3694
+ "text-green-700": !o && s,
3695
+ "text-gray-500": !L
3696
+ }), F = Ne(i && "pl-8", !i && "pl-2.5", c && "pr-8", !c && "pr-2.5"), k = (_) => {
3697
+ a || (_.preventDefault(), d?.());
3698
+ };
3699
+ return /* @__PURE__ */ y.jsxs("div", { className: se("w-full relative flex flex-col", t), children: [
3700
+ n && /* @__PURE__ */ y.jsxs("label", { htmlFor: E, className: I, children: [
3701
+ n,
3702
+ " ",
3703
+ u && /* @__PURE__ */ y.jsx("span", { className: "text-danger", children: "*" })
3704
+ ] }),
3705
+ /* @__PURE__ */ y.jsxs("div", { className: "w-full relative", children: [
3706
+ i && /* @__PURE__ */ y.jsx("div", { className: se("left-1", x, p), children: i }),
3707
+ /* @__PURE__ */ y.jsx(
3708
+ "textarea",
3709
+ {
3710
+ "data-slot": "textarea",
3711
+ id: E,
3712
+ ref: g,
3713
+ ...R ? { value: h } : { defaultValue: f },
3714
+ className: de(
3715
+ "border-input placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 flex field-sizing-content min-h-16 w-full rounded-md border bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",
3716
+ F,
3717
+ e
3718
+ ),
3719
+ ...b
3720
+ }
3721
+ ),
3722
+ v && !a && h ? /* @__PURE__ */ y.jsx(
3723
+ "div",
3724
+ {
3725
+ className: se(
3726
+ "absolute top-0 h-full flex items-center px-1.5 z-[1] opacity-70 hover:opacity-100 cursor-pointer rounded-full",
3727
+ "right-1",
3728
+ a ? "opacity-50 cursor-not-allowed" : "opacity-70 hover:opacity-100 cursor-pointer"
3729
+ // Estilo normal
3730
+ ),
3731
+ onClick: k,
3732
+ children: /* @__PURE__ */ y.jsx("svg", { "aria-hidden": "true", focusable: "false", height: "18", viewBox: "0 0 24 24", width: "18", children: /* @__PURE__ */ y.jsx(
3733
+ "path",
3734
+ {
3735
+ d: "M12 2a10 10 0 1010 10A10.016 10.016 0 0012 2zm3.36 12.3a.754.754 0 010 1.06.748.748 0 01-1.06 0l-2.3-2.3-2.3 2.3a.748.748 0 01-1.06 0 .754.754 0 010-1.06l2.3-2.3-2.3-2.3A.75.75 0 019.7 8.64l2.3 2.3 2.3-2.3a.75.75 0 011.06 1.06l-2.3 2.3z",
3736
+ fill: "currentColor"
3737
+ }
3738
+ ) })
3739
+ }
3740
+ ) : null,
3741
+ c && /* @__PURE__ */ y.jsx("div", { className: se("right-1", x, m), children: c })
3742
+ ] })
3743
+ ] });
3744
+ }
3745
+ );
3746
+ pi.displayName = "Textarea";
3747
+ export {
3748
+ Oi as A,
3749
+ Ii as B,
3750
+ Ka as C,
3751
+ En as D,
3752
+ ji as E,
3753
+ Cn as F,
3754
+ Za as G,
3755
+ Ya as H,
3756
+ Tr as I,
3757
+ Li as J,
3758
+ pi as K,
3759
+ di as L,
3760
+ Va as O,
3761
+ we as P,
3762
+ On as R,
3763
+ $r as S,
3764
+ Ua as T,
3765
+ Mi as W,
3766
+ Ze as a,
3767
+ Gr as b,
3768
+ Wr as c,
3769
+ Rt as d,
3770
+ Rn as e,
3771
+ Ie as f,
3772
+ no as g,
3773
+ xo as h,
3774
+ pt as i,
3775
+ jr as j,
3776
+ Aa as k,
3777
+ aa as l,
3778
+ ka as m,
3779
+ Ba as n,
3780
+ Ga as o,
3781
+ ki as p,
3782
+ _i as q,
3783
+ Fi as r,
3784
+ $i as s,
3785
+ Ti as t,
3786
+ Ye as u,
3787
+ ui as v,
3788
+ gr as w,
3789
+ Xa as x,
3790
+ qa as y,
3791
+ Ai as z
3792
+ };
3793
+ //# sourceMappingURL=textarea-ClUh9LtQ.js.map