@mt-gloss/ui 0.1.135 → 0.1.136

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,31 +1,31 @@
1
- import { u as D, g as X, h as z, f as we, S as Te, b as xe, j as Ee } from "./COMMITS-B_qGBoy7.js";
2
- import { C as Rt, N as $t, n as Ft, o as zt, k as Ht, c as Bt, m as Ut, P as Yt, l as Vt, e as Kt, i as qt, r as Qt, d as Wt } from "./COMMITS-B_qGBoy7.js";
3
- import { jsx as a, jsxs as b, Fragment as ue } from "react/jsx-runtime";
4
- import H, { useState as x, useRef as Y, createContext as pe, useContext as me, useMemo as se, useEffect as F, useCallback as L, useLayoutEffect as Ae } from "react";
5
- import { useSensors as De, useSensor as re, PointerSensor as ke, KeyboardSensor as Le, DndContext as Me, closestCenter as Oe } from "@dnd-kit/core";
6
- import { sortableKeyboardCoordinates as Ie, SortableContext as Re, horizontalListSortingStrategy as $e, arrayMove as Fe, useSortable as ze } from "@dnd-kit/sortable";
1
+ import { u as D, g as J, h as z, f as we, S as Te, b as xe, j as Ee } from "./COMMITS-B_qGBoy7.js";
2
+ import { C as Rt, N as Ft, n as zt, o as Ht, k as Bt, c as Yt, m as Vt, P as Ut, l as Kt, e as qt, i as Gt, r as Qt, d as Wt } from "./COMMITS-B_qGBoy7.js";
3
+ import { jsx as a, jsxs as y, Fragment as pe } from "react/jsx-runtime";
4
+ import B, { useState as x, useRef as U, createContext as me, useContext as he, useMemo as re, useEffect as F, useCallback as L, useLayoutEffect as Ae } from "react";
5
+ import { useSensors as De, useSensor as oe, PointerSensor as ke, KeyboardSensor as Le, DndContext as Me, closestCenter as Oe } from "@dnd-kit/core";
6
+ import { sortableKeyboardCoordinates as Ie, SortableContext as $e, horizontalListSortingStrategy as Re, arrayMove as Fe, useSortable as ze } from "@dnd-kit/sortable";
7
7
  import { CSS as He } from "@dnd-kit/utilities";
8
- import { M as oe } from "./MetricCard-DOPtBpek.js";
9
- function _t() {
8
+ import { M as le } from "./MetricCard-DOPtBpek.js";
9
+ function St() {
10
10
  const e = D();
11
11
  if (e?.state.activePanelId !== "settings") return null;
12
12
  const t = e.state.activeTrigger;
13
13
  return t?.kind === "card-overflow" ? t.cardId : null;
14
14
  }
15
- function he({ span: e, rotating: t = !0, children: r }) {
16
- const l = ["clone-card", `span-${e}`, t ? "rotating" : ""].filter(Boolean).join(" "), n = r != null ? "full" : "fallback";
17
- return /* @__PURE__ */ a("div", { className: l, "data-clone-fidelity": n, children: r });
15
+ function fe({ span: e, rotating: t = !0, children: s }) {
16
+ const l = ["clone-card", `span-${e}`, t ? "rotating" : ""].filter(Boolean).join(" "), n = s != null ? "full" : "fallback";
17
+ return /* @__PURE__ */ a("div", { className: l, "data-clone-fidelity": n, children: s });
18
18
  }
19
- function St({ primary: e, secondary: t }) {
20
- return /* @__PURE__ */ b("div", { className: "gloss-panel-chrome-v2__footer-msg", children: [
19
+ function Pt({ primary: e, secondary: t }) {
20
+ return /* @__PURE__ */ y("div", { className: "gloss-panel-chrome-v2__footer-msg", children: [
21
21
  /* @__PURE__ */ a("span", { className: "gloss-panel-chrome-v2__footer-msg-primary", children: e }),
22
22
  t != null && /* @__PURE__ */ a("span", { className: "gloss-panel-chrome-v2__footer-msg-secondary", children: t })
23
23
  ] });
24
24
  }
25
25
  function Be({ value: e, onChange: t }) {
26
- return /* @__PURE__ */ b("div", { className: "settings-shell__field settings-shell__field--timeframe", children: [
26
+ return /* @__PURE__ */ y("div", { className: "settings-shell__field settings-shell__field--timeframe", children: [
27
27
  /* @__PURE__ */ a("span", { className: "settings-shell__label", "aria-hidden": "true", children: "Rolling period (days)" }),
28
- /* @__PURE__ */ b("div", { className: "settings-shell__slider-row", children: [
28
+ /* @__PURE__ */ y("div", { className: "settings-shell__slider-row", children: [
29
29
  /* @__PURE__ */ a(
30
30
  "input",
31
31
  {
@@ -42,25 +42,47 @@ function Be({ value: e, onChange: t }) {
42
42
  className: "settings-shell__slider"
43
43
  }
44
44
  ),
45
- /* @__PURE__ */ b("span", { className: "settings-shell__slider-value", "aria-live": "polite", children: [
45
+ /* @__PURE__ */ y("span", { className: "settings-shell__slider-value", "aria-live": "polite", children: [
46
46
  e,
47
47
  " days"
48
48
  ] })
49
49
  ] })
50
50
  ] });
51
51
  }
52
- function Ue({ id: e, onRemove: t }) {
53
- const { attributes: r, listeners: l, setNodeRef: n, transform: c, transition: u, isDragging: o } = ze({ id: e }), s = {
54
- transform: He.Transform.toString(c),
55
- transition: u,
56
- opacity: o ? 0.6 : 1
52
+ function Ye({
53
+ id: e,
54
+ onActivate: t,
55
+ disabled: s
56
+ }) {
57
+ const l = "settings-shell__slot-pill settings-shell__slot-pill--ghost" + (s ? " settings-shell__slot-pill--ghost-disabled" : "");
58
+ return /* @__PURE__ */ a("li", { className: l, "data-ghost": "true", children: /* @__PURE__ */ a(
59
+ "button",
60
+ {
61
+ type: "button",
62
+ className: "settings-shell__slot-pill__ghost-activate",
63
+ "aria-label": `Restore ${e}`,
64
+ "aria-disabled": s ? "true" : void 0,
65
+ onClick: s ? void 0 : t,
66
+ children: /* @__PURE__ */ a("span", { className: "settings-shell__slot-pill__label", children: e })
67
+ }
68
+ ) });
69
+ }
70
+ function Ve({
71
+ id: e,
72
+ onRemove: t,
73
+ removeDisabled: s
74
+ }) {
75
+ const { attributes: l, listeners: n, setNodeRef: c, transform: p, transition: r, isDragging: i } = ze({ id: e }), o = {
76
+ transform: He.Transform.toString(p),
77
+ transition: r,
78
+ opacity: i ? 0.6 : 1
57
79
  };
58
- return /* @__PURE__ */ b(
80
+ return /* @__PURE__ */ y(
59
81
  "li",
60
82
  {
61
- ref: n,
62
- style: s,
63
- className: `settings-shell__slot-pill${o ? " settings-shell__slot-pill--dragging" : ""}`,
83
+ ref: c,
84
+ style: o,
85
+ className: `settings-shell__slot-pill${i ? " settings-shell__slot-pill--dragging" : ""}`,
64
86
  children: [
65
87
  /* @__PURE__ */ a(
66
88
  "button",
@@ -68,8 +90,8 @@ function Ue({ id: e, onRemove: t }) {
68
90
  type: "button",
69
91
  className: "settings-shell__slot-pill__handle",
70
92
  "aria-label": `Reorder ${e}`,
71
- ...r,
72
93
  ...l,
94
+ ...n,
73
95
  children: /* @__PURE__ */ a("span", { "aria-hidden": "true", className: "settings-shell__slot-pill__grip", children: "⋮⋮" })
74
96
  }
75
97
  ),
@@ -78,9 +100,10 @@ function Ue({ id: e, onRemove: t }) {
78
100
  "button",
79
101
  {
80
102
  type: "button",
81
- className: "settings-shell__slot-pill__remove",
103
+ className: "settings-shell__slot-pill__remove" + (s ? " settings-shell__slot-pill__remove--disabled" : ""),
82
104
  "aria-label": `Remove ${e}`,
83
- onClick: t,
105
+ "aria-disabled": s ? "true" : void 0,
106
+ onClick: s ? void 0 : t,
84
107
  children: "×"
85
108
  }
86
109
  )
@@ -88,51 +111,79 @@ function Ue({ id: e, onRemove: t }) {
88
111
  }
89
112
  );
90
113
  }
91
- function Ye({ value: e, onChange: t }) {
92
- const r = De(
93
- re(ke, { activationConstraint: { distance: 4 } }),
94
- re(Le, { coordinateGetter: Ie })
95
- ), l = H.useRef(!1), [n, c] = H.useState(!1), u = (s) => {
96
- const { active: i, over: d } = s;
97
- if (!d || i.id === d.id) return;
98
- const m = e.findIndex((g) => g === i.id), h = e.findIndex((g) => g === d.id);
99
- m === -1 || h === -1 || t(Fe([...e], m, h));
100
- }, o = (s) => {
101
- l.current || (l.current = !0, c(!0)), t(e.filter((i) => i !== s));
114
+ function Ue({
115
+ value: e,
116
+ onChange: t,
117
+ naturalSlots: s
118
+ }) {
119
+ const l = De(
120
+ oe(ke, { activationConstraint: { distance: 4 } }),
121
+ oe(Le, { coordinateGetter: Ie })
122
+ ), n = (d) => {
123
+ const { active: h, over: g } = d;
124
+ if (!g || h.id === g.id) return;
125
+ const m = e.findIndex((v) => v === h.id), _ = e.findIndex((v) => v === g.id);
126
+ m === -1 || _ === -1 || t(Fe([...e], m, _));
127
+ }, c = e.length === 1, p = (d) => {
128
+ c || t(e.filter((h) => h !== d));
129
+ }, r = B.useMemo(() => new Set(e), [e]), i = B.useMemo(
130
+ () => (s ?? []).filter((d) => !r.has(d)),
131
+ [s, r]
132
+ ), o = e.length >= 3, u = (d) => {
133
+ o || t([...e, d]);
102
134
  };
103
- return /* @__PURE__ */ b("div", { className: "settings-shell__field settings-shell__field--slots", "aria-label": "Stack slots", children: [
104
- /* @__PURE__ */ a(Me, { sensors: r, collisionDetection: Oe, onDragEnd: u, children: /* @__PURE__ */ a(Re, { items: [...e], strategy: $e, children: /* @__PURE__ */ a("ul", { className: "settings-shell__slots-list", role: "list", children: e.map((s) => /* @__PURE__ */ a(Ue, { id: s, onRemove: () => o(s) }, s)) }) }) }),
105
- e.length === 0 && n && /* @__PURE__ */ a("p", { className: "settings-shell__help", children: "All slots removed. Apply to commit, or Reset to restore." }),
135
+ return /* @__PURE__ */ y("div", { className: "settings-shell__field settings-shell__field--slots", "aria-label": "Stack slots", children: [
136
+ /* @__PURE__ */ a(Me, { sensors: l, collisionDetection: Oe, onDragEnd: n, children: /* @__PURE__ */ a($e, { items: [...e], strategy: Re, children: /* @__PURE__ */ y("ul", { className: "settings-shell__slots-list", role: "list", children: [
137
+ e.map((d) => /* @__PURE__ */ a(
138
+ Ve,
139
+ {
140
+ id: d,
141
+ onRemove: () => p(d),
142
+ removeDisabled: c
143
+ },
144
+ d
145
+ )),
146
+ i.map((d) => /* @__PURE__ */ a(
147
+ Ye,
148
+ {
149
+ id: d,
150
+ onActivate: () => u(d),
151
+ disabled: o
152
+ },
153
+ `ghost:${d}`
154
+ ))
155
+ ] }) }) }),
106
156
  /* @__PURE__ */ a("p", { className: "settings-shell__help settings-shell__help--small", children: "Drag to reorder · click × to remove" })
107
157
  ] });
108
158
  }
109
- const Ve = ["Orders", "Quota", "Unassigned"], Ke = ["timeframe"];
110
- function Pt({
159
+ const Ke = ["Orders", "Quota", "Unassigned"], qe = ["timeframe"];
160
+ function wt({
111
161
  isOpen: e,
112
162
  cardSpan: t,
113
- cardLabel: r = "Metric",
163
+ cardLabel: s = "Metric",
114
164
  cardValue: l = "—",
115
165
  previewSlot: n,
116
- dimensions: c = Ke,
117
- initialTab: u,
118
- initialValues: o
166
+ dimensions: c = qe,
167
+ initialTab: p,
168
+ initialValues: r,
169
+ naturalSlots: i
119
170
  }) {
120
- const s = D(), i = s?.state.activeTrigger, d = i?.kind === "card-overflow" ? i.cardId : null, m = X(), h = i?.span, g = t ?? h ?? 1, p = c[0] ?? "timeframe", [v, w] = H.useState(u ?? p);
121
- H.useEffect(() => {
122
- c.includes(v) || w(p);
123
- }, [c, v, p]);
124
- const S = d != null ? s?.state?.bufferByCard?.[d]?.changes ?? {} : {}, C = typeof S.timeframe == "number" ? S.timeframe : typeof o?.timeframe == "number" ? o.timeframe : 30, O = Array.isArray(S.slots) ? S.slots : Array.isArray(o?.slots) ? o.slots : Ve, I = ($) => {
125
- d == null || s == null || s.dispatch({ type: "SET_BUFFER_VALUE", cardId: d, key: "timeframe", value: Number($.target.value) });
126
- }, R = ($) => {
127
- d == null || s == null || s.dispatch({ type: "SET_BUFFER_VALUE", cardId: d, key: "slots", value: $ });
128
- }, N = s?.state.isDirty ?? !1, E = d;
171
+ const o = D(), u = o?.state.activeTrigger, d = u?.kind === "card-overflow" ? u.cardId : null, h = J(), g = u?.span, m = t ?? g ?? 1, _ = c[0] ?? "timeframe", [v, N] = B.useState(p ?? _);
172
+ B.useEffect(() => {
173
+ c.includes(v) || N(_);
174
+ }, [c, v, _]);
175
+ const C = d != null ? o?.state?.bufferByCard?.[d]?.changes ?? {} : {}, O = typeof C.timeframe == "number" ? C.timeframe : typeof r?.timeframe == "number" ? r.timeframe : 30, I = Array.isArray(C.slots) ? C.slots : Array.isArray(r?.slots) ? r.slots : Ke, $ = (R) => {
176
+ d == null || o == null || o.dispatch({ type: "SET_BUFFER_VALUE", cardId: d, key: "timeframe", value: Number(R.target.value) });
177
+ }, S = (R) => {
178
+ d == null || o == null || o.dispatch({ type: "SET_BUFFER_VALUE", cardId: d, key: "slots", value: R });
179
+ }, E = o?.state.isDirty ?? !1, H = d;
129
180
  return /* @__PURE__ */ a(
130
181
  z,
131
182
  {
132
183
  variant: "with-stage",
133
- onClose: () => s?.dispatch({ type: "CLOSE_PANEL", reason: "header-x" }),
134
- stage: /* @__PURE__ */ a(he, { span: g, rotating: !m, children: n ?? /* @__PURE__ */ b(ue, { children: [
135
- /* @__PURE__ */ a("div", { style: { fontSize: 9, textTransform: "uppercase", letterSpacing: "0.06em", color: "#9ca3af", marginBottom: 6 }, children: r }),
184
+ onClose: () => o?.dispatch({ type: "CLOSE_PANEL", reason: "header-x" }),
185
+ stage: /* @__PURE__ */ a(fe, { span: m, rotating: !h, children: n ?? /* @__PURE__ */ y(pe, { children: [
186
+ /* @__PURE__ */ a("div", { style: { fontSize: 9, textTransform: "uppercase", letterSpacing: "0.06em", color: "#9ca3af", marginBottom: 6 }, children: s }),
136
187
  /* @__PURE__ */ a("div", { style: { fontSize: 22, fontWeight: 700, color: "#111827", lineHeight: 1 }, children: l })
137
188
  ] }) }),
138
189
  navigation: /* @__PURE__ */ a(
@@ -140,8 +191,8 @@ function Pt({
140
191
  {
141
192
  dimensions: c,
142
193
  activeTab: v,
143
- onSelect: w,
144
- reduced: m
194
+ onSelect: N,
195
+ reduced: h
145
196
  }
146
197
  ),
147
198
  footer: {
@@ -151,9 +202,9 @@ function Pt({
151
202
  id: "btn-reset",
152
203
  type: "button",
153
204
  className: "gloss-panel-chrome-v2__footer-btn",
154
- disabled: !N,
205
+ disabled: !E,
155
206
  onClick: () => {
156
- E != null && s?.dispatch({ type: "CLEAR_BUFFER", cardId: E });
207
+ H != null && o?.dispatch({ type: "CLEAR_BUFFER", cardId: H });
157
208
  },
158
209
  children: "Reset"
159
210
  }
@@ -164,13 +215,13 @@ function Pt({
164
215
  id: "settings-apply",
165
216
  type: "button",
166
217
  className: "gloss-panel-chrome-v2__footer-btn gloss-panel-chrome-v2__footer-btn--primary",
167
- disabled: !N,
168
- onClick: () => s?.dispatch({ type: "CLOSE_PANEL", reason: "apply-button" }),
218
+ disabled: !E,
219
+ onClick: () => o?.dispatch({ type: "CLOSE_PANEL", reason: "apply-button" }),
169
220
  children: "Apply"
170
221
  }
171
222
  )
172
223
  },
173
- children: /* @__PURE__ */ a("div", { className: "settings-shell", "data-shell": "settings", "aria-hidden": !e, children: /* @__PURE__ */ b(
224
+ children: /* @__PURE__ */ a("div", { className: "settings-shell", "data-shell": "settings", "aria-hidden": !e, children: /* @__PURE__ */ y(
174
225
  "div",
175
226
  {
176
227
  role: "tabpanel",
@@ -179,28 +230,28 @@ function Pt({
179
230
  tabIndex: 0,
180
231
  className: "settings-shell__tabpanel",
181
232
  children: [
182
- v === "timeframe" && /* @__PURE__ */ a(Be, { value: C, onChange: I }),
183
- v === "slots" && /* @__PURE__ */ a(Ye, { value: O, onChange: R })
233
+ v === "timeframe" && /* @__PURE__ */ a(Be, { value: O, onChange: $ }),
234
+ v === "slots" && /* @__PURE__ */ a(Ue, { value: I, onChange: S, naturalSlots: i })
184
235
  ]
185
236
  }
186
237
  ) })
187
238
  }
188
239
  );
189
240
  }
190
- function qe({
241
+ function Ge({
191
242
  isOpen: e,
192
243
  cardSpan: t,
193
- previewSlot: r,
244
+ previewSlot: s,
194
245
  metricInfo: l
195
246
  }) {
196
- const n = D(), c = n?.state.activeTrigger, u = X(), o = c?.span;
247
+ const n = D(), c = n?.state.activeTrigger, p = J(), r = c?.span;
197
248
  return /* @__PURE__ */ a(
198
249
  z,
199
250
  {
200
251
  variant: "with-stage",
201
252
  onClose: () => n?.dispatch({ type: "CLOSE_PANEL", reason: "header-x" }),
202
- stage: /* @__PURE__ */ a(he, { span: t ?? o ?? 1, rotating: !u, children: r }),
203
- children: /* @__PURE__ */ b(
253
+ stage: /* @__PURE__ */ a(fe, { span: t ?? r ?? 1, rotating: !p, children: s }),
254
+ children: /* @__PURE__ */ y(
204
255
  "div",
205
256
  {
206
257
  className: "metric-info-shell",
@@ -215,15 +266,15 @@ function qe({
215
266
  }
216
267
  );
217
268
  }
218
- qe.displayName = "MetricInfoShell";
219
- const fe = [
269
+ Ge.displayName = "MetricInfoShell";
270
+ const ge = [
220
271
  "Revenue",
221
272
  "Order flow",
222
273
  "Rep performance",
223
274
  "Brand portfolio",
224
275
  "Account coverage",
225
276
  "Commission"
226
- ], ge = "Revenue", ye = {
277
+ ], ye = "Revenue", be = {
227
278
  Revenue: {
228
279
  headline: "Are we hitting our number?",
229
280
  helper: "Top-line sales, growth, average order value, and pace-to-plan signals."
@@ -248,7 +299,7 @@ const fe = [
248
299
  headline: "What's our commission rate?",
249
300
  helper: "Outstanding balances, aging buckets, and effective commission yield."
250
301
  }
251
- }, be = {
302
+ }, ve = {
252
303
  Revenue: {
253
304
  primary: [
254
305
  {
@@ -533,46 +584,46 @@ const fe = [
533
584
  ]
534
585
  }
535
586
  };
536
- function ve({
587
+ function Ce({
537
588
  lenses: e,
538
589
  activeLens: t,
539
- onLensChange: r,
590
+ onLensChange: s,
540
591
  variant: l = "pills",
541
- lensMeta: n = ye
592
+ lensMeta: n = be
542
593
  }) {
543
594
  return l === "pills" ? /* @__PURE__ */ a("div", { className: "cat-pills-wrap", children: /* @__PURE__ */ a("div", { className: "cat-pills", role: "tablist", "aria-label": "Metric lenses", children: e.map((c) => {
544
- const u = c === t, o = n[c], s = ["cat-pill"];
545
- return u && s.push("active"), /* @__PURE__ */ b(
595
+ const p = c === t, r = n[c], i = ["cat-pill"];
596
+ return p && i.push("active"), /* @__PURE__ */ y(
546
597
  "button",
547
598
  {
548
599
  type: "button",
549
600
  role: "tab",
550
- "aria-selected": u,
551
- className: s.join(" "),
601
+ "aria-selected": p,
602
+ className: i.join(" "),
552
603
  "data-lens": c,
553
604
  onClick: () => {
554
- u || r(c);
605
+ p || s(c);
555
606
  },
556
607
  children: [
557
608
  c,
558
- o?.beta && /* @__PURE__ */ a("span", { className: "cat-pill-beta", "aria-label": "Beta", children: "BETA" })
609
+ r?.beta && /* @__PURE__ */ a("span", { className: "cat-pill-beta", "aria-label": "Beta", children: "BETA" })
559
610
  ]
560
611
  },
561
612
  c
562
613
  );
563
- }) }) }) : /* @__PURE__ */ a(Qe, { lenses: e, activeLens: t, onLensChange: r });
614
+ }) }) }) : /* @__PURE__ */ a(Qe, { lenses: e, activeLens: t, onLensChange: s });
564
615
  }
565
616
  function Qe({
566
617
  lenses: e,
567
618
  activeLens: t,
568
- onLensChange: r
619
+ onLensChange: s
569
620
  }) {
570
- const [l, n] = x(!1), c = Y(null), u = () => {
621
+ const [l, n] = x(!1), c = U(null), p = () => {
571
622
  c.current != null && (window.clearTimeout(c.current), c.current = null);
572
- }, o = () => {
573
- u(), c.current = window.setTimeout(() => n(!1), 100);
574
- }, s = e.filter((i) => i !== t);
575
- return /* @__PURE__ */ a("div", { className: "cat-segmented-wrap", children: /* @__PURE__ */ b("div", { className: "cat-segmented", children: [
623
+ }, r = () => {
624
+ p(), c.current = window.setTimeout(() => n(!1), 100);
625
+ }, i = e.filter((o) => o !== t);
626
+ return /* @__PURE__ */ a("div", { className: "cat-segmented-wrap", children: /* @__PURE__ */ y("div", { className: "cat-segmented", children: [
576
627
  /* @__PURE__ */ a(
577
628
  "button",
578
629
  {
@@ -583,14 +634,14 @@ function Qe({
583
634
  children: t
584
635
  }
585
636
  ),
586
- /* @__PURE__ */ b(
637
+ /* @__PURE__ */ y(
587
638
  "div",
588
639
  {
589
640
  className: "cat-seg-more",
590
641
  onMouseEnter: () => {
591
- u(), n(!0);
642
+ p(), n(!0);
592
643
  },
593
- onMouseLeave: o,
644
+ onMouseLeave: r,
594
645
  children: [
595
646
  /* @__PURE__ */ a("button", { type: "button", className: "cat-seg cat-seg-more-btn", "aria-haspopup": "menu", "aria-expanded": l, children: "More ▾" }),
596
647
  l && /* @__PURE__ */ a(
@@ -598,20 +649,20 @@ function Qe({
598
649
  {
599
650
  className: "cat-seg-overflow",
600
651
  role: "menu",
601
- onMouseEnter: u,
602
- onMouseLeave: o,
603
- children: s.map((i) => /* @__PURE__ */ a(
652
+ onMouseEnter: p,
653
+ onMouseLeave: r,
654
+ children: i.map((o) => /* @__PURE__ */ a(
604
655
  "button",
605
656
  {
606
657
  type: "button",
607
- "data-lens": i,
658
+ "data-lens": o,
608
659
  role: "menuitem",
609
660
  onClick: () => {
610
- r(i), n(!1);
661
+ s(o), n(!1);
611
662
  },
612
- children: i
663
+ children: o
613
664
  },
614
- i
665
+ o
615
666
  ))
616
667
  }
617
668
  )
@@ -620,34 +671,34 @@ function Qe({
620
671
  )
621
672
  ] }) });
622
673
  }
623
- function j({ tiles: e, selectedTileId: t, onSelectTile: r, renderTile: l }) {
674
+ function Z({ tiles: e, selectedTileId: t, onSelectTile: s, renderTile: l }) {
624
675
  return /* @__PURE__ */ a("div", { className: "cat-tiles", children: e.map((n) => {
625
- const c = n.id === t, u = n.subStats != null && n.subStats.length > 0;
626
- let o = null;
627
- u ? n.subStats.length === 5 ? o = "span-5" : n.subStats.length === 3 ? o = "span-3" : o = "span-2" : n.stack === !0 && (o = "span-2");
628
- const s = ["cat-tile"];
629
- o && s.push(o), c && s.push("selected"), n.isNew && s.push("is-new"), n.startHere && s.push("start-here"), n.donut && s.push("has-donut");
630
- const i = 1;
631
- let d = 0.7;
676
+ const c = n.id === t, p = n.subStats != null && n.subStats.length > 0;
677
+ let r = null;
678
+ p ? n.subStats.length === 5 ? r = "span-5" : n.subStats.length === 3 ? r = "span-3" : r = "span-2" : n.stack === !0 && (r = "span-2");
679
+ const i = ["cat-tile"];
680
+ r && i.push(r), c && i.push("selected"), n.isNew && i.push("is-new"), n.startHere && i.push("start-here"), n.donut && i.push("has-donut");
681
+ const o = 1;
682
+ let u = 0.7;
632
683
  if (n.donut) {
633
- const m = /([\d.]+)\s*%/.exec(n.value);
634
- if (m) {
635
- const h = parseFloat(m[1]);
636
- Number.isFinite(h) && (d = Math.max(0, Math.min(1, h / 100)));
684
+ const d = /([\d.]+)\s*%/.exec(n.value);
685
+ if (d) {
686
+ const h = parseFloat(d[1]);
687
+ Number.isFinite(h) && (u = Math.max(0, Math.min(1, h / 100)));
637
688
  }
638
689
  }
639
- return /* @__PURE__ */ b(
690
+ return /* @__PURE__ */ y(
640
691
  "button",
641
692
  {
642
693
  type: "button",
643
- className: s.join(" "),
694
+ className: i.join(" "),
644
695
  "data-metric": n.id,
645
696
  "data-desc": n.desc,
646
- "data-col-span": String(i),
697
+ "data-col-span": String(o),
647
698
  "data-donut": n.donut ? "true" : void 0,
648
699
  "data-accent": n.accent,
649
700
  "aria-pressed": c,
650
- onClick: () => r(n.id, n.desc),
701
+ onClick: () => s(n.id, n.desc),
651
702
  style: n.accent ? { "--cat-tile-accent": n.accent } : void 0,
652
703
  children: [
653
704
  n.startHere && /* @__PURE__ */ a("span", { className: "cat-tile-start-here", "aria-hidden": "true", children: "START HERE" }),
@@ -659,28 +710,28 @@ function j({ tiles: e, selectedTileId: t, onSelectTile: r, renderTile: l }) {
659
710
  style: { pointerEvents: "none", width: "100%", height: "100%" },
660
711
  "aria-hidden": "true",
661
712
  children: n.donut ? /* @__PURE__ */ a(
662
- oe,
713
+ le,
663
714
  {
664
715
  variant: "donut",
665
716
  label: n.label,
666
717
  value: n.value,
667
- donutValue: d,
718
+ donutValue: u,
668
719
  donutMax: 1,
669
720
  accentColor: n.accent,
670
- colSpan: i
721
+ colSpan: o
671
722
  }
672
723
  ) : /* @__PURE__ */ a(
673
- oe,
724
+ le,
674
725
  {
675
726
  variant: "standard",
676
727
  label: n.label,
677
728
  value: n.value,
678
- colSpan: i
729
+ colSpan: o
679
730
  }
680
731
  )
681
732
  }
682
733
  ),
683
- n.variants && n.variants.length > 0 && /* @__PURE__ */ a("span", { className: "cat-tile-variants", "aria-hidden": "true", children: n.variants.map((m) => /* @__PURE__ */ a("span", { children: m }, m)) }),
734
+ n.variants && n.variants.length > 0 && /* @__PURE__ */ a("span", { className: "cat-tile-variants", "aria-hidden": "true", children: n.variants.map((d) => /* @__PURE__ */ a("span", { children: d }, d)) }),
684
735
  n.isNew && /* @__PURE__ */ a("span", { className: "cat-tile-new-dot", "aria-hidden": "true" })
685
736
  ]
686
737
  },
@@ -688,17 +739,17 @@ function j({ tiles: e, selectedTileId: t, onSelectTile: r, renderTile: l }) {
688
739
  );
689
740
  }) });
690
741
  }
691
- const J = pe(null);
692
- function ee() {
693
- return me(J);
742
+ const ee = me(null);
743
+ function te() {
744
+ return he(ee);
694
745
  }
695
- function wt({ mode: e, dispatch: t }) {
696
- const r = ee();
697
- if (r == null && e == null) return null;
698
- const l = r?.mode ?? e ?? "add", n = r?.selectedTileId ?? null, c = r?.description ?? null, u = n == null;
699
- return /* @__PURE__ */ b("div", { className: "panel-footer catalog", children: [
746
+ function Tt({ mode: e, dispatch: t }) {
747
+ const s = te();
748
+ if (s == null && e == null) return null;
749
+ const l = s?.mode ?? e ?? "add", n = s?.selectedTileId ?? null, c = s?.description ?? null, p = n == null;
750
+ return /* @__PURE__ */ y("div", { className: "panel-footer catalog", children: [
700
751
  /* @__PURE__ */ a("div", { className: "cat-description", id: "cat-desc", children: c ?? /* @__PURE__ */ a("em", { children: "Tap a metric to see its description" }) }),
701
- /* @__PURE__ */ b("div", { style: { display: "flex", padding: "10px 14px", gap: 8 }, children: [
752
+ /* @__PURE__ */ y("div", { style: { display: "flex", padding: "10px 14px", gap: 8 }, children: [
702
753
  /* @__PURE__ */ a("div", { className: "spacer", style: { flex: 1 } }),
703
754
  /* @__PURE__ */ a(
704
755
  "button",
@@ -716,7 +767,7 @@ function wt({ mode: e, dispatch: t }) {
716
767
  id: "btn-cat-add",
717
768
  type: "button",
718
769
  className: "btn btn-primary",
719
- disabled: u,
770
+ disabled: p,
720
771
  onClick: () => t({ type: "CLOSE_PANEL", reason: "apply-button" }),
721
772
  children: "Add metric"
722
773
  }
@@ -727,7 +778,7 @@ function wt({ mode: e, dispatch: t }) {
727
778
  id: "btn-cat-replace",
728
779
  type: "button",
729
780
  className: "btn btn-primary",
730
- disabled: u,
781
+ disabled: p,
731
782
  onClick: () => t({ type: "CLOSE_PANEL", reason: "apply-button" }),
732
783
  children: "Replace metric"
733
784
  }
@@ -735,42 +786,42 @@ function wt({ mode: e, dispatch: t }) {
735
786
  ] })
736
787
  ] });
737
788
  }
738
- function le(e, t) {
789
+ function ie(e, t) {
739
790
  if (t.length === 0) return !0;
740
- const r = t.toLowerCase();
741
- if (e.label.toLowerCase().includes(r) || e.value.toLowerCase().includes(r)) return !0;
791
+ const s = t.toLowerCase();
792
+ if (e.label.toLowerCase().includes(s) || e.value.toLowerCase().includes(s)) return !0;
742
793
  if (e.subStats) {
743
794
  for (const l of e.subStats)
744
- if (l.label.toLowerCase().includes(r) || l.value.toLowerCase().includes(r)) return !0;
795
+ if (l.label.toLowerCase().includes(s) || l.value.toLowerCase().includes(s)) return !0;
745
796
  }
746
797
  return !1;
747
798
  }
748
799
  function We() {
749
- const t = ee()?.description ?? null;
800
+ const t = te()?.description ?? null;
750
801
  return t == null ? /* @__PURE__ */ a("span", { style: { fontStyle: "italic" }, children: "Tap a metric to see its description" }) : /* @__PURE__ */ a("span", { children: t });
751
802
  }
752
- function Tt({
803
+ function xt({
753
804
  isOpen: e,
754
- lenses: t = fe,
755
- defaultLens: r = ge,
756
- tilesByLens: l = be,
757
- lensMeta: n = ye,
805
+ lenses: t = ge,
806
+ defaultLens: s = ye,
807
+ tilesByLens: l = ve,
808
+ lensMeta: n = be,
758
809
  renderTile: c,
759
- onAdd: u
810
+ onAdd: p
760
811
  }) {
761
- const o = D(), [s, i] = x(r), [d, m] = x(null), [h, g] = x(null), [p, v] = x(""), w = l[s] ?? { primary: [] }, _ = n[s], S = se(
762
- () => w.primary.filter((N) => le(N, p)),
763
- [w.primary, p]
764
- ), C = se(
765
- () => (w.secondary ?? []).filter((N) => le(N, p)),
766
- [w.secondary, p]
812
+ const r = D(), [i, o] = x(s), [u, d] = x(null), [h, g] = x(null), [m, _] = x(""), v = l[i] ?? { primary: [] }, N = n[i], w = re(
813
+ () => v.primary.filter((S) => ie(S, m)),
814
+ [v.primary, m]
815
+ ), C = re(
816
+ () => (v.secondary ?? []).filter((S) => ie(S, m)),
817
+ [v.secondary, m]
767
818
  ), O = () => {
768
- d != null && u?.(d), o?.dispatch({ type: "CLOSE_PANEL", reason: "apply-button" });
769
- }, I = () => o?.dispatch({ type: "CLOSE_PANEL", reason: "header-x" }), R = d == null;
819
+ u != null && p?.(u), r?.dispatch({ type: "CLOSE_PANEL", reason: "apply-button" });
820
+ }, I = () => r?.dispatch({ type: "CLOSE_PANEL", reason: "header-x" }), $ = u == null;
770
821
  return /* @__PURE__ */ a(
771
- J.Provider,
822
+ ee.Provider,
772
823
  {
773
- value: { mode: "add", selectedTileId: d, description: h },
824
+ value: { mode: "add", selectedTileId: u, description: h },
774
825
  children: /* @__PURE__ */ a(
775
826
  z,
776
827
  {
@@ -785,13 +836,13 @@ function Tt({
785
836
  id: "btn-cat-add",
786
837
  type: "button",
787
838
  className: "gloss-panel-chrome-v2__footer-btn gloss-panel-chrome-v2__footer-btn--primary",
788
- disabled: R,
839
+ disabled: $,
789
840
  onClick: O,
790
841
  children: "Add metric"
791
842
  }
792
843
  )
793
844
  },
794
- children: /* @__PURE__ */ b("div", { "data-shell": "catalog-add", "aria-hidden": !e, children: [
845
+ children: /* @__PURE__ */ y("div", { "data-shell": "catalog-add", "aria-hidden": !e, children: [
795
846
  /* @__PURE__ */ a("div", { className: "cat-search", children: /* @__PURE__ */ a(
796
847
  "input",
797
848
  {
@@ -799,54 +850,54 @@ function Tt({
799
850
  className: "cat-search-input",
800
851
  placeholder: "Search metrics",
801
852
  "aria-label": "Search metrics",
802
- value: p,
803
- onChange: (N) => v(N.target.value)
853
+ value: m,
854
+ onChange: (S) => _(S.target.value)
804
855
  }
805
856
  ) }),
806
857
  /* @__PURE__ */ a(
807
- ve,
858
+ Ce,
808
859
  {
809
860
  lenses: t,
810
- activeLens: s,
861
+ activeLens: i,
811
862
  lensMeta: n,
812
863
  variant: "pills",
813
- onLensChange: (N) => {
814
- i(N), m(null), g(null), v("");
864
+ onLensChange: (S) => {
865
+ o(S), d(null), g(null), _("");
815
866
  }
816
867
  }
817
868
  ),
818
- _ && /* @__PURE__ */ b("div", { className: "cat-lens-meta", children: [
819
- /* @__PURE__ */ a("h3", { className: "cat-lens-headline", children: _.headline }),
820
- /* @__PURE__ */ a("p", { className: "cat-lens-helper", children: _.helper })
869
+ N && /* @__PURE__ */ y("div", { className: "cat-lens-meta", children: [
870
+ /* @__PURE__ */ a("h3", { className: "cat-lens-headline", children: N.headline }),
871
+ /* @__PURE__ */ a("p", { className: "cat-lens-helper", children: N.helper })
821
872
  ] }),
822
873
  /* @__PURE__ */ a(
823
- j,
874
+ Z,
824
875
  {
825
- tiles: S,
826
- selectedTileId: d,
827
- onSelectTile: (N, E) => {
828
- m(N), g(E);
876
+ tiles: w,
877
+ selectedTileId: u,
878
+ onSelectTile: (S, E) => {
879
+ d(S), g(E);
829
880
  },
830
881
  renderTile: c
831
882
  }
832
883
  ),
833
- C.length > 0 && /* @__PURE__ */ b("div", { className: "cat-more-in-lens", children: [
884
+ C.length > 0 && /* @__PURE__ */ y("div", { className: "cat-more-in-lens", children: [
834
885
  /* @__PURE__ */ a("div", { className: "cat-more-in-lens__heading", children: "MORE IN THIS LENS" }),
835
886
  /* @__PURE__ */ a(
836
- j,
887
+ Z,
837
888
  {
838
889
  tiles: C,
839
- selectedTileId: d,
840
- onSelectTile: (N, E) => {
841
- m(N), g(E);
890
+ selectedTileId: u,
891
+ onSelectTile: (S, E) => {
892
+ d(S), g(E);
842
893
  },
843
894
  renderTile: c
844
895
  }
845
896
  )
846
897
  ] }),
847
- S.length === 0 && C.length === 0 && p.length > 0 && /* @__PURE__ */ b("div", { className: "cat-empty", children: [
898
+ w.length === 0 && C.length === 0 && m.length > 0 && /* @__PURE__ */ y("div", { className: "cat-empty", children: [
848
899
  'No metrics match "',
849
- p,
900
+ m,
850
901
  '".'
851
902
  ] })
852
903
  ] })
@@ -855,65 +906,65 @@ function Tt({
855
906
  }
856
907
  );
857
908
  }
858
- function Ge() {
859
- const t = ee()?.description ?? null;
860
- return t == null ? /* @__PURE__ */ a("em", { children: "Tap a metric to see its description" }) : /* @__PURE__ */ a(ue, { children: t });
909
+ function je() {
910
+ const t = te()?.description ?? null;
911
+ return t == null ? /* @__PURE__ */ a("em", { children: "Tap a metric to see its description" }) : /* @__PURE__ */ a(pe, { children: t });
861
912
  }
862
- function xt({
913
+ function Et({
863
914
  isOpen: e,
864
915
  replacingLabel: t,
865
- lenses: r = fe,
866
- defaultLens: l = ge,
867
- tilesByLens: n = be,
916
+ lenses: s = ge,
917
+ defaultLens: l = ye,
918
+ tilesByLens: n = ve,
868
919
  renderTile: c
869
920
  }) {
870
- const u = D(), [o, s] = x(l), [i, d] = x(null), [m, h] = x(null), g = n[o] ?? { primary: [] }, p = [...g.primary, ...g.secondary ?? []], v = () => u?.dispatch({ type: "CLOSE_PANEL", reason: "apply-button" }), w = () => u?.dispatch({ type: "CLOSE_PANEL", reason: "header-x" }), _ = i == null;
921
+ const p = D(), [r, i] = x(l), [o, u] = x(null), [d, h] = x(null), g = n[r] ?? { primary: [] }, m = [...g.primary, ...g.secondary ?? []], _ = () => p?.dispatch({ type: "CLOSE_PANEL", reason: "apply-button" }), v = () => p?.dispatch({ type: "CLOSE_PANEL", reason: "header-x" }), N = o == null;
871
922
  return /* @__PURE__ */ a(
872
- J.Provider,
923
+ ee.Provider,
873
924
  {
874
- value: { mode: "replace", selectedTileId: i, description: m },
925
+ value: { mode: "replace", selectedTileId: o, description: d },
875
926
  children: /* @__PURE__ */ a(
876
927
  z,
877
928
  {
878
929
  variant: "no-stage",
879
930
  title: "Replace metric",
880
- onClose: w,
931
+ onClose: v,
881
932
  footer: {
882
- left: /* @__PURE__ */ a(Ge, {}),
933
+ left: /* @__PURE__ */ a(je, {}),
883
934
  right: /* @__PURE__ */ a(
884
935
  "button",
885
936
  {
886
937
  id: "btn-cat-replace",
887
938
  type: "button",
888
939
  className: "gloss-panel-chrome-v2__footer-btn gloss-panel-chrome-v2__footer-btn--primary",
889
- disabled: _,
890
- onClick: v,
940
+ disabled: N,
941
+ onClick: _,
891
942
  children: "Replace metric"
892
943
  }
893
944
  )
894
945
  },
895
- children: /* @__PURE__ */ b("div", { "data-shell": "catalog-replace", "aria-hidden": !e, children: [
896
- t && /* @__PURE__ */ b("p", { className: "cat-subtitle", children: [
946
+ children: /* @__PURE__ */ y("div", { "data-shell": "catalog-replace", "aria-hidden": !e, children: [
947
+ t && /* @__PURE__ */ y("p", { className: "cat-subtitle", children: [
897
948
  "replacing ",
898
949
  t
899
950
  ] }),
900
951
  /* @__PURE__ */ a(
901
- ve,
952
+ Ce,
902
953
  {
903
- lenses: r,
904
- activeLens: o,
905
- onLensChange: (S) => {
906
- s(S), d(null), h(null);
954
+ lenses: s,
955
+ activeLens: r,
956
+ onLensChange: (w) => {
957
+ i(w), u(null), h(null);
907
958
  }
908
959
  }
909
960
  ),
910
961
  /* @__PURE__ */ a(
911
- j,
962
+ Z,
912
963
  {
913
- tiles: p,
914
- selectedTileId: i,
915
- onSelectTile: (S, C) => {
916
- d(S), h(C);
964
+ tiles: m,
965
+ selectedTileId: o,
966
+ onSelectTile: (w, C) => {
967
+ u(w), h(C);
917
968
  },
918
969
  renderTile: c
919
970
  }
@@ -924,13 +975,13 @@ function xt({
924
975
  }
925
976
  );
926
977
  }
927
- const Ce = pe(null);
978
+ const _e = me(null);
928
979
  function Ne() {
929
- return me(Ce);
980
+ return he(_e);
930
981
  }
931
- function je(e = {}) {
932
- const t = Ne(), r = t?.createPage, l = t?.setPages;
933
- return /* @__PURE__ */ b(
982
+ function Ze(e = {}) {
983
+ const t = Ne(), s = t?.createPage, l = t?.setPages;
984
+ return /* @__PURE__ */ y(
934
985
  "div",
935
986
  {
936
987
  className: "panel-footer pm",
@@ -944,8 +995,8 @@ function je(e = {}) {
944
995
  type: "button",
945
996
  className: "btn btn-primary",
946
997
  onClick: () => {
947
- if (r) {
948
- r();
998
+ if (s) {
999
+ s();
949
1000
  return;
950
1001
  }
951
1002
  l && l((n) => [
@@ -960,28 +1011,28 @@ function je(e = {}) {
960
1011
  }
961
1012
  );
962
1013
  }
963
- function ie({ page: e, onRename: t, onKebab: r, onDragStart: l, onSwitchPage: n }) {
964
- const c = Ne(), [u, o] = x(!1), s = Y(null);
1014
+ function ce({ page: e, onRename: t, onKebab: s, onDragStart: l, onSwitchPage: n }) {
1015
+ const c = Ne(), [p, r] = x(!1), i = U(null);
965
1016
  F(() => {
966
- if (!u) return;
967
- const p = (v) => {
968
- s.current && (s.current.contains(v.target) || o(!1));
1017
+ if (!p) return;
1018
+ const m = (_) => {
1019
+ i.current && (i.current.contains(_.target) || r(!1));
969
1020
  };
970
- return document.addEventListener("mousedown", p, !0), () => document.removeEventListener("mousedown", p, !0);
971
- }, [u]);
972
- const i = () => {
973
- if (o(!1), t) return t(e.id);
1021
+ return document.addEventListener("mousedown", m, !0), () => document.removeEventListener("mousedown", m, !0);
1022
+ }, [p]);
1023
+ const o = () => {
1024
+ if (r(!1), t) return t(e.id);
974
1025
  if (!c?.renamePage) return;
975
- const p = window.prompt("Rename page", e.name);
976
- p != null && p.trim().length > 0 && c.renamePage(e.id, p.trim());
1026
+ const m = window.prompt("Rename page", e.name);
1027
+ m != null && m.trim().length > 0 && c.renamePage(e.id, m.trim());
1028
+ }, u = () => {
1029
+ r(!1), c?.duplicatePage?.(e.id);
977
1030
  }, d = () => {
978
- o(!1), c?.duplicatePage?.(e.id);
979
- }, m = () => {
980
- o(!1), c?.deletePage?.(e.id);
981
- }, h = (p) => {
982
- p.stopPropagation(), n && !e.active && n(e.id);
1031
+ r(!1), c?.deletePage?.(e.id);
1032
+ }, h = (m) => {
1033
+ m.stopPropagation(), n && !e.active && n(e.id);
983
1034
  }, g = ["pm-row"];
984
- return e.active && g.push("active"), /* @__PURE__ */ b("div", { ref: s, className: g.join(" "), "data-page-id": e.id, role: "listitem", children: [
1035
+ return e.active && g.push("active"), /* @__PURE__ */ y("div", { ref: i, className: g.join(" "), "data-page-id": e.id, role: "listitem", children: [
985
1036
  /* @__PURE__ */ a(
986
1037
  "div",
987
1038
  {
@@ -998,8 +1049,8 @@ function ie({ page: e, onRename: t, onKebab: r, onDragStart: l, onSwitchPage: n
998
1049
  role: n && !e.active ? "button" : void 0,
999
1050
  tabIndex: n && !e.active ? 0 : void 0,
1000
1051
  onClick: n ? h : void 0,
1001
- onKeyDown: (p) => {
1002
- !n || e.active || (p.key === "Enter" || p.key === " ") && (p.preventDefault(), p.stopPropagation(), n(e.id));
1052
+ onKeyDown: (m) => {
1053
+ !n || e.active || (m.key === "Enter" || m.key === " ") && (m.preventDefault(), m.stopPropagation(), n(e.id));
1003
1054
  },
1004
1055
  "aria-label": n && !e.active ? `Switch to ${e.name}` : void 0,
1005
1056
  children: e.name
@@ -1012,34 +1063,34 @@ function ie({ page: e, onRename: t, onKebab: r, onDragStart: l, onSwitchPage: n
1012
1063
  className: "pm-kebab",
1013
1064
  "aria-label": "Page options",
1014
1065
  "aria-haspopup": "menu",
1015
- "aria-expanded": u,
1016
- onPointerDown: (p) => p.stopPropagation(),
1017
- onMouseDown: (p) => p.stopPropagation(),
1018
- onClick: (p) => {
1019
- if (p.stopPropagation(), r) return r(e.id);
1020
- o((v) => !v);
1066
+ "aria-expanded": p,
1067
+ onPointerDown: (m) => m.stopPropagation(),
1068
+ onMouseDown: (m) => m.stopPropagation(),
1069
+ onClick: (m) => {
1070
+ if (m.stopPropagation(), s) return s(e.id);
1071
+ r((_) => !_);
1021
1072
  },
1022
1073
  children: "⋯"
1023
1074
  }
1024
1075
  ),
1025
- u && /* @__PURE__ */ b(
1076
+ p && /* @__PURE__ */ y(
1026
1077
  "div",
1027
1078
  {
1028
1079
  className: "pm-kebab-menu",
1029
1080
  role: "menu",
1030
1081
  "data-page-id": e.id,
1031
- onPointerDown: (p) => p.stopPropagation(),
1032
- onMouseDown: (p) => p.stopPropagation(),
1082
+ onPointerDown: (m) => m.stopPropagation(),
1083
+ onMouseDown: (m) => m.stopPropagation(),
1033
1084
  children: [
1034
- /* @__PURE__ */ a("button", { type: "button", role: "menuitem", className: "pm-kebab-menu__item", onClick: i, children: "Rename" }),
1035
- /* @__PURE__ */ a("button", { type: "button", role: "menuitem", className: "pm-kebab-menu__item", onClick: d, children: "Duplicate" }),
1085
+ /* @__PURE__ */ a("button", { type: "button", role: "menuitem", className: "pm-kebab-menu__item", onClick: o, children: "Rename" }),
1086
+ /* @__PURE__ */ a("button", { type: "button", role: "menuitem", className: "pm-kebab-menu__item", onClick: u, children: "Duplicate" }),
1036
1087
  /* @__PURE__ */ a(
1037
1088
  "button",
1038
1089
  {
1039
1090
  type: "button",
1040
1091
  role: "menuitem",
1041
1092
  className: "pm-kebab-menu__item pm-kebab-menu__item--danger",
1042
- onClick: m,
1093
+ onClick: d,
1043
1094
  children: "Delete"
1044
1095
  }
1045
1096
  )
@@ -1048,56 +1099,56 @@ function ie({ page: e, onRename: t, onKebab: r, onDragStart: l, onSwitchPage: n
1048
1099
  )
1049
1100
  ] });
1050
1101
  }
1051
- const Ze = [
1102
+ const Xe = [
1052
1103
  { id: "p-pipeline", name: "My Pipeline", active: !0 },
1053
1104
  { id: "p-numbers", name: "My Numbers", active: !1 },
1054
1105
  { id: "p-morning", name: "My Morning", active: !1 },
1055
1106
  { id: "p-accounts", name: "My Accounts", active: !1 }
1056
1107
  ];
1057
- function Et({
1108
+ function At({
1058
1109
  isOpen: e,
1059
- pages: t = Ze,
1060
- externalPages: r,
1110
+ pages: t = Xe,
1111
+ externalPages: s,
1061
1112
  activePageId: l,
1062
1113
  onRename: n,
1063
1114
  onDuplicate: c,
1064
- onDelete: u,
1065
- onReorder: o,
1066
- onCreatePage: s,
1067
- onSwitchPage: i
1115
+ onDelete: p,
1116
+ onReorder: r,
1117
+ onCreatePage: i,
1118
+ onSwitchPage: o
1068
1119
  }) {
1069
- const d = D(), [m, h] = x(() => [...t]), g = L((f, P) => {
1120
+ const u = D(), [d, h] = x(() => [...t]), g = L((f, P) => {
1070
1121
  h((T) => T.map((A) => A.id === f ? { ...A, name: P } : A));
1071
- }, []), p = L((f) => {
1122
+ }, []), m = L((f) => {
1072
1123
  h((P) => {
1073
- const T = P.find((V) => V.id === f);
1124
+ const T = P.find((K) => K.id === f);
1074
1125
  if (!T) return P;
1075
1126
  const A = {
1076
1127
  id: `${T.id}-copy-${Date.now()}`,
1077
1128
  name: `${T.name} copy`,
1078
1129
  active: !1
1079
- }, k = P.findIndex((V) => V.id === f);
1130
+ }, k = P.findIndex((K) => K.id === f);
1080
1131
  return [...P.slice(0, k + 1), A, ...P.slice(k + 1)];
1081
1132
  });
1082
- }, []), v = L((f) => {
1133
+ }, []), _ = L((f) => {
1083
1134
  h((P) => P.filter((T) => T.id !== f));
1084
- }, []), w = L((f) => {
1135
+ }, []), v = L((f) => {
1085
1136
  h((P) => {
1086
1137
  const T = new Map(P.map((k) => [k.id, k])), A = f.map((k) => T.get(k)).filter(Boolean);
1087
1138
  return A.length === P.length ? A : P;
1088
1139
  });
1089
- }, []), _ = r != null, S = _ ? r : m, C = l != null ? S.map((f) => ({ ...f, active: f.id === l })) : [...S], O = n ?? (_ ? void 0 : g), I = c ?? (_ ? void 0 : p), R = u ?? (_ ? void 0 : v), N = o ?? (_ ? void 0 : w), E = L(
1140
+ }, []), N = s != null, w = N ? s : d, C = l != null ? w.map((f) => ({ ...f, active: f.id === l })) : [...w], O = n ?? (N ? void 0 : g), I = c ?? (N ? void 0 : m), $ = p ?? (N ? void 0 : _), S = r ?? (N ? void 0 : v), E = L(
1090
1141
  (f) => {
1091
- _ || h(f);
1142
+ N || h(f);
1092
1143
  },
1093
- [_]
1094
- ), ne = L(
1144
+ [N]
1145
+ ), H = L(
1095
1146
  (f) => {
1096
1147
  const P = f[0]?.items.map((T) => T.id) ?? [];
1097
- P.length > 0 && N && N(P);
1148
+ P.length > 0 && S && S(P);
1098
1149
  },
1099
- [N]
1100
- ), ae = C.map((f) => `${f.id}:${f.name}`).join("|"), $ = N != null && C.length > 1 ? /* @__PURE__ */ a(
1150
+ [S]
1151
+ ), ae = C.map((f) => `${f.id}:${f.name}`).join("|"), se = S != null && C.length > 1 ? /* @__PURE__ */ a(
1101
1152
  Te,
1102
1153
  {
1103
1154
  zones: [
@@ -1106,63 +1157,63 @@ function Et({
1106
1157
  items: C.map((f) => ({ ...f, id: f.id }))
1107
1158
  }
1108
1159
  ],
1109
- onZoneChange: ne,
1160
+ onZoneChange: H,
1110
1161
  renderZone: (f, P, T) => /* @__PURE__ */ a("div", { className: "pm-list", role: "list", children: T }),
1111
1162
  renderItem: (f) => /* @__PURE__ */ a(
1112
- ie,
1163
+ ce,
1113
1164
  {
1114
1165
  page: f,
1115
- onSwitchPage: i
1166
+ onSwitchPage: o
1116
1167
  },
1117
1168
  f.id
1118
1169
  )
1119
1170
  },
1120
1171
  ae
1121
1172
  ) : /* @__PURE__ */ a("div", { className: "pm-list", role: "list", children: C.map((f) => /* @__PURE__ */ a(
1122
- ie,
1173
+ ce,
1123
1174
  {
1124
1175
  page: f,
1125
- onSwitchPage: i
1176
+ onSwitchPage: o
1126
1177
  },
1127
1178
  f.id
1128
- )) }), Pe = () => d?.dispatch({ type: "CLOSE_PANEL", reason: "header-x" });
1179
+ )) }), R = () => u?.dispatch({ type: "CLOSE_PANEL", reason: "header-x" });
1129
1180
  return /* @__PURE__ */ a(
1130
- Ce.Provider,
1181
+ _e.Provider,
1131
1182
  {
1132
1183
  value: {
1133
1184
  pages: C,
1134
1185
  setPages: E,
1135
1186
  renamePage: O,
1136
1187
  duplicatePage: I,
1137
- deletePage: R,
1188
+ deletePage: $,
1138
1189
  // Sprint 2026-05-20 — propagate live create binding for footer.
1139
- createPage: s
1190
+ createPage: i
1140
1191
  },
1141
1192
  children: /* @__PURE__ */ a(
1142
1193
  z,
1143
1194
  {
1144
1195
  variant: "no-stage",
1145
1196
  title: "Manage pages",
1146
- onClose: Pe,
1147
- footer: { right: /* @__PURE__ */ a(je, {}) },
1148
- children: /* @__PURE__ */ a("div", { "data-shell": "page-management", "aria-hidden": !e, children: $ })
1197
+ onClose: R,
1198
+ footer: { right: /* @__PURE__ */ a(Ze, {}) },
1199
+ children: /* @__PURE__ */ a("div", { "data-shell": "page-management", "aria-hidden": !e, children: se })
1149
1200
  }
1150
1201
  )
1151
1202
  }
1152
1203
  );
1153
1204
  }
1154
- const At = {
1205
+ const Dt = {
1155
1206
  SETTINGS: "settings",
1156
1207
  CATALOG_ADD: "catalog-add",
1157
1208
  CATALOG_REPLACE: "catalog-replace",
1158
1209
  PAGE_MGMT: "page-management",
1159
1210
  NOTIFICATION_CENTER: "notification-center"
1160
- }, Xe = {
1211
+ }, Je = {
1161
1212
  position: "fixed",
1162
1213
  inset: 0,
1163
1214
  pointerEvents: "none",
1164
1215
  zIndex: 55
1165
- }, Je = {
1216
+ }, et = {
1166
1217
  position: "absolute",
1167
1218
  inset: 0,
1168
1219
  zIndex: 1,
@@ -1171,8 +1222,8 @@ const At = {
1171
1222
  pointerEvents: "none",
1172
1223
  background: "rgba(0, 0, 0, 0.04)"
1173
1224
  };
1174
- function Dt() {
1175
- const { state: e, dispatch: t, getCloseLog: r } = xe();
1225
+ function kt() {
1226
+ const { state: e, dispatch: t, getCloseLog: s } = xe();
1176
1227
  F(() => {
1177
1228
  if (e.activePanelId == null) return;
1178
1229
  function n(c) {
@@ -1180,7 +1231,7 @@ function Dt() {
1180
1231
  }
1181
1232
  return document.addEventListener("keydown", n), () => document.removeEventListener("keydown", n);
1182
1233
  }, [e.activePanelId, t]);
1183
- const l = Y(e);
1234
+ const l = U(e);
1184
1235
  return Ae(() => {
1185
1236
  l.current = e;
1186
1237
  }), F(() => {
@@ -1189,21 +1240,21 @@ function Dt() {
1189
1240
  return n.__panelsHostHandle && console.warn("[panels] multiple PanelHost/PanelHostShell instances mounted; dev handle is unreliable"), n.__panelsHostHandle = {
1190
1241
  dispatch: t,
1191
1242
  getState: () => l.current,
1192
- getCloseLog: r
1243
+ getCloseLog: s
1193
1244
  }, () => {
1194
1245
  n.__panelsHostHandle?.dispatch === t && delete window.__panelsHostHandle;
1195
1246
  };
1196
- }, [t, r]), /* @__PURE__ */ a("div", { "data-panel-host": "true", style: Xe, children: e.activePanelId != null && /* @__PURE__ */ a(
1247
+ }, [t, s]), /* @__PURE__ */ a("div", { "data-panel-host": "true", style: Je, children: e.activePanelId != null && /* @__PURE__ */ a(
1197
1248
  "div",
1198
1249
  {
1199
1250
  "data-panel-scrim": "true",
1200
- style: Je
1251
+ style: et
1201
1252
  }
1202
1253
  ) });
1203
1254
  }
1204
- const et = 700;
1205
- function tt(e, t) {
1206
- const [r, l] = x(null), n = Y(null);
1255
+ const tt = 700;
1256
+ function nt(e, t) {
1257
+ const [s, l] = x(null), n = U(null);
1207
1258
  return F(() => {
1208
1259
  if (e != null) {
1209
1260
  n.current != null && (clearTimeout(n.current), n.current = null), l(null);
@@ -1215,131 +1266,131 @@ function tt(e, t) {
1215
1266
  }
1216
1267
  return n.current = setTimeout(() => {
1217
1268
  l(null), n.current = null;
1218
- }, et), () => {
1269
+ }, tt), () => {
1219
1270
  n.current != null && (clearTimeout(n.current), n.current = null);
1220
1271
  };
1221
1272
  }, [e, t]), F(() => {
1222
1273
  e != null && l(e);
1223
- }, [e]), e != null ? { panelId: e, isOpen: !0 } : r != null ? { panelId: r, isOpen: !1 } : { panelId: null, isOpen: !1 };
1274
+ }, [e]), e != null ? { panelId: e, isOpen: !0 } : s != null ? { panelId: s, isOpen: !1 } : { panelId: null, isOpen: !1 };
1224
1275
  }
1225
- function kt({ panelComponents: e, children: t }) {
1226
- const r = D(), l = r?.state.lastClose?.reason === "section-hidden", n = tt(r?.state.activePanelId ?? null, l);
1227
- if (r == null || n.panelId == null) return null;
1228
- const c = n.panelId, u = n.isOpen, o = e?.[c];
1229
- return o == null && t == null ? (process.env.NODE_ENV !== "production" && console.error(
1276
+ function Lt({ panelComponents: e, children: t }) {
1277
+ const s = D(), l = s?.state.lastClose?.reason === "section-hidden", n = nt(s?.state.activePanelId ?? null, l);
1278
+ if (s == null || n.panelId == null) return null;
1279
+ const c = n.panelId, p = n.isOpen, r = e?.[c];
1280
+ return r == null && t == null ? (process.env.NODE_ENV !== "production" && console.error(
1230
1281
  "[panels] No panel component registered for activePanelId:",
1231
1282
  c
1232
- ), null) : /* @__PURE__ */ a(Ee, { isOpen: u, children: o != null ? /* @__PURE__ */ a(o, { isOpen: u }) : t });
1283
+ ), null) : /* @__PURE__ */ a(Ee, { isOpen: p, children: r != null ? /* @__PURE__ */ a(r, { isOpen: p }) : t });
1233
1284
  }
1234
- function ce(e) {
1285
+ function de(e) {
1235
1286
  return e === null ? null : e.kind === "manage-pages-action" ? `global-${e.align ?? "left"}` : e.kind === "card-overflow" || e.kind === "empty-cell" ? `section-${e.sectionIndex}` : null;
1236
1287
  }
1237
- const nt = 685, de = 627, at = "cubic-bezier(0.22, 1, 0.36, 1)", st = 200;
1238
- function _e(e, t) {
1288
+ const at = 685, ue = 627, st = "cubic-bezier(0.22, 1, 0.36, 1)", rt = 200;
1289
+ function Se(e, t) {
1239
1290
  if (typeof window > "u") return t;
1240
- const r = window.getComputedStyle(document.documentElement).getPropertyValue(e).trim();
1241
- if (!r) return t;
1242
- const l = parseFloat(r);
1243
- return Number.isNaN(l) ? t : r.endsWith("s") && !r.endsWith("ms") ? l * 1e3 : l;
1291
+ const s = window.getComputedStyle(document.documentElement).getPropertyValue(e).trim();
1292
+ if (!s) return t;
1293
+ const l = parseFloat(s);
1294
+ return Number.isNaN(l) ? t : s.endsWith("s") && !s.endsWith("ms") ? l * 1e3 : l;
1244
1295
  }
1245
- function rt(e, t) {
1296
+ function ot(e, t) {
1246
1297
  return typeof window > "u" ? t : window.getComputedStyle(document.documentElement).getPropertyValue(e).trim() || t;
1247
1298
  }
1248
- function B(e) {
1299
+ function Y(e) {
1249
1300
  e.dispatch({ type: "OPEN_PANEL", panelId: e.panelId, trigger: e.trigger });
1250
1301
  }
1251
- function ot(e) {
1252
- const { mountEl: t, chromeEl: r, reducedMotion: l, onAssert: n } = e;
1253
- if (t == null || r == null) {
1254
- B(e), n?.({ branch: "slide-fallback-no-dom", timestamp: Date.now() });
1302
+ function lt(e) {
1303
+ const { mountEl: t, chromeEl: s, reducedMotion: l, onAssert: n } = e;
1304
+ if (t == null || s == null) {
1305
+ Y(e), n?.({ branch: "slide-fallback-no-dom", timestamp: Date.now() });
1255
1306
  return;
1256
1307
  }
1257
1308
  if (l) {
1258
1309
  e.dispatch({ type: "OPEN_PANEL", panelId: e.panelId, trigger: e.trigger }), n?.({ branch: "slide-reduced-motion", timestamp: Date.now() });
1259
1310
  return;
1260
1311
  }
1261
- if (typeof r.animate != "function") {
1262
- B(e), n?.({ branch: "slide-no-waapi", timestamp: Date.now() });
1312
+ if (typeof s.animate != "function") {
1313
+ Y(e), n?.({ branch: "slide-no-waapi", timestamp: Date.now() });
1263
1314
  return;
1264
1315
  }
1265
- const c = r.cloneNode(!0);
1266
- c.id = "panel-chrome-frozen", c.style.cssText = "position:absolute;left:8px;right:8px;top:8px;z-index:1;pointer-events:none;", t.appendChild(c), r.style.zIndex = "2", e.dispatch({ type: "OPEN_PANEL", panelId: e.panelId, trigger: e.trigger });
1267
- const u = _e("--panel-open-dur", nt), o = rt("--panel-easing", at), s = r.animate(
1316
+ const c = s.cloneNode(!0);
1317
+ c.id = "panel-chrome-frozen", c.style.cssText = "position:absolute;left:8px;right:8px;top:8px;z-index:1;pointer-events:none;", t.appendChild(c), s.style.zIndex = "2", e.dispatch({ type: "OPEN_PANEL", panelId: e.panelId, trigger: e.trigger });
1318
+ const p = Se("--panel-open-dur", at), r = ot("--panel-easing", st), i = s.animate(
1268
1319
  [{ transform: "translateY(100%)" }, { transform: "translateY(0)" }],
1269
- { duration: u, easing: o, fill: "forwards" }
1320
+ { duration: p, easing: r, fill: "forwards" }
1270
1321
  );
1271
- s.addEventListener(
1322
+ i.addEventListener(
1272
1323
  "finish",
1273
1324
  () => {
1274
- c.remove(), r.style.zIndex = "", s.cancel(), n?.({ branch: "slide-complete", frozen: "cleaned", timestamp: Date.now() });
1325
+ c.remove(), s.style.zIndex = "", i.cancel(), n?.({ branch: "slide-complete", frozen: "cleaned", timestamp: Date.now() });
1275
1326
  },
1276
1327
  { once: !0 }
1277
1328
  );
1278
1329
  }
1279
- function lt(e) {
1280
- const { mountEl: t, onAssert: r } = e;
1330
+ function it(e) {
1331
+ const { mountEl: t, onAssert: s } = e;
1281
1332
  if (t == null) {
1282
- e.dispatch({ type: "CLOSE_PANEL", reason: "mutex-handoff" }), setTimeout(() => B(e), de), r?.({ branch: "handoff-fallback-no-mount", timestamp: Date.now() });
1333
+ e.dispatch({ type: "CLOSE_PANEL", reason: "mutex-handoff" }), setTimeout(() => Y(e), ue), s?.({ branch: "handoff-fallback-no-mount", timestamp: Date.now() });
1283
1334
  return;
1284
1335
  }
1285
- const l = _e("--panel-close-dur", de);
1336
+ const l = Se("--panel-close-dur", ue);
1286
1337
  let n = !1, c = null;
1287
- const u = (s) => {
1288
- s.target !== t || s.propertyName !== "max-height" || n || (n = !0, c != null && clearTimeout(c), t.removeEventListener("transitionend", u), e.dispatch({ type: "OPEN_PANEL", panelId: e.panelId, trigger: e.trigger }), r?.({ branch: "handoff-complete", timestamp: Date.now() }));
1289
- }, o = () => {
1290
- n || (n = !0, t.removeEventListener("transitionend", u), e.dispatch({ type: "OPEN_PANEL", panelId: e.panelId, trigger: e.trigger }), r?.({ branch: "handoff-forced", timestamp: Date.now() }));
1338
+ const p = (i) => {
1339
+ i.target !== t || i.propertyName !== "max-height" || n || (n = !0, c != null && clearTimeout(c), t.removeEventListener("transitionend", p), e.dispatch({ type: "OPEN_PANEL", panelId: e.panelId, trigger: e.trigger }), s?.({ branch: "handoff-complete", timestamp: Date.now() }));
1340
+ }, r = () => {
1341
+ n || (n = !0, t.removeEventListener("transitionend", p), e.dispatch({ type: "OPEN_PANEL", panelId: e.panelId, trigger: e.trigger }), s?.({ branch: "handoff-forced", timestamp: Date.now() }));
1291
1342
  };
1292
- t.addEventListener("transitionend", u), e.dispatch({ type: "CLOSE_PANEL", reason: "mutex-handoff" }), c = setTimeout(o, l + st);
1343
+ t.addEventListener("transitionend", p), e.dispatch({ type: "CLOSE_PANEL", reason: "mutex-handoff" }), c = setTimeout(r, l + rt);
1293
1344
  }
1294
- function it(e) {
1295
- const { state: t, onAssert: r } = e;
1345
+ function ct(e) {
1346
+ const { state: t, onAssert: s } = e;
1296
1347
  if (t.activePanelId && t.isDirty) {
1297
- e.dispatch({ type: "OPEN_PANEL", panelId: e.panelId, trigger: e.trigger }), r?.({ branch: "blocked-dirty", timestamp: Date.now() });
1348
+ e.dispatch({ type: "OPEN_PANEL", panelId: e.panelId, trigger: e.trigger }), s?.({ branch: "blocked-dirty", timestamp: Date.now() });
1298
1349
  return;
1299
1350
  }
1300
- const l = ce(t.activeTrigger), n = ce(e.trigger);
1351
+ const l = de(t.activeTrigger), n = de(e.trigger);
1301
1352
  if (!!t.activePanelId && l != null && l === n) {
1302
- ot(e);
1353
+ lt(e);
1303
1354
  return;
1304
1355
  }
1305
1356
  if (t.activePanelId) {
1306
- lt(e);
1357
+ it(e);
1307
1358
  return;
1308
1359
  }
1309
- B(e), r?.({ branch: "fresh-open", timestamp: Date.now() });
1360
+ Y(e), s?.({ branch: "fresh-open", timestamp: Date.now() });
1310
1361
  }
1311
- function ct() {
1362
+ function dt() {
1312
1363
  if (!(typeof window > "u"))
1313
1364
  return window.__panelsAsserter;
1314
1365
  }
1315
- function Lt() {
1316
- const e = D(), t = X();
1366
+ function Mt() {
1367
+ const e = D(), t = J();
1317
1368
  return L(
1318
- (r, l) => {
1369
+ (s, l) => {
1319
1370
  if (!e)
1320
1371
  return;
1321
- const n = typeof document < "u" ? document.querySelector('[data-mount="panel"]') : null, c = typeof document < "u" ? document.querySelector('[data-chrome="panel"]') : null, u = {
1322
- panelId: r,
1372
+ const n = typeof document < "u" ? document.querySelector('[data-mount="panel"]') : null, c = typeof document < "u" ? document.querySelector('[data-chrome="panel"]') : null, p = {
1373
+ panelId: s,
1323
1374
  trigger: l,
1324
1375
  state: e.state,
1325
1376
  dispatch: e.dispatch,
1326
1377
  mountEl: n,
1327
1378
  chromeEl: c,
1328
1379
  reducedMotion: t,
1329
- onAssert: (o) => {
1330
- ct()?.recordTransition?.(o);
1380
+ onAssert: (r) => {
1381
+ dt()?.recordTransition?.(r);
1331
1382
  }
1332
1383
  };
1333
- it(u);
1384
+ ct(p);
1334
1385
  },
1335
1386
  [e, t]
1336
1387
  );
1337
1388
  }
1338
- function Mt({ children: e }) {
1389
+ function Ot({ children: e }) {
1339
1390
  return /* @__PURE__ */ a("div", { className: "clone-stage", children: e });
1340
1391
  }
1341
- let U = !1, K = null;
1342
- function Z() {
1392
+ let V = !1, q = null;
1393
+ function X() {
1343
1394
  const e = [];
1344
1395
  let t = "cleaned";
1345
1396
  document.querySelectorAll("#panel-chrome-frozen").length > 0 && (e.push("#panel-chrome-frozen"), t = "lingering");
@@ -1347,182 +1398,182 @@ function Z() {
1347
1398
  l.length > 1 && e.push(`mount-count=${l.length}`);
1348
1399
  const n = l[0] ?? null, c = n ? n.querySelectorAll(".gloss-panel-chrome") : [];
1349
1400
  c.length > 1 && e.push(`chrome-count=${c.length}`);
1350
- const u = c[0] ?? null;
1351
- if (u) {
1352
- const d = u.style.zIndex;
1353
- d !== "" && d !== "2" && e.push(`chrome-zindex=${d}`);
1401
+ const p = c[0] ?? null;
1402
+ if (p) {
1403
+ const u = p.style.zIndex;
1404
+ u !== "" && u !== "2" && e.push(`chrome-zindex=${u}`);
1354
1405
  }
1355
- const o = n ? "present" : "absent", s = u ? "present" : "absent";
1406
+ const r = n ? "present" : "absent", i = p ? "present" : "absent";
1356
1407
  return {
1357
1408
  valid: e.length === 0,
1358
- mount: o,
1359
- chrome: s,
1409
+ mount: r,
1410
+ chrome: i,
1360
1411
  frozen: t,
1361
1412
  orphans: e,
1362
1413
  timestamp: Date.now()
1363
1414
  };
1364
1415
  }
1365
- const q = "8px 8px 0px", Q = "64px", W = "inset(0px 0px 60px 0px)", G = "inset(0px -40px -40px -40px)";
1366
- function y(e, t, r, l, n) {
1367
- return { id: e, constraint: t, expected: r, actual: l, pass: n };
1416
+ const G = "8px 8px 0px", Q = "64px", W = "inset(0px 0px 60px 0px)", j = "inset(0px -40px -40px -40px)";
1417
+ function b(e, t, s, l, n) {
1418
+ return { id: e, constraint: t, expected: s, actual: l, pass: n };
1368
1419
  }
1369
1420
  function M(e) {
1370
1421
  const t = parseInt(e, 10);
1371
1422
  return Number.isFinite(t) ? t : NaN;
1372
1423
  }
1373
- function te() {
1374
- const e = [], t = document.querySelector(".gloss-panel-mount"), r = t?.querySelector(".gloss-panel-chrome") ?? null, l = document.querySelector(".gloss-panel-coordinator") ?? document.querySelector("[data-panel-coordinator]"), n = document.querySelector(".bell-cutout"), c = document.querySelector(".bell-popover"), u = document.querySelector(".gloss-bottom-toolbar");
1424
+ function ne() {
1425
+ const e = [], t = document.querySelector(".gloss-panel-mount"), s = t?.querySelector(".gloss-panel-chrome") ?? null, l = document.querySelector(".gloss-panel-coordinator") ?? document.querySelector("[data-panel-coordinator]"), n = document.querySelector(".bell-cutout"), c = document.querySelector(".bell-popover"), p = document.querySelector(".gloss-bottom-toolbar");
1375
1426
  if (!t)
1376
- e.push(y("C1", "mount --reveal-y matches clip-path inset-bottom Npx", "mount present", "absent", !1));
1427
+ e.push(b("C1", "mount --reveal-y matches clip-path inset-bottom Npx", "mount present", "absent", !1));
1377
1428
  else {
1378
- const o = getComputedStyle(t), s = o.getPropertyValue("--reveal-y").trim() || t.style.getPropertyValue("--reveal-y").trim(), i = o.clipPath || t.style.clipPath || "", d = i.match(/inset\(\s*0(?:px)?\s+0(?:px)?\s+(\d+)px\s+0(?:px)?\s*\)/), m = d ? parseInt(d[1], 10) : NaN, h = M(s), g = Number.isFinite(m) && Number.isFinite(h) && m === h;
1429
+ const r = getComputedStyle(t), i = r.getPropertyValue("--reveal-y").trim() || t.style.getPropertyValue("--reveal-y").trim(), o = r.clipPath || t.style.clipPath || "", u = o.match(/inset\(\s*0(?:px)?\s+0(?:px)?\s+(\d+)px\s+0(?:px)?\s*\)/), d = u ? parseInt(u[1], 10) : NaN, h = M(i), g = Number.isFinite(d) && Number.isFinite(h) && d === h;
1379
1430
  e.push(
1380
- y(
1431
+ b(
1381
1432
  "C1",
1382
1433
  "mount --reveal-y matches clip-path inset-bottom Npx",
1383
1434
  `inset(0 0 ${h}px 0) === --reveal-y(${h}px)`,
1384
- `--reveal-y=${s || "n/a"} clip-path=${i || "n/a"}`,
1435
+ `--reveal-y=${i || "n/a"} clip-path=${o || "n/a"}`,
1385
1436
  g
1386
1437
  )
1387
1438
  );
1388
1439
  }
1389
1440
  if (!t)
1390
- e.push(y("C2", "mount padding constant", q, "absent", !1));
1441
+ e.push(b("C2", "mount padding constant", G, "absent", !1));
1391
1442
  else {
1392
- const o = t.style.padding, s = getComputedStyle(t), i = o || s.padding || "", d = i === q || i === "8px 8px 0px 8px";
1393
- e.push(y("C2", "mount padding constant", q, i || "n/a", d));
1443
+ const r = t.style.padding, i = getComputedStyle(t), o = r || i.padding || "", u = o === G || o === "8px 8px 0px 8px";
1444
+ e.push(b("C2", "mount padding constant", G, o || "n/a", u));
1394
1445
  }
1395
1446
  if (!t)
1396
- e.push(y("C3", "mount.bottom resolves to var(--tb-h)=64px", Q, "absent", !1));
1447
+ e.push(b("C3", "mount.bottom resolves to var(--tb-h)=64px", Q, "absent", !1));
1397
1448
  else {
1398
- const s = getComputedStyle(t).bottom || t.style.bottom || "", i = s === Q;
1399
- e.push(y("C3", "mount.bottom resolves to var(--tb-h)=64px", Q, s || "n/a", i));
1449
+ const i = getComputedStyle(t).bottom || t.style.bottom || "", o = i === Q;
1450
+ e.push(b("C3", "mount.bottom resolves to var(--tb-h)=64px", Q, i || "n/a", o));
1400
1451
  }
1401
- if (!r)
1402
- e.push(y("C4", "panel-chrome height formula = (row-h*3)+(row-gap*3)-8px", "formula match", "absent", !1));
1452
+ if (!s)
1453
+ e.push(b("C4", "panel-chrome height formula = (row-h*3)+(row-gap*3)-8px", "formula match", "absent", !1));
1403
1454
  else {
1404
- const o = getComputedStyle(r), s = M(
1405
- o.getPropertyValue("--row-h").trim() || r.style.getPropertyValue("--row-h").trim() || "0"
1406
- ), i = M(
1407
- o.getPropertyValue("--row-gap").trim() || r.style.getPropertyValue("--row-gap").trim() || "0"
1408
- ), d = s * 3 + i * 3 - 8, m = M(o.height || r.style.height || ""), h = Number.isFinite(s) && Number.isFinite(i) && Number.isFinite(m) && Number.isFinite(d) && m === d;
1455
+ const r = getComputedStyle(s), i = M(
1456
+ r.getPropertyValue("--row-h").trim() || s.style.getPropertyValue("--row-h").trim() || "0"
1457
+ ), o = M(
1458
+ r.getPropertyValue("--row-gap").trim() || s.style.getPropertyValue("--row-gap").trim() || "0"
1459
+ ), u = i * 3 + o * 3 - 8, d = M(r.height || s.style.height || ""), h = Number.isFinite(i) && Number.isFinite(o) && Number.isFinite(d) && Number.isFinite(u) && d === u;
1409
1460
  e.push(
1410
- y(
1461
+ b(
1411
1462
  "C4",
1412
1463
  "panel-chrome height formula = (row-h*3)+(row-gap*3)-8px",
1413
- `${d}px (rh=${s} rg=${i})`,
1414
- `${m}px`,
1464
+ `${u}px (rh=${i} rg=${o})`,
1465
+ `${d}px`,
1415
1466
  h
1416
1467
  )
1417
1468
  );
1418
1469
  }
1419
- if (!l || !r)
1470
+ if (!l || !s)
1420
1471
  e.push(
1421
- y(
1472
+ b(
1422
1473
  "C5",
1423
1474
  'coordinator perspective + origin "center bottom"; chrome perspective-style flat',
1424
1475
  "present",
1425
- `coordinator=${l ? "present" : "absent"} chrome=${r ? "present" : "absent"}`,
1476
+ `coordinator=${l ? "present" : "absent"} chrome=${s ? "present" : "absent"}`,
1426
1477
  !1
1427
1478
  )
1428
1479
  );
1429
1480
  else {
1430
- const o = getComputedStyle(l), s = getComputedStyle(r), i = o.perspective || l.style.perspective || "", d = (o.perspectiveOrigin || l.style.perspectiveOrigin || "").trim(), m = s.perspectiveStyle || r.style.perspectiveStyle || "", v = i !== "" && i !== "none" && (d === "center bottom" || d === "50% 100%") && m === "flat";
1481
+ const r = getComputedStyle(l), i = getComputedStyle(s), o = r.perspective || l.style.perspective || "", u = (r.perspectiveOrigin || l.style.perspectiveOrigin || "").trim(), d = i.perspectiveStyle || s.style.perspectiveStyle || "", _ = o !== "" && o !== "none" && (u === "center bottom" || u === "50% 100%") && d === "flat";
1431
1482
  e.push(
1432
- y(
1483
+ b(
1433
1484
  "C5",
1434
1485
  'coordinator perspective + origin "center bottom"; chrome perspective-style flat',
1435
1486
  "perspective:not-none, origin:center bottom, chrome-style:flat",
1436
- `perspective=${i} origin=${d} chrome-style=${m}`,
1437
- v
1487
+ `perspective=${o} origin=${u} chrome-style=${d}`,
1488
+ _
1438
1489
  )
1439
1490
  );
1440
1491
  }
1441
1492
  {
1442
- let o = !1, s = "absent";
1493
+ let r = !1, i = "absent";
1443
1494
  try {
1444
- for (const i of Array.from(document.styleSheets)) {
1445
- let d = [];
1495
+ for (const o of Array.from(document.styleSheets)) {
1496
+ let u = [];
1446
1497
  try {
1447
- d = Array.from(i.cssRules ?? []);
1498
+ u = Array.from(o.cssRules ?? []);
1448
1499
  } catch {
1449
1500
  continue;
1450
1501
  }
1451
- for (const m of d)
1452
- if (m.name === "stage-spin") {
1453
- const g = Array.from(m.cssRules), p = g.find((C) => C.keyText === "0%" || C.keyText === "from"), v = g.find((C) => C.keyText === "100%" || C.keyText === "to"), w = p?.style.transform ?? "", _ = v?.style.transform ?? "", S = /rotateY\(\s*0(?:deg)?\s*\)/;
1454
- o = S.test(w) && S.test(_), s = `0%=${w || "n/a"} 100%=${_ || "n/a"}`;
1502
+ for (const d of u)
1503
+ if (d.name === "stage-spin") {
1504
+ const g = Array.from(d.cssRules), m = g.find((C) => C.keyText === "0%" || C.keyText === "from"), _ = g.find((C) => C.keyText === "100%" || C.keyText === "to"), v = m?.style.transform ?? "", N = _?.style.transform ?? "", w = /rotateY\(\s*0(?:deg)?\s*\)/;
1505
+ r = w.test(v) && w.test(N), i = `0%=${v || "n/a"} 100%=${N || "n/a"}`;
1455
1506
  break;
1456
1507
  }
1457
- if (s !== "absent") break;
1508
+ if (i !== "absent") break;
1458
1509
  }
1459
1510
  } catch {
1460
- s = "inspection-error";
1511
+ i = "inspection-error";
1461
1512
  }
1462
1513
  e.push(
1463
- y(
1514
+ b(
1464
1515
  "C6",
1465
1516
  "@keyframes stage-spin 0% AND 100% anchor at rotateY(0)",
1466
1517
  "both frames rotateY(0)",
1467
- s,
1468
- o
1518
+ i,
1519
+ r
1469
1520
  )
1470
1521
  );
1471
1522
  }
1472
1523
  {
1473
- const o = document.documentElement, s = getComputedStyle(o), i = s.getPropertyValue("--panel-open-dur").trim() || o.style.getPropertyValue("--panel-open-dur").trim(), d = s.getPropertyValue("--panel-close-dur").trim() || o.style.getPropertyValue("--panel-close-dur").trim(), m = M(i) || parseFloat(i) * (i.endsWith("s") && !i.endsWith("ms") ? 1e3 : 1), h = M(d) || parseFloat(d) * (d.endsWith("s") && !d.endsWith("ms") ? 1e3 : 1), g = Number.isFinite(m) && Number.isFinite(h) && m > h;
1524
+ const r = document.documentElement, i = getComputedStyle(r), o = i.getPropertyValue("--panel-open-dur").trim() || r.style.getPropertyValue("--panel-open-dur").trim(), u = i.getPropertyValue("--panel-close-dur").trim() || r.style.getPropertyValue("--panel-close-dur").trim(), d = M(o) || parseFloat(o) * (o.endsWith("s") && !o.endsWith("ms") ? 1e3 : 1), h = M(u) || parseFloat(u) * (u.endsWith("s") && !u.endsWith("ms") ? 1e3 : 1), g = Number.isFinite(d) && Number.isFinite(h) && d > h;
1474
1525
  e.push(
1475
- y("C7", "--panel-open-dur > --panel-close-dur", "open > close", `open=${i || "n/a"} close=${d || "n/a"}`, g)
1526
+ b("C7", "--panel-open-dur > --panel-close-dur", "open > close", `open=${o || "n/a"} close=${u || "n/a"}`, g)
1476
1527
  );
1477
1528
  }
1478
1529
  if (!n)
1479
- e.push(y("C8", "BellCutout zero computed animation/transition", "no inline timing", "absent", !1));
1530
+ e.push(b("C8", "BellCutout zero computed animation/transition", "no inline timing", "absent", !1));
1480
1531
  else {
1481
- const o = getComputedStyle(n), s = o.animationName || "", i = o.transitionProperty || "", d = (s === "" || s === "none") && (i === "" || i === "none" || i === "all");
1532
+ const r = getComputedStyle(n), i = r.animationName || "", o = r.transitionProperty || "", u = (i === "" || i === "none") && (o === "" || o === "none" || o === "all");
1482
1533
  e.push(
1483
- y(
1534
+ b(
1484
1535
  "C8",
1485
1536
  "BellCutout zero computed animation/transition",
1486
1537
  "animation:none AND transition:none",
1487
- `animation=${s || "n/a"} transition=${i || "n/a"}`,
1488
- d
1538
+ `animation=${i || "n/a"} transition=${o || "n/a"}`,
1539
+ u
1489
1540
  )
1490
1541
  );
1491
1542
  }
1492
1543
  if (!t)
1493
- e.push(y("C9", "mount closed-state clipPath", W, "absent", !1));
1544
+ e.push(b("C9", "mount closed-state clipPath", W, "absent", !1));
1494
1545
  else {
1495
- const o = t.style.clipPath, s = getComputedStyle(t), i = o || s.clipPath || "", d = i === W;
1496
- e.push(y("C9", "mount closed-state clipPath", W, i || "n/a", d));
1546
+ const r = t.style.clipPath, i = getComputedStyle(t), o = r || i.clipPath || "", u = o === W;
1547
+ e.push(b("C9", "mount closed-state clipPath", W, o || "n/a", u));
1497
1548
  }
1498
1549
  if (!c)
1499
- e.push(y("C10", "bell-popover parentElement === document.body (open)", "body", "absent", !1));
1550
+ e.push(b("C10", "bell-popover parentElement === document.body (open)", "body", "absent", !1));
1500
1551
  else {
1501
- const o = c.parentElement, s = o === document.body;
1552
+ const r = c.parentElement, i = r === document.body;
1502
1553
  e.push(
1503
- y(
1554
+ b(
1504
1555
  "C10",
1505
1556
  "bell-popover parentElement === document.body (open)",
1506
1557
  "body",
1507
- o === document.body ? "body" : o?.tagName ?? "n/a",
1508
- s
1558
+ r === document.body ? "body" : r?.tagName ?? "n/a",
1559
+ i
1509
1560
  )
1510
1561
  );
1511
1562
  }
1512
1563
  if (!l)
1513
- e.push(y("C11", "coordinator overflow === visible", "visible", "absent", !1));
1564
+ e.push(b("C11", "coordinator overflow === visible", "visible", "absent", !1));
1514
1565
  else {
1515
- const s = getComputedStyle(l).overflow || l.style.overflow || "", i = s === "visible";
1516
- e.push(y("C11", "coordinator overflow === visible", "visible", s || "n/a", i));
1566
+ const i = getComputedStyle(l).overflow || l.style.overflow || "", o = i === "visible";
1567
+ e.push(b("C11", "coordinator overflow === visible", "visible", i || "n/a", o));
1517
1568
  }
1518
- if (!u)
1519
- e.push(y("C12", "toolbar clipPath = inset(0 -40 -40 -40)", G, "absent", !1));
1569
+ if (!p)
1570
+ e.push(b("C12", "toolbar clipPath = inset(0 -40 -40 -40)", j, "absent", !1));
1520
1571
  else {
1521
- const o = u.style.clipPath, s = getComputedStyle(u), i = o || s.clipPath || "", d = i === G;
1522
- e.push(y("C12", "toolbar clipPath = inset(0 -40 -40 -40)", G, i || "n/a", d));
1572
+ const r = p.style.clipPath, i = getComputedStyle(p), o = r || i.clipPath || "", u = o === j;
1573
+ e.push(b("C12", "toolbar clipPath = inset(0 -40 -40 -40)", j, o || "n/a", u));
1523
1574
  }
1524
1575
  return e.push(
1525
- y(
1576
+ b(
1526
1577
  "C13",
1527
1578
  "same-position slide via WAAPI (mid-transition getAnimations().length > 0)",
1528
1579
  "WAAPI driver wired in orchestrator (source-proof)",
@@ -1530,7 +1581,7 @@ function te() {
1530
1581
  "wiring_only"
1531
1582
  )
1532
1583
  ), e.push(
1533
- y(
1584
+ b(
1534
1585
  "C14",
1535
1586
  'cross-position handoff transitionend filtered by propertyName="max-height"',
1536
1587
  "transitionend filter wired in orchestrator (source-proof)",
@@ -1539,11 +1590,11 @@ function te() {
1539
1590
  )
1540
1591
  ), e;
1541
1592
  }
1542
- function dt(e) {
1543
- return te().find((t) => t.id === e);
1593
+ function ut(e) {
1594
+ return ne().find((t) => t.id === e);
1544
1595
  }
1545
- function ut() {
1546
- const e = Z();
1596
+ function pt() {
1597
+ const e = X();
1547
1598
  return { q12: [
1548
1599
  {
1549
1600
  id: "Q12-12",
@@ -1552,84 +1603,84 @@ function ut() {
1552
1603
  actual: `valid=${e.valid} mount=${e.mount} chrome=${e.chrome} frozen=${e.frozen} orphans=[${e.orphans.join(",")}]`,
1553
1604
  pass: e.valid
1554
1605
  }
1555
- ], cc: te() };
1606
+ ], cc: ne() };
1556
1607
  }
1557
- function pt() {
1608
+ function mt() {
1558
1609
  return {
1559
- enable: mt,
1560
- disable: ht,
1561
- isEnabled: () => U,
1562
- getLastReport: () => K,
1610
+ enable: ht,
1611
+ disable: ft,
1612
+ isEnabled: () => V,
1613
+ getLastReport: () => q,
1563
1614
  recordTransition: (e) => {
1564
- U && (K = { ...e, ...Z() });
1615
+ V && (q = { ...e, ...X() });
1565
1616
  },
1566
1617
  assertOnce: () => {
1567
- const e = Z();
1568
- return K = e, e;
1618
+ const e = X();
1619
+ return q = e, e;
1569
1620
  },
1570
- assertCcOnly: te,
1571
- getCcRowById: dt,
1572
- assertPanelTruths: ut
1621
+ assertCcOnly: ne,
1622
+ getCcRowById: ut,
1623
+ assertPanelTruths: pt
1573
1624
  };
1574
1625
  }
1575
- function mt() {
1576
- if (U = !0, typeof window > "u") return;
1577
- window.__panelsAsserter || (window.__panelsAsserter = pt(), console.info(
1626
+ function ht() {
1627
+ if (V = !0, typeof window > "u") return;
1628
+ window.__panelsAsserter || (window.__panelsAsserter = mt(), console.info(
1578
1629
  "[panels] asserter enabled (P3b Q12-12 + P6 W5 cc:C1..C14). Inspect via window.__panelsAsserter."
1579
1630
  ));
1580
1631
  }
1581
- function ht() {
1582
- U = !1;
1632
+ function ft() {
1633
+ V = !1;
1583
1634
  }
1584
1635
  export {
1585
1636
  Rt as COMMITS,
1586
- Tt as CatalogAddShell,
1587
- wt as CatalogFooter,
1588
- xt as CatalogReplaceShell,
1589
- J as CatalogStateContext,
1590
- he as CloneCard,
1591
- Mt as CloneStage,
1592
- ge as MOCK_DEFAULT_LENS,
1593
- fe as MOCK_LENSES,
1594
- ye as MOCK_LENS_META,
1595
- Ze as MOCK_PAGES,
1596
- be as MOCK_TILES_BY_LENS,
1597
- qe as MetricInfoShell,
1598
- $t as NotificationCenterShell,
1599
- At as PANEL_IDS,
1600
- je as PageMgmtFooter,
1601
- Et as PageMgmtShell,
1602
- Ce as PageMgmtStateContext,
1603
- Ft as PanelBody,
1637
+ xt as CatalogAddShell,
1638
+ Tt as CatalogFooter,
1639
+ Et as CatalogReplaceShell,
1640
+ ee as CatalogStateContext,
1641
+ fe as CloneCard,
1642
+ Ot as CloneStage,
1643
+ ye as MOCK_DEFAULT_LENS,
1644
+ ge as MOCK_LENSES,
1645
+ be as MOCK_LENS_META,
1646
+ Xe as MOCK_PAGES,
1647
+ ve as MOCK_TILES_BY_LENS,
1648
+ Ge as MetricInfoShell,
1649
+ Ft as NotificationCenterShell,
1650
+ Dt as PANEL_IDS,
1651
+ Ze as PageMgmtFooter,
1652
+ At as PageMgmtShell,
1653
+ _e as PageMgmtStateContext,
1654
+ zt as PanelBody,
1604
1655
  z as PanelChromeV2,
1605
- zt as PanelFooter,
1606
- St as PanelFooterMessage,
1607
- Ht as PanelHeader,
1608
- Bt as PanelHost,
1609
- Dt as PanelHostShell,
1656
+ Ht as PanelFooter,
1657
+ Pt as PanelFooterMessage,
1658
+ Bt as PanelHeader,
1659
+ Yt as PanelHost,
1660
+ kt as PanelHostShell,
1610
1661
  Ee as PanelMount,
1611
- Ut as PanelNavigation,
1612
- Yt as PanelProvider,
1613
- kt as PanelSlot,
1614
- Vt as PanelStage,
1615
- Pt as SettingsShell,
1616
- te as assertCcOnly,
1617
- Z as assertPanelDomShape,
1618
- ut as assertPanelTruths,
1619
- Kt as deriveSurfaceState,
1620
- ht as disablePanelAsserter,
1621
- mt as enablePanelAsserter,
1622
- dt as getCcRowById,
1623
- qt as initialState,
1624
- ce as positionKey,
1662
+ Vt as PanelNavigation,
1663
+ Ut as PanelProvider,
1664
+ Lt as PanelSlot,
1665
+ Kt as PanelStage,
1666
+ wt as SettingsShell,
1667
+ ne as assertCcOnly,
1668
+ X as assertPanelDomShape,
1669
+ pt as assertPanelTruths,
1670
+ qt as deriveSurfaceState,
1671
+ ft as disablePanelAsserter,
1672
+ ht as enablePanelAsserter,
1673
+ ut as getCcRowById,
1674
+ Gt as initialState,
1675
+ de as positionKey,
1625
1676
  Qt as reducer,
1626
- it as transitionToPanel,
1627
- ee as useCatalogState,
1628
- _t as useEditingCardId,
1677
+ ct as transitionToPanel,
1678
+ te as useCatalogState,
1679
+ St as useEditingCardId,
1629
1680
  Ne as usePageMgmtState,
1630
1681
  xe as usePanelContext,
1631
1682
  D as usePanelContextOptional,
1632
1683
  Wt as usePanelCoordinator,
1633
- X as useReducedMotionPanel,
1634
- Lt as useTransitionToPanel
1684
+ J as useReducedMotionPanel,
1685
+ Mt as useTransitionToPanel
1635
1686
  };