@gravitee/graphene-charts 2.36.2 → 2.36.3

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.
package/dist/index.js CHANGED
@@ -1,28 +1,28 @@
1
1
  import { t as e } from "./utils-ySutDPYb.js";
2
- import { C as t, E as n, S as r, T as i, _ as a, a as o, b as s, c, d as l, f as u, g as d, h as f, i as p, l as m, m as h, n as g, o as _, p as v, r as y, s as b, t as x, u as S, v as C, w, x as T, y as E } from "./primitives-Bp_ciIfm.js";
3
- import { Badge as D, Card as O, CardContent as k, CardDescription as A, CardHeader as j, CardTitle as M, HoverCard as N, HoverCardContent as P, HoverCardTrigger as ee, ScrollArea as F, Separator as te, Tooltip as ne, TooltipContent as re, TooltipProvider as I, TooltipTrigger as L } from "@gravitee/graphene-core";
4
- import * as R from "react";
5
- import { createContext as z, createElement as B, forwardRef as V, useCallback as ie, useContext as ae, useId as H, useRef as oe, useState as se } from "react";
6
- import { Fragment as U, jsx as W, jsxs as G } from "react/jsx-runtime";
2
+ import { C as t, D as n, E as r, S as i, T as a, _ as o, a as s, b as c, c as l, d as u, f as d, g as f, h as p, i as m, l as h, m as g, n as _, o as v, p as y, r as b, s as x, t as S, u as C, v as w, w as T, x as E, y as D } from "./primitives-BnaI6bnw.js";
3
+ import { Badge as O, Card as k, CardContent as A, CardDescription as j, CardHeader as M, CardTitle as N, HoverCard as P, HoverCardContent as F, HoverCardTrigger as ee, ScrollArea as I, Separator as te, Tooltip as ne, TooltipContent as re, TooltipProvider as L, TooltipTrigger as R } from "@gravitee/graphene-core";
4
+ import * as z from "react";
5
+ import { createContext as B, createElement as V, forwardRef as H, useCallback as ie, useContext as ae, useId as U, useRef as oe, useState as se } from "react";
6
+ import { Fragment as ce, jsx as W, jsxs as G } from "react/jsx-runtime";
7
7
  import { scaleLinear as K } from "d3-scale";
8
- import { arc as ce, area as q, curveLinear as le, curveMonotoneX as J, curveStep as ue, line as Y, pie as de } from "d3-shape";
9
- import { createPortal as fe } from "react-dom";
8
+ import { arc as le, area as q, curveLinear as ue, curveMonotoneX as J, curveStep as de, line as Y, pie as fe } from "d3-shape";
9
+ import { createPortal as pe } from "react-dom";
10
10
  //#region src/base/ChartCard/ChartCard.tsx
11
- function pe({ title: t, description: n, children: r, className: i, ...a }) {
12
- return /* @__PURE__ */ G(O, {
11
+ function me({ title: t, description: n, children: r, className: i, ...a }) {
12
+ return /* @__PURE__ */ G(k, {
13
13
  className: e("flex h-full flex-col gap-0", i),
14
14
  ...a,
15
- children: [/* @__PURE__ */ G(j, {
15
+ children: [/* @__PURE__ */ G(M, {
16
16
  className: "min-h-[3.5rem]",
17
- children: [/* @__PURE__ */ W(M, {
17
+ children: [/* @__PURE__ */ W(N, {
18
18
  className: "text-lg font-semibold",
19
19
  children: t
20
- }), n && /* @__PURE__ */ W(A, {
20
+ }), n && /* @__PURE__ */ W(j, {
21
21
  className: "truncate text-sm",
22
22
  title: n,
23
23
  children: n
24
24
  })]
25
- }), /* @__PURE__ */ W(k, {
25
+ }), /* @__PURE__ */ W(A, {
26
26
  className: "flex-1",
27
27
  children: r
28
28
  })]
@@ -30,19 +30,19 @@ function pe({ title: t, description: n, children: r, className: i, ...a }) {
30
30
  }
31
31
  //#endregion
32
32
  //#region src/base/ChartTooltip/ChartTooltip.tsx
33
- function me(e) {
33
+ function he(e) {
34
34
  return typeof e == "number" ? e.toLocaleString() : e;
35
35
  }
36
- function he(e, t, n) {
36
+ function ge(e, t, n) {
37
37
  return t && e[t] ? e[t] : e[n];
38
38
  }
39
- function ge(e) {
39
+ function _e(e) {
40
40
  return e.toLocaleString();
41
41
  }
42
- function _e({ label: n, items: r = [], active: i = !0, hideLabel: a = !1, hideIndicator: o = !1, indicator: s = "dot", labelKey: c, nameKey: l, labelFormatter: u, labelClassName: d, valueFormatter: f, showTotal: p = !1, totalLabel: m = "Total", totalFormatter: h = ge, className: g, ..._ }) {
43
- let { config: v } = t(), y = f ?? me, b = !f;
42
+ function ve({ label: n, items: r = [], active: i = !0, hideLabel: a = !1, hideIndicator: o = !1, indicator: s = "dot", labelKey: c, nameKey: l, labelFormatter: u, labelClassName: d, valueFormatter: f, showTotal: p = !1, totalLabel: m = "Total", totalFormatter: h = _e, className: g, ..._ }) {
43
+ let { config: v } = t(), y = f ?? he, b = !f;
44
44
  if (!i || r.length === 0) return null;
45
- let x = r.length === 1 && s !== "dot", S = c ? he(v, c, c)?.label ?? n : typeof n == "string" ? v[n]?.label ?? n : n, C = u ? u(n ?? "", r) : S, w = a || !C && !u ? null : /* @__PURE__ */ W("div", {
45
+ let x = r.length === 1 && s !== "dot", S = c ? ge(v, c, c)?.label ?? n : typeof n == "string" ? v[n]?.label ?? n : n, C = u ? u(n ?? "", r) : S, w = a || !C && !u ? null : /* @__PURE__ */ W("div", {
46
46
  className: e("font-medium", d),
47
47
  children: C
48
48
  });
@@ -55,7 +55,7 @@ function _e({ label: n, items: r = [], active: i = !0, hideLabel: a = !1, hideIn
55
55
  /* @__PURE__ */ W("div", {
56
56
  className: "grid gap-1.5",
57
57
  children: r.map((t, n) => {
58
- let r = he(v, `${l ?? t.dataKey ?? t.name ?? "value"}`, t.name), i = t.color ?? `var(--color-${t.dataKey ?? t.name})`;
58
+ let r = ge(v, `${l ?? t.dataKey ?? t.name ?? "value"}`, t.name), i = t.color ?? `var(--color-${T(t.dataKey ?? t.name)})`;
59
59
  return /* @__PURE__ */ G("div", {
60
60
  className: e("flex w-full items-stretch gap-2 [&>svg]:h-2.5 [&>svg]:w-2.5 [&>svg]:text-muted-foreground", s === "dot" && "items-center"),
61
61
  children: [r?.icon ? /* @__PURE__ */ W(r.icon, {}) : !o && /* @__PURE__ */ W("div", {
@@ -99,25 +99,25 @@ function _e({ label: n, items: r = [], active: i = !0, hideLabel: a = !1, hideIn
99
99
  ]
100
100
  });
101
101
  }
102
- function ve({ content: e }) {
103
- let { setTooltip: t } = u();
104
- return R.useLayoutEffect(() => (t({ content: e }), () => t(null)), [e, t]), null;
102
+ function ye({ content: e }) {
103
+ let { setTooltip: t } = d();
104
+ return z.useLayoutEffect(() => (t({ content: e }), () => t(null)), [e, t]), null;
105
105
  }
106
106
  //#endregion
107
107
  //#region src/base/ChartLegend/ChartLegend.tsx
108
- var ye = {
108
+ var be = {
109
109
  start: "justify-start",
110
110
  center: "justify-center",
111
111
  end: "justify-end"
112
112
  };
113
- function be({ items: n = [], hideIcon: r = !1, nameKey: i, verticalAlign: a, align: o = "start", onItemHover: s, onItemLeave: c, hoveredLegendKey: l, className: u, ...d }) {
113
+ function xe({ items: n = [], hideIcon: r = !1, nameKey: i, verticalAlign: a, align: o = "start", onItemHover: s, onItemLeave: c, hoveredLegendKey: l, className: u, ...d }) {
114
114
  let { config: f } = t();
115
115
  return n.length === 0 ? null : /* @__PURE__ */ W("div", {
116
116
  "data-slot": "chart-legend-content",
117
- className: e("flex items-center gap-4 overflow-hidden px-4 py-1", ye[o], u),
117
+ className: e("flex items-center gap-4 overflow-hidden px-4 py-1", be[o], u),
118
118
  ...d,
119
119
  children: n.map((t) => {
120
- let n = f[`${i ?? t.dataKey ?? t.value}`], a = t.color ?? `var(--color-${t.dataKey ?? t.value})`, o = t.dataKey ?? t.value;
120
+ let n = f[`${i ?? t.dataKey ?? t.value}`], a = t.color ?? `var(--color-${T(t.dataKey ?? t.value)})`, o = t.dataKey ?? t.value;
121
121
  return /* @__PURE__ */ G("div", {
122
122
  className: e("flex min-w-0 shrink items-center gap-1.5 text-xs transition-opacity duration-150 [&>svg]:h-3 [&>svg]:w-3 [&>svg]:text-muted-foreground", s && "cursor-default rounded-sm px-1 py-0.5 hover:bg-muted/50", l != null && l !== o && "opacity-40"),
123
123
  onPointerEnter: s ? () => s(o) : void 0,
@@ -134,9 +134,9 @@ function be({ items: n = [], hideIcon: r = !1, nameKey: i, verticalAlign: a, ali
134
134
  })
135
135
  });
136
136
  }
137
- function xe({ content: e, verticalAlign: t = "bottom" }) {
138
- let { setLegend: n } = u();
139
- return R.useLayoutEffect(() => (n({
137
+ function Se({ content: e, verticalAlign: t = "bottom" }) {
138
+ let { setLegend: n } = d();
139
+ return z.useLayoutEffect(() => (n({
140
140
  content: e,
141
141
  verticalAlign: t
142
142
  }), () => n(null)), [
@@ -147,14 +147,14 @@ function xe({ content: e, verticalAlign: t = "bottom" }) {
147
147
  }
148
148
  //#endregion
149
149
  //#region src/series/curves.ts
150
- var Se = {
150
+ var Ce = {
151
151
  monotone: J,
152
- linear: le,
153
- step: ue
154
- }, Ce = "\n@keyframes graphene-line-draw {\n from { stroke-dashoffset: var(--path-length); }\n to { stroke-dashoffset: 0; }\n}\n[data-graphene-chart-line][data-animated='true'] {\n animation: graphene-line-draw 800ms cubic-bezier(0.32, 0.72, 0, 1) forwards;\n}\n@media (prefers-reduced-motion: reduce) {\n [data-graphene-chart-line][data-animated='true'] {\n animation: none;\n stroke-dashoffset: 0;\n }\n}\n[data-graphene-chart-dot]:focus-visible {\n outline: 2px solid var(--ring);\n outline-offset: 2px;\n}\n";
155
- function we({ dataKey: e, axisId: t, curveType: n = "monotone", showDots: r = !1, connectNulls: i = !1 }) {
156
- let { data: a, categoryScale: o, resolveValueScale: s, animated: c, hoveredCategory: l, hoveredLegendKey: u, config: d, valueTickFormatter: f, showTooltipAt: p, hideTooltip: m } = C(), h = s(t), g = R.useRef(null), [_, v] = R.useState(0), y = `var(--color-${e})`;
157
- R.useLayoutEffect(() => {
152
+ linear: ue,
153
+ step: de
154
+ }, we = "\n@keyframes graphene-line-draw {\n from { stroke-dashoffset: var(--path-length); }\n to { stroke-dashoffset: 0; }\n}\n[data-graphene-chart-line][data-animated='true'] {\n animation: graphene-line-draw 800ms cubic-bezier(0.32, 0.72, 0, 1) forwards;\n}\n@media (prefers-reduced-motion: reduce) {\n [data-graphene-chart-line][data-animated='true'] {\n animation: none;\n stroke-dashoffset: 0;\n }\n}\n[data-graphene-chart-dot]:focus-visible {\n outline: 2px solid var(--ring);\n outline-offset: 2px;\n}\n";
155
+ function Te({ dataKey: e, axisId: t, curveType: n = "monotone", showDots: r = !1, connectNulls: i = !1 }) {
156
+ let { data: a, categoryScale: o, resolveValueScale: s, animated: c, hoveredCategory: l, hoveredLegendKey: u, config: d, valueTickFormatter: f, showTooltipAt: p, hideTooltip: m } = w(), h = s(t), g = z.useRef(null), [_, v] = z.useState(0), y = `var(--color-${T(e)})`;
157
+ z.useLayoutEffect(() => {
158
158
  g.current && v(g.current.getTotalLength());
159
159
  }, [
160
160
  a,
@@ -164,7 +164,7 @@ function we({ dataKey: e, axisId: t, curveType: n = "monotone", showDots: r = !1
164
164
  n,
165
165
  i
166
166
  ]);
167
- let b = Se[n], x = typeof d[e]?.label == "string" ? d[e]?.label : e, S = [];
167
+ let b = Ce[n], x = typeof d[e]?.label == "string" ? d[e]?.label : e, S = [];
168
168
  for (let t of a) {
169
169
  let n = t[e];
170
170
  if (n == null) {
@@ -188,7 +188,7 @@ function we({ dataKey: e, axisId: t, curveType: n = "monotone", showDots: r = !1
188
188
  value: r
189
189
  });
190
190
  }
191
- let w = Y().x((e) => e.x).y((e) => e.y).curve(b).defined((e) => e.defined)(S) ?? "";
191
+ let C = Y().x((e) => e.x).y((e) => e.y).curve(b).defined((e) => e.defined)(S) ?? "";
192
192
  return /* @__PURE__ */ G("g", {
193
193
  style: {
194
194
  opacity: u !== null && u !== e ? .15 : 1,
@@ -197,11 +197,11 @@ function we({ dataKey: e, axisId: t, curveType: n = "monotone", showDots: r = !1
197
197
  children: [
198
198
  /* @__PURE__ */ W("style", {
199
199
  precedence: "graphene-charts",
200
- children: Ce
200
+ children: we
201
201
  }),
202
202
  /* @__PURE__ */ W("path", {
203
203
  ref: g,
204
- d: w,
204
+ d: C,
205
205
  fill: "none",
206
206
  stroke: y,
207
207
  strokeWidth: 2.5,
@@ -249,32 +249,32 @@ function we({ dataKey: e, axisId: t, curveType: n = "monotone", showDots: r = !1
249
249
  ]
250
250
  });
251
251
  }
252
- we.seriesType = "LineSeries";
252
+ Te.seriesType = "LineSeries";
253
253
  //#endregion
254
254
  //#region src/series/BarSeries.tsx
255
- var Te = "\n[data-graphene-chart-bar] {\n fill-opacity: 0.7;\n}\n[data-graphene-chart-bar][data-animated='true'] {\n transform-box: fill-box;\n transform-origin: center bottom;\n transition:\n transform 450ms cubic-bezier(0.32, 0.72, 0, 1),\n opacity 250ms ease-out;\n}\n[data-graphene-chart-bar][data-animated='true'][data-layout='horizontal'] {\n transform-origin: left center;\n}\n@starting-style {\n [data-graphene-chart-bar][data-animated='true'] {\n opacity: 0;\n transform: scaleY(0);\n }\n [data-graphene-chart-bar][data-animated='true'][data-layout='horizontal'] {\n transform: scaleX(0);\n }\n}\n@media (prefers-reduced-motion: reduce) {\n [data-graphene-chart-bar][data-animated='true'] {\n transition: none;\n }\n @starting-style {\n [data-graphene-chart-bar][data-animated='true'] {\n opacity: 1;\n transform: none;\n }\n }\n}\n[data-graphene-chart-bar]:focus-visible {\n outline: 2px solid var(--ring);\n outline-offset: 2px;\n}\n";
256
- function Ee({ dataKey: e, axisId: t, stackId: n, barRadius: r }) {
257
- let { data: i, categoryScale: a, resolveValueScale: o, innerHeight: s, layout: c, animated: l, hoveredLegendKey: u, config: d, stackedLayers: f, barGroupScale: p, valueTickFormatter: m, chartWrapperRef: h, chartId: g, showTooltipAt: _, hideTooltip: y } = C(), b = o(t), x = c === "vertical", w = `var(--color-${e})`, T = typeof d[e]?.label == "string" ? d[e]?.label : e, [E, D] = S("var(--chart-bar-radius, 3px)", 3), O = r ?? E, [k, A] = R.useState(null);
258
- R.useEffect(() => {
259
- A(h.current);
255
+ var Ee = "\n[data-graphene-chart-bar] {\n fill-opacity: 0.7;\n}\n[data-graphene-chart-bar][data-animated='true'] {\n transform-box: fill-box;\n transform-origin: center bottom;\n transition:\n transform 450ms cubic-bezier(0.32, 0.72, 0, 1),\n opacity 250ms ease-out;\n}\n[data-graphene-chart-bar][data-animated='true'][data-layout='horizontal'] {\n transform-origin: left center;\n}\n@starting-style {\n [data-graphene-chart-bar][data-animated='true'] {\n opacity: 0;\n transform: scaleY(0);\n }\n [data-graphene-chart-bar][data-animated='true'][data-layout='horizontal'] {\n transform: scaleX(0);\n }\n}\n@media (prefers-reduced-motion: reduce) {\n [data-graphene-chart-bar][data-animated='true'] {\n transition: none;\n }\n @starting-style {\n [data-graphene-chart-bar][data-animated='true'] {\n opacity: 1;\n transform: none;\n }\n }\n}\n[data-graphene-chart-bar]:focus-visible {\n outline: 2px solid var(--ring);\n outline-offset: 2px;\n}\n";
256
+ function De({ dataKey: e, axisId: t, stackId: n, barRadius: r }) {
257
+ let { data: i, categoryScale: a, resolveValueScale: o, innerHeight: s, layout: c, animated: l, hoveredLegendKey: u, config: d, stackedLayers: f, barGroupScale: p, valueTickFormatter: m, chartWrapperRef: h, chartId: g, showTooltipAt: _, hideTooltip: v } = w(), b = o(t), x = c === "vertical", S = `var(--color-${T(e)})`, E = typeof d[e]?.label == "string" ? d[e]?.label : e, [D, O] = C("var(--chart-bar-radius, 3px)", 3), k = r ?? D, [A, j] = z.useState(null);
258
+ z.useEffect(() => {
259
+ j(h.current);
260
260
  }, [h]);
261
- let j = n ? f.get(n)?.find((t) => t.key === e) : void 0, M = n ? f.get(n) ?? null : null, N = R.useMemo(() => !M || M.length === 0 ? !1 : M[0].key === e, [M, e]), P = R.useMemo(() => {
262
- if (!N || !M || M.length === 0) return null;
263
- let e = M[M.length - 1];
261
+ let M = n ? f.get(n)?.find((t) => t.key === e) : void 0, N = n ? f.get(n) ?? null : null, P = z.useMemo(() => !N || N.length === 0 ? !1 : N[0].key === e, [N, e]), F = z.useMemo(() => {
262
+ if (!P || !N || N.length === 0) return null;
263
+ let e = N[N.length - 1];
264
264
  return i.map((t, r) => {
265
265
  let i = e[r][1], o = `stack-clip-${g}-${n}-${r}`, c;
266
266
  if (x) {
267
267
  let e = a(t.category) ?? 0, n = b(i);
268
- c = v(e, n, a.bandwidth(), s - n, {
269
- tl: O,
270
- tr: O,
268
+ c = y(e, n, a.bandwidth(), s - n, {
269
+ tl: k,
270
+ tr: k,
271
271
  br: 0,
272
272
  bl: 0
273
273
  });
274
- } else c = v(0, a(t.category) ?? 0, b(i), a.bandwidth(), {
274
+ } else c = y(0, a(t.category) ?? 0, b(i), a.bandwidth(), {
275
275
  tl: 0,
276
- tr: O,
277
- br: O,
276
+ tr: k,
277
+ br: k,
278
278
  bl: 0
279
279
  });
280
280
  return {
@@ -283,15 +283,15 @@ function Ee({ dataKey: e, axisId: t, stackId: n, barRadius: r }) {
283
283
  };
284
284
  });
285
285
  }, [
286
+ P,
286
287
  N,
287
- M,
288
288
  i,
289
289
  g,
290
290
  n,
291
291
  a,
292
292
  b,
293
293
  s,
294
- O,
294
+ k,
295
295
  x
296
296
  ]);
297
297
  return /* @__PURE__ */ G("g", {
@@ -302,52 +302,52 @@ function Ee({ dataKey: e, axisId: t, stackId: n, barRadius: r }) {
302
302
  children: [
303
303
  /* @__PURE__ */ W("style", {
304
304
  precedence: "graphene-charts",
305
- children: Te
305
+ children: Ee
306
306
  }),
307
- k && fe(D, k),
308
- P && /* @__PURE__ */ W("defs", { children: P.map(({ clipId: e, path: t }) => /* @__PURE__ */ W("clipPath", {
307
+ A && pe(O, A),
308
+ F && /* @__PURE__ */ W("defs", { children: F.map(({ clipId: e, path: t }) => /* @__PURE__ */ W("clipPath", {
309
309
  id: e,
310
310
  children: /* @__PURE__ */ W("path", { d: t })
311
311
  }, e)) }),
312
312
  i.map((t, r) => {
313
- let i = Number(t[e]) || 0, o = `${t.category} — ${T}: ${m(i)}`, c = "";
314
- if (x && !j) {
313
+ let i = Number(t[e]) || 0, o = `${t.category} — ${E}: ${m(i)}`, c = "";
314
+ if (x && !M) {
315
315
  let n = p ? p(e) ?? 0 : 0, r = p ? p.bandwidth() : a.bandwidth();
316
- c = v((a(t.category) ?? 0) + n, b(i), r, s - b(i), {
317
- tl: O,
318
- tr: O,
316
+ c = y((a(t.category) ?? 0) + n, b(i), r, s - b(i), {
317
+ tl: k,
318
+ tr: k,
319
319
  br: 0,
320
320
  bl: 0
321
321
  });
322
- } else if (x && j) {
323
- let e = j[r], n = b(e[1]), i = b(e[0]) - n;
324
- c = v(a(t.category) ?? 0, n, a.bandwidth(), i, {
322
+ } else if (x && M) {
323
+ let e = M[r], n = b(e[1]), i = b(e[0]) - n;
324
+ c = y(a(t.category) ?? 0, n, a.bandwidth(), i, {
325
325
  tl: 0,
326
326
  tr: 0,
327
327
  br: 0,
328
328
  bl: 0
329
329
  });
330
- } else if (!x && !j) {
330
+ } else if (!x && !M) {
331
331
  let n = p ? p(e) ?? 0 : 0, r = p ? p.bandwidth() : a.bandwidth();
332
- c = v(0, (a(t.category) ?? 0) + n, b(i), r, {
332
+ c = y(0, (a(t.category) ?? 0) + n, b(i), r, {
333
333
  tl: 0,
334
- tr: O,
335
- br: O,
334
+ tr: k,
335
+ br: k,
336
336
  bl: 0
337
337
  });
338
- } else if (!x && j) {
339
- let e = j[r], n = b(e[0]), i = b(e[1]) - n;
340
- c = v(n, a(t.category) ?? 0, i, a.bandwidth(), {
338
+ } else if (!x && M) {
339
+ let e = M[r], n = b(e[0]), i = b(e[1]) - n;
340
+ c = y(n, a(t.category) ?? 0, i, a.bandwidth(), {
341
341
  tl: 0,
342
342
  tr: 0,
343
343
  br: 0,
344
344
  bl: 0
345
345
  });
346
346
  }
347
- let u = j ? `url(#stack-clip-${g}-${n}-${r})` : void 0;
347
+ let u = M ? `url(#stack-clip-${g}-${n}-${r})` : void 0;
348
348
  return /* @__PURE__ */ W("path", {
349
349
  d: c,
350
- fill: w,
350
+ fill: S,
351
351
  tabIndex: 0,
352
352
  role: "img",
353
353
  "aria-label": o,
@@ -357,19 +357,19 @@ function Ee({ dataKey: e, axisId: t, stackId: n, barRadius: r }) {
357
357
  className: "transition-opacity hover:opacity-80 focus:outline-none",
358
358
  clipPath: u,
359
359
  onFocus: (e) => _(t.category, e.currentTarget.getBoundingClientRect()),
360
- onBlur: y
360
+ onBlur: v
361
361
  }, `${e}-${t.category}`);
362
362
  })
363
363
  ]
364
364
  });
365
365
  }
366
- Ee.seriesType = "BarSeries";
366
+ De.seriesType = "BarSeries";
367
367
  //#endregion
368
368
  //#region src/series/AreaSeries.tsx
369
- var De = "\n@keyframes graphene-line-draw {\n from { stroke-dashoffset: var(--path-length); }\n to { stroke-dashoffset: 0; }\n}\n[data-graphene-chart-line][data-animated='true'] {\n animation: graphene-line-draw 800ms cubic-bezier(0.32, 0.72, 0, 1) forwards;\n}\n@keyframes graphene-area-fade-in {\n from { opacity: 0; }\n to { opacity: 1; }\n}\n[data-graphene-chart-area][data-animated='true'] {\n animation: graphene-area-fade-in 600ms cubic-bezier(0.32, 0.72, 0, 1) forwards;\n}\n@media (prefers-reduced-motion: reduce) {\n [data-graphene-chart-line][data-animated='true'] {\n animation: none;\n stroke-dashoffset: 0;\n }\n [data-graphene-chart-area][data-animated='true'] {\n animation: none;\n opacity: 1;\n }\n}\n";
370
- function Oe({ dataKey: e, axisId: t, stackId: n, curveType: r = "monotone", fillOpacity: i = .2, gradient: a = !0, connectNulls: o = !1 }) {
371
- let { data: s, categoryScale: c, resolveValueScale: l, innerHeight: u, animated: d, hoveredCategory: f, hoveredLegendKey: p, stackedLayers: m, chartId: h } = C(), g = l(t), _ = R.useRef(null), [v, y] = R.useState(0), b = `var(--color-${e})`, x = Se[r];
372
- R.useLayoutEffect(() => {
369
+ var Oe = "\n@keyframes graphene-line-draw {\n from { stroke-dashoffset: var(--path-length); }\n to { stroke-dashoffset: 0; }\n}\n[data-graphene-chart-line][data-animated='true'] {\n animation: graphene-line-draw 800ms cubic-bezier(0.32, 0.72, 0, 1) forwards;\n}\n@keyframes graphene-area-fade-in {\n from { opacity: 0; }\n to { opacity: 1; }\n}\n[data-graphene-chart-area][data-animated='true'] {\n animation: graphene-area-fade-in 600ms cubic-bezier(0.32, 0.72, 0, 1) forwards;\n}\n@media (prefers-reduced-motion: reduce) {\n [data-graphene-chart-line][data-animated='true'] {\n animation: none;\n stroke-dashoffset: 0;\n }\n [data-graphene-chart-area][data-animated='true'] {\n animation: none;\n opacity: 1;\n }\n}\n";
370
+ function ke({ dataKey: e, axisId: t, stackId: n, curveType: r = "monotone", fillOpacity: i = .2, gradient: a = !0, connectNulls: o = !1 }) {
371
+ let { data: s, categoryScale: c, resolveValueScale: l, innerHeight: u, animated: d, hoveredCategory: f, hoveredLegendKey: p, stackedLayers: m, chartId: h } = w(), g = l(t), _ = z.useRef(null), [v, y] = z.useState(0), b = `var(--color-${T(e)})`, x = Ce[r];
372
+ z.useLayoutEffect(() => {
373
373
  _.current && y(_.current.getTotalLength());
374
374
  }, [
375
375
  s,
@@ -380,12 +380,12 @@ function Oe({ dataKey: e, axisId: t, stackId: n, curveType: r = "monotone", fill
380
380
  o,
381
381
  n
382
382
  ]);
383
- let S = n ? m.get(n)?.find((t) => t.key === e) : void 0, w = `area-gradient-${h}-${e}`, T = a ? `url(#${w})` : b, E = c.domain(), D = "", O = "", k = null, A = null;
383
+ let S = n ? m.get(n)?.find((t) => t.key === e) : void 0, C = `area-gradient-${h}-${e}`, E = a ? `url(#${C})` : b, D = c.domain(), O = "", k = "", A = null, j = null;
384
384
  if (S) {
385
- let t = (t) => o ? !0 : s[t]?.[e] != null, n = q().x((e) => (c(E[e]) ?? 0) + c.bandwidth() / 2).y0((e) => g(S[e][0])).y1((e) => g(S[e][1])).defined(t).curve(x), r = Y().x((e) => (c(E[e]) ?? 0) + c.bandwidth() / 2).y((e) => g(S[e][1])).defined(t).curve(x), i = E.map((e, t) => t);
386
- if (D = n(i) ?? "", O = r(i) ?? "", f !== null) {
387
- let e = E.indexOf(f);
388
- e !== -1 && t(e) && (k = (c(f) ?? 0) + c.bandwidth() / 2, A = g(S[e][1]));
385
+ let t = (t) => o ? !0 : s[t]?.[e] != null, n = q().x((e) => (c(D[e]) ?? 0) + c.bandwidth() / 2).y0((e) => g(S[e][0])).y1((e) => g(S[e][1])).defined(t).curve(x), r = Y().x((e) => (c(D[e]) ?? 0) + c.bandwidth() / 2).y((e) => g(S[e][1])).defined(t).curve(x), i = D.map((e, t) => t);
386
+ if (O = n(i) ?? "", k = r(i) ?? "", f !== null) {
387
+ let e = D.indexOf(f);
388
+ e !== -1 && t(e) && (A = (c(f) ?? 0) + c.bandwidth() / 2, j = g(S[e][1]));
389
389
  }
390
390
  } else {
391
391
  let t = [];
@@ -411,9 +411,9 @@ function Oe({ dataKey: e, axisId: t, stackId: n, curveType: r = "monotone", fill
411
411
  });
412
412
  }
413
413
  let n = (e) => e.defined, r = Y().x((e) => e.x).y((e) => e.y).curve(x).defined(n), i = q().x((e) => e.x).y0(u).y1((e) => e.y).curve(x).defined(n);
414
- if (O = r(t) ?? "", D = i(t) ?? "", f !== null) {
414
+ if (k = r(t) ?? "", O = i(t) ?? "", f !== null) {
415
415
  let e = t.find((e) => e.category === f && e.defined);
416
- e && (k = e.x, A = e.y);
416
+ e && (A = e.x, j = e.y);
417
417
  }
418
418
  }
419
419
  return /* @__PURE__ */ G("g", {
@@ -424,10 +424,10 @@ function Oe({ dataKey: e, axisId: t, stackId: n, curveType: r = "monotone", fill
424
424
  children: [
425
425
  /* @__PURE__ */ W("style", {
426
426
  precedence: "graphene-charts",
427
- children: De
427
+ children: Oe
428
428
  }),
429
429
  a && /* @__PURE__ */ W("defs", { children: /* @__PURE__ */ G("linearGradient", {
430
- id: w,
430
+ id: C,
431
431
  x1: "0",
432
432
  y1: "0",
433
433
  x2: "0",
@@ -443,15 +443,15 @@ function Oe({ dataKey: e, axisId: t, stackId: n, curveType: r = "monotone", fill
443
443
  })]
444
444
  }) }),
445
445
  /* @__PURE__ */ W("path", {
446
- d: D,
447
- fill: T,
446
+ d: O,
447
+ fill: E,
448
448
  fillOpacity: a ? 1 : i,
449
449
  "data-graphene-chart-area": !0,
450
450
  "data-animated": d ? "true" : "false"
451
451
  }),
452
452
  /* @__PURE__ */ W("path", {
453
453
  ref: _,
454
- d: O,
454
+ d: k,
455
455
  fill: "none",
456
456
  stroke: b,
457
457
  strokeWidth: 2,
@@ -465,9 +465,9 @@ function Oe({ dataKey: e, axisId: t, stackId: n, curveType: r = "monotone", fill
465
465
  strokeDashoffset: v
466
466
  } : void 0
467
467
  }),
468
- k !== null && A !== null && /* @__PURE__ */ W("circle", {
469
- cx: k,
470
- cy: A,
468
+ A !== null && j !== null && /* @__PURE__ */ W("circle", {
469
+ cx: A,
470
+ cy: j,
471
471
  r: 5,
472
472
  fill: b,
473
473
  stroke: "var(--background)",
@@ -477,10 +477,10 @@ function Oe({ dataKey: e, axisId: t, stackId: n, curveType: r = "monotone", fill
477
477
  ]
478
478
  });
479
479
  }
480
- Oe.seriesType = "AreaSeries";
480
+ ke.seriesType = "AreaSeries";
481
481
  //#endregion
482
482
  //#region src/lib/inferDataKeys.ts
483
- function ke(e, t) {
483
+ function Ae(e, t) {
484
484
  if (e.length === 0) return [];
485
485
  let n = /* @__PURE__ */ new Set(), r = [];
486
486
  for (let t of e) for (let e of Object.keys(t)) {
@@ -493,66 +493,66 @@ function ke(e, t) {
493
493
  }
494
494
  //#endregion
495
495
  //#region src/charts/BarChart/BarChart.tsx
496
- var Ae = 120;
497
- function je({ data: e, dataKeys: n, state: r, layout: i = "vertical", variant: o = "grouped", margin: s, barRadius: l, showGrid: u = !0, showCategoryAxis: d = !0, showValueAxis: m = !0, valueTickFormatter: g, ariaLabel: _, animated: v = !0, onBarHover: y, onBarLeave: b, className: x, children: S, ...C }) {
498
- let { config: w } = t(), T = n ?? ke(e, Object.keys(w)), E = i === "vertical", D = o === "stacked" ? "default" : void 0, O = E ? s : {
499
- left: Ae,
496
+ var je = 120;
497
+ function Me({ data: e, dataKeys: n, state: r, layout: i = "vertical", variant: a = "grouped", margin: s, barRadius: c, showGrid: u = !0, showCategoryAxis: d = !0, showValueAxis: f = !0, valueTickFormatter: h, ariaLabel: _, animated: v = !0, onBarHover: y, onBarLeave: b, className: x, children: S, ...C }) {
498
+ let { config: w } = t(), T = n ?? Ae(e, Object.keys(w)), E = i === "vertical", D = a === "stacked" ? "default" : void 0, O = E ? s : {
499
+ left: je,
500
500
  ...s
501
501
  };
502
- return r === "loading" ? /* @__PURE__ */ W(c, {
502
+ return r === "loading" ? /* @__PURE__ */ W(l, {
503
503
  ariaLabel: _,
504
504
  className: x,
505
505
  ...C
506
- }) : /* @__PURE__ */ G(p, {
506
+ }) : /* @__PURE__ */ G(m, {
507
507
  data: e,
508
508
  state: r,
509
509
  categoryPadding: .1,
510
510
  layout: i,
511
511
  animated: v,
512
512
  ariaLabel: _,
513
- valueTickFormatter: g,
513
+ valueTickFormatter: h,
514
514
  margin: O,
515
515
  onPointHover: y,
516
516
  onPointLeave: b,
517
517
  className: x,
518
518
  ...C,
519
519
  children: [
520
- u && /* @__PURE__ */ W(a, { orientation: E ? "horizontal" : "vertical" }),
521
- T.map((e) => /* @__PURE__ */ W(Ee, {
520
+ u && /* @__PURE__ */ W(o, { orientation: E ? "horizontal" : "vertical" }),
521
+ T.map((e) => /* @__PURE__ */ W(De, {
522
522
  dataKey: e,
523
523
  stackId: D,
524
- barRadius: l
524
+ barRadius: c
525
525
  }, e)),
526
- d && /* @__PURE__ */ W(h, { orientation: E ? "bottom" : "left" }),
527
- m && /* @__PURE__ */ W(f, { orientation: E ? "left" : "bottom" }),
526
+ d && /* @__PURE__ */ W(g, { orientation: E ? "bottom" : "left" }),
527
+ f && /* @__PURE__ */ W(p, { orientation: E ? "left" : "bottom" }),
528
528
  S
529
529
  ]
530
530
  });
531
531
  }
532
532
  //#endregion
533
533
  //#region src/charts/DoughnutChart/DoughnutChart.tsx
534
- var Me = {
534
+ var Ne = {
535
535
  top: 10,
536
536
  right: 10,
537
537
  bottom: 10,
538
538
  left: 10
539
- }, Ne = {
539
+ }, Pe = {
540
540
  top: 30,
541
541
  right: 60,
542
542
  bottom: 30,
543
543
  left: 60
544
- }, Pe = 50, Fe = "\n[data-graphene-chart-doughnut-segment][data-animated='true'] {\n transform-box: fill-box;\n transform-origin: center center;\n transition:\n transform 500ms cubic-bezier(0.32, 0.72, 0, 1),\n opacity 300ms ease-out;\n}\n@starting-style {\n [data-graphene-chart-doughnut-segment][data-animated='true'] {\n opacity: 0;\n transform: scale(0);\n }\n}\n@media (prefers-reduced-motion: reduce) {\n [data-graphene-chart-doughnut-segment][data-animated='true'] {\n transition: none;\n }\n @starting-style {\n [data-graphene-chart-doughnut-segment][data-animated='true'] {\n opacity: 1;\n transform: none;\n }\n }\n}\n[data-graphene-chart-doughnut-segment]:focus-visible {\n outline: 2px solid var(--ring);\n outline-offset: 2px;\n}\n";
545
- function Ie({ state: e, data: t, innerRadius: n, padAngle: r, cornerRadius: i, labels: a, centerContent: o, startAngle: s, animated: c, tooltipLabel: u, onSegmentHover: d, onSegmentLeave: f, ariaLabel: p, margin: h, className: g, children: v, ...y }) {
546
- let b = m(e, t.length);
547
- return b === "loading" ? /* @__PURE__ */ W(x, {
544
+ }, Fe = 50, Ie = "\n[data-graphene-chart-doughnut-segment][data-animated='true'] {\n transform-box: fill-box;\n transform-origin: center center;\n transition:\n transform 500ms cubic-bezier(0.32, 0.72, 0, 1),\n opacity 300ms ease-out;\n}\n@starting-style {\n [data-graphene-chart-doughnut-segment][data-animated='true'] {\n opacity: 0;\n transform: scale(0);\n }\n}\n@media (prefers-reduced-motion: reduce) {\n [data-graphene-chart-doughnut-segment][data-animated='true'] {\n transition: none;\n }\n @starting-style {\n [data-graphene-chart-doughnut-segment][data-animated='true'] {\n opacity: 1;\n transform: none;\n }\n }\n}\n[data-graphene-chart-doughnut-segment]:focus-visible {\n outline: 2px solid var(--ring);\n outline-offset: 2px;\n}\n";
545
+ function Le({ state: e, data: t, innerRadius: n, padAngle: r, cornerRadius: i, labels: a, centerContent: o, startAngle: s, animated: c, tooltipLabel: l, onSegmentHover: d, onSegmentLeave: f, ariaLabel: p, margin: m, className: g, children: _, ...y }) {
546
+ let b = h(e, t.length);
547
+ return b === "loading" ? /* @__PURE__ */ W(S, {
548
548
  ariaLabel: p,
549
549
  className: g,
550
550
  ...y
551
- }) : b === "empty" ? /* @__PURE__ */ W(_, {
551
+ }) : b === "empty" ? /* @__PURE__ */ W(v, {
552
552
  ariaLabel: p ?? "Doughnut chart with 0 segments",
553
553
  className: g,
554
554
  ...y
555
- }) : /* @__PURE__ */ W(l, { children: /* @__PURE__ */ W(Le, {
555
+ }) : /* @__PURE__ */ W(u, { children: /* @__PURE__ */ W(Re, {
556
556
  data: t,
557
557
  innerRadius: n,
558
558
  padAngle: r,
@@ -561,40 +561,40 @@ function Ie({ state: e, data: t, innerRadius: n, padAngle: r, cornerRadius: i, l
561
561
  centerContent: o,
562
562
  startAngle: s,
563
563
  animated: c,
564
- tooltipLabel: u,
564
+ tooltipLabel: l,
565
565
  onSegmentHover: d,
566
566
  onSegmentLeave: f,
567
567
  ariaLabel: p,
568
- margin: h,
568
+ margin: m,
569
569
  className: g,
570
570
  ...y,
571
- children: v
571
+ children: _
572
572
  }) });
573
573
  }
574
- function Le({ data: n, innerRadius: r = .6, padAngle: i = .02, cornerRadius: a = 8, labels: c, centerContent: l, startAngle: d = -Math.PI / 2, animated: f = !0, tooltipLabel: p, onSegmentHover: m, onSegmentLeave: h, ariaLabel: g, margin: _, className: v, children: y, ...b }) {
575
- let { config: x, id: S } = t(), { tooltip: C, legend: w } = u(), T = c !== void 0, D = {
576
- ...T ? Ne : Me,
574
+ function Re({ data: n, innerRadius: r = .6, padAngle: i = .02, cornerRadius: a = 8, labels: o, centerContent: l, startAngle: u = -Math.PI / 2, animated: f = !0, tooltipLabel: p, onSegmentHover: m, onSegmentLeave: h, ariaLabel: g, margin: _, className: v, children: y, ...b }) {
575
+ let { config: x, id: S } = t(), { tooltip: C, legend: w } = d(), E = o !== void 0, O = {
576
+ ...E ? Pe : Ne,
577
577
  ..._
578
- }, O = R.useRef(null), k = R.useRef(null), A = s(k), j = E(), [M, N] = R.useState(null), P = R.useCallback((e) => N(e), []), ee = R.useCallback(() => N(null), []), [F, te] = R.useState(null), ne = Math.max(0, A.width - D.left - D.right), re = Math.max(0, A.height - D.top - D.bottom), I = Math.min(ne, re) / 2, L = I * r, z = R.useMemo(() => n.reduce((e, t) => e + t.value, 0), [n]), B = R.useMemo(() => de().value((e) => e.value).sort(null).startAngle(d).endAngle(d + Math.PI * 2), [d]), V = R.useMemo(() => n.length > 0 ? B(n) : [], [B, n]), ie = R.useMemo(() => ce().innerRadius(L).outerRadius(I).padAngle(i).cornerRadius(a), [
578
+ }, k = z.useRef(null), A = z.useRef(null), j = c(A), M = D(), [N, P] = z.useState(null), F = z.useCallback((e) => P(e), []), ee = z.useCallback(() => P(null), []), [I, te] = z.useState(null), ne = Math.max(0, j.width - O.left - O.right), re = Math.max(0, j.height - O.top - O.bottom), L = Math.min(ne, re) / 2, R = L * r, B = z.useMemo(() => n.reduce((e, t) => e + t.value, 0), [n]), V = z.useMemo(() => fe().value((e) => e.value).sort(null).startAngle(u).endAngle(u + Math.PI * 2), [u]), H = z.useMemo(() => n.length > 0 ? V(n) : [], [V, n]), ie = z.useMemo(() => le().innerRadius(R).outerRadius(L).padAngle(i).cornerRadius(a), [
579
+ R,
579
580
  L,
580
- I,
581
581
  i,
582
582
  a
583
- ]), ae = R.useMemo(() => ce().innerRadius(I * 1.05).outerRadius(I * 1.05), [I]), H = R.useMemo(() => ce().innerRadius(I * 1.2).outerRadius(I * 1.2), [I]), oe = n.map((e) => ({
583
+ ]), ae = z.useMemo(() => le().innerRadius(L * 1.05).outerRadius(L * 1.05), [L]), U = z.useMemo(() => le().innerRadius(L * 1.2).outerRadius(L * 1.2), [L]), oe = n.map((e) => ({
584
584
  dataKey: e.category,
585
585
  value: e.category
586
586
  }));
587
587
  function se(e) {
588
- if (!c) return "";
589
- if (typeof c == "function") return c(e, z);
590
- switch (c) {
588
+ if (!o) return "";
589
+ if (typeof o == "function") return o(e, B);
590
+ switch (o) {
591
591
  case "category": return typeof x[e.category]?.label == "string" ? x[e.category]?.label : e.category;
592
592
  case "value": return e.value.toLocaleString();
593
- case "percent": return z > 0 ? `${(e.value / z * 100).toFixed(1)}%` : "0%";
593
+ case "percent": return B > 0 ? `${(e.value / B * 100).toFixed(1)}%` : "0%";
594
594
  }
595
595
  }
596
596
  function K(e) {
597
- let t = z > 0 ? (e.value / z * 100).toFixed(1) : "0";
597
+ let t = B > 0 ? (e.value / B * 100).toFixed(1) : "0";
598
598
  return [{
599
599
  dataKey: e.category,
600
600
  name: e.category,
@@ -605,80 +605,80 @@ function Le({ data: n, innerRadius: r = .6, padAngle: i = .02, cornerRadius: a =
605
605
  function q(e, t) {
606
606
  let n = K(e);
607
607
  if (C) {
608
- let e = O.current?.getBoundingClientRect();
609
- e && j.show(n, p ?? "", t, e);
608
+ let e = k.current?.getBoundingClientRect();
609
+ e && M.show(n, p ?? "", t, e);
610
610
  }
611
611
  m?.(e, t);
612
612
  }
613
- function le(e) {
613
+ function ue(e) {
614
614
  if (!C) return;
615
- let t = O.current?.getBoundingClientRect();
616
- t && j.move(e, t);
615
+ let t = k.current?.getBoundingClientRect();
616
+ t && M.move(e, t);
617
617
  }
618
618
  function J() {
619
- j.hide(), h?.();
619
+ M.hide(), h?.();
620
620
  }
621
- function ue(e, t, n) {
621
+ function de(e, t, n) {
622
622
  if (!C) return;
623
- let r = O.current?.getBoundingClientRect();
623
+ let r = k.current?.getBoundingClientRect();
624
624
  if (!r) return;
625
- let i = ie.centroid(t), a = A.width / 2 + i[0], o = A.height / 2 + i[1], s = K(e), c = {
625
+ let i = ie.centroid(t), a = j.width / 2 + i[0], o = j.height / 2 + i[1], s = K(e), c = {
626
626
  clientX: r.left + a,
627
627
  clientY: r.top + o
628
628
  };
629
- j.show(s, p ?? "", c, r);
629
+ M.show(s, p ?? "", c, r);
630
630
  }
631
631
  function Y() {
632
- j.hide();
632
+ M.hide();
633
633
  }
634
- let fe = w?.verticalAlign ?? "bottom", pe = g ?? `Doughnut chart with ${n.length} segment${n.length === 1 ? "" : "s"}`;
635
- return /* @__PURE__ */ G(U, { children: [
634
+ let pe = w?.verticalAlign ?? "bottom", me = g ?? `Doughnut chart with ${n.length} segment${n.length === 1 ? "" : "s"}`;
635
+ return /* @__PURE__ */ G(ce, { children: [
636
636
  /* @__PURE__ */ W("style", {
637
637
  precedence: "graphene-charts",
638
- children: Fe
638
+ children: Ie
639
639
  }),
640
640
  y,
641
641
  /* @__PURE__ */ G("div", {
642
642
  className: e("flex h-full w-full flex-col", v),
643
643
  ...b,
644
644
  children: [
645
- w && fe === "top" && R.cloneElement(w.content, {
645
+ w && pe === "top" && z.cloneElement(w.content, {
646
646
  items: oe,
647
647
  verticalAlign: "top",
648
- onItemHover: P,
648
+ onItemHover: F,
649
649
  onItemLeave: ee,
650
- hoveredLegendKey: M
650
+ hoveredLegendKey: N
651
651
  }),
652
652
  /* @__PURE__ */ G("div", {
653
- ref: O,
653
+ ref: k,
654
654
  className: "relative min-h-0 flex-1",
655
655
  children: [
656
656
  /* @__PURE__ */ W("svg", {
657
- ref: k,
657
+ ref: A,
658
658
  role: "img",
659
- "aria-label": pe,
659
+ "aria-label": me,
660
660
  className: "h-full w-full",
661
- children: A.width > 0 && A.height > 0 && /* @__PURE__ */ W("g", {
662
- transform: `translate(${A.width / 2},${A.height / 2})`,
663
- children: V.map((e) => {
664
- let t = e.data, n = `var(--color-${t.category})`, r = z > 0 ? (t.value / z * 100).toFixed(1) : "0", i = `${typeof x[t.category]?.label == "string" ? x[t.category]?.label : t.category}: ${t.value.toLocaleString()} (${r}%)`;
661
+ children: j.width > 0 && j.height > 0 && /* @__PURE__ */ W("g", {
662
+ transform: `translate(${j.width / 2},${j.height / 2})`,
663
+ children: H.map((e) => {
664
+ let t = e.data, n = x[t.category], r = n?.color ?? `var(--color-${T(t.category)})`, i = B > 0 ? (t.value / B * 100).toFixed(1) : "0", a = `${typeof n?.label == "string" ? n.label : t.category}: ${t.value.toLocaleString()} (${i}%)`;
665
665
  return /* @__PURE__ */ G("g", { children: [/* @__PURE__ */ W("path", {
666
666
  d: ie(e) ?? "",
667
- fill: n,
667
+ fill: r,
668
668
  tabIndex: 0,
669
669
  role: "img",
670
- "aria-label": i,
670
+ "aria-label": a,
671
671
  "data-graphene-chart-doughnut-segment": !0,
672
672
  "data-animated": f ? "true" : "false",
673
673
  className: "transition-opacity duration-150 hover:opacity-80 focus:outline-none",
674
- style: M === null ? void 0 : { opacity: M === t.category ? 1 : .15 },
674
+ style: N === null ? void 0 : { opacity: N === t.category ? 1 : .15 },
675
675
  onMouseEnter: (e) => q(t, e),
676
- onMouseMove: le,
676
+ onMouseMove: ue,
677
677
  onMouseLeave: J,
678
- onFocus: (n) => ue(t, e, n),
678
+ onFocus: (n) => de(t, e, n),
679
679
  onBlur: Y
680
- }), T && (() => {
681
- let n = (e.startAngle + e.endAngle) / 2, r = n < Math.PI / 2 || n > 3 * Math.PI / 2, i = ae.centroid(e), a = H.centroid(e), o = a[0] + (r ? 8 : -8), s = a[1], c = o + (r ? 4 : -4), l = se(t), u = l.length > 7, d = u ? `${l.slice(0, 6)}…` : l, f = A.width / 2, p = A.height / 2;
680
+ }), E && (() => {
681
+ let n = (e.startAngle + e.endAngle) / 2, r = n < Math.PI / 2 || n > 3 * Math.PI / 2, i = ae.centroid(e), a = U.centroid(e), o = a[0] + (r ? 8 : -8), s = a[1], c = o + (r ? 4 : -4), l = se(t), u = l.length > 7, d = u ? `${l.slice(0, 6)}…` : l, f = j.width / 2, p = j.height / 2;
682
682
  return /* @__PURE__ */ G("g", {
683
683
  "aria-hidden": "true",
684
684
  className: "cursor-default",
@@ -704,9 +704,9 @@ function Le({ data: n, innerRadius: r = .6, padAngle: i = .02, cornerRadius: a =
704
704
  children: d
705
705
  }),
706
706
  u && /* @__PURE__ */ W("rect", {
707
- x: r ? c : c - Pe,
707
+ x: r ? c : c - Fe,
708
708
  y: s - 8,
709
- width: Pe,
709
+ width: Fe,
710
710
  height: 16,
711
711
  fill: "transparent"
712
712
  })
@@ -716,7 +716,7 @@ function Le({ data: n, innerRadius: r = .6, padAngle: i = .02, cornerRadius: a =
716
716
  })
717
717
  })
718
718
  }),
719
- l && A.width > 0 && A.height > 0 && /* @__PURE__ */ W("div", {
719
+ l && j.width > 0 && j.height > 0 && /* @__PURE__ */ W("div", {
720
720
  className: "pointer-events-none absolute inset-0 flex items-center justify-center",
721
721
  "aria-hidden": "true",
722
722
  children: /* @__PURE__ */ W("div", {
@@ -724,19 +724,19 @@ function Le({ data: n, innerRadius: r = .6, padAngle: i = .02, cornerRadius: a =
724
724
  children: l
725
725
  })
726
726
  }),
727
- F && /* @__PURE__ */ W("div", {
727
+ I && /* @__PURE__ */ W("div", {
728
728
  className: "pointer-events-none absolute z-10 rounded-md border border-border/50 bg-background px-2 py-1 text-xs shadow-md",
729
729
  style: {
730
- left: F.x,
731
- top: F.y,
730
+ left: I.x,
731
+ top: I.y,
732
732
  transform: "translate(-50%, -130%)"
733
733
  },
734
- children: F.text
734
+ children: I.text
735
735
  }),
736
736
  /* @__PURE__ */ W("div", {
737
737
  className: "sr-only",
738
738
  children: /* @__PURE__ */ G("table", { children: [
739
- /* @__PURE__ */ W("caption", { children: pe }),
739
+ /* @__PURE__ */ W("caption", { children: me }),
740
740
  /* @__PURE__ */ W("thead", { children: /* @__PURE__ */ G("tr", { children: [
741
741
  /* @__PURE__ */ W("th", {
742
742
  scope: "col",
@@ -752,7 +752,7 @@ function Le({ data: n, innerRadius: r = .6, padAngle: i = .02, cornerRadius: a =
752
752
  })
753
753
  ] }) }),
754
754
  /* @__PURE__ */ W("tbody", { children: n.map((e) => {
755
- let t = z > 0 ? (e.value / z * 100).toFixed(1) : "0";
755
+ let t = B > 0 ? (e.value / B * 100).toFixed(1) : "0";
756
756
  return /* @__PURE__ */ G("tr", { children: [
757
757
  /* @__PURE__ */ W("th", {
758
758
  scope: "row",
@@ -764,24 +764,24 @@ function Le({ data: n, innerRadius: r = .6, padAngle: i = .02, cornerRadius: a =
764
764
  }) })
765
765
  ] })
766
766
  }),
767
- C && j.state && /* @__PURE__ */ W(o, {
768
- state: j.state,
769
- containerRef: O,
767
+ C && M.state && /* @__PURE__ */ W(s, {
768
+ state: M.state,
769
+ containerRef: k,
770
770
  chartId: S,
771
- children: R.cloneElement(C.content, {
772
- label: j.state.label,
773
- items: j.state.items,
771
+ children: z.cloneElement(C.content, {
772
+ label: M.state.label,
773
+ items: M.state.items,
774
774
  active: !0
775
775
  })
776
776
  })
777
777
  ]
778
778
  }),
779
- w && fe === "bottom" && R.cloneElement(w.content, {
779
+ w && pe === "bottom" && z.cloneElement(w.content, {
780
780
  items: oe,
781
781
  verticalAlign: "bottom",
782
- onItemHover: P,
782
+ onItemHover: F,
783
783
  onItemLeave: ee,
784
- hoveredLegendKey: M
784
+ hoveredLegendKey: N
785
785
  })
786
786
  ]
787
787
  })
@@ -789,10 +789,10 @@ function Le({ data: n, innerRadius: r = .6, padAngle: i = .02, cornerRadius: a =
789
789
  }
790
790
  //#endregion
791
791
  //#region ../../node_modules/lucide-react/dist/esm/shared/src/utils/mergeClasses.mjs
792
- var Re = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e) === t).join(" ").trim(), ze = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), Be = (e) => e.replace(/^([A-Z])|[\s-_]+(\w)/g, (e, t, n) => n ? n.toUpperCase() : t.toLowerCase()), Ve = (e) => {
793
- let t = Be(e);
792
+ var ze = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e) === t).join(" ").trim(), Be = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), Ve = (e) => e.replace(/^([A-Z])|[\s-_]+(\w)/g, (e, t, n) => n ? n.toUpperCase() : t.toLowerCase()), He = (e) => {
793
+ let t = Ve(e);
794
794
  return t.charAt(0).toUpperCase() + t.slice(1);
795
- }, He = {
795
+ }, Ue = {
796
796
  xmlns: "http://www.w3.org/2000/svg",
797
797
  width: 24,
798
798
  height: 24,
@@ -802,40 +802,40 @@ var Re = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
802
802
  strokeWidth: 2,
803
803
  strokeLinecap: "round",
804
804
  strokeLinejoin: "round"
805
- }, Ue = (e) => {
805
+ }, We = (e) => {
806
806
  for (let t in e) if (t.startsWith("aria-") || t === "role" || t === "title") return !0;
807
807
  return !1;
808
- }, We = z({}), Ge = () => ae(We), Ke = V(({ color: e, size: t, strokeWidth: n, absoluteStrokeWidth: r, className: i = "", children: a, iconNode: o, ...s }, c) => {
809
- let { size: l = 24, strokeWidth: u = 2, absoluteStrokeWidth: d = !1, color: f = "currentColor", className: p = "" } = Ge() ?? {}, m = r ?? d ? Number(n ?? u) * 24 / Number(t ?? l) : n ?? u;
810
- return B("svg", {
808
+ }, Ge = B({}), Ke = () => ae(Ge), qe = H(({ color: e, size: t, strokeWidth: n, absoluteStrokeWidth: r, className: i = "", children: a, iconNode: o, ...s }, c) => {
809
+ let { size: l = 24, strokeWidth: u = 2, absoluteStrokeWidth: d = !1, color: f = "currentColor", className: p = "" } = Ke() ?? {}, m = r ?? d ? Number(n ?? u) * 24 / Number(t ?? l) : n ?? u;
810
+ return V("svg", {
811
811
  ref: c,
812
- ...He,
813
- width: t ?? l ?? He.width,
814
- height: t ?? l ?? He.height,
812
+ ...Ue,
813
+ width: t ?? l ?? Ue.width,
814
+ height: t ?? l ?? Ue.height,
815
815
  stroke: e ?? f,
816
816
  strokeWidth: m,
817
- className: Re("lucide", p, i),
818
- ...!a && !Ue(s) && { "aria-hidden": "true" },
817
+ className: ze("lucide", p, i),
818
+ ...!a && !We(s) && { "aria-hidden": "true" },
819
819
  ...s
820
- }, [...o.map(([e, t]) => B(e, t)), ...Array.isArray(a) ? a : [a]]);
820
+ }, [...o.map(([e, t]) => V(e, t)), ...Array.isArray(a) ? a : [a]]);
821
821
  }), X = (e, t) => {
822
- let n = V(({ className: n, ...r }, i) => B(Ke, {
822
+ let n = H(({ className: n, ...r }, i) => V(qe, {
823
823
  ref: i,
824
824
  iconNode: t,
825
- className: Re(`lucide-${ze(Ve(e))}`, `lucide-${e}`, n),
825
+ className: ze(`lucide-${Be(He(e))}`, `lucide-${e}`, n),
826
826
  ...r
827
827
  }));
828
- return n.displayName = Ve(e), n;
829
- }, qe = X("activity", [["path", {
828
+ return n.displayName = He(e), n;
829
+ }, Je = X("activity", [["path", {
830
830
  d: "M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",
831
831
  key: "169zse"
832
- }]]), Je = X("chevron-down", [["path", {
832
+ }]]), Ye = X("chevron-down", [["path", {
833
833
  d: "m6 9 6 6 6-6",
834
834
  key: "qrunsl"
835
- }]]), Ye = X("chevron-right", [["path", {
835
+ }]]), Xe = X("chevron-right", [["path", {
836
836
  d: "m9 18 6-6-6-6",
837
837
  key: "mthhwq"
838
- }]]), Xe = X("circle-x", [
838
+ }]]), Ze = X("circle-x", [
839
839
  ["circle", {
840
840
  cx: "12",
841
841
  cy: "12",
@@ -850,7 +850,7 @@ var Re = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
850
850
  d: "m9 9 6 6",
851
851
  key: "z0biqf"
852
852
  }]
853
- ]), Ze = X("clock", [["circle", {
853
+ ]), Qe = X("clock", [["circle", {
854
854
  cx: "12",
855
855
  cy: "12",
856
856
  r: "10",
@@ -858,7 +858,7 @@ var Re = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
858
858
  }], ["path", {
859
859
  d: "M12 6v6l4 2",
860
860
  key: "mmk7yg"
861
- }]]), Qe = X("server", [
861
+ }]]), $e = X("server", [
862
862
  ["rect", {
863
863
  width: "20",
864
864
  height: "8",
@@ -891,19 +891,19 @@ var Re = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
891
891
  y2: "18",
892
892
  key: "nzw8ys"
893
893
  }]
894
- ]), $e = X("trending-down", [["path", {
894
+ ]), et = X("trending-down", [["path", {
895
895
  d: "M16 17h6v-6",
896
896
  key: "t6n2it"
897
897
  }], ["path", {
898
898
  d: "m22 17-8.5-8.5-5 5L2 7",
899
899
  key: "x473p"
900
- }]]), et = X("trending-up", [["path", {
900
+ }]]), tt = X("trending-up", [["path", {
901
901
  d: "M16 7h6v6",
902
902
  key: "box55l"
903
903
  }], ["path", {
904
904
  d: "m22 7-8.5 8.5-5-5L2 17",
905
905
  key: "1t1m79"
906
- }]]), tt = V((e, t) => /* @__PURE__ */ W("svg", {
906
+ }]]), nt = H((e, t) => /* @__PURE__ */ W("svg", {
907
907
  ref: t,
908
908
  xmlns: "http://www.w3.org/2000/svg",
909
909
  width: 24,
@@ -916,8 +916,8 @@ var Re = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
916
916
  d: "M17.3041 3.541h-3.6718l6.696 16.918H24Zm-10.6082 0L0 20.459h3.7442l1.3693-3.5527h7.0052l1.3693 3.5528h3.7442L10.5363 3.5409Zm-.3712 10.2232 2.2914-5.9456 2.2914 5.9456Z"
917
917
  })
918
918
  }));
919
- tt.displayName = "AnthropicIcon";
920
- var nt = V((e, t) => /* @__PURE__ */ G("svg", {
919
+ nt.displayName = "AnthropicIcon";
920
+ var rt = H((e, t) => /* @__PURE__ */ G("svg", {
921
921
  ref: t,
922
922
  xmlns: "http://www.w3.org/2000/svg",
923
923
  width: 24,
@@ -937,8 +937,8 @@ var nt = V((e, t) => /* @__PURE__ */ G("svg", {
937
937
  clipRule: "evenodd"
938
938
  })]
939
939
  }));
940
- nt.displayName = "ApigeeIcon";
941
- var rt = V((e, t) => /* @__PURE__ */ G("svg", {
940
+ rt.displayName = "ApigeeIcon";
941
+ var it = H((e, t) => /* @__PURE__ */ G("svg", {
942
942
  ref: t,
943
943
  xmlns: "http://www.w3.org/2000/svg",
944
944
  width: 24,
@@ -965,8 +965,8 @@ var rt = V((e, t) => /* @__PURE__ */ G("svg", {
965
965
  })
966
966
  ]
967
967
  }));
968
- rt.displayName = "AwsIcon";
969
- var it = V((e, t) => /* @__PURE__ */ W("svg", {
968
+ it.displayName = "AwsIcon";
969
+ var at = H((e, t) => /* @__PURE__ */ W("svg", {
970
970
  ref: t,
971
971
  xmlns: "http://www.w3.org/2000/svg",
972
972
  width: 24,
@@ -979,8 +979,8 @@ var it = V((e, t) => /* @__PURE__ */ W("svg", {
979
979
  d: "M16.043 20.561a1.391 1.391 0 0 0 .003-.92l.003.01L10.405 2.93h5.184c.203 0 .376.13.439.311v.004l5.638 16.705a.463.463 0 0 1-.287.586l-.004.001-5.332.025Zm-3.988-9.838 3.114 9.226a.464.464 0 0 1-.438.613h-.026a.46.46 0 0 1-.277-.093h.001l-7.978-5.928h4.17l1.434-3.818Zm9.172 10.766h.001a1.391 1.391 0 0 0 1.315-1.848l.003.01v.002l-5.64-16.706A1.394 1.394 0 0 0 15.588 2H9.03c-.61 0-1.127.393-1.315.938l-.003.01-5.64 16.704A1.391 1.391 0 0 0 3.39 21.49h4.075a1.39 1.39 0 0 0 1.315-.938l.003-.01.84-2.484 4.25 3.157c.229.172.517.275.83.275h6.523Z"
980
980
  })
981
981
  }));
982
- it.displayName = "AzureIcon";
983
- var at = V((e, t) => /* @__PURE__ */ W("svg", {
982
+ at.displayName = "AzureIcon";
983
+ var ot = H((e, t) => /* @__PURE__ */ W("svg", {
984
984
  ref: t,
985
985
  xmlns: "http://www.w3.org/2000/svg",
986
986
  width: 24,
@@ -995,8 +995,8 @@ var at = V((e, t) => /* @__PURE__ */ W("svg", {
995
995
  clipRule: "evenodd"
996
996
  })
997
997
  }));
998
- at.displayName = "BitbucketIcon";
999
- var ot = V((e, t) => /* @__PURE__ */ G("svg", {
998
+ ot.displayName = "BitbucketIcon";
999
+ var st = H((e, t) => /* @__PURE__ */ G("svg", {
1000
1000
  ref: t,
1001
1001
  xmlns: "http://www.w3.org/2000/svg",
1002
1002
  width: 24,
@@ -1023,8 +1023,8 @@ var ot = V((e, t) => /* @__PURE__ */ G("svg", {
1023
1023
  })
1024
1024
  ]
1025
1025
  }));
1026
- ot.displayName = "CohereIcon";
1027
- var st = V((e, t) => /* @__PURE__ */ W("svg", {
1026
+ st.displayName = "CohereIcon";
1027
+ var ct = H((e, t) => /* @__PURE__ */ W("svg", {
1028
1028
  ref: t,
1029
1029
  xmlns: "http://www.w3.org/2000/svg",
1030
1030
  width: 24,
@@ -1034,8 +1034,8 @@ var st = V((e, t) => /* @__PURE__ */ W("svg", {
1034
1034
  ...e,
1035
1035
  children: /* @__PURE__ */ W("path", { d: "M6.973 3 4.098 8.188l1.469 2.624L8.442 6h10.25l-1.688-3H6.973Zm8.75 4 2.969 4.906L13.629 21h3.375l5-9-2.781-5h-3.5Zm-3.719 1c-2.207 0-4 1.793-4 4s1.793 4 4 4 4-1.793 4-4-1.793-4-4-4ZM3.535 9.219 2.005 12l4.968 9h5.531l1.656-3H8.41L3.535 9.219Zm8.47.781c1.1 0 2 .898 2 2 0 1.102-.9 2-2 2-1.102 0-2-.898-2-2 0-1.102.898-2 2-2Z" })
1036
1036
  }));
1037
- st.displayName = "GcpIcon";
1038
- var ct = V((e, t) => /* @__PURE__ */ W("svg", {
1037
+ ct.displayName = "GcpIcon";
1038
+ var lt = H((e, t) => /* @__PURE__ */ W("svg", {
1039
1039
  ref: t,
1040
1040
  xmlns: "http://www.w3.org/2000/svg",
1041
1041
  width: 24,
@@ -1051,8 +1051,8 @@ var ct = V((e, t) => /* @__PURE__ */ W("svg", {
1051
1051
  d: "M9.357 19.48c-4.553 1.484-4.553-2.65-6.353-3.18m12.706 5.3v-3.71c0-1.06.106-1.485-.53-2.12 2.965-.319 5.824-1.485 5.824-6.361a4.88 4.88 0 0 0-1.376-3.393 4.46 4.46 0 0 0-.106-3.392s-1.165-.318-3.706 1.378a13.008 13.008 0 0 0-6.565 0C6.71 2.306 5.545 2.624 5.545 2.624a4.458 4.458 0 0 0-.106 3.392A4.88 4.88 0 0 0 4.063 9.41c0 4.876 2.859 6.042 5.824 6.36-.636.636-.636 1.272-.53 2.12v3.71"
1052
1052
  })
1053
1053
  }));
1054
- ct.displayName = "GithubIcon";
1055
- var lt = V((e, t) => /* @__PURE__ */ W("svg", {
1054
+ lt.displayName = "GithubIcon";
1055
+ var ut = H((e, t) => /* @__PURE__ */ W("svg", {
1056
1056
  ref: t,
1057
1057
  xmlns: "http://www.w3.org/2000/svg",
1058
1058
  width: 24,
@@ -1068,8 +1068,8 @@ var lt = V((e, t) => /* @__PURE__ */ W("svg", {
1068
1068
  d: "m22.004 13.29-3.33-10a.42.42 0 0 0-.14-.18.38.38 0 0 0-.22-.11.39.39 0 0 0-.37.25l-2.26 6.67h-7.36l-2.22-6.66a.42.42 0 0 0-.1-.18.38.38 0 0 0-.26-.08.39.39 0 0 0-.37.25l-3.37 10.04a.74.74 0 0 0 .27.83l9.73 6.88 9.69-6.88a.71.71 0 0 0 .31-.83v0Z"
1069
1069
  })
1070
1070
  }));
1071
- lt.displayName = "GitlabIcon";
1072
- var ut = V((e, t) => /* @__PURE__ */ W("svg", {
1071
+ ut.displayName = "GitlabIcon";
1072
+ var dt = H((e, t) => /* @__PURE__ */ W("svg", {
1073
1073
  ref: t,
1074
1074
  xmlns: "http://www.w3.org/2000/svg",
1075
1075
  width: 24,
@@ -1082,8 +1082,8 @@ var ut = V((e, t) => /* @__PURE__ */ W("svg", {
1082
1082
  d: "M15.748 13.131c-.821 0-1.558.363-2.063.933l-1.293-.91a3.51 3.51 0 0 0 .216-1.203c0-.415-.076-.812-.209-1.183l1.29-.9a2.75 2.75 0 0 0 2.06.927A2.748 2.748 0 0 0 18.5 8.058a2.748 2.748 0 0 0-2.752-2.738 2.748 2.748 0 0 0-2.751 2.738c0 .27.041.53.115.777l-1.291.902a3.556 3.556 0 0 0-2.2-1.273V6.916a2.745 2.745 0 0 0 2.185-2.678A2.748 2.748 0 0 0 9.054 1.5a2.748 2.748 0 0 0-2.752 2.738c0 1.298.915 2.387 2.137 2.666v1.568C6.772 8.762 5.5 10.21 5.5 11.95c0 1.75 1.284 3.202 2.963 3.483v1.656a2.744 2.744 0 0 0-2.16 2.672 2.748 2.748 0 0 0 2.75 2.739 2.748 2.748 0 0 0 2.752-2.738 2.745 2.745 0 0 0-2.161-2.672v-1.656c.867-.145 1.63-.6 2.163-1.252l1.302.917a2.71 2.71 0 0 0-.113.77 2.748 2.748 0 0 0 2.752 2.738 2.748 2.748 0 0 0 2.751-2.738 2.748 2.748 0 0 0-2.752-2.738Zm0-6.4c.736 0 1.335.595 1.335 1.327 0 .731-.599 1.327-1.334 1.327a1.332 1.332 0 0 1-1.335-1.327c0-.732.599-1.328 1.335-1.328ZM7.72 4.237c0-.732.598-1.328 1.334-1.328.736 0 1.334.596 1.334 1.328 0 .731-.598 1.327-1.334 1.327A1.332 1.332 0 0 1 7.72 4.238Zm2.668 15.524c0 .732-.598 1.328-1.334 1.328a1.332 1.332 0 0 1-1.334-1.328c0-.731.598-1.327 1.334-1.327.736 0 1.334.596 1.334 1.327Zm-1.334-5.96c-1.026 0-1.86-.83-1.86-1.851 0-1.02.834-1.851 1.86-1.851 1.026 0 1.86.83 1.86 1.851 0 1.02-.834 1.851-1.86 1.851Zm6.694 3.394a1.332 1.332 0 0 1-1.334-1.327c0-.732.599-1.327 1.335-1.327.735 0 1.333.595 1.333 1.327s-.598 1.327-1.334 1.327Z"
1083
1083
  })
1084
1084
  }));
1085
- ut.displayName = "KafkaIcon";
1086
- var dt = V((e, t) => /* @__PURE__ */ W("svg", {
1085
+ dt.displayName = "KafkaIcon";
1086
+ var ft = H((e, t) => /* @__PURE__ */ W("svg", {
1087
1087
  ref: t,
1088
1088
  xmlns: "http://www.w3.org/2000/svg",
1089
1089
  width: 24,
@@ -1096,8 +1096,8 @@ var dt = V((e, t) => /* @__PURE__ */ W("svg", {
1096
1096
  d: "m23 14.095-2.748-.63a8.18 8.18 0 0 0-1.269-5.53l2.113-1.692-1.037-1.306-2.112 1.69a8.282 8.282 0 0 0-5.115-2.48V1.6h-1.664v2.548a8.282 8.282 0 0 0-5.115 2.48L3.941 4.937 2.903 6.243l2.114 1.691a8.194 8.194 0 0 0-1.269 5.532L1 14.096l.37 1.627 2.744-.629a8.374 8.374 0 0 0 3.55 4.474l-1.106 2.308 1.5.724 1.105-2.306a8.134 8.134 0 0 0 5.675 0l1.105 2.306 1.5-.725-1.107-2.307a8.374 8.374 0 0 0 3.55-4.474l2.744.629.37-1.628Zm-4.345-1.64c0 .215-.012.427-.032.637l-4.16-.953a2.482 2.482 0 0 0-.114-.496l3.325-2.661a6.648 6.648 0 0 1 .981 3.473Zm-7.487 0a.837.837 0 0 1 .514-.771.829.829 0 0 1 1.134.608.839.839 0 0 1-.354.857.83.83 0 0 1-1.05-.104.837.837 0 0 1-.244-.59Zm5.47-4.78-3.324 2.66a2.49 2.49 0 0 0-.482-.231V5.833a6.625 6.625 0 0 1 3.806 1.841Zm-5.47-1.842v4.27a2.49 2.49 0 0 0-.482.232l-3.324-2.66a6.626 6.626 0 0 1 3.806-1.842Zm-5.823 6.622c0-1.226.34-2.429.981-3.473l3.325 2.66a2.485 2.485 0 0 0-.115.497l-4.16.953a6.763 6.763 0 0 1-.031-.637Zm.402 2.265 4.139-.949c.098.162.213.313.345.448l-1.842 3.84a6.701 6.701 0 0 1-2.642-3.339ZM12 19.135a6.607 6.607 0 0 1-2.113-.35l1.847-3.852c.088.014.177.023.266.027.089-.004.178-.013.265-.027l1.848 3.852c-.68.23-1.394.35-2.113.35Zm3.611-1.077-1.842-3.839c.132-.136.247-.286.345-.448l4.139.949a6.701 6.701 0 0 1-2.642 3.338Z"
1097
1097
  })
1098
1098
  }));
1099
- dt.displayName = "KubernetesIcon";
1100
- var ft = V((e, t) => /* @__PURE__ */ G("svg", {
1099
+ ft.displayName = "KubernetesIcon";
1100
+ var pt = H((e, t) => /* @__PURE__ */ G("svg", {
1101
1101
  ref: t,
1102
1102
  xmlns: "http://www.w3.org/2000/svg",
1103
1103
  width: 24,
@@ -1148,8 +1148,8 @@ var ft = V((e, t) => /* @__PURE__ */ G("svg", {
1148
1148
  })
1149
1149
  ]
1150
1150
  }));
1151
- ft.displayName = "MistralIcon";
1152
- var pt = V((e, t) => /* @__PURE__ */ W("svg", {
1151
+ pt.displayName = "MistralIcon";
1152
+ var mt = H((e, t) => /* @__PURE__ */ W("svg", {
1153
1153
  ref: t,
1154
1154
  xmlns: "http://www.w3.org/2000/svg",
1155
1155
  width: 24,
@@ -1162,9 +1162,9 @@ var pt = V((e, t) => /* @__PURE__ */ W("svg", {
1162
1162
  d: "M304.246 294.611V249.028c0-3.839 1.441-6.719 4.798-8.636l91.648-52.78c12.475-7.197 27.35-10.554 42.702-10.554 57.577 0 94.046 44.624 94.046 92.124 0 3.358 0 7.197-.481 11.036l-95.005-55.66c-5.757-3.357-11.517-3.357-17.274 0l-120.434 70.053ZM518.245 472.145V363.224c0-6.719-2.881-11.517-8.637-14.875l-120.434-70.053 39.345-22.553c3.358-1.917 6.238-1.917 9.596 0l91.647 52.78c26.392 15.356 44.143 47.982 44.143 79.648 0 36.465-21.59 70.054-55.66 83.97v.004ZM275.937 376.182l-39.345-23.03c-3.357-1.917-4.798-4.798-4.798-8.637V238.956c0-51.339 39.345-90.207 92.606-90.207 20.155 0 38.864 6.719 54.702 18.714l-94.524 54.701c-5.756 3.357-8.636 8.155-8.636 14.875v139.147l-.005-.004ZM360.626 425.122 304.246 393.455v-67.172l56.38-31.667 56.376 31.667v67.172l-56.376 31.667ZM396.852 570.989c-20.154 0-38.863-6.719-54.701-18.713l94.523-54.702c5.757-3.357 8.637-8.155 8.637-14.875V343.552l39.827 23.03c3.357 1.917 4.798 4.797 4.798 8.637v105.559c0 51.339-39.827 90.207-93.084 90.207v.004ZM283.134 463.99l-91.648-52.779c-26.392-15.357-44.143-47.982-44.143-79.649 0-36.946 22.072-70.053 56.137-83.969v109.398c0 6.719 2.881 11.517 8.637 14.875l119.957 69.571-39.345 22.553c-3.357 1.917-6.238 1.917-9.595 0ZM277.859 542.68c-54.22 0-94.046-40.785-94.046-91.166 0-3.839.481-7.678.958-11.517l94.524 54.701c5.756 3.358 11.517 3.358 17.273 0L417.002 425.127v45.583c0 3.839-1.44 6.719-4.798 8.636l-91.647 52.78c-12.476 7.197-27.351 10.554-42.703 10.554h.005ZM396.852 599.776c58.059 0 106.518-41.263 117.558-95.964 53.739-13.916 88.286-64.297 88.286-115.636 0-33.589-14.393-66.214-40.304-89.726 2.399-10.077 3.839-20.154 3.839-30.226 0-68.613-55.66-119.957-119.957-119.957-12.952 0-25.428 1.917-37.904 6.238-21.595-21.113-51.344-34.547-83.97-34.547-58.058 0-106.517 41.262-117.557 95.963-53.739 13.916-88.286 64.297-88.286 115.636 0 33.589 14.393 66.214 40.304 89.726-2.399 10.077-3.839 20.154-3.839 30.227 0 68.613 55.66 119.956 119.956 119.956 12.953 0 25.429-1.917 37.905-6.238 21.59 21.113 51.339 34.548 83.969 34.548Z"
1163
1163
  })
1164
1164
  }));
1165
- pt.displayName = "OpenAIIcon";
1166
- var mt = V((e, t) => {
1167
- let n = H();
1165
+ mt.displayName = "OpenAIIcon";
1166
+ var ht = H((e, t) => {
1167
+ let n = U();
1168
1168
  return /* @__PURE__ */ G("svg", {
1169
1169
  ref: t,
1170
1170
  xmlns: "http://www.w3.org/2000/svg",
@@ -1388,9 +1388,9 @@ var mt = V((e, t) => {
1388
1388
  })]
1389
1389
  });
1390
1390
  });
1391
- mt.displayName = "GioAgentManagementIcon";
1392
- var ht = V((e, t) => {
1393
- let n = H();
1391
+ ht.displayName = "GioAgentManagementIcon";
1392
+ var gt = H((e, t) => {
1393
+ let n = U();
1394
1394
  return /* @__PURE__ */ G("svg", {
1395
1395
  ref: t,
1396
1396
  xmlns: "http://www.w3.org/2000/svg",
@@ -1627,9 +1627,9 @@ var ht = V((e, t) => {
1627
1627
  })]
1628
1628
  });
1629
1629
  });
1630
- ht.displayName = "GioApiManagementIcon";
1631
- var gt = V((e, t) => {
1632
- let n = H();
1630
+ gt.displayName = "GioApiManagementIcon";
1631
+ var _t = H((e, t) => {
1632
+ let n = U();
1633
1633
  return /* @__PURE__ */ G("svg", {
1634
1634
  ref: t,
1635
1635
  xmlns: "http://www.w3.org/2000/svg",
@@ -1755,9 +1755,9 @@ var gt = V((e, t) => {
1755
1755
  })]
1756
1756
  });
1757
1757
  });
1758
- gt.displayName = "GioAuthorizationIcon";
1759
- var _t = V((e, t) => {
1760
- let n = H();
1758
+ _t.displayName = "GioAuthorizationIcon";
1759
+ var vt = H((e, t) => {
1760
+ let n = U();
1761
1761
  return /* @__PURE__ */ G("svg", {
1762
1762
  ref: t,
1763
1763
  xmlns: "http://www.w3.org/2000/svg",
@@ -1943,9 +1943,9 @@ var _t = V((e, t) => {
1943
1943
  })]
1944
1944
  });
1945
1945
  });
1946
- _t.displayName = "GioCatalogIcon";
1947
- var vt = V((e, t) => {
1948
- let n = H();
1946
+ vt.displayName = "GioCatalogIcon";
1947
+ var yt = H((e, t) => {
1948
+ let n = U();
1949
1949
  return /* @__PURE__ */ G("svg", {
1950
1950
  ref: t,
1951
1951
  xmlns: "http://www.w3.org/2000/svg",
@@ -2169,9 +2169,9 @@ var vt = V((e, t) => {
2169
2169
  })]
2170
2170
  });
2171
2171
  });
2172
- vt.displayName = "GioDeveloperPortalIcon";
2173
- var yt = V((e, t) => {
2174
- let n = H();
2172
+ yt.displayName = "GioDeveloperPortalIcon";
2173
+ var bt = H((e, t) => {
2174
+ let n = U();
2175
2175
  return /* @__PURE__ */ G("svg", {
2176
2176
  ref: t,
2177
2177
  xmlns: "http://www.w3.org/2000/svg",
@@ -2357,9 +2357,9 @@ var yt = V((e, t) => {
2357
2357
  })]
2358
2358
  });
2359
2359
  });
2360
- yt.displayName = "GioEventApiManagementIcon";
2361
- var bt = V((e, t) => {
2362
- let n = H();
2360
+ bt.displayName = "GioEventApiManagementIcon";
2361
+ var xt = H((e, t) => {
2362
+ let n = U();
2363
2363
  return /* @__PURE__ */ G("svg", {
2364
2364
  ref: t,
2365
2365
  xmlns: "http://www.w3.org/2000/svg",
@@ -2599,9 +2599,9 @@ var bt = V((e, t) => {
2599
2599
  })]
2600
2600
  });
2601
2601
  });
2602
- bt.displayName = "GioGammaIcon";
2603
- var xt = V((e, t) => {
2604
- let n = H();
2602
+ xt.displayName = "GioGammaIcon";
2603
+ var St = H((e, t) => {
2604
+ let n = U();
2605
2605
  return /* @__PURE__ */ G("svg", {
2606
2606
  ref: t,
2607
2607
  xmlns: "http://www.w3.org/2000/svg",
@@ -2841,9 +2841,9 @@ var xt = V((e, t) => {
2841
2841
  })]
2842
2842
  });
2843
2843
  });
2844
- xt.displayName = "GioHomeIcon";
2845
- var St = V((e, t) => {
2846
- let n = H();
2844
+ St.displayName = "GioHomeIcon";
2845
+ var Ct = H((e, t) => {
2846
+ let n = U();
2847
2847
  return /* @__PURE__ */ G("svg", {
2848
2848
  ref: t,
2849
2849
  xmlns: "http://www.w3.org/2000/svg",
@@ -3137,9 +3137,9 @@ var St = V((e, t) => {
3137
3137
  })]
3138
3138
  });
3139
3139
  });
3140
- St.displayName = "GioIamIcon";
3141
- var Ct = V((e, t) => {
3142
- let n = H();
3140
+ Ct.displayName = "GioIamIcon";
3141
+ var wt = H((e, t) => {
3142
+ let n = U();
3143
3143
  return /* @__PURE__ */ G("svg", {
3144
3144
  ref: t,
3145
3145
  xmlns: "http://www.w3.org/2000/svg",
@@ -3363,9 +3363,9 @@ var Ct = V((e, t) => {
3363
3363
  })]
3364
3364
  });
3365
3365
  });
3366
- Ct.displayName = "GioObservabilityIcon";
3367
- var wt = V((e, t) => {
3368
- let n = H();
3366
+ wt.displayName = "GioObservabilityIcon";
3367
+ var Tt = H((e, t) => {
3368
+ let n = U();
3369
3369
  return /* @__PURE__ */ G("svg", {
3370
3370
  ref: t,
3371
3371
  xmlns: "http://www.w3.org/2000/svg",
@@ -3483,9 +3483,9 @@ var wt = V((e, t) => {
3483
3483
  })]
3484
3484
  });
3485
3485
  });
3486
- wt.displayName = "GioObserveIcon";
3487
- var Tt = V((e, t) => {
3488
- let n = H();
3486
+ Tt.displayName = "GioObserveIcon";
3487
+ var Et = H((e, t) => {
3488
+ let n = U();
3489
3489
  return /* @__PURE__ */ G("svg", {
3490
3490
  ref: t,
3491
3491
  xmlns: "http://www.w3.org/2000/svg",
@@ -3815,9 +3815,9 @@ var Tt = V((e, t) => {
3815
3815
  })]
3816
3816
  });
3817
3817
  });
3818
- Tt.displayName = "GioPlatformIcon";
3819
- var Et = V((e, t) => {
3820
- let n = H();
3818
+ Et.displayName = "GioPlatformIcon";
3819
+ var Dt = H((e, t) => {
3820
+ let n = U();
3821
3821
  return /* @__PURE__ */ G("svg", {
3822
3822
  ref: t,
3823
3823
  xmlns: "http://www.w3.org/2000/svg",
@@ -3935,9 +3935,9 @@ var Et = V((e, t) => {
3935
3935
  })]
3936
3936
  });
3937
3937
  });
3938
- Et.displayName = "GioProductizeIcon";
3939
- var Dt = V((e, t) => {
3940
- let n = H();
3938
+ Dt.displayName = "GioProductizeIcon";
3939
+ var Ot = H((e, t) => {
3940
+ let n = U();
3941
3941
  return /* @__PURE__ */ G("svg", {
3942
3942
  ref: t,
3943
3943
  xmlns: "http://www.w3.org/2000/svg",
@@ -4063,10 +4063,10 @@ var Dt = V((e, t) => {
4063
4063
  })]
4064
4064
  });
4065
4065
  });
4066
- Dt.displayName = "GioSecureIcon";
4066
+ Ot.displayName = "GioSecureIcon";
4067
4067
  //#endregion
4068
4068
  //#region src/lib/useContainerSize.ts
4069
- function Ot() {
4069
+ function kt() {
4070
4070
  let [e, t] = se({
4071
4071
  width: 0,
4072
4072
  height: 0
@@ -4091,29 +4091,29 @@ function Ot() {
4091
4091
  }
4092
4092
  //#endregion
4093
4093
  //#region src/charts/Metric/Metric.tsx
4094
- var kt = {
4094
+ var At = {
4095
4095
  positive: "text-success",
4096
4096
  negative: "text-destructive",
4097
4097
  neutral: "text-muted-foreground"
4098
4098
  };
4099
- function At(e, t) {
4099
+ function jt(e, t) {
4100
4100
  return e === "neutral" || t === "neutral" ? "neutral" : t === "higher-is-better" ? e === "up" ? "positive" : "negative" : e === "up" ? "negative" : "positive";
4101
4101
  }
4102
- var jt = 56;
4103
- function Mt(e, t) {
4102
+ var Mt = 56;
4103
+ function Nt(e, t) {
4104
4104
  let n = Math.min(t > 0 ? t : 100, (e > 0 ? e : 200) * .65);
4105
4105
  return Math.max(18, Math.min(96, Math.round(n * .22)));
4106
4106
  }
4107
- function Nt(e) {
4107
+ function Pt(e) {
4108
4108
  return Math.max(10, Math.round(e * .22));
4109
4109
  }
4110
- function Pt(e) {
4110
+ function Ft(e) {
4111
4111
  return e < 80 ? "text-sm font-semibold leading-tight" : e < 110 ? "text-base font-semibold leading-tight" : e < 150 ? "text-lg font-semibold leading-tight" : "text-xl font-semibold leading-tight";
4112
4112
  }
4113
- function Ft(e) {
4113
+ function It(e) {
4114
4114
  return e < 50 ? "text-[9px]" : e < 80 ? "text-[10px]" : e < 120 ? "text-xs" : "text-sm";
4115
4115
  }
4116
- function It(e) {
4116
+ function Lt(e) {
4117
4117
  return e < 60 ? {
4118
4118
  text: "text-[9px]",
4119
4119
  icon: "size-2"
@@ -4128,12 +4128,12 @@ function It(e) {
4128
4128
  icon: "size-3.5"
4129
4129
  };
4130
4130
  }
4131
- function Lt({ data: t, color: n, colorClass: r }) {
4132
- let i = R.useRef(null), [a, o] = R.useState({
4131
+ function Rt({ data: t, color: n, colorClass: r }) {
4132
+ let i = z.useRef(null), [a, o] = z.useState({
4133
4133
  width: 0,
4134
4134
  height: 0
4135
- }), s = R.useId();
4136
- if (R.useEffect(() => {
4135
+ }), s = z.useId();
4136
+ if (z.useEffect(() => {
4137
4137
  let e = i.current;
4138
4138
  if (!e) return;
4139
4139
  let t = new ResizeObserver(([e]) => {
@@ -4150,7 +4150,7 @@ function Lt({ data: t, color: n, colorClass: r }) {
4150
4150
  ref: i,
4151
4151
  className: e("h-full w-full", r),
4152
4152
  "aria-hidden": "true",
4153
- children: c > 0 && l > 0 && g && _ && /* @__PURE__ */ G(U, { children: [
4153
+ children: c > 0 && l > 0 && g && _ && /* @__PURE__ */ G(ce, { children: [
4154
4154
  /* @__PURE__ */ W("defs", { children: /* @__PURE__ */ G("linearGradient", {
4155
4155
  id: s,
4156
4156
  x1: "0",
@@ -4180,10 +4180,10 @@ function Lt({ data: t, color: n, colorClass: r }) {
4180
4180
  ] })
4181
4181
  });
4182
4182
  }
4183
- function Rt({ trend: t, sentiment: n, trendClass: r }) {
4184
- let i = t.direction === "down" ? $e : et;
4183
+ function zt({ trend: t, sentiment: n, trendClass: r }) {
4184
+ let i = t.direction === "down" ? et : tt;
4185
4185
  return /* @__PURE__ */ G("span", {
4186
- className: e("inline-flex items-center gap-1 font-medium", r.text, kt[n]),
4186
+ className: e("inline-flex items-center gap-1 font-medium", r.text, At[n]),
4187
4187
  children: [
4188
4188
  t.direction !== "neutral" && /* @__PURE__ */ W(i, { className: r.icon }),
4189
4189
  t.value,
@@ -4191,7 +4191,7 @@ function Rt({ trend: t, sentiment: n, trendClass: r }) {
4191
4191
  ]
4192
4192
  });
4193
4193
  }
4194
- function zt({ className: t, ...n }) {
4194
+ function Bt({ className: t, ...n }) {
4195
4195
  return /* @__PURE__ */ G("div", {
4196
4196
  role: "img",
4197
4197
  "aria-busy": "true",
@@ -4202,23 +4202,23 @@ function zt({ className: t, ...n }) {
4202
4202
  className: "flex flex-col gap-1.5",
4203
4203
  children: [/* @__PURE__ */ G("div", {
4204
4204
  className: "flex items-center justify-between gap-2",
4205
- children: [/* @__PURE__ */ W(g, { className: "h-7 w-20 shrink-0" }), /* @__PURE__ */ W(g, { className: "size-5 shrink-0 rounded-full" })]
4205
+ children: [/* @__PURE__ */ W(_, { className: "h-7 w-20 shrink-0" }), /* @__PURE__ */ W(_, { className: "size-5 shrink-0 rounded-full" })]
4206
4206
  }), /* @__PURE__ */ G("div", {
4207
4207
  className: "flex items-center justify-between gap-2",
4208
- children: [/* @__PURE__ */ W(g, { className: "h-4 min-w-0 flex-1" }), /* @__PURE__ */ W(g, { className: "h-4 w-16 shrink-0" })]
4208
+ children: [/* @__PURE__ */ W(_, { className: "h-4 min-w-0 flex-1" }), /* @__PURE__ */ W(_, { className: "h-4 w-16 shrink-0" })]
4209
4209
  })]
4210
- }), /* @__PURE__ */ W(g, { className: "min-h-5 w-full flex-1" })]
4210
+ }), /* @__PURE__ */ W(_, { className: "min-h-5 w-full flex-1" })]
4211
4211
  });
4212
4212
  }
4213
- function Bt({ value: t, label: n, state: r, description: i, icon: a, trend: o, trendSentiment: s = "higher-is-better", centered: c = !1, sparklineData: l, sparklineColor: u, className: d, ...f }) {
4214
- let { ref: p, width: m, height: h } = Ot();
4215
- if (r === "loading") return /* @__PURE__ */ W(zt, {
4213
+ function Vt({ value: t, label: n, state: r, description: i, icon: a, trend: o, trendSentiment: s = "higher-is-better", centered: c = !1, sparklineData: l, sparklineColor: u, className: d, ...f }) {
4214
+ let { ref: p, width: m, height: h } = kt();
4215
+ if (r === "loading") return /* @__PURE__ */ W(Bt, {
4216
4216
  className: d,
4217
4217
  ...f
4218
4218
  });
4219
- let g = r === "empty" ? "—" : t, _ = r === "empty" ? void 0 : o, v = r === "empty" ? void 0 : l, y = _ ? At(_.direction, s) : void 0, b = !u && y ? kt[y] : void 0, x = u ?? (y ? void 0 : "var(--chart-1)"), S = v != null && v.length >= 2 && h >= jt && !c, C = c || !S, w = Pt(h), T = Ft(h), E = It(h), D = n && h > 50, O = !!(_ && y && (S || h > 40));
4219
+ let g = r === "empty" ? "—" : t, _ = r === "empty" ? void 0 : o, v = r === "empty" ? void 0 : l, y = _ ? jt(_.direction, s) : void 0, b = !u && y ? At[y] : void 0, x = u ?? (y ? void 0 : "var(--chart-1)"), S = v != null && v.length >= 2 && h >= Mt && !c, C = c || !S, w = Ft(h), T = It(h), E = Lt(h), D = n && h > 50, O = !!(_ && y && (S || h > 40));
4220
4220
  if (C) {
4221
- let t = Mt(m, h), r = Nt(t);
4221
+ let t = Nt(m, h), r = Pt(t);
4222
4222
  return /* @__PURE__ */ G("div", {
4223
4223
  ref: p,
4224
4224
  className: e("flex h-full flex-col items-center justify-center gap-1 text-center", d),
@@ -4234,7 +4234,7 @@ function Bt({ value: t, label: n, state: r, description: i, icon: a, trend: o, t
4234
4234
  style: { fontSize: r },
4235
4235
  children: n
4236
4236
  }),
4237
- O && _ && y && /* @__PURE__ */ W(Rt, {
4237
+ O && _ && y && /* @__PURE__ */ W(zt, {
4238
4238
  trend: _,
4239
4239
  sentiment: y,
4240
4240
  trendClass: E
@@ -4258,7 +4258,7 @@ function Bt({ value: t, label: n, state: r, description: i, icon: a, trend: o, t
4258
4258
  }),
4259
4259
  O && _ && y && /* @__PURE__ */ G("span", {
4260
4260
  className: "flex shrink-0 items-center gap-1",
4261
- children: [/* @__PURE__ */ W(Rt, {
4261
+ children: [/* @__PURE__ */ W(zt, {
4262
4262
  trend: _,
4263
4263
  sentiment: y,
4264
4264
  trendClass: E
@@ -4278,7 +4278,7 @@ function Bt({ value: t, label: n, state: r, description: i, icon: a, trend: o, t
4278
4278
  ]
4279
4279
  }), /* @__PURE__ */ W("div", {
4280
4280
  className: "min-h-0 flex-1 pt-1",
4281
- children: /* @__PURE__ */ W(Lt, {
4281
+ children: /* @__PURE__ */ W(Rt, {
4282
4282
  data: v,
4283
4283
  color: x,
4284
4284
  colorClass: b
@@ -4291,40 +4291,40 @@ function Bt({ value: t, label: n, state: r, description: i, icon: a, trend: o, t
4291
4291
  function Z(e) {
4292
4292
  return "category" in e && "metrics" in e;
4293
4293
  }
4294
- var Vt = {
4294
+ var Ht = {
4295
4295
  positive: "text-success",
4296
4296
  negative: "text-destructive",
4297
4297
  neutral: "text-muted-foreground"
4298
4298
  };
4299
- function Ht(e) {
4299
+ function Ut(e) {
4300
4300
  let t = 0;
4301
4301
  for (let n of e) t += Z(n) ? n.metrics.length : 1;
4302
4302
  return t;
4303
4303
  }
4304
- function Ut(e) {
4304
+ function Wt(e) {
4305
4305
  return Z(e) ? e.metrics.length : 1;
4306
4306
  }
4307
- var Wt = [
4307
+ var Gt = [
4308
4308
  "xs",
4309
4309
  "sm",
4310
4310
  "md",
4311
4311
  "lg"
4312
4312
  ];
4313
- function Gt(e, t, n) {
4313
+ function Kt(e, t, n) {
4314
4314
  let r = e / Math.max(n, 1), i = r < 40 ? "xs" : r < 70 ? "sm" : r < 110 ? "md" : "lg", a = t < 25 ? "xs" : t < 40 ? "sm" : t < 60 ? "md" : "lg";
4315
- return Wt[Math.min(Wt.indexOf(i), Wt.indexOf(a))];
4315
+ return Gt[Math.min(Gt.indexOf(i), Gt.indexOf(a))];
4316
4316
  }
4317
- var Kt = {
4317
+ var qt = {
4318
4318
  xs: 40,
4319
4319
  sm: 55,
4320
4320
  md: 75,
4321
4321
  lg: 100
4322
- }, qt = 40, Jt = 80;
4323
- function Yt(e, t, n) {
4324
- if (e < Jt) return 0;
4325
- let r = Kt[n], i = 0, a = 0;
4322
+ }, Jt = 40, Yt = 80;
4323
+ function Xt(e, t, n) {
4324
+ if (e < Yt) return 0;
4325
+ let r = qt[n], i = 0, a = 0;
4326
4326
  for (let n = 0; n < t.length; n++) {
4327
- let o = r * Ut(t[n]), s = t.length - (n + 1) > 0 ? qt : 0;
4327
+ let o = r * Wt(t[n]), s = t.length - (n + 1) > 0 ? Jt : 0;
4328
4328
  if (a + o + s > e) break;
4329
4329
  a += o, i++;
4330
4330
  }
@@ -4368,10 +4368,10 @@ var Q = {
4368
4368
  lg: "px-5"
4369
4369
  }
4370
4370
  };
4371
- function Xt({ trend: t, sentiment: n, size: r }) {
4372
- let i = t.direction === "down" ? $e : et;
4371
+ function Zt({ trend: t, sentiment: n, size: r }) {
4372
+ let i = t.direction === "down" ? et : tt;
4373
4373
  return /* @__PURE__ */ G("span", {
4374
- className: e("inline-flex items-center gap-px font-medium", Q.trend[r], Vt[n]),
4374
+ className: e("inline-flex items-center gap-px font-medium", Q.trend[r], Ht[n]),
4375
4375
  children: [
4376
4376
  t.direction !== "neutral" && /* @__PURE__ */ W(i, { className: Q.trendIcon[r] }),
4377
4377
  t.value,
@@ -4379,15 +4379,15 @@ function Xt({ trend: t, sentiment: n, size: r }) {
4379
4379
  ]
4380
4380
  });
4381
4381
  }
4382
- function Zt({ item: t, size: n, labelVisible: r }) {
4383
- let i = t.trend ? At(t.trend.direction, t.trendSentiment ?? "higher-is-better") : void 0, a = r && t.label, o = /* @__PURE__ */ G("div", {
4382
+ function Qt({ item: t, size: n, labelVisible: r }) {
4383
+ let i = t.trend ? jt(t.trend.direction, t.trendSentiment ?? "higher-is-better") : void 0, a = r && t.label, o = /* @__PURE__ */ G("div", {
4384
4384
  className: "flex min-w-0 flex-col items-center text-center",
4385
4385
  children: [/* @__PURE__ */ G("div", {
4386
4386
  className: "flex items-baseline gap-0.5",
4387
4387
  children: [/* @__PURE__ */ W("span", {
4388
4388
  className: e("truncate tracking-tight text-foreground", Q.value[n]),
4389
4389
  children: t.value
4390
- }), t.trend && i && /* @__PURE__ */ W(Xt, {
4390
+ }), t.trend && i && /* @__PURE__ */ W(Zt, {
4391
4391
  trend: t.trend,
4392
4392
  sentiment: i,
4393
4393
  size: n
@@ -4397,7 +4397,7 @@ function Zt({ item: t, size: n, labelVisible: r }) {
4397
4397
  children: t.label
4398
4398
  })]
4399
4399
  });
4400
- return !a && t.label ? /* @__PURE__ */ G(ne, { children: [/* @__PURE__ */ W(L, {
4400
+ return !a && t.label ? /* @__PURE__ */ G(ne, { children: [/* @__PURE__ */ W(R, {
4401
4401
  asChild: !0,
4402
4402
  children: /* @__PURE__ */ W("div", {
4403
4403
  className: "flex min-w-0 flex-1 cursor-default justify-center",
@@ -4408,9 +4408,9 @@ function Zt({ item: t, size: n, labelVisible: r }) {
4408
4408
  children: o
4409
4409
  });
4410
4410
  }
4411
- function Qt({ count: t, size: n }) {
4411
+ function $t({ count: t, size: n }) {
4412
4412
  let r = `${t} more ${t === 1 ? "metric" : "metrics"} hidden`;
4413
- return /* @__PURE__ */ G(ne, { children: [/* @__PURE__ */ W(L, {
4413
+ return /* @__PURE__ */ G(ne, { children: [/* @__PURE__ */ W(R, {
4414
4414
  asChild: !0,
4415
4415
  children: /* @__PURE__ */ G("div", {
4416
4416
  role: "status",
@@ -4420,7 +4420,7 @@ function Qt({ count: t, size: n }) {
4420
4420
  })
4421
4421
  }), /* @__PURE__ */ W(re, { children: r })] });
4422
4422
  }
4423
- function $t({ count: t, className: n, ...r }) {
4423
+ function en({ count: t, className: n, ...r }) {
4424
4424
  return /* @__PURE__ */ W("div", {
4425
4425
  role: "img",
4426
4426
  "aria-busy": "true",
@@ -4429,14 +4429,14 @@ function $t({ count: t, className: n, ...r }) {
4429
4429
  ...r,
4430
4430
  children: Array.from({ length: t }, (e, t) => /* @__PURE__ */ G("div", {
4431
4431
  className: "flex flex-1 flex-col items-center justify-center gap-2 px-3",
4432
- children: [/* @__PURE__ */ W(g, { className: "h-8 w-16" }), /* @__PURE__ */ W(g, { className: "h-5 w-24" })]
4432
+ children: [/* @__PURE__ */ W(_, { className: "h-8 w-16" }), /* @__PURE__ */ W(_, { className: "h-5 w-24" })]
4433
4433
  }, t))
4434
4434
  });
4435
4435
  }
4436
- function en({ items: t, state: n, skeletonCount: r, className: i, ...a }) {
4437
- let { ref: o, width: s, height: c } = Ot();
4438
- if (n === "loading") return /* @__PURE__ */ W($t, {
4439
- count: t.length > 0 ? Ht(t) : r ?? 5,
4436
+ function tn({ items: t, state: n, skeletonCount: r, className: i, ...a }) {
4437
+ let { ref: o, width: s, height: c } = kt();
4438
+ if (n === "loading") return /* @__PURE__ */ W(en, {
4439
+ count: t.length > 0 ? Ut(t) : r ?? 5,
4440
4440
  className: i,
4441
4441
  ...a
4442
4442
  });
@@ -4451,8 +4451,8 @@ function en({ items: t, state: n, skeletonCount: r, className: i, ...a }) {
4451
4451
  ...e,
4452
4452
  value: "—",
4453
4453
  trend: void 0
4454
- }) : t, u = Ht(l), d = s > 0 ? Gt(s, c, u) : "md", f = c >= 50, p = s > 0 ? Yt(s, l, d) : l.length, m = l.slice(0, p), h = l.length - p, g = p === 0;
4455
- return /* @__PURE__ */ W(I, {
4454
+ }) : t, u = Ut(l), d = s > 0 ? Kt(s, c, u) : "md", f = c >= 50, p = s > 0 ? Xt(s, l, d) : l.length, m = l.slice(0, p), h = l.length - p, g = p === 0;
4455
+ return /* @__PURE__ */ W(L, {
4456
4456
  delayDuration: 300,
4457
4457
  children: /* @__PURE__ */ G("div", {
4458
4458
  ref: o,
@@ -4463,19 +4463,19 @@ function en({ items: t, state: n, skeletonCount: r, className: i, ...a }) {
4463
4463
  children: [s > 0 && !g && m.map((t) => {
4464
4464
  let n = Z(t) ? t.category : `${t.value}-${t.label ?? ""}`;
4465
4465
  return /* @__PURE__ */ W("div", {
4466
- style: { flex: Ut(t) },
4466
+ style: { flex: Wt(t) },
4467
4467
  className: e("flex min-w-0 flex-col items-center justify-center overflow-x-hidden", Q.cellPadding[d]),
4468
- children: Z(t) ? /* @__PURE__ */ G(U, { children: [/* @__PURE__ */ W("span", {
4468
+ children: Z(t) ? /* @__PURE__ */ G(ce, { children: [/* @__PURE__ */ W("span", {
4469
4469
  className: e("mb-0.5 font-medium tracking-wider text-muted-foreground uppercase", Q.category[d]),
4470
4470
  children: t.category
4471
4471
  }), /* @__PURE__ */ W("div", {
4472
4472
  className: "flex w-full min-w-0 items-end justify-evenly",
4473
- children: t.metrics.map((e) => /* @__PURE__ */ W(Zt, {
4473
+ children: t.metrics.map((e) => /* @__PURE__ */ W(Qt, {
4474
4474
  item: e,
4475
4475
  size: d,
4476
4476
  labelVisible: f
4477
4477
  }, `${e.value}-${e.label ?? ""}`))
4478
- })] }) : /* @__PURE__ */ W(Zt, {
4478
+ })] }) : /* @__PURE__ */ W(Qt, {
4479
4479
  item: t,
4480
4480
  size: d,
4481
4481
  labelVisible: f
@@ -4483,7 +4483,7 @@ function en({ items: t, state: n, skeletonCount: r, className: i, ...a }) {
4483
4483
  }, n);
4484
4484
  }), s > 0 && h > 0 && /* @__PURE__ */ W("div", {
4485
4485
  className: e("flex shrink-0 items-center", g ? "" : "px-2"),
4486
- children: /* @__PURE__ */ W(Qt, {
4486
+ children: /* @__PURE__ */ W($t, {
4487
4487
  count: h,
4488
4488
  size: d
4489
4489
  })
@@ -4493,54 +4493,54 @@ function en({ items: t, state: n, skeletonCount: r, className: i, ...a }) {
4493
4493
  }
4494
4494
  //#endregion
4495
4495
  //#region src/charts/LineChart/LineChart.tsx
4496
- function tn({ data: e, dataKeys: n, state: r, curveType: i = "monotone", showDots: o = !1, showGrid: s = !0, showCategoryAxis: c = !0, showValueAxis: l = !0, connectNulls: u = !1, valueTickFormatter: d, categoryTickFormatter: m, animated: g = !0, onPointHover: _, onPointLeave: v, ariaLabel: y, margin: x, className: S, children: C, ...w }) {
4497
- let { config: T } = t(), E = n ?? ke(e, Object.keys(T));
4498
- return r === "loading" ? /* @__PURE__ */ W(b, {
4496
+ function nn({ data: e, dataKeys: n, state: r, curveType: i = "monotone", showDots: a = !1, showGrid: s = !0, showCategoryAxis: c = !0, showValueAxis: l = !0, connectNulls: u = !1, valueTickFormatter: d, categoryTickFormatter: f, animated: h = !0, onPointHover: _, onPointLeave: v, ariaLabel: y, margin: b, className: S, children: C, ...w }) {
4497
+ let { config: T } = t(), E = n ?? Ae(e, Object.keys(T));
4498
+ return r === "loading" ? /* @__PURE__ */ W(x, {
4499
4499
  ariaLabel: y,
4500
4500
  className: S,
4501
4501
  ...w
4502
- }) : /* @__PURE__ */ G(p, {
4502
+ }) : /* @__PURE__ */ G(m, {
4503
4503
  data: e,
4504
4504
  state: r,
4505
4505
  categoryScaleType: "point",
4506
- animated: g,
4506
+ animated: h,
4507
4507
  ariaLabel: y,
4508
4508
  valueTickFormatter: d,
4509
- categoryTickFormatter: m,
4510
- margin: x,
4509
+ categoryTickFormatter: f,
4510
+ margin: b,
4511
4511
  onPointHover: _,
4512
4512
  onPointLeave: v,
4513
4513
  className: S,
4514
4514
  ...w,
4515
4515
  children: [
4516
- s && /* @__PURE__ */ W(a, {}),
4517
- E.map((e) => /* @__PURE__ */ W(we, {
4516
+ s && /* @__PURE__ */ W(o, {}),
4517
+ E.map((e) => /* @__PURE__ */ W(Te, {
4518
4518
  dataKey: e,
4519
4519
  curveType: i,
4520
- showDots: o,
4520
+ showDots: a,
4521
4521
  connectNulls: u
4522
4522
  }, e)),
4523
- c && /* @__PURE__ */ W(h, {}),
4524
- l && /* @__PURE__ */ W(f, {}),
4523
+ c && /* @__PURE__ */ W(g, {}),
4524
+ l && /* @__PURE__ */ W(p, {}),
4525
4525
  C
4526
4526
  ]
4527
4527
  });
4528
4528
  }
4529
4529
  //#endregion
4530
4530
  //#region src/charts/AreaChart/AreaChart.tsx
4531
- function nn({ data: e, dataKeys: n, state: r, curveType: i = "monotone", stacked: o = !0, gradient: s = !0, fillOpacity: c = .2, showGrid: l = !0, showCategoryAxis: u = !0, showValueAxis: d = !0, connectNulls: m = !1, animated: g = !0, ariaLabel: _, margin: v, valueTickFormatter: b, categoryTickFormatter: x, onPointHover: S, onPointLeave: C, className: w, children: T, ...E }) {
4532
- let { config: D } = t(), O = n ?? ke(e, Object.keys(D)), k = o ? "default" : void 0;
4533
- return r === "loading" ? /* @__PURE__ */ W(y, {
4531
+ function rn({ data: e, dataKeys: n, state: r, curveType: i = "monotone", stacked: a = !0, gradient: s = !0, fillOpacity: c = .2, showGrid: l = !0, showCategoryAxis: u = !0, showValueAxis: d = !0, connectNulls: f = !1, animated: h = !0, ariaLabel: _, margin: v, valueTickFormatter: y, categoryTickFormatter: x, onPointHover: S, onPointLeave: C, className: w, children: T, ...E }) {
4532
+ let { config: D } = t(), O = n ?? Ae(e, Object.keys(D)), k = a ? "default" : void 0;
4533
+ return r === "loading" ? /* @__PURE__ */ W(b, {
4534
4534
  ariaLabel: _,
4535
4535
  className: w,
4536
4536
  ...E
4537
- }) : /* @__PURE__ */ G(p, {
4537
+ }) : /* @__PURE__ */ G(m, {
4538
4538
  data: e,
4539
4539
  state: r,
4540
4540
  categoryScaleType: "point",
4541
- animated: g,
4541
+ animated: h,
4542
4542
  ariaLabel: _,
4543
- valueTickFormatter: b,
4543
+ valueTickFormatter: y,
4544
4544
  categoryTickFormatter: x,
4545
4545
  margin: v,
4546
4546
  onPointHover: S,
@@ -4548,22 +4548,22 @@ function nn({ data: e, dataKeys: n, state: r, curveType: i = "monotone", stacked
4548
4548
  className: w,
4549
4549
  ...E,
4550
4550
  children: [
4551
- l && /* @__PURE__ */ W(a, {}),
4552
- O.map((e) => /* @__PURE__ */ W(Oe, {
4551
+ l && /* @__PURE__ */ W(o, {}),
4552
+ O.map((e) => /* @__PURE__ */ W(ke, {
4553
4553
  dataKey: e,
4554
4554
  stackId: k,
4555
4555
  curveType: i,
4556
4556
  gradient: s,
4557
4557
  fillOpacity: c,
4558
- connectNulls: m
4558
+ connectNulls: f
4559
4559
  }, e)),
4560
- u && /* @__PURE__ */ W(h, {}),
4561
- d && /* @__PURE__ */ W(f, {}),
4560
+ u && /* @__PURE__ */ W(g, {}),
4561
+ d && /* @__PURE__ */ W(p, {}),
4562
4562
  T
4563
4563
  ]
4564
4564
  });
4565
4565
  }
4566
- function rn(e) {
4566
+ function an(e) {
4567
4567
  if (e === 0) return "0ns";
4568
4568
  if (e < 1e3) return `${Math.round(e)}ns`;
4569
4569
  let t = e / 1e3;
@@ -4575,7 +4575,7 @@ function rn(e) {
4575
4575
  let i = Math.floor(r / 60), a = r % 60;
4576
4576
  return `${i}m ${Math.round(a)}s`;
4577
4577
  }
4578
- function an(e) {
4578
+ function on(e) {
4579
4579
  let t = 0;
4580
4580
  for (let n of e) {
4581
4581
  let e = n.startOffsetNs + n.durationNs;
@@ -4583,7 +4583,7 @@ function an(e) {
4583
4583
  }
4584
4584
  return t > 0 ? t : 1;
4585
4585
  }
4586
- function on(e, t, n, r) {
4586
+ function sn(e, t, n, r) {
4587
4587
  if (r <= 0 || n <= 0) return {
4588
4588
  x: 0,
4589
4589
  width: 0
@@ -4594,18 +4594,18 @@ function on(e, t, n, r) {
4594
4594
  width: a
4595
4595
  };
4596
4596
  }
4597
- function sn(e, t) {
4597
+ function cn(e, t) {
4598
4598
  if (t === 0 || e === 0) return "0%";
4599
4599
  let n = e / t * 100;
4600
4600
  return n < .1 ? "<0.1%" : n >= 100 ? "100%" : `${n < 1 ? n.toFixed(1) : Math.round(n)}%`;
4601
4601
  }
4602
- var cn = 6, ln = 80;
4603
- function un(e) {
4602
+ var ln = 6, un = 80;
4603
+ function dn(e) {
4604
4604
  if (e <= 0) return 0;
4605
- let t = Math.floor(e / ln) + 1;
4606
- return Math.max(2, Math.min(t, cn));
4605
+ let t = Math.floor(e / un) + 1;
4606
+ return Math.max(2, Math.min(t, ln));
4607
4607
  }
4608
- function dn(e, t = 5) {
4608
+ function fn(e, t = 5) {
4609
4609
  if (e <= 0) return [0];
4610
4610
  if (t <= 1) return [0, e];
4611
4611
  let n = e / (t - 1);
@@ -4613,13 +4613,13 @@ function dn(e, t = 5) {
4613
4613
  }
4614
4614
  //#endregion
4615
4615
  //#region src/charts/TraceWaterfall/TraceWaterfall.tsx
4616
- var fn = 280, pn = .45, mn = 36, hn = 20, gn = 20, _n = 4, $ = 12, vn = 48, yn = 32, bn = 3, xn = {
4616
+ var pn = 280, mn = .45, hn = 36, gn = 20, _n = 20, vn = 4, $ = 12, yn = 48, bn = 32, xn = 3, Sn = {
4617
4617
  internal: "INTERNAL",
4618
4618
  server: "SERVER",
4619
4619
  client: "CLIENT",
4620
4620
  producer: "PRODUCER",
4621
4621
  consumer: "CONSUMER"
4622
- }, Sn = [
4622
+ }, Cn = [
4623
4623
  "bg-chart-1",
4624
4624
  "bg-chart-2",
4625
4625
  "bg-chart-3",
@@ -4629,21 +4629,21 @@ var fn = 280, pn = .45, mn = 36, hn = 20, gn = 20, _n = 4, $ = 12, vn = 48, yn =
4629
4629
  "bg-chart-7",
4630
4630
  "bg-chart-8"
4631
4631
  ];
4632
- function Cn(e) {
4632
+ function wn(e) {
4633
4633
  let t = /* @__PURE__ */ new Map(), n = 0;
4634
- for (let r of e) t.has(r.serviceName) || (t.set(r.serviceName, Sn[n % Sn.length]), n++);
4634
+ for (let r of e) t.has(r.serviceName) || (t.set(r.serviceName, Cn[n % Cn.length]), n++);
4635
4635
  return t;
4636
4636
  }
4637
- var wn = { error: "bg-destructive" }, Tn = {
4637
+ var Tn = { error: "bg-destructive" }, En = {
4638
4638
  ok: "success",
4639
4639
  error: "destructive",
4640
4640
  unset: "secondary"
4641
- }, En = {
4641
+ }, Dn = {
4642
4642
  ok: "OK",
4643
4643
  error: "Error",
4644
4644
  unset: "Unset"
4645
4645
  };
4646
- function Dn({ icon: e, label: t, children: n }) {
4646
+ function On({ icon: e, label: t, children: n }) {
4647
4647
  return /* @__PURE__ */ G("div", {
4648
4648
  className: "flex items-center justify-between gap-4",
4649
4649
  children: [/* @__PURE__ */ G("div", {
@@ -4655,8 +4655,8 @@ function Dn({ icon: e, label: t, children: n }) {
4655
4655
  })]
4656
4656
  });
4657
4657
  }
4658
- function On({ span: t, serviceColor: n, traceDurationNs: r }) {
4659
- return /* @__PURE__ */ G(U, { children: [
4658
+ function kn({ span: t, serviceColor: n, traceDurationNs: r }) {
4659
+ return /* @__PURE__ */ G(ce, { children: [
4660
4660
  /* @__PURE__ */ G("div", {
4661
4661
  className: "space-y-1 px-2.5 pt-2 pb-1.5",
4662
4662
  children: [/* @__PURE__ */ G("div", {
@@ -4667,14 +4667,14 @@ function On({ span: t, serviceColor: n, traceDurationNs: r }) {
4667
4667
  })]
4668
4668
  }), /* @__PURE__ */ G("div", {
4669
4669
  className: "flex items-center gap-1.5 pl-[14px]",
4670
- children: [/* @__PURE__ */ W(D, {
4671
- variant: Tn[t.status],
4670
+ children: [/* @__PURE__ */ W(O, {
4671
+ variant: En[t.status],
4672
4672
  className: "h-4 text-[9px]",
4673
- children: En[t.status]
4674
- }), /* @__PURE__ */ W(D, {
4673
+ children: Dn[t.status]
4674
+ }), /* @__PURE__ */ W(O, {
4675
4675
  variant: "outline",
4676
4676
  className: "h-4 text-[9px]",
4677
- children: xn[t.kind]
4677
+ children: Sn[t.kind]
4678
4678
  })]
4679
4679
  })]
4680
4680
  }),
@@ -4682,25 +4682,25 @@ function On({ span: t, serviceColor: n, traceDurationNs: r }) {
4682
4682
  /* @__PURE__ */ G("div", {
4683
4683
  className: "space-y-1 px-2.5 py-1.5 text-[11px]",
4684
4684
  children: [
4685
- /* @__PURE__ */ W(Dn, {
4686
- icon: Qe,
4685
+ /* @__PURE__ */ W(On, {
4686
+ icon: $e,
4687
4687
  label: "Service",
4688
4688
  children: t.serviceName
4689
4689
  }),
4690
- /* @__PURE__ */ W(Dn, {
4691
- icon: Ze,
4690
+ /* @__PURE__ */ W(On, {
4691
+ icon: Qe,
4692
4692
  label: "Duration",
4693
4693
  children: /* @__PURE__ */ W("span", {
4694
4694
  className: "font-mono tabular-nums",
4695
- children: rn(t.durationNs)
4695
+ children: an(t.durationNs)
4696
4696
  })
4697
4697
  }),
4698
- /* @__PURE__ */ W(Dn, {
4699
- icon: qe,
4698
+ /* @__PURE__ */ W(On, {
4699
+ icon: Je,
4700
4700
  label: "% of trace",
4701
4701
  children: /* @__PURE__ */ W("span", {
4702
4702
  className: "font-mono tabular-nums",
4703
- children: sn(t.durationNs, r)
4703
+ children: cn(t.durationNs, r)
4704
4704
  })
4705
4705
  })
4706
4706
  ]
@@ -4714,19 +4714,19 @@ function On({ span: t, serviceColor: n, traceDurationNs: r }) {
4714
4714
  })
4715
4715
  ] });
4716
4716
  }
4717
- function kn({ span: e, serviceColor: t, traceDurationNs: n, renderTooltip: r, children: i }) {
4718
- return /* @__PURE__ */ G(N, {
4717
+ function An({ span: e, serviceColor: t, traceDurationNs: n, renderTooltip: r, children: i }) {
4718
+ return /* @__PURE__ */ G(P, {
4719
4719
  openDelay: 250,
4720
4720
  closeDelay: 0,
4721
4721
  children: [/* @__PURE__ */ W(ee, {
4722
4722
  asChild: !0,
4723
4723
  children: i
4724
- }), /* @__PURE__ */ W(P, {
4724
+ }), /* @__PURE__ */ W(F, {
4725
4725
  side: "right",
4726
4726
  align: "start",
4727
4727
  sideOffset: 4,
4728
4728
  className: "w-56 p-0",
4729
- children: r ? r(e) : /* @__PURE__ */ W(On, {
4729
+ children: r ? r(e) : /* @__PURE__ */ W(kn, {
4730
4730
  span: e,
4731
4731
  serviceColor: t,
4732
4732
  traceDurationNs: n
@@ -4734,13 +4734,13 @@ function kn({ span: e, serviceColor: t, traceDurationNs: n, renderTooltip: r, ch
4734
4734
  })]
4735
4735
  });
4736
4736
  }
4737
- function An({ depth: e }) {
4737
+ function jn({ depth: e }) {
4738
4738
  return e === 0 ? null : /* @__PURE__ */ W("span", {
4739
4739
  className: "pointer-events-none relative shrink-0",
4740
- style: { width: e * hn },
4740
+ style: { width: e * gn },
4741
4741
  "aria-hidden": "true",
4742
4742
  children: Array.from({ length: e }, (t, n) => {
4743
- let r = n === e - 1, i = n * hn + hn / 2;
4743
+ let r = n === e - 1, i = n * gn + gn / 2;
4744
4744
  return r ? /* @__PURE__ */ W("span", {
4745
4745
  className: "absolute top-0 border-l border-border/30",
4746
4746
  style: {
@@ -4749,7 +4749,7 @@ function An({ depth: e }) {
4749
4749
  },
4750
4750
  children: /* @__PURE__ */ W("span", {
4751
4751
  className: "absolute bottom-0 left-0 border-b border-border/30",
4752
- style: { width: hn / 2 - 2 }
4752
+ style: { width: gn / 2 - 2 }
4753
4753
  })
4754
4754
  }, n) : /* @__PURE__ */ W("span", {
4755
4755
  className: "absolute top-0 h-full border-l border-border/30",
@@ -4758,12 +4758,12 @@ function An({ depth: e }) {
4758
4758
  })
4759
4759
  });
4760
4760
  }
4761
- function jn(e) {
4761
+ function Mn(e) {
4762
4762
  let t = /* @__PURE__ */ new Set(), n = new Set(e.map((e) => e.spanId));
4763
4763
  for (let r of e) r.parentSpanId && n.has(r.parentSpanId) && t.add(r.parentSpanId);
4764
4764
  return t;
4765
4765
  }
4766
- function Mn(e, t) {
4766
+ function Nn(e, t) {
4767
4767
  if (t.size === 0) return e;
4768
4768
  let n = /* @__PURE__ */ new Set();
4769
4769
  for (let r = 0; r < e.length; r++) {
@@ -4775,7 +4775,7 @@ function Mn(e, t) {
4775
4775
  }
4776
4776
  return e.filter((e) => !n.has(e.spanId));
4777
4777
  }
4778
- function Nn(e) {
4778
+ function Pn(e) {
4779
4779
  let t = /* @__PURE__ */ new Map(), n = [];
4780
4780
  for (let r = e.length - 1; r >= 0; r--) {
4781
4781
  let i = e[r].depth;
@@ -4785,11 +4785,11 @@ function Nn(e) {
4785
4785
  }
4786
4786
  return t;
4787
4787
  }
4788
- function Pn({ span: t, traceDurationNs: n, labelWidth: r, usableWidth: i, serviceColor: a, selected: o, hasChildren: s, collapsed: c, collapsedCount: l, onSelect: u, onToggle: d, onHover: f, onLeave: p, renderTooltip: m }) {
4789
- let { x: h, width: g } = on(t.startOffsetNs, t.durationNs, n, i), _ = t.status === "error" ? wn.error : a, v = rn(t.durationNs), y = g >= 56, b = !y;
4788
+ function Fn({ span: t, traceDurationNs: n, labelWidth: r, usableWidth: i, serviceColor: a, selected: o, hasChildren: s, collapsed: c, collapsedCount: l, onSelect: u, onToggle: d, onHover: f, onLeave: p, renderTooltip: m }) {
4789
+ let { x: h, width: g } = sn(t.startOffsetNs, t.durationNs, n, i), _ = t.status === "error" ? Tn.error : a, v = an(t.durationNs), y = g >= 56, b = !y;
4790
4790
  return /* @__PURE__ */ G("div", {
4791
4791
  className: e("group flex w-full cursor-pointer transition-colors", o ? "bg-accent/50" : "hover:bg-muted/30"),
4792
- style: { height: mn },
4792
+ style: { height: hn },
4793
4793
  onClick: () => u?.(t),
4794
4794
  onKeyDown: (e) => {
4795
4795
  e.key === "Enter" || e.key === " " ? (e.preventDefault(), u?.(t)) : (e.key === "ArrowRight" && s && c || e.key === "ArrowLeft" && s && !c) && (e.preventDefault(), d?.(t.spanId));
@@ -4804,7 +4804,7 @@ function Pn({ span: t, traceDurationNs: n, labelWidth: r, usableWidth: i, servic
4804
4804
  className: e("w-[3px] shrink-0 transition-colors", o ? "bg-primary" : "bg-transparent"),
4805
4805
  "aria-hidden": "true"
4806
4806
  }),
4807
- /* @__PURE__ */ W(kn, {
4807
+ /* @__PURE__ */ W(An, {
4808
4808
  span: t,
4809
4809
  serviceColor: a,
4810
4810
  traceDurationNs: n,
@@ -4813,7 +4813,7 @@ function Pn({ span: t, traceDurationNs: n, labelWidth: r, usableWidth: i, servic
4813
4813
  className: "flex shrink-0 items-center gap-1 overflow-hidden border-r border-border/30 px-1.5",
4814
4814
  style: { width: r },
4815
4815
  children: [
4816
- /* @__PURE__ */ W(An, { depth: t.depth }),
4816
+ /* @__PURE__ */ W(jn, { depth: t.depth }),
4817
4817
  s ? /* @__PURE__ */ W("button", {
4818
4818
  type: "button",
4819
4819
  tabIndex: -1,
@@ -4823,7 +4823,7 @@ function Pn({ span: t, traceDurationNs: n, labelWidth: r, usableWidth: i, servic
4823
4823
  className: "flex size-4 shrink-0 items-center justify-center rounded-sm text-muted-foreground transition-colors hover:bg-muted hover:text-foreground",
4824
4824
  "aria-label": c ? `Expand ${t.name}` : `Collapse ${t.name}`,
4825
4825
  "aria-expanded": !c,
4826
- children: W(c ? Ye : Je, { className: "size-3.5" })
4826
+ children: W(c ? Xe : Ye, { className: "size-3.5" })
4827
4827
  }) : /* @__PURE__ */ W("span", {
4828
4828
  className: "flex size-4 shrink-0 items-center justify-center",
4829
4829
  children: /* @__PURE__ */ W("span", { className: e("size-2 rounded-full", a) })
@@ -4835,8 +4835,8 @@ function Pn({ span: t, traceDurationNs: n, labelWidth: r, usableWidth: i, servic
4835
4835
  className: "truncate text-[13px] leading-tight font-medium text-foreground",
4836
4836
  children: t.name
4837
4837
  }),
4838
- t.status === "error" && /* @__PURE__ */ W(Xe, { className: "size-3.5 shrink-0 text-destructive" }),
4839
- c && /* @__PURE__ */ W(D, {
4838
+ t.status === "error" && /* @__PURE__ */ W(Ze, { className: "size-3.5 shrink-0 text-destructive" }),
4839
+ c && /* @__PURE__ */ W(O, {
4840
4840
  variant: "secondary",
4841
4841
  className: "h-4 shrink-0 text-[9px]",
4842
4842
  children: l
@@ -4854,7 +4854,7 @@ function Pn({ span: t, traceDurationNs: n, labelWidth: r, usableWidth: i, servic
4854
4854
  className: "relative flex-1 overflow-hidden",
4855
4855
  style: {
4856
4856
  paddingLeft: $,
4857
- paddingRight: vn
4857
+ paddingRight: yn
4858
4858
  },
4859
4859
  "aria-label": `${t.name}: ${v}`,
4860
4860
  children: [
@@ -4863,8 +4863,8 @@ function Pn({ span: t, traceDurationNs: n, labelWidth: r, usableWidth: i, servic
4863
4863
  style: {
4864
4864
  left: $ + h,
4865
4865
  width: Math.max(g, 3),
4866
- height: gn,
4867
- borderRadius: _n
4866
+ height: _n,
4867
+ borderRadius: vn
4868
4868
  }
4869
4869
  }),
4870
4870
  y && /* @__PURE__ */ W("span", {
@@ -4885,14 +4885,14 @@ function Pn({ span: t, traceDurationNs: n, labelWidth: r, usableWidth: i, servic
4885
4885
  ]
4886
4886
  });
4887
4887
  }
4888
- function Fn({ traceDurationNs: e, labelWidth: t, usableWidth: n, hasCollapsible: r, isAllCollapsed: i, onExpandAll: a, onCollapseAll: o }) {
4889
- let s = dn(e, un(n)), c = K().domain([0, e]).range([0, n]);
4888
+ function In({ traceDurationNs: e, labelWidth: t, usableWidth: n, hasCollapsible: r, isAllCollapsed: i, onExpandAll: a, onCollapseAll: o }) {
4889
+ let s = fn(e, dn(n)), c = K().domain([0, e]).range([0, n]);
4890
4890
  return /* @__PURE__ */ G("div", {
4891
4891
  className: "flex shrink-0 items-end border-b border-border bg-muted/30",
4892
- style: { height: yn },
4892
+ style: { height: bn },
4893
4893
  children: [/* @__PURE__ */ G("div", {
4894
4894
  className: "flex shrink-0 items-center justify-between border-r border-border/30 px-3 pb-2",
4895
- style: { width: t + bn },
4895
+ style: { width: t + xn },
4896
4896
  children: [/* @__PURE__ */ W("span", {
4897
4897
  className: "truncate text-[11px] font-semibold tracking-wider text-muted-foreground uppercase",
4898
4898
  children: "Service & Operation"
@@ -4901,13 +4901,13 @@ function Fn({ traceDurationNs: e, labelWidth: t, usableWidth: n, hasCollapsible:
4901
4901
  onClick: i ? a : o,
4902
4902
  className: "flex items-center gap-0.5 rounded-sm px-1 py-0.5 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground",
4903
4903
  "aria-label": i ? "Expand all spans" : "Collapse all spans",
4904
- children: W(i ? Je : Ye, { className: "size-3.5" })
4904
+ children: W(i ? Ye : Xe, { className: "size-3.5" })
4905
4905
  })]
4906
4906
  }), /* @__PURE__ */ W("div", {
4907
4907
  className: "relative flex-1 pb-2",
4908
4908
  style: {
4909
4909
  paddingLeft: $,
4910
- paddingRight: vn
4910
+ paddingRight: yn
4911
4911
  },
4912
4912
  children: s.map((e, t) => {
4913
4913
  let n = t === 0, r = t === s.length - 1;
@@ -4917,18 +4917,18 @@ function Fn({ traceDurationNs: e, labelWidth: t, usableWidth: n, hasCollapsible:
4917
4917
  left: $ + c(e),
4918
4918
  transform: n ? "none" : r ? "translateX(-100%)" : "translateX(-50%)"
4919
4919
  },
4920
- children: rn(e)
4920
+ children: an(e)
4921
4921
  }, e);
4922
4922
  })
4923
4923
  })]
4924
4924
  });
4925
4925
  }
4926
- function In({ traceDurationNs: e, labelWidth: t, usableWidth: n, rowCount: r }) {
4927
- let i = dn(e, un(n)), a = K().domain([0, e]).range([0, n]), o = r * mn;
4926
+ function Ln({ traceDurationNs: e, labelWidth: t, usableWidth: n, rowCount: r }) {
4927
+ let i = fn(e, dn(n)), a = K().domain([0, e]).range([0, n]), o = r * hn;
4928
4928
  return /* @__PURE__ */ W("svg", {
4929
4929
  className: "pointer-events-none absolute top-0",
4930
4930
  style: {
4931
- left: t + bn + $,
4931
+ left: t + xn + $,
4932
4932
  width: n,
4933
4933
  height: o
4934
4934
  },
@@ -4944,7 +4944,7 @@ function In({ traceDurationNs: e, labelWidth: t, usableWidth: n, rowCount: r })
4944
4944
  }, e))
4945
4945
  });
4946
4946
  }
4947
- var Ln = [
4947
+ var Rn = [
4948
4948
  {
4949
4949
  indent: 0,
4950
4950
  labelPct: 60,
@@ -4976,7 +4976,7 @@ var Ln = [
4976
4976
  barPct: 65
4977
4977
  }
4978
4978
  ];
4979
- function Rn({ ariaLabel: t, className: n, ...r }) {
4979
+ function zn({ ariaLabel: t, className: n, ...r }) {
4980
4980
  return /* @__PURE__ */ G("div", {
4981
4981
  role: "img",
4982
4982
  "aria-busy": "true",
@@ -4985,17 +4985,17 @@ function Rn({ ariaLabel: t, className: n, ...r }) {
4985
4985
  ...r,
4986
4986
  children: [/* @__PURE__ */ W("div", {
4987
4987
  className: "flex shrink-0 items-center border-b border-border bg-muted/30 px-3",
4988
- style: { height: yn },
4989
- children: /* @__PURE__ */ W(g, { className: "h-3 w-1/3 max-w-32" })
4988
+ style: { height: bn },
4989
+ children: /* @__PURE__ */ W(_, { className: "h-3 w-1/3 max-w-32" })
4990
4990
  }), /* @__PURE__ */ W("div", {
4991
4991
  className: "flex-1",
4992
- children: Ln.map((e, t) => /* @__PURE__ */ G("div", {
4992
+ children: Rn.map((e, t) => /* @__PURE__ */ G("div", {
4993
4993
  className: "flex items-center gap-2 px-2",
4994
- style: { height: mn },
4994
+ style: { height: hn },
4995
4995
  children: [/* @__PURE__ */ G("div", {
4996
4996
  className: "flex shrink-0 items-center gap-1.5",
4997
4997
  style: { paddingLeft: e.indent * 12 },
4998
- children: [/* @__PURE__ */ W(g, { className: "size-2.5 rounded-full" }), /* @__PURE__ */ W(g, {
4998
+ children: [/* @__PURE__ */ W(_, { className: "size-2.5 rounded-full" }), /* @__PURE__ */ W(_, {
4999
4999
  className: "h-3",
5000
5000
  style: {
5001
5001
  width: `${e.labelPct}%`,
@@ -5005,11 +5005,11 @@ function Rn({ ariaLabel: t, className: n, ...r }) {
5005
5005
  })]
5006
5006
  }), /* @__PURE__ */ W("div", {
5007
5007
  className: "relative min-w-0 flex-1",
5008
- children: /* @__PURE__ */ W(g, {
5008
+ children: /* @__PURE__ */ W(_, {
5009
5009
  className: "rounded-sm",
5010
5010
  style: {
5011
5011
  width: `${e.barPct}%`,
5012
- height: gn
5012
+ height: _n
5013
5013
  }
5014
5014
  })
5015
5015
  })]
@@ -5017,32 +5017,32 @@ function Rn({ ariaLabel: t, className: n, ...r }) {
5017
5017
  })]
5018
5018
  });
5019
5019
  }
5020
- function zn({ spans: t, state: n, selectedSpanId: r, onSpanSelect: i, onSpanHover: a, onSpanLeave: o, defaultCollapsed: s = !1, renderTooltip: c, ariaLabel: l = "Trace waterfall timeline", className: u, ...d }) {
5021
- let f = m(n, t.length), [p, h] = R.useState({
5022
- labelWidth: fn,
5020
+ function Bn({ spans: t, state: n, selectedSpanId: r, onSpanSelect: i, onSpanHover: a, onSpanLeave: o, defaultCollapsed: s = !1, renderTooltip: c, ariaLabel: l = "Trace waterfall timeline", className: u, ...d }) {
5021
+ let f = h(n, t.length), [p, m] = z.useState({
5022
+ labelWidth: pn,
5023
5023
  timelineWidth: 0
5024
- }), g = R.useRef(null), v = R.useMemo(() => jn(t), [t]), [y, b] = R.useState(() => s ? new Set(jn(t)) : /* @__PURE__ */ new Set()), x = R.useCallback((e) => {
5024
+ }), g = z.useRef(null), _ = z.useMemo(() => Mn(t), [t]), [y, b] = z.useState(() => s ? new Set(Mn(t)) : /* @__PURE__ */ new Set()), x = z.useCallback((e) => {
5025
5025
  if (g.current &&= (g.current.disconnect(), null), e) {
5026
5026
  let t = new ResizeObserver(([e]) => {
5027
- let t = Math.round(e.contentRect.width), n = Math.min(fn, Math.round(t * pn)), r = t - n - bn - $ - vn;
5028
- h({
5027
+ let t = Math.round(e.contentRect.width), n = Math.min(pn, Math.round(t * mn)), r = t - n - xn - $ - yn;
5028
+ m({
5029
5029
  labelWidth: n,
5030
5030
  timelineWidth: Math.max(r, 0)
5031
5031
  });
5032
5032
  });
5033
5033
  t.observe(e), g.current = t;
5034
5034
  }
5035
- }, []), S = R.useMemo(() => an(t), [t]), C = R.useMemo(() => Cn(t), [t]), w = R.useMemo(() => Nn(t), [t]), T = R.useMemo(() => Mn(t, y), [t, y]), E = R.useCallback((e) => {
5035
+ }, []), S = z.useMemo(() => on(t), [t]), C = z.useMemo(() => wn(t), [t]), w = z.useMemo(() => Pn(t), [t]), T = z.useMemo(() => Nn(t, y), [t, y]), E = z.useCallback((e) => {
5036
5036
  b((t) => {
5037
5037
  let n = new Set(t);
5038
5038
  return n.has(e) ? n.delete(e) : n.add(e), n;
5039
5039
  });
5040
- }, []), D = R.useCallback(() => b(/* @__PURE__ */ new Set()), []), O = R.useCallback(() => b(new Set(v)), [v]), k = y.size > 0;
5041
- return f === "loading" ? /* @__PURE__ */ W(Rn, {
5040
+ }, []), D = z.useCallback(() => b(/* @__PURE__ */ new Set()), []), O = z.useCallback(() => b(new Set(_)), [_]), k = y.size > 0;
5041
+ return f === "loading" ? /* @__PURE__ */ W(zn, {
5042
5042
  ariaLabel: l,
5043
5043
  className: u,
5044
5044
  ...d
5045
- }) : f === "empty" ? /* @__PURE__ */ W(_, {
5045
+ }) : f === "empty" ? /* @__PURE__ */ W(v, {
5046
5046
  ariaLabel: l,
5047
5047
  className: e("min-h-0 rounded-lg border border-border bg-card", u),
5048
5048
  ...d
@@ -5052,31 +5052,31 @@ function zn({ spans: t, state: n, selectedSpanId: r, onSpanSelect: i, onSpanHove
5052
5052
  role: "treegrid",
5053
5053
  "aria-label": l,
5054
5054
  ...d,
5055
- children: [/* @__PURE__ */ W(Fn, {
5055
+ children: [/* @__PURE__ */ W(In, {
5056
5056
  traceDurationNs: S,
5057
5057
  labelWidth: p.labelWidth,
5058
5058
  usableWidth: p.timelineWidth,
5059
- hasCollapsible: v.size > 0,
5059
+ hasCollapsible: _.size > 0,
5060
5060
  isAllCollapsed: k,
5061
5061
  onExpandAll: D,
5062
5062
  onCollapseAll: O
5063
- }), /* @__PURE__ */ W(F, {
5063
+ }), /* @__PURE__ */ W(I, {
5064
5064
  className: "min-h-0 flex-1",
5065
5065
  children: /* @__PURE__ */ G("div", {
5066
5066
  className: "relative",
5067
- children: [/* @__PURE__ */ W(In, {
5067
+ children: [/* @__PURE__ */ W(Ln, {
5068
5068
  traceDurationNs: S,
5069
5069
  labelWidth: p.labelWidth,
5070
5070
  usableWidth: p.timelineWidth,
5071
5071
  rowCount: T.length
5072
- }), T.map((e) => /* @__PURE__ */ W(Pn, {
5072
+ }), T.map((e) => /* @__PURE__ */ W(Fn, {
5073
5073
  span: e,
5074
5074
  traceDurationNs: S,
5075
5075
  labelWidth: p.labelWidth,
5076
5076
  usableWidth: p.timelineWidth,
5077
- serviceColor: C.get(e.serviceName) ?? Sn[0],
5077
+ serviceColor: C.get(e.serviceName) ?? Cn[0],
5078
5078
  selected: e.spanId === r,
5079
- hasChildren: v.has(e.spanId),
5079
+ hasChildren: _.has(e.spanId),
5080
5080
  collapsed: y.has(e.spanId),
5081
5081
  collapsedCount: w.get(e.spanId) ?? 0,
5082
5082
  onSelect: i,
@@ -5090,4 +5090,4 @@ function zn({ spans: t, state: n, selectedSpanId: r, onSpanSelect: i, onSpanHove
5090
5090
  });
5091
5091
  }
5092
5092
  //#endregion
5093
- export { nn as AreaChart, Oe as AreaSeries, je as BarChart, Ee as BarSeries, w as CHART_THEMES, p as CartesianChart, h as CategoryAxis, h as XAxis, pe as ChartCard, T as ChartContainer, xe as ChartLegend, be as ChartLegendContent, r as ChartStyle, ve as ChartTooltip, _e as ChartTooltipContent, i as DEFAULT_MARGIN, Ie as DoughnutChart, a as Grid, tn as LineChart, we as LineSeries, Bt as Metric, en as MetricGroup, d as ReferenceLine, zn as TraceWaterfall, f as ValueAxis, f as YAxis, dn as buildTimeAxisTicks, e as cn, n as compactTick, on as computeBarGeometry, an as computeTraceDurationNs, rn as formatDurationNs, sn as formatTracePercent, At as resolveSentiment, t as useChartConfig };
5093
+ export { rn as AreaChart, ke as AreaSeries, Me as BarChart, De as BarSeries, a as CHART_THEMES, m as CartesianChart, g as CategoryAxis, g as XAxis, me as ChartCard, E as ChartContainer, Se as ChartLegend, xe as ChartLegendContent, i as ChartStyle, ye as ChartTooltip, ve as ChartTooltipContent, r as DEFAULT_MARGIN, Le as DoughnutChart, o as Grid, nn as LineChart, Te as LineSeries, Vt as Metric, tn as MetricGroup, f as ReferenceLine, Bn as TraceWaterfall, p as ValueAxis, p as YAxis, fn as buildTimeAxisTicks, e as cn, n as compactTick, sn as computeBarGeometry, on as computeTraceDurationNs, an as formatDurationNs, cn as formatTracePercent, jt as resolveSentiment, t as useChartConfig };