@mechane-ai/elements 0.61.0 → 0.63.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (92) hide show
  1. package/dist/ai.js +211 -212
  2. package/dist/{article-COShcQPh.js → article-lhByzGCW.js} +6 -6
  3. package/dist/article.js +1 -1
  4. package/dist/catalog.json +13 -1
  5. package/dist/{categorical-values-DdZLdWhL.js → categorical-values-3g2m87_m.js} +1 -1
  6. package/dist/{cells-BTTLURWI.js → cells-X8SVrZBc.js} +1 -1
  7. package/dist/charts/cartesian.js +1 -1
  8. package/dist/charts/cells.js +1 -1
  9. package/dist/charts/comparison.js +1 -1
  10. package/dist/charts/distribution.js +1 -1
  11. package/dist/charts/figure.js +12 -12
  12. package/dist/charts/graph.js +1 -1
  13. package/dist/charts/hierarchy.js +1 -1
  14. package/dist/charts/image.js +1 -1
  15. package/dist/charts/matrix.js +1 -1
  16. package/dist/charts/plot.js +4 -4
  17. package/dist/charts/relationship.js +1 -1
  18. package/dist/charts/text.js +1 -1
  19. package/dist/charts/timeline.js +2 -2
  20. package/dist/charts/trend.js +1 -1
  21. package/dist/charts.js +2 -2
  22. package/dist/{code-block-BZsY2sh3.js → code-block-CJkiWSrX.js} +1 -1
  23. package/dist/collections.js +1 -1
  24. package/dist/{commands-D0bF2JxV.js → commands-DlitIiMJ.js} +2 -2
  25. package/dist/content/code.js +1 -1
  26. package/dist/content/diff.js +10 -10
  27. package/dist/content/link.js +1 -1
  28. package/dist/content/markdown.js +1 -1
  29. package/dist/content/tree.js +2 -2
  30. package/dist/{content-link-PnpcnTCx.js → content-link-DQ3tt_SK.js} +1 -1
  31. package/dist/content.js +1 -1
  32. package/dist/{dates-Cq90-D2X.js → dates-Cvrsj4l9.js} +31 -32
  33. package/dist/{dumbbell-plot-BeHhL-01.js → dumbbell-plot-CEShrjuI.js} +4 -4
  34. package/dist/{embedding-map-DbETVJXp.js → embedding-map-CQZn0DCg.js} +7 -7
  35. package/dist/feedback.js +1 -1
  36. package/dist/{figure-frame-ClYRIRAq.js → figure-frame-BljHBC77.js} +11 -11
  37. package/dist/forms/dates.js +1 -1
  38. package/dist/{forms-CEbwzlRR.js → forms-BYk8t91h.js} +17 -17
  39. package/dist/forms.js +2 -2
  40. package/dist/{image-grid-DB5U7Jtx.js → image-grid-ClMUSwqO.js} +3 -3
  41. package/dist/index.js +1 -1
  42. package/dist/kits/evaluation.js +5 -5
  43. package/dist/kits/interpretability.js +12 -12
  44. package/dist/kits/operations.js +6 -6
  45. package/dist/kits/research.js +8 -8
  46. package/dist/kits/training.js +6 -6
  47. package/dist/layout.js +1 -1
  48. package/dist/lesson.js +3 -3
  49. package/dist/{markdown-VpLw_P9T.js → markdown-_4ZFsDyM.js} +2 -2
  50. package/dist/mdx.js +6 -6
  51. package/dist/navigation/commands.js +1 -1
  52. package/dist/navigation-CwXM887i.js +44 -0
  53. package/dist/navigation.js +3 -3
  54. package/dist/packages/charts/src/plot/plot-marks.d.ts +2 -1
  55. package/dist/packages/charts/src/timeline/trace-timeline-layout.d.ts +7 -2
  56. package/dist/packages/charts/src/timeline/trace-timeline.d.ts +5 -3
  57. package/dist/packages/charts/src/timeline/waterfall.d.ts +3 -1
  58. package/dist/packages/core/src/filter-chips.d.ts +21 -0
  59. package/dist/packages/core/src/index.d.ts +2 -0
  60. package/dist/packages/navigation/src/navigation.d.ts +4 -0
  61. package/dist/{param-BdqTpZER.js → param-BxLsoDip.js} +1 -1
  62. package/dist/{pierre-diff-aGyQK5xK.js → pierre-diff-DwmKtFYy.js} +1 -1
  63. package/dist/{plot-layout-B-b6tioh.js → plot-layout-oXzW4fgJ.js} +2 -2
  64. package/dist/{plot-marks-FVsbFkUs.js → plot-marks-DgCtcd3L.js} +7 -6
  65. package/dist/{plot-surface-BlR44uTL.js → plot-surface-BuXeoeBq.js} +1 -1
  66. package/dist/{reference-lines-BDfsv8dy.js → reference-lines-Kmxs_hXa.js} +2 -2
  67. package/dist/{scene-CY05-A1k.js → scene-AWpudPHv.js} +7 -7
  68. package/dist/scene.js +1 -1
  69. package/dist/{slope-chart-DTyF1lNG.js → slope-chart-DzbDOBUo.js} +5 -5
  70. package/dist/{src-Ci8DeY8J.js → src-CJ-0r20F.js} +1 -1
  71. package/dist/{src-BAlO76fa.js → src-CZyleIH0.js} +40 -40
  72. package/dist/{src-Dxs3Buo_.js → src-CuTIcRwk.js} +186 -187
  73. package/dist/{src-4qgpiWvP.js → src-DFkzV7H0.js} +44 -44
  74. package/dist/{src-9EJskqB_.js → src-DH2Xqu32.js} +659 -428
  75. package/dist/{src-C-Wg9m9H.js → src-DpVApV62.js} +20 -21
  76. package/dist/{src-Cuwx-PLT.js → src-yrBVxkaf.js} +119 -120
  77. package/dist/styles2.css +55 -12
  78. package/dist/{time-series-BbUBF3IE.js → time-series-D7TCUK56.js} +34 -34
  79. package/dist/timeline-CR5VPm_f.js +914 -0
  80. package/dist/{token-heatmap-o_9l6vaq.js → token-heatmap-DEpcsiRR.js} +3 -3
  81. package/dist/{token-predictions-DaAztlOS.js → token-predictions-DMYbc2-N.js} +4 -4
  82. package/dist/{transport-4V9rfYHN.js → transport-VwKG58nR.js} +4 -4
  83. package/dist/{tree-diagram-BDj4TGXb.js → tree-diagram-BqL3fTdB.js} +8 -8
  84. package/dist/{treemap-DUSFlCPK.js → treemap-C0CeP3PD.js} +4 -4
  85. package/dist/{use-tween-BsaEO862.js → use-tween-D-wmSMa8.js} +1 -1
  86. package/dist/{violin-plot-ULdC_dcY.js → violin-plot-6829_9q5.js} +4 -4
  87. package/dist/waterfall-C5HRWlEe.js +736 -0
  88. package/package.json +1 -1
  89. package/dist/control-styles-D3q_Qyxi.js +0 -179
  90. package/dist/navigation-CveMIuXI.js +0 -39
  91. package/dist/timeline-kDb6bY7M.js +0 -712
  92. package/dist/waterfall-Dre6i02Z.js +0 -684
@@ -0,0 +1,914 @@
1
+ import { A as e, E as t, M as n, S as r, h as i, j as a, l as o, s } from "./plot-layout-oXzW4fgJ.js";
2
+ import { E as c, c as l, m as u, t as d, y as f } from "./src-DH2Xqu32.js";
3
+ import { t as p } from "./chart-tones-ei3BC2AL.js";
4
+ import { t as m } from "./chart-cursor-1mFd48Jc.js";
5
+ import { i as h, l as g, n as _, r as ee, t as te } from "./figure-frame-BljHBC77.js";
6
+ import { i as v } from "./chart-link-AE_xuxiP.js";
7
+ import { t as y } from "./chart-range-Du1gDxCY.js";
8
+ import { n as ne } from "./plot-width-D3hTycYX.js";
9
+ import { r as re } from "./figure-format-B8kRZMlo.js";
10
+ import { a as ie } from "./tone-scope-DKiSw-JR.js";
11
+ import { t as ae } from "./plot-axes-D5S9BnBa.js";
12
+ import { r as oe } from "./plot-marks-DgCtcd3L.js";
13
+ import { n as se, r as ce, t as le } from "./plot-surface-BuXeoeBq.js";
14
+ import { r as ue } from "./scale-C2xgZyZN.js";
15
+ import * as b from "@stylexjs/stylex";
16
+ import { useId as de, useRef as fe, useState as pe } from "react";
17
+ import { stackSpans as x } from "@ui-sdk/core";
18
+ import { Fragment as me, jsx as S, jsxs as C } from "react/jsx-runtime";
19
+ import { X as he } from "lucide-react";
20
+ // packages/charts/src/timeline/trace-timeline-layout.ts
21
+ var w = {
22
+ lanes: 24,
23
+ spans: 2e3
24
+ }, T = .5, E = .005, ge = .7, D = .2, _e = .15, O = 10, k = 6, ve = 12, A = 5, j = 3, ye = 2, be = 6, xe = 8, Se = .5;
25
+ function Ce({ lanes: e, spans: t, domain: r }) {
26
+ let [i, a] = r;
27
+ if (!Number.isFinite(i) || !Number.isFinite(a) || a < i) return "The trace domain must have finite, ordered endpoints.";
28
+ if (e.length === 0) return "A trace timeline needs at least one lane.";
29
+ if (e.length > w.lanes) return `This chart draws at most ${w.lanes} lanes.`;
30
+ if (t.length > w.spans) return `This chart draws at most ${w.spans} spans.`;
31
+ if (!n(e)) return "Trace lanes must have unique identifiers.";
32
+ if (!n(t)) return "Trace spans must have unique identifiers.";
33
+ let o = new Set(e.map((e) => e.id));
34
+ for (let e of t) {
35
+ if (!o.has(e.laneId)) return `Span "${e.id}" references an unknown lane "${e.laneId}".`;
36
+ if (!Number.isFinite(e.start) || !Number.isFinite(e.end) || e.end < e.start) return `Span "${e.id}" must have finite, ordered endpoints.`;
37
+ }
38
+ }
39
+ function we(e, t) {
40
+ let [n, r] = t, i = Math.max(r - n, 0);
41
+ if (i === 0) return [n, r];
42
+ let a = i * E, o = Math.max(n, Math.min(r, e[0])), s = Math.max(n, Math.min(r, e[1]));
43
+ if (s < o && ([o, s] = [s, o]), s - o < a) {
44
+ let e = (o + s) * T;
45
+ o = Math.max(n, e - a * T), s = Math.min(r, o + a), o = Math.max(n, s - a);
46
+ }
47
+ return [o, s];
48
+ }
49
+ function Te({ visible: e, domain: t, factor: n, anchorRatio: r = T }) {
50
+ let [i, a] = t, o = e[1] - e[0], s = a - i;
51
+ if (s <= 0 || !Number.isFinite(n) || n <= 0) return t;
52
+ let c = Math.min(s, Math.max(s * E, o * n)), l = e[0] + o * r - c * r, u = l + c;
53
+ return l < i && (l = i, u = Math.min(a, i + c)), u > a && (u = a, l = Math.max(i, a - c)), [l, u];
54
+ }
55
+ function M({ visible: e, domain: t, direction: n, anchorRatio: r = T }) {
56
+ return Te({
57
+ visible: e,
58
+ domain: t,
59
+ factor: n === "in" ? ge : 1 / ge,
60
+ anchorRatio: r
61
+ });
62
+ }
63
+ function Ee({ visible: e, domain: t, direction: n }) {
64
+ return De({
65
+ visible: e,
66
+ domain: t,
67
+ delta: (e[1] - e[0]) * D * (n === "left" ? -1 : 1)
68
+ });
69
+ }
70
+ function De({ visible: e, domain: t, delta: n }) {
71
+ let [r, i] = t, a = e[1] - e[0], o = e[0] + n, s = o + a;
72
+ return o < r && (o = r, s = Math.min(i, r + a)), s > i && (s = i, o = Math.max(r, i - a)), [o, s];
73
+ }
74
+ function Oe(e, t) {
75
+ let [n, r] = t, i = r - n, a = Math.max(e.end - e.start, i * E) * _e;
76
+ return we([e.start - a, e.end + a], t);
77
+ }
78
+ var ke = 32;
79
+ function N(e, t) {
80
+ let n = t.get(e)?.parentId;
81
+ return Array.from({ length: ke }, () => {
82
+ if (n === void 0) return null;
83
+ let e = n;
84
+ return n = t.get(e)?.parentId, e;
85
+ }).filter((e) => e !== null);
86
+ }
87
+ function Ae(e, t, n) {
88
+ if (e == null) return;
89
+ let r = new Map(t.map((e) => [e.id, e])), i = r.get(e);
90
+ if (i === void 0) return;
91
+ let a = N(i.id, r), o = i.relatedIds ?? [], s = (n ?? []).flatMap((e) => e.fromSpanId === i.id ? [e.toSpanId] : e.toSpanId === i.id ? [e.fromSpanId] : []), c = t.filter((e) => e.relatedIds?.includes(i.id) === !0 || N(e.id, r).includes(i.id)).map((e) => e.id);
92
+ return /* @__PURE__ */ new Set([
93
+ i.id,
94
+ ...a,
95
+ ...o,
96
+ ...s,
97
+ ...c
98
+ ]);
99
+ }
100
+ function P(e, t) {
101
+ let n = e - A;
102
+ return `M ${n} ${t - j} L ${e} ${t} L ${n} ${t + j} Z`;
103
+ }
104
+ function je(e, t, n) {
105
+ let r = t - n * A;
106
+ return `M ${e - j} ${r} L ${e} ${t} L ${e + j} ${r} Z`;
107
+ }
108
+ function F({ fromEnd: e, fromY: t, toStart: n, toY: r }) {
109
+ let i = n - A, a = r - t, o = P(n, r);
110
+ if (Math.abs(a) < 1) return {
111
+ path: `M ${e} ${t} L ${i} ${r}`,
112
+ arrowPath: o
113
+ };
114
+ let s = a > 0 ? 1 : -1, c = i - e, l = e + Math.min(ve, c * T), u = Math.min(k, Math.abs(a) * T, l - e, i - l);
115
+ return {
116
+ path: [
117
+ `M ${e} ${t}`,
118
+ `L ${l - u} ${t}`,
119
+ `Q ${l} ${t} ${l} ${t + s * u}`,
120
+ `L ${l} ${r - s * u}`,
121
+ `Q ${l} ${r} ${l + u} ${r}`,
122
+ `L ${i} ${r}`
123
+ ].join(" "),
124
+ arrowPath: o
125
+ };
126
+ }
127
+ function Me({ from: e, to: t }) {
128
+ let n = 18 * T, r = e.y - n, i = t.y - n, a = i - A, o = Math.max(0, t.x2 - t.x1), s = t.x1 + Math.min(be, o * T), c = Math.max(Math.min(e.x2, e.x1 + ye), e.x2), l = Math.min(r - xe, a - k), u = s - c, d = je(s, i, 1);
129
+ if (Math.abs(u) < Se) return {
130
+ path: `M ${s} ${l} L ${s} ${a}`,
131
+ arrowPath: d
132
+ };
133
+ let f = u >= 0 ? 1 : -1, p = Math.min(k, Math.abs(u) * T, r - l, a - l);
134
+ return {
135
+ path: [
136
+ `M ${c} ${r}`,
137
+ `L ${c} ${l + p}`,
138
+ `Q ${c} ${l} ${c + f * p} ${l}`,
139
+ `L ${s - f * p} ${l}`,
140
+ `Q ${s} ${l} ${s} ${l + p}`,
141
+ `L ${s} ${a}`
142
+ ].join(" "),
143
+ arrowPath: d
144
+ };
145
+ }
146
+ function Ne({ from: e, to: t }) {
147
+ let n = e.x2, r = e.y, i = t.x1, a = t.y;
148
+ if (i - n >= O) return F({
149
+ fromEnd: n,
150
+ fromY: r,
151
+ toStart: i,
152
+ toY: a
153
+ });
154
+ let o = a - r;
155
+ if (Math.abs(o) < 1) return Me({
156
+ from: e,
157
+ to: t
158
+ });
159
+ let s = o > 0 ? 1 : -1, c = 18 * T, l = r + s * c, u = a - s * c, d = u - s * A, f = Math.max(0, t.x2 - i), p = i + Math.min(be, f * T), m = Math.min(n, e.x1 + ye), h = Math.max(m, Math.min(n, p)), g = je(p, u, s), _ = p - h;
160
+ if (Math.abs(_) < Se) return {
161
+ path: `M ${h} ${l} L ${p} ${d}`,
162
+ arrowPath: g
163
+ };
164
+ if (p > n) {
165
+ let e = p - n, t = Math.abs(d - r), i = Math.min(k, e, t);
166
+ return {
167
+ path: [
168
+ `M ${n} ${r}`,
169
+ `L ${p - i} ${r}`,
170
+ `Q ${p} ${r} ${p} ${r + s * i}`,
171
+ `L ${p} ${d}`
172
+ ].join(" "),
173
+ arrowPath: g
174
+ };
175
+ }
176
+ let ee = _ >= 0 ? 1 : -1, te = Math.abs(d - l), v = Math.min(k, te * T, Math.abs(_) * T), y = (l + d) * T;
177
+ return {
178
+ path: [
179
+ `M ${h} ${l}`,
180
+ `L ${h} ${y - s * v}`,
181
+ `Q ${h} ${y} ${h + ee * v} ${y}`,
182
+ `L ${p - ee * v} ${y}`,
183
+ `Q ${p} ${y} ${p} ${y + s * v}`,
184
+ `L ${p} ${d}`
185
+ ].join(" "),
186
+ arrowPath: g
187
+ };
188
+ }
189
+ function Pe({ lane: e, spans: t, minExtent: n }) {
190
+ let r = t.filter((t) => t.laneId === e.id).map((t) => ({
191
+ id: t.id,
192
+ track: e.id,
193
+ start: t.start,
194
+ end: Math.max(t.end, t.start + n)
195
+ })), i = [...x(r).entries()].map(([e, t]) => [e, t.lane]), a = Math.max(0, ...i.map(([, e]) => e));
196
+ return {
197
+ entries: i,
198
+ rowCount: r.length === 0 ? 1 : a + 1
199
+ };
200
+ }
201
+ function Fe({ lanes: e, spans: t, minExtent: n }) {
202
+ let r = e.map((e) => Pe({
203
+ lane: e,
204
+ spans: t,
205
+ minExtent: n
206
+ }));
207
+ return {
208
+ rowBySpanId: new Map(r.flatMap((e) => e.entries)),
209
+ rowCountByLane: r.map((e) => e.rowCount)
210
+ };
211
+ }
212
+ // packages/charts/src/timeline/trace-timeline.tsx
213
+ var Ie = 42, Le = 4, Re = 6, I = .5, ze = 4, Be = 10, Ve = 96, He = 3, Ue = 200, We = 80, Ge = .004, Ke = 4, qe = 2, Je = 180, Ye = 340, Xe = 8, L = 64, Ze = 28, Qe = 2, $e = 4, R = {
214
+ k1xSpc: "x1rg5ohu",
215
+ kzqmXN: "xci0xqf",
216
+ kZKoxP: "x1hagigm",
217
+ kaIpWk: "x1cum3z5",
218
+ kmuXW: "x2lah0s",
219
+ $$css: !0
220
+ }, z = {
221
+ kVYP8I: "x1vx5rtw",
222
+ $$css: !0
223
+ }, B = {
224
+ swatch: (e) => [
225
+ R,
226
+ {
227
+ kWkggS: e == null ? e : "xl8spv7",
228
+ $$css: !0
229
+ },
230
+ { "--x-backgroundColor": e ?? void 0 }
231
+ ],
232
+ minimapBox: {
233
+ kVAEAm: "x1n2onr6",
234
+ kB7OPa: "x9f619",
235
+ kMzoRj: "xmkeg23",
236
+ ksu8eU: "x1y0btm7",
237
+ kVAM5u: "x1ey3b81",
238
+ kaIpWk: "x1ok0vyi",
239
+ kWkggS: "x1r7kqkb",
240
+ kVQacm: "xb3r6kr",
241
+ $$css: !0
242
+ },
243
+ minimapFrame: (e, t) => [{
244
+ keTefX: e == null ? e : "x4lel18",
245
+ kzqmXN: t == null ? t : "x5lhr3w",
246
+ $$css: !0
247
+ }, {
248
+ "--x-marginInlineStart": ((e) => typeof e == "number" ? e + "px" : e ?? void 0)(e),
249
+ "--x-width": ((e) => typeof e == "number" ? e + "px" : e ?? void 0)(t)
250
+ }],
251
+ minimapBar: (e) => [
252
+ z,
253
+ {
254
+ kDwRjp: e == null ? e : "x19zyb68",
255
+ $$css: !0
256
+ },
257
+ { "--x-fill": e ?? void 0 }
258
+ ],
259
+ separator: {
260
+ kfzvcC: "x47corl",
261
+ $$css: !0
262
+ },
263
+ linkGroup: {
264
+ kSiTet: "x1iy03kw",
265
+ kfzvcC: "x47corl",
266
+ $$css: !0
267
+ },
268
+ linkGroupReceded: {
269
+ kSiTet: "xvpkmg4",
270
+ $$css: !0
271
+ },
272
+ scrubPill: {
273
+ kVAEAm: "x10l6tqk",
274
+ k3aq6I: "xuuh30",
275
+ kfzvcC: "x47corl",
276
+ kY2c9j: "xhmu9ja",
277
+ kg3NbH: "x14w6jbu",
278
+ kaIpWk: "x1ok0vyi",
279
+ kWkggS: "x1pt885t",
280
+ kMwMTN: "x1ymx3u3",
281
+ kMv6JI: "x1hz01jw",
282
+ kGuDYH: "xy8obcc",
283
+ kLWn49: "xas2l8k",
284
+ kcqcaj: "xss6m8b",
285
+ khDVqt: "xuxw1ft",
286
+ $$css: !0
287
+ },
288
+ scrubPillPos: (e, t) => [{
289
+ kbCHJM: e == null ? e : "xgq9j65",
290
+ k87sOh: t == null ? t : "xjbys53",
291
+ $$css: !0
292
+ }, {
293
+ "--x-left": ((e) => typeof e == "number" ? e + "px" : e ?? void 0)(e),
294
+ "--x-top": ((e) => typeof e == "number" ? e + "px" : e ?? void 0)(t)
295
+ }],
296
+ hoverCard: {
297
+ kVAEAm: "x10l6tqk",
298
+ kB7OPa: "x9f619",
299
+ kfzvcC: "x47corl",
300
+ kY2c9j: "xhmu9ja",
301
+ k1xSpc: "xrvj5dj",
302
+ kOIVth: "xfko13i",
303
+ k8WAf4: "x1hmw7ec",
304
+ kg3NbH: "x5g2kb4",
305
+ kMzoRj: "xmkeg23",
306
+ ksu8eU: "x1y0btm7",
307
+ kVAM5u: "x1ey3b81",
308
+ kaIpWk: "x1ok0vyi",
309
+ kWkggS: "xpvm0e4",
310
+ kGVxlE: "x1ghndwu",
311
+ kMwMTN: "xbixft",
312
+ kMv6JI: "x1hz01jw",
313
+ kGuDYH: "xy8obcc",
314
+ kLWn49: "xas2l8k",
315
+ $$css: !0
316
+ },
317
+ hoverCardAbove: (e, t, n) => [{
318
+ kbCHJM: e == null ? e : "xgq9j65",
319
+ kzqmXN: t == null ? t : "x5lhr3w",
320
+ krVfgx: n == null ? n : "x1nqzi6q",
321
+ $$css: !0
322
+ }, {
323
+ "--x-left": ((e) => typeof e == "number" ? e + "px" : e ?? void 0)(e),
324
+ "--x-width": ((e) => typeof e == "number" ? e + "px" : e ?? void 0)(t),
325
+ "--x-bottom": ((e) => typeof e == "number" ? e + "px" : e ?? void 0)(n)
326
+ }],
327
+ hoverCardBelow: (e, t, n) => [{
328
+ kbCHJM: e == null ? e : "xgq9j65",
329
+ kzqmXN: t == null ? t : "x5lhr3w",
330
+ k87sOh: n == null ? n : "xjbys53",
331
+ $$css: !0
332
+ }, {
333
+ "--x-left": ((e) => typeof e == "number" ? e + "px" : e ?? void 0)(e),
334
+ "--x-width": ((e) => typeof e == "number" ? e + "px" : e ?? void 0)(t),
335
+ "--x-top": ((e) => typeof e == "number" ? e + "px" : e ?? void 0)(n)
336
+ }]
337
+ };
338
+ function et({ mark: e, box: t, linkLabel: n }) {
339
+ let r = Math.min(Ye, Math.max(Je, t.innerWidth)), i = (e.x1 + e.x2) * I - r * I, a = Math.max(t.left, Math.min(Math.max(t.left, t.right - r), i)), o = e.y - 18 * I, s = e.y + 18 * I, c = o >= L, l = Math.min(t.right, t.left + Ze), u = Math.max(l, t.right - Ze), d = Math.max(l, Math.min(u, e.x1)), f = n ?? e.laneLabel, m = e.span.detail !== void 0 && e.span.detail !== "" && e.span.detail !== e.span.label;
340
+ return /* @__PURE__ */ C(me, { children: [/* @__PURE__ */ C("div", {
341
+ "aria-hidden": !0,
342
+ ...b.props(B.hoverCard, c ? B.hoverCardAbove(a, r, t.height - o + Xe) : B.hoverCardBelow(a, r, s + Xe)),
343
+ children: [
344
+ /* @__PURE__ */ C("div", {
345
+ className: "x78zum5 x6s0dn4 x1qughib x1hnptsi xeuugli",
346
+ children: [/* @__PURE__ */ C("span", {
347
+ className: "x78zum5 x6s0dn4 xunmzkg xeuugli x98rzlu x153jb6y",
348
+ children: [/* @__PURE__ */ S("span", { ...b.props(B.swatch(p[e.tone])) }), /* @__PURE__ */ S("span", {
349
+ className: "xeuugli xb3r6kr xlyipyv xuxw1ft",
350
+ children: f
351
+ })]
352
+ }), /* @__PURE__ */ S("span", {
353
+ className: "x153jb6y xss6m8b xuxw1ft x2lah0s",
354
+ children: `${e.duration} · +${e.offset}`
355
+ })]
356
+ }),
357
+ /* @__PURE__ */ S("span", {
358
+ className: "xbixft xk4h15q xb3r6kr xlyipyv xuxw1ft",
359
+ children: e.span.label
360
+ }),
361
+ m && /* @__PURE__ */ S("span", {
362
+ className: "x153jb6y xb3r6kr xlyipyv xuxw1ft",
363
+ children: e.span.detail
364
+ })
365
+ ]
366
+ }), /* @__PURE__ */ S("span", {
367
+ "aria-hidden": !0,
368
+ ...b.props(B.scrubPill, B.scrubPillPos(d, t.bottom + Qe)),
369
+ children: `+${e.offset}`
370
+ })] });
371
+ }
372
+ function tt({ lanes: n, spans: x, links: me, domain: w, categories: T, visibleRange: E, onVisibleRangeChange: ge, onClearSelection: D, offsetFormat: _e, selected: O, onSelectedChange: k, highlightedIds: ve, onActivateSpan: A, spanActions: j, isMinimapVisible: ye = !0, xTitle: be = "Elapsed", ...xe }) {
373
+ let { emptyLabel: Se = "No spans were recorded.", actions: ke, ...N } = xe, { title: P, locale: je } = N, F = ce("regular"), Me = de(), Pe = ie(), Je = v(), [Ye, Xe] = pe(w), [L, Ze] = pe(null), [Qe, R] = pe(!1), z = fe(null);
374
+ if (N.status === "loading") return /* @__PURE__ */ S(h, {
375
+ ...N,
376
+ height: "regular"
377
+ });
378
+ let tt = Ce({
379
+ lanes: n,
380
+ spans: x,
381
+ domain: w
382
+ });
383
+ if (tt !== void 0) return /* @__PURE__ */ S(ee, {
384
+ ...N,
385
+ message: tt
386
+ });
387
+ let V = we(E ?? Ye, w), H = Math.max(w[1] - w[0], 0), U = Math.max(V[1] - V[0], 0), W = H > 0 && U < H * .999;
388
+ function G(e) {
389
+ let t = we(e, w);
390
+ E === void 0 && Xe(t), ge?.(t);
391
+ }
392
+ let nt = new Map((T ?? []).map((e) => [e.id, e])), rt = /* @__PURE__ */ new Map();
393
+ for (let e of x) e.category !== void 0 && rt.set(e.category, (rt.get(e.category) ?? 0) + 1);
394
+ let it = (T ?? []).filter((e) => (rt.get(e.id) ?? 0) > 0), at = it.length > 0, ot = L !== null && it.some((e) => e.id === L) ? L : null, K = {
395
+ ...o({
396
+ width: F.width,
397
+ valueLabels: n.map((e) => e.label),
398
+ hasXTitle: !0,
399
+ hasYTitle: !1
400
+ }),
401
+ top: $e
402
+ }, st = Math.max(1, F.width - K.left - K.right), { rowBySpanId: ct, rowCountByLane: lt } = Fe({
403
+ lanes: n,
404
+ spans: x,
405
+ minExtent: U > 0 ? U / st * 6 : 0
406
+ }), ut = 0;
407
+ for (let e of lt) ut += e;
408
+ let dt = K.top + ut * 26 + n.length * 6 * 2 + K.bottom, q = s({
409
+ width: F.width,
410
+ height: dt,
411
+ margins: K
412
+ }), ft = ue({
413
+ domain: V,
414
+ range: [q.left, q.right]
415
+ }), J = Math.max(1, q.innerWidth), pt = ue({
416
+ domain: w,
417
+ range: [0, J]
418
+ }), Y = [], mt = q.top;
419
+ for (let [e, t] of n.entries()) {
420
+ let n = lt[e] ?? 1, r = n * 26 + 12;
421
+ Y.push({
422
+ lane: t,
423
+ index: e,
424
+ rowCount: n,
425
+ start: mt,
426
+ end: mt + r
427
+ }), mt += r;
428
+ }
429
+ let ht = new Map(Y.map((e) => [e.lane.id, e])), gt = Y.map((e) => ({
430
+ key: e.lane.id,
431
+ position: (e.start + e.end) * I,
432
+ label: e.lane.label
433
+ }));
434
+ function X(e) {
435
+ return re({
436
+ value: e,
437
+ locale: je,
438
+ format: _e
439
+ });
440
+ }
441
+ let _t = Math.max(He, Math.floor(q.innerWidth / Ve)), vt = i(V, _t), yt = (vt.length > 0 ? vt : [V[0]]).map((e) => ({
442
+ key: String(e),
443
+ position: ft.position(e),
444
+ label: X(e - w[0])
445
+ })), bt = ve !== void 0 && ve.length > 0 ? new Set(ve) : null, xt = Ae(O, x, me), Z = bt ?? xt ?? null;
446
+ function St(e, t) {
447
+ if (e.tone !== void 0) return e.tone;
448
+ let r = e.category === void 0 ? void 0 : nt.get(e.category);
449
+ return r === void 0 ? Pe({
450
+ id: e.laneId,
451
+ tone: n[t]?.tone,
452
+ index: t
453
+ }) : r.tone;
454
+ }
455
+ let Q = x.map((e, t) => ({
456
+ span: e,
457
+ index: t
458
+ })).toSorted((e, t) => e.span.start === t.span.start ? e.index - t.index : e.span.start - t.span.start).map((e) => e.span).map((e, t) => {
459
+ let n = ht.get(e.laneId), r = n?.index ?? 0, i = ct.get(e.id) ?? 0, a = (n?.start ?? q.top) + 6 + (i + I) * 26, o = ft.position(e.start), s = Math.max(o + 4, ft.position(e.end)), c = Math.max(q.left, o), l = Math.min(q.right, s), u = s >= q.left - 4 && o <= q.right + 4, d = St(e, r), f = X(e.end - e.start), p = X(e.start - w[0]), m = ot === null || e.category === ot, h = Z === null || Z.has(e.id), g = m && h;
460
+ return {
461
+ span: e,
462
+ rank: t,
463
+ laneIndex: r,
464
+ laneLabel: n?.lane.label ?? e.laneId,
465
+ rawX1: o,
466
+ rawX2: s,
467
+ x1: c,
468
+ x2: l,
469
+ y: a,
470
+ isVisible: u,
471
+ tone: d,
472
+ duration: f,
473
+ offset: p,
474
+ isEmphasized: g
475
+ };
476
+ }), Ct = new Map(Q.map((e) => [e.span.id, e])), wt = Q.map(({ span: e, laneLabel: t, duration: n, offset: r }) => ({
477
+ id: e.id,
478
+ label: [
479
+ t,
480
+ e.label,
481
+ n,
482
+ `at +${r}`,
483
+ e.badge,
484
+ e.detail
485
+ ].filter((e) => e !== void 0 && e !== "").join(" · ")
486
+ })), $ = Q.find((e) => e.span.id === O), Tt = 1 / (n.length * 2 + 1);
487
+ function Et(e) {
488
+ let t = e.x / e.width * q.width, n = e.y / e.height * q.height, r, i = Infinity;
489
+ for (let e of Q) {
490
+ let a = t >= e.x1 - ze && t <= e.x2 + ze, o = Math.abs(n - e.y) <= 26 * I;
491
+ if (e.isVisible && a && o) {
492
+ let a = Math.max(e.x1, Math.min(e.x2, t)), o = Math.hypot(t - a, n - e.y);
493
+ o <= i && (i = o, r = e.span.id);
494
+ }
495
+ }
496
+ return r;
497
+ }
498
+ function Dt(e) {
499
+ if (H <= 0) return;
500
+ let t = e.currentTarget.getBoundingClientRect(), n = e.clientX - t.left, r = Math.max(0, Math.min(1, (n - q.left) / Math.max(1, q.innerWidth)));
501
+ if (e.ctrlKey || e.metaKey || e.shiftKey) {
502
+ e.preventDefault();
503
+ let t = Math.max(-80, Math.min(We, e.deltaY)), n = Math.exp(t * Ge);
504
+ G(Te({
505
+ visible: V,
506
+ domain: w,
507
+ factor: n,
508
+ anchorRatio: r
509
+ }));
510
+ } else if (W && Math.abs(e.deltaX) > Math.abs(e.deltaY)) {
511
+ e.preventDefault();
512
+ let t = e.deltaX / Math.max(1, q.innerWidth) * U;
513
+ G(De({
514
+ visible: V,
515
+ domain: w,
516
+ delta: t
517
+ }));
518
+ }
519
+ }
520
+ function Ot(e) {
521
+ if (e.button !== 0 || e.pointerType === "touch") return;
522
+ let t = e.currentTarget.getBoundingClientRect();
523
+ Et({
524
+ x: e.clientX - t.left,
525
+ y: e.clientY - t.top,
526
+ width: t.width,
527
+ height: t.height
528
+ }) === void 0 ? (z.current = {
529
+ clientX: e.clientX,
530
+ clientY: e.clientY,
531
+ range: W ? V : null,
532
+ hasDragged: !1
533
+ }, W && (R(!0), e.currentTarget.setPointerCapture(e.pointerId))) : z.current = null;
534
+ }
535
+ function kt(e) {
536
+ let t = z.current;
537
+ if (t === null) return;
538
+ let n = e.clientX - t.clientX, r = e.clientY - t.clientY;
539
+ if (!t.hasDragged && Math.hypot(n, r) > Ke && (z.current = {
540
+ ...t,
541
+ hasDragged: !0
542
+ }), t.range === null) return;
543
+ let i = t.range[1] - t.range[0], a = -(n / Math.max(1, q.innerWidth)) * i;
544
+ G(De({
545
+ visible: t.range,
546
+ domain: w,
547
+ delta: a
548
+ }));
549
+ }
550
+ function At() {
551
+ let e = z.current;
552
+ z.current = null, R(!1), e !== null && !e.hasDragged && O != null && D?.();
553
+ }
554
+ function jt() {
555
+ z.current = null, R(!1);
556
+ }
557
+ function Mt(e) {
558
+ switch (e.key) {
559
+ case "+":
560
+ case "=":
561
+ e.preventDefault(), G(M({
562
+ visible: V,
563
+ domain: w,
564
+ direction: "in"
565
+ }));
566
+ break;
567
+ case "-":
568
+ e.preventDefault(), G(M({
569
+ visible: V,
570
+ domain: w,
571
+ direction: "out"
572
+ }));
573
+ break;
574
+ case "0":
575
+ e.preventDefault(), G(w);
576
+ break;
577
+ case "[":
578
+ W && (e.preventDefault(), G(Ee({
579
+ visible: V,
580
+ domain: w,
581
+ direction: "left"
582
+ })));
583
+ break;
584
+ case "]":
585
+ W && (e.preventDefault(), G(Ee({
586
+ visible: V,
587
+ domain: w,
588
+ direction: "right"
589
+ })));
590
+ break;
591
+ case "Escape":
592
+ O != null && D !== void 0 && (e.preventDefault(), D());
593
+ break;
594
+ case "Enter": $ !== void 0 && A !== void 0 && (e.preventDefault(), A($.span));
595
+ }
596
+ }
597
+ let Nt = `${X(V[0] - w[0])} – ${X(V[1] - w[0])}`, Pt = /* @__PURE__ */ C(u, { children: [
598
+ /* @__PURE__ */ S("span", {
599
+ className: "xy8obcc x153jb6y xss6m8b xuxw1ft",
600
+ children: Nt
601
+ }),
602
+ /* @__PURE__ */ S(c, {
603
+ variant: "outline",
604
+ onClick: () => G(M({
605
+ visible: V,
606
+ domain: w,
607
+ direction: "out"
608
+ })),
609
+ disabled: !W,
610
+ "aria-label": "Zoom out",
611
+ children: "−"
612
+ }),
613
+ /* @__PURE__ */ S(c, {
614
+ variant: "outline",
615
+ onClick: () => G(M({
616
+ visible: V,
617
+ domain: w,
618
+ direction: "in"
619
+ })),
620
+ disabled: H <= 0,
621
+ "aria-label": "Zoom in",
622
+ children: "+"
623
+ }),
624
+ $ !== void 0 && /* @__PURE__ */ S(c, {
625
+ variant: "outline",
626
+ onClick: () => G(Oe($.span, w)),
627
+ "aria-label": "Zoom to selected span",
628
+ children: "Fit span"
629
+ }),
630
+ W && /* @__PURE__ */ S(c, {
631
+ variant: "ghost",
632
+ onClick: () => G(w),
633
+ "aria-label": "Reset zoom",
634
+ children: "Reset"
635
+ }),
636
+ ke
637
+ ] }), Ft = $ !== void 0 && j !== void 0 ? j($.span) : [], It = A !== void 0 && Ft.length === 0, Lt = $ === void 0 ? null : /* @__PURE__ */ C("div", {
638
+ role: "region",
639
+ "aria-label": "Selected span actions",
640
+ className: "x78zum5 x1a02dak x6s0dn4 x1qughib x1hnptsi xn9t2bk x1doqdfy x178xt8z xso031l xuxrje7 x1y0btm7 x1ey3b81 x2u8bby xpvm0e4 xbixft xh3r7i3 xeuugli",
641
+ children: [/* @__PURE__ */ C("div", {
642
+ className: "x78zum5 x1a02dak x6s0dn4 x1hnptsi xeuugli xk30mkq",
643
+ children: [
644
+ /* @__PURE__ */ S("span", { ...b.props(B.swatch(p[$.tone])) }),
645
+ /* @__PURE__ */ S("span", {
646
+ title: $.span.label,
647
+ className: "xb3r6kr xlyipyv xuxw1ft xyq1l15",
648
+ children: /* @__PURE__ */ S(l, { children: $.span.label })
649
+ }),
650
+ /* @__PURE__ */ S("span", {
651
+ className: "xy8obcc x153jb6y xss6m8b xuxw1ft",
652
+ children: `${$.duration} (+${$.offset})`
653
+ }),
654
+ $.span.badge !== void 0 && /* @__PURE__ */ S(d, { children: $.span.badge }),
655
+ $.span.detail !== void 0 && /* @__PURE__ */ S("span", {
656
+ title: $.span.detail,
657
+ className: "xy8obcc x153jb6y xb3r6kr xlyipyv xuxw1ft xxc7z9f",
658
+ children: $.span.detail
659
+ })
660
+ ]
661
+ }), /* @__PURE__ */ C(u, { children: [
662
+ Ft.map((e) => e.href === void 0 ? /* @__PURE__ */ S(c, {
663
+ variant: "outline",
664
+ onClick: e.onSelect,
665
+ children: e.label
666
+ }, e.id) : /* @__PURE__ */ S("a", {
667
+ href: e.href,
668
+ target: e.isExternal === !0 ? "_blank" : void 0,
669
+ rel: e.isExternal === !0 ? "noreferrer" : void 0,
670
+ className: "x3nfvp2 x6s0dn4 xunmzkg x1fgtraw x5g2kb4 x1ok0vyi xmkeg23 x1y0btm7 x1ey3b81 xpvm0e4 xbixft x1hz01jw xy8obcc x1hl2dhg x1ypdohk x1mkwuse",
671
+ children: e.label
672
+ }, e.id)),
673
+ It && /* @__PURE__ */ S(c, {
674
+ variant: "solid",
675
+ onClick: () => A($.span),
676
+ children: "Inspect span"
677
+ }),
678
+ D !== void 0 && /* @__PURE__ */ C(c, {
679
+ variant: "ghost",
680
+ density: "compact",
681
+ onClick: D,
682
+ "aria-label": "Clear selection",
683
+ children: [/* @__PURE__ */ S(he, {
684
+ size: 14,
685
+ "aria-hidden": !0
686
+ }), "Clear"]
687
+ })
688
+ ] })]
689
+ }), Rt = H > 0 ? H / Ue : 1;
690
+ return /* @__PURE__ */ S(t, {
691
+ ...Je,
692
+ items: wt,
693
+ place: (e) => {
694
+ let t = Q.find((t) => t.span.id === e), n = t?.rank ?? 0, r = (t?.laneIndex ?? 0) * Tt;
695
+ return t === void 0 ? void 0 : {
696
+ left: n,
697
+ right: n,
698
+ top: r,
699
+ bottom: r
700
+ };
701
+ },
702
+ locate: Et,
703
+ selected: O ?? null,
704
+ onSelect: k === void 0 && D === void 0 ? void 0 : (e, t) => {
705
+ let n = t.event instanceof MouseEvent && t.event.detail >= 2;
706
+ e === O && !n && D !== void 0 ? D() : k?.(e, t);
707
+ },
708
+ render: (t, { inspected: i, cursor: o }) => {
709
+ let s = Q.find((e) => e.span.id === o), c = i === null ? void 0 : Ct.get(i), l = c !== void 0 && c.isVisible;
710
+ return /* @__PURE__ */ S(_, {
711
+ ...N,
712
+ actions: Pt,
713
+ figure: t,
714
+ footer: x.length === 0 ? void 0 : /* @__PURE__ */ S(r, {
715
+ id: Me,
716
+ children: e(wt, i)
717
+ }),
718
+ children: x.length === 0 ? /* @__PURE__ */ S(te, { children: Se }) : /* @__PURE__ */ C("div", {
719
+ className: "xrvj5dj xunmzkg xeuugli",
720
+ children: [
721
+ at && /* @__PURE__ */ S(f, {
722
+ label: "Filter by span category",
723
+ allLabel: "All",
724
+ value: ot,
725
+ onValueChange: Ze,
726
+ options: it.map((e) => ({
727
+ id: e.id,
728
+ label: e.label,
729
+ color: p[e.tone],
730
+ count: rt.get(e.id) ?? 0
731
+ }))
732
+ }),
733
+ ye && H > 0 && /* @__PURE__ */ S("div", {
734
+ ...b.props(B.minimapBox, B.minimapFrame(q.left, J)),
735
+ children: /* @__PURE__ */ S(y, {
736
+ value: W ? V : null,
737
+ onValueChange: (e) => G(e ?? w),
738
+ min: w[0],
739
+ max: w[1],
740
+ step: Rt,
741
+ describe: (e) => `${X(e[0] - w[0])} to ${X(e[1] - w[0])}`,
742
+ label: `${P} zoom minimap`,
743
+ left: 0,
744
+ width: J,
745
+ height: Ie,
746
+ children: /* @__PURE__ */ S("svg", {
747
+ "aria-hidden": !0,
748
+ width: J,
749
+ height: Ie,
750
+ viewBox: `0 0 ${J} ${Ie}`,
751
+ className: "x1lliihq xh8yej3 x5kalc8 x87ps6o",
752
+ children: Q.map((e) => {
753
+ let t = pt.position(e.span.start), r = Math.max(t + 2, pt.position(e.span.end)), i = Re + (n.length > 1 ? e.laneIndex / (n.length - 1) : I) * 26;
754
+ return /* @__PURE__ */ S("rect", {
755
+ x: t,
756
+ y: i,
757
+ width: Math.max(2, r - t),
758
+ height: Le,
759
+ rx: qe,
760
+ ...b.props(B.minimapBar(p[e.tone]))
761
+ }, `mini-${e.span.id}`);
762
+ })
763
+ })
764
+ })
765
+ }),
766
+ /* @__PURE__ */ S("div", {
767
+ onWheel: Dt,
768
+ onPointerDown: Ot,
769
+ onPointerMove: kt,
770
+ onPointerUp: At,
771
+ onPointerCancel: jt,
772
+ onKeyDown: Mt,
773
+ onDoubleClick: () => {
774
+ $ !== void 0 && A !== void 0 && A($.span);
775
+ },
776
+ ...{
777
+ 0: { className: "x1n2onr6 xeuugli x1t137rt" },
778
+ 2: { className: "x1n2onr6 xeuugli x1t137rt x1jm3nie" },
779
+ 1: { className: "x1n2onr6 xeuugli x1t137rt xi9pz9s x87ps6o" },
780
+ 3: { className: "x1n2onr6 xeuugli x1t137rt xi9pz9s x87ps6o" }
781
+ }[!!W << 1 | !!Qe],
782
+ children: /* @__PURE__ */ C(se, {
783
+ plotRef: F.ref,
784
+ box: q,
785
+ label: a({
786
+ title: P,
787
+ marks: "spans",
788
+ isSelectable: k !== void 0
789
+ }),
790
+ readoutId: Me,
791
+ overlay: l ? /* @__PURE__ */ S(et, {
792
+ mark: c,
793
+ box: q
794
+ }) : void 0,
795
+ children: [
796
+ Y.map((e, t) => t % 2 == 1 ? /* @__PURE__ */ S("rect", {
797
+ x: q.left,
798
+ y: e.start,
799
+ width: q.innerWidth,
800
+ height: e.end - e.start,
801
+ className: "x2wnxhi x6b6j1m x47corl"
802
+ }, `band-${e.lane.id}`) : null),
803
+ /* @__PURE__ */ S(ae, {
804
+ box: q,
805
+ xTicks: yt,
806
+ yTicks: gt,
807
+ xTitle: be,
808
+ grid: "x"
809
+ }),
810
+ Y.slice(1).map((e) => /* @__PURE__ */ S("line", {
811
+ x1: q.left,
812
+ x2: q.right,
813
+ y1: e.start,
814
+ y2: e.start,
815
+ ...b.props(ne.grid, B.separator)
816
+ }, e.lane.id)),
817
+ /* @__PURE__ */ C(le, {
818
+ box: q,
819
+ children: [
820
+ Y.map((e) => Array.from({ length: e.rowCount }, (t, n) => /* @__PURE__ */ S("rect", {
821
+ x: q.left,
822
+ y: e.start + 6 + n * 26 + 8 * I,
823
+ width: q.innerWidth,
824
+ height: 18,
825
+ rx: qe,
826
+ className: "xzmcrz1 xbd1tli x47corl"
827
+ }, `track-${e.lane.id}-${n}`))),
828
+ Q.map((e) => {
829
+ if (!e.isVisible) return null;
830
+ let t = Math.max(4, e.x2 - e.x1);
831
+ return /* @__PURE__ */ S(oe, {
832
+ mark: e.span.id,
833
+ x: e.x1,
834
+ y: e.y - 18 * I,
835
+ width: t,
836
+ height: 18,
837
+ rx: qe,
838
+ tone: e.tone,
839
+ emphasis: e.isEmphasized ? "normal" : "receded",
840
+ isInspected: i === e.span.id,
841
+ isSelected: O === e.span.id
842
+ }, e.span.id);
843
+ }),
844
+ (me ?? []).map((e) => {
845
+ let t = Ct.get(e.fromSpanId), n = Ct.get(e.toSpanId);
846
+ if (t === void 0 || n === void 0) return null;
847
+ let r = Math.min(t.rawX1, n.rawX1);
848
+ if (Math.max(t.rawX2, n.rawX2) < q.left - 4 || r > q.right + 4) return null;
849
+ let i = Ne({
850
+ from: {
851
+ x1: t.rawX1,
852
+ x2: t.rawX2,
853
+ y: t.y
854
+ },
855
+ to: {
856
+ x1: n.rawX1,
857
+ x2: n.rawX2,
858
+ y: n.y
859
+ }
860
+ }), a = p[e.tone ?? "positive"], o = Z === null ? t.isEmphasized || n.isEmphasized : Z.has(e.fromSpanId) || Z.has(e.toSpanId);
861
+ return /* @__PURE__ */ C("g", {
862
+ ...b.props(ne.emphasis, B.linkGroup, !o && B.linkGroupReceded),
863
+ children: [
864
+ e.label !== void 0 && e.label.length > 0 && /* @__PURE__ */ S("title", { children: e.label }),
865
+ /* @__PURE__ */ S("path", {
866
+ d: i.path,
867
+ stroke: a,
868
+ className: "xbh8q5q xhr4kjn x1owpc8m x1f6yumg x13efnbd"
869
+ }),
870
+ /* @__PURE__ */ S("path", {
871
+ d: i.arrowPath,
872
+ fill: a,
873
+ className: "xeutv01"
874
+ })
875
+ ]
876
+ }, e.id);
877
+ })
878
+ ]
879
+ }),
880
+ l && /* @__PURE__ */ S("line", {
881
+ x1: c.x1,
882
+ x2: c.x1,
883
+ y1: q.top,
884
+ y2: q.bottom,
885
+ className: "xhq4mlf x17ub4bw xnpr05h x47corl x13efnbd"
886
+ }),
887
+ s !== void 0 && s.isVisible && /* @__PURE__ */ S(m, {
888
+ x: (s.x1 + s.x2) * I,
889
+ top: q.top,
890
+ bottom: q.bottom,
891
+ width: Be
892
+ })
893
+ ]
894
+ })
895
+ }),
896
+ Lt,
897
+ /* @__PURE__ */ S(g, {
898
+ label: `${P} spans`,
899
+ columns: [{
900
+ id: "span",
901
+ label: "Span"
902
+ }],
903
+ rows: wt.map((e) => ({
904
+ id: e.id,
905
+ values: [e.label]
906
+ }))
907
+ })
908
+ ]
909
+ })
910
+ });
911
+ }
912
+ });
913
+ }
914
+ export { w as n, tt as t };