@qe-libs/qeviz 0.6.0 → 0.6.1

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/qeviz.es.js CHANGED
@@ -2570,14 +2570,14 @@ const et = class et extends ze {
2570
2570
  O.has(E.slice(2)) || (v.remove(), this._ciCross.delete(E));
2571
2571
  }), P.forEach((v) => {
2572
2572
  var we, qt, $t;
2573
- const E = v.rowName ?? String(v[0]), F = _[E] ?? "#888888", U = v.names.indexOf(n[0]), Y = n.length > 1 ? v.names.indexOf(n[1]) : -1, W = U >= 0 ? Number(v[U]) * z : 0, pt = Y >= 0 ? -Number(v[Y]) * z : 0, X = new K({
2573
+ const E = v.rowName ?? String(v[0]), F = _[E] ?? "#888888", U = v.names.indexOf(n[0]), Y = n.length > 1 ? v.names.indexOf(n[1]) : -1, X = U >= 0 ? Number(v[U]) * z : 0, ft = Y >= 0 ? -Number(v[Y]) * z : 0, H = new K({
2574
2574
  ID: `mean-${E}`,
2575
- dimensions: [W, pt],
2575
+ dimensions: [X, ft],
2576
2576
  meta: { kind: "mean", name: E, group: E, fixedSize: o.meanFixedSize }
2577
2577
  });
2578
- X.color = new st(F), X.size = 4;
2578
+ H.color = new st(F), H.size = 4;
2579
2579
  const rt = v.names.indexOf("shape"), R = rt >= 0 ? v[rt] : null;
2580
- X.shape = R && String(R) !== "NA" ? String(R) : "rect", this.__data__.points.set(X.ID, X), I.__data__.objects.set(X.ID, X);
2580
+ H.shape = R && String(R) !== "NA" ? String(R) : "rect", this.__data__.points.set(H.ID, H), I.__data__.objects.set(H.ID, H);
2581
2581
  const jt = /* @__PURE__ */ c((j) => {
2582
2582
  const x = v.names.indexOf(j), A = x >= 0 ? v[x] : null;
2583
2583
  return A == null || String(A) === "NA" || String(A) === "" ? null : A;
@@ -2592,12 +2592,12 @@ const et = class et extends ze {
2592
2592
  if ((!nt || St !== "crosshairs") && ((qt = this._ciCross.get(Yt)) == null || qt.remove(), this._ciCross.delete(Yt)), nt && St === "crosshairs") {
2593
2593
  ($t = this._ciRects.get(E)) == null || $t.remove(), this._ciRects.delete(E);
2594
2594
  const j = nt.x_low * z, x = nt.x_high * z, A = -nt.y_high * z, C = -nt.y_low * z;
2595
- ve(X, (x - j) / 2, (C - A) / 2);
2595
+ ve(H, (x - j) / 2, (C - A) / 2);
2596
2596
  let M = this._ciCross.get(Yt);
2597
- M || (M = document.createElementNS("http://www.w3.org/2000/svg", "path"), M.setAttribute("data-ci-group", E), M.setAttribute("data-ci-kind", "crosshairs"), this._ciCross.set(Yt, M)), M.setAttribute("d", `M${j} ${pt} L${x} ${pt} M${W} ${A} L${W} ${C}`), M.setAttribute("fill", "none"), M.setAttribute("stroke", F), M.setAttribute("stroke-width", (y * 1.25).toString()), this._intervalStroke(M, y * 1.25, null), M.setAttribute("stroke-opacity", "0.8"), N && !M.parentElement && N.insertBefore(M, N.firstChild);
2597
+ M || (M = document.createElementNS("http://www.w3.org/2000/svg", "path"), M.setAttribute("data-ci-group", E), M.setAttribute("data-ci-kind", "crosshairs"), this._ciCross.set(Yt, M)), M.setAttribute("d", `M${j} ${ft} L${x} ${ft} M${X} ${A} L${X} ${C}`), M.setAttribute("fill", "none"), M.setAttribute("stroke", F), M.setAttribute("stroke-width", (y * 1.25).toString()), this._intervalStroke(M, y * 1.25, null), M.setAttribute("stroke-opacity", "0.8"), N && !M.parentElement && N.insertBefore(M, N.firstChild);
2598
2598
  } else if (nt) {
2599
2599
  const j = nt.x_low * z, x = -nt.y_high * z, A = (nt.x_high - nt.x_low) * z, C = (nt.y_high - nt.y_low) * z;
2600
- ve(X, A / 2, C / 2);
2600
+ ve(H, A / 2, C / 2);
2601
2601
  let M = this._ciRects.get(E);
2602
2602
  M || (M = document.createElementNS("http://www.w3.org/2000/svg", "rect"), M.setAttribute("data-ci-group", E), this._ciRects.set(E, M)), M.setAttribute("x", j.toString()), M.setAttribute("y", x.toString()), M.setAttribute("width", A.toString()), M.setAttribute("height", C.toString()), M.setAttribute("fill", "none"), M.setAttribute("stroke", F), M.setAttribute("stroke-width", y.toString()), M.setAttribute("stroke-opacity", "0.8"), M.setAttribute("stroke-dasharray", `${y * 4} ${y * 3}`), this._intervalStroke(M, y, [y * 4, y * 3]), N && !M.parentElement && N.insertBefore(M, N.firstChild);
2603
2603
  } else {
@@ -2607,12 +2607,12 @@ const et = class et extends ze {
2607
2607
  });
2608
2608
  } else
2609
2609
  this._removeIntervals(this._ciCross), Object.entries(Z).forEach(([v, { x: E, y: F, n: U, color: Y }]) => {
2610
- const W = new K({
2610
+ const X = new K({
2611
2611
  ID: `mean-${v}`,
2612
2612
  dimensions: [E / U * z, -(F / U) * z],
2613
2613
  meta: { kind: "mean", name: v, group: v, fixedSize: o.meanFixedSize }
2614
2614
  });
2615
- W.color = new st(Y), W.size = 4, W.shape = "rect", this.__data__.points.set(W.ID, W), I.__data__.objects.set(W.ID, W);
2615
+ X.color = new st(Y), X.size = 4, X.shape = "rect", this.__data__.points.set(X.ID, X), I.__data__.objects.set(X.ID, X);
2616
2616
  }), o.showCI ? (this._ciRects.forEach((v, E) => {
2617
2617
  Z[E] || (v.remove(), this._ciRects.delete(E));
2618
2618
  }), (qs = s.confidence) != null && qs.rows ? s.confidence.rows().forEach((v) => {
@@ -2620,24 +2620,24 @@ const et = class et extends ze {
2620
2620
  if (!F) return;
2621
2621
  const U = _[F] ?? "#888888", Y = Ae(v, n[0], n[1]);
2622
2622
  if (!Y) return;
2623
- const W = Y.x_low * z, pt = -Y.y_high * z, X = (Y.x_high - Y.x_low) * z, rt = (Y.y_high - Y.y_low) * z;
2623
+ const X = Y.x_low * z, ft = -Y.y_high * z, H = (Y.x_high - Y.x_low) * z, rt = (Y.y_high - Y.y_low) * z;
2624
2624
  ve(
2625
2625
  this.__data__.points.get(`mean-${F}`),
2626
- X / 2,
2626
+ H / 2,
2627
2627
  rt / 2
2628
2628
  );
2629
2629
  let R = this._ciRects.get(F);
2630
- R || (R = document.createElementNS("http://www.w3.org/2000/svg", "rect"), R.setAttribute("data-ci-group", F), this._ciRects.set(F, R)), R.setAttribute("x", W.toString()), R.setAttribute("y", pt.toString()), R.setAttribute("width", X.toString()), R.setAttribute("height", rt.toString()), R.setAttribute("fill", "none"), R.setAttribute("stroke", U), R.setAttribute("stroke-width", y.toString()), R.setAttribute("stroke-opacity", "0.8"), R.setAttribute("stroke-dasharray", `${y * 4} ${y * 3}`), this._intervalStroke(R, y, [y * 4, y * 3]), N && !R.parentElement && N.insertBefore(R, N.firstChild);
2631
- }) : Object.entries(Z).forEach(([v, { x: E, y: F, x2: U, y2: Y, n: W, color: pt }]) => {
2632
- if (W < 2) return;
2633
- const X = E / W, rt = F / W, R = U / W - X * X, jt = Y / W - rt * rt, { halfW: gt, halfH: St } = Di(R, jt, W, z), Rt = X * z, ie = -rt * z;
2630
+ R || (R = document.createElementNS("http://www.w3.org/2000/svg", "rect"), R.setAttribute("data-ci-group", F), this._ciRects.set(F, R)), R.setAttribute("x", X.toString()), R.setAttribute("y", ft.toString()), R.setAttribute("width", H.toString()), R.setAttribute("height", rt.toString()), R.setAttribute("fill", "none"), R.setAttribute("stroke", U), R.setAttribute("stroke-width", y.toString()), R.setAttribute("stroke-opacity", "0.8"), R.setAttribute("stroke-dasharray", `${y * 4} ${y * 3}`), this._intervalStroke(R, y, [y * 4, y * 3]), N && !R.parentElement && N.insertBefore(R, N.firstChild);
2631
+ }) : Object.entries(Z).forEach(([v, { x: E, y: F, x2: U, y2: Y, n: X, color: ft }]) => {
2632
+ if (X < 2) return;
2633
+ const H = E / X, rt = F / X, R = U / X - H * H, jt = Y / X - rt * rt, { halfW: gt, halfH: St } = Di(R, jt, X, z), Rt = H * z, ie = -rt * z;
2634
2634
  ve(
2635
2635
  this.__data__.points.get(`mean-${v}`),
2636
2636
  gt,
2637
2637
  St
2638
2638
  );
2639
2639
  let B = this._ciRects.get(v);
2640
- B || (B = document.createElementNS("http://www.w3.org/2000/svg", "rect"), B.setAttribute("data-ci-group", v), this._ciRects.set(v, B)), B.setAttribute("x", (Rt - gt).toString()), B.setAttribute("y", (ie - St).toString()), B.setAttribute("width", (gt * 2).toString()), B.setAttribute("height", (St * 2).toString()), B.setAttribute("fill", "none"), B.setAttribute("stroke", pt), B.setAttribute("stroke-width", y.toString()), B.setAttribute("stroke-opacity", "0.8"), B.setAttribute("stroke-dasharray", `${y * 4} ${y * 3}`), this._intervalStroke(B, y, [y * 4, y * 3]), N && !B.parentElement && N.insertBefore(B, N.firstChild);
2640
+ B || (B = document.createElementNS("http://www.w3.org/2000/svg", "rect"), B.setAttribute("data-ci-group", v), this._ciRects.set(v, B)), B.setAttribute("x", (Rt - gt).toString()), B.setAttribute("y", (ie - St).toString()), B.setAttribute("width", (gt * 2).toString()), B.setAttribute("height", (St * 2).toString()), B.setAttribute("fill", "none"), B.setAttribute("stroke", ft), B.setAttribute("stroke-width", y.toString()), B.setAttribute("stroke-opacity", "0.8"), B.setAttribute("stroke-dasharray", `${y * 4} ${y * 3}`), this._intervalStroke(B, y, [y * 4, y * 3]), N && !B.parentElement && N.insertBefore(B, N.firstChild);
2641
2641
  })) : this._removeIntervals(this._ciRects), (Bs = s.outlier) != null && Bs.rows ? (this._outlierRects.forEach((v, E) => {
2642
2642
  _[E] || (v.remove(), this._outlierRects.delete(E));
2643
2643
  }), s.outlier.rows().forEach((v) => {
@@ -2645,9 +2645,9 @@ const et = class et extends ze {
2645
2645
  if (!F) return;
2646
2646
  const U = _[F] ?? "#888888", Y = Ae(v, n[0], n[1]);
2647
2647
  if (!Y) return;
2648
- const W = Y.x_low * z, pt = -Y.y_high * z, X = (Y.x_high - Y.x_low) * z, rt = (Y.y_high - Y.y_low) * z;
2648
+ const X = Y.x_low * z, ft = -Y.y_high * z, H = (Y.x_high - Y.x_low) * z, rt = (Y.y_high - Y.y_low) * z;
2649
2649
  let R = this._outlierRects.get(F);
2650
- R || (R = document.createElementNS("http://www.w3.org/2000/svg", "rect"), R.setAttribute("data-outlier-group", F), this._outlierRects.set(F, R)), R.setAttribute("x", W.toString()), R.setAttribute("y", pt.toString()), R.setAttribute("width", X.toString()), R.setAttribute("height", rt.toString()), R.setAttribute("fill", "none"), R.setAttribute("stroke", U), R.setAttribute("stroke-width", y.toString()), R.setAttribute("stroke-opacity", "0.5"), R.setAttribute("stroke-dasharray", `${y * 2} ${y * 2}`), this._intervalStroke(R, y, [y * 2, y * 2]), N && !R.parentElement && N.insertBefore(R, N.firstChild);
2650
+ R || (R = document.createElementNS("http://www.w3.org/2000/svg", "rect"), R.setAttribute("data-outlier-group", F), this._outlierRects.set(F, R)), R.setAttribute("x", X.toString()), R.setAttribute("y", ft.toString()), R.setAttribute("width", H.toString()), R.setAttribute("height", rt.toString()), R.setAttribute("fill", "none"), R.setAttribute("stroke", U), R.setAttribute("stroke-width", y.toString()), R.setAttribute("stroke-opacity", "0.5"), R.setAttribute("stroke-dasharray", `${y * 2} ${y * 2}`), this._intervalStroke(R, y, [y * 2, y * 2]), N && !R.parentElement && N.insertBefore(R, N.firstChild);
2651
2651
  })) : this._removeIntervals(this._outlierRects);
2652
2652
  } else
2653
2653
  [this._ciRects, this._outlierRects, this._ciCross].forEach((N) => this._removeIntervals(N));
@@ -2765,20 +2765,20 @@ const et = class et extends ze {
2765
2765
  return S.forEach((C) => {
2766
2766
  const M = C.names.indexOf(r);
2767
2767
  M < 0 || String(C[M]) !== x || O.forEach(({ col: T }) => {
2768
- const H = C.names.indexOf(T);
2769
- H >= 0 && (A[T] = Number(C[H]) || 0);
2768
+ const W = C.names.indexOf(T);
2769
+ W >= 0 && (A[T] = Number(C[W]) || 0);
2770
2770
  });
2771
2771
  }), A;
2772
2772
  }, "getUnitEdges"), F = /* @__PURE__ */ c((x) => {
2773
2773
  const A = {};
2774
2774
  let C = 0;
2775
2775
  if (S.forEach((T) => {
2776
- const H = T.names.indexOf(r), ut = H >= 0 ? String(T[H]) : null, mt = h ? T.names.indexOf(h) : -1;
2777
- (mt >= 0 ? String(T[mt]) : ut ? k[ut] : null) === x && (C++, O.forEach(({ col: bt }) => {
2778
- const ft = T.names.indexOf(bt);
2779
- if (ft >= 0) {
2780
- const V = Number(T[ft]);
2781
- isNaN(V) || (A[bt] = (A[bt] ?? 0) + V);
2776
+ const W = T.names.indexOf(r), ut = W >= 0 ? String(T[W]) : null, mt = h ? T.names.indexOf(h) : -1;
2777
+ (mt >= 0 ? String(T[mt]) : ut ? k[ut] : null) === x && (C++, O.forEach(({ col: pt }) => {
2778
+ const bt = T.names.indexOf(pt);
2779
+ if (bt >= 0) {
2780
+ const V = Number(T[bt]);
2781
+ isNaN(V) || (A[pt] = (A[pt] ?? 0) + V);
2782
2782
  }
2783
2783
  }));
2784
2784
  }), C === 0) return {};
@@ -2791,29 +2791,29 @@ const et = class et extends ze {
2791
2791
  return { weights: F(x), color: _[x], label: x };
2792
2792
  const A = k[x] ?? null, C = A ? _[A] ?? "#888888" : "#888888";
2793
2793
  return { weights: E(x), color: C, label: x };
2794
- }, "resolve"), Y = [], W = /* @__PURE__ */ c((x) => {
2794
+ }, "resolve"), Y = [], X = /* @__PURE__ */ c((x) => {
2795
2795
  var M;
2796
2796
  const A = (M = y == null ? void 0 : y.rows) == null ? void 0 : M.call(y).find((T) => T.rowName === x);
2797
2797
  if (!A) return null;
2798
2798
  const C = {};
2799
2799
  return v.forEach(({ col: T }) => {
2800
- const H = A.names.indexOf(T);
2801
- if (H >= 0) {
2802
- const ut = Number(A[H]);
2800
+ const W = A.names.indexOf(T);
2801
+ if (W >= 0) {
2802
+ const ut = Number(A[W]);
2803
2803
  Number.isFinite(ut) && (C[T] = ut);
2804
2804
  }
2805
2805
  }), C;
2806
- }, "networkRow"), pt = /* @__PURE__ */ c((x, A) => {
2806
+ }, "networkRow"), ft = /* @__PURE__ */ c((x, A) => {
2807
2807
  if (!A) return x;
2808
2808
  const C = Math.abs(x);
2809
2809
  return C < A[0] ? 0 : C > A[1] ? Math.sign(x) * A[1] : x;
2810
2810
  }, "thresholded");
2811
2811
  o.edgeLayers.forEach((x, A) => {
2812
2812
  const C = /* @__PURE__ */ c((V, ot, Q, wt, at) => {
2813
- Q = pt(Q, x.threshold), !(Math.abs(Q) < 1e-6) && Y.push({ col: `${A}:${V}`, pair: ot, weight: Math.abs(Q), color: wt, layer: A, ...at });
2813
+ Q = ft(Q, x.threshold), !(Math.abs(Q) < 1e-6) && Y.push({ col: `${A}:${V}`, pair: ot, weight: Math.abs(Q), color: wt, layer: A, ...at });
2814
2814
  }, "push"), M = /* @__PURE__ */ c((V, ot) => x.colors ? [x.colors[0], x.colors[1] ?? Bi(x.colors[0])] : [V, ot], "signColors");
2815
2815
  if (x.network) {
2816
- const V = W(x.network);
2816
+ const V = X(x.network);
2817
2817
  if (!V) return;
2818
2818
  const [ot, Q] = M(m[0], m[1]), wt = { name: x.name ?? x.network };
2819
2819
  v.forEach(({ col: at, pair: Vs }) => {
@@ -2824,19 +2824,19 @@ const et = class et extends ze {
2824
2824
  }
2825
2825
  const T = x.unit ?? x.group ?? null;
2826
2826
  if (!T) return;
2827
- const H = U(T), ut = x.compare ?? x.also ?? null, mt = ut ? U(ut) : null, Et = { name: x.name ?? T, group: x.group ?? void 0, unit: x.unit ?? void 0 }, [bt, ft] = M(H.color, (mt == null ? void 0 : mt.color) ?? H.color);
2827
+ const W = U(T), ut = x.compare ?? x.also ?? null, mt = ut ? U(ut) : null, Et = { name: x.name ?? T, group: x.group ?? void 0, unit: x.unit ?? void 0 }, [pt, bt] = M(W.color, (mt == null ? void 0 : mt.color) ?? W.color);
2828
2828
  mt && x.compare ? O.forEach(({ col: V, pair: ot }) => {
2829
- const Q = (H.weights[V] ?? 0) - (mt.weights[V] ?? 0);
2830
- C(V, ot, Q, Q > 0 ? bt : ft, Et);
2829
+ const Q = (W.weights[V] ?? 0) - (mt.weights[V] ?? 0);
2830
+ C(V, ot, Q, Q > 0 ? pt : bt, Et);
2831
2831
  }) : mt && x.also ? O.forEach(({ col: V, pair: ot }) => {
2832
- const Q = H.weights[V] ?? 0, wt = mt.weights[V] ?? 0;
2833
- Q > 0 && C(V + "-a", ot, Q, bt, Et), wt > 0 && C(V + "-b", ot, wt, ft, { ...Et, name: x.also ?? void 0, group: x.also ?? void 0 });
2832
+ const Q = W.weights[V] ?? 0, wt = mt.weights[V] ?? 0;
2833
+ Q > 0 && C(V + "-a", ot, Q, pt, Et), wt > 0 && C(V + "-b", ot, wt, bt, { ...Et, name: x.also ?? void 0, group: x.also ?? void 0 });
2834
2834
  }) : O.forEach(({ col: V, pair: ot }) => {
2835
- const Q = H.weights[V] ?? 0;
2836
- Q > 0 && C(V, ot, Q, bt, Et);
2835
+ const Q = W.weights[V] ?? 0;
2836
+ Q > 0 && C(V, ot, Q, pt, Et);
2837
2837
  });
2838
2838
  }), Y.sort((x, A) => A.weight - x.weight);
2839
- const X = !!s.directed, rt = Pi(o.edgeWidth) * (o.edgeMagnify ?? 1), R = /* @__PURE__ */ c((x) => {
2839
+ const H = !!s.directed, rt = Pi(o.edgeWidth) * (o.edgeMagnify ?? 1), R = /* @__PURE__ */ c((x) => {
2840
2840
  const A = x.map(Math.abs).filter((C) => C > 0);
2841
2841
  return A.length ? [Math.min(...A), Math.max(...A)] : [0, 0];
2842
2842
  }, "rangeOf"), [jt, gt] = S.length ? [O, s.edges] : [v, y], St = /* @__PURE__ */ c((x) => {
@@ -2844,7 +2844,7 @@ const et = class et extends ze {
2844
2844
  return jt.forEach(({ col: C, pair: M }) => {
2845
2845
  if (M[0] === M[1] !== x) return;
2846
2846
  const T = gt == null ? void 0 : gt.col(C);
2847
- if (T) for (const H of T) A.push(Number(H));
2847
+ if (T) for (const W of T) A.push(Number(W));
2848
2848
  }), R(A);
2849
2849
  }, "modelRange"), Rt = /* @__PURE__ */ c((x) => R(Y.filter((A) => A.pair[0] === A.pair[1] === x).map((A) => A.weight)), "plotRange"), ie = o.edgeColorScale, B = /* @__PURE__ */ c((x) => ie === "plot" ? Rt(x) : St(x), "colourRange"), nt = B(!1), Yt = B(!0), we = /* @__PURE__ */ c((x, A) => {
2850
2850
  if (ie === "absolute") {
@@ -2855,11 +2855,10 @@ const et = class et extends ze {
2855
2855
  return { saturation: ni(x, C, M, Mi), opacity: ni(x, C, M, Ii) };
2856
2856
  }, "colourOf"), qt = {};
2857
2857
  Y.forEach(({ pair: x, weight: A }) => {
2858
- if (x[0] === x[1] && !X) return;
2859
- const M = /* @__PURE__ */ c((T) => {
2858
+ const C = x[0] === x[1], M = /* @__PURE__ */ c((T) => {
2860
2859
  qt[T] = (qt[T] ?? 0) + Math.abs(A);
2861
2860
  }, "add");
2862
- if (X) {
2861
+ if (H || C) {
2863
2862
  M(x[1]);
2864
2863
  return;
2865
2864
  }
@@ -2870,29 +2869,27 @@ const et = class et extends ze {
2870
2869
  if (!C) return;
2871
2870
  const M = it.__data__.objects.get(C);
2872
2871
  if (!M) return;
2873
- const T = qt[C] ?? 0, H = !(T > 0);
2874
- M.size = H ? o.hideUnconnectedNodes ? 0 : Oi : Li(T, rt), M.meta = {
2872
+ const T = qt[C] ?? 0, W = !(T > 0);
2873
+ M.size = W ? o.hideUnconnectedNodes ? 0 : Oi : Li(T, rt), M.meta = {
2875
2874
  ...M.meta ?? {},
2876
- hidden: H && o.hideUnconnectedNodes,
2877
- sizePx: H || (ut = M.meta) == null ? void 0 : ut.sizePx
2875
+ hidden: W && o.hideUnconnectedNodes,
2876
+ sizePx: W || (ut = M.meta) == null ? void 0 : ut.sizePx
2878
2877
  };
2879
2878
  });
2880
2879
  const $t = {}, j = /* @__PURE__ */ c((x, A, C, M) => `${x}:${A ?? ""}:${C}.${M}`, "pairKey");
2881
- X && Y.forEach(({ pair: x, weight: A, layer: C, name: M }) => {
2880
+ H && Y.forEach(({ pair: x, weight: A, layer: C, name: M }) => {
2882
2881
  const T = j(C, M, x[0], x[1]);
2883
2882
  $t[T] = ($t[T] ?? 0) + A;
2884
- }), Y.forEach(({ col: x, pair: A, weight: C, color: M, layer: T, name: H, group: ut, unit: mt }) => {
2883
+ }), Y.forEach(({ col: x, pair: A, weight: C, color: M, layer: T, name: W, group: ut, unit: mt }) => {
2885
2884
  var ne, Zs;
2886
- const Et = it.__data__.objects.get(A[0]), bt = it.__data__.objects.get(A[1]);
2887
- if (!Et || !bt) return;
2888
- const ft = A[0] === A[1];
2889
- if (ft && !X) return;
2890
- const { saturation: V, opacity: ot } = we(C, ft), Q = new K({ ID: `${A[0]}-src`, dimensions: [Et.x, Et.y], meta: {} }), wt = new K({ ID: `${A[1]}-dst`, dimensions: [bt.x, bt.y], meta: {} });
2885
+ const Et = it.__data__.objects.get(A[0]), pt = it.__data__.objects.get(A[1]);
2886
+ if (!Et || !pt) return;
2887
+ const bt = A[0] === A[1], { saturation: V, opacity: ot } = we(C, bt), Q = new K({ ID: `${A[0]}-src`, dimensions: [Et.x, Et.y], meta: {} }), wt = new K({ ID: `${A[1]}-dst`, dimensions: [pt.x, pt.y], meta: {} });
2891
2888
  let at;
2892
- if (ft)
2889
+ if (bt)
2893
2890
  at = new Ht({}, Q, wt), at.weight = 0;
2894
- else if (X) {
2895
- const gi = $t[j(T, H, A[0], A[1])] ?? C, mi = $t[j(T, H, A[1], A[0])] ?? 0, fi = gi + mi;
2891
+ else if (H) {
2892
+ const gi = $t[j(T, W, A[0], A[1])] ?? C, mi = $t[j(T, W, A[1], A[0])] ?? 0, fi = gi + mi;
2896
2893
  at = new os(
2897
2894
  { weight: C, totalweight: fi },
2898
2895
  Q,
@@ -2907,19 +2904,19 @@ const et = class et extends ze {
2907
2904
  widthFrac: rt,
2908
2905
  saturation: V,
2909
2906
  opacity: ot,
2910
- isDirected: X,
2911
- isSelf: ft,
2907
+ isDirected: H,
2908
+ isSelf: bt,
2912
2909
  // Identity for the qe-edge-* interaction events.
2913
2910
  source: A[0],
2914
2911
  target: A[1],
2915
2912
  group: ut,
2916
2913
  unit: mt,
2917
- layer: H,
2914
+ layer: W,
2918
2915
  // <qe-edges self-size>: self dot radius as a fraction of its node's.
2919
- selfSize: ft ? ((ne = o.edgeLayers[T]) == null ? void 0 : ne.selfSize) ?? void 0 : void 0,
2916
+ selfSize: bt ? ((ne = o.edgeLayers[T]) == null ? void 0 : ne.selfSize) ?? void 0 : void 0,
2920
2917
  // <qe-edges fixed-size>: thickness keeps its zoom-1 on-screen size.
2921
2918
  fixedSize: ((Zs = o.edgeLayers[T]) == null ? void 0 : Zs.fixedSize) || void 0
2922
- }, (ft ? ks ?? xe : xe).__data__.objects.set(at.ID, at);
2919
+ }, (bt ? ks ?? xe : xe).__data__.objects.set(at.ID, at);
2923
2920
  });
2924
2921
  }
2925
2922
  const I = o.showNodes;