@overdoser/react-toolkit 0.21.0 → 0.22.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (161) hide show
  1. package/AGENTS.md +1 -0
  2. package/CHANGELOG.md +35 -0
  3. package/components/Accordion/Accordion.js +48 -48
  4. package/components/ActionButton/ActionButton.js +23 -23
  5. package/components/ActionButton/CopyButton.js +5 -5
  6. package/components/Alert/Alert.js +13 -13
  7. package/components/Avatar/Avatar.js +12 -12
  8. package/components/Badge/Badge.js +6 -6
  9. package/components/Breadcrumbs/Breadcrumbs.js +15 -15
  10. package/components/Button/Button.js +14 -14
  11. package/components/Card/Card.js +26 -26
  12. package/components/Chart/AreaChart.js +103 -103
  13. package/components/Chart/Axis.js +7 -7
  14. package/components/Chart/BarChart.js +62 -62
  15. package/components/Chart/ChartContainer.js +11 -11
  16. package/components/Chart/ChartLegend.js +7 -7
  17. package/components/Chart/ChartTooltip.js +13 -13
  18. package/components/Chart/LineChart.js +88 -88
  19. package/components/Chart/PieChart.js +25 -25
  20. package/components/Chart/RadarChart.js +42 -42
  21. package/components/Chart/Sparkline.js +11 -11
  22. package/components/Chart/TradingChart.js +126 -126
  23. package/components/Chart/trading/period.js +3 -3
  24. package/components/Chip/Chip.js +24 -24
  25. package/components/CodeBlock/CodeBlock.js +31 -31
  26. package/components/CommandPalette/CommandPalette.js +166 -166
  27. package/components/ConfirmDialog/ConfirmDialog.js +60 -60
  28. package/components/Divider/Divider.js +10 -10
  29. package/components/Draggable/Draggable.js +29 -29
  30. package/components/Drawer/Drawer.js +53 -53
  31. package/components/Dropdown/Dropdown.js +66 -66
  32. package/components/Dropdown/DropdownItem.js +13 -13
  33. package/components/Dropdown/DropdownLabel.js +5 -5
  34. package/components/Dropdown/DropdownSeparator.js +5 -5
  35. package/components/Dropzone/Dropzone.js +15 -15
  36. package/components/EmptyState/EmptyState.js +11 -11
  37. package/components/Form/Form.js +17 -17
  38. package/components/Form/FormField.js +21 -21
  39. package/components/Form/FormRow.js +3 -3
  40. package/components/ImageViewer/ImageViewer.js +118 -118
  41. package/components/Kbd/Kbd.js +11 -11
  42. package/components/KeyValueList/KeyValueList.js +32 -32
  43. package/components/Link/Link.js +7 -7
  44. package/components/List/List.js +7 -7
  45. package/components/Loader/Loader.js +39 -39
  46. package/components/Modal/Modal.js +48 -48
  47. package/components/PageHeader/PageHeader.js +18 -18
  48. package/components/Pagination/Pagination.js +23 -23
  49. package/components/Popover/Popover.js +25 -25
  50. package/components/ProgressBar/ProgressBar.js +17 -17
  51. package/components/RelativeTime/RelativeTime.js +10 -10
  52. package/components/SegmentedControl/SegmentedControl.js +38 -38
  53. package/components/Skeleton/Skeleton.js +10 -10
  54. package/components/Spinner/Spinner.js +7 -7
  55. package/components/SplitButton/SplitButton.js +63 -63
  56. package/components/SplitPane/SplitPane.js +50 -50
  57. package/components/StatCard/StatCard.js +32 -32
  58. package/components/StatusDot/StatusDot.js +7 -7
  59. package/components/Table/Table.js +174 -174
  60. package/components/Tabs/Tabs.js +47 -47
  61. package/components/ThemeToggle/ThemeToggle.js +31 -31
  62. package/components/Timeline/GanttTimeline.js +213 -213
  63. package/components/Timeline/HistoryTimeline.js +306 -306
  64. package/components/Timeline/TimelineShared.js +103 -103
  65. package/components/Timeline/TraceEventDetails.js +103 -103
  66. package/components/Timeline/TraceTimeline.js +546 -546
  67. package/components/Timeline/historyLayout.js +2 -2
  68. package/components/Timer/Timer.js +39 -39
  69. package/components/Toast/Toast.js +59 -59
  70. package/components/ToggleIconButton/ToggleIconButton.js +9 -9
  71. package/components/Tooltip/Tooltip.js +16 -16
  72. package/components/Typography/Typography.js +5 -5
  73. package/components/inputs/Checkbox/Checkbox.js +11 -11
  74. package/components/inputs/Checkbox/CheckboxGroup.js +21 -21
  75. package/components/inputs/DatePicker/CalendarPanel.js +113 -113
  76. package/components/inputs/DatePicker/DatePicker.js +39 -39
  77. package/components/inputs/DateTimePicker/DateTimePicker.js +119 -119
  78. package/components/inputs/DateTimePicker/DateTimeSegments.js +40 -40
  79. package/components/inputs/DateTimePicker/TimeField.js +34 -34
  80. package/components/inputs/Input/Input.js +13 -13
  81. package/components/inputs/NumberInput/NumberInput.js +16 -16
  82. package/components/inputs/Radio/Radio.js +17 -17
  83. package/components/inputs/SearchInput/SearchInput.js +25 -25
  84. package/components/inputs/Select/Select.d.ts +55 -3
  85. package/components/inputs/Select/Select.js +485 -344
  86. package/components/inputs/Select/{Select.module.js → Select.module.scss.js} +15 -3
  87. package/components/inputs/Slider/Slider.js +21 -21
  88. package/components/inputs/Switch/Switch.js +4 -4
  89. package/components/inputs/Textarea/Textarea.js +8 -8
  90. package/hooks/usePortalPosition.d.ts +2 -1
  91. package/hooks/usePortalPosition.js +6 -3
  92. package/hooks/useResizable.js +1 -1
  93. package/hooks/useTheme.js +7 -7
  94. package/index.css +1 -1
  95. package/index.js +1 -1
  96. package/index.layered.css +1 -1
  97. package/llms.txt +25 -4
  98. package/manifest.json +33 -4
  99. package/package.json +1 -1
  100. /package/components/Accordion/{Accordion.module.js → Accordion.module.scss.js} +0 -0
  101. /package/components/ActionButton/{ActionButton.module.js → ActionButton.module.scss.js} +0 -0
  102. /package/components/Alert/{Alert.module.js → Alert.module.scss.js} +0 -0
  103. /package/components/Avatar/{Avatar.module.js → Avatar.module.scss.js} +0 -0
  104. /package/components/Badge/{Badge.module.js → Badge.module.scss.js} +0 -0
  105. /package/components/Breadcrumbs/{Breadcrumbs.module.js → Breadcrumbs.module.scss.js} +0 -0
  106. /package/components/Button/{Button.module.js → Button.module.scss.js} +0 -0
  107. /package/components/Card/{Card.module.js → Card.module.scss.js} +0 -0
  108. /package/components/Chart/{Chart.module.js → Chart.module.scss.js} +0 -0
  109. /package/components/Chip/{Chip.module.js → Chip.module.scss.js} +0 -0
  110. /package/components/CodeBlock/{CodeBlock.module.js → CodeBlock.module.scss.js} +0 -0
  111. /package/components/CommandPalette/{CommandPalette.module.js → CommandPalette.module.scss.js} +0 -0
  112. /package/components/ConfirmDialog/{ConfirmDialog.module.js → ConfirmDialog.module.scss.js} +0 -0
  113. /package/components/Divider/{Divider.module.js → Divider.module.scss.js} +0 -0
  114. /package/components/Draggable/{Draggable.module.js → Draggable.module.scss.js} +0 -0
  115. /package/components/Drawer/{Drawer.module.js → Drawer.module.scss.js} +0 -0
  116. /package/components/Dropdown/{Dropdown.module.js → Dropdown.module.scss.js} +0 -0
  117. /package/components/Dropzone/{Dropzone.module.js → Dropzone.module.scss.js} +0 -0
  118. /package/components/EmptyState/{EmptyState.module.js → EmptyState.module.scss.js} +0 -0
  119. /package/components/Form/{Form.module.js → Form.module.scss.js} +0 -0
  120. /package/components/ImageViewer/{ImageViewer.module.js → ImageViewer.module.scss.js} +0 -0
  121. /package/components/Kbd/{Kbd.module.js → Kbd.module.scss.js} +0 -0
  122. /package/components/KeyValueList/{KeyValueList.module.js → KeyValueList.module.scss.js} +0 -0
  123. /package/components/Link/{Link.module.js → Link.module.scss.js} +0 -0
  124. /package/components/List/{List.module.js → List.module.scss.js} +0 -0
  125. /package/components/Loader/{Loader.module.js → Loader.module.scss.js} +0 -0
  126. /package/components/Modal/{Modal.module.js → Modal.module.scss.js} +0 -0
  127. /package/components/PageHeader/{PageHeader.module.js → PageHeader.module.scss.js} +0 -0
  128. /package/components/Pagination/{Pagination.module.js → Pagination.module.scss.js} +0 -0
  129. /package/components/Popover/{Popover.module.js → Popover.module.scss.js} +0 -0
  130. /package/components/ProgressBar/{ProgressBar.module.js → ProgressBar.module.scss.js} +0 -0
  131. /package/components/RelativeTime/{RelativeTime.module.js → RelativeTime.module.scss.js} +0 -0
  132. /package/components/SegmentedControl/{SegmentedControl.module.js → SegmentedControl.module.scss.js} +0 -0
  133. /package/components/Skeleton/{Skeleton.module.js → Skeleton.module.scss.js} +0 -0
  134. /package/components/Spinner/{Spinner.module.js → Spinner.module.scss.js} +0 -0
  135. /package/components/SplitButton/{SplitButton.module.js → SplitButton.module.scss.js} +0 -0
  136. /package/components/SplitPane/{SplitPane.module.js → SplitPane.module.scss.js} +0 -0
  137. /package/components/StatCard/{StatCard.module.js → StatCard.module.scss.js} +0 -0
  138. /package/components/StatusDot/{StatusDot.module.js → StatusDot.module.scss.js} +0 -0
  139. /package/components/Table/{Table.module.js → Table.module.scss.js} +0 -0
  140. /package/components/Tabs/{Tabs.module.js → Tabs.module.scss.js} +0 -0
  141. /package/components/ThemeToggle/{ThemeToggle.module.js → ThemeToggle.module.scss.js} +0 -0
  142. /package/components/Timeline/{GanttTimeline.module.js → GanttTimeline.module.scss.js} +0 -0
  143. /package/components/Timeline/{HistoryTimeline.module.js → HistoryTimeline.module.scss.js} +0 -0
  144. /package/components/Timeline/{Timeline.module.js → Timeline.module.scss.js} +0 -0
  145. /package/components/Timeline/{TraceTimeline.module.js → TraceTimeline.module.scss.js} +0 -0
  146. /package/components/Timer/{Timer.module.js → Timer.module.scss.js} +0 -0
  147. /package/components/Toast/{Toast.module.js → Toast.module.scss.js} +0 -0
  148. /package/components/ToggleIconButton/{ToggleIconButton.module.js → ToggleIconButton.module.scss.js} +0 -0
  149. /package/components/Tooltip/{Tooltip.module.js → Tooltip.module.scss.js} +0 -0
  150. /package/components/Typography/{Typography.module.js → Typography.module.scss.js} +0 -0
  151. /package/components/inputs/Checkbox/{Checkbox.module.js → Checkbox.module.scss.js} +0 -0
  152. /package/components/inputs/Checkbox/{CheckboxGroup.module.js → CheckboxGroup.module.scss.js} +0 -0
  153. /package/components/inputs/DatePicker/{CalendarPanel.module.js → CalendarPanel.module.scss.js} +0 -0
  154. /package/components/inputs/DatePicker/{DatePicker.module.js → DatePicker.module.scss.js} +0 -0
  155. /package/components/inputs/DateTimePicker/{DateTimePicker.module.js → DateTimePicker.module.scss.js} +0 -0
  156. /package/components/inputs/Input/{Input.module.js → Input.module.scss.js} +0 -0
  157. /package/components/inputs/NumberInput/{NumberInput.module.js → NumberInput.module.scss.js} +0 -0
  158. /package/components/inputs/Radio/{Radio.module.js → Radio.module.scss.js} +0 -0
  159. /package/components/inputs/SearchInput/{SearchInput.module.js → SearchInput.module.scss.js} +0 -0
  160. /package/components/inputs/Slider/{Slider.module.js → Slider.module.scss.js} +0 -0
  161. /package/components/inputs/Textarea/{Textarea.module.js → Textarea.module.scss.js} +0 -0
@@ -1,823 +1,823 @@
1
- import e from "./Timeline.module.js";
2
- import t from "./TraceTimeline.module.js";
3
- import { TIMELINE_PALETTE_VARS as n, TL_COLORS as r, eventMatches as i, fmtClockUTC as a, fmtDateISO as o, fmtDur as s, fmtISO as ee, tickSubdiv as c, ticks as l, tint as u } from "./timelineCore.js";
4
- import { layoutTraceBand as d, traceChipWidth as f } from "./traceLayout.js";
5
- import { HighlightText as te, TimelineLegend as ne, TimelineResizer as p, TimelineSummary as m, TimelineTooltip as h, TimelineZoomControls as re } from "./TimelineShared.js";
6
- import { CopyButton as g } from "../ActionButton/CopyButton.js";
7
- import { EventBadge as ie, FieldRow as ae, TraceEventDetails as oe } from "./TraceEventDetails.js";
8
- import { isRequestEvent as se, ridOf as _, routeOf as ce, srcOf as le, toText as v } from "./traceEvent.js";
9
- import { animateScrollTo as ue, useContainerWidth as de, useNowTicker as fe, useTimelinePan as pe, useWheelZoom as me, wheelZoomAllowed as he } from "./useTimeline.js";
10
- import { forwardRef as ge, useCallback as y, useEffect as _e, useLayoutEffect as ve, useMemo as ye, useRef as b, useState as x } from "react";
11
- import S from "clsx";
12
- import { Fragment as C, jsx as w, jsxs as T } from "react/jsx-runtime";
1
+ import { forwardRef as e, useCallback as t, useEffect as n, useLayoutEffect as r, useMemo as i, useRef as a, useState as o } from "react";
2
+ import s from "clsx";
3
+ import c from "./Timeline.module.scss.js";
4
+ import l from "./TraceTimeline.module.scss.js";
5
+ import { TIMELINE_PALETTE_VARS as u, TL_COLORS as d, eventMatches as ee, fmtClockUTC as f, fmtDateISO as p, fmtDur as m, fmtISO as te, tickSubdiv as h, ticks as g, tint as _ } from "./timelineCore.js";
6
+ import { layoutTraceBand as ne, traceChipWidth as re } from "./traceLayout.js";
7
+ import { HighlightText as ie, TimelineLegend as ae, TimelineResizer as oe, TimelineSummary as se, TimelineTooltip as ce, TimelineZoomControls as le } from "./TimelineShared.js";
8
+ import { CopyButton as ue } from "../ActionButton/CopyButton.js";
9
+ import { EventBadge as de, FieldRow as fe, TraceEventDetails as pe } from "./TraceEventDetails.js";
10
+ import { isRequestEvent as me, ridOf as v, routeOf as he, srcOf as ge, toText as y } from "./traceEvent.js";
11
+ import { animateScrollTo as _e, useContainerWidth as ve, useNowTicker as ye, useTimelinePan as be, useWheelZoom as xe, wheelZoomAllowed as Se } from "./useTimeline.js";
12
+ import { Fragment as b, jsx as x, jsxs as S } from "react/jsx-runtime";
13
13
  // src/components/Timeline/TraceTimeline.tsx
14
- var E = 84, be = 24, D = 400, xe = 51, Se = 300, Ce = ge(function(ge, Ce) {
15
- let { events: O, title: we, meta: Te, highlight: Ee, defaultHighlight: De, onHighlightChange: Oe, showSearch: ke = !0, renderSearch: Ae, services: je, serviceColors: Me, compactRows: Ne = !1, showGridlines: Pe = !0, showControls: Fe = !0, wheelZoom: Ie = "ctrl", showLegend: Le = !0, showSummary: Re = !0, summaryPlacement: k = "bubble", summaryDefaultPosition: ze, showDock: A = !0, defaultDock: Be = null, showExtraFields: Ve = !0, hiddenFields: He, maxHeight: Ue = "80vh", minHeight: We = 420, selectedEventId: Ge, defaultSelectedEventId: Ke = null, onEventSelect: qe, renderChip: Je, renderTooltip: Ye, renderDetails: Xe, classes: j, className: Ze, style: Qe } = ge, M = b(null), [$e, et] = x(null), [tt, nt] = x(!0), [N, rt] = x(null), [it, at] = x(null), [P, ot] = x(null), [F, st] = x(null), [ct, lt] = x(null), [ut, dt] = x(null), ft = b(!1), [pt, mt] = x(Ke), I = Ge === void 0 ? pt : Ge, [L, ht] = x(() => A ? Be ?? ((Ge === void 0 ? Ke : Ge) == null ? null : "details") : null), [gt, _t] = x(360), [vt, yt] = x(420), bt = b(I);
16
- _e(() => {
17
- I != null && I !== bt.current && A && L == null && ht("details"), bt.current = I;
14
+ var C = 84, Ce = 24, w = 400, we = 51, Te = 300, Ee = e(function(e, Ee) {
15
+ let { events: T, title: De, meta: Oe, highlight: ke, defaultHighlight: Ae, onHighlightChange: je, showSearch: Me = !0, renderSearch: Ne, services: Pe, serviceColors: Fe, compactRows: Ie = !1, showGridlines: Le = !0, showControls: Re = !0, wheelZoom: ze = "ctrl", showLegend: Be = !0, showSummary: Ve = !0, summaryPlacement: E = "bubble", summaryDefaultPosition: He, showDock: D = !0, defaultDock: Ue = null, showExtraFields: We = !0, hiddenFields: Ge, maxHeight: Ke = "80vh", minHeight: qe = 420, selectedEventId: O, defaultSelectedEventId: Je = null, onEventSelect: Ye, renderChip: Xe, renderTooltip: Ze, renderDetails: Qe, classes: k, className: $e, style: et } = e, A = a(null), [tt, nt] = o(null), [rt, it] = o(!0), [j, at] = o(null), [ot, st] = o(null), [M, ct] = o(null), [N, lt] = o(null), [ut, dt] = o(null), [ft, pt] = o(null), mt = a(!1), [ht, gt] = o(Je), P = O === void 0 ? ht : O, [F, I] = o(() => D ? Ue ?? ((O === void 0 ? Je : O) == null ? null : "details") : null), [_t, vt] = o(360), [yt, bt] = o(420), xt = a(P);
16
+ n(() => {
17
+ P != null && P !== xt.current && D && F == null && I("details"), xt.current = P;
18
18
  }, [
19
- I,
20
- A,
21
- L
19
+ P,
20
+ D,
21
+ F
22
22
  ]);
23
- let [xt, St] = x({
23
+ let [St, Ct] = o({
24
24
  l: 0,
25
25
  w: 0
26
- }), Ct = b(Re);
27
- Ct.current = Re;
28
- let wt = y(() => {
29
- let e = M.current;
30
- e && St((t) => t.l === e.scrollLeft && t.w === e.clientWidth ? t : {
26
+ }), wt = a(Ve);
27
+ wt.current = Ve;
28
+ let Tt = t(() => {
29
+ let e = A.current;
30
+ e && Ct((t) => t.l === e.scrollLeft && t.w === e.clientWidth ? t : {
31
31
  l: e.scrollLeft,
32
32
  w: e.clientWidth
33
33
  });
34
34
  }, []);
35
- _e(() => {
36
- Re && wt();
35
+ n(() => {
36
+ Ve && Tt();
37
37
  });
38
- let [R, Tt] = x({
38
+ let [L, Et] = o({
39
39
  l: 0,
40
40
  w: 2e3
41
- }), Et = b(R);
42
- Et.current = R;
43
- let Dt = y(() => {
44
- let e = M.current;
41
+ }), Dt = a(L);
42
+ Dt.current = L;
43
+ let Ot = t(() => {
44
+ let e = A.current;
45
45
  if (!e) return;
46
- let t = Math.floor(e.scrollLeft / D) * D, n = (Math.ceil((e.clientWidth || 1600) / D) + 1) * D;
47
- (t !== Et.current.l || n !== Et.current.w) && Tt({
46
+ let t = Math.floor(e.scrollLeft / w) * w, n = (Math.ceil((e.clientWidth || 1600) / w) + 1) * w;
47
+ (t !== Dt.current.l || n !== Dt.current.w) && Et({
48
48
  l: t,
49
49
  w: n
50
50
  });
51
- }, []), Ot = O.some((e) => e.end == null), z = fe(Ot, 400), kt = de(M), B = pe(M), V = b(null), H = b(null), At = b(null), [jt, Mt] = x(null), U = b(null);
52
- _e(() => () => {
53
- U.current && clearTimeout(U.current);
51
+ }, []), kt = T.some((e) => e.end == null), R = ye(kt, 400), At = ve(A), z = be(A), B = a(null), V = a(null), jt = a(null), [Mt, Nt] = o(null), H = a(null);
52
+ n(() => () => {
53
+ H.current && clearTimeout(H.current);
54
54
  }, []);
55
- let [Nt, Pt] = x(De ?? ""), Ft = Ee === void 0 ? Nt : Ee, W = Ft.trim(), It = (e) => {
56
- Ee === void 0 && Pt(e), Oe?.(e);
57
- }, Lt = Ae ? Ae({
58
- value: Ft,
59
- setValue: It
60
- }) : ke ? /* @__PURE__ */ w("input", {
61
- className: S(e.searchInput, j?.search),
55
+ let [Pt, Ft] = o(Ae ?? ""), It = ke === void 0 ? Pt : ke, U = It.trim(), Lt = (e) => {
56
+ ke === void 0 && Ft(e), je?.(e);
57
+ }, Rt = Ne ? Ne({
58
+ value: It,
59
+ setValue: Lt
60
+ }) : Me ? /* @__PURE__ */ x("input", {
61
+ className: s(c.searchInput, k?.search),
62
62
  placeholder: "Highlight keyword in events…",
63
63
  "aria-label": "Highlight keyword",
64
- value: Ft,
65
- onChange: (e) => It(e.target.value)
66
- }) : null, G, K;
67
- O.length ? (G = Math.min(...O.map((e) => e.start)), K = Math.max(G + 1e3, ...O.map((e) => e.end ?? z))) : (G = z - 3e4, K = z + 5e3);
68
- let Rt = (K - G) * .03;
69
- G -= Rt, K += Rt;
70
- let zt = K - G, Bt = Math.max(240, kt - E - be), Vt = Math.max(Bt * .45, Bt - 210) / zt, q = tt || !$e ? Vt : $e, Ht = b(Vt), J = b(q), Ut = b(G), Wt = b(1e9);
71
- Ht.current = Vt, J.current = q, Ut.current = G;
72
- let Gt = b(null);
73
- ve(() => {
74
- Gt.current != null && M.current && (M.current.scrollLeft = Gt.current, Gt.current = null), Dt();
64
+ value: It,
65
+ onChange: (e) => Lt(e.target.value)
66
+ }) : null, W, G;
67
+ T.length ? (W = Math.min(...T.map((e) => e.start)), G = Math.max(W + 1e3, ...T.map((e) => e.end ?? R))) : (W = R - 3e4, G = R + 5e3);
68
+ let zt = (G - W) * .03;
69
+ W -= zt, G += zt;
70
+ let Bt = G - W, Vt = Math.max(240, At - C - Ce), Ht = Math.max(Vt * .45, Vt - 210) / Bt, K = rt || !tt ? Ht : tt, Ut = a(Ht), q = a(K), Wt = a(W), Gt = a(1e9);
71
+ Ut.current = Ht, q.current = K, Wt.current = W;
72
+ let Kt = a(null);
73
+ r(() => {
74
+ Kt.current != null && A.current && (A.current.scrollLeft = Kt.current, Kt.current = null), Ot();
75
75
  });
76
- let Kt = y((e, t) => {
77
- let n = M.current;
76
+ let qt = t((e, t) => {
77
+ let n = A.current;
78
78
  if (!n) return;
79
- let r = J.current || .001, i = Math.max(Ht.current ? Ht.current * .2 : 1e-7, Math.min(10, r * e)), a = (n.scrollLeft + t - E) / r;
80
- Gt.current = a * i + E - t, nt(!1), et(i);
79
+ let r = q.current || .001, i = Math.max(Ut.current ? Ut.current * .2 : 1e-7, Math.min(10, r * e)), a = (n.scrollLeft + t - C) / r;
80
+ Kt.current = a * i + C - t, it(!1), nt(i);
81
81
  }, []);
82
- me(M, (e) => {
83
- if (!he(Ie, e)) return;
82
+ xe(A, (e) => {
83
+ if (!Se(ze, e)) return;
84
84
  e.preventDefault();
85
- let t = M.current;
86
- t && Kt(Math.exp(-(e.deltaY || e.deltaX) * .0022), e.clientX - t.getBoundingClientRect().left);
85
+ let t = A.current;
86
+ t && qt(Math.exp(-(e.deltaY || e.deltaX) * .0022), e.clientX - t.getBoundingClientRect().left);
87
87
  });
88
- let qt = b(null), Jt = y(() => {
89
- qt.current ??= requestAnimationFrame(() => {
90
- qt.current = null;
91
- let e = M.current;
92
- if (!e || !J.current) return;
93
- let t = Ut.current + Math.max(0, e.scrollLeft + 117 - E) / J.current;
94
- lt(o(t)), dt(ft.current ? a(t) : null), Dt(), Ct.current && wt();
88
+ let Jt = a(null), Yt = t(() => {
89
+ Jt.current ??= requestAnimationFrame(() => {
90
+ Jt.current = null;
91
+ let e = A.current;
92
+ if (!e || !q.current) return;
93
+ let t = Wt.current + Math.max(0, e.scrollLeft + 117 - C) / q.current;
94
+ dt(p(t)), pt(mt.current ? f(t) : null), Ot(), wt.current && Tt();
95
95
  });
96
- }, [wt, Dt]), Yt = b(null), Xt = y((e) => {
96
+ }, [Tt, Ot]), Xt = a(null), Zt = t((e) => {
97
97
  let t = e.clientX;
98
- Yt.current ??= requestAnimationFrame(() => {
99
- Yt.current = null;
100
- let e = M.current;
98
+ Xt.current ??= requestAnimationFrame(() => {
99
+ Xt.current = null;
100
+ let e = A.current;
101
101
  if (!e) return;
102
102
  let n = e.getBoundingClientRect(), r = t - n.left + e.scrollLeft;
103
- if (r < 89 || !J.current) {
104
- ot(null);
103
+ if (r < 89 || !q.current) {
104
+ ct(null);
105
105
  return;
106
106
  }
107
- let i = Ut.current + (r - E) / J.current, a = Math.max(88, Math.min(Math.round(r), Wt.current - 88));
108
- ot({
107
+ let i = Wt.current + (r - C) / q.current, a = Math.max(88, Math.min(Math.round(r), Gt.current - 88));
108
+ ct({
109
109
  left: Math.round(r),
110
110
  chipLeft: a,
111
- label: ee(i, !0),
111
+ label: te(i, !0),
112
112
  t: i
113
113
  });
114
114
  });
115
- }, []), Zt = (e) => {
116
- Ge === void 0 && mt(e ? e.id : null), qe?.(e);
117
- }, Qt = ye(() => {
115
+ }, []), Qt = (e) => {
116
+ O === void 0 && gt(e ? e.id : null), Ye?.(e);
117
+ }, $t = i(() => {
118
118
  let e = [];
119
- return (je || []).forEach((t) => {
120
- O.some((e) => e.service === t) && e.push(t);
121
- }), O.forEach((t) => {
119
+ return (Pe || []).forEach((t) => {
120
+ T.some((e) => e.service === t) && e.push(t);
121
+ }), T.forEach((t) => {
122
122
  e.includes(t.service) || e.push(t.service);
123
123
  }), e;
124
- }, [O, je]), Y = {};
125
- Qt.forEach((e, t) => {
126
- Y[e] = n[t % n.length];
127
- }), Object.assign(Y, Me);
128
- let $t = Ne, en = $t ? 20 : 26, tn = $t ? 60 : 66, nn = O.map((e) => ({
124
+ }, [T, Pe]), J = {};
125
+ $t.forEach((e, t) => {
126
+ J[e] = u[t % u.length];
127
+ }), Object.assign(J, Fe);
128
+ let en = Ie, tn = en ? 20 : 26, nn = en ? 60 : 66, rn = T.map((e) => ({
129
129
  id: e.id,
130
- left: Math.round(E + (e.start - G) * q),
131
- width: Math.round(Math.max(12, ((e.end ?? z) - e.start) * q)),
132
- labelW: f(le(e), e.service, String(_(e)))
133
- })), rn = d(nn, {
134
- barH: en,
135
- rowH: tn,
136
- chipH: xe,
137
- minH: We
138
- }), an = new Map(rn.items.map((e) => [e.id, e])), on = Math.ceil(Math.max(E + zt * q + be + 60, rn.maxExt + 26));
139
- Wt.current = on;
140
- let sn = G + (on - E) / q, X = Math.max(G, G + (R.l - D - E) / q), cn = Math.min(sn, G + (R.l + R.w + D - E) / q), Z = l(X, cn, Math.max(1, (cn - X) * q), 64), ln = Z.step < 1e3;
141
- ft.current = ln;
142
- let un = [], dn = Math.max(G, (Z.list.length ? Z.list[0].t : X) - Z.step), fn = o(dn), pn = a(dn);
143
- Z.list.forEach((e) => {
144
- let t = o(e.t), n = a(e.t);
145
- un.push({
146
- left: Math.round(E + (e.t - G) * q),
147
- date: t === fn ? null : t,
148
- time: !ln || n !== pn ? n : null,
149
- sub: ln ? "." + String(new Date(e.t).getUTCMilliseconds()).padStart(3, "0") : null
150
- }), fn = t, pn = n;
130
+ left: Math.round(C + (e.start - W) * K),
131
+ width: Math.round(Math.max(12, ((e.end ?? R) - e.start) * K)),
132
+ labelW: re(ge(e), e.service, String(v(e)))
133
+ })), an = ne(rn, {
134
+ barH: tn,
135
+ rowH: nn,
136
+ chipH: we,
137
+ minH: qe
138
+ }), on = new Map(an.items.map((e) => [e.id, e])), sn = Math.ceil(Math.max(C + Bt * K + Ce + 60, an.maxExt + 26));
139
+ Gt.current = sn;
140
+ let cn = W + (sn - C) / K, Y = Math.max(W, W + (L.l - w - C) / K), ln = Math.min(cn, W + (L.l + L.w + w - C) / K), X = g(Y, ln, Math.max(1, (ln - Y) * K), 64), un = X.step < 1e3;
141
+ mt.current = un;
142
+ let dn = [], fn = Math.max(W, (X.list.length ? X.list[0].t : Y) - X.step), pn = p(fn), mn = f(fn);
143
+ X.list.forEach((e) => {
144
+ let t = p(e.t), n = f(e.t);
145
+ dn.push({
146
+ left: Math.round(C + (e.t - W) * K),
147
+ date: t === pn ? null : t,
148
+ time: !un || n !== mn ? n : null,
149
+ sub: un ? "." + String(new Date(e.t).getUTCMilliseconds()).padStart(3, "0") : null
150
+ }), pn = t, mn = n;
151
151
  });
152
- let mn = [], Q = c(Z.step);
153
- if (Q.parts > 1) {
154
- let e = Z.step / Q.parts;
155
- if ((cn - X) / e < 2e3) for (let t = Math.ceil(X / e); t * e <= cn; t++) t % Q.parts !== 0 && mn.push({
156
- left: Math.round(E + (t * e - G) * q),
157
- medium: Q.medium > 0 && t % Q.parts === Q.medium
152
+ let hn = [], Z = h(X.step);
153
+ if (Z.parts > 1) {
154
+ let e = X.step / Z.parts;
155
+ if ((ln - Y) / e < 2e3) for (let t = Math.ceil(Y / e); t * e <= ln; t++) t % Z.parts !== 0 && hn.push({
156
+ left: Math.round(C + (t * e - W) * K),
157
+ medium: Z.medium > 0 && t % Z.parts === Z.medium
158
158
  });
159
159
  }
160
- let hn = P ? P.t : null, $ = I == null ? null : O.find((e) => e.id === I) || null;
161
- _e(() => {
162
- let e = V.current;
160
+ let gn = M ? M.t : null, Q = P == null ? null : T.find((e) => e.id === P) || null;
161
+ n(() => {
162
+ let e = B.current;
163
163
  if (e == null) return;
164
- let t = M.current;
164
+ let t = A.current;
165
165
  if (!t) {
166
- V.current = null;
166
+ B.current = null;
167
167
  return;
168
168
  }
169
- if (t.clientWidth && t.clientWidth !== kt) return;
170
- V.current = null;
171
- let n = an.get(e);
172
- n && ue(t, { left: Math.max(0, n.left + n.width / 2 - t.clientWidth / 2) });
173
- }), _e(() => {
174
- let e = H.current;
169
+ if (t.clientWidth && t.clientWidth !== At) return;
170
+ B.current = null;
171
+ let n = on.get(e);
172
+ n && _e(t, { left: Math.max(0, n.left + n.width / 2 - t.clientWidth / 2) });
173
+ }), n(() => {
174
+ let e = V.current;
175
175
  if (e == null) return;
176
- let t = At.current;
176
+ let t = jt.current;
177
177
  if (!t) return;
178
- H.current = null;
178
+ V.current = null;
179
179
  let n = typeof CSS < "u" && typeof CSS.escape == "function" ? CSS.escape(e) : e.replace(/"/g, "\\\""), r = t.querySelector(`[data-crk-log-id="${n}"]`);
180
180
  if (!r) return;
181
181
  let i = Math.max(0, t.scrollTop + r.getBoundingClientRect().top - t.getBoundingClientRect().top - 8);
182
- ue(t, { top: i }, 600), Mt(e), U.current && clearTimeout(U.current), U.current = setTimeout(() => Mt(null), 1200);
182
+ _e(t, { top: i }, 600), Nt(e), H.current && clearTimeout(H.current), H.current = setTimeout(() => Nt(null), 1200);
183
183
  });
184
- let gn = (e, t) => {
185
- let n = an.get(e.id);
184
+ let _n = (e, t) => {
185
+ let n = on.get(e.id);
186
186
  if (!n) return;
187
- let r = e.end == null, i = (e.end ?? z) - e.start;
188
- if (st({
187
+ let r = e.end == null, i = (e.end ?? R) - e.start;
188
+ if (lt({
189
189
  left: n.left,
190
- chipLeft: Math.max(88, Math.min(n.left, Wt.current - 88)),
191
- label: ee(e.start, !0)
192
- }), at(e.id), I === e.id) return;
193
- let a = M.current, o = a ? a.getBoundingClientRect() : { left: 0 }, c = a ? a.scrollLeft : 0, l = window.innerWidth || 1200, u = window.innerHeight || 800, d = n.showLabel ? n.labelW : 0, f = n.showLabel ? n.labelX : n.left, te = o.left - c + Math.min(n.left, f), ne = o.left - c + Math.max(n.left + n.width, f + d), p = t.currentTarget.getBoundingClientRect(), m = ne + 28, h = Math.max(95, Math.min(t.clientY, u - 120));
194
- m + Se > l - 12 && (m = te - Se - 28), m < 12 && (m = Math.max(12, Math.min(l - Se - 12, t.clientX - Se / 2)), h = p.bottom + 108, h > u - 95 && (h = Math.max(95, p.top - 108)));
195
- let re = se(e);
196
- rt({
190
+ chipLeft: Math.max(88, Math.min(n.left, Gt.current - 88)),
191
+ label: te(e.start, !0)
192
+ }), st(e.id), P === e.id) return;
193
+ let a = A.current, o = a ? a.getBoundingClientRect() : { left: 0 }, s = a ? a.scrollLeft : 0, c = window.innerWidth || 1200, l = window.innerHeight || 800, u = n.showLabel ? n.labelW : 0, d = n.showLabel ? n.labelX : n.left, ee = o.left - s + Math.min(n.left, d), f = o.left - s + Math.max(n.left + n.width, d + u), p = t.currentTarget.getBoundingClientRect(), h = f + 28, g = Math.max(95, Math.min(t.clientY, l - 120));
194
+ h + Te > c - 12 && (h = ee - Te - 28), h < 12 && (h = Math.max(12, Math.min(c - Te - 12, t.clientX - Te / 2)), g = p.bottom + 108, g > l - 95 && (g = Math.max(95, p.top - 108)));
195
+ let _ = me(e);
196
+ at({
197
197
  id: e.id,
198
- x: m,
199
- y: h,
200
- rid: String(_(e)),
201
- route: ce(e),
202
- label: e.label || (re ? (e.method || "GET") + " " + (e.url ? e.url.replace(/^https?:\/\/[^/]+/, "") : e.id) : e.message || ""),
203
- time: ee(e.start, !0),
204
- durLine: r ? (re ? "in flight · " : "ongoing · ") + s(i) + " so far" : s(i) + (typeof e.status == "number" ? " · status " + e.status : e.level ? " · " + e.level : ""),
198
+ x: h,
199
+ y: g,
200
+ rid: String(v(e)),
201
+ route: he(e),
202
+ label: e.label || (_ ? (e.method || "GET") + " " + (e.url ? e.url.replace(/^https?:\/\/[^/]+/, "") : e.id) : e.message || ""),
203
+ time: te(e.start, !0),
204
+ durLine: r ? (_ ? "in flight · " : "ongoing · ") + m(i) + " so far" : m(i) + (typeof e.status == "number" ? " · status " + e.status : e.level ? " · " + e.level : ""),
205
205
  url: e.url || ""
206
206
  });
207
- }, _n = () => {
208
- rt(null), st(null), at(null);
209
- }, vn = $ ? $.end == null : !1, yn = A ? L === "details" : $ != null, bn = A && L === "log", xn = () => {
210
- Zt(null), A && ht(null);
211
- }, Sn = ye(() => O.slice().sort((e, t) => e.start - t.start), [O]), Cn = Re ? /* @__PURE__ */ w(m, {
212
- className: j?.summary,
213
- placement: k,
214
- floatingDefaultPosition: ze,
215
- bubbleGlyphColors: Qt.slice(0, 3).map((e) => Y[e]),
216
- items: Sn.map((e, t) => {
217
- let n = an.get(e.id);
207
+ }, vn = () => {
208
+ at(null), lt(null), st(null);
209
+ }, yn = Q ? Q.end == null : !1, bn = D ? F === "details" : Q != null, xn = D && F === "log", Sn = () => {
210
+ Qt(null), D && I(null);
211
+ }, Cn = i(() => T.slice().sort((e, t) => e.start - t.start), [T]), $ = Ve ? /* @__PURE__ */ x(se, {
212
+ className: k?.summary,
213
+ placement: E,
214
+ floatingDefaultPosition: He,
215
+ bubbleGlyphColors: $t.slice(0, 3).map((e) => J[e]),
216
+ items: Cn.map((e, t) => {
217
+ let n = on.get(e.id);
218
218
  return {
219
219
  id: e.id,
220
220
  number: String(t + 1).padStart(2, "0"),
221
- label: String(_(e)),
222
- color: Y[e.service] || r.body,
223
- time: a(e.start),
224
- inView: !n || !xt.w || n.left < xt.l + xt.w && n.left + n.width > xt.l,
225
- selected: I === e.id
221
+ label: String(v(e)),
222
+ color: J[e.service] || d.body,
223
+ time: f(e.start),
224
+ inView: !n || !St.w || n.left < St.l + St.w && n.left + n.width > St.l,
225
+ selected: P === e.id
226
226
  };
227
227
  }),
228
228
  onPick: (e) => {
229
- let t = O.find((t) => t.id === e);
230
- t && (Zt(t), L === "log" && (H.current = e)), V.current = e;
229
+ let t = T.find((t) => t.id === e);
230
+ t && (Qt(t), F === "log" && (V.current = e)), B.current = e;
231
231
  }
232
232
  }) : null;
233
- return /* @__PURE__ */ T("div", {
234
- ref: Ce,
235
- className: S(e.root, j?.root, Ze),
236
- style: Qe,
233
+ return /* @__PURE__ */ S("div", {
234
+ ref: Ee,
235
+ className: s(c.root, k?.root, $e),
236
+ style: et,
237
237
  children: [
238
- (Fe || Lt || we != null || Te != null) && /* @__PURE__ */ T("div", {
239
- className: S(e.toolbar, j?.toolbar),
238
+ (Re || Rt || De != null || Oe != null) && /* @__PURE__ */ S("div", {
239
+ className: s(c.toolbar, k?.toolbar),
240
240
  children: [
241
- /* @__PURE__ */ T("div", {
242
- className: e.toolbarText,
243
- children: [we != null && /* @__PURE__ */ w("span", {
244
- className: e.toolbarTitle,
245
- children: we
246
- }), /* @__PURE__ */ w("span", {
247
- className: e.toolbarMeta,
248
- children: Te ?? (O.length ? `${O.length} events · span ${s(zt - 2 * Rt)} · times in UTC` : "No events")
241
+ /* @__PURE__ */ S("div", {
242
+ className: c.toolbarText,
243
+ children: [De != null && /* @__PURE__ */ x("span", {
244
+ className: c.toolbarTitle,
245
+ children: De
246
+ }), /* @__PURE__ */ x("span", {
247
+ className: c.toolbarMeta,
248
+ children: Oe ?? (T.length ? `${T.length} events · span ${m(Bt - 2 * zt)} · times in UTC` : "No events")
249
249
  })]
250
250
  }),
251
- Lt,
252
- Fe && /* @__PURE__ */ w(re, {
253
- zoomPct: `${Math.round(q / Vt * 100)}%`,
254
- fitActive: tt,
255
- onZoomIn: () => Kt(1.5, kt / 2),
256
- onZoomOut: () => Kt(1 / 1.5, kt / 2),
251
+ Rt,
252
+ Re && /* @__PURE__ */ x(le, {
253
+ zoomPct: `${Math.round(K / Ht * 100)}%`,
254
+ fitActive: rt,
255
+ onZoomIn: () => qt(1.5, At / 2),
256
+ onZoomOut: () => qt(1 / 1.5, At / 2),
257
257
  onFit: () => {
258
- nt(!0), et(null);
258
+ it(!0), nt(null);
259
259
  },
260
- hint: Ie === "none" ? "drag pans" : (Ie === "ctrl" ? "Ctrl+scroll zooms" : "scroll zooms") + " · drag pans"
260
+ hint: ze === "none" ? "drag pans" : (ze === "ctrl" ? "Ctrl+scroll zooms" : "scroll zooms") + " · drag pans"
261
261
  })
262
262
  ]
263
263
  }),
264
- Le && /* @__PURE__ */ w(ne, {
265
- className: j?.legend,
266
- items: Qt.map((e) => ({
264
+ Be && /* @__PURE__ */ x(ae, {
265
+ className: k?.legend,
266
+ items: $t.map((e) => ({
267
267
  name: e,
268
- color: Y[e]
268
+ color: J[e]
269
269
  }))
270
270
  }),
271
- k === "top" && Cn,
272
- /* @__PURE__ */ T("div", {
273
- className: e.layout,
271
+ E === "top" && $,
272
+ /* @__PURE__ */ S("div", {
273
+ className: c.layout,
274
274
  children: [
275
- k === "left" && Cn,
276
- /* @__PURE__ */ T("div", {
277
- className: e.main,
278
- children: [/* @__PURE__ */ T("div", {
279
- className: e.cardWrap,
275
+ E === "left" && $,
276
+ /* @__PURE__ */ S("div", {
277
+ className: c.main,
278
+ children: [/* @__PURE__ */ S("div", {
279
+ className: c.cardWrap,
280
280
  children: [
281
- /* @__PURE__ */ w("div", {
282
- className: S(e.card, (yn || bn) && t.cardFlushRight, j?.card),
283
- children: /* @__PURE__ */ w("div", {
284
- ref: M,
285
- className: S(e.scroller, t.scroller, j?.scroller),
286
- style: { maxHeight: Ue },
287
- onPointerDown: B.onPointerDown,
288
- onPointerMove: B.onPointerMove,
289
- onPointerUp: B.onPointerUp,
281
+ /* @__PURE__ */ x("div", {
282
+ className: s(c.card, (bn || xn) && l.cardFlushRight, k?.card),
283
+ children: /* @__PURE__ */ x("div", {
284
+ ref: A,
285
+ className: s(c.scroller, l.scroller, k?.scroller),
286
+ style: { maxHeight: Ke },
287
+ onPointerDown: z.onPointerDown,
288
+ onPointerMove: z.onPointerMove,
289
+ onPointerUp: z.onPointerUp,
290
290
  onPointerLeave: () => {
291
- B.onPointerUp(), ot(null);
291
+ z.onPointerUp(), ct(null);
292
292
  },
293
- onMouseMove: Xt,
294
- onScroll: Jt,
295
- children: /* @__PURE__ */ T("div", {
296
- className: t.inner,
297
- style: { width: on },
293
+ onMouseMove: Zt,
294
+ onScroll: Yt,
295
+ children: /* @__PURE__ */ S("div", {
296
+ className: l.inner,
297
+ style: { width: sn },
298
298
  children: [
299
- Pe && un.map((e, n) => /* @__PURE__ */ w("div", {
300
- className: t.gridline,
299
+ Le && dn.map((e, t) => /* @__PURE__ */ x("div", {
300
+ className: l.gridline,
301
301
  style: { left: e.left }
302
- }, n)),
303
- Ot && /* @__PURE__ */ w("div", {
304
- className: t.nowLine,
305
- style: { left: Math.round(E + (z - G) * q) }
302
+ }, t)),
303
+ kt && /* @__PURE__ */ x("div", {
304
+ className: l.nowLine,
305
+ style: { left: Math.round(C + (R - W) * K) }
306
306
  }),
307
- P && !N && /* @__PURE__ */ w("div", {
308
- className: t.cursorLine,
309
- style: { left: P.left }
307
+ M && !j && /* @__PURE__ */ x("div", {
308
+ className: l.cursorLine,
309
+ style: { left: M.left }
310
310
  }),
311
- F && /* @__PURE__ */ w("div", {
312
- className: t.eventLine,
313
- style: { left: F.left }
311
+ N && /* @__PURE__ */ x("div", {
312
+ className: l.eventLine,
313
+ style: { left: N.left }
314
314
  }),
315
- /* @__PURE__ */ T("div", {
316
- className: S(t.axis, j?.axis),
315
+ /* @__PURE__ */ S("div", {
316
+ className: s(l.axis, k?.axis),
317
317
  children: [
318
- /* @__PURE__ */ w("div", { className: t.axisDivider }),
319
- /* @__PURE__ */ T("div", {
320
- className: t.axisSticky,
318
+ /* @__PURE__ */ x("div", { className: l.axisDivider }),
319
+ /* @__PURE__ */ S("div", {
320
+ className: l.axisSticky,
321
321
  children: [
322
- /* @__PURE__ */ w("span", {
323
- className: t.axisUtc,
322
+ /* @__PURE__ */ x("span", {
323
+ className: l.axisUtc,
324
324
  children: "UTC"
325
325
  }),
326
- /* @__PURE__ */ w("span", {
327
- className: t.axisViewDate,
328
- children: ct || (O.length ? o(G) : "")
326
+ /* @__PURE__ */ x("span", {
327
+ className: l.axisViewDate,
328
+ children: ut || (T.length ? p(W) : "")
329
329
  }),
330
- ln && /* @__PURE__ */ w("span", {
331
- className: t.axisViewTime,
332
- children: ut || a(G)
330
+ un && /* @__PURE__ */ x("span", {
331
+ className: l.axisViewTime,
332
+ children: ft || f(W)
333
333
  })
334
334
  ]
335
335
  }),
336
- un.map((e, n) => /* @__PURE__ */ T("span", { children: [
337
- e.date && /* @__PURE__ */ w("span", {
338
- className: t.axisDateLabel,
336
+ dn.map((e, t) => /* @__PURE__ */ S("span", { children: [
337
+ e.date && /* @__PURE__ */ x("span", {
338
+ className: l.axisDateLabel,
339
339
  style: { left: e.left },
340
340
  children: e.date
341
341
  }),
342
- e.time && /* @__PURE__ */ w("span", {
343
- className: t.axisTickLabel,
342
+ e.time && /* @__PURE__ */ x("span", {
343
+ className: l.axisTickLabel,
344
344
  style: { left: e.left },
345
345
  children: e.time
346
346
  }),
347
- e.sub && /* @__PURE__ */ w("span", {
348
- className: t.axisSubLabel,
347
+ e.sub && /* @__PURE__ */ x("span", {
348
+ className: l.axisSubLabel,
349
349
  style: { left: e.left },
350
350
  children: e.sub
351
351
  }),
352
- /* @__PURE__ */ w("span", {
353
- className: t.axisTickMark,
352
+ /* @__PURE__ */ x("span", {
353
+ className: l.axisTickMark,
354
354
  style: { left: e.left }
355
355
  })
356
- ] }, n)),
357
- mn.map((e, n) => /* @__PURE__ */ w("span", {
358
- className: S(t.axisMinorMark, e.medium && t.axisMinorMedium),
356
+ ] }, t)),
357
+ hn.map((e, t) => /* @__PURE__ */ x("span", {
358
+ className: s(l.axisMinorMark, e.medium && l.axisMinorMedium),
359
359
  style: { left: e.left }
360
- }, n)),
361
- P && !N && /* @__PURE__ */ w("div", {
362
- className: t.axisChip,
363
- style: { left: P.chipLeft },
364
- children: P.label
360
+ }, t)),
361
+ M && !j && /* @__PURE__ */ x("div", {
362
+ className: l.axisChip,
363
+ style: { left: M.chipLeft },
364
+ children: M.label
365
365
  }),
366
- F && /* @__PURE__ */ T("div", {
367
- className: S(t.axisChip, t.axisChipEvent),
368
- style: { left: F.chipLeft },
369
- children: ["▸ ", F.label]
366
+ N && /* @__PURE__ */ S("div", {
367
+ className: s(l.axisChip, l.axisChipEvent),
368
+ style: { left: N.chipLeft },
369
+ children: ["▸ ", N.label]
370
370
  })
371
371
  ]
372
372
  }),
373
- /* @__PURE__ */ T("div", {
374
- className: t.lane,
375
- style: { height: rn.h },
376
- children: [/* @__PURE__ */ w("div", {
377
- className: t.axisLine,
378
- style: { top: rn.axisY }
379
- }), O.map((n) => {
380
- let a = an.get(n.id);
381
- if (!a) return null;
382
- let o = Y[n.service] || r.body, s = n.end == null, c = i(n, W, He), l = hn != null && hn >= n.start && hn <= (n.end ?? z), d = it === n.id, f = W && !c ? .25 : 1, ne = String(_(n)), p = le(n), m = Y[p] || r.body, h = Y[n.service] || r.body, re = d ? `0 0 0 3px ${u(o, 55)}, 0 4px 14px rgba(35,32,28,.22)` : W && c ? `0 0 0 3px ${r.hlRing}` : I === n.id ? `0 0 0 3px ${r.selectedRing}` : l ? `0 0 0 3px ${u(o, 30)}` : "none", g = d ? o : l ? r.stemHot : r.stem, ie = {
373
+ /* @__PURE__ */ S("div", {
374
+ className: l.lane,
375
+ style: { height: an.h },
376
+ children: [/* @__PURE__ */ x("div", {
377
+ className: l.axisLine,
378
+ style: { top: an.axisY }
379
+ }), T.map((e) => {
380
+ let t = on.get(e.id);
381
+ if (!t) return null;
382
+ let n = J[e.service] || d.body, r = e.end == null, i = ee(e, U, Ge), a = gn != null && gn >= e.start && gn <= (e.end ?? R), o = ot === e.id, u = U && !i ? .25 : 1, f = String(v(e)), p = ge(e), m = J[p] || d.body, h = J[e.service] || d.body, g = o ? `0 0 0 3px ${_(n, 55)}, 0 4px 14px rgba(35,32,28,.22)` : U && i ? `0 0 0 3px ${d.hlRing}` : P === e.id ? `0 0 0 3px ${d.selectedRing}` : a ? `0 0 0 3px ${_(n, 30)}` : "none", ne = o ? n : a ? d.stemHot : d.stem, re = {
383
383
  onClick: () => {
384
- if (B.wasDragSuppressed()) return;
385
- rt(null);
386
- let e = I === n.id ? null : n;
387
- Zt(e), e && L === "log" && (H.current = e.id);
384
+ if (z.wasDragSuppressed()) return;
385
+ at(null);
386
+ let t = P === e.id ? null : e;
387
+ Qt(t), t && F === "log" && (V.current = t.id);
388
388
  },
389
- onMouseEnter: (e) => gn(n, e),
390
- onMouseLeave: _n
389
+ onMouseEnter: (t) => _n(e, t),
390
+ onMouseLeave: vn
391
391
  };
392
- return /* @__PURE__ */ T("span", { children: [a.showLabel && /* @__PURE__ */ T(C, { children: [
393
- a.conn && !a.hconn && /* @__PURE__ */ w("div", {
394
- className: t.stem,
392
+ return /* @__PURE__ */ S("span", { children: [t.showLabel && /* @__PURE__ */ S(b, { children: [
393
+ t.conn && !t.hconn && /* @__PURE__ */ x("div", {
394
+ className: l.stem,
395
395
  style: {
396
- left: a.left,
397
- top: a.connTop,
398
- height: a.connH,
399
- background: g
396
+ left: t.left,
397
+ top: t.connTop,
398
+ height: t.connH,
399
+ background: ne
400
400
  }
401
401
  }),
402
- a.conn && a.hconn && /* @__PURE__ */ T(C, { children: [/* @__PURE__ */ w("div", {
403
- className: t.stem,
402
+ t.conn && t.hconn && /* @__PURE__ */ S(b, { children: [/* @__PURE__ */ x("div", {
403
+ className: l.stem,
404
404
  style: {
405
- left: a.left,
406
- top: a.connTop,
407
- height: a.connH,
408
- background: g
405
+ left: t.left,
406
+ top: t.connTop,
407
+ height: t.connH,
408
+ background: ne
409
409
  }
410
- }), /* @__PURE__ */ w("div", {
411
- className: t.elbow,
410
+ }), /* @__PURE__ */ x("div", {
411
+ className: l.elbow,
412
412
  style: {
413
- left: a.hconnLeft,
414
- top: a.hconnTop,
415
- width: a.hconnW,
416
- background: g
413
+ left: t.hconnLeft,
414
+ top: t.hconnTop,
415
+ width: t.hconnW,
416
+ background: ne
417
417
  }
418
418
  })] }),
419
- /* @__PURE__ */ w("div", {
420
- ...ie,
421
- className: S(t.chip, j?.chip),
419
+ /* @__PURE__ */ x("div", {
420
+ ...re,
421
+ className: s(l.chip, k?.chip),
422
422
  style: {
423
- left: a.labelX,
424
- top: a.labelTop,
425
- opacity: f,
426
- background: d ? u(o, 7) : W && c ? r.hlWashSoft : void 0,
427
- borderColor: d ? o : W && c ? r.hlBorder : l ? o : void 0,
428
- boxShadow: d ? `0 0 0 2px ${u(o, 40)}, 0 4px 12px rgba(35,32,28,.16)` : "0 1px 2px rgba(35,32,28,.06)"
423
+ left: t.labelX,
424
+ top: t.labelTop,
425
+ opacity: u,
426
+ background: o ? _(n, 7) : U && i ? d.hlWashSoft : void 0,
427
+ borderColor: o ? n : U && i ? d.hlBorder : a ? n : void 0,
428
+ boxShadow: o ? `0 0 0 2px ${_(n, 40)}, 0 4px 12px rgba(35,32,28,.16)` : "0 1px 2px rgba(35,32,28,.06)"
429
429
  },
430
- children: Je ? Je(n, {
431
- color: o,
432
- pending: s,
433
- durationMs: (n.end ?? z) - n.start
434
- }) : /* @__PURE__ */ T(C, { children: [
435
- /* @__PURE__ */ T("div", { children: [p && /* @__PURE__ */ T(C, { children: [/* @__PURE__ */ w("span", {
436
- className: t.chipBadge,
430
+ children: Xe ? Xe(e, {
431
+ color: n,
432
+ pending: r,
433
+ durationMs: (e.end ?? R) - e.start
434
+ }) : /* @__PURE__ */ S(b, { children: [
435
+ /* @__PURE__ */ S("div", { children: [p && /* @__PURE__ */ S(b, { children: [/* @__PURE__ */ x("span", {
436
+ className: l.chipBadge,
437
437
  style: {
438
- background: u(m, 14),
438
+ background: _(m, 14),
439
439
  color: m
440
440
  },
441
441
  children: p
442
- }), /* @__PURE__ */ w("span", {
443
- className: t.chipArrow,
442
+ }), /* @__PURE__ */ x("span", {
443
+ className: l.chipArrow,
444
444
  children: " → "
445
- })] }), /* @__PURE__ */ w("span", {
446
- className: t.chipBadge,
445
+ })] }), /* @__PURE__ */ x("span", {
446
+ className: l.chipBadge,
447
447
  style: {
448
- background: u(h, 14),
448
+ background: _(h, 14),
449
449
  color: h
450
450
  },
451
- children: n.service
451
+ children: e.service
452
452
  })] }),
453
- /* @__PURE__ */ w("div", {
454
- className: t.chipOp,
455
- children: /* @__PURE__ */ w(te, {
456
- text: ne,
457
- query: W
453
+ /* @__PURE__ */ x("div", {
454
+ className: l.chipOp,
455
+ children: /* @__PURE__ */ x(ie, {
456
+ text: f,
457
+ query: U
458
458
  })
459
459
  }),
460
- /* @__PURE__ */ w("div", {
461
- className: t.chipTime,
462
- children: ee(n.start, !0)
460
+ /* @__PURE__ */ x("div", {
461
+ className: l.chipTime,
462
+ children: te(e.start, !0)
463
463
  })
464
464
  ] })
465
465
  })
466
- ] }), /* @__PURE__ */ w("div", {
467
- ...ie,
468
- className: S(t.bar, s && t.barPending, j?.bar),
466
+ ] }), /* @__PURE__ */ x("div", {
467
+ ...re,
468
+ className: s(l.bar, r && l.barPending, k?.bar),
469
469
  style: {
470
- left: a.left,
471
- top: a.barTop,
472
- width: a.width,
473
- height: en,
474
- background: W && c ? r.hlBarBg : u(o, 22),
475
- borderColor: o,
476
- opacity: f,
477
- boxShadow: re
470
+ left: t.left,
471
+ top: t.barTop,
472
+ width: t.width,
473
+ height: tn,
474
+ background: U && i ? d.hlBarBg : _(n, 22),
475
+ borderColor: n,
476
+ opacity: u,
477
+ boxShadow: g
478
478
  },
479
- children: s && /* @__PURE__ */ w("span", {
480
- className: S(e.pulseDot, t.barDot),
481
- style: { background: o }
479
+ children: r && /* @__PURE__ */ x("span", {
480
+ className: s(c.pulseDot, l.barDot),
481
+ style: { background: n }
482
482
  })
483
- })] }, n.id);
483
+ })] }, e.id);
484
484
  })]
485
485
  })
486
486
  ]
487
487
  })
488
488
  })
489
489
  }),
490
- yn && $ && Xe && /* @__PURE__ */ T("div", {
491
- className: t.dockCol,
492
- style: { flexBasis: gt },
493
- children: [/* @__PURE__ */ w(p, {
490
+ bn && Q && Qe && /* @__PURE__ */ S("div", {
491
+ className: l.dockCol,
492
+ style: { flexBasis: _t },
493
+ children: [/* @__PURE__ */ x(oe, {
494
494
  panel: "right",
495
- width: gt,
495
+ width: _t,
496
496
  min: 280,
497
497
  max: 640,
498
- onResize: _t,
498
+ onResize: vt,
499
499
  label: "Resize details drawer",
500
- className: t.dockColResizer
501
- }), /* @__PURE__ */ w("aside", {
502
- className: S(e.aside, t.drawerCustom, j?.drawer),
503
- children: Xe($, {
504
- close: xn,
505
- pending: vn
500
+ className: l.dockColResizer
501
+ }), /* @__PURE__ */ x("aside", {
502
+ className: s(c.aside, l.drawerCustom, k?.drawer),
503
+ children: Qe(Q, {
504
+ close: Sn,
505
+ pending: yn
506
506
  })
507
507
  })]
508
508
  }),
509
- yn && !($ && Xe) && /* @__PURE__ */ T("div", {
510
- className: t.dockCol,
511
- style: { flexBasis: gt },
512
- children: [/* @__PURE__ */ w(p, {
509
+ bn && !(Q && Qe) && /* @__PURE__ */ S("div", {
510
+ className: l.dockCol,
511
+ style: { flexBasis: _t },
512
+ children: [/* @__PURE__ */ x(oe, {
513
513
  panel: "right",
514
- width: gt,
514
+ width: _t,
515
515
  min: 280,
516
516
  max: 640,
517
- onResize: _t,
517
+ onResize: vt,
518
518
  label: "Resize details drawer",
519
- className: t.dockColResizer
520
- }), /* @__PURE__ */ T("aside", {
521
- className: S(e.aside, A && t.dockAside, j?.drawer),
522
- children: [A && /* @__PURE__ */ T("div", {
523
- className: t.dockHead,
519
+ className: l.dockColResizer
520
+ }), /* @__PURE__ */ S("aside", {
521
+ className: s(c.aside, D && l.dockAside, k?.drawer),
522
+ children: [D && /* @__PURE__ */ S("div", {
523
+ className: l.dockHead,
524
524
  children: [
525
- /* @__PURE__ */ w("span", {
526
- className: t.dockTitle,
525
+ /* @__PURE__ */ x("span", {
526
+ className: l.dockTitle,
527
527
  children: "Event details"
528
528
  }),
529
- /* @__PURE__ */ w("div", { className: t.drawerSpacer }),
530
- /* @__PURE__ */ w("button", {
529
+ /* @__PURE__ */ x("div", { className: l.drawerSpacer }),
530
+ /* @__PURE__ */ x("button", {
531
531
  type: "button",
532
- className: e.asideClose,
532
+ className: c.asideClose,
533
533
  "aria-label": "Close details",
534
- onClick: xn,
534
+ onClick: Sn,
535
535
  children: "✕"
536
536
  })
537
537
  ]
538
- }), $ ? /* @__PURE__ */ w(oe, {
539
- event: $,
540
- now: z,
541
- highlight: W,
542
- showExtraFields: Ve,
543
- hiddenFields: He,
544
- onClose: A ? void 0 : xn,
545
- className: A ? t.dockScroll : void 0
546
- }) : /* @__PURE__ */ w("div", {
547
- className: t.dockEmpty,
538
+ }), Q ? /* @__PURE__ */ x(pe, {
539
+ event: Q,
540
+ now: R,
541
+ highlight: U,
542
+ showExtraFields: We,
543
+ hiddenFields: Ge,
544
+ onClose: D ? void 0 : Sn,
545
+ className: D ? l.dockScroll : void 0
546
+ }) : /* @__PURE__ */ x("div", {
547
+ className: l.dockEmpty,
548
548
  children: "Click an event on the timeline to inspect it."
549
549
  })]
550
550
  })]
551
551
  }),
552
- bn && /* @__PURE__ */ T("div", {
553
- className: t.dockCol,
554
- style: { flexBasis: vt },
555
- children: [/* @__PURE__ */ w(p, {
552
+ xn && /* @__PURE__ */ S("div", {
553
+ className: l.dockCol,
554
+ style: { flexBasis: yt },
555
+ children: [/* @__PURE__ */ x(oe, {
556
556
  panel: "right",
557
- width: vt,
557
+ width: yt,
558
558
  min: 320,
559
559
  max: 680,
560
- onResize: yt,
560
+ onResize: bt,
561
561
  label: "Resize log drawer",
562
- className: t.dockColResizer
563
- }), /* @__PURE__ */ T("aside", {
564
- className: S(e.aside, t.dockAside, j?.log),
565
- children: [/* @__PURE__ */ T("div", {
566
- className: t.dockHead,
562
+ className: l.dockColResizer
563
+ }), /* @__PURE__ */ S("aside", {
564
+ className: s(c.aside, l.dockAside, k?.log),
565
+ children: [/* @__PURE__ */ S("div", {
566
+ className: l.dockHead,
567
567
  children: [
568
- /* @__PURE__ */ w("span", {
569
- className: t.dockTitle,
568
+ /* @__PURE__ */ x("span", {
569
+ className: l.dockTitle,
570
570
  children: "Full log"
571
571
  }),
572
- /* @__PURE__ */ T("span", {
573
- className: t.dockCount,
574
- children: [O.length, " events"]
572
+ /* @__PURE__ */ S("span", {
573
+ className: l.dockCount,
574
+ children: [T.length, " events"]
575
575
  }),
576
- /* @__PURE__ */ w("div", { className: t.drawerSpacer }),
577
- /* @__PURE__ */ w("button", {
576
+ /* @__PURE__ */ x("div", { className: l.drawerSpacer }),
577
+ /* @__PURE__ */ x("button", {
578
578
  type: "button",
579
- className: e.asideClose,
579
+ className: c.asideClose,
580
580
  "aria-label": "Close full log",
581
- onClick: () => ht(null),
581
+ onClick: () => I(null),
582
582
  children: "✕"
583
583
  })
584
584
  ]
585
- }), /* @__PURE__ */ w("div", {
586
- ref: At,
587
- className: S(t.dockScroll, t.logBody),
588
- children: Sn.map((n, r) => {
589
- let i = n.end == null, o = n.url ? n.url.replace(/^https?:\/\/[^/]+/, "") : "", s = se(n);
590
- return /* @__PURE__ */ T("div", {
591
- "data-crk-log-id": n.id,
592
- className: S(t.logEntry, I === n.id && t.logEntrySelected, jt === n.id && t.logEntryFlash),
585
+ }), /* @__PURE__ */ x("div", {
586
+ ref: jt,
587
+ className: s(l.dockScroll, l.logBody),
588
+ children: Cn.map((e, t) => {
589
+ let n = e.end == null, r = e.url ? e.url.replace(/^https?:\/\/[^/]+/, "") : "", i = me(e);
590
+ return /* @__PURE__ */ S("div", {
591
+ "data-crk-log-id": e.id,
592
+ className: s(l.logEntry, P === e.id && l.logEntrySelected, Mt === e.id && l.logEntryFlash),
593
593
  onClick: () => {
594
- Zt(n), V.current = n.id;
594
+ Qt(e), B.current = e.id;
595
595
  },
596
596
  children: [
597
- /* @__PURE__ */ T("div", {
598
- className: t.logTop,
597
+ /* @__PURE__ */ S("div", {
598
+ className: l.logTop,
599
599
  children: [
600
- /* @__PURE__ */ w("span", {
601
- className: t.logNum,
602
- children: String(r + 1).padStart(2, "0")
600
+ /* @__PURE__ */ x("span", {
601
+ className: l.logNum,
602
+ children: String(t + 1).padStart(2, "0")
603
603
  }),
604
- n.method && /* @__PURE__ */ w("span", {
605
- className: S(t.methodBadge, t.badgeSm),
606
- children: n.method
604
+ e.method && /* @__PURE__ */ x("span", {
605
+ className: s(l.methodBadge, l.badgeSm),
606
+ children: e.method
607
607
  }),
608
- /* @__PURE__ */ w(ie, {
609
- event: n,
610
- pending: i,
608
+ /* @__PURE__ */ x(de, {
609
+ event: e,
610
+ pending: n,
611
611
  small: !0
612
612
  }),
613
- /* @__PURE__ */ w("span", {
614
- className: t.logPair,
615
- children: ce(n)
613
+ /* @__PURE__ */ x("span", {
614
+ className: l.logPair,
615
+ children: he(e)
616
616
  }),
617
- /* @__PURE__ */ w("div", { className: t.drawerSpacer }),
618
- /* @__PURE__ */ w("span", {
619
- className: t.logClock,
620
- children: a(n.start)
617
+ /* @__PURE__ */ x("div", { className: l.drawerSpacer }),
618
+ /* @__PURE__ */ x("span", {
619
+ className: l.logClock,
620
+ children: f(e.start)
621
621
  })
622
622
  ]
623
623
  }),
624
- /* @__PURE__ */ w("div", {
625
- className: t.logOp,
626
- children: /* @__PURE__ */ w(te, {
627
- text: String(_(n)),
628
- query: W
624
+ /* @__PURE__ */ x("div", {
625
+ className: l.logOp,
626
+ children: /* @__PURE__ */ x(ie, {
627
+ text: String(v(e)),
628
+ query: U
629
629
  })
630
630
  }),
631
- o && /* @__PURE__ */ w("div", {
632
- className: t.logPath,
633
- children: o
631
+ r && /* @__PURE__ */ x("div", {
632
+ className: l.logPath,
633
+ children: r
634
634
  }),
635
- n.message && /* @__PURE__ */ w("div", {
636
- className: t.logMessage,
637
- children: /* @__PURE__ */ w(te, {
638
- text: n.message,
639
- query: W
635
+ e.message && /* @__PURE__ */ x("div", {
636
+ className: l.logMessage,
637
+ children: /* @__PURE__ */ x(ie, {
638
+ text: e.message,
639
+ query: U
640
640
  })
641
641
  }),
642
- !!n.details?.length && /* @__PURE__ */ w("div", {
643
- className: S(t.fieldList, t.logFields),
642
+ !!e.details?.length && /* @__PURE__ */ x("div", {
643
+ className: s(l.fieldList, l.logFields),
644
644
  onClick: (e) => e.stopPropagation(),
645
- children: n.details.map((e, t) => /* @__PURE__ */ w(ae, {
645
+ children: e.details.map((e, t) => /* @__PURE__ */ x(fe, {
646
646
  field: e,
647
- query: W
647
+ query: U
648
648
  }, e.label + t))
649
649
  }),
650
- n.payload != null && /* @__PURE__ */ T(C, { children: [/* @__PURE__ */ T("div", {
651
- className: t.logPayloadHead,
652
- children: [/* @__PURE__ */ w("span", {
653
- className: t.logPayloadLabel,
650
+ e.payload != null && /* @__PURE__ */ S(b, { children: [/* @__PURE__ */ S("div", {
651
+ className: l.logPayloadHead,
652
+ children: [/* @__PURE__ */ x("span", {
653
+ className: l.logPayloadLabel,
654
654
  children: "Payload"
655
- }), /* @__PURE__ */ w("span", {
656
- className: t.copyStop,
655
+ }), /* @__PURE__ */ x("span", {
656
+ className: l.copyStop,
657
657
  onClick: (e) => e.stopPropagation(),
658
- children: /* @__PURE__ */ w(g, {
658
+ children: /* @__PURE__ */ x(ue, {
659
659
  size: "sm",
660
- className: t.payloadCopy,
661
- value: () => v(n.payload),
660
+ className: l.payloadCopy,
661
+ value: () => y(e.payload),
662
662
  "aria-label": "Copy payload"
663
663
  })
664
664
  })]
665
- }), /* @__PURE__ */ w("pre", {
666
- className: S(e.asideRaw, t.logPre),
667
- children: v(n.payload)
665
+ }), /* @__PURE__ */ x("pre", {
666
+ className: s(c.asideRaw, l.logPre),
667
+ children: y(e.payload)
668
668
  })] }),
669
- s && /* @__PURE__ */ T(C, { children: [
670
- /* @__PURE__ */ T("div", {
671
- className: t.logPayloadHead,
672
- children: [/* @__PURE__ */ w("span", {
673
- className: t.logPayloadLabel,
669
+ i && /* @__PURE__ */ S(b, { children: [
670
+ /* @__PURE__ */ S("div", {
671
+ className: l.logPayloadHead,
672
+ children: [/* @__PURE__ */ x("span", {
673
+ className: l.logPayloadLabel,
674
674
  children: "Request"
675
- }), n.reqBody != null && /* @__PURE__ */ w("span", {
676
- className: t.copyStop,
675
+ }), e.reqBody != null && /* @__PURE__ */ x("span", {
676
+ className: l.copyStop,
677
677
  onClick: (e) => e.stopPropagation(),
678
- children: /* @__PURE__ */ w(g, {
678
+ children: /* @__PURE__ */ x(ue, {
679
679
  size: "sm",
680
- className: t.payloadCopy,
681
- value: () => v(n.reqBody),
680
+ className: l.payloadCopy,
681
+ value: () => y(e.reqBody),
682
682
  "aria-label": "Copy request payload"
683
683
  })
684
684
  })]
685
685
  }),
686
- /* @__PURE__ */ w("pre", {
687
- className: S(e.asideRaw, t.logPre),
688
- children: n.reqBody == null ? "(empty)" : v(n.reqBody)
686
+ /* @__PURE__ */ x("pre", {
687
+ className: s(c.asideRaw, l.logPre),
688
+ children: e.reqBody == null ? "(empty)" : y(e.reqBody)
689
689
  }),
690
- /* @__PURE__ */ T("div", {
691
- className: t.logPayloadHead,
692
- children: [/* @__PURE__ */ w("span", {
693
- className: t.logPayloadLabel,
690
+ /* @__PURE__ */ S("div", {
691
+ className: l.logPayloadHead,
692
+ children: [/* @__PURE__ */ x("span", {
693
+ className: l.logPayloadLabel,
694
694
  children: "Response"
695
- }), !i && n.resBody != null && /* @__PURE__ */ w("span", {
696
- className: t.copyStop,
695
+ }), !n && e.resBody != null && /* @__PURE__ */ x("span", {
696
+ className: l.copyStop,
697
697
  onClick: (e) => e.stopPropagation(),
698
- children: /* @__PURE__ */ w(g, {
698
+ children: /* @__PURE__ */ x(ue, {
699
699
  size: "sm",
700
- className: t.payloadCopy,
701
- value: () => v(n.resBody),
700
+ className: l.payloadCopy,
701
+ value: () => y(e.resBody),
702
702
  "aria-label": "Copy response payload"
703
703
  })
704
704
  })]
705
705
  }),
706
- i ? /* @__PURE__ */ T("div", {
707
- className: t.awaiting,
708
- children: [/* @__PURE__ */ w("span", { className: S(e.pulseDot, t.awaitingDot) }), "Awaiting response…"]
709
- }) : /* @__PURE__ */ w("pre", {
710
- className: S(e.asideRaw, t.logPre),
711
- children: n.resBody == null ? "(empty)" : v(n.resBody)
706
+ n ? /* @__PURE__ */ S("div", {
707
+ className: l.awaiting,
708
+ children: [/* @__PURE__ */ x("span", { className: s(c.pulseDot, l.awaitingDot) }), "Awaiting response…"]
709
+ }) : /* @__PURE__ */ x("pre", {
710
+ className: s(c.asideRaw, l.logPre),
711
+ children: e.resBody == null ? "(empty)" : y(e.resBody)
712
712
  })
713
713
  ] }),
714
- !s && i && /* @__PURE__ */ T("div", {
715
- className: t.awaiting,
716
- children: [/* @__PURE__ */ w("span", { className: S(e.pulseDot, t.awaitingDot) }), "Still ongoing…"]
714
+ !i && n && /* @__PURE__ */ S("div", {
715
+ className: l.awaiting,
716
+ children: [/* @__PURE__ */ x("span", { className: s(c.pulseDot, l.awaitingDot) }), "Still ongoing…"]
717
717
  })
718
718
  ]
719
- }, n.id);
719
+ }, e.id);
720
720
  })
721
721
  })]
722
722
  })]
723
723
  }),
724
- k === "bubble" && Cn
724
+ E === "bubble" && $
725
725
  ]
726
- }), /* @__PURE__ */ w("div", {
727
- className: S(e.footnote, j?.footnote),
726
+ }), /* @__PURE__ */ x("div", {
727
+ className: s(c.footnote, k?.footnote),
728
728
  children: "Click an event to open its details in the side panel · dashed pills are still in flight"
729
729
  })]
730
730
  }),
731
- (k === "right" || k === "floating") && Cn,
732
- A && /* @__PURE__ */ T("div", {
733
- className: S(t.rail, j?.rail),
734
- children: [/* @__PURE__ */ w("button", {
731
+ (E === "right" || E === "floating") && $,
732
+ D && /* @__PURE__ */ S("div", {
733
+ className: s(l.rail, k?.rail),
734
+ children: [/* @__PURE__ */ x("button", {
735
735
  type: "button",
736
736
  title: "Event details",
737
737
  "aria-label": "Toggle event details drawer",
738
- "aria-pressed": L === "details",
739
- className: S(t.railBtn, L === "details" && t.railBtnActive),
740
- onClick: () => ht(L === "details" ? null : "details"),
741
- children: /* @__PURE__ */ T("span", {
742
- className: t.railGlyphDetails,
738
+ "aria-pressed": F === "details",
739
+ className: s(l.railBtn, F === "details" && l.railBtnActive),
740
+ onClick: () => I(F === "details" ? null : "details"),
741
+ children: /* @__PURE__ */ S("span", {
742
+ className: l.railGlyphDetails,
743
743
  "aria-hidden": !0,
744
744
  children: [
745
- /* @__PURE__ */ w("span", {}),
746
- /* @__PURE__ */ w("span", {}),
747
- /* @__PURE__ */ w("span", {})
745
+ /* @__PURE__ */ x("span", {}),
746
+ /* @__PURE__ */ x("span", {}),
747
+ /* @__PURE__ */ x("span", {})
748
748
  ]
749
749
  })
750
- }), /* @__PURE__ */ w("button", {
750
+ }), /* @__PURE__ */ x("button", {
751
751
  type: "button",
752
752
  title: "Full log",
753
753
  "aria-label": "Toggle full log drawer",
754
- "aria-pressed": L === "log",
755
- className: S(t.railBtn, L === "log" && t.railBtnActive),
754
+ "aria-pressed": F === "log",
755
+ className: s(l.railBtn, F === "log" && l.railBtnActive),
756
756
  onClick: () => {
757
- let e = L === "log" ? null : "log";
758
- e === "log" && I != null && (H.current = I), ht(e);
757
+ let e = F === "log" ? null : "log";
758
+ e === "log" && P != null && (V.current = P), I(e);
759
759
  },
760
- children: /* @__PURE__ */ T("span", {
761
- className: t.railGlyphLog,
760
+ children: /* @__PURE__ */ S("span", {
761
+ className: l.railGlyphLog,
762
762
  "aria-hidden": !0,
763
763
  children: [
764
- /* @__PURE__ */ w("span", {}),
765
- /* @__PURE__ */ w("span", {}),
766
- /* @__PURE__ */ w("span", {})
764
+ /* @__PURE__ */ x("span", {}),
765
+ /* @__PURE__ */ x("span", {}),
766
+ /* @__PURE__ */ x("span", {})
767
767
  ]
768
768
  })
769
769
  })]
770
770
  })
771
771
  ]
772
772
  }),
773
- k === "bottom" && Cn,
774
- N && (() => {
775
- let t = O.find((e) => e.id === N.id), n = t && Ye ? Ye(t, {
776
- color: Y[t.service] || r.body,
777
- pending: t.end == null,
778
- durationMs: (t.end ?? z) - t.start
773
+ E === "bottom" && $,
774
+ j && (() => {
775
+ let e = T.find((e) => e.id === j.id), t = e && Ze ? Ze(e, {
776
+ color: J[e.service] || d.body,
777
+ pending: e.end == null,
778
+ durationMs: (e.end ?? R) - e.start
779
779
  }) : void 0;
780
- return Ye && n == null ? null : /* @__PURE__ */ w(h, {
781
- x: N.x,
782
- y: N.y,
783
- className: j?.tooltip,
784
- children: n === void 0 ? /* @__PURE__ */ T(C, { children: [
785
- /* @__PURE__ */ w("div", {
786
- className: S(e.tooltipTitle, e.tooltipMono),
787
- children: N.rid
780
+ return Ze && t == null ? null : /* @__PURE__ */ x(ce, {
781
+ x: j.x,
782
+ y: j.y,
783
+ className: k?.tooltip,
784
+ children: t === void 0 ? /* @__PURE__ */ S(b, { children: [
785
+ /* @__PURE__ */ x("div", {
786
+ className: s(c.tooltipTitle, c.tooltipMono),
787
+ children: j.rid
788
788
  }),
789
- /* @__PURE__ */ w("div", {
790
- className: e.tooltipLine,
789
+ /* @__PURE__ */ x("div", {
790
+ className: c.tooltipLine,
791
791
  style: { marginTop: 4 },
792
- children: N.route
792
+ children: j.route
793
793
  }),
794
- N.label && /* @__PURE__ */ w("div", {
795
- className: S(e.tooltipLine, e.tooltipMono),
794
+ j.label && /* @__PURE__ */ x("div", {
795
+ className: s(c.tooltipLine, c.tooltipMono),
796
796
  style: { marginTop: 2 },
797
- children: N.label
797
+ children: j.label
798
798
  }),
799
- /* @__PURE__ */ w("div", {
800
- className: e.tooltipLine,
799
+ /* @__PURE__ */ x("div", {
800
+ className: c.tooltipLine,
801
801
  style: { marginTop: 4 },
802
- children: N.time
802
+ children: j.time
803
803
  }),
804
- /* @__PURE__ */ w("div", {
805
- className: e.tooltipLine,
806
- children: N.durLine
804
+ /* @__PURE__ */ x("div", {
805
+ className: c.tooltipLine,
806
+ children: j.durLine
807
807
  }),
808
- N.url && /* @__PURE__ */ w("div", {
809
- className: S(e.tooltipDim, e.tooltipMono),
808
+ j.url && /* @__PURE__ */ x("div", {
809
+ className: s(c.tooltipDim, c.tooltipMono),
810
810
  style: {
811
811
  marginTop: 4,
812
812
  wordBreak: "break-all",
813
813
  fontSize: "10.5px"
814
814
  },
815
- children: N.url
815
+ children: j.url
816
816
  })
817
- ] }) : n
817
+ ] }) : t
818
818
  });
819
819
  })()
820
820
  ]
821
821
  });
822
822
  });
823
- export { Ce as TraceTimeline };
823
+ export { Ee as TraceTimeline };