@mt-gloss/ui 0.1.106 → 0.1.108

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,25 +1,29 @@
1
- import { u as I, f as q, S as se, a as oe, g as E, c as A } from "./COMMITS-kaUvc5jL.js";
2
- import { C as Je, b as Ze, P as et, e as tt, i as nt, r as st, d as ot } from "./COMMITS-kaUvc5jL.js";
3
- import { jsx as s, jsxs as p, Fragment as ae } from "react/jsx-runtime";
4
- import z, { useState as b, useRef as U, createContext as Y, useContext as K, useEffect as V, useLayoutEffect as re, useCallback as W } from "react";
5
- function Be() {
6
- const e = I();
1
+ import { u as k, f as X, S as fe, a as ge, g as x, c as T } from "./COMMITS-DG0Q_9DU.js";
2
+ import { C as Et, b as At, P as xt, e as Tt, i as Ot, r as Lt, d as kt } from "./COMMITS-DG0Q_9DU.js";
3
+ import { jsx as a, jsxs as h, Fragment as J } from "react/jsx-runtime";
4
+ import B, { useState as C, useRef as I, createContext as Z, useContext as ee, useMemo as Y, useEffect as A, useCallback as E, useLayoutEffect as ve } from "react";
5
+ import { useSensors as be, useSensor as W, PointerSensor as ye, KeyboardSensor as Se, DndContext as Ce, closestCenter as _e } from "@dnd-kit/core";
6
+ import { sortableKeyboardCoordinates as Ne, SortableContext as we, horizontalListSortingStrategy as Pe, arrayMove as Ee, useSortable as Ae } from "@dnd-kit/sortable";
7
+ import { CSS as xe } from "@dnd-kit/utilities";
8
+ import { M as G } from "./MetricCard-Cyoxhb_S.js";
9
+ function ft() {
10
+ const e = k();
7
11
  if (e?.state.activePanelId !== "settings") return null;
8
12
  const t = e.state.activeTrigger;
9
13
  return t?.kind === "card-overflow" ? t.cardId : null;
10
14
  }
11
- function le({ children: e }) {
12
- return /* @__PURE__ */ s("div", { className: "clone-stage", children: e });
15
+ function Te({ children: e }) {
16
+ return /* @__PURE__ */ a("div", { className: "clone-stage", children: e });
13
17
  }
14
- function ie({ span: e, rotating: t = !0, children: o }) {
18
+ function Oe({ span: e, rotating: t = !0, children: r }) {
15
19
  const n = ["clone-card", `span-${e}`, t ? "rotating" : ""].filter(Boolean).join(" ");
16
- return /* @__PURE__ */ s("div", { className: n, children: o });
20
+ return /* @__PURE__ */ a("div", { className: n, children: r });
17
21
  }
18
- function ce({ value: e, onChange: t }) {
19
- return /* @__PURE__ */ p("div", { className: "settings-shell__field settings-shell__field--threshold", children: [
20
- /* @__PURE__ */ s("span", { className: "settings-shell__label", "aria-hidden": "true", children: "Alert level (%)" }),
21
- /* @__PURE__ */ p("div", { className: "settings-shell__slider-row", children: [
22
- /* @__PURE__ */ s(
22
+ function Le({ value: e, onChange: t }) {
23
+ return /* @__PURE__ */ h("div", { className: "settings-shell__field settings-shell__field--threshold", children: [
24
+ /* @__PURE__ */ a("span", { className: "settings-shell__label", "aria-hidden": "true", children: "Alert level (%)" }),
25
+ /* @__PURE__ */ h("div", { className: "settings-shell__slider-row", children: [
26
+ /* @__PURE__ */ a(
23
27
  "input",
24
28
  {
25
29
  id: "settings-threshold-input",
@@ -35,18 +39,18 @@ function ce({ value: e, onChange: t }) {
35
39
  className: "settings-shell__slider"
36
40
  }
37
41
  ),
38
- /* @__PURE__ */ p("span", { className: "settings-shell__slider-value", "aria-live": "polite", children: [
42
+ /* @__PURE__ */ h("span", { className: "settings-shell__slider-value", "aria-live": "polite", children: [
39
43
  e,
40
44
  "%"
41
45
  ] })
42
46
  ] })
43
47
  ] });
44
48
  }
45
- function de({ value: e, onChange: t }) {
46
- return /* @__PURE__ */ p("div", { className: "settings-shell__field settings-shell__field--timeframe", children: [
47
- /* @__PURE__ */ s("span", { className: "settings-shell__label", "aria-hidden": "true", children: "Rolling period (days)" }),
48
- /* @__PURE__ */ p("div", { className: "settings-shell__slider-row", children: [
49
- /* @__PURE__ */ s(
49
+ function ke({ value: e, onChange: t }) {
50
+ return /* @__PURE__ */ h("div", { className: "settings-shell__field settings-shell__field--timeframe", children: [
51
+ /* @__PURE__ */ a("span", { className: "settings-shell__label", "aria-hidden": "true", children: "Rolling period (days)" }),
52
+ /* @__PURE__ */ h("div", { className: "settings-shell__slider-row", children: [
53
+ /* @__PURE__ */ a(
50
54
  "input",
51
55
  {
52
56
  id: "settings-timeframe-input",
@@ -62,101 +66,580 @@ function de({ value: e, onChange: t }) {
62
66
  className: "settings-shell__slider"
63
67
  }
64
68
  ),
65
- /* @__PURE__ */ p("span", { className: "settings-shell__slider-value", "aria-live": "polite", children: [
69
+ /* @__PURE__ */ h("span", { className: "settings-shell__slider-value", "aria-live": "polite", children: [
66
70
  e,
67
71
  " days"
68
72
  ] })
69
73
  ] })
70
74
  ] });
71
75
  }
72
- const ue = ["Orders", "Quota", "Unassigned"];
73
- function pe() {
74
- return /* @__PURE__ */ p("div", { className: "settings-shell__field settings-shell__field--slots", "aria-label": "Stack slots (display only)", children: [
75
- /* @__PURE__ */ s("p", { className: "settings-shell__help", children: "Slots are currently fixed. Drag-to-reorder is coming in a later phase." }),
76
- /* @__PURE__ */ s("ul", { className: "settings-shell__slots-list", children: ue.map((e) => /* @__PURE__ */ s("li", { className: "settings-shell__slot-pill", children: e }, e)) })
76
+ function Ie({ id: e, onRemove: t }) {
77
+ const { attributes: r, listeners: n, setNodeRef: d, transform: i, transition: u, isDragging: l } = Ae({ id: e }), s = {
78
+ transform: xe.Transform.toString(i),
79
+ transition: u,
80
+ opacity: l ? 0.6 : 1
81
+ };
82
+ return /* @__PURE__ */ h(
83
+ "li",
84
+ {
85
+ ref: d,
86
+ style: s,
87
+ className: `settings-shell__slot-pill${l ? " settings-shell__slot-pill--dragging" : ""}`,
88
+ children: [
89
+ /* @__PURE__ */ a(
90
+ "button",
91
+ {
92
+ type: "button",
93
+ className: "settings-shell__slot-pill__handle",
94
+ "aria-label": `Reorder ${e}`,
95
+ ...r,
96
+ ...n,
97
+ children: /* @__PURE__ */ a("span", { "aria-hidden": "true", className: "settings-shell__slot-pill__grip", children: "⋮⋮" })
98
+ }
99
+ ),
100
+ /* @__PURE__ */ a("span", { className: "settings-shell__slot-pill__label", children: e }),
101
+ /* @__PURE__ */ a(
102
+ "button",
103
+ {
104
+ type: "button",
105
+ className: "settings-shell__slot-pill__remove",
106
+ "aria-label": `Remove ${e}`,
107
+ onClick: t,
108
+ children: "×"
109
+ }
110
+ )
111
+ ]
112
+ }
113
+ );
114
+ }
115
+ function De({ value: e, onChange: t }) {
116
+ const r = be(
117
+ W(ye, { activationConstraint: { distance: 4 } }),
118
+ W(Se, { coordinateGetter: Ne })
119
+ ), n = (i) => {
120
+ const { active: u, over: l } = i;
121
+ if (!l || u.id === l.id) return;
122
+ const s = e.findIndex((c) => c === u.id), o = e.findIndex((c) => c === l.id);
123
+ s === -1 || o === -1 || t(Ee([...e], s, o));
124
+ }, d = (i) => {
125
+ t(e.filter((u) => u !== i));
126
+ };
127
+ return /* @__PURE__ */ h("div", { className: "settings-shell__field settings-shell__field--slots", "aria-label": "Stack slots", children: [
128
+ /* @__PURE__ */ a("span", { className: "settings-shell__label", children: "Stack slots" }),
129
+ /* @__PURE__ */ a(Ce, { sensors: r, collisionDetection: _e, onDragEnd: n, children: /* @__PURE__ */ a(we, { items: [...e], strategy: Pe, children: /* @__PURE__ */ a("ul", { className: "settings-shell__slots-list", role: "list", children: e.map((i) => /* @__PURE__ */ a(Ie, { id: i, onRemove: () => d(i) }, i)) }) }) }),
130
+ e.length === 0 && /* @__PURE__ */ a("p", { className: "settings-shell__help", children: "All slots removed. Apply to commit, or Reset to restore." }),
131
+ /* @__PURE__ */ a("p", { className: "settings-shell__help settings-shell__help--small", children: "Drag to reorder · click × to remove" })
77
132
  ] });
78
133
  }
79
- const me = ["#1d6fd8", "#10b981", "#f59e0b", "#ef4444", "#8b5cf6"];
80
- function he({ value: e, onSelect: t }) {
81
- return /* @__PURE__ */ p("div", { className: "settings-shell__field settings-shell__field--color", role: "group", "aria-label": "Accent color", children: [
82
- /* @__PURE__ */ s("span", { className: "settings-shell__label", children: "Accent color" }),
83
- /* @__PURE__ */ s("div", { className: "settings-shell__swatch-row", children: me.map((o) => {
84
- const n = e === o;
85
- return /* @__PURE__ */ s(
134
+ const Me = ["#1d6fd8", "#10b981", "#f59e0b", "#ef4444", "#8b5cf6"];
135
+ function $e({ value: e, onSelect: t }) {
136
+ return /* @__PURE__ */ h("div", { className: "settings-shell__field settings-shell__field--color", role: "group", "aria-label": "Accent color", children: [
137
+ /* @__PURE__ */ a("span", { className: "settings-shell__label", children: "Accent color" }),
138
+ /* @__PURE__ */ a("div", { className: "settings-shell__swatch-row", children: Me.map((r) => {
139
+ const n = e === r;
140
+ return /* @__PURE__ */ a(
86
141
  "button",
87
142
  {
88
143
  type: "button",
89
144
  "aria-pressed": n,
90
- "aria-label": `Accent ${o}`,
145
+ "aria-label": `Accent ${r}`,
91
146
  className: `settings-shell__swatch${n ? " settings-shell__swatch--active" : ""}`,
92
- style: { backgroundColor: o },
93
- onClick: () => t(o)
147
+ style: { backgroundColor: r },
148
+ onClick: () => t(r)
94
149
  },
95
- o
150
+ r
96
151
  );
97
152
  }) })
98
153
  ] });
99
154
  }
100
- const fe = ["threshold", "timeframe", "color"];
101
- function He({
155
+ const Re = ["Orders", "Quota", "Unassigned"], Fe = ["threshold", "timeframe", "color"];
156
+ function gt({
102
157
  isOpen: e,
103
158
  cardSpan: t,
104
- cardLabel: o = "Metric",
159
+ cardLabel: r = "Metric",
105
160
  cardValue: n = "—",
106
- dimensions: r = fe,
107
- initialTab: l
161
+ previewSlot: d,
162
+ dimensions: i = Fe,
163
+ initialTab: u,
164
+ initialValues: l
108
165
  }) {
109
- const d = I(), i = d?.state.activeTrigger, a = i?.kind === "card-overflow" ? i.cardId : null, c = q(), u = i?.span, h = t ?? u ?? 1, g = r[0] ?? "threshold", [f, y] = z.useState(l ?? g);
110
- z.useEffect(() => {
111
- r.includes(f) || y(g);
112
- }, [r, f, g]);
113
- const v = a != null ? d?.state?.bufferByCard?.[a]?.changes ?? {} : {}, N = typeof v.threshold == "number" ? v.threshold : 80, S = typeof v.timeframe == "number" ? v.timeframe : 30, w = typeof v.accent == "string" ? v.accent : null, C = (_) => {
114
- a == null || d == null || d.dispatch({ type: "SET_BUFFER_VALUE", cardId: a, key: "threshold", value: Number(_.target.value) });
115
- }, te = (_) => {
116
- a == null || d == null || d.dispatch({ type: "SET_BUFFER_VALUE", cardId: a, key: "timeframe", value: Number(_.target.value) });
117
- }, ne = (_) => {
118
- a == null || d == null || d.dispatch({ type: "SET_BUFFER_VALUE", cardId: a, key: "accent", value: _ });
166
+ const s = k(), o = s?.state.activeTrigger, c = o?.kind === "card-overflow" ? o.cardId : null, p = X(), m = o?.span, v = t ?? m ?? 1, y = i[0] ?? "threshold", [b, _] = B.useState(u ?? y);
167
+ B.useEffect(() => {
168
+ i.includes(b) || _(y);
169
+ }, [i, b, y]);
170
+ const g = c != null ? s?.state?.bufferByCard?.[c]?.changes ?? {} : {}, S = typeof g.threshold == "number" ? g.threshold : typeof l?.threshold == "number" ? l.threshold : 80, ie = typeof g.timeframe == "number" ? g.timeframe : typeof l?.timeframe == "number" ? l.timeframe : 30, ce = typeof g.accent == "string" ? g.accent : typeof l?.accent == "string" ? l.accent : null, de = Array.isArray(g.slots) ? g.slots : Array.isArray(l?.slots) ? l.slots : Re, ue = (w) => {
171
+ c == null || s == null || s.dispatch({ type: "SET_BUFFER_VALUE", cardId: c, key: "threshold", value: Number(w.target.value) });
172
+ }, pe = (w) => {
173
+ c == null || s == null || s.dispatch({ type: "SET_BUFFER_VALUE", cardId: c, key: "timeframe", value: Number(w.target.value) });
174
+ }, me = (w) => {
175
+ c == null || s == null || s.dispatch({ type: "SET_BUFFER_VALUE", cardId: c, key: "accent", value: w });
176
+ }, he = (w) => {
177
+ c == null || s == null || s.dispatch({ type: "SET_BUFFER_VALUE", cardId: c, key: "slots", value: w });
119
178
  };
120
- return /* @__PURE__ */ p("div", { className: "settings-shell", "data-shell": "settings", "aria-hidden": !e, children: [
121
- /* @__PURE__ */ s("div", { "aria-hidden": "true", children: /* @__PURE__ */ s(le, { children: /* @__PURE__ */ p(ie, { span: h, rotating: !c, children: [
122
- /* @__PURE__ */ s("div", { style: { fontSize: 9, textTransform: "uppercase", letterSpacing: "0.06em", color: "#9ca3af", marginBottom: 6 }, children: o }),
123
- /* @__PURE__ */ s("div", { style: { fontSize: 22, fontWeight: 700, color: "#111827", lineHeight: 1 }, children: n })
124
- ] }) }) }),
125
- /* @__PURE__ */ s(
126
- se,
179
+ return /* @__PURE__ */ h("div", { className: "settings-shell", "data-shell": "settings", "aria-hidden": !e, children: [
180
+ /* @__PURE__ */ a("div", { "aria-hidden": "true", children: /* @__PURE__ */ a(Te, { children: /* @__PURE__ */ a(Oe, { span: v, rotating: !p, children: d ?? /* @__PURE__ */ h(J, { children: [
181
+ /* @__PURE__ */ a("div", { style: { fontSize: 9, textTransform: "uppercase", letterSpacing: "0.06em", color: "#9ca3af", marginBottom: 6 }, children: r }),
182
+ /* @__PURE__ */ a("div", { style: { fontSize: 22, fontWeight: 700, color: "#111827", lineHeight: 1 }, children: n })
183
+ ] }) }) }) }),
184
+ /* @__PURE__ */ a(
185
+ fe,
127
186
  {
128
- dimensions: r,
129
- activeTab: f,
130
- onSelect: y,
131
- reduced: c
187
+ dimensions: i,
188
+ activeTab: b,
189
+ onSelect: _,
190
+ reduced: p
132
191
  }
133
192
  ),
134
- /* @__PURE__ */ p(
193
+ /* @__PURE__ */ h(
135
194
  "div",
136
195
  {
137
196
  role: "tabpanel",
138
- id: `settings-tabpanel-${f}`,
197
+ id: `settings-tabpanel-${b}`,
139
198
  "aria-label": "Settings dimension controls",
140
199
  tabIndex: 0,
141
200
  className: "settings-shell__tabpanel",
142
201
  children: [
143
- f === "threshold" && /* @__PURE__ */ s(ce, { value: N, onChange: C }),
144
- f === "timeframe" && /* @__PURE__ */ s(de, { value: S, onChange: te }),
145
- f === "slots" && /* @__PURE__ */ s(pe, {}),
146
- f === "color" && /* @__PURE__ */ s(he, { value: w, onSelect: ne })
202
+ b === "threshold" && /* @__PURE__ */ a(Le, { value: S, onChange: ue }),
203
+ b === "timeframe" && /* @__PURE__ */ a(ke, { value: ie, onChange: pe }),
204
+ b === "slots" && /* @__PURE__ */ a(De, { value: de, onChange: he }),
205
+ b === "color" && /* @__PURE__ */ a($e, { value: ce, onSelect: me })
147
206
  ]
148
207
  }
149
208
  )
150
209
  ] });
151
210
  }
152
- function j({ lenses: e, activeLens: t, onLensChange: o }) {
153
- const [n, r] = b(!1), l = U(null), d = () => {
154
- l.current != null && (window.clearTimeout(l.current), l.current = null);
155
- }, i = () => {
156
- d(), l.current = window.setTimeout(() => r(!1), 100);
157
- }, a = e.filter((c) => c !== t);
158
- return /* @__PURE__ */ s("div", { className: "cat-segmented-wrap", children: /* @__PURE__ */ p("div", { className: "cat-segmented", children: [
159
- /* @__PURE__ */ s(
211
+ const te = [
212
+ "Overbought",
213
+ "What's selling",
214
+ "On track vs plan",
215
+ "Orders on time",
216
+ "Vendor performance",
217
+ "Assortment mix",
218
+ "Customer retention"
219
+ ], ne = "Overbought", z = {
220
+ Overbought: {
221
+ headline: "Am I overbought?",
222
+ helper: "Find slow-moving inventory before discount cycles eat margin."
223
+ },
224
+ "What's selling": {
225
+ headline: "What's selling right now?",
226
+ helper: "Velocity leaders and sleepers across your assortment."
227
+ },
228
+ "On track vs plan": {
229
+ headline: "Am I on track vs plan?",
230
+ helper: "Pace-to-plan signals across revenue, units, and margin."
231
+ },
232
+ "Orders on time": {
233
+ headline: "Are orders going out on time?",
234
+ helper: "Fulfillment SLA performance and at-risk shipments."
235
+ },
236
+ "Vendor performance": {
237
+ headline: "Who are my best and worst vendors?",
238
+ helper: "Sell-through, lead time, and fill-rate across the vendor mix."
239
+ },
240
+ "Assortment mix": {
241
+ headline: "Is my assortment balanced?",
242
+ helper: "Brand and category mix concentration vs target ranges."
243
+ },
244
+ "Customer retention": {
245
+ headline: "Are my best customers coming back?",
246
+ helper: "Repeat-rate and lapsed-account signals from the buyer file."
247
+ }
248
+ };
249
+ z["Customer retention"].beta = !0;
250
+ const se = {
251
+ Overbought: {
252
+ primary: [
253
+ {
254
+ id: "ob-units-at-risk",
255
+ label: "Units at risk",
256
+ value: "12,840",
257
+ desc: "Inventory units flagged as overbought relative to forward demand.",
258
+ variants: ["1×1"],
259
+ startHere: !0,
260
+ isNew: !0
261
+ },
262
+ {
263
+ id: "ob-weeks-of-supply",
264
+ label: "Weeks of supply",
265
+ value: "18.4",
266
+ desc: "Weighted average weeks of forward cover across the assortment.",
267
+ variants: ["1×1"]
268
+ },
269
+ {
270
+ id: "ob-discount-exposure",
271
+ label: "Discount exposure",
272
+ value: "$184K",
273
+ desc: "Estimated markdown dollars to clear excess at current sell-through.",
274
+ variants: ["1×3"],
275
+ subStats: [
276
+ { label: "MTD", value: "$48K" },
277
+ { label: "QTD", value: "$112K" },
278
+ { label: "YTD", value: "$184K" }
279
+ ]
280
+ }
281
+ ],
282
+ secondary: [
283
+ {
284
+ id: "ob-sku-coverage",
285
+ label: "SKUs over plan",
286
+ value: "342",
287
+ desc: "SKUs exceeding planned forward cover."
288
+ },
289
+ {
290
+ id: "ob-vendor-share",
291
+ label: "Top vendor share",
292
+ value: "38%",
293
+ desc: "Share of overbought inventory concentrated in the top vendor.",
294
+ donut: !0,
295
+ accent: "#7c3aed"
296
+ }
297
+ ]
298
+ },
299
+ "What's selling": {
300
+ primary: [
301
+ {
302
+ id: "ws-top-sku",
303
+ label: "Top SKU",
304
+ value: "SKU-9241",
305
+ desc: "Highest-velocity SKU over the trailing 7 days.",
306
+ startHere: !0
307
+ },
308
+ {
309
+ id: "ws-velocity",
310
+ label: "Velocity Δ",
311
+ value: "+12.4%",
312
+ desc: "Rolling 7-day velocity change versus the prior comparable period.",
313
+ variants: ["1×1"]
314
+ },
315
+ {
316
+ id: "ws-sellthrough",
317
+ label: "Sell-through",
318
+ value: "see breakdown",
319
+ variants: ["1×5"],
320
+ subStats: [
321
+ { label: "MTD", value: "64%" },
322
+ { label: "QTD", value: "71%" },
323
+ { label: "YTD", value: "68%" },
324
+ { label: "LYTD", value: "62%" },
325
+ { label: "7D", value: "74%" }
326
+ ],
327
+ desc: "Sell-through across multiple windows."
328
+ }
329
+ ],
330
+ secondary: [
331
+ {
332
+ id: "ws-new-arrivals",
333
+ label: "New arrival lift",
334
+ value: "+8.1%",
335
+ desc: "Velocity boost from new-arrival SKUs versus the assortment mean.",
336
+ isNew: !0
337
+ }
338
+ ]
339
+ },
340
+ "On track vs plan": {
341
+ primary: [
342
+ {
343
+ id: "pl-revenue-pace",
344
+ label: "Revenue pace",
345
+ value: "102%",
346
+ desc: "Revenue pace versus plan, period-to-date.",
347
+ donut: !0,
348
+ accent: "#16a34a",
349
+ startHere: !0
350
+ },
351
+ {
352
+ id: "pl-units-pace",
353
+ label: "Units pace",
354
+ value: "94%",
355
+ desc: "Units pace versus plan, period-to-date.",
356
+ donut: !0,
357
+ accent: "#f59e0b"
358
+ },
359
+ {
360
+ id: "pl-margin-pace",
361
+ label: "Margin pace",
362
+ value: "see breakdown",
363
+ variants: ["1×3"],
364
+ subStats: [
365
+ { label: "MTD", value: "38.4%" },
366
+ { label: "QTD", value: "37.9%" },
367
+ { label: "YTD", value: "38.1%" }
368
+ ],
369
+ desc: "Gross margin pace across multiple windows."
370
+ },
371
+ // PHASE 17 D1 — agency-revenue port (J1) + commission-economics port (J6)
372
+ {
373
+ id: "agency-sales",
374
+ label: "Sales",
375
+ value: "$892,450",
376
+ desc: "Agency total sales with trend sparkline"
377
+ },
378
+ {
379
+ id: "agency-commission",
380
+ label: "Commissions",
381
+ value: "$133,868",
382
+ desc: "Total commission earned by the agency"
383
+ },
384
+ {
385
+ id: "agency-growth",
386
+ label: "Sales Growth",
387
+ value: "+18%",
388
+ desc: "Year-over-year agency sales growth rate"
389
+ },
390
+ {
391
+ id: "agency-aov",
392
+ label: "Avg Order",
393
+ value: "$2,340",
394
+ desc: "Average order value with trend sparkline"
395
+ },
396
+ {
397
+ id: "agency-conversion",
398
+ label: "Conversion",
399
+ value: "68%",
400
+ desc: "Order completion rate vs cancellations"
401
+ },
402
+ {
403
+ id: "agency-revenue-compact",
404
+ label: "Total Revenue",
405
+ value: "$892,450",
406
+ desc: "Agency revenue with sparkline trend"
407
+ },
408
+ // degrade-to-standard: stacked-group with MTD segment shown at span-1
409
+ {
410
+ id: "agency-sales-stacked",
411
+ label: "Sales",
412
+ value: "$892,450",
413
+ desc: "Agency sales across three timeframes at a glance (MTD shown)"
414
+ },
415
+ {
416
+ id: "agency-aov-stacked",
417
+ label: "Avg Order",
418
+ value: "$2,340",
419
+ desc: "Average order value across three timeframes (MTD shown)"
420
+ },
421
+ {
422
+ id: "agency-yoy-versus",
423
+ label: "YoY Comparison",
424
+ value: "$892K",
425
+ desc: "TY vs LY sales side-by-side"
426
+ },
427
+ {
428
+ id: "agency-revenue-by-mfr",
429
+ label: "Mfr Revenue",
430
+ value: "$892K",
431
+ desc: "Revenue mix across top manufacturers"
432
+ },
433
+ {
434
+ id: "agency-outstanding",
435
+ label: "Outstanding",
436
+ value: "$24,500",
437
+ desc: "Unpaid order balance across all accounts"
438
+ },
439
+ {
440
+ id: "agency-commission-rate",
441
+ label: "Commission",
442
+ value: "8.4%",
443
+ desc: "Effective commission rate %"
444
+ },
445
+ {
446
+ id: "agency-commission-aging",
447
+ label: "Commission Aging",
448
+ value: "$24K",
449
+ desc: "Unpaid commission aging by buckets"
450
+ }
451
+ ]
452
+ },
453
+ "Orders on time": {
454
+ primary: [
455
+ {
456
+ id: "ot-on-time-rate",
457
+ label: "On-time rate",
458
+ value: "94.2%",
459
+ desc: "Share of orders shipped within SLA.",
460
+ startHere: !0
461
+ },
462
+ {
463
+ id: "ot-at-risk",
464
+ label: "At-risk shipments",
465
+ value: "18",
466
+ desc: "Open shipments projected to miss SLA.",
467
+ isNew: !0
468
+ },
469
+ // PHASE 17 D1 — agency-order-flow port (J5)
470
+ {
471
+ id: "agency-activity",
472
+ label: "Orders",
473
+ value: "47 Orders",
474
+ desc: "Daily team order count with bar chart"
475
+ },
476
+ {
477
+ id: "agency-unassigned-orders",
478
+ label: "Unassigned",
479
+ value: "0",
480
+ desc: "Orders awaiting salesperson assignment"
481
+ },
482
+ {
483
+ id: "agency-orders-compact",
484
+ label: "Order Count",
485
+ value: "156",
486
+ desc: "Total order count with bar chart trend"
487
+ },
488
+ // degrade-to-standard: stacked-group with MTD segment shown at span-1
489
+ {
490
+ id: "agency-orders-stacked",
491
+ label: "Orders",
492
+ value: "156",
493
+ desc: "Order count across three timeframes at a glance (MTD shown)"
494
+ },
495
+ {
496
+ id: "agency-order-pipeline-value",
497
+ label: "Pipeline Value",
498
+ value: "$284,500",
499
+ desc: "Open + transmitted order $ pipeline"
500
+ },
501
+ {
502
+ id: "agency-cancel-rate",
503
+ label: "Cancel Rate",
504
+ value: "4.2%",
505
+ desc: "Order cancel-rate percentage (warn-tinted highlight)"
506
+ }
507
+ ]
508
+ },
509
+ "Vendor performance": {
510
+ primary: [
511
+ {
512
+ id: "vp-top-vendor",
513
+ label: "Top vendor",
514
+ value: "Acme Co.",
515
+ desc: "Highest sell-through vendor over the trailing 30 days.",
516
+ startHere: !0
517
+ },
518
+ {
519
+ id: "vp-fill-rate",
520
+ label: "Fill rate",
521
+ value: "97.1%",
522
+ desc: "Vendor fill rate against placed orders.",
523
+ donut: !0,
524
+ accent: "#2563eb"
525
+ },
526
+ // PHASE 17 D1 — agency-brand-portfolio port (J3)
527
+ {
528
+ id: "agency-mfr-mix",
529
+ label: "Mfr Mix",
530
+ value: "$892K",
531
+ desc: "Revenue mix by manufacturer (segmented bar)"
532
+ },
533
+ {
534
+ id: "agency-mfr-new-line",
535
+ label: "New Mfrs",
536
+ value: "3",
537
+ desc: "New manufacturer count for the period"
538
+ }
539
+ ]
540
+ },
541
+ "Assortment mix": {
542
+ primary: [
543
+ {
544
+ id: "am-brand-mix",
545
+ label: "Brand mix",
546
+ value: "see breakdown",
547
+ variants: ["1×3"],
548
+ subStats: [
549
+ { label: "Core", value: "58%" },
550
+ { label: "Growth", value: "27%" },
551
+ { label: "Test", value: "15%" }
552
+ ],
553
+ desc: "Assortment mix across brand tiers.",
554
+ startHere: !0
555
+ }
556
+ ]
557
+ },
558
+ "Customer retention": {
559
+ primary: [
560
+ {
561
+ id: "cr-repeat-rate",
562
+ label: "Repeat rate",
563
+ value: "62.4%",
564
+ desc: "Share of buyers placing two or more orders in the period.",
565
+ startHere: !0,
566
+ isNew: !0
567
+ },
568
+ {
569
+ id: "cr-lapsed",
570
+ label: "Lapsed accounts",
571
+ value: "47",
572
+ desc: "Accounts with zero orders in the last 90 days."
573
+ },
574
+ // PHASE 17 D1 — agency-account-coverage port (J4)
575
+ {
576
+ id: "agency-new-accounts",
577
+ label: "New Accounts",
578
+ value: "12",
579
+ desc: "New customer accounts opened this period"
580
+ },
581
+ {
582
+ id: "agency-customers-compact",
583
+ label: "Customers",
584
+ value: "287",
585
+ desc: "Active customer count with bar chart trend"
586
+ },
587
+ {
588
+ id: "agency-inactive-accounts",
589
+ label: "Inactive Act",
590
+ value: "5",
591
+ desc: "Inactive customer-account count (warn-tinted)"
592
+ },
593
+ {
594
+ id: "agency-account-churn",
595
+ label: "Account Churn",
596
+ value: "8%",
597
+ desc: "Customer churn rate (LY-active not TY-active)"
598
+ }
599
+ ]
600
+ }
601
+ };
602
+ function ae({
603
+ lenses: e,
604
+ activeLens: t,
605
+ onLensChange: r,
606
+ variant: n = "pills",
607
+ lensMeta: d = z
608
+ }) {
609
+ return n === "pills" ? /* @__PURE__ */ a("div", { className: "cat-pills-wrap", children: /* @__PURE__ */ a("div", { className: "cat-pills", role: "tablist", "aria-label": "Metric lenses", children: e.map((i) => {
610
+ const u = i === t, l = d[i], s = ["cat-pill"];
611
+ return u && s.push("active"), /* @__PURE__ */ h(
612
+ "button",
613
+ {
614
+ type: "button",
615
+ role: "tab",
616
+ "aria-selected": u,
617
+ className: s.join(" "),
618
+ "data-lens": i,
619
+ onClick: () => {
620
+ u || r(i);
621
+ },
622
+ children: [
623
+ i,
624
+ l?.beta && /* @__PURE__ */ a("span", { className: "cat-pill-beta", "aria-label": "Beta", children: "BETA" })
625
+ ]
626
+ },
627
+ i
628
+ );
629
+ }) }) }) : /* @__PURE__ */ a(Ue, { lenses: e, activeLens: t, onLensChange: r });
630
+ }
631
+ function Ue({
632
+ lenses: e,
633
+ activeLens: t,
634
+ onLensChange: r
635
+ }) {
636
+ const [n, d] = C(!1), i = I(null), u = () => {
637
+ i.current != null && (window.clearTimeout(i.current), i.current = null);
638
+ }, l = () => {
639
+ u(), i.current = window.setTimeout(() => d(!1), 100);
640
+ }, s = e.filter((o) => o !== t);
641
+ return /* @__PURE__ */ a("div", { className: "cat-segmented-wrap", children: /* @__PURE__ */ h("div", { className: "cat-segmented", children: [
642
+ /* @__PURE__ */ a(
160
643
  "button",
161
644
  {
162
645
  type: "button",
@@ -166,35 +649,35 @@ function j({ lenses: e, activeLens: t, onLensChange: o }) {
166
649
  children: t
167
650
  }
168
651
  ),
169
- /* @__PURE__ */ p(
652
+ /* @__PURE__ */ h(
170
653
  "div",
171
654
  {
172
655
  className: "cat-seg-more",
173
656
  onMouseEnter: () => {
174
- d(), r(!0);
657
+ u(), d(!0);
175
658
  },
176
- onMouseLeave: i,
659
+ onMouseLeave: l,
177
660
  children: [
178
- /* @__PURE__ */ s("button", { type: "button", className: "cat-seg cat-seg-more-btn", "aria-haspopup": "menu", "aria-expanded": n, children: "More ▾" }),
179
- n && /* @__PURE__ */ s(
661
+ /* @__PURE__ */ a("button", { type: "button", className: "cat-seg cat-seg-more-btn", "aria-haspopup": "menu", "aria-expanded": n, children: "More ▾" }),
662
+ n && /* @__PURE__ */ a(
180
663
  "div",
181
664
  {
182
665
  className: "cat-seg-overflow",
183
666
  role: "menu",
184
- onMouseEnter: d,
185
- onMouseLeave: i,
186
- children: a.map((c) => /* @__PURE__ */ s(
667
+ onMouseEnter: u,
668
+ onMouseLeave: l,
669
+ children: s.map((o) => /* @__PURE__ */ a(
187
670
  "button",
188
671
  {
189
672
  type: "button",
190
- "data-lens": c,
673
+ "data-lens": o,
191
674
  role: "menuitem",
192
675
  onClick: () => {
193
- o(c), r(!1);
676
+ r(o), d(!1);
194
677
  },
195
- children: c
678
+ children: o
196
679
  },
197
- c
680
+ o
198
681
  ))
199
682
  }
200
683
  )
@@ -203,50 +686,86 @@ function j({ lenses: e, activeLens: t, onLensChange: o }) {
203
686
  )
204
687
  ] }) });
205
688
  }
206
- function ge(e) {
207
- return e.split("·").map((t, o) => {
208
- const n = t.trim(), r = n.match(/^([$+\-]?[\d,]+(?:\.\d+)?[%+]?)\s*(.*)$/), l = r ? r[1] : "", d = r ? r[2] : n;
209
- return /* @__PURE__ */ p("span", { children: [
210
- /* @__PURE__ */ s("strong", { children: l }),
211
- /* @__PURE__ */ s("small", { children: d })
212
- ] }, o);
213
- });
214
- }
215
- function G({ tiles: e, selectedTileId: t, onSelectTile: o }) {
216
- return /* @__PURE__ */ s("div", { className: "cat-tiles", children: e.map((n) => {
217
- const r = n.id === t, l = n.stack === !0, d = ["cat-tile"];
218
- return l && d.push("span-2"), r && d.push("selected"), /* @__PURE__ */ p(
689
+ function U({ tiles: e, selectedTileId: t, onSelectTile: r }) {
690
+ return /* @__PURE__ */ a("div", { className: "cat-tiles", children: e.map((n) => {
691
+ const d = n.id === t, i = n.subStats != null && n.subStats.length > 0;
692
+ let u = null;
693
+ i ? n.subStats.length === 5 ? u = "span-5" : n.subStats.length === 3 ? u = "span-3" : u = "span-2" : n.stack === !0 && (u = "span-2");
694
+ const l = ["cat-tile"];
695
+ u && l.push(u), d && l.push("selected"), n.isNew && l.push("is-new"), n.startHere && l.push("start-here"), n.donut && l.push("has-donut");
696
+ const s = 1;
697
+ let o = 0.7;
698
+ if (n.donut) {
699
+ const c = /([\d.]+)\s*%/.exec(n.value);
700
+ if (c) {
701
+ const p = parseFloat(c[1]);
702
+ Number.isFinite(p) && (o = Math.max(0, Math.min(1, p / 100)));
703
+ }
704
+ }
705
+ return /* @__PURE__ */ h(
219
706
  "button",
220
707
  {
221
708
  type: "button",
222
- className: d.join(" "),
709
+ className: l.join(" "),
223
710
  "data-metric": n.id,
224
711
  "data-desc": n.desc,
225
- "aria-pressed": r,
226
- onClick: () => o(n.id, n.desc),
712
+ "data-col-span": String(s),
713
+ "data-donut": n.donut ? "true" : void 0,
714
+ "data-accent": n.accent,
715
+ "aria-pressed": d,
716
+ onClick: () => r(n.id, n.desc),
717
+ style: n.accent ? { "--cat-tile-accent": n.accent } : void 0,
227
718
  children: [
228
- /* @__PURE__ */ s("span", { className: "cat-tile-label", children: n.label }),
229
- /* @__PURE__ */ s("span", { className: "cat-tile-value", children: l ? ge(n.value) : n.value }),
230
- n.variants && n.variants.length > 0 && /* @__PURE__ */ s("span", { className: "cat-tile-variants", "aria-hidden": "true", children: n.variants.map((i) => /* @__PURE__ */ s("span", { children: i }, i)) })
719
+ n.startHere && /* @__PURE__ */ a("span", { className: "cat-tile-start-here", "aria-hidden": "true", children: "START HERE" }),
720
+ /* @__PURE__ */ a(
721
+ "div",
722
+ {
723
+ className: "cat-tile-primitive-wrapper gloss-metric-card",
724
+ style: { pointerEvents: "none", width: "100%", height: "100%" },
725
+ "aria-hidden": "true",
726
+ children: n.donut ? /* @__PURE__ */ a(
727
+ G,
728
+ {
729
+ variant: "donut",
730
+ label: n.label,
731
+ value: n.value,
732
+ donutValue: o,
733
+ donutMax: 1,
734
+ accentColor: n.accent,
735
+ colSpan: s
736
+ }
737
+ ) : /* @__PURE__ */ a(
738
+ G,
739
+ {
740
+ variant: "standard",
741
+ label: n.label,
742
+ value: n.value,
743
+ colSpan: s
744
+ }
745
+ )
746
+ }
747
+ ),
748
+ n.variants && n.variants.length > 0 && /* @__PURE__ */ a("span", { className: "cat-tile-variants", "aria-hidden": "true", children: n.variants.map((c) => /* @__PURE__ */ a("span", { children: c }, c)) }),
749
+ n.isNew && /* @__PURE__ */ a("span", { className: "cat-tile-new-dot", "aria-hidden": "true" })
231
750
  ]
232
751
  },
233
752
  n.id
234
753
  );
235
754
  }) });
236
755
  }
237
- const R = Y(null);
238
- function ve() {
239
- return K(R);
756
+ const V = Z(null);
757
+ function He() {
758
+ return ee(V);
240
759
  }
241
- function be({ mode: e, dispatch: t }) {
242
- const o = ve();
243
- if (o == null && e == null) return null;
244
- const n = o?.mode ?? e ?? "add", r = o?.selectedTileId ?? null, l = o?.description ?? null, d = r == null;
245
- return /* @__PURE__ */ p("div", { className: "panel-footer catalog", children: [
246
- /* @__PURE__ */ s("div", { className: "cat-description", id: "cat-desc", children: l ?? /* @__PURE__ */ s("em", { children: "Tap a metric to see its description" }) }),
247
- /* @__PURE__ */ p("div", { style: { display: "flex", padding: "10px 14px", gap: 8 }, children: [
248
- /* @__PURE__ */ s("div", { className: "spacer", style: { flex: 1 } }),
249
- /* @__PURE__ */ s(
760
+ function ze({ mode: e, dispatch: t }) {
761
+ const r = He();
762
+ if (r == null && e == null) return null;
763
+ const n = r?.mode ?? e ?? "add", d = r?.selectedTileId ?? null, i = r?.description ?? null, u = d == null;
764
+ return /* @__PURE__ */ h("div", { className: "panel-footer catalog", children: [
765
+ /* @__PURE__ */ a("div", { className: "cat-description", id: "cat-desc", children: i ?? /* @__PURE__ */ a("em", { children: "Tap a metric to see its description" }) }),
766
+ /* @__PURE__ */ h("div", { style: { display: "flex", padding: "10px 14px", gap: 8 }, children: [
767
+ /* @__PURE__ */ a("div", { className: "spacer", style: { flex: 1 } }),
768
+ /* @__PURE__ */ a(
250
769
  "button",
251
770
  {
252
771
  id: "btn-cat-cancel",
@@ -256,24 +775,24 @@ function be({ mode: e, dispatch: t }) {
256
775
  children: "Cancel"
257
776
  }
258
777
  ),
259
- n === "add" && /* @__PURE__ */ s(
778
+ n === "add" && /* @__PURE__ */ a(
260
779
  "button",
261
780
  {
262
781
  id: "btn-cat-add",
263
782
  type: "button",
264
783
  className: "btn btn-primary",
265
- disabled: d,
784
+ disabled: u,
266
785
  onClick: () => t({ type: "CLOSE_PANEL", reason: "apply-button" }),
267
786
  children: "Add metric"
268
787
  }
269
788
  ),
270
- n === "replace" && /* @__PURE__ */ s(
789
+ n === "replace" && /* @__PURE__ */ a(
271
790
  "button",
272
791
  {
273
792
  id: "btn-cat-replace",
274
793
  type: "button",
275
794
  className: "btn btn-primary",
276
- disabled: d,
795
+ disabled: u,
277
796
  onClick: () => t({ type: "CLOSE_PANEL", reason: "apply-button" }),
278
797
  children: "Replace metric"
279
798
  }
@@ -281,192 +800,164 @@ function be({ mode: e, dispatch: t }) {
281
800
  ] })
282
801
  ] });
283
802
  }
284
- const Q = [
285
- "Revenue",
286
- "Order flow",
287
- "Rep performance",
288
- "Brand portfolio",
289
- "Account coverage",
290
- "Commission"
291
- ], X = "Order flow", J = {
292
- Revenue: [
293
- { id: "rev-mtd", label: "Revenue MTD", value: "$184K", desc: "Month-to-date revenue across all manufacturers and territories." },
294
- { id: "rev-ytd", label: "Revenue YTD", value: "$2.1M", desc: "Year-to-date revenue including pending and posted orders.", variants: ["1×1", "1×3"] },
295
- { id: "rev-yoy", label: "YoY Δ", value: "+12.4%", desc: "Revenue growth versus the prior comparable period." },
296
- { id: "rev-avg", label: "Avg order", value: "$1,820", desc: "Average order value over the last 30 days." }
297
- ],
298
- "Order flow": [
299
- {
300
- id: "of-funnel",
301
- label: "Order funnel",
302
- value: "New 42 · Incomplete 18 · Transmitted 91",
303
- stack: !0,
304
- desc: "Funnel snapshot — new orders, incomplete (awaiting attention), and transmitted to manufacturer.",
305
- variants: ["1×3"]
306
- },
307
- { id: "of-incomplete", label: "Incomplete", value: "18", desc: "Orders started but not yet transmitted." },
308
- { id: "of-transmitted", label: "Transmitted", value: "91", desc: "Orders successfully sent to manufacturer." },
309
- { id: "of-today", label: "New today", value: "7", desc: "Orders created in the current calendar day." },
310
- { id: "of-velocity", label: "Order velocity", value: "+3.1/d", desc: "Rolling 7-day order-creation rate change." }
311
- ],
312
- "Rep performance": [
313
- { id: "rp-leader", label: "#1 Rep", value: "A. Chen", desc: "Top revenue performer in the current period." },
314
- { id: "rp-quota", label: "Below quota", value: "4 reps", desc: "Reps currently tracking below pace-to-quota." },
315
- { id: "rp-commission", label: "Commission pace", value: "$48K", desc: "Projected commission pool at current burn rate." },
316
- { id: "rp-active", label: "Active reps", value: "14", desc: "Reps with at least one order this period." }
317
- ],
318
- "Brand portfolio": [
319
- { id: "bp-top", label: "Top brand", value: "Acme Co.", desc: "Highest-revenue manufacturer this period." },
320
- { id: "bp-mix", label: "Mix Δ", value: "+2pp", desc: "Portfolio mix shift versus the prior period." },
321
- { id: "bp-coverage", label: "Brand coverage", value: "73%", desc: "Percent of accounts with at least one active brand." },
322
- { id: "bp-new", label: "New brand adds", value: "3", desc: "Brands with first-order activity this period." }
323
- ],
324
- "Account coverage": [
325
- { id: "ac-active", label: "Active accounts", value: "128", desc: "Accounts with at least one order in the period." },
326
- { id: "ac-untouched", label: "Untouched", value: "34", desc: "Accounts with zero activity in the period." },
327
- { id: "ac-concentration", label: "Concentration", value: "38% top-5", desc: "Revenue concentration in top-5 accounts." },
328
- { id: "ac-new", label: "New accounts", value: "6", desc: "Accounts with first-ever order this period." }
329
- ],
330
- Commission: [
331
- { id: "cm-projected", label: "Projected", value: "$48K", desc: "Forecast commission at current pace." },
332
- { id: "cm-paid", label: "Paid", value: "$31K", desc: "Commission posted to ledger this period." },
333
- { id: "cm-pending", label: "Pending", value: "$17K", desc: "Commission earned but not yet posted." },
334
- { id: "cm-rate", label: "Effective rate", value: "6.8%", desc: "Realized commission rate across all orders." }
335
- ]
336
- };
337
- function qe({
803
+ function q(e, t) {
804
+ if (t.length === 0) return !0;
805
+ const r = t.toLowerCase();
806
+ if (e.label.toLowerCase().includes(r) || e.value.toLowerCase().includes(r)) return !0;
807
+ if (e.subStats) {
808
+ for (const n of e.subStats)
809
+ if (n.label.toLowerCase().includes(r) || n.value.toLowerCase().includes(r)) return !0;
810
+ }
811
+ return !1;
812
+ }
813
+ function vt({
338
814
  isOpen: e,
339
- lenses: t = Q,
340
- defaultLens: o = X,
341
- tilesByLens: n = J,
342
- footerSlot: r
815
+ lenses: t = te,
816
+ defaultLens: r = ne,
817
+ tilesByLens: n = se,
818
+ lensMeta: d = z,
819
+ footerSlot: i
343
820
  }) {
344
- const [l, d] = b(o), [i, a] = b(null), [c, u] = b(null), h = n[l] ?? [];
345
- return /* @__PURE__ */ p(
346
- R.Provider,
821
+ const [u, l] = C(r), [s, o] = C(null), [c, p] = C(null), [m, v] = C(""), y = n[u] ?? { primary: [] }, b = d[u], _ = Y(
822
+ () => y.primary.filter((g) => q(g, m)),
823
+ [y.primary, m]
824
+ ), N = Y(
825
+ () => (y.secondary ?? []).filter((g) => q(g, m)),
826
+ [y.secondary, m]
827
+ );
828
+ return /* @__PURE__ */ h(
829
+ V.Provider,
347
830
  {
348
- value: { mode: "add", selectedTileId: i, description: c },
831
+ value: { mode: "add", selectedTileId: s, description: c },
349
832
  children: [
350
- /* @__PURE__ */ p("div", { "data-shell": "catalog-add", "aria-hidden": !e, children: [
351
- /* @__PURE__ */ s("h3", { children: "Add a metric" }),
352
- /* @__PURE__ */ s(
353
- j,
833
+ /* @__PURE__ */ h("div", { "data-shell": "catalog-add", "aria-hidden": !e, children: [
834
+ /* @__PURE__ */ a("div", { className: "cat-search", children: /* @__PURE__ */ a(
835
+ "input",
836
+ {
837
+ type: "search",
838
+ className: "cat-search-input",
839
+ placeholder: "Search metrics",
840
+ "aria-label": "Search metrics",
841
+ value: m,
842
+ onChange: (g) => v(g.target.value)
843
+ }
844
+ ) }),
845
+ /* @__PURE__ */ a(
846
+ ae,
354
847
  {
355
848
  lenses: t,
356
- activeLens: l,
849
+ activeLens: u,
850
+ lensMeta: d,
851
+ variant: "pills",
357
852
  onLensChange: (g) => {
358
- d(g), a(null), u(null);
853
+ l(g), o(null), p(null), v("");
359
854
  }
360
855
  }
361
856
  ),
362
- /* @__PURE__ */ s(
363
- G,
857
+ b && /* @__PURE__ */ h("div", { className: "cat-lens-meta", children: [
858
+ /* @__PURE__ */ a("h3", { className: "cat-lens-headline", children: b.headline }),
859
+ /* @__PURE__ */ a("p", { className: "cat-lens-helper", children: b.helper })
860
+ ] }),
861
+ /* @__PURE__ */ a(
862
+ U,
364
863
  {
365
- tiles: h,
366
- selectedTileId: i,
367
- onSelectTile: (g, f) => {
368
- a(g), u(f);
864
+ tiles: _,
865
+ selectedTileId: s,
866
+ onSelectTile: (g, S) => {
867
+ o(g), p(S);
369
868
  }
370
869
  }
371
- )
870
+ ),
871
+ N.length > 0 && /* @__PURE__ */ h("div", { className: "cat-more-in-lens", children: [
872
+ /* @__PURE__ */ a("div", { className: "cat-more-in-lens__heading", children: "MORE IN THIS LENS" }),
873
+ /* @__PURE__ */ a(
874
+ U,
875
+ {
876
+ tiles: N,
877
+ selectedTileId: s,
878
+ onSelectTile: (g, S) => {
879
+ o(g), p(S);
880
+ }
881
+ }
882
+ )
883
+ ] }),
884
+ _.length === 0 && N.length === 0 && m.length > 0 && /* @__PURE__ */ h("div", { className: "cat-empty", children: [
885
+ 'No metrics match "',
886
+ m,
887
+ '".'
888
+ ] })
372
889
  ] }),
373
- r
890
+ i
374
891
  ]
375
892
  }
376
893
  );
377
894
  }
378
- function Ue({
895
+ function bt({
379
896
  isOpen: e,
380
897
  replacingLabel: t,
381
- lenses: o = Q,
382
- defaultLens: n = X,
383
- tilesByLens: r = J,
384
- footerSlot: l
898
+ lenses: r = te,
899
+ defaultLens: n = ne,
900
+ tilesByLens: d = se,
901
+ footerSlot: i
385
902
  }) {
386
- const [d, i] = b(n), [a, c] = b(null), [u, h] = b(null), g = r[d] ?? [];
387
- return /* @__PURE__ */ p(
388
- R.Provider,
903
+ const [u, l] = C(n), [s, o] = C(null), [c, p] = C(null), m = d[u] ?? { primary: [] }, v = [...m.primary, ...m.secondary ?? []];
904
+ return /* @__PURE__ */ h(
905
+ V.Provider,
389
906
  {
390
- value: { mode: "replace", selectedTileId: a, description: u },
907
+ value: { mode: "replace", selectedTileId: s, description: c },
391
908
  children: [
392
- /* @__PURE__ */ p("div", { "data-shell": "catalog-replace", "aria-hidden": !e, children: [
393
- /* @__PURE__ */ s("h3", { children: "Replace metric" }),
394
- t && /* @__PURE__ */ p("p", { className: "cat-subtitle", children: [
909
+ /* @__PURE__ */ h("div", { "data-shell": "catalog-replace", "aria-hidden": !e, children: [
910
+ t && /* @__PURE__ */ h("p", { className: "cat-subtitle", children: [
395
911
  "replacing ",
396
912
  t
397
913
  ] }),
398
- /* @__PURE__ */ s(
399
- j,
914
+ /* @__PURE__ */ a(
915
+ ae,
400
916
  {
401
- lenses: o,
402
- activeLens: d,
403
- onLensChange: (f) => {
404
- i(f), c(null), h(null);
917
+ lenses: r,
918
+ activeLens: u,
919
+ onLensChange: (y) => {
920
+ l(y), o(null), p(null);
405
921
  }
406
922
  }
407
923
  ),
408
- /* @__PURE__ */ s(
409
- G,
924
+ /* @__PURE__ */ a(
925
+ U,
410
926
  {
411
- tiles: g,
412
- selectedTileId: a,
413
- onSelectTile: (f, y) => {
414
- c(f), h(y);
927
+ tiles: v,
928
+ selectedTileId: s,
929
+ onSelectTile: (y, b) => {
930
+ o(y), p(b);
415
931
  }
416
932
  }
417
933
  )
418
934
  ] }),
419
- l
935
+ i
420
936
  ]
421
937
  }
422
938
  );
423
939
  }
424
- function ye({ page: e, onRename: t, onKebab: o, onDragStart: n }) {
425
- const r = ["pm-row"];
426
- return e.active && r.push("active"), /* @__PURE__ */ p("div", { className: r.join(" "), "data-page-id": e.id, role: "listitem", children: [
427
- /* @__PURE__ */ s(
428
- "div",
429
- {
430
- className: "pm-handle",
431
- "aria-hidden": "true",
432
- onMouseDown: () => n?.(e.id),
433
- children: "⋮⋮"
434
- }
435
- ),
436
- /* @__PURE__ */ s("div", { className: "pm-name", onClick: () => t?.(e.id), children: e.name }),
437
- /* @__PURE__ */ s(
438
- "button",
439
- {
440
- type: "button",
441
- className: "pm-kebab",
442
- "aria-label": "Page options",
443
- onClick: () => o?.(e.id),
444
- children: "⋯"
445
- }
446
- )
447
- ] });
940
+ const re = Z(null);
941
+ function le() {
942
+ return ee(re);
448
943
  }
449
- const Z = Y(null);
450
- function Ce() {
451
- return K(Z);
452
- }
453
- function Pe(e = {}) {
454
- const o = Ce()?.setPages;
455
- return /* @__PURE__ */ p(
944
+ function Ve(e = {}) {
945
+ const r = le()?.setPages;
946
+ return /* @__PURE__ */ h(
456
947
  "div",
457
948
  {
458
949
  className: "panel-footer pm",
459
950
  style: { display: "flex", justifyContent: "flex-end", padding: "10px 14px" },
460
951
  children: [
461
- /* @__PURE__ */ s("div", { className: "spacer", style: { flex: 1 } }),
462
- /* @__PURE__ */ s(
952
+ /* @__PURE__ */ a("div", { className: "spacer", style: { flex: 1 } }),
953
+ /* @__PURE__ */ a(
463
954
  "button",
464
955
  {
465
956
  id: "btn-new-page",
466
957
  type: "button",
467
958
  className: "btn btn-primary",
468
959
  onClick: () => {
469
- o && o((n) => [
960
+ r && r((n) => [
470
961
  ...n,
471
962
  { id: `new-${Date.now()}`, name: "Untitled", active: !1 }
472
963
  ]);
@@ -478,38 +969,112 @@ function Pe(e = {}) {
478
969
  }
479
970
  );
480
971
  }
481
- const _e = [
972
+ function Ke({ page: e, onRename: t, onKebab: r, onDragStart: n }) {
973
+ const d = le(), [i, u] = C(!1), l = I(null);
974
+ A(() => {
975
+ if (!i) return;
976
+ const m = (v) => {
977
+ l.current && (l.current.contains(v.target) || u(!1));
978
+ };
979
+ return document.addEventListener("mousedown", m, !0), () => document.removeEventListener("mousedown", m, !0);
980
+ }, [i]);
981
+ const s = () => {
982
+ if (u(!1), t) return t(e.id);
983
+ if (!d?.renamePage) return;
984
+ const m = window.prompt("Rename page", e.name);
985
+ m != null && m.trim().length > 0 && d.renamePage(e.id, m.trim());
986
+ }, o = () => {
987
+ u(!1), d?.duplicatePage?.(e.id);
988
+ }, c = () => {
989
+ u(!1), !e.active && d?.deletePage?.(e.id);
990
+ }, p = ["pm-row"];
991
+ return e.active && p.push("active"), /* @__PURE__ */ h("div", { ref: l, className: p.join(" "), "data-page-id": e.id, role: "listitem", children: [
992
+ /* @__PURE__ */ a(
993
+ "div",
994
+ {
995
+ className: "pm-handle",
996
+ "aria-hidden": "true",
997
+ onMouseDown: () => n?.(e.id),
998
+ children: "⋮⋮"
999
+ }
1000
+ ),
1001
+ /* @__PURE__ */ a("div", { className: "pm-name", children: e.name }),
1002
+ /* @__PURE__ */ a(
1003
+ "button",
1004
+ {
1005
+ type: "button",
1006
+ className: "pm-kebab",
1007
+ "aria-label": "Page options",
1008
+ "aria-haspopup": "menu",
1009
+ "aria-expanded": i,
1010
+ onClick: (m) => {
1011
+ if (m.stopPropagation(), r) return r(e.id);
1012
+ u((v) => !v);
1013
+ },
1014
+ children: "⋯"
1015
+ }
1016
+ ),
1017
+ i && /* @__PURE__ */ h("div", { className: "pm-kebab-menu", role: "menu", "data-page-id": e.id, children: [
1018
+ /* @__PURE__ */ a("button", { type: "button", role: "menuitem", className: "pm-kebab-menu__item", onClick: s, children: "Rename" }),
1019
+ /* @__PURE__ */ a("button", { type: "button", role: "menuitem", className: "pm-kebab-menu__item", onClick: o, children: "Duplicate" }),
1020
+ /* @__PURE__ */ a(
1021
+ "button",
1022
+ {
1023
+ type: "button",
1024
+ role: "menuitem",
1025
+ className: "pm-kebab-menu__item pm-kebab-menu__item--danger",
1026
+ onClick: c,
1027
+ "aria-disabled": e.active,
1028
+ children: "Delete"
1029
+ }
1030
+ )
1031
+ ] })
1032
+ ] });
1033
+ }
1034
+ const Be = [
482
1035
  { id: "p-pipeline", name: "My Pipeline", active: !0 },
483
1036
  { id: "p-numbers", name: "My Numbers", active: !1 },
484
1037
  { id: "p-morning", name: "My Morning", active: !1 },
485
1038
  { id: "p-accounts", name: "My Accounts", active: !1 }
486
1039
  ];
487
- function Ye({
1040
+ function yt({
488
1041
  isOpen: e,
489
- pages: t = _e,
490
- footerSlot: o
1042
+ pages: t = Be,
1043
+ footerSlot: r
491
1044
  }) {
492
- const [n, r] = b(() => [...t]);
493
- return /* @__PURE__ */ p(Z.Provider, { value: { pages: n, setPages: r }, children: [
494
- /* @__PURE__ */ p("div", { "data-shell": "page-management", "aria-hidden": !e, children: [
495
- /* @__PURE__ */ s("h3", { children: "Manage pages" }),
496
- /* @__PURE__ */ s("div", { className: "pm-list", role: "list", children: n.map((l) => /* @__PURE__ */ s(ye, { page: l }, l.id)) })
497
- ] }),
498
- o
499
- ] });
1045
+ const [n, d] = C(() => [...t]), i = E((s, o) => {
1046
+ d((c) => c.map((p) => p.id === s ? { ...p, name: o } : p));
1047
+ }, []), u = E((s) => {
1048
+ d((o) => {
1049
+ const c = o.find((v) => v.id === s);
1050
+ if (!c) return o;
1051
+ const p = {
1052
+ id: `${c.id}-copy-${Date.now()}`,
1053
+ name: `${c.name} copy`,
1054
+ active: !1
1055
+ }, m = o.findIndex((v) => v.id === s);
1056
+ return [...o.slice(0, m + 1), p, ...o.slice(m + 1)];
1057
+ });
1058
+ }, []), l = E((s) => {
1059
+ d((o) => o.filter((c) => c.id !== s));
1060
+ }, []);
1061
+ return /* @__PURE__ */ a(re.Provider, { value: { pages: n, setPages: d, renamePage: i, duplicatePage: u, deletePage: l }, children: /* @__PURE__ */ h("div", { "data-shell": "page-management", "aria-hidden": !e, children: [
1062
+ /* @__PURE__ */ a("div", { className: "pm-list", role: "list", children: n.map((s) => /* @__PURE__ */ a(Ke, { page: s }, s.id)) }),
1063
+ r != null && /* @__PURE__ */ a("div", { className: "pm-footer-pin", children: r })
1064
+ ] }) });
500
1065
  }
501
- const Ke = {
1066
+ const St = {
502
1067
  SETTINGS: "settings",
503
1068
  CATALOG_ADD: "catalog-add",
504
1069
  CATALOG_REPLACE: "catalog-replace",
505
1070
  PAGE_MGMT: "page-management",
506
1071
  NOTIFICATION_CENTER: "notification-center"
507
- }, Ne = {
1072
+ }, Ye = {
508
1073
  position: "fixed",
509
1074
  inset: 0,
510
1075
  pointerEvents: "none",
511
1076
  zIndex: 55
512
- }, Se = {
1077
+ }, We = {
513
1078
  position: "absolute",
514
1079
  inset: 0,
515
1080
  zIndex: 1,
@@ -518,426 +1083,447 @@ const Ke = {
518
1083
  pointerEvents: "none",
519
1084
  background: "rgba(0, 0, 0, 0.04)"
520
1085
  };
521
- function We() {
522
- const { state: e, dispatch: t, getCloseLog: o } = oe();
523
- V(() => {
1086
+ function Ct() {
1087
+ const { state: e, dispatch: t, getCloseLog: r } = ge();
1088
+ A(() => {
524
1089
  if (e.activePanelId == null) return;
525
- function l(d) {
526
- d.key === "Escape" && t({ type: "CLOSE_PANEL", reason: "escape-key" });
1090
+ function i(u) {
1091
+ u.key === "Escape" && t({ type: "CLOSE_PANEL", reason: "escape-key" });
527
1092
  }
528
- return document.addEventListener("keydown", l), () => document.removeEventListener("keydown", l);
1093
+ return document.addEventListener("keydown", i), () => document.removeEventListener("keydown", i);
529
1094
  }, [e.activePanelId, t]);
530
- const n = U(e);
531
- re(() => {
1095
+ const n = I(e);
1096
+ ve(() => {
532
1097
  n.current = e;
533
- }), V(() => {
1098
+ }), A(() => {
534
1099
  if (process.env.NODE_ENV === "production") return;
535
- const l = window;
536
- return l.__panelsHostHandle && console.warn("[panels] multiple PanelHost/PanelHostShell instances mounted; dev handle is unreliable"), l.__panelsHostHandle = {
1100
+ const i = window;
1101
+ return i.__panelsHostHandle && console.warn("[panels] multiple PanelHost/PanelHostShell instances mounted; dev handle is unreliable"), i.__panelsHostHandle = {
537
1102
  dispatch: t,
538
1103
  getState: () => n.current,
539
- getCloseLog: o
1104
+ getCloseLog: r
540
1105
  }, () => {
541
- l.__panelsHostHandle?.dispatch === t && delete window.__panelsHostHandle;
1106
+ i.__panelsHostHandle?.dispatch === t && delete window.__panelsHostHandle;
542
1107
  };
543
- }, [t, o]);
544
- const r = W(() => {
1108
+ }, [t, r]);
1109
+ const d = E(() => {
545
1110
  t({ type: "CLOSE_PANEL", reason: "nav-escape-hatch" });
546
1111
  }, [t]);
547
- return /* @__PURE__ */ s("div", { "data-panel-host": "true", style: Ne, children: e.activePanelId != null && /* @__PURE__ */ s(
1112
+ return /* @__PURE__ */ a("div", { "data-panel-host": "true", style: Ye, children: e.activePanelId != null && /* @__PURE__ */ a(
548
1113
  "div",
549
1114
  {
550
1115
  "data-panel-scrim": "true",
551
- style: Se,
552
- onClick: r
1116
+ style: We,
1117
+ onClick: d
553
1118
  }
554
1119
  ) });
555
1120
  }
556
- function je({ panelComponents: e, children: t }) {
557
- const o = I();
558
- if (o == null) return null;
559
- const { state: n, dispatch: r } = o;
560
- if (n.activePanelId == null) return null;
561
- const l = e?.[n.activePanelId];
562
- if (l == null && t == null)
1121
+ const Ge = 700;
1122
+ function qe(e) {
1123
+ const [t, r] = C(null), n = I(null);
1124
+ return A(() => {
1125
+ if (e != null) {
1126
+ n.current != null && (clearTimeout(n.current), n.current = null), r(null);
1127
+ return;
1128
+ }
1129
+ return r((d) => d), n.current = setTimeout(() => {
1130
+ r(null), n.current = null;
1131
+ }, Ge), () => {
1132
+ n.current != null && (clearTimeout(n.current), n.current = null);
1133
+ };
1134
+ }, [e]), A(() => {
1135
+ e != null && r(e);
1136
+ }, [e]), e != null ? { panelId: e, isOpen: !0 } : t != null ? { panelId: t, isOpen: !1 } : { panelId: null, isOpen: !1 };
1137
+ }
1138
+ function _t({ panelComponents: e, children: t }) {
1139
+ const r = k();
1140
+ if (r == null) return null;
1141
+ const { state: n, dispatch: d } = r, i = qe(n.activePanelId);
1142
+ if (i.panelId == null) return null;
1143
+ const u = i.panelId, l = i.isOpen, s = e?.[u];
1144
+ if (s == null && t == null)
563
1145
  return process.env.NODE_ENV !== "production" && console.error(
564
1146
  "[panels] No panel component registered for activePanelId:",
565
- n.activePanelId
1147
+ u
566
1148
  ), null;
567
- if (n.activePanelId === "settings") {
568
- const d = n.isDirty, i = n.activeTrigger, a = i?.kind === "card-overflow" ? i.cardId : null;
569
- return /* @__PURE__ */ s(E, { isOpen: !0, children: /* @__PURE__ */ s(
570
- A,
1149
+ if (u === "settings") {
1150
+ const o = n.isDirty, c = n.activeTrigger, p = c?.kind === "card-overflow" ? c.cardId : null;
1151
+ return /* @__PURE__ */ a(x, { isOpen: l, children: /* @__PURE__ */ a(
1152
+ T,
571
1153
  {
572
- isOpen: !0,
573
- onClose: () => r({ type: "CLOSE_PANEL", reason: "header-x" }),
574
- footer: /* @__PURE__ */ p(ae, { children: [
575
- /* @__PURE__ */ s(
1154
+ isOpen: l,
1155
+ title: "Configure metric",
1156
+ variant: "merged-stage",
1157
+ onClose: () => d({ type: "CLOSE_PANEL", reason: "header-x" }),
1158
+ footer: /* @__PURE__ */ h(J, { children: [
1159
+ /* @__PURE__ */ a(
576
1160
  "button",
577
1161
  {
578
1162
  id: "btn-reset",
579
1163
  type: "button",
580
1164
  className: "gloss-panel-chrome__footer-btn",
581
- disabled: !d,
1165
+ disabled: !o,
582
1166
  onClick: () => {
583
- a != null && r({ type: "CLEAR_BUFFER", cardId: a });
1167
+ p != null && d({ type: "CLEAR_BUFFER", cardId: p });
584
1168
  },
585
1169
  children: "Reset"
586
1170
  }
587
1171
  ),
588
- /* @__PURE__ */ s("span", { style: { flex: 1 } }),
589
- /* @__PURE__ */ s(
1172
+ /* @__PURE__ */ a("span", { style: { flex: 1 } }),
1173
+ /* @__PURE__ */ a(
590
1174
  "button",
591
1175
  {
592
1176
  id: "settings-cancel",
593
1177
  type: "button",
594
1178
  className: "gloss-panel-chrome__footer-btn",
595
- onClick: () => r({ type: "CLOSE_PANEL", reason: "cancel-button" }),
1179
+ onClick: () => d({ type: "CLOSE_PANEL", reason: "cancel-button" }),
596
1180
  children: "Cancel"
597
1181
  }
598
1182
  ),
599
- /* @__PURE__ */ s(
1183
+ /* @__PURE__ */ a(
600
1184
  "button",
601
1185
  {
602
1186
  id: "settings-apply",
603
1187
  type: "button",
604
1188
  className: "gloss-panel-chrome__footer-btn gloss-panel-chrome__footer-btn--primary",
605
- disabled: !d,
606
- onClick: () => r({ type: "CLOSE_PANEL", reason: "apply-button" }),
1189
+ disabled: !o,
1190
+ onClick: () => d({ type: "CLOSE_PANEL", reason: "apply-button" }),
607
1191
  children: "Apply"
608
1192
  }
609
1193
  )
610
1194
  ] }),
611
- children: l != null ? /* @__PURE__ */ s(l, { isOpen: !0 }) : t
1195
+ children: s != null ? /* @__PURE__ */ a(s, { isOpen: l }) : t
612
1196
  }
613
1197
  ) });
614
1198
  }
615
- if (n.activePanelId === "catalog-add" || n.activePanelId === "catalog-replace") {
616
- if (l == null) return null;
617
- const d = n.activePanelId === "catalog-replace" ? "replace" : "add";
618
- return /* @__PURE__ */ s(E, { isOpen: !0, children: /* @__PURE__ */ s(
619
- A,
1199
+ if (u === "catalog-add" || u === "catalog-replace") {
1200
+ if (s == null) return null;
1201
+ const o = u === "catalog-replace" ? "replace" : "add";
1202
+ return /* @__PURE__ */ a(x, { isOpen: l, children: /* @__PURE__ */ a(
1203
+ T,
620
1204
  {
621
- isOpen: !0,
622
- onClose: () => r({ type: "CLOSE_PANEL", reason: "header-x" }),
1205
+ isOpen: l,
1206
+ onClose: () => d({ type: "CLOSE_PANEL", reason: "header-x" }),
623
1207
  footer: null,
624
- children: /* @__PURE__ */ s(
625
- l,
1208
+ title: o === "replace" ? "Replace metric" : "Add a metric",
1209
+ children: /* @__PURE__ */ a(
1210
+ s,
626
1211
  {
627
- isOpen: !0,
628
- footerSlot: /* @__PURE__ */ s(be, { mode: d, dispatch: r })
1212
+ isOpen: l,
1213
+ footerSlot: /* @__PURE__ */ a(ze, { mode: o, dispatch: d })
629
1214
  }
630
1215
  )
631
1216
  }
632
1217
  ) });
633
1218
  }
634
- return n.activePanelId === "page-management" ? l == null ? null : /* @__PURE__ */ s(E, { isOpen: !0, children: /* @__PURE__ */ s(
635
- A,
1219
+ return u === "page-management" ? s == null ? null : /* @__PURE__ */ a(x, { isOpen: l, children: /* @__PURE__ */ a(
1220
+ T,
636
1221
  {
637
- isOpen: !0,
638
- onClose: () => r({ type: "CLOSE_PANEL", reason: "header-x" }),
1222
+ isOpen: l,
1223
+ onClose: () => d({ type: "CLOSE_PANEL", reason: "header-x" }),
639
1224
  footer: null,
640
- children: /* @__PURE__ */ s(l, { isOpen: !0, footerSlot: /* @__PURE__ */ s(Pe, {}) })
1225
+ title: "Manage pages",
1226
+ children: /* @__PURE__ */ a(s, { isOpen: l, footerSlot: /* @__PURE__ */ a(Ve, {}) })
641
1227
  }
642
- ) }) : /* @__PURE__ */ s(E, { isOpen: !0, children: /* @__PURE__ */ s(
643
- A,
1228
+ ) }) : /* @__PURE__ */ a(x, { isOpen: l, children: /* @__PURE__ */ a(
1229
+ T,
644
1230
  {
645
1231
  isOpen: !0,
646
- onClose: () => r({ type: "CLOSE_PANEL", reason: "header-x" }),
1232
+ onClose: () => d({ type: "CLOSE_PANEL", reason: "header-x" }),
647
1233
  footer: null,
648
- children: l != null ? /* @__PURE__ */ s(l, { isOpen: !0 }) : t
1234
+ children: s != null ? /* @__PURE__ */ a(s, { isOpen: l }) : t
649
1235
  }
650
1236
  ) });
651
1237
  }
652
- function B(e) {
1238
+ function j(e) {
653
1239
  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;
654
1240
  }
655
- const we = 685, H = 627, Ee = "cubic-bezier(0.22, 1, 0.36, 1)", Ae = 200;
656
- function ee(e, t) {
1241
+ const je = 685, Q = 627, Qe = "cubic-bezier(0.22, 1, 0.36, 1)", Xe = 200;
1242
+ function oe(e, t) {
657
1243
  if (typeof window > "u") return t;
658
- const o = window.getComputedStyle(document.documentElement).getPropertyValue(e).trim();
659
- if (!o) return t;
660
- const n = parseFloat(o);
661
- return Number.isNaN(n) ? t : o.endsWith("s") && !o.endsWith("ms") ? n * 1e3 : n;
1244
+ const r = window.getComputedStyle(document.documentElement).getPropertyValue(e).trim();
1245
+ if (!r) return t;
1246
+ const n = parseFloat(r);
1247
+ return Number.isNaN(n) ? t : r.endsWith("s") && !r.endsWith("ms") ? n * 1e3 : n;
662
1248
  }
663
- function xe(e, t) {
1249
+ function Je(e, t) {
664
1250
  return typeof window > "u" ? t : window.getComputedStyle(document.documentElement).getPropertyValue(e).trim() || t;
665
1251
  }
666
- function x(e) {
1252
+ function O(e) {
667
1253
  e.dispatch({ type: "OPEN_PANEL", panelId: e.panelId, trigger: e.trigger });
668
1254
  }
669
- function Te(e) {
670
- const { mountEl: t, chromeEl: o, reducedMotion: n, onAssert: r } = e;
671
- if (t == null || o == null) {
672
- x(e), r?.({ branch: "slide-fallback-no-dom", timestamp: Date.now() });
1255
+ function Ze(e) {
1256
+ const { mountEl: t, chromeEl: r, reducedMotion: n, onAssert: d } = e;
1257
+ if (t == null || r == null) {
1258
+ O(e), d?.({ branch: "slide-fallback-no-dom", timestamp: Date.now() });
673
1259
  return;
674
1260
  }
675
1261
  if (n) {
676
- e.dispatch({ type: "OPEN_PANEL", panelId: e.panelId, trigger: e.trigger }), r?.({ branch: "slide-reduced-motion", timestamp: Date.now() });
1262
+ e.dispatch({ type: "OPEN_PANEL", panelId: e.panelId, trigger: e.trigger }), d?.({ branch: "slide-reduced-motion", timestamp: Date.now() });
677
1263
  return;
678
1264
  }
679
- if (typeof o.animate != "function") {
680
- x(e), r?.({ branch: "slide-no-waapi", timestamp: Date.now() });
1265
+ if (typeof r.animate != "function") {
1266
+ O(e), d?.({ branch: "slide-no-waapi", timestamp: Date.now() });
681
1267
  return;
682
1268
  }
683
- const l = o.cloneNode(!0);
684
- l.id = "panel-chrome-frozen", l.style.cssText = "position:absolute;left:8px;right:8px;top:8px;z-index:1;pointer-events:none;", t.appendChild(l), o.style.zIndex = "2", e.dispatch({ type: "OPEN_PANEL", panelId: e.panelId, trigger: e.trigger });
685
- const d = ee("--panel-open-dur", we), i = xe("--panel-easing", Ee), a = o.animate(
1269
+ const i = r.cloneNode(!0);
1270
+ i.id = "panel-chrome-frozen", i.style.cssText = "position:absolute;left:8px;right:8px;top:8px;z-index:1;pointer-events:none;", t.appendChild(i), r.style.zIndex = "2", e.dispatch({ type: "OPEN_PANEL", panelId: e.panelId, trigger: e.trigger });
1271
+ const u = oe("--panel-open-dur", je), l = Je("--panel-easing", Qe), s = r.animate(
686
1272
  [{ transform: "translateY(100%)" }, { transform: "translateY(0)" }],
687
- { duration: d, easing: i, fill: "forwards" }
1273
+ { duration: u, easing: l, fill: "forwards" }
688
1274
  );
689
- a.addEventListener(
1275
+ s.addEventListener(
690
1276
  "finish",
691
1277
  () => {
692
- l.remove(), o.style.zIndex = "", a.cancel(), r?.({ branch: "slide-complete", frozen: "cleaned", timestamp: Date.now() });
1278
+ i.remove(), r.style.zIndex = "", s.cancel(), d?.({ branch: "slide-complete", frozen: "cleaned", timestamp: Date.now() });
693
1279
  },
694
1280
  { once: !0 }
695
1281
  );
696
1282
  }
697
- function Ie(e) {
698
- const { mountEl: t, onAssert: o } = e;
1283
+ function et(e) {
1284
+ const { mountEl: t, onAssert: r } = e;
699
1285
  if (t == null) {
700
- e.dispatch({ type: "CLOSE_PANEL", reason: "mutex-handoff" }), setTimeout(() => x(e), H), o?.({ branch: "handoff-fallback-no-mount", timestamp: Date.now() });
1286
+ e.dispatch({ type: "CLOSE_PANEL", reason: "mutex-handoff" }), setTimeout(() => O(e), Q), r?.({ branch: "handoff-fallback-no-mount", timestamp: Date.now() });
701
1287
  return;
702
1288
  }
703
- const n = ee("--panel-close-dur", H);
704
- let r = !1, l = null;
705
- const d = (a) => {
706
- a.target !== t || a.propertyName !== "max-height" || r || (r = !0, l != null && clearTimeout(l), t.removeEventListener("transitionend", d), e.dispatch({ type: "OPEN_PANEL", panelId: e.panelId, trigger: e.trigger }), o?.({ branch: "handoff-complete", timestamp: Date.now() }));
707
- }, i = () => {
708
- r || (r = !0, t.removeEventListener("transitionend", d), e.dispatch({ type: "OPEN_PANEL", panelId: e.panelId, trigger: e.trigger }), o?.({ branch: "handoff-forced", timestamp: Date.now() }));
1289
+ const n = oe("--panel-close-dur", Q);
1290
+ let d = !1, i = null;
1291
+ const u = (s) => {
1292
+ s.target !== t || s.propertyName !== "max-height" || d || (d = !0, i != null && clearTimeout(i), t.removeEventListener("transitionend", u), e.dispatch({ type: "OPEN_PANEL", panelId: e.panelId, trigger: e.trigger }), r?.({ branch: "handoff-complete", timestamp: Date.now() }));
1293
+ }, l = () => {
1294
+ d || (d = !0, t.removeEventListener("transitionend", u), e.dispatch({ type: "OPEN_PANEL", panelId: e.panelId, trigger: e.trigger }), r?.({ branch: "handoff-forced", timestamp: Date.now() }));
709
1295
  };
710
- t.addEventListener("transitionend", d), e.dispatch({ type: "CLOSE_PANEL", reason: "mutex-handoff" }), l = setTimeout(i, n + Ae);
1296
+ t.addEventListener("transitionend", u), e.dispatch({ type: "CLOSE_PANEL", reason: "mutex-handoff" }), i = setTimeout(l, n + Xe);
711
1297
  }
712
- function Le(e) {
713
- const { state: t, onAssert: o } = e;
1298
+ function tt(e) {
1299
+ const { state: t, onAssert: r } = e;
714
1300
  if (t.activePanelId && t.isDirty) {
715
- e.dispatch({ type: "OPEN_PANEL", panelId: e.panelId, trigger: e.trigger }), o?.({ branch: "blocked-dirty", timestamp: Date.now() });
1301
+ e.dispatch({ type: "OPEN_PANEL", panelId: e.panelId, trigger: e.trigger }), r?.({ branch: "blocked-dirty", timestamp: Date.now() });
716
1302
  return;
717
1303
  }
718
- const n = B(t.activeTrigger), r = B(e.trigger);
719
- if (!!t.activePanelId && n != null && n === r) {
720
- Te(e);
1304
+ const n = j(t.activeTrigger), d = j(e.trigger);
1305
+ if (!!t.activePanelId && n != null && n === d) {
1306
+ Ze(e);
721
1307
  return;
722
1308
  }
723
1309
  if (t.activePanelId) {
724
- Ie(e);
1310
+ et(e);
725
1311
  return;
726
1312
  }
727
- x(e), o?.({ branch: "fresh-open", timestamp: Date.now() });
1313
+ O(e), r?.({ branch: "fresh-open", timestamp: Date.now() });
728
1314
  }
729
- function Oe() {
1315
+ function nt() {
730
1316
  if (!(typeof window > "u"))
731
1317
  return window.__panelsAsserter;
732
1318
  }
733
- function Ge() {
734
- const e = I(), t = q();
735
- return W(
736
- (o, n) => {
1319
+ function Nt() {
1320
+ const e = k(), t = X();
1321
+ return E(
1322
+ (r, n) => {
737
1323
  if (!e)
738
1324
  return;
739
- const r = typeof document < "u" ? document.querySelector('[data-mount="panel"]') : null, l = typeof document < "u" ? document.querySelector('[data-chrome="panel"]') : null, d = {
740
- panelId: o,
1325
+ const d = typeof document < "u" ? document.querySelector('[data-mount="panel"]') : null, i = typeof document < "u" ? document.querySelector('[data-chrome="panel"]') : null, u = {
1326
+ panelId: r,
741
1327
  trigger: n,
742
1328
  state: e.state,
743
1329
  dispatch: e.dispatch,
744
- mountEl: r,
745
- chromeEl: l,
1330
+ mountEl: d,
1331
+ chromeEl: i,
746
1332
  reducedMotion: t,
747
- onAssert: (i) => {
748
- Oe()?.recordTransition?.(i);
1333
+ onAssert: (l) => {
1334
+ nt()?.recordTransition?.(l);
749
1335
  }
750
1336
  };
751
- Le(d);
1337
+ tt(u);
752
1338
  },
753
1339
  [e, t]
754
1340
  );
755
1341
  }
756
- let T = !1, L = null;
757
- function $() {
1342
+ let L = !1, D = null;
1343
+ function H() {
758
1344
  const e = [];
759
1345
  let t = "cleaned";
760
1346
  document.querySelectorAll("#panel-chrome-frozen").length > 0 && (e.push("#panel-chrome-frozen"), t = "lingering");
761
1347
  const n = document.querySelectorAll(".gloss-panel-mount");
762
1348
  n.length > 1 && e.push(`mount-count=${n.length}`);
763
- const r = n[0] ?? null, l = r ? r.querySelectorAll(".gloss-panel-chrome") : [];
764
- l.length > 1 && e.push(`chrome-count=${l.length}`);
765
- const d = l[0] ?? null;
766
- if (d) {
767
- const u = d.style.zIndex;
768
- u !== "" && u !== "2" && e.push(`chrome-zindex=${u}`);
1349
+ const d = n[0] ?? null, i = d ? d.querySelectorAll(".gloss-panel-chrome") : [];
1350
+ i.length > 1 && e.push(`chrome-count=${i.length}`);
1351
+ const u = i[0] ?? null;
1352
+ if (u) {
1353
+ const c = u.style.zIndex;
1354
+ c !== "" && c !== "2" && e.push(`chrome-zindex=${c}`);
769
1355
  }
770
- const i = r ? "present" : "absent", a = d ? "present" : "absent";
1356
+ const l = d ? "present" : "absent", s = u ? "present" : "absent";
771
1357
  return {
772
1358
  valid: e.length === 0,
773
- mount: i,
774
- chrome: a,
1359
+ mount: l,
1360
+ chrome: s,
775
1361
  frozen: t,
776
1362
  orphans: e,
777
1363
  timestamp: Date.now()
778
1364
  };
779
1365
  }
780
- const O = "8px 8px 0px", k = "64px", M = "inset(0px 0px 60px 0px)", D = "inset(0px -40px -40px -40px)";
781
- function m(e, t, o, n, r) {
782
- return { id: e, constraint: t, expected: o, actual: n, pass: r };
1366
+ const M = "8px 8px 0px", $ = "64px", R = "inset(0px 0px 60px 0px)", F = "inset(0px -40px -40px -40px)";
1367
+ function f(e, t, r, n, d) {
1368
+ return { id: e, constraint: t, expected: r, actual: n, pass: d };
783
1369
  }
784
1370
  function P(e) {
785
1371
  const t = parseInt(e, 10);
786
1372
  return Number.isFinite(t) ? t : NaN;
787
1373
  }
788
- function F() {
789
- const e = [], t = document.querySelector(".gloss-panel-mount"), o = t?.querySelector(".gloss-panel-chrome") ?? null, n = document.querySelector(".gloss-panel-coordinator") ?? document.querySelector("[data-panel-coordinator]"), r = document.querySelector(".bell-cutout"), l = document.querySelector(".bell-popover"), d = document.querySelector(".gloss-bottom-toolbar");
1374
+ function K() {
1375
+ const e = [], t = document.querySelector(".gloss-panel-mount"), r = t?.querySelector(".gloss-panel-chrome") ?? null, n = document.querySelector(".gloss-panel-coordinator") ?? document.querySelector("[data-panel-coordinator]"), d = document.querySelector(".bell-cutout"), i = document.querySelector(".bell-popover"), u = document.querySelector(".gloss-bottom-toolbar");
790
1376
  if (!t)
791
- e.push(m("C1", "mount --reveal-y matches clip-path inset-bottom Npx", "mount present", "absent", !1));
1377
+ e.push(f("C1", "mount --reveal-y matches clip-path inset-bottom Npx", "mount present", "absent", !1));
792
1378
  else {
793
- const i = getComputedStyle(t), a = i.getPropertyValue("--reveal-y").trim() || t.style.getPropertyValue("--reveal-y").trim(), c = i.clipPath || t.style.clipPath || "", u = c.match(/inset\(\s*0(?:px)?\s+0(?:px)?\s+(\d+)px\s+0(?:px)?\s*\)/), h = u ? parseInt(u[1], 10) : NaN, g = P(a), f = Number.isFinite(h) && Number.isFinite(g) && h === g;
1379
+ const l = getComputedStyle(t), s = l.getPropertyValue("--reveal-y").trim() || t.style.getPropertyValue("--reveal-y").trim(), o = l.clipPath || t.style.clipPath || "", c = o.match(/inset\(\s*0(?:px)?\s+0(?:px)?\s+(\d+)px\s+0(?:px)?\s*\)/), p = c ? parseInt(c[1], 10) : NaN, m = P(s), v = Number.isFinite(p) && Number.isFinite(m) && p === m;
794
1380
  e.push(
795
- m(
1381
+ f(
796
1382
  "C1",
797
1383
  "mount --reveal-y matches clip-path inset-bottom Npx",
798
- `inset(0 0 ${g}px 0) === --reveal-y(${g}px)`,
799
- `--reveal-y=${a || "n/a"} clip-path=${c || "n/a"}`,
800
- f
1384
+ `inset(0 0 ${m}px 0) === --reveal-y(${m}px)`,
1385
+ `--reveal-y=${s || "n/a"} clip-path=${o || "n/a"}`,
1386
+ v
801
1387
  )
802
1388
  );
803
1389
  }
804
1390
  if (!t)
805
- e.push(m("C2", "mount padding constant", O, "absent", !1));
1391
+ e.push(f("C2", "mount padding constant", M, "absent", !1));
806
1392
  else {
807
- const i = t.style.padding, a = getComputedStyle(t), c = i || a.padding || "", u = c === O || c === "8px 8px 0px 8px";
808
- e.push(m("C2", "mount padding constant", O, c || "n/a", u));
1393
+ const l = t.style.padding, s = getComputedStyle(t), o = l || s.padding || "", c = o === M || o === "8px 8px 0px 8px";
1394
+ e.push(f("C2", "mount padding constant", M, o || "n/a", c));
809
1395
  }
810
1396
  if (!t)
811
- e.push(m("C3", "mount.bottom resolves to var(--tb-h)=64px", k, "absent", !1));
1397
+ e.push(f("C3", "mount.bottom resolves to var(--tb-h)=64px", $, "absent", !1));
812
1398
  else {
813
- const a = getComputedStyle(t).bottom || t.style.bottom || "", c = a === k;
814
- e.push(m("C3", "mount.bottom resolves to var(--tb-h)=64px", k, a || "n/a", c));
1399
+ const s = getComputedStyle(t).bottom || t.style.bottom || "", o = s === $;
1400
+ e.push(f("C3", "mount.bottom resolves to var(--tb-h)=64px", $, s || "n/a", o));
815
1401
  }
816
- if (!o)
817
- e.push(m("C4", "panel-chrome height formula = (row-h*3)+(row-gap*3)-8px", "formula match", "absent", !1));
1402
+ if (!r)
1403
+ e.push(f("C4", "panel-chrome height formula = (row-h*3)+(row-gap*3)-8px", "formula match", "absent", !1));
818
1404
  else {
819
- const i = getComputedStyle(o), a = P(
820
- i.getPropertyValue("--row-h").trim() || o.style.getPropertyValue("--row-h").trim() || "0"
821
- ), c = P(
822
- i.getPropertyValue("--row-gap").trim() || o.style.getPropertyValue("--row-gap").trim() || "0"
823
- ), u = a * 3 + c * 3 - 8, h = P(i.height || o.style.height || ""), g = Number.isFinite(a) && Number.isFinite(c) && Number.isFinite(h) && Number.isFinite(u) && h === u;
1405
+ const l = getComputedStyle(r), s = P(
1406
+ l.getPropertyValue("--row-h").trim() || r.style.getPropertyValue("--row-h").trim() || "0"
1407
+ ), o = P(
1408
+ l.getPropertyValue("--row-gap").trim() || r.style.getPropertyValue("--row-gap").trim() || "0"
1409
+ ), c = s * 3 + o * 3 - 8, p = P(l.height || r.style.height || ""), m = Number.isFinite(s) && Number.isFinite(o) && Number.isFinite(p) && Number.isFinite(c) && p === c;
824
1410
  e.push(
825
- m(
1411
+ f(
826
1412
  "C4",
827
1413
  "panel-chrome height formula = (row-h*3)+(row-gap*3)-8px",
828
- `${u}px (rh=${a} rg=${c})`,
829
- `${h}px`,
830
- g
1414
+ `${c}px (rh=${s} rg=${o})`,
1415
+ `${p}px`,
1416
+ m
831
1417
  )
832
1418
  );
833
1419
  }
834
- if (!n || !o)
1420
+ if (!n || !r)
835
1421
  e.push(
836
- m(
1422
+ f(
837
1423
  "C5",
838
1424
  'coordinator perspective + origin "center bottom"; chrome perspective-style flat',
839
1425
  "present",
840
- `coordinator=${n ? "present" : "absent"} chrome=${o ? "present" : "absent"}`,
1426
+ `coordinator=${n ? "present" : "absent"} chrome=${r ? "present" : "absent"}`,
841
1427
  !1
842
1428
  )
843
1429
  );
844
1430
  else {
845
- const i = getComputedStyle(n), a = getComputedStyle(o), c = i.perspective || n.style.perspective || "", u = (i.perspectiveOrigin || n.style.perspectiveOrigin || "").trim(), h = a.perspectiveStyle || o.style.perspectiveStyle || "", v = c !== "" && c !== "none" && (u === "center bottom" || u === "50% 100%") && h === "flat";
1431
+ const l = getComputedStyle(n), s = getComputedStyle(r), o = l.perspective || n.style.perspective || "", c = (l.perspectiveOrigin || n.style.perspectiveOrigin || "").trim(), p = s.perspectiveStyle || r.style.perspectiveStyle || "", b = o !== "" && o !== "none" && (c === "center bottom" || c === "50% 100%") && p === "flat";
846
1432
  e.push(
847
- m(
1433
+ f(
848
1434
  "C5",
849
1435
  'coordinator perspective + origin "center bottom"; chrome perspective-style flat',
850
1436
  "perspective:not-none, origin:center bottom, chrome-style:flat",
851
- `perspective=${c} origin=${u} chrome-style=${h}`,
852
- v
1437
+ `perspective=${o} origin=${c} chrome-style=${p}`,
1438
+ b
853
1439
  )
854
1440
  );
855
1441
  }
856
1442
  {
857
- let i = !1, a = "absent";
1443
+ let l = !1, s = "absent";
858
1444
  try {
859
- for (const c of Array.from(document.styleSheets)) {
860
- let u = [];
1445
+ for (const o of Array.from(document.styleSheets)) {
1446
+ let c = [];
861
1447
  try {
862
- u = Array.from(c.cssRules ?? []);
1448
+ c = Array.from(o.cssRules ?? []);
863
1449
  } catch {
864
1450
  continue;
865
1451
  }
866
- for (const h of u)
867
- if (h.name === "stage-spin") {
868
- const f = Array.from(h.cssRules), y = f.find((C) => C.keyText === "0%" || C.keyText === "from"), v = f.find((C) => C.keyText === "100%" || C.keyText === "to"), N = y?.style.transform ?? "", S = v?.style.transform ?? "", w = /rotateY\(\s*0(?:deg)?\s*\)/;
869
- i = w.test(N) && w.test(S), a = `0%=${N || "n/a"} 100%=${S || "n/a"}`;
1452
+ for (const p of c)
1453
+ if (p.name === "stage-spin") {
1454
+ const v = Array.from(p.cssRules), y = v.find((S) => S.keyText === "0%" || S.keyText === "from"), b = v.find((S) => S.keyText === "100%" || S.keyText === "to"), _ = y?.style.transform ?? "", N = b?.style.transform ?? "", g = /rotateY\(\s*0(?:deg)?\s*\)/;
1455
+ l = g.test(_) && g.test(N), s = `0%=${_ || "n/a"} 100%=${N || "n/a"}`;
870
1456
  break;
871
1457
  }
872
- if (a !== "absent") break;
1458
+ if (s !== "absent") break;
873
1459
  }
874
1460
  } catch {
875
- a = "inspection-error";
1461
+ s = "inspection-error";
876
1462
  }
877
1463
  e.push(
878
- m(
1464
+ f(
879
1465
  "C6",
880
1466
  "@keyframes stage-spin 0% AND 100% anchor at rotateY(0)",
881
1467
  "both frames rotateY(0)",
882
- a,
883
- i
1468
+ s,
1469
+ l
884
1470
  )
885
1471
  );
886
1472
  }
887
1473
  {
888
- const i = document.documentElement, a = getComputedStyle(i), c = a.getPropertyValue("--panel-open-dur").trim() || i.style.getPropertyValue("--panel-open-dur").trim(), u = a.getPropertyValue("--panel-close-dur").trim() || i.style.getPropertyValue("--panel-close-dur").trim(), h = P(c) || parseFloat(c) * (c.endsWith("s") && !c.endsWith("ms") ? 1e3 : 1), g = P(u) || parseFloat(u) * (u.endsWith("s") && !u.endsWith("ms") ? 1e3 : 1), f = Number.isFinite(h) && Number.isFinite(g) && h > g;
1474
+ const l = document.documentElement, s = getComputedStyle(l), o = s.getPropertyValue("--panel-open-dur").trim() || l.style.getPropertyValue("--panel-open-dur").trim(), c = s.getPropertyValue("--panel-close-dur").trim() || l.style.getPropertyValue("--panel-close-dur").trim(), p = P(o) || parseFloat(o) * (o.endsWith("s") && !o.endsWith("ms") ? 1e3 : 1), m = P(c) || parseFloat(c) * (c.endsWith("s") && !c.endsWith("ms") ? 1e3 : 1), v = Number.isFinite(p) && Number.isFinite(m) && p > m;
889
1475
  e.push(
890
- m("C7", "--panel-open-dur > --panel-close-dur", "open > close", `open=${c || "n/a"} close=${u || "n/a"}`, f)
1476
+ f("C7", "--panel-open-dur > --panel-close-dur", "open > close", `open=${o || "n/a"} close=${c || "n/a"}`, v)
891
1477
  );
892
1478
  }
893
- if (!r)
894
- e.push(m("C8", "BellCutout zero computed animation/transition", "no inline timing", "absent", !1));
1479
+ if (!d)
1480
+ e.push(f("C8", "BellCutout zero computed animation/transition", "no inline timing", "absent", !1));
895
1481
  else {
896
- const i = getComputedStyle(r), a = i.animationName || "", c = i.transitionProperty || "", u = (a === "" || a === "none") && (c === "" || c === "none" || c === "all");
1482
+ const l = getComputedStyle(d), s = l.animationName || "", o = l.transitionProperty || "", c = (s === "" || s === "none") && (o === "" || o === "none" || o === "all");
897
1483
  e.push(
898
- m(
1484
+ f(
899
1485
  "C8",
900
1486
  "BellCutout zero computed animation/transition",
901
1487
  "animation:none AND transition:none",
902
- `animation=${a || "n/a"} transition=${c || "n/a"}`,
903
- u
1488
+ `animation=${s || "n/a"} transition=${o || "n/a"}`,
1489
+ c
904
1490
  )
905
1491
  );
906
1492
  }
907
1493
  if (!t)
908
- e.push(m("C9", "mount closed-state clipPath", M, "absent", !1));
1494
+ e.push(f("C9", "mount closed-state clipPath", R, "absent", !1));
909
1495
  else {
910
- const i = t.style.clipPath, a = getComputedStyle(t), c = i || a.clipPath || "", u = c === M;
911
- e.push(m("C9", "mount closed-state clipPath", M, c || "n/a", u));
1496
+ const l = t.style.clipPath, s = getComputedStyle(t), o = l || s.clipPath || "", c = o === R;
1497
+ e.push(f("C9", "mount closed-state clipPath", R, o || "n/a", c));
912
1498
  }
913
- if (!l)
914
- e.push(m("C10", "bell-popover parentElement === document.body (open)", "body", "absent", !1));
1499
+ if (!i)
1500
+ e.push(f("C10", "bell-popover parentElement === document.body (open)", "body", "absent", !1));
915
1501
  else {
916
- const i = l.parentElement, a = i === document.body;
1502
+ const l = i.parentElement, s = l === document.body;
917
1503
  e.push(
918
- m(
1504
+ f(
919
1505
  "C10",
920
1506
  "bell-popover parentElement === document.body (open)",
921
1507
  "body",
922
- i === document.body ? "body" : i?.tagName ?? "n/a",
923
- a
1508
+ l === document.body ? "body" : l?.tagName ?? "n/a",
1509
+ s
924
1510
  )
925
1511
  );
926
1512
  }
927
1513
  if (!n)
928
- e.push(m("C11", "coordinator overflow === visible", "visible", "absent", !1));
1514
+ e.push(f("C11", "coordinator overflow === visible", "visible", "absent", !1));
929
1515
  else {
930
- const a = getComputedStyle(n).overflow || n.style.overflow || "", c = a === "visible";
931
- e.push(m("C11", "coordinator overflow === visible", "visible", a || "n/a", c));
1516
+ const s = getComputedStyle(n).overflow || n.style.overflow || "", o = s === "visible";
1517
+ e.push(f("C11", "coordinator overflow === visible", "visible", s || "n/a", o));
932
1518
  }
933
- if (!d)
934
- e.push(m("C12", "toolbar clipPath = inset(0 -40 -40 -40)", D, "absent", !1));
1519
+ if (!u)
1520
+ e.push(f("C12", "toolbar clipPath = inset(0 -40 -40 -40)", F, "absent", !1));
935
1521
  else {
936
- const i = d.style.clipPath, a = getComputedStyle(d), c = i || a.clipPath || "", u = c === D;
937
- e.push(m("C12", "toolbar clipPath = inset(0 -40 -40 -40)", D, c || "n/a", u));
1522
+ const l = u.style.clipPath, s = getComputedStyle(u), o = l || s.clipPath || "", c = o === F;
1523
+ e.push(f("C12", "toolbar clipPath = inset(0 -40 -40 -40)", F, o || "n/a", c));
938
1524
  }
939
1525
  return e.push(
940
- m(
1526
+ f(
941
1527
  "C13",
942
1528
  "same-position slide via WAAPI (mid-transition getAnimations().length > 0)",
943
1529
  "WAAPI driver wired in orchestrator (source-proof)",
@@ -945,7 +1531,7 @@ function F() {
945
1531
  "wiring_only"
946
1532
  )
947
1533
  ), e.push(
948
- m(
1534
+ f(
949
1535
  "C14",
950
1536
  'cross-position handoff transitionend filtered by propertyName="max-height"',
951
1537
  "transitionend filter wired in orchestrator (source-proof)",
@@ -954,11 +1540,11 @@ function F() {
954
1540
  )
955
1541
  ), e;
956
1542
  }
957
- function ke(e) {
958
- return F().find((t) => t.id === e);
1543
+ function st(e) {
1544
+ return K().find((t) => t.id === e);
959
1545
  }
960
- function Me() {
961
- const e = $();
1546
+ function at() {
1547
+ const e = H();
962
1548
  return { q12: [
963
1549
  {
964
1550
  id: "Q12-12",
@@ -967,75 +1553,76 @@ function Me() {
967
1553
  actual: `valid=${e.valid} mount=${e.mount} chrome=${e.chrome} frozen=${e.frozen} orphans=[${e.orphans.join(",")}]`,
968
1554
  pass: e.valid
969
1555
  }
970
- ], cc: F() };
1556
+ ], cc: K() };
971
1557
  }
972
- function De() {
1558
+ function rt() {
973
1559
  return {
974
- enable: $e,
975
- disable: Re,
976
- isEnabled: () => T,
977
- getLastReport: () => L,
1560
+ enable: lt,
1561
+ disable: ot,
1562
+ isEnabled: () => L,
1563
+ getLastReport: () => D,
978
1564
  recordTransition: (e) => {
979
- T && (L = { ...e, ...$() });
1565
+ L && (D = { ...e, ...H() });
980
1566
  },
981
1567
  assertOnce: () => {
982
- const e = $();
983
- return L = e, e;
1568
+ const e = H();
1569
+ return D = e, e;
984
1570
  },
985
- assertCcOnly: F,
986
- getCcRowById: ke,
987
- assertPanelTruths: Me
1571
+ assertCcOnly: K,
1572
+ getCcRowById: st,
1573
+ assertPanelTruths: at
988
1574
  };
989
1575
  }
990
- function $e() {
991
- if (T = !0, typeof window > "u") return;
992
- window.__panelsAsserter || (window.__panelsAsserter = De(), console.info(
1576
+ function lt() {
1577
+ if (L = !0, typeof window > "u") return;
1578
+ window.__panelsAsserter || (window.__panelsAsserter = rt(), console.info(
993
1579
  "[panels] asserter enabled (P3b Q12-12 + P6 W5 cc:C1..C14). Inspect via window.__panelsAsserter."
994
1580
  ));
995
1581
  }
996
- function Re() {
997
- T = !1;
1582
+ function ot() {
1583
+ L = !1;
998
1584
  }
999
1585
  export {
1000
- Je as COMMITS,
1001
- qe as CatalogAddShell,
1002
- be as CatalogFooter,
1003
- Ue as CatalogReplaceShell,
1004
- R as CatalogStateContext,
1005
- ie as CloneCard,
1006
- le as CloneStage,
1007
- X as MOCK_DEFAULT_LENS,
1008
- Q as MOCK_LENSES,
1009
- _e as MOCK_PAGES,
1010
- J as MOCK_TILES_BY_LENS,
1011
- Ke as PANEL_IDS,
1012
- Pe as PageMgmtFooter,
1013
- Ye as PageMgmtShell,
1014
- Z as PageMgmtStateContext,
1015
- A as PanelChrome,
1016
- Ze as PanelHost,
1017
- We as PanelHostShell,
1018
- E as PanelMount,
1019
- et as PanelProvider,
1020
- je as PanelSlot,
1021
- He as SettingsShell,
1022
- F as assertCcOnly,
1023
- $ as assertPanelDomShape,
1024
- Me as assertPanelTruths,
1025
- tt as deriveSurfaceState,
1026
- Re as disablePanelAsserter,
1027
- $e as enablePanelAsserter,
1028
- ke as getCcRowById,
1029
- nt as initialState,
1030
- B as positionKey,
1031
- st as reducer,
1032
- Le as transitionToPanel,
1033
- ve as useCatalogState,
1034
- Be as useEditingCardId,
1035
- Ce as usePageMgmtState,
1036
- oe as usePanelContext,
1037
- I as usePanelContextOptional,
1038
- ot as usePanelCoordinator,
1039
- q as useReducedMotionPanel,
1040
- Ge as useTransitionToPanel
1586
+ Et as COMMITS,
1587
+ vt as CatalogAddShell,
1588
+ ze as CatalogFooter,
1589
+ bt as CatalogReplaceShell,
1590
+ V as CatalogStateContext,
1591
+ Oe as CloneCard,
1592
+ Te as CloneStage,
1593
+ ne as MOCK_DEFAULT_LENS,
1594
+ te as MOCK_LENSES,
1595
+ z as MOCK_LENS_META,
1596
+ Be as MOCK_PAGES,
1597
+ se as MOCK_TILES_BY_LENS,
1598
+ St as PANEL_IDS,
1599
+ Ve as PageMgmtFooter,
1600
+ yt as PageMgmtShell,
1601
+ re as PageMgmtStateContext,
1602
+ T as PanelChrome,
1603
+ At as PanelHost,
1604
+ Ct as PanelHostShell,
1605
+ x as PanelMount,
1606
+ xt as PanelProvider,
1607
+ _t as PanelSlot,
1608
+ gt as SettingsShell,
1609
+ K as assertCcOnly,
1610
+ H as assertPanelDomShape,
1611
+ at as assertPanelTruths,
1612
+ Tt as deriveSurfaceState,
1613
+ ot as disablePanelAsserter,
1614
+ lt as enablePanelAsserter,
1615
+ st as getCcRowById,
1616
+ Ot as initialState,
1617
+ j as positionKey,
1618
+ Lt as reducer,
1619
+ tt as transitionToPanel,
1620
+ He as useCatalogState,
1621
+ ft as useEditingCardId,
1622
+ le as usePageMgmtState,
1623
+ ge as usePanelContext,
1624
+ k as usePanelContextOptional,
1625
+ kt as usePanelCoordinator,
1626
+ X as useReducedMotionPanel,
1627
+ Nt as useTransitionToPanel
1041
1628
  };