@databrainhq/plugin 0.17.9-beta.48 → 0.17.9-beta.49

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.
Files changed (41) hide show
  1. package/dist/{Accordion-DLMkpjMx.mjs → Accordion-B1HmpZ2P.mjs} +1 -1
  2. package/dist/{CardChartSlot-Cyksn0_m.mjs → CardChartSlot-BIIjmHsu.mjs} +616 -566
  3. package/dist/{Chart-2_umaljI.mjs → Chart-BcmkjXMD.mjs} +52 -52
  4. package/dist/{ChartTypePanel-CeV5M5SQ.mjs → ChartTypePanel-DUwZ5B-_.mjs} +8 -8
  5. package/dist/{CreateGlobalFilter-DKwF-Iao.mjs → CreateGlobalFilter-DDtIpgRd.mjs} +2 -2
  6. package/dist/{CreateMetricV2-BjdBqz9v.mjs → CreateMetricV2-BEXaszJA.mjs} +15 -15
  7. package/dist/{HorizontalStackTable-yf-l8lvj.mjs → HorizontalStackTable-BYQaEbea.mjs} +3 -3
  8. package/dist/{ManageMetricsV2-BRrSgY7w.mjs → ManageMetricsV2-C_6BeI6L.mjs} +3 -3
  9. package/dist/{MetricCardV2-veqXANJF.mjs → MetricCardV2-ChILinwX.mjs} +853 -842
  10. package/dist/{NoDataFound-BINw6Y12.mjs → NoDataFound-DtuATv-f.mjs} +1 -1
  11. package/dist/{Panel-DzPYLDDl.mjs → Panel-BCuB-6P0.mjs} +20 -20
  12. package/dist/{PivotTableV2-D9Lj9nWq.mjs → PivotTableV2-CXcYGUEl.mjs} +2 -2
  13. package/dist/{PivotTableV3--m_-X-4T.mjs → PivotTableV3-9ZxfPQvr.mjs} +4 -4
  14. package/dist/{Portal-BsPkfI4N.mjs → Portal-rrOaB4Bd.mjs} +2 -2
  15. package/dist/{RadioButton-BpO_7LIW.mjs → RadioButton-CdjohtqA.mjs} +1 -1
  16. package/dist/{ScheduleEmail-C7DLEstd.mjs → ScheduleEmail-B8LYb0Rp.mjs} +6 -6
  17. package/dist/{SearchMetricData-BLnahSGI.mjs → SearchMetricData-Ch25t99l.mjs} +13 -13
  18. package/dist/{SortPanel-B0doOUAt.mjs → SortPanel-C5iHNq2W.mjs} +8 -8
  19. package/dist/{Table-yiT9hOaS.mjs → Table-CU_DPx7I.mjs} +84 -83
  20. package/dist/{TagInputField-iILkucCX.mjs → TagInputField-CFdoNB_N.mjs} +4 -4
  21. package/dist/{TextAreaField-1klDZ00B.mjs → TextAreaField-BCPTYecn.mjs} +2 -2
  22. package/dist/{TimeSeriesSettings-KOsSPF2S.mjs → TimeSeriesSettings-Cf0qN7IA.mjs} +2 -2
  23. package/dist/{cardQueryError-CWeSg4L9.mjs → cardQueryError-DswvG8Em.mjs} +9 -9
  24. package/dist/{conditionalFormatting-BfWx4ldB.mjs → conditionalFormatting-Dr6Ko980.mjs} +1 -1
  25. package/dist/{createGlobalFilter.module-C-vtJ58v.mjs → createGlobalFilter.module-CBdoZ9am.mjs} +1 -1
  26. package/dist/data.cjs +1 -1
  27. package/dist/data.mjs +1 -1
  28. package/dist/{echarts-GGpZSeR_.mjs → echarts-YvdpwAXr.mjs} +2 -2
  29. package/dist/{metric.mutation-BgklcDqd.mjs → metric.mutation-CpTlOouC.mjs} +1 -1
  30. package/dist/{permissions-D0tFL379.mjs → permissions-tSNA3qFl.mjs} +5 -5
  31. package/dist/{pluginV3Request-BVxZrR4v.mjs → pluginV3Request-vedxVBZb.mjs} +1 -1
  32. package/dist/{renderer-DegBsuVl.mjs → renderer-DY_lFWZ1.mjs} +1 -1
  33. package/dist/{timeseries-BAn41226.mjs → timeseries-zAu_-AJo.mjs} +1 -1
  34. package/dist/{toTasteAppearance-DBN4QaIw.mjs → toTasteAppearance-B4_PDCSX.mjs} +95 -92
  35. package/dist/{useGuesTokenUsageLog-Cgj9filf.mjs → useGuesTokenUsageLog-CbjKeY_o.mjs} +1 -1
  36. package/dist/{usePublishArchivedMetrics-ix_1Nf_o.mjs → usePublishArchivedMetrics-vrjAvHIS.mjs} +2 -2
  37. package/dist/{useQuery-zFv2LqWt.mjs → useQuery-D8fC1CBL.mjs} +1 -1
  38. package/dist/webcomponents.css +2 -2
  39. package/dist/webcomponents.es.js +1834 -1831
  40. package/dist/webcomponents.umd.js +108 -108
  41. package/package.json +1 -1
@@ -2,16 +2,16 @@ import "react";
2
2
  import "react-dom";
3
3
  import "react-dom/client";
4
4
  import { i as e, t } from "./cardStates-pxkuDK8H.mjs";
5
- import { Dr as n, Er as r, Ka as i, On as a, Or as o, Tr as s, Va as c, Wa as l, _r as u, dr as d, fr as f, g as p, h as m, m as h, mr as g, pr as _, wr as v, yr as y } from "./Portal-BsPkfI4N.mjs";
6
- import { c as b, d as x, f as S, i as C, l as w, m as T, n as ee, o as te, p as E, r as D, s as O, t as k, u as ne } from "./toTasteAppearance-DBN4QaIw.mjs";
7
- import { k as A, r as j } from "./option-B1zeYJnm.mjs";
8
- import { r as M } from "./contrast-EppiiunY.mjs";
9
- import { _ as re, p as ie } from "./timeseries-BAn41226.mjs";
10
- import { A as ae, D as oe, O as se, a as ce, b as le, i as ue } from "./permissions-D0tFL379.mjs";
11
- import { t as de } from "./loading-state-C-J1F-xq.mjs";
12
- import { t as fe } from "./createLucideIcon-C-N26TaJ.mjs";
13
- import { a as pe, c as me, d as he, f as ge, g as _e, l as ve, m as ye, o as be, p as N, t as xe, u as Se } from "./qaSelectors-CqSLYZ9l.mjs";
14
- import { A as P, B as Ce, C as F, D as we, E as Te, I, N as Ee, O as L, P as De, S as Oe, T as ke, V as Ae, _ as je, b as Me, d as Ne, f as Pe, g as Fe, h as Ie, j as Le, k as Re, m as ze, p as Be, u as Ve, v as He, w as Ue, x as We, y as Ge } from "./dist-DIlFLbj5.mjs";
5
+ import { Dr as n, Er as r, Ka as i, On as a, Or as o, Tr as s, Va as c, Wa as l, _r as u, dr as d, fr as f, g as p, h as m, m as h, mr as g, pr as _, wr as v, yr as y } from "./Portal-rrOaB4Bd.mjs";
6
+ import { c as b, d as x, f as S, h as C, i as w, m as T, n as E, o as D, p as O, r as k, s as A, t as j, u as ee } from "./toTasteAppearance-B4_PDCSX.mjs";
7
+ import { k as M, r as N } from "./option-B1zeYJnm.mjs";
8
+ import { r as P } from "./contrast-EppiiunY.mjs";
9
+ import { _ as te, p as ne } from "./timeseries-zAu_-AJo.mjs";
10
+ import { A as re, D as ie, O as ae, a as oe, b as se, i as ce } from "./permissions-tSNA3qFl.mjs";
11
+ import { t as le } from "./loading-state-C-J1F-xq.mjs";
12
+ import { t as ue } from "./createLucideIcon-C-N26TaJ.mjs";
13
+ import { a as de, c as fe, d as pe, f as me, g as he, l as ge, m as _e, o as ve, p as ye, t as F, u as be } from "./qaSelectors-CqSLYZ9l.mjs";
14
+ import { A as xe, B as Se, C as Ce, D as I, E as we, I as Te, N as Ee, O as L, P as De, S as Oe, T as ke, V as Ae, _ as je, b as Me, d as Ne, f as Pe, g as Fe, h as Ie, j as Le, k as Re, m as ze, p as Be, u as Ve, v as He, w as Ue, x as We, y as Ge } from "./dist-DIlFLbj5.mjs";
15
15
  import { t as Ke } from "./x-DDC7VFx5.mjs";
16
16
  import { t as R } from "./dist-C0uxSp1k.mjs";
17
17
  import { a as qe, c as Je, d as Ye, f as Xe, i as Ze, l as Qe, m as $e, n as et, o as tt, p as nt, r as rt, s as it, t as at, u as ot } from "./dist-DR4-vdli.mjs";
@@ -23,13 +23,13 @@ import * as z from "react";
23
23
  import wt, { Children as Tt, Fragment as Et, cloneElement as Dt, createContext as Ot, createElement as B, forwardRef as V, isValidElement as kt, useCallback as H, useContext as At, useEffect as U, useLayoutEffect as jt, useMemo as Mt, useRef as W, useState as G } from "react";
24
24
  import { Fragment as Nt, jsx as K, jsxs as q } from "react/jsx-runtime";
25
25
  import Pt, { createPortal as Ft, flushSync as It } from "react-dom";
26
- var Lt = fe("arrow-down", [["path", {
26
+ var Lt = ue("arrow-down", [["path", {
27
27
  d: "M12 5v14",
28
28
  key: "s699le"
29
29
  }], ["path", {
30
30
  d: "m19 12-7 7-7-7",
31
31
  key: "1idqje"
32
- }]]), Rt = fe("arrow-up-down", [
32
+ }]]), Rt = ue("arrow-up-down", [
33
33
  ["path", {
34
34
  d: "m21 16-4 4-4-4",
35
35
  key: "f6ql7i"
@@ -46,13 +46,13 @@ var Lt = fe("arrow-down", [["path", {
46
46
  d: "M7 4v16",
47
47
  key: "1glfcx"
48
48
  }]
49
- ]), zt = fe("arrow-up", [["path", {
49
+ ]), zt = ue("arrow-up", [["path", {
50
50
  d: "m5 12 7-7 7 7",
51
51
  key: "hav0vg"
52
52
  }], ["path", {
53
53
  d: "M12 19V5",
54
54
  key: "x0mq9r"
55
- }]]), Bt = fe("ban", [["circle", {
55
+ }]]), Bt = ue("ban", [["circle", {
56
56
  cx: "12",
57
57
  cy: "12",
58
58
  r: "10",
@@ -60,22 +60,22 @@ var Lt = fe("arrow-down", [["path", {
60
60
  }], ["path", {
61
61
  d: "M4.929 4.929 19.07 19.071",
62
62
  key: "196cmz"
63
- }]]), Vt = fe("chevron-up", [["path", {
63
+ }]]), Vt = ue("chevron-up", [["path", {
64
64
  d: "m18 15-6-6-6 6",
65
65
  key: "153udz"
66
- }]]), Ht = fe("chevrons-left", [["path", {
66
+ }]]), Ht = ue("chevrons-left", [["path", {
67
67
  d: "m11 17-5-5 5-5",
68
68
  key: "13zhaf"
69
69
  }], ["path", {
70
70
  d: "m18 17-5-5 5-5",
71
71
  key: "h8a8et"
72
- }]]), Ut = fe("chevrons-right", [["path", {
72
+ }]]), Ut = ue("chevrons-right", [["path", {
73
73
  d: "m6 17 5-5-5-5",
74
74
  key: "xnjwq"
75
75
  }], ["path", {
76
76
  d: "m13 17 5-5-5-5",
77
77
  key: "17xmmf"
78
- }]]), Wt = fe("info", [
78
+ }]]), Wt = ue("info", [
79
79
  ["circle", {
80
80
  cx: "12",
81
81
  cy: "12",
@@ -90,7 +90,7 @@ var Lt = fe("arrow-down", [["path", {
90
90
  d: "M12 8h.01",
91
91
  key: "e9boi3"
92
92
  }]
93
- ]), Gt = fe("maximize-2", [
93
+ ]), Gt = ue("maximize-2", [
94
94
  ["path", {
95
95
  d: "M15 3h6v6",
96
96
  key: "1q9fwt"
@@ -122,7 +122,7 @@ var Lt = fe("arrow-down", [["path", {
122
122
  whiteSpace: "nowrap",
123
123
  wordWrap: "normal"
124
124
  }), Yt = /* @__PURE__ */ z.forwardRef(/* @__PURE__ */ qt(function(e, t) {
125
- return /* @__PURE__ */ K(P.span, {
125
+ return /* @__PURE__ */ K(xe.span, {
126
126
  ...e,
127
127
  ref: t,
128
128
  style: {
@@ -152,7 +152,7 @@ var Lt = fe("arrow-down", [["path", {
152
152
  Xe,
153
153
  it
154
154
  ]), un = Xe(), dn = it(), [fn, pn] = cn(rn), [mn, hn] = cn(rn), gn = /* @__PURE__ */ J((e) => {
155
- let { __scopeMenu: t, open: n = !1, children: r, dir: i, onOpenChange: a, modal: o = !0 } = e, s = un(t), [c, l] = z.useState(null), u = z.useRef(!1), d = F(a), f = nt(i);
155
+ let { __scopeMenu: t, open: n = !1, children: r, dir: i, onOpenChange: a, modal: o = !0 } = e, s = un(t), [c, l] = z.useState(null), u = z.useRef(!1), d = Ce(a), f = nt(i);
156
156
  return z.useEffect(() => {
157
157
  let e = /* @__PURE__ */ J(() => {
158
158
  u.current = !0, document.addEventListener("pointerdown", t, {
@@ -228,7 +228,7 @@ var Lt = fe("arrow-down", [["path", {
228
228
  })
229
229
  });
230
230
  }, "MenuContent")), En = /* @__PURE__ */ z.forwardRef(/* @__PURE__ */ J(function(e, t) {
231
- let n = pn(Sn, e.__scopeMenu), r = z.useRef(null), i = I(t, r);
231
+ let n = pn(Sn, e.__scopeMenu), r = z.useRef(null), i = Te(t, r);
232
232
  return z.useEffect(() => {
233
233
  let e = r.current;
234
234
  if (e) return Ve(e);
@@ -252,35 +252,35 @@ var Lt = fe("arrow-down", [["path", {
252
252
  onDismiss: () => n.onOpenChange(!1)
253
253
  });
254
254
  }, "MenuRootContentNonModal")), On = Ee("MenuContent.ScrollLock"), kn = /* @__PURE__ */ z.forwardRef(/* @__PURE__ */ J(function(e, t) {
255
- let { __scopeMenu: n, loop: r = !1, trapFocus: i, onOpenAutoFocus: a, onCloseAutoFocus: o, disableOutsidePointerEvents: s, onEntryFocus: c, onEscapeKeyDown: l, onPointerDownOutside: u, onFocusOutside: d, onInteractOutside: f, onDismiss: p, disableOutsideScroll: m, ...h } = e, g = pn(Sn, n), _ = hn(Sn, n), v = un(n), y = dn(n), b = on(n), [x, S] = z.useState(null), C = z.useRef(null), w = I(t, C, g.onContentChange), T = z.useRef(0), ee = z.useRef(""), te = z.useRef(0), E = z.useRef(null), D = z.useRef("right"), O = z.useRef(0), k = m ? Ne : z.Fragment, ne = m ? {
255
+ let { __scopeMenu: n, loop: r = !1, trapFocus: i, onOpenAutoFocus: a, onCloseAutoFocus: o, disableOutsidePointerEvents: s, onEntryFocus: c, onEscapeKeyDown: l, onPointerDownOutside: u, onFocusOutside: d, onInteractOutside: f, onDismiss: p, disableOutsideScroll: m, ...h } = e, g = pn(Sn, n), _ = hn(Sn, n), v = un(n), y = dn(n), b = on(n), [x, S] = z.useState(null), C = z.useRef(null), w = Te(t, C, g.onContentChange), T = z.useRef(0), E = z.useRef(""), D = z.useRef(0), O = z.useRef(null), k = z.useRef("right"), A = z.useRef(0), j = m ? Ne : z.Fragment, ee = m ? {
256
256
  as: On,
257
257
  allowPinchZoom: !0
258
- } : void 0, A = /* @__PURE__ */ J((e) => {
259
- let t = ee.current + e, n = b().filter((e) => !e.disabled), r = document.activeElement, i = n.find((e) => e.ref.current === r)?.textValue, a = $n(n.map((e) => e.textValue), t, i), o = n.find((e) => e.textValue === a)?.ref.current;
258
+ } : void 0, M = /* @__PURE__ */ J((e) => {
259
+ let t = E.current + e, n = b().filter((e) => !e.disabled), r = document.activeElement, i = n.find((e) => e.ref.current === r)?.textValue, a = $n(n.map((e) => e.textValue), t, i), o = n.find((e) => e.textValue === a)?.ref.current;
260
260
  (/* @__PURE__ */ J((function e(t) {
261
- ee.current = t, window.clearTimeout(T.current), t !== "" && (T.current = window.setTimeout(() => e(""), 1e3));
261
+ E.current = t, window.clearTimeout(T.current), t !== "" && (T.current = window.setTimeout(() => e(""), 1e3));
262
262
  }), "updateSearch"))(t), o && setTimeout(() => o.focus());
263
263
  }, "handleTypeaheadSearch");
264
264
  z.useEffect(() => () => window.clearTimeout(T.current), []), Ge();
265
- let j = z.useCallback((e) => D.current === E.current?.side && tr(e, E.current?.area), []);
265
+ let N = z.useCallback((e) => k.current === O.current?.side && tr(e, O.current?.area), []);
266
266
  return /* @__PURE__ */ K(Cn, {
267
267
  scope: n,
268
- searchRef: ee,
268
+ searchRef: E,
269
269
  onItemEnter: z.useCallback((e) => {
270
- j(e) && e.preventDefault();
271
- }, [j]),
270
+ N(e) && e.preventDefault();
271
+ }, [N]),
272
272
  onItemLeave: z.useCallback((e) => {
273
- j(e) || (C.current?.focus(), S(null));
274
- }, [j]),
273
+ N(e) || (C.current?.focus(), S(null));
274
+ }, [N]),
275
275
  onTriggerLeave: z.useCallback((e) => {
276
- j(e) && e.preventDefault();
277
- }, [j]),
278
- pointerGraceTimerRef: te,
276
+ N(e) && e.preventDefault();
277
+ }, [N]),
278
+ pointerGraceTimerRef: D,
279
279
  onPointerGraceIntentChange: z.useCallback((e) => {
280
- E.current = e;
280
+ O.current = e;
281
281
  }, []),
282
- children: /* @__PURE__ */ K(k, {
283
- ...ne,
282
+ children: /* @__PURE__ */ K(j, {
283
+ ...ee,
284
284
  children: /* @__PURE__ */ K(We, {
285
285
  asChild: !0,
286
286
  trapped: i,
@@ -323,7 +323,7 @@ var Lt = fe("arrow-down", [["path", {
323
323
  },
324
324
  onKeyDown: L(h.onKeyDown, (e) => {
325
325
  let t = e.target.closest("[data-radix-menu-content]") === e.currentTarget, n = e.ctrlKey || e.altKey || e.metaKey, r = e.key.length === 1;
326
- t && (e.key === "Tab" && e.preventDefault(), !n && r && A(e.key));
326
+ t && (e.key === "Tab" && e.preventDefault(), !n && r && M(e.key));
327
327
  let i = C.current;
328
328
  if (e.target !== i || !en.includes(e.key)) return;
329
329
  e.preventDefault();
@@ -331,13 +331,13 @@ var Lt = fe("arrow-down", [["path", {
331
331
  $t.includes(e.key) && a.reverse(), Zn(a);
332
332
  }),
333
333
  onBlur: L(e.onBlur, (e) => {
334
- e.currentTarget.contains(e.target) || (window.clearTimeout(T.current), ee.current = "");
334
+ e.currentTarget.contains(e.target) || (window.clearTimeout(T.current), E.current = "");
335
335
  }),
336
336
  onPointerMove: L(e.onPointerMove, nr((e) => {
337
- let t = e.target, n = O.current !== e.clientX;
337
+ let t = e.target, n = A.current !== e.clientX;
338
338
  if (e.currentTarget.contains(t) && n) {
339
- let t = e.clientX > O.current ? "right" : "left";
340
- D.current = t, O.current = e.clientX;
339
+ let t = e.clientX > A.current ? "right" : "left";
340
+ k.current = t, A.current = e.clientX;
341
341
  }
342
342
  }))
343
343
  })
@@ -348,12 +348,12 @@ var Lt = fe("arrow-down", [["path", {
348
348
  });
349
349
  }, "MenuContentImpl")), An = /* @__PURE__ */ z.forwardRef(/* @__PURE__ */ J(function(e, t) {
350
350
  let { __scopeMenu: n, ...r } = e;
351
- return /* @__PURE__ */ K(P.div, {
351
+ return /* @__PURE__ */ K(xe.div, {
352
352
  ...r,
353
353
  ref: t
354
354
  });
355
355
  }, "MenuLabel")), jn = "MenuItem", Mn = "menu.itemSelect", Nn = /* @__PURE__ */ z.forwardRef(/* @__PURE__ */ J(function(e, t) {
356
- let { disabled: n = !1, onSelect: r, ...i } = e, a = z.useRef(null), o = hn(jn, e.__scopeMenu), s = wn(jn, e.__scopeMenu), c = I(t, a), l = z.useRef(!1), u = /* @__PURE__ */ J(() => {
356
+ let { disabled: n = !1, onSelect: r, ...i } = e, a = z.useRef(null), o = hn(jn, e.__scopeMenu), s = wn(jn, e.__scopeMenu), c = Te(t, a), l = z.useRef(!1), u = /* @__PURE__ */ J(() => {
357
357
  let e = a.current;
358
358
  if (!n && e) {
359
359
  let t = new CustomEvent(Mn, {
@@ -379,7 +379,7 @@ var Lt = fe("arrow-down", [["path", {
379
379
  })
380
380
  });
381
381
  }, "MenuItem")), Pn = /* @__PURE__ */ z.forwardRef(/* @__PURE__ */ J(function(e, t) {
382
- let { __scopeMenu: n, disabled: r = !1, textValue: i, ...a } = e, o = wn(jn, n), s = dn(n), c = z.useRef(null), l = I(t, c), [u, d] = z.useState(!1), [f, p] = z.useState("");
382
+ let { __scopeMenu: n, disabled: r = !1, textValue: i, ...a } = e, o = wn(jn, n), s = dn(n), c = z.useRef(null), l = Te(t, c), [u, d] = z.useState(!1), [f, p] = z.useState("");
383
383
  return z.useEffect(() => {
384
384
  let e = c.current;
385
385
  e && p((e.textContent ?? "").trim());
@@ -391,7 +391,7 @@ var Lt = fe("arrow-down", [["path", {
391
391
  asChild: !0,
392
392
  ...s,
393
393
  focusable: !r,
394
- children: /* @__PURE__ */ K(P.div, {
394
+ children: /* @__PURE__ */ K(xe.div, {
395
395
  role: "menuitem",
396
396
  "data-highlighted": u ? "" : void 0,
397
397
  "aria-disabled": r || void 0,
@@ -412,14 +412,14 @@ var Lt = fe("arrow-down", [["path", {
412
412
  onValueChange: /* @__PURE__ */ J(() => {}, "onValueChange")
413
413
  }), [Ln, Rn] = cn("MenuItemIndicator", { checked: !1 }), zn = /* @__PURE__ */ z.forwardRef(/* @__PURE__ */ J(function(e, t) {
414
414
  let { __scopeMenu: n, ...r } = e;
415
- return /* @__PURE__ */ K(P.div, {
415
+ return /* @__PURE__ */ K(xe.div, {
416
416
  role: "separator",
417
417
  "aria-orientation": "horizontal",
418
418
  ...r,
419
419
  ref: t
420
420
  });
421
421
  }, "MenuSeparator")), Bn = "MenuSub", [Vn, Hn] = cn(Bn), Un = /* @__PURE__ */ J((e) => {
422
- let { __scopeMenu: t, children: n, open: r = !1, onOpenChange: i } = e, a = pn(Bn, t), o = un(t), [s, c] = z.useState(null), [l, u] = z.useState(null), d = F(i);
422
+ let { __scopeMenu: t, children: n, open: r = !1, onOpenChange: i } = e, a = pn(Bn, t), o = un(t), [s, c] = z.useState(null), [l, u] = z.useState(null), d = Ce(i);
423
423
  return z.useEffect(() => (a.open === !1 && d(!1), () => d(!1)), [a.open, d]), /* @__PURE__ */ K(Ye, {
424
424
  ...o,
425
425
  children: /* @__PURE__ */ K(fn, {
@@ -448,7 +448,7 @@ var Lt = fe("arrow-down", [["path", {
448
448
  window.clearTimeout(e), c(null);
449
449
  };
450
450
  }, [s, c]);
451
- let d = I(t, i.onTriggerChange);
451
+ let d = Te(t, i.onTriggerChange);
452
452
  return /* @__PURE__ */ K(_n, {
453
453
  asChild: !0,
454
454
  ...l,
@@ -509,7 +509,7 @@ var Lt = fe("arrow-down", [["path", {
509
509
  })
510
510
  });
511
511
  }, "MenuSubTrigger")), Kn = "MenuSubContent", qn = /* @__PURE__ */ z.forwardRef(/* @__PURE__ */ J(function(e, t) {
512
- let n = bn(Sn, e.__scopeMenu), { forceMount: r = n.forceMount, align: i = "start", ...a } = e, o = pn(Sn, e.__scopeMenu), s = hn(Sn, e.__scopeMenu), c = Hn(Kn, e.__scopeMenu), l = z.useRef(null), u = I(t, l);
512
+ let n = bn(Sn, e.__scopeMenu), { forceMount: r = n.forceMount, align: i = "start", ...a } = e, o = pn(Sn, e.__scopeMenu), s = hn(Sn, e.__scopeMenu), c = Hn(Kn, e.__scopeMenu), l = z.useRef(null), u = Te(t, l);
513
513
  return /* @__PURE__ */ K(an.Provider, {
514
514
  scope: e.__scopeMenu,
515
515
  children: /* @__PURE__ */ K(ke, {
@@ -597,7 +597,7 @@ var rr = gn, ir = _n, ar = xn, or = Tn, sr = An, cr = Nn, lr = zn, ur = Un, dr =
597
597
  value: t,
598
598
  configurable: !0
599
599
  }), hr = "DropdownMenu", [gr, _r] = Re(hr, [ln]), vr = ln(), [yr, br] = gr(hr), xr = /* @__PURE__ */ mr((e) => {
600
- let { __scopeDropdownMenu: t, children: n, dir: r, open: i, defaultOpen: a, onOpenChange: o, modal: s = !0 } = e, c = vr(t), l = z.useRef(null), [u, d] = Te({
600
+ let { __scopeDropdownMenu: t, children: n, dir: r, open: i, defaultOpen: a, onOpenChange: o, modal: s = !0 } = e, c = vr(t), l = z.useRef(null), [u, d] = we({
601
601
  prop: i,
602
602
  defaultProp: a ?? !1,
603
603
  onChange: o,
@@ -622,11 +622,11 @@ var rr = gn, ir = _n, ar = xn, or = Tn, sr = An, cr = Nn, lr = zn, ur = Un, dr =
622
622
  })
623
623
  });
624
624
  }, "DropdownMenu"), Sr = "DropdownMenuTrigger", Cr = /* @__PURE__ */ z.forwardRef(/* @__PURE__ */ mr(function(e, t) {
625
- let { __scopeDropdownMenu: n, disabled: r = !1, ...i } = e, a = br(Sr, n), o = vr(n), s = I(t, a.triggerRef);
625
+ let { __scopeDropdownMenu: n, disabled: r = !1, ...i } = e, a = br(Sr, n), o = vr(n), s = Te(t, a.triggerRef);
626
626
  return /* @__PURE__ */ K(ir, {
627
627
  asChild: !0,
628
628
  ...o,
629
- children: /* @__PURE__ */ K(P.button, {
629
+ children: /* @__PURE__ */ K(xe.button, {
630
630
  type: "button",
631
631
  id: a.triggerId,
632
632
  "aria-haspopup": "menu",
@@ -701,7 +701,7 @@ var rr = gn, ir = _n, ar = xn, or = Tn, sr = An, cr = Nn, lr = zn, ur = Un, dr =
701
701
  ref: t
702
702
  });
703
703
  }, "DropdownMenuSeparator")), Ar = /* @__PURE__ */ mr((e) => {
704
- let { __scopeDropdownMenu: t, children: n, open: r, onOpenChange: i, defaultOpen: a } = e, o = vr(t), [s, c] = Te({
704
+ let { __scopeDropdownMenu: t, children: n, open: r, onOpenChange: i, defaultOpen: a } = e, o = vr(t), [s, c] = we({
705
705
  prop: r,
706
706
  defaultProp: a ?? !1,
707
707
  onChange: i,
@@ -765,7 +765,7 @@ var Ur = Object.defineProperty, Y = (e, t) => Ur(e, "name", {
765
765
  children: a
766
766
  });
767
767
  }, "TooltipProvider"), $r = "Tooltip", [ei, ti] = Wr($r), ni = /* @__PURE__ */ Y((e) => {
768
- let { __scopeTooltip: t, children: n, open: r, defaultOpen: i, onOpenChange: a, disableHoverableContent: o, delayDuration: s } = e, c = Zr($r, e.__scopeTooltip), l = Kr(t), [u, d] = z.useState(null), [f, p] = z.useState(void 0), m = Ue(), h = z.useRef(0), g = o ?? c.disableHoverableContent, _ = s ?? c.delayDuration, v = z.useRef(!1), [y, b] = Te({
768
+ let { __scopeTooltip: t, children: n, open: r, defaultOpen: i, onOpenChange: a, disableHoverableContent: o, delayDuration: s } = e, c = Zr($r, e.__scopeTooltip), l = Kr(t), [u, d] = z.useState(null), [f, p] = z.useState(void 0), m = Ue(), h = z.useRef(0), g = o ?? c.disableHoverableContent, _ = s ?? c.delayDuration, v = z.useRef(!1), [y, b] = we({
769
769
  prop: r,
770
770
  defaultProp: i ?? !1,
771
771
  onChange: /* @__PURE__ */ Y((e) => {
@@ -812,11 +812,11 @@ var Ur = Object.defineProperty, Y = (e, t) => Ur(e, "name", {
812
812
  })
813
813
  });
814
814
  }, "Tooltip"), ri = "TooltipTrigger", ii = /* @__PURE__ */ z.forwardRef(/* @__PURE__ */ Y(function(e, t) {
815
- let { __scopeTooltip: n, ...r } = e, i = ti(ri, n), a = Zr(ri, n), o = Kr(n), s = z.useRef(null), c = I(t, s, i.onTriggerChange), l = z.useRef(!1), u = z.useRef(!1), d = z.useCallback(() => l.current = !1, []);
815
+ let { __scopeTooltip: n, ...r } = e, i = ti(ri, n), a = Zr(ri, n), o = Kr(n), s = z.useRef(null), c = Te(t, s, i.onTriggerChange), l = z.useRef(!1), u = z.useRef(!1), d = z.useCallback(() => l.current = !1, []);
816
816
  return z.useEffect(() => () => document.removeEventListener("pointerup", d), [d]), /* @__PURE__ */ K(Je, {
817
817
  asChild: !0,
818
818
  ...o,
819
- children: /* @__PURE__ */ K(P.button, {
819
+ children: /* @__PURE__ */ K(xe.button, {
820
820
  "aria-describedby": i.open ? i.contentId : void 0,
821
821
  "data-state": i.stateAttribute,
822
822
  ...r,
@@ -866,7 +866,7 @@ var Ur = Object.defineProperty, Y = (e, t) => Ur(e, "name", {
866
866
  })
867
867
  });
868
868
  }, "TooltipContent")), di = /* @__PURE__ */ z.forwardRef(/* @__PURE__ */ Y(function(e, t) {
869
- let n = ti(li, e.__scopeTooltip), r = Zr(li, e.__scopeTooltip), i = z.useRef(null), a = I(t, i), [o, s] = z.useState(null), { trigger: c, onClose: l } = n, u = i.current, { onPointerInTransitChange: d } = r, f = z.useCallback(() => {
869
+ let n = ti(li, e.__scopeTooltip), r = Zr(li, e.__scopeTooltip), i = z.useRef(null), a = Te(t, i), [o, s] = z.useState(null), { trigger: c, onClose: l } = n, u = i.current, { onPointerInTransitChange: d } = r, f = z.useCallback(() => {
870
870
  s(null), d(!1);
871
871
  }, [d]), p = z.useCallback((e, t) => {
872
872
  let n = e.currentTarget, r = {
@@ -919,7 +919,7 @@ var Ur = Object.defineProperty, Y = (e, t) => Ur(e, "name", {
919
919
  }
920
920
  }, [l.trigger, d]);
921
921
  let { setContentId: f } = l;
922
- return we(() => (f(a), () => {
922
+ return I(() => (f(a), () => {
923
923
  f(void 0);
924
924
  }), [a, f]), /* @__PURE__ */ K(Oe, {
925
925
  asChild: !0,
@@ -1673,17 +1673,17 @@ var ao = "Popper", [oo, so] = da(ao), [co, lo] = oo(ao), uo = (e) => {
1673
1673
  }), r ? null : /*#__PURE__*/ B($.div, X({}, i, { ref: s }));
1674
1674
  }), mo = "PopperContent", [ho, go] = oo(mo), _o = /*#__PURE__*/ V((e, t) => {
1675
1675
  var n;
1676
- let { __scopePopper: r, side: i = "bottom", sideOffset: a = 0, align: o = "center", alignOffset: s = 0, arrowPadding: c = 0, collisionBoundary: l = [], collisionPadding: u = 0, sticky: d = "partial", hideWhenDetached: f = !1, avoidCollisions: p = !0, onPlaced: m, ...h } = e, g = lo(mo, r), [_, v] = G(null), y = Q(t, (e) => v(e)), [b, x] = G(null), S = io(b), C = S?.width ?? 0, w = S?.height ?? 0, T = i + (o === "center" ? "" : "-" + o), ee = typeof u == "number" ? u : {
1676
+ let { __scopePopper: r, side: i = "bottom", sideOffset: a = 0, align: o = "center", alignOffset: s = 0, arrowPadding: c = 0, collisionBoundary: l = [], collisionPadding: u = 0, sticky: d = "partial", hideWhenDetached: f = !1, avoidCollisions: p = !0, onPlaced: m, ...h } = e, g = lo(mo, r), [_, v] = G(null), y = Q(t, (e) => v(e)), [b, x] = G(null), S = io(b), C = S?.width ?? 0, w = S?.height ?? 0, T = i + (o === "center" ? "" : "-" + o), E = typeof u == "number" ? u : {
1677
1677
  top: 0,
1678
1678
  right: 0,
1679
1679
  bottom: 0,
1680
1680
  left: 0,
1681
1681
  ...u
1682
- }, te = Array.isArray(l) ? l : [l], E = te.length > 0, D = {
1683
- padding: ee,
1684
- boundary: te.filter(vo),
1685
- altBoundary: E
1686
- }, { refs: O, floatingStyles: k, placement: ne, isPositioned: A, middlewareData: j } = ft({
1682
+ }, D = Array.isArray(l) ? l : [l], O = D.length > 0, k = {
1683
+ padding: E,
1684
+ boundary: D.filter(vo),
1685
+ altBoundary: O
1686
+ }, { refs: A, floatingStyles: j, placement: ee, isPositioned: M, middlewareData: N } = ft({
1687
1687
  strategy: "fixed",
1688
1688
  placement: T,
1689
1689
  whileElementsMounted: mt,
@@ -1697,11 +1697,11 @@ var ao = "Popper", [oo, so] = da(ao), [co, lo] = oo(ao), uo = (e) => {
1697
1697
  mainAxis: !0,
1698
1698
  crossAxis: !1,
1699
1699
  limiter: d === "partial" ? pt() : void 0,
1700
- ...D
1700
+ ...k
1701
1701
  }),
1702
- p && ht({ ...D }),
1702
+ p && ht({ ...k }),
1703
1703
  vt({
1704
- ...D,
1704
+ ...k,
1705
1705
  apply: ({ elements: e, rects: t, availableWidth: n, availableHeight: r }) => {
1706
1706
  let { width: i, height: a } = t.reference, o = e.floating.style;
1707
1707
  o.setProperty("--radix-popper-available-width", `${n}px`), o.setProperty("--radix-popper-available-height", `${r}px`), o.setProperty("--radix-popper-anchor-width", `${i}px`), o.setProperty("--radix-popper-anchor-height", `${a}px`);
@@ -1717,40 +1717,40 @@ var ao = "Popper", [oo, so] = da(ao), [co, lo] = oo(ao), uo = (e) => {
1717
1717
  }),
1718
1718
  f && _t({ strategy: "referenceHidden" })
1719
1719
  ]
1720
- }), [M, re] = bo(ne), ie = wa(m);
1720
+ }), [P, te] = bo(ee), ne = wa(m);
1721
1721
  eo(() => {
1722
- A && ie?.();
1723
- }, [A, ie]);
1724
- let ae = j.arrow?.x, oe = j.arrow?.y, se = j.arrow?.centerOffset !== 0, [ce, le] = G();
1722
+ M && ne?.();
1723
+ }, [M, ne]);
1724
+ let re = N.arrow?.x, ie = N.arrow?.y, ae = N.arrow?.centerOffset !== 0, [oe, se] = G();
1725
1725
  return eo(() => {
1726
- _ && le(window.getComputedStyle(_).zIndex);
1726
+ _ && se(window.getComputedStyle(_).zIndex);
1727
1727
  }, [_]), /*#__PURE__*/ B("div", {
1728
- ref: O.setFloating,
1728
+ ref: A.setFloating,
1729
1729
  "data-radix-popper-content-wrapper": "",
1730
1730
  style: {
1731
- ...k,
1732
- transform: A ? k.transform : "translate(0, -200%)",
1731
+ ...j,
1732
+ transform: M ? j.transform : "translate(0, -200%)",
1733
1733
  minWidth: "max-content",
1734
- zIndex: ce,
1735
- "--radix-popper-transform-origin": [j.transformOrigin?.x, j.transformOrigin?.y].join(" ")
1734
+ zIndex: oe,
1735
+ "--radix-popper-transform-origin": [N.transformOrigin?.x, N.transformOrigin?.y].join(" ")
1736
1736
  },
1737
1737
  dir: e.dir
1738
1738
  }, /*#__PURE__*/ B(ho, {
1739
1739
  scope: r,
1740
- placedSide: M,
1740
+ placedSide: P,
1741
1741
  onArrowChange: x,
1742
- arrowX: ae,
1743
- arrowY: oe,
1744
- shouldHideArrow: se
1742
+ arrowX: re,
1743
+ arrowY: ie,
1744
+ shouldHideArrow: ae
1745
1745
  }, /*#__PURE__*/ B($.div, X({
1746
- "data-side": M,
1747
- "data-align": re
1746
+ "data-side": P,
1747
+ "data-align": te
1748
1748
  }, h, {
1749
1749
  ref: y,
1750
1750
  style: {
1751
1751
  ...h.style,
1752
- animation: A ? void 0 : "none",
1753
- opacity: (n = j.hide) != null && n.referenceHidden ? 0 : void 0
1752
+ animation: M ? void 0 : "none",
1753
+ opacity: (n = N.hide) != null && n.referenceHidden ? 0 : void 0
1754
1754
  }
1755
1755
  }))));
1756
1756
  });
@@ -2060,7 +2060,7 @@ var ns = [
2060
2060
  prop: o,
2061
2061
  defaultProp: s,
2062
2062
  onChange: c
2063
- }), ee = W(null), te = !h || !!h.closest("form"), [E, D] = G(/* @__PURE__ */ new Set()), O = Array.from(E).map((e) => e.props.value).join(";");
2063
+ }), E = W(null), D = !h || !!h.closest("form"), [O, k] = G(/* @__PURE__ */ new Set()), A = Array.from(O).map((e) => e.props.value).join(";");
2064
2064
  return /*#__PURE__*/ B(xo, m, /*#__PURE__*/ B(ds, {
2065
2065
  required: p,
2066
2066
  scope: t,
@@ -2076,21 +2076,21 @@ var ns = [
2076
2076
  open: S,
2077
2077
  onOpenChange: C,
2078
2078
  dir: x,
2079
- triggerPointerDownPosRef: ee,
2079
+ triggerPointerDownPosRef: E,
2080
2080
  disabled: f
2081
2081
  }, /*#__PURE__*/ B(as.Provider, { scope: t }, /*#__PURE__*/ B(ps, {
2082
2082
  scope: e.__scopeSelect,
2083
2083
  onNativeOptionAdd: H((e) => {
2084
- D((t) => new Set(t).add(e));
2084
+ k((t) => new Set(t).add(e));
2085
2085
  }, []),
2086
2086
  onNativeOptionRemove: H((e) => {
2087
- D((t) => {
2087
+ k((t) => {
2088
2088
  let n = new Set(t);
2089
2089
  return n.delete(e), n;
2090
2090
  });
2091
2091
  }, [])
2092
- }, n)), te ? /*#__PURE__*/ B(Ys, {
2093
- key: O,
2092
+ }, n)), D ? /*#__PURE__*/ B(Ys, {
2093
+ key: A,
2094
2094
  "aria-hidden": !0,
2095
2095
  required: p,
2096
2096
  tabIndex: -1,
@@ -2099,7 +2099,7 @@ var ns = [
2099
2099
  value: w,
2100
2100
  onChange: (e) => T(e.target.value),
2101
2101
  disabled: f
2102
- }, w === void 0 ? /*#__PURE__*/ B("option", { value: "" }) : null, Array.from(E)) : null));
2102
+ }, w === void 0 ? /*#__PURE__*/ B("option", { value: "" }) : null, Array.from(O)) : null));
2103
2103
  }, gs = "SelectTrigger", _s = /*#__PURE__*/ V((e, t) => {
2104
2104
  let { __scopeSelect: n, disabled: r = !1, ...i } = e, a = us(n), o = fs(gs, n), s = o.disabled || r, c = Q(t, o.onTriggerChange), l = os(n), [u, d, f] = Xs((e) => {
2105
2105
  let t = l().filter((e) => !e.disabled), n = Zs(t, e, t.find((e) => e.value === o.value));
@@ -2157,22 +2157,22 @@ var ns = [
2157
2157
  }
2158
2158
  return /*#__PURE__*/ B(Ds, X({}, e, { ref: t }));
2159
2159
  }), ws = 10, [Ts, Es] = cs(Ss), Ds = /*#__PURE__*/ V((e, t) => {
2160
- let { __scopeSelect: n, position: r = "item-aligned", onCloseAutoFocus: i, onEscapeKeyDown: a, onPointerDownOutside: o, side: s, sideOffset: c, align: l, alignOffset: u, arrowPadding: d, collisionBoundary: f, collisionPadding: p, sticky: m, hideWhenDetached: h, avoidCollisions: g, ..._ } = e, v = fs(Ss, n), [y, b] = G(null), [x, S] = G(null), C = Q(t, (e) => b(e)), [w, T] = G(null), [ee, te] = G(null), E = os(n), [D, O] = G(!1), k = W(!1);
2160
+ let { __scopeSelect: n, position: r = "item-aligned", onCloseAutoFocus: i, onEscapeKeyDown: a, onPointerDownOutside: o, side: s, sideOffset: c, align: l, alignOffset: u, arrowPadding: d, collisionBoundary: f, collisionPadding: p, sticky: m, hideWhenDetached: h, avoidCollisions: g, ..._ } = e, v = fs(Ss, n), [y, b] = G(null), [x, S] = G(null), C = Q(t, (e) => b(e)), [w, T] = G(null), [E, D] = G(null), O = os(n), [k, A] = G(!1), j = W(!1);
2161
2161
  U(() => {
2162
2162
  if (y) return Ve(y);
2163
2163
  }, [y]), La();
2164
- let ne = H((e) => {
2165
- let [t, ...n] = E().map((e) => e.ref.current), [r] = n.slice(-1), i = document.activeElement;
2164
+ let ee = H((e) => {
2165
+ let [t, ...n] = O().map((e) => e.ref.current), [r] = n.slice(-1), i = document.activeElement;
2166
2166
  for (let n of e) if (n === i || (n?.scrollIntoView({ block: "nearest" }), n === t && x && (x.scrollTop = 0), n === r && x && (x.scrollTop = x.scrollHeight), n?.focus(), document.activeElement !== i)) return;
2167
- }, [E, x]), A = H(() => ne([w, y]), [
2168
- ne,
2167
+ }, [O, x]), M = H(() => ee([w, y]), [
2168
+ ee,
2169
2169
  w,
2170
2170
  y
2171
2171
  ]);
2172
2172
  U(() => {
2173
- D && A();
2174
- }, [D, A]);
2175
- let { onOpenChange: j, triggerPointerDownPosRef: M } = v;
2173
+ k && M();
2174
+ }, [k, M]);
2175
+ let { onOpenChange: N, triggerPointerDownPosRef: P } = v;
2176
2176
  U(() => {
2177
2177
  if (y) {
2178
2178
  let e = {
@@ -2180,13 +2180,13 @@ var ns = [
2180
2180
  y: 0
2181
2181
  }, t = (t) => {
2182
2182
  e = {
2183
- x: Math.abs(Math.round(t.pageX) - (M.current?.x ?? 0)),
2184
- y: Math.abs(Math.round(t.pageY) - (M.current?.y ?? 0))
2183
+ x: Math.abs(Math.round(t.pageX) - (P.current?.x ?? 0)),
2184
+ y: Math.abs(Math.round(t.pageY) - (P.current?.y ?? 0))
2185
2185
  };
2186
2186
  }, n = (n) => {
2187
- e.x <= 10 && e.y <= 10 ? n.preventDefault() : y.contains(n.target) || j(!1), document.removeEventListener("pointermove", t), M.current = null;
2187
+ e.x <= 10 && e.y <= 10 ? n.preventDefault() : y.contains(n.target) || N(!1), document.removeEventListener("pointermove", t), P.current = null;
2188
2188
  };
2189
- return M.current !== null && (document.addEventListener("pointermove", t), document.addEventListener("pointerup", n, {
2189
+ return P.current !== null && (document.addEventListener("pointermove", t), document.addEventListener("pointerup", n, {
2190
2190
  capture: !0,
2191
2191
  once: !0
2192
2192
  })), () => {
@@ -2195,24 +2195,24 @@ var ns = [
2195
2195
  }
2196
2196
  }, [
2197
2197
  y,
2198
- j,
2199
- M
2198
+ N,
2199
+ P
2200
2200
  ]), U(() => {
2201
- let e = () => j(!1);
2201
+ let e = () => N(!1);
2202
2202
  return window.addEventListener("blur", e), window.addEventListener("resize", e), () => {
2203
2203
  window.removeEventListener("blur", e), window.removeEventListener("resize", e);
2204
2204
  };
2205
- }, [j]);
2206
- let [re, ie] = Xs((e) => {
2207
- let t = E().filter((e) => !e.disabled), n = Zs(t, e, t.find((e) => e.ref.current === document.activeElement));
2205
+ }, [N]);
2206
+ let [te, ne] = Xs((e) => {
2207
+ let t = O().filter((e) => !e.disabled), n = Zs(t, e, t.find((e) => e.ref.current === document.activeElement));
2208
2208
  n && setTimeout(() => n.ref.current.focus());
2209
- }), ae = H((e, t, n) => {
2210
- let r = !k.current && !n;
2211
- (v.value !== void 0 && v.value === t || r) && (T(e), r && (k.current = !0));
2212
- }, [v.value]), oe = H(() => y?.focus(), [y]), se = H((e, t, n) => {
2213
- let r = !k.current && !n;
2214
- (v.value !== void 0 && v.value === t || r) && te(e);
2215
- }, [v.value]), ce = r === "popper" ? ks : Os, le = ce === ks ? {
2209
+ }), re = H((e, t, n) => {
2210
+ let r = !j.current && !n;
2211
+ (v.value !== void 0 && v.value === t || r) && (T(e), r && (j.current = !0));
2212
+ }, [v.value]), ie = H(() => y?.focus(), [y]), ae = H((e, t, n) => {
2213
+ let r = !j.current && !n;
2214
+ (v.value !== void 0 && v.value === t || r) && D(e);
2215
+ }, [v.value]), oe = r === "popper" ? ks : Os, se = oe === ks ? {
2216
2216
  side: s,
2217
2217
  sideOffset: c,
2218
2218
  align: l,
@@ -2229,15 +2229,15 @@ var ns = [
2229
2229
  content: y,
2230
2230
  viewport: x,
2231
2231
  onViewportChange: S,
2232
- itemRefCallback: ae,
2232
+ itemRefCallback: re,
2233
2233
  selectedItem: w,
2234
- onItemLeave: oe,
2235
- itemTextRefCallback: se,
2236
- focusSelectedItem: A,
2237
- selectedItemText: ee,
2234
+ onItemLeave: ie,
2235
+ itemTextRefCallback: ae,
2236
+ focusSelectedItem: M,
2237
+ selectedItemText: E,
2238
2238
  position: r,
2239
- isPositioned: D,
2240
- searchRef: re
2239
+ isPositioned: k,
2240
+ searchRef: te
2241
2241
  }, /*#__PURE__*/ B(ts, {
2242
2242
  as: ha,
2243
2243
  allowPinchZoom: !0
@@ -2258,14 +2258,14 @@ var ns = [
2258
2258
  onPointerDownOutside: o,
2259
2259
  onFocusOutside: (e) => e.preventDefault(),
2260
2260
  onDismiss: () => v.onOpenChange(!1)
2261
- }, /*#__PURE__*/ B(ce, X({
2261
+ }, /*#__PURE__*/ B(oe, X({
2262
2262
  role: "listbox",
2263
2263
  id: v.contentId,
2264
2264
  "data-state": v.open ? "open" : "closed",
2265
2265
  dir: v.dir,
2266
2266
  onContextMenu: (e) => e.preventDefault()
2267
- }, _, le, {
2268
- onPlaced: () => O(!0),
2267
+ }, _, se, {
2268
+ onPlaced: () => A(!0),
2269
2269
  ref: C,
2270
2270
  style: {
2271
2271
  display: "flex",
@@ -2275,18 +2275,18 @@ var ns = [
2275
2275
  },
2276
2276
  onKeyDown: Z(_.onKeyDown, (e) => {
2277
2277
  let t = e.ctrlKey || e.altKey || e.metaKey;
2278
- if (e.key === "Tab" && e.preventDefault(), !t && e.key.length === 1 && ie(e.key), [
2278
+ if (e.key === "Tab" && e.preventDefault(), !t && e.key.length === 1 && ne(e.key), [
2279
2279
  "ArrowUp",
2280
2280
  "ArrowDown",
2281
2281
  "Home",
2282
2282
  "End"
2283
2283
  ].includes(e.key)) {
2284
- let t = E().filter((e) => !e.disabled).map((e) => e.ref.current);
2284
+ let t = O().filter((e) => !e.disabled).map((e) => e.ref.current);
2285
2285
  if (["ArrowUp", "End"].includes(e.key) && (t = t.slice().reverse()), ["ArrowUp", "ArrowDown"].includes(e.key)) {
2286
2286
  let n = e.target, r = t.indexOf(n);
2287
2287
  t = t.slice(r + 1);
2288
2288
  }
2289
- setTimeout(() => ne(t)), e.preventDefault();
2289
+ setTimeout(() => ee(t)), e.preventDefault();
2290
2290
  }
2291
2291
  })
2292
2292
  }))))));
@@ -2301,17 +2301,17 @@ var ns = [
2301
2301
  let r = t.right - i.right, a = window.innerWidth - n.right - r, o = window.innerWidth - e.right - a, c = e.width + o, l = Math.max(c, t.width), u = ua(a, [ws, window.innerWidth - ws - l]);
2302
2302
  s.style.minWidth = c + "px", s.style.right = u + "px";
2303
2303
  }
2304
- let o = f(), c = window.innerHeight - 20, u = h.scrollHeight, d = window.getComputedStyle(l), m = parseInt(d.borderTopWidth, 10), v = parseInt(d.paddingTop, 10), y = parseInt(d.borderBottomWidth, 10), b = parseInt(d.paddingBottom, 10), x = m + v + u + b + y, S = Math.min(g.offsetHeight * 5, x), C = window.getComputedStyle(h), w = parseInt(C.paddingTop, 10), T = parseInt(C.paddingBottom, 10), ee = e.top + e.height / 2 - ws, te = c - ee, E = g.offsetHeight / 2, D = g.offsetTop + E, O = m + v + D, k = x - O;
2305
- if (O <= ee) {
2304
+ let o = f(), c = window.innerHeight - 20, u = h.scrollHeight, d = window.getComputedStyle(l), m = parseInt(d.borderTopWidth, 10), v = parseInt(d.paddingTop, 10), y = parseInt(d.borderBottomWidth, 10), b = parseInt(d.paddingBottom, 10), x = m + v + u + b + y, S = Math.min(g.offsetHeight * 5, x), C = window.getComputedStyle(h), w = parseInt(C.paddingTop, 10), T = parseInt(C.paddingBottom, 10), E = e.top + e.height / 2 - ws, D = c - E, O = g.offsetHeight / 2, k = g.offsetTop + O, A = m + v + k, j = x - A;
2305
+ if (A <= E) {
2306
2306
  let e = g === o[o.length - 1].ref.current;
2307
2307
  s.style.bottom = "0px";
2308
- let t = l.clientHeight - h.offsetTop - h.offsetHeight, n = O + Math.max(te, E + (e ? T : 0) + t + y);
2308
+ let t = l.clientHeight - h.offsetTop - h.offsetHeight, n = A + Math.max(D, O + (e ? T : 0) + t + y);
2309
2309
  s.style.height = n + "px";
2310
2310
  } else {
2311
2311
  let e = g === o[0].ref.current;
2312
2312
  s.style.top = "0px";
2313
- let t = Math.max(ee, m + h.offsetTop + (e ? w : 0) + E) + k;
2314
- s.style.height = t + "px", h.scrollTop = O - ee + h.offsetTop;
2313
+ let t = Math.max(E, m + h.offsetTop + (e ? w : 0) + O) + j;
2314
+ s.style.height = t + "px", h.scrollTop = A - E + h.offsetTop;
2315
2315
  }
2316
2316
  s.style.margin = `${ws}px 0`, s.style.minHeight = S + "px", s.style.maxHeight = c + "px", r?.(), requestAnimationFrame(() => p.current = !0);
2317
2317
  }
@@ -2643,7 +2643,7 @@ var $s = hs, ec = _s, tc = ys, nc = bs, rc = xs, ic = Cs, ac = Ns, oc = zs, sc =
2643
2643
  children: [n, /* @__PURE__ */ K(Ei, { className: "z-50 -mt-0.5 size-2.5 -translate-y-1/2 rotate-45 rounded-xs bg-(--popover) fill-(--popover)" })]
2644
2644
  })
2645
2645
  });
2646
- }, Tc = ({ className: e }) => /* @__PURE__ */ K(de, {
2646
+ }, Tc = ({ className: e }) => /* @__PURE__ */ K(le, {
2647
2647
  label: "Loading chart",
2648
2648
  className: e,
2649
2649
  "data-testid": "card-loading-skeleton"
@@ -2688,7 +2688,7 @@ var Dc = ({ error: e, message: t, onRetry: n, widgetName: r, chartType: i, custo
2688
2688
  retryTestId: "card-error-retry"
2689
2689
  }), c ? /* @__PURE__ */ K("div", {
2690
2690
  className: "flex shrink-0 justify-center pb-2",
2691
- children: /* @__PURE__ */ K(ye, {
2691
+ children: /* @__PURE__ */ K(_e, {
2692
2692
  asChild: !0,
2693
2693
  variant: "link",
2694
2694
  size: "inline",
@@ -2810,7 +2810,7 @@ var Nc = ({ noDataImg: n, noDataFoundSvg: r, message: i, hint: o, action: s, has
2810
2810
  alt: h
2811
2811
  }) : /* @__PURE__ */ K("div", {
2812
2812
  className: "flex size-16 items-center justify-center rounded-(--radius-lg) bg-(--muted)",
2813
- children: /* @__PURE__ */ K(_e, {
2813
+ children: /* @__PURE__ */ K(he, {
2814
2814
  className: "size-8 text-(--muted-foreground)",
2815
2815
  "aria-hidden": "true"
2816
2816
  })
@@ -2913,10 +2913,10 @@ var Jc = 6, Yc = (e) => {
2913
2913
  for (let e of t) if (e) for (let t of Object.keys(e)) r.add(t);
2914
2914
  if (!r.size) return null;
2915
2915
  let i = [...r];
2916
- return n.some((e) => S(i, e)) ? null : `This chart reads ${Yc(n)}, but the query returns ${Yc(i)}. Pick the columns again in Configure.`;
2916
+ return n.some((e) => O(i, e)) ? null : `This chart reads ${Yc(n)}, but the query returns ${Yc(i)}. Pick the columns again in Configure.`;
2917
2917
  }, Zc = (e, t, n) => {
2918
2918
  if (!e) return !1;
2919
- let r = M(e, t, n);
2919
+ let r = P(e, t, n);
2920
2920
  return r !== null && r < 4.5;
2921
2921
  }, Qc = (e, t, n) => {
2922
2922
  let r = e?.tableSettings;
@@ -2972,12 +2972,12 @@ function rl(e, t, i, a, s) {
2972
2972
  categoryIsTemporal: nl(p?.selectedDims, d)
2973
2973
  });
2974
2974
  if (!g) return c;
2975
- let _ = oe(t);
2975
+ let _ = ie(t);
2976
2976
  return {
2977
2977
  rows: m,
2978
2978
  collapsedRows: h,
2979
2979
  summary: g,
2980
- truncated: ae(_, "chart-coverage", m.slice(0, g.keptCount)).truncated
2980
+ truncated: re(_, "chart-coverage", m.slice(0, g.keptCount)).truncated
2981
2981
  };
2982
2982
  }
2983
2983
  function il(e, t, n) {
@@ -3092,7 +3092,7 @@ function Cl(e) {
3092
3092
  }
3093
3093
  //#endregion
3094
3094
  //#region src/v2/surfaces/MetricCard/cardTableCell.ts
3095
- var wl = (e) => e == null || typeof e == "string" && e.trim() === "", Tl = j, El = 12, Dl = 36, Ol = 720;
3095
+ var wl = (e) => e == null || typeof e == "string" && e.trim() === "", Tl = N, El = 12, Dl = 36, Ol = 720;
3096
3096
  function kl(e, t) {
3097
3097
  let n = Array(e + 1);
3098
3098
  n[0] = 0;
@@ -3220,9 +3220,9 @@ function Nl({ rowCount: e, scrollElRef: t, minRows: n = 200 }) {
3220
3220
  measureRowRef: x
3221
3221
  };
3222
3222
  }
3223
- var Pl = ({ rows: e, columns: t, paging: n, isLoading: r = !1, error: i = null, onRetry: a, emptyMessage: o, emptyAction: s, renderCell: c, onCellClick: l, ariaLabel: u, qaEntity: d = "metric-card-chart-table", className: f }) => {
3224
- let p = e.length > 1e3 && ml();
3225
- return !n && !l && !p ? /* @__PURE__ */ K(Fl, {
3223
+ var Pl = ({ rows: e, columns: t, paging: n, isLoading: r = !1, error: i = null, onRetry: a, emptyMessage: o, emptyAction: s, renderCell: c, onCellClick: l, ariaLabel: u, qaEntity: d = "metric-card-chart-table", className: f, searchable: p = !1 }) => {
3224
+ let m = e.length > 1e3 && ml();
3225
+ return !n && !l && !m ? /* @__PURE__ */ K(Fl, {
3226
3226
  rows: e,
3227
3227
  columns: t,
3228
3228
  renderCell: c,
@@ -3243,7 +3243,8 @@ var Pl = ({ rows: e, columns: t, paging: n, isLoading: r = !1, error: i = null,
3243
3243
  onCellClick: l,
3244
3244
  ariaLabel: u,
3245
3245
  qaEntity: d,
3246
- className: f
3246
+ className: f,
3247
+ searchable: p && n?.mode === "client"
3247
3248
  });
3248
3249
  }, Fl = ({ rows: e, columns: t, renderCell: n, className: r }) => {
3249
3250
  let i = z.useRef(null), { range: a, spacerTop: o, spacerBottom: s, isWindowed: c, tbodyRef: l, measureRowRef: u } = Nl({
@@ -3303,224 +3304,272 @@ var Pl = ({ rows: e, columns: t, paging: n, isLoading: r = !1, error: i = null,
3303
3304
  }), Rl = (e) => wl(e) ? /* @__PURE__ */ K(Ll, {}) : String(e), zl = () => /* @__PURE__ */ K("td", {
3304
3305
  "aria-hidden": "true",
3305
3306
  className: "dbn-v2-table__filler"
3306
- }), Bl = ({ rows: e, columns: t, paging: n, isLoading: r, error: i, onRetry: a, emptyMessage: o, emptyAction: s, renderCell: c, onCellClick: l, ariaLabel: u, qaEntity: d, className: f }) => {
3307
- let p = n.mode === "server", m = Cl(n.mode), [h, g] = z.useState(null), [_, v] = z.useState({
3307
+ }), Bl = ({ rows: e, columns: t, paging: n, isLoading: r, error: i, onRetry: a, emptyMessage: o, emptyAction: s, renderCell: c, onCellClick: l, ariaLabel: u, qaEntity: d, className: f, searchable: p }) => {
3308
+ let m = n.mode === "server", h = Cl(n.mode), [g, _] = z.useState(null), [v, y] = z.useState({
3308
3309
  limit: n.mode === "client" ? n.pageSize ?? 100 : 100,
3309
3310
  offset: 0
3310
- }), y = z.useCallback((e) => !!t.find((t) => t.key === e)?.isNumeric, [t]), b = h && t.some((e) => e.key === h.key) ? h : null, x = z.useMemo(() => m ? yl(e, b, y) : e, [
3311
+ }), b = z.useCallback((e) => !!t.find((t) => t.key === e)?.isNumeric, [t]), x = g && t.some((e) => e.key === g.key) ? g : null, [S, C] = z.useState(""), w = p ? S.trim().toLowerCase() : "", T = z.useMemo(() => w ? e.filter((e) => t.some((t) => String(e?.[t.key] ?? "").toLowerCase().includes(w))) : e, [
3311
3312
  e,
3312
- b,
3313
- m,
3314
- y
3315
- ]), S = n.mode === "client" ? Math.min(n.autoPageAbove ?? 1e3, gl) : 0, C = n.mode === "client" && e.length > S, w = p ? n.limit : _.limit, T = x.length, ee = Math.max(0, Math.min(_.offset, Math.floor(Math.max(0, T - 1) / _.limit) * _.limit)), te = p ? n.offset : C ? ee : 0, E = z.useMemo(() => p || !C ? x : xl(x, w, te), [
3316
- p,
3317
- C,
3313
+ t,
3314
+ w
3315
+ ]), E = (e) => {
3316
+ C(e), y((e) => ({
3317
+ ...e,
3318
+ offset: 0
3319
+ }));
3320
+ }, D = z.useMemo(() => h ? yl(T, x, b) : T, [
3321
+ T,
3318
3322
  x,
3319
- w,
3320
- te
3321
- ]), D = bl({
3322
- total: p ? n.totalRows : x.length,
3323
- limit: w,
3324
- offset: te,
3325
- renderedRowCount: E.length
3326
- }), O = z.useRef(null), { range: k, spacerTop: ne, spacerBottom: A, isWindowed: j, tbodyRef: M, measureRowRef: re } = Nl({
3327
- rowCount: E.length,
3328
- scrollElRef: O
3329
- }), ie = E.slice(k.start, k.end), ae = t.length + 1, oe = (e) => {
3330
- if (p) {
3323
+ h,
3324
+ b
3325
+ ]), O = n.mode === "client" ? Math.min(n.autoPageAbove ?? 1e3, gl) : 0, k = n.mode === "client" && e.length > O, A = m ? n.limit : v.limit, j = D.length, ee = Math.max(0, Math.min(v.offset, Math.floor(Math.max(0, j - 1) / v.limit) * v.limit)), M = m ? n.offset : k ? ee : 0, N = z.useMemo(() => m || !k ? D : xl(D, A, M), [
3326
+ m,
3327
+ k,
3328
+ D,
3329
+ A,
3330
+ M
3331
+ ]), P = bl({
3332
+ total: m ? n.totalRows : D.length,
3333
+ limit: A,
3334
+ offset: M,
3335
+ renderedRowCount: N.length
3336
+ }), te = z.useRef(null), { range: ne, spacerTop: re, spacerBottom: ie, isWindowed: ae, tbodyRef: se, measureRowRef: ce } = Nl({
3337
+ rowCount: N.length,
3338
+ scrollElRef: te
3339
+ }), ue = N.slice(ne.start, ne.end), de = t.length + 1, fe = (e) => {
3340
+ if (m) {
3331
3341
  n.onChangePage(!0, void 0, e);
3332
3342
  return;
3333
3343
  }
3334
- v((t) => ({
3344
+ y((t) => ({
3335
3345
  ...t,
3336
3346
  offset: Math.max(0, e)
3337
3347
  }));
3338
- }, se = (e) => {
3339
- if (p) {
3348
+ }, pe = (e) => {
3349
+ if (m) {
3340
3350
  n.onChangePage(!1, e);
3341
3351
  return;
3342
3352
  }
3343
- v((t) => ({
3353
+ y((t) => ({
3344
3354
  limit: e,
3345
3355
  offset: Sl({
3346
3356
  offset: t.offset,
3347
3357
  nextLimit: e
3348
3358
  })
3349
3359
  }));
3350
- }, le = n, ue = p ? le.isEnablePrevBtn ?? !D.isFirstPage : !D.isFirstPage, fe = p ? le.isEnableNextBtn ?? !D.isLastPage : !D.isLastPage, pe = p || C, me = !!r && E.length > 0, he = !!r && E.length === 0, ge = pe ? `${D.total.toLocaleString()} rows, ${w.toLocaleString()} per page.${m ? "" : " Sorting is unavailable while this table loads one page at a time."}` : null;
3360
+ }, me = n, he = m ? me.isEnablePrevBtn ?? !P.isFirstPage : !P.isFirstPage, ge = m ? me.isEnableNextBtn ?? !P.isLastPage : !P.isLastPage, _e = m || k, ve = !!r && N.length > 0, ye = !!r && N.length === 0, be = _e ? `${P.total.toLocaleString()} rows, ${A.toLocaleString()} per page.${h ? "" : " Sorting is unavailable while this table loads one page at a time."}` : null;
3351
3361
  return /* @__PURE__ */ q("div", {
3352
3362
  "data-testid": "metric-card-chart-table",
3353
3363
  "data-paging-mode": n.mode,
3354
3364
  className: R("dbn-v2-table dbn-v2-table--fit flex h-full w-full flex-col overflow-hidden rounded-(--radius-md) border border-(--border)", f),
3355
- children: [/* @__PURE__ */ q("div", {
3356
- ref: O,
3357
- className: "relative min-h-0 flex-1 overflow-auto",
3358
- children: [
3359
- me ? /* @__PURE__ */ K("div", {
3360
- "data-testid": `${d}-refreshing`,
3361
- "aria-hidden": "true",
3362
- className: "sticky top-0 z-2 -mb-0.5 h-0.5 w-full animate-pulse bg-(--primary) motion-reduce:animate-none"
3363
- }) : null,
3364
- /* @__PURE__ */ q("table", {
3365
- "aria-label": u,
3366
- "aria-busy": r || void 0,
3367
- className: R(me && "opacity-60 transition-opacity motion-reduce:transition-none"),
3368
- children: [
3369
- ge ? /* @__PURE__ */ K("caption", {
3370
- "data-testid": `${d}-caption`,
3371
- className: "sr-only",
3372
- children: ge
3373
- }) : null,
3374
- /* @__PURE__ */ K("thead", { children: /* @__PURE__ */ q("tr", { children: [t.map((e) => {
3375
- let t = b?.key === e.key ? b.direction : null;
3376
- return /* @__PURE__ */ K("th", {
3377
- scope: "col",
3378
- "aria-sort": m ? t === "asc" ? "ascending" : t === "desc" ? "descending" : "none" : void 0,
3379
- className: e.isNumeric ? "dbn-num" : void 0,
3380
- title: m ? void 0 : "Sorting is unavailable while this table loads one page at a time.",
3381
- children: m ? /* @__PURE__ */ q("button", {
3382
- type: "button",
3383
- ...xe(d, "sort", e.key),
3384
- onClick: () => {
3385
- g((t) => _l(t, e.key)), v((e) => e.offset === 0 ? e : {
3386
- ...e,
3387
- offset: 0
3388
- });
3389
- },
3390
- className: "inline-flex min-h-6 cursor-pointer items-center gap-1 rounded-(--radius-xs) focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-(--ring)",
3391
- children: [e.label, t === "asc" ? /* @__PURE__ */ K(zt, {
3392
- "aria-hidden": "true",
3393
- className: "size-3"
3394
- }) : t === "desc" ? /* @__PURE__ */ K(Lt, {
3395
- "aria-hidden": "true",
3396
- className: "size-3"
3397
- }) : /* @__PURE__ */ K(Rt, {
3398
- "aria-hidden": "true",
3399
- className: "size-3 opacity-40"
3400
- })]
3401
- }) : e.label
3402
- }, e.key);
3403
- }), /* @__PURE__ */ K(zl, {})] }) }),
3404
- /* @__PURE__ */ q("tbody", {
3405
- ref: M,
3406
- children: [
3407
- j && !he && ne > 0 ? /* @__PURE__ */ K("tr", {
3408
- "data-virtual-spacer": "top",
3409
- children: /* @__PURE__ */ K("td", {
3410
- colSpan: ae,
3411
- className: "h-(--spacer-h) border-none p-0",
3412
- style: { "--spacer-h": `${ne}px` }
3413
- })
3414
- }) : null,
3415
- he ? /* @__PURE__ */ K("tr", {
3416
- "data-testid": `${d}-loading-row`,
3417
- children: /* @__PURE__ */ K("td", {
3418
- colSpan: ae,
3419
- className: "border-none p-0",
3420
- children: /* @__PURE__ */ K(de, {
3421
- label: "Loading rows",
3422
- minHeight: Il
3423
- })
3424
- })
3425
- }) : ie.map((e, n) => {
3426
- let r = k.start + n;
3427
- return /* @__PURE__ */ q("tr", {
3428
- ref: j ? re(r) : void 0,
3429
- children: [t.map((t) => {
3430
- let n = c ? c(e?.[t.key], t, e) : Rl(e?.[t.key]);
3431
- return /* @__PURE__ */ K("td", {
3432
- className: t.isNumeric ? "dbn-num" : void 0,
3433
- children: l ? /* @__PURE__ */ K("button", {
3434
- type: "button",
3435
- className: "dbn-v2-table__cell-btn",
3436
- "data-testid": `${d}-cell`,
3437
- onClick: (n) => l({
3438
- row: e,
3439
- column: t,
3440
- value: e?.[t.key],
3441
- rowIndex: r,
3442
- anchor: n.currentTarget
3443
- }),
3444
- children: n
3445
- }) : n
3446
- }, t.key);
3447
- }), /* @__PURE__ */ K(zl, {})]
3448
- }, r);
3449
- }),
3450
- j && !he && A > 0 ? /* @__PURE__ */ K("tr", {
3451
- "data-virtual-spacer": "bottom",
3452
- children: /* @__PURE__ */ K("td", {
3453
- colSpan: ae,
3454
- className: "h-(--spacer-h) border-none p-0",
3455
- style: { "--spacer-h": `${A}px` }
3456
- })
3457
- }) : null
3458
- ]
3459
- })
3460
- ]
3461
- }),
3462
- !r && i ? /* @__PURE__ */ q("div", {
3463
- role: "alert",
3464
- "data-testid": `${d}-error`,
3465
- className: "flex flex-col items-center justify-center gap-3 p-8 text-center",
3466
- children: [
3467
- /* @__PURE__ */ K(ce, {
3365
+ children: [
3366
+ p ? /* @__PURE__ */ q("div", {
3367
+ className: "relative shrink-0 border-b border-(--border)",
3368
+ children: [
3369
+ /* @__PURE__ */ K(Se, {
3370
+ "aria-hidden": "true",
3371
+ className: "pointer-events-none absolute top-1/2 left-2.5 size-3.5 -translate-y-1/2 text-(--muted-foreground)"
3372
+ }),
3373
+ /* @__PURE__ */ K("input", {
3374
+ type: "search",
3375
+ value: S,
3376
+ onChange: (e) => E(e.target.value),
3377
+ placeholder: "Search",
3378
+ "aria-label": "Search table",
3379
+ ...F(d, "search"),
3380
+ className: "h-8 w-full bg-transparent pr-8 pl-8 text-xs text-(--foreground) outline-none placeholder:text-(--muted-foreground) focus-visible:outline focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-(--ring) [&::-webkit-search-cancel-button]:appearance-none"
3381
+ }),
3382
+ S ? /* @__PURE__ */ K("button", {
3383
+ type: "button",
3384
+ "aria-label": "Clear search",
3385
+ ...F(d, "search", "clear"),
3386
+ onClick: () => E(""),
3387
+ className: "absolute top-1/2 right-1.5 inline-flex size-6 -translate-y-1/2 cursor-pointer items-center justify-center rounded-(--radius-xs) text-(--muted-foreground) hover:text-(--foreground) focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-(--ring)",
3388
+ children: /* @__PURE__ */ K(Ke, {
3468
3389
  "aria-hidden": "true",
3469
- className: "size-6 text-(--destructive)"
3470
- }),
3471
- /* @__PURE__ */ K("span", {
3390
+ className: "size-3.5"
3391
+ })
3392
+ }) : null
3393
+ ]
3394
+ }) : null,
3395
+ /* @__PURE__ */ q("div", {
3396
+ ref: te,
3397
+ className: "relative min-h-0 flex-1 overflow-auto",
3398
+ children: [
3399
+ ve ? /* @__PURE__ */ K("div", {
3400
+ "data-testid": `${d}-refreshing`,
3401
+ "aria-hidden": "true",
3402
+ className: "sticky top-0 z-2 -mb-0.5 h-0.5 w-full animate-pulse bg-(--primary) motion-reduce:animate-none"
3403
+ }) : null,
3404
+ /* @__PURE__ */ q("table", {
3405
+ "aria-label": u,
3406
+ "aria-busy": r || void 0,
3407
+ className: R(ve && "opacity-60 transition-opacity motion-reduce:transition-none"),
3408
+ children: [
3409
+ be ? /* @__PURE__ */ K("caption", {
3410
+ "data-testid": `${d}-caption`,
3411
+ className: "sr-only",
3412
+ children: be
3413
+ }) : null,
3414
+ /* @__PURE__ */ K("thead", { children: /* @__PURE__ */ q("tr", { children: [t.map((e) => {
3415
+ let t = x?.key === e.key ? x.direction : null;
3416
+ return /* @__PURE__ */ K("th", {
3417
+ scope: "col",
3418
+ "aria-sort": h ? t === "asc" ? "ascending" : t === "desc" ? "descending" : "none" : void 0,
3419
+ className: e.isNumeric ? "dbn-num" : void 0,
3420
+ title: h ? void 0 : "Sorting is unavailable while this table loads one page at a time.",
3421
+ children: h ? /* @__PURE__ */ q("button", {
3422
+ type: "button",
3423
+ ...F(d, "sort", e.key),
3424
+ onClick: () => {
3425
+ _((t) => _l(t, e.key)), y((e) => e.offset === 0 ? e : {
3426
+ ...e,
3427
+ offset: 0
3428
+ });
3429
+ },
3430
+ className: "inline-flex min-h-6 cursor-pointer items-center gap-1 rounded-(--radius-xs) focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-(--ring)",
3431
+ children: [e.label, t === "asc" ? /* @__PURE__ */ K(zt, {
3432
+ "aria-hidden": "true",
3433
+ className: "size-3"
3434
+ }) : t === "desc" ? /* @__PURE__ */ K(Lt, {
3435
+ "aria-hidden": "true",
3436
+ className: "size-3"
3437
+ }) : /* @__PURE__ */ K(Rt, {
3438
+ "aria-hidden": "true",
3439
+ className: "size-3 opacity-40"
3440
+ })]
3441
+ }) : e.label
3442
+ }, e.key);
3443
+ }), /* @__PURE__ */ K(zl, {})] }) }),
3444
+ /* @__PURE__ */ q("tbody", {
3445
+ ref: se,
3446
+ children: [
3447
+ ae && !ye && re > 0 ? /* @__PURE__ */ K("tr", {
3448
+ "data-virtual-spacer": "top",
3449
+ children: /* @__PURE__ */ K("td", {
3450
+ colSpan: de,
3451
+ className: "h-(--spacer-h) border-none p-0",
3452
+ style: { "--spacer-h": `${re}px` }
3453
+ })
3454
+ }) : null,
3455
+ ye ? /* @__PURE__ */ K("tr", {
3456
+ "data-testid": `${d}-loading-row`,
3457
+ children: /* @__PURE__ */ K("td", {
3458
+ colSpan: de,
3459
+ className: "border-none p-0",
3460
+ children: /* @__PURE__ */ K(le, {
3461
+ label: "Loading rows",
3462
+ minHeight: Il
3463
+ })
3464
+ })
3465
+ }) : ue.map((e, n) => {
3466
+ let r = ne.start + n;
3467
+ return /* @__PURE__ */ q("tr", {
3468
+ ref: ae ? ce(r) : void 0,
3469
+ children: [t.map((t) => {
3470
+ let n = c ? c(e?.[t.key], t, e) : Rl(e?.[t.key]);
3471
+ return /* @__PURE__ */ K("td", {
3472
+ className: t.isNumeric ? "dbn-num" : void 0,
3473
+ children: l ? /* @__PURE__ */ K("button", {
3474
+ type: "button",
3475
+ className: "dbn-v2-table__cell-btn",
3476
+ "data-testid": `${d}-cell`,
3477
+ onClick: (n) => l({
3478
+ row: e,
3479
+ column: t,
3480
+ value: e?.[t.key],
3481
+ rowIndex: r,
3482
+ anchor: n.currentTarget
3483
+ }),
3484
+ children: n
3485
+ }) : n
3486
+ }, t.key);
3487
+ }), /* @__PURE__ */ K(zl, {})]
3488
+ }, r);
3489
+ }),
3490
+ ae && !ye && ie > 0 ? /* @__PURE__ */ K("tr", {
3491
+ "data-virtual-spacer": "bottom",
3492
+ children: /* @__PURE__ */ K("td", {
3493
+ colSpan: de,
3494
+ className: "h-(--spacer-h) border-none p-0",
3495
+ style: { "--spacer-h": `${ie}px` }
3496
+ })
3497
+ }) : null
3498
+ ]
3499
+ })
3500
+ ]
3501
+ }),
3502
+ !r && i ? /* @__PURE__ */ q("div", {
3503
+ role: "alert",
3504
+ "data-testid": `${d}-error`,
3505
+ className: "flex flex-col items-center justify-center gap-3 p-8 text-center",
3506
+ children: [
3507
+ /* @__PURE__ */ K(oe, {
3508
+ "aria-hidden": "true",
3509
+ className: "size-6 text-(--destructive)"
3510
+ }),
3511
+ /* @__PURE__ */ K("span", {
3512
+ className: "text-sm text-(--muted-foreground)",
3513
+ children: i
3514
+ }),
3515
+ a ? /* @__PURE__ */ K("button", {
3516
+ type: "button",
3517
+ ...F(d, "error", "retry"),
3518
+ onClick: a,
3519
+ className: "inline-flex h-6 cursor-pointer items-center rounded-(--radius-sm) border border-(--border) bg-(--muted) px-3 text-xs font-medium text-(--foreground) transition-colors hover:bg-(--accent) focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-(--ring)",
3520
+ children: "Try again"
3521
+ }) : null
3522
+ ]
3523
+ }) : null,
3524
+ !r && !i && N.length === 0 ? /* @__PURE__ */ q("div", {
3525
+ "data-testid": `${d}-empty`,
3526
+ className: "flex flex-col items-center justify-center gap-3 p-8 text-center",
3527
+ children: [/* @__PURE__ */ K("span", {
3472
3528
  className: "text-sm text-(--muted-foreground)",
3473
- children: i
3474
- }),
3475
- a ? /* @__PURE__ */ K("button", {
3529
+ children: w ? "No rows match your search." : o || "No data to show."
3530
+ }), w ? /* @__PURE__ */ K("button", {
3476
3531
  type: "button",
3477
- ...xe(d, "error", "retry"),
3478
- onClick: a,
3532
+ ...F(d, "empty", "clear-search"),
3533
+ onClick: () => E(""),
3479
3534
  className: "inline-flex h-6 cursor-pointer items-center rounded-(--radius-sm) border border-(--border) bg-(--muted) px-3 text-xs font-medium text-(--foreground) transition-colors hover:bg-(--accent) focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-(--ring)",
3480
- children: "Try again"
3481
- }) : null
3482
- ]
3483
- }) : null,
3484
- !r && !i && E.length === 0 ? /* @__PURE__ */ q("div", {
3485
- "data-testid": `${d}-empty`,
3486
- className: "flex flex-col items-center justify-center gap-3 p-8 text-center",
3487
- children: [/* @__PURE__ */ K("span", {
3488
- className: "text-sm text-(--muted-foreground)",
3489
- children: o || "No data to show."
3490
- }), s ? /* @__PURE__ */ K("button", {
3491
- type: "button",
3492
- ...xe(d, "empty", "action"),
3493
- onClick: s.onClick,
3494
- className: "inline-flex h-6 cursor-pointer items-center rounded-(--radius-sm) border border-(--border) bg-(--muted) px-3 text-xs font-medium text-(--foreground) transition-colors hover:bg-(--accent) focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-(--ring)",
3495
- children: s.label
3496
- }) : null]
3497
- }) : null
3498
- ]
3499
- }), pe ? /* @__PURE__ */ K(Vl, {
3500
- qaEntity: d,
3501
- limit: w,
3502
- window: D,
3503
- canPrev: ue && !r,
3504
- canNext: fe && !r,
3505
- onChangePageSize: se,
3506
- onGoToOffset: oe
3507
- }) : null]
3535
+ children: "Clear search"
3536
+ }) : s ? /* @__PURE__ */ K("button", {
3537
+ type: "button",
3538
+ ...F(d, "empty", "action"),
3539
+ onClick: s.onClick,
3540
+ className: "inline-flex h-6 cursor-pointer items-center rounded-(--radius-sm) border border-(--border) bg-(--muted) px-3 text-xs font-medium text-(--foreground) transition-colors hover:bg-(--accent) focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-(--ring)",
3541
+ children: s.label
3542
+ }) : null]
3543
+ }) : null
3544
+ ]
3545
+ }),
3546
+ _e ? /* @__PURE__ */ K(Vl, {
3547
+ qaEntity: d,
3548
+ limit: A,
3549
+ window: P,
3550
+ canPrev: he && !r,
3551
+ canNext: ge && !r,
3552
+ onChangePageSize: pe,
3553
+ onGoToOffset: fe
3554
+ }) : null
3555
+ ]
3508
3556
  });
3509
3557
  }, Vl = ({ qaEntity: e, limit: t, window: n, canPrev: r, canNext: i, onChangePageSize: a, onGoToOffset: o }) => {
3510
- let s = xe(e, "page-size").id, c = "inline-flex size-6 cursor-pointer items-center justify-center rounded-(--radius-xs) text-(--muted-foreground) transition-colors hover:text-(--foreground) focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-(--ring) disabled:pointer-events-none disabled:opacity-40";
3558
+ let s = F(e, "page-size").id, c = "inline-flex size-6 cursor-pointer items-center justify-center rounded-(--radius-xs) text-(--muted-foreground) transition-colors hover:text-(--foreground) focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-(--ring) disabled:pointer-events-none disabled:opacity-40";
3511
3559
  return /* @__PURE__ */ q("nav", {
3512
3560
  "data-testid": `${e}-pagination`,
3513
3561
  "aria-label": "Table pagination",
3514
- className: "flex shrink-0 flex-wrap items-center justify-between gap-3 border-t border-(--border) px-3 py-1.5 text-xs text-(--muted-foreground)",
3562
+ className: "@container/table-pager flex shrink-0 flex-wrap items-center justify-between gap-3 border-t border-(--border) px-3 py-1.5 text-xs whitespace-nowrap text-(--muted-foreground)",
3515
3563
  children: [/* @__PURE__ */ q("div", {
3516
3564
  className: "flex items-center gap-1.5",
3517
3565
  children: [/* @__PURE__ */ K("label", {
3518
3566
  htmlFor: s,
3567
+ className: "@max-xs/table-pager:sr-only",
3519
3568
  children: "Rows per page"
3520
3569
  }), /* @__PURE__ */ q("span", {
3521
3570
  className: "relative inline-flex items-center",
3522
3571
  children: [/* @__PURE__ */ K("select", {
3523
- ...xe(e, "page-size"),
3572
+ ...F(e, "page-size"),
3524
3573
  value: t,
3525
3574
  onChange: (e) => a(Number(e.target.value)),
3526
3575
  className: "h-6 cursor-pointer appearance-none rounded-(--radius-sm) border border-(--border) bg-(--muted) pr-5 pl-1.5 text-xs text-(--foreground) transition-colors focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-(--ring)",
@@ -3538,7 +3587,7 @@ var Pl = ({ rows: e, columns: t, paging: n, isLoading: r = !1, error: i = null,
3538
3587
  "aria-atomic": "true",
3539
3588
  className: "flex items-center gap-2",
3540
3589
  children: [/* @__PURE__ */ q("span", {
3541
- className: "tabular-nums",
3590
+ className: "tabular-nums @max-xs/table-pager:hidden",
3542
3591
  children: [
3543
3592
  n.from.toLocaleString(),
3544
3593
  "-",
@@ -3552,11 +3601,11 @@ var Pl = ({ rows: e, columns: t, paging: n, isLoading: r = !1, error: i = null,
3552
3601
  children: [
3553
3602
  /* @__PURE__ */ K("button", {
3554
3603
  type: "button",
3555
- ...xe(e, "pagination", "first"),
3604
+ ...F(e, "pagination", "first"),
3556
3605
  "aria-label": "First page",
3557
3606
  disabled: !r,
3558
3607
  onClick: () => o(0),
3559
- className: c,
3608
+ className: R(c, "@max-xs/table-pager:hidden"),
3560
3609
  children: /* @__PURE__ */ K(Ht, {
3561
3610
  "aria-hidden": "true",
3562
3611
  className: "size-3.5"
@@ -3564,7 +3613,7 @@ var Pl = ({ rows: e, columns: t, paging: n, isLoading: r = !1, error: i = null,
3564
3613
  }),
3565
3614
  /* @__PURE__ */ K("button", {
3566
3615
  type: "button",
3567
- ...xe(e, "pagination", "prev"),
3616
+ ...F(e, "pagination", "prev"),
3568
3617
  "aria-label": "Previous page",
3569
3618
  disabled: !r,
3570
3619
  onClick: () => o(Math.max(0, (n.pageIndex - 1) * t)),
@@ -3584,7 +3633,7 @@ var Pl = ({ rows: e, columns: t, paging: n, isLoading: r = !1, error: i = null,
3584
3633
  }),
3585
3634
  /* @__PURE__ */ K("button", {
3586
3635
  type: "button",
3587
- ...xe(e, "pagination", "next"),
3636
+ ...F(e, "pagination", "next"),
3588
3637
  "aria-label": "Next page",
3589
3638
  disabled: !i,
3590
3639
  onClick: () => o((n.pageIndex + 1) * t),
@@ -3596,11 +3645,11 @@ var Pl = ({ rows: e, columns: t, paging: n, isLoading: r = !1, error: i = null,
3596
3645
  }),
3597
3646
  /* @__PURE__ */ K("button", {
3598
3647
  type: "button",
3599
- ...xe(e, "pagination", "last"),
3648
+ ...F(e, "pagination", "last"),
3600
3649
  "aria-label": "Last page",
3601
3650
  disabled: !i,
3602
3651
  onClick: () => o((n.pageCount - 1) * t),
3603
- className: c,
3652
+ className: R(c, "@max-xs/table-pager:hidden"),
3604
3653
  children: /* @__PURE__ */ K(Ut, {
3605
3654
  "aria-hidden": "true",
3606
3655
  className: "size-3.5"
@@ -3715,7 +3764,7 @@ function Zl({ keys: e, rows: t = [], selectedDims: n = [], selectedMetrics: r =
3715
3764
  isDerived: !0
3716
3765
  };
3717
3766
  }
3718
- let r = Yl(n), a = le(n.datatype), s = r ? "number" : a === "number" || a === "date" || a === "boolean" ? a : Xl(t, e), c = n.label?.trim() || n.alias?.trim() || n.name?.trim() || ql(e);
3767
+ let r = Yl(n), a = se(n.datatype), s = r ? "number" : a === "number" || a === "date" || a === "boolean" ? a : Xl(t, e), c = n.label?.trim() || n.alias?.trim() || n.name?.trim() || ql(e);
3719
3768
  return {
3720
3769
  key: e,
3721
3770
  label: c,
@@ -3764,13 +3813,13 @@ var eu = 300, tu = ({ open: e, onOpenChange: t, columns: n, rows: r, onDownload:
3764
3813
  downloadLabel: l
3765
3814
  }), nu = ({ hasActiveFilters: e, open: t, onOpenChange: n, columns: r, rows: i, onDownload: a, title: o, description: s, downloadLabel: c }) => {
3766
3815
  let l = !i?.length;
3767
- return /* @__PURE__ */ K(be, {
3816
+ return /* @__PURE__ */ K(ve, {
3768
3817
  open: t,
3769
3818
  onOpenChange: n,
3770
- children: /* @__PURE__ */ q(ve, {
3819
+ children: /* @__PURE__ */ q(ge, {
3771
3820
  className: "flex max-h-4/5 w-full flex-col sm:max-w-180",
3772
3821
  children: [
3773
- /* @__PURE__ */ q(ge, { children: [/* @__PURE__ */ K(N, { children: o }), s == null ? null : /* @__PURE__ */ K(Se, { children: s })] }),
3822
+ /* @__PURE__ */ q(me, { children: [/* @__PURE__ */ K(ye, { children: o }), s == null ? null : /* @__PURE__ */ K(be, { children: s })] }),
3774
3823
  /* @__PURE__ */ K("div", {
3775
3824
  className: "min-h-0 flex-1",
3776
3825
  children: l ? /* @__PURE__ */ K(Nc, { hasActiveFilters: e }) : /* @__PURE__ */ K(Pl, {
@@ -3778,7 +3827,7 @@ var eu = 300, tu = ({ open: e, onOpenChange: t, columns: n, rows: r, onDownload:
3778
3827
  columns: r
3779
3828
  })
3780
3829
  }),
3781
- a != null && !l ? /* @__PURE__ */ K(he, { children: /* @__PURE__ */ K(me, {
3830
+ a != null && !l ? /* @__PURE__ */ K(pe, { children: /* @__PURE__ */ K(fe, {
3782
3831
  onClick: a,
3783
3832
  children: c
3784
3833
  }) }) : null
@@ -3805,121 +3854,121 @@ var eu = 300, tu = ({ open: e, onOpenChange: t, columns: n, rows: r, onDownload:
3805
3854
  i,
3806
3855
  f,
3807
3856
  p
3808
- ]), ee = z.useMemo(() => T.map((e) => ({
3857
+ ]), E = z.useMemo(() => T.map((e) => ({
3809
3858
  key: e.key,
3810
3859
  label: e.label,
3811
3860
  isNumeric: e.kind === "number" || e.kind === "identifier"
3812
- })), [T]), te = z.useMemo(() => new Map(T.map((e) => [e.key, e])), [T]), E = z.useCallback((e, t) => {
3813
- let n = te.get(t.key);
3861
+ })), [T]), D = z.useMemo(() => new Map(T.map((e) => [e.key, e])), [T]), O = z.useCallback((e, t) => {
3862
+ let n = D.get(t.key);
3814
3863
  return n ? $l(e, n, m) : String(e ?? "");
3815
- }, [te, m]), D = !!h, O = !D || h.canSearch !== !1, k = w, ne = h?.onRequestPage, A = z.useRef(ne);
3864
+ }, [D, m]), k = !!h, A = !k || h.canSearch !== !1, j = w, ee = h?.onRequestPage, M = z.useRef(ee);
3816
3865
  z.useEffect(() => {
3817
- A.current = ne;
3818
- }, [ne]);
3819
- let j = h?.limit ?? 100, M = h?.offset ?? 0, re = z.useRef(null);
3866
+ M.current = ee;
3867
+ }, [ee]);
3868
+ let N = h?.limit ?? 100, P = h?.offset ?? 0, te = z.useRef(null);
3820
3869
  z.useEffect(() => {
3821
- if (!t || !D) {
3822
- re.current = null;
3870
+ if (!t || !k) {
3871
+ te.current = null;
3823
3872
  return;
3824
3873
  }
3825
- let e = O && S ? S : void 0, n = JSON.stringify({
3826
- limit: j,
3827
- offset: M,
3874
+ let e = A && S ? S : void 0, n = JSON.stringify({
3875
+ limit: N,
3876
+ offset: P,
3828
3877
  effectiveSearch: e
3829
3878
  });
3830
- re.current !== n && (re.current = n, A.current?.({
3831
- limit: j,
3832
- offset: M,
3879
+ te.current !== n && (te.current = n, M.current?.({
3880
+ limit: N,
3881
+ offset: P,
3833
3882
  search: e,
3834
- searchColumns: e ? k : void 0
3883
+ searchColumns: e ? j : void 0
3835
3884
  }));
3836
3885
  }, [
3837
3886
  t,
3838
- D,
3839
- j,
3840
- M,
3887
+ k,
3888
+ N,
3889
+ P,
3841
3890
  S,
3842
- O,
3843
- k
3891
+ A,
3892
+ j
3844
3893
  ]);
3845
- let ie = z.useRef(S);
3894
+ let ne = z.useRef(S);
3846
3895
  z.useEffect(() => {
3847
- let e = ie.current !== S;
3848
- ie.current = S, e && D && t && M !== 0 && A.current?.({
3849
- limit: j,
3896
+ let e = ne.current !== S;
3897
+ ne.current = S, e && k && t && P !== 0 && M.current?.({
3898
+ limit: N,
3850
3899
  offset: 0,
3851
- search: O && S ? S : void 0,
3852
- searchColumns: O && S ? k : void 0
3900
+ search: A && S ? S : void 0,
3901
+ searchColumns: A && S ? j : void 0
3853
3902
  });
3854
3903
  }, [
3855
- O,
3856
- D,
3857
- j,
3858
- M,
3904
+ A,
3905
+ k,
3906
+ N,
3907
+ P,
3859
3908
  t,
3860
3909
  S,
3861
- k
3910
+ j
3862
3911
  ]);
3863
- let ae = z.useMemo(() => {
3864
- if (D || !S) return i;
3912
+ let re = z.useMemo(() => {
3913
+ if (k || !S) return i;
3865
3914
  let e = S.toLowerCase();
3866
3915
  return (i ?? []).filter((t) => w.some((n) => String(t?.[n] ?? "").toLowerCase().includes(e)));
3867
3916
  }, [
3868
- D,
3917
+ k,
3869
3918
  i,
3870
3919
  S,
3871
3920
  w
3872
- ]), oe = D ? i : ae, se = D ? {
3921
+ ]), ie = k ? i : re, ae = k ? {
3873
3922
  mode: "server",
3874
- limit: j,
3875
- offset: M,
3923
+ limit: N,
3924
+ offset: P,
3876
3925
  totalRows: h.totalRows,
3877
3926
  onChangePage: (e, t, n) => {
3878
- let r = t ?? j, i = t === void 0 ? n ?? M : 0;
3927
+ let r = t ?? N, i = t === void 0 ? n ?? P : 0;
3879
3928
  h.onRequestPage({
3880
3929
  limit: r,
3881
3930
  offset: i,
3882
- search: O && S ? S : void 0,
3883
- searchColumns: O && S ? k : void 0
3931
+ search: A && S ? S : void 0,
3932
+ searchColumns: A && S ? j : void 0
3884
3933
  });
3885
3934
  }
3886
3935
  } : {
3887
3936
  mode: "client",
3888
3937
  pageSize: 100
3889
- }, ce = bl({
3890
- total: D ? h.totalRows : oe.length,
3891
- limit: j,
3892
- offset: D ? M : 0,
3893
- renderedRowCount: oe.length
3894
- }), le = z.useMemo(() => {
3938
+ }, oe = bl({
3939
+ total: k ? h.totalRows : ie.length,
3940
+ limit: N,
3941
+ offset: k ? P : 0,
3942
+ renderedRowCount: ie.length
3943
+ }), se = z.useMemo(() => {
3895
3944
  if (y) return y;
3896
- if (D) return () => h.onRequestPage({
3897
- limit: j,
3898
- offset: M,
3899
- search: O && S ? S : void 0,
3900
- searchColumns: O && S ? k : void 0
3945
+ if (k) return () => h.onRequestPage({
3946
+ limit: N,
3947
+ offset: P,
3948
+ search: A && S ? S : void 0,
3949
+ searchColumns: A && S ? j : void 0
3901
3950
  });
3902
3951
  }, [
3903
3952
  y,
3904
- D,
3953
+ k,
3905
3954
  h,
3906
- j,
3907
- M,
3908
- O,
3955
+ N,
3956
+ P,
3957
+ A,
3909
3958
  S,
3910
- k
3911
- ]), ue = !!S, de = !_ && !v && oe.length === 0, fe = ue ? `No rows match “${S}”.` : "There are no rows behind this value.", _e = ue ? {
3959
+ j
3960
+ ]), ce = !!S, le = !_ && !v && ie.length === 0, ue = ce ? `No rows match “${S}”.` : "There are no rows behind this value.", he = ce ? {
3912
3961
  label: "Clear search",
3913
3962
  onClick: () => x("")
3914
- } : void 0, ye = de && !ue && !D, xe = a != null && oe.length > 0, P = D && ce.total > oe.length, F = o != null && P, we = !!s?.isRunning, Te = P ? `Download this page (${oe.length.toLocaleString()} rows)` : u;
3915
- return /* @__PURE__ */ K(be, {
3963
+ } : void 0, _e = le && !ce && !k, F = a != null && ie.length > 0, xe = k && oe.total > ie.length, Ce = o != null && xe, I = !!s?.isRunning, we = xe ? `Download this page (${ie.length.toLocaleString()} rows)` : u;
3964
+ return /* @__PURE__ */ K(ve, {
3916
3965
  open: t,
3917
3966
  onOpenChange: n,
3918
- children: /* @__PURE__ */ q(ve, {
3967
+ children: /* @__PURE__ */ q(ge, {
3919
3968
  "data-testid": "underlying-data-dialog",
3920
3969
  className: "flex h-4/5 max-h-4/5 w-full flex-col sm:max-w-260",
3921
3970
  children: [
3922
- /* @__PURE__ */ q(ge, { children: [/* @__PURE__ */ K(N, { children: c }), l == null ? null : /* @__PURE__ */ K(Se, { children: l })] }),
3971
+ /* @__PURE__ */ q(me, { children: [/* @__PURE__ */ K(ye, { children: c }), l == null ? null : /* @__PURE__ */ K(be, { children: l })] }),
3923
3972
  g?.length ? /* @__PURE__ */ q("div", {
3924
3973
  className: "flex shrink-0 flex-wrap items-center gap-1.5 text-xs text-(--muted-foreground)",
3925
3974
  "data-testid": "underlying-data-scope",
@@ -3934,14 +3983,14 @@ var eu = 300, tu = ({ open: e, onOpenChange: t, columns: n, rows: r, onDownload:
3934
3983
  })]
3935
3984
  })] }, `${e.label}-${e.value}`))]
3936
3985
  }) : null,
3937
- O && !ye ? /* @__PURE__ */ q("div", {
3986
+ A && !_e ? /* @__PURE__ */ q("div", {
3938
3987
  className: "relative shrink-0",
3939
3988
  children: [
3940
- /* @__PURE__ */ K(Ce, {
3989
+ /* @__PURE__ */ K(Se, {
3941
3990
  "aria-hidden": "true",
3942
3991
  className: "pointer-events-none absolute top-1/2 left-2.5 size-3.5 -translate-y-1/2 text-(--muted-foreground)"
3943
3992
  }),
3944
- /* @__PURE__ */ K(pe, {
3993
+ /* @__PURE__ */ K(de, {
3945
3994
  type: "search",
3946
3995
  value: b,
3947
3996
  onChange: (e) => x(e.target.value),
@@ -3950,7 +3999,7 @@ var eu = 300, tu = ({ open: e, onOpenChange: t, columns: n, rows: r, onDownload:
3950
3999
  "data-testid": "underlying-data-search",
3951
4000
  className: "h-8 pr-8 pl-8 text-sm"
3952
4001
  }),
3953
- b ? /* @__PURE__ */ K(me, {
4002
+ b ? /* @__PURE__ */ K(fe, {
3954
4003
  type: "button",
3955
4004
  variant: "ghost",
3956
4005
  size: "icon-xs",
@@ -3964,56 +4013,56 @@ var eu = 300, tu = ({ open: e, onOpenChange: t, columns: n, rows: r, onDownload:
3964
4013
  }) : null,
3965
4014
  /* @__PURE__ */ K("div", {
3966
4015
  className: "flex min-h-0 flex-1 flex-col",
3967
- children: ye ? /* @__PURE__ */ K(Nc, {
4016
+ children: _e ? /* @__PURE__ */ K(Nc, {
3968
4017
  className: "flex-1",
3969
- message: fe,
4018
+ message: ue,
3970
4019
  hasActiveFilters: e
3971
4020
  }) : /* @__PURE__ */ K(Pl, {
3972
- rows: oe,
3973
- columns: ee,
3974
- paging: se,
4021
+ rows: ie,
4022
+ columns: E,
4023
+ paging: ae,
3975
4024
  isLoading: _,
3976
4025
  error: v,
3977
- onRetry: le,
3978
- emptyMessage: fe,
3979
- emptyAction: _e,
3980
- renderCell: E,
4026
+ onRetry: se,
4027
+ emptyMessage: ue,
4028
+ emptyAction: he,
4029
+ renderCell: O,
3981
4030
  ariaLabel: typeof c == "string" ? c : "Underlying data",
3982
4031
  qaEntity: "underlying-data-table",
3983
4032
  className: "min-h-0 flex-1"
3984
4033
  })
3985
4034
  }),
3986
- xe ? /* @__PURE__ */ q(he, {
4035
+ F ? /* @__PURE__ */ q(pe, {
3987
4036
  className: "items-center sm:justify-between",
3988
4037
  children: [/* @__PURE__ */ K("span", {
3989
4038
  "data-testid": "underlying-data-download-scope",
3990
4039
  className: "text-xs text-(--muted-foreground)",
3991
4040
  "aria-live": "polite",
3992
- children: we ? `Preparing ${(s?.fetchedRows ?? 0).toLocaleString()} of ${ce.total.toLocaleString()} rows...` : P ? `Showing ${oe.length.toLocaleString()} of ${ce.total.toLocaleString()} rows` : `Downloads all ${ce.total.toLocaleString()} rows`
4041
+ children: I ? `Preparing ${(s?.fetchedRows ?? 0).toLocaleString()} of ${oe.total.toLocaleString()} rows...` : xe ? `Showing ${ie.length.toLocaleString()} of ${oe.total.toLocaleString()} rows` : `Downloads all ${oe.total.toLocaleString()} rows`
3993
4042
  }), /* @__PURE__ */ q("div", {
3994
4043
  className: "flex items-center gap-2",
3995
- children: [/* @__PURE__ */ K(me, {
3996
- variant: F ? "outline" : "default",
4044
+ children: [/* @__PURE__ */ K(fe, {
4045
+ variant: Ce ? "outline" : "default",
3997
4046
  "data-testid": "underlying-data-download-page",
3998
- disabled: we,
4047
+ disabled: I,
3999
4048
  onClick: a,
4000
- children: Te
4001
- }), F ? /* @__PURE__ */ K(me, {
4049
+ children: we
4050
+ }), Ce ? /* @__PURE__ */ K(fe, {
4002
4051
  "data-testid": "underlying-data-download-all",
4003
- disabled: we,
4052
+ disabled: I,
4004
4053
  onClick: () => o?.({
4005
- search: O && S ? S : void 0,
4006
- searchColumns: O && S ? k : void 0,
4007
- total: ce.total
4054
+ search: A && S ? S : void 0,
4055
+ searchColumns: A && S ? j : void 0,
4056
+ total: oe.total
4008
4057
  }),
4009
- children: we ? "Preparing..." : `Download all ${ce.total.toLocaleString()} rows`
4058
+ children: I ? "Preparing..." : `Download all ${oe.total.toLocaleString()} rows`
4010
4059
  }) : null]
4011
4060
  })]
4012
4061
  }) : null
4013
4062
  ]
4014
4063
  })
4015
4064
  });
4016
- }, iu = z.lazy(async () => ({ default: (await import("./charts-BzunXCJW.mjs").then((e) => e.t)).DbnChart })), au = z.lazy(async () => ({ default: (await import("./Chart-2_umaljI.mjs").then((e) => e.n)).Chart })), ou = Object.freeze({
4065
+ }, iu = z.lazy(async () => ({ default: (await import("./charts-BzunXCJW.mjs").then((e) => e.t)).DbnChart })), au = z.lazy(async () => ({ default: (await import("./Chart-BcmkjXMD.mjs").then((e) => e.n)).Chart })), ou = Object.freeze({
4017
4066
  isLoading: !1,
4018
4067
  error: "",
4019
4068
  data: [],
@@ -4072,28 +4121,28 @@ var eu = 300, tu = ({ open: e, onOpenChange: t, columns: n, rows: r, onDownload:
4072
4121
  function gu(e) {
4073
4122
  if (e != null) return typeof e == "number" ? `${e}px` : e;
4074
4123
  }
4075
- var _u = ({ metric: e, chartSettings: t, data: n, isLoading: r, drillBreadcrumb: a, terminalNotice: o, chartColors: f, chartRendererType: p, chartAppearance: m, chartColumns: h, tablePaging: g, onTableCellClick: v, onOpenSection: S, openSectionLabel: j, isTableRefreshing: M, height: ae, width: oe, onEvents: ce, onChartReady: le, enableCoverageTruncation: de, chartTasteCapability: fe, canOpenDataPointMenu: pe, emptyState: he, hasActiveFilters: ge, className: _e, reduction: ve, reductionRowsIn: ye, serverTruncation: be }) => {
4076
- let N = hu.has(t?.chartType), xe = f ?? t?.chartColors, Se = ie(fe), P = u(), Ce = P && lu(t) && de !== !1, F = z.useMemo(() => N ? null : rl(t, n, Ce, e, be), [
4077
- N,
4124
+ var _u = ({ metric: e, chartSettings: t, data: n, isLoading: r, drillBreadcrumb: a, terminalNotice: o, chartColors: f, chartRendererType: p, chartAppearance: m, chartColumns: h, tablePaging: g, tableSearch: v, onTableCellClick: O, onOpenSection: N, openSectionLabel: P, isTableRefreshing: re, height: ie, width: oe, onEvents: se, onChartReady: le, enableCoverageTruncation: ue, chartTasteCapability: de, canOpenDataPointMenu: pe, emptyState: me, hasActiveFilters: he, className: ge, reduction: _e, reductionRowsIn: ve, serverTruncation: ye }) => {
4125
+ let F = hu.has(t?.chartType), be = f ?? t?.chartColors, xe = ne(de), Se = u(), Ce = Se && lu(t) && ue !== !1, I = z.useMemo(() => F ? null : rl(t, n, Ce, e, ye), [
4126
+ F,
4078
4127
  t,
4079
4128
  n,
4080
4129
  Ce,
4081
4130
  e,
4082
- be
4083
- ]), we = z.useMemo(() => F?.summary ? il(F.summary, t, e) : null, [
4084
- F?.summary,
4131
+ ye
4132
+ ]), we = z.useMemo(() => I?.summary ? il(I.summary, t, e) : null, [
4133
+ I?.summary,
4085
4134
  t,
4086
4135
  e
4087
- ]), Te = z.useMemo(() => we ?? se(F?.truncated ?? null), [we, F?.truncated]), I = z.useMemo(() => Vc({
4136
+ ]), Te = z.useMemo(() => we ?? ae(I?.truncated ?? null), [we, I?.truncated]), Ee = z.useMemo(() => Vc({
4088
4137
  truncationFootnote: Te,
4089
- reduction: ve,
4090
- rowsIn: ye
4138
+ reduction: _e,
4139
+ rowsIn: ve
4091
4140
  }), [
4092
4141
  Te,
4093
- ve,
4094
- ye
4095
- ]), Ee = z.useMemo(() => {
4096
- if (I || !qc()) return;
4142
+ _e,
4143
+ ve
4144
+ ]), L = z.useMemo(() => {
4145
+ if (Ee || !qc()) return;
4097
4146
  let e = t?.chartType;
4098
4147
  if (e && n?.length) try {
4099
4148
  let t = d(n);
@@ -4102,155 +4151,155 @@ var _u = ({ metric: e, chartSettings: t, data: n, isLoading: r, drillBreadcrumb:
4102
4151
  return;
4103
4152
  }
4104
4153
  }, [
4105
- I,
4154
+ Ee,
4106
4155
  t?.chartType,
4107
4156
  n
4108
- ]), L = z.useMemo(() => {
4109
- if (!P) return null;
4157
+ ]), De = z.useMemo(() => {
4158
+ if (!Se) return null;
4110
4159
  let e = t?.chartType;
4111
4160
  if (!e || !n?.length) return null;
4112
4161
  try {
4113
4162
  let r = b[e] ?? b[s(e)] ?? e, i = l[s(r)];
4114
4163
  if (!i) return null;
4115
- let a = i.checkRenderable(y(n), E(t, n));
4164
+ let a = i.checkRenderable(y(n), T(t, n));
4116
4165
  return a.ok ? null : a;
4117
4166
  } catch {
4118
4167
  return null;
4119
4168
  }
4120
4169
  }, [
4121
- P,
4170
+ Se,
4122
4171
  t,
4123
4172
  n
4124
- ]), De = F?.rows ?? n, Oe = ie(fe), ke = T(null), Ae = z.useMemo(() => !ke || N ? null : D({
4125
- mapping: ne(t, De),
4173
+ ]), Oe = I?.rows ?? n, ke = ne(de), Ae = C(null), je = z.useMemo(() => !Ae || F ? null : k({
4174
+ mapping: x(t, Oe),
4126
4175
  chartOptions: t,
4127
- rows: De,
4128
- enabled: Oe
4176
+ rows: Oe,
4177
+ enabled: ke
4129
4178
  }), [
4130
- ke,
4131
- N,
4179
+ Ae,
4180
+ F,
4132
4181
  t,
4133
- De,
4134
- Oe
4135
- ]), je = F?.summary?.bucketLabel, [Me, Ne] = z.useState(null), Pe = z.useMemo(() => Me === "collapsed" ? F?.collapsedRows ?? [] : n, [
4182
+ Oe,
4183
+ ke
4184
+ ]), Me = I?.summary?.bucketLabel, [Ne, Pe] = z.useState(null), Fe = z.useMemo(() => Ne === "collapsed" ? I?.collapsedRows ?? [] : n, [
4136
4185
  n,
4137
- F?.collapsedRows,
4138
- Me
4139
- ]), Fe = z.useMemo(() => vu(h, Pe, !0), [h, Pe]), Ie = ue(), Le = z.useRef(null), Re = z.useRef(le);
4186
+ I?.collapsedRows,
4187
+ Ne
4188
+ ]), Ie = z.useMemo(() => vu(h, Fe, !0), [h, Fe]), Le = ce(), Re = z.useRef(null), ze = z.useRef(le);
4140
4189
  z.useLayoutEffect(() => {
4141
- Re.current = le;
4190
+ ze.current = le;
4142
4191
  }, [le]);
4143
- let ze = z.useCallback((e, t) => {
4144
- t && Le.current !== t && (Le.current = t, Re.current?.(t));
4145
- }, []), Be = z.useMemo(() => {
4192
+ let Be = z.useCallback((e, t) => {
4193
+ t && Re.current !== t && (Re.current = t, ze.current?.(t));
4194
+ }, []), Ve = z.useMemo(() => {
4146
4195
  let t = !!le, n = (e) => {
4147
4196
  if (!t) return e;
4148
4197
  let n = e?.finished;
4149
4198
  return {
4150
4199
  ...e ?? {},
4151
4200
  finished: (...e) => {
4152
- n?.(...e), ze(e[0], e[1]);
4201
+ n?.(...e), Be(e[0], e[1]);
4153
4202
  }
4154
4203
  };
4155
4204
  };
4156
- if (!je && !Ie) return n(ce);
4157
- let { click: r, ...i } = ce ?? {};
4205
+ if (!Me && !Le) return n(se);
4206
+ let { click: r, ...i } = se ?? {};
4158
4207
  return n({
4159
4208
  ...i,
4160
4209
  click: (t, ...n) => {
4161
- if (je && t?.name === je) {
4162
- Ne("collapsed");
4210
+ if (Me && t?.name === Me) {
4211
+ Pe("collapsed");
4163
4212
  return;
4164
4213
  }
4165
- Ie?.(e, {
4214
+ Le?.(e, {
4166
4215
  params: t,
4167
4216
  rowFilters: Array.isArray(t?.rowFilters) ? t.rowFilters : void 0
4168
4217
  }) || r?.(t, ...n);
4169
4218
  }
4170
4219
  });
4171
4220
  }, [
4172
- ce,
4173
- je,
4221
+ se,
4222
+ Me,
4174
4223
  e,
4175
- Ie,
4224
+ Le,
4176
4225
  le,
4177
- ze
4178
- ]), Ve = z.useMemo(() => cl(C(m, {
4179
- ...te(t?.customSettings),
4226
+ Be
4227
+ ]), He = z.useMemo(() => cl(w(m, {
4228
+ ...D(t?.customSettings),
4180
4229
  tooltipSettings: t?.tooltipSettings,
4181
- categoryField: Ae?.type === "gaugeV2" ? null : t?.xAxis,
4230
+ categoryField: je?.type === "gaugeV2" ? null : t?.xAxis,
4182
4231
  chartZoom: t?.customSettings?.chartZoom,
4183
4232
  percentageSize: t?.percentageSize,
4184
4233
  repulsion: t?.customSettings?.repulsion,
4185
4234
  isUseAsDifference: t?.waterfallSettings?.isUseAsDifference,
4186
4235
  hideNullValues: t?.customSettings?.hideNullValues
4187
- }), Se, !!pe || Se), [
4236
+ }), xe, !!pe || xe), [
4188
4237
  m,
4189
4238
  t,
4190
- Ae?.type,
4191
- Se,
4239
+ je?.type,
4240
+ xe,
4192
4241
  pe
4193
- ]), He = z.useMemo(() => k(Ve, ee(Ae?.data ?? {}, Oe)), [
4194
- Ve,
4195
- Ae?.data,
4196
- Oe
4197
- ]), Ue = z.useMemo(() => N ? void 0 : O(t), [N, t]), We = z.useMemo(() => A(O(t), "precise"), [t]), Ge = z.useMemo(() => t?.chartType === c.horizontalStackTable ? (t?.stackTableCols ?? []).filter(Boolean) : [], [t?.chartType, t?.stackTableCols]), Ke = z.useMemo(() => {
4198
- if (!Ge.length) return 0;
4242
+ ]), Ue = z.useMemo(() => j(He, E(je?.data ?? {}, ke)), [
4243
+ He,
4244
+ je?.data,
4245
+ ke
4246
+ ]), We = z.useMemo(() => F ? void 0 : A(t), [F, t]), Ge = z.useMemo(() => M(A(t), "precise"), [t]), Ke = z.useMemo(() => t?.chartType === c.horizontalStackTable ? (t?.stackTableCols ?? []).filter(Boolean) : [], [t?.chartType, t?.stackTableCols]), qe = z.useMemo(() => {
4247
+ if (!Ke.length) return 0;
4199
4248
  let e = 0;
4200
- for (let t of n ?? []) e = Math.max(e, fu(t, Ge));
4249
+ for (let t of n ?? []) e = Math.max(e, fu(t, Ke));
4201
4250
  return e;
4202
- }, [n, Ge]), qe = z.useCallback((e) => Ge.length ? [...e.filter((e) => !Ge.includes(e.key)), {
4251
+ }, [n, Ke]), Je = z.useCallback((e) => Ke.length ? [...e.filter((e) => !Ke.includes(e.key)), {
4203
4252
  key: uu,
4204
4253
  label: t?.tableSettings?.stackColAlias || ""
4205
- }] : e, [Ge, t?.tableSettings?.stackColAlias]), Je = z.useCallback((e, t, n) => t.key === uu && Ge.length ? /* @__PURE__ */ K(mu, {
4254
+ }] : e, [Ke, t?.tableSettings?.stackColAlias]), Ye = z.useCallback((e, t, n) => t.key === uu && Ke.length ? /* @__PURE__ */ K(mu, {
4206
4255
  row: n ?? {},
4207
- cols: Ge,
4208
- max: Ke,
4209
- format: (e, t) => We(e, t)
4210
- }) : typeof e == "number" && Number.isFinite(e) ? We(e, t.key) : wl(e) ? /* @__PURE__ */ K(Ll, {}) : String(e), [
4211
- We,
4256
+ cols: Ke,
4257
+ max: qe,
4258
+ format: (e, t) => Ge(e, t)
4259
+ }) : typeof e == "number" && Number.isFinite(e) ? Ge(e, t.key) : wl(e) ? /* @__PURE__ */ K(Ll, {}) : String(e), [
4212
4260
  Ge,
4213
- Ke
4214
- ]), [Ye, Xe] = z.useState(null), Ze = zc(Ye), Qe = z.useMemo(() => Qc(t, Ze?.surface, Ze?.backdrop), [
4261
+ Ke,
4262
+ qe
4263
+ ]), [Xe, Ze] = z.useState(null), Qe = zc(Xe), $e = z.useMemo(() => Qc(t, Qe?.surface, Qe?.backdrop), [
4215
4264
  t,
4216
- Ze?.surface,
4217
- Ze?.backdrop
4218
- ]), $e = z.useMemo(() => P && !N && !Ae ? Xc(t, n) : null, [
4219
- P,
4220
- N,
4221
- Ae,
4265
+ Qe?.surface,
4266
+ Qe?.backdrop
4267
+ ]), et = z.useMemo(() => Se && !F && !je ? Xc(t, n) : null, [
4268
+ Se,
4269
+ F,
4270
+ je,
4222
4271
  t,
4223
4272
  n
4224
- ]), et = z.useMemo(() => N || $e ? null : x(t, n), [
4225
- N,
4226
- $e,
4273
+ ]), tt = z.useMemo(() => F || et ? null : S(t, n), [
4274
+ F,
4275
+ et,
4227
4276
  t,
4228
4277
  n
4229
- ]), tt = z.useMemo(() => w(t, n ?? []), [t, n]), nt = z.useMemo(() => {
4230
- let e = re(n, tt);
4278
+ ]), nt = z.useMemo(() => ee(t, n ?? []), [t, n]), rt = z.useMemo(() => {
4279
+ let e = te(n, nt);
4231
4280
  if (!e?.length) return !0;
4232
- if (N) return !1;
4281
+ if (F) return !1;
4233
4282
  let t = [
4234
- ...tt.yAxisList ?? [],
4235
- tt.progressColumn,
4236
- tt.singleValue
4283
+ ...nt.yAxisList ?? [],
4284
+ nt.progressColumn,
4285
+ nt.singleValue
4237
4286
  ].filter((e) => !!e);
4238
4287
  return t.length ? !e.some((e) => t.some((t) => e?.[t] !== null && e?.[t] !== void 0)) : !1;
4239
4288
  }, [
4240
4289
  n,
4241
- N,
4242
- tt
4243
- ]), rt = {
4244
- "--slot-h": gu(ae),
4290
+ F,
4291
+ nt
4292
+ ]), it = {
4293
+ "--slot-h": gu(ie),
4245
4294
  "--slot-w": gu(oe)
4246
4295
  };
4247
4296
  return /* @__PURE__ */ q("div", {
4248
4297
  "data-slot": "metric-card-chart",
4249
4298
  "data-testid": "metric-card-chart-slot",
4250
- "data-chart-engine": Ae ? "v2" : void 0,
4299
+ "data-chart-engine": je ? "v2" : void 0,
4251
4300
  "data-chart-renderer": p,
4252
- className: R("flex h-(--slot-h,auto) w-(--slot-w,100%) min-h-0 flex-1 flex-col gap-2", _e),
4253
- style: rt,
4301
+ className: R("flex h-(--slot-h,auto) w-(--slot-w,100%) min-h-0 flex-1 flex-col gap-2", ge),
4302
+ style: it,
4254
4303
  children: [
4255
4304
  a != null || o != null ? /* @__PURE__ */ q("div", {
4256
4305
  "data-testid": "metric-card-drill-breadcrumb",
@@ -4259,69 +4308,70 @@ var _u = ({ metric: e, chartSettings: t, data: n, isLoading: r, drillBreadcrumb:
4259
4308
  }) : null,
4260
4309
  r ? /* @__PURE__ */ K(Tc, { className: "flex-1" }) : /* @__PURE__ */ q(Nt, { children: [/* @__PURE__ */ K("div", {
4261
4310
  className: "min-h-0 w-full flex-1",
4262
- children: $e ? /* @__PURE__ */ K(jc, {
4311
+ children: et ? /* @__PURE__ */ K(jc, {
4263
4312
  className: "h-full",
4264
- reason: $e,
4313
+ reason: et,
4265
4314
  section: "configure",
4266
- onOpenSection: S,
4267
- actionLabel: j
4268
- }) : et ? /* @__PURE__ */ K(jc, {
4315
+ onOpenSection: N,
4316
+ actionLabel: P
4317
+ }) : tt ? /* @__PURE__ */ K(jc, {
4269
4318
  className: "h-full",
4270
- reason: et,
4319
+ reason: tt,
4271
4320
  section: "configure",
4272
- onOpenSection: S,
4273
- actionLabel: j
4274
- }) : he != null && nt ? he : L && Ae ? /* @__PURE__ */ K(jc, {
4321
+ onOpenSection: N,
4322
+ actionLabel: P
4323
+ }) : me != null && rt ? me : De && je ? /* @__PURE__ */ K(jc, {
4275
4324
  className: "h-full",
4276
- reason: L.reason,
4277
- section: L.section,
4278
- onOpenSection: S,
4279
- actionLabel: j
4280
- }) : N ? /* @__PURE__ */ K(Pl, {
4325
+ reason: De.reason,
4326
+ section: De.section,
4327
+ onOpenSection: N,
4328
+ actionLabel: P
4329
+ }) : F ? /* @__PURE__ */ K(Pl, {
4281
4330
  rows: n,
4282
- columns: qe(vu(h, n, !!g)),
4331
+ columns: Je(vu(h, n, !!g)),
4283
4332
  paging: g,
4284
- isLoading: !!g && !!M,
4285
- renderCell: Je,
4286
- onCellClick: v
4287
- }) : Ae ? /* @__PURE__ */ K(z.Suspense, {
4333
+ searchable: v,
4334
+ isLoading: !!g && !!re,
4335
+ renderCell: Ye,
4336
+ onCellClick: O
4337
+ }) : je ? /* @__PURE__ */ K(z.Suspense, {
4288
4338
  fallback: /* @__PURE__ */ K(Tc, { className: "h-full" }),
4289
4339
  children: /* @__PURE__ */ K(iu, {
4290
- type: Ae.type,
4340
+ type: je.type,
4291
4341
  minHeight: 0,
4292
4342
  family: i(t.chartType)?.family ?? void 0,
4293
- data: Ae.data,
4294
- appearance: He,
4295
- applyDensity: P,
4296
- mutedCategory: je,
4297
- colorBy: Ae.colorBy,
4298
- valueFormatter: Ue,
4299
- chartColors: xe,
4343
+ data: je.data,
4344
+ appearance: Ue,
4345
+ applyDensity: Se,
4346
+ mutedCategory: Me,
4347
+ colorBy: je.colorBy,
4348
+ valueFormatter: We,
4349
+ chartColors: be,
4300
4350
  renderer: p,
4301
- onEvents: Be,
4351
+ onEvents: Ve,
4302
4352
  className: "h-full w-full"
4303
4353
  })
4304
- }) : nt ? /* @__PURE__ */ K(Nc, {
4354
+ }) : rt ? /* @__PURE__ */ K(Nc, {
4305
4355
  className: "h-full",
4306
- hasActiveFilters: ge
4356
+ hasActiveFilters: he
4307
4357
  }) : cu(t?.chartType) ? s(t?.chartType) === s(c.radar) ? /* @__PURE__ */ K(Nc, {
4308
4358
  className: "h-full",
4309
- message: ke ? "Radar needs one category and at least three measures. Update it in Configure." : "Radar requires the new chart engine."
4359
+ message: Ae ? "Radar needs one category and at least three measures. Update it in Configure." : "Radar requires the new chart engine."
4310
4360
  }) : /* @__PURE__ */ K(z.Suspense, {
4311
4361
  fallback: /* @__PURE__ */ K(Tc, { className: "h-full" }),
4312
4362
  children: /* @__PURE__ */ K("div", {
4313
- ref: Xe,
4363
+ ref: Ze,
4314
4364
  "data-testid": "metric-card-legacy-chart",
4315
4365
  "data-slot": "metric-card-legacy-chart",
4316
4366
  className: "dbn:h-full dbn:w-full h-full w-full",
4317
4367
  children: /* @__PURE__ */ K(au, {
4318
- chartOptions: Qe,
4319
- data: De,
4368
+ chartOptions: $e,
4369
+ data: Oe,
4320
4370
  chartAppearance: m,
4321
- colors: xe,
4371
+ colors: be,
4322
4372
  metricCardColor: "transparent",
4323
- chartFontSettings: Ze,
4324
- events: Be,
4373
+ chartFontSettings: Qe,
4374
+ events: Ve,
4325
4375
  pivotDrillState: ou,
4326
4376
  isMetricCard: !0,
4327
4377
  isDashboard: !0,
@@ -4332,41 +4382,41 @@ var _u = ({ metric: e, chartSettings: t, data: n, isLoading: r, drillBreadcrumb:
4332
4382
  className: "h-full",
4333
4383
  message: "This chart type is no longer available. Pick another type in Configure."
4334
4384
  })
4335
- }), I ? /* @__PURE__ */ q("div", {
4385
+ }), Ee ? /* @__PURE__ */ q("div", {
4336
4386
  "data-testid": "card-truncation-footnote",
4337
4387
  "data-slot": "metric-card-truncation-footnote",
4338
4388
  "data-notice-slot": "metric-card-notice",
4339
- title: F?.summary && I === we ? `${I} - View all ${F.summary.totalCount.toLocaleString("en-US")}` : I,
4389
+ title: I?.summary && Ee === we ? `${Ee} - View all ${I.summary.totalCount.toLocaleString("en-US")}` : Ee,
4340
4390
  className: "flex shrink-0 items-center overflow-hidden text-xs text-(--muted-foreground)",
4341
4391
  children: [/* @__PURE__ */ K("span", {
4342
4392
  className: "truncate",
4343
- children: I
4344
- }), F?.summary && I === we ? /* @__PURE__ */ q(Nt, { children: [/* @__PURE__ */ K("span", {
4393
+ children: Ee
4394
+ }), I?.summary && Ee === we ? /* @__PURE__ */ q(Nt, { children: [/* @__PURE__ */ K("span", {
4345
4395
  "aria-hidden": "true",
4346
4396
  children: " - "
4347
- }), /* @__PURE__ */ q(me, {
4397
+ }), /* @__PURE__ */ q(fe, {
4348
4398
  type: "button",
4349
4399
  variant: "link",
4350
4400
  size: "sm",
4351
4401
  className: "h-auto shrink-0 p-0 text-xs",
4352
4402
  "data-testid": "card-truncation-view-all",
4353
- onClick: () => Ne("all"),
4403
+ onClick: () => Pe("all"),
4354
4404
  children: [
4355
4405
  "View all",
4356
4406
  " ",
4357
- F.summary.totalCount.toLocaleString("en-US")
4407
+ I.summary.totalCount.toLocaleString("en-US")
4358
4408
  ]
4359
4409
  })] }) : null]
4360
- }) : /* @__PURE__ */ K(Wl, { sentences: Ee })] }),
4410
+ }) : /* @__PURE__ */ K(Wl, { sentences: L })] }),
4361
4411
  /* @__PURE__ */ K(tu, {
4362
- open: Me != null,
4412
+ open: Ne != null,
4363
4413
  onOpenChange: (e) => {
4364
- e || Ne(null);
4414
+ e || Pe(null);
4365
4415
  },
4366
- columns: Fe,
4367
- rows: Pe,
4368
- title: Me === "collapsed" ? "All Other members" : "All categories",
4369
- description: Me === "collapsed" && F?.summary ? `${F.summary.tailCount.toLocaleString("en-US")} categories are combined in ${F.summary.bucketLabel}.` : F?.summary ? `${F.summary.totalCount.toLocaleString("en-US")} categories in descending order.` : void 0
4416
+ columns: Ie,
4417
+ rows: Fe,
4418
+ title: Ne === "collapsed" ? "All Other members" : "All categories",
4419
+ description: Ne === "collapsed" && I?.summary ? `${I.summary.tailCount.toLocaleString("en-US")} categories are combined in ${I.summary.bucketLabel}.` : I?.summary ? `${I.summary.totalCount.toLocaleString("en-US")} categories in descending order.` : void 0
4370
4420
  })
4371
4421
  ]
4372
4422
  });