@divami-artefacts/ai-design-system 1.0.11 → 1.0.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1113,47 +1113,55 @@ function ze({ rows: e = [], className: t, colors: n }) {
1113
1113
  }
1114
1114
  //#endregion
1115
1115
  //#region src/components/radialFanTreeChart/RadialFanTreeChart.tsx
1116
- var Be = 680, Ve = 320;
1117
- function He({ total: e = 0, items: t = [], "data-testid": r }) {
1118
- let o = a(null), l = a(/* @__PURE__ */ new Map()), p = a(0), { hoveredRef: h, tooltip: g, hitZonesRef: y } = C(o, {
1116
+ var Be = 680, Ve = 320, He = 60, Ue = 28;
1117
+ function We({ total: e = 0, items: t = [], "data-testid": r }) {
1118
+ let o = a(null), l = a(/* @__PURE__ */ new Map()), p = a(0), h = i(() => t.filter((e) => typeof e == "object" && !!e), [t]), g = i(() => Math.max(Ve, He + Math.max(0, h.length - 1) * Ue), [h.length]), { hoveredRef: y, tooltip: b, hitZonesRef: x } = C(o, {
1119
1119
  width: Be,
1120
- height: Ve
1121
- }), b = i(() => t.filter((e) => typeof e == "object" && !!e), [t]);
1120
+ height: g
1121
+ });
1122
1122
  return n(() => {
1123
1123
  let t = o.current;
1124
1124
  if (!t) return;
1125
- let n = _(t, Be, Ve);
1125
+ let n = _(t, Be, g);
1126
1126
  p.current = 0;
1127
- let r = Ve / 2, i = Be - 80, a = Math.max(...b.map((e) => e.count ?? 0)), s = (Ve - 60) / (b.length - 1), c = b.map((e, t) => ({
1127
+ let r = g / 2, i = Be - 80, a = Math.max(...h.map((e) => e.count ?? 0)), s = (g - 60) / (h.length - 1), c = h.map((e, t) => ({
1128
1128
  x: i,
1129
1129
  y: 30 + t * s
1130
- })), g, x = () => {
1130
+ })), b, S = () => {
1131
1131
  p.current++;
1132
1132
  let t = p.current;
1133
- n.clearRect(0, 0, Be, Ve);
1133
+ n.clearRect(0, 0, Be, g);
1134
1134
  let o = E(Math.min(t / 72, 1));
1135
- M(l.current, h.current), y.current = [], v(n, 88, r, 48 * o, u.blue, .15 * o), b.forEach((t, s) => {
1136
- let p = d[s % d.length], h = j(o, s, b.length, E), g = c[s], _ = l.current.get(t.id) ?? 0, x = Math.max(1.5, (t.count ?? 0) / a * 6);
1137
- if (h < .01) return;
1138
- let S = 88 + (i - 88) * .4, C = r, T = 88 + (i - 88) * .6, D = g.y, O = h;
1135
+ M(l.current, y.current), x.current = [], v(n, 88, r, 48 * o, u.blue, .15 * o), h.forEach((t, s) => {
1136
+ let p = d[s % d.length], g = j(o, s, h.length, E), _ = c[s], y = l.current.get(t.id) ?? 0, b = Math.max(1.5, (t.count ?? 0) / a * 6);
1137
+ if (g < .01) return;
1138
+ let S = 88 + (i - 88) * .4, C = r, T = 88 + (i - 88) * .6, D = _.y, O = g;
1139
1139
  n.beginPath();
1140
1140
  for (let e = 0; e <= 40; e++) {
1141
- let t = e / 40 * O, i = (1 - t) ** 3 * 88 + 3 * (1 - t) ** 2 * t * S + 3 * (1 - t) * t ** 2 * T + t ** 3 * g.x, a = (1 - t) ** 3 * r + 3 * (1 - t) ** 2 * t * C + 3 * (1 - t) * t ** 2 * D + t ** 3 * g.y;
1141
+ let t = e / 40 * O, i = (1 - t) ** 3 * 88 + 3 * (1 - t) ** 2 * t * S + 3 * (1 - t) * t ** 2 * T + t ** 3 * _.x, a = (1 - t) ** 3 * r + 3 * (1 - t) ** 2 * t * C + 3 * (1 - t) * t ** 2 * D + t ** 3 * _.y;
1142
1142
  e === 0 ? n.moveTo(i, a) : n.lineTo(i, a);
1143
1143
  }
1144
- if (n.strokeStyle = m(p, _ > 0 ? .8 : .45), n.lineWidth = x * (_ > 0 ? 1.3 : 1), n.stroke(), h > .85) {
1145
- let r = Math.min(1, (h - .85) / .15), i = 4 + (t.count ?? 0) / a * 12;
1146
- v(n, g.x, g.y, i * 2.5, p, (.25 + _ * .2) * r), n.beginPath(), n.arc(g.x, g.y, i * r, 0, Math.PI * 2), n.fillStyle = m(p, (.7 + _ * .2) * r), n.fill(), w(y.current, t.id, g.x, g.y, i + 8, {
1144
+ if (n.strokeStyle = m(p, y > 0 ? .8 : .45), n.lineWidth = b * (y > 0 ? 1.3 : 1), n.stroke(), g > .85) {
1145
+ let r = Math.min(1, (g - .85) / .15), i = 4 + (t.count ?? 0) / a * 12;
1146
+ v(n, _.x, _.y, i * 2.5, p, (.25 + y * .2) * r), n.beginPath(), n.arc(_.x, _.y, i * r, 0, Math.PI * 2), n.fillStyle = m(p, (.7 + y * .2) * r), n.fill(), w(x.current, t.id, _.x, _.y, i + 8, {
1147
1147
  label: t.name,
1148
1148
  value: `${t.count ?? 0} NCEs raised`,
1149
1149
  sublabel: `${Math.round((t.count ?? 0) / e * 100)}% of all NCEs`,
1150
1150
  color: p
1151
- }), n.globalAlpha = r, n.font = f.font, n.fillStyle = _ > 0 ? p : m(u.t2, .85), n.textAlign = "left", n.fillText(t.abbreviation ?? t.name.slice(0, 6), g.x + i + 6, g.y - 3), n.font = f.font, n.fillStyle = _ > 0 ? p : u.t1, n.fillText(String(t.count ?? 0), g.x + i + 6, g.y + 10), n.globalAlpha = 1;
1151
+ }), n.globalAlpha = r, n.font = f.font, n.textAlign = "left";
1152
+ let o = t.abbreviation ?? t.name.slice(0, 6), s = ` ${t.count ?? 0}`, c = _.x + i + 6, l = _.y + 4;
1153
+ n.fillStyle = y > 0 ? p : m(u.t2, .85), n.fillText(o, c, l);
1154
+ let d = n.measureText(o).width;
1155
+ n.fillStyle = y > 0 ? p : u.t1, n.fillText(s, c + d, l), n.globalAlpha = 1;
1152
1156
  }
1153
- }), n.beginPath(), n.arc(88, r, 32 * o, 0, Math.PI * 2), n.fillStyle = u.bgL, n.fill(), n.strokeStyle = m(u.blue, .6 * o), n.lineWidth = 2, n.stroke(), o > .4 && (n.globalAlpha = Math.min(1, (o - .4) / .4), n.font = "500 24px 'Satoshi Variable', 'DM Sans', sans-serif", n.fillStyle = u.t1, n.textAlign = "center", n.fillText(String(e), 88, r + 5), n.font = f.font, n.fillStyle = f.color, n.fillText("NCEs", 88, r + 18), n.globalAlpha = 1), g = requestAnimationFrame(x);
1157
+ }), n.beginPath(), n.arc(88, r, 32 * o, 0, Math.PI * 2), n.fillStyle = u.bgL, n.fill(), n.strokeStyle = m(u.blue, .6 * o), n.lineWidth = 2, n.stroke(), o > .4 && (n.globalAlpha = Math.min(1, (o - .4) / .4), n.font = "500 24px 'Satoshi Variable', 'DM Sans', sans-serif", n.fillStyle = u.t1, n.textAlign = "center", n.fillText(String(e), 88, r + 5), n.font = f.font, n.fillStyle = f.color, n.fillText("NCEs", 88, r + 18), n.globalAlpha = 1), b = requestAnimationFrame(S);
1154
1158
  };
1155
- return x(), () => cancelAnimationFrame(g);
1156
- }, [e, b]), b.length === 0 ? /* @__PURE__ */ s(F, {
1159
+ return S(), () => cancelAnimationFrame(b);
1160
+ }, [
1161
+ e,
1162
+ h,
1163
+ g
1164
+ ]), h.length === 0 ? /* @__PURE__ */ s(F, {
1157
1165
  width: Be,
1158
1166
  height: Ve,
1159
1167
  "data-testid": r
@@ -1162,7 +1170,7 @@ function He({ total: e = 0, items: t = [], "data-testid": r }) {
1162
1170
  style: {
1163
1171
  position: "relative",
1164
1172
  width: Be,
1165
- height: Ve
1173
+ height: g
1166
1174
  },
1167
1175
  children: [/* @__PURE__ */ s("canvas", {
1168
1176
  ref: o,
@@ -1170,33 +1178,33 @@ function He({ total: e = 0, items: t = [], "data-testid": r }) {
1170
1178
  "aria-label": "NCE fault tree — NCEs per contractor as branching tree",
1171
1179
  style: {
1172
1180
  width: Be,
1173
- height: Ve,
1181
+ height: g,
1174
1182
  display: "block"
1175
1183
  }
1176
1184
  }), /* @__PURE__ */ s(S, {
1177
- ...g,
1185
+ ...b,
1178
1186
  parentW: Be,
1179
- parentH: Ve
1187
+ parentH: g
1180
1188
  })]
1181
1189
  });
1182
1190
  }
1183
1191
  //#endregion
1184
1192
  //#region src/components/pieChart/PieChart.tsx
1185
- var Ue = 192, We = Ue, Ge = Ue + 80;
1186
- function Ke({ rows: e = [], variant: t, className: r, colors: i }) {
1193
+ var Ge = 192, Ke = Ge, qe = Ge + 80;
1194
+ function Je({ rows: e = [], variant: t, className: r, colors: i }) {
1187
1195
  let o = a(null), f = a(/* @__PURE__ */ new Map()), p = a(0), h = i?.slices ?? d, { hoveredRef: y, tooltip: b, hitZonesRef: x } = C(o, {
1188
- width: We,
1189
- height: Ge
1196
+ width: Ke,
1197
+ height: qe
1190
1198
  });
1191
1199
  return n(() => {
1192
1200
  let n = o.current;
1193
1201
  if (!n) return;
1194
- let r = _(n, We, Ge);
1202
+ let r = _(n, Ke, qe);
1195
1203
  p.current = 0;
1196
- let i = We / 2, a = Ue / 2, s = Ue * .4, c = t === "donut" ? Ue * .21 : 0, l = e.reduce((e, t) => e + (t.pricing ?? 0), 0) || 1, d, b = () => {
1204
+ let i = Ke / 2, a = Ge / 2, s = Ge * .4, c = t === "donut" ? Ge * .21 : 0, l = e.reduce((e, t) => e + (t.pricing ?? 0), 0) || 1, d, b = () => {
1197
1205
  p.current++;
1198
1206
  let n = p.current;
1199
- r.clearRect(0, 0, We, Ge);
1207
+ r.clearRect(0, 0, Ke, qe);
1200
1208
  let o = 1 - (1 - Math.min(n / 48, 1)) ** 3;
1201
1209
  M(f.current, y.current), x.current = [];
1202
1210
  let _ = -Math.PI / 2;
@@ -1210,10 +1218,10 @@ function Ke({ rows: e = [], variant: t, className: r, colors: i }) {
1210
1218
  let O = A(n, .03, 3e-4), k = s + b * 6 + (b > 0 ? O * 2 : 0);
1211
1219
  r.beginPath(), r.moveTo(i + Math.cos(_) * c, a + Math.sin(_) * c), r.arc(i, a, k, _, g), c > 0 ? r.arc(i, a, c, g, _, !0) : r.lineTo(i, a), r.closePath(), r.fillStyle = m(y, .7 + b * .2), r.fill(), r.strokeStyle = m(u.bg, .8), r.lineWidth = 1.5, r.stroke(), _ = g;
1212
1220
  }), t === "donut" && e.length > 0 && v(r, i, a, c * .8, u.blue, .06);
1213
- let S = Ue + 12;
1221
+ let S = Ge + 12;
1214
1222
  e.forEach((e, t) => {
1215
1223
  let n = h[t % h.length], i = (e.pricing ?? 0) / l, a = f.current.get(e.id ?? `sl-${t}`) ?? 0, o = S + t * 18;
1216
- r.beginPath(), r.arc(8, o, 4, 0, Math.PI * 2), r.fillStyle = m(n, .8 + a * .2), r.fill(), r.font = "9px 'JetBrains Mono', monospace", r.fillStyle = m(u.t2, .7 + a * .2), r.textAlign = "left", r.fillText(e.vendor, 18, o + 3.5), r.font = "bold 9px 'JetBrains Mono', monospace", r.fillStyle = g(u.t3, n, a), r.textAlign = "right", r.fillText(`${e.pricing ?? 0} (${Math.round(i * 100)}%)`, We - 4, o + 3.5);
1224
+ r.beginPath(), r.arc(8, o, 4, 0, Math.PI * 2), r.fillStyle = m(n, .8 + a * .2), r.fill(), r.font = "9px 'JetBrains Mono', monospace", r.fillStyle = m(u.t2, .7 + a * .2), r.textAlign = "left", r.fillText(e.vendor, 18, o + 3.5), r.font = "bold 9px 'JetBrains Mono', monospace", r.fillStyle = g(u.t3, n, a), r.textAlign = "right", r.fillText(`${e.pricing ?? 0} (${Math.round(i * 100)}%)`, Ke - 4, o + 3.5);
1217
1225
  }), d = requestAnimationFrame(b);
1218
1226
  };
1219
1227
  return b(), () => cancelAnimationFrame(d);
@@ -1227,30 +1235,30 @@ function Ke({ rows: e = [], variant: t, className: r, colors: i }) {
1227
1235
  children: /* @__PURE__ */ c("div", {
1228
1236
  style: {
1229
1237
  position: "relative",
1230
- width: We,
1231
- height: Ge
1238
+ width: Ke,
1239
+ height: qe
1232
1240
  },
1233
1241
  children: [/* @__PURE__ */ s("canvas", {
1234
1242
  ref: o,
1235
1243
  role: "img",
1236
1244
  "aria-label": `${t} chart`,
1237
1245
  style: {
1238
- width: We,
1239
- height: Ge,
1246
+ width: Ke,
1247
+ height: qe,
1240
1248
  display: "block",
1241
1249
  borderRadius: 8
1242
1250
  }
1243
1251
  }), /* @__PURE__ */ s(S, {
1244
1252
  ...b,
1245
- parentW: We,
1246
- parentH: Ge
1253
+ parentW: Ke,
1254
+ parentH: qe
1247
1255
  })]
1248
1256
  })
1249
1257
  });
1250
1258
  }
1251
1259
  //#endregion
1252
1260
  //#region src/components/sankey/SankeySvg.tsx
1253
- function qe(e, t, n, r) {
1261
+ function Ye(e, t, n, r) {
1254
1262
  let i = new Set(t.map((e) => e.source)), a = new Set(t.map((e) => e.target)), o = /* @__PURE__ */ new Map(), s = [];
1255
1263
  for (e.forEach((e) => {
1256
1264
  i.has(e.id) && !a.has(e.id) && s.push({
@@ -1295,8 +1303,8 @@ function qe(e, t, n, r) {
1295
1303
  });
1296
1304
  }), f;
1297
1305
  }
1298
- function Je({ nodes: e, links: t, width: r = 960, height: o = 280, ariaLabel: f, selectedEntity: p, className: h, colors: g }) {
1299
- let y = a(null), x = a(/* @__PURE__ */ new Map()), E = a(0), D = a([]), O = g?.nodes ?? d, k = g?.links ?? u.bd, j = g?.activeLinks ?? u.blue, ee = g?.activeNodes ?? u.blue, N = i(() => qe(e, t, r, o), [
1306
+ function Xe({ nodes: e, links: t, width: r = 960, height: o = 280, ariaLabel: f, selectedEntity: p, className: h, colors: g }) {
1307
+ let y = a(null), x = a(/* @__PURE__ */ new Map()), E = a(0), D = a([]), O = g?.nodes ?? d, k = g?.links ?? u.bd, j = g?.activeLinks ?? u.blue, ee = g?.activeNodes ?? u.blue, N = i(() => Ye(e, t, r, o), [
1300
1308
  e,
1301
1309
  t,
1302
1310
  r,
@@ -1396,7 +1404,7 @@ function Je({ nodes: e, links: t, width: r = 960, height: o = 280, ariaLabel: f,
1396
1404
  }
1397
1405
  //#endregion
1398
1406
  //#region src/canvas/CausalFlowCanvas.tsx
1399
- var Ye = [
1407
+ var Ze = [
1400
1408
  {
1401
1409
  x: .13,
1402
1410
  y: .48
@@ -1429,7 +1437,7 @@ var Ye = [
1429
1437
  x: .92,
1430
1438
  y: .22
1431
1439
  }
1432
- ], Xe = [
1440
+ ], Qe = [
1433
1441
  u.blue,
1434
1442
  u.cyan,
1435
1443
  u.orange,
@@ -1438,7 +1446,7 @@ var Ye = [
1438
1446
  u.green,
1439
1447
  u.amber,
1440
1448
  u.t2
1441
- ], Ze = [
1449
+ ], $e = [
1442
1450
  26,
1443
1451
  24,
1444
1452
  24,
@@ -1448,21 +1456,21 @@ var Ye = [
1448
1456
  22,
1449
1457
  22
1450
1458
  ];
1451
- function Qe(e, t) {
1459
+ function et(e, t) {
1452
1460
  let n = 1 - t;
1453
1461
  return {
1454
1462
  x: n * n * n * e.p0.x + 3 * n * n * t * e.p1.x + 3 * n * t * t * e.p2.x + t * t * t * e.p3.x,
1455
1463
  y: n * n * n * e.p0.y + 3 * n * n * t * e.p1.y + 3 * n * t * t * e.p2.y + t * t * t * e.p3.y
1456
1464
  };
1457
1465
  }
1458
- function $e(e, t) {
1466
+ function tt(e, t) {
1459
1467
  let n = 1 - t, r = 3 * n * n * (e.p1.x - e.p0.x) + 6 * n * t * (e.p2.x - e.p1.x) + 3 * t * t * (e.p3.x - e.p2.x), i = 3 * n * n * (e.p1.y - e.p0.y) + 6 * n * t * (e.p2.y - e.p1.y) + 3 * t * t * (e.p3.y - e.p2.y), a = Math.sqrt(r * r + i * i) || 1;
1460
1468
  return {
1461
1469
  x: -i / a,
1462
1470
  y: r / a
1463
1471
  };
1464
1472
  }
1465
- function et(e, t) {
1473
+ function nt(e, t) {
1466
1474
  let n = t.x - e.x, r = t.y - e.y;
1467
1475
  return {
1468
1476
  p0: {
@@ -1483,7 +1491,7 @@ function et(e, t) {
1483
1491
  }
1484
1492
  };
1485
1493
  }
1486
- function tt({ nodes: e, links: t, width: r = 960, height: o = 280, selectedEntity: l }) {
1494
+ function rt({ nodes: e, links: t, width: r = 960, height: o = 280, selectedEntity: l }) {
1487
1495
  let d = a(null), f = a(0), p = a([]), { hoveredRef: h, tooltip: x, hitZonesRef: T } = C(d, {
1488
1496
  width: r,
1489
1497
  height: o
@@ -1491,15 +1499,15 @@ function tt({ nodes: e, links: t, width: r = 960, height: o = 280, selectedEntit
1491
1499
  let t = /* @__PURE__ */ new Map();
1492
1500
  return e.forEach((e, n) => t.set(e.id, n)), t;
1493
1501
  }, [e]), O = i(() => t.length > 0 ? Math.max(...t.map((e) => e.value)) : 100, [t]), k = (e) => O > 1 ? e / 100 : e, j = i(() => e.map((e, t) => {
1494
- let n = Ye[t % Ye.length];
1502
+ let n = Ze[t % Ze.length];
1495
1503
  return {
1496
1504
  id: e.id,
1497
1505
  label: e.name,
1498
1506
  sub: e.valueLabel ?? "",
1499
1507
  x: n.x * r,
1500
1508
  y: n.y * o,
1501
- r: Ze[t % Ze.length],
1502
- color: Xe[t % Xe.length]
1509
+ r: $e[t % $e.length],
1510
+ color: Qe[t % Qe.length]
1503
1511
  };
1504
1512
  }), [
1505
1513
  e,
@@ -1521,7 +1529,7 @@ function tt({ nodes: e, links: t, width: r = 960, height: o = 280, selectedEntit
1521
1529
  if (t.clearRect(0, 0, r, o), T.current = [], y(t, r, o, e, 50, m(u.blue, .05)), M.forEach((e, n) => {
1522
1530
  let r = j[e.fromIdx], i = j[e.toIdx];
1523
1531
  if (!r || !i) return;
1524
- let a = !!l && (r.id === l || i.id === l), o = g(r.color, i.color, .5), s = a ? .18 : .05, c = a ? .25 : .1, d = et(r, i);
1532
+ let a = !!l && (r.id === l || i.id === l), o = g(r.color, i.color, .5), s = a ? .18 : .05, c = a ? .25 : .1, d = nt(r, i);
1525
1533
  t.beginPath(), t.moveTo(d.p0.x, d.p0.y), t.bezierCurveTo(d.p1.x, d.p1.y, d.p2.x, d.p2.y, d.p3.x, d.p3.y), t.strokeStyle = m(o, s), t.lineWidth = 16, t.lineCap = "round", t.stroke(), t.strokeStyle = m(o, c), t.lineWidth = 1.5, t.stroke();
1526
1534
  for (let t = 0; t < e.conf * 2.5; t++) Math.random() < .45 && p.current.push({
1527
1535
  edgeIdx: n,
@@ -1530,7 +1538,7 @@ function tt({ nodes: e, links: t, width: r = 960, height: o = 280, selectedEntit
1530
1538
  off: (Math.random() - .5) * 13,
1531
1539
  sz: .7 + Math.random() * 2
1532
1540
  });
1533
- let f = Qe(d, .5), h = `${Math.round(e.conf * 100)}%`;
1541
+ let f = et(d, .5), h = `${Math.round(e.conf * 100)}%`;
1534
1542
  t.font = "bold 12px 'JetBrains Mono', monospace", t.textBaseline = "middle";
1535
1543
  let _ = t.measureText(h).width + 14;
1536
1544
  t.fillStyle = "rgba(10,16,24,0.88)", t.beginPath(), t.roundRect(f.x - _ / 2, f.y - 11, _, 22, 6), t.fill(), t.strokeStyle = m(u.cyan, .25), t.lineWidth = 1, t.stroke(), t.fillStyle = m(u.cyan, .9), t.textAlign = "center", t.fillText(h, f.x, f.y);
@@ -1540,7 +1548,7 @@ function tt({ nodes: e, links: t, width: r = 960, height: o = 280, selectedEntit
1540
1548
  if (!n) return !1;
1541
1549
  let r = j[n.fromIdx], i = j[n.toIdx];
1542
1550
  if (!r || !i) return !1;
1543
- let a = et(r, i), o = Qe(a, e.t), s = $e(a, e.t), c = o.x + s.x * e.off, l = o.y + s.y * e.off, u = Math.sin(e.t * Math.PI) * .7, d = g(r.color, i.color, e.t);
1551
+ let a = nt(r, i), o = et(a, e.t), s = tt(a, e.t), c = o.x + s.x * e.off, l = o.y + s.y * e.off, u = Math.sin(e.t * Math.PI) * .7, d = g(r.color, i.color, e.t);
1544
1552
  return v(t, c, l, e.sz * 3, d, u * .1), t.beginPath(), t.arc(c, l, e.sz, 0, Math.PI * 2), t.fillStyle = m(d, u), t.fill(), !0;
1545
1553
  }), p.current.length > 350 && (p.current = p.current.slice(-350)), j.forEach((n, r) => {
1546
1554
  let i = l === n.id, a = h.current === `node-${r}`, o = A(e, .03, 3e-4) * .1 + 1, s = n.r * o * (i ? 1.15 : 1);
@@ -1597,8 +1605,8 @@ function tt({ nodes: e, links: t, width: r = 960, height: o = 280, selectedEntit
1597
1605
  }
1598
1606
  //#endregion
1599
1607
  //#region src/components/sankey/ProcessSankey.tsx
1600
- function nt({ selectedEntity: e, colors: t }) {
1601
- return /* @__PURE__ */ s(tt, {
1608
+ function it({ selectedEntity: e, colors: t }) {
1609
+ return /* @__PURE__ */ s(rt, {
1602
1610
  nodes: Re.nodes,
1603
1611
  links: Re.links,
1604
1612
  width: 960,
@@ -1608,7 +1616,7 @@ function nt({ selectedEntity: e, colors: t }) {
1608
1616
  }
1609
1617
  //#endregion
1610
1618
  //#region src/components/sankey/RankingSankey.tsx
1611
- function rt({ rows: e = [], className: t, colors: n }) {
1619
+ function at({ rows: e = [], className: t, colors: n }) {
1612
1620
  let { nodes: r, links: a } = i(() => {
1613
1621
  let t = e.slice(0, 5);
1614
1622
  return {
@@ -1626,7 +1634,7 @@ function rt({ rows: e = [], className: t, colors: n }) {
1626
1634
  }))
1627
1635
  };
1628
1636
  }, [e]);
1629
- return /* @__PURE__ */ s(Je, {
1637
+ return /* @__PURE__ */ s(Xe, {
1630
1638
  nodes: r,
1631
1639
  links: a,
1632
1640
  width: 760,
@@ -1638,20 +1646,20 @@ function rt({ rows: e = [], className: t, colors: n }) {
1638
1646
  }
1639
1647
  //#endregion
1640
1648
  //#region src/components/balanceScaleChart/BalanceScaleChart.tsx
1641
- var it = 500, at = 320;
1642
- function ot({ left: e, right: t, "data-testid": r }) {
1649
+ var ot = 500, st = 320;
1650
+ function ct({ left: e, right: t, "data-testid": r }) {
1643
1651
  let i = a(null), o = a(0);
1644
1652
  return n(() => {
1645
1653
  let n = i.current;
1646
1654
  if (!n) return;
1647
- let r = _(n, it, at);
1655
+ let r = _(n, ot, st);
1648
1656
  o.current = 0;
1649
- let a = it / 2, s = Math.max(e.value, t.value), c = (e.value - t.value) / s * 14, l, d = () => {
1657
+ let a = ot / 2, s = Math.max(e.value, t.value), c = (e.value - t.value) / s * 14, l, d = () => {
1650
1658
  o.current++;
1651
1659
  let n = o.current;
1652
- r.clearRect(0, 0, it, at);
1660
+ r.clearRect(0, 0, ot, st);
1653
1661
  let i = E(Math.min(n / 80, 1)), p = c * k(Math.min(n / 80, 1)) * Math.PI / 180;
1654
- r.strokeStyle = m(u.bd, .5 * i), r.lineWidth = 2, r.beginPath(), r.moveTo(a, 100), r.lineTo(a, at - 80), r.stroke(), r.beginPath(), r.arc(a, 100, 5 * i, 0, Math.PI * 2), r.fillStyle = u.t2, r.fill();
1662
+ r.strokeStyle = m(u.bd, .5 * i), r.lineWidth = 2, r.beginPath(), r.moveTo(a, 100), r.lineTo(a, st - 80), r.stroke(), r.beginPath(), r.arc(a, 100, 5 * i, 0, Math.PI * 2), r.fillStyle = u.t2, r.fill();
1655
1663
  let h = {
1656
1664
  x: a - Math.cos(p) * 160,
1657
1665
  y: 100 + Math.sin(-p) * 160
@@ -1677,23 +1685,23 @@ function ot({ left: e, right: t, "data-testid": r }) {
1677
1685
  6
1678
1686
  ]), r.fill(), r.stroke(), r.strokeStyle = m(u.t3, .35 * i), r.lineWidth = 1, [-90 / 3, 90 / 3].forEach((e) => {
1679
1687
  r.beginPath(), r.moveTo(g.x + e, g.y + 4), r.lineTo(g.x + e, x), r.stroke();
1680
- }), i > .5 && (r.globalAlpha = Math.min(1, (i - .5) / .5), r.font = "bold 14px 'Satoshi Variable', 'DM Sans', sans-serif", r.fillStyle = u.amber, r.textAlign = "center", r.fillText(t.label, g.x, x + b + 18), r.font = f.font, r.fillStyle = f.color, r.fillText("Submitted", g.x, x + b + 32), r.fillText(`${t.count} quotations`, g.x, x + b + 44), r.globalAlpha = 1), i > .85 && Math.abs(c) > 1 && (r.globalAlpha = Math.min(1, (i - .85) / .15) * .6, r.font = f.font, r.fillStyle = f.color, r.textAlign = "center", r.fillText(`${Math.abs(c).toFixed(1)}° tilt toward accepted`, a, at - 12), r.globalAlpha = 1), l = requestAnimationFrame(d);
1688
+ }), i > .5 && (r.globalAlpha = Math.min(1, (i - .5) / .5), r.font = "bold 14px 'Satoshi Variable', 'DM Sans', sans-serif", r.fillStyle = u.amber, r.textAlign = "center", r.fillText(t.label, g.x, x + b + 18), r.font = f.font, r.fillStyle = f.color, r.fillText("Submitted", g.x, x + b + 32), r.fillText(`${t.count} quotations`, g.x, x + b + 44), r.globalAlpha = 1), i > .85 && Math.abs(c) > 1 && (r.globalAlpha = Math.min(1, (i - .85) / .15) * .6, r.font = f.font, r.fillStyle = f.color, r.textAlign = "center", r.fillText(`${Math.abs(c).toFixed(1)}° tilt toward accepted`, a, st - 12), r.globalAlpha = 1), l = requestAnimationFrame(d);
1681
1689
  };
1682
1690
  return d(), () => cancelAnimationFrame(l);
1683
1691
  }, [e, t]), /* @__PURE__ */ s("div", {
1684
1692
  "data-testid": r,
1685
1693
  style: {
1686
1694
  position: "relative",
1687
- width: it,
1688
- height: at
1695
+ width: ot,
1696
+ height: st
1689
1697
  },
1690
1698
  children: /* @__PURE__ */ s("canvas", {
1691
1699
  ref: i,
1692
1700
  role: "img",
1693
1701
  "aria-label": "Quotation balance — accepted vs submitted quotation value",
1694
1702
  style: {
1695
- width: it,
1696
- height: at,
1703
+ width: ot,
1704
+ height: st,
1697
1705
  display: "block"
1698
1706
  }
1699
1707
  })
@@ -1701,25 +1709,25 @@ function ot({ left: e, right: t, "data-testid": r }) {
1701
1709
  }
1702
1710
  //#endregion
1703
1711
  //#region src/components/areaLineChart/AreaLineChart.tsx
1704
- var st = 680, G = 280;
1705
- function ct({ points: e = [], "data-testid": t }) {
1712
+ var lt = 680, G = 280;
1713
+ function ut({ points: e = [], "data-testid": t }) {
1706
1714
  let r = a(null), o = a(/* @__PURE__ */ new Map()), l = a(0), { hoveredRef: d, tooltip: p, hitZonesRef: h } = C(r, {
1707
- width: st,
1715
+ width: lt,
1708
1716
  height: G
1709
1717
  }), g = i(() => e.filter((e) => typeof e == "object" && !!e), [e]);
1710
1718
  return n(() => {
1711
1719
  let e = r.current;
1712
1720
  if (!e) return;
1713
- let t = _(e, st, G);
1721
+ let t = _(e, lt, G);
1714
1722
  l.current = 0;
1715
- let n = st - 54 - 28, i = G - 30 - 54, a = Math.max(...g.map((e) => e.count), 1), s = g.length, c = s > 1 ? n / (s - 1) : n, p = g.map((e, t) => ({
1723
+ let n = lt - 54 - 28, i = G - 30 - 54, a = Math.max(...g.map((e) => e.count), 1), s = g.length, c = s > 1 ? n / (s - 1) : n, p = g.map((e, t) => ({
1716
1724
  x: 54 + t * c,
1717
1725
  y: 30 + i - e.count / a * i,
1718
1726
  point: e
1719
1727
  })), y, b = () => {
1720
1728
  l.current++;
1721
1729
  let e = l.current;
1722
- t.clearRect(0, 0, st, G);
1730
+ t.clearRect(0, 0, lt, G);
1723
1731
  let r = E(Math.min(e / 72, 1));
1724
1732
  M(o.current, d.current), h.current = [], [
1725
1733
  .25,
@@ -1762,7 +1770,7 @@ function ct({ points: e = [], "data-testid": t }) {
1762
1770
  };
1763
1771
  return b(), () => cancelAnimationFrame(y);
1764
1772
  }, [g]), g.length < 2 ? /* @__PURE__ */ s(F, {
1765
- width: st,
1773
+ width: lt,
1766
1774
  height: G,
1767
1775
  "data-testid": t
1768
1776
  }) : /* @__PURE__ */ s("div", {
@@ -1775,7 +1783,7 @@ function ct({ points: e = [], "data-testid": t }) {
1775
1783
  children: /* @__PURE__ */ c("div", {
1776
1784
  style: {
1777
1785
  position: "relative",
1778
- width: st,
1786
+ width: lt,
1779
1787
  height: G
1780
1788
  },
1781
1789
  children: [/* @__PURE__ */ s("canvas", {
@@ -1783,13 +1791,13 @@ function ct({ points: e = [], "data-testid": t }) {
1783
1791
  role: "img",
1784
1792
  "aria-label": "Trend chart — count over time",
1785
1793
  style: {
1786
- width: st,
1794
+ width: lt,
1787
1795
  height: G,
1788
1796
  display: "block"
1789
1797
  }
1790
1798
  }), /* @__PURE__ */ s(S, {
1791
1799
  ...p,
1792
- parentW: st,
1800
+ parentW: lt,
1793
1801
  parentH: G
1794
1802
  })]
1795
1803
  })
@@ -1797,37 +1805,37 @@ function ct({ points: e = [], "data-testid": t }) {
1797
1805
  }
1798
1806
  //#endregion
1799
1807
  //#region src/components/trend/Trend.tsx
1800
- var lt = 680, K = 280, ut = 54, dt = 28, ft = 64, pt = "500 14px 'Satoshi Variable', 'DM Sans', sans-serif", mt = 12;
1801
- function ht({ points: e = [], "data-testid": t }) {
1808
+ var dt = 680, K = 280, ft = 54, pt = 28, mt = 64, ht = "500 14px 'Satoshi Variable', 'DM Sans', sans-serif", gt = 12;
1809
+ function _t({ points: e = [], "data-testid": t }) {
1802
1810
  let r = a(null), o = a(null), l = a(0), d = i(() => e.filter((e) => typeof e == "object" && !!e), [e]), p = i(() => {
1803
- if (d.length <= 1) return ft;
1811
+ if (d.length <= 1) return mt;
1804
1812
  let e = document.createElement("canvas").getContext("2d");
1805
- if (!e) return ft;
1806
- e.font = pt;
1813
+ if (!e) return mt;
1814
+ e.font = ht;
1807
1815
  let t = Math.max(...d.map((t) => e.measureText(t.week).width));
1808
- return Math.max(ft, t + mt);
1809
- }, [d]), h = Math.max(lt - ut, dt + Math.max(0, d.length - 1) * p), { tooltip: g, hitZonesRef: v } = C(r, {
1816
+ return Math.max(mt, t + gt);
1817
+ }, [d]), h = Math.max(dt - ft, pt + Math.max(0, d.length - 1) * p), { tooltip: g, hitZonesRef: v } = C(r, {
1810
1818
  width: h,
1811
1819
  height: K
1812
1820
  });
1813
1821
  return n(() => {
1814
1822
  let e = r.current;
1815
1823
  if (!e) return;
1816
- let t = _(e, h, K), n = o.current ? _(o.current, ut, K) : null;
1824
+ let t = _(e, h, K), n = o.current ? _(o.current, ft, K) : null;
1817
1825
  l.current = 0;
1818
- let i = h - dt, a = K - 30 - 54, s = Math.max(...d.map((e) => e.count), 1), c = d.length, g = c > 1 ? Math.max(i / (c - 1), p) : i, y = d.map((e, t) => ({
1826
+ let i = h - pt, a = K - 30 - 54, s = Math.max(...d.map((e) => e.count), 1), c = d.length, g = c > 1 ? Math.max(i / (c - 1), p) : i, y = d.map((e, t) => ({
1819
1827
  x: t * g,
1820
1828
  y: 30 + a - e.count / s * a,
1821
1829
  point: e
1822
1830
  }));
1823
- n && (n.clearRect(0, 0, ut, K), n.fillStyle = u.bg, n.fillRect(0, 0, ut, K), [
1831
+ n && (n.clearRect(0, 0, ft, K), n.fillStyle = u.bg, n.fillRect(0, 0, ft, K), [
1824
1832
  .25,
1825
1833
  .5,
1826
1834
  .75,
1827
1835
  1
1828
1836
  ].forEach((e) => {
1829
1837
  let t = 30 + a - e * a;
1830
- n.font = f.font, n.fillStyle = f.color, n.textAlign = "right", n.fillText(String(Math.round(s * e)), ut - 6, t + 3);
1838
+ n.font = f.font, n.fillStyle = f.color, n.textAlign = "right", n.fillText(String(Math.round(s * e)), ft - 6, t + 3);
1831
1839
  }), n.save(), n.translate(12, 30 + a / 2), n.rotate(-Math.PI / 2), n.font = f.font, n.fillStyle = f.color, n.textAlign = "center", n.fillText("Count", 0, 0), n.restore());
1832
1840
  let b, x = () => {
1833
1841
  l.current++;
@@ -1845,7 +1853,7 @@ function ht({ points: e = [], "data-testid": t }) {
1845
1853
  if (o >= 2) {
1846
1854
  t.beginPath(), t.moveTo(y[0].x, 30 + a), t.lineTo(y[0].x, y[0].y);
1847
1855
  for (let e = 1; e < o; e++) {
1848
- let n = r - Math.floor(r), i = e === o - 1 && e === Math.ceil(r), a = i ? y[e - 1].x + (y[e].x - y[e - 1].x) * n : y[e].x, s = i ? y[e - 1].y + (y[e].y - y[e - 1].y) * n : y[e].y;
1856
+ let n = r - Math.floor(r), i = e === o - 1 && e === Math.ceil(r) && n > 0, a = i ? y[e - 1].x + (y[e].x - y[e - 1].x) * n : y[e].x, s = i ? y[e - 1].y + (y[e].y - y[e - 1].y) * n : y[e].y;
1849
1857
  t.lineTo(a, s);
1850
1858
  }
1851
1859
  t.lineTo(y[o - 1].x, 30 + a), t.closePath();
@@ -1854,7 +1862,7 @@ function ht({ points: e = [], "data-testid": t }) {
1854
1862
  }
1855
1863
  t.beginPath();
1856
1864
  for (let e = 0; e < o; e++) {
1857
- let n = r - Math.floor(r), i = e === o - 1 && e > 0 && e === Math.ceil(r), a = i ? y[e - 1].x + (y[e].x - y[e - 1].x) * n : y[e].x, s = i ? y[e - 1].y + (y[e].y - y[e - 1].y) * n : y[e].y;
1865
+ let n = r - Math.floor(r), i = e === o - 1 && e > 0 && e === Math.ceil(r) && n > 0, a = i ? y[e - 1].x + (y[e].x - y[e - 1].x) * n : y[e].x, s = i ? y[e - 1].y + (y[e].y - y[e - 1].y) * n : y[e].y;
1858
1866
  e === 0 ? t.moveTo(a, s) : t.lineTo(a, s);
1859
1867
  }
1860
1868
  t.strokeStyle = m(u.cyan, .85), t.lineWidth = 2, t.stroke(), v.current = [], y.forEach((e, n) => {
@@ -1863,7 +1871,7 @@ function ht({ points: e = [], "data-testid": t }) {
1863
1871
  value: `${e.point.count} submissions`,
1864
1872
  sublabel: `£${e.point.value}M value`,
1865
1873
  color: u.cyan
1866
- }), t.beginPath(), t.arc(e.x, e.y, 3.5, 0, Math.PI * 2), t.fillStyle = m(u.cyan, .8), t.fill(), t.font = pt, t.fillStyle = f.color, t.textAlign = "center", t.fillText(e.point.week, e.x, K - 54 + 14));
1874
+ }), t.beginPath(), t.arc(e.x, e.y, 3.5, 0, Math.PI * 2), t.fillStyle = m(u.cyan, .8), t.fill(), t.font = ht, t.fillStyle = f.color, t.textAlign = n === 0 ? "left" : n === y.length - 1 ? "right" : "center", t.fillText(e.point.week, e.x, K - 54 + 14));
1867
1875
  }), e < 1 && (b = requestAnimationFrame(x));
1868
1876
  };
1869
1877
  return x(), () => cancelAnimationFrame(b);
@@ -1873,7 +1881,7 @@ function ht({ points: e = [], "data-testid": t }) {
1873
1881
  p,
1874
1882
  v
1875
1883
  ]), d.length < 2 ? /* @__PURE__ */ s(F, {
1876
- width: lt,
1884
+ width: dt,
1877
1885
  height: K,
1878
1886
  "data-testid": t
1879
1887
  }) : /* @__PURE__ */ c("div", {
@@ -1887,7 +1895,7 @@ function ht({ points: e = [], "data-testid": t }) {
1887
1895
  ref: o,
1888
1896
  "aria-hidden": "true",
1889
1897
  style: {
1890
- width: ut,
1898
+ width: ft,
1891
1899
  height: K,
1892
1900
  display: "block",
1893
1901
  flexShrink: 0
@@ -1924,31 +1932,38 @@ function ht({ points: e = [], "data-testid": t }) {
1924
1932
  }
1925
1933
  //#endregion
1926
1934
  //#region src/components/proportionalBandChart/ProportionalBandChart.tsx
1927
- var q = 680, gt = 240, _t = {
1935
+ var q = 680, vt = 240;
1936
+ function yt(e, t, n) {
1937
+ if (e.measureText(t).width <= n) return t;
1938
+ let r = t;
1939
+ for (; r.length > 0 && e.measureText(`${r}…`).width > n;) r = r.slice(0, -1);
1940
+ return `${r}…`;
1941
+ }
1942
+ var bt = {
1928
1943
  Critical: u.red,
1929
1944
  High: u.orange,
1930
1945
  Medium: u.amber,
1931
1946
  Low: u.green
1932
1947
  };
1933
- function vt({ severities: e = [], "data-testid": t }) {
1948
+ function xt({ severities: e = [], "data-testid": t }) {
1934
1949
  let r = a(null), o = a(/* @__PURE__ */ new Map()), l = a(0), { hoveredRef: d, tooltip: p, hitZonesRef: h } = C(r, {
1935
1950
  width: q,
1936
- height: gt
1951
+ height: vt
1937
1952
  }), g = i(() => e.filter((e) => typeof e == "object" && !!e), [e]);
1938
1953
  return n(() => {
1939
1954
  let e = r.current;
1940
1955
  if (!e) return;
1941
- let t = _(e, q, gt);
1956
+ let t = _(e, q, vt);
1942
1957
  l.current = 0;
1943
- let n = g.reduce((e, t) => e + t.count, 0), i = q - 28 - 28, a = gt - 50 - 52, s = g.map((e) => e.count / n * i), c, p = () => {
1958
+ let n = g.reduce((e, t) => e + t.count, 0), i = q - 28 - 28, a = vt - 50 - 52, s = g.map((e) => e.count / n * i), c, p = () => {
1944
1959
  l.current++;
1945
1960
  let e = l.current;
1946
- t.clearRect(0, 0, q, gt);
1961
+ t.clearRect(0, 0, q, vt);
1947
1962
  let r = D(Math.min(e / 60, 1));
1948
1963
  M(o.current, d.current), h.current = [], t.strokeStyle = m(u.bd, .2), t.lineWidth = 1, t.beginPath(), t.rect(28, 50, i, a), t.stroke(), t.strokeStyle = m(u.t4, .15), t.lineWidth = 1, t.setLineDash([4, 4]), t.beginPath(), t.moveTo(q / 2, 50), t.lineTo(q / 2, 50 + a), t.stroke(), t.setLineDash([]);
1949
1964
  let _ = 28;
1950
1965
  g.forEach((e, i) => {
1951
- let c = _t[e.severity] ?? u.blue, l = s[i];
1966
+ let c = bt[e.severity] ?? u.blue, l = s[i];
1952
1967
  l * r;
1953
1968
  let d = o.current.get(e.severity) ?? 0, p = _ + l / 2, g = l * .85;
1954
1969
  p - g / 2;
@@ -1960,7 +1975,7 @@ function vt({ severities: e = [], "data-testid": t }) {
1960
1975
  color: c
1961
1976
  }), r > .5) {
1962
1977
  let i = Math.min(1, (r - .5) / .5), o = _ + l / 2;
1963
- t.globalAlpha = i, t.font = "bold " + f.font, t.fillStyle = d > 0 ? c : m(c, .9), t.textAlign = "center", t.fillText(e.severity, o, 38), t.font = "bold " + f.font, t.fillStyle = d > 0 ? u.t1 : m(u.t1, .85), t.fillText(String(e.count), o, 50 + a / 2 + 6), t.font = f.font, t.fillStyle = d > 0 ? c : f.color, t.fillText(`${Math.round(e.count / n * 100)}%`, o, 50 + a + 18), t.globalAlpha = 1;
1978
+ t.globalAlpha = i, t.font = "bold " + f.font, t.fillStyle = d > 0 ? c : m(c, .9), t.textAlign = "center", t.fillText(yt(t, e.severity, l - 12), o, 38), t.font = "bold " + f.font, t.fillStyle = d > 0 ? u.t1 : m(u.t1, .85), t.fillText(String(e.count), o, 50 + a / 2 + 6), t.font = f.font, t.fillStyle = d > 0 ? c : f.color, t.fillText(`${Math.round(e.count / n * 100)}%`, o, 50 + a + 18), t.globalAlpha = 1;
1964
1979
  }
1965
1980
  _ += l;
1966
1981
  });
@@ -1970,14 +1985,14 @@ function vt({ severities: e = [], "data-testid": t }) {
1970
1985
  return p(), () => cancelAnimationFrame(c);
1971
1986
  }, [g]), g.length === 0 ? /* @__PURE__ */ s(F, {
1972
1987
  width: q,
1973
- height: gt,
1988
+ height: vt,
1974
1989
  "data-testid": t
1975
1990
  }) : /* @__PURE__ */ c("div", {
1976
1991
  "data-testid": t,
1977
1992
  style: {
1978
1993
  position: "relative",
1979
1994
  width: q,
1980
- height: gt
1995
+ height: vt
1981
1996
  },
1982
1997
  children: [/* @__PURE__ */ s("canvas", {
1983
1998
  ref: r,
@@ -1985,24 +2000,24 @@ function vt({ severities: e = [], "data-testid": t }) {
1985
2000
  "aria-label": "Early Warning severity distribution — prism spectrum bands",
1986
2001
  style: {
1987
2002
  width: q,
1988
- height: gt,
2003
+ height: vt,
1989
2004
  display: "block"
1990
2005
  }
1991
2006
  }), /* @__PURE__ */ s(S, {
1992
2007
  ...p,
1993
2008
  parentW: q,
1994
- parentH: gt
2009
+ parentH: vt
1995
2010
  })]
1996
2011
  });
1997
2012
  }
1998
2013
  //#endregion
1999
2014
  //#region src/components/hubAndSpokeRadialChart/HubAndSpokeRadialChart.tsx
2000
- var J = 460, Y = 300, yt = {
2015
+ var J = 460, Y = 300, St = {
2001
2016
  Open: u.red,
2002
2017
  Submitted: u.amber,
2003
2018
  Closed: u.green
2004
2019
  };
2005
- function bt({ segments: e = [], title: t, "data-testid": r }) {
2020
+ function Ct({ segments: e = [], title: t, "data-testid": r }) {
2006
2021
  let o = a(null), l = a(0), d = a(/* @__PURE__ */ new Map()), { hoveredRef: p, tooltip: h, hitZonesRef: g } = C(o, {
2007
2022
  width: J,
2008
2023
  height: Y
@@ -2019,14 +2034,14 @@ function bt({ segments: e = [], title: t, "data-testid": r }) {
2019
2034
  let n = t === p.current ? 1 : 0, r = e + (n - e) * .12;
2020
2035
  Math.abs(r - n) < .005 ? n === 0 ? d.current.delete(t) : d.current.set(t, 1) : d.current.set(t, r);
2021
2036
  }), p.current && !d.current.has(p.current) && d.current.set(p.current, 0), y(t, J, Y, e, 40, m(u.blue, .04)), x.forEach((a, o) => {
2022
- let c = o / 3 * Math.PI * 2 - Math.PI / 2, l = n + Math.cos(c) * i, d = r + Math.sin(c) * i, p = yt[a.status] ?? u.blue, h = 2 + a.count / s * 8;
2037
+ let c = o / 3 * Math.PI * 2 - Math.PI / 2, l = n + Math.cos(c) * i, d = r + Math.sin(c) * i, p = St[a.status] ?? u.blue, h = 2 + a.count / s * 8;
2023
2038
  t.beginPath(), t.moveTo(n, r), t.lineTo(l, d), t.strokeStyle = m(p, .08), t.lineWidth = h * 2, t.stroke(), t.beginPath(), t.moveTo(n, r), t.lineTo(l, d), t.strokeStyle = m(p, .25), t.lineWidth = 1, t.stroke();
2024
2039
  let g = (e * .005 + o * .33) % 1, _ = n + (l - n) * g, y = r + (d - r) * g;
2025
2040
  v(t, _, y, 6, p, .4), t.beginPath(), t.arc(_, y, 2, 0, Math.PI * 2), t.fillStyle = m(p, .8), t.fill();
2026
2041
  let b = (n + l) / 2, x = (r + d) / 2;
2027
2042
  t.font = "bold " + f.font, t.textAlign = "center", t.textBaseline = "middle", t.fillStyle = m(p, .85), t.fillText(String(a.count), b, x);
2028
2043
  }), x.forEach((e, o) => {
2029
- let c = o / 3 * Math.PI * 2 - Math.PI / 2, l = n + Math.cos(c) * i, p = r + Math.sin(c) * i, h = yt[e.status] ?? u.blue, _ = 10 + e.count / s * 18, y = d.current.get(e.status) ?? 0;
2044
+ let c = o / 3 * Math.PI * 2 - Math.PI / 2, l = n + Math.cos(c) * i, p = r + Math.sin(c) * i, h = St[e.status] ?? u.blue, _ = 10 + e.count / s * 18, y = d.current.get(e.status) ?? 0;
2030
2045
  v(t, l, p, _ * 2.5, h, .2 + y * .15);
2031
2046
  let b = t.createRadialGradient(l, p - _ * .2, 0, l, p, _);
2032
2047
  b.addColorStop(0, m(h, .8 + y * .2)), b.addColorStop(1, m(h, .4 + y * .1)), t.beginPath(), t.arc(l, p, _, 0, Math.PI * 2), t.fillStyle = b, t.fill(), t.font = "bold " + f.font, t.textAlign = "center", t.textBaseline = "middle", t.fillStyle = m(u.t1, .9), t.fillText(e.status, l, p), w(g.current, e.status, l, p, _ + 6, {
@@ -2076,8 +2091,8 @@ function bt({ segments: e = [], title: t, "data-testid": r }) {
2076
2091
  }
2077
2092
  //#endregion
2078
2093
  //#region src/components/trendChart/TrendChart.tsx
2079
- var xt = 280, X = 96;
2080
- function St({ points: e = [], className: t, colors: r }) {
2094
+ var wt = 280, X = 96;
2095
+ function Tt({ points: e = [], className: t, colors: r }) {
2081
2096
  let o = a(null), d = a(/* @__PURE__ */ new Map()), f = a(0), p = i(() => e.map(([e, t]) => {
2082
2097
  let n = String(t).match(/-?\d+(\.\d+)?/);
2083
2098
  return {
@@ -2085,18 +2100,18 @@ function St({ points: e = [], className: t, colors: r }) {
2085
2100
  value: n ? Number(n[0]) : 0
2086
2101
  };
2087
2102
  }), [e]), { mouseRef: h, hoveredRef: g, tooltip: y, hitZonesRef: b } = C(o, {
2088
- width: xt,
2103
+ width: wt,
2089
2104
  height: X
2090
2105
  });
2091
2106
  return n(() => {
2092
2107
  let e = o.current;
2093
2108
  if (!e) return;
2094
- let t = _(e, xt, X);
2109
+ let t = _(e, wt, X);
2095
2110
  f.current = 0;
2096
2111
  let n = r?.line ?? u.blue, i = r?.point ?? u.blue, a = r?.axisLine ?? u.bd, s, c = () => {
2097
2112
  f.current++;
2098
2113
  let e = f.current;
2099
- if (t.clearRect(0, 0, xt, X), p.length < 2) {
2114
+ if (t.clearRect(0, 0, wt, X), p.length < 2) {
2100
2115
  s = requestAnimationFrame(c);
2101
2116
  return;
2102
2117
  }
@@ -2105,8 +2120,8 @@ function St({ points: e = [], className: t, colors: r }) {
2105
2120
  right: 12,
2106
2121
  top: 16,
2107
2122
  bottom: 20
2108
- }, o = xt - r.left - r.right, l = X - r.top - r.bottom, _ = p.map((e) => e.value), y = Math.min(..._), S = Math.max(..._) - y || 1, C = (e) => r.left + e / (p.length - 1) * o, T = (e) => r.top + (1 - (e - y) / S) * l, E = 1 - (1 - Math.min(e / 48, 1)) ** 3, D = Math.max(2, Math.floor(E * p.length));
2109
- if (M(d.current, g.current), b.current = [], t.strokeStyle = m(a, .3), t.lineWidth = .5, t.setLineDash([]), t.beginPath(), t.moveTo(r.left, X - r.bottom), t.lineTo(xt - r.right, X - r.bottom), t.stroke(), t.font = "9px 'JetBrains Mono', monospace", t.fillStyle = m(u.t4, .9), t.textAlign = "center", p.forEach((e, n) => {
2123
+ }, o = wt - r.left - r.right, l = X - r.top - r.bottom, _ = p.map((e) => e.value), y = Math.min(..._), S = Math.max(..._) - y || 1, C = (e) => r.left + e / (p.length - 1) * o, T = (e) => r.top + (1 - (e - y) / S) * l, E = 1 - (1 - Math.min(e / 48, 1)) ** 3, D = Math.max(2, Math.floor(E * p.length));
2124
+ if (M(d.current, g.current), b.current = [], t.strokeStyle = m(a, .3), t.lineWidth = .5, t.setLineDash([]), t.beginPath(), t.moveTo(r.left, X - r.bottom), t.lineTo(wt - r.right, X - r.bottom), t.stroke(), t.font = "9px 'JetBrains Mono', monospace", t.fillStyle = m(u.t4, .9), t.textAlign = "center", p.forEach((e, n) => {
2110
2125
  t.fillText(e.label.replace("Day ", "D"), C(n), X - 4);
2111
2126
  }), h.current.over && g.current) {
2112
2127
  let e = parseInt(g.current.split("-")[1]);
@@ -2143,7 +2158,7 @@ function St({ points: e = [], className: t, colors: r }) {
2143
2158
  children: /* @__PURE__ */ c("div", {
2144
2159
  style: {
2145
2160
  position: "relative",
2146
- width: xt,
2161
+ width: wt,
2147
2162
  height: X
2148
2163
  },
2149
2164
  children: [/* @__PURE__ */ s("canvas", {
@@ -2151,14 +2166,14 @@ function St({ points: e = [], className: t, colors: r }) {
2151
2166
  role: "img",
2152
2167
  "aria-label": "trend chart",
2153
2168
  style: {
2154
- width: xt,
2169
+ width: wt,
2155
2170
  height: X,
2156
2171
  display: "block",
2157
2172
  borderRadius: 8
2158
2173
  }
2159
2174
  }), /* @__PURE__ */ s(S, {
2160
2175
  ...y,
2161
- parentW: xt,
2176
+ parentW: wt,
2162
2177
  parentH: X
2163
2178
  })]
2164
2179
  })
@@ -2166,21 +2181,21 @@ function St({ points: e = [], className: t, colors: r }) {
2166
2181
  }
2167
2182
  //#endregion
2168
2183
  //#region src/components/segmentedSplitBarChart/SegmentedSplitBarChart.tsx
2169
- var Ct = 680, wt = 8, Tt = 26, Et = 14, Dt = 16, Ot = 32;
2170
- function kt({ items: e = [], "data-testid": t }) {
2171
- let r = a(null), l = a(/* @__PURE__ */ new Map()), d = a(0), [f, h] = o(!1), g = i(() => e.filter((e) => typeof e == "object" && !!e), [e]), y = i(() => f ? g : g.slice(0, wt), [g, f]), b = Dt + Ot + y.length * (Tt + Et) - Et, { hoveredRef: x, tooltip: w, hitZonesRef: E } = C(r, {
2172
- width: Ct,
2184
+ var Et = 680, Dt = 8, Ot = 26, kt = 14, At = 16, jt = 32;
2185
+ function Mt({ items: e = [], "data-testid": t }) {
2186
+ let r = a(null), l = a(/* @__PURE__ */ new Map()), d = a(0), [f, h] = o(!1), g = i(() => e.filter((e) => typeof e == "object" && !!e), [e]), y = i(() => f ? g : g.slice(0, Dt), [g, f]), b = At + jt + y.length * (Ot + kt) - kt, { hoveredRef: x, tooltip: w, hitZonesRef: E } = C(r, {
2187
+ width: Et,
2173
2188
  height: b
2174
2189
  });
2175
2190
  return n(() => {
2176
2191
  let e = r.current;
2177
2192
  if (!e) return;
2178
- let t = _(e, Ct, b);
2193
+ let t = _(e, Et, b);
2179
2194
  d.current = 0;
2180
- let n = Dt, i = Ot, a = Tt, o = Et, s = Ct - 60 - 28, c = Math.max(...y.map((e) => (e.implemented ?? 0) + (e.unimplemented ?? 0))), f = y.length * (a + o) - o, h = n + (b - n - i - f) / 2, g, S = () => {
2195
+ let n = At, i = jt, a = Ot, o = kt, s = Et - 60 - 28, c = Math.max(...y.map((e) => (e.implemented ?? 0) + (e.unimplemented ?? 0))), f = y.length * (a + o) - o, h = n + (b - n - i - f) / 2, g, S = () => {
2181
2196
  d.current++;
2182
2197
  let e = d.current;
2183
- t.clearRect(0, 0, Ct, b);
2198
+ t.clearRect(0, 0, Et, b);
2184
2199
  let n = D(Math.min(e / 60, 1));
2185
2200
  M(l.current, x.current), E.current = [], y.forEach((e, r) => {
2186
2201
  let i = j(n, r, y.length, D), d = h + r * (a + o), f = (e.implemented ?? 0) + (e.unimplemented ?? 0), p = (e.implemented ?? 0) / c * s * i, g = (e.unimplemented ?? 0) / c * s * i, _ = `${e.id}-impl`, b = `${e.id}-un`, x = l.current.get(_) ?? 0, S = l.current.get(b) ?? 0;
@@ -2211,16 +2226,16 @@ function kt({ items: e = [], "data-testid": t }) {
2211
2226
  };
2212
2227
  return S(), () => cancelAnimationFrame(g);
2213
2228
  }, [y, b]), g.length === 0 ? /* @__PURE__ */ s(F, {
2214
- width: Ct,
2229
+ width: Et,
2215
2230
  height: 160,
2216
2231
  "data-testid": t
2217
2232
  }) : /* @__PURE__ */ c("div", {
2218
2233
  "data-testid": t,
2219
- style: { width: Ct },
2234
+ style: { width: Et },
2220
2235
  children: [/* @__PURE__ */ c("div", {
2221
2236
  style: {
2222
2237
  position: "relative",
2223
- width: Ct,
2238
+ width: Et,
2224
2239
  height: b
2225
2240
  },
2226
2241
  children: [/* @__PURE__ */ s("canvas", {
@@ -2228,16 +2243,16 @@ function kt({ items: e = [], "data-testid": t }) {
2228
2243
  role: "img",
2229
2244
  "aria-label": "Implemented vs unimplemented variations per contractor — split bar",
2230
2245
  style: {
2231
- width: Ct,
2246
+ width: Et,
2232
2247
  height: b,
2233
2248
  display: "block"
2234
2249
  }
2235
2250
  }), /* @__PURE__ */ s(S, {
2236
2251
  ...w,
2237
- parentW: Ct,
2252
+ parentW: Et,
2238
2253
  parentH: b
2239
2254
  })]
2240
- }), g.length > wt && /* @__PURE__ */ s("div", {
2255
+ }), g.length > Dt && /* @__PURE__ */ s("div", {
2241
2256
  style: { marginTop: 8 },
2242
2257
  children: /* @__PURE__ */ s(ae, {
2243
2258
  expanded: f,
@@ -2248,18 +2263,18 @@ function kt({ items: e = [], "data-testid": t }) {
2248
2263
  }
2249
2264
  //#endregion
2250
2265
  //#region src/components/weeklyFlow/WeeklyFlow.tsx
2251
- var At = 800, jt = 360;
2252
- function Mt({ items: e = [], "data-testid": t }) {
2266
+ var Nt = 800, Pt = 360;
2267
+ function Ft({ items: e = [], "data-testid": t }) {
2253
2268
  let r = a(null), i = a(/* @__PURE__ */ new Map()), o = a(0), { hoveredRef: l, tooltip: f, hitZonesRef: p } = C(r, {
2254
- width: At,
2255
- height: jt
2269
+ width: Nt,
2270
+ height: Pt
2256
2271
  });
2257
2272
  return n(() => {
2258
2273
  let t = r.current;
2259
2274
  if (!t) return;
2260
- let n = _(t, At, jt);
2275
+ let n = _(t, Nt, Pt);
2261
2276
  o.current = 0;
2262
- let a = e.reduce((e, t) => e + (t.base ?? 0), 0), s = e.reduce((e, t) => e + (t.variation ?? 0), 0), c = e.reduce((e, t) => e + (t.total ?? 0), 0), f = jt - 20 - 26, h = f - 6 * (e.length - 1), g = 20, y = e.map((e, t) => {
2277
+ let a = e.reduce((e, t) => e + (t.base ?? 0), 0), s = e.reduce((e, t) => e + (t.variation ?? 0), 0), c = e.reduce((e, t) => e + (t.total ?? 0), 0), f = Pt - 20 - 26, h = f - 6 * (e.length - 1), g = 20, y = e.map((e, t) => {
2263
2278
  let n = Math.max(24, (e.total ?? 0) / (c || 1) * h), r = {
2264
2279
  x: 100 - 110 / 2,
2265
2280
  y: g,
@@ -2287,16 +2302,16 @@ function Mt({ items: e = [], "data-testid": t }) {
2287
2302
  }, k, A = () => {
2288
2303
  o.current++;
2289
2304
  let t = o.current;
2290
- n.clearRect(0, 0, At, jt);
2305
+ n.clearRect(0, 0, Nt, Pt);
2291
2306
  let r = E(Math.min(t / 80, 1));
2292
2307
  if (M(i.current, l.current), p.current = [], e.forEach((t, o) => {
2293
2308
  let c = y[o], l = j(r, o, e.length, E), u = i.current.get(t.id) ?? 0;
2294
2309
  if (l < .01) return;
2295
2310
  let d = (t.base ?? 0) / (t.total || 1), f = (t.variation ?? 0) / (t.total || 1), p = c.h * d, m = c.h * f, h = c.y + p / 2, g = c.y + p + m / 2, _ = Math.max(2, (t.base ?? 0) / a * x), v = Math.max(2, (t.variation ?? 0) / s * S), b = w.y + e.slice(0, o).reduce((e, t) => e + (t.base ?? 0) / a * x, 0) + _ / 2, C = D.y + e.slice(0, o).reduce((e, t) => e + (t.variation ?? 0) / s * S, 0) + v / 2, T = u * .2 + .18;
2296
- Nt(n, c.x + 110, h, 420 - 110 / 2, b, _ * l, c.color, T), Nt(n, c.x + 110, g, 420 - 110 / 2, C, v * l, c.color, T * .75);
2311
+ It(n, c.x + 110, h, 420 - 110 / 2, b, _ * l, c.color, T), It(n, c.x + 110, g, 420 - 110 / 2, C, v * l, c.color, T * .75);
2297
2312
  }), r > .3) {
2298
2313
  let e = Math.min(1, (r - .3) / .7), t = O.y + a / c * f / 2, i = O.y + f - s / c * f / 2;
2299
- Nt(n, 475, w.cy, 720 - 110 / 2, t, x * e, u.blue, .25 * e), Nt(n, 475, D.cy, 720 - 110 / 2, i, S * e, u.amber, .22 * e);
2314
+ It(n, 475, w.cy, 720 - 110 / 2, t, x * e, u.blue, .25 * e), It(n, 475, D.cy, 720 - 110 / 2, i, S * e, u.amber, .22 * e);
2300
2315
  }
2301
2316
  if ([
2302
2317
  "Contractors",
@@ -2308,7 +2323,7 @@ function Mt({ items: e = [], "data-testid": t }) {
2308
2323
  420,
2309
2324
  720
2310
2325
  ][t];
2311
- n.font = "400 12px 'Satoshi Variable', 'DM Sans', sans-serif", n.fillStyle = m(u.t3, .5), n.textAlign = "center", n.fillText(e, r, jt - 8);
2326
+ n.font = "400 12px 'Satoshi Variable', 'DM Sans', sans-serif", n.fillStyle = m(u.t3, .5), n.textAlign = "center", n.fillText(e, r, Pt - 8);
2312
2327
  }), e.forEach((t, a) => {
2313
2328
  let o = y[a], s = j(r, a, e.length, E), c = i.current.get(t.id) ?? 0;
2314
2329
  T(p.current, t.id, o.x, o.y, 110, o.h, {
@@ -2332,32 +2347,32 @@ function Mt({ items: e = [], "data-testid": t }) {
2332
2347
  "data-testid": t,
2333
2348
  style: {
2334
2349
  position: "relative",
2335
- width: At,
2336
- height: jt
2350
+ width: Nt,
2351
+ height: Pt
2337
2352
  },
2338
2353
  children: [/* @__PURE__ */ s("canvas", {
2339
2354
  ref: r,
2340
2355
  role: "img",
2341
2356
  "aria-label": "Weekly report flow — base value and variations per contractor flowing to total commitment",
2342
2357
  style: {
2343
- width: At,
2344
- height: jt,
2358
+ width: Nt,
2359
+ height: Pt,
2345
2360
  display: "block"
2346
2361
  }
2347
2362
  }), /* @__PURE__ */ s(S, {
2348
2363
  ...f,
2349
- parentW: At,
2350
- parentH: jt
2364
+ parentW: Nt,
2365
+ parentH: Pt
2351
2366
  })]
2352
2367
  });
2353
2368
  }
2354
- function Nt(e, t, n, r, i, a, o, s) {
2369
+ function It(e, t, n, r, i, a, o, s) {
2355
2370
  let c = (t + r) / 2;
2356
2371
  e.beginPath(), e.moveTo(t, n - a / 2), e.bezierCurveTo(c, n - a / 2, c, i - a / 2, r, i - a / 2), e.lineTo(r, i + a / 2), e.bezierCurveTo(c, i + a / 2, c, n + a / 2, t, n + a / 2), e.closePath(), e.fillStyle = m(o, s), e.fill();
2357
2372
  }
2358
2373
  //#endregion
2359
2374
  //#region src/components/visualizationRenderer/VisualizationRenderer.tsx
2360
- function Pt({ config: e, className: t }) {
2375
+ function Lt({ config: e, className: t }) {
2361
2376
  return e.type === "line" ? /* @__PURE__ */ s(Ie, {
2362
2377
  rows: e.rows,
2363
2378
  className: t
@@ -2367,77 +2382,77 @@ function Pt({ config: e, className: t }) {
2367
2382
  }) : e.type === "bar" ? /* @__PURE__ */ s(ie, {
2368
2383
  rows: e.rows,
2369
2384
  className: t
2370
- }) : e.type === "pie" ? /* @__PURE__ */ s(Ke, {
2385
+ }) : e.type === "pie" ? /* @__PURE__ */ s(Je, {
2371
2386
  rows: e.rows,
2372
2387
  variant: "pie",
2373
2388
  className: t
2374
- }) : e.type === "donut" ? /* @__PURE__ */ s(Ke, {
2389
+ }) : e.type === "donut" ? /* @__PURE__ */ s(Je, {
2375
2390
  rows: e.rows,
2376
2391
  variant: "donut",
2377
2392
  className: t
2378
- }) : e.type === "sankey" ? /* @__PURE__ */ s(rt, {
2393
+ }) : e.type === "sankey" ? /* @__PURE__ */ s(at, {
2379
2394
  rows: e.rows,
2380
2395
  className: t
2381
- }) : e.type === "flow" ? /* @__PURE__ */ s(nt, {
2396
+ }) : e.type === "flow" ? /* @__PURE__ */ s(it, {
2382
2397
  selectedEntity: e.selectedEntity,
2383
2398
  className: t
2384
- }) : e.type === "trend" ? /* @__PURE__ */ s(St, {
2399
+ }) : e.type === "trend" ? /* @__PURE__ */ s(Tt, {
2385
2400
  points: e.points,
2386
2401
  className: t
2387
2402
  }) : e.type === "mini-bars" ? /* @__PURE__ */ s(ze, {
2388
2403
  rows: e.rows,
2389
2404
  className: t
2390
- }) : e.type === "stacked-horizontal-bar-chart" ? /* @__PURE__ */ s(ke, { data: e.data }) : e.type === "multi-metric-constellation-chart" ? /* @__PURE__ */ s(Se, { items: e.items }) : e.type === "progress-race-chart" ? /* @__PURE__ */ s(fe, { items: e.items }) : e.type === "hub-and-spoke-radial-chart" ? /* @__PURE__ */ s(bt, {
2405
+ }) : e.type === "stacked-horizontal-bar-chart" ? /* @__PURE__ */ s(ke, { data: e.data }) : e.type === "multi-metric-constellation-chart" ? /* @__PURE__ */ s(Se, { items: e.items }) : e.type === "progress-race-chart" ? /* @__PURE__ */ s(fe, { items: e.items }) : e.type === "hub-and-spoke-radial-chart" ? /* @__PURE__ */ s(Ct, {
2391
2406
  segments: e.segments,
2392
2407
  title: e.title
2393
- }) : e.type === "dot-matrix-chart" ? /* @__PURE__ */ s(Fe, { items: e.items }) : e.type === "ranked-card-leaderboard" ? /* @__PURE__ */ s(Pe, { items: e.items }) : e.type === "proportional-band-chart" ? /* @__PURE__ */ s(vt, { severities: e.severities }) : e.type === "radial-fan-tree-chart" ? /* @__PURE__ */ s(He, {
2408
+ }) : e.type === "dot-matrix-chart" ? /* @__PURE__ */ s(Fe, { items: e.items }) : e.type === "ranked-card-leaderboard" ? /* @__PURE__ */ s(Pe, { items: e.items }) : e.type === "proportional-band-chart" ? /* @__PURE__ */ s(xt, { severities: e.severities }) : e.type === "radial-fan-tree-chart" ? /* @__PURE__ */ s(We, {
2394
2409
  total: e.total,
2395
2410
  items: e.items
2396
2411
  }) : e.type === "semi-circular-gauge-chart" ? /* @__PURE__ */ s(he, {
2397
2412
  value: e.value,
2398
2413
  confirmed: e.confirmed,
2399
2414
  total: e.total
2400
- }) : e.type === "segmented-split-bar-chart" ? /* @__PURE__ */ s(kt, { items: e.items }) : e.type === "balance-scale-chart" ? /* @__PURE__ */ s(ot, {
2415
+ }) : e.type === "segmented-split-bar-chart" ? /* @__PURE__ */ s(Mt, { items: e.items }) : e.type === "balance-scale-chart" ? /* @__PURE__ */ s(ct, {
2401
2416
  left: e.left,
2402
2417
  right: e.right
2403
- }) : e.type === "area-line-chart" ? /* @__PURE__ */ s(ct, { points: e.points }) : e.type === "trend-view" ? /* @__PURE__ */ s(ht, { points: e.points }) : e.type === "weekly-flow" ? /* @__PURE__ */ s(Mt, { items: e.items }) : /* @__PURE__ */ s("div", {
2418
+ }) : e.type === "area-line-chart" ? /* @__PURE__ */ s(ut, { points: e.points }) : e.type === "trend-view" ? /* @__PURE__ */ s(_t, { points: e.points }) : e.type === "weekly-flow" ? /* @__PURE__ */ s(Ft, { items: e.items }) : /* @__PURE__ */ s("div", {
2404
2419
  className: "viz-empty",
2405
2420
  children: "Visualization unavailable"
2406
2421
  });
2407
2422
  }
2408
2423
  //#endregion
2409
2424
  //#region src/utils/mounts.tsx
2410
- var Ft = [];
2411
- function It(e) {
2425
+ var Rt = [];
2426
+ function zt(e) {
2412
2427
  try {
2413
2428
  return JSON.parse(decodeURIComponent(e));
2414
2429
  } catch {
2415
2430
  return null;
2416
2431
  }
2417
2432
  }
2418
- function Lt() {
2419
- for (; Ft.length;) {
2420
- let e = Ft.pop();
2433
+ function Bt() {
2434
+ for (; Rt.length;) {
2435
+ let e = Rt.pop();
2421
2436
  e && e.unmount();
2422
2437
  }
2423
2438
  }
2424
- function Rt() {
2425
- Lt(), document.querySelectorAll("[data-d3-viz]").forEach((t) => {
2439
+ function Vt() {
2440
+ Bt(), document.querySelectorAll("[data-d3-viz]").forEach((t) => {
2426
2441
  let n = t.dataset.d3Viz;
2427
2442
  if (!n) return;
2428
- let r = It(n);
2443
+ let r = zt(n);
2429
2444
  if (!r) return;
2430
2445
  let i = e(t);
2431
- Ft.push(i), i.render(/* @__PURE__ */ s(Pt, { config: r }));
2446
+ Rt.push(i), i.render(/* @__PURE__ */ s(Lt, { config: r }));
2432
2447
  });
2433
2448
  }
2434
- function zt(e) {
2449
+ function Ht(e) {
2435
2450
  return encodeURIComponent(JSON.stringify(e));
2436
2451
  }
2437
2452
  //#endregion
2438
2453
  //#region src/components/donutChart/DonutChart.tsx
2439
- function Bt({ rows: e = [], className: t, colors: n }) {
2440
- return /* @__PURE__ */ s(Ke, {
2454
+ function Ut({ rows: e = [], className: t, colors: n }) {
2455
+ return /* @__PURE__ */ s(Je, {
2441
2456
  rows: e,
2442
2457
  variant: "donut",
2443
2458
  className: t,
@@ -2456,7 +2471,7 @@ var Z = {
2456
2471
  red: u.red,
2457
2472
  amber: u.amber,
2458
2473
  green: u.green
2459
- }, Q = "'Satoshi Variable', 'DM Sans', sans-serif", Vt = {
2474
+ }, Q = "'Satoshi Variable', 'DM Sans', sans-serif", Wt = {
2460
2475
  color: "#F7F7F7",
2461
2476
  fontFamily: Q,
2462
2477
  fontSize: 24,
@@ -2469,7 +2484,7 @@ var Z = {
2469
2484
  fontWeight: 400,
2470
2485
  lineHeight: "20px"
2471
2486
  };
2472
- function Ht({ chips: e = [] }) {
2487
+ function Gt({ chips: e = [] }) {
2473
2488
  return /* @__PURE__ */ s("div", {
2474
2489
  style: {
2475
2490
  display: "flex",
@@ -2491,7 +2506,7 @@ function Ht({ chips: e = [] }) {
2491
2506
  },
2492
2507
  children: [/* @__PURE__ */ s("span", {
2493
2508
  style: {
2494
- ...Vt,
2509
+ ...Wt,
2495
2510
  color: e.color ?? Z.t1
2496
2511
  },
2497
2512
  children: e.value
@@ -2505,7 +2520,7 @@ function Ht({ chips: e = [] }) {
2505
2520
  }, t))
2506
2521
  });
2507
2522
  }
2508
- function Ut({ items: e = [] }) {
2523
+ function Kt({ items: e = [] }) {
2509
2524
  return /* @__PURE__ */ s("div", {
2510
2525
  style: {
2511
2526
  display: "flex",
@@ -2528,7 +2543,7 @@ function Ut({ items: e = [] }) {
2528
2543
  },
2529
2544
  children: [/* @__PURE__ */ s("div", {
2530
2545
  style: {
2531
- ...Vt,
2546
+ ...Wt,
2532
2547
  color: e.color ?? Z.t1
2533
2548
  },
2534
2549
  children: e.value
@@ -2539,7 +2554,7 @@ function Ut({ items: e = [] }) {
2539
2554
  }, t))
2540
2555
  });
2541
2556
  }
2542
- function Wt({ items: e = [] }) {
2557
+ function qt({ items: e = [] }) {
2543
2558
  return /* @__PURE__ */ s("div", {
2544
2559
  style: {
2545
2560
  display: "flex",
@@ -2571,7 +2586,7 @@ function Wt({ items: e = [] }) {
2571
2586
  }),
2572
2587
  /* @__PURE__ */ s("span", {
2573
2588
  style: {
2574
- ...Vt,
2589
+ ...Wt,
2575
2590
  fontSize: 16,
2576
2591
  color: e.color ?? Z.t1,
2577
2592
  minWidth: 70,
@@ -2590,7 +2605,7 @@ function Wt({ items: e = [] }) {
2590
2605
  }, t))
2591
2606
  });
2592
2607
  }
2593
- function Gt({ items: e = [] }) {
2608
+ function Jt({ items: e = [] }) {
2594
2609
  return /* @__PURE__ */ s("div", {
2595
2610
  style: {
2596
2611
  display: "flex",
@@ -2613,7 +2628,7 @@ function Gt({ items: e = [] }) {
2613
2628
  },
2614
2629
  children: [/* @__PURE__ */ s("div", {
2615
2630
  style: {
2616
- ...Vt,
2631
+ ...Wt,
2617
2632
  color: e.color ?? Z.t1
2618
2633
  },
2619
2634
  children: e.value
@@ -2624,12 +2639,12 @@ function Gt({ items: e = [] }) {
2624
2639
  }, t))
2625
2640
  });
2626
2641
  }
2627
- var Kt = {
2642
+ var Yt = {
2628
2643
  red: Z.red,
2629
2644
  amber: Z.amber,
2630
2645
  green: Z.green
2631
2646
  };
2632
- function qt({ items: e = [] }) {
2647
+ function Xt({ items: e = [] }) {
2633
2648
  return /* @__PURE__ */ s("div", {
2634
2649
  style: {
2635
2650
  display: "flex",
@@ -2637,7 +2652,7 @@ function qt({ items: e = [] }) {
2637
2652
  gap: 5
2638
2653
  },
2639
2654
  children: e.map((e, t) => {
2640
- let n = Kt[e.severity];
2655
+ let n = Yt[e.severity];
2641
2656
  return /* @__PURE__ */ c("div", {
2642
2657
  style: {
2643
2658
  display: "flex",
@@ -2662,7 +2677,7 @@ function qt({ items: e = [] }) {
2662
2677
  })
2663
2678
  });
2664
2679
  }
2665
- function Jt({ min: e, max: t, unit: n, dots: r = [], chips: i = [] }) {
2680
+ function Zt({ min: e, max: t, unit: n, dots: r = [], chips: i = [] }) {
2666
2681
  let a = t - e;
2667
2682
  return /* @__PURE__ */ c("div", { children: [/* @__PURE__ */ c("div", {
2668
2683
  style: {
@@ -2772,9 +2787,9 @@ function Jt({ min: e, max: t, unit: n, dots: r = [], chips: i = [] }) {
2772
2787
  }, r);
2773
2788
  })
2774
2789
  ]
2775
- }), i && i.length > 0 && /* @__PURE__ */ s(Ht, { chips: i })] });
2790
+ }), i && i.length > 0 && /* @__PURE__ */ s(Gt, { chips: i })] });
2776
2791
  }
2777
- function Yt({ leftPct: e, leftLabel: t, leftValue: n, leftColor: r, rightPct: i, rightLabel: a, rightValue: o, rightColor: l, chips: d }) {
2792
+ function Qt({ leftPct: e, leftLabel: t, leftValue: n, leftColor: r, rightPct: i, rightLabel: a, rightValue: o, rightColor: l, chips: d }) {
2778
2793
  let f = r ?? u.blue, p = l ?? u.cyan;
2779
2794
  return /* @__PURE__ */ c("div", { children: [
2780
2795
  /* @__PURE__ */ c("div", {
@@ -2868,10 +2883,10 @@ function Yt({ leftPct: e, leftLabel: t, leftValue: n, leftColor: r, rightPct: i,
2868
2883
  })
2869
2884
  })]
2870
2885
  }),
2871
- d && d.length > 0 && /* @__PURE__ */ s(Ht, { chips: d })
2886
+ d && d.length > 0 && /* @__PURE__ */ s(Gt, { chips: d })
2872
2887
  ] });
2873
2888
  }
2874
- function Xt({ pct: e, label: t, color: n, chips: r }) {
2889
+ function $t({ pct: e, label: t, color: n, chips: r }) {
2875
2890
  let i = n ?? u.blue, a = 2 * Math.PI * 30, o = a * (1 - e / 100);
2876
2891
  return /* @__PURE__ */ c("div", {
2877
2892
  style: {
@@ -2952,7 +2967,7 @@ function Xt({ pct: e, label: t, color: n, chips: r }) {
2952
2967
  },
2953
2968
  children: [/* @__PURE__ */ s("span", {
2954
2969
  style: {
2955
- ...Vt,
2970
+ ...Wt,
2956
2971
  color: e.color ?? Z.t1
2957
2972
  },
2958
2973
  children: e.value
@@ -2965,16 +2980,16 @@ function Xt({ pct: e, label: t, color: n, chips: r }) {
2965
2980
  })]
2966
2981
  });
2967
2982
  }
2968
- var Zt = {
2983
+ var en = {
2969
2984
  green: "#34D39918",
2970
2985
  amber: "#FBBF2418",
2971
2986
  red: "#F0606018"
2972
- }, Qt = {
2987
+ }, tn = {
2973
2988
  green: "#34D399",
2974
2989
  amber: "#FBBF24",
2975
2990
  red: "#F06060"
2976
2991
  };
2977
- function $t({ items: e = [] }) {
2992
+ function nn({ items: e = [] }) {
2978
2993
  return /* @__PURE__ */ s("div", {
2979
2994
  style: {
2980
2995
  display: "flex",
@@ -3038,8 +3053,8 @@ function $t({ items: e = [] }) {
3038
3053
  style: {
3039
3054
  fontSize: 16,
3040
3055
  fontWeight: 600,
3041
- color: Qt[e.badgeSeverity],
3042
- background: Zt[e.badgeSeverity],
3056
+ color: tn[e.badgeSeverity],
3057
+ background: en[e.badgeSeverity],
3043
3058
  padding: "2px 7px",
3044
3059
  borderRadius: 4,
3045
3060
  fontFamily: Q,
@@ -3062,12 +3077,12 @@ function $t({ items: e = [] }) {
3062
3077
  }, t))
3063
3078
  });
3064
3079
  }
3065
- var en = {
3080
+ var rn = {
3066
3081
  red: Z.red,
3067
3082
  amber: Z.amber,
3068
3083
  green: Z.green
3069
3084
  };
3070
- function tn({ items: e = [] }) {
3085
+ function an({ items: e = [] }) {
3071
3086
  return /* @__PURE__ */ s("div", {
3072
3087
  style: {
3073
3088
  display: "flex",
@@ -3075,7 +3090,7 @@ function tn({ items: e = [] }) {
3075
3090
  gap: 5
3076
3091
  },
3077
3092
  children: e.map((e, t) => {
3078
- let n = en[e.severity];
3093
+ let n = rn[e.severity];
3079
3094
  return /* @__PURE__ */ c("div", {
3080
3095
  style: {
3081
3096
  display: "flex",
@@ -3127,7 +3142,7 @@ function tn({ items: e = [] }) {
3127
3142
  })
3128
3143
  });
3129
3144
  }
3130
- function nn({ columns: e = [], rows: t = [] }) {
3145
+ function on({ columns: e = [], rows: t = [] }) {
3131
3146
  return /* @__PURE__ */ c("div", {
3132
3147
  style: {
3133
3148
  display: "flex",
@@ -3190,7 +3205,7 @@ function nn({ columns: e = [], rows: t = [] }) {
3190
3205
  }, t))]
3191
3206
  });
3192
3207
  }
3193
- function rn({ text: e }) {
3208
+ function sn({ text: e }) {
3194
3209
  return /* @__PURE__ */ c("div", {
3195
3210
  style: {
3196
3211
  padding: "8px 12px",
@@ -3215,22 +3230,22 @@ function rn({ text: e }) {
3215
3230
  })]
3216
3231
  });
3217
3232
  }
3218
- function an({ block: e }) {
3233
+ function cn({ block: e }) {
3219
3234
  if (!e) return null;
3220
3235
  let t = (() => {
3221
3236
  switch (e.type) {
3222
- case "stats": return /* @__PURE__ */ s(Ut, { items: e.items });
3223
- case "ranked": return /* @__PURE__ */ s(Wt, { items: e.items });
3224
- case "chips": return /* @__PURE__ */ s(Gt, { items: e.items });
3225
- case "badges": return /* @__PURE__ */ s(qt, { items: e.items });
3226
- case "dot-strip": return /* @__PURE__ */ s(Jt, {
3237
+ case "stats": return /* @__PURE__ */ s(Kt, { items: e.items });
3238
+ case "ranked": return /* @__PURE__ */ s(qt, { items: e.items });
3239
+ case "chips": return /* @__PURE__ */ s(Jt, { items: e.items });
3240
+ case "badges": return /* @__PURE__ */ s(Xt, { items: e.items });
3241
+ case "dot-strip": return /* @__PURE__ */ s(Zt, {
3227
3242
  min: e.min,
3228
3243
  max: e.max,
3229
3244
  unit: e.unit,
3230
3245
  dots: e.dots,
3231
3246
  chips: e.chips
3232
3247
  });
3233
- case "proportion": return /* @__PURE__ */ s(Yt, {
3248
+ case "proportion": return /* @__PURE__ */ s(Qt, {
3234
3249
  leftPct: e.leftPct,
3235
3250
  leftLabel: e.leftLabel,
3236
3251
  leftValue: e.leftValue,
@@ -3241,15 +3256,15 @@ function an({ block: e }) {
3241
3256
  rightColor: e.rightColor,
3242
3257
  chips: e.chips
3243
3258
  });
3244
- case "ring": return /* @__PURE__ */ s(Xt, {
3259
+ case "ring": return /* @__PURE__ */ s($t, {
3245
3260
  pct: e.pct,
3246
3261
  label: e.label,
3247
3262
  color: e.color,
3248
3263
  chips: e.chips
3249
3264
  });
3250
- case "scorecard-rows": return /* @__PURE__ */ s($t, { items: e.items });
3251
- case "flags-list": return /* @__PURE__ */ s(tn, { items: e.items });
3252
- case "comparison-rows": return /* @__PURE__ */ s(nn, {
3265
+ case "scorecard-rows": return /* @__PURE__ */ s(nn, { items: e.items });
3266
+ case "flags-list": return /* @__PURE__ */ s(an, { items: e.items });
3267
+ case "comparison-rows": return /* @__PURE__ */ s(on, {
3253
3268
  columns: e.columns,
3254
3269
  rows: e.rows
3255
3270
  });
@@ -3262,8 +3277,8 @@ function an({ block: e }) {
3262
3277
  flexDirection: "column",
3263
3278
  gap: 24
3264
3279
  },
3265
- children: [t, /* @__PURE__ */ s(rn, { text: e.takeaway })]
3280
+ children: [t, /* @__PURE__ */ s(sn, { text: e.takeaway })]
3266
3281
  }) : t;
3267
3282
  }
3268
3283
  //#endregion
3269
- export { ne as AreaChart, ie as BarChart, l as ChartFrame, Bt as DonutChart, an as KeyHighlights, Ie as LineChart, ze as MiniBars, Ke as PieChart, nt as ProcessSankey, rt as RankingSankey, Je as SankeySvg, te as SeriesChart, ht as Trend, St as TrendChart, Pt as VisualizationRenderer, Lt as cleanupVisualizationMounts, Rt as hydrateVisualizationMounts, zt as serializeVisualizationConfig };
3284
+ export { ne as AreaChart, ie as BarChart, l as ChartFrame, Ut as DonutChart, cn as KeyHighlights, Ie as LineChart, ze as MiniBars, Je as PieChart, it as ProcessSankey, at as RankingSankey, Xe as SankeySvg, te as SeriesChart, _t as Trend, Tt as TrendChart, Lt as VisualizationRenderer, Bt as cleanupVisualizationMounts, Vt as hydrateVisualizationMounts, Ht as serializeVisualizationConfig };