@mt-gloss/ui 0.0.27 → 0.0.29

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,9 +1,9 @@
1
1
  import { jsxs as d, jsx as e, Fragment as je } from "react/jsx-runtime";
2
- import q, { useId as Le, useState as O, useCallback as S, createContext as Ut, useContext as Xt, useRef as se, useEffect as oe, useMemo as ee, useSyncExternalStore as as, useReducer as ss, forwardRef as os, useImperativeHandle as is } from "react";
2
+ import q, { useId as Le, useState as O, useCallback as S, createContext as Yt, useContext as Ut, useRef as se, useEffect as oe, useMemo as ee, useSyncExternalStore as as, useReducer as ss, forwardRef as os, useImperativeHandle as is } from "react";
3
3
  import { S as J, E as Xe, C as B, h as ls, R as Se, k as cs, l as ds, m as us, aj as ms, P as ps, s as fs, ac as gs, ak as ve, Q as hs, V as qn, W as Zn, X as bs, Y as ys, _ as vs, $ as _s, a0 as xs, a1 as Ns, a4 as Ss, a5 as Cs, a6 as ws, ab as ks, a7 as Ds, a8 as Is, O as Ts, N as Es, i as Ms, j as Ps, a2 as Bs, a3 as Rs, n as zs, t as As, y as $s, v as Fs, U as bt, z as Os, A as Ls, w as Hs, D as Ws, x as Gs, ah as Vs, ai as js, F as Ks, G as Ys, H as Us, I as Xs, J as qs, K as Zs, L as Js, M as Qs, c as he, ad as Ht, e as Jn, d as kt, g as qe, Z as Qn, B as eo, af as to, b as ea, T as Ae, ae as ro, ag as _n } from "./UIContext-C3E-k7HI.js";
4
- import { formatTrend as no, isStatusModeEnabled as ao, formatValue as lr, getValueFontSize as xn, getDateRangeForPreset as Ve, formatDateRangeSmart as mt, isInRange as so, isSameDay as er, formatMarketDates as oo, DEFAULT_MARKET_PRESETS as tr, isMarketActive as xt, detectPreset as rr, getDateRangeDisplayInfo as $t, toUppercasePresetId as nr, generateMarketId as io, ROLLING_OPTIONS as Nr, PERIOD_OPTIONS as Sr } from "@mt-gloss/utils";
4
+ import { formatTrend as no, isStatusModeEnabled as ao, formatValue as ir, getValueFontSize as xn, getDateRangeForPreset as Ve, formatDateRangeSmart as mt, isInRange as so, isSameDay as Qt, formatMarketDates as oo, DEFAULT_MARKET_PRESETS as er, isMarketActive as xt, detectPreset as tr, getDateRangeDisplayInfo as $t, toUppercasePresetId as rr, generateMarketId as io, ROLLING_OPTIONS as Nr, PERIOD_OPTIONS as Sr } from "@mt-gloss/utils";
5
5
  import { useGridApiRef as lo, DataGridPro as co } from "@mui/x-data-grid-pro";
6
- import { Chip as Wt, Tooltip as ft, MenuItem as Gt, Menu as uo, Box as ae, Popper as mo, Paper as po, MenuList as fo, ListItemText as go, IconButton as Ue, Select as Nn, Typography as Ie, Divider as ho, Button as rt, Collapse as bo, Popover as yo, Dialog as vo, DialogTitle as _o, DialogContent as xo, TextField as ar, DialogActions as No, Tabs as So, Tab as Co } from "@mui/material";
6
+ import { Chip as Wt, Tooltip as ft, MenuItem as Gt, Menu as uo, Box as ae, Popper as mo, Paper as po, MenuList as fo, ListItemText as go, IconButton as Ue, Select as Nn, Typography as Ie, Divider as ho, Button as rt, Collapse as bo, Popover as yo, Dialog as vo, DialogTitle as _o, DialogContent as xo, TextField as nr, DialogActions as No, Tabs as So, Tab as Co } from "@mui/material";
7
7
  import wo from "@mui/icons-material/Person";
8
8
  import ko from "@mui/icons-material/Business";
9
9
  import Do from "@mui/icons-material/BarChart";
@@ -24,7 +24,7 @@ import Lo from "@mui/icons-material/LocalOffer";
24
24
  import Ho from "@mui/icons-material/AttachMoney";
25
25
  import ta from "@mui/icons-material/OpenInNew";
26
26
  import Sn from "@mui/icons-material/CalendarToday";
27
- import cr from "@mui/icons-material/ExpandMore";
27
+ import lr from "@mui/icons-material/ExpandMore";
28
28
  import Br from "@mui/icons-material/Place";
29
29
  import Ft from "@mui/icons-material/Add";
30
30
  import Dt from "@mui/icons-material/Check";
@@ -238,9 +238,9 @@ const Di = {
238
238
  }
239
239
  );
240
240
  it.displayName = "PresetCheckbox";
241
- const la = Ut(null);
241
+ const la = Yt(null);
242
242
  function Ei() {
243
- return Xt(la);
243
+ return Ut(la);
244
244
  }
245
245
  function Mi({
246
246
  value: r,
@@ -335,7 +335,7 @@ const Bi = {
335
335
  }, zi = {
336
336
  trackBg: B.BgSurface,
337
337
  dotColor: B.BrandPrimary
338
- }, ur = q.forwardRef(
338
+ }, dr = q.forwardRef(
339
339
  (r, t) => {
340
340
  const {
341
341
  variant: n = "default",
@@ -387,10 +387,10 @@ const Bi = {
387
387
  ] });
388
388
  }
389
389
  );
390
- ur.displayName = "PresetRadio";
391
- const ca = Ut(null);
390
+ dr.displayName = "PresetRadio";
391
+ const ca = Yt(null);
392
392
  function Ai() {
393
- return Xt(ca);
393
+ return Ut(ca);
394
394
  }
395
395
  function $i({
396
396
  value: r,
@@ -434,7 +434,7 @@ function $i({
434
434
  m && /* @__PURE__ */ e("span", { className: "gloss-radio-group__required", children: " *" })
435
435
  ] }),
436
436
  /* @__PURE__ */ e("div", { className: "gloss-radio-group__items", role: "radiogroup", "aria-required": m, children: a ? a.map((k) => /* @__PURE__ */ e(
437
- ur,
437
+ dr,
438
438
  {
439
439
  name: f,
440
440
  value: String(k.value),
@@ -456,7 +456,7 @@ const Fi = q.forwardRef(
456
456
  ({ value: r, ...t }, n) => {
457
457
  const a = Ai();
458
458
  return a ? /* @__PURE__ */ e(
459
- ur,
459
+ dr,
460
460
  {
461
461
  ref: n,
462
462
  name: a.groupProps.name,
@@ -468,7 +468,7 @@ const Fi = q.forwardRef(
468
468
  disabled: a.groupProps.disabled || t.disabled,
469
469
  ...t
470
470
  }
471
- ) : /* @__PURE__ */ e(ur, { ref: n, value: r, name: "", ...t });
471
+ ) : /* @__PURE__ */ e(dr, { ref: n, value: r, name: "", ...t });
472
472
  }
473
473
  );
474
474
  Fi.displayName = "GroupRadio";
@@ -1355,7 +1355,7 @@ const yl = [
1355
1355
  "#000000",
1356
1356
  "#6b7280",
1357
1357
  "#ffffff"
1358
- ], sr = (r) => {
1358
+ ], ar = (r) => {
1359
1359
  const t = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(r);
1360
1360
  return t ? { r: parseInt(t[1], 16), g: parseInt(t[2], 16), b: parseInt(t[3], 16) } : null;
1361
1361
  }, fa = (r, t, n) => `#${[r, t, n].map((a) => a.toString(16).padStart(2, "0")).join("")}`, vl = (r, t, n) => {
@@ -1396,19 +1396,19 @@ const yl = [
1396
1396
  helperText: p,
1397
1397
  id: f,
1398
1398
  name: y
1399
- } = r, b = Le(), _ = f || b, v = se(null), [h, C] = O(!1), [T, w] = O(s), k = a !== void 0, I = k ? a : T, g = sr(I) || { r: 59, g: 130, b: 246 }, E = S((L, P, H) => {
1399
+ } = r, b = Le(), _ = f || b, v = se(null), [h, C] = O(!1), [T, w] = O(s), k = a !== void 0, I = k ? a : T, g = ar(I) || { r: 59, g: 130, b: 246 }, E = S((L, P, H) => {
1400
1400
  const Y = Pn(L, P, H, o);
1401
1401
  k || w(Y), i?.(Y);
1402
1402
  }, [o, k, i]), x = S((L) => {
1403
- const P = sr(L);
1403
+ const P = ar(L);
1404
1404
  P && E(P.r, P.g, P.b);
1405
1405
  }, [E]), D = S((L) => {
1406
- const P = sr(L.target.value);
1406
+ const P = ar(L.target.value);
1407
1407
  P && E(P.r, P.g, P.b);
1408
1408
  }, [E]), N = S((L) => {
1409
1409
  const P = L.target.value;
1410
1410
  k || w(P);
1411
- const H = sr(P);
1411
+ const H = ar(P);
1412
1412
  H && i?.(Pn(H.r, H.g, H.b, o));
1413
1413
  }, [o, k, i]);
1414
1414
  oe(() => {
@@ -1986,7 +1986,7 @@ function It(r) {
1986
1986
  return /* @__PURE__ */ e(zs, { definition: m, className: p, children: l });
1987
1987
  }
1988
1988
  It.displayName = "PresetSelect";
1989
- const Ul = Ut("md"), Xl = {
1989
+ const Ul = Yt("md"), Xl = {
1990
1990
  elevated: {
1991
1991
  bg: B.BgSurface,
1992
1992
  border: "none",
@@ -2583,9 +2583,9 @@ function Cc({ children: r }) {
2583
2583
  return /* @__PURE__ */ e("div", { className: "gloss-preset-transition-group", children: r });
2584
2584
  }
2585
2585
  Cc.displayName = "TransitionGroup";
2586
- const va = Ut(null);
2586
+ const va = Yt(null);
2587
2587
  function wc() {
2588
- const r = Xt(va);
2588
+ const r = Ut(va);
2589
2589
  if (!r)
2590
2590
  throw new Error("useFormContext must be used within a Form component");
2591
2591
  return r;
@@ -2754,7 +2754,7 @@ const _a = q.memo(({
2754
2754
  );
2755
2755
  });
2756
2756
  _a.displayName = "FilterChip";
2757
- const dr = q.memo(({
2757
+ const cr = q.memo(({
2758
2758
  group: r,
2759
2759
  activeId: t,
2760
2760
  onSelect: n,
@@ -2865,7 +2865,7 @@ const dr = q.memo(({
2865
2865
  }
2866
2866
  );
2867
2867
  });
2868
- dr.displayName = "TabGroup";
2868
+ cr.displayName = "TabGroup";
2869
2869
  const Ic = (r) => {
2870
2870
  switch (r.variant) {
2871
2871
  case "block": {
@@ -3164,7 +3164,7 @@ const Rn = {
3164
3164
  );
3165
3165
  };
3166
3166
  Ar.displayName = "TrendIndicator";
3167
- const Kt = ({ data: r, color: t, isStale: n }) => {
3167
+ const fr = ({ data: r, color: t, isStale: n }) => {
3168
3168
  const s = "sparkbg-" + Le().replace(/:/g, ""), i = t || "#4f46e5", o = ee(() => {
3169
3169
  if (!r || r.length < 2) return null;
3170
3170
  const c = 300, l = 55, u = 2, m = Math.min(...r), f = Math.max(...r) - m || 1, b = r.map((v, h) => ({
@@ -3176,15 +3176,26 @@ const Kt = ({ data: r, color: t, isStale: n }) => {
3176
3176
  return o ? /* @__PURE__ */ d(
3177
3177
  "svg",
3178
3178
  {
3179
- width: "100%",
3180
3179
  height: 55,
3181
3180
  viewBox: `0 0 ${o.w} ${o.h}`,
3182
3181
  preserveAspectRatio: "none",
3183
3182
  style: {
3184
3183
  position: "absolute",
3185
- bottom: 0,
3186
- left: 0,
3187
- right: 0,
3184
+ // quick-260418-k7k-fix-2 (second post-mortem — chrome MCP DOM inspection):
3185
+ // Previous k7k-fix-1 set left:-12 / right:-12 INSIDE the SVG and left
3186
+ // the `width="100%"` presentation attribute in place. The attribute
3187
+ // maps to CSS `width: 100%`, which wins over the combined left/right
3188
+ // constraints: browser honors left, ignores right, so the SVG was
3189
+ // clipped at the containing-block's right padding edge — leaving
3190
+ // the 12–24px gap on the right that the user reported on 1×1 cards.
3191
+ // Fix: remove the width attribute so the SVG width is computed from
3192
+ // left + right + containingBlock = containingBlock + 24, reaching
3193
+ // both card edges. StackedGroupCard also moves SparklineBg out of
3194
+ // its overflow:hidden inner BaseBox so the bleed isn't clipped.
3195
+ bottom: -8,
3196
+ left: -12,
3197
+ right: -12,
3198
+ width: "auto",
3188
3199
  zIndex: 1,
3189
3200
  display: "block",
3190
3201
  pointerEvents: "none",
@@ -3214,7 +3225,7 @@ const Kt = ({ data: r, color: t, isStale: n }) => {
3214
3225
  }
3215
3226
  ) : null;
3216
3227
  };
3217
- Kt.displayName = "SparklineBg";
3228
+ fr.displayName = "SparklineBg";
3218
3229
  const xa = ({ data: r, color: t, isStale: n }) => {
3219
3230
  const a = t || "#4f46e5", s = ee(() => {
3220
3231
  if (!r || r.length < 1) return null;
@@ -3450,7 +3461,7 @@ function wa(r) {
3450
3461
  children: [
3451
3462
  /* @__PURE__ */ e("span", { className: "gloss-metric-card__label", children: l.label }),
3452
3463
  /* @__PURE__ */ e("span", { children: String(l.value) }),
3453
- m != null && m.length > 0 ? /* @__PURE__ */ e(Kt, { data: [...m], color: l.accentColor }) : null
3464
+ m != null && m.length > 0 ? /* @__PURE__ */ e(fr, { data: [...m], color: l.accentColor }) : null
3454
3465
  ]
3455
3466
  },
3456
3467
  l.id
@@ -3533,7 +3544,7 @@ const Ir = {
3533
3544
  colSpan: l = 1,
3534
3545
  isStale: u,
3535
3546
  thresholdBreach: m = "none"
3536
- } = t, p = n === "sparkline" || n === "bars" || n === "donut" ? t.accentColor ?? "#4f46e5" : "#4f46e5", f = n === "highlight" ? t.highlightColor : void 0, y = n === "sparkline" ? t.sparklineData : void 0, b = n === "bars" ? t.barData : void 0, _ = n === "donut" ? t.donutValue : 0, v = n === "donut" ? t.donutMax ?? 100 : 100, h = n === "object-arrow" ? t.objectArrowValue : 0, C = n === "object-arrow" ? t.objectArrowMax : 100, T = n === "arrow" ? t.arrowDirection : void 0, w = n === "versus" ? t.versusData : void 0, k = n === "segmented" ? t.segments : void 0, I = (f ? Bc[f] : void 0) || f, g = ee(() => lr(s, {
3547
+ } = t, p = n === "sparkline" || n === "bars" || n === "donut" ? t.accentColor ?? "#4f46e5" : "#4f46e5", f = n === "highlight" ? t.highlightColor : void 0, y = n === "sparkline" ? t.sparklineData : void 0, b = n === "bars" ? t.barData : void 0, _ = n === "donut" ? t.donutValue : 0, v = n === "donut" ? t.donutMax ?? 100 : 100, h = n === "object-arrow" ? t.objectArrowValue : 0, C = n === "object-arrow" ? t.objectArrowMax : 100, T = n === "arrow" ? t.arrowDirection : void 0, w = n === "versus" ? t.versusData : void 0, k = n === "segmented" ? t.segments : void 0, I = (f ? Bc[f] : void 0) || f, g = ee(() => ir(s, {
3537
3548
  prefix: i?.prefix || "",
3538
3549
  suffix: i?.suffix || "",
3539
3550
  abbreviated: i?.abbreviated
@@ -3583,11 +3594,11 @@ const Ir = {
3583
3594
  );
3584
3595
  }, H = () => {
3585
3596
  if (!w) return null;
3586
- const M = lr(w.current, {
3597
+ const M = ir(w.current, {
3587
3598
  prefix: i?.prefix || "",
3588
3599
  suffix: i?.suffix || "",
3589
3600
  abbreviated: i?.abbreviated
3590
- }), W = lr(w.prior, {
3601
+ }), W = ir(w.prior, {
3591
3602
  prefix: i?.prefix || "",
3592
3603
  suffix: i?.suffix || "",
3593
3604
  abbreviated: i?.abbreviated
@@ -3720,22 +3731,7 @@ const Ir = {
3720
3731
  }
3721
3732
  }
3722
3733
  ),
3723
- n === "sparkline" && /* @__PURE__ */ e(
3724
- "div",
3725
- {
3726
- "aria-hidden": "true",
3727
- style: {
3728
- position: "absolute",
3729
- top: -10,
3730
- left: -12,
3731
- bottom: -8,
3732
- right: -12,
3733
- zIndex: 1,
3734
- pointerEvents: "none"
3735
- },
3736
- children: /* @__PURE__ */ e(Kt, { data: y, color: p, isStale: u })
3737
- }
3738
- ),
3734
+ n === "sparkline" && /* @__PURE__ */ e(fr, { data: y, color: p, isStale: u }),
3739
3735
  n === "bars" && /* @__PURE__ */ e(xa, { data: b, color: p, isStale: u }),
3740
3736
  /* @__PURE__ */ e(
3741
3737
  he,
@@ -3953,12 +3949,12 @@ const Ke = {
3953
3949
  // UI-SPEC §Motion Prescription: prefers-reduced-motion target duration
3954
3950
  REDUCED_MOTION_MS: 10
3955
3951
  };
3956
- function Yt(r, t) {
3952
+ function Kt(r, t) {
3957
3953
  return (t ? Ke.REDUCED_MOTION_MS : r) / 1e3;
3958
3954
  }
3959
3955
  function Oc(r) {
3960
3956
  const t = {
3961
- duration: Yt(Ke.BORDER_RADIUS_MS, r),
3957
+ duration: Kt(Ke.BORDER_RADIUS_MS, r),
3962
3958
  ease: "easeOut"
3963
3959
  };
3964
3960
  return {
@@ -3979,7 +3975,7 @@ function Lc(r) {
3979
3975
  scaleY: 1,
3980
3976
  y: 0,
3981
3977
  transition: {
3982
- duration: Yt(Ke.MENU_OPEN_MS, r),
3978
+ duration: Kt(Ke.MENU_OPEN_MS, r),
3983
3979
  ease: "easeOut"
3984
3980
  }
3985
3981
  },
@@ -3987,7 +3983,7 @@ function Lc(r) {
3987
3983
  opacity: 0,
3988
3984
  scaleY: 0.9,
3989
3985
  transition: {
3990
- duration: Yt(Ke.MENU_CLOSE_MS, r),
3986
+ duration: Kt(Ke.MENU_CLOSE_MS, r),
3991
3987
  ease: "easeIn"
3992
3988
  }
3993
3989
  }
@@ -4000,7 +3996,7 @@ function Hc(r) {
4000
3996
  opacity: 1,
4001
3997
  scale: 1,
4002
3998
  transition: {
4003
- duration: Yt(Ke.ICON_INGRESS_MS, r),
3999
+ duration: Kt(Ke.ICON_INGRESS_MS, r),
4004
4000
  ease: "easeOut"
4005
4001
  }
4006
4002
  },
@@ -4008,7 +4004,7 @@ function Hc(r) {
4008
4004
  opacity: 0,
4009
4005
  scale: 0.9,
4010
4006
  transition: {
4011
- duration: Yt(Ke.ICON_EGRESS_MS, r),
4007
+ duration: Kt(Ke.ICON_EGRESS_MS, r),
4012
4008
  ease: "easeIn"
4013
4009
  }
4014
4010
  }
@@ -4117,6 +4113,14 @@ const ka = (r) => {
4117
4113
  ie || (V(!1), i(!1));
4118
4114
  },
4119
4115
  placement: M,
4116
+ // quick-260418-k7k-fix-2: strategy='fixed' positions the floating menu
4117
+ // against the viewport instead of the nearest positioned ancestor.
4118
+ // Each metric-card cell wrapper has position:relative (creating its
4119
+ // own stacking context), so the default 'absolute' strategy left the
4120
+ // menu trapped inside — sibling cells below always won z-index.
4121
+ // Fixed positioning escapes all ancestor stacking contexts WITHOUT
4122
+ // requiring a React Portal (AP-08 compliant).
4123
+ strategy: "fixed",
4120
4124
  middleware: [hi(6), bi(), yi({ padding: 8 })],
4121
4125
  whileElementsMounted: gi
4122
4126
  }), K = sa($, {
@@ -4877,7 +4881,7 @@ const sd = function(t) {
4877
4881
  },
4878
4882
  [x, g]
4879
4883
  ), N = !!y || !!v, R = !!b || !!v, z = se(null), { capacity: L } = Ca(z), P = f != null ? ad(f) : L, H = ee(() => o.map((M, W) => {
4880
- const j = i.find((K) => K.timeframe === M) || i[W], G = j?.value ?? null, $ = lr(G, { prefix: a, suffix: s, abbreviated: !0 });
4884
+ const j = i.find((K) => K.timeframe === M) || i[W], G = j?.value ?? null, $ = ir(G, { prefix: a, suffix: s, abbreviated: !0 });
4881
4885
  return {
4882
4886
  timeframe: M,
4883
4887
  formatted: $,
@@ -4887,135 +4891,118 @@ const sd = function(t) {
4887
4891
  () => H.slice(0, Math.min(H.length, P)),
4888
4892
  [H, P]
4889
4893
  ), V = c?.[C];
4890
- return /* @__PURE__ */ e(
4894
+ return /* @__PURE__ */ d(
4891
4895
  "div",
4892
4896
  {
4893
4897
  ref: z,
4894
4898
  "data-stacked-capacity": P,
4895
4899
  style: { position: "relative", width: "100%", height: "100%" },
4896
- children: /* @__PURE__ */ d(
4897
- he,
4898
- {
4899
- definition: { display: "flex", direction: "column" },
4900
- style: { position: "relative", width: "100%", height: "100%", overflow: "hidden" },
4901
- children: [
4902
- /* @__PURE__ */ e("div", { style: {
4903
- fontSize: 10.5,
4904
- fontWeight: 600,
4905
- textTransform: "uppercase",
4906
- letterSpacing: "0.04em",
4907
- color: "#6B7280",
4908
- lineHeight: "14px",
4909
- marginBottom: 4,
4910
- whiteSpace: "nowrap",
4911
- overflow: "hidden",
4912
- textOverflow: "ellipsis",
4913
- position: "relative",
4914
- zIndex: 2
4915
- }, children: n }),
4916
- /* @__PURE__ */ e(
4917
- kt,
4918
- {
4919
- definition: { direction: "horizontal", gap: "0px", align: "stretch" },
4920
- className: T,
4921
- style: { flex: 1, minHeight: 0, position: "relative", zIndex: 2 },
4922
- children: Y.map((M, W) => {
4923
- const j = M.timeframe === C;
4924
- return /* @__PURE__ */ d(
4925
- he,
4926
- {
4927
- definition: { display: "flex", direction: "column", align: "center", justify: "center" },
4928
- "data-slot-idx": W,
4929
- onPointerEnter: N ? () => D(W, M.timeframe) : void 0,
4930
- onPointerLeave: R ? E : void 0,
4931
- style: {
4932
- flex: 1,
4933
- minWidth: 0,
4934
- borderRight: W < Y.length - 1 ? "1px solid rgba(0,0,0,0.06)" : "none",
4935
- padding: "0 4px"
4900
+ children: [
4901
+ V && V.length >= 2 && /* @__PURE__ */ e(fr, { data: V, color: l, isStale: p }),
4902
+ /* @__PURE__ */ d(
4903
+ he,
4904
+ {
4905
+ definition: { display: "flex", direction: "column" },
4906
+ style: { position: "relative", width: "100%", height: "100%", overflow: "hidden" },
4907
+ children: [
4908
+ /* @__PURE__ */ e("div", { style: {
4909
+ fontSize: 10.5,
4910
+ fontWeight: 600,
4911
+ textTransform: "uppercase",
4912
+ letterSpacing: "0.04em",
4913
+ color: "#6B7280",
4914
+ lineHeight: "14px",
4915
+ marginBottom: 4,
4916
+ whiteSpace: "nowrap",
4917
+ overflow: "hidden",
4918
+ textOverflow: "ellipsis",
4919
+ position: "relative",
4920
+ zIndex: 2
4921
+ }, children: n }),
4922
+ /* @__PURE__ */ e(
4923
+ kt,
4924
+ {
4925
+ definition: { direction: "horizontal", gap: "0px", align: "stretch" },
4926
+ className: T,
4927
+ style: { flex: 1, minHeight: 0, position: "relative", zIndex: 2 },
4928
+ children: Y.map((M, W) => {
4929
+ const j = M.timeframe === C;
4930
+ return /* @__PURE__ */ d(
4931
+ he,
4932
+ {
4933
+ definition: { display: "flex", direction: "column", align: "center", justify: "center" },
4934
+ "data-slot-idx": W,
4935
+ onPointerEnter: N ? () => D(W, M.timeframe) : void 0,
4936
+ onPointerLeave: R ? E : void 0,
4937
+ style: {
4938
+ flex: 1,
4939
+ minWidth: 0,
4940
+ borderRight: W < Y.length - 1 ? "1px solid rgba(0,0,0,0.06)" : "none",
4941
+ padding: "0 4px"
4942
+ },
4943
+ children: [
4944
+ /* @__PURE__ */ e(
4945
+ "span",
4946
+ {
4947
+ onClick: m ? (G) => {
4948
+ G.stopPropagation(), m(M.timeframe);
4949
+ } : void 0,
4950
+ style: {
4951
+ fontSize: 9,
4952
+ fontWeight: 600,
4953
+ textTransform: "uppercase",
4954
+ letterSpacing: "0.04em",
4955
+ color: j ? l : "#9CA3AF",
4956
+ lineHeight: 1,
4957
+ marginBottom: 6,
4958
+ cursor: m ? "pointer" : "default",
4959
+ transition: "color 150ms ease"
4960
+ },
4961
+ children: M.timeframe
4962
+ }
4963
+ ),
4964
+ /* @__PURE__ */ e(
4965
+ "span",
4966
+ {
4967
+ title: M.formatted.full,
4968
+ style: {
4969
+ fontSize: od(M.formatted.length),
4970
+ fontWeight: 700,
4971
+ color: "var(--color-text-primary, #111827)",
4972
+ lineHeight: 1.1,
4973
+ whiteSpace: "nowrap",
4974
+ overflow: "hidden",
4975
+ textOverflow: "ellipsis",
4976
+ maxWidth: "100%",
4977
+ textAlign: "center"
4978
+ },
4979
+ children: M.formatted.display
4980
+ }
4981
+ ),
4982
+ M.trend && /* @__PURE__ */ d("span", { style: {
4983
+ display: "flex",
4984
+ alignItems: "center",
4985
+ gap: 2,
4986
+ marginTop: 4,
4987
+ fontSize: 9,
4988
+ fontWeight: 600,
4989
+ lineHeight: 1,
4990
+ color: M.trend.direction === "up" ? "var(--color-positive, #10b981)" : M.trend.direction === "down" ? "var(--color-negative, #ef4444)" : "var(--color-text-secondary, #6B7280)"
4991
+ }, children: [
4992
+ /* @__PURE__ */ e("span", { style: { fontSize: 8 }, children: M.trend.direction === "up" ? "▲" : M.trend.direction === "down" ? "▼" : "▶" }),
4993
+ typeof M.trend.value == "number" ? `${Math.abs(M.trend.value)}%` : ""
4994
+ ] })
4995
+ ]
4936
4996
  },
4937
- children: [
4938
- /* @__PURE__ */ e(
4939
- "span",
4940
- {
4941
- onClick: m ? (G) => {
4942
- G.stopPropagation(), m(M.timeframe);
4943
- } : void 0,
4944
- style: {
4945
- fontSize: 9,
4946
- fontWeight: 600,
4947
- textTransform: "uppercase",
4948
- letterSpacing: "0.04em",
4949
- color: j ? l : "#9CA3AF",
4950
- lineHeight: 1,
4951
- marginBottom: 6,
4952
- cursor: m ? "pointer" : "default",
4953
- transition: "color 150ms ease"
4954
- },
4955
- children: M.timeframe
4956
- }
4957
- ),
4958
- /* @__PURE__ */ e(
4959
- "span",
4960
- {
4961
- title: M.formatted.full,
4962
- style: {
4963
- fontSize: od(M.formatted.length),
4964
- fontWeight: 700,
4965
- color: "var(--color-text-primary, #111827)",
4966
- lineHeight: 1.1,
4967
- whiteSpace: "nowrap",
4968
- overflow: "hidden",
4969
- textOverflow: "ellipsis",
4970
- maxWidth: "100%",
4971
- textAlign: "center"
4972
- },
4973
- children: M.formatted.display
4974
- }
4975
- ),
4976
- M.trend && /* @__PURE__ */ d("span", { style: {
4977
- display: "flex",
4978
- alignItems: "center",
4979
- gap: 2,
4980
- marginTop: 4,
4981
- fontSize: 9,
4982
- fontWeight: 600,
4983
- lineHeight: 1,
4984
- color: M.trend.direction === "up" ? "var(--color-positive, #10b981)" : M.trend.direction === "down" ? "var(--color-negative, #ef4444)" : "var(--color-text-secondary, #6B7280)"
4985
- }, children: [
4986
- /* @__PURE__ */ e("span", { style: { fontSize: 8 }, children: M.trend.direction === "up" ? "▲" : M.trend.direction === "down" ? "▼" : "▶" }),
4987
- typeof M.trend.value == "number" ? `${Math.abs(M.trend.value)}%` : ""
4988
- ] })
4989
- ]
4990
- },
4991
- M.timeframe
4992
- );
4993
- })
4994
- }
4995
- ),
4996
- V && V.length >= 2 && (_ === "bleed" ? /* @__PURE__ */ e(
4997
- "div",
4998
- {
4999
- "aria-hidden": "true",
5000
- style: {
5001
- position: "absolute",
5002
- // These negative offsets match CardShell's default inner
5003
- // padding (10px 12px 8px per Phase 10.5 polish). If a consumer
5004
- // overrides CardShell padding, the visual may slightly offset —
5005
- // acceptable because the sparkline is a background affordance.
5006
- top: -10,
5007
- left: -12,
5008
- bottom: -8,
5009
- right: -12,
5010
- zIndex: 1,
5011
- pointerEvents: "none"
5012
- },
5013
- children: /* @__PURE__ */ e(Kt, { data: V, color: l, isStale: p })
5014
- }
5015
- ) : /* @__PURE__ */ e(Kt, { data: V, color: l, isStale: p }))
5016
- ]
5017
- }
5018
- )
4997
+ M.timeframe
4998
+ );
4999
+ })
5000
+ }
5001
+ )
5002
+ ]
5003
+ }
5004
+ )
5005
+ ]
5019
5006
  }
5020
5007
  );
5021
5008
  };
@@ -5104,7 +5091,7 @@ function ld(r) {
5104
5091
  setOpenSection: l
5105
5092
  };
5106
5093
  }
5107
- const gr = Ut(null);
5094
+ const gr = Yt(null);
5108
5095
  gr.displayName = "FlipAndStageContext";
5109
5096
  function Qm({ children: r }) {
5110
5097
  const t = ld(), n = ee(
@@ -5127,13 +5114,13 @@ function Qm({ children: r }) {
5127
5114
  return /* @__PURE__ */ e(gr.Provider, { value: n, children: r });
5128
5115
  }
5129
5116
  function ep() {
5130
- const r = Xt(gr);
5117
+ const r = Ut(gr);
5131
5118
  if (r === null)
5132
5119
  throw new Error("useFlipAndStageContext must be inside FlipAndStageProvider");
5133
5120
  return r;
5134
5121
  }
5135
5122
  function cd() {
5136
- return Xt(gr);
5123
+ return Ut(gr);
5137
5124
  }
5138
5125
  const dd = {
5139
5126
  /** Delay before flip animation begins (ms). */
@@ -5530,7 +5517,7 @@ const Ia = q.memo(({
5530
5517
  datePickerSlot: _
5531
5518
  }) => /* @__PURE__ */ d(kt, { definition: { direction: "horizontal", align: "center" }, className: "gloss-chart-control-bar__row-1", children: [
5532
5519
  /* @__PURE__ */ e(he, { style: { marginRight: 10 }, children: /* @__PURE__ */ e(
5533
- dr,
5520
+ cr,
5534
5521
  {
5535
5522
  group: t,
5536
5523
  activeId: r.metric,
@@ -5539,7 +5526,7 @@ const Ia = q.memo(({
5539
5526
  }
5540
5527
  ) }),
5541
5528
  /* @__PURE__ */ e(he, { style: { marginRight: 6 }, children: /* @__PURE__ */ e(
5542
- dr,
5529
+ cr,
5543
5530
  {
5544
5531
  group: n,
5545
5532
  activeId: r.entity,
@@ -5551,7 +5538,7 @@ const Ia = q.memo(({
5551
5538
  }
5552
5539
  ) }),
5553
5540
  b && /* @__PURE__ */ e(he, { children: /* @__PURE__ */ e(
5554
- dr,
5541
+ cr,
5555
5542
  {
5556
5543
  group: a,
5557
5544
  activeId: r.dimension,
@@ -5865,7 +5852,7 @@ const Cd = "left 0.35s cubic-bezier(0.4, 0, 0.2, 1), width 0.35s cubic-bezier(0.
5865
5852
  ) })
5866
5853
  ] }) }));
5867
5854
  Ta.displayName = "Row2FilterTray";
5868
- const or = "left 0.35s cubic-bezier(0.4, 0, 0.2, 1), width 0.35s cubic-bezier(0.4, 0, 0.2, 1)", wd = "0.35s cubic-bezier(0.16, 1, 0.3, 1)", kd = "0.25s cubic-bezier(0.4, 0, 1, 1)", Hr = q.memo(({
5855
+ const sr = "left 0.35s cubic-bezier(0.4, 0, 0.2, 1), width 0.35s cubic-bezier(0.4, 0, 0.2, 1)", wd = "0.35s cubic-bezier(0.16, 1, 0.3, 1)", kd = "0.25s cubic-bezier(0.4, 0, 1, 1)", Hr = q.memo(({
5869
5856
  pillLeft: r,
5870
5857
  pillWidth: t,
5871
5858
  pillTop: n,
@@ -5893,7 +5880,7 @@ const or = "left 0.35s cubic-bezier(0.4, 0, 0.2, 1), width 0.35s cubic-bezier(0.
5893
5880
  height: l ? o - n + 1 : a,
5894
5881
  background: "#fff",
5895
5882
  borderRadius: l ? "8px 8px 0 0" : "8px",
5896
- transition: `${or}, height ${l ? wd : kd}, border-radius 0.15s ease`
5883
+ transition: `${sr}, height ${l ? wd : kd}, border-radius 0.15s ease`
5897
5884
  } }),
5898
5885
  l && /* @__PURE__ */ e("div", { style: {
5899
5886
  position: "absolute",
@@ -5903,7 +5890,7 @@ const or = "left 0.35s cubic-bezier(0.4, 0, 0.2, 1), width 0.35s cubic-bezier(0.
5903
5890
  height: c,
5904
5891
  background: "#fff",
5905
5892
  borderRadius: `${y ? 8 : 0}px ${b ? 8 : 0}px 8px 8px`,
5906
- transition: or
5893
+ transition: sr
5907
5894
  } }),
5908
5895
  l && /* @__PURE__ */ e("div", { style: {
5909
5896
  position: "absolute",
@@ -5913,7 +5900,7 @@ const or = "left 0.35s cubic-bezier(0.4, 0, 0.2, 1), width 0.35s cubic-bezier(0.
5913
5900
  height: 8,
5914
5901
  background: "#fff",
5915
5902
  opacity: y ? 1 : 0,
5916
- transition: `${or}, opacity 0.15s ease`,
5903
+ transition: `${sr}, opacity 0.15s ease`,
5917
5904
  WebkitMaskImage: `radial-gradient(circle 8px at 0% 0%, transparent ${8 - 0.5}px, black ${8 + 0.5}px)`,
5918
5905
  maskImage: `radial-gradient(circle 8px at 0% 0%, transparent ${8 - 0.5}px, black ${8 + 0.5}px)`
5919
5906
  } }),
@@ -5925,7 +5912,7 @@ const or = "left 0.35s cubic-bezier(0.4, 0, 0.2, 1), width 0.35s cubic-bezier(0.
5925
5912
  height: 8,
5926
5913
  background: "#fff",
5927
5914
  opacity: b ? 1 : 0,
5928
- transition: `${or}, opacity 0.15s ease`,
5915
+ transition: `${sr}, opacity 0.15s ease`,
5929
5916
  WebkitMaskImage: `radial-gradient(circle 8px at 100% 0%, transparent ${8 - 0.5}px, black ${8 + 0.5}px)`,
5930
5917
  maskImage: `radial-gradient(circle 8px at 100% 0%, transparent ${8 - 0.5}px, black ${8 + 0.5}px)`
5931
5918
  } })
@@ -6807,7 +6794,7 @@ const Wr = ({
6807
6794
  label: y?.label,
6808
6795
  onClick: C,
6809
6796
  deleteIcon: /* @__PURE__ */ e(
6810
- cr,
6797
+ lr,
6811
6798
  {
6812
6799
  sx: {
6813
6800
  transform: m ? "rotate(180deg)" : "none",
@@ -7015,14 +7002,14 @@ const Ad = ["S", "M", "T", "W", "T", "F", "S"], Hn = {
7015
7002
  if (!r) return !1;
7016
7003
  const K = v || t;
7017
7004
  return K ? so($, r, K) : !1;
7018
- }, [r, t, v]), P = S(($) => !$ || !r ? !1 : er($, r), [r]), H = S(($) => {
7005
+ }, [r, t, v]), P = S(($) => !$ || !r ? !1 : Qt($, r), [r]), H = S(($) => {
7019
7006
  if (!$) return !1;
7020
7007
  const K = v || t;
7021
- return K ? er($, K) : !1;
7008
+ return K ? Qt($, K) : !1;
7022
7009
  }, [t, v]), Y = S(($) => {
7023
7010
  if (!$ || !r) return !1;
7024
7011
  const K = v || t;
7025
- return K ? er(r, K) && P($) : P($);
7012
+ return K ? Qt(r, K) && P($) : P($);
7026
7013
  }, [r, t, v, P]), V = S(($) => $ ? !!(p && $ > p) : !1, [p]), M = S(($) => {
7027
7014
  const K = new Date(T, w, $);
7028
7015
  b ? (C.current = !0, r && K < r ? n(K, r) : n(r, K), _(!1), h(null)) : (C.current = !0, n(K, null), _(!0));
@@ -7044,7 +7031,7 @@ const Ad = ["S", "M", "T", "W", "T", "F", "S"], Hn = {
7044
7031
  );
7045
7032
  const K = /* @__PURE__ */ new Date();
7046
7033
  for (let Z = 1; Z <= k; Z++) {
7047
- const U = new Date(T, w, Z), X = L(U), te = P(U), pe = H(U), ce = Y(U), be = V(U), de = R(U), ne = er(U, K), ge = ["mini-calendar__day"];
7034
+ const U = new Date(T, w, Z), X = L(U), te = P(U), pe = H(U), ce = Y(U), be = V(U), de = R(U), ne = Qt(U, K), ge = ["mini-calendar__day"];
7048
7035
  be ? (ge.push("mini-calendar__day--disabled"), pe ? ge.push("mini-calendar__day--disabled-end") : X && ge.push("mini-calendar__day--disabled-in-range"), de && ge.push("mini-calendar__day--market")) : (ce ? ge.push("mini-calendar__day--single") : te ? ge.push("mini-calendar__day--start") : pe ? ge.push("mini-calendar__day--end") : X && ge.push("mini-calendar__day--in-range"), (ce || te || pe || X) && (u === "secondary" ? ge.push("mini-calendar__day--secondary") : u === "tertiary" && ge.push("mini-calendar__day--tertiary")), ne && !te && !pe && !ce && ge.push("mini-calendar__day--today"), de && ge.push("mini-calendar__day--market"));
7049
7036
  const Me = /* @__PURE__ */ e(
7050
7037
  ae,
@@ -7327,14 +7314,14 @@ const Od = {
7327
7314
  }), [u]), C = se(null), [T, w] = O(null), [k, I] = O("calendar"), [g, E] = O(null), [x, D] = O(null), N = se(null), [R, z] = O(() => h.lastPreset || "mtd"), [L, P] = O(null), [H, Y] = O(null), [V, M] = O(null), [W, j] = O(null), [G, $] = O(null), [K, Z] = O(() => n ? _ ?? h.compareEnabled ?? !1 : !1), U = _ ?? K, X = S((A) => {
7328
7315
  Z(A), v?.(A);
7329
7316
  }, [v]), [te, pe] = O("A"), [ce, be] = O(() => h.lastPresetB ?? null), [de, ne] = O(null), [ge, Me] = O(null), [Ce, we] = O(null), [Ye, Te] = O(null), [me, _e] = O(null), [Ge, Ne] = O(null), [ie, xe] = O(null), [Fe, He] = O(null), [ke, Be] = O(null), [yt, Re] = O(null), [lt, Ze] = O(null), [Pe, vt] = O(1), [rn, ct] = O(!1), [Wa, Ga] = O(void 0), ze = V !== null ? V : R, Tt = V !== null ? W : L, dt = V !== null ? G : H, st = Ce !== null ? Ce : ce, Et = Ce !== null ? Ye : de, Mt = Ce !== null ? me : ge, ot = ke !== null ? ke : Ge, Pt = ke !== null ? yt : ie, Bt = ke !== null ? lt : Fe, nn = V !== null && (V !== R || W !== L || G !== H), [fe, hr] = O(() => {
7330
- const A = p || tr, F = f || [], Q = new Set(F.map((ue) => ue.id)), re = A.filter((ue) => !Q.has(ue.id)).map((ue) => ({ ...ue, active: xt(ue) })), le = F.map((ue) => ({
7317
+ const A = p || er, F = f || [], Q = new Set(F.map((ue) => ue.id)), re = A.filter((ue) => !Q.has(ue.id)).map((ue) => ({ ...ue, active: xt(ue) })), le = F.map((ue) => ({
7331
7318
  ...ue,
7332
7319
  active: xt(ue)
7333
7320
  }));
7334
7321
  return [...re, ...le].sort((ue, $e) => ue.startDate.getTime() - $e.startDate.getTime());
7335
7322
  });
7336
7323
  oe(() => {
7337
- const A = p || tr, F = f || [], Q = new Set(F.map((ue) => ue.id)), re = A.filter((ue) => !Q.has(ue.id)).map((ue) => ({ ...ue, active: xt(ue) })), le = F.map((ue) => ({
7324
+ const A = p || er, F = f || [], Q = new Set(F.map((ue) => ue.id)), re = A.filter((ue) => !Q.has(ue.id)).map((ue) => ({ ...ue, active: xt(ue) })), le = F.map((ue) => ({
7338
7325
  ...ue,
7339
7326
  active: xt(ue)
7340
7327
  }));
@@ -7352,8 +7339,8 @@ const Od = {
7352
7339
  return fe.forEach((re) => {
7353
7340
  re.startDate > A ? Q.push(re) : F.push(re);
7354
7341
  }), { pastAndCurrentEvents: F, futureEvents: Q };
7355
- }, [fe]), { defaultMarketEvents: an, customRanges: sn, futureDefaultEvents: Zt, futureCustomRanges: on } = ee(() => {
7356
- const A = p || tr, F = new Set(A.map((Q) => Q.id));
7342
+ }, [fe]), { defaultMarketEvents: an, customRanges: sn, futureDefaultEvents: qt, futureCustomRanges: on } = ee(() => {
7343
+ const A = p || er, F = new Set(A.map((Q) => Q.id));
7357
7344
  return {
7358
7345
  defaultMarketEvents: br.filter((Q) => !Q.isCustom && F.has(Q.id)),
7359
7346
  customRanges: br.filter((Q) => Q.isCustom || !F.has(Q.id)),
@@ -7392,7 +7379,7 @@ const Od = {
7392
7379
  $e.setHours(0, 0, 0, 0), F.getTime() === ue.getTime() && Q.getTime() === $e.getTime() && (re = h.lastPreset);
7393
7380
  }
7394
7381
  if (!re) {
7395
- const le = rr(et.start, et.end, A, fe);
7382
+ const le = tr(et.start, et.end, A, fe);
7396
7383
  re = le ? le.id : null;
7397
7384
  }
7398
7385
  re ? (z(re), P(null), Y(null)) : (z("custom"), P(et.start), Y(et.end)), M(null), j(null), $(null);
@@ -7488,8 +7475,8 @@ const Od = {
7488
7475
  M(R), j(L), $(H), U && (we(ce), Te(de), _e(ge), Pe >= 3 && (Be(Ge), Re(ie), Ze(Fe))), w(A.currentTarget);
7489
7476
  }, [R, L, H, U, Pe, ce, de, ge, Ge, ie, Fe]), dn = S((A, F, Q) => {
7490
7477
  const re = [A, F];
7491
- Q && (re.shortcutId = nr(Q)), t(re);
7492
- }, [t]), Jt = S((A, F, Q) => {
7478
+ Q && (re.shortcutId = rr(Q)), t(re);
7479
+ }, [t]), Zt = S((A, F, Q) => {
7493
7480
  if (A === "custom" && F && Q)
7494
7481
  return [F, Q];
7495
7482
  const re = fe.find(($e) => $e.id === A);
@@ -7499,22 +7486,22 @@ const Od = {
7499
7486
  return [le, ue];
7500
7487
  }, [fe]), tt = S((A) => {
7501
7488
  m && m({ ...h, ...A });
7502
- }, [m, h]), Qt = S(() => {
7489
+ }, [m, h]), Jt = S(() => {
7503
7490
  if (V === null) return;
7504
7491
  z(V), P(W), Y(G);
7505
- const A = Jt(V, W, G);
7492
+ const A = Zt(V, W, G);
7506
7493
  if (U && Pe >= 2 && Ce !== null) {
7507
7494
  be(Ce), ne(Ye), Me(me);
7508
- const F = Jt(Ce, Ye, me), Q = {
7495
+ const F = Zt(Ce, Ye, me), Q = {
7509
7496
  rangeA: A,
7510
7497
  rangeB: F,
7511
- shortcutId: nr(V),
7512
- shortcutIdB: nr(Ce)
7498
+ shortcutId: rr(V),
7499
+ shortcutIdB: rr(Ce)
7513
7500
  };
7514
7501
  if (Pe >= 3 && ke !== null) {
7515
7502
  Ne(ke), xe(yt), He(lt);
7516
- const re = Jt(ke, yt, lt);
7517
- Q.rangeC = re, Q.shortcutIdC = nr(ke), tt({
7503
+ const re = Zt(ke, yt, lt);
7504
+ Q.rangeC = re, Q.shortcutIdC = rr(ke), tt({
7518
7505
  lastPreset: V,
7519
7506
  compareEnabled: !0,
7520
7507
  rangeCount: Pe,
@@ -7538,9 +7525,9 @@ const Od = {
7538
7525
  lastPresetB: null,
7539
7526
  lastPresetC: null
7540
7527
  }), dn(A[0], A[1], V);
7541
- }, [V, W, G, U, Pe, Ce, Ye, me, ke, yt, lt, Jt, t, dn, tt]), Ua = S(() => {
7542
- o || (nn && Qt(), M(null), j(null), $(null), we(null), Te(null), _e(null), Be(null), Re(null), Ze(null), D(null), w(null));
7543
- }, [o, nn, Qt]), un = S(() => {
7528
+ }, [V, W, G, U, Pe, Ce, Ye, me, ke, yt, lt, Zt, t, dn, tt]), Ua = S(() => {
7529
+ o || (nn && Jt(), M(null), j(null), $(null), we(null), Te(null), _e(null), Be(null), Re(null), Ze(null), D(null), w(null));
7530
+ }, [o, nn, Jt]), un = S(() => {
7544
7531
  o || (M(null), j(null), $(null), we(null), Te(null), _e(null), Be(null), Re(null), Ze(null), D(null), w(null));
7545
7532
  }, [o]), mn = S(() => {
7546
7533
  if (Pe >= 3) return;
@@ -7570,20 +7557,20 @@ const Od = {
7570
7557
  if (U && te === "C")
7571
7558
  if (Re(A), F) {
7572
7559
  Ze(F);
7573
- const Q = rr(A, F, /* @__PURE__ */ new Date(), fe);
7560
+ const Q = tr(A, F, /* @__PURE__ */ new Date(), fe);
7574
7561
  Q ? (Be(Q.id), Re(null), Ze(null)) : Be("custom");
7575
7562
  } else
7576
7563
  Be("custom"), Ze(null);
7577
7564
  else if (U && te === "B")
7578
7565
  if (Te(A), F) {
7579
7566
  _e(F);
7580
- const Q = rr(A, F, /* @__PURE__ */ new Date(), fe);
7567
+ const Q = tr(A, F, /* @__PURE__ */ new Date(), fe);
7581
7568
  Q ? (we(Q.id), Te(null), _e(null)) : we("custom");
7582
7569
  } else
7583
7570
  we("custom"), _e(null);
7584
7571
  else if (j(A), F) {
7585
7572
  $(F);
7586
- const Q = rr(A, F, /* @__PURE__ */ new Date(), fe);
7573
+ const Q = tr(A, F, /* @__PURE__ */ new Date(), fe);
7587
7574
  Q ? (M(Q.id), j(null), $(null)) : M("custom");
7588
7575
  } else
7589
7576
  M("custom"), $(null);
@@ -7594,8 +7581,8 @@ const Od = {
7594
7581
  D(null);
7595
7582
  }, 150);
7596
7583
  }, []), hn = S(() => {
7597
- Qt(), M(null), j(null), $(null), w(null);
7598
- }, [Qt]), Za = S(() => {
7584
+ Jt(), M(null), j(null), $(null), w(null);
7585
+ }, [Jt]), Za = S(() => {
7599
7586
  let A;
7600
7587
  if (ze === "custom" && dt)
7601
7588
  A = dt;
@@ -7643,7 +7630,7 @@ const Od = {
7643
7630
  return;
7644
7631
  }
7645
7632
  g.isCustom && b?.(g.id);
7646
- const A = p || tr;
7633
+ const A = p || er;
7647
7634
  hr((F) => {
7648
7635
  const Q = F.filter((le) => le.id !== g.id), re = A.find((le) => le.id === g.id);
7649
7636
  return re && !g.isCustom ? [...Q, { ...re, active: xt(re) }].sort((le, ue) => le.startDate.getTime() - ue.startDate.getTime()) : Q;
@@ -7725,7 +7712,7 @@ const Od = {
7725
7712
  size: "small",
7726
7713
  startIcon: /* @__PURE__ */ e(Sn, { sx: { fontSize: 14, color: ut ? "white" : "rgba(79, 70, 229, 1)" } }),
7727
7714
  endIcon: /* @__PURE__ */ e(
7728
- cr,
7715
+ lr,
7729
7716
  {
7730
7717
  sx: {
7731
7718
  fontSize: 16,
@@ -7978,7 +7965,7 @@ const Od = {
7978
7965
  },
7979
7966
  F.id
7980
7967
  )),
7981
- Zt.length > 0 && /* @__PURE__ */ d(je, { children: [
7968
+ qt.length > 0 && /* @__PURE__ */ d(je, { children: [
7982
7969
  /* @__PURE__ */ e(
7983
7970
  rt,
7984
7971
  {
@@ -7986,7 +7973,7 @@ const Od = {
7986
7973
  size: "small",
7987
7974
  onClick: () => Va(!Rt),
7988
7975
  endIcon: /* @__PURE__ */ e(
7989
- cr,
7976
+ lr,
7990
7977
  {
7991
7978
  sx: {
7992
7979
  transform: Rt ? "rotate(180deg)" : "none",
@@ -8005,10 +7992,10 @@ const Od = {
8005
7992
  bgcolor: "action.hover"
8006
7993
  }
8007
7994
  },
8008
- children: Rt ? "Hide Upcoming Events" : `Show ${Zt.length} Upcoming Event${Zt.length > 1 ? "s" : ""}`
7995
+ children: Rt ? "Hide Upcoming Events" : `Show ${qt.length} Upcoming Event${qt.length > 1 ? "s" : ""}`
8009
7996
  }
8010
7997
  ),
8011
- Rt && Zt.map((F) => /* @__PURE__ */ e(
7998
+ Rt && qt.map((F) => /* @__PURE__ */ e(
8012
7999
  Ot,
8013
8000
  {
8014
8001
  preset: F,
@@ -8083,7 +8070,7 @@ const Od = {
8083
8070
  children: [
8084
8071
  /* @__PURE__ */ d(ae, { sx: { display: "flex", alignItems: "center", gap: 1 }, children: [
8085
8072
  /* @__PURE__ */ e(
8086
- cr,
8073
+ lr,
8087
8074
  {
8088
8075
  className: `hybrid-date-picker__footer-drawer-trigger-icon ${rn ? "hybrid-date-picker__footer-drawer-trigger-icon--expanded" : ""}`,
8089
8076
  sx: { fontSize: 18, color: "text.secondary" }
@@ -8380,7 +8367,7 @@ const Od = {
8380
8367
  /* @__PURE__ */ d(ae, { className: "market-edit-modal__field", children: [
8381
8368
  /* @__PURE__ */ e(Ie, { variant: "caption", fontWeight: 500, color: "text.secondary", component: "label", children: "Name" }),
8382
8369
  /* @__PURE__ */ e(
8383
- ar,
8370
+ nr,
8384
8371
  {
8385
8372
  fullWidth: !0,
8386
8373
  size: "small",
@@ -8395,7 +8382,7 @@ const Od = {
8395
8382
  /* @__PURE__ */ d(ae, { children: [
8396
8383
  /* @__PURE__ */ e(Ie, { variant: "caption", fontWeight: 500, color: "text.secondary", component: "label", children: "Start Date" }),
8397
8384
  /* @__PURE__ */ e(
8398
- ar,
8385
+ nr,
8399
8386
  {
8400
8387
  fullWidth: !0,
8401
8388
  size: "small",
@@ -8409,7 +8396,7 @@ const Od = {
8409
8396
  /* @__PURE__ */ d(ae, { children: [
8410
8397
  /* @__PURE__ */ e(Ie, { variant: "caption", fontWeight: 500, color: "text.secondary", component: "label", children: "End Date" }),
8411
8398
  /* @__PURE__ */ e(
8412
- ar,
8399
+ nr,
8413
8400
  {
8414
8401
  fullWidth: !0,
8415
8402
  size: "small",
@@ -8424,7 +8411,7 @@ const Od = {
8424
8411
  /* @__PURE__ */ d(ae, { className: "market-edit-modal__field", sx: { mt: 2 }, children: [
8425
8412
  /* @__PURE__ */ e(Ie, { variant: "caption", fontWeight: 500, color: "text.secondary", component: "label", children: "Location" }),
8426
8413
  /* @__PURE__ */ e(
8427
- ar,
8414
+ nr,
8428
8415
  {
8429
8416
  fullWidth: !0,
8430
8417
  size: "small",
@@ -8647,7 +8634,7 @@ const Mr = [
8647
8634
  a
8648
8635
  ] })
8649
8636
  ] }) });
8650
- }, ir = (r) => r && typeof r == "object" && "rangeA" in r, Hd = ({
8637
+ }, or = (r) => r && typeof r == "object" && "rangeA" in r, Hd = ({
8651
8638
  value: r,
8652
8639
  onChange: t,
8653
8640
  preferences: n,
@@ -8664,7 +8651,7 @@ const Mr = [
8664
8651
  activePresetId: y,
8665
8652
  onPresetChange: b
8666
8653
  }) => {
8667
- const _ = o !== void 0, [v, h] = O(!1), [C, T] = O(!1), [w, k] = O(i ?? !1), I = n?.pinnedPreset || "MTD", [g, E] = O(() => n?.lastPreset?.toUpperCase() || "MTD"), [x, D] = O(null), N = ee(() => ir(r) ? r.rangeA : r, [r]), R = ee(() => ir(r) ? r.rangeB : null, [r]), z = S((G) => {
8654
+ const _ = o !== void 0, [v, h] = O(!1), [C, T] = O(!1), [w, k] = O(i ?? !1), I = n?.pinnedPreset || "MTD", [g, E] = O(() => n?.lastPreset?.toUpperCase() || "MTD"), [x, D] = O(null), N = ee(() => or(r) ? r.rangeA : r, [r]), R = ee(() => or(r) ? r.rangeB : null, [r]), z = S((G) => {
8668
8655
  const $ = G || "MTD";
8669
8656
  a && n && a({ ...n, pinnedPreset: $.toLowerCase() });
8670
8657
  const K = Mr.find((Z) => Z.id === $ && !Z.disabled);
@@ -8679,7 +8666,7 @@ const Mr = [
8679
8666
  }
8680
8667
  }, [w, R, t, a, n]);
8681
8668
  oe(() => {
8682
- _ && k(ir(r));
8669
+ _ && k(or(r));
8683
8670
  }, [_, r]), oe(() => {
8684
8671
  i !== void 0 && k(i);
8685
8672
  }, [i]);
@@ -8792,7 +8779,7 @@ const Mr = [
8792
8779
  }
8793
8780
  }), [R, Y, M, x]);
8794
8781
  if (f === "simple-selector") {
8795
- const G = ir(r) ? r.rangeA : r;
8782
+ const G = or(r) ? r.rangeA : r;
8796
8783
  return /* @__PURE__ */ e(
8797
8784
  Ma,
8798
8785
  {
@@ -9808,7 +9795,7 @@ const lu = [
9808
9795
  if (!r) return "weak";
9809
9796
  const a = t.filter((s) => s.validate(r)).length / t.length;
9810
9797
  return a < 0.4 ? "weak" : a < 0.6 ? "fair" : a < 0.8 ? "good" : "strong";
9811
- }, mr = q.forwardRef(
9798
+ }, ur = q.forwardRef(
9812
9799
  ({
9813
9800
  showToggle: r = !0,
9814
9801
  showStrength: t = !1,
@@ -9945,7 +9932,7 @@ const lu = [
9945
9932
  ] });
9946
9933
  }
9947
9934
  );
9948
- mr.displayName = "PasswordInput";
9935
+ ur.displayName = "PasswordInput";
9949
9936
  const uu = q.forwardRef(
9950
9937
  ({
9951
9938
  value: r,
@@ -11567,7 +11554,7 @@ function op({
11567
11554
  )
11568
11555
  ] }),
11569
11556
  /* @__PURE__ */ e(
11570
- mr,
11557
+ ur,
11571
11558
  {
11572
11559
  showToggle: !0,
11573
11560
  placeholder: "Enter your password",
@@ -11914,7 +11901,7 @@ const zu = (r) => {
11914
11901
  a && (i *= 2, i > 9 && (i -= 9)), n += i, a = !a;
11915
11902
  }
11916
11903
  return n % 10 === 0;
11917
- }, pr = ye.object({
11904
+ }, mr = ye.object({
11918
11905
  cardNumber: ye.string().min(13, "Card number is too short").refine((r) => zu(r), "Invalid card number"),
11919
11906
  expiryDate: ye.string().regex(/^(0[1-9]|1[0-2])\s?\/\s?\d{2}$/, "Invalid expiry date (MM/YY)").refine((r) => {
11920
11907
  const [t, n] = r.split("/").map((i) => parseInt(i.trim(), 10)), a = /* @__PURE__ */ new Date();
@@ -12010,7 +11997,7 @@ function cp({
12010
11997
  cardholderName: m.cardholderName ?? ""
12011
11998
  }), [h, C] = O({}), [T, w] = O({}), k = ee(() => a ? `${n} ${a}` : n, [n, a]), I = S((N, R) => {
12012
11999
  try {
12013
- pr.shape[N].parse(R), C((L) => ({ ...L, [N]: void 0 }));
12000
+ mr.shape[N].parse(R), C((L) => ({ ...L, [N]: void 0 }));
12014
12001
  } catch (z) {
12015
12002
  z instanceof ye.ZodError && C((L) => ({ ...L, [N]: z.issues[0]?.message }));
12016
12003
  }
@@ -12030,7 +12017,7 @@ function cp({
12030
12017
  f(new FormData(N.currentTarget));
12031
12018
  return;
12032
12019
  }
12033
- const R = pr.safeParse(_);
12020
+ const R = mr.safeParse(_);
12034
12021
  if (!R.success) {
12035
12022
  const z = {};
12036
12023
  R.error.issues.forEach((L) => {
@@ -12355,7 +12342,7 @@ function up({
12355
12342
  /* @__PURE__ */ d("div", { className: "gloss-registration-form__field", children: [
12356
12343
  /* @__PURE__ */ e("label", { className: "gloss-registration-form__label", children: "Password" }),
12357
12344
  /* @__PURE__ */ e(
12358
- mr,
12345
+ ur,
12359
12346
  {
12360
12347
  showToggle: !0,
12361
12348
  showStrength: !0,
@@ -12375,7 +12362,7 @@ function up({
12375
12362
  /* @__PURE__ */ d("div", { className: "gloss-registration-form__field", children: [
12376
12363
  /* @__PURE__ */ e("label", { className: "gloss-registration-form__label", children: "Confirm Password" }),
12377
12364
  /* @__PURE__ */ e(
12378
- mr,
12365
+ ur,
12379
12366
  {
12380
12367
  showToggle: !0,
12381
12368
  placeholder: "Confirm your password",
@@ -12627,7 +12614,7 @@ function pp({
12627
12614
  }
12628
12615
  const Au = ye.object({
12629
12616
  paymentMethod: ye.enum(["credit_card", "debit_card", "bank_transfer"]),
12630
- card: pr.optional(),
12617
+ card: mr.optional(),
12631
12618
  billingAddress: Gr,
12632
12619
  savePaymentMethod: ye.boolean().optional()
12633
12620
  }).refine(
@@ -12699,7 +12686,7 @@ function gp({
12699
12686
  s.savePaymentMethod ?? !1
12700
12687
  ), [w, k] = O(), I = se(null), g = m === "credit_card" || m === "debit_card", E = S((z, L) => {
12701
12688
  try {
12702
- pr.shape[z].parse(L), _((H) => ({ ...H, [z]: void 0 }));
12689
+ mr.shape[z].parse(L), _((H) => ({ ...H, [z]: void 0 }));
12703
12690
  } catch (P) {
12704
12691
  P instanceof ye.ZodError && _((H) => ({ ...H, [z]: P.issues[0]?.message }));
12705
12692
  }
@@ -13356,13 +13343,13 @@ const Gu = q.forwardRef(({ title: r, collapsed: t = !1, onToggle: n, density: a
13356
13343
  );
13357
13344
  });
13358
13345
  Gu.displayName = "ContainerPanel";
13359
- function qt(...r) {
13346
+ function Xt(...r) {
13360
13347
  return (t) => {
13361
13348
  for (const n of r)
13362
13349
  typeof n == "function" ? n(t) : n && typeof n == "object" && (n.current = t);
13363
13350
  };
13364
13351
  }
13365
- function fr(r, t) {
13352
+ function pr(r, t) {
13366
13353
  if (!(!r && !t))
13367
13354
  return r ? t ? (n) => {
13368
13355
  r(n), t(n);
@@ -13376,12 +13363,12 @@ const Vu = q.forwardRef(
13376
13363
  t || r?.(u);
13377
13364
  }, l = i.props;
13378
13365
  return q.cloneElement(i, {
13379
- onClick: fr(l.onClick, c),
13380
- onKeyDown: fr(l.onKeyDown, o),
13366
+ onClick: pr(l.onClick, c),
13367
+ onKeyDown: pr(l.onKeyDown, o),
13381
13368
  tabIndex: l.tabIndex ?? (t ? -1 : 0),
13382
13369
  role: l.role ?? n,
13383
13370
  "aria-disabled": t || void 0,
13384
- ref: qt(s, i.ref)
13371
+ ref: Xt(s, i.ref)
13385
13372
  });
13386
13373
  }
13387
13374
  );
@@ -13393,8 +13380,8 @@ const ju = q.forwardRef(
13393
13380
  }, [n, t, r]), l = S((p) => {
13394
13381
  n || (p.key === "Enter" || p.key === " ") && (p.preventDefault(), t?.(!r, p));
13395
13382
  }, [n, t, r]), u = o.props, m = q.cloneElement(o, {
13396
- onClick: fr(u.onClick, c),
13397
- onKeyDown: fr(u.onKeyDown, l),
13383
+ onClick: pr(u.onClick, c),
13384
+ onKeyDown: pr(u.onKeyDown, l),
13398
13385
  tabIndex: u.tabIndex ?? (n ? -1 : 0),
13399
13386
  role: u.role ?? "option",
13400
13387
  "aria-selected": r,
@@ -13406,7 +13393,7 @@ const ju = q.forwardRef(
13406
13393
  r && "gloss-selectable--selected",
13407
13394
  n && "gloss-selectable--disabled"
13408
13395
  ].filter(Boolean).join(" ") || void 0,
13409
- ref: qt(i, o.ref)
13396
+ ref: Xt(i, o.ref)
13410
13397
  });
13411
13398
  return a ? /* @__PURE__ */ d("div", { className: "gloss-selectable__wrapper", children: [
13412
13399
  /* @__PURE__ */ e(
@@ -13447,7 +13434,7 @@ const Ku = q.forwardRef(
13447
13434
  clearTimeout(f), document.removeEventListener("mousedown", p);
13448
13435
  };
13449
13436
  }, [s, n, r]);
13450
- const u = qt(
13437
+ const u = Xt(
13451
13438
  o,
13452
13439
  l,
13453
13440
  c.ref
@@ -13493,7 +13480,7 @@ const Yu = q.forwardRef(
13493
13480
  ({ id: r, disabled: t = !1, children: n }, a) => {
13494
13481
  const s = q.Children.only(n);
13495
13482
  return tn ? /* @__PURE__ */ e(Ha, { id: r, disabled: t, outerRef: a, children: s }) : q.cloneElement(s, {
13496
- ref: qt(a, s.ref)
13483
+ ref: Xt(a, s.ref)
13497
13484
  });
13498
13485
  }
13499
13486
  );
@@ -13511,7 +13498,7 @@ function Ha({ id: r, disabled: t, outerRef: n, children: a }) {
13511
13498
  transition: l ?? void 0,
13512
13499
  opacity: u ? 0.5 : void 0,
13513
13500
  cursor: t ? void 0 : "grab"
13514
- }, p = qt(
13501
+ }, p = Xt(
13515
13502
  n,
13516
13503
  o,
13517
13504
  a.ref
@@ -13600,7 +13587,7 @@ export {
13600
13587
  Gr as aB,
13601
13588
  cp as aC,
13602
13589
  lp as aD,
13603
- pr as aE,
13590
+ mr as aE,
13604
13591
  bp as aF,
13605
13592
  hp as aG,
13606
13593
  up as aH,
@@ -13632,7 +13619,7 @@ export {
13632
13619
  Pa as ag,
13633
13620
  iu as ah,
13634
13621
  Ba as ai,
13635
- mr as aj,
13622
+ ur as aj,
13636
13623
  uu as ak,
13637
13624
  fu as al,
13638
13625
  Ra as am,
@@ -13654,8 +13641,8 @@ export {
13654
13641
  Qr as b1,
13655
13642
  en as b2,
13656
13643
  Gu as b3,
13657
- qt as b4,
13658
- fr as b5,
13644
+ Xt as b4,
13645
+ pr as b5,
13659
13646
  Vu as b6,
13660
13647
  ju as b7,
13661
13648
  Ku as b8,
@@ -13682,7 +13669,7 @@ export {
13682
13669
  Oa as bT,
13683
13670
  Ur as bU,
13684
13671
  Uu as ba,
13685
- dr as bb,
13672
+ cr as bb,
13686
13673
  Ic as bc,
13687
13674
  Tc as bd,
13688
13675
  Ec as be,
@@ -13694,7 +13681,7 @@ export {
13694
13681
  sd as bk,
13695
13682
  wa as bl,
13696
13683
  Ac as bm,
13697
- Kt as bn,
13684
+ fr as bn,
13698
13685
  xa as bo,
13699
13686
  Na as bp,
13700
13687
  Sa as bq,
@@ -13707,7 +13694,7 @@ export {
13707
13694
  Td as bx,
13708
13695
  Ia as by,
13709
13696
  Ta as bz,
13710
- ur as c,
13697
+ dr as c,
13711
13698
  Fi as d,
13712
13699
  Ai as e,
13713
13700
  Hi as f,