@udixio/ui-react 2.8.3 → 2.8.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { jsx as m, jsxs as Y, Fragment as me } from "react/jsx-runtime";
2
2
  import { clsx as Oe } from "clsx";
3
3
  import { extendTailwindMerge as ut } from "tailwind-merge";
4
- import Z, { useMemo as Me, useState as $, useEffect as R, useRef as W, useLayoutEffect as Ve, isValidElement as pe, cloneElement as xe, Children as dt, Fragment as ft } from "react";
4
+ import Z, { useMemo as Me, useState as M, useEffect as $, useRef as W, useLayoutEffect as Ve, isValidElement as pe, cloneElement as xe, Children as dt, Fragment as ft } from "react";
5
5
  import { motion as q, AnimatePresence as se, useScroll as mt, useMotionValueEvent as Be, animate as ht } from "motion/react";
6
6
  import { animate as pt } from "motion";
7
7
  import { createPortal as Ye } from "react-dom";
@@ -40,22 +40,22 @@ function Lt(e) {
40
40
  }
41
41
  const $e = (e) => {
42
42
  const t = {};
43
- e.classNameList.forEach((l) => {
43
+ e.classNameList.forEach((o) => {
44
44
  var r;
45
- if (l)
46
- if (typeof l == "string")
47
- (t[r = e.default] ?? (t[r] = [])).push(l);
45
+ if (o)
46
+ if (typeof o == "string")
47
+ (t[r = e.default] ?? (t[r] = [])).push(o);
48
48
  else {
49
- const s = l(e.states);
49
+ const s = o(e.states);
50
50
  Object.entries(s).map((c) => {
51
- const [a, u] = c;
52
- (t[a] ?? (t[a] = [])).push(u);
51
+ const [a, i] = c;
52
+ (t[a] ?? (t[a] = [])).push(i);
53
53
  });
54
54
  }
55
55
  });
56
56
  const n = t;
57
- return Object.entries(t).map((l) => {
58
- let [r, s] = l;
57
+ return Object.entries(t).map((o) => {
58
+ let [r, s] = o;
59
59
  s = s.reverse(), r == e.default && s.unshift("relative"), s.unshift(Lt(r)), n[r] = bt(...s);
60
60
  }), n;
61
61
  }, Q = (e, t) => (n) => $e({
@@ -84,36 +84,36 @@ const je = ({
84
84
  variant: e,
85
85
  disableTextMargins: t,
86
86
  disabled: n,
87
- iconPosition: l,
87
+ iconPosition: o,
88
88
  icon: r,
89
89
  isActive: s,
90
90
  loading: c,
91
91
  shape: a,
92
- onToggle: u,
93
- size: o,
94
- allowShapeTransformation: p
92
+ onToggle: i,
93
+ size: l,
94
+ allowShapeTransformation: h
95
95
  }) => ({
96
96
  button: y(
97
97
  " relative cursor-pointer group/button outline-none inline-block flex justify-center items-center ",
98
- o === "xSmall" && "text-label-large px-3 py-1.5 gap-1",
99
- o === "small" && "text-label-large px-4 py-2.5 gap-2",
100
- o === "medium" && "text-title-medium px-6 py-4 gap-2",
101
- o === "large" && "text-headline-small px-12 py-8 gap-3",
102
- o === "xLarge" && "text-headline-large px-16 py-12 gap-4",
98
+ l === "xSmall" && "text-label-large px-3 py-1.5 gap-1",
99
+ l === "small" && "text-label-large px-4 py-2.5 gap-2",
100
+ l === "medium" && "text-title-medium px-6 py-4 gap-2",
101
+ l === "large" && "text-headline-small px-12 py-8 gap-3",
102
+ l === "xLarge" && "text-headline-large px-16 py-12 gap-4",
103
103
  a === "rounded" && {
104
- "rounded-[30px]": o === "xSmall" || o == "small",
105
- "rounded-[40px]": o === "medium",
106
- "rounded-[70px]": o === "large" || o == "xLarge"
104
+ "rounded-[30px]": l === "xSmall" || l == "small",
105
+ "rounded-[40px]": l === "medium",
106
+ "rounded-[70px]": l === "large" || l == "xLarge"
107
107
  },
108
- (a === "squared" || p && s) && {
109
- "rounded-[12px]": o === "xSmall" || o == "small",
110
- "rounded-[16px]": o === "medium",
111
- "rounded-[28px]": o === "large" || o == "xLarge"
108
+ (a === "squared" || h && s) && {
109
+ "rounded-[12px]": l === "xSmall" || l == "small",
110
+ "rounded-[16px]": l === "medium",
111
+ "rounded-[28px]": l === "large" || l == "xLarge"
112
112
  },
113
- p && !n && {
114
- "active:rounded-[12px]": o === "xSmall" || o == "small",
115
- "active:rounded-[16px]": o === "medium",
116
- "active:rounded-[28px]": o === "large" || o == "xLarge"
113
+ h && !n && {
114
+ "active:rounded-[12px]": l === "xSmall" || l == "small",
115
+ "active:rounded-[16px]": l === "medium",
116
+ "active:rounded-[28px]": l === "large" || l == "xLarge"
117
117
  },
118
118
  e === "elevated" && {
119
119
  "shadow-1 hover:shadow-2": !n,
@@ -123,8 +123,8 @@ const je = ({
123
123
  },
124
124
  e === "filled" && {
125
125
  "hover:shadow-1": !n,
126
- "bg-surface-container text-on-surface-variant": !n && !s && u,
127
- "bg-primary text-on-primary": !n && (s && u || !u),
126
+ "bg-surface-container text-on-surface-variant": !n && !s && i,
127
+ "bg-primary text-on-primary": !n && (s && i || !i),
128
128
  "text-on-surface/[38%]": n
129
129
  },
130
130
  e === "tonal" && {
@@ -148,11 +148,11 @@ const je = ({
148
148
  "text-on-surface/[0.38]": n
149
149
  },
150
150
  t && [
151
- o === "xSmall" && "-mx-3 ",
152
- o === "small" && "-mx-4 ",
153
- o === "medium" && "-mx-6 ",
154
- o === "large" && "-mx-12",
155
- o === "xLarge" && "-mx-16 "
151
+ l === "xSmall" && "-mx-3 ",
152
+ l === "small" && "-mx-4 ",
153
+ l === "medium" && "-mx-6 ",
154
+ l === "large" && "-mx-12",
155
+ l === "xLarge" && "-mx-16 "
156
156
  // size === 'small' && ' -my-2.5',
157
157
  // size === 'medium' && ' -my-4',
158
158
  // size === 'large' && '-my-8',
@@ -167,29 +167,29 @@ const je = ({
167
167
  stateLayer: y(
168
168
  "overflow-hidden",
169
169
  a === "rounded" && {
170
- "rounded-[30px]": o === "xSmall" || o == "small",
171
- "rounded-[40px]": o === "medium",
172
- "rounded-[70px]": o === "large" || o == "xLarge"
170
+ "rounded-[30px]": l === "xSmall" || l == "small",
171
+ "rounded-[40px]": l === "medium",
172
+ "rounded-[70px]": l === "large" || l == "xLarge"
173
173
  },
174
- (a === "squared" || p && s) && {
175
- "rounded-[12px]": o === "xSmall" || o == "small",
176
- "rounded-[16px]": o === "medium",
177
- "rounded-[28px]": o === "large" || o == "xLarge"
174
+ (a === "squared" || h && s) && {
175
+ "rounded-[12px]": l === "xSmall" || l == "small",
176
+ "rounded-[16px]": l === "medium",
177
+ "rounded-[28px]": l === "large" || l == "xLarge"
178
178
  },
179
- p && !n && {
180
- "group-active/button:rounded-[12px]": o === "xSmall" || o == "small",
181
- "group-active/button:rounded-[16px]": o === "medium",
182
- "group-active/button:rounded-[28px]": o === "large" || o == "xLarge"
179
+ h && !n && {
180
+ "group-active/button:rounded-[12px]": l === "xSmall" || l == "small",
181
+ "group-active/button:rounded-[16px]": l === "medium",
182
+ "group-active/button:rounded-[28px]": l === "large" || l == "xLarge"
183
183
  }
184
184
  ),
185
185
  label: y({ invisible: c }),
186
186
  icon: y(
187
187
  { invisible: c },
188
- o === "xSmall" && "size-5",
189
- o === "small" && "size-5",
190
- o === "medium" && "size-6",
191
- o === "large" && "size-8",
192
- o === "xLarge" && "size-10"
188
+ l === "xSmall" && "size-5",
189
+ l === "small" && "size-5",
190
+ l === "medium" && "size-6",
191
+ l === "large" && "size-8",
192
+ l === "xLarge" && "size-10"
193
193
  )
194
194
  }), $n = Q(
195
195
  "button",
@@ -302,7 +302,7 @@ const je = ({
302
302
  variant: e,
303
303
  disabled: t,
304
304
  onToggle: n,
305
- isActive: l,
305
+ isActive: o,
306
306
  size: r,
307
307
  width: s,
308
308
  shape: c,
@@ -319,7 +319,7 @@ const je = ({
319
319
  "rounded-[40px]": r === "medium",
320
320
  "rounded-[70px]": r === "large" || r == "xLarge"
321
321
  },
322
- (c === "squared" || a && l) && {
322
+ (c === "squared" || a && o) && {
323
323
  "rounded-[12px]": r === "xSmall" || r == "small",
324
324
  "rounded-[16px]": r === "medium",
325
325
  "rounded-[28px]": r === "large" || r == "xLarge"
@@ -331,26 +331,26 @@ const je = ({
331
331
  },
332
332
  e === "filled" && [
333
333
  !t && {
334
- "bg-surface-container": !l && !!n,
335
- "bg-primary": l || !n
334
+ "bg-surface-container": !o && !!n,
335
+ "bg-primary": o || !n
336
336
  },
337
337
  !!t && "bg-on-surface/[0.12]"
338
338
  ],
339
339
  e === "tonal" && [
340
340
  !t && {
341
- "bg-secondary-container text-on-secondary-container": !l && !!n,
342
- "bg-secondary text-on-secondary": l || !n
341
+ "bg-secondary-container text-on-secondary-container": !o && !!n,
342
+ "bg-secondary text-on-secondary": o || !n
343
343
  },
344
344
  !!t && "bg-on-surface/[0.12]"
345
345
  ],
346
346
  e === "outlined" && [
347
347
  !t && {
348
- "border border-outline": !l,
349
- "border border-transparent bg-inverse-surface": l
348
+ "border border-outline": !o,
349
+ "border border-transparent bg-inverse-surface": o
350
350
  },
351
351
  !!t && {
352
- "border border-on-surface/[0.12]": !l,
353
- "border border-transparent bg-on-surface/[0.12]": l
352
+ "border border-on-surface/[0.12]": !o,
353
+ "border border-transparent bg-on-surface/[0.12]": o
354
354
  }
355
355
  ]
356
356
  ),
@@ -359,12 +359,12 @@ const je = ({
359
359
  ),
360
360
  stateLayer: y(
361
361
  "absolute top-0 left-0 h-full w-full overflow-hidden",
362
- (c === "rounded" || c === "squared" && n && !t && l && a) && {
362
+ (c === "rounded" || c === "squared" && n && !t && o && a) && {
363
363
  "rounded-[30px]": r === "xSmall" || r == "small",
364
364
  "rounded-[40px]": r === "medium",
365
365
  "rounded-[70px]": r === "large" || r == "xLarge"
366
366
  },
367
- (c === "squared" || c === "rounded" && n && !t && l && a) && {
367
+ (c === "squared" || c === "rounded" && n && !t && o && a) && {
368
368
  "rounded-[12px]": r === "xSmall" || r == "small",
369
369
  "rounded-[16px]": r === "medium",
370
370
  "rounded-[28px]": r === "large" || r == "xLarge"
@@ -376,20 +376,20 @@ const je = ({
376
376
  },
377
377
  !t && [
378
378
  e === "standard" && {
379
- "state-on-surface-variant": !l,
380
- "state-primary": l
379
+ "state-on-surface-variant": !o,
380
+ "state-primary": o
381
381
  },
382
382
  e === "filled" && {
383
- "state-primary": !l && !!n,
384
- "state-inverse-on-surface": l || !n
383
+ "state-primary": !o && !!n,
384
+ "state-inverse-on-surface": o || !n
385
385
  },
386
386
  e === "tonal" && {
387
- "state-on-surface-variant": !l && !!n,
388
- "state-on-secondary-container": l || !n
387
+ "state-on-surface-variant": !o && !!n,
388
+ "state-on-secondary-container": o || !n
389
389
  },
390
390
  e === "outlined" && {
391
- "state-on-surface-variant": !l,
392
- "state-on-primary": l
391
+ "state-on-surface-variant": !o,
392
+ "state-on-primary": o
393
393
  }
394
394
  ]
395
395
  ),
@@ -416,16 +416,16 @@ const je = ({
416
416
  ],
417
417
  !t && [
418
418
  e === "standard" && {
419
- "text-on-surface-variant": !l,
420
- "text-primary": l
419
+ "text-on-surface-variant": !o,
420
+ "text-primary": o
421
421
  },
422
422
  e === "filled" && {
423
- "text-primary": !l && !!n,
424
- "text-on-primary": l || !n
423
+ "text-primary": !o && !!n,
424
+ "text-on-primary": o || !n
425
425
  },
426
426
  e === "outlined" && {
427
- "text-on-surface-variant": !l,
428
- "text-inverse-on-surface": l
427
+ "text-on-surface-variant": !o,
428
+ "text-inverse-on-surface": o
429
429
  }
430
430
  ],
431
431
  !!t && "text-on-surface/[0.38]"
@@ -597,62 +597,62 @@ const je = ({
597
597
  isSelected: e,
598
598
  icon: t,
599
599
  label: n,
600
- variant: l
600
+ variant: o
601
601
  }) => ({
602
602
  tab: y(
603
603
  "flex-1 group/tab outline-none flex px-4 justify-center items-center cursor-pointer",
604
604
  { "z-10": e },
605
- !!(t && n) && l === "primary" && "h-16",
606
- !(t && n && l === "primary") && "h-12"
605
+ !!(t && n) && o === "primary" && "h-16",
606
+ !(t && n && o === "primary") && "h-12"
607
607
  ),
608
608
  stateLayer: y(
609
609
  "absolute w-full h-full overflow-hidden left-1/2 top-1/2 transform -translate-y-1/2 -translate-x-1/2",
610
- l === "primary" && {
610
+ o === "primary" && {
611
611
  "group-hover/tab:hover-state-on-surface group-focus-visible/tab:focus-state-on-surface": !e,
612
612
  "group-hover/tab:hover-state-primary group-focus-visible/tab:focus-state-primary": e
613
613
  },
614
- l === "secondary" && "group-hover/tab:hover-state-on-surface group-focus-visible/tab:focus-state-on-surface"
614
+ o === "secondary" && "group-hover/tab:hover-state-on-surface group-focus-visible/tab:focus-state-on-surface"
615
615
  ),
616
616
  content: y(
617
617
  "flex gap-0.5 h-full justify-center",
618
618
  {
619
- relative: l == "primary"
619
+ relative: o == "primary"
620
620
  },
621
621
  {
622
622
  "": !!(n && !t)
623
623
  },
624
- l === "primary" && "flex-col items-center",
625
- l === "secondary" && {
624
+ o === "primary" && "flex-col items-center",
625
+ o === "secondary" && {
626
626
  "flex-col items-center": !(n && t),
627
627
  "flex-row items-center gap-2": !!(n && t)
628
628
  }
629
629
  ),
630
630
  icon: y(
631
631
  "h-6 w-6 p-0.5 !box-border",
632
- l === "primary" && {
632
+ o === "primary" && {
633
633
  "text-on-surface-variant": !e,
634
634
  "text-primary": e
635
635
  },
636
- l === "secondary" && {
636
+ o === "secondary" && {
637
637
  "text-on-surface-variant": !e,
638
638
  "text-on-surface": e
639
639
  }
640
640
  ),
641
641
  label: y(
642
642
  "text-title-small text-nowrap",
643
- l === "primary" && {
643
+ o === "primary" && {
644
644
  "text-on-surface-variant": !e,
645
645
  "text-primary": e
646
646
  },
647
- l === "secondary" && {
647
+ o === "secondary" && {
648
648
  "text-on-surface-variant": !e,
649
649
  "text-on-surface": e
650
650
  }
651
651
  ),
652
652
  underline: y(
653
653
  "bg-primary absolute w-full left-0 bottom-0",
654
- l === "primary" && "h-[3px] rounded-t",
655
- l === "secondary" && "h-0.5"
654
+ o === "primary" && "h-[3px] rounded-t",
655
+ o === "secondary" && "h-0.5"
656
656
  )
657
657
  }), Xn = Q("tab", rt), Pt = J("tab", rt), ot = ({ scrollable: e }) => ({
658
658
  tabs: y(
@@ -667,31 +667,31 @@ const je = ({
667
667
  disabled: e,
668
668
  leadingIcon: t,
669
669
  trailingIcon: n,
670
- variant: l,
670
+ variant: o,
671
671
  errorText: r,
672
672
  isFocused: s,
673
673
  value: c,
674
674
  suffix: a,
675
- textLine: u
675
+ textLine: i
676
676
  }) => ({
677
677
  textField: y({
678
678
  "opacity-[.38]": e
679
679
  }),
680
680
  content: y(
681
681
  "group/text-field transition-border duration-200 relative flex items-center ",
682
- { "h-14": u == "singleLine" },
682
+ { "h-14": i == "singleLine" },
683
683
  {
684
- "border-on-surface-variant": !(r != null && r.length) && !s && l == "filled",
685
- "border-outline": !(r != null && r.length) && !s && l == "outlined",
684
+ "border-on-surface-variant": !(r != null && r.length) && !s && o == "filled",
685
+ "border-outline": !(r != null && r.length) && !s && o == "outlined",
686
686
  "border-primary": !(r != null && r.length) && s,
687
687
  "border-error": !!(r != null && r.length)
688
688
  },
689
689
  { "bg-on-surface/[0.04]": e },
690
- l == "filled" && [
690
+ o == "filled" && [
691
691
  "rounded-t overflow-hidden border-b",
692
692
  { "bg-surface-container-highest": !e }
693
693
  ],
694
- l == "outlined" && [
694
+ o == "outlined" && [
695
695
  "border rounded box-border",
696
696
  {
697
697
  "border-[3px]": s
@@ -701,7 +701,7 @@ const je = ({
701
701
  stateLayer: y(
702
702
  "absolute -z-10 w-full h-full top-0 left-0",
703
703
  {
704
- hidden: l == "outlined"
704
+ hidden: o == "outlined"
705
705
  },
706
706
  {
707
707
  "group-state-on-surface": !e,
@@ -724,12 +724,12 @@ const je = ({
724
724
  {
725
725
  "pr-0": !!a
726
726
  },
727
- l == "filled" && " pb-2 pt-6",
728
- l == "outlined" && "py-4 relative z-10"
727
+ o == "filled" && " pb-2 pt-6",
728
+ o == "outlined" && "py-4 relative z-10"
729
729
  ),
730
730
  activeIndicator: y(
731
731
  "absolute w-0 inset-x-0 border-rounded mx-auto bottom-0",
732
- l == "filled" && [
732
+ o == "filled" && [
733
733
  "h-[2px] transition-all duration-300",
734
734
  { "bg-primary": !(r != null && r.length) },
735
735
  { "bg-error": !!(r != null && r.length) },
@@ -752,8 +752,8 @@ const je = ({
752
752
  }),
753
753
  suffix: y(
754
754
  "text-on-surface-variant pl-0 pr-4",
755
- l == "filled" && " pb-2 pt-6",
756
- l == "outlined" && "py-4 relative z-10"
755
+ o == "filled" && " pb-2 pt-6",
756
+ o == "outlined" && "py-4 relative z-10"
757
757
  )
758
758
  }), qn = Q(
759
759
  "textField",
@@ -794,11 +794,11 @@ const je = ({
794
794
  at
795
795
  ), ie = ({ icon: e, colors: t = [], className: n }) => {
796
796
  if (typeof e == "string") {
797
- let o = e;
798
- return t[0] && (o = o.replace(
797
+ let l = e;
798
+ return t[0] && (l = l.replace(
799
799
  /<svg([^>]*)>/,
800
800
  `<svg$1 fill="${t[0]}" color="${t[0]}">`
801
- ), o = o.replace(
801
+ ), l = l.replace(
802
802
  /<path([^>]*?)>/g,
803
803
  '<path$1 fill="currentColor">'
804
804
  )), /* @__PURE__ */ m(
@@ -809,18 +809,18 @@ const je = ({
809
809
  n
810
810
  ),
811
811
  style: { color: t[0] || "inherit" },
812
- dangerouslySetInnerHTML: { __html: o }
812
+ dangerouslySetInnerHTML: { __html: l }
813
813
  }
814
814
  );
815
815
  }
816
816
  if (e && typeof e == "object" && "src" in e) {
817
- const o = e;
817
+ const l = e;
818
818
  return /* @__PURE__ */ m(
819
819
  "img",
820
820
  {
821
- src: o.src,
822
- width: o.width,
823
- height: o.height,
821
+ src: l.src,
822
+ width: l.width,
823
+ height: l.height,
824
824
  className: y("size-5 box-content", n),
825
825
  style: {
826
826
  filter: t[0] ? "brightness(0) saturate(100%) invert(1)" : void 0
@@ -830,18 +830,18 @@ const je = ({
830
830
  }
831
831
  );
832
832
  }
833
- const l = e;
834
- if (!(l != null && l.prefix))
833
+ const o = e;
834
+ if (!(o != null && o.prefix))
835
835
  throw new Error(`Invalid icon type: ${typeof e}`);
836
- const { icon: r } = l, [s, c, , , a] = r || [], u = (o) => {
837
- switch (o.length) {
836
+ const { icon: r } = o, [s, c, , , a] = r || [], i = (l) => {
837
+ switch (l.length) {
838
838
  case 2:
839
839
  return {
840
- "--fa-primary-color": o[0] || "inherit",
841
- "--fa-secondary-color": o[1] || "inherit"
840
+ "--fa-primary-color": l[0] || "inherit",
841
+ "--fa-secondary-color": l[1] || "inherit"
842
842
  };
843
843
  case 1:
844
- return { color: o[0] };
844
+ return { color: l[0] };
845
845
  default:
846
846
  return {};
847
847
  }
@@ -850,36 +850,36 @@ const je = ({
850
850
  "svg",
851
851
  {
852
852
  className: y("size-5 box-content", n),
853
- style: { ...u(t) },
853
+ style: { ...i(t) },
854
854
  xmlns: "http://www.w3.org/2000/svg",
855
855
  viewBox: `0 0 ${s} ${c}`,
856
856
  role: "img",
857
857
  "aria-hidden": "true",
858
- children: typeof a == "string" ? /* @__PURE__ */ m("path", { className: "fill-current", d: a }) : a.map((o, p) => /* @__PURE__ */ m("path", { d: o }, p))
858
+ children: typeof a == "string" ? /* @__PURE__ */ m("path", { className: "fill-current", d: a }) : a.map((l, h) => /* @__PURE__ */ m("path", { d: l }, h))
859
859
  }
860
860
  );
861
861
  }, Vt = ({
862
862
  variant: e = "linear-determinate",
863
863
  value: t = 0,
864
864
  transitionDuration: n = 1e3,
865
- className: l,
865
+ className: o,
866
866
  ...r
867
867
  }) => {
868
- const [s, c] = $(t), [a] = $(1.5);
869
- R(() => {
868
+ const [s, c] = M(t), [a] = M(1.5);
869
+ $(() => {
870
870
  t > 100 && (t = 100), t < 0 && (t = 0), c(t);
871
871
  }, [t]);
872
- const [u, o] = $(!0), p = () => u ? a : a * 0.5;
873
- R(() => {
872
+ const [i, l] = M(!0), h = () => i ? a : a * 0.5;
873
+ $(() => {
874
874
  if ((e === "circular-indeterminate" || e === "linear-indeterminate") && s !== 100) {
875
875
  const d = setInterval(() => {
876
- c(u ? 10 : 90), o(!u);
877
- }, p() * 1e3);
876
+ c(i ? 10 : 90), l(!i);
877
+ }, h() * 1e3);
878
878
  return () => clearInterval(d);
879
879
  }
880
- }, [e, u, s]);
881
- const [v, f] = $(!1);
882
- R(() => {
880
+ }, [e, i, s]);
881
+ const [v, f] = M(!1);
882
+ $(() => {
883
883
  if (s >= 100) {
884
884
  const d = setTimeout(() => {
885
885
  f(!1);
@@ -890,15 +890,15 @@ const je = ({
890
890
  } else
891
891
  f(!0);
892
892
  }, [s, n]);
893
- const i = Rt({
894
- className: l,
893
+ const u = Rt({
894
+ className: o,
895
895
  variant: e,
896
896
  value: t,
897
897
  transitionDuration: n,
898
898
  isVisible: v
899
899
  });
900
900
  return /* @__PURE__ */ Y(me, { children: [
901
- (e === "linear-determinate" || e == "linear-indeterminate") && /* @__PURE__ */ Y("div", { className: i.progressIndicator, ...r, children: [
901
+ (e === "linear-determinate" || e == "linear-indeterminate") && /* @__PURE__ */ Y("div", { className: u.progressIndicator, ...r, children: [
902
902
  /* @__PURE__ */ m(
903
903
  "div",
904
904
  {
@@ -906,7 +906,7 @@ const je = ({
906
906
  width: `${s}%`,
907
907
  transition: `width ${n}ms ease-in-out ${s == 100 ? ", max-height 200ms 0.5s ease-in-out" : ""}`
908
908
  },
909
- className: i.track
909
+ className: u.track
910
910
  }
911
911
  ),
912
912
  /* @__PURE__ */ m(
@@ -916,7 +916,7 @@ const je = ({
916
916
  marginLeft: s != 100 ? "6px" : "0px",
917
917
  transition: `width ${n}ms ease-in-out ${s == 100 ? `, max-height 200ms 0.5s ease-in-out, margin-left ${n}ms ${n / 1.5}ms` : ""}`
918
918
  },
919
- className: i.activeIndicator
919
+ className: u.activeIndicator
920
920
  }
921
921
  ),
922
922
  /* @__PURE__ */ m(
@@ -926,7 +926,7 @@ const je = ({
926
926
  width: "4 px",
927
927
  transition: `width ${n}ms ease-in-out, max-height 200ms 0.5s ease-in-out`
928
928
  },
929
- className: i.stop
929
+ className: u.stop
930
930
  }
931
931
  )
932
932
  ] }),
@@ -940,10 +940,10 @@ const je = ({
940
940
  animate: { rotate: 270 },
941
941
  transition: {
942
942
  repeat: 1 / 0,
943
- duration: p(),
943
+ duration: h(),
944
944
  ease: "linear"
945
945
  },
946
- className: i.progressIndicator,
946
+ className: u.progressIndicator,
947
947
  ...r,
948
948
  children: /* @__PURE__ */ m(
949
949
  q.circle,
@@ -956,27 +956,27 @@ const je = ({
956
956
  },
957
957
  initial: "hidden",
958
958
  animate: "visible",
959
- className: i.activeIndicator,
959
+ className: u.activeIndicator,
960
960
  variants: {
961
961
  hidden: {
962
- pathLength: u ? 10 / 100 : 90 / 100
962
+ pathLength: i ? 10 / 100 : 90 / 100
963
963
  },
964
964
  visible: {
965
- pathLength: u ? 90 / 100 : 10 / 100
965
+ pathLength: i ? 90 / 100 : 10 / 100
966
966
  }
967
967
  },
968
968
  transition: {
969
969
  pathLength: {
970
970
  type: "tween",
971
971
  ease: "linear",
972
- duration: p(),
972
+ duration: h(),
973
973
  bounce: 0
974
974
  }
975
975
  }
976
976
  }
977
977
  )
978
978
  },
979
- u + ""
979
+ i + ""
980
980
  )
981
981
  ] });
982
982
  }, Yt = ({
@@ -1002,27 +1002,27 @@ const je = ({
1002
1002
  duration: 0.3
1003
1003
  }
1004
1004
  }
1005
- }, [l, r] = $(!0), [s, c] = $(!1), [a, u] = $({ x: 50, y: 50 });
1006
- R(() => {
1005
+ }, [o, r] = M(!0), [s, c] = M(!1), [a, i] = M({ x: 50, y: 50 });
1006
+ $(() => {
1007
1007
  s && (r(!0), r(!1));
1008
- }, [s]), R(() => {
1008
+ }, [s]), $(() => {
1009
1009
  const d = t == null ? void 0 : t.current;
1010
1010
  if (d)
1011
- return d.addEventListener("mousedown", o), d.addEventListener("mouseup", v), d.addEventListener("mouseleave", p), () => {
1012
- d.removeEventListener("mousedown", o), d.removeEventListener("mouseup", v), d.removeEventListener("mouseleave", p);
1011
+ return d.addEventListener("mousedown", l), d.addEventListener("mouseup", v), d.addEventListener("mouseleave", h), () => {
1012
+ d.removeEventListener("mousedown", l), d.removeEventListener("mouseup", v), d.removeEventListener("mouseleave", h);
1013
1013
  };
1014
1014
  }, [t]);
1015
- const o = (d) => {
1016
- const h = t == null ? void 0 : t.current, w = h.getBoundingClientRect();
1017
- c(!0), u({
1018
- x: (d.clientX - w.left) / h.clientWidth * 100,
1019
- y: (d.clientY - w.top) / h.clientHeight * 100
1015
+ const l = (d) => {
1016
+ const p = t == null ? void 0 : t.current, w = p.getBoundingClientRect();
1017
+ c(!0), i({
1018
+ x: (d.clientX - w.left) / p.clientWidth * 100,
1019
+ y: (d.clientY - w.top) / p.clientHeight * 100
1020
1020
  });
1021
- }, p = (d) => {
1021
+ }, h = (d) => {
1022
1022
  c(!1);
1023
1023
  }, v = (d) => {
1024
1024
  c(!1);
1025
- }, f = `color-mix(in srgb, var(--state-color,_var(--color-${e})) 10%, transparent)`, i = {
1025
+ }, f = `color-mix(in srgb, var(--state-color,_var(--color-${e})) 10%, transparent)`, u = {
1026
1026
  position: "absolute",
1027
1027
  inset: 0,
1028
1028
  width: "100%",
@@ -1035,10 +1035,10 @@ const je = ({
1035
1035
  background: `radial-gradient(ellipse at var(--x) var(--y), ${f} var(--r), transparent calc(var(--r) * 2))`,
1036
1036
  pointerEvents: "none"
1037
1037
  };
1038
- return /* @__PURE__ */ m(se, { mode: "wait", children: (s || !s && !l) && /* @__PURE__ */ m(
1038
+ return /* @__PURE__ */ m(se, { mode: "wait", children: (s || !s && !o) && /* @__PURE__ */ m(
1039
1039
  q.div,
1040
1040
  {
1041
- style: i,
1041
+ style: u,
1042
1042
  variants: n,
1043
1043
  initial: "initial",
1044
1044
  animate: "animate",
@@ -1076,221 +1076,221 @@ const je = ({
1076
1076
  })
1077
1077
  );
1078
1078
  function Xt(e, t) {
1079
- let n = 0, l = null, r = null;
1079
+ let n = 0, o = null, r = null;
1080
1080
  const s = (c, a) => {
1081
1081
  n = Date.now(), t(c, a);
1082
1082
  };
1083
1083
  return (c, a) => {
1084
- const u = Date.now(), o = e - (u - n);
1085
- o <= 0 ? (l && (clearTimeout(l), l = null), s(c, a)) : (r = { v: c, o: a }, l || (l = setTimeout(() => {
1086
- l = null;
1087
- const p = r;
1088
- r = null, p && s(p.v, p.o);
1089
- }, o)));
1084
+ const i = Date.now(), l = e - (i - n);
1085
+ l <= 0 ? (o && (clearTimeout(o), o = null), s(c, a)) : (r = { v: c, o: a }, o || (o = setTimeout(() => {
1086
+ o = null;
1087
+ const h = r;
1088
+ r = null, h && s(h.v, h.o);
1089
+ }, l)));
1090
1090
  };
1091
1091
  }
1092
1092
  const jt = ({
1093
1093
  children: e,
1094
1094
  orientation: t = "vertical",
1095
1095
  scrollSize: n,
1096
- onScroll: l,
1096
+ onScroll: o,
1097
1097
  className: r,
1098
1098
  draggable: s = !1,
1099
1099
  throttleDuration: c = 75,
1100
1100
  scroll: a,
1101
- setScroll: u
1101
+ setScroll: i
1102
1102
  }) => {
1103
1103
  var le, ue;
1104
- const o = W(null), p = W(null), [v, f] = $({
1104
+ const l = W(null), h = W(null), [v, f] = M({
1105
1105
  width: null,
1106
1106
  height: null
1107
1107
  });
1108
- R(() => {
1109
- if (!o.current) return;
1110
- const C = new ResizeObserver((N) => {
1111
- for (const D of N)
1112
- D.target === o.current && f({
1108
+ $(() => {
1109
+ if (!l.current) return;
1110
+ const C = new ResizeObserver((L) => {
1111
+ for (const D of L)
1112
+ D.target === l.current && f({
1113
1113
  width: D.contentRect.width,
1114
1114
  height: D.contentRect.height
1115
1115
  // On observe aussi la hauteur maintenant
1116
1116
  });
1117
1117
  });
1118
- return C.observe(o.current), () => {
1118
+ return C.observe(l.current), () => {
1119
1119
  C.disconnect();
1120
1120
  };
1121
- }, [o]);
1122
- const i = W(null), d = W(null), h = () => {
1123
- const C = p.current;
1121
+ }, [l]);
1122
+ const u = W(null), d = W(null), p = () => {
1123
+ const C = h.current;
1124
1124
  return C ? {
1125
1125
  width: n ?? C.scrollWidth,
1126
1126
  height: n ?? C.scrollHeight
1127
1127
  } : null;
1128
1128
  }, w = () => {
1129
- const C = o.current;
1129
+ const C = l.current;
1130
1130
  return C ? {
1131
1131
  width: C.clientWidth,
1132
1132
  height: C.clientHeight
1133
1133
  // Correction ici pour retourner la bonne hauteur
1134
1134
  } : null;
1135
- }, { scrollYProgress: b, scrollXProgress: g } = mt({
1136
- container: o
1137
- }), I = W(null);
1138
- I.current || (I.current = Xt(
1135
+ }, { scrollYProgress: E, scrollXProgress: g } = mt({
1136
+ container: l
1137
+ }), b = W(null);
1138
+ b.current || (b.current = Xt(
1139
1139
  c,
1140
- (C, N) => {
1141
- !d.current || !i.current || !o.current || (N === (t === "horizontal" ? "x" : "y") && (u == null || u(C)), l && (t === "horizontal" && N === "x" && l({
1140
+ (C, L) => {
1141
+ !d.current || !u.current || !l.current || (L === (t === "horizontal" ? "x" : "y") && (i == null || i(C)), o && (t === "horizontal" && L === "x" && o({
1142
1142
  scrollProgress: C,
1143
- scroll: C * (i.current.width - o.current.clientWidth),
1144
- scrollTotal: i.current.width - o.current.clientWidth,
1143
+ scroll: C * (u.current.width - l.current.clientWidth),
1144
+ scrollTotal: u.current.width - l.current.clientWidth,
1145
1145
  scrollVisible: d.current.width
1146
- }), t === "vertical" && N === "y" && l({
1146
+ }), t === "vertical" && L === "y" && o({
1147
1147
  scrollProgress: C,
1148
- scroll: C * (i.current.height - o.current.clientHeight),
1149
- scrollTotal: i.current.height - o.current.clientHeight,
1148
+ scroll: C * (u.current.height - l.current.clientHeight),
1149
+ scrollTotal: u.current.height - l.current.clientHeight,
1150
1150
  scrollVisible: d.current.height
1151
1151
  })));
1152
1152
  }
1153
1153
  ));
1154
- const E = (C, N) => {
1155
- I.current && I.current(C, N);
1154
+ const R = (C, L) => {
1155
+ b.current && b.current(C, L);
1156
1156
  };
1157
- R(() => {
1158
- v.width && E(g.get(), "x"), v.height && E(b.get(), "y");
1159
- }, [v]), R(() => {
1160
- const C = o.current, N = p.current;
1161
- if (!C || !N || typeof a != "number") return;
1162
- const D = (F, j, X) => Math.min(X, Math.max(j, F));
1157
+ $(() => {
1158
+ v.width && R(g.get(), "x"), v.height && R(E.get(), "y");
1159
+ }, [v]), $(() => {
1160
+ const C = l.current, L = h.current;
1161
+ if (!C || !L || typeof a != "number") return;
1162
+ const D = (H, j, X) => Math.min(X, Math.max(j, H));
1163
1163
  if (t === "horizontal") {
1164
- const F = Math.max(0, (n ?? N.scrollWidth) - C.clientWidth);
1165
- C.scrollLeft = D(a * F, 0, F);
1164
+ const H = Math.max(0, (n ?? L.scrollWidth) - C.clientWidth);
1165
+ C.scrollLeft = D(a * H, 0, H);
1166
1166
  } else {
1167
- const F = Math.max(0, (n ?? N.scrollHeight) - C.clientHeight);
1168
- C.scrollTop = D(a * F, 0, F);
1167
+ const H = Math.max(0, (n ?? L.scrollHeight) - C.clientHeight);
1168
+ C.scrollTop = D(a * H, 0, H);
1169
1169
  }
1170
1170
  }, [a, t, n]), Be(g, "change", (C) => {
1171
- E(C, "x");
1172
- }), Be(b, "change", (C) => {
1173
- E(C, "y");
1171
+ R(C, "x");
1172
+ }), Be(E, "change", (C) => {
1173
+ R(C, "y");
1174
1174
  });
1175
- const [A, L] = $(!1);
1175
+ const [A, N] = M(!1);
1176
1176
  Ve(() => {
1177
- A || !d.current || !i.current || !l || (l({
1177
+ A || !d.current || !u.current || !o || (o({
1178
1178
  scrollProgress: 0,
1179
1179
  scroll: 0,
1180
- scrollTotal: t == "vertical" ? i.current.height : i.current.width,
1180
+ scrollTotal: t == "vertical" ? u.current.height : u.current.width,
1181
1181
  scrollVisible: t == "vertical" ? d.current.height : d.current.width
1182
- }), L(!0));
1183
- }, [d, i, l]), i.current = h(), d.current = w();
1184
- const [V, H] = $(!1), M = Ut({
1185
- isDragging: V,
1182
+ }), N(!0));
1183
+ }, [d, u, o]), u.current = p(), d.current = w();
1184
+ const [F, O] = M(!1), I = Ut({
1185
+ isDragging: F,
1186
1186
  children: e,
1187
1187
  className: r,
1188
- onScroll: l,
1188
+ onScroll: o,
1189
1189
  orientation: t,
1190
1190
  scrollSize: n,
1191
1191
  draggable: s,
1192
1192
  throttleDuration: c
1193
- }), [x, S] = $(0), [O, G] = $(0), te = (C) => {
1193
+ }), [x, S] = M(0), [V, G] = M(0), te = (C) => {
1194
1194
  if (!s) return;
1195
- const N = o.current;
1196
- if (!N || x == null) return;
1197
- const F = (C.pageX - N.offsetLeft - x) * 1.5;
1198
- N.scrollLeft = O - F;
1195
+ const L = l.current;
1196
+ if (!L || x == null) return;
1197
+ const H = (C.pageX - L.offsetLeft - x) * 1.5;
1198
+ L.scrollLeft = V - H;
1199
1199
  }, _ = (C) => {
1200
- const N = o.current;
1201
- N && (H(!0), S(C.pageX - N.offsetLeft), G(N.scrollLeft));
1200
+ const L = l.current;
1201
+ L && (O(!0), S(C.pageX - L.offsetLeft), G(L.scrollLeft));
1202
1202
  }, ne = (C) => {
1203
- V && (C.preventDefault(), te(C));
1203
+ F && (C.preventDefault(), te(C));
1204
1204
  }, B = () => {
1205
- H(!1);
1205
+ O(!1);
1206
1206
  }, k = () => {
1207
- H(!1);
1207
+ O(!1);
1208
1208
  }, U = (C) => {
1209
1209
  C.preventDefault();
1210
1210
  }, K = W(null);
1211
- return R(() => () => {
1211
+ return $(() => () => {
1212
1212
  K.current && clearTimeout(K.current);
1213
- }, []), R(() => {
1214
- const C = o.current;
1213
+ }, []), $(() => {
1214
+ const C = l.current;
1215
1215
  if (!C) return;
1216
- const N = (D) => {
1216
+ const L = (D) => {
1217
1217
  var re, ae, de, ce;
1218
- const F = D.detail, j = o.current;
1219
- if (!j || !F) return;
1220
- const X = F.orientation ?? t;
1221
- if (typeof F.progress == "number")
1218
+ const H = D.detail, j = l.current;
1219
+ if (!j || !H) return;
1220
+ const X = H.orientation ?? t;
1221
+ if (typeof H.progress == "number")
1222
1222
  if (X === "horizontal") {
1223
1223
  const oe = Math.max(
1224
1224
  0,
1225
- (((re = i.current) == null ? void 0 : re.width) ?? 0) - j.clientWidth
1225
+ (((re = u.current) == null ? void 0 : re.width) ?? 0) - j.clientWidth
1226
1226
  );
1227
- j.scrollLeft = Math.min(oe, Math.max(0, F.progress * oe));
1227
+ j.scrollLeft = Math.min(oe, Math.max(0, H.progress * oe));
1228
1228
  } else {
1229
1229
  const oe = Math.max(
1230
1230
  0,
1231
- (((ae = i.current) == null ? void 0 : ae.height) ?? 0) - j.clientHeight
1231
+ (((ae = u.current) == null ? void 0 : ae.height) ?? 0) - j.clientHeight
1232
1232
  );
1233
- j.scrollTop = Math.min(oe, Math.max(0, F.progress * oe));
1233
+ j.scrollTop = Math.min(oe, Math.max(0, H.progress * oe));
1234
1234
  }
1235
- else if (typeof F.scroll == "number")
1235
+ else if (typeof H.scroll == "number")
1236
1236
  if (X === "horizontal") {
1237
1237
  const oe = Math.max(
1238
1238
  0,
1239
- (((de = i.current) == null ? void 0 : de.width) ?? 0) - j.clientWidth
1239
+ (((de = u.current) == null ? void 0 : de.width) ?? 0) - j.clientWidth
1240
1240
  );
1241
- j.scrollLeft = Math.min(oe, Math.max(0, F.scroll));
1241
+ j.scrollLeft = Math.min(oe, Math.max(0, H.scroll));
1242
1242
  } else {
1243
1243
  const oe = Math.max(
1244
1244
  0,
1245
- (((ce = i.current) == null ? void 0 : ce.height) ?? 0) - j.clientHeight
1245
+ (((ce = u.current) == null ? void 0 : ce.height) ?? 0) - j.clientHeight
1246
1246
  );
1247
- j.scrollTop = Math.min(oe, Math.max(0, F.scroll));
1247
+ j.scrollTop = Math.min(oe, Math.max(0, H.scroll));
1248
1248
  }
1249
1249
  };
1250
- return C.addEventListener("udx:customScroll:set", N), () => {
1251
- C.removeEventListener("udx:customScroll:set", N);
1250
+ return C.addEventListener("udx:customScroll:set", L), () => {
1251
+ C.removeEventListener("udx:customScroll:set", L);
1252
1252
  };
1253
1253
  }, [t]), /* @__PURE__ */ Y(
1254
1254
  "div",
1255
1255
  {
1256
- className: M.customScroll,
1257
- ref: o,
1256
+ className: I.customScroll,
1257
+ ref: l,
1258
1258
  onMouseDown: _,
1259
1259
  onMouseMove: ne,
1260
1260
  onMouseUp: B,
1261
1261
  onMouseLeave: k,
1262
1262
  onDragStart: U,
1263
1263
  onScroll: (C) => {
1264
- V || (S(null), H(!0), K.current && clearTimeout(K.current), K.current = setTimeout(() => {
1265
- H(!1);
1264
+ F || (S(null), O(!0), K.current && clearTimeout(K.current), K.current = setTimeout(() => {
1265
+ O(!1);
1266
1266
  }, 1e3));
1267
1267
  },
1268
1268
  children: [
1269
1269
  /* @__PURE__ */ m(
1270
1270
  "div",
1271
1271
  {
1272
- ref: p,
1272
+ ref: h,
1273
1273
  style: t === "vertical" ? { height: ((le = d == null ? void 0 : d.current) == null ? void 0 : le.height) ?? "100%" } : { width: ((ue = d == null ? void 0 : d.current) == null ? void 0 : ue.width) ?? "100%" },
1274
- className: M.track,
1274
+ className: I.track,
1275
1275
  children: e
1276
1276
  }
1277
1277
  ),
1278
- d.current && i.current && /* @__PURE__ */ Y(me, { children: [
1279
- t === "vertical" && i.current.height > d.current.height && /* @__PURE__ */ m(
1278
+ d.current && u.current && /* @__PURE__ */ Y(me, { children: [
1279
+ t === "vertical" && u.current.height > d.current.height && /* @__PURE__ */ m(
1280
1280
  q.div,
1281
1281
  {
1282
1282
  className: "flex-none",
1283
1283
  style: {
1284
- height: i.current.height - d.current.height
1284
+ height: u.current.height - d.current.height
1285
1285
  }
1286
1286
  }
1287
1287
  ),
1288
- t === "horizontal" && i.current.width > d.current.width && /* @__PURE__ */ m(
1288
+ t === "horizontal" && u.current.width > d.current.width && /* @__PURE__ */ m(
1289
1289
  q.div,
1290
1290
  {
1291
1291
  className: "flex-none",
1292
1292
  style: {
1293
- width: i.current.width - d.current.width
1293
+ width: u.current.width - d.current.width
1294
1294
  }
1295
1295
  }
1296
1296
  )
@@ -1303,68 +1303,68 @@ const jt = ({
1303
1303
  el: t,
1304
1304
  touch: n = !0
1305
1305
  }) => {
1306
- const l = W(null), r = W(0), s = W(0);
1307
- R(() => {
1306
+ const o = W(null), r = W(0), s = W(0);
1307
+ $(() => {
1308
1308
  if (!t) return;
1309
1309
  r.current = t.scrollTop, s.current = t.scrollLeft;
1310
- const c = (i) => {
1311
- e == null || e(i);
1312
- }, a = (i) => {
1313
- let d = i;
1310
+ const c = (u) => {
1311
+ e == null || e(u);
1312
+ }, a = (u) => {
1313
+ let d = u;
1314
1314
  for (; d && d !== document.body && d !== document.documentElement; ) {
1315
- const h = window.getComputedStyle(d), w = h.overflowY || h.overflow;
1315
+ const p = window.getComputedStyle(d), w = p.overflowY || p.overflow;
1316
1316
  if ((w === "auto" || w === "scroll") && d.scrollHeight > d.clientHeight) return d;
1317
1317
  d = d.parentElement;
1318
1318
  }
1319
1319
  return null;
1320
- }, u = (i) => {
1321
- const d = i.target, h = a(d);
1322
- if (h && h !== t) {
1323
- const w = h.scrollTop < h.scrollHeight - h.clientHeight, b = h.scrollTop > 0;
1324
- if (i.deltaY > 0 && w || i.deltaY < 0 && b)
1320
+ }, i = (u) => {
1321
+ const d = u.target, p = a(d);
1322
+ if (p && p !== t) {
1323
+ const w = p.scrollTop < p.scrollHeight - p.clientHeight, E = p.scrollTop > 0;
1324
+ if (u.deltaY > 0 && w || u.deltaY < 0 && E)
1325
1325
  return;
1326
1326
  }
1327
- i.preventDefault(), c({
1327
+ u.preventDefault(), c({
1328
1328
  type: "intent",
1329
1329
  source: "wheel",
1330
- deltaX: i.deltaX,
1331
- deltaY: i.deltaY,
1332
- originalEvent: i
1330
+ deltaX: u.deltaX,
1331
+ deltaY: u.deltaY,
1332
+ originalEvent: u
1333
1333
  });
1334
- }, o = (i) => {
1334
+ }, l = (u) => {
1335
1335
  if (!n) return;
1336
- const d = i.touches[0];
1337
- d && (l.current = { x: d.clientX, y: d.clientY });
1338
- }, p = (i) => {
1336
+ const d = u.touches[0];
1337
+ d && (o.current = { x: d.clientX, y: d.clientY });
1338
+ }, h = (u) => {
1339
1339
  if (!n) return;
1340
- const d = i.touches[0];
1341
- if (!d || !l.current) return;
1342
- const h = l.current.x - d.clientX, w = l.current.y - d.clientY, b = i.target, g = a(b);
1340
+ const d = u.touches[0];
1341
+ if (!d || !o.current) return;
1342
+ const p = o.current.x - d.clientX, w = o.current.y - d.clientY, E = u.target, g = a(E);
1343
1343
  if (g && g !== t) {
1344
- const I = g.scrollTop < g.scrollHeight - g.clientHeight, E = g.scrollTop > 0;
1345
- if (w > 0 && I || w < 0 && E) {
1346
- l.current = { x: d.clientX, y: d.clientY };
1344
+ const b = g.scrollTop < g.scrollHeight - g.clientHeight, R = g.scrollTop > 0;
1345
+ if (w > 0 && b || w < 0 && R) {
1346
+ o.current = { x: d.clientX, y: d.clientY };
1347
1347
  return;
1348
1348
  }
1349
1349
  }
1350
- i.preventDefault(), l.current = { x: d.clientX, y: d.clientY }, c({
1350
+ u.preventDefault(), o.current = { x: d.clientX, y: d.clientY }, c({
1351
1351
  type: "intent",
1352
1352
  source: "touch",
1353
- deltaX: h,
1353
+ deltaX: p,
1354
1354
  deltaY: w,
1355
- originalEvent: i
1355
+ originalEvent: u
1356
1356
  });
1357
1357
  }, v = () => {
1358
- n && (l.current = null);
1359
- }, f = (i) => {
1360
- const h = t.clientHeight * 0.9;
1361
- let w = 0, b = 0;
1362
- switch (i.key) {
1358
+ n && (o.current = null);
1359
+ }, f = (u) => {
1360
+ const p = t.clientHeight * 0.9;
1361
+ let w = 0, E = 0;
1362
+ switch (u.key) {
1363
1363
  case "ArrowDown":
1364
- b = 40;
1364
+ E = 40;
1365
1365
  break;
1366
1366
  case "ArrowUp":
1367
- b = -40;
1367
+ E = -40;
1368
1368
  break;
1369
1369
  case "ArrowRight":
1370
1370
  w = 40;
@@ -1373,33 +1373,33 @@ const jt = ({
1373
1373
  w = -40;
1374
1374
  break;
1375
1375
  case "PageDown":
1376
- b = h;
1376
+ E = p;
1377
1377
  break;
1378
1378
  case "PageUp":
1379
- b = -h;
1379
+ E = -p;
1380
1380
  break;
1381
1381
  case "Home":
1382
- b = Number.NEGATIVE_INFINITY;
1382
+ E = Number.NEGATIVE_INFINITY;
1383
1383
  break;
1384
1384
  case "End":
1385
- b = Number.POSITIVE_INFINITY;
1385
+ E = Number.POSITIVE_INFINITY;
1386
1386
  break;
1387
1387
  case " ":
1388
- b = i.shiftKey ? -h : h;
1388
+ E = u.shiftKey ? -p : p;
1389
1389
  break;
1390
1390
  default:
1391
1391
  return;
1392
1392
  }
1393
- i.preventDefault(), c({
1393
+ u.preventDefault(), c({
1394
1394
  type: "intent",
1395
1395
  source: "keyboard",
1396
1396
  deltaX: w,
1397
- deltaY: b,
1398
- originalEvent: i
1397
+ deltaY: E,
1398
+ originalEvent: u
1399
1399
  });
1400
1400
  };
1401
- return t.addEventListener("wheel", u, { passive: !1 }), t.addEventListener("touchstart", o, { passive: !0 }), t.addEventListener("touchmove", p, { passive: !1 }), t.addEventListener("touchend", v, { passive: !0 }), t.addEventListener("keydown", f), () => {
1402
- t.removeEventListener("wheel", u), t.removeEventListener("touchstart", o), t.removeEventListener("touchmove", p), t.removeEventListener("touchend", v), t.removeEventListener("keydown", f);
1401
+ return t.addEventListener("wheel", i, { passive: !1 }), t.addEventListener("touchstart", l, { passive: !0 }), t.addEventListener("touchmove", h, { passive: !1 }), t.addEventListener("touchend", v, { passive: !0 }), t.addEventListener("keydown", f), () => {
1402
+ t.removeEventListener("wheel", i), t.removeEventListener("touchstart", l), t.removeEventListener("touchmove", h), t.removeEventListener("touchend", v), t.removeEventListener("keydown", f);
1403
1403
  };
1404
1404
  }, [e]);
1405
1405
  }, Kn = ({
@@ -1407,52 +1407,52 @@ const jt = ({
1407
1407
  orientation: t = "vertical",
1408
1408
  throttleDuration: n = 25
1409
1409
  }) => {
1410
- const [l, r] = $(0), [s, c] = $(), a = W(!1), u = W(), o = W(0);
1411
- R(() => {
1410
+ const [o, r] = M(0), [s, c] = M(), a = W(!1), i = W(), l = W(0);
1411
+ $(() => {
1412
1412
  c(document);
1413
1413
  const f = document.documentElement.scrollTop;
1414
- r(f), o.current = f;
1415
- }, []), R(() => {
1414
+ r(f), l.current = f;
1415
+ }, []), $(() => {
1416
1416
  const f = () => {
1417
1417
  a.current || r(document.documentElement.scrollTop);
1418
1418
  };
1419
1419
  return s == null || s.addEventListener("scroll", f), () => {
1420
- u.current && clearTimeout(u.current), s == null || s.removeEventListener("scroll", f);
1420
+ i.current && clearTimeout(i.current), s == null || s.removeEventListener("scroll", f);
1421
1421
  };
1422
1422
  }, [s]);
1423
- const p = W(), v = W(null);
1424
- return R(() => {
1425
- const f = l;
1423
+ const h = W(), v = W(null);
1424
+ return $(() => {
1425
+ const f = o;
1426
1426
  if (v.current && (v.current.stop(), v.current = null), !a.current) {
1427
- p.current = f;
1427
+ h.current = f;
1428
1428
  return;
1429
1429
  }
1430
- return v.current = pt(p.current ?? f, f, {
1430
+ return v.current = pt(h.current ?? f, f, {
1431
1431
  duration: ((e == null ? void 0 : e.duration) ?? 500) / 1e3,
1432
1432
  ease: (e == null ? void 0 : e.ease) ?? "easeOut",
1433
- onUpdate: (i) => {
1434
- u.current && clearTimeout(u.current), p.current = i;
1435
- const d = document.documentElement, h = Math.round(i * 1e3) / 1e3, w = o.current;
1436
- Math.abs(h - w) < 0.1 || (o.current = h, a.current && d.scrollTo({ top: h }));
1433
+ onUpdate: (u) => {
1434
+ i.current && clearTimeout(i.current), h.current = u;
1435
+ const d = document.documentElement, p = Math.round(u * 1e3) / 1e3, w = l.current;
1436
+ Math.abs(p - w) < 0.1 || (l.current = p, a.current && d.scrollTo({ top: p }));
1437
1437
  },
1438
1438
  onComplete: () => {
1439
- u.current = setTimeout(() => {
1439
+ i.current = setTimeout(() => {
1440
1440
  a.current = !1;
1441
1441
  }, 300), v.current = null;
1442
1442
  }
1443
1443
  }), () => {
1444
1444
  v.current && (v.current.stop(), v.current = null);
1445
1445
  };
1446
- }, [l]), s ? /* @__PURE__ */ m(
1446
+ }, [o]), s ? /* @__PURE__ */ m(
1447
1447
  qt,
1448
1448
  {
1449
1449
  touch: !1,
1450
1450
  el: s,
1451
1451
  onScroll: (f) => {
1452
- if ("deltaY" in f && f.deltaY !== 0 && s && l !== null) {
1453
- let i = l + f.deltaY;
1452
+ if ("deltaY" in f && f.deltaY !== 0 && s && o !== null) {
1453
+ let u = o + f.deltaY;
1454
1454
  const d = s.querySelector("html");
1455
- d && (i = Math.min(i, d.scrollHeight - d.clientHeight)), i = Math.max(i, 0), r(i), a.current = !0;
1455
+ d && (u = Math.min(u, d.scrollHeight - d.clientHeight)), u = Math.max(u, 0), r(u), a.current = !0;
1456
1456
  }
1457
1457
  }
1458
1458
  }
@@ -1461,27 +1461,27 @@ const jt = ({
1461
1461
  style: e,
1462
1462
  colorName: t,
1463
1463
  stateClassName: n = "state-ripple-group",
1464
- className: l
1464
+ className: o
1465
1465
  }) => {
1466
- const r = W(null), s = W(null), [c, a] = $(!1), u = Kt({
1466
+ const r = W(null), s = W(null), [c, a] = M(!1), i = Kt({
1467
1467
  isClient: c,
1468
1468
  stateClassName: n,
1469
- className: l,
1469
+ className: o,
1470
1470
  colorName: t
1471
1471
  });
1472
- return R(() => {
1472
+ return $(() => {
1473
1473
  if (r.current && n !== "state-layer") {
1474
- const o = n.includes("[") ? n.split("[")[1].split("]")[0] : "group", p = r.current.closest(
1475
- `.${o}:not(.${o} .${o})`
1474
+ const l = n.includes("[") ? n.split("[")[1].split("]")[0] : "group", h = r.current.closest(
1475
+ `.${l}:not(.${l} .${l})`
1476
1476
  );
1477
- s.current = p;
1477
+ s.current = h;
1478
1478
  }
1479
1479
  a(!0);
1480
1480
  }, []), /* @__PURE__ */ m(
1481
1481
  "div",
1482
1482
  {
1483
1483
  ref: r,
1484
- className: u.stateLayer,
1484
+ className: i.stateLayer,
1485
1485
  style: {
1486
1486
  "--state-color": `var(--default-color, var(--color-${t}))`,
1487
1487
  ...e
@@ -1504,11 +1504,11 @@ const jt = ({
1504
1504
  targetRef: e,
1505
1505
  children: t
1506
1506
  }) => {
1507
- const [n, l] = $(null), r = W(null), s = () => {
1507
+ const [n, o] = M(null), r = W(null), s = () => {
1508
1508
  const c = e.current;
1509
1509
  if (!c) return;
1510
1510
  const a = c.getBoundingClientRect();
1511
- l({
1511
+ o({
1512
1512
  position: "fixed",
1513
1513
  top: a.top,
1514
1514
  left: a.left,
@@ -1520,7 +1520,7 @@ const jt = ({
1520
1520
  // personnalise si besoin
1521
1521
  });
1522
1522
  };
1523
- return R(() => {
1523
+ return $(() => {
1524
1524
  const c = e.current;
1525
1525
  if (c)
1526
1526
  return s(), window.addEventListener("scroll", s, !0), window.addEventListener("resize", s), r.current = new ResizeObserver(s), r.current.observe(c), () => {
@@ -1537,33 +1537,33 @@ const Gn = ({
1537
1537
  throttleDelay: t = 100,
1538
1538
  // Délai par défaut de 300ms
1539
1539
  onLoad: n,
1540
- loadTheme: l = !1
1540
+ loadTheme: o = !1
1541
1541
  }) => {
1542
- const [r, s] = $(null);
1543
- R(() => {
1542
+ const [r, s] = M(null);
1543
+ $(() => {
1544
1544
  (async () => {
1545
- const f = await yt(e, l);
1545
+ const f = await yt(e, o);
1546
1546
  s(f);
1547
1547
  })();
1548
1548
  }, []);
1549
- const [c, a] = $(null), u = W(null), o = W(0), p = W(null);
1550
- R(() => {
1549
+ const [c, a] = M(null), i = W(null), l = W(0), h = W(null);
1550
+ $(() => {
1551
1551
  if (!r) return;
1552
1552
  const f = {
1553
1553
  ...e,
1554
1554
  // Assurer la compatibilité avec l'API qui attend sourceColorHex
1555
1555
  sourceColor: e.sourceColor
1556
- }, i = Date.now(), d = i - o.current, h = async (w) => {
1556
+ }, u = Date.now(), d = u - l.current, p = async (w) => {
1557
1557
  await v(w);
1558
1558
  };
1559
- if (o.current === 0 || d >= t)
1560
- u.current && (clearTimeout(u.current), u.current = null), p.current = null, o.current = i, h(f);
1561
- else if (p.current = f, !u.current) {
1559
+ if (l.current === 0 || d >= t)
1560
+ i.current && (clearTimeout(i.current), i.current = null), h.current = null, l.current = u, p(f);
1561
+ else if (h.current = f, !i.current) {
1562
1562
  const w = Math.max(0, t - d);
1563
- u.current = setTimeout(async () => {
1564
- u.current = null;
1565
- const b = p.current;
1566
- p.current = null, b && (o.current = Date.now(), await h(b));
1563
+ i.current = setTimeout(async () => {
1564
+ i.current = null;
1565
+ const E = h.current;
1566
+ h.current = null, E && (l.current = Date.now(), await p(E));
1567
1567
  }, w);
1568
1568
  }
1569
1569
  return () => {
@@ -1575,11 +1575,11 @@ const Gn = ({
1575
1575
  if (!r)
1576
1576
  return;
1577
1577
  r.context.update(f), await r.load();
1578
- const i = r == null ? void 0 : r.plugins.getPlugin(Ue).getInstance().outputCss;
1579
- a(i), n == null || n(r);
1578
+ const u = r == null ? void 0 : r.plugins.getPlugin(Ue).getInstance().outputCss;
1579
+ a(u), n == null || n(r);
1580
1580
  };
1581
- return R(() => () => {
1582
- u.current && (clearTimeout(u.current), u.current = null);
1581
+ return $(() => () => {
1582
+ i.current && (clearTimeout(i.current), i.current = null);
1583
1583
  }, []), c ? /* @__PURE__ */ m("style", { dangerouslySetInnerHTML: { __html: c } }) : null;
1584
1584
  };
1585
1585
  function Zt() {
@@ -1615,8 +1615,8 @@ function Se(e, t) {
1615
1615
  }
1616
1616
  const n = e.getAttribute(`data-${t}-start`);
1617
1617
  n && e.style.setProperty(`--${t}-range-start`, n);
1618
- const l = e.getAttribute(`data-${t}-end`);
1619
- l && e.style.setProperty(`--${t}-range-end`, l);
1618
+ const o = e.getAttribute(`data-${t}-end`);
1619
+ o && e.style.setProperty(`--${t}-range-end`, o);
1620
1620
  const r = e.hasAttribute(`data-${t}-paused`) || e.classList.contains(`${t}-paused`), s = e.hasAttribute(`data-${t}-run`) || e.classList.contains(`${t}-run`);
1621
1621
  !r && !s && e.setAttribute(`data-${t}-run`, "");
1622
1622
  }
@@ -1625,12 +1625,12 @@ function Ie(e = document, t) {
1625
1625
  e.querySelectorAll(
1626
1626
  `[class*="${t}-"][class*="-scroll"]`
1627
1627
  )
1628
- ).filter((l) => Re(l));
1628
+ ).filter((o) => Re(o));
1629
1629
  }
1630
1630
  function Tt(e = document, t) {
1631
1631
  const n = Array.from(
1632
1632
  e.querySelectorAll(`[class*="${t}-"]`)
1633
- ), l = /* @__PURE__ */ new Set([
1633
+ ), o = /* @__PURE__ */ new Set([
1634
1634
  `${t}-run`,
1635
1635
  `${t}-in`,
1636
1636
  `${t}-out`,
@@ -1648,7 +1648,7 @@ function Tt(e = document, t) {
1648
1648
  if (!(r instanceof HTMLElement)) return !1;
1649
1649
  const s = r.classList;
1650
1650
  return s.contains(`${t}-in`) || s.contains(`${t}-out`) || Array.from(s).some(
1651
- (u) => u.startsWith(`${t}-`) && !u.includes("scroll") && !l.has(u)
1651
+ (i) => i.startsWith(`${t}-`) && !i.includes("scroll") && !o.has(i)
1652
1652
  ) ? !0 : !Re(r);
1653
1653
  });
1654
1654
  }
@@ -1661,8 +1661,8 @@ function We(e, t, n) {
1661
1661
  e.setAttribute(`data-${t}-run`, ""), e.setAttribute(`data-${t}-${n}-run`, "");
1662
1662
  }
1663
1663
  function Ae(e, t, n) {
1664
- const l = e.style.animationName;
1665
- e.style.animationName = "none", e.removeAttribute(`data-${t}-run`), n ? e.removeAttribute(`data-${t}-${n}-run`) : (e.removeAttribute(`data-${t}-in-run`), e.removeAttribute(`data-${t}-out-run`)), e.offsetWidth, e.style.animationName = l;
1664
+ const o = e.style.animationName;
1665
+ e.style.animationName = "none", e.removeAttribute(`data-${t}-run`), n ? e.removeAttribute(`data-${t}-${n}-run`) : (e.removeAttribute(`data-${t}-in-run`), e.removeAttribute(`data-${t}-out-run`)), e.offsetWidth, e.style.animationName = o;
1666
1666
  }
1667
1667
  const en = [0, 0.2], Pe = /* @__PURE__ */ new WeakSet();
1668
1668
  function He(e, t) {
@@ -1670,58 +1670,58 @@ function He(e, t) {
1670
1670
  Pe.add(e);
1671
1671
  const n = (r) => {
1672
1672
  r.target === e && (e.hasAttribute(`data-${t}-in-run`) || e.hasAttribute(`data-${t}-out-run`)) && e.setAttribute(`data-${t}-animating`, "");
1673
- }, l = (r) => {
1673
+ }, o = (r) => {
1674
1674
  r.target === e && e.removeAttribute(`data-${t}-animating`);
1675
1675
  };
1676
- e.addEventListener("animationstart", n), e.addEventListener("animationend", l), e.addEventListener("animationcancel", l);
1676
+ e.addEventListener("animationstart", n), e.addEventListener("animationend", o), e.addEventListener("animationcancel", o);
1677
1677
  }
1678
1678
  function st(e = {}) {
1679
1679
  const { prefix: t = "anim", once: n = !0 } = e;
1680
1680
  if (Qt())
1681
1681
  return () => {
1682
1682
  };
1683
- const l = Zt(), r = /* @__PURE__ */ new WeakSet();
1683
+ const o = Zt(), r = /* @__PURE__ */ new WeakSet();
1684
1684
  let s = typeof window < "u" && (window.pageYOffset || window.scrollY) || 0, c = !0;
1685
1685
  const a = () => {
1686
- const i = window.pageYOffset || window.scrollY || 0;
1687
- c = i >= s, s = i;
1686
+ const u = window.pageYOffset || window.scrollY || 0;
1687
+ c = u >= s, s = u;
1688
1688
  };
1689
1689
  typeof window < "u" && window.addEventListener("scroll", a, { passive: !0 });
1690
- const u = new IntersectionObserver(
1691
- (i) => {
1692
- for (const d of i) {
1693
- const h = d.target;
1694
- if (!De(h) || h.hasAttribute(`data-${t}-animating`)) continue;
1695
- const w = zt(h.classList, t);
1696
- d.isIntersecting ? (w && Ae(h, t, "out"), We(h, t, "in"), n && u.unobserve(h)) : n || (c || Ae(h, t, "in"), w && We(h, t, "out"));
1690
+ const i = new IntersectionObserver(
1691
+ (u) => {
1692
+ for (const d of u) {
1693
+ const p = d.target;
1694
+ if (!De(p) || p.hasAttribute(`data-${t}-animating`)) continue;
1695
+ const w = zt(p.classList, t);
1696
+ d.isIntersecting ? (w && Ae(p, t, "out"), We(p, t, "in"), n && i.unobserve(p)) : n || (c || Ae(p, t, "in"), w && We(p, t, "out"));
1697
1697
  }
1698
1698
  },
1699
1699
  { threshold: en }
1700
- ), o = (i) => {
1701
- const d = Tt(i || document, t);
1702
- for (const h of d)
1703
- r.has(h) || (r.add(h), u.observe(h), He(h, t));
1700
+ ), l = (u) => {
1701
+ const d = Tt(u || document, t);
1702
+ for (const p of d)
1703
+ r.has(p) || (r.add(p), i.observe(p), He(p, t));
1704
1704
  };
1705
- o();
1706
- let p, v = null, f = null;
1707
- if (l)
1705
+ l();
1706
+ let h, v = null, f = null;
1707
+ if (o)
1708
1708
  (() => {
1709
1709
  f == null && (f = requestAnimationFrame(() => {
1710
1710
  f = null;
1711
1711
  const d = Ie(void 0, t);
1712
- for (const h of d) Se(h, t);
1712
+ for (const p of d) Se(p, t);
1713
1713
  }));
1714
1714
  })(), v = new MutationObserver((d) => {
1715
- for (const h of d)
1716
- if (h.type === "attributes") {
1717
- const w = h.target;
1718
- w instanceof HTMLElement && (Se(w, t), De(w) && (r.has(w) || (r.add(w), u.observe(w), He(w, t))));
1719
- } else if (h.type === "childList" && h.addedNodes && h.addedNodes.length) {
1720
- for (const w of Array.from(h.addedNodes))
1715
+ for (const p of d)
1716
+ if (p.type === "attributes") {
1717
+ const w = p.target;
1718
+ w instanceof HTMLElement && (Se(w, t), De(w) && (r.has(w) || (r.add(w), i.observe(w), He(w, t))));
1719
+ } else if (p.type === "childList" && p.addedNodes && p.addedNodes.length) {
1720
+ for (const w of Array.from(p.addedNodes))
1721
1721
  if (w instanceof HTMLElement) {
1722
- const b = Ie(w, t);
1723
- for (const g of b) Se(g, t);
1724
- o(w);
1722
+ const E = Ie(w, t);
1723
+ for (const g of E) Se(g, t);
1724
+ l(w);
1725
1725
  }
1726
1726
  }
1727
1727
  }), v.observe(document.documentElement, {
@@ -1736,19 +1736,19 @@ function st(e = {}) {
1736
1736
  `data-${t}-paused`,
1737
1737
  `data-${t}-run`
1738
1738
  ]
1739
- }), p = () => {
1739
+ }), h = () => {
1740
1740
  f != null && cancelAnimationFrame(f), v && v.disconnect();
1741
1741
  };
1742
1742
  else {
1743
- let i;
1744
- Ie(void 0, t).length > 0 && import("./scrollDriven-AP2yWhzi.js").then((h) => {
1745
- i = h.initScrollViewFallback({ once: n });
1746
- }), p = () => {
1747
- typeof i == "function" && i();
1743
+ let u;
1744
+ Ie(void 0, t).length > 0 && import("./scrollDriven-AP2yWhzi.js").then((p) => {
1745
+ u = p.initScrollViewFallback({ once: n });
1746
+ }), h = () => {
1747
+ typeof u == "function" && u();
1748
1748
  };
1749
1749
  }
1750
1750
  return () => {
1751
- p && p(), typeof window < "u" && window.removeEventListener("scroll", a), u.disconnect();
1751
+ h && h(), typeof window < "u" && window.removeEventListener("scroll", a), i.disconnect();
1752
1752
  };
1753
1753
  }
1754
1754
  const Jn = st, Zn = st;
@@ -1763,93 +1763,93 @@ const ct = ({
1763
1763
  variant: e = "filled",
1764
1764
  disabled: t = !1,
1765
1765
  icon: n,
1766
- href: l,
1766
+ href: o,
1767
1767
  label: r,
1768
1768
  disableTextMargins: s,
1769
1769
  className: c,
1770
1770
  iconPosition: a = "left",
1771
- loading: u = !1,
1772
- shape: o = "rounded",
1773
- onClick: p,
1771
+ loading: i = !1,
1772
+ shape: l = "rounded",
1773
+ onClick: h,
1774
1774
  onToggle: v,
1775
1775
  activated: f,
1776
- ref: i,
1776
+ ref: u,
1777
1777
  size: d = "medium",
1778
- allowShapeTransformation: h = !0,
1778
+ allowShapeTransformation: p = !0,
1779
1779
  transition: w,
1780
- children: b,
1780
+ children: E,
1781
1781
  ...g
1782
1782
  }) => {
1783
- if (b && (r = b), !r)
1783
+ if (E && (r = E), !r)
1784
1784
  throw new Error(
1785
1785
  "Button component requires either a label prop or children content"
1786
1786
  );
1787
1787
  e = tn(e);
1788
- const I = l ? "a" : "button", E = W(null), A = i || E, [L, V] = Z.useState(f);
1789
- R(() => {
1790
- V(f);
1788
+ const b = o ? "a" : "button", R = W(null), A = u || R, [N, F] = Z.useState(f);
1789
+ $(() => {
1790
+ F(f);
1791
1791
  }, [f]), w = { duration: 0.3, ...w };
1792
- let H;
1793
- v ? v && (H = (S) => {
1792
+ let O;
1793
+ v ? v && (O = (S) => {
1794
1794
  t && S.preventDefault();
1795
- const O = !L;
1796
- V(O), v(O);
1797
- }) : H = (S) => {
1798
- t && S.preventDefault(), p && p(S);
1795
+ const V = !N;
1796
+ F(V), v(V);
1797
+ }) : O = (S) => {
1798
+ t && S.preventDefault(), h && h(S);
1799
1799
  };
1800
- const M = Nt({
1801
- allowShapeTransformation: h,
1800
+ const I = Nt({
1801
+ allowShapeTransformation: p,
1802
1802
  size: d,
1803
1803
  disableTextMargins: s,
1804
- shape: o,
1805
- href: l,
1804
+ shape: l,
1805
+ href: o,
1806
1806
  disabled: t,
1807
1807
  icon: n,
1808
1808
  iconPosition: a,
1809
- loading: u,
1809
+ loading: i,
1810
1810
  variant: e,
1811
1811
  transition: w,
1812
1812
  className: c,
1813
- isActive: L ?? !1,
1813
+ isActive: N ?? !1,
1814
1814
  onToggle: v,
1815
- activated: L,
1815
+ activated: N,
1816
1816
  label: r,
1817
1817
  children: r
1818
- }), x = n ? /* @__PURE__ */ m(ie, { icon: n, className: M.icon }) : /* @__PURE__ */ m(me, {});
1818
+ }), x = n ? /* @__PURE__ */ m(ie, { icon: n, className: I.icon }) : /* @__PURE__ */ m(me, {});
1819
1819
  return /* @__PURE__ */ Y(
1820
- I,
1820
+ b,
1821
1821
  {
1822
1822
  ref: A,
1823
- href: l,
1824
- className: M.button,
1823
+ href: o,
1824
+ className: I.button,
1825
1825
  ...g,
1826
- onClick: H,
1826
+ onClick: O,
1827
1827
  disabled: t,
1828
- "aria-pressed": v ? L : void 0,
1828
+ "aria-pressed": v ? N : void 0,
1829
1829
  style: { transition: w.duration + "s" },
1830
1830
  children: [
1831
- /* @__PURE__ */ m("div", { className: M.touchTarget }),
1831
+ /* @__PURE__ */ m("div", { className: I.touchTarget }),
1832
1832
  /* @__PURE__ */ m(
1833
1833
  ye,
1834
1834
  {
1835
1835
  style: { transition: w.duration + "s" },
1836
- className: M.stateLayer,
1836
+ className: I.stateLayer,
1837
1837
  colorName: y(
1838
1838
  e === "filled" && {
1839
- "on-surface-variant": !L && !!v,
1840
- "on-primary": L || !v
1839
+ "on-surface-variant": !N && !!v,
1840
+ "on-primary": N || !v
1841
1841
  },
1842
1842
  e === "elevated" && {
1843
- "on-primary": L && !!v,
1844
- primary: !L || !v
1843
+ "on-primary": N && !!v,
1844
+ primary: !N || !v
1845
1845
  },
1846
1846
  e === "tonal" && {
1847
- "on-secondary": L && !!v,
1848
- "on-secondary-container": !L || !v
1847
+ "on-secondary": N && !!v,
1848
+ "on-secondary-container": !N || !v
1849
1849
  },
1850
1850
  e === "outlined" && {
1851
- "inverse-on-surface": L && !!v,
1852
- "on-surface-variant": !L || !v
1851
+ "inverse-on-surface": N && !!v,
1852
+ "on-surface-variant": !N || !v
1853
1853
  },
1854
1854
  e === "text" && "primary"
1855
1855
  ),
@@ -1857,7 +1857,7 @@ const ct = ({
1857
1857
  }
1858
1858
  ),
1859
1859
  a === "left" && x,
1860
- u && /* @__PURE__ */ m(
1860
+ i && /* @__PURE__ */ m(
1861
1861
  "div",
1862
1862
  {
1863
1863
  className: "!absolute left-1/2 -translate-x-1/2 top-1/2 -translate-y-1/2",
@@ -1894,7 +1894,7 @@ const ct = ({
1894
1894
  )
1895
1895
  }
1896
1896
  ),
1897
- /* @__PURE__ */ m("span", { className: M.label, children: r }),
1897
+ /* @__PURE__ */ m("span", { className: I.label, children: r }),
1898
1898
  a === "right" && x
1899
1899
  ]
1900
1900
  }
@@ -1903,13 +1903,13 @@ const ct = ({
1903
1903
  variant: e = "outlined",
1904
1904
  className: t,
1905
1905
  children: n,
1906
- isInteractive: l = !1,
1906
+ isInteractive: o = !1,
1907
1907
  ref: r,
1908
1908
  ...s
1909
1909
  }) => {
1910
- const c = Et({ className: t, isInteractive: l, variant: e, children: n }), a = W(null);
1910
+ const c = Et({ className: t, isInteractive: o, variant: e, children: n }), a = W(null);
1911
1911
  return /* @__PURE__ */ Y("div", { ...s, ref: r || a, className: c.card, children: [
1912
- l && /* @__PURE__ */ m(
1912
+ o && /* @__PURE__ */ m(
1913
1913
  ye,
1914
1914
  {
1915
1915
  className: c.stateLayer,
@@ -1920,20 +1920,20 @@ const ct = ({
1920
1920
  n
1921
1921
  ] });
1922
1922
  }, he = (e, t, n = [0, 1]) => {
1923
- const [l, r] = t, [s, c] = n, u = (Math.max(l, Math.min(e, r)) - l) / (r - l);
1924
- return s + u * (c - s);
1923
+ const [o, r] = t, [s, c] = n, i = (Math.max(o, Math.min(e, r)) - o) / (r - o);
1924
+ return s + i * (c - s);
1925
1925
  }, nn = ({
1926
1926
  className: e,
1927
1927
  children: t,
1928
1928
  width: n,
1929
- index: l = 0,
1929
+ index: o = 0,
1930
1930
  outputRange: r,
1931
1931
  ref: s,
1932
1932
  ...c
1933
1933
  }) => {
1934
- const a = W(null), u = s || a, o = St({
1934
+ const a = W(null), i = s || a, l = St({
1935
1935
  className: e,
1936
- index: l,
1936
+ index: o,
1937
1937
  width: n,
1938
1938
  children: t,
1939
1939
  outputRange: r
@@ -1941,7 +1941,7 @@ const ct = ({
1941
1941
  return /* @__PURE__ */ m(
1942
1942
  "div",
1943
1943
  {
1944
- ref: u,
1944
+ ref: i,
1945
1945
  style: {
1946
1946
  width: n + "px",
1947
1947
  maxWidth: r[1] + "px",
@@ -1952,7 +1952,7 @@ const ct = ({
1952
1952
  duration: 0.5,
1953
1953
  ease: "linear"
1954
1954
  },
1955
- className: o.carouselItem,
1955
+ className: l.carouselItem,
1956
1956
  ...c,
1957
1957
  children: t
1958
1958
  }
@@ -1961,38 +1961,38 @@ const ct = ({
1961
1961
  variant: e = "hero",
1962
1962
  className: t,
1963
1963
  children: n,
1964
- ref: l,
1964
+ ref: o,
1965
1965
  marginPourcent: r = 0,
1966
1966
  inputRange: s = [0.21, 0.65],
1967
1967
  outputRange: c = [42, 300],
1968
1968
  gap: a = 8,
1969
- onChange: u,
1970
- onMetricsChange: o,
1971
- index: p,
1969
+ onChange: i,
1970
+ onMetricsChange: l,
1971
+ index: h,
1972
1972
  scrollSensitivity: v = 1.25,
1973
1973
  ...f
1974
1974
  }) => {
1975
- const i = W(null), d = l || i, [h, w] = $(0), b = It({
1976
- index: p,
1975
+ const u = W(null), d = o || u, [p, w] = M(0), E = It({
1976
+ index: h,
1977
1977
  className: t,
1978
1978
  children: n,
1979
1979
  variant: e,
1980
1980
  inputRange: s,
1981
1981
  outputRange: c,
1982
1982
  marginPourcent: r,
1983
- onChange: u,
1983
+ onChange: i,
1984
1984
  gap: a,
1985
1985
  scrollSensitivity: v,
1986
- onMetricsChange: o
1986
+ onMetricsChange: l
1987
1987
  }), g = Z.Children.toArray(n).filter(
1988
- (N) => Z.isValidElement(N) && N.type === nn
1989
- ), I = W(null), [E, A] = $(
1988
+ (L) => Z.isValidElement(L) && L.type === nn
1989
+ ), b = W(null), [R, A] = M(
1990
1990
  {}
1991
- ), [L, V] = $(null), H = W(0), M = W(null), x = () => {
1991
+ ), [N, F] = M(null), O = W(0), I = W(null), x = () => {
1992
1992
  var fe, we;
1993
- if (!I.current || !d.current || (L == null ? void 0 : L.scrollProgress) === void 0)
1993
+ if (!b.current || !d.current || (N == null ? void 0 : N.scrollProgress) === void 0)
1994
1994
  return [];
1995
- const N = (L == null ? void 0 : L.scrollVisible) ?? ((fe = d.current) == null ? void 0 : fe.clientWidth) ?? 0;
1995
+ const L = (N == null ? void 0 : N.scrollVisible) ?? ((fe = d.current) == null ? void 0 : fe.clientWidth) ?? 0;
1996
1996
  function D(P, T) {
1997
1997
  return P.map((ee, ve) => {
1998
1998
  const Ee = (ee - T) / Math.abs(P[1] - P[0]);
@@ -2004,15 +2004,15 @@ const ct = ({
2004
2004
  };
2005
2005
  });
2006
2006
  }
2007
- const F = g.map((P, T) => {
2008
- if (!S[T].current || !I.current) return 0;
2007
+ const H = g.map((P, T) => {
2008
+ if (!S[T].current || !b.current) return 0;
2009
2009
  const ve = T / (g.length - 1);
2010
2010
  return he(ve, [0, 1], [0, 1]);
2011
2011
  }), j = D(
2012
- F,
2013
- (L == null ? void 0 : L.scrollProgress) ?? 0
2012
+ H,
2013
+ (N == null ? void 0 : N.scrollProgress) ?? 0
2014
2014
  ).sort((P, T) => P.index - T.index);
2015
- let X = (((we = d.current) == null ? void 0 : we.clientWidth) ?? N) + a + c[0] + a;
2015
+ let X = (((we = d.current) == null ? void 0 : we.clientWidth) ?? L) + a + c[0] + a;
2016
2016
  const re = j.sort((P, T) => Math.abs(P.relativeIndex) - Math.abs(T.relativeIndex)).map((P, T) => {
2017
2017
  if (!(X <= 0)) {
2018
2018
  if (T == 0 && G(P.index), P.width = he(
@@ -2049,26 +2049,26 @@ const ct = ({
2049
2049
  return w(Ne), Object.fromEntries(
2050
2050
  re.map((P) => [P.index, P.width])
2051
2051
  );
2052
- }, S = W([]).current, [O, G] = $(0);
2053
- R(() => {
2054
- u && u(O);
2055
- }, [O]), R(() => {
2056
- typeof p == "number" && g.length > 0 && p !== O && ne(p);
2057
- }, [p, g.length]), R(() => {
2058
- _(O);
2059
- }, [O]), S.length !== g.length && g.forEach((N, D) => {
2052
+ }, S = W([]).current, [V, G] = M(0);
2053
+ $(() => {
2054
+ i && i(V);
2055
+ }, [V]), $(() => {
2056
+ typeof h == "number" && g.length > 0 && h !== V && ne(h);
2057
+ }, [h, g.length]), $(() => {
2058
+ _(V);
2059
+ }, [V]), S.length !== g.length && g.forEach((L, D) => {
2060
2060
  S[D] || (S[D] = Z.createRef());
2061
2061
  });
2062
- const [te, _] = $(0), ne = (N, D = {}) => {
2062
+ const [te, _] = M(0), ne = (L, D = {}) => {
2063
2063
  if (!g.length) return 0;
2064
- const F = S[N];
2065
- if (!F || !F.current || !I.current) return 0;
2064
+ const H = S[L];
2065
+ if (!H || !H.current || !b.current) return 0;
2066
2066
  const j = he(
2067
- N / Math.max(1, g.length - 1),
2067
+ L / Math.max(1, g.length - 1),
2068
2068
  [0, 1],
2069
2069
  [0, 1]
2070
2070
  );
2071
- return _(N), I.current.dispatchEvent(
2071
+ return _(L), b.current.dispatchEvent(
2072
2072
  new CustomEvent("udx:customScroll:set", {
2073
2073
  bubbles: !0,
2074
2074
  detail: {
@@ -2078,32 +2078,32 @@ const ct = ({
2078
2078
  }
2079
2079
  })
2080
2080
  ), j;
2081
- }, B = g.map((N, D) => {
2081
+ }, B = g.map((L, D) => {
2082
2082
  var re;
2083
- const F = (re = N.props) == null ? void 0 : re.onClick, j = (ae) => {
2084
- F == null || F(ae);
2083
+ const H = (re = L.props) == null ? void 0 : re.onClick, j = (ae) => {
2084
+ H == null || H(ae);
2085
2085
  }, X = () => _(D);
2086
2086
  return Z.cloneElement(
2087
- N,
2087
+ L,
2088
2088
  {
2089
- width: E[D],
2089
+ width: R[D],
2090
2090
  outputRange: c,
2091
2091
  ref: S[D],
2092
2092
  key: D,
2093
2093
  index: D,
2094
2094
  role: "option",
2095
- "aria-selected": O === D,
2096
- tabIndex: O === D ? 0 : -1,
2095
+ "aria-selected": V === D,
2096
+ tabIndex: V === D ? 0 : -1,
2097
2097
  onClick: j,
2098
2098
  onFocus: X
2099
2099
  }
2100
2100
  );
2101
- }), k = (N) => {
2101
+ }), k = (L) => {
2102
2102
  var D;
2103
- if (N.scrollTotal > 0) {
2104
- (D = M.current) == null || D.stop();
2105
- const F = H.current ?? 0, j = N.scrollProgress ?? 0;
2106
- M.current = ht(F, j, {
2103
+ if (L.scrollTotal > 0) {
2104
+ (D = I.current) == null || D.stop();
2105
+ const H = O.current ?? 0, j = L.scrollProgress ?? 0;
2106
+ I.current = ht(H, j, {
2107
2107
  // Spring tuning to add a bit of inertia and smoothness
2108
2108
  type: "spring",
2109
2109
  stiffness: 260,
@@ -2111,28 +2111,28 @@ const ct = ({
2111
2111
  mass: 0.6,
2112
2112
  restDelta: 5e-4,
2113
2113
  onUpdate: (X) => {
2114
- H.current = X, V({ ...N, scrollProgress: X });
2114
+ O.current = X, F({ ...L, scrollProgress: X });
2115
2115
  }
2116
2116
  });
2117
2117
  }
2118
2118
  };
2119
- R(() => {
2120
- const N = x();
2121
- A(N);
2122
- }, [L]);
2123
- const U = W(o);
2124
- R(() => {
2125
- U.current = o;
2126
- }, [o]);
2119
+ $(() => {
2120
+ const L = x();
2121
+ A(L);
2122
+ }, [N]);
2123
+ const U = W(l);
2124
+ $(() => {
2125
+ U.current = l;
2126
+ }, [l]);
2127
2127
  const K = W(null);
2128
- R(() => {
2128
+ $(() => {
2129
2129
  var T;
2130
- const N = U.current;
2131
- if (!N || !(d != null && d.current)) return;
2130
+ const L = U.current;
2131
+ if (!L || !(d != null && d.current)) return;
2132
2132
  const D = g.length;
2133
2133
  if (D <= 0) return;
2134
- const F = ((T = d.current) == null ? void 0 : T.clientWidth) ?? 0, j = c[1], X = H.current ?? (L == null ? void 0 : L.scrollProgress) ?? 0, re = (F + a) / (j + a), ae = Math.max(1, Math.floor(re)), de = Math.max(1, Math.round(ae * (2 / 3))), ce = Math.min(
2135
- Math.max(0, O),
2134
+ const H = ((T = d.current) == null ? void 0 : T.clientWidth) ?? 0, j = c[1], X = O.current ?? (N == null ? void 0 : N.scrollProgress) ?? 0, re = (H + a) / (j + a), ae = Math.max(1, Math.floor(re)), de = Math.max(1, Math.round(ae * (2 / 3))), ce = Math.min(
2135
+ Math.max(0, V),
2136
2136
  Math.max(0, D - 1)
2137
2137
  ), oe = ce > 0, Ne = ce < D - 1, fe = {
2138
2138
  total: D,
@@ -2143,7 +2143,7 @@ const ct = ({
2143
2143
  canPrev: oe,
2144
2144
  canNext: Ne,
2145
2145
  scrollProgress: X,
2146
- viewportWidth: F,
2146
+ viewportWidth: H,
2147
2147
  itemMaxWidth: j,
2148
2148
  gap: a
2149
2149
  }, we = K.current;
@@ -2155,49 +2155,49 @@ const ct = ({
2155
2155
  break;
2156
2156
  }
2157
2157
  }
2158
- P && (K.current = fe, N(fe));
2159
- }, [d, g.length, O, L, a, c]), R(() => () => {
2160
- var N;
2161
- (N = M.current) == null || N.stop();
2158
+ P && (K.current = fe, L(fe));
2159
+ }, [d, g.length, V, N, a, c]), $(() => () => {
2160
+ var L;
2161
+ (L = I.current) == null || L.stop();
2162
2162
  }, []);
2163
- const [le, ue] = $(0);
2163
+ const [le, ue] = M(0);
2164
2164
  Ve(() => {
2165
- let N = c[1];
2166
- L && N > L.scrollVisible && (N = L.scrollVisible);
2167
- const D = (N + a) * B.length / v;
2165
+ let L = c[1];
2166
+ N && L > N.scrollVisible && (L = N.scrollVisible);
2167
+ const D = (L + a) * B.length / v;
2168
2168
  ue(D);
2169
- }, [d, S, L]);
2170
- const C = (N) => {
2169
+ }, [d, S, N]);
2170
+ const C = (L) => {
2171
2171
  if (!g.length) return;
2172
- const D = te ?? O;
2173
- switch (N.key) {
2172
+ const D = te ?? V;
2173
+ switch (L.key) {
2174
2174
  case "ArrowLeft":
2175
- N.preventDefault(), ne(Math.max(0, D - 1));
2175
+ L.preventDefault(), ne(Math.max(0, D - 1));
2176
2176
  break;
2177
2177
  case "ArrowRight":
2178
- N.preventDefault(), ne(Math.min(g.length - 1, D + 1));
2178
+ L.preventDefault(), ne(Math.min(g.length - 1, D + 1));
2179
2179
  break;
2180
2180
  case "Home":
2181
- N.preventDefault(), ne(0);
2181
+ L.preventDefault(), ne(0);
2182
2182
  break;
2183
2183
  case "End":
2184
- N.preventDefault(), ne(g.length - 1);
2184
+ L.preventDefault(), ne(g.length - 1);
2185
2185
  break;
2186
2186
  case "Enter":
2187
2187
  case " ":
2188
- N.preventDefault(), ne(D);
2188
+ L.preventDefault(), ne(D);
2189
2189
  break;
2190
2190
  }
2191
2191
  };
2192
- return R(() => {
2193
- const N = d.current;
2194
- if (!N) return;
2195
- const D = (F) => {
2196
- const j = F.detail;
2192
+ return $(() => {
2193
+ const L = d.current;
2194
+ if (!L) return;
2195
+ const D = (H) => {
2196
+ const j = H.detail;
2197
2197
  j && typeof j.index == "number" && ne(j.index);
2198
2198
  };
2199
- return N.addEventListener("udx:carousel:centerIndex", D), () => {
2200
- N.removeEventListener(
2199
+ return L.addEventListener("udx:carousel:centerIndex", D), () => {
2200
+ L.removeEventListener(
2201
2201
  "udx:carousel:centerIndex",
2202
2202
  D
2203
2203
  );
@@ -2205,7 +2205,7 @@ const ct = ({
2205
2205
  }, [d, g.length]), /* @__PURE__ */ m(
2206
2206
  "div",
2207
2207
  {
2208
- className: b.carousel,
2208
+ className: E.carousel,
2209
2209
  ref: d,
2210
2210
  role: "listbox",
2211
2211
  "aria-orientation": "horizontal",
@@ -2221,11 +2221,11 @@ const ct = ({
2221
2221
  children: /* @__PURE__ */ m(
2222
2222
  "div",
2223
2223
  {
2224
- className: b.track,
2225
- ref: I,
2224
+ className: E.track,
2225
+ ref: b,
2226
2226
  style: {
2227
2227
  gap: `${a}px`,
2228
- translate: h,
2228
+ translate: p,
2229
2229
  willChange: "translate"
2230
2230
  },
2231
2231
  children: B
@@ -2240,8 +2240,8 @@ const ct = ({
2240
2240
  className: t,
2241
2241
  ...n
2242
2242
  }) => {
2243
- const l = kt({ orientation: e, className: t });
2244
- return /* @__PURE__ */ m("hr", { className: l.divider, ...n });
2243
+ const o = kt({ orientation: e, className: t });
2244
+ return /* @__PURE__ */ m("hr", { className: o.divider, ...n });
2245
2245
  }, z = [];
2246
2246
  for (let e = 0; e < 256; ++e)
2247
2247
  z.push((e + 256).toString(16).slice(1));
@@ -2264,29 +2264,29 @@ function ge(e, t, n) {
2264
2264
  if (Fe.randomUUID && !e)
2265
2265
  return Fe.randomUUID();
2266
2266
  e = e || {};
2267
- const l = e.random ?? ((r = e.rng) == null ? void 0 : r.call(e)) ?? an();
2268
- if (l.length < 16)
2267
+ const o = e.random ?? ((r = e.rng) == null ? void 0 : r.call(e)) ?? an();
2268
+ if (o.length < 16)
2269
2269
  throw new Error("Random bytes length must be >= 16");
2270
- return l[6] = l[6] & 15 | 64, l[8] = l[8] & 63 | 128, on(l);
2270
+ return o[6] = o[6] & 15 | 64, o[8] = o[8] & 63 | 128, on(o);
2271
2271
  }
2272
2272
  const it = ({
2273
2273
  variant: e = "plain",
2274
2274
  buttons: t,
2275
2275
  className: n,
2276
- children: l,
2276
+ children: o,
2277
2277
  title: r,
2278
2278
  text: s,
2279
2279
  position: c,
2280
2280
  targetRef: a,
2281
- ref: u,
2282
- trigger: o = ["hover", "focus"],
2283
- ...p
2281
+ ref: i,
2282
+ trigger: l = ["hover", "focus"],
2283
+ ...h
2284
2284
  }) => {
2285
- if (!l && !a)
2285
+ if (!o && !a)
2286
2286
  throw new Error("ToolTip must have a child or a targetRef");
2287
- Array.isArray(o) || (o = [o]), t && !Array.isArray(t) && (t = [t]);
2288
- const v = W(null), f = a || v, [i, d] = $(null), [h] = $(ge()), [w, b] = $(!1), g = W(null);
2289
- R(() => {
2287
+ Array.isArray(l) || (l = [l]), t && !Array.isArray(t) && (t = [t]);
2288
+ const v = W(null), f = a || v, [u, d] = M(null), [p] = M(ge()), [w, E] = M(!1), g = W(null);
2289
+ $(() => {
2290
2290
  const x = (S) => {
2291
2291
  d(S.detail);
2292
2292
  };
@@ -2296,80 +2296,80 @@ const it = ({
2296
2296
  x
2297
2297
  );
2298
2298
  };
2299
- }, []), R(() => {
2300
- g.current && clearTimeout(g.current), i ? b(i === h) : g.current = setTimeout(() => {
2301
- b(!1);
2299
+ }, []), $(() => {
2300
+ g.current && clearTimeout(g.current), u ? E(u === p) : g.current = setTimeout(() => {
2301
+ E(!1);
2302
2302
  }, 1200);
2303
- }, [i, h]);
2304
- const I = () => {
2305
- if (o.includes("hover")) {
2306
- const x = new CustomEvent("tooltip-update", { detail: h });
2303
+ }, [u, p]);
2304
+ const b = () => {
2305
+ if (l.includes("hover")) {
2306
+ const x = new CustomEvent("tooltip-update", { detail: p });
2307
2307
  document.dispatchEvent(x);
2308
2308
  }
2309
- }, E = () => {
2310
- if (o.includes("hover")) {
2309
+ }, R = () => {
2310
+ if (l.includes("hover")) {
2311
2311
  const x = new CustomEvent("tooltip-update", { detail: null });
2312
2312
  document.dispatchEvent(x);
2313
2313
  }
2314
2314
  }, A = () => {
2315
- if (o.includes("click")) {
2315
+ if (l.includes("click")) {
2316
2316
  const x = new CustomEvent("tooltip-update", {
2317
- detail: w ? null : h
2317
+ detail: w ? null : p
2318
2318
  });
2319
2319
  document.dispatchEvent(x);
2320
2320
  }
2321
- }, L = () => {
2322
- if (o.includes("focus")) {
2323
- const x = new CustomEvent("tooltip-update", { detail: h });
2321
+ }, N = () => {
2322
+ if (l.includes("focus")) {
2323
+ const x = new CustomEvent("tooltip-update", { detail: p });
2324
2324
  document.dispatchEvent(x);
2325
2325
  }
2326
- }, V = () => {
2327
- if (o.includes("focus")) {
2326
+ }, F = () => {
2327
+ if (l.includes("focus")) {
2328
2328
  const x = new CustomEvent("tooltip-update", { detail: null });
2329
2329
  document.dispatchEvent(x);
2330
2330
  }
2331
2331
  };
2332
- R(() => {
2332
+ $(() => {
2333
2333
  if (f != null && f.current) {
2334
2334
  const x = f.current;
2335
- return x.addEventListener("mouseenter", I), x.addEventListener("mouseleave", E), x.addEventListener("click", A), x.addEventListener("focus", L), x.addEventListener("blur", V), () => {
2336
- x.removeEventListener("mouseenter", I), x.removeEventListener("mouseleave", E), x.removeEventListener("click", A), x.removeEventListener("focus", L), x.removeEventListener("blur", V);
2335
+ return x.addEventListener("mouseenter", b), x.addEventListener("mouseleave", R), x.addEventListener("click", A), x.addEventListener("focus", N), x.addEventListener("blur", F), () => {
2336
+ x.removeEventListener("mouseenter", b), x.removeEventListener("mouseleave", R), x.removeEventListener("click", A), x.removeEventListener("focus", N), x.removeEventListener("blur", F);
2337
2337
  };
2338
2338
  }
2339
- }, [f, o, h, w]);
2340
- const H = !a && pe(l) ? xe(l, { ref: v }) : l;
2339
+ }, [f, l, p, w]);
2340
+ const O = !a && pe(o) ? xe(o, { ref: v }) : o;
2341
2341
  if (!c && typeof window < "u" && f != null && f.current && !c) {
2342
- const x = f.current.getBoundingClientRect(), S = window.innerWidth, O = window.innerHeight, G = x.left / S, te = x.top / O;
2342
+ const x = f.current.getBoundingClientRect(), S = window.innerWidth, V = window.innerHeight, G = x.left / S, te = x.top / V;
2343
2343
  e === "plain" ? G < 1 / 3 ? c = "right" : G > 2 / 3 ? c = "left" : c = te > 0.5 ? "top" : "bottom" : G < 1 / 2 && te < 1 / 2 ? c = "bottom-right" : G > 1 / 2 && te < 1 / 2 ? c = "bottom-left" : G > 1 / 2 && te > 1 / 2 ? c = "top-left" : G < 1 / 2 && te > 1 / 2 && (c = "top-right");
2344
2344
  }
2345
- const M = Ot({
2345
+ const I = Ot({
2346
2346
  variant: e,
2347
2347
  buttons: t,
2348
2348
  className: n,
2349
2349
  title: r,
2350
2350
  text: s,
2351
2351
  position: c,
2352
- trigger: o,
2352
+ trigger: l,
2353
2353
  targetRef: a,
2354
- children: l
2354
+ children: o
2355
2355
  });
2356
2356
  return /* @__PURE__ */ Y(me, { children: [
2357
- H,
2357
+ O,
2358
2358
  /* @__PURE__ */ m(se, { children: w && /* @__PURE__ */ m(Gt, { targetRef: f, children: /* @__PURE__ */ m(
2359
2359
  q.div,
2360
2360
  {
2361
- initial: { opacity: i ? 1 : 0 },
2361
+ initial: { opacity: u ? 1 : 0 },
2362
2362
  animate: { opacity: 1 },
2363
- transition: { duration: i ? 0 : 0.3 },
2364
- exit: { opacity: i ? 1 : 0 },
2365
- className: M.toolTip,
2366
- ...p,
2367
- onMouseEnter: I,
2368
- onMouseLeave: E,
2363
+ transition: { duration: u ? 0 : 0.3 },
2364
+ exit: { opacity: u ? 1 : 0 },
2365
+ className: I.toolTip,
2366
+ ...h,
2367
+ onMouseEnter: b,
2368
+ onMouseLeave: R,
2369
2369
  children: /* @__PURE__ */ Y(
2370
2370
  q.div,
2371
2371
  {
2372
- className: M.container,
2372
+ className: I.container,
2373
2373
  layoutId: "tool-tip",
2374
2374
  transition: {
2375
2375
  type: "spring",
@@ -2377,9 +2377,9 @@ const it = ({
2377
2377
  damping: 20
2378
2378
  },
2379
2379
  children: [
2380
- r && /* @__PURE__ */ m("div", { className: M.subHead, children: r }),
2381
- /* @__PURE__ */ m("div", { className: M.supportingText, children: s }),
2382
- t && /* @__PURE__ */ m("div", { className: M.actions, children: Array.isArray(t) && t.map((x, S) => /* @__PURE__ */ m(
2380
+ r && /* @__PURE__ */ m("div", { className: I.subHead, children: r }),
2381
+ /* @__PURE__ */ m("div", { className: I.supportingText, children: s }),
2382
+ t && /* @__PURE__ */ m("div", { className: I.actions, children: Array.isArray(t) && t.map((x, S) => /* @__PURE__ */ m(
2383
2383
  ct,
2384
2384
  {
2385
2385
  size: "small",
@@ -2398,42 +2398,42 @@ const it = ({
2398
2398
  className: e,
2399
2399
  label: t,
2400
2400
  variant: n = "primary",
2401
- size: l = "medium",
2401
+ size: o = "medium",
2402
2402
  href: r,
2403
2403
  type: s,
2404
2404
  icon: c,
2405
2405
  extended: a = !1,
2406
- ref: u,
2407
- transition: o,
2408
- children: p,
2406
+ ref: i,
2407
+ transition: l,
2408
+ children: h,
2409
2409
  ...v
2410
2410
  }) => {
2411
- if (p && (t = p), !t)
2411
+ if (h && (t = h), !t)
2412
2412
  throw new Error(
2413
2413
  "FAB component requires either a label prop or children content"
2414
2414
  );
2415
- const f = r ? "a" : "button", i = Ct({
2415
+ const f = r ? "a" : "button", u = Ct({
2416
2416
  href: r,
2417
2417
  icon: c,
2418
2418
  extended: a,
2419
2419
  label: t,
2420
- size: l,
2420
+ size: o,
2421
2421
  variant: n,
2422
2422
  className: e,
2423
- transition: o,
2423
+ transition: l,
2424
2424
  children: t
2425
2425
  });
2426
- o = { duration: 0.3, ...o };
2427
- const d = W(null), h = u || d, w = {
2426
+ l = { duration: 0.3, ...l };
2427
+ const d = W(null), p = i || d, w = {
2428
2428
  visible: {
2429
2429
  width: "auto",
2430
2430
  marginLeft: 12,
2431
2431
  opacity: 1,
2432
2432
  transition: {
2433
- ...o,
2433
+ ...l,
2434
2434
  opacity: {
2435
- duration: o.duration / 2,
2436
- delay: o.duration - o.duration / 2
2435
+ duration: l.duration / 2,
2436
+ delay: l.duration - l.duration / 2
2437
2437
  }
2438
2438
  }
2439
2439
  },
@@ -2442,10 +2442,10 @@ const it = ({
2442
2442
  marginLeft: 0,
2443
2443
  opacity: 0,
2444
2444
  transition: {
2445
- ...o,
2445
+ ...l,
2446
2446
  marginLeft: {
2447
- duration: o.duration / 2,
2448
- delay: o.duration - o.duration / 2
2447
+ duration: l.duration / 2,
2448
+ delay: l.duration - l.duration / 2
2449
2449
  }
2450
2450
  }
2451
2451
  }
@@ -2454,24 +2454,24 @@ const it = ({
2454
2454
  f,
2455
2455
  {
2456
2456
  ...v,
2457
- ref: h,
2457
+ ref: p,
2458
2458
  href: r,
2459
2459
  "aria-label": a ? void 0 : t,
2460
- className: i.fab,
2460
+ className: u.fab,
2461
2461
  children: [
2462
2462
  /* @__PURE__ */ m(
2463
2463
  it,
2464
2464
  {
2465
2465
  trigger: a ? null : void 0,
2466
2466
  text: t,
2467
- targetRef: h
2467
+ targetRef: p
2468
2468
  }
2469
2469
  ),
2470
2470
  /* @__PURE__ */ m(
2471
2471
  ye,
2472
2472
  {
2473
- style: { transition: o.duration + "s" },
2474
- className: i.stateLayer,
2473
+ style: { transition: l.duration + "s" },
2474
+ className: u.stateLayer,
2475
2475
  colorName: y({
2476
2476
  "on-primary": n == "primary",
2477
2477
  "on-secondary": n == "secondary",
@@ -2483,7 +2483,7 @@ const it = ({
2483
2483
  stateClassName: "state-ripple-group-[fab]"
2484
2484
  }
2485
2485
  ),
2486
- /* @__PURE__ */ m(ie, { icon: c, className: i.icon }),
2486
+ /* @__PURE__ */ m(ie, { icon: c, className: u.icon }),
2487
2487
  /* @__PURE__ */ m(se, { children: a && /* @__PURE__ */ m(
2488
2488
  q.span,
2489
2489
  {
@@ -2491,7 +2491,7 @@ const it = ({
2491
2491
  initial: "hidden",
2492
2492
  animate: "visible",
2493
2493
  exit: "hidden",
2494
- className: i.label,
2494
+ className: u.label,
2495
2495
  children: t
2496
2496
  }
2497
2497
  ) })
@@ -2502,106 +2502,105 @@ const it = ({
2502
2502
  variant: e = "standard",
2503
2503
  href: t,
2504
2504
  disabled: n = !1,
2505
- type: l = "button",
2506
- title: r,
2507
- label: s,
2508
- onToggle: c,
2509
- activated: a = !1,
2510
- onClick: u,
2511
- icon: o,
2512
- size: p = "medium",
2513
- iconSelected: v,
2514
- className: f,
2515
- ref: i,
2516
- width: d = "default",
2517
- shape: h = "rounded",
2518
- allowShapeTransformation: w = !0,
2519
- transition: b,
2520
- children: g,
2521
- ...I
2505
+ title: o,
2506
+ label: r,
2507
+ onToggle: s,
2508
+ activated: c = !1,
2509
+ onClick: a,
2510
+ icon: i,
2511
+ size: l = "medium",
2512
+ iconSelected: h,
2513
+ className: v,
2514
+ ref: f,
2515
+ width: u = "default",
2516
+ shape: d = "rounded",
2517
+ allowShapeTransformation: p = !0,
2518
+ transition: w,
2519
+ children: E,
2520
+ ...g
2522
2521
  }) => {
2523
- if (g && (s = g), !s)
2522
+ if (E && (r = E), !r)
2524
2523
  throw new Error(
2525
2524
  "IconButton component requires either a label prop or children content to provide an accessible aria-label"
2526
2525
  );
2527
- r || (r = s);
2528
- const [E, A] = Z.useState(a);
2529
- let L;
2530
- c ? c && (L = (S) => {
2531
- n && S.preventDefault(), A(!E), c(!!E);
2532
- }, o = E && v || o) : L = (S) => {
2533
- n && S.preventDefault(), u && u(S);
2534
- }, R(() => {
2535
- A(a);
2536
- }, [a]);
2537
- const V = t ? "a" : "button", H = $t({
2538
- transition: b,
2539
- shape: h,
2540
- allowShapeTransformation: w,
2541
- width: d,
2526
+ o || (o = r);
2527
+ const [b, R] = Z.useState(c);
2528
+ let A;
2529
+ s ? s && (A = (x) => {
2530
+ n && x.preventDefault(), R(!b), s(!!b);
2531
+ }, i = b && h || i) : A = (x) => {
2532
+ n && x.preventDefault(), a && a(x);
2533
+ }, $(() => {
2534
+ R(c);
2535
+ }, [c]);
2536
+ const N = t ? "a" : "button", F = $t({
2537
+ transition: w,
2538
+ shape: d,
2539
+ allowShapeTransformation: p,
2540
+ width: u,
2542
2541
  href: t,
2543
- activated: E,
2544
- label: s,
2545
- iconSelected: v,
2546
- isActive: E,
2547
- onToggle: c,
2542
+ activated: b,
2543
+ label: r,
2544
+ iconSelected: h,
2545
+ isActive: b,
2546
+ onToggle: s,
2548
2547
  disabled: n,
2549
- icon: o,
2548
+ icon: i,
2550
2549
  variant: e,
2551
- className: f,
2552
- size: p,
2553
- children: s,
2554
- ...I
2555
- }), M = W(null), x = i || M;
2556
- return b = { duration: 0.3, ...b }, /* @__PURE__ */ Y(
2557
- V,
2550
+ className: v,
2551
+ size: l,
2552
+ children: r,
2553
+ ...g
2554
+ }), O = W(null), I = f || O;
2555
+ return w = { duration: 0.3, ...w }, /* @__PURE__ */ Y(
2556
+ N,
2558
2557
  {
2559
2558
  disabled: n,
2560
2559
  href: t,
2561
- style: { transition: b.duration + "s" },
2562
- className: H.iconButton,
2563
- "aria-label": s,
2564
- ...I,
2560
+ style: { transition: w.duration + "s" },
2561
+ className: F.iconButton,
2562
+ "aria-label": r,
2563
+ ...g,
2565
2564
  title: void 0,
2566
- onClick: L,
2567
- ref: x,
2565
+ onClick: A,
2566
+ ref: I,
2568
2567
  children: [
2569
2568
  /* @__PURE__ */ m(
2570
2569
  it,
2571
2570
  {
2572
- targetRef: x,
2571
+ targetRef: I,
2573
2572
  trigger: n ? null : void 0,
2574
- text: r
2573
+ text: o
2575
2574
  }
2576
2575
  ),
2577
- /* @__PURE__ */ m("div", { className: H.touchTarget }),
2576
+ /* @__PURE__ */ m("div", { className: F.touchTarget }),
2578
2577
  /* @__PURE__ */ m(
2579
2578
  ye,
2580
2579
  {
2581
- style: { transition: b.duration + "s" },
2582
- className: H.stateLayer,
2580
+ style: { transition: w.duration + "s" },
2581
+ className: F.stateLayer,
2583
2582
  colorName: y(
2584
2583
  e === "standard" && {
2585
- "on-surface-variant": !E,
2586
- "on-primary": E
2584
+ "on-surface-variant": !b,
2585
+ "on-primary": b
2587
2586
  },
2588
2587
  e === "filled" && {
2589
- "on-surface-variant": !E && !!c,
2590
- "on-primary": E || !c
2588
+ "on-surface-variant": !b && !!s,
2589
+ "on-primary": b || !s
2591
2590
  },
2592
2591
  e === "tonal" && {
2593
- "on-secondary": E && !!c,
2594
- "on-secondary-container": !E || !c
2592
+ "on-secondary": b && !!s,
2593
+ "on-secondary-container": !b || !s
2595
2594
  },
2596
2595
  e === "outlined" && {
2597
- "inverse-on-surface": E && !!c,
2598
- "on-surface-variant": !E || !c
2596
+ "inverse-on-surface": b && !!s,
2597
+ "on-surface-variant": !b || !s
2599
2598
  }
2600
2599
  ),
2601
2600
  stateClassName: "state-ripple-group-[icon-button]"
2602
2601
  }
2603
2602
  ),
2604
- o && /* @__PURE__ */ m(ie, { icon: o, className: H.icon })
2603
+ i && /* @__PURE__ */ m(ie, { icon: i, className: F.icon })
2605
2604
  ]
2606
2605
  }
2607
2606
  );
@@ -2628,71 +2627,71 @@ const zn = ({
2628
2627
  className: e,
2629
2628
  label: t,
2630
2629
  variant: n = "primary",
2631
- size: l = "medium",
2630
+ size: o = "medium",
2632
2631
  href: r,
2633
2632
  icon: s,
2634
2633
  extended: c = !1,
2635
2634
  ref: a,
2636
- transition: u,
2637
- children: o,
2638
- open: p,
2635
+ transition: i,
2636
+ children: l,
2637
+ open: h,
2639
2638
  defaultOpen: v = !1,
2640
2639
  onOpenChange: f,
2641
- ...i
2640
+ ...u
2642
2641
  }) => {
2643
- u = { duration: 0.3, ease: "easeInOut", ...u };
2644
- const d = W(null), h = a || d, w = typeof p == "boolean", [b, g] = $(v), I = w ? p : b, E = (S) => {
2642
+ i = { duration: 0.3, ease: "easeInOut", ...i };
2643
+ const d = W(null), p = a || d, w = typeof h == "boolean", [E, g] = M(v), b = w ? h : E, R = (S) => {
2645
2644
  w || g(S), f == null || f(S);
2646
- }, A = Z.Children.toArray(o).filter(
2645
+ }, A = Z.Children.toArray(l).filter(
2647
2646
  (S) => Z.isValidElement(S) && S.type === ct
2648
- ), L = Mt({
2647
+ ), N = Mt({
2649
2648
  href: r,
2650
2649
  icon: s,
2651
2650
  extended: c,
2652
2651
  label: t,
2653
- size: l,
2652
+ size: o,
2654
2653
  variant: n,
2655
2654
  className: e,
2656
- transition: u,
2655
+ transition: i,
2657
2656
  children: t,
2658
- open: I
2659
- }), V = q.create(Ce), H = q.create(be), M = (S) => /* @__PURE__ */ m(
2660
- V,
2657
+ open: b
2658
+ }), F = q.create(Ce), O = q.create(be), I = (S) => /* @__PURE__ */ m(
2659
+ F,
2661
2660
  {
2662
2661
  icon: s,
2663
2662
  extended: c,
2664
2663
  label: t,
2665
2664
  variant: n + "Container",
2666
- size: l,
2667
- className: L.fab + " " + (e ?? ""),
2668
- "aria-expanded": I,
2669
- onClick: () => E(!0),
2665
+ size: o,
2666
+ className: N.fab + " " + (e ?? ""),
2667
+ "aria-expanded": b,
2668
+ onClick: () => R(!0),
2670
2669
  style: { transition: "border-radius 0.3s ease-in-out" },
2671
2670
  transition: {
2672
- duration: u.duration,
2671
+ duration: i.duration,
2673
2672
  ease: "easeInOut",
2674
- borderRadius: { duration: u.duration, ease: "easeInOut" },
2675
- background: { duration: u.duration, ease: "easeInOut" },
2676
- ...u
2673
+ borderRadius: { duration: i.duration, ease: "easeInOut" },
2674
+ background: { duration: i.duration, ease: "easeInOut" },
2675
+ ...i
2677
2676
  },
2678
2677
  ...S
2679
2678
  }
2680
- ), [x] = $(ge());
2681
- return /* @__PURE__ */ Y("div", { className: L.fabMenu, ref: h, ...i, children: [
2682
- /* @__PURE__ */ m(se, { children: I && /* @__PURE__ */ m("div", { className: L.actions, role: "menu", "aria-hidden": !I, children: (() => {
2679
+ ), [x] = M(ge());
2680
+ return /* @__PURE__ */ Y("div", { className: N.fabMenu, ref: p, ...u, children: [
2681
+ /* @__PURE__ */ m(se, { children: b && /* @__PURE__ */ m("div", { className: N.actions, role: "menu", "aria-hidden": !b, children: (() => {
2683
2682
  const S = A.length;
2684
- return A.map((O, G) => {
2685
- O.props;
2686
- const te = S - 1 - G, _ = ((u == null ? void 0 : u.delay) ?? 0) + te * 0.06, ne = {
2683
+ return A.map((V, G) => {
2684
+ V.props;
2685
+ const te = S - 1 - G, _ = ((i == null ? void 0 : i.delay) ?? 0) + te * 0.06, ne = {
2687
2686
  open: {
2688
2687
  overflow: "visible",
2689
2688
  opacity: 1,
2690
2689
  width: "auto",
2691
2690
  transition: {
2692
- ...u,
2691
+ ...i,
2693
2692
  delay: _,
2694
2693
  opacity: {
2695
- delay: (u == null ? void 0 : u.duration) / 2 + _
2694
+ delay: (i == null ? void 0 : i.duration) / 2 + _
2696
2695
  }
2697
2696
  }
2698
2697
  },
@@ -2701,10 +2700,10 @@ const zn = ({
2701
2700
  opacity: 0,
2702
2701
  width: 0,
2703
2702
  transition: {
2704
- ...u,
2703
+ ...i,
2705
2704
  delay: _,
2706
2705
  opacity: {
2707
- duration: (u == null ? void 0 : u.duration) / 1.5
2706
+ duration: (i == null ? void 0 : i.duration) / 1.5
2708
2707
  }
2709
2708
  }
2710
2709
  }
@@ -2715,17 +2714,17 @@ const zn = ({
2715
2714
  initial: "close",
2716
2715
  animate: "open",
2717
2716
  variants: ne,
2718
- transition: u,
2717
+ transition: i,
2719
2718
  exit: "close",
2720
2719
  children: Z.cloneElement(
2721
- O,
2720
+ V,
2722
2721
  {
2723
2722
  key: G,
2724
2723
  shape: "rounded",
2725
2724
  variant: "filled",
2726
2725
  className: () => ({
2727
2726
  button: y("max-w-full overflow-hidden", {
2728
- "px-0": !I,
2727
+ "px-0": !b,
2729
2728
  "bg-primary-container text-on-primary-container ": n === "primary",
2730
2729
  "bg-secondary-container text-on-secondary-container": n === "secondary",
2731
2730
  "bg-tertiary-container text-on-tertiary-container": n === "tertiary"
@@ -2742,17 +2741,17 @@ const zn = ({
2742
2741
  );
2743
2742
  });
2744
2743
  })() }) }),
2745
- M({
2744
+ I({
2746
2745
  className: "invisible pointer-events-none"
2747
2746
  }),
2748
2747
  /* @__PURE__ */ Y("div", { className: "absolute right-0 top-0", children: [
2749
- !I && M({
2748
+ !b && I({
2750
2749
  className: "",
2751
2750
  layout: !0,
2752
2751
  layoutId: "fab-menu" + x
2753
2752
  }),
2754
- I && /* @__PURE__ */ m(me, { children: /* @__PURE__ */ m(
2755
- H,
2753
+ b && /* @__PURE__ */ m(me, { children: /* @__PURE__ */ m(
2754
+ O,
2756
2755
  {
2757
2756
  layout: !0,
2758
2757
  layoutId: "fab-menu" + x,
@@ -2771,20 +2770,20 @@ const zn = ({
2771
2770
  }),
2772
2771
  style: { transition: "border-radius 0.3s ease-in-out" },
2773
2772
  transition: {
2774
- duration: u.duration,
2773
+ duration: i.duration,
2775
2774
  ease: "easeInOut",
2776
2775
  borderRadius: {
2777
- duration: u.duration,
2776
+ duration: i.duration,
2778
2777
  ease: "easeInOut"
2779
2778
  },
2780
2779
  background: {
2781
- duration: u.duration,
2780
+ duration: i.duration,
2782
2781
  ease: "easeInOut"
2783
2782
  },
2784
- ...u
2783
+ ...i
2785
2784
  },
2786
2785
  icon: un,
2787
- onClick: () => E(!1),
2786
+ onClick: () => R(!1),
2788
2787
  children: "Close"
2789
2788
  }
2790
2789
  ) })
@@ -2794,7 +2793,7 @@ const zn = ({
2794
2793
  className: e,
2795
2794
  valueFormatter: t,
2796
2795
  step: n = 10,
2797
- name: l,
2796
+ name: o,
2798
2797
  value: r = 0,
2799
2798
  min: s = 0,
2800
2799
  max: c = 100,
@@ -2808,36 +2807,36 @@ const zn = ({
2808
2807
  label: "100"
2809
2808
  }
2810
2809
  ],
2811
- ref: u,
2812
- onChange: o,
2813
- ...p
2810
+ ref: i,
2811
+ onChange: l,
2812
+ ...h
2814
2813
  }) => {
2815
2814
  const v = (B) => {
2816
- const k = i(), U = f();
2815
+ const k = u(), U = f();
2817
2816
  return B === 1 / 0 ? 100 : B === -1 / 0 ? 0 : (B - k) / (U - k) * 100;
2818
- }, f = (B = !1) => B ? c : c == 1 / 0 ? a[(a == null ? void 0 : a.length) - 1].value : c, i = (B = !1) => B ? s : s == -1 / 0 ? a[0].value : s, d = (B) => {
2819
- const k = i(!1);
2817
+ }, f = (B = !1) => B ? c : c == 1 / 0 ? a[(a == null ? void 0 : a.length) - 1].value : c, u = (B = !1) => B ? s : s == -1 / 0 ? a[0].value : s, d = (B) => {
2818
+ const k = u(!1);
2820
2819
  return (f(!1) - k) * B / 100 + k;
2821
- }, [h, w] = $(!1), b = W(null), g = u || b, [I, E] = $(r), [A, L] = $(v(r)), [V, H] = $(!1), M = (B) => {
2822
- H(!0), w(!0), O(B);
2820
+ }, [p, w] = M(!1), E = W(null), g = i || E, [b, R] = M(r), [A, N] = M(v(r)), [F, O] = M(!1), I = (B) => {
2821
+ O(!0), w(!0), V(B);
2823
2822
  }, x = () => {
2824
- H(!1), w(!1);
2823
+ O(!1), w(!1);
2825
2824
  };
2826
- R(() => (V ? (window.addEventListener("mouseup", x), window.addEventListener("mousemove", O), window.addEventListener("touchend", x), window.addEventListener("touchmove", O)) : (window.removeEventListener("mouseup", x), window.removeEventListener("mousemove", O), window.removeEventListener("touchend", x), window.removeEventListener("touchmove", O)), () => {
2827
- window.removeEventListener("mouseup", x), window.removeEventListener("mousemove", O), window.removeEventListener("touchend", x), window.removeEventListener("touchmove", O);
2828
- }), [V]);
2825
+ $(() => (F ? (window.addEventListener("mouseup", x), window.addEventListener("mousemove", V), window.addEventListener("touchend", x), window.addEventListener("touchmove", V)) : (window.removeEventListener("mouseup", x), window.removeEventListener("mousemove", V), window.removeEventListener("touchend", x), window.removeEventListener("touchmove", V)), () => {
2826
+ window.removeEventListener("mouseup", x), window.removeEventListener("mousemove", V), window.removeEventListener("touchend", x), window.removeEventListener("touchmove", V);
2827
+ }), [F]);
2829
2828
  const S = Dt({
2830
2829
  className: e,
2831
- isChanging: h,
2830
+ isChanging: p,
2832
2831
  marks: a,
2833
2832
  max: c,
2834
2833
  min: s,
2835
- name: l,
2834
+ name: o,
2836
2835
  step: n,
2837
- value: I,
2836
+ value: b,
2838
2837
  valueFormatter: t,
2839
- onChange: o
2840
- }), O = (B) => {
2838
+ onChange: l
2839
+ }), V = (B) => {
2841
2840
  const k = g == null ? void 0 : g.current;
2842
2841
  if (k) {
2843
2842
  const U = k.getBoundingClientRect().left, le = ((B.type === "touchmove" || B.type === "touchstart" ? B.touches[0].clientX : B.clientX) - U) / k.offsetWidth * 100;
@@ -2849,32 +2848,32 @@ const zn = ({
2849
2848
  }) => {
2850
2849
  if (B) {
2851
2850
  if (B >= 100) {
2852
- E(f(!0)), L(100);
2851
+ R(f(!0)), N(100);
2853
2852
  return;
2854
2853
  }
2855
2854
  if (B <= 0) {
2856
- E(i(!0)), L(0);
2855
+ R(u(!0)), N(0);
2857
2856
  return;
2858
2857
  }
2859
- k = d(B), k == i() && (k = i(!0)), k == f() && (k = f(!0));
2858
+ k = d(B), k == u() && (k = u(!0)), k == f() && (k = f(!0));
2860
2859
  } else if (k != null) {
2861
2860
  if (k >= f()) {
2862
- E(f(!0)), L(100);
2861
+ R(f(!0)), N(100);
2863
2862
  return;
2864
2863
  }
2865
- if (k <= i()) {
2866
- E(i(!0)), L(0);
2864
+ if (k <= u()) {
2865
+ R(u(!0)), N(0);
2867
2866
  return;
2868
2867
  }
2869
2868
  B = v(k);
2870
2869
  } else
2871
2870
  return;
2872
- n != null ? k = Math.round((k - i()) / n) * n + i() : a && (k = a.reduce((U, K, le) => {
2873
- let ue = K.value === 1 / 0 ? f() : K.value === -1 / 0 ? i() : K.value, C = U.value === 1 / 0 ? f() : U.value === -1 / 0 ? i() : U.value;
2871
+ n != null ? k = Math.round((k - u()) / n) * n + u() : a && (k = a.reduce((U, K, le) => {
2872
+ let ue = K.value === 1 / 0 ? f() : K.value === -1 / 0 ? u() : K.value, C = U.value === 1 / 0 ? f() : U.value === -1 / 0 ? u() : U.value;
2874
2873
  return ue = Math.abs(ue - k), C = Math.abs(C - k), ue < C ? K : U;
2875
- }).value), k >= f() && (k = f(!0)), k <= i() && (k = i(!0)), B = v(k), E(k), L(B), o && o(k);
2876
- }, [te, _] = $(0);
2877
- return R(() => {
2874
+ }).value), k >= f() && (k = f(!0)), k <= u() && (k = u(!0)), B = v(k), R(k), N(B), l && l(k);
2875
+ }, [te, _] = M(0);
2876
+ return $(() => {
2878
2877
  const B = () => {
2879
2878
  g.current && _(g.current.offsetWidth);
2880
2879
  };
@@ -2889,17 +2888,17 @@ const zn = ({
2889
2888
  switch (B.key) {
2890
2889
  case "ArrowRight":
2891
2890
  if (n)
2892
- G({ value: I + n });
2891
+ G({ value: b + n });
2893
2892
  else if (a) {
2894
- const k = a.find((U) => U.value > I);
2893
+ const k = a.find((U) => U.value > b);
2895
2894
  k && G({ value: k.value });
2896
2895
  }
2897
2896
  break;
2898
2897
  case "ArrowLeft":
2899
2898
  if (n)
2900
- G({ value: I - n });
2899
+ G({ value: b - n });
2901
2900
  else if (a) {
2902
- const k = a.slice(0).reverse().find((U, K, le) => I === 1 / 0 ? K === 1 : U.value < I);
2901
+ const k = a.slice(0).reverse().find((U, K, le) => b === 1 / 0 ? K === 1 : U.value < b);
2903
2902
  k && G({ value: k.value });
2904
2903
  }
2905
2904
  break;
@@ -2908,21 +2907,21 @@ const zn = ({
2908
2907
  }
2909
2908
  },
2910
2909
  role: "slider",
2911
- "aria-valuemin": i(!0),
2910
+ "aria-valuemin": u(!0),
2912
2911
  "aria-valuemax": f(!0),
2913
- "aria-valuenow": I,
2914
- "aria-valuetext": I.toString(),
2912
+ "aria-valuenow": b,
2913
+ "aria-valuetext": b.toString(),
2915
2914
  className: S.slider,
2916
- onMouseDown: M,
2917
- onClick: O,
2915
+ onMouseDown: I,
2916
+ onClick: V,
2918
2917
  ref: g,
2919
- onTouchStart: M,
2918
+ onTouchStart: I,
2920
2919
  onDragStart: (B) => B.preventDefault(),
2921
- ...p,
2920
+ ...h,
2922
2921
  children: [
2923
- /* @__PURE__ */ m("input", { type: "hidden", name: l, value: I }),
2922
+ /* @__PURE__ */ m("input", { type: "hidden", name: o, value: b }),
2924
2923
  /* @__PURE__ */ m("div", { className: S.activeTrack, style: { flex: A / 100 } }),
2925
- /* @__PURE__ */ m("div", { className: S.handle, children: /* @__PURE__ */ m(se, { children: h && /* @__PURE__ */ m(
2924
+ /* @__PURE__ */ m("div", { className: S.handle, children: /* @__PURE__ */ m(se, { children: p && /* @__PURE__ */ m(
2926
2925
  q.div,
2927
2926
  {
2928
2927
  className: S.valueIndicator,
@@ -2939,7 +2938,7 @@ const zn = ({
2939
2938
  hidden: { opacity: 1, scale: 0 }
2940
2939
  },
2941
2940
  transition: { duration: 0.1 },
2942
- children: t ? t(I) : I
2941
+ children: t ? t(b) : b
2943
2942
  }
2944
2943
  ) }) }),
2945
2944
  /* @__PURE__ */ m(
@@ -2955,7 +2954,7 @@ const zn = ({
2955
2954
  className: "w-[calc(100%-12px)] h-full absolute -translate-x-1/2 transform left-1/2",
2956
2955
  children: a && a.map((B, k) => {
2957
2956
  let U = null;
2958
- const K = (h ? 9 : 10) / te * 100, le = v(B.value);
2957
+ const K = (p ? 9 : 10) / te * 100, le = v(B.value);
2959
2958
  return le <= A - K ? U = !0 : le >= A + K && (U = !1), /* @__PURE__ */ m(
2960
2959
  "div",
2961
2960
  {
@@ -2979,21 +2978,21 @@ const zn = ({
2979
2978
  variant: e = "standard",
2980
2979
  className: t,
2981
2980
  children: n,
2982
- title: l,
2981
+ title: o,
2983
2982
  position: r = "right",
2984
2983
  extended: s,
2985
2984
  divider: c,
2986
2985
  onExtendedChange: a,
2987
- closeIcon: u = Le,
2988
- transition: o,
2989
- ...p
2986
+ closeIcon: i = Le,
2987
+ transition: l,
2988
+ ...h
2990
2989
  }) => {
2991
- o = { duration: 0.3, ...o };
2992
- const [v, f] = $(s ?? !0), i = Bt({
2993
- transition: o,
2994
- title: l,
2990
+ l = { duration: 0.3, ...l };
2991
+ const [v, f] = M(s ?? !0), u = Bt({
2992
+ transition: l,
2993
+ title: o,
2995
2994
  position: r,
2996
- closeIcon: u,
2995
+ closeIcon: i,
2997
2996
  className: t,
2998
2997
  children: n,
2999
2998
  onExtendedChange: a,
@@ -3002,9 +3001,9 @@ const zn = ({
3002
3001
  extended: v,
3003
3002
  variant: e
3004
3003
  });
3005
- R(() => {
3004
+ $(() => {
3006
3005
  a == null || a(v ?? !1);
3007
- }, [v]), R(() => {
3006
+ }, [v]), $(() => {
3008
3007
  s != null && f(s);
3009
3008
  }, [s]);
3010
3009
  const d = {
@@ -3014,24 +3013,24 @@ const zn = ({
3014
3013
  open: {
3015
3014
  width: "auto"
3016
3015
  }
3017
- }, h = () => /* @__PURE__ */ Y(me, { children: [
3016
+ }, p = () => /* @__PURE__ */ Y(me, { children: [
3018
3017
  /* @__PURE__ */ m(se, { children: e == "modal" && v && /* @__PURE__ */ m(
3019
3018
  q.div,
3020
3019
  {
3021
3020
  initial: { opacity: 0 },
3022
3021
  animate: { opacity: 1 },
3023
3022
  exit: { opacity: 0 },
3024
- transition: o,
3023
+ transition: l,
3025
3024
  onClick: () => f(!1),
3026
- className: i.overlay
3025
+ className: u.overlay
3027
3026
  }
3028
3027
  ) }),
3029
3028
  /* @__PURE__ */ m(se, { children: v && /* @__PURE__ */ Y(
3030
3029
  "div",
3031
3030
  {
3032
- ...p,
3033
- className: i.sideSheet,
3034
- style: { transition: o.duration + "s" },
3031
+ ...h,
3032
+ className: u.sideSheet,
3033
+ style: { transition: l.duration + "s" },
3035
3034
  children: [
3036
3035
  /* @__PURE__ */ Y(
3037
3036
  q.div,
@@ -3040,60 +3039,60 @@ const zn = ({
3040
3039
  initial: s === !1 ? "open" : "close",
3041
3040
  animate: "open",
3042
3041
  exit: "close",
3043
- className: i.container,
3042
+ className: u.container,
3044
3043
  children: [
3045
- /* @__PURE__ */ Y("div", { className: i.header, children: [
3046
- l && /* @__PURE__ */ m("p", { className: i.title, children: l }),
3044
+ /* @__PURE__ */ Y("div", { className: u.header, children: [
3045
+ o && /* @__PURE__ */ m("p", { className: u.title, children: o }),
3047
3046
  /* @__PURE__ */ m(
3048
3047
  be,
3049
3048
  {
3050
3049
  size: "small",
3051
3050
  label: "close",
3052
- icon: u,
3051
+ icon: i,
3053
3052
  onClick: () => f(!1),
3054
- className: i.closeButton
3053
+ className: u.closeButton
3055
3054
  }
3056
3055
  )
3057
3056
  ] }),
3058
3057
  /* @__PURE__ */ m(
3059
3058
  "div",
3060
3059
  {
3061
- className: i.content,
3062
- style: { transition: o.duration + "s" },
3060
+ className: u.content,
3061
+ style: { transition: l.duration + "s" },
3063
3062
  children: n
3064
3063
  }
3065
3064
  )
3066
3065
  ]
3067
3066
  }
3068
3067
  ),
3069
- (c == null && e == "standard" ? !0 : c) && /* @__PURE__ */ m(rn, { className: i.divider, orientation: "vertical" })
3068
+ (c == null && e == "standard" ? !0 : c) && /* @__PURE__ */ m(rn, { className: u.divider, orientation: "vertical" })
3070
3069
  ]
3071
3070
  }
3072
3071
  ) })
3073
3072
  ] });
3074
- return e == "modal" ? Ye(h(), document.body) : h();
3073
+ return e == "modal" ? Ye(p(), document.body) : p();
3075
3074
  }, nr = ({
3076
3075
  message: e,
3077
3076
  className: t,
3078
3077
  duration: n,
3079
- closeIcon: l = Le,
3078
+ closeIcon: o = Le,
3080
3079
  onClose: r,
3081
3080
  ...s
3082
3081
  }) => {
3083
- const [c, a] = $(!0), u = Wt({
3082
+ const [c, a] = M(!0), i = Wt({
3084
3083
  className: t,
3085
- closeIcon: l,
3084
+ closeIcon: o,
3086
3085
  duration: n,
3087
3086
  isVisible: c,
3088
3087
  onClose: r,
3089
3088
  message: e
3090
3089
  });
3091
- R(() => {
3090
+ $(() => {
3092
3091
  n && setTimeout(() => {
3093
- o();
3092
+ l();
3094
3093
  }, n);
3095
3094
  }, [n]);
3096
- const o = () => {
3095
+ const l = () => {
3097
3096
  a(!1), r == null || r();
3098
3097
  };
3099
3098
  return /* @__PURE__ */ m(se, { children: c && /* @__PURE__ */ m(
@@ -3103,16 +3102,16 @@ const zn = ({
3103
3102
  animate: { height: "auto" },
3104
3103
  exit: { height: 0 },
3105
3104
  transition: { duration: 0.1 },
3106
- className: u.snackbar,
3105
+ className: i.snackbar,
3107
3106
  ...s,
3108
- children: /* @__PURE__ */ Y("div", { className: u.container, children: [
3109
- /* @__PURE__ */ m("p", { className: u.supportingText, children: e }),
3107
+ children: /* @__PURE__ */ Y("div", { className: i.container, children: [
3108
+ /* @__PURE__ */ m("p", { className: i.supportingText, children: e }),
3110
3109
  /* @__PURE__ */ m(
3111
3110
  be,
3112
3111
  {
3113
- onClick: () => o(),
3114
- className: u.icon,
3115
- icon: l,
3112
+ onClick: () => l(),
3113
+ className: i.icon,
3114
+ icon: o,
3116
3115
  label: "close the snackbar"
3117
3116
  }
3118
3117
  )
@@ -3123,62 +3122,62 @@ const zn = ({
3123
3122
  selected: e = !1,
3124
3123
  className: t,
3125
3124
  activeIcon: n,
3126
- disabled: l = !1,
3125
+ disabled: o = !1,
3127
3126
  inactiveIcon: r,
3128
3127
  onChange: s,
3129
3128
  onClick: c,
3130
3129
  onKeyDown: a,
3131
- ref: u,
3132
- ...o
3130
+ ref: i,
3131
+ ...l
3133
3132
  }) => {
3134
- const [p, v] = $(e), f = (g) => {
3135
- l || (d(), c && c(g));
3136
- }, i = (g) => {
3137
- l || ((g.key === " " || g.key === "Enter") && (g.preventDefault(), d()), a && a(g));
3133
+ const [h, v] = M(e), f = (g) => {
3134
+ o || (d(), c && c(g));
3135
+ }, u = (g) => {
3136
+ o || ((g.key === " " || g.key === "Enter") && (g.preventDefault(), d()), a && a(g));
3138
3137
  }, d = () => {
3139
- v(!p), s == null || s(!p);
3140
- }, h = At({
3138
+ v(!h), s == null || s(!h);
3139
+ }, p = At({
3141
3140
  className: t,
3142
- isSelected: p,
3141
+ isSelected: h,
3143
3142
  activeIcon: n,
3144
3143
  inactiveIcon: r,
3145
- disabled: l,
3146
- selected: p,
3144
+ disabled: o,
3145
+ selected: h,
3147
3146
  onChange: s
3148
- }), w = W(null), b = u || w;
3147
+ }), w = W(null), E = i || w;
3149
3148
  return /* @__PURE__ */ Y(
3150
3149
  q.div,
3151
3150
  {
3152
3151
  role: "switch",
3153
- "aria-checked": p,
3154
- tabIndex: l ? -1 : 0,
3155
- onKeyDown: i,
3152
+ "aria-checked": h,
3153
+ tabIndex: o ? -1 : 0,
3154
+ onKeyDown: u,
3156
3155
  onClick: f,
3157
- ref: b,
3158
- className: h.switch,
3159
- ...o,
3156
+ ref: E,
3157
+ className: p.switch,
3158
+ ...l,
3160
3159
  children: [
3161
- /* @__PURE__ */ m("input", { type: "hidden", value: p ? "1" : "0" }),
3160
+ /* @__PURE__ */ m("input", { type: "hidden", value: h ? "1" : "0" }),
3162
3161
  /* @__PURE__ */ Y(
3163
3162
  q.div,
3164
3163
  {
3165
3164
  layout: !0,
3166
- style: { translate: p ? "50%" : "-50%" },
3165
+ style: { translate: h ? "50%" : "-50%" },
3167
3166
  transition: {
3168
3167
  type: "spring",
3169
3168
  stiffness: 700,
3170
3169
  damping: 30
3171
3170
  },
3172
- className: h.handleContainer,
3171
+ className: p.handleContainer,
3173
3172
  children: [
3174
- /* @__PURE__ */ m("div", { className: h.handle, children: (p ? n : r) && /* @__PURE__ */ m(
3173
+ /* @__PURE__ */ m("div", { className: p.handle, children: (h ? n : r) && /* @__PURE__ */ m(
3175
3174
  ie,
3176
3175
  {
3177
- className: h.icon,
3178
- icon: p ? n : r
3176
+ className: p.icon,
3177
+ icon: h ? n : r
3179
3178
  }
3180
3179
  ) }),
3181
- /* @__PURE__ */ m("div", { className: h.handleStateLayer })
3180
+ /* @__PURE__ */ m("div", { className: p.handleStateLayer })
3182
3181
  ]
3183
3182
  }
3184
3183
  )
@@ -3189,57 +3188,57 @@ const zn = ({
3189
3188
  className: e,
3190
3189
  onClick: t,
3191
3190
  label: n,
3192
- variant: l = "primary",
3191
+ variant: o = "primary",
3193
3192
  href: r,
3194
3193
  icon: s,
3195
3194
  selectedTab: c,
3196
3195
  setSelectedTab: a,
3197
- tabsId: u,
3198
- index: o,
3199
- onTabSelected: p,
3196
+ tabsId: i,
3197
+ index: l,
3198
+ onTabSelected: h,
3200
3199
  scrollable: v = !1,
3201
3200
  selected: f = !1,
3202
- ref: i,
3201
+ ref: u,
3203
3202
  ...d
3204
3203
  }) => {
3205
- const h = W(null), w = i || h, [b, g] = $(f);
3206
- R(() => {
3207
- f && c == null ? g(!0) : g(c == o && o != null);
3208
- }, [c]), R(() => {
3209
- c == o && p && p({
3204
+ const p = W(null), w = u || p, [E, g] = M(f);
3205
+ $(() => {
3206
+ f && c == null ? g(!0) : g(c == l && l != null);
3207
+ }, [c]), $(() => {
3208
+ c == l && h && h({
3210
3209
  ref: w,
3211
- index: o || 0,
3210
+ index: l || 0,
3212
3211
  label: n,
3213
3212
  icon: s
3214
3213
  });
3215
3214
  }, [c]);
3216
- const I = r ? "a" : "button", E = (L) => {
3217
- a && a(o ?? null), t && t(L);
3215
+ const b = r ? "a" : "button", R = (N) => {
3216
+ a && a(l ?? null), t && t(N);
3218
3217
  }, A = Pt({
3219
3218
  className: e,
3220
- onTabSelected: p,
3219
+ onTabSelected: h,
3221
3220
  scrollable: v,
3222
3221
  selectedTab: c,
3223
- index: o,
3224
- tabsId: u,
3225
- selected: b,
3226
- variant: l,
3222
+ index: l,
3223
+ tabsId: i,
3224
+ selected: E,
3225
+ variant: o,
3227
3226
  icon: s,
3228
3227
  label: n,
3229
- isSelected: b,
3228
+ isSelected: E,
3230
3229
  setSelectedTab: a,
3231
3230
  href: r
3232
3231
  });
3233
3232
  return /* @__PURE__ */ Y(
3234
- I,
3233
+ b,
3235
3234
  {
3236
3235
  ...d,
3237
3236
  role: "tab",
3238
- "aria-selected": b,
3237
+ "aria-selected": E,
3239
3238
  ref: w,
3240
3239
  href: r,
3241
3240
  className: A.tab,
3242
- onClick: E,
3241
+ onClick: R,
3243
3242
  ...d,
3244
3243
  children: [
3245
3244
  /* @__PURE__ */ m(
@@ -3247,17 +3246,17 @@ const zn = ({
3247
3246
  {
3248
3247
  style: { transition: 0.3 + "s" },
3249
3248
  className: A.stateLayer,
3250
- colorName: l === "primary" && b ? "primary" : "on-surface",
3249
+ colorName: o === "primary" && E ? "primary" : "on-surface",
3251
3250
  stateClassName: "state-ripple-group-[tab]"
3252
3251
  }
3253
3252
  ),
3254
3253
  /* @__PURE__ */ Y("span", { className: A.content, children: [
3255
3254
  s && /* @__PURE__ */ m(ie, { icon: s, className: A.icon }),
3256
3255
  /* @__PURE__ */ m("span", { className: A.label, children: n }),
3257
- b && /* @__PURE__ */ m(
3256
+ E && /* @__PURE__ */ m(
3258
3257
  q.span,
3259
3258
  {
3260
- layoutId: `underline-${u}`,
3259
+ layoutId: `underline-${i}`,
3261
3260
  className: A.underline,
3262
3261
  transition: { duration: 0.3 }
3263
3262
  }
@@ -3270,107 +3269,107 @@ const zn = ({
3270
3269
  variant: e = "primary",
3271
3270
  onTabSelected: t,
3272
3271
  children: n,
3273
- className: l,
3272
+ className: o,
3274
3273
  selectedTab: r,
3275
3274
  setSelectedTab: s,
3276
3275
  scrollable: c = !1
3277
3276
  }) => {
3278
- const [a, u] = $(
3277
+ const [a, i] = M(
3279
3278
  null
3280
3279
  );
3281
- let o;
3282
- r == 0 || r != null ? o = r : o = a;
3283
- const p = s || u, v = Z.Children.toArray(n).filter(
3280
+ let l;
3281
+ r == 0 || r != null ? l = r : l = a;
3282
+ const h = s || i, v = Z.Children.toArray(n).filter(
3284
3283
  (w) => Z.isValidElement(w) && w.type === fn
3285
- ), f = Z.useRef(null), i = (w) => {
3284
+ ), f = Z.useRef(null), u = (w) => {
3286
3285
  if (t == null || t(w), c) {
3287
- const b = f.current, g = w.ref.current;
3288
- if (b && g) {
3289
- const I = g.offsetLeft + g.offsetWidth / 2 - b.offsetWidth / 2;
3290
- b.scrollTo({ left: I, behavior: "smooth" });
3286
+ const E = f.current, g = w.ref.current;
3287
+ if (E && g) {
3288
+ const b = g.offsetLeft + g.offsetWidth / 2 - E.offsetWidth / 2;
3289
+ E.scrollTo({ left: b, behavior: "smooth" });
3291
3290
  }
3292
3291
  }
3293
- }, d = Me(() => ge(), []), h = Ht({
3292
+ }, d = Me(() => ge(), []), p = Ht({
3294
3293
  children: n,
3295
3294
  onTabSelected: t,
3296
3295
  scrollable: c,
3297
- selectedTab: o,
3298
- setSelectedTab: p,
3299
- className: l,
3296
+ selectedTab: l,
3297
+ setSelectedTab: h,
3298
+ className: o,
3300
3299
  variant: e
3301
3300
  });
3302
- return /* @__PURE__ */ m("div", { ref: f, role: "tablist", className: h.tabs, children: v.map((w, b) => Z.cloneElement(w, {
3303
- key: b,
3304
- index: b,
3301
+ return /* @__PURE__ */ m("div", { ref: f, role: "tablist", className: p.tabs, children: v.map((w, E) => Z.cloneElement(w, {
3302
+ key: E,
3303
+ index: E,
3305
3304
  variant: e,
3306
- selectedTab: o,
3307
- setSelectedTab: p,
3305
+ selectedTab: l,
3306
+ setSelectedTab: h,
3308
3307
  tabsId: d,
3309
- onTabSelected: i,
3308
+ onTabSelected: u,
3310
3309
  scrollable: c
3311
3310
  })) });
3312
3311
  }, lr = ({
3313
3312
  variant: e = "filled",
3314
3313
  disabled: t = !1,
3315
3314
  errorText: n,
3316
- placeholder: l,
3315
+ placeholder: o,
3317
3316
  suffix: r,
3318
3317
  name: s,
3319
3318
  label: c,
3320
3319
  className: a,
3321
- supportingText: u,
3322
- trailingIcon: o,
3323
- leadingIcon: p,
3320
+ supportingText: i,
3321
+ trailingIcon: l,
3322
+ leadingIcon: h,
3324
3323
  type: v = "text",
3325
3324
  textLine: f = "singleLine",
3326
- autoComplete: i = "on",
3325
+ autoComplete: u = "on",
3327
3326
  onChange: d,
3328
- value: h,
3327
+ value: p,
3329
3328
  showSupportingText: w = !1,
3330
- ...b
3329
+ ...E
3331
3330
  }) => {
3332
- const [g, I] = $(h ?? ""), [E, A] = $(!1), [L, V] = $(!1), [H, M] = $(
3331
+ const [g, b] = M(p ?? ""), [R, A] = M(!1), [N, F] = M(!1), [O, I] = M(
3333
3332
  w
3334
3333
  );
3335
- R(() => {
3336
- I(h ?? "");
3337
- }, [h]), R(() => {
3338
- n != null && n.length ? V(!0) : V(!1);
3339
- }, [n]), R(() => {
3340
- w ? M(w) : u != null && u.length ? M(!0) : M(!1);
3341
- }, [H, u]), R(() => {
3342
- E && V(!1);
3343
- }, [E]);
3334
+ $(() => {
3335
+ b(p ?? "");
3336
+ }, [p]), $(() => {
3337
+ n != null && n.length ? F(!0) : F(!1);
3338
+ }, [n]), $(() => {
3339
+ w ? I(w) : i != null && i.length ? I(!0) : I(!1);
3340
+ }, [O, i]), $(() => {
3341
+ R && F(!1);
3342
+ }, [R]);
3344
3343
  const x = Z.useRef(null), S = () => {
3345
- x.current && !E && x.current.focus();
3346
- }, O = () => {
3344
+ x.current && !R && x.current.focus();
3345
+ }, V = () => {
3347
3346
  A(!0);
3348
3347
  }, G = (U) => {
3349
3348
  const K = U.target.value;
3350
- I(K), V(!1), typeof d == "function" && d(K);
3349
+ b(K), F(!1), typeof d == "function" && d(K);
3351
3350
  }, te = () => {
3352
3351
  A(!1);
3353
3352
  }, _ = Ft({
3354
- showSupportingText: H,
3355
- isFocused: E,
3356
- showErrorIcon: L,
3353
+ showSupportingText: O,
3354
+ isFocused: R,
3355
+ showErrorIcon: N,
3357
3356
  disabled: t,
3358
3357
  name: s,
3359
3358
  label: c,
3360
- autoComplete: i,
3359
+ autoComplete: u,
3361
3360
  className: a,
3362
3361
  onChange: d,
3363
- placeholder: l,
3364
- supportingText: u,
3362
+ placeholder: o,
3363
+ supportingText: i,
3365
3364
  type: v,
3366
- leadingIcon: p,
3367
- trailingIcon: o,
3365
+ leadingIcon: h,
3366
+ trailingIcon: l,
3368
3367
  variant: e,
3369
3368
  errorText: n,
3370
3369
  value: g,
3371
3370
  suffix: r,
3372
3371
  textLine: f
3373
- }), [ne] = $(ge());
3372
+ }), [ne] = M(ge());
3374
3373
  let B, k;
3375
3374
  switch (f) {
3376
3375
  case "multiLine":
@@ -3384,11 +3383,11 @@ const zn = ({
3384
3383
  k = "input", B = { type: v };
3385
3384
  break;
3386
3385
  }
3387
- return /* @__PURE__ */ Y("div", { className: _.textField, ...b, children: [
3386
+ return /* @__PURE__ */ Y("div", { className: _.textField, ...E, children: [
3388
3387
  /* @__PURE__ */ Y("fieldset", { onClick: S, className: _.content, children: [
3389
3388
  /* @__PURE__ */ m("div", { className: _.stateLayer }),
3390
- p && /* @__PURE__ */ m("div", { className: _.leadingIcon, children: Z.isValidElement(p) ? p : /* @__PURE__ */ m(ie, { className: "w-5 h-5", icon: p }) }),
3391
- !(!E && !g.length || e == "filled") && /* @__PURE__ */ m(
3389
+ h && /* @__PURE__ */ m("div", { className: _.leadingIcon, children: Z.isValidElement(h) ? h : /* @__PURE__ */ m(ie, { className: "w-5 h-5", icon: h }) }),
3390
+ !(!R && !g.length || e == "filled") && /* @__PURE__ */ m(
3392
3391
  q.legend,
3393
3392
  {
3394
3393
  variants: {
@@ -3396,7 +3395,7 @@ const zn = ({
3396
3395
  visible: { width: "auto", padding: "0 8px" }
3397
3396
  },
3398
3397
  initial: "hidden",
3399
- animate: !E && !g.length ? "hidden" : "visible",
3398
+ animate: !R && !g.length ? "hidden" : "visible",
3400
3399
  className: "max-w-full ml-2 px-2 text-body-small h-0",
3401
3400
  transition: { duration: 0.2 },
3402
3401
  children: /* @__PURE__ */ m("span", { className: "transform inline-flex -translate-y-1/2", children: /* @__PURE__ */ m(
@@ -3411,15 +3410,15 @@ const zn = ({
3411
3410
  }
3412
3411
  ),
3413
3412
  /* @__PURE__ */ Y("div", { className: "flex-1 relative", children: [
3414
- (!E && !g.length || e == "filled") && /* @__PURE__ */ m(
3413
+ (!R && !g.length || e == "filled") && /* @__PURE__ */ m(
3415
3414
  q.label,
3416
3415
  {
3417
3416
  htmlFor: s,
3418
3417
  className: y(
3419
3418
  "absolute left-4 transition-all duration-300",
3420
3419
  {
3421
- "text-body-small top-2": e == "filled" && !(!E && !g.length),
3422
- "text-body-large top-1/2 transform -translate-y-1/2": !(e == "filled" && !(!E && !g.length))
3420
+ "text-body-small top-2": e == "filled" && !(!R && !g.length),
3421
+ "text-body-large top-1/2 transform -translate-y-1/2": !(e == "filled" && !(!R && !g.length))
3423
3422
  }
3424
3423
  ),
3425
3424
  transition: { duration: 0.3 },
@@ -3443,11 +3442,11 @@ const zn = ({
3443
3442
  className: _.input,
3444
3443
  id: s,
3445
3444
  name: s,
3446
- placeholder: E ? l ?? void 0 : "",
3447
- onFocus: O,
3445
+ placeholder: R ? o ?? void 0 : "",
3446
+ onFocus: V,
3448
3447
  onBlur: te,
3449
3448
  disabled: t,
3450
- autoComplete: i,
3449
+ autoComplete: u,
3451
3450
  "aria-invalid": !!(n != null && n.length),
3452
3451
  "aria-label": c,
3453
3452
  ...B
@@ -3455,24 +3454,24 @@ const zn = ({
3455
3454
  )
3456
3455
  ] }),
3457
3456
  /* @__PURE__ */ m("div", { className: _.activeIndicator }),
3458
- !L && /* @__PURE__ */ Y(me, { children: [
3459
- o && /* @__PURE__ */ m(
3457
+ !N && /* @__PURE__ */ Y(me, { children: [
3458
+ l && /* @__PURE__ */ m(
3460
3459
  "div",
3461
3460
  {
3462
3461
  onClick: (U) => {
3463
3462
  U.stopPropagation();
3464
3463
  },
3465
3464
  className: _.trailingIcon,
3466
- children: Z.isValidElement(o) ? o : /* @__PURE__ */ m(ie, { className: "h-5", icon: o })
3465
+ children: Z.isValidElement(l) ? l : /* @__PURE__ */ m(ie, { className: "h-5", icon: l })
3467
3466
  }
3468
3467
  ),
3469
- !o && r && /* @__PURE__ */ m("span", { className: _.suffix, children: r })
3468
+ !l && r && /* @__PURE__ */ m("span", { className: _.suffix, children: r })
3470
3469
  ] }),
3471
- L && /* @__PURE__ */ m(
3470
+ N && /* @__PURE__ */ m(
3472
3471
  "div",
3473
3472
  {
3474
3473
  className: y(_.trailingIcon, {
3475
- " absolute right-0": !o
3474
+ " absolute right-0": !l
3476
3475
  }),
3477
3476
  children: /* @__PURE__ */ m(
3478
3477
  ie,
@@ -3484,39 +3483,39 @@ const zn = ({
3484
3483
  }
3485
3484
  )
3486
3485
  ] }),
3487
- H && /* @__PURE__ */ m("p", { className: _.supportingText, children: n != null && n.length ? n : u != null && u.length ? u : " " })
3486
+ O && /* @__PURE__ */ m("p", { className: _.supportingText, children: n != null && n.length ? n : i != null && i.length ? i : " " })
3488
3487
  ] });
3489
- }, mn = ({ isSelected: e, icon: t, label: n, variant: l }) => ({
3488
+ }, mn = ({ isSelected: e, icon: t, label: n, variant: o }) => ({
3490
3489
  navigationRailItem: y(
3491
3490
  " group/navigation-rail-item flex flex-col pt-1 pb-1.5 cursor-pointer",
3492
3491
  {
3493
3492
  "text-on-surface-variant": !e,
3494
3493
  "text-on-secondary-container": e,
3495
- "gap-2 h-[68px]": l == "vertical",
3496
- "gap-0 h-[66px]": l == "horizontal"
3494
+ "gap-2 h-[68px]": o == "vertical",
3495
+ "gap-0 h-[66px]": o == "horizontal"
3497
3496
  }
3498
3497
  ),
3499
3498
  container: y(
3500
3499
  " w-fit flex justify-center relative rounded-full items-center mx-5",
3501
3500
  {
3502
3501
  "bg-secondary-container overflow-hidden": e,
3503
- "gap-2 ": l == "horizontal",
3504
- "gap-0 ": l == "vertical",
3502
+ "gap-2 ": o == "horizontal",
3503
+ "gap-0 ": o == "vertical",
3505
3504
  "p-4": !n
3506
3505
  },
3507
3506
  n && [
3508
3507
  "px-4",
3509
3508
  {
3510
- "py-1 ": l == "vertical",
3511
- "py-4 ": l == "horizontal"
3509
+ "py-1 ": o == "vertical",
3510
+ "py-4 ": o == "horizontal"
3512
3511
  }
3513
3512
  ]
3514
3513
  ),
3515
3514
  stateLayer: y("rounded-full"),
3516
3515
  icon: y("size-6 flex"),
3517
3516
  label: y("w-fit mx-auto text-nowrap", {
3518
- "text-label-large ": l == "horizontal",
3519
- "text-label-medium": l == "vertical"
3517
+ "text-label-large ": o == "horizontal",
3518
+ "text-label-medium": o == "vertical"
3520
3519
  })
3521
3520
  }), hn = J(
3522
3521
  "navigationRailItem",
@@ -3525,47 +3524,47 @@ const zn = ({
3525
3524
  className: e,
3526
3525
  onClick: t,
3527
3526
  label: n,
3528
- variant: l = "vertical",
3527
+ variant: o = "vertical",
3529
3528
  href: r,
3530
3529
  icon: s,
3531
3530
  selectedItem: c,
3532
3531
  setSelectedItem: a,
3533
- index: u,
3534
- onItemSelected: o,
3535
- selected: p = !1,
3532
+ index: i,
3533
+ onItemSelected: l,
3534
+ selected: h = !1,
3536
3535
  ref: v,
3537
3536
  transition: f,
3538
- isExtended: i,
3537
+ isExtended: u,
3539
3538
  iconSelected: d,
3540
- style: h,
3539
+ style: p,
3541
3540
  extendedOnly: w,
3542
- children: b,
3541
+ children: E,
3543
3542
  ...g
3544
3543
  }) => {
3545
- b && (n = b);
3546
- const I = W(null), E = v || I, [A, L] = $(p);
3547
- R(() => {
3548
- p && c == null ? L(!0) : L(c == u && u != null);
3549
- }, [c]), R(() => {
3550
- c == u && o && o({
3551
- ref: E,
3552
- index: u || 0,
3544
+ E && (n = E);
3545
+ const b = W(null), R = v || b, [A, N] = M(h);
3546
+ $(() => {
3547
+ h && c == null ? N(!0) : N(c == i && i != null);
3548
+ }, [c]), $(() => {
3549
+ c == i && l && l({
3550
+ ref: R,
3551
+ index: i || 0,
3553
3552
  label: n,
3554
3553
  icon: s
3555
3554
  });
3556
3555
  }, [c]);
3557
- const V = r ? "a" : "button", H = (x) => {
3558
- a && a(u ?? null), t && t(x);
3559
- }, M = hn({
3560
- isExtended: i,
3556
+ const F = r ? "a" : "button", O = (x) => {
3557
+ a && a(i ?? null), t && t(x);
3558
+ }, I = hn({
3559
+ isExtended: u,
3561
3560
  extendedOnly: w,
3562
3561
  className: e,
3563
- onItemSelected: o,
3562
+ onItemSelected: l,
3564
3563
  selectedItem: c,
3565
- index: u,
3564
+ index: i,
3566
3565
  transition: f,
3567
3566
  selected: A,
3568
- variant: l,
3567
+ variant: o,
3569
3568
  icon: s,
3570
3569
  label: n,
3571
3570
  isSelected: A,
@@ -3574,35 +3573,35 @@ const zn = ({
3574
3573
  children: n,
3575
3574
  iconSelected: d
3576
3575
  });
3577
- return f = { duration: 0.3, ...f }, w && !i ? null : (
3576
+ return f = { duration: 0.3, ...f }, w && !u ? null : (
3578
3577
  // eslint-disable-next-line @typescript-eslint/ban-ts-comment
3579
3578
  // @ts-expect-error
3580
3579
  /* @__PURE__ */ Y(
3581
- V,
3580
+ F,
3582
3581
  {
3583
3582
  ...g,
3584
3583
  role: "tab",
3585
3584
  "aria-selected": A,
3586
- ref: E,
3585
+ ref: R,
3587
3586
  href: r,
3588
- className: M.navigationRailItem,
3589
- onClick: H,
3590
- style: { transition: f.duration + "s", ...h },
3587
+ className: I.navigationRailItem,
3588
+ onClick: O,
3589
+ style: { transition: f.duration + "s", ...p },
3591
3590
  children: [
3592
3591
  /* @__PURE__ */ Y(
3593
3592
  q.div,
3594
3593
  {
3595
3594
  style: {
3596
- transition: l == "horizontal" ? f.duration + `s, gap ${f.duration / 2}s ${f.duration - f.duration / 2}s` : f.duration + `s, gap ${f.duration / 3}s ${f.duration - f.duration / 3}s`
3595
+ transition: o == "horizontal" ? f.duration + `s, gap ${f.duration / 2}s ${f.duration - f.duration / 2}s` : f.duration + `s, gap ${f.duration / 3}s ${f.duration - f.duration / 3}s`
3597
3596
  },
3598
3597
  transition: f,
3599
- className: M.container,
3598
+ className: I.container,
3600
3599
  children: [
3601
3600
  /* @__PURE__ */ m(
3602
3601
  ye,
3603
3602
  {
3604
3603
  style: { transition: f.duration + "s" },
3605
- className: M.stateLayer,
3604
+ className: I.stateLayer,
3606
3605
  colorName: y({
3607
3606
  "on-surface": !A,
3608
3607
  "on-secondary-container": A
@@ -3614,10 +3613,10 @@ const zn = ({
3614
3613
  ie,
3615
3614
  {
3616
3615
  icon: A ? d : s,
3617
- className: M.icon
3616
+ className: I.icon
3618
3617
  }
3619
3618
  ),
3620
- /* @__PURE__ */ m(se, { children: l == "horizontal" && (() => {
3619
+ /* @__PURE__ */ m(se, { children: o == "horizontal" && (() => {
3621
3620
  const x = {
3622
3621
  width: 0,
3623
3622
  opacity: 0,
@@ -3641,7 +3640,7 @@ const zn = ({
3641
3640
  initial: x,
3642
3641
  animate: S,
3643
3642
  exit: x,
3644
- className: M.label,
3643
+ className: I.label,
3645
3644
  children: n
3646
3645
  }
3647
3646
  );
@@ -3649,7 +3648,7 @@ const zn = ({
3649
3648
  ]
3650
3649
  }
3651
3650
  ),
3652
- /* @__PURE__ */ m(se, { children: l == "vertical" && (() => {
3651
+ /* @__PURE__ */ m(se, { children: o == "vertical" && (() => {
3653
3652
  const x = {
3654
3653
  height: 0,
3655
3654
  opacity: 0,
@@ -3676,7 +3675,7 @@ const zn = ({
3676
3675
  initial: S,
3677
3676
  animate: S,
3678
3677
  exit: x,
3679
- className: M.label,
3678
+ className: I.label,
3680
3679
  transition: f,
3681
3680
  children: n
3682
3681
  }
@@ -3709,7 +3708,7 @@ const zn = ({
3709
3708
  variant: e = "standard",
3710
3709
  onItemSelected: t,
3711
3710
  children: n,
3712
- className: l,
3711
+ className: o,
3713
3712
  selectedItem: r,
3714
3713
  extended: s,
3715
3714
  alignment: c = "top",
@@ -3723,83 +3722,83 @@ const zn = ({
3723
3722
  label: "Close menu"
3724
3723
  }
3725
3724
  },
3726
- style: u,
3727
- onExtendedChange: o,
3728
- transition: p,
3725
+ style: i,
3726
+ onExtendedChange: l,
3727
+ transition: h,
3729
3728
  setSelectedItem: v
3730
3729
  }) => {
3731
- const [f, i] = $(null), [d, h] = $(s);
3730
+ const [f, u] = M(null), [d, p] = M(s);
3732
3731
  let w;
3733
3732
  r == 0 || r != null ? w = r : w = f;
3734
- const b = v || i, g = W(null), I = (M) => {
3735
- t == null || t(M);
3733
+ const E = v || u, g = W(null), b = (I) => {
3734
+ t == null || t(I);
3736
3735
  };
3737
- function E(M) {
3736
+ function R(I) {
3738
3737
  const x = [];
3739
- return dt.forEach(M, (S) => {
3740
- pe(S) && S.type === ft ? x.push(...E(S.props.children)) : x.push(S);
3738
+ return dt.forEach(I, (S) => {
3739
+ pe(S) && S.type === ft ? x.push(...R(S.props.children)) : x.push(S);
3741
3740
  }), x;
3742
3741
  }
3743
- const A = E(n), L = A.filter(
3744
- (M) => pe(M) && M.type === Ce
3745
- ), V = vn({
3742
+ const A = R(n), N = A.filter(
3743
+ (I) => pe(I) && I.type === Ce
3744
+ ), F = vn({
3746
3745
  children: n,
3747
3746
  onItemSelected: t,
3748
3747
  selectedItem: w,
3749
- setSelectedItem: b,
3750
- className: l,
3748
+ setSelectedItem: E,
3749
+ className: o,
3751
3750
  variant: e,
3752
3751
  extended: d,
3753
3752
  isExtended: d,
3754
3753
  alignment: c,
3755
3754
  menu: a,
3756
- transition: p,
3757
- onExtendedChange: o
3755
+ transition: h,
3756
+ onExtendedChange: l
3758
3757
  });
3759
- p = { duration: 0.3, ...p };
3760
- const H = W(!1);
3761
- return H.current = !1, R(() => {
3762
- o == null || o(d ?? !1);
3758
+ h = { duration: 0.3, ...h };
3759
+ const O = W(!1);
3760
+ return O.current = !1, $(() => {
3761
+ l == null || l(d ?? !1);
3763
3762
  }, [d]), /* @__PURE__ */ Y(
3764
3763
  "div",
3765
3764
  {
3766
- style: { transition: p.duration + "s", ...u },
3765
+ style: { transition: h.duration + "s", ...i },
3767
3766
  ref: g,
3768
- className: V.navigationRail,
3767
+ className: F.navigationRail,
3769
3768
  children: [
3770
- /* @__PURE__ */ Y("div", { className: V.header, children: [
3769
+ /* @__PURE__ */ Y("div", { className: F.header, children: [
3771
3770
  /* @__PURE__ */ m(
3772
3771
  be,
3773
3772
  {
3774
- onClick: () => h(!d),
3773
+ onClick: () => p(!d),
3775
3774
  label: d ? a == null ? void 0 : a.opened.label : a == null ? void 0 : a.closed.label,
3776
- className: V.menuIcon,
3775
+ className: F.menuIcon,
3777
3776
  icon: d ? a.opened.icon : a == null ? void 0 : a.closed.icon
3778
3777
  }
3779
3778
  ),
3780
- L.length > 0 && xe(L[0], {
3781
- transition: p,
3779
+ N.length > 0 && xe(N[0], {
3780
+ transition: h,
3782
3781
  isExtended: d,
3783
- className: "!shadow-none mx-5 " + L[0].props.className
3782
+ className: "!shadow-none mx-5 " + N[0].props.className
3784
3783
  })
3785
3784
  ] }),
3786
- /* @__PURE__ */ m("div", { className: V.segments, children: (() => {
3787
- let M = 0;
3785
+ /* @__PURE__ */ m("div", { className: F.segments, children: (() => {
3786
+ let I = 0;
3788
3787
  return A.map((x) => pe(x) && x.type === yn ? xe(
3789
3788
  x,
3790
3789
  {
3791
- key: M,
3792
- index: M++,
3790
+ key: I,
3791
+ index: I++,
3793
3792
  // Utilise et incrémente le compteur dédié
3794
3793
  variant: d ? "horizontal" : "vertical",
3795
3794
  selectedItem: w,
3796
- setSelectedItem: b,
3797
- onItemSelected: I,
3798
- transition: p,
3799
- extendedOnly: H.current,
3795
+ setSelectedItem: E,
3796
+ onItemSelected: b,
3797
+ transition: h,
3798
+ extendedOnly: O.current,
3800
3799
  isExtended: d
3801
3800
  }
3802
- ) : pe(x) && x.type === Ce ? null : pe(x) && x.type === pn ? (H.current = !0, d ? xe(x, {}) : null) : x);
3801
+ ) : pe(x) && x.type === Ce ? null : pe(x) && x.type === pn ? (O.current = !0, d ? xe(x, {}) : null) : x);
3803
3802
  })() }),
3804
3803
  /* @__PURE__ */ m("div", { className: "flex-1 max-h-[160px]" })
3805
3804
  ]