durable-actors-observer 0.7.8 → 0.7.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,13 +1,13 @@
1
1
  import * as e from "react";
2
2
  import { useEffect as t, useId as n, useMemo as r, useRef as i, useState as a } from "react";
3
- import { Activity as o, ArrowRight as s, Box as c, Cable as l, Calendar as u, ChartNoAxesGantt as d, ChevronDown as f, ChevronDownIcon as p, ChevronLeftIcon as m, ChevronRightIcon as h, CircleHelp as g, Download as _, Hash as v, LayoutGrid as y, List as ee, Pause as b, Play as te, RefreshCw as ne, Search as x, SearchIcon as S, SunMoon as C, Unplug as w, X as T } from "lucide-react";
4
- import { Command as E } from "cmdk";
5
- import { clsx as D } from "clsx";
6
- import { extendTailwindMerge as O } from "tailwind-merge";
7
- import { Fragment as k, jsx as A, jsxs as j } from "react/jsx-runtime";
8
- import { Slot as M } from "@radix-ui/react-slot";
9
- import { cva as N } from "class-variance-authority";
10
- import { DayPicker as P, getDefaultClassNames as F } from "react-day-picker";
3
+ import { Activity as o, ArrowRight as s, Box as c, Cable as l, Calendar as u, ChartNoAxesGantt as d, ChevronDown as f, ChevronDownIcon as p, ChevronLeftIcon as m, ChevronRightIcon as h, CircleHelp as g, Download as _, Hash as v, LayoutGrid as y, List as ee, Pause as b, Play as x, RefreshCw as te, Search as S, SearchIcon as C, SunMoon as w, Unplug as T, X as E } from "lucide-react";
4
+ import { Fragment as D, jsx as O, jsxs as k } from "react/jsx-runtime";
5
+ import { Command as A } from "cmdk";
6
+ import { clsx as j } from "clsx";
7
+ import { extendTailwindMerge as M } from "tailwind-merge";
8
+ import { Slot as N } from "@radix-ui/react-slot";
9
+ import { cva as P } from "class-variance-authority";
10
+ import { DayPicker as F, getDefaultClassNames as ne } from "react-day-picker";
11
11
  import * as I from "@radix-ui/react-popover";
12
12
  import { Drawer as L } from "vaul";
13
13
  import { JsonView as re } from "react-json-view-lite";
@@ -15,68 +15,77 @@ import { create as ie } from "jsondiffpatch";
15
15
  import { format as ae } from "jsondiffpatch/formatters/html";
16
16
  import * as R from "@radix-ui/react-dialog";
17
17
  import { createParser as oe } from "eventsource-parser";
18
+ //#region src/ConnectionInventoryNotice.tsx
19
+ function se({ inventory: e }) {
20
+ return e?.connectionsComplete === !1 ? /* @__PURE__ */ O("p", {
21
+ className: "overview-alert",
22
+ role: "status",
23
+ children: "Connection inventory incomplete. Some gateways are unavailable; connection counts may be lower than actual. Retrying automatically."
24
+ }) : null;
25
+ }
26
+ //#endregion
18
27
  //#region src/lib/utils.ts
19
- var se = O({ prefix: "la" });
28
+ var ce = M({ prefix: "la" });
20
29
  function z(...e) {
21
- return se(D(e));
30
+ return ce(j(e));
22
31
  }
23
32
  //#endregion
24
33
  //#region src/components/ui/command.tsx
25
- function ce({ className: e, ...t }) {
26
- return /* @__PURE__ */ A(E, {
34
+ function le({ className: e, ...t }) {
35
+ return /* @__PURE__ */ O(A, {
27
36
  "data-slot": "command",
28
37
  className: z("la:flex la:h-full la:w-full la:flex-col la:overflow-hidden la:rounded-md la:bg-popover la:text-popover-foreground", e),
29
38
  ...t
30
39
  });
31
40
  }
32
- function le({ className: e, ...t }) {
33
- return /* @__PURE__ */ j("div", {
41
+ function ue({ className: e, ...t }) {
42
+ return /* @__PURE__ */ k("div", {
34
43
  "data-slot": "command-input-wrapper",
35
44
  className: "la:flex la:h-9 la:items-center la:gap-2 la:border-b la:px-3",
36
- children: [/* @__PURE__ */ A(S, { className: "la:size-4 la:shrink-0 la:opacity-50" }), /* @__PURE__ */ A(E.Input, {
45
+ children: [/* @__PURE__ */ O(C, { className: "la:size-4 la:shrink-0 la:opacity-50" }), /* @__PURE__ */ O(A.Input, {
37
46
  "data-slot": "command-input",
38
47
  className: z("la:flex la:h-10 la:w-full la:rounded-md la:bg-transparent la:py-3 la:text-sm la:outline-hidden la:placeholder:text-muted-foreground la:disabled:cursor-not-allowed la:disabled:opacity-50", e),
39
48
  ...t
40
49
  })]
41
50
  });
42
51
  }
43
- function ue({ className: e, ...t }) {
44
- return /* @__PURE__ */ A(E.List, {
52
+ function de({ className: e, ...t }) {
53
+ return /* @__PURE__ */ O(A.List, {
45
54
  "data-slot": "command-list",
46
55
  className: z("la:max-h-[300px] la:scroll-py-1 la:overflow-x-hidden la:overflow-y-auto", e),
47
56
  ...t
48
57
  });
49
58
  }
50
- function de({ ...e }) {
51
- return /* @__PURE__ */ A(E.Empty, {
59
+ function fe({ ...e }) {
60
+ return /* @__PURE__ */ O(A.Empty, {
52
61
  "data-slot": "command-empty",
53
62
  className: "la:py-6 la:text-center la:text-sm",
54
63
  ...e
55
64
  });
56
65
  }
57
- function fe({ className: e, ...t }) {
58
- return /* @__PURE__ */ A(E.Group, {
66
+ function pe({ className: e, ...t }) {
67
+ return /* @__PURE__ */ O(A.Group, {
59
68
  "data-slot": "command-group",
60
69
  className: z("la:overflow-hidden la:p-1 la:text-foreground la:[&_[cmdk-group-heading]]:px-2 la:[&_[cmdk-group-heading]]:py-1.5 la:[&_[cmdk-group-heading]]:text-xs la:[&_[cmdk-group-heading]]:font-medium la:[&_[cmdk-group-heading]]:text-muted-foreground", e),
61
70
  ...t
62
71
  });
63
72
  }
64
- function pe({ className: e, ...t }) {
65
- return /* @__PURE__ */ A(E.Separator, {
73
+ function me({ className: e, ...t }) {
74
+ return /* @__PURE__ */ O(A.Separator, {
66
75
  "data-slot": "command-separator",
67
76
  className: z("la:-mx-1 la:h-px la:bg-border", e),
68
77
  ...t
69
78
  });
70
79
  }
71
- function me({ className: e, ...t }) {
72
- return /* @__PURE__ */ A(E.Item, {
80
+ function he({ className: e, ...t }) {
81
+ return /* @__PURE__ */ O(A.Item, {
73
82
  "data-slot": "command-item",
74
83
  className: z("la:relative la:flex la:cursor-default la:items-center la:gap-2 la:rounded-sm la:px-2 la:py-1.5 la:text-sm la:outline-hidden la:select-none la:data-[disabled=true]:pointer-events-none la:data-[disabled=true]:opacity-50 la:data-[selected=true]:bg-accent la:data-[selected=true]:text-accent-foreground la:[&_svg]:pointer-events-none la:[&_svg]:shrink-0 la:[&_svg:not([class*='size-'])]:size-4 la:[&_svg:not([class*='text-'])]:text-muted-foreground", e),
75
84
  ...t
76
85
  });
77
86
  }
78
- function he({ className: e, ...t }) {
79
- return /* @__PURE__ */ A("span", {
87
+ function ge({ className: e, ...t }) {
88
+ return /* @__PURE__ */ O("span", {
80
89
  "data-slot": "command-shortcut",
81
90
  className: z("la:ml-auto la:text-xs la:tracking-widest la:text-muted-foreground", e),
82
91
  ...t
@@ -84,9 +93,9 @@ function he({ className: e, ...t }) {
84
93
  }
85
94
  //#endregion
86
95
  //#region src/FilterCombobox.tsx
87
- function ge({ label: e, placeholder: t, value: n, onChange: r, onSelectSuggestion: i, suggestions: o, limit: s = 8, className: c }) {
88
- let [l, u] = a(!1), d = _e(o, n, s, !!i), f = d.reduce((e, t) => e.set(t.group, [...e.get(t.group) ?? [], t]), /* @__PURE__ */ new Map()), p = l && d.length > 0;
89
- return /* @__PURE__ */ j(ce, {
96
+ function _e({ label: e, placeholder: t, value: n, onChange: r, onSelectSuggestion: i, suggestions: o, limit: s = 8, className: c }) {
97
+ let [l, u] = a(!1), d = ve(o, n, s, !!i), f = d.reduce((e, t) => e.set(t.group, [...e.get(t.group) ?? [], t]), /* @__PURE__ */ new Map()), p = l && d.length > 0;
98
+ return /* @__PURE__ */ k(le, {
90
99
  label: e,
91
100
  shouldFilter: !1,
92
101
  loop: !0,
@@ -94,7 +103,7 @@ function ge({ label: e, placeholder: t, value: n, onChange: r, onSelectSuggestio
94
103
  onKeyDown: (e) => {
95
104
  e.key === "Escape" && u(!1), e.key === "ArrowDown" && u(!0);
96
105
  },
97
- children: [/* @__PURE__ */ A(le, {
106
+ children: [/* @__PURE__ */ O(ue, {
98
107
  placeholder: t,
99
108
  value: n,
100
109
  onValueChange: (e) => {
@@ -102,21 +111,21 @@ function ge({ label: e, placeholder: t, value: n, onChange: r, onSelectSuggestio
102
111
  },
103
112
  onFocus: () => u(!0),
104
113
  onBlur: () => u(!1)
105
- }), p && /* @__PURE__ */ A(ue, {
114
+ }), p && /* @__PURE__ */ O(de, {
106
115
  label: `${e} suggestions`,
107
116
  className: "la:absolute la:top-full la:right-0 la:left-0 la:z-20 la:mt-1.5 la:rounded-md la:border la:bg-popover la:text-popover-foreground la:shadow-md",
108
117
  onMouseDown: (e) => e.preventDefault(),
109
- children: [...f].map(([e, t]) => /* @__PURE__ */ A(fe, {
118
+ children: [...f].map(([e, t]) => /* @__PURE__ */ O(pe, {
110
119
  heading: e,
111
- children: t.map((t) => /* @__PURE__ */ j(me, {
120
+ children: t.map((t) => /* @__PURE__ */ k(he, {
112
121
  value: t.id ?? `${e}:${t.value}`,
113
122
  onSelect: () => {
114
123
  i ? i(t) : r(t.value), u(!1);
115
124
  },
116
- children: [/* @__PURE__ */ A("span", {
125
+ children: [/* @__PURE__ */ O("span", {
117
126
  className: "la:truncate la:font-mono la:text-xs",
118
127
  children: t.value
119
- }), t.hint && /* @__PURE__ */ A("span", {
128
+ }), t.hint && /* @__PURE__ */ O("span", {
120
129
  className: "la:ml-auto la:text-xs la:text-muted-foreground",
121
130
  children: t.hint
122
131
  })]
@@ -125,7 +134,7 @@ function ge({ label: e, placeholder: t, value: n, onChange: r, onSelectSuggestio
125
134
  })]
126
135
  });
127
136
  }
128
- function _e(e, t, n, r = !1) {
137
+ function ve(e, t, n, r = !1) {
129
138
  let i = t.trim().toLocaleLowerCase(), a = i.split(/\s+/u).filter(Boolean), o = /* @__PURE__ */ new Set(), s = [];
130
139
  for (let t of e) {
131
140
  let e = t.id ?? `${t.group}:${t.value}`, n = [t.value, ...t.keywords ?? []].join(" ").toLocaleLowerCase(), c = t.value.toLocaleLowerCase() === i && !t.keywords?.length;
@@ -135,7 +144,7 @@ function _e(e, t, n, r = !1) {
135
144
  }
136
145
  //#endregion
137
146
  //#region src/request-timeline.ts
138
- function ve(e) {
147
+ function ye(e) {
139
148
  let t = [...e].sort((e, t) => e.startedAtMs - t.startedAtMs || e.sequence - t.sequence), n = t[0]?.startedAtMs ?? 0, r = n, i = /* @__PURE__ */ new Map(), a = t.map((e) => {
140
149
  let t = JSON.stringify([
141
150
  e.projectId,
@@ -152,10 +161,10 @@ function ve(e) {
152
161
  start: n,
153
162
  span: r - n,
154
163
  calls: a,
155
- rows: ye(a)
164
+ rows: be(a)
156
165
  };
157
166
  }
158
- function ye(e) {
167
+ function be(e) {
159
168
  let t = /* @__PURE__ */ new Map();
160
169
  for (let n of e) {
161
170
  let { record: e } = n, r = JSON.stringify([
@@ -176,130 +185,130 @@ function ye(e) {
176
185
  function B(e) {
177
186
  return e >= 6e4 ? `${(e / 6e4).toLocaleString(void 0, { maximumFractionDigits: 2 })} min` : e >= 1e3 ? `${(e / 1e3).toLocaleString(void 0, { maximumFractionDigits: 2 })} s` : `${e.toLocaleString(void 0, { maximumFractionDigits: 1 })} ms`;
178
187
  }
179
- function be(e) {
188
+ function xe(e) {
180
189
  return e === null ? "First in view" : e < 0 ? "Overlapping" : e === 0 ? "No gap" : `${B(e)} gap`;
181
190
  }
182
191
  //#endregion
183
192
  //#region src/RequestTimeline.tsx
184
- var xe = [
193
+ var Se = [
185
194
  0,
186
195
  .25,
187
196
  .5,
188
197
  .75,
189
198
  1
190
199
  ];
191
- function Se({ records: e, selected: t, onSelect: n }) {
192
- let { start: r, span: i, rows: a } = ve(e), o = Math.max(1, i);
193
- return /* @__PURE__ */ j("div", {
200
+ function Ce({ records: e, selected: t, onSelect: n }) {
201
+ let { start: r, span: i, rows: a } = ye(e), o = Math.max(1, i);
202
+ return /* @__PURE__ */ k("div", {
194
203
  className: "request-waterfall",
195
204
  role: "group",
196
205
  "aria-label": "Invocation waterfall",
197
206
  children: [
198
- /* @__PURE__ */ A(Ce, {
207
+ /* @__PURE__ */ O(we, {
199
208
  count: e.length,
200
209
  span: i
201
210
  }),
202
- /* @__PURE__ */ j("div", {
211
+ /* @__PURE__ */ k("div", {
203
212
  className: "request-waterfall-scroll",
204
213
  tabIndex: 0,
205
214
  "aria-label": "Invocation timeline, scroll for more calls",
206
- children: [/* @__PURE__ */ j("div", {
215
+ children: [/* @__PURE__ */ k("div", {
207
216
  className: "request-waterfall-axis",
208
217
  "aria-hidden": "true",
209
218
  children: [
210
- /* @__PURE__ */ A("span", { children: "Operation / instance" }),
211
- /* @__PURE__ */ A("div", { children: xe.map((e) => /* @__PURE__ */ A("span", {
219
+ /* @__PURE__ */ O("span", { children: "Operation / instance" }),
220
+ /* @__PURE__ */ O("div", { children: Se.map((e) => /* @__PURE__ */ O("span", {
212
221
  style: { left: `${e * 100}%` },
213
222
  children: B(o * e)
214
223
  }, e)) }),
215
- /* @__PURE__ */ A("span", { children: "Calls / total" })
224
+ /* @__PURE__ */ O("span", { children: "Calls / total" })
216
225
  ]
217
- }), a.map((e) => /* @__PURE__ */ A(we, {
226
+ }), a.map((e) => /* @__PURE__ */ O(Te, {
218
227
  row: e,
219
228
  scale: o,
220
229
  selected: t,
221
230
  onSelect: n
222
231
  }, e.key))]
223
232
  }),
224
- /* @__PURE__ */ j("div", {
233
+ /* @__PURE__ */ k("div", {
225
234
  className: "request-waterfall-caption",
226
- children: [/* @__PURE__ */ j("span", { children: ["Relative to ", /* @__PURE__ */ A("time", {
235
+ children: [/* @__PURE__ */ k("span", { children: ["Relative to ", /* @__PURE__ */ O("time", {
227
236
  dateTime: new Date(r).toISOString(),
228
237
  children: new Date(r).toLocaleString([], { hour12: !1 })
229
- })] }), /* @__PURE__ */ A("span", { children: "Gaps use preceding calls on the same instance in this view." })]
238
+ })] }), /* @__PURE__ */ O("span", { children: "Gaps use preceding calls on the same instance in this view." })]
230
239
  })
231
240
  ]
232
241
  });
233
242
  }
234
- function Ce({ count: e, span: t }) {
235
- return /* @__PURE__ */ j("div", {
243
+ function we({ count: e, span: t }) {
244
+ return /* @__PURE__ */ k("div", {
236
245
  className: "request-waterfall-heading",
237
- children: [/* @__PURE__ */ j("div", { children: [/* @__PURE__ */ A("strong", { children: "Invocation waterfall" }), /* @__PURE__ */ j("span", { children: [
246
+ children: [/* @__PURE__ */ k("div", { children: [/* @__PURE__ */ O("strong", { children: "Invocation waterfall" }), /* @__PURE__ */ k("span", { children: [
238
247
  e.toLocaleString(),
239
248
  " calls · ",
240
249
  B(t),
241
250
  " elapsed"
242
- ] })] }), /* @__PURE__ */ j("ul", {
251
+ ] })] }), /* @__PURE__ */ k("ul", {
243
252
  className: "request-waterfall-legend",
244
253
  "aria-label": "Timing legend",
245
254
  children: [
246
- /* @__PURE__ */ j("li", { children: [/* @__PURE__ */ A("i", { className: "request-waterfall-method" }), "Method"] }),
247
- /* @__PURE__ */ j("li", { children: [/* @__PURE__ */ A("i", { className: "request-waterfall-websocket" }), "WebSocket"] }),
248
- /* @__PURE__ */ j("li", { children: [/* @__PURE__ */ A("i", { className: "request-waterfall-queue" }), "Queue wait"] }),
249
- /* @__PURE__ */ j("li", { children: [/* @__PURE__ */ A("i", { className: "request-waterfall-failed" }), "Failed / rejected"] }),
250
- /* @__PURE__ */ j("li", { children: [/* @__PURE__ */ A("i", { className: "request-waterfall-interrupted" }), "Interrupted / rerouted"] })
255
+ /* @__PURE__ */ k("li", { children: [/* @__PURE__ */ O("i", { className: "request-waterfall-method" }), "Method"] }),
256
+ /* @__PURE__ */ k("li", { children: [/* @__PURE__ */ O("i", { className: "request-waterfall-websocket" }), "WebSocket"] }),
257
+ /* @__PURE__ */ k("li", { children: [/* @__PURE__ */ O("i", { className: "request-waterfall-queue" }), "Queue wait"] }),
258
+ /* @__PURE__ */ k("li", { children: [/* @__PURE__ */ O("i", { className: "request-waterfall-failed" }), "Failed / rejected"] }),
259
+ /* @__PURE__ */ k("li", { children: [/* @__PURE__ */ O("i", { className: "request-waterfall-interrupted" }), "Interrupted / rerouted"] })
251
260
  ]
252
261
  })]
253
262
  });
254
263
  }
255
- function we({ row: { record: e, calls: t }, scale: n, selected: r, onSelect: i }) {
256
- return /* @__PURE__ */ j("div", {
264
+ function Te({ row: { record: e, calls: t }, scale: n, selected: r, onSelect: i }) {
265
+ return /* @__PURE__ */ k("div", {
257
266
  className: "request-waterfall-row",
258
267
  role: "group",
259
268
  "aria-label": `${e.operation} ${e.kind} calls on ${e.actorName} / ${e.actorId}`,
260
269
  "data-state": t.some((e) => e.record === r) ? "selected" : void 0,
261
270
  children: [
262
- /* @__PURE__ */ j("span", {
271
+ /* @__PURE__ */ k("span", {
263
272
  className: "request-waterfall-label",
264
- children: [/* @__PURE__ */ A("strong", { children: e.operation }), /* @__PURE__ */ j("span", { children: [
273
+ children: [/* @__PURE__ */ O("strong", { children: e.operation }), /* @__PURE__ */ k("span", { children: [
265
274
  e.actorName,
266
275
  " / ",
267
276
  e.actorId
268
277
  ] })]
269
278
  }),
270
- /* @__PURE__ */ j("span", {
279
+ /* @__PURE__ */ k("span", {
271
280
  className: "request-waterfall-track",
272
- children: [xe.map((e) => /* @__PURE__ */ A("i", {
281
+ children: [Se.map((e) => /* @__PURE__ */ O("i", {
273
282
  className: "request-waterfall-gridline",
274
283
  "aria-hidden": "true",
275
284
  style: { left: `${e * 100}%` }
276
- }, e)), t.map((e) => /* @__PURE__ */ A(Te, {
285
+ }, e)), t.map((e) => /* @__PURE__ */ O(Ee, {
277
286
  call: e,
278
287
  scale: n,
279
288
  selected: r === e.record,
280
289
  onSelect: i
281
290
  }, e.record.eventId ?? e.record.sequence))]
282
291
  }),
283
- /* @__PURE__ */ j("span", {
292
+ /* @__PURE__ */ k("span", {
284
293
  className: "request-waterfall-timing",
285
- children: [/* @__PURE__ */ j("strong", { children: [
294
+ children: [/* @__PURE__ */ k("strong", { children: [
286
295
  t.length.toLocaleString(),
287
296
  " ",
288
297
  t.length === 1 ? "call" : "calls"
289
- ] }), /* @__PURE__ */ j("span", { children: [B(t.reduce((e, t) => e + t.record.durationMs, 0)), " total"] })]
298
+ ] }), /* @__PURE__ */ k("span", { children: [B(t.reduce((e, t) => e + t.record.durationMs, 0)), " total"] })]
290
299
  })
291
300
  ]
292
301
  });
293
302
  }
294
- function Te({ call: { record: e, offsetMs: t, gapMs: n }, scale: r, selected: i, onSelect: a }) {
295
- return /* @__PURE__ */ j(k, { children: [n !== null && n > 0 && /* @__PURE__ */ A("span", {
303
+ function Ee({ call: { record: e, offsetMs: t, gapMs: n }, scale: r, selected: i, onSelect: a }) {
304
+ return /* @__PURE__ */ k(D, { children: [n !== null && n > 0 && /* @__PURE__ */ O("span", {
296
305
  className: "request-waterfall-gap",
297
306
  "aria-hidden": "true",
298
307
  style: {
299
308
  left: `${(t - n) / r * 100}%`,
300
309
  width: `${n / r * 100}%`
301
310
  }
302
- }), /* @__PURE__ */ A("button", {
311
+ }), /* @__PURE__ */ O("button", {
303
312
  type: "button",
304
313
  className: `request-waterfall-bar request-waterfall-${e.kind} request-waterfall-${e.outcome}`,
305
314
  style: {
@@ -307,11 +316,11 @@ function Te({ call: { record: e, offsetMs: t, gapMs: n }, scale: r, selected: i,
307
316
  width: `${e.durationMs / r * 100}%`
308
317
  },
309
318
  "data-state": i ? "selected" : void 0,
310
- "aria-label": `Inspect ${e.operation} request on ${e.actorName} / ${e.actorId}, ${e.outcome}, ${B(e.durationMs)}, starts +${B(t)}, ${be(n)}`,
319
+ "aria-label": `Inspect ${e.operation} request on ${e.actorName} / ${e.actorId}, ${e.outcome}, ${B(e.durationMs)}, starts +${B(t)}, ${xe(n)}`,
311
320
  "aria-haspopup": "dialog",
312
- title: `${e.actorName} / ${e.actorId}\n${e.operation} · ${e.outcome}\nStart: ${new Date(e.startedAtMs).toLocaleString()} (+${B(t)})\nTotal: ${B(e.durationMs)}\nQueue wait: ${e.queueWaitMs === null ? "Did not begin processing" : B(e.queueWaitMs)}\n${be(n)}${n === null ? "" : " relative to preceding calls on this instance"}`,
321
+ title: `${e.actorName} / ${e.actorId}\n${e.operation} · ${e.outcome}\nStart: ${new Date(e.startedAtMs).toLocaleString()} (+${B(t)})\nTotal: ${B(e.durationMs)}\nQueue wait: ${e.queueWaitMs === null ? "Did not begin processing" : B(e.queueWaitMs)}\n${xe(n)}${n === null ? "" : " relative to preceding calls on this instance"}`,
313
322
  onClick: (t) => a(e, t.currentTarget),
314
- children: e.queueWaitMs !== null && e.queueWaitMs > 0 && /* @__PURE__ */ A("span", {
323
+ children: e.queueWaitMs !== null && e.queueWaitMs > 0 && /* @__PURE__ */ O("span", {
315
324
  className: "request-waterfall-queue",
316
325
  style: { width: `${e.queueWaitMs / e.durationMs * 100}%` }
317
326
  })
@@ -319,7 +328,7 @@ function Te({ call: { record: e, offsetMs: t, gapMs: n }, scale: r, selected: i,
319
328
  }
320
329
  //#endregion
321
330
  //#region src/components/ui/button.tsx
322
- var Ee = N("la:inline-flex la:shrink-0 la:items-center la:justify-center la:gap-2 la:whitespace-nowrap la:rounded-md la:text-sm la:font-medium la:outline-none la:transition-[background-color,border-color,color,box-shadow,transform] la:duration-150 la:ease-out la:active:translate-y-px la:disabled:pointer-events-none la:disabled:translate-y-0 la:disabled:opacity-45 la:focus-visible:ring-2 la:focus-visible:ring-ring la:focus-visible:ring-offset-2 la:focus-visible:ring-offset-background la:aria-invalid:border-destructive la:aria-invalid:ring-destructive/25 la:[&_svg]:pointer-events-none la:[&_svg]:shrink-0 la:[&_svg:not([class*='size-'])]:size-4", {
331
+ var De = P("la:inline-flex la:shrink-0 la:items-center la:justify-center la:gap-2 la:whitespace-nowrap la:rounded-md la:text-sm la:font-medium la:outline-none la:transition-[background-color,border-color,color,box-shadow,transform] la:duration-150 la:ease-out la:active:translate-y-px la:disabled:pointer-events-none la:disabled:translate-y-0 la:disabled:opacity-45 la:focus-visible:ring-2 la:focus-visible:ring-ring la:focus-visible:ring-offset-2 la:focus-visible:ring-offset-background la:aria-invalid:border-destructive la:aria-invalid:ring-destructive/25 la:[&_svg]:pointer-events-none la:[&_svg]:shrink-0 la:[&_svg:not([class*='size-'])]:size-4", {
323
332
  variants: {
324
333
  variant: {
325
334
  default: "la:bg-primary la:text-primary-foreground la:shadow-[var(--shadow-control)] la:hover:bg-primary/88",
@@ -344,9 +353,9 @@ var Ee = N("la:inline-flex la:shrink-0 la:items-center la:justify-center la:gap-
344
353
  }
345
354
  });
346
355
  function V({ className: e, variant: t, size: n, asChild: r = !1, ...i }) {
347
- return /* @__PURE__ */ A(r ? M : "button", {
356
+ return /* @__PURE__ */ O(r ? N : "button", {
348
357
  "data-slot": "button",
349
- className: z(Ee({
358
+ className: z(De({
350
359
  variant: t,
351
360
  size: n,
352
361
  className: e
@@ -356,9 +365,9 @@ function V({ className: e, variant: t, size: n, asChild: r = !1, ...i }) {
356
365
  }
357
366
  //#endregion
358
367
  //#region src/components/ui/calendar.tsx
359
- function De({ className: e, classNames: t, showOutsideDays: n = !0, captionLayout: r = "label", buttonVariant: i = "ghost", formatters: a, components: o, ...s }) {
360
- let c = F();
361
- return /* @__PURE__ */ A(P, {
368
+ function Oe({ className: e, classNames: t, showOutsideDays: n = !0, captionLayout: r = "label", buttonVariant: i = "ghost", formatters: a, components: o, ...s }) {
369
+ let c = ne();
370
+ return /* @__PURE__ */ O(F, {
362
371
  showOutsideDays: n,
363
372
  className: z("la:group/calendar la:bg-background la:p-3 la:[--cell-size:--spacing(8)] la:[[data-slot=card-content]_&]:bg-transparent la:[[data-slot=popover-content]_&]:bg-transparent", e),
364
373
  captionLayout: r,
@@ -371,8 +380,8 @@ function De({ className: e, classNames: t, showOutsideDays: n = !0, captionLayou
371
380
  months: z("la:relative la:flex la:flex-col la:gap-4 la:md:flex-row", c.months),
372
381
  month: z("la:flex la:w-full la:flex-col la:gap-4", c.month),
373
382
  nav: z("la:absolute la:inset-x-0 la:top-0 la:flex la:w-full la:items-center la:justify-between la:gap-1", c.nav),
374
- button_previous: z(Ee({ variant: i }), "la:size-(--cell-size) la:p-0 la:select-none la:aria-disabled:opacity-50", c.button_previous),
375
- button_next: z(Ee({ variant: i }), "la:size-(--cell-size) la:p-0 la:select-none la:aria-disabled:opacity-50", c.button_next),
383
+ button_previous: z(De({ variant: i }), "la:size-(--cell-size) la:p-0 la:select-none la:aria-disabled:opacity-50", c.button_previous),
384
+ button_next: z(De({ variant: i }), "la:size-(--cell-size) la:p-0 la:select-none la:aria-disabled:opacity-50", c.button_next),
376
385
  month_caption: z("la:flex la:h-(--cell-size) la:w-full la:items-center la:justify-center la:px-(--cell-size)", c.month_caption),
377
386
  dropdowns: z("la:flex la:h-(--cell-size) la:w-full la:items-center la:justify-center la:gap-1.5 la:text-sm la:font-medium", c.dropdowns),
378
387
  dropdown_root: z("la:relative la:rounded-md la:border la:border-input la:shadow-xs la:has-focus:border-ring la:has-focus:ring-[3px] la:has-focus:ring-ring/50", c.dropdown_root),
@@ -395,20 +404,20 @@ function De({ className: e, classNames: t, showOutsideDays: n = !0, captionLayou
395
404
  ...t
396
405
  },
397
406
  components: {
398
- Root: ({ className: e, rootRef: t, ...n }) => /* @__PURE__ */ A("div", {
407
+ Root: ({ className: e, rootRef: t, ...n }) => /* @__PURE__ */ O("div", {
399
408
  "data-slot": "calendar",
400
409
  ref: t,
401
410
  className: z(e),
402
411
  ...n
403
412
  }),
404
- Chevron: ({ className: e, orientation: t, ...n }) => A(t === "left" ? m : t === "right" ? h : p, {
413
+ Chevron: ({ className: e, orientation: t, ...n }) => O(t === "left" ? m : t === "right" ? h : p, {
405
414
  className: z("la:size-4", e),
406
415
  ...n
407
416
  }),
408
- DayButton: Oe,
409
- WeekNumber: ({ children: e, ...t }) => /* @__PURE__ */ A("td", {
417
+ DayButton: ke,
418
+ WeekNumber: ({ children: e, ...t }) => /* @__PURE__ */ O("td", {
410
419
  ...t,
411
- children: /* @__PURE__ */ A("div", {
420
+ children: /* @__PURE__ */ O("div", {
412
421
  className: "la:flex la:size-(--cell-size) la:items-center la:justify-center la:text-center",
413
422
  children: e
414
423
  })
@@ -418,11 +427,11 @@ function De({ className: e, classNames: t, showOutsideDays: n = !0, captionLayou
418
427
  ...s
419
428
  });
420
429
  }
421
- function Oe({ className: t, day: n, modifiers: r, ...i }) {
422
- let a = F(), o = e.useRef(null);
430
+ function ke({ className: t, day: n, modifiers: r, ...i }) {
431
+ let a = ne(), o = e.useRef(null);
423
432
  return e.useEffect(() => {
424
433
  r.focused && o.current?.focus();
425
- }, [r.focused]), /* @__PURE__ */ A(V, {
434
+ }, [r.focused]), /* @__PURE__ */ O(V, {
426
435
  ref: o,
427
436
  variant: "ghost",
428
437
  size: "icon",
@@ -438,7 +447,7 @@ function Oe({ className: t, day: n, modifiers: r, ...i }) {
438
447
  //#endregion
439
448
  //#region src/components/ui/input.tsx
440
449
  function H({ className: e, type: t, ...n }) {
441
- return /* @__PURE__ */ A("input", {
450
+ return /* @__PURE__ */ O("input", {
442
451
  type: t,
443
452
  "data-slot": "input",
444
453
  className: z("la:flex la:h-9 la:w-full la:min-w-0 la:rounded-md la:border la:border-input la:bg-card la:px-3 la:py-1 la:text-sm la:text-foreground la:outline-none la:transition-colors la:placeholder:text-muted-foreground la:focus-visible:border-ring la:focus-visible:ring-2 la:focus-visible:ring-ring/20 la:disabled:cursor-not-allowed la:disabled:opacity-50 la:max-md:min-h-11", e),
@@ -447,20 +456,20 @@ function H({ className: e, type: t, ...n }) {
447
456
  }
448
457
  //#endregion
449
458
  //#region src/components/ui/popover.tsx
450
- function ke({ ...e }) {
451
- return /* @__PURE__ */ A(I.Root, {
459
+ function Ae({ ...e }) {
460
+ return /* @__PURE__ */ O(I.Root, {
452
461
  "data-slot": "popover",
453
462
  ...e
454
463
  });
455
464
  }
456
- function Ae({ ...e }) {
457
- return /* @__PURE__ */ A(I.Trigger, {
465
+ function je({ ...e }) {
466
+ return /* @__PURE__ */ O(I.Trigger, {
458
467
  "data-slot": "popover-trigger",
459
468
  ...e
460
469
  });
461
470
  }
462
- function je({ className: e, align: t = "center", sideOffset: n = 4, ...r }) {
463
- return /* @__PURE__ */ A(I.Portal, { children: /* @__PURE__ */ A(I.Content, {
471
+ function Me({ className: e, align: t = "center", sideOffset: n = 4, ...r }) {
472
+ return /* @__PURE__ */ O(I.Portal, { children: /* @__PURE__ */ O(I.Content, {
464
473
  "data-slot": "popover-content",
465
474
  align: t,
466
475
  sideOffset: n,
@@ -468,28 +477,28 @@ function je({ className: e, align: t = "center", sideOffset: n = 4, ...r }) {
468
477
  ...r
469
478
  }) });
470
479
  }
471
- function Me({ ...e }) {
472
- return /* @__PURE__ */ A(I.Anchor, {
480
+ function Ne({ ...e }) {
481
+ return /* @__PURE__ */ O(I.Anchor, {
473
482
  "data-slot": "popover-anchor",
474
483
  ...e
475
484
  });
476
485
  }
477
- function Ne({ className: e, ...t }) {
478
- return /* @__PURE__ */ A("div", {
486
+ function Pe({ className: e, ...t }) {
487
+ return /* @__PURE__ */ O("div", {
479
488
  "data-slot": "popover-header",
480
489
  className: z("la:flex la:flex-col la:gap-1 la:text-sm", e),
481
490
  ...t
482
491
  });
483
492
  }
484
- function Pe({ className: e, ...t }) {
485
- return /* @__PURE__ */ A("div", {
493
+ function Fe({ className: e, ...t }) {
494
+ return /* @__PURE__ */ O("div", {
486
495
  "data-slot": "popover-title",
487
496
  className: z("la:font-medium", e),
488
497
  ...t
489
498
  });
490
499
  }
491
- function Fe({ className: e, ...t }) {
492
- return /* @__PURE__ */ A("p", {
500
+ function Ie({ className: e, ...t }) {
501
+ return /* @__PURE__ */ O("p", {
493
502
  "data-slot": "popover-description",
494
503
  className: z("la:text-muted-foreground", e),
495
504
  ...t
@@ -497,7 +506,7 @@ function Fe({ className: e, ...t }) {
497
506
  }
498
507
  //#endregion
499
508
  //#region src/time-range.ts
500
- var Ie = [
509
+ var Le = [
501
510
  {
502
511
  minutes: 5,
503
512
  label: "Last 5 minutes"
@@ -522,11 +531,11 @@ var Ie = [
522
531
  minutes: 10080,
523
532
  label: "Last 7 days"
524
533
  }
525
- ], Le = {
534
+ ], Re = {
526
535
  kind: "relative",
527
536
  minutes: 60
528
537
  };
529
- function Re(e, t) {
538
+ function ze(e, t) {
530
539
  switch (e.kind) {
531
540
  case "relative": return { fromMs: Math.floor((t - e.minutes * 6e4) / 6e4) * 6e4 };
532
541
  case "absolute": return {
@@ -536,24 +545,24 @@ function Re(e, t) {
536
545
  case "all": return {};
537
546
  }
538
547
  }
539
- function ze(e) {
548
+ function Be(e) {
540
549
  switch (e.kind) {
541
- case "relative": return Ie.find((t) => t.minutes === e.minutes)?.label ?? `Last ${e.minutes} minutes`;
542
- case "absolute": return `${Ve(e.fromMs, e.toMs)} – ${Ve(e.toMs, e.fromMs)}`;
550
+ case "relative": return Le.find((t) => t.minutes === e.minutes)?.label ?? `Last ${e.minutes} minutes`;
551
+ case "absolute": return `${He(e.fromMs, e.toMs)} – ${He(e.toMs, e.fromMs)}`;
543
552
  case "all": return "All retained";
544
553
  }
545
554
  }
546
555
  function U(e) {
547
556
  switch (e.kind) {
548
- case "relative": return `in the ${ze(e).toLocaleLowerCase()}`;
549
- case "absolute": return `between ${ze(e)}`;
557
+ case "relative": return `in the ${Be(e).toLocaleLowerCase()}`;
558
+ case "absolute": return `between ${Be(e)}`;
550
559
  case "all": return "in retained history";
551
560
  }
552
561
  }
553
- function Be(e, t) {
562
+ function Ve(e, t) {
554
563
  return e.kind === t.kind && (e.kind !== "relative" || e.minutes === t.minutes) && (e.kind !== "absolute" || e.fromMs === t.fromMs && e.toMs === t.toMs);
555
564
  }
556
- function Ve(e, t) {
565
+ function He(e, t) {
557
566
  let n = new Date(e), r = n.toDateString() === new Date(t).toDateString(), i = n.toLocaleTimeString([], {
558
567
  hour: "2-digit",
559
568
  minute: "2-digit",
@@ -566,45 +575,45 @@ function Ve(e, t) {
566
575
  }
567
576
  //#endregion
568
577
  //#region src/TimeRangePicker.tsx
569
- function He({ value: e, onChange: t, allowAll: n = !0, className: r, align: i = "end" }) {
570
- let [o, s] = a(!1), [c, l] = a(() => We(e)), [d, p] = a(!1), m = (e) => {
578
+ function Ue({ value: e, onChange: t, allowAll: n = !0, className: r, align: i = "end" }) {
579
+ let [o, s] = a(!1), [c, l] = a(() => Ge(e)), [d, p] = a(!1), m = (e) => {
571
580
  t(e), s(!1);
572
581
  };
573
- return /* @__PURE__ */ j(ke, {
582
+ return /* @__PURE__ */ k(Ae, {
574
583
  open: o,
575
584
  onOpenChange: (t) => {
576
- t && (l(We(e)), p(!1)), s(t);
585
+ t && (l(Ge(e)), p(!1)), s(t);
577
586
  },
578
- children: [/* @__PURE__ */ A(Ae, {
587
+ children: [/* @__PURE__ */ O(je, {
579
588
  asChild: !0,
580
- children: /* @__PURE__ */ j(V, {
589
+ children: /* @__PURE__ */ k(V, {
581
590
  type: "button",
582
591
  variant: "outline",
583
592
  className: r,
584
- "aria-label": `Time range: ${ze(e)}`,
593
+ "aria-label": `Time range: ${Be(e)}`,
585
594
  children: [
586
- /* @__PURE__ */ A(u, { "aria-hidden": "true" }),
587
- /* @__PURE__ */ A("span", {
595
+ /* @__PURE__ */ O(u, { "aria-hidden": "true" }),
596
+ /* @__PURE__ */ O("span", {
588
597
  className: "la:truncate la:tabular-nums",
589
- children: ze(e)
598
+ children: Be(e)
590
599
  }),
591
- /* @__PURE__ */ A(f, {
600
+ /* @__PURE__ */ O(f, {
592
601
  "aria-hidden": "true",
593
602
  className: "la:text-muted-foreground"
594
603
  })
595
604
  ]
596
605
  })
597
- }), /* @__PURE__ */ j(je, {
606
+ }), /* @__PURE__ */ k(Me, {
598
607
  align: i,
599
608
  "aria-label": "Time range",
600
609
  className: "la:flex la:w-auto la:p-0 la:text-sm",
601
- children: [/* @__PURE__ */ j("div", {
610
+ children: [/* @__PURE__ */ k("div", {
602
611
  className: "la:flex la:flex-col la:gap-0.5 la:border-r la:p-2",
603
612
  role: "group",
604
613
  "aria-label": "Preset ranges",
605
- children: [Ie.map((t) => /* @__PURE__ */ A(Ue, {
614
+ children: [Le.map((t) => /* @__PURE__ */ O(We, {
606
615
  label: t.label,
607
- selected: Be(e, {
616
+ selected: Ve(e, {
608
617
  kind: "relative",
609
618
  minutes: t.minutes
610
619
  }),
@@ -612,17 +621,17 @@ function He({ value: e, onChange: t, allowAll: n = !0, className: r, align: i =
612
621
  kind: "relative",
613
622
  minutes: t.minutes
614
623
  })
615
- }, t.minutes)), n && /* @__PURE__ */ A(Ue, {
624
+ }, t.minutes)), n && /* @__PURE__ */ O(We, {
616
625
  label: "All retained",
617
626
  selected: e.kind === "all",
618
627
  onSelect: () => m({ kind: "all" })
619
628
  })]
620
- }), /* @__PURE__ */ j("form", {
629
+ }), /* @__PURE__ */ k("form", {
621
630
  className: "la:flex la:w-[22rem] la:flex-col",
622
631
  "aria-label": "Custom range",
623
632
  onSubmit: (e) => {
624
633
  e.preventDefault();
625
- let t = Ge(c);
634
+ let t = Ke(c);
626
635
  if (!t) {
627
636
  p(!0);
628
637
  return;
@@ -630,7 +639,7 @@ function He({ value: e, onChange: t, allowAll: n = !0, className: r, align: i =
630
639
  p(!1), m(t);
631
640
  },
632
641
  children: [
633
- /* @__PURE__ */ A(De, {
642
+ /* @__PURE__ */ O(Oe, {
634
643
  mode: "range",
635
644
  numberOfMonths: 1,
636
645
  defaultMonth: c.dates?.to ?? c.dates?.from,
@@ -641,12 +650,12 @@ function He({ value: e, onChange: t, allowAll: n = !0, className: r, align: i =
641
650
  })),
642
651
  disabled: { after: /* @__PURE__ */ new Date() }
643
652
  }),
644
- /* @__PURE__ */ j("div", {
653
+ /* @__PURE__ */ k("div", {
645
654
  className: "la:flex la:items-end la:gap-2 la:border-t la:px-3 la:py-3",
646
655
  children: [
647
- /* @__PURE__ */ j("label", {
656
+ /* @__PURE__ */ k("label", {
648
657
  className: "la:grid la:gap-1 la:text-xs la:text-muted-foreground",
649
- children: ["From", /* @__PURE__ */ A(H, {
658
+ children: ["From", /* @__PURE__ */ O(H, {
650
659
  type: "time",
651
660
  name: "from",
652
661
  required: !0,
@@ -659,9 +668,9 @@ function He({ value: e, onChange: t, allowAll: n = !0, className: r, align: i =
659
668
  "aria-invalid": d || void 0
660
669
  })]
661
670
  }),
662
- /* @__PURE__ */ j("label", {
671
+ /* @__PURE__ */ k("label", {
663
672
  className: "la:grid la:gap-1 la:text-xs la:text-muted-foreground",
664
- children: ["To", /* @__PURE__ */ A(H, {
673
+ children: ["To", /* @__PURE__ */ O(H, {
665
674
  type: "time",
666
675
  name: "to",
667
676
  required: !0,
@@ -674,7 +683,7 @@ function He({ value: e, onChange: t, allowAll: n = !0, className: r, align: i =
674
683
  "aria-invalid": d || void 0
675
684
  })]
676
685
  }),
677
- /* @__PURE__ */ A(V, {
686
+ /* @__PURE__ */ O(V, {
678
687
  type: "submit",
679
688
  variant: "outline",
680
689
  size: "sm",
@@ -684,7 +693,7 @@ function He({ value: e, onChange: t, allowAll: n = !0, className: r, align: i =
684
693
  })
685
694
  ]
686
695
  }),
687
- d && /* @__PURE__ */ A("p", {
696
+ d && /* @__PURE__ */ O("p", {
688
697
  className: "la:px-3 la:pb-3 la:text-xs la:text-danger",
689
698
  role: "alert",
690
699
  children: "From must be before To."
@@ -694,8 +703,8 @@ function He({ value: e, onChange: t, allowAll: n = !0, className: r, align: i =
694
703
  })]
695
704
  });
696
705
  }
697
- function Ue({ label: e, selected: t, onSelect: n }) {
698
- return /* @__PURE__ */ A(V, {
706
+ function We({ label: e, selected: t, onSelect: n }) {
707
+ return /* @__PURE__ */ O(V, {
699
708
  type: "button",
700
709
  variant: t ? "secondary" : "ghost",
701
710
  size: "sm",
@@ -705,40 +714,40 @@ function Ue({ label: e, selected: t, onSelect: n }) {
705
714
  children: e
706
715
  });
707
716
  }
708
- function We(e) {
709
- let t = Date.now(), n = Re(e, t), r = new Date(n.fromMs ?? t - 36e5), i = new Date(n.toMs ?? t);
717
+ function Ge(e) {
718
+ let t = Date.now(), n = ze(e, t), r = new Date(n.fromMs ?? t - 36e5), i = new Date(n.toMs ?? t);
710
719
  return {
711
720
  dates: {
712
- from: Ke(r),
713
- to: Ke(i)
721
+ from: qe(r),
722
+ to: qe(i)
714
723
  },
715
- fromTime: qe(r),
716
- toTime: qe(i)
724
+ fromTime: Je(r),
725
+ toTime: Je(i)
717
726
  };
718
727
  }
719
- function Ge(e) {
728
+ function Ke(e) {
720
729
  let t = e.dates?.from, n = e.dates?.to ?? t;
721
730
  if (!t || !n) return null;
722
- let r = Je(t, e.fromTime), i = Je(n, e.toTime);
731
+ let r = Ye(t, e.fromTime), i = Ye(n, e.toTime);
723
732
  return Number.isFinite(r) && Number.isFinite(i) && r < i ? {
724
733
  kind: "absolute",
725
734
  fromMs: r,
726
735
  toMs: i
727
736
  } : null;
728
737
  }
729
- function Ke(e) {
738
+ function qe(e) {
730
739
  return new Date(e.getFullYear(), e.getMonth(), e.getDate());
731
740
  }
732
- function qe(e) {
741
+ function Je(e) {
733
742
  return `${String(e.getHours()).padStart(2, "0")}:${String(e.getMinutes()).padStart(2, "0")}`;
734
743
  }
735
- function Je(e, t) {
744
+ function Ye(e, t) {
736
745
  let [n, r] = t.split(":").map(Number);
737
746
  return new Date(e.getFullYear(), e.getMonth(), e.getDate(), n ?? 0, r ?? 0).getTime();
738
747
  }
739
748
  //#endregion
740
749
  //#region src/components/ui/badge.tsx
741
- var Ye = N("la:inline-flex la:items-center la:justify-center la:gap-1.5 la:rounded-md la:border la:px-2 la:py-0.5 la:text-xs la:font-medium la:whitespace-nowrap", {
750
+ var Xe = P("la:inline-flex la:items-center la:justify-center la:gap-1.5 la:rounded-md la:border la:px-2 la:py-0.5 la:text-xs la:font-medium la:whitespace-nowrap", {
742
751
  variants: { variant: {
743
752
  default: "la:border-transparent la:bg-muted la:text-muted-foreground",
744
753
  outline: "la:border-border la:text-muted-foreground"
@@ -746,79 +755,79 @@ var Ye = N("la:inline-flex la:items-center la:justify-center la:gap-1.5 la:round
746
755
  defaultVariants: { variant: "default" }
747
756
  });
748
757
  function W({ className: e, variant: t, ...n }) {
749
- return /* @__PURE__ */ A("span", {
758
+ return /* @__PURE__ */ O("span", {
750
759
  "data-slot": "badge",
751
- className: z(Ye({ variant: t }), e),
760
+ className: z(Xe({ variant: t }), e),
752
761
  ...n
753
762
  });
754
763
  }
755
764
  //#endregion
756
765
  //#region src/components/ui/drawer.tsx
757
- function Xe({ ...e }) {
758
- return /* @__PURE__ */ A(L.Root, {
766
+ function Ze({ ...e }) {
767
+ return /* @__PURE__ */ O(L.Root, {
759
768
  "data-slot": "drawer",
760
769
  ...e
761
770
  });
762
771
  }
763
- function Ze({ ...e }) {
764
- return /* @__PURE__ */ A(L.Trigger, {
772
+ function Qe({ ...e }) {
773
+ return /* @__PURE__ */ O(L.Trigger, {
765
774
  "data-slot": "drawer-trigger",
766
775
  ...e
767
776
  });
768
777
  }
769
- function Qe({ ...e }) {
770
- return /* @__PURE__ */ A(L.Portal, {
778
+ function $e({ ...e }) {
779
+ return /* @__PURE__ */ O(L.Portal, {
771
780
  "data-slot": "drawer-portal",
772
781
  ...e
773
782
  });
774
783
  }
775
- function $e({ ...e }) {
776
- return /* @__PURE__ */ A(L.Close, {
784
+ function et({ ...e }) {
785
+ return /* @__PURE__ */ O(L.Close, {
777
786
  "data-slot": "drawer-close",
778
787
  ...e
779
788
  });
780
789
  }
781
- function et({ className: e, ...t }) {
782
- return /* @__PURE__ */ A(L.Overlay, {
790
+ function tt({ className: e, ...t }) {
791
+ return /* @__PURE__ */ O(L.Overlay, {
783
792
  "data-slot": "drawer-overlay",
784
793
  className: z("la:fixed la:inset-0 la:z-50 la:bg-black/50 la:data-[state=closed]:animate-out la:data-[state=closed]:fade-out-0 la:data-[state=open]:animate-in la:data-[state=open]:fade-in-0", e),
785
794
  ...t
786
795
  });
787
796
  }
788
- function tt({ className: e, children: t, container: n, ...r }) {
789
- return /* @__PURE__ */ j(Qe, {
797
+ function nt({ className: e, children: t, container: n, ...r }) {
798
+ return /* @__PURE__ */ k($e, {
790
799
  container: n,
791
- children: [/* @__PURE__ */ A(et, {}), /* @__PURE__ */ j(L.Content, {
800
+ children: [/* @__PURE__ */ O(tt, {}), /* @__PURE__ */ k(L.Content, {
792
801
  "data-slot": "drawer-content",
793
802
  className: z("la-observer la:group/drawer-content la:fixed la:z-50 la:flex la:h-auto la:flex-col la:bg-background", "la:data-[vaul-drawer-direction=top]:inset-x-0 la:data-[vaul-drawer-direction=top]:top-0 la:data-[vaul-drawer-direction=top]:mb-24 la:data-[vaul-drawer-direction=top]:max-h-[80vh] la:data-[vaul-drawer-direction=top]:rounded-b-lg la:data-[vaul-drawer-direction=top]:border-b", "la:data-[vaul-drawer-direction=bottom]:inset-x-0 la:data-[vaul-drawer-direction=bottom]:bottom-0 la:data-[vaul-drawer-direction=bottom]:mt-24 la:data-[vaul-drawer-direction=bottom]:max-h-[80vh] la:data-[vaul-drawer-direction=bottom]:rounded-t-lg la:data-[vaul-drawer-direction=bottom]:border-t", "la:data-[vaul-drawer-direction=right]:inset-y-0 la:data-[vaul-drawer-direction=right]:right-0 la:data-[vaul-drawer-direction=right]:w-3/4 la:data-[vaul-drawer-direction=right]:border-l la:data-[vaul-drawer-direction=right]:sm:max-w-sm", "la:data-[vaul-drawer-direction=left]:inset-y-0 la:data-[vaul-drawer-direction=left]:left-0 la:data-[vaul-drawer-direction=left]:w-3/4 la:data-[vaul-drawer-direction=left]:border-r la:data-[vaul-drawer-direction=left]:sm:max-w-sm", e),
794
803
  ...r,
795
- children: [/* @__PURE__ */ A("div", { className: "la:mx-auto la:mt-4 la:hidden la:h-2 la:w-[100px] la:shrink-0 la:rounded-full la:bg-muted la:group-data-[vaul-drawer-direction=bottom]/drawer-content:block" }), t]
804
+ children: [/* @__PURE__ */ O("div", { className: "la:mx-auto la:mt-4 la:hidden la:h-2 la:w-[100px] la:shrink-0 la:rounded-full la:bg-muted la:group-data-[vaul-drawer-direction=bottom]/drawer-content:block" }), t]
796
805
  })]
797
806
  });
798
807
  }
799
- function nt({ className: e, ...t }) {
800
- return /* @__PURE__ */ A("div", {
808
+ function rt({ className: e, ...t }) {
809
+ return /* @__PURE__ */ O("div", {
801
810
  "data-slot": "drawer-header",
802
811
  className: z("la:flex la:flex-col la:gap-0.5 la:p-4 la:group-data-[vaul-drawer-direction=bottom]/drawer-content:text-center la:group-data-[vaul-drawer-direction=top]/drawer-content:text-center la:md:gap-1.5 la:md:text-left", e),
803
812
  ...t
804
813
  });
805
814
  }
806
- function rt({ className: e, ...t }) {
807
- return /* @__PURE__ */ A("div", {
815
+ function it({ className: e, ...t }) {
816
+ return /* @__PURE__ */ O("div", {
808
817
  "data-slot": "drawer-footer",
809
818
  className: z("la:mt-auto la:flex la:flex-col la:gap-2 la:p-4", e),
810
819
  ...t
811
820
  });
812
821
  }
813
- function it({ className: e, ...t }) {
814
- return /* @__PURE__ */ A(L.Title, {
822
+ function at({ className: e, ...t }) {
823
+ return /* @__PURE__ */ O(L.Title, {
815
824
  "data-slot": "drawer-title",
816
825
  className: z("la:font-semibold la:text-foreground", e),
817
826
  ...t
818
827
  });
819
828
  }
820
- function at({ className: e, ...t }) {
821
- return /* @__PURE__ */ A(L.Description, {
829
+ function ot({ className: e, ...t }) {
830
+ return /* @__PURE__ */ O(L.Description, {
822
831
  "data-slot": "drawer-description",
823
832
  className: z("la:text-sm la:text-muted-foreground", e),
824
833
  ...t
@@ -826,16 +835,16 @@ function at({ className: e, ...t }) {
826
835
  }
827
836
  //#endregion
828
837
  //#region src/components/ui/native-select.tsx
829
- function ot({ className: e, size: t = "default", ...n }) {
830
- return /* @__PURE__ */ j("div", {
838
+ function st({ className: e, size: t = "default", ...n }) {
839
+ return /* @__PURE__ */ k("div", {
831
840
  className: "la:group/native-select la:relative la:w-fit la:has-[select:disabled]:opacity-50",
832
841
  "data-slot": "native-select-wrapper",
833
- children: [/* @__PURE__ */ A("select", {
842
+ children: [/* @__PURE__ */ O("select", {
834
843
  "data-slot": "native-select",
835
844
  "data-size": t,
836
845
  className: z("la:h-9 la:w-full la:min-w-0 la:appearance-none la:rounded-md la:border la:border-input la:bg-transparent la:px-3 la:py-2 la:pr-9 la:text-sm la:shadow-xs la:outline-none la:transition-[color,box-shadow] la:selection:bg-primary la:selection:text-primary-foreground la:disabled:pointer-events-none la:disabled:cursor-not-allowed la:data-[size=sm]:h-8 la:data-[size=sm]:py-1 la:focus-visible:border-ring la:focus-visible:ring-[3px] la:focus-visible:ring-ring/50 la:aria-invalid:border-destructive la:aria-invalid:ring-destructive/20 la:dark:bg-input/30 la:dark:hover:bg-input/50 la:dark:aria-invalid:ring-destructive/40", e),
837
846
  ...n
838
- }), /* @__PURE__ */ A(p, {
847
+ }), /* @__PURE__ */ O(p, {
839
848
  className: "la:pointer-events-none la:absolute la:top-1/2 la:right-3.5 la:size-4 la:-translate-y-1/2 la:text-muted-foreground la:opacity-50 la:select-none",
840
849
  "aria-hidden": "true",
841
850
  "data-slot": "native-select-icon"
@@ -843,7 +852,7 @@ function ot({ className: e, size: t = "default", ...n }) {
843
852
  });
844
853
  }
845
854
  function G({ className: e, ...t }) {
846
- return /* @__PURE__ */ A("option", {
855
+ return /* @__PURE__ */ O("option", {
847
856
  "data-slot": "native-select-option",
848
857
  className: z("la:bg-[Canvas] la:text-[CanvasText]", e),
849
858
  ...t
@@ -852,11 +861,11 @@ function G({ className: e, ...t }) {
852
861
  //#endregion
853
862
  //#region src/components/ui/table.tsx
854
863
  function K({ className: e, containerProps: t, ...n }) {
855
- return /* @__PURE__ */ A("div", {
864
+ return /* @__PURE__ */ O("div", {
856
865
  ...t,
857
866
  "data-slot": "table-container",
858
867
  className: z("la:relative la:w-full la:overflow-x-auto", t?.className),
859
- children: /* @__PURE__ */ A("table", {
868
+ children: /* @__PURE__ */ O("table", {
860
869
  "data-slot": "table",
861
870
  className: z("la:w-full la:caption-bottom la:text-sm la:tabular-nums", e),
862
871
  ...n
@@ -864,49 +873,49 @@ function K({ className: e, containerProps: t, ...n }) {
864
873
  });
865
874
  }
866
875
  function q({ className: e, ...t }) {
867
- return /* @__PURE__ */ A("thead", {
876
+ return /* @__PURE__ */ O("thead", {
868
877
  "data-slot": "table-header",
869
878
  className: z("la:[&_tr]:border-b", e),
870
879
  ...t
871
880
  });
872
881
  }
873
882
  function J({ className: e, ...t }) {
874
- return /* @__PURE__ */ A("tbody", {
883
+ return /* @__PURE__ */ O("tbody", {
875
884
  "data-slot": "table-body",
876
885
  className: z("la:[&_tr:last-child]:border-0", e),
877
886
  ...t
878
887
  });
879
888
  }
880
- function st({ className: e, ...t }) {
881
- return /* @__PURE__ */ A("tfoot", {
889
+ function ct({ className: e, ...t }) {
890
+ return /* @__PURE__ */ O("tfoot", {
882
891
  "data-slot": "table-footer",
883
892
  className: z("la:bg-muted/50 la:border-t la:font-medium la:[&>tr]:last:border-b-0", e),
884
893
  ...t
885
894
  });
886
895
  }
887
896
  function Y({ className: e, ...t }) {
888
- return /* @__PURE__ */ A("tr", {
897
+ return /* @__PURE__ */ O("tr", {
889
898
  "data-slot": "table-row",
890
899
  className: z("la:border-b la:transition-colors la:duration-150 la:hover:bg-muted/60 la:data-[state=selected]:bg-muted", e),
891
900
  ...t
892
901
  });
893
902
  }
894
903
  function X({ className: e, ...t }) {
895
- return /* @__PURE__ */ A("th", {
904
+ return /* @__PURE__ */ O("th", {
896
905
  "data-slot": "table-head",
897
906
  className: z("la:h-10 la:whitespace-nowrap la:px-3 la:text-left la:align-middle la:text-xs la:font-medium la:text-muted-foreground la:[&:has([role=checkbox])]:pr-0 la:[&>[role=checkbox]]:translate-y-[2px]", e),
898
907
  ...t
899
908
  });
900
909
  }
901
910
  function Z({ className: e, ...t }) {
902
- return /* @__PURE__ */ A("td", {
911
+ return /* @__PURE__ */ O("td", {
903
912
  "data-slot": "table-cell",
904
913
  className: z("la:whitespace-nowrap la:px-3 la:py-2.5 la:align-middle la:[&:has([role=checkbox])]:pr-0 la:[&>[role=checkbox]]:translate-y-[2px]", e),
905
914
  ...t
906
915
  });
907
916
  }
908
- function ct({ className: e, ...t }) {
909
- return /* @__PURE__ */ A("caption", {
917
+ function lt({ className: e, ...t }) {
918
+ return /* @__PURE__ */ O("caption", {
910
919
  "data-slot": "table-caption",
911
920
  className: z("la:text-muted-foreground la:mt-4 la:text-sm", e),
912
921
  ...t
@@ -914,7 +923,7 @@ function ct({ className: e, ...t }) {
914
923
  }
915
924
  //#endregion
916
925
  //#region src/observer-hooks.ts
917
- function lt(e) {
926
+ function ut(e) {
918
927
  let [n, r] = a(0), [i, o] = a(), [s, c] = a(!0), [l, u] = a(!1);
919
928
  return t(() => {
920
929
  let t = new AbortController(), n, r = 1e3;
@@ -947,7 +956,7 @@ function lt(e) {
947
956
  retry: () => r((e) => e + 1)
948
957
  };
949
958
  }
950
- function ut(e, n = !0) {
959
+ function dt(e, n = !0) {
951
960
  let [r, i] = a(), [o, s] = a(!1), [c, l] = a(0);
952
961
  return t(() => i(void 0), [e]), t(() => {
953
962
  if (!n) return;
@@ -956,7 +965,7 @@ function ut(e, n = !0) {
956
965
  try {
957
966
  if (!e.watchRequests) throw Error("Request traces unavailable");
958
967
  if (await e.watchRequests((e) => {
959
- r.signal.aborted || (t = e.resumeCursor, i((t) => dt(t, e)), s(!1), o = 1e3);
968
+ r.signal.aborted || (t = e.resumeCursor, i((t) => ft(t, e)), s(!1), o = 1e3);
960
969
  }, r.signal, t), !r.signal.aborted) throw Error("Request stream disconnected");
961
970
  } catch {
962
971
  r.signal.aborted || s(!0);
@@ -977,7 +986,7 @@ function ut(e, n = !0) {
977
986
  retry: () => l((e) => e + 1)
978
987
  };
979
988
  }
980
- function dt(e, t) {
989
+ function ft(e, t) {
981
990
  let n = new Map((e?.epoch === t.epoch && !t.reset ? e.records : []).map((e) => [e.eventId ?? e.sequence, e]));
982
991
  for (let e of t.records) n.set(e.eventId ?? e.sequence, e);
983
992
  return {
@@ -986,7 +995,7 @@ function dt(e, t) {
986
995
  records: [...n.values()].sort((e, t) => t.sequence - e.sequence).slice(0, t.capacity)
987
996
  };
988
997
  }
989
- function ft(e, n, r, i = 1e4) {
998
+ function pt(e, n, r, i = 1e4) {
990
999
  let o = r ? JSON.stringify(n) : void 0, [s, c] = a(0), [l, u] = a(), [d, f] = a(!1), [p, m] = a(!1);
991
1000
  t(() => {
992
1001
  if (!o) return;
@@ -1029,7 +1038,7 @@ function ft(e, n, r, i = 1e4) {
1029
1038
  }
1030
1039
  //#endregion
1031
1040
  //#region src/request-history.ts
1032
- function pt(e, n) {
1041
+ function mt(e, n) {
1033
1042
  let [r, o] = a(), [s, c] = a(!1), [l, u] = a(!1), d = i(() => {});
1034
1043
  return t(() => {
1035
1044
  if (o(void 0), u(!1), c(!1), !n) return;
@@ -1072,78 +1081,78 @@ function pt(e, n) {
1072
1081
  }
1073
1082
  //#endregion
1074
1083
  //#region src/RequestObserver.tsx
1075
- function mt({ client: e, actor: n, timeRange: o, onTimeRangeChange: s, focus: c }) {
1076
- let [l, u] = a(), [f, p] = a(Le), m = o ?? f, h = s ?? p, g = pt(e, r(() => l ? {
1084
+ function ht({ client: e, actor: n, timeRange: o, onTimeRangeChange: s, focus: c }) {
1085
+ let [l, u] = a(), [f, p] = a(Re), m = o ?? f, h = s ?? p, g = mt(e, r(() => l ? {
1077
1086
  ...l,
1078
1087
  ...n,
1079
- ...l.requestId || l.connectionId ? {} : Re(m, Date.now())
1088
+ ...l.requestId || l.connectionId ? {} : ze(m, Date.now())
1080
1089
  } : void 0, [
1081
1090
  l,
1082
1091
  n?.actorName,
1083
1092
  n?.actorId,
1084
1093
  m
1085
- ])), { page: _, failed: v, retry: y } = ut(e), [x, S] = a(), [C, w] = a(), [E, D] = a("waterfall"), O = i(null), M = i(null), N = n ? "h3" : "h1", P = l ? g.page : x ?? _, F = _ ?? g.page, I = (P?.records ?? []).filter((e) => !n || e.actorName === n.actorName && e.actorId === n.actorId);
1094
+ ])), { page: _, failed: v, retry: y } = dt(e), [S, C] = a(), [w, T] = a(), [A, j] = a("waterfall"), M = i(null), N = i(null), P = n ? "h3" : "h1", F = l ? g.page : S ?? _, ne = _ ?? g.page, I = (F?.records ?? []).filter((e) => !n || e.actorName === n.actorName && e.actorId === n.actorId);
1086
1095
  return t(() => {
1087
- S(void 0), u(void 0);
1096
+ C(void 0), u(void 0);
1088
1097
  }, [
1089
1098
  e,
1090
1099
  n?.actorName,
1091
1100
  n?.actorId
1092
1101
  ]), t(() => {
1093
1102
  c && u(c);
1094
- }, [c]), t(() => w(void 0), [
1103
+ }, [c]), t(() => T(void 0), [
1095
1104
  e,
1096
1105
  _?.epoch,
1097
1106
  l,
1098
1107
  n?.actorName,
1099
1108
  n?.actorId
1100
- ]), /* @__PURE__ */ j("section", {
1101
- ref: O,
1109
+ ]), /* @__PURE__ */ k("section", {
1110
+ ref: M,
1102
1111
  className: "la-observer la-requests",
1103
1112
  "aria-label": "Request observer",
1104
1113
  children: [
1105
- (l?.requestId || l?.connectionId) && /* @__PURE__ */ j("p", { children: [
1114
+ (l?.requestId || l?.connectionId) && /* @__PURE__ */ k("p", { children: [
1106
1115
  "Showing ",
1107
1116
  l.requestId ? `request ${l.requestId}` : `connection ${l?.connectionId}`,
1108
1117
  " ",
1109
- /* @__PURE__ */ A(V, {
1118
+ /* @__PURE__ */ O(V, {
1110
1119
  variant: "link",
1111
1120
  onClick: () => u(void 0),
1112
1121
  children: "Clear filter"
1113
1122
  })
1114
1123
  ] }),
1115
- /* @__PURE__ */ j("div", {
1124
+ /* @__PURE__ */ k("div", {
1116
1125
  className: "la-observer-toolbar",
1117
- children: [/* @__PURE__ */ j("div", {
1126
+ children: [/* @__PURE__ */ k("div", {
1118
1127
  className: n ? "la:sr-only" : void 0,
1119
- children: [/* @__PURE__ */ A(N, { children: "Requests" }), /* @__PURE__ */ A("p", { children: n ? "Method calls and WebSocket events for this instance." : "Method calls and WebSocket events, with time spent waiting and processing." })]
1120
- }), /* @__PURE__ */ j("div", {
1128
+ children: [/* @__PURE__ */ O(P, { children: "Requests" }), /* @__PURE__ */ O("p", { children: n ? "Method calls and WebSocket events for this instance." : "Method calls and WebSocket events, with time spent waiting and processing." })]
1129
+ }), /* @__PURE__ */ k("div", {
1121
1130
  className: "la-request-actions",
1122
1131
  children: [
1123
- /* @__PURE__ */ j("div", {
1132
+ /* @__PURE__ */ k("div", {
1124
1133
  className: "request-view-toggle",
1125
1134
  role: "group",
1126
1135
  "aria-label": "Request view",
1127
- children: [/* @__PURE__ */ j(V, {
1128
- variant: E === "waterfall" ? "secondary" : "ghost",
1129
- "aria-pressed": E === "waterfall",
1130
- onClick: () => D("waterfall"),
1131
- children: [/* @__PURE__ */ A(d, { "aria-hidden": "true" }), "Waterfall"]
1132
- }), /* @__PURE__ */ j(V, {
1133
- variant: E === "table" ? "secondary" : "ghost",
1134
- "aria-pressed": E === "table",
1135
- onClick: () => D("table"),
1136
- children: [/* @__PURE__ */ A(ee, { "aria-hidden": "true" }), "Table"]
1136
+ children: [/* @__PURE__ */ k(V, {
1137
+ variant: A === "waterfall" ? "secondary" : "ghost",
1138
+ "aria-pressed": A === "waterfall",
1139
+ onClick: () => j("waterfall"),
1140
+ children: [/* @__PURE__ */ O(d, { "aria-hidden": "true" }), "Waterfall"]
1141
+ }), /* @__PURE__ */ k(V, {
1142
+ variant: A === "table" ? "secondary" : "ghost",
1143
+ "aria-pressed": A === "table",
1144
+ onClick: () => j("table"),
1145
+ children: [/* @__PURE__ */ O(ee, { "aria-hidden": "true" }), "Table"]
1137
1146
  })]
1138
1147
  }),
1139
- e.listRequests && /* @__PURE__ */ j(k, { children: [/* @__PURE__ */ A(V, {
1148
+ e.listRequests && /* @__PURE__ */ k(D, { children: [/* @__PURE__ */ O(V, {
1140
1149
  variant: l ? "outline" : "secondary",
1141
1150
  "aria-pressed": !l,
1142
1151
  onClick: () => {
1143
- u(void 0), S(void 0);
1152
+ u(void 0), C(void 0);
1144
1153
  },
1145
1154
  children: "Live"
1146
- }), /* @__PURE__ */ A(V, {
1155
+ }), /* @__PURE__ */ O(V, {
1147
1156
  variant: l ? "secondary" : "outline",
1148
1157
  "aria-pressed": !!l,
1149
1158
  onClick: () => {
@@ -1151,20 +1160,20 @@ function mt({ client: e, actor: n, timeRange: o, onTimeRangeChange: s, focus: c
1151
1160
  },
1152
1161
  children: "History"
1153
1162
  })] }),
1154
- !l && /* @__PURE__ */ j(k, { children: [/* @__PURE__ */ j(V, {
1163
+ !l && /* @__PURE__ */ k(D, { children: [/* @__PURE__ */ k(V, {
1155
1164
  variant: "outline",
1156
- disabled: !P,
1157
- onClick: () => S(x ? void 0 : _),
1158
- children: [A(x ? te : b, { "aria-hidden": "true" }), x ? "Resume" : "Pause"]
1159
- }), v && /* @__PURE__ */ j(V, {
1165
+ disabled: !F,
1166
+ onClick: () => C(S ? void 0 : _),
1167
+ children: [O(S ? x : b, { "aria-hidden": "true" }), S ? "Resume" : "Pause"]
1168
+ }), v && /* @__PURE__ */ k(V, {
1160
1169
  variant: "outline",
1161
1170
  onClick: y,
1162
- children: [/* @__PURE__ */ A(ne, { "aria-hidden": "true" }), "Retry"]
1171
+ children: [/* @__PURE__ */ O(te, { "aria-hidden": "true" }), "Retry"]
1163
1172
  })] })
1164
1173
  ]
1165
1174
  })]
1166
1175
  }),
1167
- l && /* @__PURE__ */ A(ht, {
1176
+ l && /* @__PURE__ */ O(gt, {
1168
1177
  query: l,
1169
1178
  range: m,
1170
1179
  onRangeChange: h,
@@ -1172,105 +1181,105 @@ function mt({ client: e, actor: n, timeRange: o, onTimeRangeChange: s, focus: c
1172
1181
  onSearch: u,
1173
1182
  scoped: !!n
1174
1183
  }),
1175
- l && g.failed && /* @__PURE__ */ j("div", {
1184
+ l && g.failed && /* @__PURE__ */ k("div", {
1176
1185
  className: "la-observer-error",
1177
1186
  role: "alert",
1178
1187
  children: [
1179
1188
  "Request history unavailable.",
1180
1189
  " ",
1181
- /* @__PURE__ */ A(V, {
1190
+ /* @__PURE__ */ O(V, {
1182
1191
  variant: "outline",
1183
1192
  onClick: g.retry,
1184
1193
  children: "Retry history"
1185
1194
  })
1186
1195
  ]
1187
1196
  }),
1188
- !l && v && /* @__PURE__ */ j("div", {
1197
+ !l && v && /* @__PURE__ */ k("div", {
1189
1198
  className: "la-observer-error",
1190
1199
  role: "alert",
1191
1200
  children: ["Request stream disconnected. Reconnecting… ", _ ? "Showing the last received requests." : "Check your connection and runtime version."]
1192
1201
  }),
1193
- !!F?.dropped && /* @__PURE__ */ j("div", {
1202
+ !!ne?.dropped && /* @__PURE__ */ k("div", {
1194
1203
  className: "la-observer-error",
1195
1204
  role: "alert",
1196
- children: [F.dropped.toLocaleString(), " request traces were not delivered. This history is incomplete."]
1205
+ children: [ne.dropped.toLocaleString(), " request traces were not delivered. This history is incomplete."]
1197
1206
  }),
1198
- F?.persistenceFailed && /* @__PURE__ */ A("div", {
1207
+ ne?.persistenceFailed && /* @__PURE__ */ O("div", {
1199
1208
  className: "la-observer-error",
1200
1209
  role: "alert",
1201
1210
  children: "Some request events could not be saved. This history may be incomplete."
1202
1211
  }),
1203
- P?.reset && /* @__PURE__ */ A("div", {
1212
+ F?.reset && /* @__PURE__ */ O("div", {
1204
1213
  className: "la-observer-error",
1205
1214
  role: "alert",
1206
1215
  children: "Some older events are no longer retained. Showing available history."
1207
1216
  }),
1208
- E === "waterfall" && I.length > 0 && /* @__PURE__ */ A(Se, {
1217
+ A === "waterfall" && I.length > 0 && /* @__PURE__ */ O(Ce, {
1209
1218
  records: I,
1210
- selected: C,
1219
+ selected: w,
1211
1220
  onSelect: (e, t) => {
1212
- M.current = t, w(e);
1221
+ N.current = t, T(e);
1213
1222
  }
1214
1223
  }),
1215
- /* @__PURE__ */ j("div", {
1216
- className: E === "table" || !I.length ? "la-observer-table-frame" : void 0,
1217
- children: [E === "table" && /* @__PURE__ */ j(K, {
1224
+ /* @__PURE__ */ k("div", {
1225
+ className: A === "table" || !I.length ? "la-observer-table-frame" : void 0,
1226
+ children: [A === "table" && /* @__PURE__ */ k(K, {
1218
1227
  "aria-label": l ? "Saved requests" : "Recent requests",
1219
1228
  className: "la-request-table",
1220
- children: [/* @__PURE__ */ A(q, { children: /* @__PURE__ */ j(Y, { children: [
1221
- /* @__PURE__ */ A(X, {
1229
+ children: [/* @__PURE__ */ O(q, { children: /* @__PURE__ */ k(Y, { children: [
1230
+ /* @__PURE__ */ O(X, {
1222
1231
  scope: "col",
1223
1232
  children: "Time"
1224
1233
  }),
1225
- /* @__PURE__ */ A(X, {
1234
+ /* @__PURE__ */ O(X, {
1226
1235
  scope: "col",
1227
1236
  children: "Request"
1228
1237
  }),
1229
- /* @__PURE__ */ A(X, {
1238
+ /* @__PURE__ */ O(X, {
1230
1239
  scope: "col",
1231
1240
  children: "Instance"
1232
1241
  }),
1233
- /* @__PURE__ */ A(X, {
1242
+ /* @__PURE__ */ O(X, {
1234
1243
  scope: "col",
1235
1244
  children: "Transport"
1236
1245
  }),
1237
- /* @__PURE__ */ A(X, {
1246
+ /* @__PURE__ */ O(X, {
1238
1247
  scope: "col",
1239
1248
  children: "Outcome"
1240
1249
  }),
1241
- /* @__PURE__ */ A(X, {
1250
+ /* @__PURE__ */ O(X, {
1242
1251
  scope: "col",
1243
1252
  children: "Total"
1244
1253
  }),
1245
- /* @__PURE__ */ A(X, {
1254
+ /* @__PURE__ */ O(X, {
1246
1255
  scope: "col",
1247
1256
  children: "Queue wait"
1248
1257
  }),
1249
- /* @__PURE__ */ A(X, {
1258
+ /* @__PURE__ */ O(X, {
1250
1259
  scope: "col",
1251
- children: /* @__PURE__ */ A("span", {
1260
+ children: /* @__PURE__ */ O("span", {
1252
1261
  className: "la:sr-only",
1253
1262
  children: "Details"
1254
1263
  })
1255
1264
  })
1256
- ] }) }), /* @__PURE__ */ A(J, { children: I.map((e) => /* @__PURE__ */ j(Y, {
1265
+ ] }) }), /* @__PURE__ */ O(J, { children: I.map((e) => /* @__PURE__ */ k(Y, {
1257
1266
  className: "la-clickable-row",
1258
- "data-state": C === e ? "selected" : void 0,
1267
+ "data-state": w === e ? "selected" : void 0,
1259
1268
  onClick: (t) => {
1260
- M.current = t.currentTarget.querySelector("button"), w(e);
1269
+ N.current = t.currentTarget.querySelector("button"), T(e);
1261
1270
  },
1262
1271
  children: [
1263
- /* @__PURE__ */ A(Z, { children: /* @__PURE__ */ A("time", {
1272
+ /* @__PURE__ */ O(Z, { children: /* @__PURE__ */ O("time", {
1264
1273
  dateTime: new Date(e.startedAtMs).toISOString(),
1265
1274
  title: new Date(e.startedAtMs).toLocaleString(),
1266
1275
  children: l ? new Date(e.startedAtMs).toLocaleString([], { hour12: !1 }) : new Date(e.startedAtMs).toLocaleTimeString([], { hour12: !1 })
1267
1276
  }) }),
1268
- /* @__PURE__ */ A(Z, { children: /* @__PURE__ */ A("span", {
1277
+ /* @__PURE__ */ O(Z, { children: /* @__PURE__ */ O("span", {
1269
1278
  className: "la-request-operation",
1270
1279
  title: e.operation,
1271
1280
  children: e.operation
1272
1281
  }) }),
1273
- /* @__PURE__ */ A(Z, { children: /* @__PURE__ */ j("span", {
1282
+ /* @__PURE__ */ O(Z, { children: /* @__PURE__ */ k("span", {
1274
1283
  className: "la-request-actor",
1275
1284
  title: `${e.actorName} / ${e.actorId}`,
1276
1285
  children: [
@@ -1279,18 +1288,18 @@ function mt({ client: e, actor: n, timeRange: o, onTimeRangeChange: s, focus: c
1279
1288
  e.actorId
1280
1289
  ]
1281
1290
  }) }),
1282
- /* @__PURE__ */ A(Z, { children: e.kind === "method" ? "Method" : "WebSocket" }),
1283
- /* @__PURE__ */ A(Z, { children: /* @__PURE__ */ A(W, {
1291
+ /* @__PURE__ */ O(Z, { children: e.kind === "method" ? "Method" : "WebSocket" }),
1292
+ /* @__PURE__ */ O(Z, { children: /* @__PURE__ */ O(W, {
1284
1293
  variant: "outline",
1285
1294
  className: `la-request-outcome-${e.outcome}`,
1286
1295
  children: e.outcome[0].toUpperCase() + e.outcome.slice(1)
1287
1296
  }) }),
1288
- /* @__PURE__ */ A(Z, { children: B(e.durationMs) }),
1289
- /* @__PURE__ */ A(Z, { children: e.queueWaitMs === null ? /* @__PURE__ */ A("span", {
1297
+ /* @__PURE__ */ O(Z, { children: B(e.durationMs) }),
1298
+ /* @__PURE__ */ O(Z, { children: e.queueWaitMs === null ? /* @__PURE__ */ O("span", {
1290
1299
  title: "Request did not begin processing",
1291
1300
  children: "—"
1292
1301
  }) : B(e.queueWaitMs) }),
1293
- /* @__PURE__ */ A(Z, { children: /* @__PURE__ */ A(V, {
1302
+ /* @__PURE__ */ O(Z, { children: /* @__PURE__ */ O(V, {
1294
1303
  variant: "ghost",
1295
1304
  size: "sm",
1296
1305
  "aria-label": `Inspect ${e.operation} request`,
@@ -1298,69 +1307,69 @@ function mt({ client: e, actor: n, timeRange: o, onTimeRangeChange: s, focus: c
1298
1307
  children: "Details"
1299
1308
  }) })
1300
1309
  ]
1301
- }, e.eventId ?? `${P.epoch}-${e.sequence}`)) })]
1302
- }), !I.length && /* @__PURE__ */ j("div", {
1310
+ }, e.eventId ?? `${F.epoch}-${e.sequence}`)) })]
1311
+ }), !I.length && /* @__PURE__ */ k("div", {
1303
1312
  className: "la-request-empty",
1304
1313
  role: "status",
1305
- children: [/* @__PURE__ */ A("strong", { children: l ? g.loading ? "Loading history…" : g.failed ? "History unavailable" : "No saved requests in this range" : P ? "No requests yet" : v ? "Requests unavailable" : "Connecting to requests…" }), /* @__PURE__ */ A("p", { children: l ? "Try a wider time range or fewer filters. Local history retains the latest 10,000 events." : "Call an actor method or send a WebSocket message to see its timings." })]
1314
+ children: [/* @__PURE__ */ O("strong", { children: l ? g.loading ? "Loading history…" : g.failed ? "History unavailable" : "No saved requests in this range" : F ? "No requests yet" : v ? "Requests unavailable" : "Connecting to requests…" }), /* @__PURE__ */ O("p", { children: l ? "Try a wider time range or fewer filters. Local history retains the latest 10,000 events." : "Call an actor method or send a WebSocket message to see its timings." })]
1306
1315
  })]
1307
1316
  }),
1308
- l && P?.nextCursor && /* @__PURE__ */ A(V, {
1317
+ l && F?.nextCursor && /* @__PURE__ */ O(V, {
1309
1318
  className: "la-request-load-older",
1310
1319
  variant: "outline",
1311
1320
  disabled: g.loading,
1312
1321
  onClick: g.loadOlder,
1313
1322
  children: g.loading ? "Loading…" : "Load older"
1314
1323
  }),
1315
- /* @__PURE__ */ j("div", {
1324
+ /* @__PURE__ */ k("div", {
1316
1325
  className: "la-observer-footnote",
1317
- children: [/* @__PURE__ */ j("span", {
1326
+ children: [/* @__PURE__ */ k("span", {
1318
1327
  className: "la-observer-refresh-status",
1319
- children: [!l && /* @__PURE__ */ A("span", { className: `la-observer-dot ${v ? "la-observer-dot-unknown" : "la-observer-dot-live"}` }), l ? "Saved history" : x ? "Display paused · collection continues" : v ? "Reconnecting…" : _ ? "Live updates" : "Connecting…"]
1320
- }), /* @__PURE__ */ A("span", { children: l ? `${I.length.toLocaleString()} saved requests shown` : n ? `${I.length} matching requests from the latest ${P?.capacity ?? 500} on this control plane.` : `Latest ${P?.capacity ?? 500} requests on this control plane.` })]
1328
+ children: [!l && /* @__PURE__ */ O("span", { className: `la-observer-dot ${v ? "la-observer-dot-unknown" : "la-observer-dot-live"}` }), l ? "Saved history" : S ? "Display paused · collection continues" : v ? "Reconnecting…" : _ ? "Live updates" : "Connecting…"]
1329
+ }), /* @__PURE__ */ O("span", { children: l ? `${I.length.toLocaleString()} saved requests shown` : n ? `${I.length} matching requests from the latest ${F?.capacity ?? 500} on this control plane.` : `Latest ${F?.capacity ?? 500} requests on this control plane.` })]
1321
1330
  }),
1322
- !l && !!P?.evicted && /* @__PURE__ */ j("p", {
1331
+ !l && !!F?.evicted && /* @__PURE__ */ k("p", {
1323
1332
  className: "la-request-note",
1324
- children: [P.evicted.toLocaleString(), " older records have left this history window."]
1333
+ children: [F.evicted.toLocaleString(), " older records have left this history window."]
1325
1334
  }),
1326
- /* @__PURE__ */ A("p", {
1335
+ /* @__PURE__ */ O("p", {
1327
1336
  className: "la-request-note",
1328
1337
  children: "Total includes queue wait, actor processing, and persistence. Queue wait includes the WebSocket message queue. Timings exclude the caller’s network round trip."
1329
1338
  }),
1330
- /* @__PURE__ */ A(Xe, {
1339
+ /* @__PURE__ */ O(Ze, {
1331
1340
  direction: "right",
1332
1341
  autoFocus: !0,
1333
- open: !!C,
1342
+ open: !!w,
1334
1343
  onOpenChange: (e) => {
1335
- e || w(void 0);
1344
+ e || T(void 0);
1336
1345
  },
1337
- children: /* @__PURE__ */ j(tt, {
1338
- container: O.current,
1346
+ children: /* @__PURE__ */ k(nt, {
1347
+ container: M.current,
1339
1348
  className: "la:data-[vaul-drawer-direction=right]:w-full la:data-[vaul-drawer-direction=right]:sm:max-w-[480px]",
1340
1349
  onCloseAutoFocus: (e) => {
1341
- e.preventDefault(), M.current?.focus();
1350
+ e.preventDefault(), N.current?.focus();
1342
1351
  },
1343
- children: [/* @__PURE__ */ j(nt, {
1352
+ children: [/* @__PURE__ */ k(rt, {
1344
1353
  className: "la:relative la:shrink-0 la:gap-2 la:p-6 la:pr-16",
1345
1354
  children: [
1346
- /* @__PURE__ */ A(it, { children: "Request details" }),
1347
- /* @__PURE__ */ A(at, { children: "Full identifiers and timings for this request." }),
1348
- /* @__PURE__ */ A($e, {
1355
+ /* @__PURE__ */ O(at, { children: "Request details" }),
1356
+ /* @__PURE__ */ O(ot, { children: "Full identifiers and timings for this request." }),
1357
+ /* @__PURE__ */ O(et, {
1349
1358
  asChild: !0,
1350
- children: /* @__PURE__ */ A(V, {
1359
+ children: /* @__PURE__ */ O(V, {
1351
1360
  className: "la:absolute la:top-4 la:right-4",
1352
1361
  variant: "ghost",
1353
1362
  size: "icon",
1354
1363
  "aria-label": "Close",
1355
- children: /* @__PURE__ */ A(T, { "aria-hidden": "true" })
1364
+ children: /* @__PURE__ */ O(E, { "aria-hidden": "true" })
1356
1365
  })
1357
1366
  })
1358
1367
  ]
1359
- }), /* @__PURE__ */ A("div", {
1368
+ }), /* @__PURE__ */ O("div", {
1360
1369
  className: "la:min-h-0 la:flex-1 la:overflow-y-auto la:px-6 la:pb-6",
1361
- children: C && /* @__PURE__ */ A(gt, {
1362
- record: C,
1363
- timing: ve(I).calls.find((e) => e.record === C)
1370
+ children: w && /* @__PURE__ */ O(_t, {
1371
+ record: w,
1372
+ timing: ye(I).calls.find((e) => e.record === w)
1364
1373
  })
1365
1374
  })]
1366
1375
  })
@@ -1368,9 +1377,9 @@ function mt({ client: e, actor: n, timeRange: o, onTimeRangeChange: s, focus: c
1368
1377
  ]
1369
1378
  });
1370
1379
  }
1371
- function ht({ query: e, range: t, onRangeChange: r, loading: i, onSearch: a, scoped: o }) {
1380
+ function gt({ query: e, range: t, onRangeChange: r, loading: i, onSearch: a, scoped: o }) {
1372
1381
  let s = n(), c = n();
1373
- return /* @__PURE__ */ j("form", {
1382
+ return /* @__PURE__ */ k("form", {
1374
1383
  className: "la-request-history-filters",
1375
1384
  onSubmit: (e) => {
1376
1385
  e.preventDefault();
@@ -1381,20 +1390,20 @@ function ht({ query: e, range: t, onRangeChange: r, loading: i, onSearch: a, sco
1381
1390
  });
1382
1391
  },
1383
1392
  children: [
1384
- /* @__PURE__ */ j("div", {
1393
+ /* @__PURE__ */ k("div", {
1385
1394
  className: "la-request-history-range",
1386
- children: [/* @__PURE__ */ A("span", { children: "Time range" }), /* @__PURE__ */ A(He, {
1395
+ children: [/* @__PURE__ */ O("span", { children: "Time range" }), /* @__PURE__ */ O(Ue, {
1387
1396
  value: t,
1388
1397
  onChange: r,
1389
1398
  align: "start"
1390
1399
  })]
1391
1400
  }),
1392
- !o && /* @__PURE__ */ j("div", {
1401
+ !o && /* @__PURE__ */ k("div", {
1393
1402
  className: "la-request-history-field",
1394
- children: [/* @__PURE__ */ A("label", {
1403
+ children: [/* @__PURE__ */ O("label", {
1395
1404
  htmlFor: s,
1396
1405
  children: "Actor ID"
1397
- }), /* @__PURE__ */ A(H, {
1406
+ }), /* @__PURE__ */ O(H, {
1398
1407
  id: s,
1399
1408
  name: "actorId",
1400
1409
  placeholder: "All actors",
@@ -1402,17 +1411,17 @@ function ht({ query: e, range: t, onRangeChange: r, loading: i, onSearch: a, sco
1402
1411
  defaultValue: e.actorId
1403
1412
  })]
1404
1413
  }),
1405
- /* @__PURE__ */ j("div", {
1414
+ /* @__PURE__ */ k("div", {
1406
1415
  className: "la-request-history-field",
1407
- children: [/* @__PURE__ */ A("label", {
1416
+ children: [/* @__PURE__ */ O("label", {
1408
1417
  htmlFor: c,
1409
1418
  children: "Outcome"
1410
- }), /* @__PURE__ */ j(ot, {
1419
+ }), /* @__PURE__ */ k(st, {
1411
1420
  id: c,
1412
1421
  className: "la-observer-select",
1413
1422
  name: "outcome",
1414
1423
  defaultValue: e.outcome ?? "",
1415
- children: [/* @__PURE__ */ A(G, {
1424
+ children: [/* @__PURE__ */ O(G, {
1416
1425
  value: "",
1417
1426
  children: "All outcomes"
1418
1427
  }), [
@@ -1421,13 +1430,13 @@ function ht({ query: e, range: t, onRangeChange: r, loading: i, onSearch: a, sco
1421
1430
  "rejected",
1422
1431
  "rerouted",
1423
1432
  "interrupted"
1424
- ].map((e) => /* @__PURE__ */ A(G, {
1433
+ ].map((e) => /* @__PURE__ */ O(G, {
1425
1434
  value: e,
1426
1435
  children: e[0].toUpperCase() + e.slice(1)
1427
1436
  }, e))]
1428
1437
  })]
1429
1438
  }),
1430
- /* @__PURE__ */ A(V, {
1439
+ /* @__PURE__ */ O(V, {
1431
1440
  type: "submit",
1432
1441
  variant: "outline",
1433
1442
  disabled: i,
@@ -1436,7 +1445,7 @@ function ht({ query: e, range: t, onRangeChange: r, loading: i, onSearch: a, sco
1436
1445
  ]
1437
1446
  });
1438
1447
  }
1439
- function gt({ record: e, timing: t }) {
1448
+ function _t({ record: e, timing: t }) {
1440
1449
  let n = {
1441
1450
  Operation: e.operation,
1442
1451
  "Actor class": e.actorName,
@@ -1449,26 +1458,26 @@ function gt({ record: e, timing: t }) {
1449
1458
  "Queue wait": e.queueWaitMs === null ? "Did not begin processing" : B(e.queueWaitMs),
1450
1459
  ...t ? {
1451
1460
  "Start offset in view": B(t.offsetMs),
1452
- "Gap from preceding calls": be(t.gapMs)
1461
+ "Gap from preceding calls": xe(t.gapMs)
1453
1462
  } : {},
1454
1463
  Host: e.hostId,
1455
1464
  ...e.connectionId ? { Connection: e.connectionId } : {}
1456
1465
  };
1457
- return /* @__PURE__ */ A("dl", {
1466
+ return /* @__PURE__ */ O("dl", {
1458
1467
  className: "la-request-details",
1459
- children: Object.entries(n).map(([e, t]) => /* @__PURE__ */ j("div", { children: [/* @__PURE__ */ A("dt", { children: e }), /* @__PURE__ */ A("dd", { children: t })] }, e))
1468
+ children: Object.entries(n).map(([e, t]) => /* @__PURE__ */ k("div", { children: [/* @__PURE__ */ O("dt", { children: e }), /* @__PURE__ */ O("dd", { children: t })] }, e))
1460
1469
  });
1461
1470
  }
1462
1471
  //#endregion
1463
1472
  //#region src/state-diff.ts
1464
- var _t = ie({ arrays: { detectMove: !1 } });
1465
- function vt(e, t) {
1466
- let n = _t.diff(e, t);
1473
+ var vt = ie({ arrays: { detectMove: !1 } });
1474
+ function yt(e, t) {
1475
+ let n = vt.diff(e, t);
1467
1476
  return n ? ae(n, e) ?? "" : "";
1468
1477
  }
1469
1478
  //#endregion
1470
1479
  //#region src/state-inspection.ts
1471
- function yt(e, n, r) {
1480
+ function bt(e, n, r) {
1472
1481
  let [o, s] = a(), [c, l] = a(), [u, d] = a(!1), [f, p] = a(!0), [m, h] = a(0), g = i(() => {});
1473
1482
  return t(() => {
1474
1483
  let t = new AbortController(), i = !1, a = !1, o, c;
@@ -1531,22 +1540,22 @@ function yt(e, n, r) {
1531
1540
  }
1532
1541
  //#endregion
1533
1542
  //#region src/StateInspector.tsx
1534
- function bt(e) {
1535
- let { client: t, actorName: n, actorId: r } = e, i = yt(t, n, r), [o, s] = a("state"), [c, l] = a(), [u, d] = a(), [f, p] = a(""), [m, h] = a(0), g = i.current?.snapshot, v = g?.stateVersion ?? 0, y = c ?? v, ee = i.knownVersion > v || v > (i.history?.records[0]?.stateVersion ?? 0);
1536
- return /* @__PURE__ */ j("section", {
1543
+ function xt(e) {
1544
+ let { client: t, actorName: n, actorId: r } = e, i = bt(t, n, r), [o, s] = a("state"), [c, l] = a(), [u, d] = a(), [f, p] = a(""), [m, h] = a(0), g = i.current?.snapshot, v = g?.stateVersion ?? 0, y = c ?? v, ee = i.knownVersion > v || v > (i.history?.records[0]?.stateVersion ?? 0);
1545
+ return /* @__PURE__ */ k("section", {
1537
1546
  className: "la-state",
1538
1547
  "aria-label": "Persisted state",
1539
1548
  children: [
1540
- /* @__PURE__ */ j("div", {
1549
+ /* @__PURE__ */ k("div", {
1541
1550
  className: "la-state-heading",
1542
- children: [/* @__PURE__ */ j("div", { children: [/* @__PURE__ */ A("h3", { children: "Persisted state" }), /* @__PURE__ */ A("p", { children: "Committed fields and their progression in storage." })] }), /* @__PURE__ */ j("div", {
1551
+ children: [/* @__PURE__ */ k("div", { children: [/* @__PURE__ */ O("h3", { children: "Persisted state" }), /* @__PURE__ */ O("p", { children: "Committed fields and their progression in storage." })] }), /* @__PURE__ */ k("div", {
1543
1552
  className: "la-state-actions",
1544
- children: [g && /* @__PURE__ */ j(V, {
1553
+ children: [g && /* @__PURE__ */ k(V, {
1545
1554
  variant: "outline",
1546
1555
  size: "sm",
1547
- onClick: () => Tt(g.state, `${n}-${r}-v${v}.json`),
1548
- children: [/* @__PURE__ */ A(_, { "aria-hidden": "true" }), "Download JSON"]
1549
- }), /* @__PURE__ */ j(V, {
1556
+ onClick: () => Et(g.state, `${n}-${r}-v${v}.json`),
1557
+ children: [/* @__PURE__ */ O(_, { "aria-hidden": "true" }), "Download JSON"]
1558
+ }), /* @__PURE__ */ k(V, {
1550
1559
  variant: "outline",
1551
1560
  size: "sm",
1552
1561
  disabled: i.loading,
@@ -1554,87 +1563,87 @@ function bt(e) {
1554
1563
  i.refresh(), h((e) => e + 1);
1555
1564
  },
1556
1565
  "aria-label": "Refresh state",
1557
- children: [/* @__PURE__ */ A(ne, { "aria-hidden": "true" }), "Refresh"]
1566
+ children: [/* @__PURE__ */ O(te, { "aria-hidden": "true" }), "Refresh"]
1558
1567
  })]
1559
1568
  })]
1560
1569
  }),
1561
- /* @__PURE__ */ j("div", {
1570
+ /* @__PURE__ */ k("div", {
1562
1571
  className: "la-state-tabs",
1563
1572
  "aria-label": "State views",
1564
1573
  children: [
1565
- /* @__PURE__ */ A(V, {
1574
+ /* @__PURE__ */ O(V, {
1566
1575
  variant: o === "state" ? "secondary" : "ghost",
1567
1576
  "aria-pressed": o === "state",
1568
1577
  onClick: () => s("state"),
1569
1578
  children: "State"
1570
1579
  }),
1571
- /* @__PURE__ */ A(V, {
1580
+ /* @__PURE__ */ O(V, {
1572
1581
  variant: o === "changes" ? "secondary" : "ghost",
1573
1582
  "aria-pressed": o === "changes",
1574
1583
  onClick: () => s("changes"),
1575
1584
  children: "Changes"
1576
1585
  }),
1577
- g && /* @__PURE__ */ j("span", {
1586
+ g && /* @__PURE__ */ k("span", {
1578
1587
  className: "la-state-version",
1579
1588
  children: ["Version ", v]
1580
1589
  })
1581
1590
  ]
1582
1591
  }),
1583
- i.failed && /* @__PURE__ */ j("p", {
1592
+ i.failed && /* @__PURE__ */ k("p", {
1584
1593
  role: "alert",
1585
1594
  children: ["Could not refresh state. Check your connection and use Refresh to retry.", i.current && " Showing the last loaded version."]
1586
1595
  }),
1587
- ee && /* @__PURE__ */ A("p", {
1596
+ ee && /* @__PURE__ */ O("p", {
1588
1597
  className: "la-state-notice",
1589
1598
  role: "status",
1590
1599
  children: "A newer commit is syncing to storage. Retrying automatically…"
1591
1600
  }),
1592
- !i.current && !i.failed && /* @__PURE__ */ A("p", {
1601
+ !i.current && !i.failed && /* @__PURE__ */ O("p", {
1593
1602
  role: "status",
1594
1603
  children: "Loading persisted state…"
1595
1604
  }),
1596
- i.current && !g && /* @__PURE__ */ A("p", {
1605
+ i.current && !g && /* @__PURE__ */ O("p", {
1597
1606
  className: "la-state-empty",
1598
1607
  children: "No persisted state yet. Fields appear after the actor commits its first change."
1599
1608
  }),
1600
- o === "state" && g && /* @__PURE__ */ j(k, { children: [
1601
- /* @__PURE__ */ A(Ct, {
1609
+ o === "state" && g && /* @__PURE__ */ k(D, { children: [
1610
+ /* @__PURE__ */ O(wt, {
1602
1611
  record: g,
1603
1612
  onInspect: e.onInspectRequest
1604
1613
  }),
1605
- /* @__PURE__ */ A(H, {
1614
+ /* @__PURE__ */ O(H, {
1606
1615
  "aria-label": "Filter persisted fields",
1607
1616
  placeholder: "Filter fields…",
1608
1617
  value: f,
1609
1618
  onChange: (e) => p(e.target.value)
1610
1619
  }),
1611
- /* @__PURE__ */ A(xt, {
1620
+ /* @__PURE__ */ O(St, {
1612
1621
  state: g.state,
1613
1622
  query: f,
1614
1623
  schema: i.current?.schema ?? null
1615
1624
  })
1616
1625
  ] }),
1617
- o === "changes" && /* @__PURE__ */ j("div", {
1626
+ o === "changes" && /* @__PURE__ */ k("div", {
1618
1627
  className: "la-state-history",
1619
- children: [/* @__PURE__ */ j("aside", {
1628
+ children: [/* @__PURE__ */ k("aside", {
1620
1629
  "aria-label": "State versions",
1621
1630
  children: [
1622
- /* @__PURE__ */ A("h4", { children: "Versions" }),
1623
- !i.history?.records.length && /* @__PURE__ */ A("p", { children: "No recorded history yet." }),
1624
- /* @__PURE__ */ A("ol", { children: i.history?.records.map((e) => /* @__PURE__ */ A("li", { children: /* @__PURE__ */ j("button", {
1631
+ /* @__PURE__ */ O("h4", { children: "Versions" }),
1632
+ !i.history?.records.length && /* @__PURE__ */ O("p", { children: "No recorded history yet." }),
1633
+ /* @__PURE__ */ O("ol", { children: i.history?.records.map((e) => /* @__PURE__ */ O("li", { children: /* @__PURE__ */ k("button", {
1625
1634
  type: "button",
1626
1635
  "aria-label": `Version ${e.stateVersion} · ${e.attribution?.operation ?? "Unknown operation"}`,
1627
1636
  "aria-pressed": y === e.stateVersion,
1628
1637
  onClick: () => {
1629
1638
  l(e.stateVersion), d(void 0);
1630
1639
  },
1631
- children: [/* @__PURE__ */ j("strong", { children: [
1640
+ children: [/* @__PURE__ */ k("strong", { children: [
1632
1641
  "Version ",
1633
1642
  e.stateVersion,
1634
- /* @__PURE__ */ A("span", { children: e.attribution?.operation ?? "Unknown operation" })
1635
- ] }), /* @__PURE__ */ A("small", { children: e.attribution ? new Date(e.attribution.committedAtMs).toLocaleTimeString() : "Time unavailable" })]
1643
+ /* @__PURE__ */ O("span", { children: e.attribution?.operation ?? "Unknown operation" })
1644
+ ] }), /* @__PURE__ */ O("small", { children: e.attribution ? new Date(e.attribution.committedAtMs).toLocaleTimeString() : "Time unavailable" })]
1636
1645
  }) }, e.stateVersion)) }),
1637
- i.history?.nextBefore && /* @__PURE__ */ A(V, {
1646
+ i.history?.nextBefore && /* @__PURE__ */ O(V, {
1638
1647
  variant: "outline",
1639
1648
  size: "sm",
1640
1649
  disabled: i.loading,
@@ -1642,118 +1651,118 @@ function bt(e) {
1642
1651
  children: "Load older versions"
1643
1652
  })
1644
1653
  ]
1645
- }), /* @__PURE__ */ j("div", {
1654
+ }), /* @__PURE__ */ k("div", {
1646
1655
  className: "la-state-comparison",
1647
- children: [c !== void 0 && v > c && /* @__PURE__ */ j(V, {
1656
+ children: [c !== void 0 && v > c && /* @__PURE__ */ k(V, {
1648
1657
  variant: "outline",
1649
1658
  size: "sm",
1650
1659
  onClick: () => {
1651
1660
  l(void 0), d(void 0);
1652
1661
  },
1653
1662
  children: ["View latest · version ", v]
1654
- }), !!y && /* @__PURE__ */ j(k, { children: [/* @__PURE__ */ j("div", {
1663
+ }), !!y && /* @__PURE__ */ k(D, { children: [/* @__PURE__ */ k("div", {
1655
1664
  className: "la-state-compare-heading",
1656
- children: [/* @__PURE__ */ j("h4", { children: ["Version ", y] }), /* @__PURE__ */ j(ot, {
1665
+ children: [/* @__PURE__ */ k("h4", { children: ["Version ", y] }), /* @__PURE__ */ k(st, {
1657
1666
  "aria-label": "Compare with version",
1658
1667
  value: u ?? Math.max(0, y - 1),
1659
1668
  onChange: (e) => d(Number(e.target.value)),
1660
- children: [/* @__PURE__ */ A(G, {
1669
+ children: [/* @__PURE__ */ O(G, {
1661
1670
  value: Math.max(0, y - 1),
1662
1671
  children: y === 1 ? "Before first commit" : `Previous · version ${y - 1}`
1663
- }), i.history?.records.filter((e) => e.stateVersion < y - 1).map((e) => /* @__PURE__ */ j(G, {
1672
+ }), i.history?.records.filter((e) => e.stateVersion < y - 1).map((e) => /* @__PURE__ */ k(G, {
1664
1673
  value: e.stateVersion,
1665
1674
  children: ["Version ", e.stateVersion]
1666
1675
  }, e.stateVersion))]
1667
1676
  })]
1668
- }), /* @__PURE__ */ A(wt, {
1677
+ }), /* @__PURE__ */ O(Tt, {
1669
1678
  ...e,
1670
1679
  version: y,
1671
1680
  baseline: u ?? Math.max(0, y - 1)
1672
1681
  }, `${n}/${r}/${y}/${u}/${m}`)] })]
1673
1682
  })]
1674
1683
  }),
1675
- /* @__PURE__ */ A("p", {
1684
+ /* @__PURE__ */ O("p", {
1676
1685
  className: "la-state-footnote",
1677
1686
  children: "Values come from actor storage. Request events signal new versions; history follows completed uploads."
1678
1687
  })
1679
1688
  ]
1680
1689
  });
1681
1690
  }
1682
- function xt({ state: e, query: t, schema: n }) {
1691
+ function St({ state: e, query: t, schema: n }) {
1683
1692
  let r = Object.entries(e).filter(([e]) => e.toLowerCase().includes(t.toLowerCase()));
1684
- return /* @__PURE__ */ j("div", {
1693
+ return /* @__PURE__ */ k("div", {
1685
1694
  className: "la-observer-table-frame",
1686
- children: [/* @__PURE__ */ j(K, {
1695
+ children: [/* @__PURE__ */ k(K, {
1687
1696
  "aria-label": "Persisted fields",
1688
- children: [/* @__PURE__ */ A(q, { children: /* @__PURE__ */ j(Y, { children: [
1689
- /* @__PURE__ */ A(X, { children: "Field" }),
1690
- /* @__PURE__ */ A(X, { children: "Type" }),
1691
- /* @__PURE__ */ A(X, { children: "Value" })
1692
- ] }) }), /* @__PURE__ */ A(J, { children: r.map(([e, t]) => /* @__PURE__ */ j(Y, { children: [
1693
- /* @__PURE__ */ A(Z, { children: /* @__PURE__ */ A("code", { children: e }) }),
1694
- /* @__PURE__ */ j(Z, { children: [/* @__PURE__ */ A("span", {
1697
+ children: [/* @__PURE__ */ O(q, { children: /* @__PURE__ */ k(Y, { children: [
1698
+ /* @__PURE__ */ O(X, { children: "Field" }),
1699
+ /* @__PURE__ */ O(X, { children: "Type" }),
1700
+ /* @__PURE__ */ O(X, { children: "Value" })
1701
+ ] }) }), /* @__PURE__ */ O(J, { children: r.map(([e, t]) => /* @__PURE__ */ k(Y, { children: [
1702
+ /* @__PURE__ */ O(Z, { children: /* @__PURE__ */ O("code", { children: e }) }),
1703
+ /* @__PURE__ */ k(Z, { children: [/* @__PURE__ */ O("span", {
1695
1704
  className: "la-state-type",
1696
- children: Et(t)
1697
- }), Dt(n, e) && /* @__PURE__ */ A("small", {
1705
+ children: Dt(t)
1706
+ }), Ot(n, e) && /* @__PURE__ */ O("small", {
1698
1707
  className: "la-state-schema",
1699
- children: Dt(n, e)
1708
+ children: Ot(n, e)
1700
1709
  })] }),
1701
- /* @__PURE__ */ A(Z, { children: /* @__PURE__ */ A(St, { value: t }) })
1710
+ /* @__PURE__ */ O(Z, { children: /* @__PURE__ */ O(Ct, { value: t }) })
1702
1711
  ] }, e)) })]
1703
- }), !r.length && /* @__PURE__ */ A("p", {
1712
+ }), !r.length && /* @__PURE__ */ O("p", {
1704
1713
  className: "la-state-empty",
1705
1714
  children: t ? "No matching fields." : "The persisted state is an empty object."
1706
1715
  })]
1707
1716
  });
1708
1717
  }
1709
- function St({ value: e }) {
1718
+ function Ct({ value: e }) {
1710
1719
  let t = JSON.stringify(e);
1711
- return t.length > 1e5 ? /* @__PURE__ */ j("span", { children: [
1720
+ return t.length > 1e5 ? /* @__PURE__ */ k("span", { children: [
1712
1721
  "Large value (",
1713
1722
  Math.round(t.length / 1024),
1714
1723
  " KB). Use Download JSON to inspect it."
1715
- ] }) : typeof e == "object" && e ? /* @__PURE__ */ A(re, {
1724
+ ] }) : typeof e == "object" && e ? /* @__PURE__ */ O(re, {
1716
1725
  data: e,
1717
1726
  shouldExpandNode: (e) => e < 1,
1718
- style: Ot
1719
- }) : /* @__PURE__ */ A("code", {
1720
- className: `la-state-json-${Et(e)}`,
1727
+ style: kt
1728
+ }) : /* @__PURE__ */ O("code", {
1729
+ className: `la-state-json-${Dt(e)}`,
1721
1730
  children: t
1722
1731
  });
1723
1732
  }
1724
- function Ct({ record: e, onInspect: t }) {
1733
+ function wt({ record: e, onInspect: t }) {
1725
1734
  let n = e.attribution;
1726
- return /* @__PURE__ */ j("div", {
1735
+ return /* @__PURE__ */ k("div", {
1727
1736
  className: "la-state-attribution",
1728
1737
  children: [
1729
- /* @__PURE__ */ j("span", { children: ["Committed by ", /* @__PURE__ */ A("strong", { children: n?.operation ?? "Unknown operation" })] }),
1730
- /* @__PURE__ */ j("span", { children: [
1738
+ /* @__PURE__ */ k("span", { children: ["Committed by ", /* @__PURE__ */ O("strong", { children: n?.operation ?? "Unknown operation" })] }),
1739
+ /* @__PURE__ */ k("span", { children: [
1731
1740
  "Request",
1732
1741
  " ",
1733
- t ? /* @__PURE__ */ A("button", {
1742
+ t ? /* @__PURE__ */ O("button", {
1734
1743
  type: "button",
1735
1744
  onClick: () => t({ requestId: e.requestId }),
1736
1745
  children: e.requestId
1737
- }) : /* @__PURE__ */ A("code", { children: e.requestId })
1746
+ }) : /* @__PURE__ */ O("code", { children: e.requestId })
1738
1747
  ] }),
1739
- n?.connectionId && /* @__PURE__ */ j("span", { children: [
1748
+ n?.connectionId && /* @__PURE__ */ k("span", { children: [
1740
1749
  "Connection",
1741
1750
  " ",
1742
- t ? /* @__PURE__ */ A("button", {
1751
+ t ? /* @__PURE__ */ O("button", {
1743
1752
  type: "button",
1744
1753
  onClick: () => t({ connectionId: n.connectionId }),
1745
1754
  children: n.connectionId
1746
- }) : /* @__PURE__ */ A("code", { children: n.connectionId })
1755
+ }) : /* @__PURE__ */ O("code", { children: n.connectionId })
1747
1756
  ] }),
1748
- n && /* @__PURE__ */ A("time", {
1757
+ n && /* @__PURE__ */ O("time", {
1749
1758
  dateTime: new Date(n.committedAtMs).toISOString(),
1750
1759
  children: new Date(n.committedAtMs).toLocaleString()
1751
1760
  }),
1752
- n?.interleaved && /* @__PURE__ */ A("p", { children: "Overlapping requests may contribute to this snapshot. This identifies the committing request." })
1761
+ n?.interleaved && /* @__PURE__ */ O("p", { children: "Overlapping requests may contribute to this snapshot. This identifies the committing request." })
1753
1762
  ]
1754
1763
  });
1755
1764
  }
1756
- function wt({ client: e, actorName: n, actorId: r, version: i, baseline: o, onInspectRequest: s }) {
1765
+ function Tt({ client: e, actorName: n, actorId: r, version: i, baseline: o, onInspectRequest: s }) {
1757
1766
  let [c, l] = a(), [u, d] = a(), [f, p] = a();
1758
1767
  return t(() => {
1759
1768
  let t = new AbortController(), a;
@@ -1786,7 +1795,7 @@ function wt({ client: e, actorName: n, actorId: r, version: i, baseline: o, onIn
1786
1795
  after: u.state
1787
1796
  })) : l({
1788
1797
  after: u,
1789
- html: vt(c.snapshot.state, u.state)
1798
+ html: yt(c.snapshot.state, u.state)
1790
1799
  });
1791
1800
  } catch (e) {
1792
1801
  t.signal.aborted || d(e instanceof Error ? e.message : "Could not load versions.");
@@ -1801,44 +1810,44 @@ function wt({ client: e, actorName: n, actorId: r, version: i, baseline: o, onIn
1801
1810
  r,
1802
1811
  i,
1803
1812
  o
1804
- ]), /* @__PURE__ */ j(k, { children: [
1805
- /* @__PURE__ */ A("p", { children: o ? `Comparing version ${o} → ${i}` : "Changes in the first persisted snapshot" }),
1806
- u && /* @__PURE__ */ A("p", {
1813
+ ]), /* @__PURE__ */ k(D, { children: [
1814
+ /* @__PURE__ */ O("p", { children: o ? `Comparing version ${o} → ${i}` : "Changes in the first persisted snapshot" }),
1815
+ u && /* @__PURE__ */ O("p", {
1807
1816
  role: "alert",
1808
1817
  children: u
1809
1818
  }),
1810
- !u && !c && /* @__PURE__ */ A("p", {
1819
+ !u && !c && /* @__PURE__ */ O("p", {
1811
1820
  role: "status",
1812
1821
  children: "Loading comparison…"
1813
1822
  }),
1814
- f && /* @__PURE__ */ j(V, {
1823
+ f && /* @__PURE__ */ k(V, {
1815
1824
  variant: "ghost",
1816
1825
  size: "sm",
1817
- onClick: () => Tt(f.state, `${n}-${r}-v${i}.json`),
1826
+ onClick: () => Et(f.state, `${n}-${r}-v${i}.json`),
1818
1827
  children: ["Download version ", i]
1819
1828
  }),
1820
- c && /* @__PURE__ */ j(k, { children: [/* @__PURE__ */ A(Ct, {
1829
+ c && /* @__PURE__ */ k(D, { children: [/* @__PURE__ */ O(wt, {
1821
1830
  record: c.after,
1822
1831
  onInspect: s
1823
- }), c.html ? /* @__PURE__ */ A("div", {
1832
+ }), c.html ? /* @__PURE__ */ O("div", {
1824
1833
  className: "la-state-diff",
1825
1834
  "aria-label": "State changes",
1826
1835
  dangerouslySetInnerHTML: { __html: c.html }
1827
- }) : /* @__PURE__ */ A("p", { children: "No persisted fields changed between these versions." })] })
1836
+ }) : /* @__PURE__ */ O("p", { children: "No persisted fields changed between these versions." })] })
1828
1837
  ] });
1829
1838
  }
1830
- function Tt(e, t) {
1839
+ function Et(e, t) {
1831
1840
  let n = URL.createObjectURL(new Blob([JSON.stringify(e, null, 2)], { type: "application/json" })), r = document.createElement("a");
1832
1841
  r.href = n, r.download = t, r.click(), setTimeout(() => URL.revokeObjectURL(n), 1e3);
1833
1842
  }
1834
- function Et(e) {
1843
+ function Dt(e) {
1835
1844
  return e === null ? "null" : Array.isArray(e) ? "array" : typeof e;
1836
1845
  }
1837
- function Dt(e, t) {
1846
+ function Ot(e, t) {
1838
1847
  let n = e?.definitions, r = n?.State?.properties?.[t]?.$ref, i = r && n?.[r.split("/").pop().replace(/~1/g, "/").replace(/~0/g, "~")]?.type;
1839
1848
  return i ? `Schema: ${Array.isArray(i) ? i.join(" | ") : i}` : void 0;
1840
1849
  }
1841
- var Ot = {
1850
+ var kt = {
1842
1851
  container: "la-state-json",
1843
1852
  basicChildStyle: "la-state-json-child",
1844
1853
  label: "la-state-json-label",
@@ -1857,8 +1866,8 @@ var Ot = {
1857
1866
  };
1858
1867
  //#endregion
1859
1868
  //#region src/queue-wait-history.ts
1860
- function kt(e, t, n) {
1861
- let r = ft(e, {
1869
+ function At(e, t, n) {
1870
+ let r = pt(e, {
1862
1871
  ...t,
1863
1872
  actorName: n
1864
1873
  }, e.listQueueWaits);
@@ -1870,26 +1879,26 @@ function kt(e, t, n) {
1870
1879
  }
1871
1880
  //#endregion
1872
1881
  //#region src/queue-wait.ts
1873
- function At(e) {
1874
- if (!Array.isArray(e) || !e.every(jt)) throw Error("Invalid queue wait response");
1875
- return e;
1876
- }
1877
1882
  function jt(e) {
1878
- return !!e && typeof e.actorName == "string" && typeof e.actorId == "string" && Number.isSafeInteger(e.admitted) && e.admitted > 0 && [e.averageMs, e.maxMs].every((e) => typeof e == "number" && Number.isFinite(e) && e >= 0) && e.averageMs <= e.maxMs;
1883
+ if (!Array.isArray(e) || !e.every(Mt)) throw Error("Invalid queue wait response");
1884
+ return e;
1879
1885
  }
1880
1886
  function Mt(e) {
1881
- return It(e, () => "all").get("all") ?? null;
1887
+ return !!e && typeof e.actorName == "string" && typeof e.actorId == "string" && Number.isSafeInteger(e.admitted) && e.admitted > 0 && [e.averageMs, e.maxMs].every((e) => typeof e == "number" && Number.isFinite(e) && e >= 0) && e.averageMs <= e.maxMs;
1882
1888
  }
1883
1889
  function Nt(e) {
1884
- return It(e, (e) => e.actorName);
1890
+ return Lt(e, () => "all").get("all") ?? null;
1891
+ }
1892
+ function Pt(e) {
1893
+ return Lt(e, (e) => e.actorName);
1885
1894
  }
1886
- function Pt(e, t) {
1887
- return It(e.filter((e) => e.actorName === t), (e) => e.actorId);
1895
+ function Ft(e, t) {
1896
+ return Lt(e.filter((e) => e.actorName === t), (e) => e.actorId);
1888
1897
  }
1889
- function Ft(e) {
1898
+ function It(e) {
1890
1899
  return e === void 0 ? "—" : e >= 1e3 ? `${(e / 1e3).toLocaleString(void 0, { maximumFractionDigits: 2 })} s` : `${e.toLocaleString(void 0, { maximumFractionDigits: 1 })} ms`;
1891
1900
  }
1892
- function It(e, t) {
1901
+ function Lt(e, t) {
1893
1902
  let n = /* @__PURE__ */ new Map();
1894
1903
  for (let r of e) {
1895
1904
  let e = n.get(t(r)) ?? {
@@ -1907,149 +1916,153 @@ function It(e, t) {
1907
1916
  }
1908
1917
  //#endregion
1909
1918
  //#region src/ActorObserver.tsx
1910
- function Lt({ client: e, className: r = "", initialActorName: o, navigation: s, timeRange: c, onTimeRangeChange: l }) {
1911
- let { inventory: u, loading: d, failed: f, retry: p } = lt(e), [m, h] = a(Le), _ = c ?? m, v = l ?? h, [y, ee] = a(o), b = s ? s.actorName : y, te = s ? s.onSelectActor : ee, [x, S] = a(), [C, w] = a(""), T = i(null), E = JSON.stringify([b, x]), D = i(JSON.stringify([o, void 0])), O = n(), M = u?.actors.find((e) => e.actorName === b), N = M?.instances.find((e) => e.actorId === x), P = kt(e, Re(_, Date.now()), b), F = P.rows && Nt(P.rows), I = P.rows && b !== void 0 ? Pt(P.rows, b) : void 0, L = P.supported && P.rows ? Mt(P.rows) : void 0;
1919
+ function Rt({ client: e, className: r = "", initialActorName: o, navigation: s, timeRange: c, onTimeRangeChange: l }) {
1920
+ let { inventory: u, loading: d, failed: f, retry: p } = ut(e), [m, h] = a(Re), _ = c ?? m, v = l ?? h, [y, ee] = a(o), b = s ? s.actorName : y, x = s ? s.onSelectActor : ee, [S, C] = a(), [w, T] = a(""), E = i(null), A = JSON.stringify([b, S]), j = i(JSON.stringify([o, void 0])), M = n(), N = u?.actors.find((e) => e.actorName === b), P = N?.instances.find((e) => e.actorId === S), F = At(e, ze(_, Date.now()), b), ne = F.rows && Pt(F.rows), I = F.rows && b !== void 0 ? Ft(F.rows, b) : void 0, L = F.supported && F.rows ? Nt(F.rows) : void 0;
1912
1921
  t(() => {
1913
- ee(o), S(void 0), w("");
1922
+ ee(o), C(void 0), T("");
1914
1923
  }, [e, o]), t(() => {
1915
- D.current !== E && T.current?.focus(), D.current = E;
1916
- }, [E]);
1924
+ j.current !== A && E.current?.focus(), j.current = A;
1925
+ }, [A]);
1917
1926
  let re = (e) => {
1918
- S(void 0), te(e);
1927
+ C(void 0), x(e);
1919
1928
  };
1920
- return /* @__PURE__ */ j("section", {
1921
- className: `la-observer ${x === void 0 ? "" : "la-observer-instance-page"} ${r}`,
1929
+ return /* @__PURE__ */ k("section", {
1930
+ className: `la-observer ${S === void 0 ? "" : "la-observer-instance-page"} ${r}`,
1922
1931
  "aria-label": "Actor observer",
1923
1932
  children: [
1924
- b !== void 0 && /* @__PURE__ */ j("nav", {
1933
+ b !== void 0 && /* @__PURE__ */ k("nav", {
1925
1934
  className: "la-observer-breadcrumb",
1926
1935
  "aria-label": "Breadcrumb",
1927
1936
  children: [
1928
- /* @__PURE__ */ A(V, {
1937
+ /* @__PURE__ */ O(V, {
1929
1938
  variant: "link",
1930
1939
  type: "button",
1931
1940
  "aria-label": "Back to actors",
1932
1941
  onClick: () => re(void 0),
1933
1942
  children: "Actors"
1934
1943
  }),
1935
- /* @__PURE__ */ A("span", {
1944
+ /* @__PURE__ */ O("span", {
1936
1945
  "aria-hidden": "true",
1937
1946
  children: "/"
1938
1947
  }),
1939
- x === void 0 ? /* @__PURE__ */ A("span", {
1948
+ S === void 0 ? /* @__PURE__ */ O("span", {
1940
1949
  "aria-current": "page",
1941
1950
  children: b
1942
- }) : /* @__PURE__ */ A(V, {
1951
+ }) : /* @__PURE__ */ O(V, {
1943
1952
  variant: "link",
1944
1953
  "aria-label": "Back to instances",
1945
- onClick: () => S(void 0),
1954
+ onClick: () => C(void 0),
1946
1955
  children: b
1947
1956
  }),
1948
- x !== void 0 && /* @__PURE__ */ j(k, { children: [/* @__PURE__ */ A("span", {
1957
+ S !== void 0 && /* @__PURE__ */ k(D, { children: [/* @__PURE__ */ O("span", {
1949
1958
  "aria-hidden": "true",
1950
1959
  children: "/"
1951
- }), /* @__PURE__ */ A("span", {
1960
+ }), /* @__PURE__ */ O("span", {
1952
1961
  "aria-current": "page",
1953
- children: x
1962
+ children: S
1954
1963
  })] })
1955
1964
  ]
1956
1965
  }),
1957
- /* @__PURE__ */ j("div", {
1966
+ /* @__PURE__ */ k("div", {
1958
1967
  className: "la-observer-toolbar",
1959
- children: [/* @__PURE__ */ j("div", { children: [/* @__PURE__ */ j("div", {
1968
+ children: [/* @__PURE__ */ k("div", { children: [/* @__PURE__ */ k("div", {
1960
1969
  className: "la-observer-title",
1961
- children: [/* @__PURE__ */ A("h1", {
1962
- ref: T,
1970
+ children: [/* @__PURE__ */ O("h1", {
1971
+ ref: E,
1963
1972
  tabIndex: -1,
1964
- children: x ?? b ?? "Actors"
1965
- }), N && /* @__PURE__ */ j(W, {
1973
+ children: S ?? b ?? "Actors"
1974
+ }), P && /* @__PURE__ */ k(W, {
1966
1975
  variant: "outline",
1967
- className: `la-observer-status-${N.status}`,
1968
- children: [/* @__PURE__ */ A("span", { className: `la-observer-dot la-observer-dot-${N.status}` }), $t(N.status)]
1976
+ className: `la-observer-status-${P.status}`,
1977
+ children: [/* @__PURE__ */ O("span", { className: `la-observer-dot la-observer-dot-${P.status}` }), en(P.status)]
1969
1978
  })]
1970
- }), x === void 0 && /* @__PURE__ */ A("p", { children: b === void 0 ? "Inspect instances, residency, and connections." : "Inspect this actor class’s instances, residency, and connections." })] }), /* @__PURE__ */ j("div", {
1979
+ }), S === void 0 && /* @__PURE__ */ O("p", { children: b === void 0 ? "Inspect instances, residency, and connections." : "Inspect this actor class’s instances, residency, and connections." })] }), /* @__PURE__ */ k("div", {
1971
1980
  className: "la-observer-actions",
1972
- children: [P.supported && /* @__PURE__ */ A(He, {
1981
+ children: [F.supported && /* @__PURE__ */ O(Ue, {
1973
1982
  value: _,
1974
1983
  onChange: v
1975
- }), /* @__PURE__ */ j(V, {
1984
+ }), /* @__PURE__ */ k(V, {
1976
1985
  variant: "outline",
1977
1986
  type: "button",
1978
1987
  disabled: d,
1979
1988
  onClick: p,
1980
- children: [/* @__PURE__ */ A(ne, {
1989
+ children: [/* @__PURE__ */ O(te, {
1981
1990
  "aria-hidden": "true",
1982
1991
  className: d ? "la-observer-spin" : void 0
1983
1992
  }), d ? "Refreshing…" : f ? "Try again" : "Refresh"]
1984
1993
  })]
1985
1994
  })]
1986
1995
  }),
1987
- f && /* @__PURE__ */ j("div", {
1996
+ f && /* @__PURE__ */ k("div", {
1988
1997
  className: "la-observer-error",
1989
1998
  role: "alert",
1990
- children: [/* @__PURE__ */ A(g, { "aria-hidden": "true" }), /* @__PURE__ */ A("p", { children: u ? "Could not refresh. These counts may be out of date." : "Could not load actors. Check your connection and access, then try again." })]
1999
+ children: [/* @__PURE__ */ O(g, { "aria-hidden": "true" }), /* @__PURE__ */ O("p", { children: u ? "Could not refresh. These counts may be out of date." : "Could not load actors. Check your connection and access, then try again." })]
1991
2000
  }),
1992
- !u && !f && /* @__PURE__ */ A(Rt, {}),
1993
- u && /* @__PURE__ */ j(k, { children: [b === void 0 ? /* @__PURE__ */ j(k, { children: [/* @__PURE__ */ A(zt, {
2001
+ !u && !f && /* @__PURE__ */ O(zt, {}),
2002
+ /* @__PURE__ */ O(se, { inventory: u }),
2003
+ u && /* @__PURE__ */ k(D, { children: [b === void 0 ? /* @__PURE__ */ k(D, { children: [/* @__PURE__ */ O(Bt, {
1994
2004
  inventory: u,
1995
- queueWait: P.supported ? L ?? null : void 0,
2005
+ queueWait: F.supported ? L ?? null : void 0,
1996
2006
  range: _
1997
- }), u.actors.length ? /* @__PURE__ */ A(Bt, {
2007
+ }), u.actors.length ? /* @__PURE__ */ O(Vt, {
1998
2008
  inventory: u,
1999
- query: C,
2000
- onQueryChange: w,
2009
+ query: w,
2010
+ onQueryChange: T,
2001
2011
  onSelectActor: re,
2002
2012
  onSelectInstance: (e, t) => {
2003
- S(t), te(e);
2013
+ C(t), x(e);
2004
2014
  },
2005
- waits: P.supported ? F : void 0
2006
- }) : /* @__PURE__ */ A(Zt, {
2015
+ waits: F.supported ? ne : void 0
2016
+ }) : /* @__PURE__ */ O(Qt, {
2007
2017
  title: "No actors yet",
2008
2018
  description: "Deploy your actor classes to see them here. Instance counts appear as actors are used."
2009
- })] }) : M ? /* @__PURE__ */ j(k, { children: [x === void 0 && /* @__PURE__ */ A(zt, {
2010
- inventory: { actors: [M] },
2019
+ })] }) : N ? /* @__PURE__ */ k(D, { children: [S === void 0 && /* @__PURE__ */ O(Bt, {
2020
+ inventory: {
2021
+ ...u,
2022
+ actors: [N]
2023
+ },
2011
2024
  actorName: b,
2012
- queueWait: P.supported ? L ?? null : void 0,
2025
+ queueWait: F.supported ? L ?? null : void 0,
2013
2026
  range: _
2014
- }), /* @__PURE__ */ A(Ut, {
2027
+ }), /* @__PURE__ */ O(Wt, {
2015
2028
  client: e,
2016
- id: O,
2029
+ id: M,
2017
2030
  actorName: b,
2018
- instances: M.instances,
2019
- waits: P.supported ? I : void 0,
2031
+ instances: N.instances,
2032
+ waits: F.supported ? I : void 0,
2020
2033
  range: _,
2021
- selectedInstanceId: x,
2022
- onSelectInstance: S
2023
- }, b)] }) : /* @__PURE__ */ A(Zt, {
2034
+ selectedInstanceId: S,
2035
+ onSelectInstance: C
2036
+ }, b)] }) : /* @__PURE__ */ O(Qt, {
2024
2037
  title: "Actor class unavailable",
2025
2038
  description: "This actor class is no longer in the latest inventory. Return to Actors to see available classes."
2026
- }), /* @__PURE__ */ j("div", {
2039
+ }), /* @__PURE__ */ k("div", {
2027
2040
  className: "la-observer-footnote",
2028
- children: [/* @__PURE__ */ j("span", {
2041
+ children: [/* @__PURE__ */ k("span", {
2029
2042
  className: "la-observer-refresh-status",
2030
- children: [/* @__PURE__ */ A("span", { className: `la-observer-dot ${f ? "la-observer-dot-unknown" : e.watchActors ? "la-observer-dot-live" : ""}` }), f ? "Reconnecting…" : e.watchActors ? "Live updates" : "Auto-refresh every 5s"]
2031
- }), /* @__PURE__ */ A("span", { children: e.watchActors ? "Changes stream from the control plane." : "Counts follow the latest host heartbeat." })]
2043
+ children: [/* @__PURE__ */ O("span", { className: `la-observer-dot ${f ? "la-observer-dot-unknown" : e.watchActors ? "la-observer-dot-live" : ""}` }), f ? "Reconnecting…" : e.watchActors ? "Live updates" : "Auto-refresh every 5s"]
2044
+ }), /* @__PURE__ */ O("span", { children: e.watchActors ? "Changes stream from the control plane." : "Counts follow the latest host heartbeat." })]
2032
2045
  })] })
2033
2046
  ]
2034
2047
  });
2035
2048
  }
2036
- function Rt() {
2037
- return /* @__PURE__ */ j("div", {
2049
+ function zt() {
2050
+ return /* @__PURE__ */ k("div", {
2038
2051
  className: "la-observer-skeleton",
2039
2052
  role: "status",
2040
2053
  "aria-label": "Loading actors",
2041
2054
  children: [
2042
- /* @__PURE__ */ A("span", {
2055
+ /* @__PURE__ */ O("span", {
2043
2056
  className: "la:sr-only",
2044
2057
  children: "Loading actors…"
2045
2058
  }),
2046
- /* @__PURE__ */ A("div", {}),
2047
- /* @__PURE__ */ A("div", {}),
2048
- /* @__PURE__ */ A("div", {})
2059
+ /* @__PURE__ */ O("div", {}),
2060
+ /* @__PURE__ */ O("div", {}),
2061
+ /* @__PURE__ */ O("div", {})
2049
2062
  ]
2050
2063
  });
2051
2064
  }
2052
- function zt({ inventory: e, actorName: t, queueWait: n, range: r }) {
2065
+ function Bt({ inventory: e, actorName: t, queueWait: n, range: r }) {
2053
2066
  let i = e.actors.reduce((e, t) => ({
2054
2067
  live: e.live + t.live,
2055
2068
  dormant: e.dormant + t.dormant,
@@ -2059,61 +2072,61 @@ function zt({ inventory: e, actorName: t, queueWait: n, range: r }) {
2059
2072
  dormant: 0,
2060
2073
  unknown: 0
2061
2074
  });
2062
- return /* @__PURE__ */ j("dl", {
2075
+ return /* @__PURE__ */ k("dl", {
2063
2076
  className: "la-observer-summary",
2064
2077
  children: [
2065
- /* @__PURE__ */ j("div", { children: [
2066
- /* @__PURE__ */ A("dt", { children: "Total instances" }),
2067
- /* @__PURE__ */ A("dd", {
2078
+ /* @__PURE__ */ k("div", { children: [
2079
+ /* @__PURE__ */ O("dt", { children: "Total instances" }),
2080
+ /* @__PURE__ */ O("dd", {
2068
2081
  "aria-label": "Total instances",
2069
2082
  children: (i.live + i.dormant + i.unknown).toLocaleString()
2070
2083
  }),
2071
- /* @__PURE__ */ A("p", { children: t === void 0 ? `${e.actors.length} actor ${e.actors.length === 1 ? "type" : "types"}` : "In this actor class" })
2084
+ /* @__PURE__ */ O("p", { children: t === void 0 ? `${e.actors.length} actor ${e.actors.length === 1 ? "type" : "types"}` : "In this actor class" })
2072
2085
  ] }),
2073
- /* @__PURE__ */ j("div", { children: [
2074
- /* @__PURE__ */ j("dt", { children: [/* @__PURE__ */ A("span", { className: "la-observer-dot la-observer-dot-live" }), "Live"] }),
2075
- /* @__PURE__ */ A("dd", {
2086
+ /* @__PURE__ */ k("div", { children: [
2087
+ /* @__PURE__ */ k("dt", { children: [/* @__PURE__ */ O("span", { className: "la-observer-dot la-observer-dot-live" }), "Live"] }),
2088
+ /* @__PURE__ */ O("dd", {
2076
2089
  "aria-label": "Live instances",
2077
2090
  children: i.live.toLocaleString()
2078
2091
  }),
2079
- /* @__PURE__ */ A("p", { children: "Loaded in memory" })
2092
+ /* @__PURE__ */ O("p", { children: "Loaded in memory" })
2080
2093
  ] }),
2081
- /* @__PURE__ */ j("div", { children: [
2082
- /* @__PURE__ */ j("dt", { children: [/* @__PURE__ */ A("span", { className: "la-observer-dot" }), "Dormant"] }),
2083
- /* @__PURE__ */ A("dd", {
2094
+ /* @__PURE__ */ k("div", { children: [
2095
+ /* @__PURE__ */ k("dt", { children: [/* @__PURE__ */ O("span", { className: "la-observer-dot" }), "Dormant"] }),
2096
+ /* @__PURE__ */ O("dd", {
2084
2097
  "aria-label": "Dormant instances",
2085
2098
  children: i.dormant.toLocaleString()
2086
2099
  }),
2087
- /* @__PURE__ */ A("p", { children: "Currently unloaded" })
2100
+ /* @__PURE__ */ O("p", { children: "Currently unloaded" })
2088
2101
  ] }),
2089
- i.unknown > 0 && /* @__PURE__ */ j("div", { children: [
2090
- /* @__PURE__ */ j("dt", { children: [/* @__PURE__ */ A("span", { className: "la-observer-dot la-observer-dot-unknown" }), "Unknown"] }),
2091
- /* @__PURE__ */ A("dd", {
2102
+ i.unknown > 0 && /* @__PURE__ */ k("div", { children: [
2103
+ /* @__PURE__ */ k("dt", { children: [/* @__PURE__ */ O("span", { className: "la-observer-dot la-observer-dot-unknown" }), "Unknown"] }),
2104
+ /* @__PURE__ */ O("dd", {
2092
2105
  "aria-label": "Unknown instances",
2093
2106
  children: i.unknown.toLocaleString()
2094
2107
  }),
2095
- /* @__PURE__ */ A("p", { children: "Awaiting host report" })
2108
+ /* @__PURE__ */ O("p", { children: "Awaiting host report" })
2096
2109
  ] }),
2097
- n !== void 0 && /* @__PURE__ */ j("div", {
2110
+ n !== void 0 && /* @__PURE__ */ k("div", {
2098
2111
  className: "la-observer-queue-wait",
2099
2112
  children: [
2100
- /* @__PURE__ */ A("dt", { children: "Avg queue wait" }),
2101
- /* @__PURE__ */ A("dd", {
2113
+ /* @__PURE__ */ O("dt", { children: "Avg queue wait" }),
2114
+ /* @__PURE__ */ O("dd", {
2102
2115
  "aria-label": "Average queue wait",
2103
- children: Ft(n?.averageMs)
2116
+ children: It(n?.averageMs)
2104
2117
  }),
2105
- /* @__PURE__ */ A("p", { children: n ? `Max ${Ft(n.maxMs)} · ${n.admitted.toLocaleString()} admitted ${U(r)}` : `No admitted requests ${U(r)}` })
2118
+ /* @__PURE__ */ O("p", { children: n ? `Max ${It(n.maxMs)} · ${n.admitted.toLocaleString()} admitted ${U(r)}` : `No admitted requests ${U(r)}` })
2106
2119
  ]
2107
2120
  })
2108
2121
  ]
2109
2122
  });
2110
2123
  }
2111
- function Bt({ inventory: e, query: t, onQueryChange: n, onSelectActor: r, onSelectInstance: i, waits: a }) {
2112
- let o = e.actors.some((e) => e.unknown > 0), s = e.actors.filter((e) => Ht(e, t)).sort((e, t) => Number(t.live > 0) - Number(e.live > 0)), l = Vt(e);
2113
- return /* @__PURE__ */ j(k, { children: [
2114
- /* @__PURE__ */ j("div", {
2124
+ function Vt({ inventory: e, query: t, onQueryChange: n, onSelectActor: r, onSelectInstance: i, waits: a }) {
2125
+ let o = e.actors.some((e) => e.unknown > 0), s = e.actors.filter((e) => Ut(e, t)).sort((e, t) => Number(t.live > 0) - Number(e.live > 0)), l = Ht(e);
2126
+ return /* @__PURE__ */ k(D, { children: [
2127
+ /* @__PURE__ */ k("div", {
2115
2128
  className: "la-observer-list-toolbar",
2116
- children: [/* @__PURE__ */ j("h2", { children: ["Actor names ", /* @__PURE__ */ A(W, { children: e.actors.length })] }), /* @__PURE__ */ A(ge, {
2129
+ children: [/* @__PURE__ */ k("h2", { children: ["Actor names ", /* @__PURE__ */ O(W, { children: e.actors.length })] }), /* @__PURE__ */ O(_e, {
2117
2130
  label: "Search actors and instances",
2118
2131
  placeholder: "Search actor name or instance ID…",
2119
2132
  value: t,
@@ -2127,80 +2140,80 @@ function Bt({ inventory: e, query: t, onQueryChange: n, onSelectActor: r, onSele
2127
2140
  className: "la-observer-lookup"
2128
2141
  })]
2129
2142
  }),
2130
- /* @__PURE__ */ A("div", {
2143
+ /* @__PURE__ */ O("div", {
2131
2144
  className: "la-observer-table-frame",
2132
- children: s.length ? /* @__PURE__ */ j(K, {
2145
+ children: s.length ? /* @__PURE__ */ k(K, {
2133
2146
  "aria-label": "Actor instance counts",
2134
2147
  className: "la-observer-table",
2135
- children: [/* @__PURE__ */ A(q, { children: /* @__PURE__ */ j(Y, { children: [
2136
- /* @__PURE__ */ A(X, {
2148
+ children: [/* @__PURE__ */ O(q, { children: /* @__PURE__ */ k(Y, { children: [
2149
+ /* @__PURE__ */ O(X, {
2137
2150
  scope: "col",
2138
2151
  children: "Actor"
2139
2152
  }),
2140
- /* @__PURE__ */ A(X, {
2153
+ /* @__PURE__ */ O(X, {
2141
2154
  scope: "col",
2142
2155
  children: "Live"
2143
2156
  }),
2144
- /* @__PURE__ */ A(X, {
2157
+ /* @__PURE__ */ O(X, {
2145
2158
  scope: "col",
2146
2159
  children: "Dormant"
2147
2160
  }),
2148
- o && /* @__PURE__ */ A(X, {
2161
+ o && /* @__PURE__ */ O(X, {
2149
2162
  scope: "col",
2150
2163
  children: "Unknown"
2151
2164
  }),
2152
- /* @__PURE__ */ A(X, {
2165
+ /* @__PURE__ */ O(X, {
2153
2166
  scope: "col",
2154
2167
  children: "Total"
2155
2168
  }),
2156
- a && /* @__PURE__ */ A(X, {
2169
+ a && /* @__PURE__ */ O(X, {
2157
2170
  scope: "col",
2158
2171
  className: "la-observer-wait-cell",
2159
2172
  children: "Avg queue wait"
2160
2173
  })
2161
- ] }) }), /* @__PURE__ */ A(J, { children: s.map((e) => /* @__PURE__ */ j(Y, {
2174
+ ] }) }), /* @__PURE__ */ O(J, { children: s.map((e) => /* @__PURE__ */ k(Y, {
2162
2175
  className: "la-clickable-row",
2163
2176
  onClick: () => r(e.actorName),
2164
2177
  children: [
2165
- /* @__PURE__ */ A(Z, {
2178
+ /* @__PURE__ */ O(Z, {
2166
2179
  className: "la-observer-name",
2167
- children: /* @__PURE__ */ j(V, {
2180
+ children: /* @__PURE__ */ k(V, {
2168
2181
  variant: "ghost",
2169
2182
  type: "button",
2170
2183
  className: "la-observer-actor-button la-observer-class-button",
2171
- children: [/* @__PURE__ */ A(c, {
2184
+ children: [/* @__PURE__ */ O(c, {
2172
2185
  className: "la-observer-type-icon",
2173
2186
  "aria-hidden": "true"
2174
- }), /* @__PURE__ */ A("span", { children: e.actorName })]
2187
+ }), /* @__PURE__ */ O("span", { children: e.actorName })]
2175
2188
  })
2176
2189
  }),
2177
- /* @__PURE__ */ A(Z, { children: /* @__PURE__ */ A("span", {
2190
+ /* @__PURE__ */ O(Z, { children: /* @__PURE__ */ O("span", {
2178
2191
  className: e.live > 0 ? "la-observer-live" : void 0,
2179
2192
  children: e.live.toLocaleString()
2180
2193
  }) }),
2181
- /* @__PURE__ */ A(Z, { children: e.dormant.toLocaleString() }),
2182
- o && /* @__PURE__ */ A(Z, { children: e.unknown.toLocaleString() }),
2183
- /* @__PURE__ */ A(Z, { children: (e.live + e.dormant + e.unknown).toLocaleString() }),
2184
- a && /* @__PURE__ */ A(Z, {
2194
+ /* @__PURE__ */ O(Z, { children: e.dormant.toLocaleString() }),
2195
+ o && /* @__PURE__ */ O(Z, { children: e.unknown.toLocaleString() }),
2196
+ /* @__PURE__ */ O(Z, { children: (e.live + e.dormant + e.unknown).toLocaleString() }),
2197
+ a && /* @__PURE__ */ O(Z, {
2185
2198
  className: "la-observer-wait-cell",
2186
- children: /* @__PURE__ */ A(Gt, { stats: a.get(e.actorName) })
2199
+ children: /* @__PURE__ */ O(Kt, { stats: a.get(e.actorName) })
2187
2200
  })
2188
2201
  ]
2189
2202
  }, e.actorName)) })]
2190
- }) : /* @__PURE__ */ A(Zt, {
2203
+ }) : /* @__PURE__ */ O(Qt, {
2191
2204
  title: "No matching actors",
2192
2205
  description: "Try a different actor name.",
2193
2206
  action: "Clear search",
2194
2207
  onReset: () => n("")
2195
2208
  })
2196
2209
  }),
2197
- o && /* @__PURE__ */ j("p", {
2210
+ o && /* @__PURE__ */ k("p", {
2198
2211
  className: "la-observer-unknown",
2199
- children: [/* @__PURE__ */ A(g, { "aria-hidden": "true" }), "Some hosts have not reported which instances are loaded. Their counts are shown as unknown."]
2212
+ children: [/* @__PURE__ */ O(g, { "aria-hidden": "true" }), "Some hosts have not reported which instances are loaded. Their counts are shown as unknown."]
2200
2213
  })
2201
2214
  ] });
2202
2215
  }
2203
- function Vt(e) {
2216
+ function Ht(e) {
2204
2217
  return e.actors.flatMap((e) => [{
2205
2218
  id: JSON.stringify({ actorName: e.actorName }),
2206
2219
  group: "Actor classes",
@@ -2214,128 +2227,128 @@ function Vt(e) {
2214
2227
  group: "Instances",
2215
2228
  value: t.actorId,
2216
2229
  keywords: [e.actorName],
2217
- hint: `${e.actorName} · ${$t(t.status)} · ${t.connections.length.toLocaleString()} ${t.connections.length === 1 ? "connection" : "connections"}`
2230
+ hint: `${e.actorName} · ${en(t.status)} · ${t.connections.length.toLocaleString()} ${t.connections.length === 1 ? "connection" : "connections"}`
2218
2231
  }))]);
2219
2232
  }
2220
- function Ht(e, t) {
2233
+ function Ut(e, t) {
2221
2234
  let n = t.trim().toLocaleLowerCase().split(/\s+/u).filter(Boolean), r = [e.actorName, ...e.instances.map((e) => e.actorId)].join(" ").toLocaleLowerCase();
2222
2235
  return n.every((e) => r.includes(e));
2223
2236
  }
2224
- function Ut({ client: e, id: t, actorName: n, instances: r, waits: i, range: o, selectedInstanceId: s, onSelectInstance: c }) {
2225
- let [l, u] = a(""), [d, f] = a("all"), p = r.filter((e) => Qt(e.actorId, l) && (d === "all" || e.status === d));
2237
+ function Wt({ client: e, id: t, actorName: n, instances: r, waits: i, range: o, selectedInstanceId: s, onSelectInstance: c }) {
2238
+ let [l, u] = a(""), [d, f] = a("all"), p = r.filter((e) => $t(e.actorId, l) && (d === "all" || e.status === d));
2226
2239
  p.sort((e, t) => Number(t.status === "live") - Number(e.status === "live"));
2227
2240
  let m = r.find((e) => e.actorId === s);
2228
- return s === void 0 ? /* @__PURE__ */ j("section", {
2241
+ return s === void 0 ? /* @__PURE__ */ k("section", {
2229
2242
  id: t,
2230
2243
  className: "la-observer-instances",
2231
2244
  "aria-labelledby": `${t}-heading`,
2232
- children: [/* @__PURE__ */ A("div", {
2245
+ children: [/* @__PURE__ */ O("div", {
2233
2246
  className: "la-observer-instances-heading",
2234
- children: /* @__PURE__ */ j("div", { children: [/* @__PURE__ */ j("h2", {
2247
+ children: /* @__PURE__ */ k("div", { children: [/* @__PURE__ */ k("h2", {
2235
2248
  id: `${t}-heading`,
2236
2249
  children: [
2237
2250
  n,
2238
2251
  " instances ",
2239
- /* @__PURE__ */ A(W, {
2252
+ /* @__PURE__ */ O(W, {
2240
2253
  "aria-hidden": "true",
2241
2254
  children: r.length.toLocaleString()
2242
2255
  })
2243
2256
  ]
2244
- }), /* @__PURE__ */ A("p", { children: "Select an instance to inspect its persisted state, requests, and WebSocket connections." })] })
2245
- }), r.length ? /* @__PURE__ */ j(k, { children: [
2246
- /* @__PURE__ */ j("div", {
2257
+ }), /* @__PURE__ */ O("p", { children: "Select an instance to inspect its persisted state, requests, and WebSocket connections." })] })
2258
+ }), r.length ? /* @__PURE__ */ k(D, { children: [
2259
+ /* @__PURE__ */ k("div", {
2247
2260
  className: "la-observer-filters",
2248
- children: [/* @__PURE__ */ A(Xt, {
2261
+ children: [/* @__PURE__ */ O(Zt, {
2249
2262
  label: "Search instances",
2250
2263
  placeholder: "Search instance IDs…",
2251
2264
  value: l,
2252
2265
  onChange: u
2253
- }), /* @__PURE__ */ j(ot, {
2266
+ }), /* @__PURE__ */ k(st, {
2254
2267
  className: "la-observer-select",
2255
2268
  "aria-label": "Instance state",
2256
2269
  value: d,
2257
2270
  onChange: (e) => f(e.target.value),
2258
2271
  children: [
2259
- /* @__PURE__ */ A(G, {
2272
+ /* @__PURE__ */ O(G, {
2260
2273
  value: "all",
2261
2274
  children: "All states"
2262
2275
  }),
2263
- /* @__PURE__ */ A(G, {
2276
+ /* @__PURE__ */ O(G, {
2264
2277
  value: "live",
2265
2278
  children: "Live"
2266
2279
  }),
2267
- /* @__PURE__ */ A(G, {
2280
+ /* @__PURE__ */ O(G, {
2268
2281
  value: "dormant",
2269
2282
  children: "Dormant"
2270
2283
  }),
2271
- /* @__PURE__ */ A(G, {
2284
+ /* @__PURE__ */ O(G, {
2272
2285
  value: "unknown",
2273
2286
  children: "Unknown"
2274
2287
  })
2275
2288
  ]
2276
2289
  })]
2277
2290
  }),
2278
- /* @__PURE__ */ A("div", {
2291
+ /* @__PURE__ */ O("div", {
2279
2292
  className: "la-observer-table-frame",
2280
- children: p.length ? /* @__PURE__ */ j(K, {
2293
+ children: p.length ? /* @__PURE__ */ k(K, {
2281
2294
  "aria-label": `${n} instances`,
2282
2295
  className: "la-observer-instance-table",
2283
- children: [/* @__PURE__ */ A(q, { children: /* @__PURE__ */ j(Y, { children: [
2284
- /* @__PURE__ */ A(X, {
2296
+ children: [/* @__PURE__ */ O(q, { children: /* @__PURE__ */ k(Y, { children: [
2297
+ /* @__PURE__ */ O(X, {
2285
2298
  scope: "col",
2286
2299
  children: "Instance"
2287
2300
  }),
2288
- /* @__PURE__ */ A(X, {
2301
+ /* @__PURE__ */ O(X, {
2289
2302
  scope: "col",
2290
2303
  children: "State"
2291
2304
  }),
2292
- /* @__PURE__ */ A(X, {
2305
+ /* @__PURE__ */ O(X, {
2293
2306
  scope: "col",
2294
2307
  children: "Connections"
2295
2308
  }),
2296
- i && /* @__PURE__ */ A(X, {
2309
+ i && /* @__PURE__ */ O(X, {
2297
2310
  scope: "col",
2298
2311
  className: "la-observer-wait-cell",
2299
2312
  children: "Avg queue wait"
2300
2313
  }),
2301
- /* @__PURE__ */ A(X, {
2314
+ /* @__PURE__ */ O(X, {
2302
2315
  scope: "col",
2303
2316
  className: "la-observer-waiting-cell",
2304
2317
  children: "Waiting"
2305
2318
  })
2306
- ] }) }), /* @__PURE__ */ A(J, { children: p.map((e) => /* @__PURE__ */ j(Y, {
2319
+ ] }) }), /* @__PURE__ */ O(J, { children: p.map((e) => /* @__PURE__ */ k(Y, {
2307
2320
  className: "la-clickable-row",
2308
2321
  onClick: () => c(e.actorId),
2309
2322
  children: [
2310
- /* @__PURE__ */ A(Z, {
2323
+ /* @__PURE__ */ O(Z, {
2311
2324
  className: "la-observer-instance-id",
2312
- children: /* @__PURE__ */ A(V, {
2325
+ children: /* @__PURE__ */ O(V, {
2313
2326
  variant: "ghost",
2314
2327
  type: "button",
2315
2328
  className: "la-observer-actor-button",
2316
- children: /* @__PURE__ */ A("span", { children: e.actorId })
2329
+ children: /* @__PURE__ */ O("span", { children: e.actorId })
2317
2330
  })
2318
2331
  }),
2319
- /* @__PURE__ */ A(Z, { children: /* @__PURE__ */ j(W, {
2332
+ /* @__PURE__ */ O(Z, { children: /* @__PURE__ */ k(W, {
2320
2333
  variant: "outline",
2321
2334
  className: `la-observer-status-${e.status}`,
2322
- children: [/* @__PURE__ */ A("span", { className: `la-observer-dot la-observer-dot-${e.status}` }), $t(e.status)]
2335
+ children: [/* @__PURE__ */ O("span", { className: `la-observer-dot la-observer-dot-${e.status}` }), en(e.status)]
2323
2336
  }) }),
2324
- /* @__PURE__ */ A(Z, { children: e.connections.length.toLocaleString() }),
2325
- i && /* @__PURE__ */ A(Z, {
2337
+ /* @__PURE__ */ O(Z, { children: e.connections.length.toLocaleString() }),
2338
+ i && /* @__PURE__ */ O(Z, {
2326
2339
  className: "la-observer-wait-cell",
2327
- children: /* @__PURE__ */ A(Gt, { stats: i.get(e.actorId) })
2340
+ children: /* @__PURE__ */ O(Kt, { stats: i.get(e.actorId) })
2328
2341
  }),
2329
- /* @__PURE__ */ A(Z, {
2342
+ /* @__PURE__ */ O(Z, {
2330
2343
  className: "la-observer-waiting-cell",
2331
- children: /* @__PURE__ */ A(Jt, {
2344
+ children: /* @__PURE__ */ O(Yt, {
2332
2345
  waiting: e.waiting,
2333
2346
  compact: !0
2334
2347
  })
2335
2348
  })
2336
2349
  ]
2337
2350
  }, e.actorId)) })]
2338
- }) : /* @__PURE__ */ A(Zt, {
2351
+ }) : /* @__PURE__ */ O(Qt, {
2339
2352
  title: "No matching instances",
2340
2353
  description: "Try another instance ID or state.",
2341
2354
  action: "Clear filters",
@@ -2344,11 +2357,11 @@ function Ut({ client: e, id: t, actorName: n, instances: r, waits: i, range: o,
2344
2357
  }
2345
2358
  })
2346
2359
  }),
2347
- /* @__PURE__ */ A("p", {
2360
+ /* @__PURE__ */ O("p", {
2348
2361
  className: "la-observer-connection-note",
2349
2362
  children: "Connections are active WebSocket connections, not unique people."
2350
2363
  })
2351
- ] }) : /* @__PURE__ */ j("p", {
2364
+ ] }) : /* @__PURE__ */ k("p", {
2352
2365
  className: "la-observer-instance-empty",
2353
2366
  role: "status",
2354
2367
  children: [
@@ -2357,7 +2370,7 @@ function Ut({ client: e, id: t, actorName: n, instances: r, waits: i, range: o,
2357
2370
  " instances have been created yet."
2358
2371
  ]
2359
2372
  })]
2360
- }) : /* @__PURE__ */ A(Wt, {
2373
+ }) : /* @__PURE__ */ O(Gt, {
2361
2374
  client: e,
2362
2375
  id: t,
2363
2376
  actorName: n,
@@ -2367,52 +2380,52 @@ function Ut({ client: e, id: t, actorName: n, instances: r, waits: i, range: o,
2367
2380
  range: o
2368
2381
  }, s);
2369
2382
  }
2370
- function Wt({ client: e, id: t, actorName: n, actorId: r, instance: o, waits: s, range: c }) {
2383
+ function Gt({ client: e, id: t, actorName: n, actorId: r, instance: o, waits: s, range: c }) {
2371
2384
  let [l, u] = a("requests"), [d, f] = a(), p = i(null), m = !!e.getState && !!e.listStateHistory;
2372
- return /* @__PURE__ */ j("section", {
2385
+ return /* @__PURE__ */ k("section", {
2373
2386
  className: "la-observer-instance-detail",
2374
2387
  "aria-label": `${n} / ${r}`,
2375
2388
  children: [
2376
- !o && /* @__PURE__ */ A("p", {
2389
+ !o && /* @__PURE__ */ O("p", {
2377
2390
  role: "status",
2378
2391
  children: "This instance is no longer in the current inventory. Its retained requests are still available below."
2379
2392
  }),
2380
- /* @__PURE__ */ j("div", {
2393
+ /* @__PURE__ */ k("div", {
2381
2394
  className: "la-observer-instance-metrics",
2382
- children: [s && /* @__PURE__ */ A(Kt, {
2395
+ children: [s && /* @__PURE__ */ O(qt, {
2383
2396
  stats: s.get(r),
2384
2397
  range: c
2385
- }), o && /* @__PURE__ */ A(qt, { waiting: o.waiting })]
2398
+ }), o && /* @__PURE__ */ O(Jt, { waiting: o.waiting })]
2386
2399
  }),
2387
- /* @__PURE__ */ j("div", {
2400
+ /* @__PURE__ */ k("div", {
2388
2401
  className: "la-observer-instance-views",
2389
2402
  role: "group",
2390
2403
  "aria-label": "Instance view",
2391
2404
  children: [
2392
- /* @__PURE__ */ A(V, {
2405
+ /* @__PURE__ */ O(V, {
2393
2406
  ref: p,
2394
2407
  variant: "ghost",
2395
2408
  "aria-pressed": l === "requests",
2396
2409
  onClick: () => u("requests"),
2397
2410
  children: "Requests"
2398
2411
  }),
2399
- m && /* @__PURE__ */ A(V, {
2412
+ m && /* @__PURE__ */ O(V, {
2400
2413
  variant: "ghost",
2401
2414
  "aria-pressed": l === "state",
2402
2415
  onClick: () => u("state"),
2403
2416
  children: "State"
2404
2417
  }),
2405
- o && /* @__PURE__ */ j(V, {
2418
+ o && /* @__PURE__ */ k(V, {
2406
2419
  variant: "ghost",
2407
2420
  "aria-pressed": l === "websockets",
2408
2421
  onClick: () => u("websockets"),
2409
- children: ["WebSockets ", /* @__PURE__ */ A(W, { children: o.connections.length })]
2422
+ children: ["WebSockets ", /* @__PURE__ */ O(W, { children: o.connections.length })]
2410
2423
  })
2411
2424
  ]
2412
2425
  }),
2413
- /* @__PURE__ */ A("div", {
2426
+ /* @__PURE__ */ O("div", {
2414
2427
  hidden: l !== "requests",
2415
- children: e.watchRequests || e.listRequests ? /* @__PURE__ */ A(mt, {
2428
+ children: e.watchRequests || e.listRequests ? /* @__PURE__ */ O(ht, {
2416
2429
  client: e,
2417
2430
  actor: {
2418
2431
  actorName: n,
@@ -2420,11 +2433,11 @@ function Wt({ client: e, id: t, actorName: n, actorId: r, instance: o, waits: s,
2420
2433
  },
2421
2434
  timeRange: c,
2422
2435
  focus: d
2423
- }) : /* @__PURE__ */ j("section", { children: [/* @__PURE__ */ A("h3", { children: "Requests" }), /* @__PURE__ */ A("p", { children: "Request timings are unavailable for this connection." })] })
2436
+ }) : /* @__PURE__ */ k("section", { children: [/* @__PURE__ */ O("h3", { children: "Requests" }), /* @__PURE__ */ O("p", { children: "Request timings are unavailable for this connection." })] })
2424
2437
  }),
2425
- /* @__PURE__ */ A("div", {
2438
+ /* @__PURE__ */ O("div", {
2426
2439
  hidden: l !== "state",
2427
- children: m && /* @__PURE__ */ A(bt, {
2440
+ children: m && /* @__PURE__ */ O(xt, {
2428
2441
  client: e,
2429
2442
  actorName: n,
2430
2443
  actorId: r,
@@ -2433,9 +2446,9 @@ function Wt({ client: e, id: t, actorName: n, actorId: r, instance: o, waits: s,
2433
2446
  }
2434
2447
  })
2435
2448
  }),
2436
- /* @__PURE__ */ A("div", {
2449
+ /* @__PURE__ */ O("div", {
2437
2450
  hidden: l !== "websockets",
2438
- children: o && /* @__PURE__ */ A(Yt, {
2451
+ children: o && /* @__PURE__ */ O(Xt, {
2439
2452
  id: `${t}-connections`,
2440
2453
  actorId: r,
2441
2454
  connections: o.connections
@@ -2444,126 +2457,126 @@ function Wt({ client: e, id: t, actorName: n, actorId: r, instance: o, waits: s,
2444
2457
  ]
2445
2458
  });
2446
2459
  }
2447
- function Gt({ stats: e }) {
2448
- return e ? /* @__PURE__ */ j("span", {
2460
+ function Kt({ stats: e }) {
2461
+ return e ? /* @__PURE__ */ k("span", {
2449
2462
  className: "la-observer-wait",
2450
- title: `Average of ${e.admitted.toLocaleString()} admitted requests in the selected time range; longest wait ${Ft(e.maxMs)}`,
2451
- children: [Ft(e.averageMs), /* @__PURE__ */ j("small", { children: ["max ", Ft(e.maxMs)] })]
2452
- }) : /* @__PURE__ */ A("span", {
2463
+ title: `Average of ${e.admitted.toLocaleString()} admitted requests in the selected time range; longest wait ${It(e.maxMs)}`,
2464
+ children: [It(e.averageMs), /* @__PURE__ */ k("small", { children: ["max ", It(e.maxMs)] })]
2465
+ }) : /* @__PURE__ */ O("span", {
2453
2466
  title: "No admitted requests in the selected time range",
2454
2467
  children: "—"
2455
2468
  });
2456
2469
  }
2457
- function Kt({ stats: e, range: t }) {
2458
- return /* @__PURE__ */ A("section", {
2470
+ function qt({ stats: e, range: t }) {
2471
+ return /* @__PURE__ */ O("section", {
2459
2472
  className: "la-observer-queue-wait-detail",
2460
2473
  "aria-label": "Queue wait",
2461
2474
  title: `Time waiting to enter this actor ${U(t)}`,
2462
- children: e ? /* @__PURE__ */ j("dl", { children: [
2463
- /* @__PURE__ */ j("div", { children: [/* @__PURE__ */ A("dt", { children: "Avg queue wait" }), /* @__PURE__ */ A("dd", {
2475
+ children: e ? /* @__PURE__ */ k("dl", { children: [
2476
+ /* @__PURE__ */ k("div", { children: [/* @__PURE__ */ O("dt", { children: "Avg queue wait" }), /* @__PURE__ */ O("dd", {
2464
2477
  "aria-label": "Average queue wait",
2465
- children: Ft(e.averageMs)
2478
+ children: It(e.averageMs)
2466
2479
  })] }),
2467
- /* @__PURE__ */ j("div", { children: [/* @__PURE__ */ A("dt", { children: "Max" }), /* @__PURE__ */ A("dd", {
2480
+ /* @__PURE__ */ k("div", { children: [/* @__PURE__ */ O("dt", { children: "Max" }), /* @__PURE__ */ O("dd", {
2468
2481
  "aria-label": "Longest queue wait",
2469
- children: Ft(e.maxMs)
2482
+ children: It(e.maxMs)
2470
2483
  })] }),
2471
- /* @__PURE__ */ j("div", { children: [/* @__PURE__ */ A("dt", { children: "Admitted" }), /* @__PURE__ */ A("dd", {
2484
+ /* @__PURE__ */ k("div", { children: [/* @__PURE__ */ O("dt", { children: "Admitted" }), /* @__PURE__ */ O("dd", {
2472
2485
  "aria-label": "Admitted requests",
2473
2486
  children: e.admitted.toLocaleString()
2474
2487
  })] })
2475
- ] }) : /* @__PURE__ */ j("p", { children: [
2488
+ ] }) : /* @__PURE__ */ k("p", { children: [
2476
2489
  "No requests admitted ",
2477
2490
  U(t),
2478
2491
  "."
2479
2492
  ] })
2480
2493
  });
2481
2494
  }
2482
- function qt({ waiting: e }) {
2483
- return /* @__PURE__ */ A("section", {
2495
+ function Jt({ waiting: e }) {
2496
+ return /* @__PURE__ */ O("section", {
2484
2497
  className: "la-observer-waiting",
2485
2498
  "aria-label": "Waiting requests",
2486
- children: e?.length ? /* @__PURE__ */ j(k, { children: [/* @__PURE__ */ j("span", {
2499
+ children: e?.length ? /* @__PURE__ */ k(D, { children: [/* @__PURE__ */ k("span", {
2487
2500
  className: "la-observer-waiting-label",
2488
- children: ["Waiting ", /* @__PURE__ */ A("strong", { children: e.length })]
2489
- }), /* @__PURE__ */ A(Jt, { waiting: e })] }) : /* @__PURE__ */ A("p", { children: e == null ? "Queue reporting unavailable" : "No requests waiting." })
2501
+ children: ["Waiting ", /* @__PURE__ */ O("strong", { children: e.length })]
2502
+ }), /* @__PURE__ */ O(Yt, { waiting: e })] }) : /* @__PURE__ */ O("p", { children: e == null ? "Queue reporting unavailable" : "No requests waiting." })
2490
2503
  });
2491
2504
  }
2492
- function Jt({ waiting: e, compact: t = !1 }) {
2493
- if (e == null) return /* @__PURE__ */ A("span", {
2505
+ function Yt({ waiting: e, compact: t = !1 }) {
2506
+ if (e == null) return /* @__PURE__ */ O("span", {
2494
2507
  title: "Queue reporting is unavailable",
2495
2508
  children: "Unavailable"
2496
2509
  });
2497
- if (!e.length) return /* @__PURE__ */ A("span", {
2510
+ if (!e.length) return /* @__PURE__ */ O("span", {
2498
2511
  className: "la-observer-queue-empty",
2499
2512
  children: "None"
2500
2513
  });
2501
2514
  let n = t ? e.slice(0, 3) : e;
2502
- return /* @__PURE__ */ j("ol", {
2515
+ return /* @__PURE__ */ k("ol", {
2503
2516
  className: `la-observer-queue${t ? " la-observer-queue-compact" : ""}`,
2504
2517
  "aria-label": `${e.length} waiting requests, next to run first`,
2505
- children: [n.map((e, n) => /* @__PURE__ */ A("li", { children: /* @__PURE__ */ j(W, {
2518
+ children: [n.map((e, n) => /* @__PURE__ */ O("li", { children: /* @__PURE__ */ k(W, {
2506
2519
  variant: "outline",
2507
2520
  className: "la-observer-queue-bubble",
2508
2521
  title: e.operation,
2509
- children: [!t && /* @__PURE__ */ A("span", {
2522
+ children: [!t && /* @__PURE__ */ O("span", {
2510
2523
  className: "la-observer-queue-position",
2511
2524
  children: n + 1
2512
- }), /* @__PURE__ */ A("span", {
2525
+ }), /* @__PURE__ */ O("span", {
2513
2526
  className: "la-observer-queue-operation",
2514
2527
  children: e.operation
2515
2528
  })]
2516
- }) }, e.id)), t && e.length > n.length && /* @__PURE__ */ A("li", { children: /* @__PURE__ */ j(W, {
2529
+ }) }, e.id)), t && e.length > n.length && /* @__PURE__ */ O("li", { children: /* @__PURE__ */ k(W, {
2517
2530
  "aria-label": `${e.length - n.length} more waiting requests`,
2518
2531
  children: ["+", e.length - n.length]
2519
2532
  }) })]
2520
2533
  });
2521
2534
  }
2522
- function Yt({ id: e, actorId: t, connections: n }) {
2523
- return /* @__PURE__ */ j("section", {
2535
+ function Xt({ id: e, actorId: t, connections: n }) {
2536
+ return /* @__PURE__ */ k("section", {
2524
2537
  id: e,
2525
2538
  className: "la-observer-connections",
2526
2539
  "aria-labelledby": `${e}-heading`,
2527
- children: [/* @__PURE__ */ A("div", {
2540
+ children: [/* @__PURE__ */ O("div", {
2528
2541
  className: "la-observer-instances-heading",
2529
- children: /* @__PURE__ */ j("div", { children: [/* @__PURE__ */ j("h3", {
2542
+ children: /* @__PURE__ */ k("div", { children: [/* @__PURE__ */ k("h3", {
2530
2543
  id: `${e}-heading`,
2531
2544
  children: [
2532
2545
  t,
2533
2546
  " WebSockets ",
2534
- /* @__PURE__ */ A(W, {
2547
+ /* @__PURE__ */ O(W, {
2535
2548
  "aria-hidden": "true",
2536
2549
  children: n.length.toLocaleString()
2537
2550
  })
2538
2551
  ]
2539
- }), /* @__PURE__ */ A("p", { children: `${n.length.toLocaleString()} active ${n.length === 1 ? "connection" : "connections"}` })] })
2540
- }), n.length ? /* @__PURE__ */ A("div", {
2552
+ }), /* @__PURE__ */ O("p", { children: `${n.length.toLocaleString()} active ${n.length === 1 ? "connection" : "connections"}` })] })
2553
+ }), n.length ? /* @__PURE__ */ O("div", {
2541
2554
  className: "la-observer-table-frame",
2542
- children: /* @__PURE__ */ j(K, {
2555
+ children: /* @__PURE__ */ k(K, {
2543
2556
  "aria-label": `${t} WebSocket connections`,
2544
2557
  className: "la-observer-connection-table",
2545
- children: [/* @__PURE__ */ A(q, { children: /* @__PURE__ */ j(Y, { children: [/* @__PURE__ */ A(X, {
2558
+ children: [/* @__PURE__ */ O(q, { children: /* @__PURE__ */ k(Y, { children: [/* @__PURE__ */ O(X, {
2546
2559
  scope: "col",
2547
2560
  children: "Socket"
2548
- }), /* @__PURE__ */ A(X, {
2561
+ }), /* @__PURE__ */ O(X, {
2549
2562
  scope: "col",
2550
2563
  children: "Metadata"
2551
- })] }) }), /* @__PURE__ */ A(J, { children: n.map((e) => /* @__PURE__ */ j(Y, { children: [/* @__PURE__ */ A(Z, {
2564
+ })] }) }), /* @__PURE__ */ O(J, { children: n.map((e) => /* @__PURE__ */ k(Y, { children: [/* @__PURE__ */ O(Z, {
2552
2565
  className: "la-observer-socket-id",
2553
2566
  children: e.id
2554
- }), /* @__PURE__ */ A(Z, { children: /* @__PURE__ */ A("pre", { children: JSON.stringify(e.metadata, null, 2) }) })] }, e.id)) })]
2567
+ }), /* @__PURE__ */ O(Z, { children: /* @__PURE__ */ O("pre", { children: JSON.stringify(e.metadata, null, 2) }) })] }, e.id)) })]
2555
2568
  })
2556
- }) : /* @__PURE__ */ j("div", {
2569
+ }) : /* @__PURE__ */ k("div", {
2557
2570
  className: "la-observer-no-connections",
2558
2571
  role: "status",
2559
- children: [/* @__PURE__ */ A(w, { "aria-hidden": "true" }), /* @__PURE__ */ A("p", { children: "No active WebSocket connections." })]
2572
+ children: [/* @__PURE__ */ O(T, { "aria-hidden": "true" }), /* @__PURE__ */ O("p", { children: "No active WebSocket connections." })]
2560
2573
  })]
2561
2574
  });
2562
2575
  }
2563
- function Xt({ label: e, placeholder: t, value: n, onChange: r }) {
2564
- return /* @__PURE__ */ j("div", {
2576
+ function Zt({ label: e, placeholder: t, value: n, onChange: r }) {
2577
+ return /* @__PURE__ */ k("div", {
2565
2578
  className: "la-observer-search",
2566
- children: [/* @__PURE__ */ A(x, { "aria-hidden": "true" }), /* @__PURE__ */ A(H, {
2579
+ children: [/* @__PURE__ */ O(S, { "aria-hidden": "true" }), /* @__PURE__ */ O(H, {
2567
2580
  type: "search",
2568
2581
  "aria-label": e,
2569
2582
  placeholder: t,
@@ -2572,14 +2585,14 @@ function Xt({ label: e, placeholder: t, value: n, onChange: r }) {
2572
2585
  })]
2573
2586
  });
2574
2587
  }
2575
- function Zt({ title: e, description: t, action: n, onReset: r }) {
2576
- return /* @__PURE__ */ j("div", {
2588
+ function Qt({ title: e, description: t, action: n, onReset: r }) {
2589
+ return /* @__PURE__ */ k("div", {
2577
2590
  className: "la-observer-empty",
2578
2591
  children: [
2579
- /* @__PURE__ */ A(x, { "aria-hidden": "true" }),
2580
- /* @__PURE__ */ A("h3", { children: e }),
2581
- /* @__PURE__ */ A("p", { children: t }),
2582
- n && /* @__PURE__ */ A(V, {
2592
+ /* @__PURE__ */ O(S, { "aria-hidden": "true" }),
2593
+ /* @__PURE__ */ O("h3", { children: e }),
2594
+ /* @__PURE__ */ O("p", { children: t }),
2595
+ n && /* @__PURE__ */ O(V, {
2583
2596
  type: "button",
2584
2597
  variant: "outline",
2585
2598
  onClick: r,
@@ -2588,26 +2601,26 @@ function Zt({ title: e, description: t, action: n, onReset: r }) {
2588
2601
  ]
2589
2602
  });
2590
2603
  }
2591
- function Qt(e, t) {
2604
+ function $t(e, t) {
2592
2605
  return e.toLocaleLowerCase().includes(t.trim().toLocaleLowerCase());
2593
2606
  }
2594
- function $t(e) {
2607
+ function en(e) {
2595
2608
  return e[0].toUpperCase() + e.slice(1);
2596
2609
  }
2597
2610
  //#endregion
2598
2611
  //#region src/overview-data.ts
2599
- function en(e) {
2612
+ function tn(e) {
2600
2613
  let t = e.filter((e) => e.outcome !== "rerouted");
2601
2614
  return {
2602
2615
  count: e.length,
2603
2616
  success: t.length ? 100 * t.filter((e) => e.outcome === "completed").length / t.length : null,
2604
- p95: an(t.map((e) => e.durationMs))
2617
+ p95: on(t.map((e) => e.durationMs))
2605
2618
  };
2606
2619
  }
2607
- function tn(e, t, n) {
2620
+ function nn(e, t, n) {
2608
2621
  return e.filter((e) => e.startedAtMs >= (t.fromMs ?? 0) && e.startedAtMs <= (t.toMs ?? n));
2609
2622
  }
2610
- function nn(e) {
2623
+ function rn(e) {
2611
2624
  return e.actors.reduce((e, t) => ({
2612
2625
  live: e.live + t.live,
2613
2626
  dormant: e.dormant + t.dormant,
@@ -2620,33 +2633,33 @@ function nn(e) {
2620
2633
  connections: 0
2621
2634
  });
2622
2635
  }
2623
- function rn(e) {
2624
- return an(e.filter((e) => e.outcome !== "rerouted" && e.queueWaitMs !== null).map((e) => e.queueWaitMs));
2625
- }
2626
2636
  function an(e) {
2637
+ return on(e.filter((e) => e.outcome !== "rerouted" && e.queueWaitMs !== null).map((e) => e.queueWaitMs));
2638
+ }
2639
+ function on(e) {
2627
2640
  return e.length ? e.sort((e, t) => e - t)[Math.ceil(e.length * .95) - 1] : null;
2628
2641
  }
2629
2642
  //#endregion
2630
2643
  //#region src/overview-metrics.ts
2631
- function on(e) {
2644
+ function sn(e) {
2632
2645
  let t = e;
2633
- if (!t || !sn(t.total) || !Array.isArray(t.classes) || !t.classes.every(sn)) throw Error("Invalid overview metrics response");
2646
+ if (!t || !cn(t.total) || !Array.isArray(t.classes) || !t.classes.every(cn)) throw Error("Invalid overview metrics response");
2634
2647
  return t;
2635
2648
  }
2636
- function sn(e) {
2649
+ function cn(e) {
2637
2650
  return !!e && typeof e.actorName == "string" && Number.isSafeInteger(e.count) && e.count >= 0 && [
2638
2651
  e.success,
2639
2652
  e.p95,
2640
2653
  e.queueP95
2641
2654
  ].every((e) => e === null || typeof e == "number" && Number.isFinite(e) && e >= 0) && (e.success === null || e.success <= 100);
2642
2655
  }
2643
- function cn(e) {
2656
+ function ln(e) {
2644
2657
  let t = /* @__PURE__ */ new Map();
2645
2658
  for (let n of e) t.set(n.actorName, [...t.get(n.actorName) ?? [], n]);
2646
2659
  let n = (e, t) => ({
2647
2660
  actorName: e,
2648
- ...en(t),
2649
- queueP95: rn(t)
2661
+ ...tn(t),
2662
+ queueP95: an(t)
2650
2663
  });
2651
2664
  return {
2652
2665
  total: n("", e),
@@ -2655,47 +2668,47 @@ function cn(e) {
2655
2668
  }
2656
2669
  //#endregion
2657
2670
  //#region src/Overview.tsx
2658
- function ln({ client: e, onSelectActor: n, timeRange: r, onTimeRangeChange: i }) {
2659
- let o = lt(e), [s, c] = a(Le), l = r ?? s, u = i ?? c, [d, f] = a(Date.now);
2671
+ function un({ client: e, onSelectActor: n, timeRange: r, onTimeRangeChange: i }) {
2672
+ let o = ut(e), [s, c] = a(Re), l = r ?? s, u = i ?? c, [d, f] = a(Date.now);
2660
2673
  t(() => {
2661
2674
  let e = setInterval(() => f(Date.now()), 1e4);
2662
2675
  return () => clearInterval(e);
2663
2676
  }, []);
2664
- let p = Re(l, d), m = ft(e, p, e.getMetrics), h = ut(e, !m.supported), g = h.page ? cn(tn(h.page.records, p, Math.max(d, Date.now()))) : void 0, _ = m.supported ? m.value : g, v = m.supported ? m.failed : h.failed;
2665
- return /* @__PURE__ */ j("section", {
2677
+ let p = ze(l, d), m = pt(e, p, e.getMetrics), h = dt(e, !m.supported), g = h.page ? ln(nn(h.page.records, p, Math.max(d, Date.now()))) : void 0, _ = m.supported ? m.value : g, v = m.supported ? m.failed : h.failed;
2678
+ return /* @__PURE__ */ k("section", {
2666
2679
  className: "la-observer overview",
2667
2680
  "aria-label": "Runtime overview",
2668
2681
  children: [
2669
- /* @__PURE__ */ j("div", {
2682
+ /* @__PURE__ */ k("div", {
2670
2683
  className: "overview-heading",
2671
- children: [/* @__PURE__ */ A("h1", { children: "Durable Actors" }), /* @__PURE__ */ j("div", {
2684
+ children: [/* @__PURE__ */ O("h1", { children: "Durable Actors" }), /* @__PURE__ */ k("div", {
2672
2685
  className: "overview-controls",
2673
2686
  children: [
2674
- /* @__PURE__ */ A("span", {
2687
+ /* @__PURE__ */ O("span", {
2675
2688
  className: "overview-updated",
2676
- children: o.failed ? "Inventory reconnecting…" : o.updatedAt ? /* @__PURE__ */ j(k, { children: ["Last inventory update ", /* @__PURE__ */ A("time", {
2689
+ children: o.failed ? "Inventory reconnecting…" : o.updatedAt ? /* @__PURE__ */ k(D, { children: ["Last inventory update ", /* @__PURE__ */ O("time", {
2677
2690
  dateTime: new Date(o.updatedAt).toISOString(),
2678
2691
  children: new Date(o.updatedAt).toLocaleTimeString([], { hour12: !1 })
2679
2692
  })] }) : "Connecting…"
2680
2693
  }),
2681
- /* @__PURE__ */ A(He, {
2694
+ /* @__PURE__ */ O(Ue, {
2682
2695
  value: l,
2683
2696
  onChange: u,
2684
2697
  className: "overview-range"
2685
2698
  }),
2686
- /* @__PURE__ */ A(V, {
2699
+ /* @__PURE__ */ O(V, {
2687
2700
  variant: "outline",
2688
2701
  size: "icon",
2689
2702
  "aria-label": "Refresh overview",
2690
2703
  onClick: () => {
2691
2704
  o.retry(), m.retry(), h.retry();
2692
2705
  },
2693
- children: /* @__PURE__ */ A(ne, { "aria-hidden": "true" })
2706
+ children: /* @__PURE__ */ O(te, { "aria-hidden": "true" })
2694
2707
  })
2695
2708
  ]
2696
2709
  })]
2697
2710
  }),
2698
- o.failed && /* @__PURE__ */ j("p", {
2711
+ o.failed && /* @__PURE__ */ k("p", {
2699
2712
  className: "overview-alert",
2700
2713
  role: "alert",
2701
2714
  children: [
@@ -2704,7 +2717,7 @@ function ln({ client: e, onSelectActor: n, timeRange: r, onTimeRangeChange: i })
2704
2717
  " Retrying automatically."
2705
2718
  ]
2706
2719
  }),
2707
- v && /* @__PURE__ */ j("p", {
2720
+ v && /* @__PURE__ */ k("p", {
2708
2721
  className: "overview-alert",
2709
2722
  role: "alert",
2710
2723
  children: [
@@ -2715,18 +2728,19 @@ function ln({ client: e, onSelectActor: n, timeRange: r, onTimeRangeChange: i })
2715
2728
  "Retrying automatically."
2716
2729
  ]
2717
2730
  }),
2718
- /* @__PURE__ */ A(un, {
2731
+ /* @__PURE__ */ O(dn, {
2719
2732
  inventory: o.inventory,
2720
2733
  metrics: _,
2721
2734
  range: l
2722
2735
  }),
2723
- /* @__PURE__ */ A(dn, {
2736
+ /* @__PURE__ */ O(se, { inventory: o.inventory }),
2737
+ /* @__PURE__ */ O(fn, {
2724
2738
  inventory: o.inventory,
2725
2739
  metrics: _,
2726
2740
  failed: o.failed,
2727
2741
  onSelectActor: n
2728
2742
  }),
2729
- /* @__PURE__ */ A(hn, {
2743
+ /* @__PURE__ */ O(gn, {
2730
2744
  page: m.supported ? void 0 : h.page,
2731
2745
  range: l,
2732
2746
  saved: m.supported
@@ -2734,133 +2748,133 @@ function ln({ client: e, onSelectActor: n, timeRange: r, onTimeRangeChange: i })
2734
2748
  ]
2735
2749
  });
2736
2750
  }
2737
- function un({ inventory: e, metrics: t, range: n }) {
2738
- let r = e ? nn(e) : void 0, i = r ? r.live + r.dormant + r.unknown : void 0, a = t?.total;
2739
- return /* @__PURE__ */ j("div", {
2751
+ function dn({ inventory: e, metrics: t, range: n }) {
2752
+ let r = e ? rn(e) : void 0, i = r ? r.live + r.dormant + r.unknown : void 0, a = t?.total;
2753
+ return /* @__PURE__ */ k("div", {
2740
2754
  className: "overview-metrics",
2741
2755
  children: [
2742
- /* @__PURE__ */ j("section", {
2756
+ /* @__PURE__ */ k("section", {
2743
2757
  className: "overview-metric",
2744
2758
  children: [
2745
- /* @__PURE__ */ A("h2", { children: "Actor instances" }),
2746
- /* @__PURE__ */ j("div", {
2759
+ /* @__PURE__ */ O("h2", { children: "Actor instances" }),
2760
+ /* @__PURE__ */ k("div", {
2747
2761
  className: "overview-value",
2748
- children: [/* @__PURE__ */ A("strong", {
2762
+ children: [/* @__PURE__ */ O("strong", {
2749
2763
  "aria-label": "Actor instances",
2750
2764
  children: Q(i)
2751
- }), /* @__PURE__ */ A("span", { children: e ? `${e.actors.length} actor ${e.actors.length === 1 ? "class" : "classes"}` : "Waiting for inventory" })]
2765
+ }), /* @__PURE__ */ O("span", { children: e ? `${e.actors.length} actor ${e.actors.length === 1 ? "class" : "classes"}` : "Waiting for inventory" })]
2752
2766
  }),
2753
- /* @__PURE__ */ A("div", {
2767
+ /* @__PURE__ */ O("div", {
2754
2768
  className: "overview-residency",
2755
2769
  "aria-hidden": "true",
2756
- children: r && Object.entries(r).filter(([e]) => e !== "connections").map(([e, t]) => /* @__PURE__ */ A("span", {
2770
+ children: r && Object.entries(r).filter(([e]) => e !== "connections").map(([e, t]) => /* @__PURE__ */ O("span", {
2757
2771
  className: `residency-${e}`,
2758
2772
  style: { flexGrow: t }
2759
2773
  }, e))
2760
2774
  }),
2761
- /* @__PURE__ */ j("div", {
2775
+ /* @__PURE__ */ k("div", {
2762
2776
  className: "overview-metric-foot",
2763
2777
  children: [
2764
- /* @__PURE__ */ j("span", { children: [/* @__PURE__ */ A("b", { children: Q(r?.live) }), " live"] }),
2765
- /* @__PURE__ */ j("span", { children: [/* @__PURE__ */ A("b", { children: Q(r?.dormant) }), " dormant"] }),
2766
- !!r?.unknown && /* @__PURE__ */ j("span", { children: [/* @__PURE__ */ A("b", { children: Q(r.unknown) }), " unknown"] })
2778
+ /* @__PURE__ */ k("span", { children: [/* @__PURE__ */ O("b", { children: Q(r?.live) }), " live"] }),
2779
+ /* @__PURE__ */ k("span", { children: [/* @__PURE__ */ O("b", { children: Q(r?.dormant) }), " dormant"] }),
2780
+ !!r?.unknown && /* @__PURE__ */ k("span", { children: [/* @__PURE__ */ O("b", { children: Q(r.unknown) }), " unknown"] })
2767
2781
  ]
2768
2782
  })
2769
2783
  ]
2770
2784
  }),
2771
- /* @__PURE__ */ j("section", {
2785
+ /* @__PURE__ */ k("section", {
2772
2786
  className: "overview-metric",
2773
2787
  children: [
2774
- /* @__PURE__ */ A("h2", { children: "Requests" }),
2775
- /* @__PURE__ */ j("div", {
2788
+ /* @__PURE__ */ O("h2", { children: "Requests" }),
2789
+ /* @__PURE__ */ k("div", {
2776
2790
  className: "overview-value",
2777
- children: [/* @__PURE__ */ A("strong", {
2791
+ children: [/* @__PURE__ */ O("strong", {
2778
2792
  "aria-label": "Retained requests",
2779
2793
  children: Q(a?.count)
2780
- }), /* @__PURE__ */ A("span", { children: U(n) })]
2794
+ }), /* @__PURE__ */ O("span", { children: U(n) })]
2781
2795
  }),
2782
- /* @__PURE__ */ j("div", {
2796
+ /* @__PURE__ */ k("div", {
2783
2797
  className: "overview-health",
2784
2798
  children: [
2785
- /* @__PURE__ */ j("span", { children: [/* @__PURE__ */ A(pn, {
2799
+ /* @__PURE__ */ k("span", { children: [/* @__PURE__ */ O(mn, {
2786
2800
  value: a?.success,
2787
2801
  kind: "success"
2788
2802
  }), " success"] }),
2789
- /* @__PURE__ */ j("span", { children: [/* @__PURE__ */ A(pn, {
2803
+ /* @__PURE__ */ k("span", { children: [/* @__PURE__ */ O(mn, {
2790
2804
  value: a?.p95,
2791
2805
  kind: "latency"
2792
2806
  }), " p95 latency"] }),
2793
- /* @__PURE__ */ j("span", { children: [/* @__PURE__ */ A("b", { children: _n(a?.queueP95) }), " p95 queue wait"] })
2807
+ /* @__PURE__ */ k("span", { children: [/* @__PURE__ */ O("b", { children: vn(a?.queueP95) }), " p95 queue wait"] })
2794
2808
  ]
2795
2809
  })
2796
2810
  ]
2797
2811
  }),
2798
- /* @__PURE__ */ j("section", {
2812
+ /* @__PURE__ */ k("section", {
2799
2813
  className: "overview-metric",
2800
2814
  children: [
2801
- /* @__PURE__ */ A("h2", { children: "WebSocket connections" }),
2802
- /* @__PURE__ */ j("div", {
2815
+ /* @__PURE__ */ O("h2", { children: "WebSocket connections" }),
2816
+ /* @__PURE__ */ k("div", {
2803
2817
  className: "overview-value",
2804
- children: [/* @__PURE__ */ A("strong", {
2818
+ children: [/* @__PURE__ */ O("strong", {
2805
2819
  "aria-label": "Open WebSocket connections",
2806
2820
  children: Q(r?.connections)
2807
- }), /* @__PURE__ */ A("span", { children: "open" })]
2821
+ }), /* @__PURE__ */ O("span", { children: "open" })]
2808
2822
  }),
2809
- /* @__PURE__ */ j("div", {
2823
+ /* @__PURE__ */ k("div", {
2810
2824
  className: "overview-health",
2811
- children: [/* @__PURE__ */ A("span", { children: "Current inventory snapshot" }), /* @__PURE__ */ A("span", { children: "Active sockets" })]
2825
+ children: [/* @__PURE__ */ O("span", { children: "Current inventory snapshot" }), /* @__PURE__ */ O("span", { children: "Active sockets" })]
2812
2826
  })
2813
2827
  ]
2814
2828
  })
2815
2829
  ]
2816
2830
  });
2817
2831
  }
2818
- function dn({ inventory: e, metrics: t, failed: n, onSelectActor: r }) {
2832
+ function fn({ inventory: e, metrics: t, failed: n, onSelectActor: r }) {
2819
2833
  let [i, o] = a(""), [s, c] = a("all"), l = e?.actors.filter((e) => e.actorName.toLocaleLowerCase().includes(i.trim().toLocaleLowerCase()) && (s === "all" || e[s] > 0)).sort((e, t) => Number(t.live > 0) - Number(e.live > 0)) ?? [];
2820
- return /* @__PURE__ */ j("section", {
2834
+ return /* @__PURE__ */ k("section", {
2821
2835
  "aria-label": "Actor classes",
2822
- children: [/* @__PURE__ */ j("div", {
2836
+ children: [/* @__PURE__ */ k("div", {
2823
2837
  className: "overview-section-heading",
2824
- children: [/* @__PURE__ */ j("h2", { children: ["Actor classes ", /* @__PURE__ */ A("span", { children: Q(e?.actors.length) })] }), /* @__PURE__ */ A(mn, {})]
2825
- }), /* @__PURE__ */ j("div", {
2838
+ children: [/* @__PURE__ */ k("h2", { children: ["Actor classes ", /* @__PURE__ */ O("span", { children: Q(e?.actors.length) })] }), /* @__PURE__ */ O(hn, {})]
2839
+ }), /* @__PURE__ */ k("div", {
2826
2840
  className: "overview-panel",
2827
2841
  children: [
2828
- /* @__PURE__ */ j("div", {
2842
+ /* @__PURE__ */ k("div", {
2829
2843
  className: "overview-filterbar",
2830
- children: [/* @__PURE__ */ j("div", {
2844
+ children: [/* @__PURE__ */ k("div", {
2831
2845
  className: "overview-search",
2832
- children: [/* @__PURE__ */ A(x, { "aria-hidden": "true" }), /* @__PURE__ */ A(H, {
2846
+ children: [/* @__PURE__ */ O(S, { "aria-hidden": "true" }), /* @__PURE__ */ O(H, {
2833
2847
  "aria-label": "Filter actor classes",
2834
2848
  placeholder: "Filter actor classes…",
2835
2849
  value: i,
2836
2850
  onInput: (e) => o(e.currentTarget.value)
2837
2851
  })]
2838
- }), /* @__PURE__ */ j(ot, {
2852
+ }), /* @__PURE__ */ k(st, {
2839
2853
  "aria-label": "Filter by residency",
2840
2854
  size: "sm",
2841
2855
  value: s,
2842
2856
  onChange: (e) => c(e.target.value),
2843
2857
  children: [
2844
- /* @__PURE__ */ A(G, {
2858
+ /* @__PURE__ */ O(G, {
2845
2859
  value: "all",
2846
2860
  children: "All states"
2847
2861
  }),
2848
- /* @__PURE__ */ A(G, {
2862
+ /* @__PURE__ */ O(G, {
2849
2863
  value: "live",
2850
2864
  children: "Live instances"
2851
2865
  }),
2852
- /* @__PURE__ */ A(G, {
2866
+ /* @__PURE__ */ O(G, {
2853
2867
  value: "dormant",
2854
2868
  children: "Dormant instances"
2855
2869
  }),
2856
- /* @__PURE__ */ A(G, {
2870
+ /* @__PURE__ */ O(G, {
2857
2871
  value: "unknown",
2858
2872
  children: "Unknown residency"
2859
2873
  })
2860
2874
  ]
2861
2875
  })]
2862
2876
  }),
2863
- /* @__PURE__ */ j(K, {
2877
+ /* @__PURE__ */ k(K, {
2864
2878
  className: "overview-table",
2865
2879
  "aria-label": "Actor class metrics",
2866
2880
  containerProps: {
@@ -2870,69 +2884,69 @@ function dn({ inventory: e, metrics: t, failed: n, onSelectActor: r }) {
2870
2884
  tabIndex: 0
2871
2885
  },
2872
2886
  children: [
2873
- /* @__PURE__ */ j("colgroup", { children: [/* @__PURE__ */ A("col", { className: "overview-class-column" }), /* @__PURE__ */ A("col", { span: 6 })] }),
2874
- /* @__PURE__ */ j(q, { children: [/* @__PURE__ */ j(Y, {
2887
+ /* @__PURE__ */ k("colgroup", { children: [/* @__PURE__ */ O("col", { className: "overview-class-column" }), /* @__PURE__ */ O("col", { span: 6 })] }),
2888
+ /* @__PURE__ */ k(q, { children: [/* @__PURE__ */ k(Y, {
2875
2889
  className: "overview-groups",
2876
2890
  children: [
2877
- /* @__PURE__ */ A(X, {
2891
+ /* @__PURE__ */ O(X, {
2878
2892
  scope: "colgroup",
2879
2893
  colSpan: 2,
2880
2894
  children: "Actors"
2881
2895
  }),
2882
- /* @__PURE__ */ A(X, {
2896
+ /* @__PURE__ */ O(X, {
2883
2897
  scope: "colgroup",
2884
2898
  colSpan: 4,
2885
2899
  children: "Requests"
2886
2900
  }),
2887
- /* @__PURE__ */ A(X, {
2901
+ /* @__PURE__ */ O(X, {
2888
2902
  scope: "colgroup",
2889
2903
  children: "WebSockets"
2890
2904
  })
2891
2905
  ]
2892
- }), /* @__PURE__ */ j(Y, { children: [
2893
- /* @__PURE__ */ A(X, {
2906
+ }), /* @__PURE__ */ k(Y, { children: [
2907
+ /* @__PURE__ */ O(X, {
2894
2908
  scope: "col",
2895
2909
  children: "Class"
2896
2910
  }),
2897
- /* @__PURE__ */ A(X, {
2911
+ /* @__PURE__ */ O(X, {
2898
2912
  scope: "col",
2899
2913
  children: "Instances"
2900
2914
  }),
2901
- /* @__PURE__ */ A(X, {
2915
+ /* @__PURE__ */ O(X, {
2902
2916
  scope: "col",
2903
2917
  children: "Total"
2904
2918
  }),
2905
- /* @__PURE__ */ A(X, {
2919
+ /* @__PURE__ */ O(X, {
2906
2920
  scope: "col",
2907
2921
  children: "Success"
2908
2922
  }),
2909
- /* @__PURE__ */ A(X, {
2923
+ /* @__PURE__ */ O(X, {
2910
2924
  scope: "col",
2911
2925
  children: "p95 latency"
2912
2926
  }),
2913
- /* @__PURE__ */ A(X, {
2927
+ /* @__PURE__ */ O(X, {
2914
2928
  scope: "col",
2915
2929
  children: "p95 queue wait"
2916
2930
  }),
2917
- /* @__PURE__ */ A(X, {
2931
+ /* @__PURE__ */ O(X, {
2918
2932
  scope: "col",
2919
2933
  children: "Connected"
2920
2934
  })
2921
2935
  ] })] }),
2922
- /* @__PURE__ */ A(J, { children: l.map((e) => /* @__PURE__ */ A(fn, {
2936
+ /* @__PURE__ */ O(J, { children: l.map((e) => /* @__PURE__ */ O(pn, {
2923
2937
  actor: e,
2924
- metrics: t && (t.classes.find((t) => t.actorName === e.actorName) ?? gn(e.actorName)),
2938
+ metrics: t && (t.classes.find((t) => t.actorName === e.actorName) ?? _n(e.actorName)),
2925
2939
  onSelectActor: r
2926
2940
  }, e.actorName)) })
2927
2941
  ]
2928
2942
  }),
2929
- !l.length && /* @__PURE__ */ j("div", {
2943
+ !l.length && /* @__PURE__ */ k("div", {
2930
2944
  className: "overview-empty",
2931
2945
  role: "status",
2932
2946
  children: [
2933
- /* @__PURE__ */ A("strong", { children: e ? e.actors.length ? "No matching actor classes" : "No actors yet" : n ? "Inventory unavailable" : "Loading actor classes…" }),
2934
- /* @__PURE__ */ A("p", { children: e?.actors.length ? "Try another class name or residency state." : "Actor classes appear after deployment." }),
2935
- !!e?.actors.length && /* @__PURE__ */ A(V, {
2947
+ /* @__PURE__ */ O("strong", { children: e ? e.actors.length ? "No matching actor classes" : "No actors yet" : n ? "Inventory unavailable" : "Loading actor classes…" }),
2948
+ /* @__PURE__ */ O("p", { children: e?.actors.length ? "Try another class name or residency state." : "Actor classes appear after deployment." }),
2949
+ !!e?.actors.length && /* @__PURE__ */ O(V, {
2936
2950
  variant: "outline",
2937
2951
  onClick: () => {
2938
2952
  o(""), c("all");
@@ -2945,88 +2959,88 @@ function dn({ inventory: e, metrics: t, failed: n, onSelectActor: r }) {
2945
2959
  })]
2946
2960
  });
2947
2961
  }
2948
- function fn({ actor: e, metrics: t, onSelectActor: n }) {
2949
- return /* @__PURE__ */ j(Y, {
2962
+ function pn({ actor: e, metrics: t, onSelectActor: n }) {
2963
+ return /* @__PURE__ */ k(Y, {
2950
2964
  className: "la-clickable-row",
2951
2965
  onClick: () => n(e.actorName),
2952
2966
  children: [
2953
- /* @__PURE__ */ A(Z, { children: /* @__PURE__ */ A(V, {
2967
+ /* @__PURE__ */ O(Z, { children: /* @__PURE__ */ O(V, {
2954
2968
  variant: "ghost",
2955
2969
  type: "button",
2956
2970
  className: "overview-class-link",
2957
2971
  "aria-label": `Inspect ${e.actorName}`,
2958
- children: /* @__PURE__ */ A("span", {
2972
+ children: /* @__PURE__ */ O("span", {
2959
2973
  title: e.actorName,
2960
2974
  children: e.actorName
2961
2975
  })
2962
2976
  }) }),
2963
- /* @__PURE__ */ A(Z, { children: Q(e.live + e.dormant + e.unknown) }),
2964
- /* @__PURE__ */ A(Z, { children: Q(t?.count) }),
2965
- /* @__PURE__ */ A(Z, { children: /* @__PURE__ */ A(pn, {
2977
+ /* @__PURE__ */ O(Z, { children: Q(e.live + e.dormant + e.unknown) }),
2978
+ /* @__PURE__ */ O(Z, { children: Q(t?.count) }),
2979
+ /* @__PURE__ */ O(Z, { children: /* @__PURE__ */ O(mn, {
2966
2980
  value: t?.success,
2967
2981
  kind: "success"
2968
2982
  }) }),
2969
- /* @__PURE__ */ A(Z, { children: /* @__PURE__ */ A(pn, {
2983
+ /* @__PURE__ */ O(Z, { children: /* @__PURE__ */ O(mn, {
2970
2984
  value: t?.p95,
2971
2985
  kind: "latency"
2972
2986
  }) }),
2973
- /* @__PURE__ */ A(Z, { children: _n(t?.queueP95) }),
2974
- /* @__PURE__ */ A(Z, { children: Q(e.instances.reduce((e, t) => e + t.connections.length, 0)) })
2987
+ /* @__PURE__ */ O(Z, { children: vn(t?.queueP95) }),
2988
+ /* @__PURE__ */ O(Z, { children: Q(e.instances.reduce((e, t) => e + t.connections.length, 0)) })
2975
2989
  ]
2976
2990
  });
2977
2991
  }
2978
- function pn({ value: e, kind: t }) {
2979
- if (e == null) return /* @__PURE__ */ A("span", {
2992
+ function mn({ value: e, kind: t }) {
2993
+ if (e == null) return /* @__PURE__ */ O("span", {
2980
2994
  title: "No retained execution attempts",
2981
2995
  children: "—"
2982
2996
  });
2983
2997
  let n = t === "success" ? e < 95 ? "bad" : e < 99 ? "warn" : "good" : e > 100 ? "bad" : "good";
2984
- return /* @__PURE__ */ j("span", {
2998
+ return /* @__PURE__ */ k("span", {
2985
2999
  className: `overview-signal signal-${n}`,
2986
3000
  title: n === "bad" ? "Critical threshold breached" : n === "warn" ? "Warning threshold breached" : "Within threshold",
2987
- children: [n !== "good" && /* @__PURE__ */ A("span", {
3001
+ children: [n !== "good" && /* @__PURE__ */ O("span", {
2988
3002
  "aria-hidden": "true",
2989
3003
  children: n === "warn" ? "!" : "×"
2990
- }), t === "success" ? `${e.toLocaleString(void 0, { maximumFractionDigits: 2 })}%` : _n(e)]
3004
+ }), t === "success" ? `${e.toLocaleString(void 0, { maximumFractionDigits: 2 })}%` : vn(e)]
2991
3005
  });
2992
3006
  }
2993
- function mn() {
2994
- return /* @__PURE__ */ j("details", {
3007
+ function hn() {
3008
+ return /* @__PURE__ */ k("details", {
2995
3009
  className: "overview-thresholds",
2996
- children: [/* @__PURE__ */ j("summary", { children: [/* @__PURE__ */ j("span", {
3010
+ children: [/* @__PURE__ */ k("summary", { children: [/* @__PURE__ */ k("span", {
2997
3011
  className: "threshold-dots",
2998
3012
  "aria-hidden": "true",
2999
3013
  children: [
3000
- /* @__PURE__ */ A("i", {}),
3001
- /* @__PURE__ */ A("i", {}),
3002
- /* @__PURE__ */ A("i", {})
3014
+ /* @__PURE__ */ O("i", {}),
3015
+ /* @__PURE__ */ O("i", {}),
3016
+ /* @__PURE__ */ O("i", {})
3003
3017
  ]
3004
- }), "Thresholds"] }), /* @__PURE__ */ j("div", { children: [
3005
- /* @__PURE__ */ A("strong", { children: "Display thresholds" }),
3006
- /* @__PURE__ */ A("p", { children: "Success: warning below 99%; critical below 95%." }),
3007
- /* @__PURE__ */ A("p", { children: "Latency: critical when p95 exceeds 100 ms." }),
3008
- /* @__PURE__ */ A("p", { children: "Reroutes are excluded from success and latency. Queue wait has no health threshold." })
3018
+ }), "Thresholds"] }), /* @__PURE__ */ k("div", { children: [
3019
+ /* @__PURE__ */ O("strong", { children: "Display thresholds" }),
3020
+ /* @__PURE__ */ O("p", { children: "Success: warning below 99%; critical below 95%." }),
3021
+ /* @__PURE__ */ O("p", { children: "Latency: critical when p95 exceeds 100 ms." }),
3022
+ /* @__PURE__ */ O("p", { children: "Reroutes are excluded from success and latency. Queue wait has no health threshold." })
3009
3023
  ] })]
3010
3024
  });
3011
3025
  }
3012
- function hn({ page: e, range: t, saved: n }) {
3013
- return /* @__PURE__ */ j("div", {
3026
+ function gn({ page: e, range: t, saved: n }) {
3027
+ return /* @__PURE__ */ k("div", {
3014
3028
  className: "overview-data-scope",
3015
3029
  children: [
3016
- /* @__PURE__ */ A("p", { children: n ? `Request metrics cover every retained request ${U(t)}${t.kind === "relative" ? " (refreshed every 10 seconds)" : ""}. Inventory counts are current snapshots.` : `Request metrics cover the latest ${e?.capacity ?? 500} retained traces within the selected window. Inventory counts are current snapshots.` }),
3017
- !!e?.dropped && /* @__PURE__ */ j("p", {
3030
+ /* @__PURE__ */ O("p", { children: n ? `Request metrics cover every retained request ${U(t)}${t.kind === "relative" ? " (refreshed every 10 seconds)" : ""}. Inventory counts are current snapshots.` : `Request metrics cover the latest ${e?.capacity ?? 500} retained traces within the selected window. Inventory counts are current snapshots.` }),
3031
+ !!e?.dropped && /* @__PURE__ */ k("p", {
3018
3032
  role: "alert",
3019
3033
  children: [Q(e.dropped), " traces were not delivered. Request metrics are incomplete."]
3020
3034
  }),
3021
- e?.persistenceFailed && /* @__PURE__ */ A("p", {
3035
+ e?.persistenceFailed && /* @__PURE__ */ O("p", {
3022
3036
  role: "alert",
3023
3037
  children: "Some request events could not be saved. This history may be incomplete."
3024
3038
  }),
3025
- !!e?.evicted && /* @__PURE__ */ A("p", { children: "Earlier traces have expired; these metrics do not represent the full time window." })
3039
+ !!e?.evicted && /* @__PURE__ */ O("p", { children: "Earlier traces have expired; these metrics do not represent the full time window." })
3026
3040
  ]
3027
3041
  });
3028
3042
  }
3029
- function gn(e) {
3043
+ function _n(e) {
3030
3044
  return {
3031
3045
  actorName: e,
3032
3046
  count: 0,
@@ -3038,23 +3052,23 @@ function gn(e) {
3038
3052
  function Q(e) {
3039
3053
  return e === void 0 ? "—" : e.toLocaleString();
3040
3054
  }
3041
- function _n(e) {
3055
+ function vn(e) {
3042
3056
  return e == null ? "—" : `${e.toLocaleString(void 0, { maximumFractionDigits: 1 })} ms`;
3043
3057
  }
3044
3058
  //#endregion
3045
3059
  //#region src/socket-sessions.ts
3046
- function vn(e) {
3047
- if (!Array.isArray(e) || !e.every((e) => !!e && typeof e == "object" && En(e))) throw Error("Invalid WebSocket session response");
3060
+ function yn(e) {
3061
+ if (!Array.isArray(e) || !e.every((e) => !!e && typeof e == "object" && Dn(e))) throw Error("Invalid WebSocket session response");
3048
3062
  return e;
3049
3063
  }
3050
- function yn(e, t, n) {
3064
+ function bn(e, t, n) {
3051
3065
  return JSON.stringify([
3052
3066
  e,
3053
3067
  t,
3054
3068
  n
3055
3069
  ]);
3056
3070
  }
3057
- function bn(e, t, n = /* @__PURE__ */ new Map()) {
3071
+ function xn(e, t, n = /* @__PURE__ */ new Map()) {
3058
3072
  let r = /* @__PURE__ */ new Map();
3059
3073
  for (let e of t?.actors ?? []) for (let t of e.instances) for (let n of t.connections) r.set(JSON.stringify([
3060
3074
  e.actorName,
@@ -3062,18 +3076,18 @@ function bn(e, t, n = /* @__PURE__ */ new Map()) {
3062
3076
  n.id
3063
3077
  ]), n.metadata);
3064
3078
  let i = e.map((e) => {
3065
- let t = JSON.stringify([
3079
+ let n = JSON.stringify([
3066
3080
  e.actorName,
3067
3081
  e.actorId,
3068
3082
  e.connectionId
3069
- ]), n = e.closedAtMs === null ? r.has(t) ? "open" : "lost" : "closed";
3070
- return n === "open" ? {
3083
+ ]), i = e.closedAtMs === null ? r.has(n) ? "open" : t?.connectionsComplete === !1 ? "unknown" : "lost" : "closed";
3084
+ return i === "open" ? {
3071
3085
  ...e,
3072
- status: n,
3073
- metadata: r.get(t)
3086
+ status: i,
3087
+ metadata: r.get(n)
3074
3088
  } : {
3075
3089
  ...e,
3076
- status: n
3090
+ status: i
3077
3091
  };
3078
3092
  }), a = new Set(i.map((e) => JSON.stringify([
3079
3093
  e.actorName,
@@ -3081,7 +3095,7 @@ function bn(e, t, n = /* @__PURE__ */ new Map()) {
3081
3095
  e.connectionId
3082
3096
  ])));
3083
3097
  for (let e of t?.actors ?? []) for (let t of e.instances) for (let r of t.connections) {
3084
- let o = yn(e.actorName, t.actorId, r.id);
3098
+ let o = bn(e.actorName, t.actorId, r.id);
3085
3099
  if (a.has(o)) continue;
3086
3100
  let s = n.get(o);
3087
3101
  i.unshift({
@@ -3101,27 +3115,28 @@ function bn(e, t, n = /* @__PURE__ */ new Map()) {
3101
3115
  }
3102
3116
  return i;
3103
3117
  }
3104
- function xn(e, t) {
3118
+ function Sn(e, t) {
3105
3119
  if (e.openedAtMs === null) return null;
3106
3120
  let n = e.status === "closed" ? e.closedAtMs : e.status === "open" ? Math.max(t, e.openedAtMs) : e.lastSeenMs;
3107
3121
  return {
3108
3122
  ms: Math.max(0, n - e.openedAtMs),
3109
- lowerBound: e.status === "lost"
3123
+ lowerBound: e.status === "lost" || e.status === "unknown"
3110
3124
  };
3111
3125
  }
3112
- function Sn(e, t) {
3113
- let n = e.map((e) => xn(e, t)).filter((e) => e !== null && !e.lowerBound), r = e.reduce((e, t) => e + t.messages, 0);
3126
+ function Cn(e, t) {
3127
+ let n = e.map((e) => Sn(e, t)).filter((e) => e !== null && !e.lowerBound), r = e.reduce((e, t) => e + t.messages, 0);
3114
3128
  return {
3115
3129
  total: e.length,
3116
3130
  open: e.filter((e) => e.status === "open").length,
3117
3131
  lost: e.filter((e) => e.status === "lost").length,
3118
- median: Tn(n.map((e) => e.ms), .5),
3119
- p95: Tn(n.map((e) => e.ms), .95),
3132
+ closed: e.filter((e) => e.status === "closed").length,
3133
+ median: En(n.map((e) => e.ms), .5),
3134
+ p95: En(n.map((e) => e.ms), .95),
3120
3135
  messages: r,
3121
3136
  messagesPerSession: e.length ? r / e.length : null
3122
3137
  };
3123
3138
  }
3124
- function Cn(e) {
3139
+ function wn(e) {
3125
3140
  if (e < 1e3) return `${e.toLocaleString(void 0, { maximumFractionDigits: 0 })} ms`;
3126
3141
  if (e < 6e4) return `${(e / 1e3).toLocaleString(void 0, { maximumFractionDigits: 1 })} s`;
3127
3142
  let t = Math.floor(e / 6e4);
@@ -3129,7 +3144,7 @@ function Cn(e) {
3129
3144
  let n = Math.floor(t / 60);
3130
3145
  return n < 24 ? `${n}h ${t % 60}m` : `${Math.floor(n / 24)}d ${n % 24}h`;
3131
3146
  }
3132
- function wn(e, t = 3) {
3147
+ function Tn(e, t = 3) {
3133
3148
  if (e == null) return null;
3134
3149
  if (typeof e != "object") return String(e);
3135
3150
  let n = Array.isArray(e) ? e.map((e, t) => [String(t), e]) : Object.entries(e);
@@ -3137,10 +3152,10 @@ function wn(e, t = 3) {
3137
3152
  let r = n.slice(0, t).map(([e, t]) => `${e}: ${typeof t == "string" ? t : JSON.stringify(t)}`);
3138
3153
  return n.length > t ? `${r.join(" · ")} · +${n.length - t}` : r.join(" · ");
3139
3154
  }
3140
- function Tn(e, t) {
3155
+ function En(e, t) {
3141
3156
  return e.length ? e.sort((e, t) => e - t)[Math.max(0, Math.ceil(e.length * t) - 1)] : null;
3142
3157
  }
3143
- function En(e) {
3158
+ function Dn(e) {
3144
3159
  return typeof e.connectionId == "string" && typeof e.actorName == "string" && typeof e.actorId == "string" && (e.hostId === null || typeof e.hostId == "string") && [
3145
3160
  e.openedAtMs,
3146
3161
  e.closedAtMs,
@@ -3149,7 +3164,7 @@ function En(e) {
3149
3164
  }
3150
3165
  //#endregion
3151
3166
  //#region src/SocketTimeline.tsx
3152
- var Dn = 18, On = 8, kn = 40, $ = 6e4, An = 60 * $, jn = 24 * An, Mn = [
3167
+ var On = 18, kn = 8, An = 40, $ = 6e4, jn = 60 * $, Mn = 24 * jn, Nn = [
3153
3168
  1e3,
3154
3169
  2e3,
3155
3170
  5e3,
@@ -3162,17 +3177,17 @@ var Dn = 18, On = 8, kn = 40, $ = 6e4, An = 60 * $, jn = 24 * An, Mn = [
3162
3177
  10 * $,
3163
3178
  15 * $,
3164
3179
  30 * $,
3165
- An,
3166
- 2 * An,
3167
- 3 * An,
3168
- 6 * An,
3169
- 12 * An,
3170
3180
  jn,
3171
3181
  2 * jn,
3172
- 7 * jn
3182
+ 3 * jn,
3183
+ 6 * jn,
3184
+ 12 * jn,
3185
+ Mn,
3186
+ 2 * Mn,
3187
+ 7 * Mn
3173
3188
  ];
3174
- function Nn({ sessions: e, start: t, end: n, endLabel: r = "now", selected: i, onSelect: o }) {
3175
- let [s, c] = a(), l = In(e, t, n), u = l.slice(0, kn), d = Math.max(1, n - t), f = Bn(t, n), p = Vn(d), m = (e) => `${(Math.min(Math.max(e, t), n) - t) / d * 100}%`, h = (e, t) => {
3189
+ function Pn({ sessions: e, start: t, end: n, endLabel: r = "now", selected: i, onSelect: o }) {
3190
+ let [s, c] = a(), l = Ln(e, t, n), u = l.slice(0, An), d = Math.max(1, n - t), f = Vn(t, n), p = Hn(d), m = (e) => `${(Math.min(Math.max(e, t), n) - t) / d * 100}%`, h = (e, t) => {
3176
3191
  let n = t.getBoundingClientRect(), r = t.closest(".socket-timeline").getBoundingClientRect(), i = n.top - r.top < 150;
3177
3192
  c({
3178
3193
  session: e,
@@ -3181,50 +3196,50 @@ function Nn({ sessions: e, start: t, end: n, endLabel: r = "now", selected: i, o
3181
3196
  below: i
3182
3197
  });
3183
3198
  };
3184
- return /* @__PURE__ */ j("div", {
3199
+ return /* @__PURE__ */ k("div", {
3185
3200
  className: "socket-timeline",
3186
3201
  role: "group",
3187
3202
  "aria-label": "Connection timeline",
3188
3203
  onMouseLeave: () => c(void 0),
3189
3204
  children: [
3190
- /* @__PURE__ */ j("div", {
3205
+ /* @__PURE__ */ k("div", {
3191
3206
  className: "socket-timeline-axis",
3192
3207
  "aria-hidden": "true",
3193
- children: [/* @__PURE__ */ A("span", {}), /* @__PURE__ */ j("div", { children: [f.map((e) => /* @__PURE__ */ A("span", {
3208
+ children: [/* @__PURE__ */ O("span", {}), /* @__PURE__ */ k("div", { children: [f.map((e) => /* @__PURE__ */ O("span", {
3194
3209
  style: { left: m(e) },
3195
- children: Hn(e, p)
3196
- }, e)), /* @__PURE__ */ A("span", {
3210
+ children: Un(e, p)
3211
+ }, e)), /* @__PURE__ */ O("span", {
3197
3212
  className: "socket-timeline-now",
3198
3213
  children: r
3199
3214
  })] })]
3200
3215
  }),
3201
- /* @__PURE__ */ j("div", {
3216
+ /* @__PURE__ */ k("div", {
3202
3217
  className: "socket-timeline-body",
3203
3218
  children: [
3204
- /* @__PURE__ */ A("div", {
3219
+ /* @__PURE__ */ O("div", {
3205
3220
  className: "socket-timeline-grid",
3206
3221
  "aria-hidden": "true",
3207
- children: f.map((e) => /* @__PURE__ */ A("i", { style: { left: m(e) } }, e))
3222
+ children: f.map((e) => /* @__PURE__ */ O("i", { style: { left: m(e) } }, e))
3208
3223
  }),
3209
- u.map((e) => /* @__PURE__ */ j("div", {
3224
+ u.map((e) => /* @__PURE__ */ k("div", {
3210
3225
  className: "socket-timeline-row",
3211
- children: [/* @__PURE__ */ j("div", {
3226
+ children: [/* @__PURE__ */ k("div", {
3212
3227
  className: "socket-timeline-label",
3213
3228
  title: `${e.actorName} / ${e.actorId}`,
3214
- children: [/* @__PURE__ */ A("span", { children: e.actorName }), /* @__PURE__ */ A("strong", { children: e.actorId })]
3215
- }), /* @__PURE__ */ A("div", {
3229
+ children: [/* @__PURE__ */ O("span", { children: e.actorName }), /* @__PURE__ */ O("strong", { children: e.actorId })]
3230
+ }), /* @__PURE__ */ O("div", {
3216
3231
  className: "socket-timeline-lanes",
3217
- style: { height: e.rows.length * Dn + 16 },
3218
- children: e.rows.flatMap((e, t) => e.map((e) => /* @__PURE__ */ A("button", {
3232
+ style: { height: e.rows.length * On + 16 },
3233
+ children: e.rows.flatMap((e, t) => e.map((e) => /* @__PURE__ */ O("button", {
3219
3234
  type: "button",
3220
3235
  className: `socket-bar socket-bar-${e.session.status}${e.openEnded ? " socket-bar-open-ended" : ""}${e.unknownStart ? " socket-bar-unknown-start" : ""}`,
3221
3236
  "data-state": i === e.session ? "selected" : void 0,
3222
3237
  style: {
3223
3238
  left: m(e.from),
3224
3239
  width: `${(e.to - e.from) / d * 100}%`,
3225
- top: On + t * Dn
3240
+ top: kn + t * On
3226
3241
  },
3227
- "aria-label": Kn(e.session, n),
3242
+ "aria-label": qn(e.session, n),
3228
3243
  onClick: (t) => o(e.session, t.currentTarget),
3229
3244
  onMouseEnter: (t) => h(e.session, t.currentTarget),
3230
3245
  onFocus: (t) => h(e.session, t.currentTarget),
@@ -3232,62 +3247,62 @@ function Nn({ sessions: e, start: t, end: n, endLabel: r = "now", selected: i, o
3232
3247
  }, e.session.connectionId)))
3233
3248
  })]
3234
3249
  }, e.key)),
3235
- l.length > kn && /* @__PURE__ */ j("p", {
3250
+ l.length > An && /* @__PURE__ */ k("p", {
3236
3251
  className: "socket-timeline-more",
3237
3252
  children: [
3238
- (l.length - kn).toLocaleString(),
3253
+ (l.length - An).toLocaleString(),
3239
3254
  " more ",
3240
- l.length - kn === 1 ? "instance is" : "instances are",
3255
+ l.length - An === 1 ? "instance is" : "instances are",
3241
3256
  " listed in the table below."
3242
3257
  ]
3243
3258
  })
3244
3259
  ]
3245
3260
  }),
3246
- s && /* @__PURE__ */ j("div", {
3261
+ s && /* @__PURE__ */ k("div", {
3247
3262
  role: "tooltip",
3248
3263
  className: `socket-tooltip${s.below ? " socket-tooltip-below" : ""}`,
3249
3264
  style: {
3250
3265
  left: s.left,
3251
3266
  top: s.top
3252
3267
  },
3253
- children: [/* @__PURE__ */ A(Fn, { metadata: s.session.metadata }), /* @__PURE__ */ j("dl", { children: [
3254
- /* @__PURE__ */ A("dt", { children: "Connection" }),
3255
- /* @__PURE__ */ A("dd", { children: Gn(s.session.connectionId) }),
3256
- /* @__PURE__ */ A("dt", { children: "Instance" }),
3257
- /* @__PURE__ */ j("dd", { children: [
3268
+ children: [/* @__PURE__ */ O(In, { metadata: s.session.metadata }), /* @__PURE__ */ k("dl", { children: [
3269
+ /* @__PURE__ */ O("dt", { children: "Connection" }),
3270
+ /* @__PURE__ */ O("dd", { children: Kn(s.session.connectionId) }),
3271
+ /* @__PURE__ */ O("dt", { children: "Instance" }),
3272
+ /* @__PURE__ */ k("dd", { children: [
3258
3273
  s.session.actorName,
3259
3274
  " / ",
3260
3275
  s.session.actorId
3261
3276
  ] }),
3262
- /* @__PURE__ */ A("dt", { children: "Status" }),
3263
- /* @__PURE__ */ A("dd", { children: Un(s.session.status) }),
3264
- /* @__PURE__ */ A("dt", { children: "Opened" }),
3265
- /* @__PURE__ */ A("dd", { children: s.session.openedAtMs === null ? "Before retained history" : `${s.session.estimatedStart ? "≈ " : ""}${new Date(s.session.openedAtMs).toLocaleTimeString([], { hour12: !1 })}` }),
3266
- /* @__PURE__ */ A("dt", { children: "Duration" }),
3267
- /* @__PURE__ */ A("dd", { children: Wn(s.session, n) }),
3268
- /* @__PURE__ */ A("dt", { children: "Messages" }),
3269
- /* @__PURE__ */ A("dd", { children: s.session.messages.toLocaleString() })
3277
+ /* @__PURE__ */ O("dt", { children: "Status" }),
3278
+ /* @__PURE__ */ O("dd", { children: Wn(s.session.status) }),
3279
+ /* @__PURE__ */ O("dt", { children: "Opened" }),
3280
+ /* @__PURE__ */ O("dd", { children: s.session.openedAtMs === null ? "Before retained history" : `${s.session.estimatedStart ? "≈ " : ""}${new Date(s.session.openedAtMs).toLocaleTimeString([], { hour12: !1 })}` }),
3281
+ /* @__PURE__ */ O("dt", { children: "Duration" }),
3282
+ /* @__PURE__ */ O("dd", { children: Gn(s.session, n) }),
3283
+ /* @__PURE__ */ O("dt", { children: "Messages" }),
3284
+ /* @__PURE__ */ O("dd", { children: s.session.messages.toLocaleString() })
3270
3285
  ] })]
3271
3286
  })
3272
3287
  ]
3273
3288
  });
3274
3289
  }
3275
- var Pn = 4;
3276
- function Fn({ metadata: e }) {
3290
+ var Fn = 4;
3291
+ function In({ metadata: e }) {
3277
3292
  if (e == null) return null;
3278
3293
  let t = typeof e == "object" ? Array.isArray(e) ? e.map((e, t) => [String(t), e]) : Object.entries(e) : [["value", e]];
3279
- return t.length ? /* @__PURE__ */ j("dl", {
3294
+ return t.length ? /* @__PURE__ */ k("dl", {
3280
3295
  className: "socket-tooltip-metadata",
3281
3296
  "aria-label": "Connection metadata",
3282
- children: [t.slice(0, Pn).map(([e, t]) => /* @__PURE__ */ j("div", { children: [/* @__PURE__ */ A("dt", { children: e }), /* @__PURE__ */ A("dd", { children: typeof t == "string" ? t : JSON.stringify(t) })] }, e)), t.length > Pn && /* @__PURE__ */ j("p", { children: [
3297
+ children: [t.slice(0, Fn).map(([e, t]) => /* @__PURE__ */ k("div", { children: [/* @__PURE__ */ O("dt", { children: e }), /* @__PURE__ */ O("dd", { children: typeof t == "string" ? t : JSON.stringify(t) })] }, e)), t.length > Fn && /* @__PURE__ */ k("p", { children: [
3283
3298
  "+",
3284
- t.length - Pn,
3299
+ t.length - Fn,
3285
3300
  " more in details"
3286
3301
  ] })]
3287
3302
  }) : null;
3288
3303
  }
3289
- function In(e, t, n) {
3290
- let r = /* @__PURE__ */ new Map(), i = e.map((e) => Ln(e, t, n)).filter((e) => e.to > t).sort((e, t) => e.from - t.from || e.to - t.to);
3304
+ function Ln(e, t, n) {
3305
+ let r = /* @__PURE__ */ new Map(), i = e.map((e) => Rn(e, t, n)).filter((e) => e.to > t).sort((e, t) => e.from - t.from || e.to - t.to);
3291
3306
  for (let e of i) {
3292
3307
  let i = `${e.session.actorName}${e.session.actorId}`, a = r.get(i) ?? {
3293
3308
  key: i,
@@ -3296,38 +3311,38 @@ function In(e, t, n) {
3296
3311
  rows: []
3297
3312
  };
3298
3313
  r.set(i, a);
3299
- let o = a.rows.find((r) => r.at(-1).to + Rn(t, n) <= e.from);
3314
+ let o = a.rows.find((r) => r.at(-1).to + zn(t, n) <= e.from);
3300
3315
  o ? o.push(e) : a.rows.push([e]);
3301
3316
  }
3302
- return [...r.values()].sort((e, t) => zn(t) - zn(e));
3317
+ return [...r.values()].sort((e, t) => Bn(t) - Bn(e));
3303
3318
  }
3304
- function Ln(e, t, n) {
3319
+ function Rn(e, t, n) {
3305
3320
  let r = e.openedAtMs ?? (e.status === "open" ? t : e.lastSeenMs ?? t), i = e.status === "closed" ? e.closedAtMs : e.status === "open" ? n : e.lastSeenMs ?? r;
3306
3321
  return {
3307
3322
  session: e,
3308
3323
  from: Math.max(t, r),
3309
- to: Math.max(Math.max(t, r) + Rn(t, n), Math.min(n, i)),
3324
+ to: Math.max(Math.max(t, r) + zn(t, n), Math.min(n, i)),
3310
3325
  openEnded: e.status !== "closed",
3311
3326
  unknownStart: e.openedAtMs === null
3312
3327
  };
3313
3328
  }
3314
- function Rn(e, t) {
3329
+ function zn(e, t) {
3315
3330
  return Math.max(1, (t - e) / 160);
3316
3331
  }
3317
- function zn(e) {
3332
+ function Bn(e) {
3318
3333
  return Math.max(...e.rows.flat().map((e) => e.to));
3319
3334
  }
3320
- function Bn(e, t) {
3321
- let n = Vn(Math.max(1, t - e)), r = [];
3335
+ function Vn(e, t) {
3336
+ let n = Hn(Math.max(1, t - e)), r = [];
3322
3337
  for (let i = Math.floor(e / n) * n + n; i < t - n * .35; i += n) r.push(i);
3323
3338
  return r;
3324
3339
  }
3325
- function Vn(e) {
3326
- return Mn.find((t) => e / t <= 9) ?? Mn.at(-1);
3340
+ function Hn(e) {
3341
+ return Nn.find((t) => e / t <= 9) ?? Nn.at(-1);
3327
3342
  }
3328
- function Hn(e, t) {
3343
+ function Un(e, t) {
3329
3344
  let n = new Date(e);
3330
- return t >= jn ? n.toLocaleDateString([], {
3345
+ return t >= Mn ? n.toLocaleDateString([], {
3331
3346
  month: "short",
3332
3347
  day: "numeric"
3333
3348
  }) : t >= $ ? n.toLocaleTimeString([], {
@@ -3336,38 +3351,38 @@ function Hn(e, t) {
3336
3351
  hour12: !1
3337
3352
  }) : n.toLocaleTimeString([], { hour12: !1 });
3338
3353
  }
3339
- function Un(e) {
3340
- return e === "open" ? "Open" : e === "closed" ? "Closed" : "Lost";
3354
+ function Wn(e) {
3355
+ return e === "open" ? "Open" : e === "closed" ? "Closed" : e === "unknown" ? "Unknown" : "Lost";
3341
3356
  }
3342
- function Wn(e, t) {
3343
- let n = xn(e, t);
3344
- return n ? `${n.lowerBound ? "≥ " : ""}${Cn(n.ms)}` : "Unknown";
3357
+ function Gn(e, t) {
3358
+ let n = Sn(e, t);
3359
+ return n ? `${n.lowerBound ? "≥ " : ""}${wn(n.ms)}` : "Unknown";
3345
3360
  }
3346
- function Gn(e) {
3361
+ function Kn(e) {
3347
3362
  return e.length > 14 ? `${e.slice(0, 8)}…${e.slice(-4)}` : e;
3348
3363
  }
3349
- function Kn(e, t) {
3350
- let n = wn(e.metadata);
3351
- return `${Un(e.status)} connection ${Gn(e.connectionId)}${n === null ? "" : ` (${n})`} on ${e.actorName} ${e.actorId}, ${Wn(e, t)}`;
3364
+ function qn(e, t) {
3365
+ let n = Tn(e.metadata);
3366
+ return `${Wn(e.status)} connection ${Kn(e.connectionId)}${n === null ? "" : ` (${n})`} on ${e.actorName} ${e.actorId}, ${Gn(e, t)}`;
3352
3367
  }
3353
3368
  //#endregion
3354
3369
  //#region src/components/ui/sheet.tsx
3355
- var qn = R.Root, Jn = R.Title, Yn = R.Description;
3356
- function Xn({ className: e, children: t, container: n, ...r }) {
3357
- return /* @__PURE__ */ j(R.Portal, {
3370
+ var Jn = R.Root, Yn = R.Title, Xn = R.Description;
3371
+ function Zn({ className: e, children: t, container: n, ...r }) {
3372
+ return /* @__PURE__ */ k(R.Portal, {
3358
3373
  container: n,
3359
- children: [/* @__PURE__ */ A(R.Overlay, { className: "la-sheet-overlay" }), /* @__PURE__ */ j(R.Content, {
3374
+ children: [/* @__PURE__ */ O(R.Overlay, { className: "la-sheet-overlay" }), /* @__PURE__ */ k(R.Content, {
3360
3375
  "data-slot": "sheet-content",
3361
3376
  className: z("la-observer la-sheet", e),
3362
3377
  ...r,
3363
- children: [t, /* @__PURE__ */ A(R.Close, {
3378
+ children: [t, /* @__PURE__ */ O(R.Close, {
3364
3379
  asChild: !0,
3365
- children: /* @__PURE__ */ A(V, {
3380
+ children: /* @__PURE__ */ O(V, {
3366
3381
  className: "la-sheet-close",
3367
3382
  variant: "ghost",
3368
3383
  size: "icon",
3369
3384
  "aria-label": "Close",
3370
- children: /* @__PURE__ */ A(T, { "aria-hidden": "true" })
3385
+ children: /* @__PURE__ */ O(E, { "aria-hidden": "true" })
3371
3386
  })
3372
3387
  })]
3373
3388
  })]
@@ -3375,8 +3390,8 @@ function Xn({ className: e, children: t, container: n, ...r }) {
3375
3390
  }
3376
3391
  //#endregion
3377
3392
  //#region src/socket-history.ts
3378
- function Zn(e, t) {
3379
- let n = ft(e, t, e.listWebSockets, 5e3);
3393
+ function Qn(e, t) {
3394
+ let n = pt(e, t, e.listWebSockets, 5e3);
3380
3395
  return {
3381
3396
  ...n,
3382
3397
  rows: n.value,
@@ -3385,52 +3400,52 @@ function Zn(e, t) {
3385
3400
  }
3386
3401
  //#endregion
3387
3402
  //#region src/WebSocketObserver.tsx
3388
- function Qn({ client: e, onSelectActor: n, timeRange: o, onTimeRangeChange: s }) {
3389
- let { inventory: c, failed: l, retry: u } = lt(e), [d, f] = a(Le), p = o ?? d, m = s ?? f, [h, g] = a(Date.now), [_, v] = a(""), [y, ee] = a("all"), [b, te] = a(), x = i(null), S = i(null);
3403
+ function $n({ client: e, onSelectActor: n, timeRange: o, onTimeRangeChange: s }) {
3404
+ let { inventory: c, failed: l, retry: u } = ut(e), [d, f] = a(Re), p = o ?? d, m = s ?? f, [h, g] = a(Date.now), [_, v] = a(""), [y, ee] = a("all"), [b, x] = a(), S = i(null), C = i(null);
3390
3405
  t(() => {
3391
3406
  let e = setInterval(() => g(Date.now()), 5e3);
3392
3407
  return () => clearInterval(e);
3393
3408
  }, []);
3394
- let C = Re(p, h), w = C.toMs ?? h, T = Zn(e, C), E = rr(c, T.retry), D = r(() => bn(T.rows ?? [], c, E), [
3395
- T.rows,
3409
+ let w = ze(p, h), T = w.toMs ?? h, E = Qn(e, w), A = ir(c, E.retry), j = r(() => xn(E.rows ?? [], c, A), [
3410
+ E.rows,
3396
3411
  c,
3397
- E
3398
- ]), O = !!c || l, M = _.trim().toLocaleLowerCase(), N = D.filter((e) => (y === "all" || e.status === y) && (!M || `${e.connectionId} ${e.actorName} ${e.actorId} ${e.hostId ?? ""}`.toLocaleLowerCase().includes(M))).sort((e, t) => Number(t.status === "open") - Number(e.status === "open") || (t.openedAtMs ?? t.lastSeenMs ?? Infinity) - (e.openedAtMs ?? e.lastSeenMs ?? Infinity)), P = Sn(D, h), F = Math.max(0, ...D.filter((e) => e.status !== "open").map((e) => xn(e, h)?.ms ?? 0)) || P.p95, I = nr(N, C.fromMs, w), L = r(() => ir(D, c), [D, c]);
3399
- return t(() => te(void 0), [e, p]), /* @__PURE__ */ j("section", {
3400
- ref: x,
3412
+ A
3413
+ ]), M = !!c || l, N = _.trim().toLocaleLowerCase(), P = j.filter((e) => (y === "all" || e.status === y) && (!N || `${e.connectionId} ${e.actorName} ${e.actorId} ${e.hostId ?? ""}`.toLocaleLowerCase().includes(N))).sort((e, t) => Number(t.status === "open") - Number(e.status === "open") || (t.openedAtMs ?? t.lastSeenMs ?? Infinity) - (e.openedAtMs ?? e.lastSeenMs ?? Infinity)), F = Cn(j, h), ne = Math.max(0, ...j.filter((e) => e.status !== "open").map((e) => Sn(e, h)?.ms ?? 0)) || F.p95, I = rr(P, w.fromMs, T), L = r(() => ar(j, c), [j, c]);
3414
+ return t(() => x(void 0), [e, p]), /* @__PURE__ */ k("section", {
3415
+ ref: S,
3401
3416
  className: "la-observer overview websockets",
3402
3417
  "aria-label": "WebSocket observer",
3403
3418
  children: [
3404
- /* @__PURE__ */ j("div", {
3419
+ /* @__PURE__ */ k("div", {
3405
3420
  className: "overview-heading",
3406
- children: [/* @__PURE__ */ j("div", { children: [/* @__PURE__ */ A("h1", { children: "WebSockets" }), /* @__PURE__ */ A("p", { children: O ? `${P.open.toLocaleString()} open now${T.supported ? ` · ${P.total.toLocaleString()} ${P.total === 1 ? "session" : "sessions"} ${U(p)}` : ""}` : "Connecting to inventory…" })] }), /* @__PURE__ */ j("div", {
3421
+ children: [/* @__PURE__ */ k("div", { children: [/* @__PURE__ */ O("h1", { children: "WebSockets" }), /* @__PURE__ */ O("p", { children: M ? `${F.open.toLocaleString()} open now${E.supported ? ` · ${F.total.toLocaleString()} ${F.total === 1 ? "session" : "sessions"} ${U(p)}` : ""}` : "Connecting to inventory…" })] }), /* @__PURE__ */ k("div", {
3407
3422
  className: "overview-controls",
3408
3423
  children: [
3409
- /* @__PURE__ */ A("span", {
3424
+ /* @__PURE__ */ O("span", {
3410
3425
  className: "overview-updated",
3411
- children: T.failed ? "History reconnecting…" : T.updatedAt ? /* @__PURE__ */ j(k, { children: ["Updated ", /* @__PURE__ */ A("time", {
3412
- dateTime: new Date(T.updatedAt).toISOString(),
3413
- children: new Date(T.updatedAt).toLocaleTimeString([], { hour12: !1 })
3426
+ children: E.failed ? "History reconnecting…" : E.updatedAt ? /* @__PURE__ */ k(D, { children: ["Updated ", /* @__PURE__ */ O("time", {
3427
+ dateTime: new Date(E.updatedAt).toISOString(),
3428
+ children: new Date(E.updatedAt).toLocaleTimeString([], { hour12: !1 })
3414
3429
  })] }) : null
3415
3430
  }),
3416
- T.supported && /* @__PURE__ */ A(He, {
3431
+ E.supported && /* @__PURE__ */ O(Ue, {
3417
3432
  value: p,
3418
3433
  onChange: m,
3419
3434
  className: "overview-range"
3420
3435
  }),
3421
- /* @__PURE__ */ A(V, {
3436
+ /* @__PURE__ */ O(V, {
3422
3437
  variant: "outline",
3423
3438
  size: "icon",
3424
3439
  "aria-label": "Refresh connections",
3425
3440
  onClick: () => {
3426
- u(), T.retry();
3441
+ u(), E.retry();
3427
3442
  },
3428
- children: /* @__PURE__ */ A(ne, { "aria-hidden": "true" })
3443
+ children: /* @__PURE__ */ O(te, { "aria-hidden": "true" })
3429
3444
  })
3430
3445
  ]
3431
3446
  })]
3432
3447
  }),
3433
- l && /* @__PURE__ */ j("p", {
3448
+ l && /* @__PURE__ */ k("p", {
3434
3449
  role: "alert",
3435
3450
  className: "overview-alert",
3436
3451
  children: [
@@ -3440,90 +3455,95 @@ function Qn({ client: e, onSelectActor: n, timeRange: o, onTimeRangeChange: s })
3440
3455
  " Retrying automatically."
3441
3456
  ]
3442
3457
  }),
3443
- T.failed && /* @__PURE__ */ j("p", {
3458
+ E.failed && /* @__PURE__ */ k("p", {
3444
3459
  role: "alert",
3445
3460
  className: "overview-alert",
3446
3461
  children: [
3447
3462
  "Connection history unavailable. ",
3448
- T.rows ? "Showing the last loaded sessions." : "Only currently open connections are shown.",
3463
+ E.rows ? "Showing the last loaded sessions." : "Only currently open connections are shown.",
3449
3464
  " Retrying automatically."
3450
3465
  ]
3451
3466
  }),
3452
- /* @__PURE__ */ A($n, {
3453
- summary: P,
3454
- ready: O,
3455
- history: T.supported && !!T.rows,
3467
+ /* @__PURE__ */ O(er, {
3468
+ summary: F,
3469
+ ready: M,
3470
+ history: E.supported && !!E.rows,
3456
3471
  range: p
3457
3472
  }),
3458
- /* @__PURE__ */ j("div", {
3473
+ /* @__PURE__ */ O(se, { inventory: c }),
3474
+ /* @__PURE__ */ k("div", {
3459
3475
  className: "socket-filterbar",
3460
- children: [/* @__PURE__ */ A(ge, {
3476
+ children: [/* @__PURE__ */ O(_e, {
3461
3477
  label: "Filter connections",
3462
3478
  placeholder: "Filter by connection, actor, instance, or host…",
3463
3479
  value: _,
3464
3480
  onChange: v,
3465
3481
  suggestions: L
3466
- }), /* @__PURE__ */ j(ot, {
3482
+ }), /* @__PURE__ */ k(st, {
3467
3483
  "aria-label": "Filter by status",
3468
3484
  size: "sm",
3469
3485
  value: y,
3470
3486
  onChange: (e) => ee(e.target.value),
3471
3487
  children: [
3472
- /* @__PURE__ */ A(G, {
3488
+ /* @__PURE__ */ O(G, {
3473
3489
  value: "all",
3474
3490
  children: "All statuses"
3475
3491
  }),
3476
- /* @__PURE__ */ A(G, {
3492
+ /* @__PURE__ */ O(G, {
3477
3493
  value: "open",
3478
3494
  children: "Open"
3479
3495
  }),
3480
- /* @__PURE__ */ A(G, {
3496
+ /* @__PURE__ */ O(G, {
3481
3497
  value: "closed",
3482
3498
  children: "Closed"
3483
3499
  }),
3484
- /* @__PURE__ */ A(G, {
3500
+ /* @__PURE__ */ O(G, {
3485
3501
  value: "lost",
3486
3502
  children: "Lost"
3503
+ }),
3504
+ /* @__PURE__ */ O(G, {
3505
+ value: "unknown",
3506
+ children: "Unknown"
3487
3507
  })
3488
3508
  ]
3489
3509
  })]
3490
3510
  }),
3491
- T.supported && /* @__PURE__ */ j("section", {
3511
+ E.supported && /* @__PURE__ */ k("section", {
3492
3512
  className: "overview-panel socket-timeline-panel",
3493
3513
  "aria-label": "Connection timeline",
3494
- children: [/* @__PURE__ */ j("div", {
3514
+ children: [/* @__PURE__ */ k("div", {
3495
3515
  className: "socket-panel-heading",
3496
- children: [/* @__PURE__ */ j("h2", { children: ["Timeline ", /* @__PURE__ */ A("span", { children: N.length.toLocaleString() })] }), /* @__PURE__ */ j("ul", {
3516
+ children: [/* @__PURE__ */ k("h2", { children: ["Timeline ", /* @__PURE__ */ O("span", { children: P.length.toLocaleString() })] }), /* @__PURE__ */ k("ul", {
3497
3517
  className: "socket-legend",
3498
3518
  "aria-label": "Timeline legend",
3499
3519
  children: [
3500
- /* @__PURE__ */ j("li", { children: [/* @__PURE__ */ A("i", { className: "socket-swatch socket-swatch-open" }), " Open"] }),
3501
- /* @__PURE__ */ j("li", { children: [/* @__PURE__ */ A("i", { className: "socket-swatch socket-swatch-closed" }), " Closed"] }),
3502
- /* @__PURE__ */ j("li", { children: [/* @__PURE__ */ A("i", { className: "socket-swatch socket-swatch-lost" }), " Lost · no disconnect recorded"] })
3520
+ /* @__PURE__ */ k("li", { children: [/* @__PURE__ */ O("i", { className: "socket-swatch socket-swatch-open" }), " Open"] }),
3521
+ /* @__PURE__ */ k("li", { children: [/* @__PURE__ */ O("i", { className: "socket-swatch socket-swatch-closed" }), " Closed"] }),
3522
+ /* @__PURE__ */ k("li", { children: [/* @__PURE__ */ O("i", { className: "socket-swatch socket-swatch-lost" }), " Lost · no disconnect recorded"] })
3503
3523
  ]
3504
3524
  })]
3505
- }), N.length ? /* @__PURE__ */ A(Nn, {
3506
- sessions: N,
3525
+ }), P.length ? /* @__PURE__ */ O(Pn, {
3526
+ sessions: P,
3507
3527
  start: I,
3508
- end: w,
3509
- endLabel: C.toMs === void 0 ? "now" : new Date(C.toMs).toLocaleTimeString([], {
3528
+ end: T,
3529
+ endLabel: w.toMs === void 0 ? "now" : new Date(w.toMs).toLocaleTimeString([], {
3510
3530
  hour: "2-digit",
3511
3531
  minute: "2-digit",
3512
3532
  hour12: !1
3513
3533
  }),
3514
3534
  selected: b,
3515
3535
  onSelect: (e, t) => {
3516
- S.current = t, te(e);
3536
+ C.current = t, x(e);
3517
3537
  }
3518
- }) : /* @__PURE__ */ j("div", {
3538
+ }) : /* @__PURE__ */ k("div", {
3519
3539
  className: "overview-empty socket-timeline-empty",
3520
3540
  role: "status",
3521
- children: [/* @__PURE__ */ A("strong", { children: ar(O, T, D.length) }), /* @__PURE__ */ A("p", { children: D.length ? "Try another filter or a wider time window." : "Sessions appear here as clients connect to actors." })]
3541
+ children: [/* @__PURE__ */ O("strong", { children: or(M, E, j.length) }), /* @__PURE__ */ O("p", { children: j.length ? "Try another filter or a wider time window." : "Sessions appear here as clients connect to actors." })]
3522
3542
  })]
3523
3543
  }),
3524
- /* @__PURE__ */ j("div", {
3544
+ /* @__PURE__ */ k("div", {
3525
3545
  className: "overview-panel",
3526
- children: [/* @__PURE__ */ j(K, {
3546
+ children: [/* @__PURE__ */ k(K, {
3527
3547
  className: "overview-table socket-table",
3528
3548
  "aria-label": "WebSocket connections",
3529
3549
  containerProps: {
@@ -3532,59 +3552,59 @@ function Qn({ client: e, onSelectActor: n, timeRange: o, onTimeRangeChange: s })
3532
3552
  "aria-label": "WebSocket connections",
3533
3553
  tabIndex: 0
3534
3554
  },
3535
- children: [/* @__PURE__ */ A(q, { children: /* @__PURE__ */ j(Y, { children: [
3536
- /* @__PURE__ */ A(X, {
3555
+ children: [/* @__PURE__ */ O(q, { children: /* @__PURE__ */ k(Y, { children: [
3556
+ /* @__PURE__ */ O(X, {
3537
3557
  scope: "col",
3538
3558
  children: "Status"
3539
3559
  }),
3540
- /* @__PURE__ */ A(X, {
3560
+ /* @__PURE__ */ O(X, {
3541
3561
  scope: "col",
3542
3562
  children: "Connection"
3543
3563
  }),
3544
- /* @__PURE__ */ A(X, {
3564
+ /* @__PURE__ */ O(X, {
3545
3565
  scope: "col",
3546
3566
  children: "Actor class"
3547
3567
  }),
3548
- /* @__PURE__ */ A(X, {
3568
+ /* @__PURE__ */ O(X, {
3549
3569
  scope: "col",
3550
3570
  children: "Instance"
3551
3571
  }),
3552
- /* @__PURE__ */ A(X, {
3572
+ /* @__PURE__ */ O(X, {
3553
3573
  scope: "col",
3554
3574
  children: "Opened"
3555
3575
  }),
3556
- /* @__PURE__ */ A(X, {
3576
+ /* @__PURE__ */ O(X, {
3557
3577
  scope: "col",
3558
3578
  children: "Duration"
3559
3579
  }),
3560
- /* @__PURE__ */ A(X, {
3580
+ /* @__PURE__ */ O(X, {
3561
3581
  scope: "col",
3562
3582
  children: "Messages"
3563
3583
  }),
3564
- /* @__PURE__ */ A(X, {
3584
+ /* @__PURE__ */ O(X, {
3565
3585
  scope: "col",
3566
3586
  children: "Metadata"
3567
3587
  })
3568
- ] }) }), /* @__PURE__ */ A(J, { children: N.map((e) => /* @__PURE__ */ A(er, {
3588
+ ] }) }), /* @__PURE__ */ O(J, { children: P.map((e) => /* @__PURE__ */ O(tr, {
3569
3589
  session: e,
3570
3590
  now: h,
3571
- longest: F,
3591
+ longest: ne,
3572
3592
  selected: b === e,
3573
3593
  onSelect: (t) => {
3574
- S.current = t, te(e);
3594
+ C.current = t, x(e);
3575
3595
  }
3576
3596
  }, JSON.stringify([
3577
3597
  e.actorName,
3578
3598
  e.actorId,
3579
3599
  e.connectionId
3580
3600
  ]))) })]
3581
- }), !N.length && /* @__PURE__ */ j("div", {
3601
+ }), !P.length && /* @__PURE__ */ k("div", {
3582
3602
  className: "overview-empty",
3583
3603
  role: "status",
3584
3604
  children: [
3585
- /* @__PURE__ */ A("strong", { children: ar(O, T, D.length) }),
3586
- /* @__PURE__ */ A("p", { children: D.length ? "Try another connection, actor, or status." : "Open an actor WebSocket to see its connection and metadata here." }),
3587
- !!D.length && /* @__PURE__ */ A(V, {
3605
+ /* @__PURE__ */ O("strong", { children: or(M, E, j.length) }),
3606
+ /* @__PURE__ */ O("p", { children: j.length ? "Try another connection, actor, or status." : "Open an actor WebSocket to see its connection and metadata here." }),
3607
+ !!j.length && /* @__PURE__ */ O(V, {
3588
3608
  variant: "outline",
3589
3609
  onClick: () => {
3590
3610
  v(""), ee("all");
@@ -3594,24 +3614,24 @@ function Qn({ client: e, onSelectActor: n, timeRange: o, onTimeRangeChange: s })
3594
3614
  ]
3595
3615
  })]
3596
3616
  }),
3597
- /* @__PURE__ */ A("div", {
3617
+ /* @__PURE__ */ O("div", {
3598
3618
  className: "overview-data-scope",
3599
- children: /* @__PURE__ */ A("p", { children: T.supported ? `Sessions pair each connection’s onConnect and onDisconnect events from retained request history${T.capped ? "; only the 500 most recent sessions are shown" : ""}. Open connections follow the latest host report. Lost connections have no recorded disconnect and are no longer reported by a host, so their duration is a lower bound.` : "Connections are active WebSockets, not unique people. Counts follow the latest host report." })
3619
+ children: /* @__PURE__ */ O("p", { children: E.supported ? `Sessions pair each connection’s onConnect and onDisconnect events from retained request history${E.capped ? "; only the 500 most recent sessions are shown" : ""}. Open connections follow the latest host report. Lost connections have no recorded disconnect and are no longer reported by a host, so their duration is a lower bound.` : "Connections are active WebSockets, not unique people. Counts follow the latest host report." })
3600
3620
  }),
3601
- /* @__PURE__ */ A(qn, {
3621
+ /* @__PURE__ */ O(Jn, {
3602
3622
  open: !!b,
3603
3623
  onOpenChange: (e) => {
3604
- e || te(void 0);
3624
+ e || x(void 0);
3605
3625
  },
3606
- children: /* @__PURE__ */ j(Xn, {
3607
- container: x.current,
3626
+ children: /* @__PURE__ */ k(Zn, {
3627
+ container: S.current,
3608
3628
  onCloseAutoFocus: (e) => {
3609
- e.preventDefault(), S.current?.focus();
3629
+ e.preventDefault(), C.current?.focus();
3610
3630
  },
3611
3631
  children: [
3612
- /* @__PURE__ */ A(Jn, { children: "Connection details" }),
3613
- /* @__PURE__ */ A(Yn, { children: "Identifiers, timings, and metadata for this WebSocket." }),
3614
- b && /* @__PURE__ */ A(tr, {
3632
+ /* @__PURE__ */ O(Yn, { children: "Connection details" }),
3633
+ /* @__PURE__ */ O(Xn, { children: "Identifiers, timings, and metadata for this WebSocket." }),
3634
+ b && /* @__PURE__ */ O(nr, {
3615
3635
  session: b,
3616
3636
  now: h,
3617
3637
  onSelectActor: n
@@ -3622,131 +3642,131 @@ function Qn({ client: e, onSelectActor: n, timeRange: o, onTimeRangeChange: s })
3622
3642
  ]
3623
3643
  });
3624
3644
  }
3625
- function $n({ summary: e, ready: t, history: n, range: r }) {
3626
- return /* @__PURE__ */ j("div", {
3645
+ function er({ summary: e, ready: t, history: n, range: r }) {
3646
+ return /* @__PURE__ */ k("div", {
3627
3647
  className: "overview-metrics socket-metrics",
3628
3648
  children: [
3629
- /* @__PURE__ */ j("section", {
3649
+ /* @__PURE__ */ k("section", {
3630
3650
  className: "overview-metric",
3631
3651
  children: [
3632
- /* @__PURE__ */ A("h2", { children: "Open now" }),
3633
- /* @__PURE__ */ j("div", {
3652
+ /* @__PURE__ */ O("h2", { children: "Open now" }),
3653
+ /* @__PURE__ */ k("div", {
3634
3654
  className: "overview-value",
3635
- children: [/* @__PURE__ */ A("strong", {
3655
+ children: [/* @__PURE__ */ O("strong", {
3636
3656
  "aria-label": "Open WebSocket connections",
3637
3657
  children: t ? e.open.toLocaleString() : "—"
3638
- }), /* @__PURE__ */ A("span", { children: "live connections" })]
3658
+ }), /* @__PURE__ */ O("span", { children: "live connections" })]
3639
3659
  }),
3640
- /* @__PURE__ */ A("div", {
3660
+ /* @__PURE__ */ O("div", {
3641
3661
  className: "overview-metric-foot",
3642
- children: /* @__PURE__ */ A("span", { children: "Latest host report" })
3662
+ children: /* @__PURE__ */ O("span", { children: "Latest gateway report" })
3643
3663
  })
3644
3664
  ]
3645
3665
  }),
3646
- /* @__PURE__ */ j("section", {
3666
+ /* @__PURE__ */ k("section", {
3647
3667
  className: "overview-metric",
3648
3668
  children: [
3649
- /* @__PURE__ */ A("h2", { children: "Sessions" }),
3650
- /* @__PURE__ */ j("div", {
3669
+ /* @__PURE__ */ O("h2", { children: "Sessions" }),
3670
+ /* @__PURE__ */ k("div", {
3651
3671
  className: "overview-value",
3652
- children: [/* @__PURE__ */ A("strong", {
3672
+ children: [/* @__PURE__ */ O("strong", {
3653
3673
  "aria-label": "WebSocket sessions",
3654
3674
  children: n ? e.total.toLocaleString() : "—"
3655
- }), /* @__PURE__ */ A("span", { children: r.kind === "absolute" ? ze(r) : U(r) })]
3675
+ }), /* @__PURE__ */ O("span", { children: r.kind === "absolute" ? Be(r) : U(r) })]
3656
3676
  }),
3657
- /* @__PURE__ */ j("div", {
3677
+ /* @__PURE__ */ k("div", {
3658
3678
  className: "overview-metric-foot",
3659
- children: [/* @__PURE__ */ j("span", { children: [/* @__PURE__ */ A("b", { children: n ? (e.total - e.open - e.lost).toLocaleString() : "—" }), " closed"] }), /* @__PURE__ */ j("span", { children: [/* @__PURE__ */ A("b", { children: n ? e.lost.toLocaleString() : "—" }), " lost"] })]
3679
+ children: [/* @__PURE__ */ k("span", { children: [/* @__PURE__ */ O("b", { children: n ? e.closed.toLocaleString() : "—" }), " closed"] }), /* @__PURE__ */ k("span", { children: [/* @__PURE__ */ O("b", { children: n ? e.lost.toLocaleString() : "—" }), " lost"] })]
3660
3680
  })
3661
3681
  ]
3662
3682
  }),
3663
- /* @__PURE__ */ j("section", {
3683
+ /* @__PURE__ */ k("section", {
3664
3684
  className: "overview-metric",
3665
3685
  children: [
3666
- /* @__PURE__ */ A("h2", { children: "Session duration" }),
3667
- /* @__PURE__ */ j("div", {
3686
+ /* @__PURE__ */ O("h2", { children: "Session duration" }),
3687
+ /* @__PURE__ */ k("div", {
3668
3688
  className: "overview-value",
3669
- children: [/* @__PURE__ */ A("strong", {
3689
+ children: [/* @__PURE__ */ O("strong", {
3670
3690
  "aria-label": "Median session duration",
3671
- children: n && e.median !== null ? Cn(e.median) : "—"
3672
- }), /* @__PURE__ */ A("span", { children: "median" })]
3691
+ children: n && e.median !== null ? wn(e.median) : "—"
3692
+ }), /* @__PURE__ */ O("span", { children: "median" })]
3673
3693
  }),
3674
- /* @__PURE__ */ j("div", {
3694
+ /* @__PURE__ */ k("div", {
3675
3695
  className: "overview-metric-foot",
3676
- children: [/* @__PURE__ */ j("span", { children: [/* @__PURE__ */ A("b", { children: n && e.p95 !== null ? Cn(e.p95) : "—" }), " p95"] }), /* @__PURE__ */ A("span", { children: "Open sessions count up to now" })]
3696
+ children: [/* @__PURE__ */ k("span", { children: [/* @__PURE__ */ O("b", { children: n && e.p95 !== null ? wn(e.p95) : "—" }), " p95"] }), /* @__PURE__ */ O("span", { children: "Open sessions count up to now" })]
3677
3697
  })
3678
3698
  ]
3679
3699
  }),
3680
- /* @__PURE__ */ j("section", {
3700
+ /* @__PURE__ */ k("section", {
3681
3701
  className: "overview-metric",
3682
3702
  children: [
3683
- /* @__PURE__ */ A("h2", { children: "Messages" }),
3684
- /* @__PURE__ */ j("div", {
3703
+ /* @__PURE__ */ O("h2", { children: "Messages" }),
3704
+ /* @__PURE__ */ k("div", {
3685
3705
  className: "overview-value",
3686
- children: [/* @__PURE__ */ A("strong", {
3706
+ children: [/* @__PURE__ */ O("strong", {
3687
3707
  "aria-label": "WebSocket messages",
3688
3708
  children: n ? e.messages.toLocaleString() : "—"
3689
- }), /* @__PURE__ */ A("span", { children: "received" })]
3709
+ }), /* @__PURE__ */ O("span", { children: "received" })]
3690
3710
  }),
3691
- /* @__PURE__ */ A("div", {
3711
+ /* @__PURE__ */ O("div", {
3692
3712
  className: "overview-metric-foot",
3693
- children: /* @__PURE__ */ j("span", { children: [/* @__PURE__ */ A("b", { children: n && e.messagesPerSession !== null ? e.messagesPerSession.toLocaleString(void 0, { maximumFractionDigits: 1 }) : "—" }), " per session"] })
3713
+ children: /* @__PURE__ */ k("span", { children: [/* @__PURE__ */ O("b", { children: n && e.messagesPerSession !== null ? e.messagesPerSession.toLocaleString(void 0, { maximumFractionDigits: 1 }) : "—" }), " per session"] })
3694
3714
  })
3695
3715
  ]
3696
3716
  })
3697
3717
  ]
3698
3718
  });
3699
3719
  }
3700
- function er({ session: e, now: t, longest: n, selected: r, onSelect: i }) {
3701
- let a = xn(e, t), o = a && n ? Math.min(1, a.ms / n) : 0;
3702
- return /* @__PURE__ */ j(Y, {
3720
+ function tr({ session: e, now: t, longest: n, selected: r, onSelect: i }) {
3721
+ let a = Sn(e, t), o = a && n ? Math.min(1, a.ms / n) : 0;
3722
+ return /* @__PURE__ */ k(Y, {
3703
3723
  className: "la-clickable-row",
3704
3724
  "data-state": r ? "selected" : void 0,
3705
3725
  onClick: (e) => i(e.currentTarget.querySelector("button") ?? e.currentTarget),
3706
3726
  children: [
3707
- /* @__PURE__ */ A(Z, { children: /* @__PURE__ */ j("span", {
3727
+ /* @__PURE__ */ O(Z, { children: /* @__PURE__ */ k("span", {
3708
3728
  className: `socket-status socket-status-${e.status}`,
3709
- children: [/* @__PURE__ */ A("i", {
3729
+ children: [/* @__PURE__ */ O("i", {
3710
3730
  className: `socket-swatch socket-swatch-${e.status}`,
3711
3731
  "aria-hidden": "true"
3712
- }), Un(e.status)]
3732
+ }), Wn(e.status)]
3713
3733
  }) }),
3714
- /* @__PURE__ */ A(Z, { children: /* @__PURE__ */ A("button", {
3734
+ /* @__PURE__ */ O(Z, { children: /* @__PURE__ */ O("button", {
3715
3735
  type: "button",
3716
3736
  className: "socket-connection",
3717
3737
  title: e.connectionId,
3718
3738
  "aria-label": `Inspect connection ${e.connectionId}`,
3719
- children: Gn(e.connectionId)
3739
+ children: Kn(e.connectionId)
3720
3740
  }) }),
3721
- /* @__PURE__ */ A(Z, {
3741
+ /* @__PURE__ */ O(Z, {
3722
3742
  title: e.actorName,
3723
3743
  children: e.actorName
3724
3744
  }),
3725
- /* @__PURE__ */ A(Z, {
3745
+ /* @__PURE__ */ O(Z, {
3726
3746
  title: e.actorId,
3727
3747
  children: e.actorId
3728
3748
  }),
3729
- /* @__PURE__ */ A(Z, { children: e.openedAtMs === null ? /* @__PURE__ */ A("span", {
3749
+ /* @__PURE__ */ O(Z, { children: e.openedAtMs === null ? /* @__PURE__ */ O("span", {
3730
3750
  title: "The connect event is not in retained history",
3731
3751
  children: "—"
3732
- }) : /* @__PURE__ */ j("time", {
3752
+ }) : /* @__PURE__ */ k("time", {
3733
3753
  dateTime: new Date(e.openedAtMs).toISOString(),
3734
3754
  title: e.estimatedStart ? "Approximate: first reported by the host; the connect event has not been saved yet" : new Date(e.openedAtMs).toLocaleString(),
3735
3755
  children: [e.estimatedStart ? "≈ " : "", new Date(e.openedAtMs).toLocaleTimeString([], { hour12: !1 })]
3736
3756
  }) }),
3737
- /* @__PURE__ */ A(Z, { children: /* @__PURE__ */ j("span", {
3757
+ /* @__PURE__ */ O(Z, { children: /* @__PURE__ */ k("span", {
3738
3758
  className: "socket-duration",
3739
- children: [/* @__PURE__ */ A("span", { children: Wn(e, t) }), /* @__PURE__ */ A("i", {
3759
+ children: [/* @__PURE__ */ O("span", { children: Gn(e, t) }), /* @__PURE__ */ O("i", {
3740
3760
  className: `socket-duration-bar socket-duration-${e.status}`,
3741
3761
  "aria-hidden": "true",
3742
- children: /* @__PURE__ */ A("b", { style: { width: `${o * 100}%` } })
3762
+ children: /* @__PURE__ */ O("b", { style: { width: `${o * 100}%` } })
3743
3763
  })]
3744
3764
  }) }),
3745
- /* @__PURE__ */ A(Z, { children: e.messages.toLocaleString() }),
3746
- /* @__PURE__ */ A(Z, { children: e.metadata === void 0 ? /* @__PURE__ */ A("span", {
3765
+ /* @__PURE__ */ O(Z, { children: e.messages.toLocaleString() }),
3766
+ /* @__PURE__ */ O(Z, { children: e.metadata === void 0 ? /* @__PURE__ */ O("span", {
3747
3767
  title: "No metadata was recorded for this connection",
3748
3768
  children: "—"
3749
- }) : /* @__PURE__ */ A("code", {
3769
+ }) : /* @__PURE__ */ O("code", {
3750
3770
  className: "socket-metadata",
3751
3771
  title: JSON.stringify(e.metadata),
3752
3772
  children: JSON.stringify(e.metadata)
@@ -3754,46 +3774,47 @@ function er({ session: e, now: t, longest: n, selected: r, onSelect: i }) {
3754
3774
  ]
3755
3775
  });
3756
3776
  }
3757
- function tr({ session: e, now: t, onSelectActor: n }) {
3777
+ function nr({ session: e, now: t, onSelectActor: n }) {
3758
3778
  let r = {
3759
- Status: e.status === "lost" ? "Lost — no disconnect recorded" : Un(e.status),
3779
+ Status: e.status === "lost" ? "Lost — no disconnect recorded" : Wn(e.status),
3780
+ ...e.status === "unknown" ? { Inventory: "Gateway unavailable; connection status unconfirmed" } : {},
3760
3781
  Connection: e.connectionId,
3761
3782
  "Actor class": e.actorName,
3762
3783
  "Instance ID": e.actorId,
3763
3784
  Opened: e.openedAtMs === null ? "Before retained history" : `${e.estimatedStart ? "≈ " : ""}${new Date(e.openedAtMs).toLocaleString()}`,
3764
3785
  ...e.closedAtMs === null ? {} : { Closed: new Date(e.closedAtMs).toLocaleString() },
3765
3786
  ...e.status === "lost" && e.lastSeenMs !== null ? { "Last activity": new Date(e.lastSeenMs).toLocaleString() } : {},
3766
- Duration: Wn(e, t),
3787
+ Duration: Gn(e, t),
3767
3788
  Messages: e.messages.toLocaleString(),
3768
3789
  Failures: e.failures.toLocaleString(),
3769
3790
  Host: e.hostId ?? "Unknown"
3770
3791
  };
3771
- return /* @__PURE__ */ j(k, { children: [
3772
- /* @__PURE__ */ A("dl", {
3792
+ return /* @__PURE__ */ k(D, { children: [
3793
+ /* @__PURE__ */ O("dl", {
3773
3794
  className: "la-request-details",
3774
- children: Object.entries(r).map(([e, t]) => /* @__PURE__ */ j("div", { children: [/* @__PURE__ */ A("dt", { children: e }), /* @__PURE__ */ A("dd", { children: t })] }, e))
3795
+ children: Object.entries(r).map(([e, t]) => /* @__PURE__ */ k("div", { children: [/* @__PURE__ */ O("dt", { children: e }), /* @__PURE__ */ O("dd", { children: t })] }, e))
3775
3796
  }),
3776
- e.metadata !== void 0 && /* @__PURE__ */ j("details", {
3797
+ e.metadata !== void 0 && /* @__PURE__ */ k("details", {
3777
3798
  className: "socket-metadata-details",
3778
3799
  open: !0,
3779
- children: [/* @__PURE__ */ A("summary", { children: "Metadata" }), /* @__PURE__ */ A("pre", { children: JSON.stringify(e.metadata, null, 2) })]
3800
+ children: [/* @__PURE__ */ O("summary", { children: "Metadata" }), /* @__PURE__ */ O("pre", { children: JSON.stringify(e.metadata, null, 2) })]
3780
3801
  }),
3781
- n && /* @__PURE__ */ j(V, {
3802
+ n && /* @__PURE__ */ k(V, {
3782
3803
  variant: "outline",
3783
3804
  onClick: () => n(e.actorName),
3784
3805
  children: ["Open ", e.actorName]
3785
3806
  })
3786
3807
  ] });
3787
3808
  }
3788
- function nr(e, t, n) {
3809
+ function rr(e, t, n) {
3789
3810
  let r = Math.min(...e.map((e) => e.openedAtMs ?? e.lastSeenMs ?? n)), i = Number.isFinite(r) ? r - Math.max(5e3, (n - r) * .06) : n - 6e4;
3790
3811
  return Math.max(t ?? -Infinity, Math.min(i, n - 1e4));
3791
3812
  }
3792
- function rr(e, n) {
3813
+ function ir(e, n) {
3793
3814
  let [r, o] = a(/* @__PURE__ */ new Map()), s = i(void 0);
3794
3815
  return t(() => {
3795
3816
  if (!e) return;
3796
- let t = new Set(e.actors.flatMap((e) => e.instances.flatMap((t) => t.connections.map((n) => yn(e.actorName, t.actorId, n.id))))), r = s.current;
3817
+ let t = new Set(e.actors.flatMap((e) => e.instances.flatMap((t) => t.connections.map((n) => bn(e.actorName, t.actorId, n.id))))), r = s.current;
3797
3818
  if (s.current = t, !r) return;
3798
3819
  let i = [...t].filter((e) => !r.has(e)), a = [...r].filter((e) => !t.has(e));
3799
3820
  if (i.length || a.length) {
@@ -3805,7 +3826,7 @@ function rr(e, n) {
3805
3826
  }
3806
3827
  }, [e]), r;
3807
3828
  }
3808
- function ir(e, t) {
3829
+ function ar(e, t) {
3809
3830
  let n = /* @__PURE__ */ new Map();
3810
3831
  for (let e of t?.actors ?? []) n.set(e.actorName, new Set(e.instances.map((e) => e.actorId)));
3811
3832
  for (let t of e) {
@@ -3822,12 +3843,12 @@ function ir(e, t) {
3822
3843
  hint: e
3823
3844
  })))];
3824
3845
  }
3825
- function ar(e, t, n) {
3846
+ function or(e, t, n) {
3826
3847
  return !e && !t.rows ? t.failed ? "Connections unavailable" : "Loading connections…" : n ? "No matching connections" : t.supported ? "No WebSocket sessions" : "No active WebSockets";
3827
3848
  }
3828
3849
  //#endregion
3829
3850
  //#region src/ConsoleApp.tsx
3830
- var or = [
3851
+ var sr = [
3831
3852
  {
3832
3853
  id: "overview",
3833
3854
  label: "Durable Actors",
@@ -3849,72 +3870,72 @@ var or = [
3849
3870
  icon: l
3850
3871
  }
3851
3872
  ];
3852
- function sr({ client: e, toggleTheme: t }) {
3853
- let [n, r] = a("overview"), [i, o] = a(), [l, u] = a(Le), d = {
3873
+ function cr({ client: e, toggleTheme: t }) {
3874
+ let [n, r] = a("overview"), [i, o] = a(), [l, u] = a(Re), d = {
3854
3875
  timeRange: l,
3855
3876
  onTimeRangeChange: u
3856
3877
  };
3857
3878
  function f(e) {
3858
3879
  o(e), r("actors");
3859
3880
  }
3860
- return /* @__PURE__ */ j("div", {
3881
+ return /* @__PURE__ */ k("div", {
3861
3882
  className: "console-shell",
3862
3883
  children: [
3863
- /* @__PURE__ */ A("a", {
3884
+ /* @__PURE__ */ O("a", {
3864
3885
  className: "skip-link",
3865
3886
  href: "#main",
3866
3887
  children: "Skip to content"
3867
3888
  }),
3868
- /* @__PURE__ */ j("aside", {
3889
+ /* @__PURE__ */ k("aside", {
3869
3890
  className: "console-sidebar",
3870
3891
  children: [
3871
- /* @__PURE__ */ j("div", {
3892
+ /* @__PURE__ */ k("div", {
3872
3893
  className: "console-brand",
3873
- children: [/* @__PURE__ */ A(v, { "aria-hidden": "true" }), /* @__PURE__ */ A("strong", { children: "Terse" })]
3894
+ children: [/* @__PURE__ */ O(v, { "aria-hidden": "true" }), /* @__PURE__ */ O("strong", { children: "Terse" })]
3874
3895
  }),
3875
- /* @__PURE__ */ A("nav", {
3896
+ /* @__PURE__ */ O("nav", {
3876
3897
  "aria-label": "Observability",
3877
- children: or.map((e) => /* @__PURE__ */ j("button", {
3898
+ children: sr.map((e) => /* @__PURE__ */ k("button", {
3878
3899
  type: "button",
3879
3900
  "aria-current": n === e.id ? "page" : void 0,
3880
3901
  onClick: () => {
3881
3902
  o(void 0), r(e.id);
3882
3903
  },
3883
- children: [/* @__PURE__ */ A(e.icon, { "aria-hidden": "true" }), e.label]
3904
+ children: [/* @__PURE__ */ O(e.icon, { "aria-hidden": "true" }), e.label]
3884
3905
  }, e.id))
3885
3906
  }),
3886
- /* @__PURE__ */ j("div", {
3907
+ /* @__PURE__ */ k("div", {
3887
3908
  className: "console-sidebar-foot",
3888
- children: [/* @__PURE__ */ A(c, { "aria-hidden": "true" }), /* @__PURE__ */ j("span", { children: ["Runtime inspector", /* @__PURE__ */ A("small", { children: "Read-only observability" })] })]
3909
+ children: [/* @__PURE__ */ O(c, { "aria-hidden": "true" }), /* @__PURE__ */ k("span", { children: ["Runtime inspector", /* @__PURE__ */ O("small", { children: "Read-only observability" })] })]
3889
3910
  })
3890
3911
  ]
3891
3912
  }),
3892
- /* @__PURE__ */ j("div", {
3913
+ /* @__PURE__ */ k("div", {
3893
3914
  className: "console-workspace",
3894
- children: [/* @__PURE__ */ j("header", {
3915
+ children: [/* @__PURE__ */ k("header", {
3895
3916
  className: "console-topbar",
3896
- children: [/* @__PURE__ */ A("button", {
3917
+ children: [/* @__PURE__ */ O("button", {
3897
3918
  className: "theme-toggle",
3898
3919
  type: "button",
3899
3920
  onClick: t,
3900
3921
  "aria-label": "Toggle color theme",
3901
- children: /* @__PURE__ */ A(C, { "aria-hidden": "true" })
3902
- }), /* @__PURE__ */ j("a", {
3922
+ children: /* @__PURE__ */ O(w, { "aria-hidden": "true" })
3923
+ }), /* @__PURE__ */ k("a", {
3903
3924
  href: "https://github.com/TerseAI/durable-actors#readme",
3904
3925
  target: "_blank",
3905
3926
  rel: "noopener noreferrer",
3906
- children: ["Docs", /* @__PURE__ */ A(s, { "aria-hidden": "true" })]
3927
+ children: ["Docs", /* @__PURE__ */ O(s, { "aria-hidden": "true" })]
3907
3928
  })]
3908
- }), /* @__PURE__ */ j("main", {
3929
+ }), /* @__PURE__ */ k("main", {
3909
3930
  id: "main",
3910
3931
  tabIndex: -1,
3911
3932
  children: [
3912
- n === "overview" && /* @__PURE__ */ A(ln, {
3933
+ n === "overview" && /* @__PURE__ */ O(un, {
3913
3934
  client: e,
3914
3935
  onSelectActor: f,
3915
3936
  ...d
3916
3937
  }),
3917
- n === "actors" && /* @__PURE__ */ A(Lt, {
3938
+ n === "actors" && /* @__PURE__ */ O(Rt, {
3918
3939
  client: e,
3919
3940
  navigation: {
3920
3941
  actorName: i,
@@ -3922,11 +3943,11 @@ function sr({ client: e, toggleTheme: t }) {
3922
3943
  },
3923
3944
  ...d
3924
3945
  }),
3925
- n === "requests" && /* @__PURE__ */ A(mt, {
3946
+ n === "requests" && /* @__PURE__ */ O(ht, {
3926
3947
  client: e,
3927
3948
  ...d
3928
3949
  }),
3929
- n === "websockets" && /* @__PURE__ */ A(Qn, {
3950
+ n === "websockets" && /* @__PURE__ */ O($n, {
3930
3951
  client: e,
3931
3952
  onSelectActor: f,
3932
3953
  ...d
@@ -3939,63 +3960,63 @@ function sr({ client: e, toggleTheme: t }) {
3939
3960
  }
3940
3961
  //#endregion
3941
3962
  //#region src/state-data.ts
3942
- function cr(e) {
3943
- if (!fr(e) || !(e.snapshot === null || ur(e.snapshot) && fr(e.snapshot) && fr(e.snapshot.state)) || !(e.schema === null || fr(e.schema))) throw Error("Invalid state response");
3944
- return e;
3945
- }
3946
3963
  function lr(e) {
3947
- if (!fr(e) || !Array.isArray(e.records) || !e.records.every(ur) || !(e.nextBefore === null || dr(e.nextBefore))) throw Error("Invalid state history");
3964
+ if (!pr(e) || !(e.snapshot === null || dr(e.snapshot) && pr(e.snapshot) && pr(e.snapshot.state)) || !(e.schema === null || pr(e.schema))) throw Error("Invalid state response");
3948
3965
  return e;
3949
3966
  }
3950
3967
  function ur(e) {
3951
- if (!fr(e) || !dr(e.stateVersion) || !dr(e.ownerEpoch) || typeof e.requestId != "string") return !1;
3952
- let t = e.attribution;
3953
- return t === null || fr(t) && typeof t.operation == "string" && (t.connectionId === null || typeof t.connectionId == "string") && typeof t.committedAtMs == "number" && Number.isSafeInteger(t.committedAtMs) && t.committedAtMs >= 0 && typeof t.interleaved == "boolean";
3968
+ if (!pr(e) || !Array.isArray(e.records) || !e.records.every(dr) || !(e.nextBefore === null || fr(e.nextBefore))) throw Error("Invalid state history");
3969
+ return e;
3954
3970
  }
3955
3971
  function dr(e) {
3956
- return typeof e == "number" && Number.isSafeInteger(e) && e > 0;
3972
+ if (!pr(e) || !fr(e.stateVersion) || !fr(e.ownerEpoch) || typeof e.requestId != "string") return !1;
3973
+ let t = e.attribution;
3974
+ return t === null || pr(t) && typeof t.operation == "string" && (t.connectionId === null || typeof t.connectionId == "string") && typeof t.committedAtMs == "number" && Number.isSafeInteger(t.committedAtMs) && t.committedAtMs >= 0 && typeof t.interleaved == "boolean";
3957
3975
  }
3958
3976
  function fr(e) {
3977
+ return typeof e == "number" && Number.isSafeInteger(e) && e > 0;
3978
+ }
3979
+ function pr(e) {
3959
3980
  return !!e && typeof e == "object" && !Array.isArray(e);
3960
3981
  }
3961
3982
  //#endregion
3962
3983
  //#region src/client.ts
3963
- var pr = class {
3984
+ var mr = class {
3964
3985
  baseUrl;
3965
3986
  request;
3966
3987
  constructor(e = "/api/observe", t = globalThis.fetch.bind(globalThis)) {
3967
3988
  this.baseUrl = e, this.request = t;
3968
3989
  }
3969
3990
  async getState(e, t) {
3970
- return cr(await this.get(`state${mr(e)}`, t));
3991
+ return lr(await this.get(`state${hr(e)}`, t));
3971
3992
  }
3972
3993
  async listStateHistory(e, t) {
3973
- return lr(await this.get(`state/history${mr(e)}`, t));
3994
+ return ur(await this.get(`state/history${hr(e)}`, t));
3974
3995
  }
3975
3996
  async getMetrics(e, t) {
3976
- return on(await this.get(`metrics${mr(e)}`, t));
3997
+ return sn(await this.get(`metrics${hr(e)}`, t));
3977
3998
  }
3978
3999
  async listQueueWaits(e, t) {
3979
- return At(await this.get(`queue-waits${mr(e)}`, t));
4000
+ return jt(await this.get(`queue-waits${hr(e)}`, t));
3980
4001
  }
3981
4002
  async listWebSockets(e, t) {
3982
- return vn(await this.get(`websockets${mr(e)}`, t));
4003
+ return yn(await this.get(`websockets${hr(e)}`, t));
3983
4004
  }
3984
4005
  async listActors(e) {
3985
4006
  let t = await this.get("actors", e);
3986
- if (!hr(t)) throw Error("Invalid actor inventory response.");
4007
+ if (!gr(t)) throw Error("Invalid actor inventory response.");
3987
4008
  return t;
3988
4009
  }
3989
4010
  async watchActors(e, t) {
3990
- return this.watch("events", "inventory", hr, e, t);
4011
+ return this.watch("events", "inventory", gr, e, t);
3991
4012
  }
3992
4013
  async watchRequests(e, t, n) {
3993
4014
  let r = n ? `?${new URLSearchParams({ after: n })}` : "";
3994
- return this.watch(`requests/events${r}`, "requests", vr, e, t);
4015
+ return this.watch(`requests/events${r}`, "requests", yr, e, t);
3995
4016
  }
3996
4017
  async listRequests(e, t) {
3997
- let n = await this.get(`requests${mr(e)}`, t);
3998
- if (!vr(n)) throw Error("Invalid request history response");
4018
+ let n = await this.get(`requests${hr(e)}`, t);
4019
+ if (!yr(n)) throw Error("Invalid request history response");
3999
4020
  return n;
4000
4021
  }
4001
4022
  async watch(e, t, n, r, i) {
@@ -4044,29 +4065,29 @@ var pr = class {
4044
4065
  return n.json();
4045
4066
  }
4046
4067
  };
4047
- function mr(e) {
4068
+ function hr(e) {
4048
4069
  let t = new URLSearchParams();
4049
4070
  for (let [n, r] of Object.entries(e)) r !== void 0 && t.set(n, String(r));
4050
4071
  return t.size ? `?${t}` : "";
4051
4072
  }
4052
- function hr(e) {
4053
- return !e || typeof e != "object" || !("actors" in e) || !Array.isArray(e.actors) ? !1 : e.actors.every((e) => e && typeof e.actorName == "string" && [
4073
+ function gr(e) {
4074
+ return !e || typeof e != "object" || !("actors" in e) || !Array.isArray(e.actors) || !("connectionsComplete" in e) || typeof e.connectionsComplete != "boolean" ? !1 : e.actors.every((e) => e && typeof e.actorName == "string" && [
4054
4075
  e.live,
4055
4076
  e.dormant,
4056
4077
  e.unknown
4057
- ].every((e) => Number.isSafeInteger(e) && e >= 0) && Array.isArray(e.instances) && e.instances.every(gr));
4078
+ ].every((e) => Number.isSafeInteger(e) && e >= 0) && Array.isArray(e.instances) && e.instances.every(_r));
4058
4079
  }
4059
- function gr(e) {
4080
+ function _r(e) {
4060
4081
  return !!e && typeof e == "object" && "actorId" in e && typeof e.actorId == "string" && "status" in e && [
4061
4082
  "live",
4062
4083
  "dormant",
4063
4084
  "unknown"
4064
- ].includes(String(e.status)) && "connections" in e && Array.isArray(e.connections) && e.connections.every(_r) && (!("waiting" in e) || e.waiting == null || Array.isArray(e.waiting) && e.waiting.every((e) => !!e && typeof e == "object" && typeof e.id == "string" && typeof e.operation == "string"));
4085
+ ].includes(String(e.status)) && "connections" in e && Array.isArray(e.connections) && e.connections.every(vr) && (!("waiting" in e) || e.waiting == null || Array.isArray(e.waiting) && e.waiting.every((e) => !!e && typeof e == "object" && typeof e.id == "string" && typeof e.operation == "string"));
4065
4086
  }
4066
- function _r(e) {
4087
+ function vr(e) {
4067
4088
  return !!e && typeof e == "object" && "id" in e && typeof e.id == "string" && "metadata" in e;
4068
4089
  }
4069
- function vr(e) {
4090
+ function yr(e) {
4070
4091
  if (!e || typeof e != "object") return !1;
4071
4092
  let t = e;
4072
4093
  return typeof t.epoch == "string" && [
@@ -4074,12 +4095,12 @@ function vr(e) {
4074
4095
  t.capacity,
4075
4096
  t.evicted,
4076
4097
  t.dropped
4077
- ].every(yr) && (t.persistenceFailed === void 0 || typeof t.persistenceFailed == "boolean") && (t.nextCursor == null || typeof t.nextCursor == "string") && (t.resumeCursor === void 0 || typeof t.resumeCursor == "string") && (t.reset === void 0 || typeof t.reset == "boolean") && t.capacity > 0 && t.capacity <= 500 && Array.isArray(t.records) && t.records.length <= t.capacity && t.records.every((e) => br(e) && e.sequence <= t.cursor);
4098
+ ].every(br) && (t.persistenceFailed === void 0 || typeof t.persistenceFailed == "boolean") && (t.nextCursor == null || typeof t.nextCursor == "string") && (t.resumeCursor === void 0 || typeof t.resumeCursor == "string") && (t.reset === void 0 || typeof t.reset == "boolean") && t.capacity > 0 && t.capacity <= 500 && Array.isArray(t.records) && t.records.length <= t.capacity && t.records.every((e) => xr(e) && e.sequence <= t.cursor);
4078
4099
  }
4079
- function yr(e) {
4100
+ function br(e) {
4080
4101
  return Number.isSafeInteger(e) && Number(e) >= 0;
4081
4102
  }
4082
- function br(e) {
4103
+ function xr(e) {
4083
4104
  if (!e || typeof e != "object") return !1;
4084
4105
  let t = e;
4085
4106
  return typeof t.projectId == "string" && /^[A-Za-z0-9._-]{1,64}$/u.test(t.projectId) && [
@@ -4089,7 +4110,7 @@ function br(e) {
4089
4110
  t.actorName,
4090
4111
  t.actorId,
4091
4112
  t.operation
4092
- ].every((e) => typeof e == "string") && (t.eventId === void 0 || typeof t.eventId == "string" && t.eventId.length > 0) && yr(t.sequence) && yr(t.startedAtMs) && t.startedAtMs <= 864e13 && ["method", "websocket"].includes(t.kind) && [
4113
+ ].every((e) => typeof e == "string") && (t.eventId === void 0 || typeof t.eventId == "string" && t.eventId.length > 0) && br(t.sequence) && br(t.startedAtMs) && t.startedAtMs <= 864e13 && ["method", "websocket"].includes(t.kind) && [
4093
4114
  "completed",
4094
4115
  "failed",
4095
4116
  "rejected",
@@ -4098,4 +4119,4 @@ function br(e) {
4098
4119
  ].includes(t.outcome) && (t.connectionId === null || typeof t.connectionId == "string") && Number.isFinite(t.durationMs) && t.durationMs >= 0 && (t.queueWaitMs === null || Number.isFinite(t.queueWaitMs) && t.queueWaitMs >= 0 && t.queueWaitMs <= t.durationMs);
4099
4120
  }
4100
4121
  //#endregion
4101
- export { Lt as ActorObserver, W as Badge, V as Button, De as Calendar, Oe as CalendarDayButton, ce as Command, de as CommandEmpty, fe as CommandGroup, le as CommandInput, me as CommandItem, ue as CommandList, pe as CommandSeparator, he as CommandShortcut, sr as ConsoleApp, Xe as Drawer, $e as DrawerClose, tt as DrawerContent, at as DrawerDescription, rt as DrawerFooter, nt as DrawerHeader, et as DrawerOverlay, Qe as DrawerPortal, it as DrawerTitle, Ze as DrawerTrigger, ge as FilterCombobox, pr as HttpObserverClient, H as Input, ln as Overview, ke as Popover, Me as PopoverAnchor, je as PopoverContent, Fe as PopoverDescription, Ne as PopoverHeader, Pe as PopoverTitle, Ae as PopoverTrigger, mt as RequestObserver, Se as RequestTimeline, qn as Sheet, Xn as SheetContent, Yn as SheetDescription, Jn as SheetTitle, Nn as SocketTimeline, K as Table, J as TableBody, ct as TableCaption, Z as TableCell, st as TableFooter, X as TableHead, q as TableHeader, Y as TableRow, He as TimeRangePicker, Qn as WebSocketObserver, Ye as badgeVariants, Ee as buttonVariants, Le as defaultTimeRange, ze as rangeLabel, Re as resolveRange };
4122
+ export { Rt as ActorObserver, W as Badge, V as Button, Oe as Calendar, ke as CalendarDayButton, le as Command, fe as CommandEmpty, pe as CommandGroup, ue as CommandInput, he as CommandItem, de as CommandList, me as CommandSeparator, ge as CommandShortcut, cr as ConsoleApp, Ze as Drawer, et as DrawerClose, nt as DrawerContent, ot as DrawerDescription, it as DrawerFooter, rt as DrawerHeader, tt as DrawerOverlay, $e as DrawerPortal, at as DrawerTitle, Qe as DrawerTrigger, _e as FilterCombobox, mr as HttpObserverClient, H as Input, un as Overview, Ae as Popover, Ne as PopoverAnchor, Me as PopoverContent, Ie as PopoverDescription, Pe as PopoverHeader, Fe as PopoverTitle, je as PopoverTrigger, ht as RequestObserver, Ce as RequestTimeline, Jn as Sheet, Zn as SheetContent, Xn as SheetDescription, Yn as SheetTitle, Pn as SocketTimeline, K as Table, J as TableBody, lt as TableCaption, Z as TableCell, ct as TableFooter, X as TableHead, q as TableHeader, Y as TableRow, Ue as TimeRangePicker, $n as WebSocketObserver, Xe as badgeVariants, De as buttonVariants, Re as defaultTimeRange, Be as rangeLabel, ze as resolveRange };