@divami-artefacts/ai-design-system 1.0.26 → 1.0.28

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
@@ -498,13 +498,19 @@ function ae({ expanded: e, onToggle: t, labelExpanded: n = "View Less", labelCol
498
498
  }
499
499
  //#endregion
500
500
  //#region src/components/progressRaceChart/ProgressRaceChart.tsx
501
- var L = 680, R = 42, oe = 10, se = 24, ce = 24, le = 8, ue = [
501
+ var L = 660, R = 42, oe = 10, se = 24, ce = 24, le = 8, ue = [
502
502
  u.green,
503
503
  u.blue,
504
504
  u.amber,
505
505
  u.red
506
506
  ];
507
- function de({ items: e = [], "data-testid": t }) {
507
+ function de(e, t, n) {
508
+ if (e.measureText(t).width <= n) return t;
509
+ let r = t;
510
+ for (; r.length > 0 && e.measureText(r + "…").width > n;) r = r.slice(0, -1);
511
+ return r + "…";
512
+ }
513
+ function fe({ items: e = [], "data-testid": t }) {
508
514
  let r = a(null), l = a(0), d = a(/* @__PURE__ */ new Map()), [m, g] = o(!1), _ = i(() => e.filter((e) => typeof e == "object" && !!e), [e]), S = i(() => [..._].sort((e, t) => (t.percentage ?? 0) - (e.percentage ?? 0)), [_]), E = i(() => m ? S : S.slice(0, le), [S, m]), O = E.length, k = se + ce + O * R + Math.max(0, O - 1) * oe, { hoveredRef: A, tooltip: j, hitZonesRef: M } = w(r, {
509
515
  width: L,
510
516
  height: k
@@ -535,7 +541,7 @@ function de({ items: e = [], "data-testid": t }) {
535
541
  sublabel: `Base: ${r.baseLabel ?? String(r.base ?? 0)} · Variations: ${r.variationLabel ?? String(r.variation ?? 0)}`,
536
542
  color: o
537
543
  };
538
- T(M.current, r.id, u, c + R / 2, 14, m), t.font = p.font, t.fillStyle = h(o, .9 + s * .1), t.textAlign = "left", t.textBaseline = "middle", t.fillText(`${r.percentage ?? 0}%`, u + 10, c + R / 2), t.font = `${s > 0 ? "bold " : ""}` + f.font, t.fillStyle = s > 0 ? o : f.color, t.textAlign = "right", t.fillText(r.abbreviation ?? r.name?.slice(0, 6) ?? "", n - 8, c + R / 2);
544
+ T(M.current, r.id, u, c + R / 2, 14, m), t.font = p.font, t.fillStyle = h(o, .9 + s * .1), t.textAlign = "left", t.textBaseline = "middle", t.fillText(`${r.percentage ?? 0}%`, u + 10, c + R / 2), t.font = `${s > 0 ? "bold " : ""}` + f.font, t.fillStyle = s > 0 ? o : f.color, t.textAlign = "right", t.fillText(de(t, r.abbreviation ?? r.name ?? "", n - 16), n - 8, c + R / 2);
539
545
  }), t.strokeStyle = h(u.t3, .3), t.lineWidth = 1, t.setLineDash([]), t.beginPath(), t.moveTo(n + a, se), t.lineTo(n + a, se + (O - 1) * (R + oe) + R), t.stroke(), x(t, L, k, e, .015), o = requestAnimationFrame(s);
540
546
  };
541
547
  return s(), () => cancelAnimationFrame(o);
@@ -574,18 +580,18 @@ function de({ items: e = [], "data-testid": t }) {
574
580
  }
575
581
  //#endregion
576
582
  //#region src/components/semiCircularGaugeChart/SemiCircularGaugeChart.tsx
577
- var fe = 480, pe = 340;
578
- function me({ value: e, confirmed: t, total: r, "data-testid": i }) {
583
+ var pe = 480, me = 340;
584
+ function he({ value: e, confirmed: t, total: r, "data-testid": i }) {
579
585
  let o = a(null), c = a(0);
580
586
  return n(() => {
581
587
  let n = o.current;
582
588
  if (!n) return;
583
- let i = v(n, fe, pe);
589
+ let i = v(n, pe, me);
584
590
  c.current = 0;
585
- let a = fe / 2, s = Math.PI, l = 2 * Math.PI, d = Math.PI, p, g = () => {
591
+ let a = pe / 2, s = Math.PI, l = 2 * Math.PI, d = Math.PI, p, g = () => {
586
592
  c.current++;
587
593
  let n = c.current;
588
- i.clearRect(0, 0, fe, pe), i.letterSpacing = f.letterSpacing;
594
+ i.clearRect(0, 0, pe, me), i.letterSpacing = f.letterSpacing;
589
595
  let o = D(Math.min(n / 80, 1)), _ = A(Math.min(n / 72, 1));
590
596
  i.beginPath(), i.arc(a, 220, 120, s, l), i.strokeStyle = h(u.bd, .35), i.lineWidth = 46, i.stroke(), [
591
597
  {
@@ -645,16 +651,16 @@ function me({ value: e, confirmed: t, total: r, "data-testid": i }) {
645
651
  "data-testid": i,
646
652
  style: {
647
653
  position: "relative",
648
- width: fe,
649
- height: pe
654
+ width: pe,
655
+ height: me
650
656
  },
651
657
  children: /* @__PURE__ */ s("canvas", {
652
658
  ref: o,
653
659
  role: "img",
654
660
  "aria-label": `Compensation event gauge — ${e}% of NCEs confirmed as compensation events`,
655
661
  style: {
656
- width: fe,
657
- height: pe,
662
+ width: pe,
663
+ height: me,
658
664
  display: "block"
659
665
  }
660
666
  })
@@ -662,7 +668,7 @@ function me({ value: e, confirmed: t, total: r, "data-testid": i }) {
662
668
  }
663
669
  //#endregion
664
670
  //#region src/canvas/useCanvasLoop.ts
665
- function he(e, t, r, i, o = !0, s = {}) {
671
+ function ge(e, t, r, i, o = !0, s = {}) {
666
672
  let c = a(0), { easing: l = D, durationFrames: u = 48 } = s;
667
673
  n(() => {
668
674
  let n = e.current;
@@ -694,7 +700,7 @@ function he(e, t, r, i, o = !0, s = {}) {
694
700
  }
695
701
  //#endregion
696
702
  //#region src/components/multiMetricConstellationChart/MultiMetricConstellationChart.tsx
697
- var z = 780, ge = 234, _e = 130, ve = 52, ye = [
703
+ var z = 780, B = 234, _e = 130, ve = 52, ye = [
698
704
  u.blue,
699
705
  u.amber,
700
706
  u.purple,
@@ -711,7 +717,7 @@ var z = 780, ge = 234, _e = 130, ve = 52, ye = [
711
717
  function Se({ items: e = [], "data-testid": t }) {
712
718
  let n = a(null), r = a(/* @__PURE__ */ new Map()), { hoveredRef: o, tooltip: l, hitZonesRef: d } = w(n, {
713
719
  width: z,
714
- height: ge
720
+ height: B
715
721
  }), p = i(() => e.filter((e) => typeof e == "object" && !!e), [e]), g = i(() => {
716
722
  let e = Math.max(...p.map((e) => e.base ?? 0)), t = Math.max(...p.map((e) => e.variation ?? 0));
717
723
  return p.map((n, r) => {
@@ -747,8 +753,8 @@ function Se({ items: e = [], "data-testid": t }) {
747
753
  };
748
754
  });
749
755
  }, [p]);
750
- return he(n, z, ge, (e, t, n) => {
751
- N(r.current, o.current), d.current = [], b(e, z, ge, n, 30), g.forEach((t, i) => {
756
+ return ge(n, z, B, (e, t, n) => {
757
+ N(r.current, o.current), d.current = [], b(e, z, B, n, 30), g.forEach((t, i) => {
752
758
  let a = t.color, o = `constellation-${i}`, s = r.current.get(o) ?? 0;
753
759
  e.beginPath(), e.arc(t.cx, t.cy, t.baseR + 5, 0, Math.PI * 2), e.strokeStyle = h(u.bd, .08 + .08 * s), e.lineWidth = .5, e.stroke(), e.beginPath(), t.stars.forEach((t, n) => {
754
760
  n === 0 ? e.moveTo(t.x, t.y) : e.lineTo(t.x, t.y);
@@ -768,17 +774,17 @@ function Se({ items: e = [], "data-testid": t }) {
768
774
  sublabel: `${t.percentage ?? 0}% committed · scatter ${t.scatter.toFixed(1)}`,
769
775
  color: a
770
776
  });
771
- }), e.font = m.font, e.textAlign = "center", e.textBaseline = "middle", e.fillStyle = m.color, e.fillText("▲ top = Base value · ▼▸ lower-right = Variations · ◂▼ lower-left = Commitment % · hover stars for details", z / 2, ge - 14), x(e, z, ge, n, .012);
777
+ }), e.font = m.font, e.textAlign = "center", e.textBaseline = "middle", e.fillStyle = m.color, e.fillText("▲ top = Base value · ▼▸ lower-right = Variations · ◂▼ lower-left = Commitment % · hover stars for details", z / 2, B - 14), x(e, z, B, n, .012);
772
778
  }, !0), g.length === 0 ? /* @__PURE__ */ s(I, {
773
779
  width: z,
774
- height: ge,
780
+ height: B,
775
781
  "data-testid": t
776
782
  }) : /* @__PURE__ */ c("div", {
777
783
  "data-testid": t,
778
784
  style: {
779
785
  position: "relative",
780
786
  width: z,
781
- height: ge
787
+ height: B
782
788
  },
783
789
  children: [/* @__PURE__ */ s("canvas", {
784
790
  ref: n,
@@ -786,13 +792,13 @@ function Se({ items: e = [], "data-testid": t }) {
786
792
  "aria-label": "Contract value breakdown per contractor — multi-KPI constellation chart",
787
793
  style: {
788
794
  width: z,
789
- height: ge,
795
+ height: B,
790
796
  display: "block"
791
797
  }
792
798
  }), /* @__PURE__ */ s(C, {
793
799
  ...l,
794
800
  parentW: z,
795
- parentH: ge
801
+ parentH: B
796
802
  })]
797
803
  });
798
804
  }
@@ -803,12 +809,12 @@ var Ce = 680, we = 220, Te = 8, Ee = [
803
809
  u.amber,
804
810
  u.purple,
805
811
  u.green
806
- ], B = {
812
+ ], V = {
807
813
  left: 8,
808
814
  right: 80,
809
815
  top: 16,
810
816
  bottom: 38
811
- }, De = 150, V = 18;
817
+ }, De = 150, H = 18;
812
818
  function Oe(e, t, n) {
813
819
  if (e.measureText(t).width <= n) return t;
814
820
  let r = t;
@@ -820,27 +826,27 @@ function ke(e) {
820
826
  return t >= 1e6 ? `${n}£${(t / 1e6).toFixed(1)}M` : t >= 1e3 ? `${n}£${(t / 1e3).toFixed(1)}K` : `${n}£${t.toFixed(0)}`;
821
827
  }
822
828
  function Ae({ data: e, "data-testid": t }) {
823
- let n = a(null), r = a(/* @__PURE__ */ new Map()), [i, l] = o(!1), { items: d = [], totals: g } = e, _ = d.filter((e) => typeof e == "object" && !!e), v = [..._].sort((e, t) => (t.total ?? 0) - (e.total ?? 0)), b = i ? v : v.slice(0, Te), x = b.length, S = Math.max(...v.map((e) => Math.abs(e.total ?? 0)), 1), T = Math.max(we, B.top + B.bottom + x * V + Math.max(0, x - 1) * 8), D = Ce - B.left - De - B.right, k = x > 1 ? (T - B.top - B.bottom - x * V) / (x - 1) : 0, A = _.length === 0, { hoveredRef: j, tooltip: P, hitZonesRef: F } = w(n, {
829
+ let n = a(null), r = a(/* @__PURE__ */ new Map()), [i, l] = o(!1), { items: d = [], totals: g } = e, _ = d.filter((e) => typeof e == "object" && !!e), v = [..._].sort((e, t) => (t.total ?? 0) - (e.total ?? 0)), b = i ? v : v.slice(0, Te), x = b.length, S = Math.max(...v.map((e) => Math.abs(e.total ?? 0)), 1), T = x * H + Math.max(0, x - 1) * 8, D = V.top + V.bottom + T, k = Ce - V.left - De - V.right, A = _.length === 0, { hoveredRef: j, tooltip: P, hitZonesRef: F } = w(n, {
824
830
  width: Ce,
825
- height: T
831
+ height: D
826
832
  });
827
- return he(n, Ce, T, (e, t) => {
833
+ return ge(n, Ce, D, (e, t) => {
828
834
  N(r.current, j.current), F.current = [], b.forEach((n, i) => {
829
- let a = Ee[i % Ee.length], o = M(t, i, x, O), s = B.top + i * (V + k), c = B.left + De, l = r.current.get(n.id) ?? 0, d = Math.max(n.base ?? 0, 0), m = Math.max(n.total ?? 0, 0), g = d / S * D * o, _ = m / S * D * o, v = _ - g;
830
- e.font = f.font, e.fillStyle = l > 0 ? a : f.color, e.textAlign = "right", e.textBaseline = "middle", e.fillText(Oe(e, n.name ?? "", De - 16), c - 8, s + V / 2), e.fillStyle = h(u.bd, .25), e.beginPath(), e.roundRect(c, s, D, V, 4), e.fill(), g > 0 && (l > 0 && y(e, c + g / 2, s + V / 2, g * .3, a, .1 * l), e.fillStyle = h(a, .5 + l * .15), e.beginPath(), e.roundRect(c, s, g, V, 4), e.fill()), v > 2 && (e.fillStyle = h(a, .22 + l * .08), e.beginPath(), e.roundRect(c + g, s, v, V, [
835
+ let a = Ee[i % Ee.length], o = M(t, i, x, O), s = V.top + i * (H + 8), c = V.left + De, l = r.current.get(n.id) ?? 0, d = Math.max(n.base ?? 0, 0), m = Math.max(n.total ?? 0, 0), g = d / S * k * o, _ = m / S * k * o, v = _ - g;
836
+ e.font = f.font, e.fillStyle = l > 0 ? a : f.color, e.textAlign = "right", e.textBaseline = "middle", e.fillText(Oe(e, n.name ?? "", De - 16), c - 8, s + H / 2), e.fillStyle = h(u.bd, .25), e.beginPath(), e.roundRect(c, s, k, H, 4), e.fill(), g > 0 && (l > 0 && y(e, c + g / 2, s + H / 2, g * .3, a, .1 * l), e.fillStyle = h(a, .5 + l * .15), e.beginPath(), e.roundRect(c, s, g, H, 4), e.fill()), v > 2 && (e.fillStyle = h(a, .22 + l * .08), e.beginPath(), e.roundRect(c + g, s, v, H, [
831
837
  0,
832
838
  4,
833
839
  4,
834
840
  0
835
- ]), e.fill(), e.setLineDash([2, 3]), e.strokeStyle = h(a, .55), e.lineWidth = 1, e.beginPath(), e.moveTo(c + g, s + 3), e.lineTo(c + g, s + V - 3), e.stroke(), e.setLineDash([])), l > 0 && _ > 0 && (e.strokeStyle = h(a, .5 * l), e.lineWidth = 1, e.setLineDash([]), e.beginPath(), e.roundRect(c, s, _, V, 4), e.stroke()), o > .35 && (e.globalAlpha = Math.min(1, (o - .35) / .4), e.font = p.font, e.fillStyle = l > 0 ? a : p.color, e.textAlign = "left", e.textBaseline = "middle", e.fillText(n.totalLabel ?? ke(n.total ?? 0), c + _ + 6, s + V / 2), e.globalAlpha = 1), E(F.current, n.id, c, s, Math.max(_, 1), V, {
841
+ ]), e.fill(), e.setLineDash([2, 3]), e.strokeStyle = h(a, .55), e.lineWidth = 1, e.beginPath(), e.moveTo(c + g, s + 3), e.lineTo(c + g, s + H - 3), e.stroke(), e.setLineDash([])), l > 0 && _ > 0 && (e.strokeStyle = h(a, .5 * l), e.lineWidth = 1, e.setLineDash([]), e.beginPath(), e.roundRect(c, s, _, H, 4), e.stroke()), o > .35 && (e.globalAlpha = Math.min(1, (o - .35) / .4), e.font = p.font, e.fillStyle = l > 0 ? a : p.color, e.textAlign = "left", e.textBaseline = "middle", e.fillText(n.totalLabel ?? ke(n.total ?? 0), c + _ + 6, s + H / 2), e.globalAlpha = 1), E(F.current, n.id, c, s, Math.max(_, 1), H, {
836
842
  label: n.name,
837
843
  value: `${n.totalLabel ?? ke(n.total ?? 0)} total`,
838
844
  sublabel: `Base ${n.baseLabel ?? ke(n.base ?? 0)} + Var ${n.variationLabel ?? ke(n.variation ?? 0)} · ${n.percentage ?? 0}% committed`,
839
845
  color: a
840
846
  });
841
847
  });
842
- let n = T - 14;
843
- e.textBaseline = "middle", e.font = m.font, e.textAlign = "left", e.fillStyle = h(u.blue, .5), e.beginPath(), e.roundRect(B.left + De, n - 3, 14, 6, 2), e.fill(), e.fillStyle = m.color, e.fillText("base value", B.left + De + 18, n), e.fillStyle = h(u.blue, .22), e.beginPath(), e.roundRect(B.left + De + 94, n - 3, 14, 6, 2), e.fill(), e.setLineDash([2, 3]), e.strokeStyle = h(u.blue, .5), e.lineWidth = .5, e.beginPath(), e.moveTo(B.left + De + 101, n - 3), e.lineTo(B.left + De + 101, n + 3), e.stroke(), e.setLineDash([]), e.fillStyle = m.color, e.fillText("approved variations", B.left + De + 112, n), e.font = m.font, e.textAlign = "right", e.fillStyle = m.color, e.fillText(`Portfolio: ${ke(g?.total ?? 0)}`, Ce - 8, n);
848
+ let n = D - 14;
849
+ e.textBaseline = "middle", e.font = m.font, e.textAlign = "left", e.fillStyle = h(u.blue, .5), e.beginPath(), e.roundRect(V.left + De, n - 3, 14, 6, 2), e.fill(), e.fillStyle = m.color, e.fillText("base value", V.left + De + 18, n), e.fillStyle = h(u.blue, .22), e.beginPath(), e.roundRect(V.left + De + 94, n - 3, 14, 6, 2), e.fill(), e.setLineDash([2, 3]), e.strokeStyle = h(u.blue, .5), e.lineWidth = .5, e.beginPath(), e.moveTo(V.left + De + 101, n - 3), e.lineTo(V.left + De + 101, n + 3), e.stroke(), e.setLineDash([]), e.fillStyle = m.color, e.fillText("approved variations", V.left + De + 112, n), e.font = m.font, e.textAlign = "right", e.fillStyle = m.color, e.fillText(`Portfolio: ${ke(g?.total ?? 0)}`, Ce - 8, n);
844
850
  }, !0, { easing: O }), A ? /* @__PURE__ */ s(I, {
845
851
  width: Ce,
846
852
  height: we,
@@ -860,14 +866,14 @@ function Ae({ data: e, "data-testid": t }) {
860
866
  "aria-label": "Total contract value per contractor — horizontal bar chart",
861
867
  style: {
862
868
  width: Ce,
863
- height: T,
869
+ height: D,
864
870
  display: "block",
865
871
  borderRadius: 8
866
872
  }
867
873
  }), /* @__PURE__ */ s(C, {
868
874
  ...P,
869
875
  parentW: Ce,
870
- parentH: T
876
+ parentH: D
871
877
  })]
872
878
  }), _.length > Te && /* @__PURE__ */ s("div", {
873
879
  style: { marginTop: 8 },
@@ -880,55 +886,59 @@ function Ae({ data: e, "data-testid": t }) {
880
886
  }
881
887
  //#endregion
882
888
  //#region src/components/rankedCardLeaderboard/RankedCardLeaderboard.tsx
883
- var H = 780, U = 240, je = 12, Me = 10, Ne = [
889
+ var je = 780, U = 240, Me = 12, Ne = 10, Pe = 5, Fe = (je - 2 * Me - (Pe - 1) * Ne) / Pe, Ie = [
884
890
  "Highest exposure",
885
891
  "Elevated risk",
886
892
  "Moderate exposure",
887
893
  "Moderate exposure",
888
894
  "Low exposure"
889
895
  ];
890
- function Pe({ items: e = [], "data-testid": t }) {
891
- let r = a(null), o = a(0), l = a(/* @__PURE__ */ new Map()), { hoveredRef: m, tooltip: g, hitZonesRef: _ } = w(r, {
892
- width: H,
896
+ function Le({ items: e = [], "data-testid": t }) {
897
+ let r = a(null), o = a(0), l = a(/* @__PURE__ */ new Map()), m = [...i(() => e.filter((e) => typeof e == "object" && !!e), [e])].sort((e, t) => (t.count ?? 0) - (e.count ?? 0)).slice(0, 5), g = m.reduce((e, t) => e + (t.count ?? 0), 0), _ = Math.min(Pe, m.length), b = _ > 0 ? 2 * Me + _ * Fe + (_ - 1) * Ne : je, { hoveredRef: S, tooltip: T, hitZonesRef: D } = w(r, {
898
+ width: b,
893
899
  height: U
894
- }), b = [...i(() => e.filter((e) => typeof e == "object" && !!e), [e])].sort((e, t) => (t.count ?? 0) - (e.count ?? 0)).slice(0, 5), S = b.reduce((e, t) => e + (t.count ?? 0), 0);
900
+ });
895
901
  return n(() => {
896
902
  let e = r.current;
897
903
  if (!e) return;
898
- let t = v(e, H, U);
904
+ let t = v(e, b, U);
899
905
  o.current = 0;
900
- let n = Math.min(5, b.length), i = (H - 2 * je - 4 * Me) / 5, a = U * .84, s = U * .08, c = n * i + (n - 1) * Me, g = Math.round((H - c) / 2), C, w = () => {
906
+ let n = Fe, i = U * .84, a = U * .08, s = Me, c, _ = () => {
901
907
  o.current++;
902
908
  let e = o.current;
903
- t.clearRect(0, 0, H, U), t.letterSpacing = f.letterSpacing, _.current = [], l.current.forEach((e, t) => {
904
- let n = t === m.current ? 1 : 0, r = e + (n - e) * .12;
909
+ t.clearRect(0, 0, b, U), t.letterSpacing = f.letterSpacing, D.current = [], l.current.forEach((e, t) => {
910
+ let n = t === S.current ? 1 : 0, r = e + (n - e) * .12;
905
911
  Math.abs(r - n) < .005 ? n === 0 ? l.current.delete(t) : l.current.set(t, 1) : l.current.set(t, r);
906
- }), m.current && !l.current.has(m.current) && l.current.set(m.current, 0), b.forEach((n, r) => {
907
- let o = r === 0, c = r === 0 ? u.red : r === 1 ? u.amber : d[r % d.length], m = g + r * (i + Me), v = l.current.get(n.id) ?? 0, b = v * 8, x = m - b / 2, C = i + b, w = o ? j(e, .04, 3e-4) * .06 + .06 : 0;
908
- t.fillStyle = h(c, .08 + v * .07), t.beginPath(), t.roundRect(x, s, C, a, 6), t.fill(), t.strokeStyle = h(c, .2 + v * .4 + w), t.lineWidth = o ? 1.5 : 1, t.stroke(), (v > .01 || o) && y(t, x + C / 2, s + a / 2, C * .55, c, w + v * .14), t.font = p.font, t.textAlign = "left", t.textBaseline = "top", t.fillStyle = h(c, .5 + v * .35), t.fillText(`#${r + 1}`, x + 7, s + 6);
909
- let T = Math.min(i * .28, a * .32, 72), D = x + C / 2, O = s + a * .38, k = t.createRadialGradient(D, O - T * .2, 0, D, O, T);
910
- k.addColorStop(0, h(c, .5 + v * .2)), k.addColorStop(1, h(c, .2 + v * .1)), t.beginPath(), t.arc(D, O, T, 0, Math.PI * 2), t.fillStyle = k, t.fill(), t.strokeStyle = h(c, .4 + v * .3), t.lineWidth = 1, t.stroke(), t.font = p.font, t.textAlign = "center", t.textBaseline = "middle", t.fillStyle = h(u.t1, .9), t.fillText(n.abbreviation ?? n.name?.slice(0, 6) ?? "", D, O);
911
- let A = n.label ?? String(n.count ?? 0);
912
- t.font = p.font, t.textBaseline = "alphabetic", t.fillStyle = h(c, .9 + v * .1), t.fillText(A, D, s + a * .76), n.label || (t.font = f.font, t.fillStyle = f.color, t.fillText("open EWs", D, s + a * .88));
913
- let M = Math.round((n.count ?? 0) / (S || 1) * 100), N = Ne[r] ?? "Low exposure";
914
- E(_.current, n.id, m, s, i, a, {
915
- label: n.name,
912
+ }), S.current && !l.current.has(S.current) && l.current.set(S.current, 0), m.forEach((r, o) => {
913
+ let c = o === 0, m = o === 0 ? u.red : o === 1 ? u.amber : d[o % d.length], _ = s + o * (n + Ne), v = l.current.get(r.id) ?? 0, b = v * 8, x = _ - b / 2, S = n + b, C = c ? j(e, .04, 3e-4) * .06 + .06 : 0;
914
+ t.fillStyle = h(m, .08 + v * .07), t.beginPath(), t.roundRect(x, a, S, i, 6), t.fill(), t.strokeStyle = h(m, .2 + v * .4 + C), t.lineWidth = c ? 1.5 : 1, t.stroke(), (v > .01 || c) && y(t, x + S / 2, a + i / 2, S * .55, m, C + v * .14), t.font = p.font, t.textAlign = "left", t.textBaseline = "top", t.fillStyle = h(m, .5 + v * .35), t.fillText(`#${o + 1}`, x + 7, a + 6);
915
+ let w = Math.min(n * .28, i * .32, 72), T = x + S / 2, O = a + i * .38, k = t.createRadialGradient(T, O - w * .2, 0, T, O, w);
916
+ k.addColorStop(0, h(m, .5 + v * .2)), k.addColorStop(1, h(m, .2 + v * .1)), t.beginPath(), t.arc(T, O, w, 0, Math.PI * 2), t.fillStyle = k, t.fill(), t.strokeStyle = h(m, .4 + v * .3), t.lineWidth = 1, t.stroke(), t.font = p.font, t.textAlign = "center", t.textBaseline = "middle", t.fillStyle = h(u.t1, .9), t.fillText(r.abbreviation ?? r.name?.slice(0, 6) ?? "", T, O);
917
+ let A = r.label ?? String(r.count ?? 0);
918
+ t.font = p.font, t.textBaseline = "alphabetic", t.fillStyle = h(m, .9 + v * .1), t.fillText(A, T, a + i * .76), r.label || (t.font = f.font, t.fillStyle = f.color, t.fillText("open EWs", T, a + i * .88));
919
+ let M = Math.round((r.count ?? 0) / (g || 1) * 100), N = Ie[o] ?? "Low exposure";
920
+ E(D.current, r.id, _, a, n, i, {
921
+ label: r.name,
916
922
  value: `${A ?? 0} open · ${M}% of total`,
917
- sublabel: `Rank #${r + 1} · ${N}`,
918
- color: c
923
+ sublabel: `Rank #${o + 1} · ${N}`,
924
+ color: m
919
925
  });
920
- }), x(t, H, U, e, .015), C = requestAnimationFrame(w);
926
+ }), x(t, b, U, e, .015), c = requestAnimationFrame(_);
921
927
  };
922
- return w(), () => cancelAnimationFrame(C);
923
- }, [b, S]), b.length === 0 ? /* @__PURE__ */ s(I, {
924
- width: H,
928
+ return _(), () => cancelAnimationFrame(c);
929
+ }, [
930
+ m,
931
+ g,
932
+ b
933
+ ]), m.length === 0 ? /* @__PURE__ */ s(I, {
934
+ width: b,
925
935
  height: U,
926
936
  "data-testid": t
927
937
  }) : /* @__PURE__ */ c("div", {
928
938
  "data-testid": t,
929
939
  style: {
930
940
  position: "relative",
931
- width: H,
941
+ width: b,
932
942
  height: U
933
943
  },
934
944
  children: [/* @__PURE__ */ s("canvas", {
@@ -936,14 +946,14 @@ function Pe({ items: e = [], "data-testid": t }) {
936
946
  role: "img",
937
947
  "aria-label": "Contractor rank — open EW count per contractor",
938
948
  style: {
939
- width: H,
949
+ width: b,
940
950
  height: U,
941
951
  display: "block",
942
952
  borderRadius: 8
943
953
  }
944
954
  }), /* @__PURE__ */ s(C, {
945
- ...g,
946
- parentW: H,
955
+ ...T,
956
+ parentW: b,
947
957
  parentH: U
948
958
  })]
949
959
  });
@@ -951,7 +961,7 @@ function Pe({ items: e = [], "data-testid": t }) {
951
961
  //#endregion
952
962
  //#region src/components/dotMatrixChart/DotMatrixChart.tsx
953
963
  var W = 680, G = 260;
954
- function Fe({ items: e = [], "data-testid": t }) {
964
+ function Re({ items: e = [], "data-testid": t }) {
955
965
  let r = a(null), o = a(0), l = a(/* @__PURE__ */ new Map()), { hoveredRef: d, tooltip: p, hitZonesRef: m } = w(r, {
956
966
  width: W,
957
967
  height: G
@@ -1018,7 +1028,7 @@ function Fe({ items: e = [], "data-testid": t }) {
1018
1028
  }
1019
1029
  //#endregion
1020
1030
  //#region src/components/lineChart/LineChart.tsx
1021
- function Ie({ rows: e = [], className: t, colors: n }) {
1031
+ function ze({ rows: e = [], className: t, colors: n }) {
1022
1032
  return /* @__PURE__ */ s(ee, {
1023
1033
  rows: e,
1024
1034
  variant: "line",
@@ -1028,7 +1038,7 @@ function Ie({ rows: e = [], className: t, colors: n }) {
1028
1038
  }
1029
1039
  //#endregion
1030
1040
  //#region src/components/constants.ts
1031
- var Le = [
1041
+ var Be = [
1032
1042
  "#4C93D9",
1033
1043
  "#5DA537",
1034
1044
  "#F3862C",
@@ -1036,7 +1046,7 @@ var Le = [
1036
1046
  "#A0B724",
1037
1047
  "#EEBF3B",
1038
1048
  "#3C45D1"
1039
- ], Re = {
1049
+ ], Ve = {
1040
1050
  nodes: [
1041
1051
  {
1042
1052
  id: "supplier-x",
@@ -1079,8 +1089,8 @@ var Le = [
1079
1089
  };
1080
1090
  //#endregion
1081
1091
  //#region src/components/miniBars/MiniBars.tsx
1082
- function ze({ rows: e = [], className: t, colors: n }) {
1083
- let r = n?.slices ?? Le;
1092
+ function He({ rows: e = [], className: t, colors: n }) {
1093
+ let r = n?.slices ?? Be;
1084
1094
  return /* @__PURE__ */ s("div", {
1085
1095
  className: ["d3-mini-bars", t].filter(Boolean).join(" "),
1086
1096
  children: e.map(([e, t, n], i) => /* @__PURE__ */ c("div", {
@@ -1106,7 +1116,7 @@ function ze({ rows: e = [], className: t, colors: n }) {
1106
1116
  width: Math.max(0, Math.min(100, t)),
1107
1117
  height: "12",
1108
1118
  rx: "6",
1109
- className: `d3-mini-fill tone-${i % Le.length}`,
1119
+ className: `d3-mini-fill tone-${i % Be.length}`,
1110
1120
  fill: r[i % r.length]
1111
1121
  })]
1112
1122
  })
@@ -1117,102 +1127,137 @@ function ze({ rows: e = [], className: t, colors: n }) {
1117
1127
  });
1118
1128
  }
1119
1129
  //#endregion
1130
+ //#region src/utils/numberFormat.ts
1131
+ var Ue = [
1132
+ {
1133
+ value: 0xe8d4a51000,
1134
+ suffix: "T",
1135
+ divisor: 0xe8d4a51000
1136
+ },
1137
+ {
1138
+ value: 1e9,
1139
+ suffix: "B",
1140
+ divisor: 1e9
1141
+ },
1142
+ {
1143
+ value: 1e6,
1144
+ suffix: "M",
1145
+ divisor: 1e6
1146
+ },
1147
+ {
1148
+ value: 1e3,
1149
+ suffix: "K",
1150
+ divisor: 1e3
1151
+ }
1152
+ ];
1153
+ function We(e, t = 1) {
1154
+ let n = Math.abs(e), r = e < 0 ? "-" : "";
1155
+ for (let e of Ue) if (n >= e.value) return `${r}${(n / e.divisor).toFixed(t)}${e.suffix}`;
1156
+ return `${r}${n.toFixed(0)}`;
1157
+ }
1158
+ //#endregion
1120
1159
  //#region src/components/radialFanTreeChart/RadialFanTreeChart.tsx
1121
- var Be = 680, Ve = 320, He = 60, Ue = 28;
1122
- function We({ total: e = 0, totalLabel: t, items: r = [], "data-testid": o }) {
1123
- let l = a(null), m = a(/* @__PURE__ */ new Map()), g = a(0), _ = i(() => r.filter((e) => typeof e == "object" && !!e), [r]), b = i(() => Math.max(Ve, He + Math.max(0, _.length - 1) * Ue), [_.length]), { hoveredRef: x, tooltip: S, hitZonesRef: E } = w(l, {
1124
- width: Be,
1125
- height: b
1160
+ var Ge = 800, Ke = 320, qe = 60, Je = 28;
1161
+ function Ye({ total: e = 0, totalLabel: t, items: r = [], width: o = Ge, "data-testid": l }) {
1162
+ let m = a(null), g = a(/* @__PURE__ */ new Map()), _ = a(0), b = i(() => r.filter((e) => typeof e == "object" && !!e), [r]), x = i(() => Math.max(Ke, qe + Math.max(0, b.length - 1) * Je), [b.length]), { hoveredRef: S, tooltip: E, hitZonesRef: O } = w(m, {
1163
+ width: o,
1164
+ height: x
1126
1165
  });
1127
1166
  return n(() => {
1128
- let n = l.current;
1167
+ let n = m.current;
1129
1168
  if (!n) return;
1130
- let r = v(n, Be, b);
1131
- g.current = 0;
1132
- let i = b / 2, a = Be - 80, o = Math.max(..._.map((e) => e.count ?? 0), 1), s = _.length > 1 ? (b - 60) / (_.length - 1) : 0, c = _.map((e, t) => ({
1169
+ let r = v(n, o, x);
1170
+ _.current = 0;
1171
+ let i = x / 2, a = o - 200, s = Math.max(...b.map((e) => e.count ?? 0), 1), c = b.length > 1 ? (x - 60) / (b.length - 1) : 0, l = b.map((e, t) => ({
1133
1172
  x: a,
1134
- y: 30 + t * s
1135
- })), S, C = () => {
1136
- g.current++;
1137
- let n = g.current;
1138
- r.clearRect(0, 0, Be, b), r.letterSpacing = f.letterSpacing;
1139
- let s = D(Math.min(n / 72, 1));
1140
- N(m.current, x.current), E.current = [], y(r, 88, i, 48 * s, u.blue, .15 * s), _.forEach((t, n) => {
1141
- let l = d[n % d.length], g = M(s, n, _.length, D), v = c[n], b = m.current.get(t.id) ?? 0, x = Math.max(1.5, (t.count ?? 0) / o * 6);
1142
- if (g < .01) return;
1143
- let S = 88 + (a - 88) * .4, C = i, w = 88 + (a - 88) * .6, O = v.y, k = g;
1173
+ y: 30 + t * c
1174
+ })), C, w = () => {
1175
+ _.current++;
1176
+ let n = _.current;
1177
+ r.clearRect(0, 0, o, x), r.letterSpacing = f.letterSpacing;
1178
+ let c = D(Math.min(n / 72, 1));
1179
+ if (N(g.current, S.current), O.current = [], y(r, 88, i, 48 * c, u.blue, .15 * c), b.forEach((t, n) => {
1180
+ let o = d[n % d.length], m = M(c, n, b.length, D), _ = l[n], v = g.current.get(t.id) ?? 0, x = Math.max(1.5, (t.count ?? 0) / s * 6);
1181
+ if (m < .01) return;
1182
+ let S = 88 + (a - 88) * .4, C = i, w = 88 + (a - 88) * .6, E = _.y, k = m;
1144
1183
  r.beginPath();
1145
1184
  for (let e = 0; e <= 40; e++) {
1146
- let t = e / 40 * k, n = (1 - t) ** 3 * 88 + 3 * (1 - t) ** 2 * t * S + 3 * (1 - t) * t ** 2 * w + t ** 3 * v.x, a = (1 - t) ** 3 * i + 3 * (1 - t) ** 2 * t * C + 3 * (1 - t) * t ** 2 * O + t ** 3 * v.y;
1185
+ let t = e / 40 * k, n = (1 - t) ** 3 * 88 + 3 * (1 - t) ** 2 * t * S + 3 * (1 - t) * t ** 2 * w + t ** 3 * _.x, a = (1 - t) ** 3 * i + 3 * (1 - t) ** 2 * t * C + 3 * (1 - t) * t ** 2 * E + t ** 3 * _.y;
1147
1186
  e === 0 ? r.moveTo(n, a) : r.lineTo(n, a);
1148
1187
  }
1149
- if (r.strokeStyle = h(l, b > 0 ? .8 : .45), r.lineWidth = x * (b > 0 ? 1.3 : 1), r.stroke(), g > .85) {
1150
- let n = Math.min(1, (g - .85) / .15), i = 4 + (t.count ?? 0) / o * 12;
1151
- y(r, v.x, v.y, i * 2.5, l, (.25 + b * .2) * n), r.beginPath(), r.arc(v.x, v.y, i * n, 0, Math.PI * 2), r.fillStyle = h(l, (.7 + b * .2) * n), r.fill();
1152
- let a = t.label ?? String(t.count ?? 0);
1153
- T(E.current, t.id, v.x, v.y, i + 8, {
1188
+ if (r.strokeStyle = h(o, v > 0 ? .8 : .45), r.lineWidth = x * (v > 0 ? 1.3 : 1), r.stroke(), m > .85) {
1189
+ let n = Math.min(1, (m - .85) / .15), i = 4 + (t.count ?? 0) / s * 12;
1190
+ y(r, _.x, _.y, i * 2.5, o, (.25 + v * .2) * n), r.beginPath(), r.arc(_.x, _.y, i * n, 0, Math.PI * 2), r.fillStyle = h(o, (.7 + v * .2) * n), r.fill();
1191
+ let a = We(t.count ?? 0);
1192
+ T(O.current, t.id, _.x, _.y, i + 8, {
1154
1193
  label: t.name,
1155
1194
  value: `${a} NCEs raised`,
1156
1195
  sublabel: `${Math.round((t.count ?? 0) / (e || 1) * 100)}% of all NCEs`,
1157
- color: l
1196
+ color: o
1158
1197
  }), r.globalAlpha = n, r.font = f.font, r.textAlign = "left";
1159
- let s = t.abbreviation ?? t.name?.slice(0, 6) ?? "", c = ` ${a}`, d = v.x + i + 6, m = v.y + 4;
1160
- r.fillStyle = b > 0 ? l : h(u.t2, .85), r.fillText(s, d, m);
1161
- let _ = r.measureText(s).width;
1162
- r.font = p.font, r.fillStyle = b > 0 ? l : u.t1, r.fillText(c, d + _, m), r.globalAlpha = 1;
1198
+ let c = t.abbreviation ?? t.name?.slice(0, 6) ?? "", l = ` ${We(t.count ?? 0)}`, d = _.x + i + 6, g = _.y + 4;
1199
+ r.fillStyle = v > 0 ? o : h(u.t2, .85), r.fillText(c, d, g);
1200
+ let b = r.measureText(c).width;
1201
+ r.font = p.font, r.fillStyle = v > 0 ? o : u.t1, r.fillText(l, d + b, g), r.globalAlpha = 1;
1163
1202
  }
1164
- }), r.beginPath(), r.arc(88, i, 32 * s, 0, Math.PI * 2), r.fillStyle = u.bgL, r.fill(), r.strokeStyle = h(u.blue, .6 * s), r.lineWidth = 2, r.stroke(), s > .4 && (r.globalAlpha = Math.min(1, (s - .4) / .4), r.font = "500 24px 'Satoshi Variable', 'DM Sans', sans-serif", r.fillStyle = u.t1, r.textAlign = "center", r.fillText(t ?? String(e), 88, i + 5), r.font = f.font, r.fillStyle = f.color, r.fillText("NCEs", 88, i + 18), r.globalAlpha = 1), S = requestAnimationFrame(C);
1203
+ }), r.beginPath(), r.arc(88, i, 32 * c, 0, Math.PI * 2), r.fillStyle = u.bgL, r.fill(), r.strokeStyle = h(u.blue, .6 * c), r.lineWidth = 2, r.stroke(), c > .4) {
1204
+ r.globalAlpha = Math.min(1, (c - .4) / .4), r.font = "500 24px 'Satoshi Variable', 'DM Sans', sans-serif", r.fillStyle = u.t1, r.textAlign = "center";
1205
+ let n = t ?? We(e, 0);
1206
+ r.fillText(n, 88, i + 2), r.font = f.font, r.fillStyle = f.color, r.fillText("NCEs", 88, i + 22), r.globalAlpha = 1;
1207
+ }
1208
+ C = requestAnimationFrame(w);
1165
1209
  };
1166
- return C(), () => cancelAnimationFrame(S);
1210
+ return w(), () => cancelAnimationFrame(C);
1167
1211
  }, [
1168
1212
  e,
1169
1213
  t,
1170
- _,
1171
- b
1172
- ]), _.length === 0 ? /* @__PURE__ */ s(I, {
1173
- width: Be,
1174
- height: Ve,
1175
- "data-testid": o
1214
+ b,
1215
+ x,
1216
+ o
1217
+ ]), b.length === 0 ? /* @__PURE__ */ s(I, {
1218
+ width: o,
1219
+ height: Ke,
1220
+ "data-testid": l
1176
1221
  }) : /* @__PURE__ */ c("div", {
1177
- "data-testid": o,
1222
+ "data-testid": l,
1178
1223
  style: {
1179
1224
  position: "relative",
1180
- width: Be,
1181
- height: b
1225
+ width: o,
1226
+ height: x
1182
1227
  },
1183
1228
  children: [/* @__PURE__ */ s("canvas", {
1184
- ref: l,
1229
+ ref: m,
1185
1230
  role: "img",
1186
1231
  "aria-label": "NCE fault tree — NCEs per contractor as branching tree",
1187
1232
  style: {
1188
- width: Be,
1189
- height: b,
1233
+ width: o,
1234
+ height: x,
1190
1235
  display: "block"
1191
1236
  }
1192
1237
  }), /* @__PURE__ */ s(C, {
1193
- ...S,
1194
- parentW: Be,
1195
- parentH: b
1238
+ ...E,
1239
+ parentW: o,
1240
+ parentH: x
1196
1241
  })]
1197
1242
  });
1198
1243
  }
1199
1244
  //#endregion
1200
1245
  //#region src/components/pieChart/PieChart.tsx
1201
- var Ge = 192, Ke = Ge, qe = Ge + 80;
1202
- function Je({ rows: e = [], variant: t, className: r, colors: i }) {
1246
+ var Xe = 192, Ze = Xe, Qe = Xe + 80;
1247
+ function $e({ rows: e = [], variant: t, className: r, colors: i }) {
1203
1248
  let o = a(null), f = a(/* @__PURE__ */ new Map()), p = a(0), m = i?.slices ?? d, { hoveredRef: g, tooltip: b, hitZonesRef: x } = w(o, {
1204
- width: Ke,
1205
- height: qe
1249
+ width: Ze,
1250
+ height: Qe
1206
1251
  });
1207
1252
  return n(() => {
1208
1253
  let n = o.current;
1209
1254
  if (!n) return;
1210
- let r = v(n, Ke, qe);
1255
+ let r = v(n, Ze, Qe);
1211
1256
  p.current = 0;
1212
- 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 = () => {
1257
+ let i = Ze / 2, a = Xe / 2, s = Xe * .4, c = t === "donut" ? Xe * .21 : 0, l = e.reduce((e, t) => e + (t.pricing ?? 0), 0) || 1, d, b = () => {
1213
1258
  p.current++;
1214
1259
  let n = p.current;
1215
- r.clearRect(0, 0, Ke, qe);
1260
+ r.clearRect(0, 0, Ze, Qe);
1216
1261
  let o = 1 - (1 - Math.min(n / 48, 1)) ** 3;
1217
1262
  N(f.current, g.current), x.current = [];
1218
1263
  let v = -Math.PI / 2;
@@ -1226,10 +1271,10 @@ function Je({ rows: e = [], variant: t, className: r, colors: i }) {
1226
1271
  let O = j(n, .03, 3e-4), k = s + b * 6 + (b > 0 ? O * 2 : 0);
1227
1272
  r.beginPath(), r.moveTo(i + Math.cos(v) * c, a + Math.sin(v) * c), r.arc(i, a, k, v, g), c > 0 ? r.arc(i, a, c, g, v, !0) : r.lineTo(i, a), r.closePath(), r.fillStyle = h(_, .7 + b * .2), r.fill(), r.strokeStyle = h(u.bg, .8), r.lineWidth = 1.5, r.stroke(), v = g;
1228
1273
  }), t === "donut" && e.length > 0 && y(r, i, a, c * .8, u.blue, .06);
1229
- let S = Ge + 12;
1274
+ let S = Xe + 12;
1230
1275
  e.forEach((e, t) => {
1231
1276
  let n = m[t % m.length], i = (e.pricing ?? 0) / l, a = f.current.get(e.id ?? `sl-${t}`) ?? 0, o = S + t * 18;
1232
- r.beginPath(), r.arc(8, o, 4, 0, Math.PI * 2), r.fillStyle = h(n, .8 + a * .2), r.fill(), r.font = "9px 'JetBrains Mono', monospace", r.fillStyle = h(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 = _(u.t3, n, a), r.textAlign = "right", r.fillText(`${e.pricing ?? 0} (${Math.round(i * 100)}%)`, Ke - 4, o + 3.5);
1277
+ r.beginPath(), r.arc(8, o, 4, 0, Math.PI * 2), r.fillStyle = h(n, .8 + a * .2), r.fill(), r.font = "9px 'JetBrains Mono', monospace", r.fillStyle = h(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 = _(u.t3, n, a), r.textAlign = "right", r.fillText(`${e.pricing ?? 0} (${Math.round(i * 100)}%)`, Ze - 4, o + 3.5);
1233
1278
  }), d = requestAnimationFrame(b);
1234
1279
  };
1235
1280
  return b(), () => cancelAnimationFrame(d);
@@ -1243,30 +1288,30 @@ function Je({ rows: e = [], variant: t, className: r, colors: i }) {
1243
1288
  children: /* @__PURE__ */ c("div", {
1244
1289
  style: {
1245
1290
  position: "relative",
1246
- width: Ke,
1247
- height: qe
1291
+ width: Ze,
1292
+ height: Qe
1248
1293
  },
1249
1294
  children: [/* @__PURE__ */ s("canvas", {
1250
1295
  ref: o,
1251
1296
  role: "img",
1252
1297
  "aria-label": `${t} chart`,
1253
1298
  style: {
1254
- width: Ke,
1255
- height: qe,
1299
+ width: Ze,
1300
+ height: Qe,
1256
1301
  display: "block",
1257
1302
  borderRadius: 8
1258
1303
  }
1259
1304
  }), /* @__PURE__ */ s(C, {
1260
1305
  ...b,
1261
- parentW: Ke,
1262
- parentH: qe
1306
+ parentW: Ze,
1307
+ parentH: Qe
1263
1308
  })]
1264
1309
  })
1265
1310
  });
1266
1311
  }
1267
1312
  //#endregion
1268
1313
  //#region src/components/sankey/SankeySvg.tsx
1269
- function Ye(e, t, n, r) {
1314
+ function et(e, t, n, r) {
1270
1315
  let i = new Set(t.map((e) => e.source)), a = new Set(t.map((e) => e.target)), o = /* @__PURE__ */ new Map(), s = [];
1271
1316
  for (e.forEach((e) => {
1272
1317
  i.has(e.id) && !a.has(e.id) && s.push({
@@ -1311,8 +1356,8 @@ function Ye(e, t, n, r) {
1311
1356
  });
1312
1357
  }), f;
1313
1358
  }
1314
- function Xe({ nodes: e, links: t, width: r = 960, height: o = 280, ariaLabel: f, selectedEntity: p, className: m, colors: g }) {
1315
- let _ = a(null), b = a(/* @__PURE__ */ new Map()), S = a(0), D = a([]), O = g?.nodes ?? d, k = g?.links ?? u.bd, A = g?.activeLinks ?? u.blue, M = g?.activeNodes ?? u.blue, P = i(() => Ye(e, t, r, o), [
1359
+ function tt({ nodes: e, links: t, width: r = 960, height: o = 280, ariaLabel: f, selectedEntity: p, className: m, colors: g }) {
1360
+ let _ = a(null), b = a(/* @__PURE__ */ new Map()), S = a(0), D = a([]), O = g?.nodes ?? d, k = g?.links ?? u.bd, A = g?.activeLinks ?? u.blue, M = g?.activeNodes ?? u.blue, P = i(() => et(e, t, r, o), [
1316
1361
  e,
1317
1362
  t,
1318
1363
  r,
@@ -1412,7 +1457,7 @@ function Xe({ nodes: e, links: t, width: r = 960, height: o = 280, ariaLabel: f,
1412
1457
  }
1413
1458
  //#endregion
1414
1459
  //#region src/canvas/CausalFlowCanvas.tsx
1415
- var Ze = [
1460
+ var nt = [
1416
1461
  {
1417
1462
  x: .13,
1418
1463
  y: .48
@@ -1445,7 +1490,7 @@ var Ze = [
1445
1490
  x: .92,
1446
1491
  y: .22
1447
1492
  }
1448
- ], Qe = [
1493
+ ], rt = [
1449
1494
  u.blue,
1450
1495
  u.orange,
1451
1496
  u.red,
@@ -1453,7 +1498,7 @@ var Ze = [
1453
1498
  u.green,
1454
1499
  u.amber,
1455
1500
  u.t2
1456
- ], $e = [
1501
+ ], it = [
1457
1502
  26,
1458
1503
  24,
1459
1504
  24,
@@ -1463,21 +1508,21 @@ var Ze = [
1463
1508
  22,
1464
1509
  22
1465
1510
  ];
1466
- function et(e, t) {
1511
+ function at(e, t) {
1467
1512
  let n = 1 - t;
1468
1513
  return {
1469
1514
  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,
1470
1515
  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
1471
1516
  };
1472
1517
  }
1473
- function tt(e, t) {
1518
+ function ot(e, t) {
1474
1519
  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;
1475
1520
  return {
1476
1521
  x: -i / a,
1477
1522
  y: r / a
1478
1523
  };
1479
1524
  }
1480
- function nt(e, t) {
1525
+ function st(e, t) {
1481
1526
  let n = t.x - e.x, r = t.y - e.y;
1482
1527
  return {
1483
1528
  p0: {
@@ -1498,7 +1543,7 @@ function nt(e, t) {
1498
1543
  }
1499
1544
  };
1500
1545
  }
1501
- function rt({ nodes: e, links: t, width: r = 960, height: o = 280, selectedEntity: l }) {
1546
+ function ct({ nodes: e, links: t, width: r = 960, height: o = 280, selectedEntity: l }) {
1502
1547
  let d = a(null), f = a(0), p = a([]), { hoveredRef: m, tooltip: g, hitZonesRef: S } = w(d, {
1503
1548
  width: r,
1504
1549
  height: o
@@ -1506,15 +1551,15 @@ function rt({ nodes: e, links: t, width: r = 960, height: o = 280, selectedEntit
1506
1551
  let t = /* @__PURE__ */ new Map();
1507
1552
  return e.forEach((e, n) => t.set(e.id, n)), t;
1508
1553
  }, [e]), O = i(() => t.length > 0 ? Math.max(...t.map((e) => e.value)) : 100, [t]), k = (e) => O > 1 ? e / 100 : e, A = i(() => e.map((e, t) => {
1509
- let n = Ze[t % Ze.length];
1554
+ let n = nt[t % nt.length];
1510
1555
  return {
1511
1556
  id: e.id,
1512
1557
  label: e.name,
1513
1558
  sub: e.valueLabel ?? "",
1514
1559
  x: n.x * r,
1515
1560
  y: n.y * o,
1516
- r: $e[t % $e.length],
1517
- color: Qe[t % Qe.length]
1561
+ r: it[t % it.length],
1562
+ color: rt[t % rt.length]
1518
1563
  };
1519
1564
  }), [
1520
1565
  e,
@@ -1536,7 +1581,7 @@ function rt({ nodes: e, links: t, width: r = 960, height: o = 280, selectedEntit
1536
1581
  if (t.clearRect(0, 0, r, o), S.current = [], b(t, r, o, e, 50, h(u.blue, .05)), M.forEach((e, n) => {
1537
1582
  let r = A[e.fromIdx], i = A[e.toIdx];
1538
1583
  if (!r || !i) return;
1539
- let a = !!l && (r.id === l || i.id === l), o = _(r.color, i.color, .5), s = a ? .18 : .05, c = a ? .25 : .1, d = nt(r, i);
1584
+ let a = !!l && (r.id === l || i.id === l), o = _(r.color, i.color, .5), s = a ? .18 : .05, c = a ? .25 : .1, d = st(r, i);
1540
1585
  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 = h(o, s), t.lineWidth = 16, t.lineCap = "round", t.stroke(), t.strokeStyle = h(o, c), t.lineWidth = 1.5, t.stroke();
1541
1586
  for (let t = 0; t < e.conf * 2.5; t++) Math.random() < .45 && p.current.push({
1542
1587
  edgeIdx: n,
@@ -1545,7 +1590,7 @@ function rt({ nodes: e, links: t, width: r = 960, height: o = 280, selectedEntit
1545
1590
  off: (Math.random() - .5) * 13,
1546
1591
  sz: .7 + Math.random() * 2
1547
1592
  });
1548
- let f = et(d, .5), m = `${Math.round(e.conf * 100)}%`;
1593
+ let f = at(d, .5), m = `${Math.round(e.conf * 100)}%`;
1549
1594
  t.font = "bold 12px 'JetBrains Mono', monospace", t.textBaseline = "middle";
1550
1595
  let g = t.measureText(m).width + 14;
1551
1596
  t.fillStyle = "rgba(10,16,24,0.88)", t.beginPath(), t.roundRect(f.x - g / 2, f.y - 11, g, 22, 6), t.fill(), t.strokeStyle = h(u.blue, .25), t.lineWidth = 1, t.stroke(), t.fillStyle = h(u.blue, .9), t.textAlign = "center", t.fillText(m, f.x, f.y);
@@ -1555,7 +1600,7 @@ function rt({ nodes: e, links: t, width: r = 960, height: o = 280, selectedEntit
1555
1600
  if (!n) return !1;
1556
1601
  let r = A[n.fromIdx], i = A[n.toIdx];
1557
1602
  if (!r || !i) return !1;
1558
- 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 = _(r.color, i.color, e.t);
1603
+ let a = st(r, i), o = at(a, e.t), s = ot(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 = _(r.color, i.color, e.t);
1559
1604
  return y(t, c, l, e.sz * 3, d, u * .1), t.beginPath(), t.arc(c, l, e.sz, 0, Math.PI * 2), t.fillStyle = h(d, u), t.fill(), !0;
1560
1605
  }), p.current.length > 350 && (p.current = p.current.slice(-350)), A.forEach((n, r) => {
1561
1606
  let i = l === n.id, a = m.current === `node-${r}`, o = j(e, .03, 3e-4) * .1 + 1, s = n.r * o * (i ? 1.15 : 1);
@@ -1612,10 +1657,10 @@ function rt({ nodes: e, links: t, width: r = 960, height: o = 280, selectedEntit
1612
1657
  }
1613
1658
  //#endregion
1614
1659
  //#region src/components/sankey/ProcessSankey.tsx
1615
- function it({ selectedEntity: e, colors: t }) {
1616
- return /* @__PURE__ */ s(rt, {
1617
- nodes: Re.nodes,
1618
- links: Re.links,
1660
+ function lt({ selectedEntity: e, colors: t }) {
1661
+ return /* @__PURE__ */ s(ct, {
1662
+ nodes: Ve.nodes,
1663
+ links: Ve.links,
1619
1664
  width: 960,
1620
1665
  height: 280,
1621
1666
  selectedEntity: e
@@ -1623,7 +1668,7 @@ function it({ selectedEntity: e, colors: t }) {
1623
1668
  }
1624
1669
  //#endregion
1625
1670
  //#region src/components/sankey/RankingSankey.tsx
1626
- function at({ rows: e = [], className: t, colors: n }) {
1671
+ function ut({ rows: e = [], className: t, colors: n }) {
1627
1672
  let { nodes: r, links: a } = i(() => {
1628
1673
  let t = e.slice(0, 5);
1629
1674
  return {
@@ -1641,7 +1686,7 @@ function at({ rows: e = [], className: t, colors: n }) {
1641
1686
  }))
1642
1687
  };
1643
1688
  }, [e]);
1644
- return /* @__PURE__ */ s(Xe, {
1689
+ return /* @__PURE__ */ s(tt, {
1645
1690
  nodes: r,
1646
1691
  links: a,
1647
1692
  width: 760,
@@ -1653,62 +1698,62 @@ function at({ rows: e = [], className: t, colors: n }) {
1653
1698
  }
1654
1699
  //#endregion
1655
1700
  //#region src/components/balanceScaleChart/BalanceScaleChart.tsx
1656
- var ot = 500, st = 320;
1657
- function ct({ left: e, right: t, "data-testid": r }) {
1701
+ var dt = 500, ft = 320;
1702
+ function pt({ left: e, right: t, "data-testid": r }) {
1658
1703
  let i = a(null), o = a(0);
1659
1704
  return n(() => {
1660
1705
  let n = i.current;
1661
1706
  if (!n) return;
1662
- let r = v(n, ot, st);
1707
+ let r = v(n, dt, ft);
1663
1708
  o.current = 0;
1664
- let a = ot / 2, s = Math.max(e.value, t.value), c = (e.value - t.value) / s * 14, l, d = () => {
1709
+ let a = dt / 2, s = Math.max(e.value, t.value), c = (e.value - t.value) / s * 14, l, d = () => {
1665
1710
  o.current++;
1666
1711
  let n = o.current;
1667
- r.clearRect(0, 0, ot, st), r.letterSpacing = f.letterSpacing;
1668
- let i = D(Math.min(n / 80, 1)), g = c * A(Math.min(n / 80, 1)) * Math.PI / 180;
1669
- r.strokeStyle = h(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();
1670
- let _ = {
1671
- x: a - Math.cos(g) * 160,
1672
- y: 100 + Math.sin(-g) * 160
1673
- }, v = {
1674
- x: a + Math.cos(g) * 160,
1675
- y: 100 + Math.sin(g) * 160
1712
+ r.clearRect(0, 0, dt, ft), r.letterSpacing = f.letterSpacing;
1713
+ let i = D(Math.min(n / 80, 1)), m = c * A(Math.min(n / 80, 1)) * Math.PI / 180;
1714
+ r.strokeStyle = h(u.bd, .5 * i), r.lineWidth = 2, r.beginPath(), r.moveTo(a, 100), r.lineTo(a, ft - 80), r.stroke(), r.beginPath(), r.arc(a, 100, 5 * i, 0, Math.PI * 2), r.fillStyle = u.t2, r.fill();
1715
+ let g = {
1716
+ x: a - Math.cos(m) * 160,
1717
+ y: 100 + Math.sin(-m) * 160
1718
+ }, _ = {
1719
+ x: a + Math.cos(m) * 160,
1720
+ y: 100 + Math.sin(m) * 160
1676
1721
  };
1677
- r.strokeStyle = h(u.t2, .5 * i), r.lineWidth = 2, r.beginPath(), r.moveTo(_.x, _.y), r.lineTo(v.x, v.y), r.stroke();
1678
- let b = Math.max(20, e.value / s * 100 * i), x = _.y + 18;
1679
- y(r, _.x, x + b / 2, 90 * .5, u.green, .18 * i), r.fillStyle = h(u.green, .5 * i), r.beginPath(), r.roundRect(_.x - 90 / 2, x, 90, b, [
1722
+ r.strokeStyle = h(u.t2, .5 * i), r.lineWidth = 2, r.beginPath(), r.moveTo(g.x, g.y), r.lineTo(_.x, _.y), r.stroke();
1723
+ let v = Math.max(20, e.value / s * 100 * i), b = g.y + 18;
1724
+ y(r, g.x, b + v / 2, 90 * .5, u.green, .18 * i), r.fillStyle = h(u.green, .5 * i), r.beginPath(), r.roundRect(g.x - 90 / 2, b, 90, v, [
1680
1725
  0,
1681
1726
  0,
1682
1727
  6,
1683
1728
  6
1684
1729
  ]), r.fill(), r.strokeStyle = h(u.green, .7 * i), r.lineWidth = 1.5, r.stroke(), r.strokeStyle = h(u.t2, .35 * i), r.lineWidth = 1, [-90 / 3, 90 / 3].forEach((e) => {
1685
- r.beginPath(), r.moveTo(_.x + e, _.y + 4), r.lineTo(_.x + e, x), r.stroke();
1686
- }), i > .5 && (r.globalAlpha = Math.min(1, (i - .5) / .5), r.font = p.font, r.fillStyle = u.green, r.textAlign = "center", r.fillText(e.label, _.x, x + b + 18), r.font = f.font, r.fillStyle = f.color, r.fillText("Accepted", _.x, x + b + 32), r.fillText(`${e.count} quotations`, _.x, x + b + 44), r.globalAlpha = 1);
1687
- let S = Math.max(20, t.value / s * 100 * i), C = v.y + 18;
1688
- r.fillStyle = h(u.amber, .3 * i), r.strokeStyle = h(u.amber, .5 * i), r.lineWidth = 1.5, r.beginPath(), r.roundRect(v.x - 90 / 2, C, 90, S, [
1730
+ r.beginPath(), r.moveTo(g.x + e, g.y + 4), r.lineTo(g.x + e, b), r.stroke();
1731
+ }), i > .5 && (r.globalAlpha = Math.min(1, (i - .5) / .5), r.font = p.font, r.fillStyle = u.green, r.textAlign = "center", r.fillText(e.label, g.x, b + v + 18), r.font = f.font, r.fillStyle = f.color, r.fillText("Accepted", g.x, b + v + 38), r.fillText(`${e.count} quotations`, g.x, b + v + 58), r.globalAlpha = 1);
1732
+ let x = Math.max(20, t.value / s * 100 * i), S = _.y + 18;
1733
+ r.fillStyle = h(u.amber, .3 * i), r.strokeStyle = h(u.amber, .5 * i), r.lineWidth = 1.5, r.beginPath(), r.roundRect(_.x - 90 / 2, S, 90, x, [
1689
1734
  0,
1690
1735
  0,
1691
1736
  6,
1692
1737
  6
1693
1738
  ]), r.fill(), r.stroke(), r.strokeStyle = h(u.t2, .35 * i), r.lineWidth = 1, [-90 / 3, 90 / 3].forEach((e) => {
1694
- r.beginPath(), r.moveTo(v.x + e, v.y + 4), r.lineTo(v.x + e, C), r.stroke();
1695
- }), i > .5 && (r.globalAlpha = Math.min(1, (i - .5) / .5), r.font = p.font, r.fillStyle = u.amber, r.textAlign = "center", r.fillText(t.label, v.x, C + S + 18), r.font = f.font, r.fillStyle = f.color, r.fillText("Submitted", v.x, C + S + 32), r.fillText(`${t.count} quotations`, v.x, C + S + 44), r.globalAlpha = 1), i > .85 && Math.abs(c) > 1 && (r.globalAlpha = Math.min(1, (i - .85) / .15) * .6, r.font = m.font, r.fillStyle = m.color, r.textAlign = "center", r.fillText(`${Math.abs(c).toFixed(1)}° tilt toward accepted`, a, st - 12), r.globalAlpha = 1), l = requestAnimationFrame(d);
1739
+ r.beginPath(), r.moveTo(_.x + e, _.y + 4), r.lineTo(_.x + e, S), r.stroke();
1740
+ }), i > .5 && (r.globalAlpha = Math.min(1, (i - .5) / .5), r.font = p.font, r.fillStyle = u.amber, r.textAlign = "center", r.fillText(t.label, _.x, S + x + 18), r.font = f.font, r.fillStyle = f.color, r.fillText("Submitted", _.x, S + x + 38), r.fillText(`${t.count} quotations`, _.x, S + x + 58), r.globalAlpha = 1), l = requestAnimationFrame(d);
1696
1741
  };
1697
1742
  return d(), () => cancelAnimationFrame(l);
1698
1743
  }, [e, t]), /* @__PURE__ */ s("div", {
1699
1744
  "data-testid": r,
1700
1745
  style: {
1701
1746
  position: "relative",
1702
- width: ot,
1703
- height: st
1747
+ width: dt,
1748
+ height: ft
1704
1749
  },
1705
1750
  children: /* @__PURE__ */ s("canvas", {
1706
1751
  ref: i,
1707
1752
  role: "img",
1708
1753
  "aria-label": "Quotation balance — accepted vs submitted quotation value",
1709
1754
  style: {
1710
- width: ot,
1711
- height: st,
1755
+ width: dt,
1756
+ height: ft,
1712
1757
  display: "block"
1713
1758
  }
1714
1759
  })
@@ -1716,25 +1761,25 @@ function ct({ left: e, right: t, "data-testid": r }) {
1716
1761
  }
1717
1762
  //#endregion
1718
1763
  //#region src/components/areaLineChart/AreaLineChart.tsx
1719
- var lt = 680, K = 280;
1720
- function ut({ points: e = [], "data-testid": t }) {
1764
+ var mt = 680, K = 280;
1765
+ function ht({ points: e = [], "data-testid": t }) {
1721
1766
  let r = a(null), o = a(/* @__PURE__ */ new Map()), l = a(0), { hoveredRef: d, tooltip: p, hitZonesRef: m } = w(r, {
1722
- width: lt,
1767
+ width: mt,
1723
1768
  height: K
1724
1769
  }), g = i(() => e.filter((e) => typeof e == "object" && !!e), [e]);
1725
1770
  return n(() => {
1726
1771
  let e = r.current;
1727
1772
  if (!e) return;
1728
- let t = v(e, lt, K);
1773
+ let t = v(e, mt, K);
1729
1774
  l.current = 0;
1730
- let n = lt - 54 - 28, i = K - 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) => ({
1775
+ let n = mt - 54 - 28, i = K - 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) => ({
1731
1776
  x: 54 + t * c,
1732
1777
  y: 30 + i - e.count / a * i,
1733
1778
  point: e
1734
1779
  })), _, b = () => {
1735
1780
  l.current++;
1736
1781
  let e = l.current;
1737
- t.clearRect(0, 0, lt, K), t.letterSpacing = f.letterSpacing;
1782
+ t.clearRect(0, 0, mt, K), t.letterSpacing = f.letterSpacing;
1738
1783
  let r = D(Math.min(e / 72, 1));
1739
1784
  N(o.current, d.current), m.current = [], [
1740
1785
  .25,
@@ -1777,7 +1822,7 @@ function ut({ points: e = [], "data-testid": t }) {
1777
1822
  };
1778
1823
  return b(), () => cancelAnimationFrame(_);
1779
1824
  }, [g]), g.length < 2 ? /* @__PURE__ */ s(I, {
1780
- width: lt,
1825
+ width: mt,
1781
1826
  height: K,
1782
1827
  "data-testid": t
1783
1828
  }) : /* @__PURE__ */ s("div", {
@@ -1790,7 +1835,7 @@ function ut({ points: e = [], "data-testid": t }) {
1790
1835
  children: /* @__PURE__ */ c("div", {
1791
1836
  style: {
1792
1837
  position: "relative",
1793
- width: lt,
1838
+ width: mt,
1794
1839
  height: K
1795
1840
  },
1796
1841
  children: [/* @__PURE__ */ s("canvas", {
@@ -1798,13 +1843,13 @@ function ut({ points: e = [], "data-testid": t }) {
1798
1843
  role: "img",
1799
1844
  "aria-label": "Trend chart — count over time",
1800
1845
  style: {
1801
- width: lt,
1846
+ width: mt,
1802
1847
  height: K,
1803
1848
  display: "block"
1804
1849
  }
1805
1850
  }), /* @__PURE__ */ s(C, {
1806
1851
  ...p,
1807
- parentW: lt,
1852
+ parentW: mt,
1808
1853
  parentH: K
1809
1854
  })]
1810
1855
  })
@@ -1812,91 +1857,109 @@ function ut({ points: e = [], "data-testid": t }) {
1812
1857
  }
1813
1858
  //#endregion
1814
1859
  //#region src/components/trend/Trend.tsx
1815
- var dt = 680, q = 280, ft = 54, pt = 28, mt = 64, ht = f.font, gt = 12, _t = Math.PI * 2, vt = 72, yt = 20, bt = 5e3;
1816
- function xt({ points: e = [], "data-testid": t }) {
1860
+ var gt = 680, q = 280, _t = 54, vt = 48, yt = 64, bt = f.font, xt = 12, St = Math.PI * 2, Ct = 72, wt = 20, Tt = 5e3;
1861
+ function Et({ points: e = [], "data-testid": t }) {
1817
1862
  let r = a(null), o = a(null), l = a(0), d = i(() => e.filter((e) => typeof e == "object" && !!e), [e]), p = i(() => {
1818
- if (d.length <= 1) return mt;
1863
+ if (d.length <= 1) return yt;
1819
1864
  let e = document.createElement("canvas").getContext("2d");
1820
- if (!e) return mt;
1821
- e.font = ht;
1822
- let t = Math.max(1, Math.ceil(d.length / yt)), n = Math.max(...d.filter((e, n) => n % t === 0).map((t) => e.measureText(t.week).width));
1823
- return Math.max(mt, n + gt);
1824
- }, [d]), m = Math.round(p / 2), g = pt + m + Math.max(0, d.length - 1) * p, _ = Math.max(dt - ft, Math.min(g, bt)), { tooltip: y, hitZonesRef: b } = w(r, {
1865
+ if (!e) return yt;
1866
+ e.font = bt;
1867
+ let t = Math.max(1, Math.ceil(d.length / wt)), n = Math.max(...d.filter((e, n) => n % t === 0).map((t) => e.measureText(t.week).width));
1868
+ return Math.max(yt, n + xt);
1869
+ }, [d]), m = Math.round(p / 2), g = vt + m + Math.max(0, d.length - 1) * p, _ = Math.max(gt - _t, Math.min(g, Tt)), { tooltip: y, hitZonesRef: b } = w(r, {
1825
1870
  width: _,
1826
1871
  height: q
1827
1872
  });
1828
1873
  return n(() => {
1829
1874
  let e = r.current;
1830
1875
  if (!e) return;
1831
- let t = v(e, _, q), n = o.current ? v(o.current, ft, q) : null;
1876
+ let t = v(e, _, q), n = o.current ? v(o.current, _t, q) : null;
1832
1877
  l.current = 0;
1833
- let i = d.length <= vt ? vt : Math.max(24, Math.round(vt * (vt / d.length))), a = _ - pt, s = q - 30 - 54, c = Math.max(...d.map((e) => e.count), 1), g = d.length, y = g > 1 ? (a - m) / (g - 1) : a - m, x = Math.max(1, Math.ceil(p / y)), S = d.map((e, t) => ({
1834
- x: m + t * y,
1835
- y: 30 + s - e.count / c * s,
1878
+ let i = d.length <= Ct ? Ct : Math.max(24, Math.round(Ct * (Ct / d.length))), a = _ - vt, s = q - 42 - 54, c = d.map((e) => e.count), g = Math.min(...c), y = Math.max(...c), x = y - g || 1, S = d.length, C = S > 1 ? (a - m) / (S - 1) : a - m, w = Math.max(1, Math.ceil(p / C)), E = g < 0, O = E ? 42 + s - -g / x * s : 42 + s, k = d.map((e, t) => ({
1879
+ x: m + t * C,
1880
+ y: 42 + s - (e.count - g) / x * s,
1836
1881
  point: e
1837
1882
  }));
1838
- n && (n.clearRect(0, 0, ft, q), n.letterSpacing = f.letterSpacing, [
1839
- .25,
1840
- .5,
1841
- .75,
1842
- 1
1843
- ].forEach((e) => {
1844
- let t = 30 + s - e * s;
1845
- n.font = f.font, n.fillStyle = f.color, n.textAlign = "right", n.fillText(String(Math.round(c * e)), ft - 6, t + 3);
1846
- }), n.save(), n.translate(12, 30 + s / 2), n.rotate(-Math.PI / 2), n.font = f.font, n.fillStyle = f.color, n.textAlign = "center", n.fillText("Count", 0, 0), n.restore());
1847
- let C = t.createLinearGradient(0, 30, 0, 30 + s);
1848
- C.addColorStop(0, h(u.blue, .22)), C.addColorStop(1, h(u.blue, .02));
1849
- let w = 0, E, O = (e) => {
1850
- t.font = ht, t.fillStyle = f.color, t.textAlign = "center";
1851
- for (let n = 0; n < e; n++) n % x === 0 && t.fillText(S[n].point.week, S[n].x, q - 54 + 14);
1852
- }, k = () => {
1883
+ if (n) {
1884
+ n.clearRect(0, 0, _t, q), n.letterSpacing = f.letterSpacing;
1885
+ let e = E ? [
1886
+ g,
1887
+ g + x * .25,
1888
+ g + x * .5,
1889
+ g + x * .75,
1890
+ y
1891
+ ] : [
1892
+ 0,
1893
+ y * .25,
1894
+ y * .5,
1895
+ y * .75,
1896
+ y
1897
+ ];
1898
+ e.forEach((t, r) => {
1899
+ let i = r / (e.length - 1), a = 42 + s - i * s;
1900
+ n.font = f.font, n.fillStyle = f.color, n.textAlign = "right", n.fillText(We(t), _t - 6, a + 3);
1901
+ }), n.save(), n.translate(12, 42 + s / 2), n.rotate(-Math.PI / 2), n.font = f.font, n.fillStyle = f.color, n.textAlign = "center", n.fillText("Count", 0, 0), n.restore();
1902
+ }
1903
+ let A = t.createLinearGradient(0, 42, 0, 42 + s);
1904
+ A.addColorStop(0, h(u.blue, .22)), A.addColorStop(1, h(u.blue, .02));
1905
+ let j = 0, M, N = (e) => {
1906
+ t.font = bt, t.fillStyle = f.color, t.textAlign = "center";
1907
+ for (let n = 0; n < e; n++) n % w === 0 && t.fillText(k[n].point.week, k[n].x, q - 54 + 14);
1908
+ }, P = () => {
1853
1909
  l.current++;
1854
1910
  let e = Math.min(l.current / i, 1), n = D(e), r = e >= 1;
1855
- t.clearRect(0, 0, _, q), t.letterSpacing = f.letterSpacing, [
1911
+ t.clearRect(0, 0, _, q), t.letterSpacing = f.letterSpacing, (E ? [
1912
+ 0,
1856
1913
  .25,
1857
1914
  .5,
1858
1915
  .75,
1859
1916
  1
1860
- ].forEach((e) => {
1861
- let n = 30 + s - e * s;
1917
+ ] : [
1918
+ .25,
1919
+ .5,
1920
+ .75,
1921
+ 1
1922
+ ]).forEach((e) => {
1923
+ let n = 42 + s - e * s;
1862
1924
  t.strokeStyle = h(u.bd, .18), t.lineWidth = 1, t.setLineDash([3, 5]), t.beginPath(), t.moveTo(0, n), t.lineTo(a, n), t.stroke(), t.setLineDash([]);
1863
- }), t.font = f.font, t.fillStyle = f.color, t.textAlign = "center", t.fillText("Period", m + (a - m) / 2, q - 6), t.strokeStyle = h(u.bd, .3), t.lineWidth = 1, t.beginPath(), t.moveTo(m, 30 + s), t.lineTo(a, 30 + s), t.stroke();
1864
- let o = n * (g - 1), c = Math.floor(o) + 1;
1925
+ }), t.font = f.font, t.fillStyle = f.color, t.textAlign = "center", t.fillText("Period", m + (a - m) / 2, q - 6), t.strokeStyle = h(u.bd, E ? .5 : .3), t.lineWidth = E ? 2 : 1, t.beginPath(), t.moveTo(m, E ? O : 42 + s), t.lineTo(a, E ? O : 42 + s), t.stroke();
1926
+ let o = n * (S - 1), c = Math.floor(o) + 1;
1865
1927
  if (c >= 2) {
1866
- t.beginPath(), t.moveTo(S[0].x, 30 + s), t.lineTo(S[0].x, S[0].y);
1928
+ let e = E ? O : 42 + s;
1929
+ t.beginPath(), t.moveTo(k[0].x, e), t.lineTo(k[0].x, k[0].y);
1867
1930
  for (let e = 1; e < c; e++) {
1868
- let n = o - Math.floor(o), r = e === c - 1 && e === Math.ceil(o) && n > 0, i = r ? S[e - 1].x + (S[e].x - S[e - 1].x) * n : S[e].x, a = r ? S[e - 1].y + (S[e].y - S[e - 1].y) * n : S[e].y;
1931
+ let n = o - Math.floor(o), r = e === c - 1 && e === Math.ceil(o) && n > 0, i = r ? k[e - 1].x + (k[e].x - k[e - 1].x) * n : k[e].x, a = r ? k[e - 1].y + (k[e].y - k[e - 1].y) * n : k[e].y;
1869
1932
  t.lineTo(i, a);
1870
1933
  }
1871
- t.lineTo(S[c - 1].x, 30 + s), t.closePath(), t.fillStyle = C, t.fill();
1934
+ t.lineTo(k[c - 1].x, e), t.closePath(), t.fillStyle = A, t.fill();
1872
1935
  }
1873
1936
  t.beginPath();
1874
1937
  for (let e = 0; e < c; e++) {
1875
- let n = o - Math.floor(o), r = e === c - 1 && e > 0 && e === Math.ceil(o) && n > 0, i = r ? S[e - 1].x + (S[e].x - S[e - 1].x) * n : S[e].x, a = r ? S[e - 1].y + (S[e].y - S[e - 1].y) * n : S[e].y;
1938
+ let n = o - Math.floor(o), r = e === c - 1 && e > 0 && e === Math.ceil(o) && n > 0, i = r ? k[e - 1].x + (k[e].x - k[e - 1].x) * n : k[e].x, a = r ? k[e - 1].y + (k[e].y - k[e - 1].y) * n : k[e].y;
1876
1939
  e === 0 ? t.moveTo(i, a) : t.lineTo(i, a);
1877
1940
  }
1878
1941
  t.strokeStyle = h(u.blue, .85), t.lineWidth = 2, t.stroke(), t.fillStyle = h(u.blue, .8), t.beginPath();
1879
- for (let e = 0; e < c; e++) t.moveTo(S[e].x + 3.5, S[e].y), t.arc(S[e].x, S[e].y, 3.5, 0, _t);
1880
- if (t.fill(), c > w) {
1942
+ for (let e = 0; e < c; e++) t.moveTo(k[e].x + 3.5, k[e].y), t.arc(k[e].x, k[e].y, 3.5, 0, St);
1943
+ if (t.fill(), c > j) {
1881
1944
  b.current = [];
1882
- for (let e = 0; e < c; e++) T(b.current, `pt-${e}`, S[e].x, S[e].y, 10, {
1883
- label: S[e].point.week,
1884
- value: `${S[e].point.count} submissions`,
1885
- sublabel: `£${S[e].point.value}M value`,
1945
+ for (let e = 0; e < c; e++) T(b.current, `pt-${e}`, k[e].x, k[e].y, 10, {
1946
+ label: k[e].point.week,
1947
+ value: `${k[e].point.count} submissions`,
1948
+ sublabel: `£${k[e].point.value}M value`,
1886
1949
  color: u.blue
1887
1950
  });
1888
- w = c;
1951
+ j = c;
1889
1952
  }
1890
- r && O(g), r || (E = requestAnimationFrame(k));
1953
+ r && N(S), r || (M = requestAnimationFrame(P));
1891
1954
  };
1892
- return k(), () => cancelAnimationFrame(E);
1955
+ return P(), () => cancelAnimationFrame(M);
1893
1956
  }, [
1894
1957
  d,
1895
1958
  _,
1896
1959
  p,
1897
1960
  b
1898
1961
  ]), d.length < 2 ? /* @__PURE__ */ s(I, {
1899
- width: dt,
1962
+ width: gt,
1900
1963
  height: q,
1901
1964
  "data-testid": t
1902
1965
  }) : /* @__PURE__ */ c("div", {
@@ -1910,7 +1973,7 @@ function xt({ points: e = [], "data-testid": t }) {
1910
1973
  ref: o,
1911
1974
  "aria-hidden": "true",
1912
1975
  style: {
1913
- width: ft,
1976
+ width: _t,
1914
1977
  height: q,
1915
1978
  display: "block",
1916
1979
  flexShrink: 0
@@ -1947,112 +2010,112 @@ function xt({ points: e = [], "data-testid": t }) {
1947
2010
  }
1948
2011
  //#endregion
1949
2012
  //#region src/components/proportionalBandChart/ProportionalBandChart.tsx
1950
- var J = 680, St = 240;
1951
- function Ct(e, t, n) {
2013
+ var Dt = 680, Ot = 240, kt = 28, At = 156;
2014
+ function jt(e, t, n) {
1952
2015
  if (e.measureText(t).width <= n) return t;
1953
2016
  let r = t;
1954
2017
  for (; r.length > 0 && e.measureText(`${r}…`).width > n;) r = r.slice(0, -1);
1955
2018
  return `${r}…`;
1956
2019
  }
1957
- var wt = {
2020
+ var Mt = {
1958
2021
  Critical: u.red,
1959
2022
  High: u.orange,
1960
2023
  Medium: u.amber,
1961
2024
  Low: u.green
1962
2025
  };
1963
- function Tt({ severities: e = [], "data-testid": t }) {
1964
- let r = a(null), o = a(/* @__PURE__ */ new Map()), l = a(0), { hoveredRef: d, tooltip: m, hitZonesRef: g } = w(r, {
1965
- width: J,
1966
- height: St
1967
- }), _ = i(() => e.filter((e) => typeof e == "object" && !!e), [e]);
2026
+ function Nt({ severities: e = [], "data-testid": t }) {
2027
+ let r = a(null), o = a(/* @__PURE__ */ new Map()), l = a(0), d = i(() => e.filter((e) => typeof e == "object" && !!e), [e]), m = d.length > 0 ? Math.min(Dt, 2 * kt + d.length * At) : Dt, { hoveredRef: g, tooltip: _, hitZonesRef: b } = w(r, {
2028
+ width: m,
2029
+ height: Ot
2030
+ });
1968
2031
  return n(() => {
1969
2032
  let e = r.current;
1970
2033
  if (!e) return;
1971
- let t = v(e, J, St);
2034
+ let t = v(e, m, Ot);
1972
2035
  l.current = 0;
1973
- let n = _.reduce((e, t) => e + (t.count ?? 0), 0), i = J - 28 - 28, a = St - 50 - 52, s = _.map((e) => (e.count ?? 0) / (n || 1) * i), c, m = () => {
2036
+ let n = d.reduce((e, t) => e + (t.count ?? 0), 0), i = kt, a = kt, s = m - i - a, c = Ot - 50 - 52, _ = d.map((e) => (e.count ?? 0) / (n || 1) * s), x, S = () => {
1974
2037
  l.current++;
1975
2038
  let e = l.current;
1976
- t.clearRect(0, 0, J, St), t.letterSpacing = f.letterSpacing;
2039
+ t.clearRect(0, 0, m, Ot), t.letterSpacing = f.letterSpacing;
1977
2040
  let r = O(Math.min(e / 60, 1));
1978
- N(o.current, d.current), g.current = [], t.strokeStyle = h(u.bd, .2), t.lineWidth = 1, t.beginPath(), t.rect(28, 50, i, a), t.stroke(), t.strokeStyle = h(u.t2, .15), t.lineWidth = 1, t.setLineDash([4, 4]), t.beginPath(), t.moveTo(J / 2, 50), t.lineTo(J / 2, 50 + a), t.stroke(), t.setLineDash([]);
1979
- let v = 28;
1980
- _.forEach((e, i) => {
1981
- let c = wt[e.severity] ?? u.blue, l = s[i], d = o.current.get(e.severity) ?? 0, m = v + l / 2, _ = l * .85, b = l * r, x = _ * r, S = m - x / 2;
1982
- if (b > 0 && (d > 0 && y(t, v + b / 2, 50 + a / 2, b * .4, c, .15 * d), t.beginPath(), t.moveTo(S, 50), t.lineTo(S + x, 50), t.lineTo(v + b, 50 + a), t.lineTo(v, 50 + a), t.closePath(), t.fillStyle = h(c, .45 + d * .25), t.fill(), t.strokeStyle = h(c, (.5 + d * .3) * r), t.lineWidth = d > 0 ? 2 : 1, t.beginPath(), t.moveTo(S, 50), t.lineTo(S + x, 50), t.stroke(), t.strokeStyle = h(c, (.3 + d * .3) * r), t.lineWidth = d > 0 ? 2 : 1, t.beginPath(), t.moveTo(v, 50 + a), t.lineTo(v + b, 50 + a), t.stroke()), E(g.current, e.severity, v, 50, l, a, {
2041
+ N(o.current, g.current), b.current = [], t.strokeStyle = h(u.bd, .2), t.lineWidth = 1, t.beginPath(), t.rect(i, 50, s, c), t.stroke(), t.strokeStyle = h(u.t2, .15), t.lineWidth = 1, t.setLineDash([4, 4]), t.beginPath(), t.moveTo(m / 2, 50), t.lineTo(m / 2, 50 + c), t.stroke(), t.setLineDash([]);
2042
+ let a = i;
2043
+ d.forEach((e, i) => {
2044
+ let s = Mt[e.severity] ?? u.blue, l = _[i], d = o.current.get(e.severity) ?? 0, m = a + l / 2, g = l * .85, v = l * r, x = g * r, S = m - x / 2;
2045
+ if (v > 0 && (d > 0 && y(t, a + v / 2, 50 + c / 2, v * .4, s, .15 * d), t.beginPath(), t.moveTo(S, 50), t.lineTo(S + x, 50), t.lineTo(a + v, 50 + c), t.lineTo(a, 50 + c), t.closePath(), t.fillStyle = h(s, .45 + d * .25), t.fill(), t.strokeStyle = h(s, (.5 + d * .3) * r), t.lineWidth = d > 0 ? 2 : 1, t.beginPath(), t.moveTo(S, 50), t.lineTo(S + x, 50), t.stroke(), t.strokeStyle = h(s, (.3 + d * .3) * r), t.lineWidth = d > 0 ? 2 : 1, t.beginPath(), t.moveTo(a, 50 + c), t.lineTo(a + v, 50 + c), t.stroke()), E(b.current, e.severity, a, 50, l, c, {
1983
2046
  label: e.severity,
1984
2047
  value: `${e.count} Early Warnings`,
1985
2048
  sublabel: `${Math.round((e.count ?? 0) / (n || 1) * 100)}% of all EWs`,
1986
- color: c
2049
+ color: s
1987
2050
  }), r > .5) {
1988
- let i = Math.min(1, (r - .5) / .5), o = v + l / 2;
1989
- t.globalAlpha = i, t.font = f.font, t.fillStyle = d > 0 ? c : h(c, .9), t.textAlign = "center", t.fillText(Ct(t, e.severity, l - 12), o, 38), t.font = p.font, t.fillStyle = d > 0 ? u.t1 : h(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 ?? 0) / (n || 1) * 100)}%`, o, 50 + a + 18), t.globalAlpha = 1;
2051
+ let i = Math.min(1, (r - .5) / .5), o = a + l / 2;
2052
+ t.globalAlpha = i, t.font = f.font, t.fillStyle = d > 0 ? s : h(s, .9), t.textAlign = "center", t.fillText(jt(t, e.severity, l - 12), o, 38), t.font = p.font, t.fillStyle = d > 0 ? u.t1 : h(u.t1, .85), t.fillText(String(e.count), o, 50 + c / 2 + 6), t.font = f.font, t.fillStyle = d > 0 ? s : f.color, t.fillText(`${Math.round((e.count ?? 0) / (n || 1) * 100)}%`, o, 50 + c + 18), t.globalAlpha = 1;
1990
2053
  }
1991
- v += l;
2054
+ a += l;
1992
2055
  });
1993
- let b = t.createLinearGradient(28, 0, 28 + i, 0);
1994
- b.addColorStop(0, h(u.red, .03)), b.addColorStop(.33, h(u.orange, .03)), b.addColorStop(.66, h(u.amber, .03)), b.addColorStop(1, h(u.green, .03)), t.fillStyle = b, t.fillRect(28, 50, i * r, a), c = requestAnimationFrame(m);
2056
+ let v = t.createLinearGradient(i, 0, i + s, 0);
2057
+ v.addColorStop(0, h(u.red, .03)), v.addColorStop(.33, h(u.orange, .03)), v.addColorStop(.66, h(u.amber, .03)), v.addColorStop(1, h(u.green, .03)), t.fillStyle = v, t.fillRect(i, 50, s * r, c), x = requestAnimationFrame(S);
1995
2058
  };
1996
- return m(), () => cancelAnimationFrame(c);
1997
- }, [_]), _.length === 0 ? /* @__PURE__ */ s(I, {
1998
- width: J,
1999
- height: St,
2059
+ return S(), () => cancelAnimationFrame(x);
2060
+ }, [d, m]), d.length === 0 ? /* @__PURE__ */ s(I, {
2061
+ width: m,
2062
+ height: Ot,
2000
2063
  "data-testid": t
2001
2064
  }) : /* @__PURE__ */ c("div", {
2002
2065
  "data-testid": t,
2003
2066
  style: {
2004
2067
  position: "relative",
2005
- width: J,
2006
- height: St
2068
+ width: m,
2069
+ height: Ot
2007
2070
  },
2008
2071
  children: [/* @__PURE__ */ s("canvas", {
2009
2072
  ref: r,
2010
2073
  role: "img",
2011
2074
  "aria-label": "Early Warning severity distribution — prism spectrum bands",
2012
2075
  style: {
2013
- width: J,
2014
- height: St,
2076
+ width: m,
2077
+ height: Ot,
2015
2078
  display: "block"
2016
2079
  }
2017
2080
  }), /* @__PURE__ */ s(C, {
2018
- ...m,
2019
- parentW: J,
2020
- parentH: St
2081
+ ..._,
2082
+ parentW: m,
2083
+ parentH: Ot
2021
2084
  })]
2022
2085
  });
2023
2086
  }
2024
2087
  //#endregion
2025
2088
  //#region src/components/hubAndSpokeRadialChart/HubAndSpokeRadialChart.tsx
2026
- var Y = 460, X = 300, Et = {
2089
+ var J = 300, Y = 280, Pt = 100, Ft = {
2027
2090
  Open: u.red,
2028
2091
  Submitted: u.amber,
2029
2092
  Closed: u.green
2030
2093
  };
2031
- function Dt({ segments: e = [], title: t, "data-testid": r }) {
2094
+ function It({ segments: e = [], title: t, "data-testid": r }) {
2032
2095
  let o = a(null), l = a(0), d = a(/* @__PURE__ */ new Map()), { hoveredRef: m, tooltip: g, hitZonesRef: _ } = w(o, {
2033
- width: Y,
2034
- height: X
2096
+ width: J,
2097
+ height: Y
2035
2098
  }), S = i(() => e.filter((e) => typeof e == "object" && !!e), [e]);
2036
2099
  return n(() => {
2037
2100
  let e = o.current;
2038
2101
  if (!e) return;
2039
- let t = v(e, Y, X);
2102
+ let t = v(e, J, Y);
2040
2103
  l.current = 0;
2041
- let n = Y * .5, r = X * .54, i = Y * .22, a = S.reduce((e, t) => e + (t.count ?? 0), 0), s = Math.max(...S.map((e) => e.count ?? 0), 1), c, g = () => {
2104
+ let n = J * .5, r = Y * .56, i = Pt, a = S.reduce((e, t) => e + (t.count ?? 0), 0), s = Math.max(...S.map((e) => e.count ?? 0), 1), c, g = () => {
2042
2105
  l.current++;
2043
2106
  let e = l.current;
2044
- t.clearRect(0, 0, Y, X), t.letterSpacing = f.letterSpacing, _.current = [], d.current.forEach((e, t) => {
2107
+ t.clearRect(0, 0, J, Y), t.letterSpacing = f.letterSpacing, _.current = [], d.current.forEach((e, t) => {
2045
2108
  let n = t === m.current ? 1 : 0, r = e + (n - e) * .12;
2046
2109
  Math.abs(r - n) < .005 ? n === 0 ? d.current.delete(t) : d.current.set(t, 1) : d.current.set(t, r);
2047
- }), m.current && !d.current.has(m.current) && d.current.set(m.current, 0), b(t, Y, X, e, 40, h(u.blue, .04)), S.forEach((a, o) => {
2048
- let c = o / 3 * Math.PI * 2 - Math.PI / 2, l = n + Math.cos(c) * i, d = r + Math.sin(c) * i, f = Et[a.status] ?? u.blue, m = 2 + a.count / s * 8;
2110
+ }), m.current && !d.current.has(m.current) && d.current.set(m.current, 0), b(t, J, Y, e, 40, h(u.blue, .04)), S.forEach((a, o) => {
2111
+ let c = o / 3 * Math.PI * 2 - Math.PI / 2, l = n + Math.cos(c) * i, d = r + Math.sin(c) * i, f = Ft[a.status] ?? u.blue, m = 2 + a.count / s * 8;
2049
2112
  t.beginPath(), t.moveTo(n, r), t.lineTo(l, d), t.strokeStyle = h(f, .08), t.lineWidth = m * 2, t.stroke(), t.beginPath(), t.moveTo(n, r), t.lineTo(l, d), t.strokeStyle = h(f, .25), t.lineWidth = 1, t.stroke();
2050
2113
  let g = (e * .005 + o * .33) % 1, _ = n + (l - n) * g, v = r + (d - r) * g;
2051
2114
  y(t, _, v, 6, f, .4), t.beginPath(), t.arc(_, v, 2, 0, Math.PI * 2), t.fillStyle = h(f, .8), t.fill();
2052
2115
  let b = (n + l) / 2, x = (r + d) / 2;
2053
2116
  t.font = p.font, t.textAlign = "center", t.textBaseline = "middle", t.fillStyle = h(f, .85), t.fillText(String(a.count), b, x);
2054
2117
  }), S.forEach((e, o) => {
2055
- let c = o / 3 * Math.PI * 2 - Math.PI / 2, l = n + Math.cos(c) * i, p = r + Math.sin(c) * i, m = Et[e.status] ?? u.blue, g = 10 + e.count / s * 18, v = d.current.get(e.status) ?? 0;
2118
+ let c = o / 3 * Math.PI * 2 - Math.PI / 2, l = n + Math.cos(c) * i, p = r + Math.sin(c) * i, m = Ft[e.status] ?? u.blue, g = 10 + e.count / s * 18, v = d.current.get(e.status) ?? 0;
2056
2119
  y(t, l, p, g * 2.5, m, .2 + v * .15);
2057
2120
  let b = t.createRadialGradient(l, p - g * .2, 0, l, p, g);
2058
2121
  b.addColorStop(0, h(m, .8 + v * .2)), b.addColorStop(1, h(m, .4 + v * .1)), t.beginPath(), t.arc(l, p, g, 0, Math.PI * 2), t.fillStyle = b, t.fill(), t.font = "bold " + f.font, t.textAlign = "center", t.textBaseline = "middle", t.fillStyle = h(u.t1, .9), t.fillText(e.status, l, p), T(_.current, e.status, l, p, g + 6, {
@@ -2069,41 +2132,41 @@ function Dt({ segments: e = [], title: t, "data-testid": r }) {
2069
2132
  label: "Total EW Status",
2070
2133
  value: `${a} Early Warnings`,
2071
2134
  color: u.t2
2072
- }), x(t, Y, X, e, .015), c = requestAnimationFrame(g);
2135
+ }), x(t, J, Y, e, .015), c = requestAnimationFrame(g);
2073
2136
  };
2074
2137
  return g(), () => cancelAnimationFrame(c);
2075
2138
  }, [S, t]), S.length === 0 ? /* @__PURE__ */ s(I, {
2076
- width: Y,
2077
- height: X,
2139
+ width: J,
2140
+ height: Y,
2078
2141
  "data-testid": r
2079
2142
  }) : /* @__PURE__ */ c("div", {
2080
2143
  "data-testid": r,
2081
2144
  style: {
2082
2145
  position: "relative",
2083
- width: Y,
2084
- height: X
2146
+ width: J,
2147
+ height: Y
2085
2148
  },
2086
2149
  children: [/* @__PURE__ */ s("canvas", {
2087
2150
  ref: o,
2088
2151
  role: "img",
2089
2152
  "aria-label": t ?? "EW status arc visualization",
2090
2153
  style: {
2091
- width: Y,
2092
- height: X,
2154
+ width: J,
2155
+ height: Y,
2093
2156
  display: "block",
2094
2157
  borderRadius: 8
2095
2158
  }
2096
2159
  }), /* @__PURE__ */ s(C, {
2097
2160
  ...g,
2098
- parentW: Y,
2099
- parentH: X
2161
+ parentW: J,
2162
+ parentH: Y
2100
2163
  })]
2101
2164
  });
2102
2165
  }
2103
2166
  //#endregion
2104
2167
  //#region src/components/trendChart/TrendChart.tsx
2105
- var Ot = 280, Z = 96;
2106
- function kt({ points: e = [], className: t, colors: r }) {
2168
+ var Lt = 280, X = 96;
2169
+ function Rt({ points: e = [], className: t, colors: r }) {
2107
2170
  let o = a(null), d = a(/* @__PURE__ */ new Map()), f = a(0), p = i(() => e.filter(Array.isArray).map(([e, t]) => {
2108
2171
  let n = String(t).match(/-?\d+(\.\d+)?/);
2109
2172
  return {
@@ -2111,18 +2174,18 @@ function kt({ points: e = [], className: t, colors: r }) {
2111
2174
  value: n ? Number(n[0]) : 0
2112
2175
  };
2113
2176
  }), [e]), { mouseRef: m, hoveredRef: g, tooltip: _, hitZonesRef: b } = w(o, {
2114
- width: Ot,
2115
- height: Z
2177
+ width: Lt,
2178
+ height: X
2116
2179
  });
2117
2180
  return n(() => {
2118
2181
  let e = o.current;
2119
2182
  if (!e) return;
2120
- let t = v(e, Ot, Z);
2183
+ let t = v(e, Lt, X);
2121
2184
  f.current = 0;
2122
2185
  let n = r?.line ?? u.blue, i = r?.point ?? u.blue, a = r?.axisLine ?? u.bd, s, c = () => {
2123
2186
  f.current++;
2124
2187
  let e = f.current;
2125
- if (t.clearRect(0, 0, Ot, Z), p.length < 2) {
2188
+ if (t.clearRect(0, 0, Lt, X), p.length < 2) {
2126
2189
  s = requestAnimationFrame(c);
2127
2190
  return;
2128
2191
  }
@@ -2131,9 +2194,9 @@ function kt({ points: e = [], className: t, colors: r }) {
2131
2194
  right: 12,
2132
2195
  top: 16,
2133
2196
  bottom: 20
2134
- }, o = Ot - r.left - r.right, l = Z - r.top - r.bottom, _ = p.map((e) => e.value), v = Math.min(..._), x = Math.max(..._) - v || 1, C = (e) => r.left + e / (p.length - 1) * o, w = (e) => r.top + (1 - (e - v) / x) * l, E = 1 - (1 - Math.min(e / 48, 1)) ** 3, D = Math.max(2, Math.floor(E * p.length));
2135
- if (N(d.current, g.current), b.current = [], t.strokeStyle = h(a, .3), t.lineWidth = .5, t.setLineDash([]), t.beginPath(), t.moveTo(r.left, Z - r.bottom), t.lineTo(Ot - r.right, Z - r.bottom), t.stroke(), t.font = "9px 'JetBrains Mono', monospace", t.fillStyle = h(u.t4, .9), t.textAlign = "center", p.forEach((e, n) => {
2136
- t.fillText(e.label.replace("Day ", "D"), C(n), Z - 4);
2197
+ }, o = Lt - r.left - r.right, l = X - r.top - r.bottom, _ = p.map((e) => e.value), v = Math.min(..._), x = Math.max(..._) - v || 1, C = (e) => r.left + e / (p.length - 1) * o, w = (e) => r.top + (1 - (e - v) / x) * l, E = 1 - (1 - Math.min(e / 48, 1)) ** 3, D = Math.max(2, Math.floor(E * p.length));
2198
+ if (N(d.current, g.current), b.current = [], t.strokeStyle = h(a, .3), t.lineWidth = .5, t.setLineDash([]), t.beginPath(), t.moveTo(r.left, X - r.bottom), t.lineTo(Lt - r.right, X - r.bottom), t.stroke(), t.font = "9px 'JetBrains Mono', monospace", t.fillStyle = h(u.t4, .9), t.textAlign = "center", p.forEach((e, n) => {
2199
+ t.fillText(e.label.replace("Day ", "D"), C(n), X - 4);
2137
2200
  }), m.current.over && g.current) {
2138
2201
  let e = parseInt(g.current.split("-")[1]);
2139
2202
  isNaN(e) || S(t, C(e), r.top, r.top + l);
@@ -2169,44 +2232,50 @@ function kt({ points: e = [], className: t, colors: r }) {
2169
2232
  children: /* @__PURE__ */ c("div", {
2170
2233
  style: {
2171
2234
  position: "relative",
2172
- width: Ot,
2173
- height: Z
2235
+ width: Lt,
2236
+ height: X
2174
2237
  },
2175
2238
  children: [/* @__PURE__ */ s("canvas", {
2176
2239
  ref: o,
2177
2240
  role: "img",
2178
2241
  "aria-label": "trend chart",
2179
2242
  style: {
2180
- width: Ot,
2181
- height: Z,
2243
+ width: Lt,
2244
+ height: X,
2182
2245
  display: "block",
2183
2246
  borderRadius: 8
2184
2247
  }
2185
2248
  }), /* @__PURE__ */ s(C, {
2186
2249
  ..._,
2187
- parentW: Ot,
2188
- parentH: Z
2250
+ parentW: Lt,
2251
+ parentH: X
2189
2252
  })]
2190
2253
  })
2191
2254
  });
2192
2255
  }
2193
2256
  //#endregion
2194
2257
  //#region src/components/segmentedSplitBarChart/SegmentedSplitBarChart.tsx
2195
- var At = 680, jt = 8, Mt = 26, Nt = 14, Pt = 16, Ft = 32;
2196
- function It({ items: e = [], "data-testid": t }) {
2197
- let r = a(null), l = a(/* @__PURE__ */ new Map()), d = a(0), [g, _] = o(!1), b = i(() => e.filter((e) => typeof e == "object" && !!e), [e]), x = i(() => g ? b : b.slice(0, jt), [b, g]), S = Pt + Ft + x.length * (Mt + Nt) - Nt, { hoveredRef: T, tooltip: D, hitZonesRef: k } = w(r, {
2198
- width: At,
2258
+ function zt(e, t, n) {
2259
+ if (e.measureText(t).width <= n) return t;
2260
+ let r = t;
2261
+ for (; r.length > 0 && e.measureText(r + "…").width > n;) r = r.slice(0, -1);
2262
+ return r + "…";
2263
+ }
2264
+ var Bt = 680, Vt = 8, Ht = 26, Ut = 14, Wt = 16, Gt = 32;
2265
+ function Kt({ items: e = [], "data-testid": t }) {
2266
+ let r = a(null), l = a(/* @__PURE__ */ new Map()), d = a(0), [g, _] = o(!1), b = i(() => e.filter((e) => typeof e == "object" && !!e), [e]), x = i(() => g ? b : b.slice(0, Vt), [b, g]), S = Wt + Gt + x.length * (Ht + Ut) - Ut, { hoveredRef: T, tooltip: D, hitZonesRef: k } = w(r, {
2267
+ width: Bt,
2199
2268
  height: S
2200
2269
  });
2201
2270
  return n(() => {
2202
2271
  let e = r.current;
2203
2272
  if (!e) return;
2204
- let t = v(e, At, S);
2273
+ let t = v(e, Bt, S);
2205
2274
  d.current = 0;
2206
- let n = Pt, i = Ft, a = Mt, o = Nt, s = At - 60 - 28, c = Math.max(...x.map((e) => (e.implemented ?? 0) + (e.unimplemented ?? 0)), 1), g = x.length * (a + o) - o, _ = n + (S - n - i - g) / 2, b, C = () => {
2275
+ let n = Wt, i = Gt, a = Ht, o = Ut, s = Bt - 60 - 28, c = Math.max(...x.map((e) => (e.implemented ?? 0) + (e.unimplemented ?? 0)), 1), g = x.length * (a + o) - o, _ = n + (S - n - i - g) / 2, b, C = () => {
2207
2276
  d.current++;
2208
2277
  let e = d.current;
2209
- t.clearRect(0, 0, At, S);
2278
+ t.clearRect(0, 0, Bt, S);
2210
2279
  let n = O(Math.min(e / 60, 1));
2211
2280
  N(l.current, T.current), k.current = [], x.forEach((e, r) => {
2212
2281
  let i = M(n, r, x.length, O), d = _ + r * (a + o), m = (e.implemented ?? 0) + (e.unimplemented ?? 0), g = (e.implemented ?? 0) / c * s * i, v = (e.unimplemented ?? 0) / c * s * i, b = `${e.id}-impl`, S = `${e.id}-un`, C = l.current.get(b) ?? 0, w = l.current.get(S) ?? 0;
@@ -2220,7 +2289,7 @@ function It({ items: e = [], "data-testid": t }) {
2220
2289
  value: `${e.unimplemented ?? 0} variations`,
2221
2290
  sublabel: `${Math.round((e.unimplemented ?? 0) / (m || 1) * 100)}% pending`,
2222
2291
  color: u.amber
2223
- }), t.font = f.font, t.fillStyle = u.t2, t.textAlign = "right", t.fillText(e.abbreviation ?? e.name?.slice(0, 6) ?? "", 52, d + a / 2 + 4), t.fillStyle = h(u.bd, .15), t.beginPath(), t.roundRect(60, d, m / c * s, a, 4), t.fill(), g > 0 && (C > 0 && y(t, 60 + g / 2, d + a / 2, g * .3, u.green, .12 * C), t.fillStyle = h(u.green, .6 + C * .2), t.beginPath(), t.roundRect(60, d, g, a, [
2292
+ }), t.font = f.font, t.fillStyle = u.t2, t.textAlign = "right", t.fillText(zt(t, e.abbreviation ?? e.name ?? "", 44), 52, d + a / 2 + 4), t.fillStyle = h(u.bd, .15), t.beginPath(), t.roundRect(60, d, m / c * s, a, 4), t.fill(), g > 0 && (C > 0 && y(t, 60 + g / 2, d + a / 2, g * .3, u.green, .12 * C), t.fillStyle = h(u.green, .6 + C * .2), t.beginPath(), t.roundRect(60, d, g, a, [
2224
2293
  4,
2225
2294
  0,
2226
2295
  0,
@@ -2237,16 +2306,16 @@ function It({ items: e = [], "data-testid": t }) {
2237
2306
  };
2238
2307
  return C(), () => cancelAnimationFrame(b);
2239
2308
  }, [x, S]), b.length === 0 ? /* @__PURE__ */ s(I, {
2240
- width: At,
2309
+ width: Bt,
2241
2310
  height: 160,
2242
2311
  "data-testid": t
2243
2312
  }) : /* @__PURE__ */ c("div", {
2244
2313
  "data-testid": t,
2245
- style: { width: At },
2314
+ style: { width: Bt },
2246
2315
  children: [/* @__PURE__ */ c("div", {
2247
2316
  style: {
2248
2317
  position: "relative",
2249
- width: At,
2318
+ width: Bt,
2250
2319
  height: S
2251
2320
  },
2252
2321
  children: [/* @__PURE__ */ s("canvas", {
@@ -2254,16 +2323,16 @@ function It({ items: e = [], "data-testid": t }) {
2254
2323
  role: "img",
2255
2324
  "aria-label": "Implemented vs unimplemented variations per contractor — split bar",
2256
2325
  style: {
2257
- width: At,
2326
+ width: Bt,
2258
2327
  height: S,
2259
2328
  display: "block"
2260
2329
  }
2261
2330
  }), /* @__PURE__ */ s(C, {
2262
2331
  ...D,
2263
- parentW: At,
2332
+ parentW: Bt,
2264
2333
  parentH: S
2265
2334
  })]
2266
- }), b.length > jt && /* @__PURE__ */ s("div", {
2335
+ }), b.length > Vt && /* @__PURE__ */ s("div", {
2267
2336
  style: { marginTop: 8 },
2268
2337
  children: /* @__PURE__ */ s(ae, {
2269
2338
  expanded: g,
@@ -2274,18 +2343,18 @@ function It({ items: e = [], "data-testid": t }) {
2274
2343
  }
2275
2344
  //#endregion
2276
2345
  //#region src/components/weeklyFlow/WeeklyFlow.tsx
2277
- var Lt = 800, Rt = 360;
2278
- function zt({ items: e = [], "data-testid": t }) {
2346
+ var qt = 800, Jt = 360;
2347
+ function Yt({ items: e = [], "data-testid": t }) {
2279
2348
  let r = a(null), i = a(/* @__PURE__ */ new Map()), o = a(0), { hoveredRef: l, tooltip: m, hitZonesRef: g } = w(r, {
2280
- width: Lt,
2281
- height: Rt
2349
+ width: qt,
2350
+ height: Jt
2282
2351
  });
2283
2352
  return n(() => {
2284
2353
  let t = r.current;
2285
2354
  if (!t) return;
2286
- let n = v(t, Lt, Rt);
2355
+ let n = v(t, qt, Jt);
2287
2356
  o.current = 0;
2288
- 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), m = Rt - 20 - 26, _ = m - 6 * (e.length - 1), b = 20, x = e.map((e, t) => {
2357
+ 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), m = Jt - 20 - 26, _ = m - 6 * (e.length - 1), b = 20, x = e.map((e, t) => {
2289
2358
  let n = Math.max(24, (e.total ?? 0) / (c || 1) * _), r = {
2290
2359
  x: 100 - 110 / 2,
2291
2360
  y: b,
@@ -2313,16 +2382,16 @@ function zt({ items: e = [], "data-testid": t }) {
2313
2382
  }, j, P = () => {
2314
2383
  o.current++;
2315
2384
  let t = o.current;
2316
- n.clearRect(0, 0, Lt, Rt), n.letterSpacing = f.letterSpacing;
2385
+ n.clearRect(0, 0, qt, Jt), n.letterSpacing = f.letterSpacing;
2317
2386
  let r = D(Math.min(t / 80, 1));
2318
2387
  if (N(i.current, l.current), g.current = [], e.forEach((t, o) => {
2319
2388
  let c = x[o], l = M(r, o, e.length, D), u = i.current.get(t.id) ?? 0;
2320
2389
  if (l < .01) return;
2321
2390
  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 * C), v = Math.max(2, (t.variation ?? 0) / s * w), y = O.y + e.slice(0, o).reduce((e, t) => e + (t.base ?? 0) / a * C, 0) + _ / 2, b = k.y + e.slice(0, o).reduce((e, t) => e + (t.variation ?? 0) / s * w, 0) + v / 2, S = u * .2 + .18;
2322
- Bt(n, c.x + 110, h, 420 - 110 / 2, y, _ * l, c.color, S), Bt(n, c.x + 110, g, 420 - 110 / 2, b, v * l, c.color, S * .75);
2391
+ Xt(n, c.x + 110, h, 420 - 110 / 2, y, _ * l, c.color, S), Xt(n, c.x + 110, g, 420 - 110 / 2, b, v * l, c.color, S * .75);
2323
2392
  }), r > .3) {
2324
2393
  let e = Math.min(1, (r - .3) / .7), t = A.y + a / c * m / 2, i = A.y + m - s / c * m / 2;
2325
- Bt(n, 475, O.cy, 720 - 110 / 2, t, C * e, u.blue, .25 * e), Bt(n, 475, k.cy, 720 - 110 / 2, i, w * e, u.amber, .22 * e);
2394
+ Xt(n, 475, O.cy, 720 - 110 / 2, t, C * e, u.blue, .25 * e), Xt(n, 475, k.cy, 720 - 110 / 2, i, w * e, u.amber, .22 * e);
2326
2395
  }
2327
2396
  if ([
2328
2397
  "Contractors",
@@ -2334,7 +2403,7 @@ function zt({ items: e = [], "data-testid": t }) {
2334
2403
  420,
2335
2404
  720
2336
2405
  ][t];
2337
- n.font = f.font, n.fillStyle = f.color, n.textAlign = "center", n.fillText(e, r, Rt - 8);
2406
+ n.font = f.font, n.fillStyle = f.color, n.textAlign = "center", n.fillText(e, r, Jt - 8);
2338
2407
  }), e.forEach((t, a) => {
2339
2408
  let o = x[a], s = M(r, a, e.length, D), c = i.current.get(t.id) ?? 0;
2340
2409
  E(g.current, t.id, o.x, o.y, 110, o.h, {
@@ -2358,33 +2427,33 @@ function zt({ items: e = [], "data-testid": t }) {
2358
2427
  "data-testid": t,
2359
2428
  style: {
2360
2429
  position: "relative",
2361
- width: Lt,
2362
- height: Rt
2430
+ width: qt,
2431
+ height: Jt
2363
2432
  },
2364
2433
  children: [/* @__PURE__ */ s("canvas", {
2365
2434
  ref: r,
2366
2435
  role: "img",
2367
2436
  "aria-label": "Weekly report flow — base value and variations per contractor flowing to total commitment",
2368
2437
  style: {
2369
- width: Lt,
2370
- height: Rt,
2438
+ width: qt,
2439
+ height: Jt,
2371
2440
  display: "block"
2372
2441
  }
2373
2442
  }), /* @__PURE__ */ s(C, {
2374
2443
  ...m,
2375
- parentW: Lt,
2376
- parentH: Rt
2444
+ parentW: qt,
2445
+ parentH: Jt
2377
2446
  })]
2378
2447
  });
2379
2448
  }
2380
- function Bt(e, t, n, r, i, a, o, s) {
2449
+ function Xt(e, t, n, r, i, a, o, s) {
2381
2450
  let c = (t + r) / 2;
2382
2451
  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 = h(o, s), e.fill();
2383
2452
  }
2384
2453
  //#endregion
2385
2454
  //#region src/components/visualizationRenderer/VisualizationRenderer.tsx
2386
- function Vt({ config: e, className: t }) {
2387
- return e.type === "line" ? /* @__PURE__ */ s(Ie, {
2455
+ function Zt({ config: e, className: t }) {
2456
+ return e.type === "line" ? /* @__PURE__ */ s(ze, {
2388
2457
  rows: e.rows,
2389
2458
  className: t
2390
2459
  }) : e.type === "area" ? /* @__PURE__ */ s(te, {
@@ -2393,78 +2462,78 @@ function Vt({ config: e, className: t }) {
2393
2462
  }) : e.type === "bar" ? /* @__PURE__ */ s(ie, {
2394
2463
  rows: e.rows,
2395
2464
  className: t
2396
- }) : e.type === "pie" ? /* @__PURE__ */ s(Je, {
2465
+ }) : e.type === "pie" ? /* @__PURE__ */ s($e, {
2397
2466
  rows: e.rows,
2398
2467
  variant: "pie",
2399
2468
  className: t
2400
- }) : e.type === "donut" ? /* @__PURE__ */ s(Je, {
2469
+ }) : e.type === "donut" ? /* @__PURE__ */ s($e, {
2401
2470
  rows: e.rows,
2402
2471
  variant: "donut",
2403
2472
  className: t
2404
- }) : e.type === "sankey" ? /* @__PURE__ */ s(at, {
2473
+ }) : e.type === "sankey" ? /* @__PURE__ */ s(ut, {
2405
2474
  rows: e.rows,
2406
2475
  className: t
2407
- }) : e.type === "flow" ? /* @__PURE__ */ s(it, {
2476
+ }) : e.type === "flow" ? /* @__PURE__ */ s(lt, {
2408
2477
  selectedEntity: e.selectedEntity,
2409
2478
  className: t
2410
- }) : e.type === "trend" ? /* @__PURE__ */ s(kt, {
2479
+ }) : e.type === "trend" ? /* @__PURE__ */ s(Rt, {
2411
2480
  points: e.points,
2412
2481
  className: t
2413
- }) : e.type === "mini-bars" ? /* @__PURE__ */ s(ze, {
2482
+ }) : e.type === "mini-bars" ? /* @__PURE__ */ s(He, {
2414
2483
  rows: e.rows,
2415
2484
  className: t
2416
- }) : e.type === "stacked-horizontal-bar-chart" ? /* @__PURE__ */ s(Ae, { data: e.data }) : e.type === "multi-metric-constellation-chart" ? /* @__PURE__ */ s(Se, { items: e.items }) : e.type === "progress-race-chart" ? /* @__PURE__ */ s(de, { items: e.items }) : e.type === "hub-and-spoke-radial-chart" ? /* @__PURE__ */ s(Dt, {
2485
+ }) : e.type === "stacked-horizontal-bar-chart" ? /* @__PURE__ */ s(Ae, { 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(It, {
2417
2486
  segments: e.segments,
2418
2487
  title: e.title
2419
- }) : 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(Tt, { severities: e.severities }) : e.type === "radial-fan-tree-chart" ? /* @__PURE__ */ s(We, {
2488
+ }) : e.type === "dot-matrix-chart" ? /* @__PURE__ */ s(Re, { items: e.items }) : e.type === "ranked-card-leaderboard" ? /* @__PURE__ */ s(Le, { items: e.items }) : e.type === "proportional-band-chart" ? /* @__PURE__ */ s(Nt, { severities: e.severities }) : e.type === "radial-fan-tree-chart" ? /* @__PURE__ */ s(Ye, {
2420
2489
  total: e.total,
2421
2490
  totalLabel: e.totalLabel,
2422
2491
  items: e.items
2423
- }) : e.type === "semi-circular-gauge-chart" ? /* @__PURE__ */ s(me, {
2492
+ }) : e.type === "semi-circular-gauge-chart" ? /* @__PURE__ */ s(he, {
2424
2493
  value: e.value,
2425
2494
  confirmed: e.confirmed,
2426
2495
  total: e.total
2427
- }) : e.type === "segmented-split-bar-chart" ? /* @__PURE__ */ s(It, { items: e.items }) : e.type === "balance-scale-chart" ? /* @__PURE__ */ s(ct, {
2496
+ }) : e.type === "segmented-split-bar-chart" ? /* @__PURE__ */ s(Kt, { items: e.items }) : e.type === "balance-scale-chart" ? /* @__PURE__ */ s(pt, {
2428
2497
  left: e.left,
2429
2498
  right: e.right
2430
- }) : e.type === "area-line-chart" ? /* @__PURE__ */ s(ut, { points: e.points }) : e.type === "trend-view" ? /* @__PURE__ */ s(xt, { points: e.points }) : e.type === "weekly-flow" ? /* @__PURE__ */ s(zt, { items: e.items }) : /* @__PURE__ */ s("div", {
2499
+ }) : e.type === "area-line-chart" ? /* @__PURE__ */ s(ht, { points: e.points }) : e.type === "trend-view" ? /* @__PURE__ */ s(Et, { points: e.points }) : e.type === "weekly-flow" ? /* @__PURE__ */ s(Yt, { items: e.items }) : /* @__PURE__ */ s("div", {
2431
2500
  className: "viz-empty",
2432
2501
  children: "Visualization unavailable"
2433
2502
  });
2434
2503
  }
2435
2504
  //#endregion
2436
2505
  //#region src/utils/mounts.tsx
2437
- var Ht = [];
2438
- function Ut(e) {
2506
+ var Qt = [];
2507
+ function $t(e) {
2439
2508
  try {
2440
2509
  return JSON.parse(decodeURIComponent(e));
2441
2510
  } catch {
2442
2511
  return null;
2443
2512
  }
2444
2513
  }
2445
- function Wt() {
2446
- for (; Ht.length;) {
2447
- let e = Ht.pop();
2514
+ function en() {
2515
+ for (; Qt.length;) {
2516
+ let e = Qt.pop();
2448
2517
  e && e.unmount();
2449
2518
  }
2450
2519
  }
2451
- function Gt() {
2452
- Wt(), document.querySelectorAll("[data-d3-viz]").forEach((t) => {
2520
+ function tn() {
2521
+ en(), document.querySelectorAll("[data-d3-viz]").forEach((t) => {
2453
2522
  let n = t.dataset.d3Viz;
2454
2523
  if (!n) return;
2455
- let r = Ut(n);
2524
+ let r = $t(n);
2456
2525
  if (!r) return;
2457
2526
  let i = e(t);
2458
- Ht.push(i), i.render(/* @__PURE__ */ s(Vt, { config: r }));
2527
+ Qt.push(i), i.render(/* @__PURE__ */ s(Zt, { config: r }));
2459
2528
  });
2460
2529
  }
2461
- function Kt(e) {
2530
+ function nn(e) {
2462
2531
  return encodeURIComponent(JSON.stringify(e));
2463
2532
  }
2464
2533
  //#endregion
2465
2534
  //#region src/components/donutChart/DonutChart.tsx
2466
- function qt({ rows: e = [], className: t, colors: n }) {
2467
- return /* @__PURE__ */ s(Je, {
2535
+ function rn({ rows: e = [], className: t, colors: n }) {
2536
+ return /* @__PURE__ */ s($e, {
2468
2537
  rows: e,
2469
2538
  variant: "donut",
2470
2539
  className: t,
@@ -2473,7 +2542,7 @@ function qt({ rows: e = [], className: t, colors: n }) {
2473
2542
  }
2474
2543
  //#endregion
2475
2544
  //#region src/components/keyHighlights/KeyHighlights.tsx
2476
- var Q = {
2545
+ var Z = {
2477
2546
  bg: "transparent",
2478
2547
  border: "transparent",
2479
2548
  t1: u.t1,
@@ -2483,20 +2552,20 @@ var Q = {
2483
2552
  red: u.red,
2484
2553
  amber: u.amber,
2485
2554
  green: u.green
2486
- }, $ = "'Satoshi Variable', 'DM Sans', sans-serif", Jt = {
2555
+ }, Q = "'Satoshi Variable', 'DM Sans', sans-serif", an = {
2487
2556
  color: "#F7F7F7",
2488
- fontFamily: $,
2557
+ fontFamily: Q,
2489
2558
  fontSize: 24,
2490
2559
  fontWeight: 500,
2491
2560
  lineHeight: "32px"
2492
- }, Yt = {
2561
+ }, $ = {
2493
2562
  color: "#C2C2C2",
2494
- fontFamily: $,
2563
+ fontFamily: Q,
2495
2564
  fontSize: 18,
2496
2565
  fontWeight: 400,
2497
2566
  lineHeight: "20px"
2498
2567
  };
2499
- function Xt({ chips: e = [] }) {
2568
+ function on({ chips: e = [] }) {
2500
2569
  return /* @__PURE__ */ s("div", {
2501
2570
  style: {
2502
2571
  display: "flex",
@@ -2510,21 +2579,21 @@ function Xt({ chips: e = [] }) {
2510
2579
  display: "flex",
2511
2580
  alignItems: "baseline",
2512
2581
  gap: 8,
2513
- padding: "8px 12px",
2514
- background: Q.bg,
2515
- border: `1px solid ${Q.border}`,
2582
+ padding: "8px 0px",
2583
+ background: Z.bg,
2584
+ border: `1px solid ${Z.border}`,
2516
2585
  borderRadius: 5,
2517
2586
  boxSizing: "border-box"
2518
2587
  },
2519
2588
  children: [/* @__PURE__ */ s("span", {
2520
2589
  style: {
2521
- ...Jt,
2522
- color: e.color ?? Q.t1
2590
+ ...an,
2591
+ color: e.color ?? Z.t1
2523
2592
  },
2524
2593
  children: e.value
2525
2594
  }), /* @__PURE__ */ s("span", {
2526
2595
  style: {
2527
- ...Yt,
2596
+ ...$,
2528
2597
  flex: 1
2529
2598
  },
2530
2599
  children: e.label
@@ -2532,7 +2601,7 @@ function Xt({ chips: e = [] }) {
2532
2601
  }, t))
2533
2602
  });
2534
2603
  }
2535
- function Zt({ items: e = [] }) {
2604
+ function sn({ items: e = [] }) {
2536
2605
  return /* @__PURE__ */ s("div", {
2537
2606
  style: {
2538
2607
  display: "flex",
@@ -2546,27 +2615,27 @@ function Zt({ items: e = [] }) {
2546
2615
  alignItems: "flex-start",
2547
2616
  width: 260,
2548
2617
  height: 120,
2549
- padding: 24,
2618
+ padding: "24px 0",
2550
2619
  gap: 8,
2551
2620
  flexShrink: 0,
2552
- border: `1px solid ${Q.border}`,
2553
- background: Q.bg,
2621
+ border: `1px solid ${Z.border}`,
2622
+ background: Z.bg,
2554
2623
  boxSizing: "border-box"
2555
2624
  },
2556
2625
  children: [/* @__PURE__ */ s("div", {
2557
2626
  style: {
2558
- ...Jt,
2559
- color: e.color ?? Q.t1
2627
+ ...an,
2628
+ color: e.color ?? Z.t1
2560
2629
  },
2561
2630
  children: e.value
2562
2631
  }), /* @__PURE__ */ s("div", {
2563
- style: { ...Yt },
2632
+ style: { ...$ },
2564
2633
  children: e.label
2565
2634
  })]
2566
2635
  }, t))
2567
2636
  });
2568
2637
  }
2569
- function Qt({ items: e = [] }) {
2638
+ function cn({ items: e = [] }) {
2570
2639
  return /* @__PURE__ */ s("div", {
2571
2640
  style: {
2572
2641
  display: "flex",
@@ -2578,29 +2647,29 @@ function Qt({ items: e = [] }) {
2578
2647
  display: "flex",
2579
2648
  alignItems: "center",
2580
2649
  gap: 12,
2581
- padding: "9px 14px",
2582
- background: Q.bg,
2583
- border: `1px solid ${Q.border}`
2650
+ padding: "9px 0px",
2651
+ background: Z.bg,
2652
+ border: `1px solid ${Z.border}`
2584
2653
  },
2585
2654
  children: [
2586
2655
  /* @__PURE__ */ s("span", {
2587
2656
  style: {
2588
2657
  fontSize: 18,
2589
2658
  fontWeight: 500,
2590
- color: e.color ?? Q.t2,
2591
- background: (e.color ?? Q.t2) + "22",
2659
+ color: e.color ?? Z.t2,
2660
+ background: (e.color ?? Z.t2) + "22",
2592
2661
  padding: "2px 8px",
2593
2662
  borderRadius: 4,
2594
- fontFamily: $,
2663
+ fontFamily: Q,
2595
2664
  flexShrink: 0
2596
2665
  },
2597
2666
  children: e.name
2598
2667
  }),
2599
2668
  /* @__PURE__ */ s("span", {
2600
2669
  style: {
2601
- ...Jt,
2670
+ ...an,
2602
2671
  fontSize: 18,
2603
- color: e.color ?? Q.t1,
2672
+ color: e.color ?? Z.t1,
2604
2673
  minWidth: 70,
2605
2674
  flexShrink: 0
2606
2675
  },
@@ -2608,7 +2677,7 @@ function Qt({ items: e = [] }) {
2608
2677
  }),
2609
2678
  /* @__PURE__ */ s("span", {
2610
2679
  style: {
2611
- ...Yt,
2680
+ ...$,
2612
2681
  flex: 1
2613
2682
  },
2614
2683
  children: e.kpiLabel
@@ -2617,7 +2686,7 @@ function Qt({ items: e = [] }) {
2617
2686
  }, t))
2618
2687
  });
2619
2688
  }
2620
- function $t({ items: e = [] }) {
2689
+ function ln({ items: e = [] }) {
2621
2690
  return /* @__PURE__ */ s("div", {
2622
2691
  style: {
2623
2692
  display: "flex",
@@ -2631,31 +2700,31 @@ function $t({ items: e = [] }) {
2631
2700
  alignItems: "flex-start",
2632
2701
  width: 260,
2633
2702
  height: 120,
2634
- padding: 24,
2703
+ padding: "24px 0",
2635
2704
  gap: 8,
2636
2705
  flexShrink: 0,
2637
- background: Q.bg,
2706
+ background: Z.bg,
2638
2707
  boxSizing: "border-box"
2639
2708
  },
2640
2709
  children: [/* @__PURE__ */ s("div", {
2641
2710
  style: {
2642
- ...Jt,
2643
- color: e.color ?? Q.t1
2711
+ ...an,
2712
+ color: e.color ?? Z.t1
2644
2713
  },
2645
2714
  children: e.value
2646
2715
  }), /* @__PURE__ */ s("div", {
2647
- style: { ...Yt },
2716
+ style: { ...$ },
2648
2717
  children: e.label
2649
2718
  })]
2650
2719
  }, t))
2651
2720
  });
2652
2721
  }
2653
- var en = {
2654
- red: Q.red,
2655
- amber: Q.amber,
2656
- green: Q.green
2722
+ var un = {
2723
+ red: Z.red,
2724
+ amber: Z.amber,
2725
+ green: Z.green
2657
2726
  };
2658
- function tn({ items: e = [] }) {
2727
+ function dn({ items: e = [] }) {
2659
2728
  return /* @__PURE__ */ s("div", {
2660
2729
  style: {
2661
2730
  display: "flex",
@@ -2663,15 +2732,15 @@ function tn({ items: e = [] }) {
2663
2732
  gap: 5
2664
2733
  },
2665
2734
  children: e.map((e, t) => {
2666
- let n = en[e.severity];
2735
+ let n = un[e.severity];
2667
2736
  return /* @__PURE__ */ c("div", {
2668
2737
  style: {
2669
2738
  display: "flex",
2670
2739
  alignItems: "flex-start",
2671
2740
  gap: 10,
2672
- padding: "10px 14px",
2673
- background: Q.bg,
2674
- border: `1px solid ${Q.border}`
2741
+ padding: "10px 0px",
2742
+ background: Z.bg,
2743
+ border: `1px solid ${Z.border}`
2675
2744
  },
2676
2745
  children: [/* @__PURE__ */ s("span", { style: {
2677
2746
  width: 7,
@@ -2681,14 +2750,14 @@ function tn({ items: e = [] }) {
2681
2750
  flexShrink: 0,
2682
2751
  marginTop: 5
2683
2752
  } }), /* @__PURE__ */ s("span", {
2684
- style: { ...Yt },
2753
+ style: { ...$ },
2685
2754
  children: e.text
2686
2755
  })]
2687
2756
  }, t);
2688
2757
  })
2689
2758
  });
2690
2759
  }
2691
- function nn({ min: e, max: t, unit: n, dots: r = [], chips: i = [] }) {
2760
+ function fn({ min: e, max: t, unit: n, dots: r = [], chips: i = [] }) {
2692
2761
  let a = t - e;
2693
2762
  return /* @__PURE__ */ c("div", { children: [/* @__PURE__ */ c("div", {
2694
2763
  style: {
@@ -2712,8 +2781,8 @@ function nn({ min: e, max: t, unit: n, dots: r = [], chips: i = [] }) {
2712
2781
  top: 43,
2713
2782
  left: 0,
2714
2783
  fontSize: 16,
2715
- color: Q.t4,
2716
- fontFamily: $
2784
+ color: Z.t4,
2785
+ fontFamily: Q
2717
2786
  },
2718
2787
  children: [e, n]
2719
2788
  }),
@@ -2723,8 +2792,8 @@ function nn({ min: e, max: t, unit: n, dots: r = [], chips: i = [] }) {
2723
2792
  top: 43,
2724
2793
  right: 0,
2725
2794
  fontSize: 16,
2726
- color: Q.t4,
2727
- fontFamily: $
2795
+ color: Z.t4,
2796
+ fontFamily: Q
2728
2797
  },
2729
2798
  children: [t, n]
2730
2799
  }),
@@ -2747,7 +2816,7 @@ function nn({ min: e, max: t, unit: n, dots: r = [], chips: i = [] }) {
2747
2816
  style: {
2748
2817
  fontSize: 18,
2749
2818
  color: o,
2750
- fontFamily: $,
2819
+ fontFamily: Q,
2751
2820
  whiteSpace: "nowrap"
2752
2821
  },
2753
2822
  children: t.name
@@ -2756,7 +2825,7 @@ function nn({ min: e, max: t, unit: n, dots: r = [], chips: i = [] }) {
2756
2825
  fontSize: 18,
2757
2826
  fontWeight: 500,
2758
2827
  color: o,
2759
- fontFamily: $,
2828
+ fontFamily: Q,
2760
2829
  whiteSpace: "nowrap"
2761
2830
  },
2762
2831
  children: [t.val, n]
@@ -2779,7 +2848,7 @@ function nn({ min: e, max: t, unit: n, dots: r = [], chips: i = [] }) {
2779
2848
  style: {
2780
2849
  fontSize: 18,
2781
2850
  color: o,
2782
- fontFamily: $,
2851
+ fontFamily: Q,
2783
2852
  whiteSpace: "nowrap"
2784
2853
  },
2785
2854
  children: t.name
@@ -2788,7 +2857,7 @@ function nn({ min: e, max: t, unit: n, dots: r = [], chips: i = [] }) {
2788
2857
  fontSize: 18,
2789
2858
  fontWeight: 500,
2790
2859
  color: o,
2791
- fontFamily: $,
2860
+ fontFamily: Q,
2792
2861
  whiteSpace: "nowrap"
2793
2862
  },
2794
2863
  children: [t.val, n]
@@ -2798,9 +2867,9 @@ function nn({ min: e, max: t, unit: n, dots: r = [], chips: i = [] }) {
2798
2867
  }, r);
2799
2868
  })
2800
2869
  ]
2801
- }), i && i.length > 0 && /* @__PURE__ */ s(Xt, { chips: i })] });
2870
+ }), i && i.length > 0 && /* @__PURE__ */ s(on, { chips: i })] });
2802
2871
  }
2803
- function rn({ leftPct: e, leftLabel: t, leftValue: n, leftColor: r, rightPct: i, rightLabel: a, rightValue: o, rightColor: l, chips: d }) {
2872
+ function pn({ leftPct: e, leftLabel: t, leftValue: n, leftColor: r, rightPct: i, rightLabel: a, rightValue: o, rightColor: l, chips: d }) {
2804
2873
  let f = r ?? u.blue, p = l ?? u.blue;
2805
2874
  return /* @__PURE__ */ c("div", { children: [
2806
2875
  /* @__PURE__ */ c("div", {
@@ -2826,7 +2895,7 @@ function rn({ leftPct: e, leftLabel: t, leftValue: n, leftColor: r, rightPct: i,
2826
2895
  fontSize: 18,
2827
2896
  fontWeight: 500,
2828
2897
  color: f,
2829
- fontFamily: $
2898
+ fontFamily: Q
2830
2899
  },
2831
2900
  children: n
2832
2901
  })
@@ -2849,7 +2918,7 @@ function rn({ leftPct: e, leftLabel: t, leftValue: n, leftColor: r, rightPct: i,
2849
2918
  fontSize: 18,
2850
2919
  fontWeight: 500,
2851
2920
  color: p,
2852
- fontFamily: $
2921
+ fontFamily: Q
2853
2922
  },
2854
2923
  children: o
2855
2924
  })
@@ -2867,7 +2936,7 @@ function rn({ leftPct: e, leftLabel: t, leftValue: n, leftColor: r, rightPct: i,
2867
2936
  style: {
2868
2937
  fontSize: 18,
2869
2938
  color: f,
2870
- fontFamily: $
2939
+ fontFamily: Q
2871
2940
  },
2872
2941
  children: [
2873
2942
  e,
@@ -2884,7 +2953,7 @@ function rn({ leftPct: e, leftLabel: t, leftValue: n, leftColor: r, rightPct: i,
2884
2953
  style: {
2885
2954
  fontSize: 18,
2886
2955
  color: p,
2887
- fontFamily: $
2956
+ fontFamily: Q
2888
2957
  },
2889
2958
  children: [
2890
2959
  i,
@@ -2894,10 +2963,10 @@ function rn({ leftPct: e, leftLabel: t, leftValue: n, leftColor: r, rightPct: i,
2894
2963
  })
2895
2964
  })]
2896
2965
  }),
2897
- d && d.length > 0 && /* @__PURE__ */ s(Xt, { chips: d })
2966
+ d && d.length > 0 && /* @__PURE__ */ s(on, { chips: d })
2898
2967
  ] });
2899
2968
  }
2900
- function an({ pct: e, label: t, color: n, chips: r }) {
2969
+ function mn({ pct: e, label: t, color: n, chips: r }) {
2901
2970
  let i = n ?? u.blue, a = 2 * Math.PI * 30, o = a * (1 - e / 100);
2902
2971
  return /* @__PURE__ */ c("div", {
2903
2972
  style: {
@@ -2947,7 +3016,7 @@ function an({ pct: e, label: t, color: n, chips: r }) {
2947
3016
  fontSize: 18,
2948
3017
  fontWeight: 500,
2949
3018
  color: i,
2950
- fontFamily: $
3019
+ fontFamily: Q
2951
3020
  },
2952
3021
  children: [e, "%"]
2953
3022
  })
@@ -2956,7 +3025,7 @@ function an({ pct: e, label: t, color: n, chips: r }) {
2956
3025
  style: { flex: 1 },
2957
3026
  children: [/* @__PURE__ */ s("div", {
2958
3027
  style: {
2959
- ...Yt,
3028
+ ...$,
2960
3029
  marginBottom: 10
2961
3030
  },
2962
3031
  children: t
@@ -2972,18 +3041,18 @@ function an({ pct: e, label: t, color: n, chips: r }) {
2972
3041
  alignItems: "baseline",
2973
3042
  gap: 8,
2974
3043
  padding: "7px 10px",
2975
- background: Q.bg,
2976
- border: `1px solid ${Q.border}`,
3044
+ background: Z.bg,
3045
+ border: `1px solid ${Z.border}`,
2977
3046
  borderRadius: 5
2978
3047
  },
2979
3048
  children: [/* @__PURE__ */ s("span", {
2980
3049
  style: {
2981
- ...Jt,
2982
- color: e.color ?? Q.t1
3050
+ ...an,
3051
+ color: e.color ?? Z.t1
2983
3052
  },
2984
3053
  children: e.value
2985
3054
  }), /* @__PURE__ */ s("span", {
2986
- style: { ...Yt },
3055
+ style: { ...$ },
2987
3056
  children: e.label
2988
3057
  })]
2989
3058
  }, t))
@@ -2991,16 +3060,16 @@ function an({ pct: e, label: t, color: n, chips: r }) {
2991
3060
  })]
2992
3061
  });
2993
3062
  }
2994
- var on = {
3063
+ var hn = {
2995
3064
  green: "#34D39918",
2996
3065
  amber: "#FBBF2418",
2997
3066
  red: "#F0606018"
2998
- }, sn = {
3067
+ }, gn = {
2999
3068
  green: "#34D399",
3000
3069
  amber: "#FBBF24",
3001
3070
  red: "#F06060"
3002
3071
  };
3003
- function cn({ items: e = [] }) {
3072
+ function _n({ items: e = [] }) {
3004
3073
  return /* @__PURE__ */ s("div", {
3005
3074
  style: {
3006
3075
  display: "flex",
@@ -3012,20 +3081,20 @@ function cn({ items: e = [] }) {
3012
3081
  display: "flex",
3013
3082
  alignItems: "center",
3014
3083
  gap: 10,
3015
- padding: "8px 12px",
3016
- background: Q.bg,
3017
- border: `1px solid ${Q.border}`
3084
+ padding: "8px 0px",
3085
+ background: Z.bg,
3086
+ border: `1px solid ${Z.border}`
3018
3087
  },
3019
3088
  children: [
3020
3089
  /* @__PURE__ */ s("span", {
3021
3090
  style: {
3022
3091
  fontSize: 18,
3023
3092
  fontWeight: 500,
3024
- color: e.color ?? Q.t2,
3025
- background: (e.color ?? Q.t2) + "1A",
3093
+ color: e.color ?? Z.t2,
3094
+ background: (e.color ?? Z.t2) + "1A",
3026
3095
  padding: "2px 7px",
3027
3096
  borderRadius: 4,
3028
- fontFamily: $,
3097
+ fontFamily: Q,
3029
3098
  flexShrink: 0,
3030
3099
  minWidth: 62,
3031
3100
  textAlign: "center"
@@ -3043,7 +3112,7 @@ function cn({ items: e = [] }) {
3043
3112
  children: /* @__PURE__ */ s("div", { style: {
3044
3113
  height: "100%",
3045
3114
  width: `${e.pct}%`,
3046
- background: e.color ?? Q.t2,
3115
+ background: e.color ?? Z.t2,
3047
3116
  borderRadius: 2,
3048
3117
  opacity: .75
3049
3118
  } })
@@ -3052,8 +3121,8 @@ function cn({ items: e = [] }) {
3052
3121
  style: {
3053
3122
  fontSize: 18,
3054
3123
  fontWeight: 500,
3055
- color: e.color ?? Q.t1,
3056
- fontFamily: $,
3124
+ color: e.color ?? Z.t1,
3125
+ fontFamily: Q,
3057
3126
  flexShrink: 0,
3058
3127
  minWidth: 52,
3059
3128
  textAlign: "right"
@@ -3064,11 +3133,11 @@ function cn({ items: e = [] }) {
3064
3133
  style: {
3065
3134
  fontSize: 18,
3066
3135
  fontWeight: 500,
3067
- color: sn[e.badgeSeverity],
3068
- background: on[e.badgeSeverity],
3136
+ color: gn[e.badgeSeverity],
3137
+ background: hn[e.badgeSeverity],
3069
3138
  padding: "2px 7px",
3070
3139
  borderRadius: 4,
3071
- fontFamily: $,
3140
+ fontFamily: Q,
3072
3141
  flexShrink: 0,
3073
3142
  minWidth: 72,
3074
3143
  textAlign: "center"
@@ -3077,7 +3146,7 @@ function cn({ items: e = [] }) {
3077
3146
  }),
3078
3147
  e.sublabel && /* @__PURE__ */ s("span", {
3079
3148
  style: {
3080
- ...Yt,
3149
+ ...$,
3081
3150
  flexShrink: 0,
3082
3151
  minWidth: 80,
3083
3152
  textAlign: "right"
@@ -3088,12 +3157,12 @@ function cn({ items: e = [] }) {
3088
3157
  }, t))
3089
3158
  });
3090
3159
  }
3091
- var ln = {
3092
- red: Q.red,
3093
- amber: Q.amber,
3094
- green: Q.green
3160
+ var vn = {
3161
+ red: Z.red,
3162
+ amber: Z.amber,
3163
+ green: Z.green
3095
3164
  };
3096
- function un({ items: e = [] }) {
3165
+ function yn({ items: e = [] }) {
3097
3166
  return /* @__PURE__ */ s("div", {
3098
3167
  style: {
3099
3168
  display: "flex",
@@ -3101,7 +3170,7 @@ function un({ items: e = [] }) {
3101
3170
  gap: 5
3102
3171
  },
3103
3172
  children: e.map((e, t) => {
3104
- let n = ln[e.severity];
3173
+ let n = vn[e.severity];
3105
3174
  return /* @__PURE__ */ c("div", {
3106
3175
  style: {
3107
3176
  display: "flex",
@@ -3123,7 +3192,7 @@ function un({ items: e = [] }) {
3123
3192
  /* @__PURE__ */ s("span", {
3124
3193
  style: {
3125
3194
  flex: 1,
3126
- ...Yt
3195
+ ...$
3127
3196
  },
3128
3197
  children: e.text
3129
3198
  }),
@@ -3135,14 +3204,14 @@ function un({ items: e = [] }) {
3135
3204
  background: n + "20",
3136
3205
  padding: "2px 7px",
3137
3206
  borderRadius: 4,
3138
- fontFamily: $,
3207
+ fontFamily: Q,
3139
3208
  flexShrink: 0
3140
3209
  },
3141
3210
  children: e.tag
3142
3211
  }),
3143
3212
  /* @__PURE__ */ s("span", {
3144
3213
  style: {
3145
- ...Yt,
3214
+ ...$,
3146
3215
  flexShrink: 0,
3147
3216
  marginTop: 1
3148
3217
  },
@@ -3153,7 +3222,7 @@ function un({ items: e = [] }) {
3153
3222
  })
3154
3223
  });
3155
3224
  }
3156
- function dn({ columns: e = [], rows: t = [] }) {
3225
+ function bn({ columns: e = [], rows: t = [] }) {
3157
3226
  return /* @__PURE__ */ c("div", {
3158
3227
  style: {
3159
3228
  display: "flex",
@@ -3165,16 +3234,16 @@ function dn({ columns: e = [], rows: t = [] }) {
3165
3234
  display: "flex",
3166
3235
  alignItems: "center",
3167
3236
  gap: 10,
3168
- padding: "0 12px 6px",
3169
- borderBottom: `1px solid ${Q.border}`
3237
+ padding: "0 0px 6px",
3238
+ borderBottom: `1px solid ${Z.border}`
3170
3239
  },
3171
3240
  children: [/* @__PURE__ */ s("div", { style: { minWidth: 64 } }), e.map((e, t) => /* @__PURE__ */ s("div", {
3172
3241
  style: {
3173
3242
  flex: 1,
3174
3243
  fontSize: 18,
3175
3244
  fontWeight: 500,
3176
- color: Q.t2,
3177
- fontFamily: $,
3245
+ color: Z.t2,
3246
+ fontFamily: Q,
3178
3247
  textTransform: "uppercase",
3179
3248
  letterSpacing: .6
3180
3249
  },
@@ -3185,19 +3254,19 @@ function dn({ columns: e = [], rows: t = [] }) {
3185
3254
  display: "flex",
3186
3255
  alignItems: "center",
3187
3256
  gap: 10,
3188
- padding: "8px 12px",
3189
- background: Q.bg,
3190
- border: `1px solid ${Q.border}`
3257
+ padding: "8px 0px",
3258
+ background: Z.bg,
3259
+ border: `1px solid ${Z.border}`
3191
3260
  },
3192
3261
  children: [/* @__PURE__ */ s("span", {
3193
3262
  style: {
3194
3263
  fontSize: 18,
3195
3264
  fontWeight: 600,
3196
- color: Q.t2,
3197
- background: (e.color ?? Q.t4) + "1A",
3265
+ color: Z.t2,
3266
+ background: (e.color ?? Z.t4) + "1A",
3198
3267
  padding: "2px 8px",
3199
3268
  borderRadius: 4,
3200
- fontFamily: $,
3269
+ fontFamily: Q,
3201
3270
  flexShrink: 0,
3202
3271
  minWidth: 64,
3203
3272
  textAlign: "center"
@@ -3208,29 +3277,29 @@ function dn({ columns: e = [], rows: t = [] }) {
3208
3277
  flex: 1,
3209
3278
  fontSize: 18,
3210
3279
  fontWeight: 500,
3211
- color: e.color ?? Q.t1,
3212
- fontFamily: $
3280
+ color: e.color ?? Z.t1,
3281
+ fontFamily: Q
3213
3282
  },
3214
3283
  children: t
3215
3284
  }, n))]
3216
3285
  }, t))]
3217
3286
  });
3218
3287
  }
3219
- function fn({ block: e }) {
3288
+ function xn({ block: e }) {
3220
3289
  if (!e) return null;
3221
3290
  switch (e.type) {
3222
- case "stats": return /* @__PURE__ */ s(Zt, { items: e.items });
3223
- case "ranked": return /* @__PURE__ */ s(Qt, { items: e.items });
3224
- case "chips": return /* @__PURE__ */ s($t, { items: e.items });
3225
- case "badges": return /* @__PURE__ */ s(tn, { items: e.items });
3226
- case "dot-strip": return /* @__PURE__ */ s(nn, {
3291
+ case "stats": return /* @__PURE__ */ s(sn, { items: e.items });
3292
+ case "ranked": return /* @__PURE__ */ s(cn, { items: e.items });
3293
+ case "chips": return /* @__PURE__ */ s(ln, { items: e.items });
3294
+ case "badges": return /* @__PURE__ */ s(dn, { items: e.items });
3295
+ case "dot-strip": return /* @__PURE__ */ s(fn, {
3227
3296
  min: e.min,
3228
3297
  max: e.max,
3229
3298
  unit: e.unit,
3230
3299
  dots: e.dots,
3231
3300
  chips: e.chips
3232
3301
  });
3233
- case "proportion": return /* @__PURE__ */ s(rn, {
3302
+ case "proportion": return /* @__PURE__ */ s(pn, {
3234
3303
  leftPct: e.leftPct,
3235
3304
  leftLabel: e.leftLabel,
3236
3305
  leftValue: e.leftValue,
@@ -3241,15 +3310,15 @@ function fn({ block: e }) {
3241
3310
  rightColor: e.rightColor,
3242
3311
  chips: e.chips
3243
3312
  });
3244
- case "ring": return /* @__PURE__ */ s(an, {
3313
+ case "ring": return /* @__PURE__ */ s(mn, {
3245
3314
  pct: e.pct,
3246
3315
  label: e.label,
3247
3316
  color: e.color,
3248
3317
  chips: e.chips
3249
3318
  });
3250
- case "scorecard-rows": return /* @__PURE__ */ s(cn, { items: e.items });
3251
- case "flags-list": return /* @__PURE__ */ s(un, { items: e.items });
3252
- case "comparison-rows": return /* @__PURE__ */ s(dn, {
3319
+ case "scorecard-rows": return /* @__PURE__ */ s(_n, { items: e.items });
3320
+ case "flags-list": return /* @__PURE__ */ s(yn, { items: e.items });
3321
+ case "comparison-rows": return /* @__PURE__ */ s(bn, {
3253
3322
  columns: e.columns,
3254
3323
  rows: e.rows
3255
3324
  });
@@ -3258,14 +3327,14 @@ function fn({ block: e }) {
3258
3327
  }
3259
3328
  //#endregion
3260
3329
  //#region src/components/keyHighlights/Takeaway.tsx
3261
- var pn = "'Satoshi Variable', 'DM Sans', sans-serif", mn = {
3330
+ var Sn = "'Satoshi Variable', 'DM Sans', sans-serif", Cn = {
3262
3331
  color: "#C2C2C2",
3263
- fontFamily: pn,
3332
+ fontFamily: Sn,
3264
3333
  fontSize: 18,
3265
3334
  fontWeight: 400,
3266
3335
  lineHeight: 1.65
3267
3336
  };
3268
- function hn({ text: e }) {
3337
+ function wn({ text: e }) {
3269
3338
  return /* @__PURE__ */ c("div", {
3270
3339
  style: {
3271
3340
  padding: "8px 0px",
@@ -3278,16 +3347,16 @@ function hn({ text: e }) {
3278
3347
  fontSize: 18,
3279
3348
  fontWeight: 500,
3280
3349
  color: u.t1,
3281
- fontFamily: pn,
3350
+ fontFamily: Sn,
3282
3351
  lineHeight: 1.65,
3283
3352
  marginRight: 8
3284
3353
  },
3285
3354
  children: "Takeaway"
3286
3355
  }), /* @__PURE__ */ s("span", {
3287
- style: { ...mn },
3356
+ style: { ...Cn },
3288
3357
  children: e
3289
3358
  })]
3290
3359
  });
3291
3360
  }
3292
3361
  //#endregion
3293
- export { te as AreaChart, ie as BarChart, l as ChartFrame, qt as DonutChart, fn as KeyHighlights, Ie as LineChart, ze as MiniBars, Je as PieChart, it as ProcessSankey, at as RankingSankey, Xe as SankeySvg, ee as SeriesChart, hn as Takeaway, xt as Trend, kt as TrendChart, Vt as VisualizationRenderer, Wt as cleanupVisualizationMounts, Gt as hydrateVisualizationMounts, Kt as serializeVisualizationConfig };
3362
+ export { te as AreaChart, ie as BarChart, l as ChartFrame, rn as DonutChart, xn as KeyHighlights, ze as LineChart, He as MiniBars, $e as PieChart, lt as ProcessSankey, ut as RankingSankey, tt as SankeySvg, ee as SeriesChart, wn as Takeaway, Et as Trend, Rt as TrendChart, Zt as VisualizationRenderer, en as cleanupVisualizationMounts, tn as hydrateVisualizationMounts, nn as serializeVisualizationConfig };