adonisjs-server-stats 1.9.0 → 1.10.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 (80) hide show
  1. package/dist/core/index.js +24 -22
  2. package/dist/core/split-pane.d.ts +18 -0
  3. package/dist/core/trace-utils.d.ts +5 -0
  4. package/dist/core/types.d.ts +1 -1
  5. package/dist/react/{CacheSection-xH75hwXu.js → CacheSection-UCMptWyn.js} +1 -1
  6. package/dist/react/{CacheTab-DYmsZJJ1.js → CacheTab-CA8LB1J5.js} +1 -1
  7. package/dist/react/{ConfigSection-D8BO1Ry9.js → ConfigSection-DfFd-WRq.js} +1 -1
  8. package/dist/react/{ConfigTab-CcN-tfjv.js → ConfigTab-Bdg8YMer.js} +1 -1
  9. package/dist/react/{CustomPaneTab-D7_o3Ec6.js → CustomPaneTab-Bxtv_8Rw.js} +1 -1
  10. package/dist/react/{EmailsSection-BzlsTdPs.js → EmailsSection-CM7stSyh.js} +1 -1
  11. package/dist/react/{EmailsTab-Uh2CQY3o.js → EmailsTab-BDhEiomM.js} +1 -1
  12. package/dist/react/{EventsSection-CGQWiIdV.js → EventsSection-ByQ-9blq.js} +1 -1
  13. package/dist/react/{EventsTab-CC6DQzEm.js → EventsTab-CMfY98Rl.js} +1 -1
  14. package/dist/react/{JobsSection-D7AHQmZi.js → JobsSection-DF3qEv9O.js} +1 -1
  15. package/dist/react/{JobsTab-B3Lfdqed.js → JobsTab-BbrBWIOb.js} +1 -1
  16. package/dist/react/{LogsSection-Cly1dpvS.js → LogsSection-DcFTZY7b.js} +1 -1
  17. package/dist/react/{LogsTab-BbYK-iyh.js → LogsTab-CicucmVk.js} +2 -2
  18. package/dist/react/{OverviewSection-CkBGFEWq.js → OverviewSection-C4T1ur51.js} +1 -1
  19. package/dist/react/{QueriesSection-CfCpnNUD.js → QueriesSection-PswteoF9.js} +1 -1
  20. package/dist/react/{QueriesTab-DbBmAqzO.js → QueriesTab-osLUWd4L.js} +1 -1
  21. package/dist/react/RelatedLogs-DFDOyUMr.js +40 -0
  22. package/dist/react/RequestsSection-Nag30rEA.js +341 -0
  23. package/dist/react/{RoutesSection-CRqF-cNM.js → RoutesSection-BUSkM6PY.js} +1 -1
  24. package/dist/react/{RoutesTab-Bwreij3e.js → RoutesTab-DgVzd2PZ.js} +1 -1
  25. package/dist/react/TimelineTab-Covg5weo.js +220 -0
  26. package/dist/react/{index-CecA4IdQ.js → index-Cflz9Ebj.js} +197 -203
  27. package/dist/react/index.js +1 -1
  28. package/dist/react/react/components/shared/RelatedLogs.d.ts +7 -0
  29. package/dist/react/style.css +1 -1
  30. package/dist/src/controller/debug_controller.js +1 -1
  31. package/dist/src/dashboard/dashboard_controller.js +13 -0
  32. package/dist/src/dashboard/dashboard_store.d.ts +1 -0
  33. package/dist/src/dashboard/dashboard_store.js +88 -41
  34. package/dist/src/dashboard/migrator.js +6 -0
  35. package/dist/src/data/data_access.d.ts +7 -0
  36. package/dist/src/data/data_access.js +32 -1
  37. package/dist/src/debug/trace_collector.d.ts +1 -1
  38. package/dist/src/debug/trace_collector.js +2 -1
  39. package/dist/src/debug/types.d.ts +4 -0
  40. package/dist/src/edge/client/dashboard.js +2 -2
  41. package/dist/src/edge/client/debug-panel-deferred.js +1 -1
  42. package/dist/src/edge/client-vue/dashboard.js +4 -4
  43. package/dist/src/edge/client-vue/debug-panel-deferred.js +3 -3
  44. package/dist/src/middleware/request_tracking_middleware.d.ts +1 -0
  45. package/dist/src/middleware/request_tracking_middleware.js +3 -1
  46. package/dist/src/provider/server_stats_provider.d.ts +3 -3
  47. package/dist/src/provider/server_stats_provider.js +29 -15
  48. package/dist/src/routes/register_routes.js +7 -2
  49. package/dist/src/styles/components.css +81 -0
  50. package/dist/src/styles/debug-panel.css +9 -0
  51. package/dist/src/types.d.ts +1 -1
  52. package/dist/vue/{CacheSection-Cx-hj09X.js → CacheSection-oFAJL3mo.js} +1 -1
  53. package/dist/vue/{ConfigSection-CMXyryf6.js → ConfigSection-BhfJ4KqL.js} +1 -1
  54. package/dist/vue/{EmailsSection-DgKl9xGT.js → EmailsSection-BcNyhyHs.js} +1 -1
  55. package/dist/vue/{EventsSection-BNMCAim1.js → EventsSection-r60Q5Lmu.js} +1 -1
  56. package/dist/vue/{JobsSection-CCMgMlxd.js → JobsSection-BHL-hkQw.js} +1 -1
  57. package/dist/vue/{LogsSection-CvOnTxUu.js → LogsSection-DRMGzJmg.js} +1 -1
  58. package/dist/vue/{OverviewSection-CHgaKtUR.js → OverviewSection-CXh6Ja1B.js} +1 -1
  59. package/dist/vue/{QueriesSection-BnHRD98z.js → QueriesSection-IodIsCJ-.js} +1 -1
  60. package/dist/vue/RelatedLogs.vue_vue_type_script_setup_true_lang-CB2_TzYW.js +84 -0
  61. package/dist/vue/RequestsSection-BPuMdmMc.js +401 -0
  62. package/dist/vue/{RoutesSection-BrceOcKQ.js → RoutesSection-NKo3Rbq3.js} +1 -1
  63. package/dist/vue/TimelineTab-zj5Z5OdT.js +338 -0
  64. package/dist/vue/components/Dashboard/sections/RequestsSection.vue.d.ts +4 -0
  65. package/dist/vue/components/DebugPanel/tabs/TimelineTab.vue.d.ts +4 -0
  66. package/dist/vue/components/{Dashboard/sections/TimelineSection.vue.d.ts → shared/RelatedLogs.vue.d.ts} +5 -6
  67. package/dist/vue/index-Dtgysd26.js +1229 -0
  68. package/dist/vue/index.js +1 -1
  69. package/dist/vue/style.css +1 -1
  70. package/package.json +1 -1
  71. package/dist/react/RequestsSection-Cb5a6MlT.js +0 -209
  72. package/dist/react/TimelineSection-B2y06kRE.js +0 -158
  73. package/dist/react/TimelineTab-6hthfdBB.js +0 -193
  74. package/dist/react/WaterfallChart-Cj73WdfM.js +0 -100
  75. package/dist/react/react/components/Dashboard/sections/TimelineSection.d.ts +0 -8
  76. package/dist/vue/RequestsSection-B-uSlM0f.js +0 -243
  77. package/dist/vue/TimelineSection-CfvnA2Oo.js +0 -186
  78. package/dist/vue/TimelineTab-Db6lKKsD.js +0 -250
  79. package/dist/vue/WaterfallChart.vue_vue_type_script_setup_true_lang-tZ13cNj1.js +0 -118
  80. package/dist/vue/index-oLxS08vN.js +0 -1235
@@ -1,16 +1,16 @@
1
1
  import { jsx as e, jsxs as l, Fragment as H } from "react/jsx-runtime";
2
- import K, { useState as y, useRef as j, useEffect as R, useCallback as B, useMemo as O, Suspense as F, lazy as T } from "react";
3
- import { DEFAULT_FEATURES as G, detectFeatures as Q, ServerStatsController as X, getTheme as Y, onThemeChange as Z, toggleTheme as ee, buildSparklineData as se, computeStats as te, formatStatNum as U, detectMetricGroupsFromStats as ne, getVisibleMetricGroups as oe, METRIC_DEFINITIONS as ie, TAB_ICONS as L, DashboardDataController as re, subscribeToChannel as ae, DebugDataController as le, compactPreview as ce } from "adonisjs-server-stats/core";
4
- import { createPortal as de } from "react-dom";
2
+ import V, { useState as y, useRef as j, useEffect as R, useCallback as B, useMemo as O, Suspense as F, lazy as T } from "react";
3
+ import { DEFAULT_FEATURES as K, detectFeatures as G, ServerStatsController as Q, getTheme as X, onThemeChange as Y, toggleTheme as Z, buildSparklineData as ee, computeStats as se, formatStatNum as U, detectMetricGroupsFromStats as te, getVisibleMetricGroups as ne, METRIC_DEFINITIONS as oe, TAB_ICONS as L, DashboardDataController as re, subscribeToChannel as ie, DebugDataController as ae, compactPreview as le } from "adonisjs-server-stats/core";
4
+ import { createPortal as ce } from "react-dom";
5
5
  function z(s = {}) {
6
- const { baseUrl: r = "", debugEndpoint: t = "/admin/api/debug", authToken: o } = s, [a, d] = y(G), [g, n] = y(!0), [v, p] = y(null), h = j(!1);
6
+ const { baseUrl: i = "", debugEndpoint: t = "/admin/api/debug", authToken: o } = s, [a, d] = y(K), [g, n] = y(!0), [v, p] = y(null), h = j(!1);
7
7
  return R(() => {
8
8
  if (h.current) return;
9
9
  h.current = !0;
10
10
  let u = !1;
11
11
  return (async () => {
12
12
  try {
13
- const f = await Q({ baseUrl: r, debugEndpoint: t, authToken: o });
13
+ const f = await G({ baseUrl: i, debugEndpoint: t, authToken: o });
14
14
  u || (d(f), n(!1));
15
15
  } catch (f) {
16
16
  u || (p(f instanceof Error ? f : new Error(String(f))), n(!1));
@@ -18,20 +18,20 @@ function z(s = {}) {
18
18
  })(), () => {
19
19
  u = !0;
20
20
  };
21
- }, [r, t, o]), { features: a, isLoading: g, error: v };
21
+ }, [i, t, o]), { features: a, isLoading: g, error: v };
22
22
  }
23
- function ue(s = {}) {
23
+ function de(s = {}) {
24
24
  const {
25
- baseUrl: r = "",
25
+ baseUrl: i = "",
26
26
  endpoint: t = "/admin/api/server-stats",
27
27
  channelName: o = "admin/server-stats",
28
28
  authToken: a,
29
29
  pollInterval: d = 3e3
30
- } = s, [g, n] = y(null), [v, p] = y(!1), [h, u] = y(!1), [w, f] = y(null), [m, k] = y(!1), E = j(null);
30
+ } = s, [g, n] = y(null), [v, p] = y(!1), [h, u] = y(!1), [w, f] = y(null), [b, k] = y(!1), E = j(null);
31
31
  R(() => {
32
- if (m) return;
33
- const I = new X({
34
- baseUrl: r,
32
+ if (b) return;
33
+ const I = new Q({
34
+ baseUrl: i,
35
35
  endpoint: t,
36
36
  channelName: o,
37
37
  authToken: a,
@@ -45,7 +45,7 @@ function ue(s = {}) {
45
45
  return E.current = I, I.start(), () => {
46
46
  I.stop(), E.current = null;
47
47
  };
48
- }, [r, o, a, d, m]);
48
+ }, [i, o, a, d, b]);
49
49
  const _ = B((I) => E.current?.getHistory(I) ?? [], []);
50
50
  return {
51
51
  stats: g,
@@ -54,31 +54,31 @@ function ue(s = {}) {
54
54
  isConnected: v,
55
55
  isStale: h,
56
56
  error: w,
57
- unauthorized: m
57
+ unauthorized: b
58
58
  };
59
59
  }
60
60
  function A() {
61
- const [s, r] = y(() => Y());
62
- R(() => Z((a) => {
63
- r(a);
61
+ const [s, i] = y(() => X());
62
+ R(() => Y((a) => {
63
+ i(a);
64
64
  }), []);
65
65
  const t = B(() => {
66
- const o = ee();
67
- return r(o), o;
66
+ const o = Z();
67
+ return i(o), o;
68
68
  }, []);
69
69
  return { theme: s, toggleTheme: t };
70
70
  }
71
- function he({
71
+ function ue({
72
72
  data: s,
73
- color: r = "#34d399",
73
+ color: i = "#34d399",
74
74
  width: t = 120,
75
75
  height: o = 32,
76
76
  className: a = ""
77
77
  }) {
78
78
  const d = O(
79
- () => se(s, { width: t, height: o }),
79
+ () => ee(s, { width: t, height: o }),
80
80
  [s, t, o]
81
- ), g = O(() => "ss-grad-" + Math.random().toString(36).slice(2, 8), []), n = { "--ss-accent": r };
81
+ ), g = O(() => "ss-grad-" + Math.random().toString(36).slice(2, 8), []), n = { "--ss-accent": i };
82
82
  if (!d)
83
83
  return /* @__PURE__ */ e("div", { className: `ss-dash-sparkline ${a}`, style: n, children: /* @__PURE__ */ e(
84
84
  "svg",
@@ -93,7 +93,7 @@ function he({
93
93
  ] })
94
94
  }
95
95
  ) });
96
- const v = r || "var(--ss-accent)";
96
+ const v = i || "var(--ss-accent)";
97
97
  return /* @__PURE__ */ e("div", { className: `ss-dash-sparkline ${a}`, style: n, children: /* @__PURE__ */ l(
98
98
  "svg",
99
99
  {
@@ -123,13 +123,13 @@ function he({
123
123
  }
124
124
  ) });
125
125
  }
126
- const pe = {
126
+ const he = {
127
127
  "ss-red": "#f87171",
128
128
  "ss-amber": "#fbbf24",
129
129
  "ss-green": "#34d399",
130
130
  "ss-muted": "#737373"
131
131
  };
132
- function me(s, r, t) {
132
+ function pe(s, i, t) {
133
133
  const [o, a] = y({
134
134
  position: "absolute",
135
135
  bottom: "100%",
@@ -140,7 +140,7 @@ function me(s, r, t) {
140
140
  return R(() => {
141
141
  if (!t) return;
142
142
  const d = () => {
143
- const n = s.current, v = r.current;
143
+ const n = s.current, v = i.current;
144
144
  if (!n || !v) return;
145
145
  const p = n.closest(".ss-bar");
146
146
  if (!p) return;
@@ -154,10 +154,10 @@ function me(s, r, t) {
154
154
  zIndex: 180
155
155
  }), requestAnimationFrame(() => {
156
156
  const f = v.getBoundingClientRect();
157
- let m = 0;
158
- f.left < 8 ? m = 8 - f.left : f.right > window.innerWidth - 8 && (m = window.innerWidth - 8 - f.right), m && a((k) => ({
157
+ let b = 0;
158
+ f.left < 8 ? b = 8 - f.left : f.right > window.innerWidth - 8 && (b = window.innerWidth - 8 - f.right), b && a((k) => ({
159
159
  ...k,
160
- transform: `translateX(calc(-50% + ${m}px))`
160
+ transform: `translateX(calc(-50% + ${b}px))`
161
161
  }));
162
162
  });
163
163
  };
@@ -166,28 +166,28 @@ function me(s, r, t) {
166
166
  return g?.addEventListener("scroll", d), window.addEventListener("resize", d), () => {
167
167
  g?.removeEventListener("scroll", d), window.removeEventListener("resize", d);
168
168
  };
169
- }, [t, s, r]), o;
169
+ }, [t, s, i]), o;
170
170
  }
171
- function be({ metric: s, stats: r, history: t, className: o = "" }) {
171
+ function be({ metric: s, stats: i, history: t, className: o = "" }) {
172
172
  const [a, d] = y(!1), [g, n] = y(!1), v = j(null), p = j(null);
173
- if (s.show && !s.show(r))
173
+ if (s.show && !s.show(i))
174
174
  return null;
175
- const h = s.value ? s.value(r) : s.format(r), u = s.color ? s.color(r) : "", w = u && pe[u] || "#34d399", f = typeof s.detail == "function" ? s.detail(r) : s.detail, m = O(() => te(t), [t]), k = a || g, E = me(v, p, k), _ = B(($) => {
176
- $.stopPropagation(), d((i) => !i);
175
+ const h = s.value ? s.value(i) : s.format(i), u = s.color ? s.color(i) : "", w = u && he[u] || "#34d399", f = typeof s.detail == "function" ? s.detail(i) : s.detail, b = O(() => se(t), [t]), k = a || g, E = pe(v, p, k), _ = B(($) => {
176
+ $.stopPropagation(), d((r) => !r);
177
177
  }, []);
178
178
  R(() => {
179
179
  if (!a) return;
180
- const $ = (b) => {
181
- const x = b.target;
180
+ const $ = (m) => {
181
+ const x = m.target;
182
182
  v.current && !v.current.contains(x) && p.current && !p.current.contains(x) && d(!1);
183
- }, i = (b) => {
184
- b.key === "Escape" && d(!1);
183
+ }, r = (m) => {
184
+ m.key === "Escape" && d(!1);
185
185
  };
186
- return document.addEventListener("click", $), document.addEventListener("keydown", i), () => {
187
- document.removeEventListener("click", $), document.removeEventListener("keydown", i);
186
+ return document.addEventListener("click", $), document.addEventListener("keydown", r), () => {
187
+ document.removeEventListener("click", $), document.removeEventListener("keydown", r);
188
188
  };
189
189
  }, [a]);
190
- const I = v.current?.closest(".ss-bar"), C = k && I ? de(
190
+ const I = v.current?.closest(".ss-bar"), C = k && I ? ce(
191
191
  /* @__PURE__ */ l(
192
192
  "div",
193
193
  {
@@ -215,23 +215,23 @@ function be({ metric: s, stats: r, history: t, className: o = "" }) {
215
215
  /* @__PURE__ */ e("span", { className: "ss-tooltip-current-label", children: "Current: " }),
216
216
  /* @__PURE__ */ e("span", { className: "ss-tooltip-current-value", children: h })
217
217
  ] }),
218
- m && /* @__PURE__ */ l("div", { className: "ss-tooltip-stats", children: [
218
+ b && /* @__PURE__ */ l("div", { className: "ss-tooltip-stats", children: [
219
219
  /* @__PURE__ */ l("span", { children: [
220
220
  "Min: ",
221
- U(m.min, s.unit)
221
+ U(b.min, s.unit)
222
222
  ] }),
223
223
  /* @__PURE__ */ l("span", { children: [
224
224
  "Max: ",
225
- U(m.max, s.unit)
225
+ U(b.max, s.unit)
226
226
  ] }),
227
227
  /* @__PURE__ */ l("span", { children: [
228
228
  "Avg: ",
229
- U(m.avg, s.unit)
229
+ U(b.avg, s.unit)
230
230
  ] })
231
231
  ] }),
232
232
  f && /* @__PURE__ */ e("div", { className: "ss-tooltip-details", children: f }),
233
233
  t.length > 0 && /* @__PURE__ */ l(H, { children: [
234
- /* @__PURE__ */ e("div", { className: "ss-tooltip-sparkline", children: /* @__PURE__ */ e(he, { data: t, color: w }) }),
234
+ /* @__PURE__ */ e("div", { className: "ss-tooltip-sparkline", children: /* @__PURE__ */ e(ue, { data: t, color: w }) }),
235
235
  /* @__PURE__ */ l("div", { className: "ss-tooltip-samples", children: [
236
236
  "Last ",
237
237
  Math.min(t.length, 60),
@@ -268,59 +268,59 @@ function be({ metric: s, stats: r, history: t, className: o = "" }) {
268
268
  C
269
269
  ] });
270
270
  }
271
- function We(s) {
271
+ function ze(s) {
272
272
  const {
273
- featureOptions: r,
273
+ featureOptions: i,
274
274
  autoHideOnUnauthorized: t = !0,
275
275
  onOpenDebugPanel: o,
276
276
  debugPanelOpen: a = !1,
277
277
  onConnectionChange: d,
278
278
  ...g
279
- } = s, { stats: n, getHistory: v, isConnected: p, isStale: h, unauthorized: u } = ue(g);
279
+ } = s, { stats: n, getHistory: v, isConnected: p, isStale: h, unauthorized: u } = de(g);
280
280
  R(() => {
281
281
  d?.(p);
282
282
  }, [p, d]);
283
- const { features: w } = z(r), { theme: f } = A(), [m, k] = y(() => typeof window > "u" ? !0 : localStorage.getItem("admin:stats-bar") !== "hidden"), E = j(null), _ = j(null);
283
+ const { features: w } = z(i), { theme: f } = A(), [b, k] = y(() => typeof window > "u" ? !0 : localStorage.getItem("admin:stats-bar") !== "hidden"), E = j(null), _ = j(null);
284
284
  R(() => {
285
285
  t && u && k(!1);
286
286
  }, [t, u]);
287
287
  const I = B(() => {
288
- k((b) => {
289
- const x = !b;
288
+ k((m) => {
289
+ const x = !m;
290
290
  return localStorage.setItem("admin:stats-bar", x ? "visible" : "hidden"), x;
291
291
  });
292
292
  }, []);
293
293
  R(() => {
294
- const b = _.current;
295
- if (!b) return;
294
+ const m = _.current;
295
+ if (!m) return;
296
296
  const x = (N) => {
297
- Math.abs(N.deltaX) > Math.abs(N.deltaY) || (N.preventDefault(), b.scrollLeft += N.deltaY);
297
+ Math.abs(N.deltaX) > Math.abs(N.deltaY) || (N.preventDefault(), m.scrollLeft += N.deltaY);
298
298
  };
299
- return b.addEventListener("wheel", x, { passive: !1 }), () => b.removeEventListener("wheel", x);
299
+ return m.addEventListener("wheel", x, { passive: !1 }), () => m.removeEventListener("wheel", x);
300
300
  }, []);
301
- const C = O(() => n ? ne(n) : oe(w), [n, w]), $ = O(
302
- () => ie.filter((b) => C.has(b.group || "core")),
301
+ const C = O(() => n ? te(n) : ne(w), [n, w]), $ = O(
302
+ () => oe.filter((m) => C.has(m.group || "core")),
303
303
  [C]
304
- ), i = O(() => {
305
- const b = [];
304
+ ), r = O(() => {
305
+ const m = [];
306
306
  let x = "";
307
307
  for (const N of $) {
308
308
  const D = N.group || "core";
309
- D !== x && (x = D, b.push({ group: x, metrics: [] })), b[b.length - 1].metrics.push(N);
309
+ D !== x && (x = D, m.push({ group: x, metrics: [] })), m[m.length - 1].metrics.push(N);
310
310
  }
311
- return b;
311
+ return m;
312
312
  }, [$]);
313
313
  return t && u ? null : /* @__PURE__ */ l(H, { children: [
314
314
  /* @__PURE__ */ l(
315
315
  "button",
316
316
  {
317
317
  type: "button",
318
- className: `ss-toggle ${m ? "ss-visible" : "ss-collapsed"}`,
318
+ className: `ss-toggle ${b ? "ss-visible" : "ss-collapsed"}`,
319
319
  onClick: I,
320
- title: m ? "Hide stats bar" : "Show stats bar",
320
+ title: b ? "Hide stats bar" : "Show stats bar",
321
321
  "data-ss-theme": f,
322
322
  children: [
323
- !m && n && /* @__PURE__ */ l("span", { className: "ss-toggle-summary", style: { display: "flex" }, children: [
323
+ !b && n && /* @__PURE__ */ l("span", { className: "ss-toggle-summary", style: { display: "flex" }, children: [
324
324
  C.has("process") && /* @__PURE__ */ l(H, { children: [
325
325
  /* @__PURE__ */ l(
326
326
  "span",
@@ -336,12 +336,12 @@ function We(s) {
336
336
  ] }),
337
337
  C.has("redis") && n.redisOk !== void 0 && /* @__PURE__ */ e("span", { className: `ss-value ${n.redisOk ? "ss-green" : "ss-red"}`, children: n.redisOk ? "✓" : "✗" })
338
338
  ] }),
339
- m && /* @__PURE__ */ e("span", { className: "ss-toggle-label", style: { color: "#737373" }, children: "hide stats" }),
340
- /* @__PURE__ */ e("span", { className: "ss-toggle-arrow", children: m ? "▼" : "▲" })
339
+ b && /* @__PURE__ */ e("span", { className: "ss-toggle-label", style: { color: "#737373" }, children: "hide stats" }),
340
+ /* @__PURE__ */ e("span", { className: "ss-toggle-arrow", children: b ? "▼" : "▲" })
341
341
  ]
342
342
  }
343
343
  ),
344
- /* @__PURE__ */ l("div", { ref: E, className: m ? "ss-bar" : "ss-bar ss-hidden", "data-ss-theme": f, children: [
344
+ /* @__PURE__ */ l("div", { ref: E, className: b ? "ss-bar" : "ss-bar ss-hidden", "data-ss-theme": f, children: [
345
345
  /* @__PURE__ */ l("div", { className: "ss-bar-left", children: [
346
346
  o && /* @__PURE__ */ e(
347
347
  "button",
@@ -369,9 +369,9 @@ function We(s) {
369
369
  ),
370
370
  /* @__PURE__ */ e("div", { className: h ? "ss-dot ss-stale" : "ss-dot" })
371
371
  ] }),
372
- /* @__PURE__ */ e("div", { ref: _, className: "ss-bar-scroll", id: "ss-bar-scroll", children: n && i.map((b, x) => /* @__PURE__ */ l(K.Fragment, { children: [
372
+ /* @__PURE__ */ e("div", { ref: _, className: "ss-bar-scroll", id: "ss-bar-scroll", children: n && r.map((m, x) => /* @__PURE__ */ l(V.Fragment, { children: [
373
373
  x > 0 && /* @__PURE__ */ e("div", { className: "ss-group-sep" }),
374
- /* @__PURE__ */ e("div", { className: "ss-group", children: b.metrics.map((N) => /* @__PURE__ */ e(
374
+ /* @__PURE__ */ e("div", { className: "ss-group", children: m.metrics.map((N) => /* @__PURE__ */ e(
375
375
  be,
376
376
  {
377
377
  metric: N,
@@ -380,13 +380,13 @@ function We(s) {
380
380
  },
381
381
  N.id
382
382
  )) })
383
- ] }, b.group)) })
383
+ ] }, m.group)) })
384
384
  ] })
385
385
  ] });
386
386
  }
387
- function J({
387
+ function W({
388
388
  theme: s,
389
- onToggle: r,
389
+ onToggle: i,
390
390
  className: t = "",
391
391
  classPrefix: o = "ss-dash"
392
392
  }) {
@@ -396,7 +396,7 @@ function J({
396
396
  {
397
397
  type: "button",
398
398
  className: `${o === "ss-dbg" ? "ss-dbg-theme-toggle" : "ss-dash-theme-btn"} ${t}`,
399
- onClick: r,
399
+ onClick: i,
400
400
  title: a ? "Switch to light theme" : "Switch to dark theme",
401
401
  "aria-label": a ? "Switch to light theme" : "Switch to dark theme",
402
402
  children: a ? (
@@ -435,23 +435,23 @@ function J({
435
435
  }
436
436
  );
437
437
  }
438
- const ge = T(() => import("./QueriesTab-DbBmAqzO.js")), ve = T(() => import("./EventsTab-CC6DQzEm.js")), fe = T(() => import("./EmailsTab-Uh2CQY3o.js")), we = T(() => import("./RoutesTab-Bwreij3e.js")), ke = T(() => import("./LogsTab-BbYK-iyh.js")), Ne = T(() => import("./TimelineTab-6hthfdBB.js")), ye = T(() => import("./CacheTab-DYmsZJJ1.js")), Ce = T(() => import("./JobsTab-B3Lfdqed.js")), Se = T(() => import("./ConfigTab-CcN-tfjv.js")), Le = T(() => import("./InternalsTab-Oij0A2fN.js")), Te = T(() => import("./CustomPaneTab-D7_o3Ec6.js"));
439
- function Je(s) {
438
+ const me = T(() => import("./QueriesTab-osLUWd4L.js")), ge = T(() => import("./EventsTab-CMfY98Rl.js")), ve = T(() => import("./EmailsTab-BDhEiomM.js")), fe = T(() => import("./RoutesTab-DgVzd2PZ.js")), we = T(() => import("./LogsTab-CicucmVk.js")), ke = T(() => import("./TimelineTab-Covg5weo.js")), Ne = T(() => import("./CacheTab-CA8LB1J5.js")), ye = T(() => import("./JobsTab-BbrBWIOb.js")), Ce = T(() => import("./ConfigTab-Bdg8YMer.js")), Se = T(() => import("./InternalsTab-Oij0A2fN.js")), Le = T(() => import("./CustomPaneTab-Bxtv_8Rw.js"));
439
+ function Ae(s) {
440
440
  const {
441
- defaultOpen: r = !1,
441
+ defaultOpen: i = !1,
442
442
  dashboardPath: t,
443
443
  isOpen: o,
444
444
  onOpenChange: a,
445
445
  isLive: d = !1,
446
446
  ...g
447
- } = s, [n, v] = y(r), p = o !== void 0 ? o : n, h = (i) => {
448
- a ? a(i) : v(i);
449
- }, [u, w] = y("queries"), { features: f } = z(g), { theme: m, toggleTheme: k } = A(), E = f.customPanes || [];
447
+ } = s, [n, v] = y(i), p = o !== void 0 ? o : n, h = (r) => {
448
+ a ? a(r) : v(r);
449
+ }, [u, w] = y("queries"), { features: f } = z(g), { theme: b, toggleTheme: k } = A(), E = f.customPanes || [];
450
450
  R(() => {
451
- const i = (b) => {
452
- b.key === "Escape" && p && h(!1);
451
+ const r = (m) => {
452
+ m.key === "Escape" && p && h(!1);
453
453
  };
454
- return document.addEventListener("keydown", i), () => document.removeEventListener("keydown", i);
454
+ return document.addEventListener("keydown", r), () => document.removeEventListener("keydown", r);
455
455
  }, [p]);
456
456
  const _ = O(
457
457
  () => [
@@ -460,44 +460,44 @@ function Je(s) {
460
460
  { id: "emails", label: "Emails", visible: !0 },
461
461
  { id: "routes", label: "Routes", visible: !0 },
462
462
  { id: "logs", label: "Logs", visible: !0 },
463
- { id: "timeline", label: "Timeline", visible: f.tracing },
463
+ { id: "timeline", label: "Requests", visible: f.tracing },
464
464
  { id: "cache", label: "Cache", visible: f.cache },
465
465
  { id: "jobs", label: "Jobs", visible: f.queues },
466
466
  { id: "config", label: "Config", visible: !0 },
467
467
  { id: "internals", label: "Internals", visible: !0 }
468
468
  ],
469
469
  [f]
470
- ), I = O(() => _.filter((i) => i.visible), [_]);
470
+ ), I = O(() => _.filter((r) => r.visible), [_]);
471
471
  R(() => {
472
- const i = [
473
- ...I.map((b) => b.id),
474
- ...E.map((b) => b.id)
472
+ const r = [
473
+ ...I.map((m) => m.id),
474
+ ...E.map((m) => m.id)
475
475
  ];
476
- !i.includes(u) && i.length > 0 && w(i[0]);
476
+ !r.includes(u) && r.length > 0 && w(r[0]);
477
477
  }, [I, E, u]);
478
478
  const C = B(() => {
479
479
  h(!p);
480
480
  }, [p]), $ = B(() => {
481
- const i = { options: g }, b = E.find((N) => N.id === u);
482
- if (b)
483
- return /* @__PURE__ */ e(F, { fallback: /* @__PURE__ */ e("div", { className: "ss-dbg-empty", children: "Loading..." }), children: /* @__PURE__ */ e(Te, { pane: b, options: g }) });
481
+ const r = { options: g }, m = E.find((N) => N.id === u);
482
+ if (m)
483
+ return /* @__PURE__ */ e(F, { fallback: /* @__PURE__ */ e("div", { className: "ss-dbg-empty", children: "Loading..." }), children: /* @__PURE__ */ e(Le, { pane: m, options: g }) });
484
484
  const x = {
485
- queries: /* @__PURE__ */ e(ge, { ...i }),
486
- events: /* @__PURE__ */ e(ve, { ...i }),
487
- emails: /* @__PURE__ */ e(fe, { ...i }),
485
+ queries: /* @__PURE__ */ e(me, { ...r }),
486
+ events: /* @__PURE__ */ e(ge, { ...r }),
487
+ emails: /* @__PURE__ */ e(ve, { ...r }),
488
488
  routes: /* @__PURE__ */ e(
489
- we,
489
+ fe,
490
490
  {
491
- ...i,
491
+ ...r,
492
492
  currentPath: typeof window < "u" ? window.location.pathname : ""
493
493
  }
494
494
  ),
495
- logs: /* @__PURE__ */ e(ke, { ...i }),
496
- timeline: /* @__PURE__ */ e(Ne, { ...i }),
497
- cache: /* @__PURE__ */ e(ye, { ...i, dashboardPath: t }),
498
- jobs: /* @__PURE__ */ e(Ce, { ...i, dashboardPath: t }),
499
- config: /* @__PURE__ */ e(Se, { ...i, dashboardPath: t }),
500
- internals: /* @__PURE__ */ e(Le, { ...i })
495
+ logs: /* @__PURE__ */ e(we, { ...r }),
496
+ timeline: /* @__PURE__ */ e(ke, { ...r }),
497
+ cache: /* @__PURE__ */ e(Ne, { ...r, dashboardPath: t }),
498
+ jobs: /* @__PURE__ */ e(ye, { ...r, dashboardPath: t }),
499
+ config: /* @__PURE__ */ e(Ce, { ...r, dashboardPath: t }),
500
+ internals: /* @__PURE__ */ e(Se, { ...r })
501
501
  };
502
502
  return /* @__PURE__ */ e(F, { fallback: /* @__PURE__ */ e("div", { className: "ss-dbg-empty", children: "Loading..." }), children: x[u] || /* @__PURE__ */ e("div", { className: "ss-dbg-empty", children: "Unknown tab" }) });
503
503
  }, [u, g, E]);
@@ -530,40 +530,40 @@ function Je(s) {
530
530
  "div",
531
531
  {
532
532
  className: `ss-dbg-panel ${p ? "ss-dbg-open" : ""}`,
533
- "data-ss-theme": m,
533
+ "data-ss-theme": b,
534
534
  id: "ss-dbg-panel",
535
535
  children: [
536
536
  /* @__PURE__ */ l("div", { className: "ss-dbg-tabs", children: [
537
537
  /* @__PURE__ */ l("div", { className: "ss-dbg-tabs-scroll", children: [
538
- I.map((i) => /* @__PURE__ */ l(
538
+ I.map((r) => /* @__PURE__ */ l(
539
539
  "button",
540
540
  {
541
541
  type: "button",
542
- className: `ss-dbg-tab ${u === i.id ? "ss-dbg-active" : ""}`,
543
- onClick: () => w(i.id),
542
+ className: `ss-dbg-tab ${u === r.id ? "ss-dbg-active" : ""}`,
543
+ onClick: () => w(r.id),
544
544
  children: [
545
- L[i.id] ? /* @__PURE__ */ e(
545
+ L[r.id] ? /* @__PURE__ */ e(
546
546
  "svg",
547
547
  {
548
548
  className: "ss-dbg-tab-icon",
549
- viewBox: L[i.id].viewBox,
550
- dangerouslySetInnerHTML: { __html: L[i.id].elements.join("") }
549
+ viewBox: L[r.id].viewBox,
550
+ dangerouslySetInnerHTML: { __html: L[r.id].elements.join("") }
551
551
  }
552
552
  ) : null,
553
- i.label
553
+ r.label
554
554
  ]
555
555
  },
556
- i.id
556
+ r.id
557
557
  )),
558
- E.map((i) => /* @__PURE__ */ e(
558
+ E.map((r) => /* @__PURE__ */ e(
559
559
  "button",
560
560
  {
561
561
  type: "button",
562
- className: `ss-dbg-tab ${u === i.id ? "ss-dbg-active" : ""}`,
563
- onClick: () => w(i.id),
564
- children: i.label
562
+ className: `ss-dbg-tab ${u === r.id ? "ss-dbg-active" : ""}`,
563
+ onClick: () => w(r.id),
564
+ children: r.label
565
565
  },
566
- i.id
566
+ r.id
567
567
  ))
568
568
  ] }),
569
569
  /* @__PURE__ */ l("div", { className: "ss-dbg-tabs-right", children: [
@@ -575,7 +575,7 @@ function Je(s) {
575
575
  children: d ? "live" : "polling"
576
576
  }
577
577
  ),
578
- /* @__PURE__ */ e(J, { theme: m, onToggle: k, classPrefix: "ss-dbg" }),
578
+ /* @__PURE__ */ e(W, { theme: b, onToggle: k, classPrefix: "ss-dbg" }),
579
579
  t && /* @__PURE__ */ e(
580
580
  "a",
581
581
  {
@@ -618,7 +618,7 @@ function Je(s) {
618
618
  )
619
619
  ] });
620
620
  }
621
- function Ee(s, r = {}) {
621
+ function Te(s, i = {}) {
622
622
  const {
623
623
  baseUrl: t = "",
624
624
  dashboardEndpoint: o = "/__stats/api",
@@ -631,15 +631,15 @@ function Ee(s, r = {}) {
631
631
  filters: h,
632
632
  timeRange: u,
633
633
  refreshKey: w
634
- } = r, [f, m] = y(null), [k, E] = y(null), [_, I] = y(!0), [C, $] = y(null), i = j(null), b = j(s), x = j(!1);
635
- i.current || (i.current = new re({
634
+ } = i, [f, b] = y(null), [k, E] = y(null), [_, I] = y(!0), [C, $] = y(null), r = j(null), m = j(s), x = j(!1);
635
+ r.current || (r.current = new re({
636
636
  baseUrl: t,
637
637
  endpoint: o,
638
638
  authToken: a,
639
639
  section: s,
640
640
  perPage: g,
641
641
  callbacks: {
642
- onData: (M) => m(M),
642
+ onData: (M) => b(M),
643
643
  onPagination: (M) => E(M),
644
644
  onLoading: (M) => I(M),
645
645
  onError: (M) => $(M),
@@ -647,20 +647,20 @@ function Ee(s, r = {}) {
647
647
  }
648
648
  }
649
649
  })), R(() => {
650
- const M = i.current, c = b.current !== s;
651
- return b.current = s, M.configure({ page: d, perPage: g, search: n, sort: v, sortDir: p, filters: h, timeRange: u }), c || !x.current ? (c ? M.setSection(s) : M.start(), x.current = !0) : M.fetch(!0), () => {
650
+ const M = r.current, c = m.current !== s;
651
+ return m.current = s, M.configure({ page: d, perPage: g, search: n, sort: v, sortDir: p, filters: h, timeRange: u }), c || !x.current ? (c ? M.setSection(s) : M.start(), x.current = !0) : M.fetch(!0), () => {
652
652
  M.stop();
653
653
  };
654
654
  }, [s, d, g, n, v, p, h, u, w]);
655
655
  const N = B(() => {
656
- i.current?.fetch(!0);
656
+ r.current?.fetch(!0);
657
657
  }, []), D = B(
658
- async (M, c = "post", S) => i.current.mutate(M, c, S),
658
+ async (M, c = "post", S) => r.current.mutate(M, c, S),
659
659
  []
660
- ), P = B(() => i.current.getApi(), []);
661
- return { data: f, meta: k, isLoading: _, error: C, refresh: N, mutate: D, getApi: P };
660
+ ), q = B(() => r.current.getApi(), []);
661
+ return { data: f, meta: k, isLoading: _, error: C, refresh: N, mutate: D, getApi: q };
662
662
  }
663
- const $e = [
663
+ const Ee = [
664
664
  "overview",
665
665
  "requests",
666
666
  "queries",
@@ -668,28 +668,24 @@ const $e = [
668
668
  "routes",
669
669
  "logs",
670
670
  "emails",
671
- "timeline",
672
671
  "cache",
673
672
  "jobs",
674
673
  "config",
675
674
  "internals"
676
- ], xe = T(() => import("./OverviewSection-CkBGFEWq.js")), Ie = T(() => import("./RequestsSection-Cb5a6MlT.js")), Be = T(() => import("./QueriesSection-CfCpnNUD.js")), Me = T(() => import("./EventsSection-CGQWiIdV.js")), Re = T(() => import("./RoutesSection-CRqF-cNM.js")), Oe = T(() => import("./LogsSection-Cly1dpvS.js")), _e = T(() => import("./EmailsSection-BzlsTdPs.js")), De = T(() => import("./TimelineSection-B2y06kRE.js")), je = T(() => import("./CacheSection-xH75hwXu.js")), He = T(() => import("./JobsSection-D7AHQmZi.js")), Pe = T(() => import("./ConfigSection-D8BO1Ry9.js")), qe = T(() => import("./InternalsSection-t7ihcWO-.js"));
677
- function W(s) {
678
- return s === "timeline" ? "dashboard-timeline" : s;
679
- }
680
- function Ve(s) {
675
+ ], $e = T(() => import("./OverviewSection-C4T1ur51.js")), xe = T(() => import("./RequestsSection-Nag30rEA.js")), Ie = T(() => import("./QueriesSection-PswteoF9.js")), Be = T(() => import("./EventsSection-ByQ-9blq.js")), Me = T(() => import("./RoutesSection-BUSkM6PY.js")), Re = T(() => import("./LogsSection-DcFTZY7b.js")), Oe = T(() => import("./EmailsSection-CM7stSyh.js")), _e = T(() => import("./CacheSection-UCMptWyn.js")), De = T(() => import("./JobsSection-DF3qEv9O.js")), je = T(() => import("./ConfigSection-DfFd-WRq.js")), He = T(() => import("./InternalsSection-t7ihcWO-.js"));
676
+ function We(s) {
681
677
  const {
682
- baseUrl: r = "",
678
+ baseUrl: i = "",
683
679
  dashboardEndpoint: t = "/__stats/api",
684
680
  debugEndpoint: o,
685
681
  authToken: a,
686
682
  backUrl: d = "/",
687
683
  channelName: g = "server-stats/dashboard"
688
- } = s, { features: n } = z({ baseUrl: r, debugEndpoint: o, authToken: a }), { theme: v, toggleTheme: p } = A(), [h, u] = y("overview"), [w, f] = y(() => typeof window > "u" ? !1 : localStorage.getItem("ss-dash-sidebar") === "collapsed"), [m, k] = y(!1), [E, _] = y(0), I = j(0);
684
+ } = s, { features: n } = z({ baseUrl: i, debugEndpoint: o, authToken: a }), { theme: v, toggleTheme: p } = A(), [h, u] = y("overview"), [w, f] = y(() => typeof window > "u" ? !1 : localStorage.getItem("ss-dash-sidebar") === "collapsed"), [b, k] = y(!1), [E, _] = y(0), I = j(0);
689
685
  R(() => {
690
686
  if (!g) return;
691
- const c = ae({
692
- baseUrl: r,
687
+ const c = ie({
688
+ baseUrl: i,
693
689
  channelName: g,
694
690
  authToken: a,
695
691
  onMessage: () => {
@@ -700,11 +696,11 @@ function Ve(s) {
700
696
  onError: () => k(!1)
701
697
  });
702
698
  return () => c.unsubscribe();
703
- }, [r, g, a]);
699
+ }, [i, g, a]);
704
700
  const C = n.customPanes || [], $ = B(
705
701
  (c) => {
706
702
  const S = c.replace("#", "").split("?")[0];
707
- return S && [...$e, ...C.map((V) => V.id)].includes(S) ? S : "overview";
703
+ return S && [...Ee, ...C.map((J) => J.id)].includes(S) ? S : "overview";
708
704
  },
709
705
  [C]
710
706
  );
@@ -721,12 +717,12 @@ function Ve(s) {
721
717
  }, [h, $]), R(() => {
722
718
  typeof window > "u" || (window.location.hash = h);
723
719
  }, [h]);
724
- const i = B(() => {
720
+ const r = B(() => {
725
721
  f((c) => {
726
722
  const S = !c;
727
723
  return localStorage.setItem("ss-dash-sidebar", S ? "collapsed" : "expanded"), S;
728
724
  });
729
- }, []), b = O(
725
+ }, []), m = O(
730
726
  () => [
731
727
  { id: "overview", label: "Overview", visible: !0 },
732
728
  { id: "requests", label: "Requests", visible: !0 },
@@ -735,38 +731,36 @@ function Ve(s) {
735
731
  { id: "routes", label: "Routes", visible: !0 },
736
732
  { id: "logs", label: "Logs", visible: !0 },
737
733
  { id: "emails", label: "Emails", visible: !0 },
738
- { id: "timeline", label: "Timeline", visible: n.tracing },
739
734
  { id: "cache", label: "Cache", visible: n.cache },
740
735
  { id: "jobs", label: "Jobs", visible: n.queues },
741
736
  { id: "config", label: "Config", visible: !0 },
742
737
  { id: "internals", label: "Internals", visible: !0 }
743
738
  ],
744
739
  [n]
745
- ), x = O(() => b.filter((c) => c.visible), [b]), N = O(
746
- () => ({ baseUrl: r, dashboardEndpoint: t, authToken: a, refreshKey: E }),
747
- [r, t, a, E]
748
- ), { data: D } = Ee("overview", N), P = O(() => {
740
+ ), x = O(() => m.filter((c) => c.visible), [m]), N = O(
741
+ () => ({ baseUrl: i, dashboardEndpoint: t, authToken: a, refreshKey: E }),
742
+ [i, t, a, E]
743
+ ), { data: D } = Te("overview", N), q = O(() => {
749
744
  if (!D) return {};
750
745
  const c = {};
751
746
  if (D.totalRequests > 0 && (c.requests = { count: D.totalRequests }), D.queryStats?.total > 0 && (c.queries = { count: D.queryStats.total }), D.logLevelBreakdown) {
752
- const S = D.logLevelBreakdown, q = S.error + S.warn + S.info + S.debug;
753
- q > 0 && (c.logs = { count: q });
747
+ const S = D.logLevelBreakdown, P = S.error + S.warn + S.info + S.debug;
748
+ P > 0 && (c.logs = { count: P });
754
749
  }
755
750
  return c;
756
751
  }, [D]), M = B(() => {
757
752
  const c = {
758
- overview: /* @__PURE__ */ e(xe, { options: N }),
759
- requests: /* @__PURE__ */ e(Ie, { options: N }),
760
- queries: /* @__PURE__ */ e(Be, { options: N }),
761
- events: /* @__PURE__ */ e(Me, { options: N }),
762
- routes: /* @__PURE__ */ e(Re, { options: N }),
763
- logs: /* @__PURE__ */ e(Oe, { options: N }),
764
- emails: /* @__PURE__ */ e(_e, { options: N }),
765
- timeline: /* @__PURE__ */ e(De, { options: N }),
766
- cache: /* @__PURE__ */ e(je, { options: N }),
767
- jobs: /* @__PURE__ */ e(He, { options: N }),
768
- config: /* @__PURE__ */ e(Pe, { options: N }),
769
- internals: /* @__PURE__ */ e(qe, { options: N, debugEndpoint: o })
753
+ overview: /* @__PURE__ */ e($e, { options: N }),
754
+ requests: /* @__PURE__ */ e(xe, { options: N }),
755
+ queries: /* @__PURE__ */ e(Ie, { options: N }),
756
+ events: /* @__PURE__ */ e(Be, { options: N }),
757
+ routes: /* @__PURE__ */ e(Me, { options: N }),
758
+ logs: /* @__PURE__ */ e(Re, { options: N }),
759
+ emails: /* @__PURE__ */ e(Oe, { options: N }),
760
+ cache: /* @__PURE__ */ e(_e, { options: N }),
761
+ jobs: /* @__PURE__ */ e(De, { options: N }),
762
+ config: /* @__PURE__ */ e(je, { options: N }),
763
+ internals: /* @__PURE__ */ e(He, { options: N, debugEndpoint: o })
770
764
  };
771
765
  return /* @__PURE__ */ e("div", { className: "ss-dash-pane ss-dash-active", id: `ss-dash-pane-${h}`, children: /* @__PURE__ */ e("div", { className: "ss-dash-pane-inner", children: /* @__PURE__ */ e(F, { fallback: /* @__PURE__ */ e("div", { className: "ss-dash-empty", children: "Loading..." }), children: c[h] || /* @__PURE__ */ e("div", { className: "ss-dash-empty", children: "Unknown section" }) }) }) });
772
766
  }, [h, N]);
@@ -780,21 +774,21 @@ function Ve(s) {
780
774
  /* @__PURE__ */ e(
781
775
  "span",
782
776
  {
783
- className: `ss-dash-live-dot ${m ? "ss-dash-connected" : ""}`,
777
+ className: `ss-dash-live-dot ${b ? "ss-dash-connected" : ""}`,
784
778
  id: "ss-dash-live-dot"
785
779
  }
786
780
  ),
787
781
  /* @__PURE__ */ e(
788
782
  "span",
789
783
  {
790
- className: `ss-dash-live-label ${m ? "ss-dash-connected" : ""}`,
784
+ className: `ss-dash-live-label ${b ? "ss-dash-connected" : ""}`,
791
785
  id: "ss-dash-live-label",
792
- children: m ? "Live" : "Polling"
786
+ children: b ? "Live" : "Polling"
793
787
  }
794
788
  )
795
789
  ] }),
796
790
  /* @__PURE__ */ l("div", { className: "ss-dash-header-right", children: [
797
- /* @__PURE__ */ e(J, { theme: v, onToggle: p }),
791
+ /* @__PURE__ */ e(W, { theme: v, onToggle: p }),
798
792
  d && /* @__PURE__ */ e("a", { href: d, className: "ss-dash-back-link", title: "Back to app", children: "← App" })
799
793
  ] })
800
794
  ] }),
@@ -807,7 +801,7 @@ function Ve(s) {
807
801
  children: [
808
802
  /* @__PURE__ */ l("nav", { className: "ss-dash-nav", children: [
809
803
  x.map((c) => {
810
- const S = P[c.id];
804
+ const S = q[c.id];
811
805
  return /* @__PURE__ */ l(
812
806
  "button",
813
807
  {
@@ -824,14 +818,14 @@ function Ve(s) {
824
818
  {
825
819
  width: "20",
826
820
  height: "20",
827
- viewBox: (L[W(c.id)] || L.config).viewBox,
821
+ viewBox: (L[c.id] || L.config).viewBox,
828
822
  fill: "none",
829
823
  stroke: "currentColor",
830
824
  strokeWidth: "2",
831
825
  strokeLinecap: "round",
832
826
  strokeLinejoin: "round",
833
827
  dangerouslySetInnerHTML: {
834
- __html: (L[W(c.id)] || L.config).elements.join("")
828
+ __html: (L[c.id] || L.config).elements.join("")
835
829
  }
836
830
  }
837
831
  ) }),
@@ -883,7 +877,7 @@ function Ve(s) {
883
877
  type: "button",
884
878
  className: "ss-dash-sidebar-toggle",
885
879
  id: "ss-dash-sidebar-toggle",
886
- onClick: i,
880
+ onClick: r,
887
881
  title: w ? "Expand sidebar" : "Collapse sidebar",
888
882
  children: w ? /* @__PURE__ */ e(
889
883
  "svg",
@@ -917,9 +911,9 @@ function Ve(s) {
917
911
  ] })
918
912
  ] });
919
913
  }
920
- function Ke(s, r = {}) {
921
- const { baseUrl: t = "", debugEndpoint: o = "/admin/api/debug", authToken: a } = r, [d, g] = y(null), [n, v] = y(!0), [p, h] = y(null), u = j(null);
922
- u.current || (u.current = new le({
914
+ function Je(s, i = {}) {
915
+ const { baseUrl: t = "", debugEndpoint: o = "/admin/api/debug", authToken: a } = i, [d, g] = y(null), [n, v] = y(!0), [p, h] = y(null), u = j(null);
916
+ u.current || (u.current = new ae({
923
917
  baseUrl: t,
924
918
  endpoint: o,
925
919
  authToken: a,
@@ -935,35 +929,35 @@ function Ke(s, r = {}) {
935
929
  u.current?.refresh();
936
930
  }, []), f = B(() => {
937
931
  g(null);
938
- }, []), m = B((k, E) => {
932
+ }, []), b = B((k, E) => {
939
933
  u.current?.cacheForTab(k, E);
940
934
  }, []);
941
- return { data: d, isLoading: n, error: p, refresh: w, clearData: f, cacheForTab: m };
935
+ return { data: d, isLoading: n, error: p, refresh: w, clearData: f, cacheForTab: b };
942
936
  }
943
- function Ge({
937
+ function Ve({
944
938
  color: s = "muted",
945
- children: r,
939
+ children: i,
946
940
  className: t = "",
947
941
  classPrefix: o = "ss-dash"
948
942
  }) {
949
- return /* @__PURE__ */ e("span", { className: `${o}-badge ${o}-badge-${s} ${t}`, children: r });
943
+ return /* @__PURE__ */ e("span", { className: `${o}-badge ${o}-badge-${s} ${t}`, children: i });
950
944
  }
951
- function Qe({ method: s, className: r = "", classPrefix: t = "ss-dash" }) {
945
+ function Ke({ method: s, className: i = "", classPrefix: t = "ss-dash" }) {
952
946
  return /* @__PURE__ */ e(
953
947
  "span",
954
948
  {
955
- className: `${t}-method ${t}-method-${s.toLowerCase()} ${r}`,
949
+ className: `${t}-method ${t}-method-${s.toLowerCase()} ${i}`,
956
950
  children: s
957
951
  }
958
952
  );
959
953
  }
960
- function Xe({ code: s, className: r = "", classPrefix: t = "ss-dash" }) {
954
+ function Ge({ code: s, className: i = "", classPrefix: t = "ss-dash" }) {
961
955
  let o = `${t}-status-2xx`;
962
- return s >= 500 ? o = `${t}-status-5xx` : s >= 400 ? o = `${t}-status-4xx` : s >= 300 && (o = `${t}-status-3xx`), /* @__PURE__ */ e("span", { className: `${t}-status ${o} ${r}`, children: s });
956
+ return s >= 500 ? o = `${t}-status-5xx` : s >= 400 ? o = `${t}-status-4xx` : s >= 300 && (o = `${t}-status-3xx`), /* @__PURE__ */ e("span", { className: `${t}-status ${o} ${i}`, children: s });
963
957
  }
964
- function Ye({
958
+ function Qe({
965
959
  data: s,
966
- maxPreviewLength: r = 100,
960
+ maxPreviewLength: i = 100,
967
961
  className: t = "",
968
962
  classPrefix: o = "ss-dash",
969
963
  defaultExpanded: a = !1
@@ -976,7 +970,7 @@ function Ye({
976
970
  return s;
977
971
  }
978
972
  return s;
979
- }, [s]), v = O(() => typeof n == "object" && n !== null ? ce(n, r) : String(n ?? "-"), [n, r]), p = O(() => typeof n == "object" && n !== null ? JSON.stringify(n, null, 2) : String(n), [n]), h = B(() => {
973
+ }, [s]), v = O(() => typeof n == "object" && n !== null ? le(n, i) : String(n ?? "-"), [n, i]), p = O(() => typeof n == "object" && n !== null ? JSON.stringify(n, null, 2) : String(n), [n]), h = B(() => {
980
974
  g((w) => !w);
981
975
  }, []), u = B(async () => {
982
976
  try {
@@ -1013,7 +1007,7 @@ function Ye({
1013
1007
  ] })
1014
1008
  ] });
1015
1009
  }
1016
- function Ze({ content: s, children: r, position: t = "top", className: o = "" }) {
1010
+ function Xe({ content: s, children: i, position: t = "top", className: o = "" }) {
1017
1011
  const [a, d] = y(!1), [g, n] = y({ left: 0, bottom: 0 }), v = j(null), p = j(null), h = B(() => {
1018
1012
  d(!0);
1019
1013
  }, []), u = B(() => {
@@ -1022,8 +1016,8 @@ function Ze({ content: s, children: r, position: t = "top", className: o = "" })
1022
1016
  return R(() => {
1023
1017
  if (!a || !v.current || !p.current) return;
1024
1018
  const w = v.current.getBoundingClientRect(), f = p.current.getBoundingClientRect();
1025
- let m = w.left + w.width / 2 - f.width / 2, k;
1026
- m < 8 && (m = 8), m + f.width > window.innerWidth - 8 && (m = window.innerWidth - 8 - f.width), t === "top" && (k = window.innerHeight - w.top + 8), n({ left: m, bottom: k ?? 0 });
1019
+ let b = w.left + w.width / 2 - f.width / 2, k;
1020
+ b < 8 && (b = 8), b + f.width > window.innerWidth - 8 && (b = window.innerWidth - 8 - f.width), t === "top" && (k = window.innerHeight - w.top + 8), n({ left: b, bottom: k ?? 0 });
1027
1021
  }, [a, t]), /* @__PURE__ */ l(
1028
1022
  "div",
1029
1023
  {
@@ -1033,7 +1027,7 @@ function Ze({ content: s, children: r, position: t = "top", className: o = "" })
1033
1027
  onMouseLeave: u,
1034
1028
  style: { display: "inline-flex", position: "relative" },
1035
1029
  children: [
1036
- r,
1030
+ i,
1037
1031
  a && /* @__PURE__ */ l(
1038
1032
  "div",
1039
1033
  {
@@ -1057,19 +1051,19 @@ function Ze({ content: s, children: r, position: t = "top", className: o = "" })
1057
1051
  );
1058
1052
  }
1059
1053
  export {
1060
- Ge as B,
1061
- Ve as D,
1062
- Ye as J,
1063
- Qe as M,
1064
- he as S,
1065
- J as T,
1066
- Ee as a,
1067
- Xe as b,
1068
- Je as c,
1069
- We as d,
1070
- Ze as e,
1054
+ Ve as B,
1055
+ We as D,
1056
+ Qe as J,
1057
+ Ke as M,
1058
+ ue as S,
1059
+ W as T,
1060
+ Te as a,
1061
+ Ge as b,
1062
+ Ae as c,
1063
+ ze as d,
1064
+ Xe as e,
1071
1065
  z as f,
1072
- ue as g,
1066
+ de as g,
1073
1067
  A as h,
1074
- Ke as u
1068
+ Je as u
1075
1069
  };