@gravitee/gamma-lib-observability 1.6.1 → 1.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (31) hide show
  1. package/INTEGRATION.md +12 -14
  2. package/QUERYING.md +192 -0
  3. package/USAGE_GUIDE.md +8 -6
  4. package/dist/dashboards/adapters/time-series-adapter.d.ts +1 -1
  5. package/dist/dashboards/adapters/time-series-adapter.d.ts.map +1 -1
  6. package/dist/dashboards/renderers/BarWidgetRenderer.d.ts.map +1 -1
  7. package/dist/dashboards/renderers/CartesianWidgetRenderer.d.ts.map +1 -1
  8. package/dist/dashboards/renderers/DoughnutWidgetRenderer.d.ts.map +1 -1
  9. package/dist/dashboards/renderers/MetricGroupWidgetRenderer.d.ts.map +1 -1
  10. package/dist/dashboards/templates/dashboard-template.d.ts +0 -2
  11. package/dist/dashboards/templates/dashboard-template.d.ts.map +1 -1
  12. package/dist/dashboards/widget-data.d.ts +1 -1
  13. package/dist/data-sources/http-data-source.d.ts.map +1 -1
  14. package/dist/hooks/query-keys.d.ts +13 -5
  15. package/dist/hooks/query-keys.d.ts.map +1 -1
  16. package/dist/hooks/use-facets-query.d.ts +14 -2
  17. package/dist/hooks/use-facets-query.d.ts.map +1 -1
  18. package/dist/hooks/use-time-series-query.d.ts +2 -1
  19. package/dist/hooks/use-time-series-query.d.ts.map +1 -1
  20. package/dist/index.js +699 -642
  21. package/dist/routing/DashboardListPage.d.ts.map +1 -1
  22. package/dist/testing/graphene-core-icons-mock.d.ts +1 -0
  23. package/dist/testing/graphene-core-icons-mock.d.ts.map +1 -1
  24. package/dist/testing/mock-metrics-data-source.d.ts.map +1 -1
  25. package/dist/types/domain.d.ts +70 -7
  26. package/dist/types/domain.d.ts.map +1 -1
  27. package/dist/types/requests.d.ts +11 -10
  28. package/dist/types/requests.d.ts.map +1 -1
  29. package/dist/types-entry.d.ts +1 -1
  30. package/dist/types-entry.d.ts.map +1 -1
  31. package/package.json +2 -1
package/dist/index.js CHANGED
@@ -3,7 +3,7 @@ import { Fragment as v, createContext as y, createElement as b, forwardRef as x,
3
3
  import { Fragment as A, jsx as j, jsxs as M } from "react/jsx-runtime";
4
4
  import { keepPreviousData as ee, useQueries as te, useQuery as N } from "@tanstack/react-query";
5
5
  import { Accordion as ne, AccordionContent as re, AccordionItem as ie, AccordionTrigger as ae, Badge as P, Button as F, Calendar as oe, Card as se, Combobox as ce, ComboboxChip as le, ComboboxChips as ue, ComboboxChipsInput as de, ComboboxContent as fe, ComboboxEmpty as pe, ComboboxItem as me, ComboboxList as he, ComboboxValue as ge, DataTable as _e, DataTablePagination as ve, Empty as ye, EmptyDescription as be, EmptyHeader as xe, EmptyMedia as Se, EmptyTitle as Ce, Field as we, FieldError as Te, FieldLabel as Ee, Input as De, Popover as Oe, PopoverAnchor as ke, PopoverContent as Ae, PopoverTrigger as je, ScrollArea as Me, Select as Ne, SelectContent as Pe, SelectItem as Fe, SelectTrigger as Ie, SelectValue as Le, Separator as Re, Sheet as ze, SheetContent as Be, SheetDescription as Ve, SheetTitle as He, Skeleton as I, Spinner as Ue, ToggleGroup as We, ToggleGroupItem as Ge, Tooltip as L, TooltipContent as R, TooltipProvider as z, TooltipTrigger as B, cn as V, toast as H, useComboboxAnchor as Ke } from "@gravitee/graphene-core";
6
- import { AlertCircleIcon as qe, ArrowLeftIcon as Je, ArrowRightIcon as Ye, BrainCircuitIcon as Xe, CableIcon as Ze, CalendarIcon as Qe, ChevronDownIcon as $e, ChevronRightIcon as et, CircleHelpIcon as tt, CopyIcon as nt, ExpandIcon as rt, FileTextIcon as it, FilterIcon as at, FunnelXIcon as ot, GlobeIcon as st, LayoutDashboardIcon as ct, MessageSquareIcon as lt, PanelLeftIcon as ut, PlusIcon as dt, RefreshCwIcon as ft, SearchIcon as pt, WebhookIcon as mt, XIcon as ht } from "@gravitee/graphene-core/icons";
6
+ import { AlertCircleIcon as qe, ArrowLeftIcon as Je, ArrowRightIcon as Ye, BrainCircuitIcon as Xe, CableIcon as Ze, CalendarIcon as Qe, ChartLineIcon as $e, ChevronDownIcon as et, ChevronRightIcon as tt, CircleHelpIcon as nt, CopyIcon as rt, ExpandIcon as it, FileTextIcon as at, FilterIcon as ot, FunnelXIcon as st, GlobeIcon as ct, MessageSquareIcon as lt, PanelLeftIcon as ut, PlusIcon as dt, RefreshCwIcon as ft, SearchIcon as pt, WebhookIcon as mt, XIcon as ht } from "@gravitee/graphene-core/icons";
7
7
  import { DashboardGrid as gt, DashboardWidget as _t } from "@gravitee/graphene-charts/dashboard-grid";
8
8
  import { AreaSeries as vt, BarChart as yt, BarSeries as bt, CartesianChart as xt, ChartContainer as St, ChartLegend as Ct, ChartLegendContent as wt, ChartTooltip as Tt, ChartTooltipContent as Et, DoughnutChart as Dt, Grid as Ot, LineSeries as kt, Metric as At, MetricGroup as jt, ReferenceLine as Mt, XAxis as Nt, YAxis as Pt } from "@gravitee/graphene-charts";
9
9
  import { Link as Ft, Navigate as It, Route as Lt, Routes as Rt, useNavigate as zt, useParams as Bt, useSearchParams as Vt } from "react-router-dom";
@@ -99,7 +99,7 @@ function G(e) {
99
99
  }
100
100
  var K = {
101
101
  all: ["observability"],
102
- timeSeries: (e, t, n, r, i, a) => [
102
+ timeSeries: (e, t, n, r, i, a, o) => [
103
103
  "observability",
104
104
  "timeSeries",
105
105
  {
@@ -108,18 +108,21 @@ var K = {
108
108
  interval: n,
109
109
  filters: G(r),
110
110
  by: i,
111
- limit: a
111
+ limit: a,
112
+ ranges: o
112
113
  }
113
114
  ],
114
- facets: (e, t, n, r, i) => [
115
+ facets: (e, t, n, r) => [
115
116
  "observability",
116
117
  "facets",
117
118
  {
118
- field: e,
119
+ by: e,
119
120
  timeRange: t,
120
121
  filters: G(n),
121
- limit: r,
122
- search: i
122
+ metrics: r?.metrics ? sn(r.metrics) : void 0,
123
+ ranges: r?.ranges,
124
+ limit: r?.limit,
125
+ search: r?.search
123
126
  }
124
127
  ],
125
128
  measures: (e, t, n) => [
@@ -187,14 +190,29 @@ function J() {
187
190
  }
188
191
  //#endregion
189
192
  //#region src/hooks/use-facets-query.ts
190
- function un(e, t) {
191
- let n = m(), r = q(J(), e.filters);
193
+ function un(e) {
194
+ if (!e.metric) return;
195
+ let t = {
196
+ name: e.metric,
197
+ measures: [U(e.measure)]
198
+ };
199
+ return e.sorts?.length && (t.sorts = e.sorts), [t];
200
+ }
201
+ function dn(e, t) {
202
+ let n = m(), r = q(J(), e.filters), i = un(e);
192
203
  return N({
193
- queryKey: K.facets(e.field, e.timeRange, r, e.limit, e.search),
204
+ queryKey: K.facets(e.by, e.timeRange, r, {
205
+ metrics: i,
206
+ ranges: e.ranges,
207
+ limit: e.limit,
208
+ search: e.search
209
+ }),
194
210
  queryFn: ({ signal: t }) => n.fetchFacets({
195
- field: e.field,
211
+ by: e.by,
196
212
  timeRange: e.timeRange,
213
+ metrics: i,
197
214
  filters: r,
215
+ ranges: e.ranges,
198
216
  limit: e.limit,
199
217
  search: e.search,
200
218
  signal: t
@@ -206,7 +224,7 @@ function un(e, t) {
206
224
  }
207
225
  //#endregion
208
226
  //#region src/hooks/use-log-detail-query.ts
209
- function dn(e) {
227
+ function fn(e) {
210
228
  let t = g(), n = typeof t.getById == "function", r = N({
211
229
  queryKey: K.logDetail(e.id ?? ""),
212
230
  queryFn: ({ signal: n }) => t.getById(e.id, n),
@@ -225,7 +243,7 @@ function dn(e) {
225
243
  }
226
244
  //#endregion
227
245
  //#region src/hooks/use-logs-query.ts
228
- function fn(e, t) {
246
+ function pn(e, t) {
229
247
  let n = g(), r = q(J(), e.filters);
230
248
  return N({
231
249
  queryKey: K.logs(e.timeRange, r, e.search),
@@ -242,9 +260,9 @@ function fn(e, t) {
242
260
  }
243
261
  //#endregion
244
262
  //#region src/hooks/use-logs-paged-query.ts
245
- var pn = 25;
246
- function mn(e) {
247
- let { timeRange: t, filters: n, search: r, pageSize: i = pn, enabled: a } = e, o = g(), s = q(J(), n), [c, l] = k(1), [u, d] = k(i), f = K.logs(t, s, r), p = JSON.stringify(f), m = O(p);
263
+ var mn = 25;
264
+ function hn(e) {
265
+ let { timeRange: t, filters: n, search: r, pageSize: i = mn, enabled: a } = e, o = g(), s = q(J(), n), [c, l] = k(1), [u, d] = k(i), f = K.logs(t, s, r), p = JSON.stringify(f), m = O(p);
248
266
  T(() => {
249
267
  m.current !== p && (m.current = p, l(1));
250
268
  }, [p]);
@@ -284,7 +302,7 @@ function mn(e) {
284
302
  }
285
303
  //#endregion
286
304
  //#region src/hooks/use-measures-query.ts
287
- function hn(e, t) {
305
+ function gn(e, t) {
288
306
  let n = m(), r = q(J(), e.filters);
289
307
  return N({
290
308
  queryKey: K.measures(e.metrics, e.timeRange, r),
@@ -302,7 +320,7 @@ function hn(e, t) {
302
320
  }
303
321
  //#endregion
304
322
  //#region src/hooks/use-resolve-filter-labels.ts
305
- function gn(e, t) {
323
+ function _n(e, t) {
306
324
  let n = D(() => e.filter((e) => e.value.length > 0 && !e.valueLabels?.length), [e]), r = D(() => n.map((e) => ({
307
325
  filterName: e.field,
308
326
  ids: e.value
@@ -329,16 +347,17 @@ function gn(e, t) {
329
347
  }
330
348
  //#endregion
331
349
  //#region src/hooks/use-time-series-query.ts
332
- function _n(e, t) {
350
+ function vn(e, t) {
333
351
  let n = m(), r = q(J(), e.filters);
334
352
  return N({
335
- queryKey: K.timeSeries(e.metrics, e.timeRange, e.interval, r, e.by, e.limit),
353
+ queryKey: K.timeSeries(e.metrics, e.timeRange, e.interval, r, e.by, e.limit, e.ranges),
336
354
  queryFn: ({ signal: t }) => n.fetchTimeSeries({
337
355
  metrics: e.metrics,
338
356
  timeRange: e.timeRange,
339
357
  interval: e.interval,
340
358
  filters: r,
341
359
  by: e.by,
360
+ ranges: e.ranges,
342
361
  limit: e.limit,
343
362
  signal: t
344
363
  }),
@@ -350,7 +369,7 @@ function _n(e, t) {
350
369
  }
351
370
  //#endregion
352
371
  //#region src/filters/constants.ts
353
- var vn = "5m", yn = [
372
+ var yn = "5m", bn = [
354
373
  {
355
374
  label: "Last",
356
375
  periods: [
@@ -383,7 +402,7 @@ var vn = "5m", yn = [
383
402
  "previousQuarter"
384
403
  ]
385
404
  }
386
- ], bn = yn.flatMap((e) => e.periods), xn = {
405
+ ], xn = bn.flatMap((e) => e.periods), Sn = {
387
406
  "5m": "5 minutes",
388
407
  "15m": "15 minutes",
389
408
  "1h": "1 hour",
@@ -401,7 +420,7 @@ var vn = "5m", yn = [
401
420
  previousWeek: "Week",
402
421
  previousMonth: "Month",
403
422
  previousQuarter: "Quarter"
404
- }, Sn = {
423
+ }, Cn = {
405
424
  "5m": "Last 5 minutes",
406
425
  "15m": "Last 15 minutes",
407
426
  "1h": "Last 1 hour",
@@ -419,22 +438,22 @@ var vn = "5m", yn = [
419
438
  previousWeek: "Previous week",
420
439
  previousMonth: "Previous month",
421
440
  previousQuarter: "Previous quarter"
422
- }, Cn = new Set(bn), wn = new Set(_), Tn = "1", En = {
441
+ }, wn = new Set(xn), Tn = new Set(_), En = "1", Dn = {
423
442
  type: "relative",
424
443
  period: "5m"
425
444
  };
426
- function Dn(e) {
445
+ function On(e) {
427
446
  return btoa(e).replace(/\+/g, "-").replace(/\//g, "_").replace(/=+$/, "");
428
447
  }
429
- function On(e) {
448
+ function kn(e) {
430
449
  let t = e.replace(/-/g, "+").replace(/_/g, "/");
431
450
  return atob(t);
432
451
  }
433
- function kn(e) {
434
- return e.conditions.length === 0 && e.timeRange.type === "relative" && e.timeRange.period === En.period;
435
- }
436
452
  function An(e) {
437
- if (kn(e)) return null;
453
+ return e.conditions.length === 0 && e.timeRange.type === "relative" && e.timeRange.period === Dn.period;
454
+ }
455
+ function jn(e) {
456
+ if (An(e)) return null;
438
457
  let t = {
439
458
  c: e.conditions.map(({ field: e, label: t, operator: n, value: r }) => ({
440
459
  field: e,
@@ -445,19 +464,19 @@ function An(e) {
445
464
  t: e.timeRange
446
465
  };
447
466
  return {
448
- q: Dn(JSON.stringify(t)),
467
+ q: On(JSON.stringify(t)),
449
468
  v: "1"
450
469
  };
451
470
  }
452
- function jn(e, t) {
471
+ function Mn(e, t) {
453
472
  let n = {
454
473
  conditions: [],
455
- timeRange: En
474
+ timeRange: Dn
456
475
  };
457
476
  if (!e || !t || t !== "1") return n;
458
477
  try {
459
- let t = On(e), r = JSON.parse(t);
460
- return Pn(r) ? {
478
+ let t = kn(e), r = JSON.parse(t);
479
+ return Fn(r) ? {
461
480
  conditions: r.c.map(({ field: e, label: t, operator: n, value: r }) => ({
462
481
  field: e,
463
482
  label: t,
@@ -470,33 +489,33 @@ function jn(e, t) {
470
489
  return n;
471
490
  }
472
491
  }
473
- function Mn(e) {
492
+ function Nn(e) {
474
493
  if (typeof e != "object" || !e) return !1;
475
494
  let t = e;
476
- return !(typeof t.field != "string" || t.field.length === 0 || typeof t.label != "string" || typeof t.operator != "string" || !wn.has(t.operator) || !Array.isArray(t.value) || !t.value.every((e) => typeof e == "string"));
495
+ return !(typeof t.field != "string" || t.field.length === 0 || typeof t.label != "string" || typeof t.operator != "string" || !Tn.has(t.operator) || !Array.isArray(t.value) || !t.value.every((e) => typeof e == "string"));
477
496
  }
478
- function Nn(e) {
497
+ function Pn(e) {
479
498
  if (typeof e != "object" || !e) return !1;
480
499
  let t = e;
481
- return t.type === "relative" ? typeof t.period == "string" && Cn.has(t.period) : t.type === "absolute" ? typeof t.from == "number" && Number.isFinite(t.from) && typeof t.to == "number" && Number.isFinite(t.to) : !1;
500
+ return t.type === "relative" ? typeof t.period == "string" && wn.has(t.period) : t.type === "absolute" ? typeof t.from == "number" && Number.isFinite(t.from) && typeof t.to == "number" && Number.isFinite(t.to) : !1;
482
501
  }
483
- function Pn(e) {
502
+ function Fn(e) {
484
503
  if (typeof e != "object" || !e) return !1;
485
504
  let t = e;
486
- return !Array.isArray(t.c) || !t.c.every(Mn) ? !1 : Nn(t.t);
505
+ return !Array.isArray(t.c) || !t.c.every(Nn) ? !1 : Pn(t.t);
487
506
  }
488
507
  //#endregion
489
508
  //#region src/filters/TimeRangePicker.tsx
490
- function Fn(e) {
509
+ function In(e) {
491
510
  return `${String(e.getHours()).padStart(2, "0")}:${String(e.getMinutes()).padStart(2, "0")}`;
492
511
  }
493
- function In() {
512
+ function Ln() {
494
513
  let e = -(/* @__PURE__ */ new Date()).getTimezoneOffset();
495
514
  return `GMT${e >= 0 ? "+" : "-"}${Math.floor(Math.abs(e) / 60)}`;
496
515
  }
497
- function Ln(e, t) {
498
- let n = t ? ` (${In()})` : "";
499
- if (e.type === "relative") return `${Sn[e.period]}${n}`;
516
+ function Rn(e, t) {
517
+ let n = t ? ` (${Ln()})` : "";
518
+ if (e.type === "relative") return `${Cn[e.period]}${n}`;
500
519
  let r = new Date(e.from), i = new Date(e.to), a = new Intl.DateTimeFormat(void 0, {
501
520
  month: "short",
502
521
  day: "numeric",
@@ -508,7 +527,7 @@ function Ln(e, t) {
508
527
  });
509
528
  return `${a.format(r)} @ ${o.format(r)} - ${a.format(i)} @ ${o.format(i)}${n}`;
510
529
  }
511
- function Rn(e) {
530
+ function zn(e) {
512
531
  return e ? e.toLocaleDateString(void 0, {
513
532
  weekday: "short",
514
533
  month: "short",
@@ -516,20 +535,20 @@ function Rn(e) {
516
535
  year: "numeric"
517
536
  }) : "—";
518
537
  }
519
- function zn(e, t) {
538
+ function Bn(e, t) {
520
539
  if (!e) return;
521
540
  let [n, r] = t.split(":").map(Number), i = new Date(e);
522
541
  return i.setHours(n ?? 0, r ?? 0, 0, 0), i.getTime();
523
542
  }
524
- function Bn({ value: e, onChange: t, disabled: n = !1, showTimezone: r = !1, className: i }) {
525
- let a = E(), o = `${a}-from`, s = `${a}-to`, [c, l] = k(!1), [u, d] = k("relative"), [f, p] = k(void 0), [m, h] = k("00:00"), [g, _] = k("23:59"), v = zn(f?.from, m), y = zn(f?.to, g), b = v !== void 0 && y !== void 0 && v >= y, x = v !== void 0 && y !== void 0 && !b;
543
+ function Vn({ value: e, onChange: t, disabled: n = !1, showTimezone: r = !1, className: i }) {
544
+ let a = E(), o = `${a}-from`, s = `${a}-to`, [c, l] = k(!1), [u, d] = k("relative"), [f, p] = k(void 0), [m, h] = k("00:00"), [g, _] = k("23:59"), v = Bn(f?.from, m), y = Bn(f?.to, g), b = v !== void 0 && y !== void 0 && v >= y, x = v !== void 0 && y !== void 0 && !b;
526
545
  function S(t) {
527
546
  if (l(t), t && (d(e.type === "absolute" ? "custom" : "relative"), e.type === "absolute")) {
528
547
  let t = new Date(e.from), n = new Date(e.to);
529
548
  p({
530
549
  from: t,
531
550
  to: n
532
- }), h(Fn(t)), _(Fn(n));
551
+ }), h(In(t)), _(In(n));
533
552
  }
534
553
  }
535
554
  function C(e) {
@@ -560,7 +579,7 @@ function Bn({ value: e, onChange: t, disabled: n = !1, showTimezone: r = !1, cla
560
579
  "aria-haspopup": "dialog",
561
580
  "aria-expanded": c,
562
581
  className: V("justify-between gap-2 font-normal", i),
563
- children: [Ln(e, r), /* @__PURE__ */ j(Qe, {
582
+ children: [Rn(e, r), /* @__PURE__ */ j(Qe, {
564
583
  "aria-hidden": "true",
565
584
  className: "size-4 shrink-0"
566
585
  })]
@@ -591,7 +610,7 @@ function Bn({ value: e, onChange: t, disabled: n = !1, showTimezone: r = !1, cla
591
610
  className: "flex flex-col gap-4",
592
611
  role: "listbox",
593
612
  "aria-label": "Preset time ranges",
594
- children: yn.map((t) => /* @__PURE__ */ M("div", {
613
+ children: bn.map((t) => /* @__PURE__ */ M("div", {
595
614
  className: "flex flex-col gap-2",
596
615
  children: [/* @__PURE__ */ j("p", {
597
616
  className: "text-xs font-medium text-muted-foreground",
@@ -602,12 +621,12 @@ function Bn({ value: e, onChange: t, disabled: n = !1, showTimezone: r = !1, cla
602
621
  variant: "outline",
603
622
  size: "sm",
604
623
  role: "option",
605
- "aria-label": Sn[t],
624
+ "aria-label": Cn[t],
606
625
  "aria-selected": e.type === "relative" && e.period === t,
607
626
  className: V(e.type === "relative" && e.period === t && "bg-primary text-primary-foreground hover:bg-primary/90"),
608
627
  disabled: n,
609
628
  onClick: () => C(t),
610
- children: xn[t]
629
+ children: Sn[t]
611
630
  }, t))
612
631
  })]
613
632
  }, t.label))
@@ -631,7 +650,7 @@ function Bn({ value: e, onChange: t, disabled: n = !1, showTimezone: r = !1, cla
631
650
  className: "flex-1",
632
651
  children: [/* @__PURE__ */ j(Ee, {
633
652
  htmlFor: o,
634
- children: Rn(f?.from)
653
+ children: zn(f?.from)
635
654
  }), /* @__PURE__ */ j(De, {
636
655
  id: o,
637
656
  type: "time",
@@ -650,7 +669,7 @@ function Bn({ value: e, onChange: t, disabled: n = !1, showTimezone: r = !1, cla
650
669
  className: "flex-1",
651
670
  children: [/* @__PURE__ */ j(Ee, {
652
671
  htmlFor: s,
653
- children: Rn(f?.to)
672
+ children: zn(f?.to)
654
673
  }), /* @__PURE__ */ j(De, {
655
674
  id: s,
656
675
  type: "time",
@@ -682,7 +701,7 @@ function Bn({ value: e, onChange: t, disabled: n = !1, showTimezone: r = !1, cla
682
701
  }
683
702
  //#endregion
684
703
  //#region src/filters/resolve-period.ts
685
- function Vn() {
704
+ function Hn() {
686
705
  try {
687
706
  let { firstDay: e } = new Intl.Locale(navigator.language).getWeekInfo();
688
707
  return e % 7;
@@ -690,7 +709,7 @@ function Vn() {
690
709
  return 1;
691
710
  }
692
711
  }
693
- var Hn = {
712
+ var Un = {
694
713
  "5m": 5 * 6e4,
695
714
  "15m": 15 * 6e4,
696
715
  "1h": 60 * 6e4,
@@ -703,51 +722,51 @@ var Hn = {
703
722
  "180d": 4320 * 60 * 6e4,
704
723
  "365d": 365 * 24 * 60 * 6e4
705
724
  };
706
- function Un(e) {
725
+ function Wn(e) {
707
726
  let t = new Date(e);
708
727
  return t.setHours(0, 0, 0, 0), t;
709
728
  }
710
- function Wn(e, t) {
711
- let n = Un(e), r = (n.getDay() - t + 7) % 7;
729
+ function Gn(e, t) {
730
+ let n = Wn(e), r = (n.getDay() - t + 7) % 7;
712
731
  return n.setDate(n.getDate() - r), n;
713
732
  }
714
- function Gn(e) {
733
+ function Kn(e) {
715
734
  return new Date(e.getFullYear(), e.getMonth(), 1);
716
735
  }
717
- function Kn(e) {
736
+ function qn(e) {
718
737
  let t = Math.floor(e.getMonth() / 3) * 3;
719
738
  return new Date(e.getFullYear(), t, 1);
720
739
  }
721
- function qn(e, t, n) {
740
+ function Jn(e, t, n) {
722
741
  switch (e) {
723
742
  case "currentWeek": return {
724
- from: Wn(t, n),
743
+ from: Gn(t, n),
725
744
  to: t
726
745
  };
727
746
  case "currentMonth": return {
728
- from: Gn(t),
747
+ from: Kn(t),
729
748
  to: t
730
749
  };
731
750
  case "currentQuarter": return {
732
- from: Kn(t),
751
+ from: qn(t),
733
752
  to: t
734
753
  };
735
754
  case "previousWeek": {
736
- let e = Wn(t, n), r = new Date(e);
755
+ let e = Gn(t, n), r = new Date(e);
737
756
  return r.setDate(r.getDate() - 7), {
738
757
  from: r,
739
758
  to: e
740
759
  };
741
760
  }
742
761
  case "previousMonth": {
743
- let e = Gn(t), n = new Date(e);
762
+ let e = Kn(t), n = new Date(e);
744
763
  return n.setMonth(n.getMonth() - 1), {
745
764
  from: n,
746
765
  to: e
747
766
  };
748
767
  }
749
768
  case "previousQuarter": {
750
- let e = Kn(t), n = new Date(e);
769
+ let e = qn(t), n = new Date(e);
751
770
  return n.setMonth(n.getMonth() - 3), {
752
771
  from: n,
753
772
  to: e
@@ -756,8 +775,8 @@ function qn(e, t, n) {
756
775
  default: return;
757
776
  }
758
777
  }
759
- function Jn(e, t = {}) {
760
- let { now: n = /* @__PURE__ */ new Date(), weekStartsOn: r = Vn() } = t, i = Hn[e];
778
+ function Yn(e, t = {}) {
779
+ let { now: n = /* @__PURE__ */ new Date(), weekStartsOn: r = Hn() } = t, i = Un[e];
761
780
  if (i !== void 0) {
762
781
  let e = n.getTime();
763
782
  return {
@@ -766,7 +785,7 @@ function Jn(e, t = {}) {
766
785
  to: e
767
786
  };
768
787
  }
769
- let a = qn(e, n, r);
788
+ let a = Jn(e, n, r);
770
789
  return a ? {
771
790
  type: "absolute",
772
791
  from: a.from.getTime(),
@@ -779,7 +798,7 @@ function Jn(e, t = {}) {
779
798
  }
780
799
  //#endregion
781
800
  //#region src/filters/filter-provider.ts
782
- function Yn(e) {
801
+ function Xn(e) {
783
802
  let t = e.kind ?? "async", n = e.field;
784
803
  if (!e.operators.length) throw Error(`[gamma-lib-observability] FilterProvider "${n}" must define at least one operator.`);
785
804
  if (t === "enum") {
@@ -795,7 +814,7 @@ function Yn(e) {
795
814
  }
796
815
  //#endregion
797
816
  //#region src/filters/use-scoped-filter-providers.ts
798
- function Xn(e) {
817
+ function Zn(e) {
799
818
  let t = p(), n = J();
800
819
  return D(() => {
801
820
  if (!e) return t;
@@ -811,18 +830,18 @@ function Xn(e) {
811
830
  }
812
831
  //#endregion
813
832
  //#region src/filters/utils/filter-value-options.ts
814
- function Zn(e, t) {
833
+ function Qn(e, t) {
815
834
  let n = /* @__PURE__ */ new Map();
816
835
  for (let t of e) n.set(t.value, t);
817
836
  for (let e of t) n.set(e.value, e);
818
837
  return [...n.values()];
819
838
  }
820
- function Qn(e, t) {
839
+ function $n(e, t) {
821
840
  return e.value === t.value;
822
841
  }
823
842
  //#endregion
824
843
  //#region src/filters/utils/use-auto-open-on-focus.ts
825
- function $n() {
844
+ function er() {
826
845
  let [e, t] = k(!1), n = O(!1);
827
846
  return {
828
847
  open: e,
@@ -843,15 +862,15 @@ function $n() {
843
862
  }
844
863
  //#endregion
845
864
  //#region src/filters/FilterValueCombobox.tsx
846
- var er = (e) => e.label, tr = (e) => e.value;
847
- function nr({ options: e, selected: t, onSelectedChange: n, multiple: r, onSearchChange: i, disableBuiltInFilter: a = !1, placeholder: o = r ? "Search values…" : "Search value…", emptyMessage: s = "No results.", listFooter: c, errorMessage: l }) {
848
- let u = Ke(), { open: d, handleOpenChange: f, handleInputFocus: p, handleInputKeyDown: m } = $n(), h = E(), g = !!l, _ = {
865
+ var tr = (e) => e.label, nr = (e) => e.value;
866
+ function rr({ options: e, selected: t, onSelectedChange: n, multiple: r, onSearchChange: i, disableBuiltInFilter: a = !1, placeholder: o = r ? "Search values…" : "Search value…", emptyMessage: s = "No results.", listFooter: c, errorMessage: l }) {
867
+ let u = Ke(), { open: d, handleOpenChange: f, handleInputFocus: p, handleInputKeyDown: m } = er(), h = E(), g = !!l, _ = {
849
868
  open: d,
850
869
  onOpenChange: f,
851
870
  items: e,
852
- itemToStringLabel: er,
853
- itemToStringValue: tr,
854
- isItemEqualToValue: Qn,
871
+ itemToStringLabel: tr,
872
+ itemToStringValue: nr,
873
+ isItemEqualToValue: $n,
855
874
  ...a && { filter: null },
856
875
  ...i && { onInputValueChange: (e) => i(String(e)) }
857
876
  }, y = /* @__PURE__ */ M(A, { children: [
@@ -911,7 +930,7 @@ function nr({ options: e, selected: t, onSelectedChange: n, multiple: r, onSearc
911
930
  }
912
931
  //#endregion
913
932
  //#region src/filters/utils/use-debounced-value.ts
914
- function rr(e, t) {
933
+ function ir(e, t) {
915
934
  let [n, r] = k(e);
916
935
  return T(() => {
917
936
  let n = window.setTimeout(() => r(e), t);
@@ -920,13 +939,13 @@ function rr(e, t) {
920
939
  }
921
940
  //#endregion
922
941
  //#region src/filters/utils/use-scroll-sentinel.ts
923
- function ir(e, t) {
942
+ function ar(e, t) {
924
943
  let n = O(e), r = O(null);
925
944
  return T(() => {
926
945
  n.current = e;
927
946
  }, [e]), C((e) => {
928
947
  if (r.current &&= (r.current.disconnect(), null), e && t) {
929
- let t = ar(e), i = new IntersectionObserver((e) => {
948
+ let t = or(e), i = new IntersectionObserver((e) => {
930
949
  e[0]?.isIntersecting && n.current();
931
950
  }, {
932
951
  root: t,
@@ -936,7 +955,7 @@ function ir(e, t) {
936
955
  }
937
956
  }, [t]);
938
957
  }
939
- function ar(e) {
958
+ function or(e) {
940
959
  let t = e.closest("[data-slot=combobox-content]");
941
960
  if (t) return t;
942
961
  let n = e.parentElement;
@@ -949,9 +968,9 @@ function ar(e) {
949
968
  }
950
969
  //#endregion
951
970
  //#region src/filters/FilterAsyncValueField.tsx
952
- var or = 300;
953
- function sr({ provider: e, selected: t, onSelectedChange: n, multiple: r }) {
954
- let [i, a] = k(""), o = rr(i, or), [s, c] = k([]), [l, u] = k(!1), [d, f] = k(null), [p, m] = k(!1), [h, g] = k(1), _ = O(0), v = O(null), y = O(o), b = C(async (t, n) => {
971
+ var sr = 300;
972
+ function cr({ provider: e, selected: t, onSelectedChange: n, multiple: r }) {
973
+ let [i, a] = k(""), o = ir(i, sr), [s, c] = k([]), [l, u] = k(!1), [d, f] = k(null), [p, m] = k(!1), [h, g] = k(1), _ = O(0), v = O(null), y = O(o), b = C(async (t, n) => {
955
974
  if (!e.valueLoader) return;
956
975
  v.current?.abort();
957
976
  let r = new AbortController();
@@ -991,11 +1010,11 @@ function sr({ provider: e, selected: t, onSelectedChange: n, multiple: r }) {
991
1010
  h,
992
1011
  b
993
1012
  ]);
994
- let x = ir(C(() => {
1013
+ let x = ar(C(() => {
995
1014
  !l && p && g((e) => e + 1);
996
1015
  }, [l, p]), p && !l);
997
- return /* @__PURE__ */ j(nr, {
998
- options: D(() => Zn(t, s), [t, s]),
1016
+ return /* @__PURE__ */ j(rr, {
1017
+ options: D(() => Qn(t, s), [t, s]),
999
1018
  selected: t,
1000
1019
  onSelectedChange: n,
1001
1020
  multiple: r,
@@ -1021,8 +1040,8 @@ function sr({ provider: e, selected: t, onSelectedChange: n, multiple: r }) {
1021
1040
  }
1022
1041
  //#endregion
1023
1042
  //#region src/filters/FilterEnumValueField.tsx
1024
- function cr({ provider: e, selected: t, onSelectedChange: n, multiple: r }) {
1025
- return /* @__PURE__ */ j(nr, {
1043
+ function lr({ provider: e, selected: t, onSelectedChange: n, multiple: r }) {
1044
+ return /* @__PURE__ */ j(rr, {
1026
1045
  options: D(() => e.options ?? [], [e.options]),
1027
1046
  selected: t,
1028
1047
  onSelectedChange: n,
@@ -1031,19 +1050,19 @@ function cr({ provider: e, selected: t, onSelectedChange: n, multiple: r }) {
1031
1050
  }
1032
1051
  //#endregion
1033
1052
  //#region src/filters/utils/scope-labels.ts
1034
- var lr = {
1053
+ var ur = {
1035
1054
  HTTP_PROXY: "HTTP Proxy",
1036
1055
  MESSAGE: "Message"
1037
1056
  };
1038
- function ur(e) {
1057
+ function dr(e) {
1039
1058
  return e.trim().replace(/\s+/g, "_").toUpperCase();
1040
1059
  }
1041
- function dr(e) {
1042
- return lr[ur(e)] ?? e.trim();
1060
+ function fr(e) {
1061
+ return ur[dr(e)] ?? e.trim();
1043
1062
  }
1044
1063
  //#endregion
1045
1064
  //#region src/filters/FilterFieldOptionRow.tsx
1046
- var fr = S(function({ provider: e, showScopes: t = !1, className: n }) {
1065
+ var pr = S(function({ provider: e, showScopes: t = !1, className: n }) {
1047
1066
  let r = t && e.scopes && e.scopes.length > 0;
1048
1067
  return /* @__PURE__ */ M("div", {
1049
1068
  className: V("flex min-w-0 flex-1 items-center justify-between gap-3", n),
@@ -1055,15 +1074,15 @@ var fr = S(function({ provider: e, showScopes: t = !1, className: n }) {
1055
1074
  children: e.scopes?.map((e) => /* @__PURE__ */ j(P, {
1056
1075
  variant: "secondary",
1057
1076
  className: "max-w-28 truncate text-xs font-normal",
1058
- children: dr(e)
1077
+ children: fr(e)
1059
1078
  }, e))
1060
1079
  }) : null]
1061
1080
  });
1062
1081
  });
1063
1082
  //#endregion
1064
1083
  //#region src/filters/FilterPropertyField.tsx
1065
- function pr({ providers: e, selectedField: t, onFieldChange: n, showScopes: r }) {
1066
- let i = Ke(), { open: a, handleOpenChange: o, handleInputFocus: s, handleInputKeyDown: c } = $n();
1084
+ function mr({ providers: e, selectedField: t, onFieldChange: n, showScopes: r }) {
1085
+ let i = Ke(), { open: a, handleOpenChange: o, handleInputFocus: s, handleInputKeyDown: c } = er();
1067
1086
  return /* @__PURE__ */ M(ce, {
1068
1087
  open: a,
1069
1088
  onOpenChange: o,
@@ -1085,7 +1104,7 @@ function pr({ providers: e, selectedField: t, onFieldChange: n, showScopes: r })
1085
1104
  anchor: i,
1086
1105
  children: [/* @__PURE__ */ j(pe, { children: "No results." }), /* @__PURE__ */ j(he, { children: (e) => /* @__PURE__ */ j(me, {
1087
1106
  value: e,
1088
- children: /* @__PURE__ */ j(fr, {
1107
+ children: /* @__PURE__ */ j(pr, {
1089
1108
  provider: e,
1090
1109
  showScopes: r
1091
1110
  })
@@ -1095,7 +1114,7 @@ function pr({ providers: e, selectedField: t, onFieldChange: n, showScopes: r })
1095
1114
  }
1096
1115
  //#endregion
1097
1116
  //#region src/filters/utils/filter-operators.ts
1098
- var mr = {
1117
+ var hr = {
1099
1118
  eq: "=",
1100
1119
  neq: "≠",
1101
1120
  in: "in",
@@ -1110,13 +1129,13 @@ var mr = {
1110
1129
  lte: "≤",
1111
1130
  exists: "exists",
1112
1131
  not_exists: "not exists"
1113
- }, hr = new Set(["exists", "not_exists"]), gr = new Set([
1132
+ }, gr = new Set(["exists", "not_exists"]), _r = new Set([
1114
1133
  "neq",
1115
1134
  "not_in",
1116
1135
  "not_contains",
1117
1136
  "not_exists"
1118
1137
  ]);
1119
- function _r(e) {
1138
+ function vr(e) {
1120
1139
  switch (e) {
1121
1140
  case "eq": return "=";
1122
1141
  case "neq": return "≠";
@@ -1124,38 +1143,38 @@ function _r(e) {
1124
1143
  case "not_in": return "Not in";
1125
1144
  case "gte": return "≥";
1126
1145
  case "lte": return "≤";
1127
- default: return mr[e] ?? e;
1146
+ default: return hr[e] ?? e;
1128
1147
  }
1129
1148
  }
1130
- function vr(e) {
1131
- return !hr.has(e);
1149
+ function yr(e) {
1150
+ return !gr.has(e);
1132
1151
  }
1133
- function yr(e, t) {
1152
+ function br(e, t) {
1134
1153
  return e.operators.includes(t);
1135
1154
  }
1136
- function br(e, t) {
1137
- let n = yr(e, "in"), r = yr(e, "not_in");
1155
+ function xr(e, t) {
1156
+ let n = br(e, "in"), r = br(e, "not_in");
1138
1157
  return !!(t === "in" || t === "not_in" || n && t === "eq" || r && t === "neq");
1139
1158
  }
1140
- function xr(e, t, n) {
1159
+ function Sr(e, t, n) {
1141
1160
  if (n >= 2) {
1142
- if (t === "eq" && yr(e, "in")) return "in";
1143
- if (t === "neq" && yr(e, "not_in")) return "not_in";
1161
+ if (t === "eq" && br(e, "in")) return "in";
1162
+ if (t === "neq" && br(e, "not_in")) return "not_in";
1144
1163
  }
1145
1164
  if (n === 1) {
1146
- if (t === "in" && yr(e, "eq")) return "eq";
1147
- if (t === "not_in" && yr(e, "neq")) return "neq";
1165
+ if (t === "in" && br(e, "eq")) return "eq";
1166
+ if (t === "not_in" && br(e, "neq")) return "neq";
1148
1167
  }
1149
1168
  return t;
1150
1169
  }
1151
1170
  //#endregion
1152
1171
  //#region src/filters/utils/normalize-filter-value.ts
1153
- function Sr(e) {
1172
+ function Cr(e) {
1154
1173
  return e.every((e) => typeof e == "object" && !!e && "value" in e && typeof e.value == "string" && "label" in e && typeof e.label == "string");
1155
1174
  }
1156
- function Cr(e) {
1175
+ function wr(e) {
1157
1176
  if (Array.isArray(e)) {
1158
- if (e.length > 0 && Sr(e)) return {
1177
+ if (e.length > 0 && Cr(e)) return {
1159
1178
  values: e.map((e) => e.value),
1160
1179
  valueLabels: e.map((e) => e.label)
1161
1180
  };
@@ -1174,7 +1193,7 @@ function Cr(e) {
1174
1193
  valueLabels: t.map((e, t) => n[t] ?? e)
1175
1194
  };
1176
1195
  }
1177
- function wr(e, t) {
1196
+ function Tr(e, t) {
1178
1197
  return e.map((e, n) => ({
1179
1198
  value: e,
1180
1199
  label: t?.[n] ?? e
@@ -1182,42 +1201,42 @@ function wr(e, t) {
1182
1201
  }
1183
1202
  //#endregion
1184
1203
  //#region src/filters/utils/parse-free-text-input.ts
1185
- function Tr(e) {
1204
+ function Er(e) {
1186
1205
  return e.split(",").map((e) => e.trim()).filter((e) => e.length > 0);
1187
1206
  }
1188
1207
  //#endregion
1189
1208
  //#region src/filters/utils/build-filter-condition.ts
1190
- function Er(e) {
1209
+ function Dr(e) {
1191
1210
  let { provider: t, operator: n, selectedOptions: r = [], freeText: i = "" } = e;
1192
1211
  if (!t || !n) return !1;
1193
- if (!vr(n)) return !0;
1212
+ if (!yr(n)) return !0;
1194
1213
  if (t.allowFreeText && !t.valueLoader && t.kind !== "enum") {
1195
- let e = Tr(i);
1214
+ let e = Er(i);
1196
1215
  if (e.length === 0) return !1;
1197
1216
  if (e.length > 1) {
1198
- let r = xr(t, n, e.length);
1217
+ let r = Sr(t, n, e.length);
1199
1218
  if (r === "eq" || r === "neq") return !1;
1200
1219
  }
1201
1220
  return !0;
1202
1221
  }
1203
1222
  if (r.length === 0) return !1;
1204
1223
  if (r.length > 1) {
1205
- let e = xr(t, n, r.length);
1224
+ let e = Sr(t, n, r.length);
1206
1225
  if (e === "eq" || e === "neq") return !1;
1207
1226
  }
1208
1227
  return !0;
1209
1228
  }
1210
- function Dr(e) {
1211
- let { provider: t, operator: n, selectedOptions: r, freeText: i } = e, a = vr(n), o, s;
1229
+ function Or(e) {
1230
+ let { provider: t, operator: n, selectedOptions: r, freeText: i } = e, a = yr(n), o, s;
1212
1231
  if (!a) o = [], s = [];
1213
1232
  else if (t.allowFreeText && !t.valueLoader && t.kind !== "enum") {
1214
- let e = Cr(Tr(i));
1233
+ let e = wr(Er(i));
1215
1234
  o = e.values, s = e.valueLabels;
1216
1235
  } else {
1217
- let e = Cr([...r]);
1236
+ let e = wr([...r]);
1218
1237
  o = e.values, s = e.valueLabels;
1219
1238
  }
1220
- let c = xr(t, n, o.length);
1239
+ let c = Sr(t, n, o.length);
1221
1240
  return {
1222
1241
  field: t.field,
1223
1242
  label: t.label,
@@ -1228,8 +1247,8 @@ function Dr(e) {
1228
1247
  }
1229
1248
  //#endregion
1230
1249
  //#region src/filters/FilterPopoverForm.tsx
1231
- function Or({ existingCondition: e, onApply: t, onCancel: n, showScopes: r = !1 }) {
1232
- let i = p(), [a, o] = k(e?.field ?? null), [s, c] = k(e?.operator ?? null), [l, u] = k(() => e ? wr(e.value, e.valueLabels) : []), [d, f] = k(e?.value.join(", ") ?? ""), m = D(() => i.find((e) => e.field === a) ?? null, [i, a]), h = m && s ? br(m, s) : !1, g = m?.kind ?? "async", _ = s ? vr(s) : !0, v = Er({
1250
+ function kr({ existingCondition: e, onApply: t, onCancel: n, showScopes: r = !1 }) {
1251
+ let i = p(), [a, o] = k(e?.field ?? null), [s, c] = k(e?.operator ?? null), [l, u] = k(() => e ? Tr(e.value, e.valueLabels) : []), [d, f] = k(e?.value.join(", ") ?? ""), m = D(() => i.find((e) => e.field === a) ?? null, [i, a]), h = m && s ? xr(m, s) : !1, g = m?.kind ?? "async", _ = s ? yr(s) : !0, v = Dr({
1233
1252
  provider: m,
1234
1253
  operator: s,
1235
1254
  selectedOptions: l,
@@ -1244,12 +1263,12 @@ function Or({ existingCondition: e, onApply: t, onCancel: n, showScopes: r = !1
1244
1263
  function x(e) {
1245
1264
  let t = h ? e : e.slice(0, 1);
1246
1265
  if (u(t), m && s) {
1247
- let e = xr(m, s, t.length);
1266
+ let e = Sr(m, s, t.length);
1248
1267
  e !== s && c(e);
1249
1268
  }
1250
1269
  }
1251
1270
  function S() {
1252
- !m || !s || t(Dr({
1271
+ !m || !s || t(Or({
1253
1272
  provider: m,
1254
1273
  operator: s,
1255
1274
  selectedOptions: l,
@@ -1261,12 +1280,12 @@ function Or({ existingCondition: e, onApply: t, onCancel: n, showScopes: r = !1
1261
1280
  disabled: !0,
1262
1281
  placeholder: "Search value…",
1263
1282
  "aria-label": "Filter value"
1264
- }) : g === "enum" && m.options ? /* @__PURE__ */ j(cr, {
1283
+ }) : g === "enum" && m.options ? /* @__PURE__ */ j(lr, {
1265
1284
  provider: m,
1266
1285
  selected: l,
1267
1286
  onSelectedChange: x,
1268
1287
  multiple: h
1269
- }, m.field) : m.valueLoader ? /* @__PURE__ */ j(sr, {
1288
+ }, m.field) : m.valueLoader ? /* @__PURE__ */ j(cr, {
1270
1289
  provider: m,
1271
1290
  selected: l,
1272
1291
  onSelectedChange: x,
@@ -1284,7 +1303,7 @@ function Or({ existingCondition: e, onApply: t, onCancel: n, showScopes: r = !1
1284
1303
  return /* @__PURE__ */ M("div", {
1285
1304
  className: "flex w-[340px] flex-col gap-4 p-4",
1286
1305
  children: [
1287
- /* @__PURE__ */ M(we, { children: [/* @__PURE__ */ j(Ee, { children: "Filter by" }), /* @__PURE__ */ j(pr, {
1306
+ /* @__PURE__ */ M(we, { children: [/* @__PURE__ */ j(Ee, { children: "Filter by" }), /* @__PURE__ */ j(mr, {
1288
1307
  providers: i,
1289
1308
  selectedField: a,
1290
1309
  onFieldChange: y,
@@ -1300,7 +1319,7 @@ function Or({ existingCondition: e, onApply: t, onCancel: n, showScopes: r = !1
1300
1319
  children: /* @__PURE__ */ j(Le, { placeholder: "Select operator…" })
1301
1320
  }), /* @__PURE__ */ j(Pe, { children: (m?.operators ?? []).map((e) => /* @__PURE__ */ j(Fe, {
1302
1321
  value: e,
1303
- children: _r(e)
1322
+ children: vr(e)
1304
1323
  }, e)) })]
1305
1324
  })] }),
1306
1325
  _ ? /* @__PURE__ */ M(we, { children: [/* @__PURE__ */ j(Ee, { children: "Filter value" }), C()] }) : null,
@@ -1325,31 +1344,31 @@ function Or({ existingCondition: e, onApply: t, onCancel: n, showScopes: r = !1
1325
1344
  }
1326
1345
  //#endregion
1327
1346
  //#region src/filters/utils/filter-display.ts
1328
- function kr(e, t) {
1347
+ function Ar(e, t) {
1329
1348
  let n = e.value[t];
1330
1349
  if (n === void 0) return "";
1331
1350
  let r = e.valueLabels?.[t];
1332
1351
  return r != null && r !== "" ? r : n;
1333
1352
  }
1334
- function Ar(e) {
1335
- return e.value.length === 1 && e.operator === "in" ? "eq" : e.value.length === 1 && e.operator === "not_in" ? "neq" : e.operator;
1336
- }
1337
1353
  function jr(e) {
1338
- return mr[e] ?? e;
1354
+ return e.value.length === 1 && e.operator === "in" ? "eq" : e.value.length === 1 && e.operator === "not_in" ? "neq" : e.operator;
1339
1355
  }
1340
1356
  function Mr(e) {
1341
- if (e.value.length === 0) return e.label;
1342
- let t = jr(Ar(e));
1343
- return e.value.length > 1 ? `${e.label} ${t} (${e.value.length})` : `${e.label} ${t} ${kr(e, 0)}`;
1357
+ return hr[e] ?? e;
1344
1358
  }
1345
1359
  function Nr(e) {
1360
+ if (e.value.length === 0) return e.label;
1361
+ let t = Mr(jr(e));
1362
+ return e.value.length > 1 ? `${e.label} ${t} (${e.value.length})` : `${e.label} ${t} ${Ar(e, 0)}`;
1363
+ }
1364
+ function Pr(e) {
1346
1365
  if (e.value.length === 0) return {
1347
1366
  name: e.label,
1348
1367
  operator: "",
1349
1368
  value: "",
1350
1369
  isCount: !1
1351
1370
  };
1352
- let t = jr(Ar(e));
1371
+ let t = Mr(jr(e));
1353
1372
  return e.value.length > 1 ? {
1354
1373
  name: e.label,
1355
1374
  operator: t,
@@ -1358,26 +1377,26 @@ function Nr(e) {
1358
1377
  } : {
1359
1378
  name: e.label,
1360
1379
  operator: t,
1361
- value: kr(e, 0),
1380
+ value: Ar(e, 0),
1362
1381
  isCount: !1
1363
1382
  };
1364
1383
  }
1365
- function Pr(e) {
1384
+ function Fr(e) {
1366
1385
  if (e.value.length === 0) return e.label;
1367
- let t = jr(Ar(e));
1386
+ let t = Mr(jr(e));
1368
1387
  if (e.value.length > 1) {
1369
- let n = e.value.map((t, n) => kr(e, n));
1388
+ let n = e.value.map((t, n) => Ar(e, n));
1370
1389
  return `${e.label} ${t} [${n.join(", ")}]`;
1371
1390
  }
1372
- return `${e.label} ${t} ${kr(e, 0)}`;
1391
+ return `${e.label} ${t} ${Ar(e, 0)}`;
1373
1392
  }
1374
1393
  //#endregion
1375
1394
  //#region src/filters/FilterChip.tsx
1376
- function Fr(e, t, n) {
1395
+ function Ir(e, t, n) {
1377
1396
  return e ? t ? `Filter: ${n}` : `Edit filter: ${n}. Press Delete to remove.` : `Active filter: ${n}`;
1378
1397
  }
1379
- var Ir = S(x(function({ condition: e, onEdit: t, onRemove: n, editable: r = !0, disabled: i = !1, active: a = !1, className: o, "data-chip-index": s }, c) {
1380
- let l = Nr(e), u = Pr(e), d = r && !i, f = gr.has(e.operator), [p, m] = k(!1);
1398
+ var Lr = S(x(function({ condition: e, onEdit: t, onRemove: n, editable: r = !0, disabled: i = !1, active: a = !1, className: o, "data-chip-index": s }, c) {
1399
+ let l = Pr(e), u = Fr(e), d = r && !i, f = _r.has(e.operator), [p, m] = k(!1);
1381
1400
  function h(e) {
1382
1401
  e.stopPropagation(), d && n?.();
1383
1402
  }
@@ -1404,7 +1423,7 @@ var Ir = S(x(function({ condition: e, onEdit: t, onRemove: n, editable: r = !0,
1404
1423
  ref: c,
1405
1424
  "data-chip-index": s,
1406
1425
  className: V("inline-flex items-center gap-1.5", f && r && "border-dashed border-highlight/40", f && !r && "border-dashed", i && "pointer-events-none opacity-50", o),
1407
- "aria-label": Fr(r, i, u),
1426
+ "aria-label": Ir(r, i, u),
1408
1427
  "aria-disabled": i || void 0,
1409
1428
  "data-active": a || void 0,
1410
1429
  onMouseEnter: () => d && m(!0),
@@ -1438,32 +1457,32 @@ var Ir = S(x(function({ condition: e, onEdit: t, onRemove: n, editable: r = !0,
1438
1457
  })
1439
1458
  }), /* @__PURE__ */ j(R, { children: u })] });
1440
1459
  }));
1441
- Ir.displayName = "FilterChip";
1460
+ Lr.displayName = "FilterChip";
1442
1461
  //#endregion
1443
1462
  //#region src/filters/utils/filter-condition-key.ts
1444
- function Lr(e) {
1463
+ function Rr(e) {
1445
1464
  let t = JSON.stringify([...e.value].sort());
1446
1465
  return `${e.field}:${e.operator}:${t}`;
1447
1466
  }
1448
1467
  //#endregion
1449
1468
  //#region src/filters/utils/merge-conditions.ts
1450
- var Rr = new Set(["eq", "in"]), zr = new Set(["neq", "not_in"]);
1451
- function Br(e) {
1452
- return Rr.has(e);
1453
- }
1469
+ var zr = new Set(["eq", "in"]), Br = new Set(["neq", "not_in"]);
1454
1470
  function Vr(e) {
1455
1471
  return zr.has(e);
1456
1472
  }
1457
- function Hr(e, t) {
1458
- return e.field === t.field ? !!(Br(e.operator) && Br(t.operator) || Vr(e.operator) && Vr(t.operator)) : !1;
1473
+ function Hr(e) {
1474
+ return Br.has(e);
1459
1475
  }
1460
- function Ur(e, t, n) {
1461
- if (!Hr(e, t)) return null;
1476
+ function Ur(e, t) {
1477
+ return e.field === t.field ? !!(Vr(e.operator) && Vr(t.operator) || Hr(e.operator) && Hr(t.operator)) : !1;
1478
+ }
1479
+ function Wr(e, t, n) {
1480
+ if (!Ur(e, t)) return null;
1462
1481
  let r = /* @__PURE__ */ new Set(), i = [], a = [];
1463
1482
  for (let n of [e, t]) n.value.forEach((e, t) => {
1464
1483
  r.has(e) || (r.add(e), i.push(e), a.push(n.valueLabels?.[t] ?? e));
1465
1484
  });
1466
- let o = xr(n, Br(e.operator) ? "eq" : "neq", i.length);
1485
+ let o = Sr(n, Vr(e.operator) ? "eq" : "neq", i.length);
1467
1486
  return !n.operators.includes(o) || i.length > 1 && (o === "eq" || o === "neq") ? null : {
1468
1487
  field: e.field,
1469
1488
  label: e.label,
@@ -1474,11 +1493,11 @@ function Ur(e, t, n) {
1474
1493
  }
1475
1494
  //#endregion
1476
1495
  //#region src/filters/FilterBar.tsx
1477
- function Wr(e, t) {
1496
+ function Gr(e, t) {
1478
1497
  return e ? e.mode === "add" ? "add" : t ? `edit-${t.field}-${t.operator}-${JSON.stringify(t.value)}` : `edit-${e.editIndex}` : "closed";
1479
1498
  }
1480
- function Gr({ filters: e, onFiltersChange: t, editable: n = !0, showScopes: r = !1, scopeFilterField: i, className: a }) {
1481
- let o = Xn(i), [s, c] = k(null), l = O(null), u = O(/* @__PURE__ */ new Map()), d = O(null), f = O({ getBoundingClientRect: () => new DOMRect() }), p = s?.editIndex !== void 0 && s.editIndex >= 0 && s.editIndex < e.length, m = s !== null && (s.mode === "add" || p), h = p ? e[s.editIndex] : void 0, g = C((e) => {
1499
+ function Kr({ filters: e, onFiltersChange: t, editable: n = !0, showScopes: r = !1, scopeFilterField: i, className: a }) {
1500
+ let o = Zn(i), [s, c] = k(null), l = O(null), u = O(/* @__PURE__ */ new Map()), d = O(null), f = O({ getBoundingClientRect: () => new DOMRect() }), p = s?.editIndex !== void 0 && s.editIndex >= 0 && s.editIndex < e.length, m = s !== null && (s.mode === "add" || p), h = p ? e[s.editIndex] : void 0, g = C((e) => {
1482
1501
  if (e) {
1483
1502
  let t = Number(e.dataset.chipIndex);
1484
1503
  u.current.set(t, e);
@@ -1509,7 +1528,7 @@ function Gr({ filters: e, onFiltersChange: t, editable: n = !0, showScopes: r =
1509
1528
  }
1510
1529
  let r = o.find((e) => e.field === n.field), i = e.findIndex((e) => e.field === n.field), a = i >= 0 ? e[i] : void 0;
1511
1530
  if (a && r) {
1512
- let o = Ur(a, n, r);
1531
+ let o = Wr(a, n, r);
1513
1532
  if (o) {
1514
1533
  t(e.map((e, t) => t === i ? o : e)), b();
1515
1534
  return;
@@ -1554,7 +1573,7 @@ function Gr({ filters: e, onFiltersChange: t, editable: n = !0, showScopes: r =
1554
1573
  }) : null,
1555
1574
  e.map((e, t) => {
1556
1575
  let r = s?.mode === "edit" && s.editIndex === t;
1557
- return /* @__PURE__ */ j(Ir, {
1576
+ return /* @__PURE__ */ j(Lr, {
1558
1577
  ref: g,
1559
1578
  "data-chip-index": t,
1560
1579
  condition: e,
@@ -1563,14 +1582,14 @@ function Gr({ filters: e, onFiltersChange: t, editable: n = !0, showScopes: r =
1563
1582
  active: r,
1564
1583
  onEdit: () => v(t),
1565
1584
  onRemove: () => w(t)
1566
- }, Lr(e));
1585
+ }, Rr(e));
1567
1586
  }),
1568
1587
  n && e.length > 0 ? /* @__PURE__ */ j("button", {
1569
1588
  type: "button",
1570
1589
  onClick: T,
1571
1590
  className: "ml-1 shrink-0 rounded p-1 text-muted-foreground hover:bg-muted hover:text-foreground",
1572
1591
  "aria-label": "Clear all filters",
1573
- children: /* @__PURE__ */ j(ot, { className: "size-3.5" })
1592
+ children: /* @__PURE__ */ j(st, { className: "size-3.5" })
1574
1593
  }) : null
1575
1594
  ]
1576
1595
  }),
@@ -1582,44 +1601,44 @@ function Gr({ filters: e, onFiltersChange: t, editable: n = !0, showScopes: r =
1582
1601
  sideOffset: 8,
1583
1602
  className: "w-auto p-0",
1584
1603
  onOpenAutoFocus: E,
1585
- children: m ? /* @__PURE__ */ j(Or, {
1604
+ children: m ? /* @__PURE__ */ j(kr, {
1586
1605
  existingCondition: h,
1587
1606
  onApply: S,
1588
1607
  onCancel: b,
1589
1608
  showScopes: r
1590
- }, Wr(s, h)) : null
1609
+ }, Gr(s, h)) : null
1591
1610
  })
1592
1611
  ]
1593
1612
  }) });
1594
1613
  }
1595
1614
  //#endregion
1596
1615
  //#region src/dashboards/WidgetGroupContext.tsx
1597
- var Kr = [], qr = y(null), Jr = qr.Provider;
1598
- function Yr() {
1599
- return w(qr);
1616
+ var qr = [], Jr = y(null), Yr = Jr.Provider;
1617
+ function Xr() {
1618
+ return w(Jr);
1600
1619
  }
1601
1620
  //#endregion
1602
1621
  //#region src/dashboards/resolve-stable-time-range.ts
1603
- var Xr = 6e4;
1604
- function Zr(e) {
1622
+ var Zr = 6e4;
1623
+ function Qr(e) {
1605
1624
  if (e.type === "absolute") return e;
1606
- let t = Jn(e.period);
1625
+ let t = Yn(e.period);
1607
1626
  return {
1608
1627
  type: "absolute",
1609
- from: Math.floor(t.from / Xr) * Xr,
1610
- to: Math.floor(t.to / Xr) * Xr
1628
+ from: Math.floor(t.from / Zr) * Zr,
1629
+ to: Math.floor(t.to / Zr) * Zr
1611
1630
  };
1612
1631
  }
1613
1632
  //#endregion
1614
1633
  //#region src/hooks/use-stable-time-range.ts
1615
- function Qr(e) {
1634
+ function $r(e) {
1616
1635
  return Math.floor(Date.now() / e);
1617
1636
  }
1618
1637
  function Y(e) {
1619
- let t = Qt(), n = t?.intervalMs ?? 6e4, r = t?.isLive ?? !0, [i, a] = k(() => Qr(n));
1638
+ let t = Qt(), n = t?.intervalMs ?? 6e4, r = t?.isLive ?? !0, [i, a] = k(() => $r(n));
1620
1639
  return T(() => {
1621
1640
  if (e.type === "absolute" || !r) return;
1622
- let t, i = () => a(Qr(n)), o = n - Date.now() % n, s = setTimeout(() => {
1641
+ let t, i = () => a($r(n)), o = n - Date.now() % n, s = setTimeout(() => {
1623
1642
  i(), t = setInterval(i, n);
1624
1643
  }, o);
1625
1644
  if (typeof document < "u") {
@@ -1637,37 +1656,37 @@ function Y(e) {
1637
1656
  e.type,
1638
1657
  r,
1639
1658
  n
1640
- ]), D(() => Zr(e), [e, i]);
1659
+ ]), D(() => Qr(e), [e, i]);
1641
1660
  }
1642
1661
  //#endregion
1643
1662
  //#region src/dashboards/adapters/facets-adapter.ts
1644
- var $r = 20;
1645
- function ei(e) {
1646
- return e.length <= $r ? e : `${e.slice(0, $r - 1)}…`;
1647
- }
1663
+ var ei = 20;
1648
1664
  function ti(e) {
1665
+ return e.length <= ei ? e : `${e.slice(0, ei - 1)}…`;
1666
+ }
1667
+ function ni(e) {
1649
1668
  return e.map((e) => ({
1650
1669
  category: e.value,
1651
1670
  value: e.count
1652
1671
  }));
1653
1672
  }
1654
- function ni(e) {
1673
+ function ri(e) {
1655
1674
  return e.map((e) => ({
1656
- category: ei(e.label || e.value),
1675
+ category: ti(e.label || e.value),
1657
1676
  count: e.count
1658
1677
  }));
1659
1678
  }
1660
1679
  //#endregion
1661
1680
  //#region src/dashboards/use-merged-widget-filters.ts
1662
- function ri(e, t) {
1681
+ function ii(e, t) {
1663
1682
  return q(J(), t, e);
1664
1683
  }
1665
1684
  //#endregion
1666
1685
  //#region src/dashboards/renderers/BarPresentation.tsx
1667
- var ii = 160, ai = 72, oi = 7, si = 20;
1668
- function ci({ data: e, config: t, state: n, layout: r = "vertical" }) {
1686
+ var ai = 160, oi = 72, si = 7, ci = 20;
1687
+ function li({ data: e, config: t, state: n, layout: r = "vertical" }) {
1669
1688
  let i = D(() => {
1670
- if (!(r !== "horizontal" || e.length === 0)) return { left: Math.min(ii, Math.max(ai, e.reduce((e, t) => Math.max(e, t.category.length), 0) * oi + si)) };
1689
+ if (!(r !== "horizontal" || e.length === 0)) return { left: Math.min(ai, Math.max(oi, e.reduce((e, t) => Math.max(e, t.category.length), 0) * si + ci)) };
1671
1690
  }, [e, r]);
1672
1691
  return /* @__PURE__ */ j(St, {
1673
1692
  config: t,
@@ -1683,9 +1702,13 @@ function ci({ data: e, config: t, state: n, layout: r = "vertical" }) {
1683
1702
  }
1684
1703
  //#endregion
1685
1704
  //#region src/dashboards/renderers/BarWidgetRenderer.tsx
1686
- function li({ widget: e, timeRange: t, filters: n }) {
1687
- let r = ri(e.filters, n), i = Y(t), { data: a, isLoading: o, isError: s } = un({
1688
- field: e.field,
1705
+ function ui({ widget: e, timeRange: t, filters: n }) {
1706
+ let r = ii(e.filters, n), i = Y(t), { data: a, isLoading: o, isError: s } = dn({
1707
+ by: [...e.by],
1708
+ metric: e.metric,
1709
+ measure: e.measure,
1710
+ sorts: e.sorts ? [...e.sorts] : void 0,
1711
+ ranges: e.ranges ? [...e.ranges] : void 0,
1689
1712
  timeRange: i,
1690
1713
  filters: r,
1691
1714
  limit: e.limit
@@ -1694,13 +1717,13 @@ function li({ widget: e, timeRange: t, filters: n }) {
1694
1717
  s && console.error(`[BarWidgetRenderer] Failed to fetch facets for widget "${e.title}"`);
1695
1718
  }, [s, e.title]);
1696
1719
  let { data: c, config: l } = D(() => a ? {
1697
- data: ni(a),
1720
+ data: ri(a),
1698
1721
  config: { count: { label: e.title } }
1699
1722
  } : {
1700
1723
  data: [],
1701
1724
  config: {}
1702
1725
  }, [a, e.title]);
1703
- return /* @__PURE__ */ j(ci, {
1726
+ return /* @__PURE__ */ j(li, {
1704
1727
  data: c,
1705
1728
  config: l,
1706
1729
  state: o ? "loading" : s ? "empty" : "ready",
@@ -1709,36 +1732,36 @@ function li({ widget: e, timeRange: t, filters: n }) {
1709
1732
  }
1710
1733
  //#endregion
1711
1734
  //#region src/dashboards/adapters/status-palette.ts
1712
- var ui = {
1735
+ var di = {
1713
1736
  "1XX": "var(--chart-5)",
1714
1737
  "2XX": "var(--success)",
1715
1738
  "3XX": "var(--chart-4)",
1716
1739
  "4XX": "var(--warning)",
1717
1740
  "5XX": "var(--destructive)"
1718
- }, di = new Set([
1741
+ }, fi = new Set([
1719
1742
  "HTTP_STATUS_CODE_GROUP",
1720
1743
  "http_status_code_group",
1721
1744
  "status_code_group"
1722
1745
  ]);
1723
- function fi(e, t, n) {
1746
+ function pi(e, t, n) {
1724
1747
  if (n?.[e]) return n[e];
1725
- if (t && di.has(t)) return ui[e.toUpperCase()];
1748
+ if (t && fi.has(t)) return di[e.toUpperCase()];
1726
1749
  }
1727
1750
  //#endregion
1728
1751
  //#region src/dashboards/adapters/time-series-adapter.ts
1729
- function pi(e) {
1752
+ function mi(e) {
1730
1753
  return e.replace(/[^a-zA-Z0-9_-]/g, "_");
1731
1754
  }
1732
- function mi(e, t) {
1755
+ function hi(e, t) {
1733
1756
  let n = [], r = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Map();
1734
1757
  for (let t of e) i.set(t.metric, (i.get(t.metric) ?? 0) + 1);
1735
1758
  return e.forEach((e, a) => {
1736
- let o = t[a] ?? [], s = U(e.measure), c = `${pi(e.metric)}__${pi(s)}__${pi(e.representation)}`;
1737
- if (e.groupBy) {
1759
+ let o = t[a] ?? [], s = U(e.measure), c = `${mi(e.metric)}__${mi(s)}__${mi(e.representation)}`, l = e.by?.[0];
1760
+ if (l) {
1738
1761
  for (let t of o) {
1739
- let i = `${c}__${pi(t.key)}`;
1762
+ let i = `${c}__${mi(t.key)}`;
1740
1763
  if (r.has(i)) continue;
1741
- let a = fi(t.key, e.groupBy, e.colorByGroup);
1764
+ let a = pi(t.key, l, e.colorByGroup);
1742
1765
  n.push({
1743
1766
  dataKey: i,
1744
1767
  label: t.label,
@@ -1751,30 +1774,30 @@ function mi(e, t) {
1751
1774
  }
1752
1775
  return;
1753
1776
  }
1754
- let l = c;
1755
- if (!n.some((e) => e.dataKey === l)) {
1777
+ let u = c;
1778
+ if (!n.some((e) => e.dataKey === u)) {
1756
1779
  let t = (i.get(e.metric) ?? 0) > 1 ? `${e.metric} · ${s}` : e.metric;
1757
1780
  n.push({
1758
- dataKey: l,
1781
+ dataKey: u,
1759
1782
  label: t,
1760
1783
  series: e,
1761
1784
  color: e.color
1762
1785
  });
1763
1786
  }
1764
- let u = o[0];
1765
- u && r.set(l, [{
1766
- ...u,
1767
- key: l
1787
+ let d = o[0];
1788
+ d && r.set(u, [{
1789
+ ...d,
1790
+ key: u
1768
1791
  }]);
1769
1792
  }), {
1770
1793
  elements: n,
1771
1794
  seriesMap: r
1772
1795
  };
1773
1796
  }
1774
- function hi(e) {
1797
+ function gi(e) {
1775
1798
  let t = /* @__PURE__ */ new Map(), n = Infinity, r = -Infinity;
1776
1799
  for (let t of e.values()) for (let e of t) for (let t of e.points) t.timestamp < n && (n = t.timestamp), t.timestamp > r && (r = t.timestamp);
1777
- let i = r - n > gi ? yi : vi;
1800
+ let i = r - n > _i ? bi : yi;
1778
1801
  for (let n of e.values()) for (let e of n) for (let n of e.points) {
1779
1802
  let e = i(n.timestamp), r = t.get(e);
1780
1803
  (r === void 0 || n.timestamp < r) && t.set(e, n.timestamp);
@@ -1790,7 +1813,7 @@ function hi(e) {
1790
1813
  }
1791
1814
  return o;
1792
1815
  }
1793
- var gi = 1440 * 6e4, _i = [
1816
+ var _i = 1440 * 6e4, vi = [
1794
1817
  "Jan",
1795
1818
  "Feb",
1796
1819
  "Mar",
@@ -1804,25 +1827,25 @@ var gi = 1440 * 6e4, _i = [
1804
1827
  "Nov",
1805
1828
  "Dec"
1806
1829
  ];
1807
- function vi(e) {
1830
+ function yi(e) {
1808
1831
  let t = new Date(e);
1809
1832
  return `${String(t.getHours()).padStart(2, "0")}:${String(t.getMinutes()).padStart(2, "0")}`;
1810
1833
  }
1811
- function yi(e) {
1834
+ function bi(e) {
1812
1835
  let t = new Date(e);
1813
- return `${_i[t.getMonth()]} ${String(t.getDate()).padStart(2, "0")} ${String(t.getHours()).padStart(2, "0")}:${String(t.getMinutes()).padStart(2, "0")}`;
1836
+ return `${vi[t.getMonth()]} ${String(t.getDate()).padStart(2, "0")} ${String(t.getHours()).padStart(2, "0")}:${String(t.getMinutes()).padStart(2, "0")}`;
1814
1837
  }
1815
1838
  //#endregion
1816
1839
  //#region src/dashboards/compute-bucket-interval.ts
1817
- var bi = 6e4, xi = 48;
1818
- function Si(e, t) {
1819
- if (t <= 0) return bi;
1840
+ var xi = 6e4, Si = 48;
1841
+ function Ci(e, t) {
1842
+ if (t <= 0) return xi;
1820
1843
  let n = e.to - e.from, r = Math.floor(n / t);
1821
- return Math.max(bi, r);
1844
+ return Math.max(xi, r);
1822
1845
  }
1823
1846
  //#endregion
1824
1847
  //#region src/dashboards/renderers/CartesianPresentation.tsx
1825
- function Ci({ data: e, config: t, series: n, seriesByKey: r, state: i, showTotal: a, totalLabel: o }) {
1848
+ function wi({ data: e, config: t, series: n, seriesByKey: r, state: i, showTotal: a, totalLabel: o }) {
1826
1849
  let s = Object.keys(t), c = n.some((e) => e.representation === "bar") ? "band" : "point";
1827
1850
  return /* @__PURE__ */ j(St, {
1828
1851
  config: t,
@@ -1835,8 +1858,8 @@ function Ci({ data: e, config: t, series: n, seriesByKey: r, state: i, showTotal
1835
1858
  children: [
1836
1859
  /* @__PURE__ */ j(Ot, {}),
1837
1860
  s.map((e) => {
1838
- let t = r?.[e] ?? wi(e, n);
1839
- return t ? Ti(e, t) : null;
1861
+ let t = r?.[e] ?? Ti(e, n);
1862
+ return t ? Ei(e, t) : null;
1840
1863
  }),
1841
1864
  /* @__PURE__ */ j(Nt, {}),
1842
1865
  /* @__PURE__ */ j(Pt, {}),
@@ -1849,10 +1872,10 @@ function Ci({ data: e, config: t, series: n, seriesByKey: r, state: i, showTotal
1849
1872
  })
1850
1873
  });
1851
1874
  }
1852
- function wi(e, t) {
1875
+ function Ti(e, t) {
1853
1876
  return t.find((t) => e === t.metric || e.startsWith(`${t.metric}_`));
1854
1877
  }
1855
- function Ti(e, t) {
1878
+ function Ei(e, t) {
1856
1879
  switch (t.representation) {
1857
1880
  case "line": return /* @__PURE__ */ j(kt, {
1858
1881
  dataKey: e,
@@ -1873,21 +1896,24 @@ function Ti(e, t) {
1873
1896
  }
1874
1897
  //#endregion
1875
1898
  //#region src/dashboards/renderers/CartesianWidgetRenderer.tsx
1876
- function Ei({ widget: e, timeRange: t, filters: n }) {
1877
- let r = ri(e.filters, n), i = m(), a = Y(t), o = D(() => Si(a, 48), [a]), s = te({ queries: e.series.map((e) => {
1878
- let t = [{
1899
+ function Di({ widget: e, timeRange: t, filters: n }) {
1900
+ let r = ii(e.filters, n), i = m(), a = Y(t), o = D(() => Ci(a, 48), [a]), s = te({ queries: e.series.map((e) => {
1901
+ let t = q(r, e.filters), n = [{
1879
1902
  name: e.metric,
1880
- measures: [U(e.measure)]
1881
- }], n = e.groupBy ? [e.groupBy] : void 0;
1903
+ measures: [U(e.measure)],
1904
+ ...e.sorts?.length ? { sorts: [...e.sorts] } : {}
1905
+ }], s = e.by?.length ? [...e.by] : void 0, c = e.ranges?.length ? [...e.ranges] : void 0;
1882
1906
  return {
1883
- queryKey: K.timeSeries(t, a, o, r, n),
1884
- queryFn: ({ signal: e }) => i.fetchTimeSeries({
1885
- metrics: t,
1907
+ queryKey: K.timeSeries(n, a, o, t, s, e.limit, c),
1908
+ queryFn: ({ signal: r }) => i.fetchTimeSeries({
1909
+ metrics: n,
1886
1910
  timeRange: a,
1887
1911
  interval: o,
1888
- filters: r,
1889
- by: n,
1890
- signal: e
1912
+ filters: t,
1913
+ by: s,
1914
+ ranges: c,
1915
+ limit: e.limit,
1916
+ signal: r
1891
1917
  }),
1892
1918
  staleTime: W
1893
1919
  };
@@ -1896,18 +1922,18 @@ function Ei({ widget: e, timeRange: t, filters: n }) {
1896
1922
  l && console.error(`[CartesianWidgetRenderer] One or more series queries failed for widget "${e.title}"`);
1897
1923
  }, [l, e.title]);
1898
1924
  let u = s.map((e) => e.dataUpdatedAt).join(","), { data: d, config: f, seriesByKey: p } = D(() => {
1899
- let { elements: t, seriesMap: n } = mi(e.series, s.map((e) => e?.data)), r = {}, i = {};
1925
+ let { elements: t, seriesMap: n } = hi(e.series, s.map((e) => e?.data)), r = {}, i = {};
1900
1926
  for (let e of t) {
1901
1927
  let t = { label: e.label };
1902
1928
  e.color && (t.color = e.color), r[e.dataKey] = t, i[e.dataKey] = e.series;
1903
1929
  }
1904
1930
  return {
1905
- data: hi(n),
1931
+ data: gi(n),
1906
1932
  config: r,
1907
1933
  seriesByKey: i
1908
1934
  };
1909
1935
  }, [e.series, u]), h = c ? "loading" : l ? "empty" : "ready";
1910
- return /* @__PURE__ */ j(Ci, {
1936
+ return /* @__PURE__ */ j(wi, {
1911
1937
  data: d,
1912
1938
  config: f,
1913
1939
  series: [...e.series],
@@ -1919,7 +1945,7 @@ function Ei({ widget: e, timeRange: t, filters: n }) {
1919
1945
  }
1920
1946
  //#endregion
1921
1947
  //#region src/dashboards/renderers/DoughnutPresentation.tsx
1922
- function Di({ data: e, config: t, state: n }) {
1948
+ function Oi({ data: e, config: t, state: n }) {
1923
1949
  return /* @__PURE__ */ j(St, {
1924
1950
  config: t,
1925
1951
  className: "h-full w-full",
@@ -1932,9 +1958,13 @@ function Di({ data: e, config: t, state: n }) {
1932
1958
  }
1933
1959
  //#endregion
1934
1960
  //#region src/dashboards/renderers/DoughnutWidgetRenderer.tsx
1935
- function Oi({ widget: e, timeRange: t, filters: n }) {
1936
- let r = ri(e.filters, n), i = Y(t), { data: a, isLoading: o, isError: s } = un({
1937
- field: e.field,
1961
+ function ki({ widget: e, timeRange: t, filters: n }) {
1962
+ let r = ii(e.filters, n), i = Y(t), { data: a, isLoading: o, isError: s } = dn({
1963
+ by: [...e.by],
1964
+ metric: e.metric,
1965
+ measure: e.measure,
1966
+ sorts: e.sorts ? [...e.sorts] : void 0,
1967
+ ranges: e.ranges ? [...e.ranges] : void 0,
1938
1968
  timeRange: i,
1939
1969
  filters: r,
1940
1970
  limit: e.limit
@@ -1947,14 +1977,14 @@ function Oi({ widget: e, timeRange: t, filters: n }) {
1947
1977
  data: [],
1948
1978
  config: {}
1949
1979
  };
1950
- let e = ti(a), t = {};
1980
+ let e = ni(a), t = {};
1951
1981
  for (let e of a) t[e.value] = { label: e.label || e.value };
1952
1982
  return {
1953
1983
  data: e,
1954
1984
  config: t
1955
1985
  };
1956
1986
  }, [a]);
1957
- return /* @__PURE__ */ j(Di, {
1987
+ return /* @__PURE__ */ j(Oi, {
1958
1988
  data: c,
1959
1989
  config: l,
1960
1990
  state: o ? "loading" : s ? "empty" : "ready"
@@ -1962,18 +1992,18 @@ function Oi({ widget: e, timeRange: t, filters: n }) {
1962
1992
  }
1963
1993
  //#endregion
1964
1994
  //#region src/dashboards/adapters/measures-adapter.ts
1965
- function ki(e, t) {
1995
+ function Ai(e, t) {
1966
1996
  if (e.measures.length !== 0) return t ? e.measures.find((e) => e.name === t)?.value : e.measures[0].value;
1967
1997
  }
1968
- function Ai(e, t) {
1969
- let n = ki(e, t);
1998
+ function ji(e, t) {
1999
+ let n = Ai(e, t);
1970
2000
  return {
1971
- value: n === void 0 ? "—" : Ii(n, e.unit),
2001
+ value: n === void 0 ? "—" : Li(n, e.unit),
1972
2002
  label: e.name,
1973
2003
  unit: e.unit
1974
2004
  };
1975
2005
  }
1976
- function ji(e, t) {
2006
+ function Mi(e, t) {
1977
2007
  if (t === void 0) return;
1978
2008
  if (t === 0) return {
1979
2009
  value: 0,
@@ -1988,17 +2018,17 @@ function ji(e, t) {
1988
2018
  direction: n > 0 ? "up" : "down"
1989
2019
  };
1990
2020
  }
1991
- function Mi(e, t) {
2021
+ function Ni(e, t) {
1992
2022
  if (!e || e.length === 0) return;
1993
2023
  let n = t ? e.find((e) => e.key === t) : e[0];
1994
2024
  if (!(!n || n.points.length < 2)) return n.points.slice().sort((e, t) => e.timestamp - t.timestamp).map((e) => e.value);
1995
2025
  }
1996
- var Ni = new Set([
2026
+ var Pi = new Set([
1997
2027
  "B",
1998
2028
  "KB",
1999
2029
  "MB",
2000
2030
  "GB"
2001
- ]), Pi = {
2031
+ ]), Fi = {
2002
2032
  PERCENT: { suffix: "%" },
2003
2033
  MILLISECONDS: { suffix: "ms" },
2004
2034
  SECONDS: { suffix: "s" },
@@ -2008,17 +2038,17 @@ var Ni = new Set([
2008
2038
  GIGABYTES: { suffix: "GB" },
2009
2039
  COUNT: { suffix: "" },
2010
2040
  COUNT_PER_SECOND: { suffix: "/s" }
2011
- }, Fi = /* @__PURE__ */ new Set();
2012
- function Ii(e, t) {
2013
- let n = t ? Pi[t] : void 0;
2014
- if (t && !n && !Fi.has(t) && (Fi.add(t), console.warn(`[formatMeasureValue] Unknown unit "${t}" — value will be displayed without unit`)), n?.suffix === "%") return `${(Math.round(e * 10) / 10).toLocaleString()}%`;
2041
+ }, Ii = /* @__PURE__ */ new Set();
2042
+ function Li(e, t) {
2043
+ let n = t ? Fi[t] : void 0;
2044
+ if (t && !n && !Ii.has(t) && (Ii.add(t), console.warn(`[formatMeasureValue] Unknown unit "${t}" — value will be displayed without unit`)), n?.suffix === "%") return `${(Math.round(e * 10) / 10).toLocaleString()}%`;
2015
2045
  if (n?.suffix === "ms" && e >= 1e3) return `${(e / 1e3).toFixed(2)} s`;
2016
- let r = n !== void 0 && Ni.has(n.suffix) ? e.toLocaleString() : e >= 1e6 ? `${(e / 1e6).toFixed(1)}M` : e >= 1e3 ? `${(e / 1e3).toFixed(1)}k` : e.toLocaleString(), i = n?.suffix;
2046
+ let r = n !== void 0 && Pi.has(n.suffix) ? e.toLocaleString() : e >= 1e6 ? `${(e / 1e6).toFixed(1)}M` : e >= 1e3 ? `${(e / 1e3).toFixed(1)}k` : e.toLocaleString(), i = n?.suffix;
2017
2047
  return i ? `${r}${i === "" ? "" : ` ${i}`}` : r;
2018
2048
  }
2019
2049
  //#endregion
2020
2050
  //#region src/dashboards/compute-previous-time-range.ts
2021
- function Li(e) {
2051
+ function Ri(e) {
2022
2052
  let t = e.to - e.from;
2023
2053
  return {
2024
2054
  type: "absolute",
@@ -2028,7 +2058,7 @@ function Li(e) {
2028
2058
  }
2029
2059
  //#endregion
2030
2060
  //#region src/dashboards/renderers/MetricGroupPresentation.tsx
2031
- function Ri({ items: e, state: t, skeletonCount: n }) {
2061
+ function zi({ items: e, state: t, skeletonCount: n }) {
2032
2062
  return /* @__PURE__ */ j(jt, {
2033
2063
  items: e,
2034
2064
  state: t,
@@ -2037,30 +2067,40 @@ function Ri({ items: e, state: t, skeletonCount: n }) {
2037
2067
  }
2038
2068
  //#endregion
2039
2069
  //#region src/dashboards/renderers/MetricGroupWidgetRenderer.tsx
2040
- function zi(e) {
2070
+ function Bi(e) {
2071
+ let t = e.filters?.length ? e.filters.map((e) => `${e.field}:${e.operator}:${e.value.join(",")}`).sort().join("|") : "";
2072
+ return `${e.name}::${t}`;
2073
+ }
2074
+ function Vi(e) {
2041
2075
  let t = /* @__PURE__ */ new Map();
2042
2076
  for (let n of e) {
2043
- let e = t.get(n.name), r = n.measures ?? [];
2044
- if (e) for (let t of r) e.add(t);
2045
- else t.set(n.name, new Set(r));
2077
+ let e = Bi(n), r = t.get(e), i = n.measures ?? [];
2078
+ if (r) for (let e of i) r.measures.add(e);
2079
+ else t.set(e, {
2080
+ name: n.name,
2081
+ measures: new Set(i),
2082
+ filters: n.filters
2083
+ });
2046
2084
  }
2047
- return Array.from(t.entries()).map(([e, t]) => ({
2085
+ return Array.from(t.values()).map(({ name: e, measures: t, filters: n }) => ({
2048
2086
  name: e,
2049
- measures: Array.from(t)
2087
+ measures: Array.from(t),
2088
+ ...n?.length ? { filters: n } : {}
2050
2089
  }));
2051
2090
  }
2052
- function Bi({ widget: e, timeRange: t, filters: n }) {
2053
- let r = ri(e.filters, n), i = e.items.some((e) => e.showTrend !== !1), a = Y(t), o = D(() => zi(e.items.map((e) => ({
2054
- name: e.metric,
2055
- measures: [U(e.measure)]
2056
- }))), [e.items]), s = D(() => zi(e.items.filter((e) => e.showTrend !== !1).map((e) => ({
2091
+ function Hi(e) {
2092
+ return {
2057
2093
  name: e.metric,
2058
- measures: [U(e.measure)]
2059
- }))), [e.items]), c = D(() => Li(a), [a]), { data: l, isLoading: u, isError: d } = hn({
2094
+ measures: [U(e.measure)],
2095
+ ...e.filters?.length ? { filters: [...e.filters] } : {}
2096
+ };
2097
+ }
2098
+ function Ui({ widget: e, timeRange: t, filters: n }) {
2099
+ let r = ii(e.filters, n), i = e.items.some((e) => e.showTrend !== !1), a = Y(t), o = D(() => Vi(e.items.map(Hi)), [e.items]), s = D(() => Vi(e.items.filter((e) => e.showTrend !== !1).map(Hi)), [e.items]), c = D(() => Ri(a), [a]), { data: l, isLoading: u, isError: d } = gn({
2060
2100
  metrics: o,
2061
2101
  timeRange: a,
2062
2102
  filters: r
2063
- }), { data: f, isError: p } = hn({
2103
+ }), { data: f, isError: p } = gn({
2064
2104
  metrics: s,
2065
2105
  timeRange: c,
2066
2106
  filters: r,
@@ -2070,7 +2110,7 @@ function Bi({ widget: e, timeRange: t, filters: n }) {
2070
2110
  d && console.error(`[MetricGroupWidgetRenderer] Failed to fetch measures for "${e.title}"`);
2071
2111
  }, [d, e.title]), T(() => {
2072
2112
  p && console.error(`[MetricGroupWidgetRenderer] Failed to fetch previous-period measures for "${e.title}"`);
2073
- }, [p, e.title]), /* @__PURE__ */ j(Ri, {
2113
+ }, [p, e.title]), /* @__PURE__ */ j(zi, {
2074
2114
  items: D(() => {
2075
2115
  let t = new Map(l?.map((e) => [e.name, e]) ?? []), n = new Map(f?.map((e) => [e.name, e]) ?? []);
2076
2116
  return e.items.map((e) => {
@@ -2079,11 +2119,11 @@ function Bi({ widget: e, timeRange: t, filters: n }) {
2079
2119
  value: "—",
2080
2120
  label: e.label ?? e.metric
2081
2121
  };
2082
- let i = U(e.measure), a = Ai(r, i), o = e.showTrend !== !1, s = ki(r, i), c = n.get(e.metric), l = c ? ki(c, i) : void 0;
2122
+ let i = U(e.measure), a = ji(r, i), o = e.showTrend !== !1, s = Ai(r, i), c = n.get(e.metric), l = c ? Ai(c, i) : void 0;
2083
2123
  return {
2084
2124
  value: a.value,
2085
2125
  label: e.label ?? r.name,
2086
- trend: o && s !== void 0 ? ji(s, l) : void 0,
2126
+ trend: o && s !== void 0 ? Mi(s, l) : void 0,
2087
2127
  trendSentiment: e.sentiment
2088
2128
  };
2089
2129
  });
@@ -2098,7 +2138,7 @@ function Bi({ widget: e, timeRange: t, filters: n }) {
2098
2138
  }
2099
2139
  //#endregion
2100
2140
  //#region src/dashboards/renderers/MetricPresentation.tsx
2101
- function Vi({ value: e, label: t, state: n, trend: r, trendSentiment: i, sparklineData: a }) {
2141
+ function Wi({ value: e, label: t, state: n, trend: r, trendSentiment: i, sparklineData: a }) {
2102
2142
  return /* @__PURE__ */ j(At, {
2103
2143
  value: e,
2104
2144
  label: t,
@@ -2110,20 +2150,20 @@ function Vi({ value: e, label: t, state: n, trend: r, trendSentiment: i, sparkli
2110
2150
  }
2111
2151
  //#endregion
2112
2152
  //#region src/dashboards/renderers/MetricWidgetRenderer.tsx
2113
- function Hi({ widget: e, timeRange: t, filters: n }) {
2114
- let r = ri(e.filters, n), i = e.showTrend === !0, a = e.showSparkline === !0, o = Y(t), s = U(e.measure), c = D(() => [{
2153
+ function Gi({ widget: e, timeRange: t, filters: n }) {
2154
+ let r = ii(e.filters, n), i = e.showTrend === !0, a = e.showSparkline === !0, o = Y(t), s = U(e.measure), c = D(() => [{
2115
2155
  name: e.metric,
2116
2156
  measures: [s]
2117
- }], [e.metric, s]), l = D(() => Li(o), [o]), u = D(() => Si(o, 48), [o]), { data: d, isLoading: f, isError: p } = hn({
2157
+ }], [e.metric, s]), l = D(() => Ri(o), [o]), u = D(() => Ci(o, 48), [o]), { data: d, isLoading: f, isError: p } = gn({
2118
2158
  metrics: c,
2119
2159
  timeRange: o,
2120
2160
  filters: r
2121
- }), { data: m, isError: h } = hn({
2161
+ }), { data: m, isError: h } = gn({
2122
2162
  metrics: c,
2123
2163
  timeRange: l,
2124
2164
  filters: r,
2125
2165
  enabled: i
2126
- }), { data: g, isError: _ } = _n({
2166
+ }), { data: g, isError: _ } = vn({
2127
2167
  metrics: c,
2128
2168
  timeRange: o,
2129
2169
  interval: u,
@@ -2137,8 +2177,8 @@ function Hi({ widget: e, timeRange: t, filters: n }) {
2137
2177
  }, [h, e.metric]), T(() => {
2138
2178
  _ && console.error(`[MetricWidgetRenderer] Failed to fetch sparkline data for "${e.metric}"`);
2139
2179
  }, [_, e.metric]);
2140
- let v = d?.[0], y = m?.[0], b = v ? Ai(v, s) : void 0, x = v ? ki(v, s) : void 0, S = y ? ki(y, s) : void 0, C = i && x !== void 0 ? ji(x, S) : void 0, w = a ? Mi(g, e.metric) : void 0, E = f ? "loading" : p || !f && !v ? "empty" : "ready";
2141
- return /* @__PURE__ */ j(Vi, {
2180
+ let v = d?.[0], y = m?.[0], b = v ? ji(v, s) : void 0, x = v ? Ai(v, s) : void 0, S = y ? Ai(y, s) : void 0, C = i && x !== void 0 ? Mi(x, S) : void 0, w = a ? Ni(g, e.metric) : void 0, E = f ? "loading" : p || !f && !v ? "empty" : "ready";
2181
+ return /* @__PURE__ */ j(Wi, {
2142
2182
  value: b?.value ?? "—",
2143
2183
  label: e.title,
2144
2184
  state: E,
@@ -2149,25 +2189,25 @@ function Hi({ widget: e, timeRange: t, filters: n }) {
2149
2189
  }
2150
2190
  //#endregion
2151
2191
  //#region src/dashboards/widget-renderer-registry.ts
2152
- var Ui = /* @__PURE__ */ new Map();
2153
- function Wi(e, t) {
2154
- Ui.set(e, t);
2192
+ var Ki = /* @__PURE__ */ new Map();
2193
+ function qi(e, t) {
2194
+ Ki.set(e, t);
2155
2195
  }
2156
- function Gi(e) {
2157
- return Ui.get(e);
2196
+ function Ji(e) {
2197
+ return Ki.get(e);
2158
2198
  }
2159
- function Ki() {
2160
- Ui.clear();
2199
+ function Yi() {
2200
+ Ki.clear();
2161
2201
  }
2162
2202
  //#endregion
2163
2203
  //#region src/dashboards/register-default-renderers.ts
2164
- var qi = !1;
2165
- function Ji() {
2166
- qi || (qi = !0, Wi("cartesian", Ei), Wi("doughnut", Oi), Wi("bar", li), Wi("metric", Hi), Wi("metric-group", Bi));
2204
+ var Xi = !1;
2205
+ function Zi() {
2206
+ Xi || (Xi = !0, qi("cartesian", Di), qi("doughnut", ki), qi("bar", ui), qi("metric", Gi), qi("metric-group", Ui));
2167
2207
  }
2168
2208
  //#endregion
2169
2209
  //#region src/dashboards/renderers/UnknownWidgetFallback.tsx
2170
- function Yi({ widget: e }) {
2210
+ function Qi({ widget: e }) {
2171
2211
  return /* @__PURE__ */ M("div", {
2172
2212
  role: "alert",
2173
2213
  className: "flex h-full flex-col items-center justify-center gap-2 rounded-lg border border-dashed border-destructive/30 bg-destructive/5 p-4 text-center",
@@ -2186,28 +2226,28 @@ function Yi({ widget: e }) {
2186
2226
  }
2187
2227
  //#endregion
2188
2228
  //#region src/dashboards/WidgetItem.tsx
2189
- Ji();
2190
- function Xi(e) {
2191
- return e.data ? Qi(e.widget, e.data) : /* @__PURE__ */ j(Zi, {
2229
+ Zi();
2230
+ function $i(e) {
2231
+ return e.data ? ta(e.widget, e.data) : /* @__PURE__ */ j(ea, {
2192
2232
  widget: e.widget,
2193
2233
  timeRange: e.timeRange,
2194
2234
  filters: e.filters
2195
2235
  });
2196
2236
  }
2197
- function Zi({ widget: e, timeRange: t, filters: n }) {
2198
- let r = Yr(), i = t ?? r?.timeRange, a = n ?? r?.filters ?? Kr;
2237
+ function ea({ widget: e, timeRange: t, filters: n }) {
2238
+ let r = Xr(), i = t ?? r?.timeRange, a = n ?? r?.filters ?? qr;
2199
2239
  if (!i) throw Error("[gamma-lib-observability] <WidgetItem> requires a timeRange. Provide it as a prop or wrap the component in a <WidgetGroup>.");
2200
- let o = Gi(e.type);
2240
+ let o = Ji(e.type);
2201
2241
  return o ? b(o, {
2202
2242
  widget: e,
2203
2243
  timeRange: i,
2204
2244
  filters: a
2205
- }) : /* @__PURE__ */ j(Yi, { widget: e });
2245
+ }) : /* @__PURE__ */ j(Qi, { widget: e });
2206
2246
  }
2207
- function Qi(e, t) {
2247
+ function ta(e, t) {
2208
2248
  if (t.type !== e.type) throw Error(`[gamma-lib-observability] <WidgetItem> data.type "${t.type}" does not match widget.type "${e.type}". The data.type must match the widget definition type.`);
2209
2249
  switch (t.type) {
2210
- case "metric": return /* @__PURE__ */ j(Vi, {
2250
+ case "metric": return /* @__PURE__ */ j(Wi, {
2211
2251
  value: t.value,
2212
2252
  label: t.label,
2213
2253
  state: t.state,
@@ -2215,12 +2255,12 @@ function Qi(e, t) {
2215
2255
  trendSentiment: t.trendSentiment,
2216
2256
  sparklineData: t.sparklineData
2217
2257
  });
2218
- case "metric-group": return /* @__PURE__ */ j(Ri, {
2258
+ case "metric-group": return /* @__PURE__ */ j(zi, {
2219
2259
  items: t.items,
2220
2260
  state: t.state,
2221
2261
  skeletonCount: t.skeletonCount
2222
2262
  });
2223
- case "cartesian": return /* @__PURE__ */ j(Ci, {
2263
+ case "cartesian": return /* @__PURE__ */ j(wi, {
2224
2264
  data: t.data,
2225
2265
  config: t.config,
2226
2266
  series: t.series,
@@ -2228,30 +2268,30 @@ function Qi(e, t) {
2228
2268
  showTotal: t.showTotal,
2229
2269
  totalLabel: t.totalLabel
2230
2270
  });
2231
- case "bar": return /* @__PURE__ */ j(ci, {
2271
+ case "bar": return /* @__PURE__ */ j(li, {
2232
2272
  data: t.data,
2233
2273
  config: t.config,
2234
2274
  state: t.state,
2235
2275
  layout: t.layout
2236
2276
  });
2237
- case "doughnut": return /* @__PURE__ */ j(Di, {
2277
+ case "doughnut": return /* @__PURE__ */ j(Oi, {
2238
2278
  data: t.data,
2239
2279
  config: t.config,
2240
2280
  state: t.state
2241
2281
  });
2242
- default: return /* @__PURE__ */ j(Yi, { widget: e });
2282
+ default: return /* @__PURE__ */ j(Qi, { widget: e });
2243
2283
  }
2244
2284
  }
2245
2285
  //#endregion
2246
2286
  //#region src/dashboards/DashboardView.tsx
2247
- var $i = {
2287
+ var na = {
2248
2288
  lg: 12,
2249
2289
  md: 12,
2250
2290
  sm: 12,
2251
2291
  xs: 12,
2252
2292
  xxs: 12
2253
2293
  };
2254
- function ea({ dashboard: e, timeRange: t, filters: n = Kr, editable: r = !1, rowHeight: i, breakpointCols: o = $i, onLayoutChange: s }) {
2294
+ function ra({ dashboard: e, timeRange: t, filters: n = qr, editable: r = !1, rowHeight: i, breakpointCols: o = na, onLayoutChange: s }) {
2255
2295
  let c = a("observability.dashboards.write"), l = r && c, u = D(() => e.widgets.map((e) => ({
2256
2296
  id: e.id,
2257
2297
  x: e.layout.x,
@@ -2276,8 +2316,8 @@ function ea({ dashboard: e, timeRange: t, filters: n = Kr, editable: r = !1, row
2276
2316
  return r ? /* @__PURE__ */ j(_t, {
2277
2317
  title: r.title,
2278
2318
  subtitle: r.description,
2279
- noPadding: ta(r),
2280
- children: /* @__PURE__ */ j(Xi, {
2319
+ noPadding: ia(r),
2320
+ children: /* @__PURE__ */ j($i, {
2281
2321
  widget: r,
2282
2322
  timeRange: t,
2283
2323
  filters: n
@@ -2287,75 +2327,74 @@ function ea({ dashboard: e, timeRange: t, filters: n = Kr, editable: r = !1, row
2287
2327
  })
2288
2328
  });
2289
2329
  }
2290
- function ta(e) {
2330
+ function ia(e) {
2291
2331
  return e.type === "cartesian" || e.type === "doughnut" || e.type === "bar";
2292
2332
  }
2293
2333
  //#endregion
2294
2334
  //#region src/dashboards/WidgetGroup.tsx
2295
- var na = {
2335
+ var aa = {
2296
2336
  stretch: "items-stretch",
2297
2337
  center: "items-center",
2298
2338
  start: "items-start",
2299
2339
  end: "items-end"
2300
2340
  };
2301
- function ra({ timeRange: e, filters: t = Kr, align: n = "stretch", children: r }) {
2302
- return /* @__PURE__ */ j(Jr, {
2341
+ function oa({ timeRange: e, filters: t = qr, align: n = "stretch", children: r }) {
2342
+ return /* @__PURE__ */ j(Yr, {
2303
2343
  value: D(() => ({
2304
2344
  timeRange: e,
2305
2345
  filters: t
2306
2346
  }), [e, t]),
2307
2347
  children: /* @__PURE__ */ j("div", {
2308
- className: `flex flex-wrap gap-4 ${na[n]} *:min-w-48 *:flex-1`,
2348
+ className: `flex flex-wrap gap-4 ${aa[n]} *:min-w-48 *:flex-1`,
2309
2349
  children: r
2310
2350
  })
2311
2351
  });
2312
2352
  }
2313
2353
  //#endregion
2314
2354
  //#region src/dashboards/templates/dashboard-template.ts
2315
- function ia(e) {
2355
+ function sa(e) {
2316
2356
  if (!e.id) throw Error("[gamma-lib-observability] DashboardTemplate must have a non-empty id.");
2317
2357
  if (!e.label) throw Error(`[gamma-lib-observability] DashboardTemplate "${e.id}" must have a non-empty label.`);
2318
2358
  if (!e.dashboard) throw Error(`[gamma-lib-observability] DashboardTemplate "${e.id}" must define a dashboard or a factory function.`);
2319
2359
  return {
2320
2360
  id: e.id,
2321
2361
  label: e.label,
2322
- icon: e.icon,
2323
2362
  description: e.description,
2324
2363
  requiredCapabilities: e.requiredCapabilities,
2325
2364
  dashboard: e.dashboard
2326
2365
  };
2327
2366
  }
2328
- function aa(e, t) {
2367
+ function ca(e, t) {
2329
2368
  return typeof e.dashboard == "function" ? e.dashboard(t) : e.dashboard;
2330
2369
  }
2331
- function oa(e, t) {
2370
+ function la(e, t) {
2332
2371
  return e.filter((e) => e.requiredCapabilities?.length ? e.requiredCapabilities.every((e) => t[e]) : !0);
2333
2372
  }
2334
2373
  //#endregion
2335
2374
  //#region src/dashboards/templates/DashboardTemplatesProvider.tsx
2336
- var sa = y(null);
2337
- function ca({ templates: e, children: t }) {
2375
+ var ua = y(null);
2376
+ function da({ templates: e, children: t }) {
2338
2377
  let n = D(() => e, [e]);
2339
- return /* @__PURE__ */ j(sa.Provider, {
2378
+ return /* @__PURE__ */ j(ua.Provider, {
2340
2379
  value: n,
2341
2380
  children: t
2342
2381
  });
2343
2382
  }
2344
- function la() {
2345
- let e = w(sa), t = o();
2383
+ function fa() {
2384
+ let e = w(ua), t = o();
2346
2385
  if (!e) throw Error("[gamma-lib-observability] useDashboardTemplates must be used within a <DashboardTemplatesProvider>. Wrap your component tree with <DashboardTemplatesProvider templates={[...]}>.");
2347
- return D(() => oa(e, t), [e, t]);
2386
+ return D(() => la(e, t), [e, t]);
2348
2387
  }
2349
- function ua(e) {
2350
- return la().find((t) => t.id === e);
2388
+ function pa(e) {
2389
+ return fa().find((t) => t.id === e);
2351
2390
  }
2352
2391
  //#endregion
2353
2392
  //#region src/live/LiveIndicator.tsx
2354
- function da(e) {
2393
+ function ma(e) {
2355
2394
  return e < 6e4 ? `${Math.round(e / 1e3)}s` : `${Math.round(e / 6e4)}min`;
2356
2395
  }
2357
- function fa({ isFetching: e, className: t }) {
2358
- let n = Qt(), [r, i] = k(!0), a = C(() => i((e) => !e), []), o = n?.isLive ?? r, s = n?.intervalMs ?? 6e4, c = n?.toggle ?? a, l = e ?? n?.isFetching ?? !1, u = o ? `Live — refreshing every ${da(s)}` : "Paused — click to resume";
2396
+ function ha({ isFetching: e, className: t }) {
2397
+ let n = Qt(), [r, i] = k(!0), a = C(() => i((e) => !e), []), o = n?.isLive ?? r, s = n?.intervalMs ?? 6e4, c = n?.toggle ?? a, l = e ?? n?.isFetching ?? !1, u = o ? `Live — refreshing every ${ma(s)}` : "Paused — click to resume";
2359
2398
  return /* @__PURE__ */ M(L, { children: [/* @__PURE__ */ j(B, {
2360
2399
  asChild: !0,
2361
2400
  children: /* @__PURE__ */ M("button", {
@@ -2376,9 +2415,9 @@ function fa({ isFetching: e, className: t }) {
2376
2415
  }
2377
2416
  //#endregion
2378
2417
  //#region src/routing/use-observability-url-state.ts
2379
- function pa() {
2380
- let [e, t] = Vt(), n = D(() => jn(e.get("q"), e.get("v")), [e]), r = C((e, n) => {
2381
- let r = An({
2418
+ function ga() {
2419
+ let [e, t] = Vt(), n = D(() => Mn(e.get("q"), e.get("v")), [e]), r = C((e, n) => {
2420
+ let r = jn({
2382
2421
  conditions: n,
2383
2422
  timeRange: e
2384
2423
  });
@@ -2388,7 +2427,7 @@ function pa() {
2388
2427
  }, { replace: !0 });
2389
2428
  }, [t]), i = C((e) => r(e, n.conditions), [r, n.conditions]), a = C((e) => r(n.timeRange, e), [r, n.timeRange]);
2390
2429
  return {
2391
- timeRange: n.timeRange ?? En,
2430
+ timeRange: n.timeRange ?? Dn,
2392
2431
  filters: n.conditions,
2393
2432
  setTimeRange: i,
2394
2433
  setFilters: a
@@ -2396,7 +2435,7 @@ function pa() {
2396
2435
  }
2397
2436
  //#endregion
2398
2437
  //#region src/logs/LogSeverityBadge.tsx
2399
- var ma = {
2438
+ var _a = {
2400
2439
  trace: "outline",
2401
2440
  debug: "secondary",
2402
2441
  info: "highlight",
@@ -2404,19 +2443,19 @@ var ma = {
2404
2443
  error: "destructive",
2405
2444
  fatal: "destructive"
2406
2445
  };
2407
- function ha(e) {
2408
- return e in ma;
2446
+ function va(e) {
2447
+ return e in _a;
2409
2448
  }
2410
- function ga({ level: e }) {
2449
+ function ya({ level: e }) {
2411
2450
  let t = e.toLowerCase();
2412
2451
  return /* @__PURE__ */ j(P, {
2413
- variant: ha(t) ? ma[t] : "secondary",
2452
+ variant: va(t) ? _a[t] : "secondary",
2414
2453
  children: e.toUpperCase()
2415
2454
  });
2416
2455
  }
2417
2456
  //#endregion
2418
2457
  //#region src/logs/map-log-columns.tsx
2419
- var _a = {
2458
+ var ba = {
2420
2459
  GET: "success",
2421
2460
  POST: "default",
2422
2461
  PUT: "warning",
@@ -2425,7 +2464,7 @@ var _a = {
2425
2464
  HEAD: "secondary",
2426
2465
  OPTIONS: "secondary"
2427
2466
  };
2428
- function va(e) {
2467
+ function xa(e) {
2429
2468
  let t = typeof e == "number" ? new Date(e) : new Date(String(e));
2430
2469
  return Number.isNaN(t.getTime()) ? String(e) : new Intl.DateTimeFormat("en-US", {
2431
2470
  year: "numeric",
@@ -2438,11 +2477,11 @@ function va(e) {
2438
2477
  hour12: !1
2439
2478
  }).format(t);
2440
2479
  }
2441
- function ya(e) {
2480
+ function Sa(e) {
2442
2481
  let t = typeof e == "number" ? e : Number(e);
2443
2482
  return Number.isNaN(t) ? String(e) : t < 1e3 ? `${Math.round(t)}ms` : `${(t / 1e3).toFixed(2)}s`;
2444
2483
  }
2445
- function ba(e, t, n) {
2484
+ function Ca(e, t, n) {
2446
2485
  let r = e.href?.(t);
2447
2486
  return r ? /* @__PURE__ */ j("a", {
2448
2487
  href: r,
@@ -2453,7 +2492,7 @@ function ba(e, t, n) {
2453
2492
  children: n
2454
2493
  }) : n;
2455
2494
  }
2456
- function xa(e, t) {
2495
+ function wa(e, t) {
2457
2496
  if (e.render) return e.render(t);
2458
2497
  let n = e.value(t);
2459
2498
  if (n == null) return /* @__PURE__ */ j("span", {
@@ -2462,17 +2501,17 @@ function xa(e, t) {
2462
2501
  });
2463
2502
  let r;
2464
2503
  switch (e.variant) {
2465
- case "badge": return /* @__PURE__ */ j(ga, { level: String(n) });
2504
+ case "badge": return /* @__PURE__ */ j(ya, { level: String(n) });
2466
2505
  case "datetime":
2467
2506
  r = /* @__PURE__ */ j("span", {
2468
2507
  className: "font-mono text-xs",
2469
- children: va(n)
2508
+ children: xa(n)
2470
2509
  });
2471
2510
  break;
2472
2511
  case "duration":
2473
2512
  r = /* @__PURE__ */ j("span", {
2474
2513
  className: "font-mono text-xs",
2475
- children: ya(n)
2514
+ children: Sa(n)
2476
2515
  });
2477
2516
  break;
2478
2517
  case "status-code": {
@@ -2486,7 +2525,7 @@ function xa(e, t) {
2486
2525
  case "http-method": {
2487
2526
  let e = String(n).toUpperCase();
2488
2527
  r = /* @__PURE__ */ j(P, {
2489
- variant: _a[e] ?? "secondary",
2528
+ variant: ba[e] ?? "secondary",
2490
2529
  children: e
2491
2530
  });
2492
2531
  break;
@@ -2496,26 +2535,26 @@ function xa(e, t) {
2496
2535
  children: String(n)
2497
2536
  });
2498
2537
  }
2499
- return ba(e, t, r);
2538
+ return Ca(e, t, r);
2500
2539
  }
2501
- function Sa(e) {
2540
+ function Ta(e) {
2502
2541
  return e.map((e) => ({
2503
2542
  id: e.key,
2504
2543
  accessorFn: (t) => e.value(t),
2505
2544
  header: e.label,
2506
- cell: ({ row: t }) => xa(e, t.original),
2545
+ cell: ({ row: t }) => wa(e, t.original),
2507
2546
  enableSorting: !1,
2508
2547
  enableHiding: !0
2509
2548
  }));
2510
2549
  }
2511
- function Ca(e) {
2550
+ function Ea(e) {
2512
2551
  let t = {};
2513
2552
  for (let n of e) n.defaultVisible === !1 && (t[n.key] = !1);
2514
2553
  return t;
2515
2554
  }
2516
2555
  //#endregion
2517
2556
  //#region src/logs/LogTable.tsx
2518
- function wa(e, t) {
2557
+ function Da(e, t) {
2519
2558
  try {
2520
2559
  let n = localStorage.getItem(e);
2521
2560
  return n ? {
@@ -2526,23 +2565,23 @@ function wa(e, t) {
2526
2565
  return typeof console < "u" && console.warn("[LogTable] Failed to read column visibility:", e), t;
2527
2566
  }
2528
2567
  }
2529
- function Ta(e, t) {
2568
+ function Oa(e, t) {
2530
2569
  try {
2531
2570
  localStorage.setItem(e, JSON.stringify(t));
2532
2571
  } catch (e) {
2533
2572
  typeof console < "u" && console.warn("[LogTable] Failed to persist column visibility:", e);
2534
2573
  }
2535
2574
  }
2536
- function Ea({ columns: e, data: t, loading: n, totalCount: r, page: i, pageSize: a, onPageChange: o, onPageSizeChange: s, pageSizeOptions: c = [
2575
+ function ka({ columns: e, data: t, loading: n, totalCount: r, page: i, pageSize: a, onPageChange: o, onPageSizeChange: s, pageSizeOptions: c = [
2537
2576
  10,
2538
2577
  25,
2539
2578
  50,
2540
2579
  100
2541
2580
  ], onRowClick: l, toolbar: u, getRowId: d, columnVisibilityStorageKey: f }) {
2542
- let p = D(() => Sa(e), [e]), m = D(() => Ca(e), [e]), [h, g] = k(() => f ? wa(f, m) : m), _ = C((e) => {
2581
+ let p = D(() => Ta(e), [e]), m = D(() => Ea(e), [e]), [h, g] = k(() => f ? Da(f, m) : m), _ = C((e) => {
2543
2582
  g((t) => {
2544
2583
  let n = typeof e == "function" ? e(t) : e;
2545
- return f && Ta(f, n), n;
2584
+ return f && Oa(f, n), n;
2546
2585
  });
2547
2586
  }, [f]), v = C((e) => {
2548
2587
  if (!l) return;
@@ -2587,7 +2626,7 @@ function Ea({ columns: e, data: t, loading: n, totalCount: r, page: i, pageSize:
2587
2626
  emptyMessage: /* @__PURE__ */ j(ye, { children: /* @__PURE__ */ M(xe, { children: [
2588
2627
  /* @__PURE__ */ j(Se, {
2589
2628
  variant: "icon",
2590
- children: /* @__PURE__ */ j(it, {})
2629
+ children: /* @__PURE__ */ j(at, {})
2591
2630
  }),
2592
2631
  /* @__PURE__ */ j(Ce, { children: "No logs found" }),
2593
2632
  /* @__PURE__ */ j(be, { children: "Try adjusting your filters or time range to see log entries." })
@@ -2605,24 +2644,24 @@ function Ea({ columns: e, data: t, loading: n, totalCount: r, page: i, pageSize:
2605
2644
  }
2606
2645
  //#endregion
2607
2646
  //#region src/hooks/use-logs-histogram-query.ts
2608
- var Da = 40, Oa = "HTTP_REQUESTS", ka = "COUNT", Aa = {
2647
+ var Aa = 40, ja = "HTTP_REQUESTS", Ma = "COUNT", Na = {
2609
2648
  from: 100,
2610
2649
  to: 399
2611
- }, ja = {
2650
+ }, Pa = {
2612
2651
  from: 400,
2613
2652
  to: 499
2614
- }, Ma = {
2653
+ }, Fa = {
2615
2654
  from: 500,
2616
2655
  to: 599
2617
2656
  };
2618
- function Na(e) {
2619
- let { timeRange: t, filters: r, enabled: i = !0 } = e, a = n(), o = q(J(), r), s = Y(t), c = D(() => Si(s, Da), [s]), l = D(() => [{
2620
- name: Oa,
2621
- measures: [ka]
2657
+ function Ia(e) {
2658
+ let { timeRange: t, filters: r, enabled: i = !0 } = e, a = n(), o = q(J(), r), s = Y(t), c = D(() => Ci(s, Aa), [s]), l = D(() => [{
2659
+ name: ja,
2660
+ measures: [Ma]
2622
2661
  }], []), u = D(() => ["HTTP_STATUS"], []), d = D(() => [
2623
- Aa,
2624
- ja,
2625
- Ma
2662
+ Na,
2663
+ Pa,
2664
+ Fa
2626
2665
  ], []), f = N({
2627
2666
  queryKey: [...K.timeSeries(l, s, c, o, u), "histogram"],
2628
2667
  queryFn: ({ signal: e }) => a.fetchTimeSeries({
@@ -2650,7 +2689,7 @@ function Na(e) {
2650
2689
  }
2651
2690
  //#endregion
2652
2691
  //#region src/logs/LogsHistogram.tsx
2653
- var Pa = {
2692
+ var La = {
2654
2693
  "100-399": {
2655
2694
  label: "1xx–3xx",
2656
2695
  color: "var(--success)"
@@ -2663,9 +2702,9 @@ var Pa = {
2663
2702
  label: "5xx",
2664
2703
  color: "var(--destructive)"
2665
2704
  }
2666
- }, Fa = "100-399", Ia = "400-499", La = "500-599";
2667
- function Ra(e) {
2668
- let { data: t, isLoading: n, available: r } = Na(e), i = D(() => za(t), [t]);
2705
+ }, Ra = "100-399", za = "400-499", Ba = "500-599";
2706
+ function Va(e) {
2707
+ let { data: t, isLoading: n, available: r } = Ia(e), i = D(() => Ha(t), [t]);
2669
2708
  if (!r) return null;
2670
2709
  let a = !n && i.length === 0;
2671
2710
  return /* @__PURE__ */ M("div", {
@@ -2675,7 +2714,7 @@ function Ra(e) {
2675
2714
  className: "mb-1 text-xs text-muted-foreground",
2676
2715
  children: "Requests over time"
2677
2716
  }), /* @__PURE__ */ j(St, {
2678
- config: Pa,
2717
+ config: La,
2679
2718
  className: "h-[120px] w-full",
2680
2719
  children: /* @__PURE__ */ M(xt, {
2681
2720
  data: i,
@@ -2685,15 +2724,15 @@ function Ra(e) {
2685
2724
  children: [
2686
2725
  /* @__PURE__ */ j(Ot, { orientation: "horizontal" }),
2687
2726
  /* @__PURE__ */ j(bt, {
2688
- dataKey: Fa,
2727
+ dataKey: Ra,
2689
2728
  stackId: "volume"
2690
2729
  }),
2691
2730
  /* @__PURE__ */ j(bt, {
2692
- dataKey: Ia,
2731
+ dataKey: za,
2693
2732
  stackId: "volume"
2694
2733
  }),
2695
2734
  /* @__PURE__ */ j(bt, {
2696
- dataKey: La,
2735
+ dataKey: Ba,
2697
2736
  stackId: "volume"
2698
2737
  }),
2699
2738
  /* @__PURE__ */ j(Nt, {}),
@@ -2704,19 +2743,19 @@ function Ra(e) {
2704
2743
  })]
2705
2744
  });
2706
2745
  }
2707
- function za(e) {
2746
+ function Ha(e) {
2708
2747
  let t = /* @__PURE__ */ new Map();
2709
2748
  for (let n of e) t.set(n.key, [n]);
2710
- return hi(t);
2749
+ return gi(t);
2711
2750
  }
2712
2751
  //#endregion
2713
2752
  //#region src/logs/LogsExplorerPage.tsx
2714
- var Ba = 300, Va = "observability-logs-columns";
2715
- function Ha({ columns: e, onRowClick: t, pageSize: n = 25, getRowId: r, scopeFilterField: i, columnVisibilityStorageKey: a = Va }) {
2716
- let { timeRange: o, filters: s, setTimeRange: c, setFilters: l } = pa(), u = gn(s, tn()), [d, f] = k(""), p = mn({
2753
+ var Ua = 300, Wa = "observability-logs-columns";
2754
+ function Ga({ columns: e, onRowClick: t, pageSize: n = 25, getRowId: r, scopeFilterField: i, columnVisibilityStorageKey: a = Wa }) {
2755
+ let { timeRange: o, filters: s, setTimeRange: c, setFilters: l } = ga(), u = _n(s, tn()), [d, f] = k(""), p = hn({
2717
2756
  timeRange: o,
2718
2757
  filters: s,
2719
- search: rr(d, Ba) || void 0,
2758
+ search: ir(d, Ua) || void 0,
2720
2759
  pageSize: n
2721
2760
  }), m = /* @__PURE__ */ M("div", {
2722
2761
  className: "relative flex-1",
@@ -2741,20 +2780,20 @@ function Ha({ columns: e, onRowClick: t, pageSize: n = 25, getRowId: r, scopeFil
2741
2780
  children: [
2742
2781
  /* @__PURE__ */ j("div", {
2743
2782
  className: "flex flex-1 items-center gap-2",
2744
- children: /* @__PURE__ */ j(Gr, {
2783
+ children: /* @__PURE__ */ j(Kr, {
2745
2784
  filters: u,
2746
2785
  onFiltersChange: l,
2747
2786
  scopeFilterField: i
2748
2787
  })
2749
2788
  }),
2750
- /* @__PURE__ */ j(z, { children: /* @__PURE__ */ j(fa, { isFetching: p.isFetching }) }),
2751
- /* @__PURE__ */ j(Bn, {
2789
+ /* @__PURE__ */ j(z, { children: /* @__PURE__ */ j(ha, { isFetching: p.isFetching }) }),
2790
+ /* @__PURE__ */ j(Vn, {
2752
2791
  value: o,
2753
2792
  onChange: c
2754
2793
  })
2755
2794
  ]
2756
2795
  }),
2757
- /* @__PURE__ */ j(Ra, {
2796
+ /* @__PURE__ */ j(Va, {
2758
2797
  timeRange: o,
2759
2798
  filters: s
2760
2799
  }),
@@ -2774,7 +2813,7 @@ function Ha({ columns: e, onRowClick: t, pageSize: n = 25, getRowId: r, scopeFil
2774
2813
  })
2775
2814
  ]
2776
2815
  }),
2777
- /* @__PURE__ */ j(Ea, {
2816
+ /* @__PURE__ */ j(ka, {
2778
2817
  columns: e,
2779
2818
  data: p.data,
2780
2819
  loading: p.isLoading,
@@ -2793,8 +2832,8 @@ function Ha({ columns: e, onRowClick: t, pageSize: n = 25, getRowId: r, scopeFil
2793
2832
  }
2794
2833
  //#endregion
2795
2834
  //#region src/logs/build-logs-deep-link.ts
2796
- function Ua({ basePath: e, timeRange: t, filters: n = [] }) {
2797
- let r = An({
2835
+ function Ka({ basePath: e, timeRange: t, filters: n = [] }) {
2836
+ let r = jn({
2798
2837
  conditions: n,
2799
2838
  timeRange: t
2800
2839
  }), i = `${e.replace(/\/+$/, "")}/logs`;
@@ -2804,9 +2843,9 @@ function Ua({ basePath: e, timeRange: t, filters: n = [] }) {
2804
2843
  }
2805
2844
  //#endregion
2806
2845
  //#region src/logs/default-connection-log-columns.tsx
2807
- var Wa = {
2846
+ var qa = {
2808
2847
  HTTP_PROXY: {
2809
- icon: st,
2848
+ icon: ct,
2810
2849
  label: "HTTP"
2811
2850
  },
2812
2851
  LLM_PROXY: {
@@ -2826,8 +2865,8 @@ var Wa = {
2826
2865
  label: "Webhook"
2827
2866
  }
2828
2867
  };
2829
- function Ga(e) {
2830
- let t = Wa[e.apiType];
2868
+ function Ja(e) {
2869
+ let t = qa[e.apiType];
2831
2870
  if (t) {
2832
2871
  let e = t.icon;
2833
2872
  return /* @__PURE__ */ M("span", {
@@ -2837,10 +2876,10 @@ function Ga(e) {
2837
2876
  }
2838
2877
  return /* @__PURE__ */ M("span", {
2839
2878
  className: "inline-flex items-center gap-1 text-xs text-muted-foreground",
2840
- children: [/* @__PURE__ */ j(tt, { className: "size-3.5" }), e.apiType]
2879
+ children: [/* @__PURE__ */ j(nt, { className: "size-3.5" }), e.apiType]
2841
2880
  });
2842
2881
  }
2843
- function Ka(e, t) {
2882
+ function Ya(e, t) {
2844
2883
  let n = e.replace(/\/$/, ""), r = [
2845
2884
  {
2846
2885
  key: "timestamp",
@@ -2901,7 +2940,7 @@ function Ka(e, t) {
2901
2940
  key: "apiType",
2902
2941
  label: "API Type",
2903
2942
  value: (e) => e.apiType,
2904
- render: Ga,
2943
+ render: Ja,
2905
2944
  defaultVisible: !1
2906
2945
  },
2907
2946
  {
@@ -2975,14 +3014,14 @@ function Ka(e, t) {
2975
3014
  }
2976
3015
  //#endregion
2977
3016
  //#region src/logs/detail/components/LogDetailCodeBlock.tsx
2978
- var qa = 240;
2979
- function X({ code: e, language: t = "json", maxHeight: n = qa }) {
3017
+ var Xa = 240;
3018
+ function X({ code: e, language: t = "json", maxHeight: n = Xa }) {
2980
3019
  let [r, i] = k(!1);
2981
3020
  if (!e) return /* @__PURE__ */ j("p", {
2982
3021
  className: "text-xs text-muted-foreground/70 py-3 italic",
2983
3022
  children: "No body captured"
2984
3023
  });
2985
- let a = Ja(e), o = a.split("\n").length > 12;
3024
+ let a = Za(e), o = a.split("\n").length > 12;
2986
3025
  return /* @__PURE__ */ M("div", {
2987
3026
  className: "relative rounded-lg border",
2988
3027
  children: [
@@ -2998,7 +3037,7 @@ function X({ code: e, language: t = "json", maxHeight: n = qa }) {
2998
3037
  navigator.clipboard.writeText(a).then(() => H.success("Copied to clipboard"), () => H.error("Failed to copy to clipboard"));
2999
3038
  },
3000
3039
  "aria-label": "Copy body",
3001
- children: /* @__PURE__ */ j(nt, { className: "size-3.5" })
3040
+ children: /* @__PURE__ */ j(rt, { className: "size-3.5" })
3002
3041
  })
3003
3042
  }), /* @__PURE__ */ j(R, { children: "Copy" })] }) })
3004
3043
  }),
@@ -3010,12 +3049,12 @@ function X({ code: e, language: t = "json", maxHeight: n = qa }) {
3010
3049
  o && !r && /* @__PURE__ */ M("button", {
3011
3050
  onClick: () => i(!0),
3012
3051
  className: "flex w-full items-center justify-center gap-1.5 border-t bg-muted/30 py-2 text-xs font-medium text-muted-foreground hover:text-foreground hover:bg-muted/50 transition-colors duration-150 rounded-b-lg",
3013
- children: [/* @__PURE__ */ j($e, { className: "size-3.5" }), "Show more"]
3052
+ children: [/* @__PURE__ */ j(et, { className: "size-3.5" }), "Show more"]
3014
3053
  })
3015
3054
  ]
3016
3055
  });
3017
3056
  }
3018
- function Ja(e) {
3057
+ function Za(e) {
3019
3058
  try {
3020
3059
  let t = JSON.parse(e);
3021
3060
  return JSON.stringify(t, null, 2);
@@ -3056,7 +3095,7 @@ function Q({ headers: e }) {
3056
3095
  }
3057
3096
  //#endregion
3058
3097
  //#region src/logs/detail/components/LogDetailJsonTree.tsx
3059
- function Ya({ data: e, onCopyAll: t }) {
3098
+ function Qa({ data: e, onCopyAll: t }) {
3060
3099
  let n = O(null), r = () => {
3061
3100
  let n = JSON.stringify(e, null, 2);
3062
3101
  navigator.clipboard.writeText(n).then(() => {
@@ -3087,7 +3126,7 @@ function Ya({ data: e, onCopyAll: t }) {
3087
3126
  className: "size-7",
3088
3127
  onClick: r,
3089
3128
  "aria-label": "Copy JSON",
3090
- children: /* @__PURE__ */ j(nt, { className: "size-3.5" })
3129
+ children: /* @__PURE__ */ j(rt, { className: "size-3.5" })
3091
3130
  })
3092
3131
  }), /* @__PURE__ */ j(R, { children: "Copy full JSON" })] }) })
3093
3132
  }), /* @__PURE__ */ j("div", {
@@ -3097,7 +3136,7 @@ function Ya({ data: e, onCopyAll: t }) {
3097
3136
  "aria-label": "Log attributes",
3098
3137
  className: "rounded-md border p-3 text-xs font-mono",
3099
3138
  onKeyDown: i,
3100
- children: /* @__PURE__ */ j(Xa, {
3139
+ children: /* @__PURE__ */ j($a, {
3101
3140
  value: e,
3102
3141
  depth: 0,
3103
3142
  isRoot: !0
@@ -3105,9 +3144,9 @@ function Ya({ data: e, onCopyAll: t }) {
3105
3144
  })]
3106
3145
  });
3107
3146
  }
3108
- function Xa({ name: e, value: t, depth: n, isRoot: r, isLast: i }) {
3147
+ function $a({ name: e, value: t, depth: n, isRoot: r, isLast: i }) {
3109
3148
  let [a, o] = k(n < 2);
3110
- if (t === null) return /* @__PURE__ */ j(Za, {
3149
+ if (t === null) return /* @__PURE__ */ j(eo, {
3111
3150
  name: e,
3112
3151
  value: "null",
3113
3152
  className: "text-muted-foreground",
@@ -3145,7 +3184,7 @@ function Xa({ name: e, value: t, depth: n, isRoot: r, isLast: i }) {
3145
3184
  onClick: () => o(!a),
3146
3185
  className: "flex items-center gap-0.5 hover:bg-muted/50 rounded -ml-4 pl-4 pr-1",
3147
3186
  children: [
3148
- /* @__PURE__ */ j(et, { className: `size-3 shrink-0 text-muted-foreground transition-transform duration-150 ${a ? "rotate-90" : ""}` }),
3187
+ /* @__PURE__ */ j(tt, { className: `size-3 shrink-0 text-muted-foreground transition-transform duration-150 ${a ? "rotate-90" : ""}` }),
3149
3188
  e && /* @__PURE__ */ j("span", {
3150
3189
  className: "text-primary",
3151
3190
  children: e
@@ -3180,7 +3219,7 @@ function Xa({ name: e, value: t, depth: n, isRoot: r, isLast: i }) {
3180
3219
  a && /* @__PURE__ */ j("div", {
3181
3220
  className: "ml-4 border-l border-muted pl-2",
3182
3221
  role: "group",
3183
- children: c.map(([e, t], r) => /* @__PURE__ */ j(Xa, {
3222
+ children: c.map(([e, t], r) => /* @__PURE__ */ j($a, {
3184
3223
  name: s ? void 0 : e,
3185
3224
  value: t,
3186
3225
  depth: n + 1,
@@ -3194,29 +3233,29 @@ function Xa({ name: e, value: t, depth: n, isRoot: r, isLast: i }) {
3194
3233
  ]
3195
3234
  });
3196
3235
  }
3197
- return typeof t == "string" ? /* @__PURE__ */ j(Za, {
3236
+ return typeof t == "string" ? /* @__PURE__ */ j(eo, {
3198
3237
  name: e,
3199
3238
  value: `"${t}"`,
3200
3239
  className: "text-green-600 dark:text-green-400",
3201
3240
  isLast: i
3202
- }) : typeof t == "number" ? /* @__PURE__ */ j(Za, {
3241
+ }) : typeof t == "number" ? /* @__PURE__ */ j(eo, {
3203
3242
  name: e,
3204
3243
  value: String(t),
3205
3244
  className: "text-blue-600 dark:text-blue-400",
3206
3245
  isLast: i
3207
- }) : typeof t == "boolean" ? /* @__PURE__ */ j(Za, {
3246
+ }) : typeof t == "boolean" ? /* @__PURE__ */ j(eo, {
3208
3247
  name: e,
3209
3248
  value: String(t),
3210
3249
  className: "text-amber-600 dark:text-amber-400",
3211
3250
  isLast: i
3212
- }) : /* @__PURE__ */ j(Za, {
3251
+ }) : /* @__PURE__ */ j(eo, {
3213
3252
  name: e,
3214
3253
  value: String(t),
3215
3254
  className: "text-foreground",
3216
3255
  isLast: i
3217
3256
  });
3218
3257
  }
3219
- function Za({ name: e, value: t, className: n, isLast: r }) {
3258
+ function eo({ name: e, value: t, className: n, isLast: r }) {
3220
3259
  return /* @__PURE__ */ M("div", {
3221
3260
  className: "flex items-center py-px",
3222
3261
  role: "treeitem",
@@ -3248,13 +3287,13 @@ function $({ items: e, onFilter: t }) {
3248
3287
  let n = e.filter((e) => e.value !== void 0 && e.value !== null && e.value !== "");
3249
3288
  return n.length === 0 ? null : /* @__PURE__ */ j("dl", {
3250
3289
  className: "space-y-0 divide-y divide-border/50",
3251
- children: n.map((e) => /* @__PURE__ */ j(Qa, {
3290
+ children: n.map((e) => /* @__PURE__ */ j(to, {
3252
3291
  item: e,
3253
3292
  onFilter: t
3254
3293
  }, e.label))
3255
3294
  });
3256
3295
  }
3257
- function Qa({ item: e, onFilter: t }) {
3296
+ function to({ item: e, onFilter: t }) {
3258
3297
  let n = String(e.value);
3259
3298
  return /* @__PURE__ */ M("div", {
3260
3299
  className: "group flex items-baseline gap-4 py-2.5",
@@ -3282,7 +3321,7 @@ function Qa({ item: e, onFilter: t }) {
3282
3321
  navigator.clipboard.writeText(n).then(() => H.success("Copied to clipboard"), () => H.error("Failed to copy to clipboard"));
3283
3322
  },
3284
3323
  "aria-label": "Copy value",
3285
- children: /* @__PURE__ */ j(nt, { className: "size-3" })
3324
+ children: /* @__PURE__ */ j(rt, { className: "size-3" })
3286
3325
  })
3287
3326
  }), /* @__PURE__ */ j(R, { children: "Copy" })] }) }), e.filterable && e.filterField && t && /* @__PURE__ */ j(z, { children: /* @__PURE__ */ M(L, { children: [/* @__PURE__ */ j(B, {
3288
3327
  asChild: !0,
@@ -3294,7 +3333,7 @@ function Qa({ item: e, onFilter: t }) {
3294
3333
  t && e.filterField && t(e.filterField, n);
3295
3334
  },
3296
3335
  "aria-label": "Filter by this value",
3297
- children: /* @__PURE__ */ j(at, { className: "size-3" })
3336
+ children: /* @__PURE__ */ j(ot, { className: "size-3" })
3298
3337
  })
3299
3338
  }), /* @__PURE__ */ j(R, { children: "Filter" })] }) })]
3300
3339
  })]
@@ -3303,7 +3342,7 @@ function Qa({ item: e, onFilter: t }) {
3303
3342
  }
3304
3343
  //#endregion
3305
3344
  //#region src/logs/detail/presets/connection-log-preset.tsx
3306
- function $a(e) {
3345
+ function no(e) {
3307
3346
  return {
3308
3347
  type: "preset",
3309
3348
  resolve: (t) => {
@@ -3337,7 +3376,7 @@ function $a(e) {
3337
3376
  key: "overview",
3338
3377
  title: "Overview",
3339
3378
  defaultOpen: !0,
3340
- render: () => /* @__PURE__ */ j(eo, {
3379
+ render: () => /* @__PURE__ */ j(ro, {
3341
3380
  log: n,
3342
3381
  basePath: e?.basePath,
3343
3382
  extraFields: e?.extraFields
@@ -3346,23 +3385,23 @@ function $a(e) {
3346
3385
  key: "request",
3347
3386
  title: "Request",
3348
3387
  defaultOpen: !1,
3349
- render: () => /* @__PURE__ */ j(to, { log: n })
3388
+ render: () => /* @__PURE__ */ j(io, { log: n })
3350
3389
  }), i.has("response") || a.push({
3351
3390
  key: "response",
3352
3391
  title: "Response",
3353
3392
  defaultOpen: !1,
3354
- render: () => /* @__PURE__ */ j(no, { log: n })
3393
+ render: () => /* @__PURE__ */ j(ao, { log: n })
3355
3394
  }), !i.has("errors") && (n.errorKey || n.warnings && n.warnings.length > 0) && a.push({
3356
3395
  key: "errors",
3357
3396
  title: "Issues",
3358
3397
  defaultOpen: !0,
3359
3398
  badge: () => (n.warnings?.length ?? 0) + +!!n.errorKey,
3360
- render: () => /* @__PURE__ */ j(ro, { log: n })
3399
+ render: () => /* @__PURE__ */ j(oo, { log: n })
3361
3400
  }), i.has("raw") || a.push({
3362
3401
  key: "raw",
3363
3402
  title: "Raw JSON",
3364
3403
  defaultOpen: !1,
3365
- render: () => /* @__PURE__ */ j(Ya, { data: n })
3404
+ render: () => /* @__PURE__ */ j(Qa, { data: n })
3366
3405
  }), {
3367
3406
  header: {
3368
3407
  method: () => n.method,
@@ -3376,7 +3415,7 @@ function $a(e) {
3376
3415
  }
3377
3416
  };
3378
3417
  }
3379
- function eo({ log: e, basePath: t, extraFields: n }) {
3418
+ function ro({ log: e, basePath: t, extraFields: n }) {
3380
3419
  let r = t?.replace(/\/$/, "") ?? "";
3381
3420
  return /* @__PURE__ */ j($, { items: [
3382
3421
  {
@@ -3447,7 +3486,7 @@ function eo({ log: e, basePath: t, extraFields: n }) {
3447
3486
  })) : []
3448
3487
  ] });
3449
3488
  }
3450
- function to({ log: e }) {
3489
+ function io({ log: e }) {
3451
3490
  let t = e.entrypointRequest, n = e.endpointRequest;
3452
3491
  return !t && !n ? /* @__PURE__ */ j(Z, { message: "No request details captured" }) : /* @__PURE__ */ M("div", {
3453
3492
  className: "space-y-4",
@@ -3488,7 +3527,7 @@ function to({ log: e }) {
3488
3527
  })]
3489
3528
  });
3490
3529
  }
3491
- function no({ log: e }) {
3530
+ function ao({ log: e }) {
3492
3531
  let t = e.endpointResponse, n = e.entrypointResponse;
3493
3532
  return !t && !n ? /* @__PURE__ */ j(Z, { message: "No response details captured" }) : /* @__PURE__ */ M("div", {
3494
3533
  className: "space-y-4",
@@ -3523,7 +3562,7 @@ function no({ log: e }) {
3523
3562
  })]
3524
3563
  });
3525
3564
  }
3526
- function ro({ log: e }) {
3565
+ function oo({ log: e }) {
3527
3566
  return /* @__PURE__ */ M("div", {
3528
3567
  className: "space-y-3",
3529
3568
  children: [e.errorKey && /* @__PURE__ */ M("div", {
@@ -3573,9 +3612,9 @@ function ro({ log: e }) {
3573
3612
  }
3574
3613
  //#endregion
3575
3614
  //#region src/logs/detail/presets/message-log-preset.tsx
3576
- var io = 5;
3577
- function ao(e) {
3578
- let t = e?.messagesPageSize ?? io;
3615
+ var so = 5;
3616
+ function co(e) {
3617
+ let t = e?.messagesPageSize ?? so;
3579
3618
  return {
3580
3619
  type: "preset",
3581
3620
  resolve: (e) => {
@@ -3583,19 +3622,19 @@ function ao(e) {
3583
3622
  key: "overview",
3584
3623
  title: "Overview",
3585
3624
  defaultOpen: !0,
3586
- render: () => /* @__PURE__ */ j(oo, { log: n })
3625
+ render: () => /* @__PURE__ */ j(lo, { log: n })
3587
3626
  }, {
3588
3627
  key: "connection",
3589
3628
  title: "Connection Logs",
3590
3629
  defaultOpen: !1,
3591
- render: () => /* @__PURE__ */ j(so, { log: n })
3630
+ render: () => /* @__PURE__ */ j(uo, { log: n })
3592
3631
  }];
3593
3632
  return n.messages && n.messages.length > 0 && r.push({
3594
3633
  key: "messages",
3595
3634
  title: "Messages",
3596
3635
  defaultOpen: !0,
3597
3636
  badge: () => n.messages?.length,
3598
- render: () => /* @__PURE__ */ j(co, {
3637
+ render: () => /* @__PURE__ */ j(fo, {
3599
3638
  messages: n.messages,
3600
3639
  pageSize: t
3601
3640
  })
@@ -3603,7 +3642,7 @@ function ao(e) {
3603
3642
  key: "raw",
3604
3643
  title: "Raw JSON",
3605
3644
  defaultOpen: !1,
3606
- render: () => /* @__PURE__ */ j(Ya, { data: n })
3645
+ render: () => /* @__PURE__ */ j(Qa, { data: n })
3607
3646
  }), {
3608
3647
  header: {
3609
3648
  method: () => void 0,
@@ -3617,7 +3656,7 @@ function ao(e) {
3617
3656
  }
3618
3657
  };
3619
3658
  }
3620
- function oo({ log: e }) {
3659
+ function lo({ log: e }) {
3621
3660
  return /* @__PURE__ */ j($, { items: [
3622
3661
  {
3623
3662
  label: "API",
@@ -3658,7 +3697,7 @@ function oo({ log: e }) {
3658
3697
  }] : []
3659
3698
  ] });
3660
3699
  }
3661
- function so({ log: e }) {
3700
+ function uo({ log: e }) {
3662
3701
  return e.entrypointRequest || e.endpointRequest || e.entrypointResponse || e.endpointResponse ? /* @__PURE__ */ M("div", {
3663
3702
  className: "space-y-4",
3664
3703
  children: [
@@ -3731,11 +3770,11 @@ function so({ log: e }) {
3731
3770
  ]
3732
3771
  }) : /* @__PURE__ */ j(Z, { message: "No connection log details captured" });
3733
3772
  }
3734
- function co({ messages: e, pageSize: t }) {
3773
+ function fo({ messages: e, pageSize: t }) {
3735
3774
  let [n, r] = k(t), i = e.slice(0, n), a = n < e.length;
3736
3775
  return /* @__PURE__ */ M("div", {
3737
3776
  className: "space-y-3",
3738
- children: [i.map((e, t) => /* @__PURE__ */ j(lo, { message: e }, e.id ?? t)), a && /* @__PURE__ */ M("button", {
3777
+ children: [i.map((e, t) => /* @__PURE__ */ j(po, { message: e }, e.id ?? t)), a && /* @__PURE__ */ M("button", {
3739
3778
  onClick: () => r((e) => e + t),
3740
3779
  className: "w-full rounded-md border py-2 text-xs text-muted-foreground hover:bg-muted/50 transition-colors",
3741
3780
  children: [
@@ -3746,7 +3785,7 @@ function co({ messages: e, pageSize: t }) {
3746
3785
  })]
3747
3786
  });
3748
3787
  }
3749
- function lo({ message: e }) {
3788
+ function po({ message: e }) {
3750
3789
  return /* @__PURE__ */ M("div", {
3751
3790
  className: "rounded-md border p-3 space-y-2",
3752
3791
  children: [
@@ -3794,7 +3833,7 @@ function lo({ message: e }) {
3794
3833
  }
3795
3834
  //#endregion
3796
3835
  //#region src/logs/detail/presets/webhook-log-preset.tsx
3797
- function uo(e) {
3836
+ function mo(e) {
3798
3837
  return {
3799
3838
  type: "preset",
3800
3839
  resolve: (t) => {
@@ -3819,7 +3858,7 @@ function uo(e) {
3819
3858
  key: "overview",
3820
3859
  title: "Overview",
3821
3860
  defaultOpen: !0,
3822
- render: () => /* @__PURE__ */ j(fo, {
3861
+ render: () => /* @__PURE__ */ j(ho, {
3823
3862
  log: n,
3824
3863
  basePath: e?.basePath
3825
3864
  })
@@ -3829,22 +3868,22 @@ function uo(e) {
3829
3868
  title: "Delivery Attempts",
3830
3869
  defaultOpen: !0,
3831
3870
  badge: () => n.retryTimeline?.length,
3832
- render: () => /* @__PURE__ */ j(po, { attempts: n.retryTimeline })
3871
+ render: () => /* @__PURE__ */ j(go, { attempts: n.retryTimeline })
3833
3872
  }), i.push({
3834
3873
  key: "request",
3835
3874
  title: "Request Sent by Gateway",
3836
3875
  defaultOpen: !1,
3837
- render: () => /* @__PURE__ */ j(mo, { log: n })
3876
+ render: () => /* @__PURE__ */ j(_o, { log: n })
3838
3877
  }), i.push({
3839
3878
  key: "response",
3840
3879
  title: "Response from Callback",
3841
3880
  defaultOpen: !1,
3842
- render: () => /* @__PURE__ */ j(ho, { log: n })
3881
+ render: () => /* @__PURE__ */ j(vo, { log: n })
3843
3882
  }), i.push({
3844
3883
  key: "raw",
3845
3884
  title: "Raw JSON",
3846
3885
  defaultOpen: !1,
3847
- render: () => /* @__PURE__ */ j(Ya, { data: n })
3886
+ render: () => /* @__PURE__ */ j(Qa, { data: n })
3848
3887
  }), {
3849
3888
  header: {
3850
3889
  method: () => n.method,
@@ -3858,7 +3897,7 @@ function uo(e) {
3858
3897
  }
3859
3898
  };
3860
3899
  }
3861
- function fo({ log: e, basePath: t }) {
3900
+ function ho({ log: e, basePath: t }) {
3862
3901
  let n = t?.replace(/\/$/, "") ?? "";
3863
3902
  return /* @__PURE__ */ j($, { items: [
3864
3903
  {
@@ -3895,7 +3934,7 @@ function fo({ log: e, basePath: t }) {
3895
3934
  }] : []
3896
3935
  ] });
3897
3936
  }
3898
- function po({ attempts: e }) {
3937
+ function go({ attempts: e }) {
3899
3938
  return /* @__PURE__ */ j("div", {
3900
3939
  className: "rounded-md border",
3901
3940
  children: /* @__PURE__ */ M("table", {
@@ -3947,13 +3986,13 @@ function po({ attempts: e }) {
3947
3986
  })
3948
3987
  });
3949
3988
  }
3950
- function mo({ log: e }) {
3989
+ function _o({ log: e }) {
3951
3990
  return !e.requestHeaders && !e.requestBody ? /* @__PURE__ */ j(Z, { message: "No request details captured" }) : /* @__PURE__ */ M("div", {
3952
3991
  className: "space-y-2",
3953
3992
  children: [/* @__PURE__ */ j(Q, { headers: e.requestHeaders }), /* @__PURE__ */ j(X, { code: e.requestBody })]
3954
3993
  });
3955
3994
  }
3956
- function ho({ log: e }) {
3995
+ function vo({ log: e }) {
3957
3996
  return !e.responseHeaders && !e.responseBody ? /* @__PURE__ */ j(Z, { message: "No response details captured" }) : /* @__PURE__ */ M("div", {
3958
3997
  className: "space-y-2",
3959
3998
  children: [/* @__PURE__ */ j(Q, { headers: e.responseHeaders }), /* @__PURE__ */ j(X, { code: e.responseBody })]
@@ -3961,16 +4000,16 @@ function ho({ log: e }) {
3961
4000
  }
3962
4001
  //#endregion
3963
4002
  //#region src/logs/detail/types.ts
3964
- function go(e) {
4003
+ function yo(e) {
3965
4004
  return "discriminant" in e;
3966
4005
  }
3967
4006
  //#endregion
3968
4007
  //#region src/logs/detail/define-log-detail.ts
3969
- function _o(e) {
4008
+ function bo(e) {
3970
4009
  return "preset" in e;
3971
4010
  }
3972
- function vo(e) {
3973
- return _o(e) ? {
4011
+ function xo(e) {
4012
+ return bo(e) ? {
3974
4013
  preset: e.preset,
3975
4014
  contextChart: e.contextChart
3976
4015
  } : {
@@ -3979,31 +4018,31 @@ function vo(e) {
3979
4018
  contextChart: e.contextChart
3980
4019
  };
3981
4020
  }
3982
- function yo(e, t) {
3983
- if (go(e)) {
4021
+ function So(e, t) {
4022
+ if (yo(e)) {
3984
4023
  let n = e.discriminant(t);
3985
4024
  return e.variants[n] ?? null;
3986
4025
  }
3987
4026
  return e.preset;
3988
4027
  }
3989
- function bo(e, t) {
4028
+ function Co(e, t) {
3990
4029
  return e.type === "preset" ? e.resolve(t) : null;
3991
4030
  }
3992
- function xo(e) {
3993
- let { basePath: t, connectionLog: n, messageLog: r, webhookLog: i, extraVariants: a, contextChart: o } = e, s = $a({
4031
+ function wo(e) {
4032
+ let { basePath: t, connectionLog: n, messageLog: r, webhookLog: i, extraVariants: a, contextChart: o } = e, s = no({
3994
4033
  ...n,
3995
4034
  basePath: t
3996
- }), c = uo({
4035
+ }), c = mo({
3997
4036
  ...i,
3998
4037
  basePath: t
3999
4038
  });
4000
- return vo({
4039
+ return xo({
4001
4040
  discriminant: (e) => e.apiType,
4002
4041
  variants: {
4003
4042
  HTTP_PROXY: s,
4004
4043
  LLM_PROXY: s,
4005
4044
  MCP_PROXY: s,
4006
- MESSAGE: ao(r),
4045
+ MESSAGE: co(r),
4007
4046
  WEBHOOK: c,
4008
4047
  ...a
4009
4048
  },
@@ -4016,16 +4055,16 @@ function xo(e) {
4016
4055
  }
4017
4056
  //#endregion
4018
4057
  //#region src/logs/detail/components/LogDetailContextChart.tsx
4019
- var So = 900 * 1e3, Co = "gateway_response_time";
4020
- function wo({ apiId: e, timestamp: t, metric: r = Co }) {
4058
+ var To = 900 * 1e3, Eo = "gateway_response_time";
4059
+ function Do({ apiId: e, timestamp: t, metric: r = Eo }) {
4021
4060
  let i = n(), a = D(() => {
4022
4061
  let e = new Date(t).getTime();
4023
4062
  return {
4024
4063
  type: "absolute",
4025
- from: e - So,
4026
- to: e + So
4064
+ from: e - To,
4065
+ to: e + To
4027
4066
  };
4028
- }, [t]), o = D(() => Si(a, 30), [a]), { data: s, isLoading: c } = N({
4067
+ }, [t]), o = D(() => Ci(a, 30), [a]), { data: s, isLoading: c } = N({
4029
4068
  queryKey: K.timeSeries([{ name: r }], a, o, [{
4030
4069
  field: "API_ID",
4031
4070
  operator: "eq",
@@ -4052,7 +4091,7 @@ function wo({ apiId: e, timestamp: t, metric: r = Co }) {
4052
4091
  } }), [l]), d = D(() => {
4053
4092
  if (!s) return [];
4054
4093
  let e = /* @__PURE__ */ new Map();
4055
- return e.set(l, s), hi(e);
4094
+ return e.set(l, s), gi(e);
4056
4095
  }, [s, l]), f = D(() => {
4057
4096
  let e = new Date(t).getTime(), n = s?.[0]?.points;
4058
4097
  if (d.length === 0 || !n?.length) return;
@@ -4107,18 +4146,18 @@ function wo({ apiId: e, timestamp: t, metric: r = Co }) {
4107
4146
  }
4108
4147
  //#endregion
4109
4148
  //#region src/logs/detail/components/LogDetailDrawerShell.tsx
4110
- var To = y({
4149
+ var Oo = y({
4111
4150
  expanded: !1,
4112
4151
  setExpanded: () => {}
4113
4152
  });
4114
- function Eo() {
4115
- return w(To);
4153
+ function ko() {
4154
+ return w(Oo);
4116
4155
  }
4117
- var Do = "[role=\"tree\"], [role=\"treeitem\"], input, textarea, select, [contenteditable]";
4118
- function Oo(e) {
4119
- return e === document.body ? !0 : e.closest(Do) ? !1 : !!e.closest("[data-log-detail-shell]");
4156
+ var Ao = "[role=\"tree\"], [role=\"treeitem\"], input, textarea, select, [contenteditable]";
4157
+ function jo(e) {
4158
+ return e === document.body ? !0 : e.closest(Ao) ? !1 : !!e.closest("[data-log-detail-shell]");
4120
4159
  }
4121
- function ko({ open: e, onClose: t, onNavigatePrev: n, onNavigateNext: r, children: i }) {
4160
+ function Mo({ open: e, onClose: t, onNavigatePrev: n, onNavigateNext: r, children: i }) {
4122
4161
  let [a, o] = k(!1), s = C(() => {
4123
4162
  o(!1), t();
4124
4163
  }, [t]), c = C((e) => {
@@ -4129,10 +4168,10 @@ function ko({ open: e, onClose: t, onNavigatePrev: n, onNavigateNext: r, childre
4129
4168
  t.preventDefault(), a ? o(!1) : s();
4130
4169
  break;
4131
4170
  case "ArrowUp":
4132
- Oo(t.target) && (t.preventDefault(), n?.());
4171
+ jo(t.target) && (t.preventDefault(), n?.());
4133
4172
  break;
4134
4173
  case "ArrowDown":
4135
- Oo(t.target) && (t.preventDefault(), r?.());
4174
+ jo(t.target) && (t.preventDefault(), r?.());
4136
4175
  break;
4137
4176
  }
4138
4177
  }, [
@@ -4147,7 +4186,7 @@ function ko({ open: e, onClose: t, onNavigatePrev: n, onNavigateNext: r, childre
4147
4186
  expanded: a,
4148
4187
  setExpanded: o
4149
4188
  }), [a]);
4150
- return /* @__PURE__ */ j(To.Provider, {
4189
+ return /* @__PURE__ */ j(Oo.Provider, {
4151
4190
  value: f,
4152
4191
  children: /* @__PURE__ */ j(ze, {
4153
4192
  open: e,
@@ -4183,7 +4222,7 @@ function ko({ open: e, onClose: t, onNavigatePrev: n, onNavigateNext: r, childre
4183
4222
  }
4184
4223
  //#endregion
4185
4224
  //#region src/logs/detail/components/LogDetailHeader.tsx
4186
- var Ao = {
4225
+ var No = {
4187
4226
  GET: "success",
4188
4227
  POST: "default",
4189
4228
  PUT: "warning",
@@ -4192,10 +4231,10 @@ var Ao = {
4192
4231
  HEAD: "secondary",
4193
4232
  OPTIONS: "secondary"
4194
4233
  };
4195
- function jo(e) {
4234
+ function Po(e) {
4196
4235
  return e >= 500 ? "text-destructive" : e >= 400 ? "text-warning" : "text-success";
4197
4236
  }
4198
- function Mo(e) {
4237
+ function Fo(e) {
4199
4238
  let t = new Date(e), n = (/* @__PURE__ */ new Date()).getTime() - t.getTime(), r = Math.floor(n / 1e3), i;
4200
4239
  i = r < 60 ? `${r}s ago` : r < 3600 ? `${Math.floor(r / 60)}m ago` : r < 86400 ? `${Math.floor(r / 3600)}h ago` : t.toLocaleDateString(void 0, {
4201
4240
  month: "short",
@@ -4215,10 +4254,10 @@ function Mo(e) {
4215
4254
  full: a
4216
4255
  };
4217
4256
  }
4218
- function No({ method: e, status: t, uri: n, timestamp: r, onClose: i, onNavigatePrev: a, onNavigateNext: o, onCopyJson: s, hasPrev: c = !0, hasNext: l = !0, showExpandToggle: u = !0 }) {
4219
- let { expanded: d, setExpanded: f } = Eo(), p = C((e) => {
4257
+ function Io({ method: e, status: t, uri: n, timestamp: r, onClose: i, onNavigatePrev: a, onNavigateNext: o, onCopyJson: s, hasPrev: c = !0, hasNext: l = !0, showExpandToggle: u = !0 }) {
4258
+ let { expanded: d, setExpanded: f } = ko(), p = C((e) => {
4220
4259
  e.key === "Escape" && i?.();
4221
- }, [i]), m = r ? Mo(r) : null;
4260
+ }, [i]), m = r ? Fo(r) : null;
4222
4261
  return /* @__PURE__ */ M("div", {
4223
4262
  className: "sticky top-0 z-10 border-b bg-background/95 backdrop-blur-sm",
4224
4263
  role: "toolbar",
@@ -4253,7 +4292,7 @@ function No({ method: e, status: t, uri: n, timestamp: r, onClose: i, onNavigate
4253
4292
  size: "icon",
4254
4293
  onClick: s,
4255
4294
  "aria-label": "Copy JSON",
4256
- children: /* @__PURE__ */ j(nt, { className: "size-4" })
4295
+ children: /* @__PURE__ */ j(rt, { className: "size-4" })
4257
4296
  })
4258
4297
  }), /* @__PURE__ */ j(R, { children: "Copy as JSON" })] }) }),
4259
4298
  u && /* @__PURE__ */ j(z, { children: /* @__PURE__ */ M(L, { children: [/* @__PURE__ */ j(B, {
@@ -4263,7 +4302,7 @@ function No({ method: e, status: t, uri: n, timestamp: r, onClose: i, onNavigate
4263
4302
  size: "icon",
4264
4303
  onClick: () => f(!d),
4265
4304
  "aria-label": d ? "Exit full screen" : "Full screen",
4266
- children: j(d ? ut : rt, { className: "size-4" })
4305
+ children: j(d ? ut : it, { className: "size-4" })
4267
4306
  })
4268
4307
  }), /* @__PURE__ */ j(R, { children: d ? "Exit full screen" : "Full screen" })] }) }),
4269
4308
  i && /* @__PURE__ */ M(A, { children: [/* @__PURE__ */ j(Re, {
@@ -4284,11 +4323,11 @@ function No({ method: e, status: t, uri: n, timestamp: r, onClose: i, onNavigate
4284
4323
  className: "flex items-center gap-3",
4285
4324
  children: [
4286
4325
  e && /* @__PURE__ */ j(P, {
4287
- variant: Ao[e] ?? "secondary",
4326
+ variant: No[e] ?? "secondary",
4288
4327
  children: e
4289
4328
  }),
4290
4329
  t !== void 0 && /* @__PURE__ */ j("span", {
4291
- className: `font-mono text-sm font-semibold tabular-nums ${jo(t)}`,
4330
+ className: `font-mono text-sm font-semibold tabular-nums ${Po(t)}`,
4292
4331
  children: t
4293
4332
  }),
4294
4333
  m && /* @__PURE__ */ j(z, { children: /* @__PURE__ */ M(L, { children: [/* @__PURE__ */ j(B, {
@@ -4320,9 +4359,9 @@ function No({ method: e, status: t, uri: n, timestamp: r, onClose: i, onNavigate
4320
4359
  }
4321
4360
  //#endregion
4322
4361
  //#region src/logs/detail/components/LogDetailMetrics.tsx
4323
- function Po({ items: e }) {
4362
+ function Lo({ items: e }) {
4324
4363
  let t = e.filter((e) => e.value !== void 0 && e.value !== null), n = D(() => t.map((e) => ({
4325
- value: Fo(e.value, e.unit),
4364
+ value: Ro(e.value, e.unit),
4326
4365
  label: e.label
4327
4366
  })), [t]);
4328
4367
  return n.length === 0 ? null : /* @__PURE__ */ j("div", {
@@ -4335,12 +4374,12 @@ function Po({ items: e }) {
4335
4374
  })
4336
4375
  });
4337
4376
  }
4338
- function Fo(e, t) {
4377
+ function Ro(e, t) {
4339
4378
  return t === "ms" || !t ? e >= 1e4 ? `${(e / 1e3).toFixed(1)}s` : e >= 1e3 ? `${(e / 1e3).toFixed(2)}s` : `${Math.round(e)}ms` : t === "B" ? e >= 1024 * 1024 ? `${(e / (1024 * 1024)).toFixed(1)} MB` : e >= 1024 ? `${(e / 1024).toFixed(1)} KB` : `${e} B` : t === "" ? String(e) : `${e}${t}`;
4340
4379
  }
4341
4380
  //#endregion
4342
4381
  //#region src/logs/detail/components/LogDetailSection.tsx
4343
- function Io({ children: e, defaultValue: t }) {
4382
+ function zo({ children: e, defaultValue: t }) {
4344
4383
  let [n, r] = k(t ?? "");
4345
4384
  return /* @__PURE__ */ j(ne, {
4346
4385
  type: "single",
@@ -4350,7 +4389,7 @@ function Io({ children: e, defaultValue: t }) {
4350
4389
  children: e
4351
4390
  });
4352
4391
  }
4353
- function Lo({ title: e, badge: t, children: n }) {
4392
+ function Bo({ title: e, badge: t, children: n }) {
4354
4393
  return /* @__PURE__ */ M(ie, {
4355
4394
  value: e,
4356
4395
  className: "border-b last:border-b-0",
@@ -4372,26 +4411,26 @@ function Lo({ title: e, badge: t, children: n }) {
4372
4411
  }
4373
4412
  //#endregion
4374
4413
  //#region src/logs/detail/components/LogDetailContent.tsx
4375
- var Ro = {
4376
- Header: No,
4377
- Section: Lo,
4414
+ var Vo = {
4415
+ Header: Io,
4416
+ Section: Bo,
4378
4417
  KeyValueGrid: $,
4379
4418
  HeadersTable: Q,
4380
4419
  CodeBlock: X,
4381
- Metrics: Po
4420
+ Metrics: Lo
4382
4421
  };
4383
- function zo({ config: e, log: t, logId: n, onClose: r, onCopyJson: i, onNavigatePrev: a, onNavigateNext: o, onFilter: s, hasPrev: c, hasNext: l, showExpandToggle: u = !0, showNavigation: d = !0 }) {
4384
- let f = yo(e, t);
4422
+ function Ho({ config: e, log: t, logId: n, onClose: r, onCopyJson: i, onNavigatePrev: a, onNavigateNext: o, onFilter: s, hasPrev: c, hasNext: l, showExpandToggle: u = !0, showNavigation: d = !0 }) {
4423
+ let f = So(e, t);
4385
4424
  if (!f) return /* @__PURE__ */ j("div", {
4386
4425
  className: "flex items-center justify-center p-8 text-sm text-muted-foreground",
4387
4426
  children: "No detail view configured for this log type."
4388
4427
  });
4389
- if (f.type === "custom") return /* @__PURE__ */ j(A, { children: f.render(t, Ro) });
4390
- let p = bo(f, t);
4428
+ if (f.type === "custom") return /* @__PURE__ */ j(A, { children: f.render(t, Vo) });
4429
+ let p = Co(f, t);
4391
4430
  if (!p) return null;
4392
4431
  let m = e.contextChart;
4393
4432
  return /* @__PURE__ */ M(A, { children: [
4394
- /* @__PURE__ */ j(No, {
4433
+ /* @__PURE__ */ j(Io, {
4395
4434
  method: p.header.method(t),
4396
4435
  status: p.header.status(t),
4397
4436
  uri: p.header.uri(t),
@@ -4404,19 +4443,19 @@ function zo({ config: e, log: t, logId: n, onClose: r, onCopyJson: i, onNavigate
4404
4443
  hasNext: d ? l : !1,
4405
4444
  showExpandToggle: u
4406
4445
  }),
4407
- m && /* @__PURE__ */ j(wo, {
4446
+ m && /* @__PURE__ */ j(Do, {
4408
4447
  apiId: m.extractApiId(t),
4409
4448
  timestamp: m.extractTimestamp?.(t) ?? p.header.timestamp(t),
4410
4449
  metric: m.metric
4411
4450
  }),
4412
- p.metrics && p.metrics.length > 0 && /* @__PURE__ */ j(Po, { items: p.metrics.map((e) => ({
4451
+ p.metrics && p.metrics.length > 0 && /* @__PURE__ */ j(Lo, { items: p.metrics.map((e) => ({
4413
4452
  label: e.label,
4414
4453
  value: e.value(t),
4415
4454
  unit: e.unit
4416
4455
  })) }),
4417
- /* @__PURE__ */ j(Io, {
4456
+ /* @__PURE__ */ j(zo, {
4418
4457
  defaultValue: p.sections.find((e) => e.defaultOpen)?.title,
4419
- children: p.sections.map((e) => /* @__PURE__ */ j(Lo, {
4458
+ children: p.sections.map((e) => /* @__PURE__ */ j(Bo, {
4420
4459
  title: e.title,
4421
4460
  badge: e.badge?.(t),
4422
4461
  children: e.render(t, s)
@@ -4426,20 +4465,20 @@ function zo({ config: e, log: t, logId: n, onClose: r, onCopyJson: i, onNavigate
4426
4465
  }
4427
4466
  //#endregion
4428
4467
  //#region src/logs/detail/utils/clipboard.ts
4429
- function Bo(e) {
4468
+ function Uo(e) {
4430
4469
  navigator.clipboard.writeText(JSON.stringify(e, null, 2)).then(() => H.success("Full JSON copied to clipboard"), () => H.error("Failed to copy to clipboard"));
4431
4470
  }
4432
4471
  //#endregion
4433
4472
  //#region src/logs/detail/components/LogDetailDrawer.tsx
4434
- function Vo({ config: e, logId: t, onClose: n, onNavigatePrev: r, onNavigateNext: i, onFilter: a, hasPrev: o, hasNext: s }) {
4435
- let { data: c, isLoading: l, isError: u, isNotFound: d, isUnsupported: f, refetch: p } = dn({ id: t });
4436
- return /* @__PURE__ */ M(ko, {
4473
+ function Wo({ config: e, logId: t, onClose: n, onNavigatePrev: r, onNavigateNext: i, onFilter: a, hasPrev: o, hasNext: s }) {
4474
+ let { data: c, isLoading: l, isError: u, isNotFound: d, isUnsupported: f, refetch: p } = fn({ id: t });
4475
+ return /* @__PURE__ */ M(Mo, {
4437
4476
  open: !!t,
4438
4477
  onClose: n,
4439
4478
  onNavigatePrev: r,
4440
4479
  onNavigateNext: i,
4441
4480
  children: [
4442
- l && /* @__PURE__ */ j(Ho, {}),
4481
+ l && /* @__PURE__ */ j(Go, {}),
4443
4482
  f && /* @__PURE__ */ M("div", {
4444
4483
  className: "flex flex-col items-center justify-center gap-2 p-8 text-center text-muted-foreground",
4445
4484
  children: [/* @__PURE__ */ j("p", {
@@ -4476,13 +4515,13 @@ function Vo({ config: e, logId: t, onClose: n, onNavigatePrev: r, onNavigateNext
4476
4515
  })
4477
4516
  ]
4478
4517
  }),
4479
- c != null && /* @__PURE__ */ j(zo, {
4518
+ c != null && /* @__PURE__ */ j(Ho, {
4480
4519
  config: e,
4481
4520
  log: c,
4482
4521
  logId: t,
4483
4522
  onClose: n,
4484
4523
  onCopyJson: () => {
4485
- c && Bo(c);
4524
+ c && Uo(c);
4486
4525
  },
4487
4526
  onNavigatePrev: r,
4488
4527
  onNavigateNext: i,
@@ -4493,7 +4532,7 @@ function Vo({ config: e, logId: t, onClose: n, onNavigatePrev: r, onNavigateNext
4493
4532
  ]
4494
4533
  });
4495
4534
  }
4496
- function Ho() {
4535
+ function Go() {
4497
4536
  return /* @__PURE__ */ M("div", {
4498
4537
  className: "space-y-4 p-4",
4499
4538
  children: [
@@ -4521,8 +4560,8 @@ function Ho() {
4521
4560
  }
4522
4561
  //#endregion
4523
4562
  //#region src/logs/detail/components/LogDetailPage.tsx
4524
- function Uo({ config: e, onFilter: t }) {
4525
- let { logId: n } = Bt(), r = zt(), { data: i, isLoading: a, isError: o, isNotFound: s, isUnsupported: c, refetch: l } = dn({ id: n }), u = () => r(-1);
4563
+ function Ko({ config: e, onFilter: t }) {
4564
+ let { logId: n } = Bt(), r = zt(), { data: i, isLoading: a, isError: o, isNotFound: s, isUnsupported: c, refetch: l } = fn({ id: n }), u = () => r(-1);
4526
4565
  return a ? /* @__PURE__ */ M("div", {
4527
4566
  className: "space-y-4 p-6",
4528
4567
  children: [
@@ -4582,13 +4621,13 @@ function Uo({ config: e, onFilter: t }) {
4582
4621
  })
4583
4622
  }), /* @__PURE__ */ j(se, {
4584
4623
  className: "mx-6 mt-4 overflow-hidden",
4585
- children: /* @__PURE__ */ j(zo, {
4624
+ children: /* @__PURE__ */ j(Ho, {
4586
4625
  config: e,
4587
4626
  log: i,
4588
4627
  logId: n,
4589
4628
  onClose: u,
4590
4629
  onCopyJson: () => {
4591
- i && Bo(i);
4630
+ i && Uo(i);
4592
4631
  },
4593
4632
  onFilter: t,
4594
4633
  showExpandToggle: !1,
@@ -4599,27 +4638,27 @@ function Uo({ config: e, onFilter: t }) {
4599
4638
  }
4600
4639
  //#endregion
4601
4640
  //#region src/data-sources/filter-serialization.ts
4602
- var Wo = [
4641
+ var qo = [
4603
4642
  "eq",
4604
4643
  "in",
4605
4644
  "lte",
4606
4645
  "gte"
4607
4646
  ];
4608
- function Go(e) {
4609
- return Wo.includes(e);
4647
+ function Jo(e) {
4648
+ return qo.includes(e);
4610
4649
  }
4611
- var Ko = {
4650
+ var Yo = {
4612
4651
  eq: "EQ",
4613
4652
  in: "IN",
4614
4653
  lte: "LTE",
4615
4654
  gte: "GTE"
4616
4655
  };
4617
- function qo(e) {
4618
- if (!Go(e.operator)) throw Error(`[gamma-lib-observability] Filter operator "${e.operator}" on field "${e.field}" is not supported by the Gravitee Management v2 API. Supported operators: ${Wo.join(", ")}.`);
4656
+ function Xo(e) {
4657
+ if (!Jo(e.operator)) throw Error(`[gamma-lib-observability] Filter operator "${e.operator}" on field "${e.field}" is not supported by the Gravitee Management v2 API. Supported operators: ${qo.join(", ")}.`);
4619
4658
  let t = e.value[0];
4620
4659
  if (t === void 0) throw Error(`[gamma-lib-observability] Filter on field "${e.field}" with operator "${e.operator}" has no value — every supported operator requires at least one value.`);
4621
4660
  switch (e.operator) {
4622
- case "eq": return Jo(e, "eq", "in"), {
4661
+ case "eq": return Zo(e, "eq", "in"), {
4623
4662
  name: e.field,
4624
4663
  operator: "EQ",
4625
4664
  value: t
@@ -4631,11 +4670,11 @@ function qo(e) {
4631
4670
  };
4632
4671
  case "lte":
4633
4672
  case "gte": {
4634
- Jo(e, e.operator);
4635
- let n = Yo(e, t);
4673
+ Zo(e, e.operator);
4674
+ let n = Qo(e, t);
4636
4675
  return {
4637
4676
  name: e.field,
4638
- operator: Ko[e.operator],
4677
+ operator: Yo[e.operator],
4639
4678
  value: n
4640
4679
  };
4641
4680
  }
@@ -4645,57 +4684,66 @@ function qo(e) {
4645
4684
  }
4646
4685
  }
4647
4686
  }
4648
- function Jo(e, t, n) {
4687
+ function Zo(e, t, n) {
4649
4688
  if (e.value.length <= 1) return;
4650
4689
  let r = n ? ` Use "${n}" for multi-value membership.` : "";
4651
4690
  throw Error(`[gamma-lib-observability] Filter on field "${e.field}" with operator "${t}" received ${e.value.length} values; "${t}" expects a single value.${r}`);
4652
4691
  }
4653
- function Yo(e, t) {
4692
+ function Qo(e, t) {
4654
4693
  let n = t.trim();
4655
4694
  if (n === "") throw Error(`[gamma-lib-observability] Filter on field "${e.field}" with operator "${e.operator}" expects a numeric value but received an empty string.`);
4656
4695
  let r = Number(n);
4657
4696
  if (Number.isNaN(r)) throw Error(`[gamma-lib-observability] Filter on field "${e.field}" with operator "${e.operator}" expects a numeric value but received "${t}".`);
4658
4697
  return r;
4659
4698
  }
4660
- function Xo(e) {
4661
- if (e?.length) return e.map(qo);
4699
+ function $o(e) {
4700
+ if (e?.length) return e.map(Xo);
4662
4701
  }
4663
4702
  //#endregion
4664
4703
  //#region src/data-sources/http-utils.ts
4665
- function Zo(e) {
4704
+ function es(e) {
4666
4705
  if (e) return typeof e == "function" ? e() : e;
4667
4706
  }
4668
- function Qo(...e) {
4707
+ function ts(...e) {
4669
4708
  let t = new Headers();
4670
4709
  for (let n of e) n && new Headers(n).forEach((e, n) => t.set(n, e));
4671
4710
  return t;
4672
4711
  }
4673
4712
  //#endregion
4674
4713
  //#region src/data-sources/http-data-source.ts
4675
- var $o = {
4714
+ var ns = {
4676
4715
  name: "HTTP_REQUESTS",
4677
4716
  measures: [qt]
4678
4717
  };
4679
- function es(e) {
4718
+ function rs(e) {
4680
4719
  return e.metrics.map((e) => ({
4681
4720
  name: e.name,
4682
4721
  unit: e.unit,
4683
4722
  measures: e.measures ?? []
4684
4723
  }));
4685
4724
  }
4686
- function ts(e) {
4687
- let t = [];
4688
- for (let n of e.metrics) if (n.buckets) for (let e of n.buckets) {
4689
- let n = e.measures?.[0]?.value ?? 0;
4690
- t.push({
4691
- value: e.key,
4692
- label: e.name ?? e.key,
4693
- count: n
4725
+ function is(e, t = "", n = "") {
4726
+ let r = [];
4727
+ for (let i of e) {
4728
+ let e = t ? `${t} / ${i.key}` : i.key, a = n ? `${n} › ${i.name ?? i.key}` : i.name ?? i.key;
4729
+ if (i.type === "GROUP" && i.buckets?.length) {
4730
+ r.push(...is(i.buckets, e, a));
4731
+ continue;
4732
+ }
4733
+ r.push({
4734
+ value: e,
4735
+ label: a,
4736
+ count: i.measures?.[0]?.value ?? 0
4694
4737
  });
4695
4738
  }
4739
+ return r;
4740
+ }
4741
+ function as(e) {
4742
+ let t = [];
4743
+ for (let n of e.metrics) n.buckets && t.push(...is(n.buckets));
4696
4744
  return t;
4697
4745
  }
4698
- function ns(e) {
4746
+ function os(e) {
4699
4747
  let t = [];
4700
4748
  for (let n of e.metrics) if (n.buckets) if (n.buckets.some((e) => e.type === "GROUP" && e.buckets?.length)) {
4701
4749
  let e = /* @__PURE__ */ new Map();
@@ -4732,38 +4780,47 @@ function ns(e) {
4732
4780
  }
4733
4781
  return t;
4734
4782
  }
4735
- function rs(e) {
4783
+ function ss(e) {
4736
4784
  return {
4737
4785
  ...e,
4738
4786
  measures: e.measures?.length ? e.measures : [qt]
4739
4787
  };
4740
4788
  }
4741
- function is(e, t) {
4742
- let n = Zr(e.timeRange), r = { timeRange: {
4743
- from: new Date(n.from).toISOString(),
4744
- to: new Date(n.to).toISOString()
4745
- } }, i = Xo(e.filters);
4746
- return i && (r.filters = i), "metrics" in e && (r.metrics = e.metrics.map((e) => as(e))), "interval" in e && (r.interval = e.interval), "by" in e && e.by?.length && (r.by = e.by), "limit" in e && e.limit !== void 0 && (r.limit = e.limit), "field" in e && (r.by = [e.field], r.metrics = [{
4747
- name: t.name,
4748
- measures: t.measures
4749
- }]), r;
4750
- }
4751
- function as(e) {
4752
- let t = rs(e), n = {
4789
+ function cs(e) {
4790
+ let t = ds(e);
4791
+ return t.metrics = e.metrics.map(fs), t;
4792
+ }
4793
+ function ls(e) {
4794
+ let t = ds(e);
4795
+ return t.interval = e.interval, t.metrics = e.metrics.map(fs), e.by?.length && (t.by = e.by), e.ranges?.length && (t.ranges = e.ranges), e.limit !== void 0 && (t.limit = e.limit), t;
4796
+ }
4797
+ function us(e, t) {
4798
+ let n = ds(e);
4799
+ return n.by = e.by, n.metrics = (e.metrics?.length ? e.metrics : [t]).map(fs), e.ranges?.length && (n.ranges = e.ranges), e.limit !== void 0 && (n.limit = e.limit), n;
4800
+ }
4801
+ function ds(e) {
4802
+ let t = Qr(e.timeRange), n = { timeRange: {
4803
+ from: new Date(t.from).toISOString(),
4804
+ to: new Date(t.to).toISOString()
4805
+ } }, r = $o(e.filters);
4806
+ return r && (n.filters = r), n;
4807
+ }
4808
+ function fs(e) {
4809
+ let t = ss(e), n = {
4753
4810
  name: t.name,
4754
4811
  measures: t.measures
4755
- }, r = Xo(e.filters);
4812
+ }, r = $o(e.filters);
4756
4813
  return r && (n.filters = r), "sorts" in e && e.sorts?.length && (n.sorts = e.sorts), n;
4757
4814
  }
4758
- function os(e, t) {
4815
+ function ps(e, t) {
4759
4816
  let n = t?.fetch ?? globalThis.fetch.bind(globalThis), r = t?.credentials, i = {
4760
- name: t?.defaultFacetMetric?.name ?? $o.name,
4761
- measures: t?.defaultFacetMetric?.measures?.length ? [...t.defaultFacetMetric.measures] : [...$o.measures]
4817
+ name: t?.defaultFacetMetric?.name ?? ns.name,
4818
+ measures: t?.defaultFacetMetric?.measures?.length ? [...t.defaultFacetMetric.measures] : [...ns.measures]
4762
4819
  };
4763
4820
  async function a(i, a, o) {
4764
4821
  let s = {
4765
4822
  method: "POST",
4766
- headers: Qo({ "Content-Type": "application/json" }, Zo(t?.headers)),
4823
+ headers: ts({ "Content-Type": "application/json" }, es(t?.headers)),
4767
4824
  body: JSON.stringify(a),
4768
4825
  signal: o
4769
4826
  };
@@ -4774,19 +4831,19 @@ function os(e, t) {
4774
4831
  }
4775
4832
  return {
4776
4833
  async fetchTimeSeries(e) {
4777
- return ns(await a("/analytics/time-series", is(e, i), e.signal));
4834
+ return os(await a("/analytics/time-series", ls(e), e.signal));
4778
4835
  },
4779
4836
  async fetchFacets(e) {
4780
- return ts(await a("/analytics/facets", is(e, i), e.signal));
4837
+ return as(await a("/analytics/facets", us(e, i), e.signal));
4781
4838
  },
4782
4839
  async fetchMeasures(e) {
4783
- return es(await a("/analytics/measures", is(e, i), e.signal));
4840
+ return rs(await a("/analytics/measures", cs(e), e.signal));
4784
4841
  }
4785
4842
  };
4786
4843
  }
4787
4844
  //#endregion
4788
4845
  //#region src/data-sources/http-filter-source.ts
4789
- function ss(e) {
4846
+ function ms(e) {
4790
4847
  return {
4791
4848
  EQ: "eq",
4792
4849
  IN: "in",
@@ -4799,14 +4856,14 @@ function ss(e) {
4799
4856
  CONTAINS: "contains"
4800
4857
  }[e] ?? e.toLowerCase();
4801
4858
  }
4802
- function cs(e) {
4859
+ function hs(e) {
4803
4860
  return e === "ENUM" ? "enum" : "async";
4804
4861
  }
4805
- function ls(e, t) {
4862
+ function gs(e, t) {
4806
4863
  let n = t?.fetch ?? globalThis.fetch.bind(globalThis), r = t?.credentials;
4807
4864
  function i(e) {
4808
- let n = { ...e }, i = Zo(t?.headers);
4809
- return (e?.headers || i) && (n.headers = Qo(e?.headers, i)), r && (n.credentials = r), n;
4865
+ let n = { ...e }, i = es(t?.headers);
4866
+ return (e?.headers || i) && (n.headers = ts(e?.headers, i)), r && (n.credentials = r), n;
4810
4867
  }
4811
4868
  function a(t) {
4812
4869
  return async (r) => {
@@ -4832,7 +4889,7 @@ function ls(e, t) {
4832
4889
  let r = await n(`${e}/observability/filters/definition`, i({ signal: t }));
4833
4890
  if (!r.ok) throw Error(`[gamma-lib-observability] HTTP ${r.status} on GET filters/definition`);
4834
4891
  return (await r.json()).data.map((e) => {
4835
- let t = cs(e.type), n = e.operators.map(ss), r = e.apiTypes;
4892
+ let t = hs(e.type), n = e.operators.map(ms), r = e.apiTypes;
4836
4893
  if (t === "enum") {
4837
4894
  let i = (e.enumValues ?? []).map((e) => ({
4838
4895
  value: e,
@@ -4873,13 +4930,13 @@ function ls(e, t) {
4873
4930
  }
4874
4931
  //#endregion
4875
4932
  //#region src/data-sources/http-logs-source.ts
4876
- var us = "/logs/search", ds = 10 * 365.25 * 864e5;
4877
- function fs(e, t) {
4878
- let n = t?.fetch ?? globalThis.fetch.bind(globalThis), r = t?.credentials, i = t?.searchPath ?? us, a;
4933
+ var _s = "/logs/search", vs = 10 * 365.25 * 864e5;
4934
+ function ys(e, t) {
4935
+ let n = t?.fetch ?? globalThis.fetch.bind(globalThis), r = t?.credentials, i = t?.searchPath ?? _s, a;
4879
4936
  function o(e) {
4880
4937
  let n = {
4881
4938
  method: "POST",
4882
- headers: Qo({ "Content-Type": "application/json" }, e, Zo(t?.headers))
4939
+ headers: ts({ "Content-Type": "application/json" }, e, es(t?.headers))
4883
4940
  };
4884
4941
  return r && (n.credentials = r), n;
4885
4942
  }
@@ -4899,7 +4956,7 @@ function fs(e, t) {
4899
4956
  let r = {
4900
4957
  timeRange: c(a ?? {
4901
4958
  type: "absolute",
4902
- from: Date.now() - ds,
4959
+ from: Date.now() - vs,
4903
4960
  to: Date.now()
4904
4961
  }),
4905
4962
  filters: [{
@@ -4915,9 +4972,9 @@ function fs(e, t) {
4915
4972
  }
4916
4973
  return {
4917
4974
  async fetchLogs(e) {
4918
- let t = Zr(e.timeRange);
4975
+ let t = Qr(e.timeRange);
4919
4976
  a = t;
4920
- let r = Xo(e.filters), l = { timeRange: c(t) };
4977
+ let r = $o(e.filters), l = { timeRange: c(t) };
4921
4978
  r && (l.filters = r);
4922
4979
  let u = o();
4923
4980
  u.body = JSON.stringify(l), e.signal && (u.signal = e.signal);
@@ -4936,15 +4993,15 @@ function fs(e, t) {
4936
4993
  }
4937
4994
  //#endregion
4938
4995
  //#region src/routing/DashboardListPage.tsx
4939
- function ps({ templates: e }) {
4940
- let t = o(), n = D(() => oa(e, t), [e, t]), r = D(() => [{
4996
+ function bs({ templates: e }) {
4997
+ let t = o(), n = D(() => la(e, t), [e, t]), r = D(() => [{
4941
4998
  id: "name",
4942
4999
  accessorKey: "label",
4943
5000
  header: "Name",
4944
- cell: ({ row: e }) => /* @__PURE__ */ M(Ft, {
5001
+ cell: ({ row: e }) => /* @__PURE__ */ j(Ft, {
4945
5002
  to: `./${e.original.id}`,
4946
- className: "flex items-center gap-2 font-medium hover:underline",
4947
- children: [b(e.original.icon ?? ct, { className: "size-4 text-muted-foreground" }), e.original.label]
5003
+ className: "font-medium hover:underline",
5004
+ children: e.original.label
4948
5005
  })
4949
5006
  }, {
4950
5007
  id: "description",
@@ -4970,15 +5027,15 @@ function ps({ templates: e }) {
4970
5027
  }
4971
5028
  //#endregion
4972
5029
  //#region src/routing/ObservabilityDashboardPage.tsx
4973
- function ms(e) {
5030
+ function xs(e) {
4974
5031
  let [t] = Vt(), n = t.get("live");
4975
5032
  return /* @__PURE__ */ j(Xt, {
4976
5033
  config: { defaultEnabled: n === "1" || n === "true" },
4977
- children: /* @__PURE__ */ j(hs, { ...e })
5034
+ children: /* @__PURE__ */ j(Ss, { ...e })
4978
5035
  });
4979
5036
  }
4980
- function hs({ templates: e, scopeFilterField: t, externalLinks: n }) {
4981
- let { dashboardId: r } = Bt(), i = o(), a = Qt(), [, s] = Vt(), c = D(() => oa(e, i), [e, i]).find((e) => e.id === r), { timeRange: l, filters: u, setTimeRange: d, setFilters: f } = pa(), p = gn(u, tn()), m = a?.isLive ?? !1;
5037
+ function Ss({ templates: e, scopeFilterField: t, externalLinks: n }) {
5038
+ let { dashboardId: r } = Bt(), i = o(), a = Qt(), [, s] = Vt(), c = D(() => la(e, i), [e, i]).find((e) => e.id === r), { timeRange: l, filters: u, setTimeRange: d, setFilters: f } = ga(), p = _n(u, tn()), m = a?.isLive ?? !1;
4982
5039
  T(() => {
4983
5040
  s((e) => {
4984
5041
  let t = e.has("live");
@@ -4995,7 +5052,7 @@ function hs({ templates: e, scopeFilterField: t, externalLinks: n }) {
4995
5052
  }, [m, s]);
4996
5053
  let h = C((e) => {
4997
5054
  e.type === "absolute" && a?.isLive && a.toggle(), d(e);
4998
- }, [d, a]), g = D(() => c ? aa(c, { capabilities: i }) : null, [c, i]);
5055
+ }, [d, a]), g = D(() => c ? ca(c, { capabilities: i }) : null, [c, i]);
4999
5056
  return !c || !g ? /* @__PURE__ */ j("div", {
5000
5057
  className: "flex items-center justify-center p-8 text-muted-foreground",
5001
5058
  children: r ? `Dashboard "${r}" not found.` : "No dashboard available."
@@ -5011,7 +5068,7 @@ function hs({ templates: e, scopeFilterField: t, externalLinks: n }) {
5011
5068
  children: [
5012
5069
  /* @__PURE__ */ j("div", {
5013
5070
  className: "flex flex-1 items-center gap-2",
5014
- children: /* @__PURE__ */ j(Gr, {
5071
+ children: /* @__PURE__ */ j(Kr, {
5015
5072
  filters: p,
5016
5073
  onFiltersChange: f,
5017
5074
  scopeFilterField: t
@@ -5022,14 +5079,14 @@ function hs({ templates: e, scopeFilterField: t, externalLinks: n }) {
5022
5079
  className: "text-sm text-muted-foreground transition-colors hover:text-foreground",
5023
5080
  children: [e.label, " →"]
5024
5081
  }, e.label)),
5025
- /* @__PURE__ */ j(z, { children: /* @__PURE__ */ j(fa, {}) }),
5026
- /* @__PURE__ */ j(Bn, {
5082
+ /* @__PURE__ */ j(z, { children: /* @__PURE__ */ j(ha, {}) }),
5083
+ /* @__PURE__ */ j(Vn, {
5027
5084
  value: l,
5028
5085
  onChange: h
5029
5086
  })
5030
5087
  ]
5031
5088
  }),
5032
- /* @__PURE__ */ j(ea, {
5089
+ /* @__PURE__ */ j(ra, {
5033
5090
  dashboard: g,
5034
5091
  timeRange: l,
5035
5092
  filters: u
@@ -5039,17 +5096,17 @@ function hs({ templates: e, scopeFilterField: t, externalLinks: n }) {
5039
5096
  }
5040
5097
  //#endregion
5041
5098
  //#region src/routing/ObservabilityRoutes.tsx
5042
- var gs = [];
5043
- function _s({ children: e }) {
5099
+ var Cs = [];
5100
+ function ws({ children: e }) {
5044
5101
  let t = tn(), { data: n, isLoading: r, isError: i } = N({
5045
5102
  queryKey: ["observability", "filter-definitions"],
5046
5103
  queryFn: ({ signal: e }) => t.fetchFilterDefinitions(e),
5047
5104
  enabled: !!t,
5048
5105
  staleTime: 300 * 1e3
5049
5106
  });
5050
- return r ? /* @__PURE__ */ j(vs, {}) : i || !n ? /* @__PURE__ */ j(A, { children: e([]) }) : /* @__PURE__ */ j(A, { children: e(n) });
5107
+ return r ? /* @__PURE__ */ j(Ts, {}) : i || !n ? /* @__PURE__ */ j(A, { children: e([]) }) : /* @__PURE__ */ j(A, { children: e(n) });
5051
5108
  }
5052
- function vs() {
5109
+ function Ts() {
5053
5110
  return /* @__PURE__ */ M("div", {
5054
5111
  className: "flex items-center gap-2 p-4",
5055
5112
  children: [
@@ -5059,27 +5116,27 @@ function vs() {
5059
5116
  ]
5060
5117
  });
5061
5118
  }
5062
- function ys({ templates: e, contextFilters: t }) {
5063
- let n = o(), r = D(() => oa(e, n), [e, n]);
5119
+ function Es({ templates: e, contextFilters: t }) {
5120
+ let n = o(), r = D(() => la(e, n), [e, n]);
5064
5121
  return r.length === 1 && r[0] ? /* @__PURE__ */ j(It, {
5065
5122
  to: `./${r[0].id}`,
5066
5123
  replace: !0
5067
5124
  }) : /* @__PURE__ */ j(ln, {
5068
5125
  filters: t,
5069
- children: /* @__PURE__ */ j(ps, { templates: e })
5126
+ children: /* @__PURE__ */ j(bs, { templates: e })
5070
5127
  });
5071
5128
  }
5072
- function bs({ baseUrl: e, http: t, dataSource: i, filterProviders: a, logsPage: o, logsDataSource: s, logsColumns: l, logsOnRowClick: u, logsGetRowId: f, config: p }) {
5073
- let m = an(), g = t ?? m, _ = n(), v = D(() => os(e, g), [e, g]), y = i !== void 0 || _ === null, b = i ?? _ ?? v, x = D(() => ls(e, g), [e, g]), S = r(), C = D(() => p.features.logs?.enabled ? fs(e, g) : void 0, [
5129
+ function Ds({ baseUrl: e, http: t, dataSource: i, filterProviders: a, logsPage: o, logsDataSource: s, logsColumns: l, logsOnRowClick: u, logsGetRowId: f, config: p }) {
5130
+ let m = an(), g = t ?? m, _ = n(), v = D(() => ps(e, g), [e, g]), y = i !== void 0 || _ === null, b = i ?? _ ?? v, x = D(() => gs(e, g), [e, g]), S = r(), C = D(() => p.features.logs?.enabled ? ys(e, g) : void 0, [
5074
5131
  e,
5075
5132
  g,
5076
5133
  p.features.logs?.enabled
5077
- ]), w = s ?? S ?? C, T = s !== void 0 || S === null, E = p.features.dashboards, O = p.features.logs, k = E?.contextFilters ?? gs, ee = O?.contextFilters ?? gs, te = (e) => /* @__PURE__ */ j(h, {
5134
+ ]), w = s ?? S ?? C, T = s !== void 0 || S === null, E = p.features.dashboards, O = p.features.logs, k = E?.contextFilters ?? Cs, ee = O?.contextFilters ?? Cs, te = (e) => /* @__PURE__ */ j(h, {
5078
5135
  providers: e,
5079
5136
  children: /* @__PURE__ */ M(Rt, { children: [
5080
5137
  E?.enabled && /* @__PURE__ */ M(A, { children: [/* @__PURE__ */ j(Lt, {
5081
5138
  path: "dashboards",
5082
- element: /* @__PURE__ */ j(ys, {
5139
+ element: /* @__PURE__ */ j(Es, {
5083
5140
  templates: E.templates,
5084
5141
  contextFilters: k
5085
5142
  })
@@ -5087,7 +5144,7 @@ function bs({ baseUrl: e, http: t, dataSource: i, filterProviders: a, logsPage:
5087
5144
  path: "dashboards/:dashboardId",
5088
5145
  element: /* @__PURE__ */ j(ln, {
5089
5146
  filters: k,
5090
- children: /* @__PURE__ */ j(ms, {
5147
+ children: /* @__PURE__ */ j(xs, {
5091
5148
  templates: E.templates,
5092
5149
  scopeFilterField: E.scopeFilterField,
5093
5150
  externalLinks: E.externalLinks
@@ -5100,7 +5157,7 @@ function bs({ baseUrl: e, http: t, dataSource: i, filterProviders: a, logsPage:
5100
5157
  filters: ee,
5101
5158
  children: o ?? (w && l ? T ? /* @__PURE__ */ j(c, {
5102
5159
  dataSource: w,
5103
- children: /* @__PURE__ */ j(Ha, {
5160
+ children: /* @__PURE__ */ j(Ga, {
5104
5161
  columns: l,
5105
5162
  onRowClick: u,
5106
5163
  getRowId: f,
@@ -5108,7 +5165,7 @@ function bs({ baseUrl: e, http: t, dataSource: i, filterProviders: a, logsPage:
5108
5165
  scopeFilterField: O?.scopeFilterField,
5109
5166
  columnVisibilityStorageKey: O?.columnVisibilityStorageKey
5110
5167
  })
5111
- }) : /* @__PURE__ */ j(Ha, {
5168
+ }) : /* @__PURE__ */ j(Ga, {
5112
5169
  columns: l,
5113
5170
  onRowClick: u,
5114
5171
  getRowId: f,
@@ -5127,8 +5184,8 @@ function bs({ baseUrl: e, http: t, dataSource: i, filterProviders: a, logsPage:
5127
5184
  filters: ee,
5128
5185
  children: T ? /* @__PURE__ */ j(c, {
5129
5186
  dataSource: w,
5130
- children: /* @__PURE__ */ j(Uo, { config: O.logDetail })
5131
- }) : /* @__PURE__ */ j(Uo, { config: O.logDetail })
5187
+ children: /* @__PURE__ */ j(Ko, { config: O.logDetail })
5188
+ }) : /* @__PURE__ */ j(Ko, { config: O.logDetail })
5132
5189
  })
5133
5190
  }),
5134
5191
  /* @__PURE__ */ j(Lt, {
@@ -5147,7 +5204,7 @@ function bs({ baseUrl: e, http: t, dataSource: i, filterProviders: a, logsPage:
5147
5204
  ] })
5148
5205
  }), N = /* @__PURE__ */ j(en, {
5149
5206
  source: x,
5150
- children: a ? te(a) : /* @__PURE__ */ j(_s, { children: (e) => te(e) })
5207
+ children: a ? te(a) : /* @__PURE__ */ j(ws, { children: (e) => te(e) })
5151
5208
  });
5152
5209
  return y ? /* @__PURE__ */ j(d, {
5153
5210
  dataSource: b,
@@ -5156,22 +5213,22 @@ function bs({ baseUrl: e, http: t, dataSource: i, filterProviders: a, logsPage:
5156
5213
  }
5157
5214
  //#endregion
5158
5215
  //#region src/routing/define-observability-features.ts
5159
- var xs = {
5216
+ var Os = {
5160
5217
  dashboards: {
5161
- icon: ct,
5218
+ icon: $e,
5162
5219
  title: "Dashboards",
5163
5220
  order: 0
5164
5221
  },
5165
5222
  logs: {
5166
- icon: it,
5223
+ icon: at,
5167
5224
  title: "Logs",
5168
5225
  order: 1
5169
5226
  }
5170
5227
  };
5171
- function Ss(e) {
5172
- let t = e.basePath ?? "observe", n = Cs(e), r = ws(e, n, t), i = n.map((e) => `${t}/${e}`), a = Ts(n, t);
5228
+ function ks(e) {
5229
+ let t = e.basePath ?? "observe", n = As(e), r = js(e, n, t), i = n.map((e) => `${t}/${e}`), a = Ms(n, t);
5173
5230
  function o(t) {
5174
- return b(bs, {
5231
+ return b(Ds, {
5175
5232
  ...t,
5176
5233
  config: e
5177
5234
  });
@@ -5200,13 +5257,13 @@ function Ss(e) {
5200
5257
  breadcrumbSegments: c
5201
5258
  };
5202
5259
  }
5203
- function Cs(e) {
5260
+ function As(e) {
5204
5261
  let t = [];
5205
- return e.features.dashboards?.enabled && t.push("dashboards"), e.features.logs?.enabled && t.push("logs"), t.sort((e, t) => xs[e].order - xs[t].order);
5262
+ return e.features.dashboards?.enabled && t.push("dashboards"), e.features.logs?.enabled && t.push("logs"), t.sort((e, t) => Os[e].order - Os[t].order);
5206
5263
  }
5207
- function ws(e, t, n) {
5264
+ function js(e, t, n) {
5208
5265
  let r = t.map((t) => {
5209
- let r = xs[t], i = e.nav.overrides?.[t];
5266
+ let r = Os[t], i = e.nav.overrides?.[t];
5210
5267
  return {
5211
5268
  key: `${n}/${t}`,
5212
5269
  title: i?.title ?? r.title,
@@ -5218,10 +5275,10 @@ function ws(e, t, n) {
5218
5275
  items: r
5219
5276
  };
5220
5277
  }
5221
- function Ts(e, t) {
5278
+ function Ms(e, t) {
5222
5279
  let n = {};
5223
5280
  for (let r of e) {
5224
- let e = xs[r], i = `${t}/${r}`;
5281
+ let e = Os[r], i = `${t}/${r}`;
5225
5282
  n[i] = {
5226
5283
  path: `${t}/${r}`,
5227
5284
  label: e.title
@@ -5230,4 +5287,4 @@ function Ts(e, t) {
5230
5287
  return n;
5231
5288
  }
5232
5289
  //#endregion
5233
- export { ci as BarPresentation, Tn as CODEC_VERSION, l as CapabilityProvider, Ci as CartesianPresentation, ln as ContextFiltersProvider, xi as DASHBOARD_BUCKET_TARGET, e as DEFAULT_CAPABILITIES, qt as DEFAULT_MEASURE, vn as DEFAULT_PERIOD, Jt as DEFAULT_REFRESH_INTERVAL_MS, W as DEFAULT_STALE_TIME, En as DEFAULT_TIME_RANGE, i as DashboardPersistenceProvider, ca as DashboardTemplatesProvider, ea as DashboardView, Di as DoughnutPresentation, _ as FILTER_OPERATORS, Gr as FilterBar, Ir as FilterChip, Or as FilterPopoverForm, h as FilterProvidersProvider, ui as HTTP_STATUS_PALETTE, rn as HttpProvider, fa as LiveIndicator, Xt as LiveRefreshProvider, X as LogDetailCodeBlock, wo as LogDetailContextChart, Vo as LogDetailDrawer, ko as LogDetailDrawerShell, Z as LogDetailEmptyField, No as LogDetailHeader, Q as LogDetailHeadersTable, Ya as LogDetailJsonTree, $ as LogDetailKeyValueGrid, Po as LogDetailMetrics, Uo as LogDetailPage, Lo as LogDetailSection, Io as LogDetailSections, ga as LogSeverityBadge, Ea as LogTable, c as LogsDataSourceProvider, Ha as LogsExplorerPage, Ri as MetricGroupPresentation, Vi as MetricPresentation, d as MetricsDataSourceProvider, Sn as PERIOD_DISPLAY_LABELS, xn as PERIOD_LABELS, yn as PRESET_CATEGORIES, bn as RELATIVE_PERIODS, Bn as TimeRangePicker, s as TracesDataSourceProvider, ra as WidgetGroup, Xi as WidgetItem, Mr as buildChipLabel, Nr as buildChipLabelParts, Pr as buildChipTooltip, Ka as buildDefaultConnectionLogColumns, xo as buildDefaultLogDetailConfig, Ua as buildLogsDeepLink, Ki as clearWidgetRenderers, Si as computeBucketInterval, Li as computePreviousTimeRange, ji as computeTrend, $a as connectionLogPreset, os as createHttpDataSource, ls as createHttpFilterSource, fs as createHttpLogsSource, jn as decodeObservabilityState, ia as defineDashboardTemplate, Yn as defineFilterProvider, vo as defineLogDetail, Ss as defineObservabilityFeatures, An as encodeObservabilityState, ki as extractMeasureValue, Mi as extractSparklineData, ni as facetsToBar, ti as facetsToDoughnut, Vn as getLocaleWeekStart, Gi as getWidgetRenderer, Wt as isBarWidget, Ht as isCartesianWidget, Ut as isDoughnutWidget, Kt as isMetricGroupWidget, Gt as isMetricWidget, br as isMultiSelectForFilter, Ai as measureResultToMetric, q as mergeFilters, hi as mergeTimeSeriesToCartesian, ao as messageLogPreset, xr as normalizeMembershipOperatorForValues, K as observabilityQueryKeys, _r as operatorLabel, vr as operatorNeedsValue, Ji as registerDefaultRenderers, Wi as registerWidgetRenderer, aa as resolveDashboardFromTemplate, fi as resolveGroupColor, yo as resolveLogDetailVariant, U as resolveMeasure, bo as resolvePreset, Jn as resolveRelativePeriod, Zr as resolveStableTimeRange, o as useCapabilities, a as useCapability, J as useContextFilters, f as useDashboardPersistence, ua as useDashboardTemplate, la as useDashboardTemplates, un as useFacetsQuery, u as useFilterProvider, p as useFilterProviders, an as useHttpOptions, Zt as useLiveRefresh, Eo as useLogDetailDrawerExpand, dn as useLogDetailQuery, g as useLogsDataSource, mn as useLogsPagedQuery, fn as useLogsQuery, hn as useMeasuresQuery, ri as useMergedWidgetFilters, m as useMetricsDataSource, Qt as useOptionalLiveRefresh, r as useOptionalLogsDataSource, n as useOptionalMetricsDataSource, Y as useStableTimeRange, _n as useTimeSeriesQuery, t as useTracesDataSource, Yr as useWidgetGroupContext, uo as webhookLogPreset };
5290
+ export { li as BarPresentation, En as CODEC_VERSION, l as CapabilityProvider, wi as CartesianPresentation, ln as ContextFiltersProvider, Si as DASHBOARD_BUCKET_TARGET, e as DEFAULT_CAPABILITIES, qt as DEFAULT_MEASURE, yn as DEFAULT_PERIOD, Jt as DEFAULT_REFRESH_INTERVAL_MS, W as DEFAULT_STALE_TIME, Dn as DEFAULT_TIME_RANGE, i as DashboardPersistenceProvider, da as DashboardTemplatesProvider, ra as DashboardView, Oi as DoughnutPresentation, _ as FILTER_OPERATORS, Kr as FilterBar, Lr as FilterChip, kr as FilterPopoverForm, h as FilterProvidersProvider, di as HTTP_STATUS_PALETTE, rn as HttpProvider, ha as LiveIndicator, Xt as LiveRefreshProvider, X as LogDetailCodeBlock, Do as LogDetailContextChart, Wo as LogDetailDrawer, Mo as LogDetailDrawerShell, Z as LogDetailEmptyField, Io as LogDetailHeader, Q as LogDetailHeadersTable, Qa as LogDetailJsonTree, $ as LogDetailKeyValueGrid, Lo as LogDetailMetrics, Ko as LogDetailPage, Bo as LogDetailSection, zo as LogDetailSections, ya as LogSeverityBadge, ka as LogTable, c as LogsDataSourceProvider, Ga as LogsExplorerPage, zi as MetricGroupPresentation, Wi as MetricPresentation, d as MetricsDataSourceProvider, Cn as PERIOD_DISPLAY_LABELS, Sn as PERIOD_LABELS, bn as PRESET_CATEGORIES, xn as RELATIVE_PERIODS, Vn as TimeRangePicker, s as TracesDataSourceProvider, oa as WidgetGroup, $i as WidgetItem, Nr as buildChipLabel, Pr as buildChipLabelParts, Fr as buildChipTooltip, Ya as buildDefaultConnectionLogColumns, wo as buildDefaultLogDetailConfig, Ka as buildLogsDeepLink, Yi as clearWidgetRenderers, Ci as computeBucketInterval, Ri as computePreviousTimeRange, Mi as computeTrend, no as connectionLogPreset, ps as createHttpDataSource, gs as createHttpFilterSource, ys as createHttpLogsSource, Mn as decodeObservabilityState, sa as defineDashboardTemplate, Xn as defineFilterProvider, xo as defineLogDetail, ks as defineObservabilityFeatures, jn as encodeObservabilityState, Ai as extractMeasureValue, Ni as extractSparklineData, ri as facetsToBar, ni as facetsToDoughnut, Hn as getLocaleWeekStart, Ji as getWidgetRenderer, Wt as isBarWidget, Ht as isCartesianWidget, Ut as isDoughnutWidget, Kt as isMetricGroupWidget, Gt as isMetricWidget, xr as isMultiSelectForFilter, ji as measureResultToMetric, q as mergeFilters, gi as mergeTimeSeriesToCartesian, co as messageLogPreset, Sr as normalizeMembershipOperatorForValues, K as observabilityQueryKeys, vr as operatorLabel, yr as operatorNeedsValue, Zi as registerDefaultRenderers, qi as registerWidgetRenderer, ca as resolveDashboardFromTemplate, pi as resolveGroupColor, So as resolveLogDetailVariant, U as resolveMeasure, Co as resolvePreset, Yn as resolveRelativePeriod, Qr as resolveStableTimeRange, o as useCapabilities, a as useCapability, J as useContextFilters, f as useDashboardPersistence, pa as useDashboardTemplate, fa as useDashboardTemplates, dn as useFacetsQuery, u as useFilterProvider, p as useFilterProviders, an as useHttpOptions, Zt as useLiveRefresh, ko as useLogDetailDrawerExpand, fn as useLogDetailQuery, g as useLogsDataSource, hn as useLogsPagedQuery, pn as useLogsQuery, gn as useMeasuresQuery, ii as useMergedWidgetFilters, m as useMetricsDataSource, Qt as useOptionalLiveRefresh, r as useOptionalLogsDataSource, n as useOptionalMetricsDataSource, Y as useStableTimeRange, vn as useTimeSeriesQuery, t as useTracesDataSource, Xr as useWidgetGroupContext, mo as webhookLogPreset };