@courthive/scoring-visualizations 0.2.8 → 0.2.10

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.
@@ -118,7 +118,7 @@ function A(e, t, n) {
118
118
  return r ? (r.side1Score ?? 0) + (r.side2Score ?? 0) > n : !1;
119
119
  }
120
120
  function j(e, t) {
121
- return e?.winningSide === void 0 ? e?.score?.sets?.[t.set]?.winningSide !== void 0 : !0;
121
+ return e?.winningSide !== void 0 || e?.score?.sets?.[t.set]?.winningSide !== void 0;
122
122
  }
123
123
  function M(e) {
124
124
  if (e === 1) return 0;
@@ -364,7 +364,7 @@ function G(e, t, n, r = 0, i = 0) {
364
364
  let c = e.append("svg:g").attr("class", "pts_corona").attr("width", n.width).attr("height", n.height).attr("transform", `translate(${r},${i})`);
365
365
  n.display.info ? v() : n.display.badge && g();
366
366
  let u = _().domain([0, 24]).range([n.radius / 4, n.radius / 2]), d = _().domain([0, s.length - 1]).range([0, 2 * Math.PI]);
367
- c.append("clipPath").attr("id", "clip_" + a).append("circle").attr("cx", 0).attr("cy", 0).attr("r", u(24 / 24 * 8));
367
+ c.append("clipPath").attr("id", "clip_" + a).append("circle").attr("cx", 0).attr("cy", 0).attr("r", u(8));
368
368
  let f = le(de(0, s), s), p = ue(f, s);
369
369
  for (let e = 0; e < p.length; e++) {
370
370
  let t = ce(p[e]), n = t < 0 ? o[0] : o[1];
@@ -727,10 +727,7 @@ function De(e) {
727
727
  return e?.id;
728
728
  }
729
729
  function Oe() {
730
- let e = {
731
- left: void 0,
732
- right: void 0
733
- }, t = [], n = {
730
+ let e = [], t = {
734
731
  id: H(),
735
732
  width: 150,
736
733
  height: 150,
@@ -802,16 +799,16 @@ function Oe() {
802
799
  Player: "Player",
803
800
  Opponent: "Opponent"
804
801
  }
805
- }, r, i, a, o = {
802
+ }, n, r, i, a = {
806
803
  w: {},
807
804
  e: {},
808
805
  p: {},
809
806
  n: {}
810
- }, s = null;
811
- function c(e) {
812
- return `${e}_${n.id}`;
807
+ }, o = null;
808
+ function s(e) {
809
+ return `${e}_${t.id}`;
813
810
  }
814
- let l = {
811
+ let c = {
815
812
  leftImage: { click: null },
816
813
  rightImage: { click: null },
817
814
  update: {
@@ -836,228 +833,228 @@ function Oe() {
836
833
  label: {
837
834
  mousemove: null,
838
835
  mouseout: null,
839
- click: p
836
+ click: f
840
837
  },
841
838
  selector: {
842
839
  mousemove: null,
843
840
  mouseout: null,
844
- click: p
841
+ click: f
845
842
  }
846
843
  };
847
- function u(u) {
848
- let f = u.append("div").attr("class", "gametreeRoot");
849
- i = f.append("svg"), r = function(r) {
850
- if (!t.length && !n.display.showEmpty) {
851
- i.selectAll("*").remove();
844
+ function l(l) {
845
+ let d = l.append("div").attr("class", "gametreeRoot");
846
+ r = d.append("svg"), n = function(n) {
847
+ if (!e.length && !t.display.showEmpty) {
848
+ r.selectAll("*").remove();
852
849
  return;
853
850
  }
854
- if (d(), n.display.sizeToFit || r?.sizeToFit) {
855
- let e = u.node().getBoundingClientRect();
856
- n.width = Math.min(e.width, e.height);
851
+ if (u(), t.display.sizeToFit || n?.sizeToFit) {
852
+ let e = l.node().getBoundingClientRect();
853
+ t.width = Math.min(e.width, e.height);
857
854
  }
858
- let p = n.width - (n.margins.left + n.margins.right), h = n.width * .9;
859
- a = (h + p) / 2 * .03;
860
- let g = C.map(function(e) {
855
+ let f = t.width - (t.margins.left + t.margins.right), m = t.width * .9;
856
+ i = (m + f) / 2 * .03;
857
+ let h = x.map(function(e) {
861
858
  return e.id;
862
- }), v = Ee(g.map(function(e) {
863
- return isNaN(o.p[e]) ? 0 : o.p[e];
864
- })), y = Te([Te(g.map(function(e) {
865
- return isNaN(o.p[e]) ? 0 : o.p[e];
866
- })), n.minMax]), S = _().domain([v, y]).range([0, a * 2]);
867
- if (i.transition().duration(0).attr("width", p).attr("height", h), i.selectAll(".gradient").data(C, De).join("linearGradient").attr("id", (e) => "gradient" + c(e.id)).attr("class", "gradient").attr("gradientUnits", "userSpaceOnUse").attr("x1", (e) => e.start.x * p).attr("y1", (e) => e.start.y * h).attr("x2", (e) => e.end.x * p).attr("y2", (e) => e.end.y * h).selectAll(".points_stop").data((e) => m(e)).join("stop").attr("class", "points_stop").attr("offset", (e) => e.offset).attr("stop-color", (e) => e.color), i.selectAll(".line").data(C).join((e) => e.append("line").attr("class", "line").attr("id", (e) => c(e.id)).attr("x1", (e) => e.start.x * p).attr("y1", (e) => e.start.y * h).attr("x2", (e) => e.end.x * p).attr("y2", (e) => e.end.y * h).attr("stroke-width", (e) => e.width ? e.width : 0).attr("stroke", (e) => "url(#gradient" + c(e.id) + ")").on("mousemove", function(e, t) {
868
- l.point.mousemove && l.point.mousemove(t, e);
859
+ }), g = Ee(h.map(function(e) {
860
+ return isNaN(a.p[e]) ? 0 : a.p[e];
861
+ })), v = Te([Te(h.map(function(e) {
862
+ return isNaN(a.p[e]) ? 0 : a.p[e];
863
+ })), t.minMax]), S = _().domain([g, v]).range([0, i * 2]);
864
+ if (r.transition().duration(0).attr("width", f).attr("height", m), r.selectAll(".gradient").data(x, De).join("linearGradient").attr("id", (e) => "gradient" + s(e.id)).attr("class", "gradient").attr("gradientUnits", "userSpaceOnUse").attr("x1", (e) => e.start.x * f).attr("y1", (e) => e.start.y * m).attr("x2", (e) => e.end.x * f).attr("y2", (e) => e.end.y * m).selectAll(".points_stop").data((e) => p(e)).join("stop").attr("class", "points_stop").attr("offset", (e) => e.offset).attr("stop-color", (e) => e.color), r.selectAll(".line").data(x).join((e) => e.append("line").attr("class", "line").attr("id", (e) => s(e.id)).attr("x1", (e) => e.start.x * f).attr("y1", (e) => e.start.y * m).attr("x2", (e) => e.end.x * f).attr("y2", (e) => e.end.y * m).attr("stroke-width", (e) => e.width ? e.width : 0).attr("stroke", (e) => "url(#gradient" + s(e.id) + ")").on("mousemove", function(e, t) {
865
+ c.point.mousemove && c.point.mousemove(t, e);
869
866
  }).on("mouseout", function(e, t) {
870
- l.point.mouseout && l.point.mouseout(t, e);
867
+ c.point.mouseout && c.point.mouseout(t, e);
871
868
  }).on("click", function(e, t) {
872
- l.point.click && l.point.click(t, e);
873
- }), (e) => e).transition().duration(n.lines.easing || r && r.easing ? n.lines.duration : 0).attr("x1", (e) => e.start.x * p).attr("y1", (e) => e.start.y * h).attr("x2", (e) => e.end.x * p).attr("y2", (e) => e.end.y * h).attr("stroke-width", (e) => o.p[e.id] ? S(o.p[e.id]) : 0), i.selectAll(".uline").data(w).join((e) => e.append("line").attr("class", "uline").attr("stroke", function() {
874
- return n.lines.colors.underlines;
869
+ c.point.click && c.point.click(t, e);
870
+ }), (e) => e).transition().duration(t.lines.easing || n && n.easing ? t.lines.duration : 0).attr("x1", (e) => e.start.x * f).attr("y1", (e) => e.start.y * m).attr("x2", (e) => e.end.x * f).attr("y2", (e) => e.end.y * m).attr("stroke-width", (e) => a.p[e.id] ? S(a.p[e.id]) : 0), r.selectAll(".uline").data(C).join((e) => e.append("line").attr("class", "uline").attr("stroke", function() {
871
+ return t.lines.colors.underlines;
875
872
  })).transition().duration(0).attr("id", function(e) {
876
- return c(e.id);
873
+ return s(e.id);
877
874
  }).attr("x1", function(e) {
878
- return e.start.x * p;
875
+ return e.start.x * f;
879
876
  }).attr("y1", function(e) {
880
- return e.start.y * h;
877
+ return e.start.y * m;
881
878
  }).attr("x2", function(e) {
882
- return e.end.x * p;
879
+ return e.end.x * f;
883
880
  }).attr("y2", function(e) {
884
- return e.end.y * h;
885
- }).attr("stroke-width", (e) => e.width ? e.width : 0), i.selectAll(".node").data(x).join((e) => e.append("circle").attr("class", "node").attr("stroke", function(e) {
886
- return e.color_pct == null ? n.nodes.colors.neutral : Ce(we(n.nodes.colors[e.player]), e.color_pct);
881
+ return e.end.y * m;
882
+ }).attr("stroke-width", (e) => e.width ? e.width : 0), r.selectAll(".node").data(b).join((e) => e.append("circle").attr("class", "node").attr("stroke", function(e) {
883
+ return e.color_pct == null ? t.nodes.colors.neutral : Ce(we(t.nodes.colors[e.player]), e.color_pct);
887
884
  }).attr("fill", function(e) {
888
- return e.color_pct == null ? n.nodes.colors.neutral : Ce(we(n.nodes.colors[e.player]), e.color_pct);
885
+ return e.color_pct == null ? t.nodes.colors.neutral : Ce(we(t.nodes.colors[e.player]), e.color_pct);
889
886
  }).on("mousemove", function(e, t) {
890
- l.node.mousemove && l.node.mousemove(e, t);
887
+ c.node.mousemove && c.node.mousemove(e, t);
891
888
  }).on("mouseout", function(e, t) {
892
- l.node.mouseout && l.node.mouseout(e, t);
889
+ c.node.mouseout && c.node.mouseout(e, t);
893
890
  }).on("click", function(e, t) {
894
- l.node.click && l.node.click(e, t);
891
+ c.node.click && c.node.click(e, t);
895
892
  })).transition().duration(0).attr("cx", function(e) {
896
- return e.pos.x * p;
893
+ return e.pos.x * f;
897
894
  }).attr("cy", function(e) {
898
- return e.pos.y * h;
895
+ return e.pos.y * m;
899
896
  }).attr("r", function() {
900
- return a;
901
- }), s) {
902
- let e = "p" + s;
903
- i.selectAll(".node").filter(function(t) {
904
- return t.pos === b[e];
905
- }).transition().duration(200).attr("r", a * 1.8).transition().duration(300).attr("r", a);
897
+ return i;
898
+ }), o) {
899
+ let e = "p" + o;
900
+ r.selectAll(".node").filter(function(t) {
901
+ return t.pos === y[e];
902
+ }).transition().duration(200).attr("r", i * 1.8).transition().duration(300).attr("r", i);
906
903
  }
907
- i.selectAll(".score").data(T).join((e) => e.append("text").attr("class", "score").attr("font-family", "Lato, Arial, sans-serif").attr("text-anchor", "middle").attr("alignment-baseline", "central").attr("stroke", (e) => e.stroke).attr("fill", (e) => e.fill).on("mousemove", function(e, t) {
908
- l.score.mousemove && l.score.mousemove(e, t);
904
+ r.selectAll(".score").data(w).join((e) => e.append("text").attr("class", "score").attr("font-family", "Lato, Arial, sans-serif").attr("text-anchor", "middle").attr("alignment-baseline", "central").attr("stroke", (e) => e.stroke).attr("fill", (e) => e.fill).on("mousemove", function(e, t) {
905
+ c.score.mousemove && c.score.mousemove(e, t);
909
906
  }).on("mouseout", function(e, t) {
910
- l.score.mouseout && l.score.mouseout(e, t);
907
+ c.score.mouseout && c.score.mouseout(e, t);
911
908
  }).on("click", function(e, t) {
912
- l.score.click && l.score.click(e, t);
913
- })).transition().duration(0).attr("x", (e) => e.pos.x * p).attr("y", (e) => e.pos.y * h).attr("font-size", (e) => a * e.fontsize + "px").text((e) => {
914
- if (a * e.fontsize > 5) return e.text;
915
- }), i.selectAll(".gt_label").data(E).join((e) => e.append("text").attr("class", "gt_label").attr("alignment-baseline", (e) => e.baseline ? e.baseline : void 0).attr("text-anchor", (e) => e.anchor ? e.anchor : void 0).attr("font-family", "Lato, Arial, sans-serif").attr("stroke", (e) => e.stroke).attr("fill", (e) => e.fill).attr("selector", (e) => e.id).on("click", function(e, t) {
916
- l.label.click && l.label.click(e, t, this);
917
- })).transition().duration(0).attr("x", (e) => e.pos.x * p).attr("y", (e) => e.pos.y * h).attr("font-size", (e) => a * e.fontsize + "px").text((e) => {
918
- if (a * e.fontsize > 5) return n.labels[e.id];
919
- }), i.selectAll(".selector").data(D).join((e) => e.append("circle").attr("class", "selector").attr("status", function(e) {
909
+ c.score.click && c.score.click(e, t);
910
+ })).transition().duration(0).attr("x", (e) => e.pos.x * f).attr("y", (e) => e.pos.y * m).attr("font-size", (e) => i * e.fontsize + "px").text((e) => {
911
+ if (i * e.fontsize > 5) return e.text;
912
+ }), r.selectAll(".gt_label").data(T).join((e) => e.append("text").attr("class", "gt_label").attr("alignment-baseline", (e) => e.baseline ? e.baseline : void 0).attr("text-anchor", (e) => e.anchor ? e.anchor : void 0).attr("font-family", "Lato, Arial, sans-serif").attr("stroke", (e) => e.stroke).attr("fill", (e) => e.fill).attr("selector", (e) => e.id).on("click", function(e, t) {
913
+ c.label.click && c.label.click(e, t, this);
914
+ })).transition().duration(0).attr("x", (e) => e.pos.x * f).attr("y", (e) => e.pos.y * m).attr("font-size", (e) => i * e.fontsize + "px").text((e) => {
915
+ if (i * e.fontsize > 5) return t.labels[e.id];
916
+ }), r.selectAll(".selector").data(E).join((e) => e.append("circle").attr("class", "selector").attr("status", function(e) {
920
917
  return e.status;
921
918
  }).attr("id", function(e) {
922
- return c(e.id);
919
+ return s(e.id);
923
920
  }).attr("selector", function(e) {
924
921
  return e.id;
925
- }).attr("stroke", function(e, t) {
926
- return n.nodes.colors[t];
922
+ }).attr("stroke", function(e, n) {
923
+ return t.nodes.colors[n];
927
924
  }).attr("opacity", function(e) {
928
925
  return e.opacity;
929
926
  }).on("mousemove", function(e, t) {
930
- l.selector.mousemove && l.selector.mousemove(e, t);
927
+ c.selector.mousemove && c.selector.mousemove(e, t);
931
928
  }).on("mouseout", function(e, t) {
932
- l.selector.mouseout && l.selector.mouseout(e, t);
929
+ c.selector.mouseout && c.selector.mouseout(e, t);
933
930
  }).on("click", function(e, t) {
934
- l.selector.click && l.selector.click(e, t, this);
931
+ c.selector.click && c.selector.click(e, t, this);
935
932
  })).transition().duration(0).attr("cx", function(e) {
936
- return e.pos.x * p;
933
+ return e.pos.x * f;
937
934
  }).attr("cy", function(e) {
938
- return e.pos.y * h + 4;
935
+ return e.pos.y * m + 4;
939
936
  }).attr("r", function(e) {
940
- return a * e.r_pct;
937
+ return i * e.r_pct;
941
938
  }).attr("stroke-width", function() {
942
- return a * .25;
943
- }).attr("fill", function(e, t) {
944
- let r = !n.selectors.selected[0] && !n.selectors.selected[1];
945
- return !n.selectors.enabled || r || n.selectors.selected[t] ? n.nodes.colors[t] : n.nodes.colors.neutral;
946
- }), n.display.rightImg ? e.right = i.selectAll("image.rightImage").data([0]).join((e) => e.append("image").attr("class", "rightImage").attr("y", 5).attr("height", "20px").attr("width", "20px").attr("opacity", +!!n.display.showImages)).attr("x", n.width - (n.margins.right + 30)).attr("xlink:href", n.display.rightImg).on("click", function() {
947
- l.rightImage.click && l.rightImage.click(n.id);
948
- }) : f.selectAll("image.rightImage").remove(), n.display.leftImg ? e.left = i.selectAll("image.leftImage").data([0]).join((e) => e.append("image").attr("class", "leftImage").attr("y", 5).attr("height", "20px").attr("width", "20px").attr("opacity", +!!n.display.showImages)).attr("x", 10 + n.margins.left).attr("xlink:href", n.display.leftImg).on("click", function() {
949
- l.leftImage.click && l.leftImage.click(n.id);
950
- }) : f.selectAll("image.leftImage").remove();
939
+ return i * .25;
940
+ }).attr("fill", function(e, n) {
941
+ let r = !t.selectors.selected[0] && !t.selectors.selected[1];
942
+ return !t.selectors.enabled || r || t.selectors.selected[n] ? t.nodes.colors[n] : t.nodes.colors.neutral;
943
+ }), t.display.rightImg ? r.selectAll("image.rightImage").data([0]).join((e) => e.append("image").attr("class", "rightImage").attr("y", 5).attr("height", "20px").attr("width", "20px").attr("opacity", +!!t.display.showImages)).attr("x", t.width - (t.margins.right + 30)).attr("xlink:href", t.display.rightImg).on("click", function() {
944
+ c.rightImage.click && c.rightImage.click(t.id);
945
+ }) : d.selectAll("image.rightImage").remove(), t.display.leftImg ? r.selectAll("image.leftImage").data([0]).join((e) => e.append("image").attr("class", "leftImage").attr("y", 5).attr("height", "20px").attr("width", "20px").attr("opacity", +!!t.display.showImages)).attr("x", 10 + t.margins.left).attr("xlink:href", t.display.leftImg).on("click", function() {
946
+ c.leftImage.click && c.leftImage.click(t.id);
947
+ }) : d.selectAll("image.leftImage").remove();
951
948
  };
952
949
  }
953
- u.exports = function() {
954
- return { selectView: p };
955
- }, u.options = function(e) {
956
- return arguments.length ? (K(e, n), e.events && K(e.events, l), u) : n;
957
- }, u.events = function(e) {
958
- return arguments.length ? (K(e, l), u) : l;
959
- }, u.reset = function() {
960
- return t = [], f(), o = {
950
+ l.exports = function() {
951
+ return { selectView: f };
952
+ }, l.options = function(e) {
953
+ return arguments.length ? (K(e, t), e.events && K(e.events, c), l) : t;
954
+ }, l.events = function(e) {
955
+ return arguments.length ? (K(e, c), l) : c;
956
+ }, l.reset = function() {
957
+ return e = [], d(), a = {
961
958
  w: {},
962
959
  e: {},
963
960
  p: {},
964
961
  n: {}
965
- }, u;
966
- }, u.width = function(e) {
967
- return arguments.length ? (n.width = e, u) : n.width;
968
- }, u.height = function(e) {
969
- return arguments.length ? (n.height = e, u) : n.height;
970
- }, u.data = function(e) {
971
- return arguments.length ? (e.constructor === Array && (u.reset(), t = e), u) : t;
972
- }, u.players = function(e) {
973
- return n.labels.Player = e[0], n.labels.Opponent = e[1], u;
974
- }, u.matchUp = function(e, t) {
975
- t && u.players(t);
962
+ }, l;
963
+ }, l.width = function(e) {
964
+ return arguments.length ? (t.width = e, l) : t.width;
965
+ }, l.height = function(e) {
966
+ return arguments.length ? (t.height = e, l) : t.height;
967
+ }, l.data = function(t) {
968
+ return arguments.length ? (t.constructor === Array && (l.reset(), e = t), l) : e;
969
+ }, l.players = function(e) {
970
+ return t.labels.Player = e[0], t.labels.Opponent = e[1], l;
971
+ }, l.matchUp = function(e, t) {
972
+ t && l.players(t);
976
973
  let n = S(e);
977
- return u.data(n), u;
978
- }, u.counters = function() {
979
- return d(), o;
980
- }, u.update = function(e) {
981
- l.update.begin && l.update.begin(), typeof r == "function" && r(e), setTimeout(function() {
982
- l.update.end && l.update.end();
974
+ return l.data(n), l;
975
+ }, l.counters = function() {
976
+ return u(), a;
977
+ }, l.update = function(e) {
978
+ c.update.begin && c.update.begin(), typeof n == "function" && n(e), setTimeout(function() {
979
+ c.update.end && c.update.end();
983
980
  }, 0);
984
981
  };
985
- function d() {
986
- let e;
987
- if (o = {
982
+ function u() {
983
+ let n;
984
+ if (a = {
988
985
  w: {},
989
986
  e: {},
990
987
  p: {},
991
988
  n: {}
992
- }, n.selectors.selected[0] || n.selectors.selected[1]) {
993
- let r = +!n.selectors.selected[0];
994
- e = t.filter(function(e) {
989
+ }, t.selectors.selected[0] || t.selectors.selected[1]) {
990
+ let r = +!t.selectors.selected[0];
991
+ n = e.filter(function(e) {
995
992
  return e.point.server == r;
996
993
  });
997
- } else e = t;
998
- e = e.filter(function(e) {
994
+ } else n = e;
995
+ n = n.filter(function(e) {
999
996
  return !e.point.tiebreak;
1000
997
  });
1001
- for (let t = 0; t < e.length; t++) {
1002
- let i = e[t - 1], a = "L" + (t == 0 || i.game.complete ? r([0, 0]) : r(i.point.points)) + "x" + r(e[t].point.points);
1003
- n.points.highlight.length && !n.points.highlight.includes(t) || (o.p[a] = o.p[a] ? o.p[a] + 1 : 1, n.points.winners.includes(e[t].point.result) ? o.w[a] = o.w[a] ? o.w[a] + 1 : 1 : n.points.errors.includes(e[t].point.result) && (o.e[a] = o.e[a] ? o.e[a] + 1 : 1));
998
+ for (let e = 0; e < n.length; e++) {
999
+ let i = n[e - 1], o = "L" + (e == 0 || i.game.complete ? r([0, 0]) : r(i.point.points)) + "x" + r(n[e].point.points);
1000
+ t.points.highlight.length && !t.points.highlight.includes(e) || (a.p[o] = a.p[o] ? a.p[o] + 1 : 1, t.points.winners.includes(n[e].point.result) ? a.w[o] = a.w[o] ? a.w[o] + 1 : 1 : t.points.errors.includes(n[e].point.result) && (a.e[o] = a.e[o] ? a.e[o] + 1 : 1));
1004
1001
  }
1005
- if (e.length > 0) {
1006
- let t = e[e.length - 1];
1007
- s = t.game.complete ? null : r(t.point.points);
1008
- } else s = null;
1002
+ if (n.length > 0) {
1003
+ let e = n[n.length - 1];
1004
+ o = e.game.complete ? null : r(e.point.points);
1005
+ } else o = null;
1009
1006
  function r(e) {
1010
- let t = Math.min(...e), r = t >= 4 ? t - 3 : 0;
1011
- return e.map((t, i) => n.display.noAd && t == 4 && e[1 - i] == 3 ? "G" : t - r).join("-");
1007
+ let n = Math.min(...e), r = n >= 4 ? n - 3 : 0;
1008
+ return e.map((n, i) => t.display.noAd && n == 4 && e[1 - i] == 3 ? "G" : n - r).join("-");
1012
1009
  }
1013
1010
  }
1014
- function f() {
1015
- i && (i.select(`[id=${c("Player")}]`).attr("opacity", .4).attr("status", "none").attr("fill", n.nodes.colors.neutral), i.select(`[id=${c("Opponent")}]`).attr("opacity", .4).attr("status", "none").attr("fill", n.nodes.colors.neutral)), n.selectors.selected[1] = !1, n.selectors.selected[0] = !1;
1011
+ function d() {
1012
+ r && (r.select(`[id=${s("Player")}]`).attr("opacity", .4).attr("status", "none").attr("fill", t.nodes.colors.neutral), r.select(`[id=${s("Opponent")}]`).attr("opacity", .4).attr("status", "none").attr("fill", t.nodes.colors.neutral)), t.selectors.selected[1] = !1, t.selectors.selected[0] = !1;
1016
1013
  }
1017
- function p(e, t, a) {
1018
- if (!n.selectors.enabled) return;
1019
- let o = v(a).attr("selector"), s = o === "Opponent", l = +!!s;
1020
- i.select(`[id=${c(o)}]`).attr("status") == "none" ? s ? (i.select(`[id=${c("Player")}]`).attr("opacity", .4).attr("status", "none").attr("fill", n.nodes.colors.neutral), i.select(`[id=${c("Opponent")}]`).attr("opacity", 1).attr("status", "selected").attr("fill", n.nodes.colors[l]), n.selectors.selected[1] = !0, n.selectors.selected[0] = !1) : (i.select(`[id=${c("Opponent")}]`).attr("opacity", .4).attr("status", "none").attr("fill", n.nodes.colors.neutral), i.select(`[id=${c("Player")}]`).attr("opacity", 1).attr("status", "selected").attr("fill", n.nodes.colors[l]), n.selectors.selected[0] = !0, n.selectors.selected[1] = !1) : (n.selectors.selected[0] = !1, n.selectors.selected[1] = !1, i.select(`[id=${c("Player")}]`).attr("opacity", 1).attr("status", "none").attr("fill", n.nodes.colors[0]), i.select(`[id=${c("Opponent")}]`).attr("opacity", 1).attr("status", "none").attr("fill", n.nodes.colors[1])), r();
1014
+ function f(e, i, a) {
1015
+ if (!t.selectors.enabled) return;
1016
+ let o = v(a).attr("selector"), c = o === "Opponent", l = +!!c;
1017
+ r.select(`[id=${s(o)}]`).attr("status") == "none" ? c ? (r.select(`[id=${s("Player")}]`).attr("opacity", .4).attr("status", "none").attr("fill", t.nodes.colors.neutral), r.select(`[id=${s("Opponent")}]`).attr("opacity", 1).attr("status", "selected").attr("fill", t.nodes.colors[l]), t.selectors.selected[1] = !0, t.selectors.selected[0] = !1) : (r.select(`[id=${s("Opponent")}]`).attr("opacity", .4).attr("status", "none").attr("fill", t.nodes.colors.neutral), r.select(`[id=${s("Player")}]`).attr("opacity", 1).attr("status", "selected").attr("fill", t.nodes.colors[l]), t.selectors.selected[0] = !0, t.selectors.selected[1] = !1) : (t.selectors.selected[0] = !1, t.selectors.selected[1] = !1, r.select(`[id=${s("Player")}]`).attr("opacity", 1).attr("status", "none").attr("fill", t.nodes.colors[0]), r.select(`[id=${s("Opponent")}]`).attr("opacity", 1).attr("status", "none").attr("fill", t.nodes.colors[1])), n();
1021
1018
  }
1022
- function m(e) {
1023
- if (!o.p[e.id]) return [];
1024
- let t = o.p[e.id] == null ? 1 : o.p[e.id], r = o.w[e.id] ? o.w[e.id] : 0, i = o.e[e.id] ? o.e[e.id] : 0, a = r / t * 100, s = (t - (r + i)) / t * 100;
1019
+ function p(e) {
1020
+ if (!a.p[e.id]) return [];
1021
+ let n = a.p[e.id] == null ? 1 : a.p[e.id], r = a.w[e.id] ? a.w[e.id] : 0, i = a.e[e.id] ? a.e[e.id] : 0, o = r / n * 100, s = (n - (r + i)) / n * 100;
1025
1022
  return [
1026
1023
  {
1027
1024
  offset: "0%",
1028
- color: n.lines.points.unknown
1025
+ color: t.lines.points.unknown
1029
1026
  },
1030
1027
  {
1031
1028
  offset: s + "%",
1032
- color: n.lines.points.unknown
1029
+ color: t.lines.points.unknown
1033
1030
  },
1034
1031
  {
1035
1032
  offset: s + "%",
1036
- color: n.lines.points.winners
1033
+ color: t.lines.points.winners
1037
1034
  },
1038
1035
  {
1039
- offset: s + a + "%",
1040
- color: n.lines.points.winners
1036
+ offset: s + o + "%",
1037
+ color: t.lines.points.winners
1041
1038
  },
1042
1039
  {
1043
- offset: s + a + "%",
1044
- color: n.lines.points.errors
1040
+ offset: s + o + "%",
1041
+ color: t.lines.points.errors
1045
1042
  },
1046
1043
  {
1047
1044
  offset: "100%",
1048
- color: n.lines.points.errors
1045
+ color: t.lines.points.errors
1049
1046
  }
1050
1047
  ];
1051
1048
  }
1052
- let h = .07, g = .05, y = {
1053
- col1: h,
1049
+ let m = .07, h = .05, g = {
1050
+ col1: m,
1054
1051
  col2: .21000000000000002,
1055
1052
  col3: .35000000000000003,
1056
1053
  col4: .49000000000000005,
1057
1054
  col5: .6300000000000001,
1058
1055
  col6: .77,
1059
1056
  col7: .9100000000000001,
1060
- row1: g,
1057
+ row1: h,
1061
1058
  row2: .26,
1062
1059
  row3: .47,
1063
1060
  row4: .68,
@@ -1066,570 +1063,570 @@ function Oe() {
1066
1063
  adr1: .785,
1067
1064
  adc1: .42000000000000004,
1068
1065
  adc2: .56,
1069
- selc: h * .8,
1070
- tslc: h,
1071
- sl1r: g / 2,
1072
- sl2r: g * 1.5,
1073
- plr1: h * .8,
1066
+ selc: m * .8,
1067
+ tslc: m,
1068
+ sl1r: h / 2,
1069
+ sl2r: h * 1.5,
1070
+ plr1: m * .8,
1074
1071
  plr2: .6300000000000001,
1075
1072
  plrs: .9425
1076
- }, b = {
1073
+ }, y = {
1077
1074
  "p0-0": {
1078
- x: y.col4,
1079
- y: y.row1
1075
+ x: g.col4,
1076
+ y: g.row1
1080
1077
  },
1081
1078
  "p1-1": {
1082
- x: y.col4,
1083
- y: y.row2
1079
+ x: g.col4,
1080
+ y: g.row2
1084
1081
  },
1085
1082
  "p2-2": {
1086
- x: y.col4,
1087
- y: y.row3
1083
+ x: g.col4,
1084
+ y: g.row3
1088
1085
  },
1089
1086
  "p3-3": {
1090
- x: y.col4,
1091
- y: y.row4
1087
+ x: g.col4,
1088
+ y: g.row4
1092
1089
  },
1093
1090
  "p1-0": {
1094
- x: y.col3,
1095
- y: y.row2
1091
+ x: g.col3,
1092
+ y: g.row2
1096
1093
  },
1097
1094
  "p0-1": {
1098
- x: y.col5,
1099
- y: y.row2
1095
+ x: g.col5,
1096
+ y: g.row2
1100
1097
  },
1101
1098
  "p2-1": {
1102
- x: y.col3,
1103
- y: y.row3
1099
+ x: g.col3,
1100
+ y: g.row3
1104
1101
  },
1105
1102
  "p1-2": {
1106
- x: y.col5,
1107
- y: y.row3
1103
+ x: g.col5,
1104
+ y: g.row3
1108
1105
  },
1109
1106
  "p2-0": {
1110
- x: y.col2,
1111
- y: y.row3
1107
+ x: g.col2,
1108
+ y: g.row3
1112
1109
  },
1113
1110
  "p0-2": {
1114
- x: y.col6,
1115
- y: y.row3
1111
+ x: g.col6,
1112
+ y: g.row3
1116
1113
  },
1117
1114
  "p3-2": {
1118
- x: y.col3,
1119
- y: y.row4
1115
+ x: g.col3,
1116
+ y: g.row4
1120
1117
  },
1121
1118
  "p2-3": {
1122
- x: y.col5,
1123
- y: y.row4
1119
+ x: g.col5,
1120
+ y: g.row4
1124
1121
  },
1125
1122
  "p3-1": {
1126
- x: y.col2,
1127
- y: y.row4
1123
+ x: g.col2,
1124
+ y: g.row4
1128
1125
  },
1129
1126
  "p1-3": {
1130
- x: y.col6,
1131
- y: y.row4
1127
+ x: g.col6,
1128
+ y: g.row4
1132
1129
  },
1133
1130
  "p3-0": {
1134
- x: y.col1,
1135
- y: y.row4
1131
+ x: g.col1,
1132
+ y: g.row4
1136
1133
  },
1137
1134
  "p0-3": {
1138
- x: y.col7,
1139
- y: y.row4
1135
+ x: g.col7,
1136
+ y: g.row4
1140
1137
  },
1141
1138
  "p3-4": {
1142
- x: y.adc1,
1143
- y: y.adr1
1139
+ x: g.adc1,
1140
+ y: g.adr1
1144
1141
  },
1145
1142
  "p4-3": {
1146
- x: y.adc2,
1147
- y: y.adr1
1143
+ x: g.adc2,
1144
+ y: g.adr1
1148
1145
  },
1149
1146
  "p5-3": {
1150
- x: y.adc2,
1151
- y: y.row5
1147
+ x: g.adc2,
1148
+ y: g.row5
1152
1149
  },
1153
1150
  "p3-5": {
1154
- x: y.adc1,
1155
- y: y.row5
1151
+ x: g.adc1,
1152
+ y: g.row5
1156
1153
  },
1157
1154
  "p4-1": {
1158
- x: y.col2,
1159
- y: y.row5
1155
+ x: g.col2,
1156
+ y: g.row5
1160
1157
  },
1161
1158
  "p1-4": {
1162
- x: y.col6,
1163
- y: y.row5
1159
+ x: g.col6,
1160
+ y: g.row5
1164
1161
  },
1165
1162
  "p4-2": {
1166
- x: y.col3,
1167
- y: y.row5
1163
+ x: g.col3,
1164
+ y: g.row5
1168
1165
  },
1169
1166
  "p2-4": {
1170
- x: y.col5,
1171
- y: y.row5
1167
+ x: g.col5,
1168
+ y: g.row5
1172
1169
  },
1173
1170
  "p4-0": {
1174
- x: y.col1,
1175
- y: y.row5
1171
+ x: g.col1,
1172
+ y: g.row5
1176
1173
  },
1177
1174
  "p0-4": {
1178
- x: y.col7,
1179
- y: y.row5
1175
+ x: g.col7,
1176
+ y: g.row5
1180
1177
  },
1181
1178
  "pG-3": {
1182
- x: y.col4,
1183
- y: y.row5
1179
+ x: g.col4,
1180
+ y: g.row5
1184
1181
  },
1185
1182
  "p3-G": {
1186
- x: y.col4,
1187
- y: y.row5
1183
+ x: g.col4,
1184
+ y: g.row5
1188
1185
  },
1189
1186
  sPlyr: {
1190
- x: y.adc1,
1191
- y: y.plrs
1187
+ x: g.adc1,
1188
+ y: g.plrs
1192
1189
  },
1193
1190
  tPlyr: {
1194
- x: y.col2,
1195
- y: y.plrs
1191
+ x: g.col2,
1192
+ y: g.plrs
1196
1193
  },
1197
1194
  sOpp: {
1198
- x: y.adc2,
1199
- y: y.plrs
1195
+ x: g.adc2,
1196
+ y: g.plrs
1200
1197
  },
1201
1198
  tOpp: {
1202
- x: y.col6,
1203
- y: y.plrs
1199
+ x: g.col6,
1200
+ y: g.plrs
1204
1201
  },
1205
1202
  GAME: {
1206
- x: y.col4,
1207
- y: y.foot
1203
+ x: g.col4,
1204
+ y: g.foot
1208
1205
  },
1209
1206
  L1s: {
1210
- x: y.col1,
1211
- y: y.foot
1207
+ x: g.col1,
1208
+ y: g.foot
1212
1209
  },
1213
1210
  L1e: {
1214
- x: y.adc1,
1215
- y: y.foot
1211
+ x: g.adc1,
1212
+ y: g.foot
1216
1213
  },
1217
1214
  L2s: {
1218
- x: y.adc2,
1219
- y: y.foot
1215
+ x: g.adc2,
1216
+ y: g.foot
1220
1217
  },
1221
1218
  L2e: {
1222
- x: y.col7,
1223
- y: y.foot
1219
+ x: g.col7,
1220
+ y: g.foot
1224
1221
  }
1225
- }, x = [
1222
+ }, b = [
1226
1223
  {
1227
1224
  name: "0-0",
1228
- pos: b["p0-0"],
1225
+ pos: y["p0-0"],
1229
1226
  player: 0
1230
1227
  },
1231
1228
  {
1232
1229
  name: "15-15",
1233
- pos: b["p1-1"],
1230
+ pos: y["p1-1"],
1234
1231
  player: 0
1235
1232
  },
1236
1233
  {
1237
1234
  name: "30-30",
1238
- pos: b["p2-2"],
1235
+ pos: y["p2-2"],
1239
1236
  player: 0
1240
1237
  },
1241
1238
  {
1242
1239
  name: "40-40",
1243
- pos: b["p3-3"],
1240
+ pos: y["p3-3"],
1244
1241
  player: 0
1245
1242
  },
1246
1243
  {
1247
1244
  name: "0-15",
1248
- pos: b["p0-1"],
1245
+ pos: y["p0-1"],
1249
1246
  color_pct: .4,
1250
1247
  player: 1
1251
1248
  },
1252
1249
  {
1253
1250
  name: "15-30",
1254
- pos: b["p1-2"],
1251
+ pos: y["p1-2"],
1255
1252
  color_pct: .4,
1256
1253
  player: 1
1257
1254
  },
1258
1255
  {
1259
1256
  name: "0-30",
1260
- pos: b["p0-2"],
1257
+ pos: y["p0-2"],
1261
1258
  color_pct: .2,
1262
1259
  player: 1
1263
1260
  },
1264
1261
  {
1265
1262
  name: "30-40",
1266
- pos: b["p2-3"],
1263
+ pos: y["p2-3"],
1267
1264
  color_pct: .4,
1268
1265
  player: 1
1269
1266
  },
1270
1267
  {
1271
1268
  name: "15-40",
1272
- pos: b["p1-3"],
1269
+ pos: y["p1-3"],
1273
1270
  color_pct: .2,
1274
1271
  player: 1
1275
1272
  },
1276
1273
  {
1277
1274
  name: "0-40",
1278
- pos: b["p0-3"],
1275
+ pos: y["p0-3"],
1279
1276
  color_pct: 0,
1280
1277
  player: 1
1281
1278
  },
1282
1279
  {
1283
1280
  name: "40-A",
1284
- pos: b["p4-3"],
1281
+ pos: y["p4-3"],
1285
1282
  color_pct: .5,
1286
1283
  player: 1
1287
1284
  },
1288
1285
  {
1289
1286
  name: "15-0",
1290
- pos: b["p1-0"],
1287
+ pos: y["p1-0"],
1291
1288
  color_pct: .4,
1292
1289
  player: 0
1293
1290
  },
1294
1291
  {
1295
1292
  name: "30-15",
1296
- pos: b["p2-1"],
1293
+ pos: y["p2-1"],
1297
1294
  color_pct: .4,
1298
1295
  player: 0
1299
1296
  },
1300
1297
  {
1301
1298
  name: "30-0",
1302
- pos: b["p2-0"],
1299
+ pos: y["p2-0"],
1303
1300
  color_pct: .2,
1304
1301
  player: 0
1305
1302
  },
1306
1303
  {
1307
1304
  name: "40-30",
1308
- pos: b["p3-2"],
1305
+ pos: y["p3-2"],
1309
1306
  color_pct: .4,
1310
1307
  player: 0
1311
1308
  },
1312
1309
  {
1313
1310
  name: "40-15",
1314
- pos: b["p3-1"],
1311
+ pos: y["p3-1"],
1315
1312
  color_pct: .2,
1316
1313
  player: 0
1317
1314
  },
1318
1315
  {
1319
1316
  name: "40-0",
1320
- pos: b["p3-0"],
1317
+ pos: y["p3-0"],
1321
1318
  color_pct: 0,
1322
1319
  player: 0
1323
1320
  },
1324
1321
  {
1325
1322
  name: "A-40",
1326
- pos: b["p3-4"],
1323
+ pos: y["p3-4"],
1327
1324
  color_pct: .5,
1328
1325
  player: 0
1329
1326
  }
1330
- ], C = [
1327
+ ], x = [
1331
1328
  {
1332
1329
  id: "L0-0x0-1",
1333
- start: b["p0-0"],
1334
- end: b["p0-1"]
1330
+ start: y["p0-0"],
1331
+ end: y["p0-1"]
1335
1332
  },
1336
1333
  {
1337
1334
  id: "L0-0x1-0",
1338
- start: b["p0-0"],
1339
- end: b["p1-0"]
1335
+ start: y["p0-0"],
1336
+ end: y["p1-0"]
1340
1337
  },
1341
1338
  {
1342
1339
  id: "L0-1x0-2",
1343
- start: b["p0-1"],
1344
- end: b["p0-2"]
1340
+ start: y["p0-1"],
1341
+ end: y["p0-2"]
1345
1342
  },
1346
1343
  {
1347
1344
  id: "L0-1x1-1",
1348
- start: b["p0-1"],
1349
- end: b["p1-1"]
1345
+ start: y["p0-1"],
1346
+ end: y["p1-1"]
1350
1347
  },
1351
1348
  {
1352
1349
  id: "L1-0x2-0",
1353
- start: b["p1-0"],
1354
- end: b["p2-0"]
1350
+ start: y["p1-0"],
1351
+ end: y["p2-0"]
1355
1352
  },
1356
1353
  {
1357
1354
  id: "L1-0x1-1",
1358
- start: b["p1-0"],
1359
- end: b["p1-1"]
1355
+ start: y["p1-0"],
1356
+ end: y["p1-1"]
1360
1357
  },
1361
1358
  {
1362
1359
  id: "L1-1x1-2",
1363
- start: b["p1-1"],
1364
- end: b["p1-2"]
1360
+ start: y["p1-1"],
1361
+ end: y["p1-2"]
1365
1362
  },
1366
1363
  {
1367
1364
  id: "L1-1x2-1",
1368
- start: b["p1-1"],
1369
- end: b["p2-1"]
1365
+ start: y["p1-1"],
1366
+ end: y["p2-1"]
1370
1367
  },
1371
1368
  {
1372
1369
  id: "L2-0x2-1",
1373
- start: b["p2-0"],
1374
- end: b["p2-1"]
1370
+ start: y["p2-0"],
1371
+ end: y["p2-1"]
1375
1372
  },
1376
1373
  {
1377
1374
  id: "L2-0x3-0",
1378
- start: b["p2-0"],
1379
- end: b["p3-0"]
1375
+ start: y["p2-0"],
1376
+ end: y["p3-0"]
1380
1377
  },
1381
1378
  {
1382
1379
  id: "L2-1x2-2",
1383
- start: b["p2-1"],
1384
- end: b["p2-2"]
1380
+ start: y["p2-1"],
1381
+ end: y["p2-2"]
1385
1382
  },
1386
1383
  {
1387
1384
  id: "L2-1x3-1",
1388
- start: b["p2-1"],
1389
- end: b["p3-1"]
1385
+ start: y["p2-1"],
1386
+ end: y["p3-1"]
1390
1387
  },
1391
1388
  {
1392
1389
  id: "L2-2x2-3",
1393
- start: b["p2-2"],
1394
- end: b["p2-3"]
1390
+ start: y["p2-2"],
1391
+ end: y["p2-3"]
1395
1392
  },
1396
1393
  {
1397
1394
  id: "L2-2x3-2",
1398
- start: b["p2-2"],
1399
- end: b["p3-2"]
1395
+ start: y["p2-2"],
1396
+ end: y["p3-2"]
1400
1397
  },
1401
1398
  {
1402
1399
  id: "L0-2x0-3",
1403
- start: b["p0-2"],
1404
- end: b["p0-3"]
1400
+ start: y["p0-2"],
1401
+ end: y["p0-3"]
1405
1402
  },
1406
1403
  {
1407
1404
  id: "L0-2x1-2",
1408
- start: b["p0-2"],
1409
- end: b["p1-2"]
1405
+ start: y["p0-2"],
1406
+ end: y["p1-2"]
1410
1407
  },
1411
1408
  {
1412
1409
  id: "L0-3x0-4",
1413
- start: b["p0-3"],
1414
- end: b["p0-4"]
1410
+ start: y["p0-3"],
1411
+ end: y["p0-4"]
1415
1412
  },
1416
1413
  {
1417
1414
  id: "L0-3x1-3",
1418
- start: b["p0-3"],
1419
- end: b["p1-3"]
1415
+ start: y["p0-3"],
1416
+ end: y["p1-3"]
1420
1417
  },
1421
1418
  {
1422
1419
  id: "L1-2x2-2",
1423
- start: b["p1-2"],
1424
- end: b["p2-2"]
1420
+ start: y["p1-2"],
1421
+ end: y["p2-2"]
1425
1422
  },
1426
1423
  {
1427
1424
  id: "L1-2x1-3",
1428
- start: b["p1-2"],
1429
- end: b["p1-3"]
1425
+ start: y["p1-2"],
1426
+ end: y["p1-3"]
1430
1427
  },
1431
1428
  {
1432
1429
  id: "L1-3x2-3",
1433
- start: b["p1-3"],
1434
- end: b["p2-3"]
1430
+ start: y["p1-3"],
1431
+ end: y["p2-3"]
1435
1432
  },
1436
1433
  {
1437
1434
  id: "L1-3x1-4",
1438
- start: b["p1-3"],
1439
- end: b["p1-4"]
1435
+ start: y["p1-3"],
1436
+ end: y["p1-4"]
1440
1437
  },
1441
1438
  {
1442
1439
  id: "L2-3x3-3",
1443
- start: b["p2-3"],
1444
- end: b["p3-3"]
1440
+ start: y["p2-3"],
1441
+ end: y["p3-3"]
1445
1442
  },
1446
1443
  {
1447
1444
  id: "L2-3x2-4",
1448
- start: b["p2-3"],
1449
- end: b["p2-4"]
1445
+ start: y["p2-3"],
1446
+ end: y["p2-4"]
1450
1447
  },
1451
1448
  {
1452
1449
  id: "L3-3x3-4",
1453
- start: b["p3-3"],
1454
- end: b["p4-3"]
1450
+ start: y["p3-3"],
1451
+ end: y["p4-3"]
1455
1452
  },
1456
1453
  {
1457
1454
  id: "L3-3x4-3",
1458
- start: b["p3-3"],
1459
- end: b["p3-4"]
1455
+ start: y["p3-3"],
1456
+ end: y["p3-4"]
1460
1457
  },
1461
1458
  {
1462
1459
  id: "L3-2x3-3",
1463
- start: b["p3-2"],
1464
- end: b["p3-3"]
1460
+ start: y["p3-2"],
1461
+ end: y["p3-3"]
1465
1462
  },
1466
1463
  {
1467
1464
  id: "L3-2x4-2",
1468
- start: b["p3-2"],
1469
- end: b["p4-2"]
1465
+ start: y["p3-2"],
1466
+ end: y["p4-2"]
1470
1467
  },
1471
1468
  {
1472
1469
  id: "L3-1x3-2",
1473
- start: b["p3-1"],
1474
- end: b["p3-2"]
1470
+ start: y["p3-1"],
1471
+ end: y["p3-2"]
1475
1472
  },
1476
1473
  {
1477
1474
  id: "L3-1x4-1",
1478
- start: b["p3-1"],
1479
- end: b["p4-1"]
1475
+ start: y["p3-1"],
1476
+ end: y["p4-1"]
1480
1477
  },
1481
1478
  {
1482
1479
  id: "L3-0x3-1",
1483
- start: b["p3-0"],
1484
- end: b["p3-1"]
1480
+ start: y["p3-0"],
1481
+ end: y["p3-1"]
1485
1482
  },
1486
1483
  {
1487
1484
  id: "L3-0x4-0",
1488
- start: b["p3-0"],
1489
- end: b["p4-0"]
1485
+ start: y["p3-0"],
1486
+ end: y["p4-0"]
1490
1487
  },
1491
1488
  {
1492
1489
  id: "L3-4x3-5",
1493
- start: b["p4-3"],
1494
- end: b["p5-3"]
1490
+ start: y["p4-3"],
1491
+ end: y["p5-3"]
1495
1492
  },
1496
1493
  {
1497
1494
  id: "L4-3x5-3",
1498
- start: b["p3-4"],
1499
- end: b["p3-5"]
1495
+ start: y["p3-4"],
1496
+ end: y["p3-5"]
1500
1497
  },
1501
1498
  {
1502
1499
  id: "L3-3xG-3",
1503
- start: b["p3-3"],
1504
- end: b["pG-3"]
1500
+ start: y["p3-3"],
1501
+ end: y["pG-3"]
1505
1502
  },
1506
1503
  {
1507
1504
  id: "L3-3x3-G",
1508
- start: b["p3-3"],
1509
- end: b["p3-G"]
1505
+ start: y["p3-3"],
1506
+ end: y["p3-G"]
1510
1507
  }
1511
- ], w = [{
1508
+ ], C = [{
1512
1509
  stroke: "blue",
1513
- start: b.L1s,
1514
- end: b.L1e,
1510
+ start: y.L1s,
1511
+ end: y.L1e,
1515
1512
  width: 2
1516
1513
  }, {
1517
1514
  stroke: "blue",
1518
- start: b.L2s,
1519
- end: b.L2e,
1515
+ start: y.L2s,
1516
+ end: y.L2e,
1520
1517
  width: 2
1521
- }], T = [
1518
+ }], w = [
1522
1519
  {
1523
- pos: b["p0-0"],
1520
+ pos: y["p0-0"],
1524
1521
  fill: "black",
1525
1522
  fontsize: .7,
1526
1523
  text: "0-0"
1527
1524
  },
1528
1525
  {
1529
- pos: b["p1-1"],
1526
+ pos: y["p1-1"],
1530
1527
  fill: "black",
1531
1528
  fontsize: .7,
1532
1529
  text: "15-15"
1533
1530
  },
1534
1531
  {
1535
- pos: b["p2-2"],
1532
+ pos: y["p2-2"],
1536
1533
  fill: "black",
1537
1534
  fontsize: .7,
1538
1535
  text: "30-30"
1539
1536
  },
1540
1537
  {
1541
- pos: b["p3-3"],
1538
+ pos: y["p3-3"],
1542
1539
  fill: "black",
1543
1540
  fontsize: .7,
1544
1541
  text: "40-40"
1545
1542
  },
1546
1543
  {
1547
- pos: b["p0-1"],
1544
+ pos: y["p0-1"],
1548
1545
  fill: "white",
1549
1546
  fontsize: .7,
1550
1547
  text: "0-15"
1551
1548
  },
1552
1549
  {
1553
- pos: b["p1-2"],
1550
+ pos: y["p1-2"],
1554
1551
  fill: "white",
1555
1552
  fontsize: .7,
1556
1553
  text: "15-30"
1557
1554
  },
1558
1555
  {
1559
- pos: b["p0-2"],
1556
+ pos: y["p0-2"],
1560
1557
  fill: "white",
1561
1558
  fontsize: .7,
1562
1559
  text: "0-30"
1563
1560
  },
1564
1561
  {
1565
- pos: b["p2-3"],
1562
+ pos: y["p2-3"],
1566
1563
  fill: "white",
1567
1564
  fontsize: .7,
1568
1565
  text: "30-40"
1569
1566
  },
1570
1567
  {
1571
- pos: b["p1-3"],
1568
+ pos: y["p1-3"],
1572
1569
  fill: "white",
1573
1570
  fontsize: .7,
1574
1571
  text: "15-40"
1575
1572
  },
1576
1573
  {
1577
- pos: b["p0-3"],
1574
+ pos: y["p0-3"],
1578
1575
  fill: "white",
1579
1576
  fontsize: .7,
1580
1577
  text: "0-40"
1581
1578
  },
1582
1579
  {
1583
- pos: b["p4-3"],
1580
+ pos: y["p4-3"],
1584
1581
  fill: "white",
1585
1582
  fontsize: .7,
1586
1583
  text: "40-A"
1587
1584
  },
1588
1585
  {
1589
- pos: b["p1-0"],
1586
+ pos: y["p1-0"],
1590
1587
  fill: "white",
1591
1588
  fontsize: .7,
1592
1589
  text: "15-0"
1593
1590
  },
1594
1591
  {
1595
- pos: b["p2-1"],
1592
+ pos: y["p2-1"],
1596
1593
  fill: "white",
1597
1594
  fontsize: .7,
1598
1595
  text: "30-15"
1599
1596
  },
1600
1597
  {
1601
- pos: b["p2-0"],
1598
+ pos: y["p2-0"],
1602
1599
  fill: "white",
1603
1600
  fontsize: .7,
1604
1601
  text: "30-0"
1605
1602
  },
1606
1603
  {
1607
- pos: b["p3-2"],
1604
+ pos: y["p3-2"],
1608
1605
  fill: "white",
1609
1606
  fontsize: .7,
1610
1607
  text: "40-30"
1611
1608
  },
1612
1609
  {
1613
- pos: b["p3-1"],
1610
+ pos: y["p3-1"],
1614
1611
  fill: "white",
1615
1612
  fontsize: .7,
1616
1613
  text: "40-15"
1617
1614
  },
1618
1615
  {
1619
- pos: b["p3-0"],
1616
+ pos: y["p3-0"],
1620
1617
  fill: "white",
1621
1618
  fontsize: .7,
1622
1619
  text: "40-0"
1623
1620
  },
1624
1621
  {
1625
- pos: b["p3-4"],
1622
+ pos: y["p3-4"],
1626
1623
  fill: "white",
1627
1624
  fontsize: .7,
1628
1625
  text: "A-40"
1629
1626
  }
1630
- ], E = [
1627
+ ], T = [
1631
1628
  {
1632
- pos: b.tPlyr,
1629
+ pos: y.tPlyr,
1633
1630
  fill: "black",
1634
1631
  fontsize: .9,
1635
1632
  id: "Player",
@@ -1637,7 +1634,7 @@ function Oe() {
1637
1634
  baseline: "hanging"
1638
1635
  },
1639
1636
  {
1640
- pos: b.tOpp,
1637
+ pos: y.tOpp,
1641
1638
  fill: "black",
1642
1639
  fontsize: .9,
1643
1640
  id: "Opponent",
@@ -1645,27 +1642,27 @@ function Oe() {
1645
1642
  baseline: "hanging"
1646
1643
  },
1647
1644
  {
1648
- pos: b.GAME,
1645
+ pos: y.GAME,
1649
1646
  fill: "#555555",
1650
1647
  fontsize: .9,
1651
1648
  id: "Game",
1652
1649
  anchor: "middle",
1653
1650
  baseline: "central"
1654
1651
  }
1655
- ], D = [{
1652
+ ], E = [{
1656
1653
  id: "Player",
1657
- pos: b.sPlyr,
1654
+ pos: y.sPlyr,
1658
1655
  r_pct: .4,
1659
1656
  opacity: 1,
1660
1657
  status: "none"
1661
1658
  }, {
1662
1659
  id: "Opponent",
1663
- pos: b.sOpp,
1660
+ pos: y.sOpp,
1664
1661
  r_pct: .4,
1665
1662
  opacity: .4,
1666
1663
  status: "none"
1667
1664
  }];
1668
- return u;
1665
+ return l;
1669
1666
  }
1670
1667
  //#endregion
1671
1668
  //#region src/visualizations/rallyTree.ts
@@ -1784,7 +1781,8 @@ function ke() {
1784
1781
  if (y.orientation === "horizontal") {
1785
1782
  let i = _().range(e === 0 ? [n * s, 0] : [(n + 1) * s, y.width]).domain([0, 100]), o = _().range([0, y.height]).domain([0, r.length - 1]);
1786
1783
  return a().curve(t).x1((e) => i(e)).x0(e === 0 ? n * s : (n + 1) * s).y((e, t) => o(t))(r);
1787
- } else {
1784
+ }
1785
+ {
1788
1786
  let i = _().range(e === 0 ? [n * s, 0] : [n * s, y.height]).domain([0, 100]), o = _().range([0, y.width]).domain([0, r.length - 1]);
1789
1787
  return a().curve(t).y1((e) => i(e)).y0(n * s).x((e, t) => o(t))(r);
1790
1788
  }
@@ -1812,10 +1810,12 @@ function ke() {
1812
1810
  return O.options = function(e) {
1813
1811
  if (!arguments.length) return y;
1814
1812
  let t = Object.keys(e), n = Object.keys(y);
1815
- for (let r = 0; r < t.length; r++) if (n.indexOf(t[r]) >= 0) if (typeof y[t[r]] == "object") {
1816
- let n = Object.keys(e[t[r]]), i = Object.keys(y[t[r]]);
1817
- for (let a = 0; a < n.length; a++) i.indexOf(n[a]) >= 0 && (y[t[r]][n[a]] = e[t[r]][n[a]]);
1818
- } else y[t[r]] = e[t[r]];
1813
+ for (let r = 0; r < t.length; r++) if (n.indexOf(t[r]) >= 0) {
1814
+ if (typeof y[t[r]] == "object") {
1815
+ let n = Object.keys(e[t[r]]), i = Object.keys(y[t[r]]);
1816
+ for (let a = 0; a < n.length; a++) i.indexOf(n[a]) >= 0 && (y[t[r]][n[a]] = e[t[r]][n[a]]);
1817
+ } else y[t[r]] = e[t[r]];
1818
+ }
1819
1819
  return O;
1820
1820
  }, O.data = function(t) {
1821
1821
  return arguments.length ? (e = t || [], O) : e;
@@ -2064,7 +2064,7 @@ function Me() {
2064
2064
  }
2065
2065
  return b.g = function(e) {
2066
2066
  if (!arguments.length) return b;
2067
- typeof e != "object" || e.constructor === Array || (e.bars && (p = e.bars), e.fish && (m = e.fish), e.game && (v = e.game));
2067
+ typeof e == "object" && e.constructor !== Array && (e.bars && (p = e.bars), e.fish && (m = e.fish), e.game && (v = e.game));
2068
2068
  }, b.options = function(e) {
2069
2069
  return arguments.length ? (K(e, s), e.events && K(e.events, u), b) : s;
2070
2070
  }, b.events = function(e) {
@@ -2884,10 +2884,12 @@ function Ze() {
2884
2884
  return l.options = function(e) {
2885
2885
  if (!arguments.length) return a;
2886
2886
  let t = Object.keys(e), n = Object.keys(a);
2887
- for (let r of t) if (n.includes(r)) if (typeof a[r] == "object") {
2888
- let t = Object.keys(e[r]), n = Object.keys(a[r]);
2889
- for (let i of t) n.includes(i) && (a[r][i] = e[r][i]);
2890
- } else a[r] = e[r];
2887
+ for (let r of t) if (n.includes(r)) {
2888
+ if (typeof a[r] == "object") {
2889
+ let t = Object.keys(e[r]), n = Object.keys(a[r]);
2890
+ for (let i of t) n.includes(i) && (a[r][i] = e[r][i]);
2891
+ } else a[r] = e[r];
2892
+ }
2891
2893
  return l;
2892
2894
  }, l.data = function(t) {
2893
2895
  if (!arguments.length) return e;
@@ -2928,7 +2930,9 @@ function Qe(e) {
2928
2930
  }
2929
2931
  function Y(t, r) {
2930
2932
  let i = r === void 0 ? t : t.filter((e) => e.point.set === r);
2931
- return i.length ? n(e({}, Qe(i))) : [];
2933
+ if (!i.length) return [];
2934
+ let a = Qe(i), o = e({}, a);
2935
+ return n(o);
2932
2936
  }
2933
2937
  function $e(e, t) {
2934
2938
  return Y(S(e), t);
@@ -3011,8 +3015,9 @@ function nt() {
3011
3015
  n = Math.min(n, 100);
3012
3016
  let r = 100 - (Number.isNaN(n) ? 0 : n);
3013
3017
  return e.numerator[0] < 0 && e.numerator[1] < 0 ? [r, n] : [n, r];
3014
- } else if (e.numerator[0] > e.numerator[1]) return [100, 0];
3015
- else if (e.numerator[1] > e.numerator[0]) return [0, 100];
3018
+ }
3019
+ if (e.numerator[0] > e.numerator[1]) return [100, 0];
3020
+ if (e.numerator[1] > e.numerator[0]) return [0, 100];
3016
3021
  }
3017
3022
  return [];
3018
3023
  }
@@ -3237,7 +3242,7 @@ var at = [
3237
3242
  "COMPETITIVE",
3238
3243
  "ROUTINE",
3239
3244
  "DECISIVE"
3240
- ]), dt = "#333", ft = "#555", pt = "#888", X = "middle", mt = "bold", ht = "text-anchor", gt = "font-weight";
3245
+ ]), dt = "var(--chc-text-primary, #333)", ft = "var(--chc-text-secondary, #555)", pt = "var(--chc-text-secondary, #888)", X = "middle", mt = "bold", ht = "text-anchor", gt = "font-weight";
3241
3246
  function _t(e) {
3242
3247
  let t = {
3243
3248
  COMPETITIVE: 0,
@@ -3277,19 +3282,19 @@ function yt(e, t, n = {}) {
3277
3282
  return;
3278
3283
  }
3279
3284
  let b = Math.min(r, a) / 2, x = b * .6, S = b * .85, C = g.append("svg").attr("width", r).attr("height", a).attr("viewBox", `0 0 ${r} ${a}`).style("display", "block").style("margin", "0 auto");
3280
- d && C.append("text").attr("x", r / 2).attr("y", 18).attr(ht, X).attr("font-size", "14px").attr(gt, mt).attr("fill", dt).text(d);
3285
+ d && C.append("text").attr("x", r / 2).attr("y", 18).attr(ht, X).attr("font-size", "14px").attr(gt, mt).style("fill", dt).text(d);
3281
3286
  let w = C.append("g").attr("transform", `translate(${r / 2}, ${a / 2})`), T = p().value((e) => e.count).sort(null).padAngle(o), E = i().innerRadius(x).outerRadius(S).cornerRadius(s), D = T(_), O = w.append("g").attr("class", "donut-slices").selectAll("path").data(D).join("path").attr("d", E).attr("fill", (e) => m[e.data.bucket]).attr("stroke", "#ffffff").attr("stroke-width", 1).style("cursor", f ? "pointer" : "default");
3282
3287
  if (f && O.on("click", (e, t) => f(t.data)), O.append("title").text((e) => {
3283
3288
  let t = y > 0 ? (e.data.count / y * 100).toFixed(1) : "0";
3284
3289
  return `${h[e.data.bucket]}: ${e.data.count} (${t}%)`;
3285
3290
  }), w.append("g").attr("class", "donut-slice-labels").selectAll("text").data(D).join("text").attr("transform", (e) => `translate(${E.centroid(e)})`).attr(ht, X).attr("dy", "0.35em").attr("font-size", "12px").attr(gt, mt).attr("fill", (e) => e.data.bucket === "WALKOVER" ? "#666" : "#fff").attr("pointer-events", "none").text((e) => e.endAngle - e.startAngle < .25 ? "" : String(e.data.count)), u) {
3286
3291
  let e = w.append("g").attr("class", "donut-center");
3287
- e.append("text").attr(ht, X).attr("dy", "-0.2em").attr("font-size", "28px").attr(gt, mt).attr("fill", dt).text(y), e.append("text").attr(ht, X).attr("dy", "1.2em").attr("font-size", "11px").attr("fill", ft).text("matches");
3292
+ e.append("text").attr(ht, X).attr("dy", "-0.2em").attr("font-size", "28px").attr(gt, mt).style("fill", dt).text(y), e.append("text").attr(ht, X).attr("dy", "1.2em").attr("font-size", "11px").style("fill", ft).text("matches");
3288
3293
  }
3289
3294
  let k = C.append("g").attr("class", "donut-legend").attr("transform", `translate(12, ${a - 12 - ot.length * 16})`);
3290
3295
  for (let [e, t] of ot.entries()) {
3291
3296
  let n = _.find((e) => e.bucket === t), r = k.append("g").attr("transform", `translate(0, ${e * 16})`);
3292
- r.append("rect").attr("width", 10).attr("height", 10).attr("fill", m[t]).attr("opacity", n ? 1 : .35), r.append("text").attr("x", 14).attr("y", 9).attr("font-size", "11px").attr("fill", ft).text(`${h[t]} (${n?.count ?? 0})`);
3297
+ r.append("rect").attr("width", 10).attr("height", 10).attr("fill", m[t]).attr("opacity", n ? 1 : .35), r.append("text").attr("x", 14).attr("y", 9).attr("font-size", "11px").style("fill", ft).text(`${h[t]} (${n?.count ?? 0})`);
3293
3298
  }
3294
3299
  }
3295
3300
  function bt(e, t, n = {}) {
@@ -3395,12 +3400,10 @@ function Dt(e) {
3395
3400
  case "Match":
3396
3401
  u = t[_[1]], d = _[2]?.trim();
3397
3402
  break;
3398
- case "Format Change":
3399
- if (_[1]?.trim() === "Set Game to Tie-Break") {
3400
- let e = _[2]?.trim(), t = m.length / 2;
3401
- n.finalSetFormat = `${e}-point Tiebreak at ${t}-${t}`;
3402
- }
3403
- break;
3403
+ case "Format Change": if (_[1]?.trim() === "Set Game to Tie-Break") {
3404
+ let e = _[2]?.trim(), t = m.length / 2;
3405
+ n.finalSetFormat = `${e}-point Tiebreak at ${t}-${t}`;
3406
+ }
3404
3407
  }
3405
3408
  }
3406
3409
  if (m.length > 0) {