@mt-gloss/ui 0.1.137 → 0.1.139

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