@flesler/cursor-canvas-web 1.5.0 → 1.5.2

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.
@@ -1,25 +1,25 @@
1
- import { useCallback as W, useState as E, Suspense as ve, lazy as be, createContext as ae, useContext as G } from "react";
2
- import { useEffect as nn, useMemo as rn, useRef as on, useState as an } from "react";
3
- import { jsx as i, jsxs as y } from "react/jsx-runtime";
4
- import { BarChart as Se, AreaChart as ke, LineChart as Ce, ChartLegend as we, PieChart as Le } from "@mantine/charts";
5
- import { useComputedColorScheme as Te, Button as Pe, ActionIcon as Ae, Card as Me, Alert as Be, Badge as $e, Text as H, Checkbox as De, Select as Ee, Textarea as Ie, TextInput as Fe, Switch as Ne, Divider as Re, Group as _e, Stack as ze, Table as T, Title as O } from "@mantine/core";
6
- import { r as He, u as ne } from "./host-tokens-Bt6GPXN1.js";
7
- import { c as ln, a as cn, b as dn, d as un, e as fn, f as hn, g as pn, h as yn, i as gn } from "./host-tokens-Bt6GPXN1.js";
8
- function gt(t, e) {
9
- const n = `canvas:${t}`, [r, o] = E(() => {
10
- if (typeof localStorage > "u") return e;
1
+ import { useCallback as O, useState as I, Suspense as be, lazy as Se, createContext as ae, useContext as W } from "react";
2
+ import { useEffect as on, useMemo as an, useRef as sn, useState as ln } from "react";
3
+ import { jsx as i, jsxs as g } from "react/jsx-runtime";
4
+ import { BarChart as Ce, AreaChart as ke, LineChart as we, ChartLegend as Le, PieChart as Te } from "@mantine/charts";
5
+ import { useComputedColorScheme as Pe, Button as Ae, ActionIcon as Me, Card as Be, Alert as $e, Badge as De, Text as z, Checkbox as Ie, Select as Ee, Textarea as _e, TextInput as Fe, Switch as Re, Divider as Ne, Group as He, Stack as ze, Table as T, Title as G } from "@mantine/core";
6
+ import { r as Oe, u as ne } from "./host-tokens-Bt6GPXN1.js";
7
+ import { c as dn, a as un, b as fn, d as hn, e as pn, f as gn, g as yn, h as mn, i as xn } from "./host-tokens-Bt6GPXN1.js";
8
+ function xt(e, t) {
9
+ const n = `canvas:${e}`, [r, o] = I(() => {
11
10
  try {
12
- const c = localStorage.getItem(n);
13
- return c === null ? e : JSON.parse(c);
11
+ const f = localStorage.getItem(n);
12
+ if (f !== null) return JSON.parse(f);
14
13
  } catch {
15
- return e;
16
14
  }
17
- }), a = W(
15
+ const c = We(e);
16
+ return c !== void 0 ? c : t;
17
+ }), a = O(
18
18
  (c) => {
19
19
  o((f) => {
20
20
  const d = typeof c == "function" ? c(f) : c;
21
21
  try {
22
- localStorage == null || localStorage.setItem(n, JSON.stringify(d));
22
+ localStorage.setItem(n, JSON.stringify(d));
23
23
  } catch {
24
24
  }
25
25
  return d;
@@ -29,14 +29,22 @@ function gt(t, e) {
29
29
  );
30
30
  return [r, a];
31
31
  }
32
- function mt() {
33
- return W((t) => {
32
+ function vt() {
33
+ return O((e) => {
34
34
  }, []);
35
35
  }
36
- function xt(t, e) {
37
- return { ...t, ...e };
36
+ function bt(e, t) {
37
+ return { ...e, ...t };
38
38
  }
39
- const C = {
39
+ function We(e) {
40
+ try {
41
+ const t = globalThis.__canvasJsonState;
42
+ return !t || !Object.hasOwn(t, e) ? void 0 : t[e];
43
+ } catch {
44
+ return;
45
+ }
46
+ }
47
+ const k = {
40
48
  success: "#1F8A65",
41
49
  danger: "#CF2D56",
42
50
  warning: "#E8A33D",
@@ -55,90 +63,93 @@ const C = {
55
63
  deleted: "red",
56
64
  renamed: "indigo"
57
65
  };
58
- function g() {
59
- const e = Te("light") === "dark" ? "dark" : "light";
60
- return He(e);
66
+ function y() {
67
+ const t = Pe("light") === "dark" ? "dark" : "light";
68
+ return Oe(t);
61
69
  }
62
70
  const se = {
63
71
  verticalAlign: "bottom",
64
- align: "center"
72
+ align: "center",
73
+ itemSorter: null
65
74
  }, le = {
75
+ itemSorter: null
76
+ }, ce = {
66
77
  legend: { justifyContent: "center" }
67
78
  };
68
79
  function j() {
69
- const e = g().chart.sequence;
70
- return (n, r) => n ? C[n] : e[r % e.length];
80
+ const t = y().chart.sequence;
81
+ return (n, r) => n ? k[n] : t[r % t.length];
71
82
  }
72
- function ce() {
73
- const e = g().text.primary;
74
- return { textColor: e, barLabelColor: e };
83
+ function de() {
84
+ const t = y().text.primary;
85
+ return { textColor: t, barLabelColor: t };
75
86
  }
76
- function de(t, e) {
77
- return t.map((n, r) => {
87
+ function ue(e, t) {
88
+ return e.map((n, r) => {
78
89
  const o = { category: n };
79
- for (const a of e)
90
+ for (const a of t)
80
91
  o[a.name] = a.data[r] ?? 0;
81
92
  return o;
82
93
  });
83
94
  }
84
- function ue(t, e) {
85
- return t.map((n, r) => ({
95
+ function fe(e, t) {
96
+ return e.map((n, r) => ({
86
97
  name: n.name,
87
- color: e(n.tone, r)
98
+ color: t(n.tone, r)
88
99
  }));
89
100
  }
90
- function fe(t, e) {
91
- return (n) => `${e ?? ""}${n}${t ?? ""}`;
101
+ function he(e, t) {
102
+ return (n) => `${t ?? ""}${n}${e ?? ""}`;
92
103
  }
93
- function We(t, e) {
94
- if (t != null && t.length)
95
- return t.map((n) => ({
96
- ...e ? { x: n.value } : { y: n.value },
104
+ function Ge(e, t) {
105
+ if (e != null && e.length)
106
+ return e.map((n) => ({
107
+ ...t ? { x: n.value } : { y: n.value },
97
108
  label: n.label,
98
- color: n.tone ? C[n.tone] : C.neutral
109
+ color: n.tone ? k[n.tone] : k.neutral
99
110
  }));
100
111
  }
101
- const Ge = /* @__PURE__ */ new Set(["log", "symlog", "pow", "sqrt"]);
102
- function Oe(t) {
103
- const { scale: e } = t;
104
- return typeof e != "string" || !Ge.has(e) ? t : {
105
- ...t,
106
- type: t.type ?? "number",
107
- allowDataOverflow: t.allowDataOverflow ?? !0,
108
- allowDecimals: t.allowDecimals ?? !0,
109
- domain: t.domain ?? [1, "dataMax"]
112
+ const je = /* @__PURE__ */ new Set(["log", "symlog", "pow", "sqrt"]);
113
+ function Ve(e) {
114
+ const { scale: t } = e;
115
+ return typeof t != "string" || !je.has(t) ? e : {
116
+ ...e,
117
+ type: e.type ?? "number",
118
+ allowDataOverflow: e.allowDataOverflow ?? !0,
119
+ allowDecimals: e.allowDecimals ?? !0,
120
+ domain: e.domain ?? [1, "dataMax"]
110
121
  };
111
122
  }
112
- function he(t) {
113
- const e = We(t.referenceLines, !!t.horizontal);
123
+ function pe(e) {
124
+ const t = Ge(e.referenceLines, !!e.horizontal);
114
125
  let n;
115
- if (!t.stacked && !t.normalized) {
116
- const a = t.beginAtZero !== !1;
117
- n = [t.yMin ?? (a ? 0 : "auto"), t.yMax ?? "auto"];
126
+ if (!e.stacked && !e.normalized) {
127
+ const a = e.beginAtZero !== !1;
128
+ n = [e.yMin ?? (a ? 0 : "auto"), e.yMax ?? "auto"];
118
129
  }
119
- const r = t.valueAxis ? Oe(t.valueAxis) : void 0;
130
+ const r = e.valueAxis ? Ve(e.valueAxis) : void 0;
120
131
  if (!n && !r)
121
- return { referenceLines: e };
132
+ return { referenceLines: t };
122
133
  const o = { ...n && { domain: n }, ...r };
123
- return t.horizontal ? { xAxisProps: o, referenceLines: e } : { yAxisProps: o, referenceLines: e };
134
+ return e.horizontal ? { xAxisProps: o, referenceLines: t } : { yAxisProps: o, referenceLines: t };
124
135
  }
125
- function je(t, e, n) {
126
- return t !== void 0 ? t : e.length === 1 && n.length <= 8;
136
+ function Ke(e, t, n) {
137
+ return e !== void 0 ? e : t.length === 1 && n.length <= 8;
127
138
  }
128
- function Ke(t, e, n) {
129
- return e.length !== 1 || e[0].tone ? t : t.map((r, o) => ({
139
+ function Xe(e, t, n) {
140
+ return t.length !== 1 || t[0].tone ? e : e.map((r, o) => ({
130
141
  ...r,
131
142
  color: n(void 0, o)
132
143
  }));
133
144
  }
134
- const Ve = 96, Xe = 6.5;
135
- function Ye(t, e) {
136
- return t.length <= e ? t : `${t.slice(0, Math.max(0, e - 1))}…`;
145
+ const Ye = 96, qe = 6.5;
146
+ function Je(e, t) {
147
+ return e.length <= t ? e : `${e.slice(0, Math.max(0, t - 1))}…`;
137
148
  }
138
- function qe(t, e) {
149
+ function Ze(e, t) {
139
150
  var c;
140
- const n = typeof e.x == "number" ? e.x : Number(e.x) || 0, r = typeof e.y == "number" ? e.y : Number(e.y) || 0, o = String(((c = e.payload) == null ? void 0 : c.value) ?? ""), a = Ye(o, t);
141
- return /* @__PURE__ */ i("g", { transform: `translate(${n},${r})`, children: /* @__PURE__ */ y(
151
+ const n = typeof t.x == "number" ? t.x : Number(t.x) || 0, r = typeof t.y == "number" ? t.y : Number(t.y) || 0, o = String(((c = t.payload) == null ? void 0 : c.value) ?? ""), a = Je(o, e);
152
+ return /* @__PURE__ */ i("g", { transform: `translate(${n},${r})`, children: /* @__PURE__ */ g(
142
153
  "text",
143
154
  {
144
155
  x: -10,
@@ -154,41 +165,41 @@ function qe(t, e) {
154
165
  }
155
166
  ) });
156
167
  }
157
- function pe(t) {
168
+ function ge(e) {
158
169
  return {
159
170
  fontWeight: 700,
160
- fill: t
171
+ fill: e
161
172
  };
162
173
  }
163
- function Ze(t) {
174
+ function Ue(e) {
164
175
  return {
165
- ...pe(t),
176
+ ...ge(e),
166
177
  position: "right"
167
178
  };
168
179
  }
169
- function Je(t = Ve, e = !1) {
170
- const n = Math.floor(t / Xe);
180
+ function Qe(e = Ye, t = !1) {
181
+ const n = Math.floor(e / qe);
171
182
  return {
172
183
  yAxisProps: {
173
- tick: (r) => qe(n, r),
174
- width: t
184
+ tick: (r) => Ze(n, r),
185
+ width: e
175
186
  },
176
187
  barChartProps: {
177
- margin: { right: e ? 48 : 32 }
188
+ margin: { right: t ? 48 : 32 }
178
189
  },
179
190
  gridAxis: "y"
180
191
  };
181
192
  }
182
- function Ue() {
193
+ function et() {
183
194
  return {
184
195
  barChartProps: {
185
196
  margin: { top: 22 }
186
197
  }
187
198
  };
188
199
  }
189
- function vt({
190
- categories: t,
191
- series: e,
200
+ function St({
201
+ categories: e,
202
+ series: t,
192
203
  height: n = 240,
193
204
  stacked: r,
194
205
  horizontal: o,
@@ -204,11 +215,11 @@ function vt({
204
215
  extra: b
205
216
  }) {
206
217
  var A;
207
- const w = j(), L = ce(), P = Ke(
208
- de(t, e),
209
- e,
218
+ const w = j(), L = de(), P = Xe(
219
+ ue(e, t),
220
+ t,
210
221
  w
211
- ), B = a ? "percent" : r ? "stacked" : "default", D = he({
222
+ ), B = a ? "percent" : r ? "stacked" : "default", D = pe({
212
223
  beginAtZero: l,
213
224
  yMin: u,
214
225
  yMax: m,
@@ -217,26 +228,27 @@ function vt({
217
228
  stacked: r,
218
229
  normalized: a,
219
230
  valueAxis: b == null ? void 0 : b.valueAxis
220
- }), S = !r && !a && je(d, e, t);
231
+ }), S = !r && !a && Ke(d, t, e);
221
232
  return /* @__PURE__ */ i(
222
- Se,
233
+ Ce,
223
234
  {
224
235
  h: n,
225
236
  data: P,
226
237
  dataKey: "category",
227
- series: ue(e, w),
238
+ series: fe(t, w),
228
239
  type: B,
229
240
  orientation: o ? "vertical" : "horizontal",
230
- withLegend: e.length > 1,
241
+ withLegend: t.length > 1,
231
242
  legendProps: se,
232
- valueFormatter: fe(c, f),
243
+ tooltipProps: le,
244
+ valueFormatter: he(c, f),
233
245
  withBarValueLabel: S,
234
246
  ...S ? {
235
- valueLabelProps: o ? Ze(L.barLabelColor) : pe(L.barLabelColor)
247
+ valueLabelProps: o ? Ue(L.barLabelColor) : ge(L.barLabelColor)
236
248
  } : {},
237
- ...o ? Je((A = b == null ? void 0 : b.categoryAxis) == null ? void 0 : A.width, S) : S ? Ue() : {},
249
+ ...o ? Qe((A = b == null ? void 0 : b.categoryAxis) == null ? void 0 : A.width, S) : S ? et() : {},
238
250
  styles: {
239
- ...le,
251
+ ...ce,
240
252
  legendItemName: { color: L.textColor }
241
253
  },
242
254
  ...D,
@@ -244,9 +256,9 @@ function vt({
244
256
  }
245
257
  );
246
258
  }
247
- function bt({
248
- categories: t,
249
- series: e,
259
+ function Ct({
260
+ categories: e,
261
+ series: t,
250
262
  height: n = 240,
251
263
  fill: r,
252
264
  valueSuffix: o,
@@ -261,7 +273,7 @@ function bt({
261
273
  extra: h,
262
274
  smooth: b
263
275
  }) {
264
- const w = (h == null ? void 0 : h.smooth) ?? b, L = j(), P = ce(), B = de(t, e), D = ue(e, L), S = !!(r && (h != null && h.stacked)), A = he({
276
+ const w = (h == null ? void 0 : h.smooth) ?? b, L = j(), P = de(), B = ue(e, t), D = fe(t, L), S = !!(r && (h != null && h.stacked)), A = pe({
265
277
  beginAtZero: d,
266
278
  yMin: l,
267
279
  yMax: u,
@@ -275,73 +287,76 @@ function bt({
275
287
  dataKey: "category",
276
288
  series: D,
277
289
  curveType: w ? "monotone" : "linear",
278
- withLegend: e.length > 1,
290
+ withLegend: t.length > 1,
279
291
  legendProps: se,
280
- valueFormatter: fe(o, a),
281
- withPointLabels: c ?? t.length <= 20,
282
- tooltipProps: f ? void 0 : { cursor: !1 },
283
- styles: {
292
+ valueFormatter: he(o, a),
293
+ withPointLabels: c ?? e.length <= 20,
294
+ tooltipProps: {
284
295
  ...le,
296
+ ...!f && { cursor: !1 }
297
+ },
298
+ styles: {
299
+ ...ce,
285
300
  legendItemName: { color: P.textColor }
286
301
  },
287
302
  ...A,
288
303
  style: v
289
304
  };
290
- return r ? /* @__PURE__ */ i(ke, { ...M, type: S ? "stacked" : "default" }) : /* @__PURE__ */ i(Ce, { ...M });
305
+ return r ? /* @__PURE__ */ i(ke, { ...M, type: S ? "stacked" : "default" }) : /* @__PURE__ */ i(we, { ...M });
291
306
  }
292
- const Qe = be(
293
- () => import("./pie-donut-qRBFP0tT.js").then((t) => ({ default: t.PieDonutChart }))
294
- ), et = 180, tt = 540;
295
- function nt(t, e) {
296
- if (e <= 0)
307
+ const tt = Se(
308
+ () => import("./pie-donut-qRBFP0tT.js").then((e) => ({ default: e.PieDonutChart }))
309
+ ), nt = 180, rt = 540;
310
+ function ot(e, t) {
311
+ if (t <= 0)
297
312
  return "0%";
298
- const n = t / e * 100;
313
+ const n = e / t * 100;
299
314
  return n < 10 && Math.abs(n - Math.round(n)) > 0.05 ? `${n.toFixed(1)}%` : `${Math.round(n)}%`;
300
315
  }
301
- function rt(t) {
302
- return t.map((e) => ({
303
- dataKey: e.name,
304
- value: e.name,
305
- color: e.color,
316
+ function at(e) {
317
+ return e.map((t) => ({
318
+ dataKey: t.name,
319
+ value: t.name,
320
+ color: t.color,
306
321
  type: "circle"
307
322
  }));
308
323
  }
309
- function ot(t, e) {
310
- return t.map((n) => ({
324
+ function it(e, t) {
325
+ return e.map((n) => ({
311
326
  name: n.name,
312
327
  color: n.color,
313
- label: `${n.name} ${nt(n.value, e)}`
328
+ label: `${n.name} ${ot(n.value, t)}`
314
329
  }));
315
330
  }
316
- function St({ data: t, size: e = 200, donut: n, style: r }) {
317
- const [o, a] = E(null), c = g(), f = j(), d = t.map((h, b) => ({
331
+ function kt({ data: e, size: t = 200, donut: n, style: r }) {
332
+ const [o, a] = I(null), c = y(), f = j(), d = e.map((h, b) => ({
318
333
  name: h.label,
319
334
  value: h.value,
320
335
  color: f(h.tone, b)
321
336
  })), l = d.reduce((h, b) => h + b.value, 0), u = {
322
- startAngle: et,
323
- endAngle: tt
337
+ startAngle: nt,
338
+ endAngle: rt
324
339
  }, m = (h) => ({
325
340
  opacity: o === null || o === h ? 1 : 0.35
326
- }), v = n ? /* @__PURE__ */ i(ve, { fallback: null, children: /* @__PURE__ */ i(
327
- Qe,
341
+ }), v = n ? /* @__PURE__ */ i(be, { fallback: null, children: /* @__PURE__ */ i(
342
+ tt,
328
343
  {
329
344
  data: d,
330
- size: e,
345
+ size: t,
331
346
  highlighted: o
332
347
  }
333
348
  ) }) : /* @__PURE__ */ i(
334
- Le,
349
+ Te,
335
350
  {
336
351
  data: d,
337
- size: e,
352
+ size: t,
338
353
  withTooltip: !0,
339
354
  withLabelsLine: !1,
340
355
  cellProps: (h) => m(h.name),
341
356
  ...u
342
357
  }
343
358
  );
344
- return /* @__PURE__ */ y(
359
+ return /* @__PURE__ */ g(
345
360
  "div",
346
361
  {
347
362
  style: {
@@ -357,8 +372,8 @@ function St({ data: t, size: e = 200, donut: n, style: r }) {
357
372
  {
358
373
  style: {
359
374
  width: "100%",
360
- height: e,
361
- minHeight: e,
375
+ height: t,
376
+ minHeight: t,
362
377
  display: "flex",
363
378
  alignItems: "center",
364
379
  justifyContent: "center"
@@ -367,10 +382,10 @@ function St({ data: t, size: e = 200, donut: n, style: r }) {
367
382
  }
368
383
  ),
369
384
  /* @__PURE__ */ i(
370
- we,
385
+ Le,
371
386
  {
372
- payload: rt(d),
373
- series: ot(d, l),
387
+ payload: at(d),
388
+ series: it(d, l),
374
389
  legendPosition: "bottom",
375
390
  centered: !0,
376
391
  onHighlight: a,
@@ -392,9 +407,9 @@ function St({ data: t, size: e = 200, donut: n, style: r }) {
392
407
  }
393
408
  );
394
409
  }
395
- function kt(t) {
410
+ function wt(e) {
396
411
  const {
397
- nodes: e,
412
+ nodes: t,
398
413
  edges: n,
399
414
  direction: r = "vertical",
400
415
  nodeWidth: o = 160,
@@ -402,7 +417,7 @@ function kt(t) {
402
417
  rankGap: c = 64,
403
418
  nodeGap: f = 48,
404
419
  padding: d = 24
405
- } = t, l = e.map((s) => s.id), u = new Set(l), m = /* @__PURE__ */ new Map();
420
+ } = e, l = t.map((s) => s.id), u = new Set(l), m = /* @__PURE__ */ new Map();
406
421
  for (const s of l) m.set(s, []);
407
422
  for (const s of n)
408
423
  u.has(s.from) && u.has(s.to) && m.get(s.from).push(s.to);
@@ -431,32 +446,32 @@ function kt(t) {
431
446
  const p = M.get(s);
432
447
  $.has(p) || $.set(p, []), $.get(p).push(s);
433
448
  }
434
- const I = [...$.keys()].sort((s, p) => s - p), k = r === "vertical", X = (s) => s * (k ? o : a) + Math.max(0, s - 1) * f, Y = Math.max(
449
+ const E = [...$.keys()].sort((s, p) => s - p), C = r === "vertical", X = (s) => s * (C ? o : a) + Math.max(0, s - 1) * f, Y = Math.max(
435
450
  0,
436
- ...I.map((s) => X($.get(s).length))
437
- ), F = /* @__PURE__ */ new Map(), q = [];
438
- I.forEach((s, p) => {
439
- const x = $.get(s), _ = X(x.length), z = d + (Y - _) / 2, N = d + p * ((k ? a : o) + c);
451
+ ...E.map((s) => X($.get(s).length))
452
+ ), _ = /* @__PURE__ */ new Map(), q = [];
453
+ E.forEach((s, p) => {
454
+ const x = $.get(s), N = X(x.length), H = d + (Y - N) / 2, F = d + p * ((C ? a : o) + c);
440
455
  x.forEach((Q, ee) => {
441
- const te = z + ee * ((k ? o : a) + f), me = k ? te : N, xe = k ? N : te;
442
- F.set(Q, { id: Q, x: me, y: xe, rank: s, order: ee });
456
+ const te = H + ee * ((C ? o : a) + f), xe = C ? te : F, ve = C ? F : te;
457
+ _.set(Q, { id: Q, x: xe, y: ve, rank: s, order: ee });
443
458
  }), q.push({
444
459
  rank: s,
445
- x: k ? z : N,
446
- y: k ? N : z,
447
- width: k ? _ : o,
448
- height: k ? a : _,
460
+ x: C ? H : F,
461
+ y: C ? F : H,
462
+ width: C ? N : o,
463
+ height: C ? a : N,
449
464
  nodeIds: x
450
465
  });
451
466
  });
452
- const Z = (s, p) => s ? k ? {
467
+ const J = (s, p) => s ? C ? {
453
468
  x: s.x + o / 2,
454
469
  y: p === "source" ? s.y + a : s.y
455
470
  } : {
456
471
  x: p === "source" ? s.x + o : s.x,
457
472
  y: s.y + a / 2
458
- } : { x: 0, y: 0 }, ge = n.filter((s) => u.has(s.from) && u.has(s.to)).map((s) => {
459
- const p = Z(F.get(s.from), "source"), x = Z(F.get(s.to), "target");
473
+ } : { x: 0, y: 0 }, me = n.filter((s) => u.has(s.from) && u.has(s.to)).map((s) => {
474
+ const p = J(_.get(s.from), "source"), x = J(_.get(s.to), "target");
460
475
  return {
461
476
  from: s.from,
462
477
  to: s.to,
@@ -466,22 +481,22 @@ function kt(t) {
466
481
  targetY: x.y,
467
482
  isBackEdge: L.has(P(s.from, s.to))
468
483
  };
469
- }), J = d * 2 + I.length * (k ? a : o) + Math.max(0, I.length - 1) * c, U = d * 2 + Y;
484
+ }), Z = d * 2 + E.length * (C ? a : o) + Math.max(0, E.length - 1) * c, U = d * 2 + Y;
470
485
  return {
471
- nodes: [...F.values()],
472
- edges: ge,
486
+ nodes: [..._.values()],
487
+ edges: me,
473
488
  ranks: q,
474
489
  direction: r,
475
- width: k ? U : J,
476
- height: k ? J : U
490
+ width: C ? U : Z,
491
+ height: C ? Z : U
477
492
  };
478
493
  }
479
- function Ct({
480
- additions: t = 0,
481
- deletions: e = 0,
494
+ function Lt({
495
+ additions: e = 0,
496
+ deletions: t = 0,
482
497
  style: n
483
498
  }) {
484
- return t === 0 && e === 0 ? null : /* @__PURE__ */ y(
499
+ return e === 0 && t === 0 ? null : /* @__PURE__ */ g(
485
500
  "span",
486
501
  {
487
502
  style: {
@@ -493,31 +508,31 @@ function Ct({
493
508
  ...n
494
509
  },
495
510
  children: [
496
- t > 0 && /* @__PURE__ */ y("span", { style: { color: C.added }, children: [
511
+ e > 0 && /* @__PURE__ */ g("span", { style: { color: k.added }, children: [
497
512
  "+",
498
- t
513
+ e
499
514
  ] }),
500
- e > 0 && /* @__PURE__ */ y("span", { style: { color: C.deleted }, children: [
515
+ t > 0 && /* @__PURE__ */ g("span", { style: { color: k.deleted }, children: [
501
516
  "-",
502
- e
517
+ t
503
518
  ] })
504
519
  ]
505
520
  }
506
521
  );
507
522
  }
508
- const at = {
523
+ const st = {
509
524
  added: "+",
510
525
  removed: "-",
511
526
  unchanged: " "
512
527
  };
513
- function wt({
514
- lines: t,
515
- showLineNumbers: e = !0,
528
+ function Tt({
529
+ lines: e,
530
+ showLineNumbers: t = !0,
516
531
  coloredLineNumbers: n = !0,
517
532
  showAccentStrip: r = !0,
518
533
  style: o
519
534
  }) {
520
- const a = g(), c = (l) => l === "added" ? a.diff.insertedLine : l === "removed" ? a.diff.removedLine : "transparent", f = (l) => l === "added" ? a.diff.stripAdded : l === "removed" ? a.diff.stripRemoved : "transparent", d = (l) => n && l === "added" ? C.added : n && l === "removed" ? C.deleted : a.text.tertiary;
535
+ const a = y(), c = (l) => l === "added" ? a.diff.insertedLine : l === "removed" ? a.diff.removedLine : "transparent", f = (l) => l === "added" ? a.diff.stripAdded : l === "removed" ? a.diff.stripRemoved : "transparent", d = (l) => n && l === "added" ? k.added : n && l === "removed" ? k.deleted : a.text.tertiary;
521
536
  return /* @__PURE__ */ i(
522
537
  "div",
523
538
  {
@@ -529,7 +544,7 @@ function wt({
529
544
  overflowX: "auto",
530
545
  ...o
531
546
  },
532
- children: t.map((l, u) => /* @__PURE__ */ y(
547
+ children: e.map((l, u) => /* @__PURE__ */ g(
533
548
  "div",
534
549
  {
535
550
  style: {
@@ -539,7 +554,7 @@ function wt({
539
554
  borderLeft: r ? `3px solid ${f(l.type)}` : void 0
540
555
  },
541
556
  children: [
542
- e && /* @__PURE__ */ i(
557
+ t && /* @__PURE__ */ i(
543
558
  "span",
544
559
  {
545
560
  style: {
@@ -563,7 +578,7 @@ function wt({
563
578
  userSelect: "none",
564
579
  color: d(l.type)
565
580
  },
566
- children: at[l.type]
581
+ children: st[l.type]
567
582
  }
568
583
  ),
569
584
  /* @__PURE__ */ i(
@@ -585,9 +600,9 @@ function wt({
585
600
  }
586
601
  );
587
602
  }
588
- function it({ status: t }) {
589
- const e = g(), n = t === "completed" ? C.success : t === "in_progress" ? e.accent.primary : t === "cancelled" ? C.danger : e.text.tertiary;
590
- return /* @__PURE__ */ y(
603
+ function lt({ status: e }) {
604
+ const t = y(), n = e === "completed" ? k.success : e === "in_progress" ? t.accent.primary : e === "cancelled" ? k.danger : t.text.tertiary;
605
+ return /* @__PURE__ */ g(
591
606
  "svg",
592
607
  {
593
608
  width: 14,
@@ -598,7 +613,7 @@ function it({ status: t }) {
598
613
  "aria-hidden": !0,
599
614
  children: [
600
615
  /* @__PURE__ */ i("circle", { cx: 7, cy: 7, r: 6, stroke: n, strokeWidth: 1.4 }),
601
- t === "completed" && /* @__PURE__ */ i(
616
+ e === "completed" && /* @__PURE__ */ i(
602
617
  "path",
603
618
  {
604
619
  d: "M4 7.2l2 2 4-4.4",
@@ -608,8 +623,8 @@ function it({ status: t }) {
608
623
  strokeLinejoin: "round"
609
624
  }
610
625
  ),
611
- t === "in_progress" && /* @__PURE__ */ i("circle", { cx: 7, cy: 7, r: 3, fill: n }),
612
- t === "cancelled" && /* @__PURE__ */ i(
626
+ e === "in_progress" && /* @__PURE__ */ i("circle", { cx: 7, cy: 7, r: 3, fill: n }),
627
+ e === "cancelled" && /* @__PURE__ */ i(
613
628
  "path",
614
629
  {
615
630
  d: "M4.8 4.8l4.4 4.4M9.2 4.8l-4.4 4.4",
@@ -622,16 +637,16 @@ function it({ status: t }) {
622
637
  }
623
638
  );
624
639
  }
625
- function st({
626
- todos: t,
627
- dimmedTodoIds: e,
640
+ function ct({
641
+ todos: e,
642
+ dimmedTodoIds: t,
628
643
  onTodoClick: n,
629
644
  style: r
630
645
  }) {
631
- const o = g();
632
- return t.length === 0 ? null : /* @__PURE__ */ i("div", { style: { display: "flex", flexDirection: "column", ...r }, children: t.map((a) => {
633
- const c = e == null ? void 0 : e.has(a.id);
634
- return /* @__PURE__ */ y(
646
+ const o = y();
647
+ return e.length === 0 ? null : /* @__PURE__ */ i("div", { style: { display: "flex", flexDirection: "column", ...r }, children: e.map((a) => {
648
+ const c = t == null ? void 0 : t.has(a.id);
649
+ return /* @__PURE__ */ g(
635
650
  "button",
636
651
  {
637
652
  type: "button",
@@ -652,7 +667,7 @@ function st({
652
667
  opacity: c ? 0.45 : 1
653
668
  },
654
669
  children: [
655
- /* @__PURE__ */ i(it, { status: a.status }),
670
+ /* @__PURE__ */ i(lt, { status: a.status }),
656
671
  /* @__PURE__ */ i(
657
672
  "span",
658
673
  {
@@ -669,17 +684,17 @@ function st({
669
684
  );
670
685
  }) });
671
686
  }
672
- function Lt({
673
- todos: t,
674
- dimmedTodoIds: e,
687
+ function Pt({
688
+ todos: e,
689
+ dimmedTodoIds: t,
675
690
  defaultExpanded: n = !1,
676
691
  onTodoClick: r,
677
692
  style: o
678
693
  }) {
679
- const a = g(), [c, f] = E(n);
680
- if (t.length === 0) return null;
681
- const d = t.filter((l) => l.status === "completed").length;
682
- return /* @__PURE__ */ y(
694
+ const a = y(), [c, f] = I(n);
695
+ if (e.length === 0) return null;
696
+ const d = e.filter((l) => l.status === "completed").length;
697
+ return /* @__PURE__ */ g(
683
698
  "div",
684
699
  {
685
700
  style: {
@@ -689,7 +704,7 @@ function Lt({
689
704
  ...o
690
705
  },
691
706
  children: [
692
- /* @__PURE__ */ y(
707
+ /* @__PURE__ */ g(
693
708
  "button",
694
709
  {
695
710
  type: "button",
@@ -734,20 +749,20 @@ function Lt({
734
749
  ),
735
750
  /* @__PURE__ */ i("span", { children: "Todos" }),
736
751
  /* @__PURE__ */ i("span", { style: { flex: 1 } }),
737
- /* @__PURE__ */ y("span", { children: [
752
+ /* @__PURE__ */ g("span", { children: [
738
753
  d,
739
754
  " of ",
740
- t.length,
755
+ e.length,
741
756
  " Done"
742
757
  ] })
743
758
  ]
744
759
  }
745
760
  ),
746
761
  c && /* @__PURE__ */ i("div", { style: { padding: 6 }, children: /* @__PURE__ */ i(
747
- st,
762
+ ct,
748
763
  {
749
- todos: t,
750
- dimmedTodoIds: e,
764
+ todos: e,
765
+ dimmedTodoIds: t,
751
766
  onTodoClick: r
752
767
  }
753
768
  ) })
@@ -755,36 +770,36 @@ function Lt({
755
770
  }
756
771
  );
757
772
  }
758
- const lt = {
773
+ const dt = {
759
774
  primary: "filled",
760
775
  secondary: "default",
761
776
  ghost: "subtle"
762
777
  };
763
- function Tt({
764
- children: t,
765
- variant: e = "secondary",
778
+ function At({
779
+ children: e,
780
+ variant: t = "secondary",
766
781
  disabled: n,
767
782
  type: r = "button",
768
783
  style: o,
769
784
  onClick: a
770
785
  }) {
771
786
  return /* @__PURE__ */ i(
772
- Pe,
787
+ Ae,
773
788
  {
774
- variant: lt[e],
775
- color: e === "primary" ? "accent" : void 0,
789
+ variant: dt[t],
790
+ color: t === "primary" ? "accent" : void 0,
776
791
  size: "xs",
777
792
  disabled: n,
778
793
  type: r,
779
794
  onClick: a,
780
795
  style: o,
781
- children: t
796
+ children: e
782
797
  }
783
798
  );
784
799
  }
785
- function Pt({
786
- children: t,
787
- onClick: e,
800
+ function Mt({
801
+ children: e,
802
+ onClick: t,
788
803
  disabled: n,
789
804
  title: r,
790
805
  variant: o = "default",
@@ -792,7 +807,7 @@ function Pt({
792
807
  style: c
793
808
  }) {
794
809
  return /* @__PURE__ */ i(
795
- Ae,
810
+ Me,
796
811
  {
797
812
  variant: o === "circle" ? "light" : "subtle",
798
813
  radius: o === "circle" ? "xl" : "sm",
@@ -801,19 +816,19 @@ function Pt({
801
816
  disabled: n,
802
817
  title: r,
803
818
  "aria-label": r,
804
- onClick: e,
819
+ onClick: t,
805
820
  style: c,
806
- children: t
821
+ children: e
807
822
  }
808
823
  );
809
824
  }
810
- const K = ae({
825
+ const V = ae({
811
826
  collapsible: !1,
812
827
  open: !0,
813
828
  toggle: () => {
814
829
  }
815
830
  });
816
- function ye({ expanded: t }) {
831
+ function ye({ expanded: e }) {
817
832
  return /* @__PURE__ */ i(
818
833
  "svg",
819
834
  {
@@ -822,7 +837,7 @@ function ye({ expanded: t }) {
822
837
  viewBox: "0 0 12 12",
823
838
  fill: "none",
824
839
  style: {
825
- transform: t ? "rotate(90deg)" : "none",
840
+ transform: e ? "rotate(90deg)" : "none",
826
841
  transition: "transform 120ms"
827
842
  },
828
843
  "aria-hidden": !0,
@@ -839,23 +854,23 @@ function ye({ expanded: t }) {
839
854
  }
840
855
  );
841
856
  }
842
- function At({
843
- children: t,
844
- variant: e = "default",
857
+ function Bt({
858
+ children: e,
859
+ variant: t = "default",
845
860
  collapsible: n = !1,
846
861
  defaultOpen: r = !0,
847
862
  open: o,
848
863
  onOpenChange: a,
849
864
  style: c
850
865
  }) {
851
- const f = g(), [d, l] = E(r), u = o ?? d, m = W(() => {
866
+ const f = y(), [d, l] = I(r), u = o ?? d, m = O(() => {
852
867
  const v = !u;
853
868
  o === void 0 && l(v), a == null || a(v);
854
869
  }, [u, o, a]);
855
870
  return /* @__PURE__ */ i(
856
- Me,
871
+ Be,
857
872
  {
858
- withBorder: e !== "borderless",
873
+ withBorder: t !== "borderless",
859
874
  radius: f.radius.md,
860
875
  padding: 0,
861
876
  style: {
@@ -863,13 +878,13 @@ function At({
863
878
  borderColor: f.stroke.secondary,
864
879
  ...c
865
880
  },
866
- children: /* @__PURE__ */ i(K.Provider, { value: { collapsible: n, open: u, toggle: m }, children: t })
881
+ children: /* @__PURE__ */ i(V.Provider, { value: { collapsible: n, open: u, toggle: m }, children: e })
867
882
  }
868
883
  );
869
884
  }
870
- function Mt({ children: t, trailing: e, style: n }) {
871
- const r = g(), { collapsible: o, open: a, toggle: c } = G(K);
872
- return /* @__PURE__ */ y(
885
+ function $t({ children: e, trailing: t, style: n }) {
886
+ const r = y(), { collapsible: o, open: a, toggle: c } = W(V);
887
+ return /* @__PURE__ */ g(
873
888
  "div",
874
889
  {
875
890
  onClick: o ? c : void 0,
@@ -889,51 +904,51 @@ function Mt({ children: t, trailing: e, style: n }) {
889
904
  ...n
890
905
  },
891
906
  children: [
892
- /* @__PURE__ */ y("span", { style: { display: "inline-flex", alignItems: "center", gap: 6 }, children: [
907
+ /* @__PURE__ */ g("span", { style: { display: "inline-flex", alignItems: "center", gap: 6 }, children: [
893
908
  o && /* @__PURE__ */ i(ye, { expanded: a }),
894
- t
909
+ e
895
910
  ] }),
896
- e != null && /* @__PURE__ */ i("span", { children: e })
911
+ t != null && /* @__PURE__ */ i("span", { children: t })
897
912
  ]
898
913
  }
899
914
  );
900
915
  }
901
- function Bt({ children: t, style: e }) {
902
- const { collapsible: n, open: r } = G(K);
903
- return n && !r ? null : /* @__PURE__ */ i("div", { style: { padding: 14, ...e }, children: t });
916
+ function Dt({ children: e, style: t }) {
917
+ const { collapsible: n, open: r } = W(V);
918
+ return n && !r ? null : /* @__PURE__ */ i("div", { style: { padding: 14, ...t }, children: e });
904
919
  }
905
- function $t({ value: t, label: e, tone: n, style: r }) {
906
- const o = g();
907
- return /* @__PURE__ */ y("div", { style: r, children: [
920
+ function It({ value: e, label: t, tone: n, style: r }) {
921
+ const o = y();
922
+ return /* @__PURE__ */ g("div", { style: r, children: [
908
923
  /* @__PURE__ */ i(
909
- H,
924
+ z,
910
925
  {
911
926
  fz: 22,
912
927
  fw: 700,
913
928
  lh: 1.2,
914
929
  style: {
915
- color: n ? C[n] : o.text.primary,
930
+ color: n ? k[n] : o.text.primary,
916
931
  fontFamily: o.typography.fontFamily
917
932
  },
918
- children: t
933
+ children: e
919
934
  }
920
935
  ),
921
936
  /* @__PURE__ */ i(
922
- H,
937
+ z,
923
938
  {
924
939
  fz: 12,
925
940
  style: {
926
941
  color: o.text.tertiary,
927
942
  fontFamily: o.typography.fontFamily
928
943
  },
929
- children: e
944
+ children: t
930
945
  }
931
946
  )
932
947
  ] });
933
948
  }
934
- function Dt({
935
- children: t,
936
- active: e,
949
+ function Et({
950
+ children: e,
951
+ active: t,
937
952
  tone: n = "neutral",
938
953
  size: r = "md",
939
954
  leadingContent: o,
@@ -943,10 +958,10 @@ function Dt({
943
958
  onClick: d
944
959
  }) {
945
960
  return /* @__PURE__ */ i(
946
- $e,
961
+ De,
947
962
  {
948
963
  color: ie[n],
949
- variant: e ? "filled" : "light",
964
+ variant: t ? "filled" : "light",
950
965
  size: r === "sm" ? "sm" : "md",
951
966
  leftSection: o,
952
967
  rightSection: a,
@@ -957,32 +972,32 @@ function Dt({
957
972
  textTransform: "none",
958
973
  ...f
959
974
  },
960
- children: t
975
+ children: e
961
976
  }
962
977
  );
963
978
  }
964
- function Et({
965
- children: t,
966
- tone: e = "neutral",
979
+ function _t({
980
+ children: e,
981
+ tone: t = "neutral",
967
982
  title: n,
968
983
  icon: r,
969
984
  style: o
970
985
  }) {
971
986
  return /* @__PURE__ */ i(
972
- Be,
987
+ $e,
973
988
  {
974
- color: ie[e],
989
+ color: ie[t],
975
990
  title: n,
976
991
  icon: r,
977
992
  variant: "light",
978
993
  style: o,
979
- children: t
994
+ children: e
980
995
  }
981
996
  );
982
997
  }
983
- function It({
984
- value: t,
985
- onChange: e,
998
+ function Ft({
999
+ value: e,
1000
+ onChange: t,
986
1001
  options: n,
987
1002
  placeholder: r,
988
1003
  disabled: o,
@@ -991,57 +1006,57 @@ function It({
991
1006
  return /* @__PURE__ */ i(
992
1007
  Ee,
993
1008
  {
994
- value: t,
1009
+ value: e,
995
1010
  data: n,
996
1011
  placeholder: r,
997
1012
  disabled: o,
998
1013
  allowDeselect: !1,
999
1014
  onChange: (c) => {
1000
- c !== null && (e == null || e(c));
1015
+ c !== null && (t == null || t(c));
1001
1016
  },
1002
1017
  style: a
1003
1018
  }
1004
1019
  );
1005
1020
  }
1006
- function Ft({
1007
- checked: t,
1008
- onChange: e,
1021
+ function Rt({
1022
+ checked: e,
1023
+ onChange: t,
1009
1024
  disabled: n,
1010
1025
  label: r,
1011
1026
  style: o
1012
1027
  }) {
1013
1028
  return /* @__PURE__ */ i(
1014
- De,
1029
+ Ie,
1015
1030
  {
1016
- checked: t,
1031
+ checked: e,
1017
1032
  disabled: n,
1018
1033
  label: r,
1019
- onChange: (a) => e == null ? void 0 : e(a.currentTarget.checked),
1034
+ onChange: (a) => t == null ? void 0 : t(a.currentTarget.checked),
1020
1035
  style: o
1021
1036
  }
1022
1037
  );
1023
1038
  }
1024
1039
  function Nt({
1025
- checked: t,
1026
- onChange: e,
1040
+ checked: e,
1041
+ onChange: t,
1027
1042
  disabled: n,
1028
1043
  size: r = "sm",
1029
1044
  style: o
1030
1045
  }) {
1031
1046
  return /* @__PURE__ */ i(
1032
- Ne,
1047
+ Re,
1033
1048
  {
1034
- checked: t,
1049
+ checked: e,
1035
1050
  disabled: n,
1036
1051
  size: r === "sm" ? "sm" : "md",
1037
- onChange: (a) => e == null ? void 0 : e(a.currentTarget.checked),
1052
+ onChange: (a) => t == null ? void 0 : t(a.currentTarget.checked),
1038
1053
  style: o
1039
1054
  }
1040
1055
  );
1041
1056
  }
1042
- function Rt({
1043
- value: t,
1044
- onChange: e,
1057
+ function Ht({
1058
+ value: e,
1059
+ onChange: t,
1045
1060
  placeholder: n,
1046
1061
  disabled: r,
1047
1062
  type: o,
@@ -1050,38 +1065,38 @@ function Rt({
1050
1065
  return /* @__PURE__ */ i(
1051
1066
  Fe,
1052
1067
  {
1053
- value: t,
1068
+ value: e,
1054
1069
  placeholder: n,
1055
1070
  disabled: r,
1056
1071
  type: o,
1057
- onChange: (c) => e == null ? void 0 : e(c.currentTarget.value),
1072
+ onChange: (c) => t == null ? void 0 : t(c.currentTarget.value),
1058
1073
  style: a
1059
1074
  }
1060
1075
  );
1061
1076
  }
1062
- function _t({
1063
- value: t,
1064
- onChange: e,
1077
+ function zt({
1078
+ value: e,
1079
+ onChange: t,
1065
1080
  placeholder: n,
1066
1081
  disabled: r,
1067
1082
  rows: o = 3,
1068
1083
  style: a
1069
1084
  }) {
1070
1085
  return /* @__PURE__ */ i(
1071
- Ie,
1086
+ _e,
1072
1087
  {
1073
- value: t,
1088
+ value: e,
1074
1089
  placeholder: n,
1075
1090
  disabled: r,
1076
1091
  autosize: !0,
1077
1092
  minRows: o,
1078
- onChange: (c) => e == null ? void 0 : e(c.currentTarget.value),
1093
+ onChange: (c) => t == null ? void 0 : t(c.currentTarget.value),
1079
1094
  style: a
1080
1095
  }
1081
1096
  );
1082
1097
  }
1083
- function zt({ children: t, gap: e, style: n }) {
1084
- return /* @__PURE__ */ i(ze, { gap: e, style: n, children: t });
1098
+ function Ot({ children: e, gap: t, style: n }) {
1099
+ return /* @__PURE__ */ i(ze, { gap: t, style: n, children: e });
1085
1100
  }
1086
1101
  const re = {
1087
1102
  start: "flex-start",
@@ -1090,31 +1105,31 @@ const re = {
1090
1105
  stretch: "stretch",
1091
1106
  "space-between": "space-between"
1092
1107
  };
1093
- function Ht({
1094
- children: t,
1095
- gap: e,
1108
+ function Wt({
1109
+ children: e,
1110
+ gap: t,
1096
1111
  align: n = "center",
1097
1112
  justify: r = "start",
1098
1113
  wrap: o = !1,
1099
1114
  style: a
1100
1115
  }) {
1101
1116
  return /* @__PURE__ */ i(
1102
- _e,
1117
+ He,
1103
1118
  {
1104
- gap: e,
1119
+ gap: t,
1105
1120
  align: re[n],
1106
1121
  justify: re[r],
1107
1122
  wrap: o ? "wrap" : "nowrap",
1108
1123
  style: a,
1109
- children: t
1124
+ children: e
1110
1125
  }
1111
1126
  );
1112
1127
  }
1113
- function Wt() {
1128
+ function Gt() {
1114
1129
  return /* @__PURE__ */ i("div", { style: { flex: 1 } });
1115
1130
  }
1116
- function Gt({ children: t, columns: e, gap: n = 16, align: r, style: o }) {
1117
- const a = typeof e == "number" ? `repeat(${e}, minmax(0, 1fr))` : e;
1131
+ function jt({ children: e, columns: t, gap: n = 16, align: r, style: o }) {
1132
+ const a = typeof t == "number" ? `repeat(${t}, minmax(0, 1fr))` : t;
1118
1133
  return /* @__PURE__ */ i(
1119
1134
  "div",
1120
1135
  {
@@ -1125,15 +1140,15 @@ function Gt({ children: t, columns: e, gap: n = 16, align: r, style: o }) {
1125
1140
  alignItems: r,
1126
1141
  ...o
1127
1142
  },
1128
- children: t
1143
+ children: e
1129
1144
  }
1130
1145
  );
1131
1146
  }
1132
- function Ot({ style: t }) {
1133
- return /* @__PURE__ */ i(Re, { style: t });
1147
+ function Vt({ style: e }) {
1148
+ return /* @__PURE__ */ i(Ne, { style: e });
1134
1149
  }
1135
- function jt({ color: t, style: e }) {
1136
- const n = g();
1150
+ function Kt({ color: e, style: t }) {
1151
+ const n = y();
1137
1152
  return /* @__PURE__ */ i(
1138
1153
  "span",
1139
1154
  {
@@ -1142,26 +1157,26 @@ function jt({ color: t, style: e }) {
1142
1157
  width: 14,
1143
1158
  height: 14,
1144
1159
  borderRadius: 4,
1145
- background: n.category[t],
1160
+ background: n.category[e],
1146
1161
  flex: "0 0 auto",
1147
- ...e
1162
+ ...t
1148
1163
  }
1149
1164
  }
1150
1165
  );
1151
1166
  }
1152
- function Kt({
1153
- segments: t,
1154
- total: e,
1167
+ function Xt({
1168
+ segments: e,
1169
+ total: t,
1155
1170
  topLeftLabel: n,
1156
1171
  topRightLabel: r,
1157
1172
  style: o
1158
1173
  }) {
1159
- const a = g(), c = e > 0 ? e : 1, f = t.reduce(
1174
+ const a = y(), c = t > 0 ? t : 1, f = e.reduce(
1160
1175
  (l, u) => l + (Number.isFinite(u.value) && u.value > 0 ? u.value : 0),
1161
1176
  0
1162
1177
  ), d = Math.max(0, c - f);
1163
- return /* @__PURE__ */ y("div", { style: o, children: [
1164
- (n != null || r != null) && /* @__PURE__ */ y(
1178
+ return /* @__PURE__ */ g("div", { style: o, children: [
1179
+ (n != null || r != null) && /* @__PURE__ */ g(
1165
1180
  "div",
1166
1181
  {
1167
1182
  style: {
@@ -1177,8 +1192,8 @@ function Kt({
1177
1192
  ]
1178
1193
  }
1179
1194
  ),
1180
- /* @__PURE__ */ y("div", { style: { display: "flex", gap: 2, height: 8 }, children: [
1181
- t.map((l, u) => {
1195
+ /* @__PURE__ */ g("div", { style: { display: "flex", gap: 2, height: 8 }, children: [
1196
+ e.map((l, u) => {
1182
1197
  const m = Number.isFinite(l.value) && l.value > 0 ? l.value : 0, v = a.category[l.color ?? ne[u % ne.length]];
1183
1198
  return /* @__PURE__ */ i(
1184
1199
  "div",
@@ -1205,18 +1220,18 @@ function Kt({
1205
1220
  ] })
1206
1221
  ] });
1207
1222
  }
1208
- function Vt({
1209
- title: t,
1210
- leading: e,
1223
+ function Yt({
1224
+ title: e,
1225
+ leading: t,
1211
1226
  count: n,
1212
1227
  trailing: r,
1213
1228
  children: o,
1214
1229
  defaultOpen: a = !1,
1215
1230
  style: c
1216
1231
  }) {
1217
- const f = g(), [d, l] = E(a);
1218
- return /* @__PURE__ */ y("div", { style: c, children: [
1219
- /* @__PURE__ */ y(
1232
+ const f = y(), [d, l] = I(a);
1233
+ return /* @__PURE__ */ g("div", { style: c, children: [
1234
+ /* @__PURE__ */ g(
1220
1235
  "div",
1221
1236
  {
1222
1237
  onClick: () => l((u) => !u),
@@ -1232,8 +1247,8 @@ function Vt({
1232
1247
  },
1233
1248
  children: [
1234
1249
  /* @__PURE__ */ i(ye, { expanded: d }),
1235
- e,
1236
- /* @__PURE__ */ i("span", { style: { fontWeight: 500 }, children: t }),
1250
+ t,
1251
+ /* @__PURE__ */ i("span", { style: { fontWeight: 500 }, children: e }),
1237
1252
  n != null && /* @__PURE__ */ i("span", { style: { color: f.text.tertiary, fontSize: 12 }, children: n }),
1238
1253
  /* @__PURE__ */ i("span", { style: { flex: 1 } }),
1239
1254
  r != null && /* @__PURE__ */ i("span", { style: { color: f.text.tertiary }, children: r })
@@ -1243,16 +1258,16 @@ function Vt({
1243
1258
  d && /* @__PURE__ */ i("div", { style: { paddingLeft: 18, paddingBottom: 4 }, children: o })
1244
1259
  ] });
1245
1260
  }
1246
- const ct = {
1261
+ const ut = {
1247
1262
  success: "rgba(31,138,101,0.12)",
1248
1263
  danger: "rgba(207,45,86,0.12)",
1249
1264
  warning: "rgba(232,163,61,0.14)",
1250
1265
  info: "rgba(46,121,181,0.12)",
1251
1266
  neutral: "rgba(136,136,168,0.12)"
1252
1267
  };
1253
- function Xt({
1254
- headers: t,
1255
- rows: e,
1268
+ function qt({
1269
+ headers: e,
1270
+ rows: t,
1256
1271
  columnAlign: n,
1257
1272
  rowTone: r,
1258
1273
  framed: o = !0,
@@ -1261,7 +1276,7 @@ function Xt({
1261
1276
  style: f,
1262
1277
  emptyMessage: d
1263
1278
  }) {
1264
- return /* @__PURE__ */ y(
1279
+ return /* @__PURE__ */ g(
1265
1280
  T,
1266
1281
  {
1267
1282
  withTableBorder: o,
@@ -1271,14 +1286,14 @@ function Xt({
1271
1286
  highlightOnHover: !0,
1272
1287
  style: f,
1273
1288
  children: [
1274
- /* @__PURE__ */ i(T.Thead, { children: /* @__PURE__ */ i(T.Tr, { children: t.map((l, u) => /* @__PURE__ */ i(T.Th, { ta: (n == null ? void 0 : n[u]) ?? "left", children: l }, u)) }) }),
1275
- /* @__PURE__ */ i(T.Tbody, { children: e.length === 0 ? /* @__PURE__ */ i(T.Tr, { children: /* @__PURE__ */ i(T.Td, { colSpan: t.length, ta: "center", c: "dimmed", children: d ?? "No data" }) }) : e.map((l, u) => {
1289
+ /* @__PURE__ */ i(T.Thead, { children: /* @__PURE__ */ i(T.Tr, { children: e.map((l, u) => /* @__PURE__ */ i(T.Th, { ta: (n == null ? void 0 : n[u]) ?? "left", children: l }, u)) }) }),
1290
+ /* @__PURE__ */ i(T.Tbody, { children: t.length === 0 ? /* @__PURE__ */ i(T.Tr, { children: /* @__PURE__ */ i(T.Td, { colSpan: e.length, ta: "center", c: "dimmed", children: d ?? "No data" }) }) : t.map((l, u) => {
1276
1291
  const m = r == null ? void 0 : r[u];
1277
1292
  return /* @__PURE__ */ i(
1278
1293
  T.Tr,
1279
1294
  {
1280
- style: m ? { background: ct[m] } : void 0,
1281
- children: t.map((v, h) => /* @__PURE__ */ i(
1295
+ style: m ? { background: ut[m] } : void 0,
1296
+ children: e.map((v, h) => /* @__PURE__ */ i(
1282
1297
  T.Td,
1283
1298
  {
1284
1299
  ta: (n == null ? void 0 : n[h]) ?? "left",
@@ -1294,39 +1309,39 @@ function Xt({
1294
1309
  }
1295
1310
  );
1296
1311
  }
1297
- function V(t, e, n) {
1298
- const r = t.typography[e];
1312
+ function K(e, t, n) {
1313
+ const r = e.typography[t];
1299
1314
  return {
1300
- fontFamily: t.typography.fontFamily,
1315
+ fontFamily: e.typography.fontFamily,
1301
1316
  fontSize: r.fontSize,
1302
1317
  lineHeight: r.lineHeight,
1303
1318
  fontWeight: r.fontWeight,
1304
- color: t.text.primary,
1319
+ color: e.text.primary,
1305
1320
  margin: 0,
1306
1321
  ...n
1307
1322
  };
1308
1323
  }
1309
- function Yt({ children: t, style: e }) {
1310
- const n = g();
1311
- return /* @__PURE__ */ i(O, { order: 1, style: V(n, "h1", e), children: t });
1324
+ function Jt({ children: e, style: t }) {
1325
+ const n = y();
1326
+ return /* @__PURE__ */ i(G, { order: 1, style: K(n, "h1", t), children: e });
1312
1327
  }
1313
- function qt({ children: t, style: e }) {
1314
- const n = g();
1315
- return /* @__PURE__ */ i(O, { order: 2, style: V(n, "h2", e), children: t });
1328
+ function Zt({ children: e, style: t }) {
1329
+ const n = y();
1330
+ return /* @__PURE__ */ i(G, { order: 2, style: K(n, "h2", t), children: e });
1316
1331
  }
1317
- function Zt({ children: t, style: e }) {
1318
- const n = g();
1319
- return /* @__PURE__ */ i(O, { order: 3, style: V(n, "h3", e), children: t });
1332
+ function Ut({ children: e, style: t }) {
1333
+ const n = y();
1334
+ return /* @__PURE__ */ i(G, { order: 3, style: K(n, "h3", t), children: e });
1320
1335
  }
1321
- const dt = {
1336
+ const ft = {
1322
1337
  normal: 400,
1323
1338
  medium: 500,
1324
1339
  semibold: 600,
1325
1340
  bold: 700
1326
1341
  }, oe = ae(!1);
1327
- function Jt({
1328
- children: t,
1329
- tone: e = "primary",
1342
+ function Qt({
1343
+ children: e,
1344
+ tone: t = "primary",
1330
1345
  size: n = "body",
1331
1346
  as: r = "p",
1332
1347
  weight: o = "normal",
@@ -1334,28 +1349,28 @@ function Jt({
1334
1349
  truncate: c,
1335
1350
  style: f
1336
1351
  }) {
1337
- const d = g(), u = G(oe) && r === "p" ? "span" : r, m = r === "p";
1352
+ const d = y(), u = W(oe) && r === "p" ? "span" : r, m = r === "p";
1338
1353
  return /* @__PURE__ */ i(oe.Provider, { value: !0, children: /* @__PURE__ */ i(
1339
- H,
1354
+ z,
1340
1355
  {
1341
1356
  component: u,
1342
1357
  size: n === "small" ? "xs" : "sm",
1343
- fw: dt[o],
1344
- c: e === "primary" ? void 0 : d.text[e],
1358
+ fw: ft[o],
1359
+ c: t === "primary" ? void 0 : d.text[t],
1345
1360
  truncate: c,
1346
1361
  style: {
1347
1362
  fontStyle: a ? "italic" : void 0,
1348
- ...e === "primary" ? { color: d.text.primary } : void 0,
1363
+ ...t === "primary" ? { color: d.text.primary } : void 0,
1349
1364
  ...m && u === "span" ? { display: "block" } : void 0,
1350
1365
  fontFamily: d.typography.fontFamily,
1351
1366
  ...f
1352
1367
  },
1353
- children: t
1368
+ children: e
1354
1369
  }
1355
1370
  ) });
1356
1371
  }
1357
- function Ut({ children: t, style: e }) {
1358
- const n = g();
1372
+ function en({ children: e, style: t }) {
1373
+ const n = y();
1359
1374
  return /* @__PURE__ */ i(
1360
1375
  "code",
1361
1376
  {
@@ -1366,78 +1381,78 @@ function Ut({ children: t, style: e }) {
1366
1381
  background: n.fill.secondary,
1367
1382
  borderRadius: n.radius.sm,
1368
1383
  padding: "1px 4px",
1369
- ...e
1384
+ ...t
1370
1385
  },
1371
- children: t
1386
+ children: e
1372
1387
  }
1373
1388
  );
1374
1389
  }
1375
- function Qt({ children: t, href: e, style: n }) {
1376
- const r = g();
1390
+ function tn({ children: e, href: t, style: n }) {
1391
+ const r = y();
1377
1392
  return /* @__PURE__ */ i(
1378
1393
  "a",
1379
1394
  {
1380
- href: e,
1395
+ href: t,
1381
1396
  target: "_blank",
1382
1397
  rel: "noreferrer",
1383
1398
  style: { color: r.text.link, ...n },
1384
- children: t
1399
+ children: e
1385
1400
  }
1386
1401
  );
1387
1402
  }
1388
1403
  export {
1389
- vt as BarChart,
1390
- Tt as Button,
1391
- Et as Callout,
1392
- At as Card,
1393
- Bt as CardBody,
1394
- Mt as CardHeader,
1395
- Ft as Checkbox,
1396
- Ut as Code,
1397
- Vt as CollapsibleSection,
1398
- Ct as DiffStats,
1399
- wt as DiffView,
1400
- Ot as Divider,
1401
- Gt as Grid,
1402
- Yt as H1,
1403
- qt as H2,
1404
- Zt as H3,
1405
- Pt as IconButton,
1406
- bt as LineChart,
1407
- Qt as Link,
1408
- St as PieChart,
1409
- Dt as Pill,
1410
- Ht as Row,
1411
- It as Select,
1412
- Wt as Spacer,
1413
- zt as Stack,
1414
- $t as Stat,
1415
- jt as Swatch,
1416
- Xt as Table,
1417
- Jt as Text,
1418
- _t as TextArea,
1419
- Rt as TextInput,
1420
- st as TodoList,
1421
- Lt as TodoListCard,
1404
+ St as BarChart,
1405
+ At as Button,
1406
+ _t as Callout,
1407
+ Bt as Card,
1408
+ Dt as CardBody,
1409
+ $t as CardHeader,
1410
+ Rt as Checkbox,
1411
+ en as Code,
1412
+ Yt as CollapsibleSection,
1413
+ Lt as DiffStats,
1414
+ Tt as DiffView,
1415
+ Vt as Divider,
1416
+ jt as Grid,
1417
+ Jt as H1,
1418
+ Zt as H2,
1419
+ Ut as H3,
1420
+ Mt as IconButton,
1421
+ Ct as LineChart,
1422
+ tn as Link,
1423
+ kt as PieChart,
1424
+ Et as Pill,
1425
+ Wt as Row,
1426
+ Ft as Select,
1427
+ Gt as Spacer,
1428
+ Ot as Stack,
1429
+ It as Stat,
1430
+ Kt as Swatch,
1431
+ qt as Table,
1432
+ Qt as Text,
1433
+ zt as TextArea,
1434
+ Ht as TextInput,
1435
+ ct as TodoList,
1436
+ Pt as TodoListCard,
1422
1437
  Nt as Toggle,
1423
- Kt as UsageBar,
1424
- ln as canvasPaletteDark,
1425
- cn as canvasPaletteGrokDark,
1426
- dn as canvasPaletteGrokLight,
1427
- un as canvasPaletteLight,
1428
- fn as canvasTokens,
1429
- hn as canvasTokensLight,
1430
- pn as categoryPaletteDark,
1431
- yn as categoryPaletteLight,
1432
- gn as colorPalette,
1433
- kt as computeDAGLayout,
1434
- xt as mergeStyle,
1438
+ Xt as UsageBar,
1439
+ dn as canvasPaletteDark,
1440
+ un as canvasPaletteGrokDark,
1441
+ fn as canvasPaletteGrokLight,
1442
+ hn as canvasPaletteLight,
1443
+ pn as canvasTokens,
1444
+ gn as canvasTokensLight,
1445
+ yn as categoryPaletteDark,
1446
+ mn as categoryPaletteLight,
1447
+ xn as colorPalette,
1448
+ wt as computeDAGLayout,
1449
+ bt as mergeStyle,
1435
1450
  ne as usageColorSequence,
1436
- mt as useCanvasAction,
1437
- gt as useCanvasState,
1438
- nn as useEffect,
1439
- g as useHostTheme,
1440
- rn as useMemo,
1441
- on as useRef,
1442
- an as useState
1451
+ vt as useCanvasAction,
1452
+ xt as useCanvasState,
1453
+ on as useEffect,
1454
+ y as useHostTheme,
1455
+ an as useMemo,
1456
+ sn as useRef,
1457
+ ln as useState
1443
1458
  };