@1d1s/design-system 0.2.25 → 0.2.26

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.es.js CHANGED
@@ -150,17 +150,17 @@ function Ur(e) {
150
150
  i.displayName = t;
151
151
  const s = e + "CollectionSlot", c = /* @__PURE__ */ Mt(s), d = I.forwardRef(
152
152
  (p, g) => {
153
- const { scope: w, children: y } = p, C = a(s, w), N = te(g, C.collectionRef);
154
- return /* @__PURE__ */ l(c, { ref: N, children: y });
153
+ const { scope: w, children: y } = p, C = a(s, w), S = te(g, C.collectionRef);
154
+ return /* @__PURE__ */ l(c, { ref: S, children: y });
155
155
  }
156
156
  );
157
157
  d.displayName = s;
158
158
  const u = e + "CollectionItemSlot", f = "data-radix-collection-item", h = /* @__PURE__ */ Mt(u), v = I.forwardRef(
159
159
  (p, g) => {
160
- const { scope: w, children: y, ...C } = p, N = I.useRef(null), A = te(g, N), M = a(u, w);
161
- return I.useEffect(() => (M.itemMap.set(N, { ref: N, ...C }), () => {
162
- M.itemMap.delete(N);
163
- })), /* @__PURE__ */ l(h, { [f]: "", ref: A, children: y });
160
+ const { scope: w, children: y, ...C } = p, S = I.useRef(null), N = te(g, S), _ = a(u, w);
161
+ return I.useEffect(() => (_.itemMap.set(S, { ref: S, ...C }), () => {
162
+ _.itemMap.delete(S);
163
+ })), /* @__PURE__ */ l(h, { [f]: "", ref: N, children: y });
164
164
  }
165
165
  );
166
166
  v.displayName = u;
@@ -171,7 +171,7 @@ function Ur(e) {
171
171
  if (!y) return [];
172
172
  const C = Array.from(y.querySelectorAll(`[${f}]`));
173
173
  return Array.from(g.itemMap.values()).sort(
174
- (M, S) => C.indexOf(M.ref.current) - C.indexOf(S.ref.current)
174
+ (_, A) => C.indexOf(_.ref.current) - C.indexOf(A.ref.current)
175
175
  );
176
176
  }, [g.collectionRef, g.itemMap]);
177
177
  }
@@ -516,33 +516,33 @@ var [ja, Xc] = zn(Le), [Ya, qc] = zn(
516
516
  if (g === -1) return;
517
517
  v.preventDefault();
518
518
  let y = g;
519
- const C = 0, N = w - 1, A = () => {
520
- y = g + 1, y > N && (y = C);
521
- }, M = () => {
522
- y = g - 1, y < C && (y = N);
519
+ const C = 0, S = w - 1, N = () => {
520
+ y = g + 1, y > S && (y = C);
521
+ }, _ = () => {
522
+ y = g - 1, y < C && (y = S);
523
523
  };
524
524
  switch (v.key) {
525
525
  case "Home":
526
526
  y = C;
527
527
  break;
528
528
  case "End":
529
- y = N;
529
+ y = S;
530
530
  break;
531
531
  case "ArrowRight":
532
- a === "horizontal" && (f ? A() : M());
532
+ a === "horizontal" && (f ? N() : _());
533
533
  break;
534
534
  case "ArrowDown":
535
- a === "vertical" && A();
535
+ a === "vertical" && N();
536
536
  break;
537
537
  case "ArrowLeft":
538
- a === "horizontal" && (f ? M() : A());
538
+ a === "horizontal" && (f ? _() : N());
539
539
  break;
540
540
  case "ArrowUp":
541
- a === "vertical" && M();
541
+ a === "vertical" && _();
542
542
  break;
543
543
  }
544
- const S = y % w;
545
- p[S].ref.current?.focus();
544
+ const A = y % w;
545
+ p[A].ref.current?.focus();
546
546
  });
547
547
  return /* @__PURE__ */ l(
548
548
  ed,
@@ -899,14 +899,14 @@ const sd = (e, t) => {
899
899
  }
900
900
  g = !1;
901
901
  }
902
- const y = h.length === 0 ? "" : h.length === 1 ? h[0] : a(h).join(":"), C = v ? y + kr : y, N = C + w;
903
- if (i.indexOf(N) > -1)
902
+ const y = h.length === 0 ? "" : h.length === 1 ? h[0] : a(h).join(":"), C = v ? y + kr : y, S = C + w;
903
+ if (i.indexOf(S) > -1)
904
904
  continue;
905
- i.push(N);
906
- const A = o(w, g);
907
- for (let M = 0; M < A.length; ++M) {
908
- const S = A[M];
909
- i.push(C + S);
905
+ i.push(S);
906
+ const N = o(w, g);
907
+ for (let _ = 0; _ < N.length; ++_) {
908
+ const A = N[_];
909
+ i.push(C + A);
910
910
  }
911
911
  c = u + (c.length > 0 ? " " + c : c);
912
912
  }
@@ -951,7 +951,7 @@ const sd = (e, t) => {
951
951
  const r = si.exec(e);
952
952
  return r ? r[1] ? t(r[1]) : n : !1;
953
953
  }, ci = (e) => e === "position" || e === "percentage", di = (e) => e === "image" || e === "url", ui = (e) => e === "length" || e === "size" || e === "bg-size", fi = (e) => e === "length", Yd = (e) => e === "number", Gd = (e) => e === "family-name", mi = (e) => e === "shadow", Ud = () => {
954
- const e = ue("color"), t = ue("font"), n = ue("text"), r = ue("font-weight"), o = ue("tracking"), a = ue("leading"), i = ue("breakpoint"), s = ue("container"), c = ue("spacing"), d = ue("radius"), u = ue("shadow"), f = ue("inset-shadow"), h = ue("text-shadow"), v = ue("drop-shadow"), b = ue("blur"), p = ue("perspective"), g = ue("aspect"), w = ue("ease"), y = ue("animate"), C = () => ["auto", "avoid", "all", "avoid-page", "page", "left", "right", "column"], N = () => [
954
+ const e = ue("color"), t = ue("font"), n = ue("text"), r = ue("font-weight"), o = ue("tracking"), a = ue("leading"), i = ue("breakpoint"), s = ue("container"), c = ue("spacing"), d = ue("radius"), u = ue("shadow"), f = ue("inset-shadow"), h = ue("text-shadow"), v = ue("drop-shadow"), b = ue("blur"), p = ue("perspective"), g = ue("aspect"), w = ue("ease"), y = ue("animate"), C = () => ["auto", "avoid", "all", "avoid-page", "page", "left", "right", "column"], S = () => [
955
955
  "center",
956
956
  "top",
957
957
  "bottom",
@@ -969,9 +969,9 @@ const sd = (e, t) => {
969
969
  "bottom-left",
970
970
  // Deprecated since Tailwind CSS v4.1.0, see https://github.com/tailwindlabs/tailwindcss/pull/17378
971
971
  "left-bottom"
972
- ], A = () => [...N(), D, T], M = () => ["auto", "hidden", "clip", "visible", "scroll"], S = () => ["auto", "contain", "none"], k = () => [D, T, c], z = () => [wt, "full", "auto", ...k()], H = () => [Je, "none", "subgrid", D, T], W = () => ["auto", {
972
+ ], N = () => [...S(), D, T], _ = () => ["auto", "hidden", "clip", "visible", "scroll"], A = () => ["auto", "contain", "none"], k = () => [D, T, c], z = () => [wt, "full", "auto", ...k()], H = () => [Je, "none", "subgrid", D, T], W = () => ["auto", {
973
973
  span: ["full", Je, D, T]
974
- }, Je, D, T], Y = () => [Je, "auto", D, T], G = () => ["auto", "min", "max", "fr", D, T], V = () => ["start", "end", "center", "between", "around", "evenly", "stretch", "baseline", "center-safe", "end-safe"], Q = () => ["start", "end", "center", "stretch", "center-safe", "end-safe"], O = () => ["auto", ...k()], _ = () => [wt, "auto", "full", "dvw", "dvh", "lvw", "lvh", "svw", "svh", "min", "max", "fit", ...k()], x = () => [e, D, T], F = () => [...N(), Xo, Qo, {
974
+ }, Je, D, T], Y = () => [Je, "auto", D, T], G = () => ["auto", "min", "max", "fr", D, T], V = () => ["start", "end", "center", "between", "around", "evenly", "stretch", "baseline", "center-safe", "end-safe"], Q = () => ["start", "end", "center", "stretch", "center-safe", "end-safe"], O = () => ["auto", ...k()], M = () => [wt, "auto", "full", "dvw", "dvh", "lvw", "lvh", "svw", "svh", "min", "max", "fit", ...k()], x = () => [e, D, T], F = () => [...S(), Xo, Qo, {
975
975
  position: [D, T]
976
976
  }], K = () => ["no-repeat", {
977
977
  repeat: ["", "x", "y", "space", "round"]
@@ -1116,49 +1116,49 @@ const sd = (e, t) => {
1116
1116
  * @see https://tailwindcss.com/docs/object-position
1117
1117
  */
1118
1118
  "object-position": [{
1119
- object: A()
1119
+ object: N()
1120
1120
  }],
1121
1121
  /**
1122
1122
  * Overflow
1123
1123
  * @see https://tailwindcss.com/docs/overflow
1124
1124
  */
1125
1125
  overflow: [{
1126
- overflow: M()
1126
+ overflow: _()
1127
1127
  }],
1128
1128
  /**
1129
1129
  * Overflow X
1130
1130
  * @see https://tailwindcss.com/docs/overflow
1131
1131
  */
1132
1132
  "overflow-x": [{
1133
- "overflow-x": M()
1133
+ "overflow-x": _()
1134
1134
  }],
1135
1135
  /**
1136
1136
  * Overflow Y
1137
1137
  * @see https://tailwindcss.com/docs/overflow
1138
1138
  */
1139
1139
  "overflow-y": [{
1140
- "overflow-y": M()
1140
+ "overflow-y": _()
1141
1141
  }],
1142
1142
  /**
1143
1143
  * Overscroll Behavior
1144
1144
  * @see https://tailwindcss.com/docs/overscroll-behavior
1145
1145
  */
1146
1146
  overscroll: [{
1147
- overscroll: S()
1147
+ overscroll: A()
1148
1148
  }],
1149
1149
  /**
1150
1150
  * Overscroll Behavior X
1151
1151
  * @see https://tailwindcss.com/docs/overscroll-behavior
1152
1152
  */
1153
1153
  "overscroll-x": [{
1154
- "overscroll-x": S()
1154
+ "overscroll-x": A()
1155
1155
  }],
1156
1156
  /**
1157
1157
  * Overscroll Behavior Y
1158
1158
  * @see https://tailwindcss.com/docs/overscroll-behavior
1159
1159
  */
1160
1160
  "overscroll-y": [{
1161
- "overscroll-y": S()
1161
+ "overscroll-y": A()
1162
1162
  }],
1163
1163
  /**
1164
1164
  * Position
@@ -1616,14 +1616,14 @@ const sd = (e, t) => {
1616
1616
  * @see https://tailwindcss.com/docs/width#setting-both-width-and-height
1617
1617
  */
1618
1618
  size: [{
1619
- size: _()
1619
+ size: M()
1620
1620
  }],
1621
1621
  /**
1622
1622
  * Width
1623
1623
  * @see https://tailwindcss.com/docs/width
1624
1624
  */
1625
1625
  w: [{
1626
- w: [s, "screen", ..._()]
1626
+ w: [s, "screen", ...M()]
1627
1627
  }],
1628
1628
  /**
1629
1629
  * Min-Width
@@ -1635,7 +1635,7 @@ const sd = (e, t) => {
1635
1635
  "screen",
1636
1636
  /** Deprecated. @see https://github.com/tailwindlabs/tailwindcss.com/issues/2027#issuecomment-2620152757 */
1637
1637
  "none",
1638
- ..._()
1638
+ ...M()
1639
1639
  ]
1640
1640
  }],
1641
1641
  /**
@@ -1653,7 +1653,7 @@ const sd = (e, t) => {
1653
1653
  {
1654
1654
  screen: [i]
1655
1655
  },
1656
- ..._()
1656
+ ...M()
1657
1657
  ]
1658
1658
  }],
1659
1659
  /**
@@ -1661,21 +1661,21 @@ const sd = (e, t) => {
1661
1661
  * @see https://tailwindcss.com/docs/height
1662
1662
  */
1663
1663
  h: [{
1664
- h: ["screen", "lh", ..._()]
1664
+ h: ["screen", "lh", ...M()]
1665
1665
  }],
1666
1666
  /**
1667
1667
  * Min-Height
1668
1668
  * @see https://tailwindcss.com/docs/min-height
1669
1669
  */
1670
1670
  "min-h": [{
1671
- "min-h": ["screen", "lh", "none", ..._()]
1671
+ "min-h": ["screen", "lh", "none", ...M()]
1672
1672
  }],
1673
1673
  /**
1674
1674
  * Max-Height
1675
1675
  * @see https://tailwindcss.com/docs/max-height
1676
1676
  */
1677
1677
  "max-h": [{
1678
- "max-h": ["screen", "lh", ..._()]
1678
+ "max-h": ["screen", "lh", ...M()]
1679
1679
  }],
1680
1680
  // ------------------
1681
1681
  // --- Typography ---
@@ -2585,7 +2585,7 @@ const sd = (e, t) => {
2585
2585
  }]
2586
2586
  }],
2587
2587
  "mask-image-radial-pos": [{
2588
- "mask-radial-at": N()
2588
+ "mask-radial-at": S()
2589
2589
  }],
2590
2590
  "mask-image-conic-pos": [{
2591
2591
  "mask-conic": [U]
@@ -2932,7 +2932,7 @@ const sd = (e, t) => {
2932
2932
  * @see https://tailwindcss.com/docs/perspective-origin
2933
2933
  */
2934
2934
  "perspective-origin": [{
2935
- "perspective-origin": A()
2935
+ "perspective-origin": N()
2936
2936
  }],
2937
2937
  /**
2938
2938
  * Rotate
@@ -3028,7 +3028,7 @@ const sd = (e, t) => {
3028
3028
  * @see https://tailwindcss.com/docs/transform-origin
3029
3029
  */
3030
3030
  "transform-origin": [{
3031
- origin: A()
3031
+ origin: N()
3032
3032
  }],
3033
3033
  /**
3034
3034
  * Transform Style
@@ -4297,16 +4297,16 @@ function Gb({
4297
4297
  className: b,
4298
4298
  ...p
4299
4299
  }) {
4300
- const g = e.length, w = i > 0 ? `${i}px` : void 0, y = I.useMemo(() => g === 0 || n < 0 ? 0 : n > g - 1 ? g - 1 : n, [n, g]), C = r && g > 1, N = I.useMemo(() => {
4300
+ const g = e.length, w = i > 0 ? `${i}px` : void 0, y = I.useMemo(() => g === 0 || n < 0 ? 0 : n > g - 1 ? g - 1 : n, [n, g]), C = r && g > 1, S = I.useMemo(() => {
4301
4301
  if (g === 0) return [];
4302
4302
  if (!C) return e;
4303
4303
  const [x] = e, [F] = e.slice(-1);
4304
4304
  return [F, ...e, x];
4305
- }, [C, g, e]), [A, M] = I.useState(
4305
+ }, [C, g, e]), [N, _] = I.useState(
4306
4306
  C ? y + 1 : y
4307
- ), [S, k] = I.useState(!0), [z, H] = I.useState(0);
4307
+ ), [A, k] = I.useState(!0), [z, H] = I.useState(0);
4308
4308
  I.useEffect(() => {
4309
- M(
4309
+ _(
4310
4310
  C ? y + 1 : y
4311
4311
  );
4312
4312
  }, [C, y, g]), I.useEffect(() => {
@@ -4315,10 +4315,10 @@ function Gb({
4315
4315
  let x;
4316
4316
  const F = () => {
4317
4317
  x = window.setInterval(() => {
4318
- M((q) => q + 1);
4318
+ _((q) => q + 1);
4319
4319
  }, t);
4320
4320
  }, K = () => window.clearInterval(x), le = () => {
4321
- document.hidden ? K() : (k(!1), M((q) => {
4321
+ document.hidden ? K() : (k(!1), _((q) => {
4322
4322
  const Z = ((q - (C ? 1 : 0) + g) % g + g) % g;
4323
4323
  return C ? Z + 1 : Z;
4324
4324
  }), F());
@@ -4327,14 +4327,14 @@ function Gb({
4327
4327
  K(), document.removeEventListener("visibilitychange", le);
4328
4328
  };
4329
4329
  }, [t, C, g, z]), I.useEffect(() => {
4330
- if (S)
4330
+ if (A)
4331
4331
  return;
4332
4332
  const x = window.setTimeout(() => {
4333
4333
  k(!0);
4334
4334
  }, 30);
4335
4335
  return () => window.clearTimeout(x);
4336
- }, [S]);
4337
- const W = g === 0 ? 0 : ((A - (C ? 1 : 0) + g) % g + g) % g, Y = I.useRef(/* @__PURE__ */ new Set()), G = I.useCallback(
4336
+ }, [A]);
4337
+ const W = g === 0 ? 0 : ((N - (C ? 1 : 0) + g) % g + g) % g, Y = I.useRef(/* @__PURE__ */ new Set()), G = I.useCallback(
4338
4338
  (x, F, K) => {
4339
4339
  const le = F.id === void 0 ? `${K}` : String(F.id), q = {
4340
4340
  event: x,
@@ -4377,16 +4377,16 @@ function Gb({
4377
4377
  d === "once" && K || (Y.current.add(F), G("impression", x, W));
4378
4378
  }, [W, G, d, g, e]);
4379
4379
  const V = I.useRef(!1), Q = () => {
4380
- V.current || (V.current = !0, k(!0), M((x) => x - 1), H((x) => x + 1));
4380
+ V.current || (V.current = !0, k(!0), _((x) => x - 1), H((x) => x + 1));
4381
4381
  }, O = () => {
4382
- V.current || (V.current = !0, k(!0), M((x) => x + 1), H((x) => x + 1));
4383
- }, _ = () => {
4382
+ V.current || (V.current = !0, k(!0), _((x) => x + 1), H((x) => x + 1));
4383
+ }, M = () => {
4384
4384
  if (V.current = !1, !!C) {
4385
- if (A === g + 1) {
4386
- k(!1), M(1);
4385
+ if (N === g + 1) {
4386
+ k(!1), _(1);
4387
4387
  return;
4388
4388
  }
4389
- A === 0 && (k(!1), M(g));
4389
+ N === 0 && (k(!1), _(g));
4390
4390
  }
4391
4391
  };
4392
4392
  return g === 0 ? null : /* @__PURE__ */ l("div", { className: E("w-full", b), ...p, children: /* @__PURE__ */ P("div", { className: "relative overflow-hidden rounded-4", children: [
@@ -4395,11 +4395,11 @@ function Gb({
4395
4395
  {
4396
4396
  className: E(
4397
4397
  "flex",
4398
- S && "transition-transform duration-500 ease-out"
4398
+ A && "transition-transform duration-500 ease-out"
4399
4399
  ),
4400
- style: { transform: `translateX(-${A * 100}%)` },
4401
- onTransitionEnd: _,
4402
- children: N.map((x, F) => {
4400
+ style: { transform: `translateX(-${N * 100}%)` },
4401
+ onTransitionEnd: M,
4402
+ children: S.map((x, F) => {
4403
4403
  const K = x.backgroundImageUrl ?? x.backgroundImage, le = !!(K && K.trim().length > 0), q = g === 0 ? 0 : (F - (C ? 1 : 0) + g) % g, Z = x.id === void 0 ? `${q}-${F}` : String(x.id);
4404
4404
  return /* @__PURE__ */ P(
4405
4405
  "button",
@@ -4513,7 +4513,7 @@ function Gb({
4513
4513
  {
4514
4514
  type: "button",
4515
4515
  onClick: () => {
4516
- k(!0), M(C ? F + 1 : F);
4516
+ k(!0), _(C ? F + 1 : F);
4517
4517
  },
4518
4518
  className: E(
4519
4519
  "h-2 cursor-pointer rounded-full transition-all",
@@ -6933,79 +6933,79 @@ function Bi() {
6933
6933
  return e;
6934
6934
  }
6935
6935
  function Mh(e, t) {
6936
- var n = se(), r = Bi(), o = lo(), a = uo(), i = mo(), s = i.focusDayAfter, c = i.focusDayBefore, d = i.focusWeekAfter, u = i.focusWeekBefore, f = i.blur, h = i.focus, v = i.focusMonthBefore, b = i.focusMonthAfter, p = i.focusYearBefore, g = i.focusYearAfter, w = i.focusStartOfWeek, y = i.focusEndOfWeek, C = function(_) {
6936
+ var n = se(), r = Bi(), o = lo(), a = uo(), i = mo(), s = i.focusDayAfter, c = i.focusDayBefore, d = i.focusWeekAfter, u = i.focusWeekBefore, f = i.blur, h = i.focus, v = i.focusMonthBefore, b = i.focusMonthAfter, p = i.focusYearBefore, g = i.focusYearAfter, w = i.focusStartOfWeek, y = i.focusEndOfWeek, C = function(M) {
6937
6937
  var x, F, K, le;
6938
- jn(n) ? (x = r.onDayClick) === null || x === void 0 || x.call(r, e, t, _) : en(n) ? (F = o.onDayClick) === null || F === void 0 || F.call(o, e, t, _) : tn(n) ? (K = a.onDayClick) === null || K === void 0 || K.call(a, e, t, _) : (le = n.onDayClick) === null || le === void 0 || le.call(n, e, t, _);
6939
- }, N = function(_) {
6938
+ jn(n) ? (x = r.onDayClick) === null || x === void 0 || x.call(r, e, t, M) : en(n) ? (F = o.onDayClick) === null || F === void 0 || F.call(o, e, t, M) : tn(n) ? (K = a.onDayClick) === null || K === void 0 || K.call(a, e, t, M) : (le = n.onDayClick) === null || le === void 0 || le.call(n, e, t, M);
6939
+ }, S = function(M) {
6940
6940
  var x;
6941
- h(e), (x = n.onDayFocus) === null || x === void 0 || x.call(n, e, t, _);
6942
- }, A = function(_) {
6941
+ h(e), (x = n.onDayFocus) === null || x === void 0 || x.call(n, e, t, M);
6942
+ }, N = function(M) {
6943
6943
  var x;
6944
- f(), (x = n.onDayBlur) === null || x === void 0 || x.call(n, e, t, _);
6945
- }, M = function(_) {
6944
+ f(), (x = n.onDayBlur) === null || x === void 0 || x.call(n, e, t, M);
6945
+ }, _ = function(M) {
6946
6946
  var x;
6947
- (x = n.onDayMouseEnter) === null || x === void 0 || x.call(n, e, t, _);
6948
- }, S = function(_) {
6947
+ (x = n.onDayMouseEnter) === null || x === void 0 || x.call(n, e, t, M);
6948
+ }, A = function(M) {
6949
6949
  var x;
6950
- (x = n.onDayMouseLeave) === null || x === void 0 || x.call(n, e, t, _);
6951
- }, k = function(_) {
6950
+ (x = n.onDayMouseLeave) === null || x === void 0 || x.call(n, e, t, M);
6951
+ }, k = function(M) {
6952
6952
  var x;
6953
- (x = n.onDayPointerEnter) === null || x === void 0 || x.call(n, e, t, _);
6954
- }, z = function(_) {
6953
+ (x = n.onDayPointerEnter) === null || x === void 0 || x.call(n, e, t, M);
6954
+ }, z = function(M) {
6955
6955
  var x;
6956
- (x = n.onDayPointerLeave) === null || x === void 0 || x.call(n, e, t, _);
6957
- }, H = function(_) {
6956
+ (x = n.onDayPointerLeave) === null || x === void 0 || x.call(n, e, t, M);
6957
+ }, H = function(M) {
6958
6958
  var x;
6959
- (x = n.onDayTouchCancel) === null || x === void 0 || x.call(n, e, t, _);
6960
- }, W = function(_) {
6959
+ (x = n.onDayTouchCancel) === null || x === void 0 || x.call(n, e, t, M);
6960
+ }, W = function(M) {
6961
6961
  var x;
6962
- (x = n.onDayTouchEnd) === null || x === void 0 || x.call(n, e, t, _);
6963
- }, Y = function(_) {
6962
+ (x = n.onDayTouchEnd) === null || x === void 0 || x.call(n, e, t, M);
6963
+ }, Y = function(M) {
6964
6964
  var x;
6965
- (x = n.onDayTouchMove) === null || x === void 0 || x.call(n, e, t, _);
6966
- }, G = function(_) {
6965
+ (x = n.onDayTouchMove) === null || x === void 0 || x.call(n, e, t, M);
6966
+ }, G = function(M) {
6967
6967
  var x;
6968
- (x = n.onDayTouchStart) === null || x === void 0 || x.call(n, e, t, _);
6969
- }, V = function(_) {
6968
+ (x = n.onDayTouchStart) === null || x === void 0 || x.call(n, e, t, M);
6969
+ }, V = function(M) {
6970
6970
  var x;
6971
- (x = n.onDayKeyUp) === null || x === void 0 || x.call(n, e, t, _);
6972
- }, Q = function(_) {
6971
+ (x = n.onDayKeyUp) === null || x === void 0 || x.call(n, e, t, M);
6972
+ }, Q = function(M) {
6973
6973
  var x;
6974
- switch (_.key) {
6974
+ switch (M.key) {
6975
6975
  case "ArrowLeft":
6976
- _.preventDefault(), _.stopPropagation(), n.dir === "rtl" ? s() : c();
6976
+ M.preventDefault(), M.stopPropagation(), n.dir === "rtl" ? s() : c();
6977
6977
  break;
6978
6978
  case "ArrowRight":
6979
- _.preventDefault(), _.stopPropagation(), n.dir === "rtl" ? c() : s();
6979
+ M.preventDefault(), M.stopPropagation(), n.dir === "rtl" ? c() : s();
6980
6980
  break;
6981
6981
  case "ArrowDown":
6982
- _.preventDefault(), _.stopPropagation(), d();
6982
+ M.preventDefault(), M.stopPropagation(), d();
6983
6983
  break;
6984
6984
  case "ArrowUp":
6985
- _.preventDefault(), _.stopPropagation(), u();
6985
+ M.preventDefault(), M.stopPropagation(), u();
6986
6986
  break;
6987
6987
  case "PageUp":
6988
- _.preventDefault(), _.stopPropagation(), _.shiftKey ? p() : v();
6988
+ M.preventDefault(), M.stopPropagation(), M.shiftKey ? p() : v();
6989
6989
  break;
6990
6990
  case "PageDown":
6991
- _.preventDefault(), _.stopPropagation(), _.shiftKey ? g() : b();
6991
+ M.preventDefault(), M.stopPropagation(), M.shiftKey ? g() : b();
6992
6992
  break;
6993
6993
  case "Home":
6994
- _.preventDefault(), _.stopPropagation(), w();
6994
+ M.preventDefault(), M.stopPropagation(), w();
6995
6995
  break;
6996
6996
  case "End":
6997
- _.preventDefault(), _.stopPropagation(), y();
6997
+ M.preventDefault(), M.stopPropagation(), y();
6998
6998
  break;
6999
6999
  }
7000
- (x = n.onDayKeyDown) === null || x === void 0 || x.call(n, e, t, _);
7000
+ (x = n.onDayKeyDown) === null || x === void 0 || x.call(n, e, t, M);
7001
7001
  }, O = {
7002
7002
  onClick: C,
7003
- onFocus: N,
7004
- onBlur: A,
7003
+ onFocus: S,
7004
+ onBlur: N,
7005
7005
  onKeyDown: Q,
7006
7006
  onKeyUp: V,
7007
- onMouseEnter: M,
7008
- onMouseLeave: S,
7007
+ onMouseEnter: _,
7008
+ onMouseLeave: A,
7009
7009
  onPointerEnter: k,
7010
7010
  onPointerLeave: z,
7011
7011
  onTouchCancel: H,
@@ -7044,8 +7044,8 @@ function Oh(e, t) {
7044
7044
  function Ih(e, t, n) {
7045
7045
  var r, o, a, i = se(), s = mo(), c = Ph(e, t), d = Mh(e, c), u = Rh(), f = !!(i.onDayClick || i.mode !== "default");
7046
7046
  je(function() {
7047
- var M;
7048
- c.outside || s.focusedDay && f && Ce(s.focusedDay, e) && ((M = n.current) === null || M === void 0 || M.focus());
7047
+ var _;
7048
+ c.outside || s.focusedDay && f && Ce(s.focusedDay, e) && ((_ = n.current) === null || _ === void 0 || _.focus());
7049
7049
  }, [
7050
7050
  s.focusedDay,
7051
7051
  e,
@@ -7058,15 +7058,15 @@ function Ih(e, t, n) {
7058
7058
  className: h,
7059
7059
  children: g,
7060
7060
  role: "gridcell"
7061
- }, y = s.focusTarget && Ce(s.focusTarget, e) && !c.outside, C = s.focusedDay && Ce(s.focusedDay, e), N = B(B(B({}, w), (r = { disabled: c.disabled, role: "gridcell" }, r["aria-selected"] = c.selected, r.tabIndex = C || y ? 0 : -1, r)), d), A = {
7061
+ }, y = s.focusTarget && Ce(s.focusTarget, e) && !c.outside, C = s.focusedDay && Ce(s.focusedDay, e), S = B(B(B({}, w), (r = { disabled: c.disabled, role: "gridcell" }, r["aria-selected"] = c.selected, r.tabIndex = C || y ? 0 : -1, r)), d), N = {
7062
7062
  isButton: f,
7063
7063
  isHidden: b,
7064
7064
  activeModifiers: c,
7065
7065
  selectedDays: u,
7066
- buttonProps: N,
7066
+ buttonProps: S,
7067
7067
  divProps: w
7068
7068
  };
7069
- return A;
7069
+ return N;
7070
7070
  }
7071
7071
  function Lh(e) {
7072
7072
  var t = _t(null), n = Ih(e.date, e.displayMonth, t);
@@ -7246,19 +7246,19 @@ function Ub({
7246
7246
  "aria-label": v,
7247
7247
  ...b
7248
7248
  }) {
7249
- const p = typeof r == "boolean", [g, w] = I.useState(o), y = p ? r : g, C = n !== void 0, N = v ?? (typeof e == "string" || typeof e == "number" ? String(e) : void 0);
7249
+ const p = typeof r == "boolean", [g, w] = I.useState(o), y = p ? r : g, C = n !== void 0, S = v ?? (typeof e == "string" || typeof e == "number" ? String(e) : void 0);
7250
7250
  return /* @__PURE__ */ P(
7251
7251
  "button",
7252
7252
  {
7253
7253
  type: "button",
7254
7254
  role: "checkbox",
7255
7255
  "aria-checked": y,
7256
- "aria-label": N,
7256
+ "aria-label": S,
7257
7257
  disabled: u,
7258
- onClick: (M) => {
7258
+ onClick: (_) => {
7259
7259
  if (u) return;
7260
- const S = !y;
7261
- p || w(S), a?.(S), f?.(M);
7260
+ const A = !y;
7261
+ p || w(A), a?.(A), f?.(_);
7262
7262
  },
7263
7263
  className: E(
7264
7264
  "relative overflow-hidden rounded-[28px] border-2 transition-colors duration-200",
@@ -7354,7 +7354,7 @@ function Zh(e) {
7354
7354
  }), [b, p] = m.useState(null), [g, w] = m.useState(null), y = m.useRef(!1), C = b ? !!i || !!b.closest("form") : (
7355
7355
  // We set this to true by default so that events bubble to forms without JS (SSR)
7356
7356
  !0
7357
- ), N = {
7357
+ ), S = {
7358
7358
  checked: h,
7359
7359
  disabled: a,
7360
7360
  setChecked: v,
@@ -7374,8 +7374,8 @@ function Zh(e) {
7374
7374
  qh,
7375
7375
  {
7376
7376
  scope: t,
7377
- ...N,
7378
- children: Jh(f) ? f(N) : r
7377
+ ...S,
7378
+ children: Jh(f) ? f(S) : r
7379
7379
  }
7380
7380
  );
7381
7381
  }
@@ -7510,13 +7510,13 @@ var Ki = "CheckboxBubbleInput", Qi = m.forwardRef(
7510
7510
  m.useEffect(() => {
7511
7511
  const y = h;
7512
7512
  if (!y) return;
7513
- const C = window.HTMLInputElement.prototype, A = Object.getOwnPropertyDescriptor(
7513
+ const C = window.HTMLInputElement.prototype, N = Object.getOwnPropertyDescriptor(
7514
7514
  C,
7515
7515
  "checked"
7516
- ).set, M = !o.current;
7517
- if (p !== a && A) {
7518
- const S = new Event("click", { bubbles: M });
7519
- y.indeterminate = nt(a), A.call(y, nt(a) ? !1 : a), y.dispatchEvent(S);
7516
+ ).set, _ = !o.current;
7517
+ if (p !== a && N) {
7518
+ const A = new Event("click", { bubbles: _ });
7519
+ y.indeterminate = nt(a), N.call(y, nt(a) ? !1 : a), y.dispatchEvent(A);
7520
7520
  }
7521
7521
  }, [h, p, a, o]);
7522
7522
  const w = m.useRef(nt(a) ? !1 : a);
@@ -7777,15 +7777,15 @@ var np = "DismissableLayer", Dr = "dismissableLayer.update", rp = "dismissableLa
7777
7777
  onInteractOutside: i,
7778
7778
  onDismiss: s,
7779
7779
  ...c
7780
- } = e, d = m.useContext(Zi), [u, f] = m.useState(null), h = u?.ownerDocument ?? globalThis?.document, [, v] = m.useState({}), b = te(t, (S) => f(S)), p = Array.from(d.layers), [g] = [...d.layersWithOutsidePointerEventsDisabled].slice(-1), w = p.indexOf(g), y = u ? p.indexOf(u) : -1, C = d.layersWithOutsidePointerEventsDisabled.size > 0, N = y >= w, A = sp((S) => {
7781
- const k = S.target, z = [...d.branches].some((H) => H.contains(k));
7782
- !N || z || (o?.(S), i?.(S), S.defaultPrevented || s?.());
7783
- }, h), M = lp((S) => {
7784
- const k = S.target;
7785
- [...d.branches].some((H) => H.contains(k)) || (a?.(S), i?.(S), S.defaultPrevented || s?.());
7780
+ } = e, d = m.useContext(Zi), [u, f] = m.useState(null), h = u?.ownerDocument ?? globalThis?.document, [, v] = m.useState({}), b = te(t, (A) => f(A)), p = Array.from(d.layers), [g] = [...d.layersWithOutsidePointerEventsDisabled].slice(-1), w = p.indexOf(g), y = u ? p.indexOf(u) : -1, C = d.layersWithOutsidePointerEventsDisabled.size > 0, S = y >= w, N = sp((A) => {
7781
+ const k = A.target, z = [...d.branches].some((H) => H.contains(k));
7782
+ !S || z || (o?.(A), i?.(A), A.defaultPrevented || s?.());
7783
+ }, h), _ = lp((A) => {
7784
+ const k = A.target;
7785
+ [...d.branches].some((H) => H.contains(k)) || (a?.(A), i?.(A), A.defaultPrevented || s?.());
7786
7786
  }, h);
7787
- return tp((S) => {
7788
- y === d.layers.size - 1 && (r?.(S), !S.defaultPrevented && s && (S.preventDefault(), s()));
7787
+ return tp((A) => {
7788
+ y === d.layers.size - 1 && (r?.(A), !A.defaultPrevented && s && (A.preventDefault(), s()));
7789
7789
  }, h), m.useEffect(() => {
7790
7790
  if (u)
7791
7791
  return n && (d.layersWithOutsidePointerEventsDisabled.size === 0 && (ca = h.body.style.pointerEvents, h.body.style.pointerEvents = "none"), d.layersWithOutsidePointerEventsDisabled.add(u)), d.layers.add(u), da(), () => {
@@ -7794,22 +7794,22 @@ var np = "DismissableLayer", Dr = "dismissableLayer.update", rp = "dismissableLa
7794
7794
  }, [u, h, n, d]), m.useEffect(() => () => {
7795
7795
  u && (d.layers.delete(u), d.layersWithOutsidePointerEventsDisabled.delete(u), da());
7796
7796
  }, [u, d]), m.useEffect(() => {
7797
- const S = () => v({});
7798
- return document.addEventListener(Dr, S), () => document.removeEventListener(Dr, S);
7797
+ const A = () => v({});
7798
+ return document.addEventListener(Dr, A), () => document.removeEventListener(Dr, A);
7799
7799
  }, []), /* @__PURE__ */ l(
7800
7800
  j.div,
7801
7801
  {
7802
7802
  ...c,
7803
7803
  ref: b,
7804
7804
  style: {
7805
- pointerEvents: C ? N ? "auto" : "none" : void 0,
7805
+ pointerEvents: C ? S ? "auto" : "none" : void 0,
7806
7806
  ...e.style
7807
7807
  },
7808
- onFocusCapture: $(e.onFocusCapture, M.onFocusCapture),
7809
- onBlurCapture: $(e.onBlurCapture, M.onBlurCapture),
7808
+ onFocusCapture: $(e.onFocusCapture, _.onFocusCapture),
7809
+ onBlurCapture: $(e.onBlurCapture, _.onBlurCapture),
7810
7810
  onPointerDownCapture: $(
7811
7811
  e.onPointerDownCapture,
7812
- A.onPointerDownCapture
7812
+ N.onPointerDownCapture
7813
7813
  )
7814
7814
  }
7815
7815
  );
@@ -7912,16 +7912,16 @@ var gr = "focusScope.autoFocusOnMount", vr = "focusScope.autoFocusOnUnmount", fa
7912
7912
  if (r) {
7913
7913
  let p = function(C) {
7914
7914
  if (v.paused || !s) return;
7915
- const N = C.target;
7916
- s.contains(N) ? f.current = N : tt(f.current, { select: !0 });
7915
+ const S = C.target;
7916
+ s.contains(S) ? f.current = S : tt(f.current, { select: !0 });
7917
7917
  }, g = function(C) {
7918
7918
  if (v.paused || !s) return;
7919
- const N = C.relatedTarget;
7920
- N !== null && (s.contains(N) || tt(f.current, { select: !0 }));
7919
+ const S = C.relatedTarget;
7920
+ S !== null && (s.contains(S) || tt(f.current, { select: !0 }));
7921
7921
  }, w = function(C) {
7922
7922
  if (document.activeElement === document.body)
7923
- for (const A of C)
7924
- A.removedNodes.length > 0 && tt(s);
7923
+ for (const N of C)
7924
+ N.removedNodes.length > 0 && tt(s);
7925
7925
  };
7926
7926
  document.addEventListener("focusin", p), document.addEventListener("focusout", g);
7927
7927
  const y = new MutationObserver(w);
@@ -7950,8 +7950,8 @@ var gr = "focusScope.autoFocusOnMount", vr = "focusScope.autoFocusOnUnmount", fa
7950
7950
  if (!n && !r || v.paused) return;
7951
7951
  const g = p.key === "Tab" && !p.altKey && !p.ctrlKey && !p.metaKey, w = document.activeElement;
7952
7952
  if (g && w) {
7953
- const y = p.currentTarget, [C, N] = up(y);
7954
- C && N ? !p.shiftKey && w === N ? (p.preventDefault(), n && tt(C, { select: !0 })) : p.shiftKey && w === C && (p.preventDefault(), n && tt(N, { select: !0 })) : w === y && p.preventDefault();
7953
+ const y = p.currentTarget, [C, S] = up(y);
7954
+ C && S ? !p.shiftKey && w === S ? (p.preventDefault(), n && tt(C, { select: !0 })) : p.shiftKey && w === C && (p.preventDefault(), n && tt(S, { select: !0 })) : w === y && p.preventDefault();
7955
7955
  }
7956
7956
  },
7957
7957
  [n, r, v.paused]
@@ -8196,8 +8196,8 @@ const Pp = async (e, t, n) => {
8196
8196
  } = s[p], {
8197
8197
  x: y,
8198
8198
  y: C,
8199
- data: N,
8200
- reset: A
8199
+ data: S,
8200
+ reset: N
8201
8201
  } = await w({
8202
8202
  x: u,
8203
8203
  y: f,
@@ -8216,13 +8216,13 @@ const Pp = async (e, t, n) => {
8216
8216
  ...v,
8217
8217
  [g]: {
8218
8218
  ...v[g],
8219
- ...N
8219
+ ...S
8220
8220
  }
8221
- }, A && b <= 50 && (b++, typeof A == "object" && (A.placement && (h = A.placement), A.rects && (d = A.rects === !0 ? await i.getElementRects({
8221
+ }, N && b <= 50 && (b++, typeof N == "object" && (N.placement && (h = N.placement), N.rects && (d = N.rects === !0 ? await i.getElementRects({
8222
8222
  reference: e,
8223
8223
  floating: t,
8224
8224
  strategy: o
8225
- }) : A.rects), {
8225
+ }) : N.rects), {
8226
8226
  x: u,
8227
8227
  y: f
8228
8228
  } = ba(d, h, c)), p = -1);
@@ -8261,23 +8261,23 @@ async function Kt(e, t) {
8261
8261
  y: o,
8262
8262
  width: i.floating.width,
8263
8263
  height: i.floating.height
8264
- } : i.reference, C = await (a.getOffsetParent == null ? void 0 : a.getOffsetParent(s.floating)), N = await (a.isElement == null ? void 0 : a.isElement(C)) ? await (a.getScale == null ? void 0 : a.getScale(C)) || {
8264
+ } : i.reference, C = await (a.getOffsetParent == null ? void 0 : a.getOffsetParent(s.floating)), S = await (a.isElement == null ? void 0 : a.isElement(C)) ? await (a.getScale == null ? void 0 : a.getScale(C)) || {
8265
8265
  x: 1,
8266
8266
  y: 1
8267
8267
  } : {
8268
8268
  x: 1,
8269
8269
  y: 1
8270
- }, A = Rn(a.convertOffsetParentRelativeRectToViewportRelativeRect ? await a.convertOffsetParentRelativeRectToViewportRelativeRect({
8270
+ }, N = Rn(a.convertOffsetParentRelativeRectToViewportRelativeRect ? await a.convertOffsetParentRelativeRectToViewportRelativeRect({
8271
8271
  elements: s,
8272
8272
  rect: y,
8273
8273
  offsetParent: C,
8274
8274
  strategy: c
8275
8275
  }) : y);
8276
8276
  return {
8277
- top: (w.top - A.top + b.top) / N.y,
8278
- bottom: (A.bottom - w.bottom + b.bottom) / N.y,
8279
- left: (w.left - A.left + b.left) / N.x,
8280
- right: (A.right - w.right + b.right) / N.x
8277
+ top: (w.top - N.top + b.top) / S.y,
8278
+ bottom: (N.bottom - w.bottom + b.bottom) / S.y,
8279
+ left: (w.left - N.left + b.left) / S.x,
8280
+ right: (N.right - w.right + b.right) / S.x
8281
8281
  };
8282
8282
  }
8283
8283
  const Ep = (e) => ({
@@ -8301,17 +8301,17 @@ const Ep = (e) => ({
8301
8301
  const f = ts(u), h = {
8302
8302
  x: n,
8303
8303
  y: r
8304
- }, v = wo(o), b = yo(v), p = await i.getDimensions(d), g = v === "y", w = g ? "top" : "left", y = g ? "bottom" : "right", C = g ? "clientHeight" : "clientWidth", N = a.reference[b] + a.reference[v] - h[v] - a.floating[b], A = h[v] - a.reference[v], M = await (i.getOffsetParent == null ? void 0 : i.getOffsetParent(d));
8305
- let S = M ? M[C] : 0;
8306
- (!S || !await (i.isElement == null ? void 0 : i.isElement(M))) && (S = s.floating[C] || a.floating[b]);
8307
- const k = N / 2 - A / 2, z = S / 2 - p[b] / 2 - 1, H = ot(f[w], z), W = ot(f[y], z), Y = H, G = S - p[b] - W, V = S / 2 - p[b] / 2 + k, Q = Or(Y, V, G), O = !c.arrow && Wt(o) != null && V !== Q && a.reference[b] / 2 - (V < Y ? H : W) - p[b] / 2 < 0, _ = O ? V < Y ? V - Y : V - G : 0;
8304
+ }, v = wo(o), b = yo(v), p = await i.getDimensions(d), g = v === "y", w = g ? "top" : "left", y = g ? "bottom" : "right", C = g ? "clientHeight" : "clientWidth", S = a.reference[b] + a.reference[v] - h[v] - a.floating[b], N = h[v] - a.reference[v], _ = await (i.getOffsetParent == null ? void 0 : i.getOffsetParent(d));
8305
+ let A = _ ? _[C] : 0;
8306
+ (!A || !await (i.isElement == null ? void 0 : i.isElement(_))) && (A = s.floating[C] || a.floating[b]);
8307
+ const k = S / 2 - N / 2, z = A / 2 - p[b] / 2 - 1, H = ot(f[w], z), W = ot(f[y], z), Y = H, G = A - p[b] - W, V = A / 2 - p[b] / 2 + k, Q = Or(Y, V, G), O = !c.arrow && Wt(o) != null && V !== Q && a.reference[b] / 2 - (V < Y ? H : W) - p[b] / 2 < 0, M = O ? V < Y ? V - Y : V - G : 0;
8308
8308
  return {
8309
- [v]: h[v] + _,
8309
+ [v]: h[v] + M,
8310
8310
  data: {
8311
8311
  [v]: Q,
8312
- centerOffset: V - Q - _,
8312
+ centerOffset: V - Q - M,
8313
8313
  ...O && {
8314
- alignmentOffset: _
8314
+ alignmentOffset: M
8315
8315
  }
8316
8316
  },
8317
8317
  reset: O
@@ -8341,12 +8341,12 @@ const Ep = (e) => ({
8341
8341
  } = qe(e, t);
8342
8342
  if ((n = a.arrow) != null && n.alignmentOffset)
8343
8343
  return {};
8344
- const w = Ze(o), y = He(s), C = Ze(s) === s, N = await (c.isRTL == null ? void 0 : c.isRTL(d.floating)), A = h || (C || !p ? [Mn(s)] : xp(s)), M = b !== "none";
8345
- !h && M && A.push(...Ap(s, p, b, N));
8346
- const S = [s, ...A], k = await Kt(t, g), z = [];
8344
+ const w = Ze(o), y = He(s), C = Ze(s) === s, S = await (c.isRTL == null ? void 0 : c.isRTL(d.floating)), N = h || (C || !p ? [Mn(s)] : xp(s)), _ = b !== "none";
8345
+ !h && _ && N.push(...Ap(s, p, b, S));
8346
+ const A = [s, ...N], k = await Kt(t, g), z = [];
8347
8347
  let H = ((r = a.flip) == null ? void 0 : r.overflows) || [];
8348
8348
  if (u && z.push(k[w]), f) {
8349
- const V = wp(o, i, N);
8349
+ const V = wp(o, i, S);
8350
8350
  z.push(k[V[0]], k[V[1]]);
8351
8351
  }
8352
8352
  if (H = [...H, {
@@ -8354,7 +8354,7 @@ const Ep = (e) => ({
8354
8354
  overflows: z
8355
8355
  }], !z.every((V) => V <= 0)) {
8356
8356
  var W, Y;
8357
- const V = (((W = a.flip) == null ? void 0 : W.index) || 0) + 1, Q = S[V];
8357
+ const V = (((W = a.flip) == null ? void 0 : W.index) || 0) + 1, Q = A[V];
8358
8358
  if (Q && (!(f === "alignment" ? y !== He(Q) : !1) || // We leave the current main axis only if every placement on that axis
8359
8359
  // overflows the main axis.
8360
8360
  H.every((x) => He(x.placement) === y ? x.overflows[0] > 0 : !0)))
@@ -8367,13 +8367,13 @@ const Ep = (e) => ({
8367
8367
  placement: Q
8368
8368
  }
8369
8369
  };
8370
- let O = (Y = H.filter((_) => _.overflows[0] <= 0).sort((_, x) => _.overflows[1] - x.overflows[1])[0]) == null ? void 0 : Y.placement;
8370
+ let O = (Y = H.filter((M) => M.overflows[0] <= 0).sort((M, x) => M.overflows[1] - x.overflows[1])[0]) == null ? void 0 : Y.placement;
8371
8371
  if (!O)
8372
8372
  switch (v) {
8373
8373
  case "bestFit": {
8374
8374
  var G;
8375
- const _ = (G = H.filter((x) => {
8376
- if (M) {
8375
+ const M = (G = H.filter((x) => {
8376
+ if (_) {
8377
8377
  const F = He(x.placement);
8378
8378
  return F === y || // Create a bias to the `y` side axis due to horizontal
8379
8379
  // reading directions favoring greater width.
@@ -8381,7 +8381,7 @@ const Ep = (e) => ({
8381
8381
  }
8382
8382
  return !0;
8383
8383
  }).map((x) => [x.placement, x.overflows.filter((F) => F > 0).reduce((F, K) => F + K, 0)]).sort((x, F) => x[1] - F[1])[0]) == null ? void 0 : G[0];
8384
- _ && (O = _);
8384
+ M && (O = M);
8385
8385
  break;
8386
8386
  }
8387
8387
  case "initialPlacement":
@@ -8585,13 +8585,13 @@ const Tp = function(e) {
8585
8585
  ...p
8586
8586
  };
8587
8587
  if (c) {
8588
- const C = h === "y" ? "height" : "width", N = a.reference[h] - a.floating[C] + g.mainAxis, A = a.reference[h] + a.reference[C] - g.mainAxis;
8589
- v < N ? v = N : v > A && (v = A);
8588
+ const C = h === "y" ? "height" : "width", S = a.reference[h] - a.floating[C] + g.mainAxis, N = a.reference[h] + a.reference[C] - g.mainAxis;
8589
+ v < S ? v = S : v > N && (v = N);
8590
8590
  }
8591
8591
  if (d) {
8592
8592
  var w, y;
8593
- const C = h === "y" ? "width" : "height", N = ns.has(Ze(o)), A = a.reference[f] - a.floating[C] + (N && ((w = i.offset) == null ? void 0 : w[f]) || 0) + (N ? 0 : g.crossAxis), M = a.reference[f] + a.reference[C] + (N ? 0 : ((y = i.offset) == null ? void 0 : y[f]) || 0) - (N ? g.crossAxis : 0);
8594
- b < A ? b = A : b > M && (b = M);
8593
+ const C = h === "y" ? "width" : "height", S = ns.has(Ze(o)), N = a.reference[f] - a.floating[C] + (S && ((w = i.offset) == null ? void 0 : w[f]) || 0) + (S ? 0 : g.crossAxis), _ = a.reference[f] + a.reference[C] + (S ? 0 : ((y = i.offset) == null ? void 0 : y[f]) || 0) - (S ? g.crossAxis : 0);
8594
+ b < N ? b = N : b > _ && (b = _);
8595
8595
  }
8596
8596
  return {
8597
8597
  [h]: v,
@@ -8620,16 +8620,16 @@ const Tp = function(e) {
8620
8620
  } = a.floating;
8621
8621
  let g, w;
8622
8622
  f === "top" || f === "bottom" ? (g = f, w = h === (await (i.isRTL == null ? void 0 : i.isRTL(s.floating)) ? "start" : "end") ? "left" : "right") : (w = f, g = h === "end" ? "top" : "bottom");
8623
- const y = p - u.top - u.bottom, C = b - u.left - u.right, N = ot(p - u[g], y), A = ot(b - u[w], C), M = !t.middlewareData.shift;
8624
- let S = N, k = A;
8625
- if ((n = t.middlewareData.shift) != null && n.enabled.x && (k = C), (r = t.middlewareData.shift) != null && r.enabled.y && (S = y), M && !h) {
8623
+ const y = p - u.top - u.bottom, C = b - u.left - u.right, S = ot(p - u[g], y), N = ot(b - u[w], C), _ = !t.middlewareData.shift;
8624
+ let A = S, k = N;
8625
+ if ((n = t.middlewareData.shift) != null && n.enabled.x && (k = C), (r = t.middlewareData.shift) != null && r.enabled.y && (A = y), _ && !h) {
8626
8626
  const H = Se(u.left, 0), W = Se(u.right, 0), Y = Se(u.top, 0), G = Se(u.bottom, 0);
8627
- v ? k = b - 2 * (H !== 0 || W !== 0 ? H + W : Se(u.left, u.right)) : S = p - 2 * (Y !== 0 || G !== 0 ? Y + G : Se(u.top, u.bottom));
8627
+ v ? k = b - 2 * (H !== 0 || W !== 0 ? H + W : Se(u.left, u.right)) : A = p - 2 * (Y !== 0 || G !== 0 ? Y + G : Se(u.top, u.bottom));
8628
8628
  }
8629
8629
  await c({
8630
8630
  ...t,
8631
8631
  availableWidth: k,
8632
- availableHeight: S
8632
+ availableHeight: A
8633
8633
  });
8634
8634
  const z = await i.getDimensions(s.floating);
8635
8635
  return b !== z.width || p !== z.height ? {
@@ -8804,8 +8804,8 @@ function mt(e, t, n, r) {
8804
8804
  const h = Ae(a), v = r && De(r) ? Ae(r) : r;
8805
8805
  let b = h, p = Lr(b);
8806
8806
  for (; p && r && v !== b; ) {
8807
- const g = Pt(p), w = p.getBoundingClientRect(), y = Oe(p), C = w.left + (p.clientLeft + parseFloat(y.paddingLeft)) * g.x, N = w.top + (p.clientTop + parseFloat(y.paddingTop)) * g.y;
8808
- c *= g.x, d *= g.y, u *= g.x, f *= g.y, c += C, d += N, b = Ae(p), p = Lr(b);
8807
+ const g = Pt(p), w = p.getBoundingClientRect(), y = Oe(p), C = w.left + (p.clientLeft + parseFloat(y.paddingLeft)) * g.x, S = w.top + (p.clientTop + parseFloat(y.paddingTop)) * g.y;
8808
+ c *= g.x, d *= g.y, u *= g.x, f *= g.y, c += C, d += S, b = Ae(p), p = Lr(b);
8809
8809
  }
8810
8810
  }
8811
8811
  return Rn({
@@ -9066,26 +9066,26 @@ function ig(e, t) {
9066
9066
  rootMargin: -b + "px " + -p + "px " + -g + "px " + -w + "px",
9067
9067
  threshold: Se(0, ot(1, c)) || 1
9068
9068
  };
9069
- let N = !0;
9070
- function A(M) {
9071
- const S = M[0].intersectionRatio;
9072
- if (S !== c) {
9073
- if (!N)
9069
+ let S = !0;
9070
+ function N(_) {
9071
+ const A = _[0].intersectionRatio;
9072
+ if (A !== c) {
9073
+ if (!S)
9074
9074
  return i();
9075
- S ? i(!1, S) : r = setTimeout(() => {
9075
+ A ? i(!1, A) : r = setTimeout(() => {
9076
9076
  i(!1, 1e-7);
9077
9077
  }, 1e3);
9078
9078
  }
9079
- S === 1 && !ds(d, e.getBoundingClientRect()) && i(), N = !1;
9079
+ A === 1 && !ds(d, e.getBoundingClientRect()) && i(), S = !1;
9080
9080
  }
9081
9081
  try {
9082
- n = new IntersectionObserver(A, {
9082
+ n = new IntersectionObserver(N, {
9083
9083
  ...C,
9084
9084
  // Handle <iframe>s
9085
9085
  root: o.ownerDocument
9086
9086
  });
9087
9087
  } catch {
9088
- n = new IntersectionObserver(A, C);
9088
+ n = new IntersectionObserver(N, C);
9089
9089
  }
9090
9090
  n.observe(e);
9091
9091
  }
@@ -9209,18 +9209,18 @@ function vg(e) {
9209
9209
  }), [h, v] = m.useState(r);
9210
9210
  Tn(h, r) || v(r);
9211
9211
  const [b, p] = m.useState(null), [g, w] = m.useState(null), y = m.useCallback((x) => {
9212
- x !== M.current && (M.current = x, p(x));
9212
+ x !== _.current && (_.current = x, p(x));
9213
9213
  }, []), C = m.useCallback((x) => {
9214
- x !== S.current && (S.current = x, w(x));
9215
- }, []), N = a || b, A = i || g, M = m.useRef(null), S = m.useRef(null), k = m.useRef(u), z = c != null, H = yr(c), W = yr(o), Y = yr(d), G = m.useCallback(() => {
9216
- if (!M.current || !S.current)
9214
+ x !== A.current && (A.current = x, w(x));
9215
+ }, []), S = a || b, N = i || g, _ = m.useRef(null), A = m.useRef(null), k = m.useRef(u), z = c != null, H = yr(c), W = yr(o), Y = yr(d), G = m.useCallback(() => {
9216
+ if (!_.current || !A.current)
9217
9217
  return;
9218
9218
  const x = {
9219
9219
  placement: t,
9220
9220
  strategy: n,
9221
9221
  middleware: h
9222
9222
  };
9223
- W.current && (x.platform = W.current), hg(M.current, S.current, x).then((F) => {
9223
+ W.current && (x.platform = W.current), hg(_.current, A.current, x).then((F) => {
9224
9224
  const K = {
9225
9225
  ...F,
9226
9226
  // The floating element's position may be recomputed while it's closed
@@ -9244,21 +9244,21 @@ function vg(e) {
9244
9244
  yn(() => (V.current = !0, () => {
9245
9245
  V.current = !1;
9246
9246
  }), []), yn(() => {
9247
- if (N && (M.current = N), A && (S.current = A), N && A) {
9247
+ if (S && (_.current = S), N && (A.current = N), S && N) {
9248
9248
  if (H.current)
9249
- return H.current(N, A, G);
9249
+ return H.current(S, N, G);
9250
9250
  G();
9251
9251
  }
9252
- }, [N, A, G, H, z]);
9252
+ }, [S, N, G, H, z]);
9253
9253
  const Q = m.useMemo(() => ({
9254
- reference: M,
9255
- floating: S,
9254
+ reference: _,
9255
+ floating: A,
9256
9256
  setReference: y,
9257
9257
  setFloating: C
9258
9258
  }), [y, C]), O = m.useMemo(() => ({
9259
- reference: N,
9260
- floating: A
9261
- }), [N, A]), _ = m.useMemo(() => {
9259
+ reference: S,
9260
+ floating: N
9261
+ }), [S, N]), M = m.useMemo(() => {
9262
9262
  const x = {
9263
9263
  position: n,
9264
9264
  left: 0,
@@ -9284,8 +9284,8 @@ function vg(e) {
9284
9284
  update: G,
9285
9285
  refs: Q,
9286
9286
  elements: O,
9287
- floatingStyles: _
9288
- }), [u, G, Q, O, _]);
9287
+ floatingStyles: M
9288
+ }), [u, G, Q, O, M]);
9289
9289
  }
9290
9290
  const bg = (e) => {
9291
9291
  function t(n) {
@@ -9378,12 +9378,12 @@ var Ao = "PopperContent", [_g, Mg] = ms(Ao), bs = m.forwardRef(
9378
9378
  updatePositionStrategy: v = "optimized",
9379
9379
  onPlaced: b,
9380
9380
  ...p
9381
- } = e, g = hs(Ao, n), [w, y] = m.useState(null), C = te(t, (R) => y(R)), [N, A] = m.useState(null), M = Vi(N), S = M?.width ?? 0, k = M?.height ?? 0, z = r + (a !== "center" ? "-" + a : ""), H = typeof u == "number" ? u : { top: 0, right: 0, bottom: 0, left: 0, ...u }, W = Array.isArray(d) ? d : [d], Y = W.length > 0, G = {
9381
+ } = e, g = hs(Ao, n), [w, y] = m.useState(null), C = te(t, (R) => y(R)), [S, N] = m.useState(null), _ = Vi(S), A = _?.width ?? 0, k = _?.height ?? 0, z = r + (a !== "center" ? "-" + a : ""), H = typeof u == "number" ? u : { top: 0, right: 0, bottom: 0, left: 0, ...u }, W = Array.isArray(d) ? d : [d], Y = W.length > 0, G = {
9382
9382
  padding: H,
9383
9383
  boundary: W.filter(Tg),
9384
9384
  // with `strategy: 'fixed'`, this is the only way to get it to respect boundaries
9385
9385
  altBoundary: Y
9386
- }, { refs: V, floatingStyles: Q, placement: O, isPositioned: _, middlewareData: x } = vg({
9386
+ }, { refs: V, floatingStyles: Q, placement: O, isPositioned: M, middlewareData: x } = vg({
9387
9387
  // default to `fixed` strategy so users don't have to pick and we also avoid focus scroll issues
9388
9388
  strategy: "fixed",
9389
9389
  placement: z,
@@ -9409,14 +9409,14 @@ var Ao = "PopperContent", [_g, Mg] = ms(Ao), bs = m.forwardRef(
9409
9409
  xe.setProperty("--radix-popper-available-width", `${ce}px`), xe.setProperty("--radix-popper-available-height", `${X}px`), xe.setProperty("--radix-popper-anchor-width", `${ee}px`), xe.setProperty("--radix-popper-anchor-height", `${ae}px`);
9410
9410
  }
9411
9411
  }),
9412
- N && Ag({ element: N, padding: s }),
9413
- Dg({ arrowWidth: S, arrowHeight: k }),
9412
+ S && Ag({ element: S, padding: s }),
9413
+ Dg({ arrowWidth: A, arrowHeight: k }),
9414
9414
  h && Sg({ strategy: "referenceHidden", ...G })
9415
9415
  ]
9416
9416
  }), [F, K] = xs(O), le = rt(b);
9417
9417
  pe(() => {
9418
- _ && le?.();
9419
- }, [_, le]);
9418
+ M && le?.();
9419
+ }, [M, le]);
9420
9420
  const q = x.arrow?.x, Z = x.arrow?.y, ie = x.arrow?.centerOffset !== 0, [ge, ve] = m.useState();
9421
9421
  return pe(() => {
9422
9422
  w && ve(window.getComputedStyle(w).zIndex);
@@ -9427,7 +9427,7 @@ var Ao = "PopperContent", [_g, Mg] = ms(Ao), bs = m.forwardRef(
9427
9427
  "data-radix-popper-content-wrapper": "",
9428
9428
  style: {
9429
9429
  ...Q,
9430
- transform: _ ? Q.transform : "translate(0, -200%)",
9430
+ transform: M ? Q.transform : "translate(0, -200%)",
9431
9431
  // keep off the page when measuring
9432
9432
  minWidth: "max-content",
9433
9433
  zIndex: ge,
@@ -9449,7 +9449,7 @@ var Ao = "PopperContent", [_g, Mg] = ms(Ao), bs = m.forwardRef(
9449
9449
  {
9450
9450
  scope: n,
9451
9451
  placedSide: F,
9452
- onArrowChange: A,
9452
+ onArrowChange: N,
9453
9453
  arrowX: q,
9454
9454
  arrowY: Z,
9455
9455
  shouldHideArrow: ie,
@@ -9464,7 +9464,7 @@ var Ao = "PopperContent", [_g, Mg] = ms(Ao), bs = m.forwardRef(
9464
9464
  ...p.style,
9465
9465
  // if the PopperContent hasn't been placed yet (not all measurements done)
9466
9466
  // we prevent animations so that users's animation don't kick in too early referring wrong sides
9467
- animation: _ ? void 0 : "none"
9467
+ animation: M ? void 0 : "none"
9468
9468
  }
9469
9469
  }
9470
9470
  )
@@ -9746,12 +9746,12 @@ var As = Gg(), Cr = function() {
9746
9746
  onScrollCapture: Cr,
9747
9747
  onWheelCapture: Cr,
9748
9748
  onTouchMoveCapture: Cr
9749
- }), o = r[0], a = r[1], i = e.forwardProps, s = e.children, c = e.className, d = e.removeScrollBar, u = e.enabled, f = e.shards, h = e.sideCar, v = e.noRelative, b = e.noIsolation, p = e.inert, g = e.allowPinchZoom, w = e.as, y = w === void 0 ? "div" : w, C = e.gapMode, N = Ns(e, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noRelative", "noIsolation", "inert", "allowPinchZoom", "as", "gapMode"]), A = h, M = Vg([n, t]), S = Be(Be({}, N), o);
9749
+ }), o = r[0], a = r[1], i = e.forwardProps, s = e.children, c = e.className, d = e.removeScrollBar, u = e.enabled, f = e.shards, h = e.sideCar, v = e.noRelative, b = e.noIsolation, p = e.inert, g = e.allowPinchZoom, w = e.as, y = w === void 0 ? "div" : w, C = e.gapMode, S = Ns(e, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noRelative", "noIsolation", "inert", "allowPinchZoom", "as", "gapMode"]), N = h, _ = Vg([n, t]), A = Be(Be({}, S), o);
9750
9750
  return m.createElement(
9751
9751
  m.Fragment,
9752
9752
  null,
9753
- u && m.createElement(A, { sideCar: As, removeScrollBar: d, shards: f, noRelative: v, noIsolation: b, inert: p, setCallbacks: a, allowPinchZoom: !!g, lockRef: n, gapMode: C }),
9754
- i ? m.cloneElement(m.Children.only(s), Be(Be({}, S), { ref: M })) : m.createElement(y, Be({}, S, { className: c, ref: M }), s)
9753
+ u && m.createElement(N, { sideCar: As, removeScrollBar: d, shards: f, noRelative: v, noIsolation: b, inert: p, setCallbacks: a, allowPinchZoom: !!g, lockRef: n, gapMode: C }),
9754
+ i ? m.cloneElement(m.Children.only(s), Be(Be({}, A), { ref: _ })) : m.createElement(y, Be({}, A, { className: c, ref: _ }), s)
9755
9755
  );
9756
9756
  });
9757
9757
  Zn.defaultProps = {
@@ -9997,43 +9997,43 @@ function vv(e) {
9997
9997
  var s = m.useCallback(function(p, g) {
9998
9998
  if ("touches" in p && p.touches.length === 2 || p.type === "wheel" && p.ctrlKey)
9999
9999
  return !i.current.allowPinchZoom;
10000
- var w = vn(p), y = n.current, C = "deltaX" in p ? p.deltaX : y[0] - w[0], N = "deltaY" in p ? p.deltaY : y[1] - w[1], A, M = p.target, S = Math.abs(C) > Math.abs(N) ? "h" : "v";
10001
- if ("touches" in p && S === "h" && M.type === "range")
10000
+ var w = vn(p), y = n.current, C = "deltaX" in p ? p.deltaX : y[0] - w[0], S = "deltaY" in p ? p.deltaY : y[1] - w[1], N, _ = p.target, A = Math.abs(C) > Math.abs(S) ? "h" : "v";
10001
+ if ("touches" in p && A === "h" && _.type === "range")
10002
10002
  return !1;
10003
- var k = window.getSelection(), z = k && k.anchorNode, H = z ? z === M || z.contains(M) : !1;
10003
+ var k = window.getSelection(), z = k && k.anchorNode, H = z ? z === _ || z.contains(_) : !1;
10004
10004
  if (H)
10005
10005
  return !1;
10006
- var W = _a(S, M);
10006
+ var W = _a(A, _);
10007
10007
  if (!W)
10008
10008
  return !0;
10009
- if (W ? A = S : (A = S === "v" ? "h" : "v", W = _a(S, M)), !W)
10009
+ if (W ? N = A : (N = A === "v" ? "h" : "v", W = _a(A, _)), !W)
10010
10010
  return !1;
10011
- if (!r.current && "changedTouches" in p && (C || N) && (r.current = A), !A)
10011
+ if (!r.current && "changedTouches" in p && (C || S) && (r.current = N), !N)
10012
10012
  return !0;
10013
- var Y = r.current || A;
10014
- return mv(Y, g, p, Y === "h" ? C : N);
10013
+ var Y = r.current || N;
10014
+ return mv(Y, g, p, Y === "h" ? C : S);
10015
10015
  }, []), c = m.useCallback(function(p) {
10016
10016
  var g = p;
10017
10017
  if (!(!St.length || St[St.length - 1] !== a)) {
10018
- var w = "deltaY" in g ? Ma(g) : vn(g), y = t.current.filter(function(A) {
10019
- return A.name === g.type && (A.target === g.target || g.target === A.shadowParent) && hv(A.delta, w);
10018
+ var w = "deltaY" in g ? Ma(g) : vn(g), y = t.current.filter(function(N) {
10019
+ return N.name === g.type && (N.target === g.target || g.target === N.shadowParent) && hv(N.delta, w);
10020
10020
  })[0];
10021
10021
  if (y && y.should) {
10022
10022
  g.cancelable && g.preventDefault();
10023
10023
  return;
10024
10024
  }
10025
10025
  if (!y) {
10026
- var C = (i.current.shards || []).map(Ra).filter(Boolean).filter(function(A) {
10027
- return A.contains(g.target);
10028
- }), N = C.length > 0 ? s(g, C[0]) : !i.current.noIsolation;
10029
- N && g.cancelable && g.preventDefault();
10026
+ var C = (i.current.shards || []).map(Ra).filter(Boolean).filter(function(N) {
10027
+ return N.contains(g.target);
10028
+ }), S = C.length > 0 ? s(g, C[0]) : !i.current.noIsolation;
10029
+ S && g.cancelable && g.preventDefault();
10030
10030
  }
10031
10031
  }
10032
10032
  }, []), d = m.useCallback(function(p, g, w, y) {
10033
10033
  var C = { name: p, delta: g, target: w, should: y, shadowParent: bv(w) };
10034
10034
  t.current.push(C), setTimeout(function() {
10035
- t.current = t.current.filter(function(N) {
10036
- return N !== C;
10035
+ t.current = t.current.filter(function(S) {
10036
+ return S !== C;
10037
10037
  });
10038
10038
  }, 1);
10039
10039
  }, []), u = m.useCallback(function(p) {
@@ -10784,7 +10784,7 @@ var Qv = al, Xv = [" ", "Enter", "ArrowUp", "ArrowDown"], qv = [" ", "Enter"], p
10784
10784
  disabled: h,
10785
10785
  required: v,
10786
10786
  form: b
10787
- } = e, p = or(t), [g, w] = m.useState(null), [y, C] = m.useState(null), [N, A] = m.useState(!1), M = Wn(d), [S, k] = ke({
10787
+ } = e, p = or(t), [g, w] = m.useState(null), [y, C] = m.useState(null), [S, N] = m.useState(!1), _ = Wn(d), [A, k] = ke({
10788
10788
  prop: r,
10789
10789
  defaultProp: o ?? !1,
10790
10790
  onChange: a,
@@ -10804,14 +10804,14 @@ var Qv = al, Xv = [" ", "Enter", "ArrowUp", "ArrowDown"], qv = [" ", "Enter"], p
10804
10804
  onTriggerChange: w,
10805
10805
  valueNode: y,
10806
10806
  onValueNodeChange: C,
10807
- valueNodeHasChildren: N,
10808
- onValueNodeHasChildrenChange: A,
10807
+ valueNodeHasChildren: S,
10808
+ onValueNodeHasChildrenChange: N,
10809
10809
  contentId: _e(),
10810
10810
  value: z,
10811
10811
  onValueChange: H,
10812
- open: S,
10812
+ open: A,
10813
10813
  onOpenChange: k,
10814
- dir: M,
10814
+ dir: _,
10815
10815
  triggerPointerDownPosRef: W,
10816
10816
  disabled: h,
10817
10817
  children: [
@@ -10820,11 +10820,11 @@ var Qv = al, Xv = [" ", "Enter", "ArrowUp", "ArrowDown"], qv = [" ", "Enter"], p
10820
10820
  {
10821
10821
  scope: e.__scopeSelect,
10822
10822
  onNativeOptionAdd: m.useCallback((O) => {
10823
- V((_) => new Set(_).add(O));
10823
+ V((M) => new Set(M).add(O));
10824
10824
  }, []),
10825
10825
  onNativeOptionRemove: m.useCallback((O) => {
10826
- V((_) => {
10827
- const x = new Set(_);
10826
+ V((M) => {
10827
+ const x = new Set(M);
10828
10828
  return x.delete(O), x;
10829
10829
  });
10830
10830
  }, []),
@@ -10963,7 +10963,7 @@ var Ee = 10, [hl, lt] = $t(gt), o0 = "SelectContentImpl", a0 = /* @__PURE__ */ M
10963
10963
  avoidCollisions: g,
10964
10964
  //
10965
10965
  ...w
10966
- } = e, y = st(gt, n), [C, N] = m.useState(null), [A, M] = m.useState(null), S = te(t, (R) => N(R)), [k, z] = m.useState(null), [H, W] = m.useState(
10966
+ } = e, y = st(gt, n), [C, S] = m.useState(null), [N, _] = m.useState(null), A = te(t, (R) => S(R)), [k, z] = m.useState(null), [H, W] = m.useState(
10967
10967
  null
10968
10968
  ), Y = rr(n), [G, V] = m.useState(!1), Q = m.useRef(!1);
10969
10969
  m.useEffect(() => {
@@ -10973,16 +10973,16 @@ var Ee = 10, [hl, lt] = $t(gt), o0 = "SelectContentImpl", a0 = /* @__PURE__ */ M
10973
10973
  (R) => {
10974
10974
  const [oe, ...ce] = Y().map((ae) => ae.ref.current), [X] = ce.slice(-1), ee = document.activeElement;
10975
10975
  for (const ae of R)
10976
- if (ae === ee || (ae?.scrollIntoView({ block: "nearest" }), ae === oe && A && (A.scrollTop = 0), ae === X && A && (A.scrollTop = A.scrollHeight), ae?.focus(), document.activeElement !== ee)) return;
10976
+ if (ae === ee || (ae?.scrollIntoView({ block: "nearest" }), ae === oe && N && (N.scrollTop = 0), ae === X && N && (N.scrollTop = N.scrollHeight), ae?.focus(), document.activeElement !== ee)) return;
10977
10977
  },
10978
- [Y, A]
10979
- ), _ = m.useCallback(
10978
+ [Y, N]
10979
+ ), M = m.useCallback(
10980
10980
  () => O([k, C]),
10981
10981
  [O, k, C]
10982
10982
  );
10983
10983
  m.useEffect(() => {
10984
- G && _();
10985
- }, [G, _]);
10984
+ G && M();
10985
+ }, [G, M]);
10986
10986
  const { onOpenChange: x, triggerPointerDownPosRef: F } = y;
10987
10987
  m.useEffect(() => {
10988
10988
  if (C) {
@@ -11037,13 +11037,13 @@ var Ee = 10, [hl, lt] = $t(gt), o0 = "SelectContentImpl", a0 = /* @__PURE__ */ M
11037
11037
  {
11038
11038
  scope: n,
11039
11039
  content: C,
11040
- viewport: A,
11041
- onViewportChange: M,
11040
+ viewport: N,
11041
+ onViewportChange: _,
11042
11042
  itemRefCallback: q,
11043
11043
  selectedItem: k,
11044
11044
  onItemLeave: Z,
11045
11045
  itemTextRefCallback: ie,
11046
- focusSelectedItem: _,
11046
+ focusSelectedItem: M,
11047
11047
  selectedItemText: H,
11048
11048
  position: r,
11049
11049
  isPositioned: G,
@@ -11079,7 +11079,7 @@ var Ee = 10, [hl, lt] = $t(gt), o0 = "SelectContentImpl", a0 = /* @__PURE__ */ M
11079
11079
  ...w,
11080
11080
  ...ve,
11081
11081
  onPlaced: () => V(!0),
11082
- ref: S,
11082
+ ref: A,
11083
11083
  style: {
11084
11084
  // flex layout so we can place the scroll buttons properly
11085
11085
  display: "flex",
@@ -11111,11 +11111,11 @@ var Ee = 10, [hl, lt] = $t(gt), o0 = "SelectContentImpl", a0 = /* @__PURE__ */ M
11111
11111
  );
11112
11112
  pl.displayName = o0;
11113
11113
  var i0 = "SelectItemAlignedPosition", gl = m.forwardRef((e, t) => {
11114
- const { __scopeSelect: n, onPlaced: r, ...o } = e, a = st(gt, n), i = lt(gt, n), [s, c] = m.useState(null), [d, u] = m.useState(null), f = te(t, (S) => u(S)), h = rr(n), v = m.useRef(!1), b = m.useRef(!0), { viewport: p, selectedItem: g, selectedItemText: w, focusSelectedItem: y } = i, C = m.useCallback(() => {
11114
+ const { __scopeSelect: n, onPlaced: r, ...o } = e, a = st(gt, n), i = lt(gt, n), [s, c] = m.useState(null), [d, u] = m.useState(null), f = te(t, (A) => u(A)), h = rr(n), v = m.useRef(!1), b = m.useRef(!0), { viewport: p, selectedItem: g, selectedItemText: w, focusSelectedItem: y } = i, C = m.useCallback(() => {
11115
11115
  if (a.trigger && a.valueNode && s && d && p && g && w) {
11116
- const S = a.trigger.getBoundingClientRect(), k = d.getBoundingClientRect(), z = a.valueNode.getBoundingClientRect(), H = w.getBoundingClientRect();
11116
+ const A = a.trigger.getBoundingClientRect(), k = d.getBoundingClientRect(), z = a.valueNode.getBoundingClientRect(), H = w.getBoundingClientRect();
11117
11117
  if (a.dir !== "rtl") {
11118
- const ee = H.left - k.left, ae = z.left - ee, xe = S.left - ae, J = S.width + xe, be = Math.max(J, k.width), ye = window.innerWidth - Ee, Ht = Ta(ae, [
11118
+ const ee = H.left - k.left, ae = z.left - ee, xe = A.left - ae, J = A.width + xe, be = Math.max(J, k.width), ye = window.innerWidth - Ee, Ht = Ta(ae, [
11119
11119
  Ee,
11120
11120
  // Prevents the content from going off the starting edge of the
11121
11121
  // viewport. It may still go off the ending edge, but this can be
@@ -11126,20 +11126,20 @@ var i0 = "SelectItemAlignedPosition", gl = m.forwardRef((e, t) => {
11126
11126
  ]);
11127
11127
  s.style.minWidth = J + "px", s.style.left = Ht + "px";
11128
11128
  } else {
11129
- const ee = k.right - H.right, ae = window.innerWidth - z.right - ee, xe = window.innerWidth - S.right - ae, J = S.width + xe, be = Math.max(J, k.width), ye = window.innerWidth - Ee, Ht = Ta(ae, [
11129
+ const ee = k.right - H.right, ae = window.innerWidth - z.right - ee, xe = window.innerWidth - A.right - ae, J = A.width + xe, be = Math.max(J, k.width), ye = window.innerWidth - Ee, Ht = Ta(ae, [
11130
11130
  Ee,
11131
11131
  Math.max(Ee, ye - be)
11132
11132
  ]);
11133
11133
  s.style.minWidth = J + "px", s.style.right = Ht + "px";
11134
11134
  }
11135
- const W = h(), Y = window.innerHeight - Ee * 2, G = p.scrollHeight, V = window.getComputedStyle(d), Q = parseInt(V.borderTopWidth, 10), O = parseInt(V.paddingTop, 10), _ = parseInt(V.borderBottomWidth, 10), x = parseInt(V.paddingBottom, 10), F = Q + O + G + x + _, K = Math.min(g.offsetHeight * 5, F), le = window.getComputedStyle(p), q = parseInt(le.paddingTop, 10), Z = parseInt(le.paddingBottom, 10), ie = S.top + S.height / 2 - Ee, ge = Y - ie, ve = g.offsetHeight / 2, R = g.offsetTop + ve, oe = Q + O + R, ce = F - oe;
11135
+ const W = h(), Y = window.innerHeight - Ee * 2, G = p.scrollHeight, V = window.getComputedStyle(d), Q = parseInt(V.borderTopWidth, 10), O = parseInt(V.paddingTop, 10), M = parseInt(V.borderBottomWidth, 10), x = parseInt(V.paddingBottom, 10), F = Q + O + G + x + M, K = Math.min(g.offsetHeight * 5, F), le = window.getComputedStyle(p), q = parseInt(le.paddingTop, 10), Z = parseInt(le.paddingBottom, 10), ie = A.top + A.height / 2 - Ee, ge = Y - ie, ve = g.offsetHeight / 2, R = g.offsetTop + ve, oe = Q + O + R, ce = F - oe;
11136
11136
  if (oe <= ie) {
11137
11137
  const ee = W.length > 0 && g === W[W.length - 1].ref.current;
11138
11138
  s.style.bottom = "0px";
11139
11139
  const ae = d.clientHeight - p.offsetTop - p.offsetHeight, xe = Math.max(
11140
11140
  ge,
11141
11141
  ve + // viewport might have padding bottom, include it to avoid a scrollable viewport
11142
- (ee ? Z : 0) + ae + _
11142
+ (ee ? Z : 0) + ae + M
11143
11143
  ), J = oe + xe;
11144
11144
  s.style.height = J + "px";
11145
11145
  } else {
@@ -11167,13 +11167,13 @@ var i0 = "SelectItemAlignedPosition", gl = m.forwardRef((e, t) => {
11167
11167
  r
11168
11168
  ]);
11169
11169
  pe(() => C(), [C]);
11170
- const [N, A] = m.useState();
11170
+ const [S, N] = m.useState();
11171
11171
  pe(() => {
11172
- d && A(window.getComputedStyle(d).zIndex);
11172
+ d && N(window.getComputedStyle(d).zIndex);
11173
11173
  }, [d]);
11174
- const M = m.useCallback(
11175
- (S) => {
11176
- S && b.current === !0 && (C(), y?.(), b.current = !1);
11174
+ const _ = m.useCallback(
11175
+ (A) => {
11176
+ A && b.current === !0 && (C(), y?.(), b.current = !1);
11177
11177
  },
11178
11178
  [C, y]
11179
11179
  );
@@ -11183,7 +11183,7 @@ var i0 = "SelectItemAlignedPosition", gl = m.forwardRef((e, t) => {
11183
11183
  scope: n,
11184
11184
  contentWrapper: s,
11185
11185
  shouldExpandOnScrollRef: v,
11186
- onScrollButtonChange: M,
11186
+ onScrollButtonChange: _,
11187
11187
  children: /* @__PURE__ */ l(
11188
11188
  "div",
11189
11189
  {
@@ -11192,7 +11192,7 @@ var i0 = "SelectItemAlignedPosition", gl = m.forwardRef((e, t) => {
11192
11192
  display: "flex",
11193
11193
  flexDirection: "column",
11194
11194
  position: "fixed",
11195
- zIndex: N
11195
+ zIndex: S
11196
11196
  },
11197
11197
  children: /* @__PURE__ */ l(
11198
11198
  j.div,
@@ -11284,8 +11284,8 @@ var [l0, zo] = $t(gt, {}), zr = "SelectViewport", vl = m.forwardRef(
11284
11284
  if (v > 0) {
11285
11285
  const b = window.innerHeight - Ee * 2, p = parseFloat(f.style.minHeight), g = parseFloat(f.style.height), w = Math.max(p, g);
11286
11286
  if (w < b) {
11287
- const y = w + v, C = Math.min(b, y), N = y - C;
11288
- f.style.height = C + "px", f.style.bottom === "0px" && (u.scrollTop = N > 0 ? N : 0, f.style.justifyContent = "flex-end");
11287
+ const y = w + v, C = Math.min(b, y), S = y - C;
11288
+ f.style.height = C + "px", f.style.bottom === "0px" && (u.scrollTop = S > 0 ? S : 0, f.style.justifyContent = "flex-end");
11289
11289
  }
11290
11290
  }
11291
11291
  }
@@ -11837,32 +11837,41 @@ function py({
11837
11837
  disabled: o = !1,
11838
11838
  addOnBlur: a = !1,
11839
11839
  inputAriaLabel: i = "목표 입력",
11840
- className: s,
11841
- ...c
11840
+ maxGoals: s,
11841
+ className: c,
11842
+ ...d
11842
11843
  }) {
11843
- const d = e !== void 0, [u, f] = I.useState(t), [h, v] = I.useState(""), b = I.useRef(!1), p = d ? e : u, g = (C) => {
11844
- d || f(C), n?.(C);
11845
- }, w = () => {
11844
+ const u = e !== void 0, [f, h] = I.useState(t), [v, b] = I.useState(""), p = I.useRef(!1), g = u ? e : f, w = s !== void 0 && g.length >= s, y = (N) => {
11845
+ u || h(N), n?.(N);
11846
+ }, C = () => {
11846
11847
  if (o) return;
11847
- const C = h.trim();
11848
- C && (g([...p, C]), v(""));
11849
- }, y = (C) => {
11850
- o || g(p.filter((N, A) => A !== C));
11848
+ const N = v.trim();
11849
+ N && (y([...g, N]), b(""));
11850
+ }, S = (N) => {
11851
+ o || y(g.filter((_, A) => A !== N));
11851
11852
  };
11852
- return /* @__PURE__ */ P("div", { className: E("flex w-full flex-col gap-2", s), ...c, children: [
11853
- p.map((C, N) => /* @__PURE__ */ P(
11853
+ return /* @__PURE__ */ P("div", { className: E("flex w-full flex-col gap-2", c), ...d, children: [
11854
+ g.map((N, _) => /* @__PURE__ */ P(
11854
11855
  "div",
11855
11856
  {
11856
11857
  className: "flex h-10 w-full items-center justify-between rounded-3 border border-gray-300 bg-white px-5",
11857
11858
  children: [
11858
- /* @__PURE__ */ l(L, { size: "body2", weight: "regular", className: "line-clamp-1 text-gray-900", children: C }),
11859
+ /* @__PURE__ */ l(
11860
+ L,
11861
+ {
11862
+ size: "body2",
11863
+ weight: "regular",
11864
+ className: "line-clamp-1 text-gray-900",
11865
+ children: N
11866
+ }
11867
+ ),
11859
11868
  /* @__PURE__ */ l(
11860
11869
  "button",
11861
11870
  {
11862
11871
  type: "button",
11863
- "aria-label": `목표 삭제: ${C}`,
11872
+ "aria-label": `목표 삭제: ${N}`,
11864
11873
  disabled: o,
11865
- onClick: () => y(N),
11874
+ onClick: () => S(_),
11866
11875
  className: E(
11867
11876
  "inline-flex h-6 w-6 shrink-0 items-center justify-center rounded-2 text-gray-500 transition-colors hover:cursor-pointer",
11868
11877
  !o && "hover:bg-gray-100 hover:text-gray-700",
@@ -11873,27 +11882,27 @@ function py({
11873
11882
  )
11874
11883
  ]
11875
11884
  },
11876
- `${C}-${N}`
11885
+ `${N}-${_}`
11877
11886
  )),
11878
11887
  /* @__PURE__ */ l(
11879
11888
  Bo,
11880
11889
  {
11881
- value: h,
11882
- disabled: o,
11890
+ value: v,
11891
+ disabled: o || w,
11883
11892
  "aria-label": i,
11884
- placeholder: r,
11885
- onChange: (C) => v(C.target.value),
11893
+ placeholder: w ? `최대 ${s}개까지 입력할 수 있습니다` : r,
11894
+ onChange: (N) => b(N.target.value),
11886
11895
  onCompositionStart: () => {
11887
- b.current = !0;
11896
+ p.current = !0;
11888
11897
  },
11889
11898
  onCompositionEnd: () => {
11890
- b.current = !1;
11899
+ p.current = !1;
11891
11900
  },
11892
- onKeyDown: (C) => {
11893
- C.key === "Enter" && (C.nativeEvent.isComposing || b.current || C.nativeEvent.keyCode === 229 || (C.preventDefault(), w()));
11901
+ onKeyDown: (N) => {
11902
+ N.key === "Enter" && (N.nativeEvent.isComposing || p.current || N.nativeEvent.keyCode === 229 || (N.preventDefault(), C()));
11894
11903
  },
11895
11904
  onBlur: () => {
11896
- a && w();
11905
+ a && C();
11897
11906
  }
11898
11907
  }
11899
11908
  )
@@ -12021,23 +12030,23 @@ function by({
12021
12030
  }) {
12022
12031
  const c = _t(null), [d, u] = me(!1), [f, h] = me(null), v = !!e && f !== e, b = !!e, p = () => {
12023
12032
  c.current?.click();
12024
- }, g = (S) => {
12025
- !S || !S.type.startsWith("image/") || (h(null), t(S));
12026
- }, w = (S) => {
12027
- const k = S.target.files?.[0] ?? null;
12028
- g(k), S.target.value = "";
12029
- }, y = (S) => {
12030
- S.preventDefault(), u(!0);
12031
- }, C = (S) => {
12032
- S.preventDefault(), d || u(!0);
12033
- }, N = (S) => {
12034
- S.preventDefault(), u(!1);
12035
- }, A = (S) => {
12036
- S.preventDefault(), u(!1);
12037
- const k = S.dataTransfer.files?.[0] ?? null;
12033
+ }, g = (A) => {
12034
+ !A || !A.type.startsWith("image/") || (h(null), t(A));
12035
+ }, w = (A) => {
12036
+ const k = A.target.files?.[0] ?? null;
12037
+ g(k), A.target.value = "";
12038
+ }, y = (A) => {
12039
+ A.preventDefault(), u(!0);
12040
+ }, C = (A) => {
12041
+ A.preventDefault(), d || u(!0);
12042
+ }, S = (A) => {
12043
+ A.preventDefault(), u(!1);
12044
+ }, N = (A) => {
12045
+ A.preventDefault(), u(!1);
12046
+ const k = A.dataTransfer.files?.[0] ?? null;
12038
12047
  g(k);
12039
- }, M = (S) => {
12040
- (S.key === "Enter" || S.key === " ") && (S.preventDefault(), p());
12048
+ }, _ = (A) => {
12049
+ (A.key === "Enter" || A.key === " ") && (A.preventDefault(), p());
12041
12050
  };
12042
12051
  return /* @__PURE__ */ P(
12043
12052
  "div",
@@ -12058,11 +12067,11 @@ function by({
12058
12067
  d ? "border-main-700 ring-3 ring-main-300" : "border-gray-200 hover:border-gray-300"
12059
12068
  ),
12060
12069
  onClick: p,
12061
- onKeyDown: M,
12070
+ onKeyDown: _,
12062
12071
  onDragEnter: y,
12063
12072
  onDragOver: C,
12064
- onDragLeave: N,
12065
- onDrop: A,
12073
+ onDragLeave: S,
12074
+ onDrop: N,
12066
12075
  children: [
12067
12076
  v ? /* @__PURE__ */ l(
12068
12077
  "img",
@@ -12585,16 +12594,16 @@ function My({
12585
12594
  joinChallengeButtonLabel: w = "챌린지 참여하기",
12586
12595
  joinChallengeMaxUserCount: y,
12587
12596
  createChallengeButtonLabel: C = "챌린지 생성하기",
12588
- onCollapseClick: N,
12589
- onOpenSettings: A,
12590
- onWriteDiary: M,
12591
- onGoMyPage: S,
12597
+ onCollapseClick: S,
12598
+ onOpenSettings: N,
12599
+ onWriteDiary: _,
12600
+ onGoMyPage: A,
12592
12601
  onLogin: k,
12593
12602
  onJoinChallenge: z,
12594
12603
  onCreateChallenge: H,
12595
12604
  onChallengeClick: W
12596
12605
  }) {
12597
- const [O, _] = me(!1), [x, F] = me(
12606
+ const [O, M] = me(!1), [x, F] = me(
12598
12607
  "expanded"
12599
12608
  ), [K, le] = me(!0), [q, Z] = me(!1), [ie, ge] = me(null), ve = _t(null), R = _t([]), oe = typeof y == "number" && y <= 0, ce = () => {
12600
12609
  R.current.forEach((J) => clearTimeout(J)), R.current = [];
@@ -12622,8 +12631,8 @@ function My({
12622
12631
  }, xe = () => {
12623
12632
  if (q) return;
12624
12633
  const J = !O, be = ve.current?.offsetHeight;
12625
- be && be > 0 && ge(be), Z(!0), le(!1), N?.(), ce(), X(() => {
12626
- _(J), F(J ? "collapsed" : "expanded");
12634
+ be && be > 0 && ge(be), Z(!0), le(!1), S?.(), ce(), X(() => {
12635
+ M(J), F(J ? "collapsed" : "expanded");
12627
12636
  }, 140), X(() => {
12628
12637
  requestAnimationFrame(() => {
12629
12638
  requestAnimationFrame(() => {
@@ -12741,7 +12750,7 @@ function My({
12741
12750
  variant: "ghost",
12742
12751
  size: "icon",
12743
12752
  "aria-label": "설정",
12744
- onClick: A,
12753
+ onClick: N,
12745
12754
  className: "text-gray-500 hover:text-gray-700",
12746
12755
  children: /* @__PURE__ */ l(Mr, { className: "h-5 w-5" })
12747
12756
  }
@@ -12825,7 +12834,7 @@ function My({
12825
12834
  className: "mt-5 w-full",
12826
12835
  size: "medium",
12827
12836
  disabled: p.length === 0,
12828
- onClick: M,
12837
+ onClick: _,
12829
12838
  children: [
12830
12839
  /* @__PURE__ */ l(kn, { className: "h-4 w-4" }),
12831
12840
  /* @__PURE__ */ l(L, { size: "body2", weight: "bold", className: "text-inherit", children: d })
@@ -12838,7 +12847,7 @@ function My({
12838
12847
  variant: "outlined",
12839
12848
  className: "mt-3 w-full",
12840
12849
  size: "medium",
12841
- onClick: S,
12850
+ onClick: A,
12842
12851
  children: [
12843
12852
  /* @__PURE__ */ l(_r, { className: "h-4 w-4" }),
12844
12853
  /* @__PURE__ */ l(L, { size: "body2", weight: "bold", className: "text-inherit", children: u })
@@ -12954,7 +12963,7 @@ function My({
12954
12963
  type: "button",
12955
12964
  size: "icon",
12956
12965
  "aria-label": d,
12957
- onClick: M,
12966
+ onClick: _,
12958
12967
  children: /* @__PURE__ */ l(kn, { className: "h-4 w-4" })
12959
12968
  }
12960
12969
  ),
@@ -12965,7 +12974,7 @@ function My({
12965
12974
  variant: "outlined",
12966
12975
  size: "icon",
12967
12976
  "aria-label": u,
12968
- onClick: S,
12977
+ onClick: A,
12969
12978
  children: /* @__PURE__ */ l(_r, { className: "h-4 w-4" })
12970
12979
  }
12971
12980
  ),
@@ -12976,7 +12985,7 @@ function My({
12976
12985
  variant: "outlined",
12977
12986
  size: "icon",
12978
12987
  "aria-label": v,
12979
- onClick: A,
12988
+ onClick: N,
12980
12989
  children: /* @__PURE__ */ l(Mr, { className: "h-4 w-4" })
12981
12990
  }
12982
12991
  )
@@ -13436,7 +13445,7 @@ var tb = m.forwardRef((e, t) => {
13436
13445
  defaultProp: s ?? null,
13437
13446
  onChange: c,
13438
13447
  caller: ln
13439
- }), [w, y] = m.useState(!1), C = rt(d), N = Fl(n), A = m.useRef(!1), [M, S] = m.useState(0);
13448
+ }), [w, y] = m.useState(!1), C = rt(d), S = Fl(n), N = m.useRef(!1), [_, A] = m.useState(0);
13440
13449
  return m.useEffect(() => {
13441
13450
  const k = h.current;
13442
13451
  if (k)
@@ -13455,36 +13464,36 @@ var tb = m.forwardRef((e, t) => {
13455
13464
  ),
13456
13465
  onItemShiftTab: m.useCallback(() => y(!0), []),
13457
13466
  onFocusableItemAdd: m.useCallback(
13458
- () => S((k) => k + 1),
13467
+ () => A((k) => k + 1),
13459
13468
  []
13460
13469
  ),
13461
13470
  onFocusableItemRemove: m.useCallback(
13462
- () => S((k) => k - 1),
13471
+ () => A((k) => k - 1),
13463
13472
  []
13464
13473
  ),
13465
13474
  children: /* @__PURE__ */ l(
13466
13475
  j.div,
13467
13476
  {
13468
- tabIndex: w || M === 0 ? -1 : 0,
13477
+ tabIndex: w || _ === 0 ? -1 : 0,
13469
13478
  "data-orientation": r,
13470
13479
  ...f,
13471
13480
  ref: v,
13472
13481
  style: { outline: "none", ...e.style },
13473
13482
  onMouseDown: $(e.onMouseDown, () => {
13474
- A.current = !0;
13483
+ N.current = !0;
13475
13484
  }),
13476
13485
  onFocus: $(e.onFocus, (k) => {
13477
- const z = !A.current;
13486
+ const z = !N.current;
13478
13487
  if (k.target === k.currentTarget && z && !w) {
13479
13488
  const H = new CustomEvent(Sr, X0);
13480
13489
  if (k.currentTarget.dispatchEvent(H), !H.defaultPrevented) {
13481
- const W = N().filter((O) => O.focusable), Y = W.find((O) => O.active), G = W.find((O) => O.id === p), Q = [Y, G, ...W].filter(
13490
+ const W = S().filter((O) => O.focusable), Y = W.find((O) => O.active), G = W.find((O) => O.id === p), Q = [Y, G, ...W].filter(
13482
13491
  Boolean
13483
13492
  ).map((O) => O.ref.current);
13484
13493
  Hl(Q, u);
13485
13494
  }
13486
13495
  }
13487
- A.current = !1;
13496
+ N.current = !1;
13488
13497
  }),
13489
13498
  onBlur: $(e.onBlur, () => y(!1))
13490
13499
  }
@@ -13532,12 +13541,12 @@ var tb = m.forwardRef((e, t) => {
13532
13541
  if (w !== void 0) {
13533
13542
  if (g.metaKey || g.ctrlKey || g.altKey || g.shiftKey) return;
13534
13543
  g.preventDefault();
13535
- let C = h().filter((N) => N.focusable).map((N) => N.ref.current);
13544
+ let C = h().filter((S) => S.focusable).map((S) => S.ref.current);
13536
13545
  if (w === "last") C.reverse();
13537
13546
  else if (w === "prev" || w === "next") {
13538
13547
  w === "prev" && C.reverse();
13539
- const N = C.indexOf(g.currentTarget);
13540
- C = u.loop ? ab(C, N + 1) : C.slice(N + 1);
13548
+ const S = C.indexOf(g.currentTarget);
13549
+ C = u.loop ? ab(C, S + 1) : C.slice(S + 1);
13541
13550
  }
13542
13551
  setTimeout(() => Hl(C));
13543
13552
  }
@@ -13806,15 +13815,15 @@ var Xt = "Tooltip", [vb, cn] = ar(Xt), ql = (e) => {
13806
13815
  } = e, c = Vo(Xt, e.__scopeTooltip), d = ir(t), [u, f] = m.useState(null), h = _e(), v = m.useRef(0), b = i ?? c.disableHoverableContent, p = s ?? c.delayDuration, g = m.useRef(!1), [w, y] = ke({
13807
13816
  prop: r,
13808
13817
  defaultProp: o ?? !1,
13809
- onChange: (S) => {
13810
- S ? (c.onOpen(), document.dispatchEvent(new CustomEvent(jr))) : c.onClose(), a?.(S);
13818
+ onChange: (A) => {
13819
+ A ? (c.onOpen(), document.dispatchEvent(new CustomEvent(jr))) : c.onClose(), a?.(A);
13811
13820
  },
13812
13821
  caller: Xt
13813
- }), C = m.useMemo(() => w ? g.current ? "delayed-open" : "instant-open" : "closed", [w]), N = m.useCallback(() => {
13822
+ }), C = m.useMemo(() => w ? g.current ? "delayed-open" : "instant-open" : "closed", [w]), S = m.useCallback(() => {
13814
13823
  window.clearTimeout(v.current), v.current = 0, g.current = !1, y(!0);
13815
- }, [y]), A = m.useCallback(() => {
13824
+ }, [y]), N = m.useCallback(() => {
13816
13825
  window.clearTimeout(v.current), v.current = 0, y(!1);
13817
- }, [y]), M = m.useCallback(() => {
13826
+ }, [y]), _ = m.useCallback(() => {
13818
13827
  window.clearTimeout(v.current), v.current = window.setTimeout(() => {
13819
13828
  g.current = !0, y(!0), v.current = 0;
13820
13829
  }, p);
@@ -13831,13 +13840,13 @@ var Xt = "Tooltip", [vb, cn] = ar(Xt), ql = (e) => {
13831
13840
  trigger: u,
13832
13841
  onTriggerChange: f,
13833
13842
  onTriggerEnter: m.useCallback(() => {
13834
- c.isOpenDelayedRef.current ? M() : N();
13835
- }, [c.isOpenDelayedRef, M, N]),
13843
+ c.isOpenDelayedRef.current ? _() : S();
13844
+ }, [c.isOpenDelayedRef, _, S]),
13836
13845
  onTriggerLeave: m.useCallback(() => {
13837
- b ? A() : (window.clearTimeout(v.current), v.current = 0);
13838
- }, [A, b]),
13839
- onOpen: N,
13840
- onClose: A,
13846
+ b ? N() : (window.clearTimeout(v.current), v.current = 0);
13847
+ }, [N, b]),
13848
+ onOpen: S,
13849
+ onClose: N,
13841
13850
  disableHoverableContent: b,
13842
13851
  children: n
13843
13852
  }
@@ -13890,8 +13899,8 @@ var Ot = "TooltipContent", ec = m.forwardRef(
13890
13899
  s(null), f(!1);
13891
13900
  }, [f]), v = m.useCallback(
13892
13901
  (b, p) => {
13893
- const g = b.currentTarget, w = { x: b.clientX, y: b.clientY }, y = Ab(w, g.getBoundingClientRect()), C = kb(w, y), N = Pb(p.getBoundingClientRect()), A = _b([...C, ...N]);
13894
- s(A), f(!0);
13902
+ const g = b.currentTarget, w = { x: b.clientX, y: b.clientY }, y = Ab(w, g.getBoundingClientRect()), C = kb(w, y), S = Pb(p.getBoundingClientRect()), N = _b([...C, ...S]);
13903
+ s(N), f(!0);
13895
13904
  },
13896
13905
  [f]
13897
13906
  );