@dpuse/dpuse-tool-d3-visualiser 0.0.33 → 0.0.37

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.
Files changed (69) hide show
  1. package/README.md +658 -244
  2. package/dist/{band-DbExrcif.js → band-C1twWuW2.js} +3 -2
  3. package/dist/{band-DbExrcif.js.map → band-C1twWuW2.js.map} +1 -1
  4. package/dist/{billboardJs-jmaH9Gag.js → billboardJs-DS82ViEw.js} +1081 -1747
  5. package/dist/billboardJs-DS82ViEw.js.map +1 -0
  6. package/dist/chordDiagram-Cz0sVVgD.js +2911 -0
  7. package/dist/chordDiagram-Cz0sVVgD.js.map +1 -0
  8. package/dist/{d3BarChart-DEzayAyh.js → d3BarChart-DIN2KQsU.js} +7 -6
  9. package/dist/{d3BarChart-DEzayAyh.js.map → d3BarChart-DIN2KQsU.js.map} +1 -1
  10. package/dist/dpuse-tool-d3-visualiser.es.js +17 -7
  11. package/dist/dpuse-tool-d3-visualiser.es.js.map +1 -1
  12. package/dist/{drag-DLokvdmv.js → drag-DfL4uwqz.js} +25 -24
  13. package/dist/{drag-DLokvdmv.js.map → drag-DfL4uwqz.js.map} +1 -1
  14. package/dist/hierarchy-CDFAetye.js +151 -0
  15. package/dist/hierarchy-CDFAetye.js.map +1 -0
  16. package/dist/{linear-D3BD7E1p.js → linear-BnhqTvdX.js} +59 -85
  17. package/dist/linear-BnhqTvdX.js.map +1 -0
  18. package/dist/{link-DKK0Q0lG.js → link-D-9z7kEr.js} +16 -39
  19. package/dist/link-D-9z7kEr.js.map +1 -0
  20. package/dist/math-C5EhTgJw.js +12 -0
  21. package/dist/math-C5EhTgJw.js.map +1 -0
  22. package/dist/max-CPVNm4tn.js +14 -0
  23. package/dist/max-CPVNm4tn.js.map +1 -0
  24. package/dist/{networkDiagram-HS-SgOZ0.js → networkDiagram-yraPhqxN.js} +28 -28
  25. package/dist/{networkDiagram-HS-SgOZ0.js.map → networkDiagram-yraPhqxN.js.map} +1 -1
  26. package/dist/nodrag-Dq2tlBbe.js +51 -0
  27. package/dist/nodrag-Dq2tlBbe.js.map +1 -0
  28. package/dist/{observablePlot-B1CSEvcU.js → observablePlot-C7764aFq.js} +2366 -2417
  29. package/dist/observablePlot-C7764aFq.js.map +1 -0
  30. package/dist/ordinal-uZdoVxAx.js +30 -0
  31. package/dist/ordinal-uZdoVxAx.js.map +1 -0
  32. package/dist/palette-BuTjISrV.js +64 -0
  33. package/dist/palette-BuTjISrV.js.map +1 -0
  34. package/dist/{path-Bt1sPr2f.js → path-6kmCrmEz.js} +7 -4
  35. package/dist/{path-Bt1sPr2f.js.map → path-6kmCrmEz.js.map} +1 -1
  36. package/dist/point-6cHftmvM.js +27 -0
  37. package/dist/point-6cHftmvM.js.map +1 -0
  38. package/dist/pow-BFDPqS3s.js +86 -0
  39. package/dist/pow-BFDPqS3s.js.map +1 -0
  40. package/dist/{sankeyDiagram-BXTYCHPV.js → sankeyDiagram-BT2RCRpi.js} +93 -152
  41. package/dist/sankeyDiagram-BT2RCRpi.js.map +1 -0
  42. package/dist/{src-Br_t1-IV.js → src-WDualLFV.js} +40 -39
  43. package/dist/{src-Br_t1-IV.js.map → src-WDualLFV.js.map} +1 -1
  44. package/dist/{math-Dc0ICuib.js → src-Xlr4CcSw.js} +70 -75
  45. package/dist/src-Xlr4CcSw.js.map +1 -0
  46. package/dist/{src-Du_hPZAX.js → src-yL3ZdoR1.js} +235 -282
  47. package/dist/src-yL3ZdoR1.js.map +1 -0
  48. package/dist/step-DgCcZZ3W.js +670 -0
  49. package/dist/step-DgCcZZ3W.js.map +1 -0
  50. package/dist/{sum-BAZU479z.js → sum-CNP0Xric.js} +4 -15
  51. package/dist/sum-CNP0Xric.js.map +1 -0
  52. package/dist/{tanStackCharts-vvQteV9z.js → tanStackCharts-BJAX22lS.js} +164 -151
  53. package/dist/tanStackCharts-BJAX22lS.js.map +1 -0
  54. package/dist/treeDiagram-DsHUD8ou.js +130 -0
  55. package/dist/treeDiagram-DsHUD8ou.js.map +1 -0
  56. package/dist/types/src/chordDiagram.d.ts +25 -0
  57. package/dist/types/src/index.d.ts +3 -0
  58. package/package.json +6 -4
  59. package/dist/billboardJs-jmaH9Gag.js.map +0 -1
  60. package/dist/linear-D3BD7E1p.js.map +0 -1
  61. package/dist/link-DKK0Q0lG.js.map +0 -1
  62. package/dist/math-Dc0ICuib.js.map +0 -1
  63. package/dist/observablePlot-B1CSEvcU.js.map +0 -1
  64. package/dist/sankeyDiagram-BXTYCHPV.js.map +0 -1
  65. package/dist/src-Du_hPZAX.js.map +0 -1
  66. package/dist/sum-BAZU479z.js.map +0 -1
  67. package/dist/tanStackCharts-vvQteV9z.js.map +0 -1
  68. package/dist/treeDiagram-DemHfVnX.js +0 -277
  69. package/dist/treeDiagram-DemHfVnX.js.map +0 -1
@@ -1,83 +1,85 @@
1
- import { t as e } from "./select-BIuoFcZG.js";
2
- import { n as t, r as n, t as r } from "./sum-BAZU479z.js";
3
- import { t as i } from "./link-DKK0Q0lG.js";
1
+ import { t as e } from "./max-CPVNm4tn.js";
2
+ import { n as t, t as n } from "./sum-CNP0Xric.js";
3
+ import { t as r } from "./select-BIuoFcZG.js";
4
+ import { t as i } from "./link-D-9z7kEr.js";
5
+ import { n as a, r as o, t as s } from "./palette-BuTjISrV.js";
4
6
  //#region node_modules/d3-sankey/src/align.js
5
- function a(e, t) {
7
+ function c(e, t) {
6
8
  return e.sourceLinks.length ? e.depth : t - 1;
7
9
  }
8
10
  //#endregion
9
11
  //#region node_modules/d3-sankey/src/constant.js
10
- function o(e) {
12
+ function l(e) {
11
13
  return function() {
12
14
  return e;
13
15
  };
14
16
  }
15
17
  //#endregion
16
18
  //#region node_modules/d3-sankey/src/sankey.js
17
- function s(e, t) {
18
- return l(e.source, t.source) || e.index - t.index;
19
+ function u(e, t) {
20
+ return f(e.source, t.source) || e.index - t.index;
19
21
  }
20
- function c(e, t) {
21
- return l(e.target, t.target) || e.index - t.index;
22
+ function d(e, t) {
23
+ return f(e.target, t.target) || e.index - t.index;
22
24
  }
23
- function l(e, t) {
25
+ function f(e, t) {
24
26
  return e.y0 - t.y0;
25
27
  }
26
- function u(e) {
28
+ function p(e) {
27
29
  return e.value;
28
30
  }
29
- function d(e) {
31
+ function m(e) {
30
32
  return e.index;
31
33
  }
32
- function f(e) {
34
+ function h(e) {
33
35
  return e.nodes;
34
36
  }
35
- function p(e) {
37
+ function g(e) {
36
38
  return e.links;
37
39
  }
38
- function m(e, t) {
40
+ function _(e, t) {
39
41
  let n = e.get(t);
40
42
  if (!n) throw Error("missing: " + t);
41
43
  return n;
42
44
  }
43
- function h({ nodes: e }) {
45
+ function v({ nodes: e }) {
44
46
  for (let t of e) {
45
47
  let e = t.y0, n = e;
46
48
  for (let n of t.sourceLinks) n.y0 = e + n.width / 2, e += n.width;
47
49
  for (let e of t.targetLinks) e.y1 = n + e.width / 2, n += e.width;
48
50
  }
49
51
  }
50
- function g() {
51
- let e = 0, i = 0, g = 1, _ = 1, v = 24, y = 8, b, x = d, S = a, C, w, T = f, E = p, D = 6;
52
+ function y() {
53
+ let r = 0, i = 0, a = 1, o = 1, s = 24, y = 8, b, x = m, S = c, C, w, T = h, E = g, D = 6;
52
54
  function O() {
53
55
  let e = {
54
56
  nodes: T.apply(null, arguments),
55
57
  links: E.apply(null, arguments)
56
58
  };
57
- return k(e), A(e), j(e), M(e), F(e), h(e), e;
59
+ return k(e), A(e), j(e), M(e), F(e), v(e), e;
58
60
  }
59
61
  O.update = function(e) {
60
- return h(e), e;
62
+ return v(e), e;
61
63
  }, O.nodeId = function(e) {
62
- return arguments.length ? (x = typeof e == "function" ? e : o(e), O) : x;
64
+ return arguments.length ? (x = typeof e == "function" ? e : l(e), O) : x;
63
65
  }, O.nodeAlign = function(e) {
64
- return arguments.length ? (S = typeof e == "function" ? e : o(e), O) : S;
66
+ return arguments.length ? (S = typeof e == "function" ? e : l(e), O) : S;
65
67
  }, O.nodeSort = function(e) {
66
68
  return arguments.length ? (C = e, O) : C;
67
69
  }, O.nodeWidth = function(e) {
68
- return arguments.length ? (v = +e, O) : v;
70
+ return arguments.length ? (s = +e, O) : s;
69
71
  }, O.nodePadding = function(e) {
70
72
  return arguments.length ? (y = b = +e, O) : y;
71
73
  }, O.nodes = function(e) {
72
- return arguments.length ? (T = typeof e == "function" ? e : o(e), O) : T;
74
+ return arguments.length ? (T = typeof e == "function" ? e : l(e), O) : T;
73
75
  }, O.links = function(e) {
74
- return arguments.length ? (E = typeof e == "function" ? e : o(e), O) : E;
76
+ return arguments.length ? (E = typeof e == "function" ? e : l(e), O) : E;
75
77
  }, O.linkSort = function(e) {
76
78
  return arguments.length ? (w = e, O) : w;
77
- }, O.size = function(t) {
78
- return arguments.length ? (e = i = 0, g = +t[0], _ = +t[1], O) : [g - e, _ - i];
79
- }, O.extent = function(t) {
80
- return arguments.length ? (e = +t[0][0], g = +t[1][0], i = +t[0][1], _ = +t[1][1], O) : [[e, i], [g, _]];
79
+ }, O.size = function(e) {
80
+ return arguments.length ? (r = i = 0, a = +e[0], o = +e[1], O) : [a - r, o - i];
81
+ }, O.extent = function(e) {
82
+ return arguments.length ? (r = +e[0][0], a = +e[1][0], i = +e[0][1], o = +e[1][1], O) : [[r, i], [a, o]];
81
83
  }, O.iterations = function(e) {
82
84
  return arguments.length ? (D = +e, O) : D;
83
85
  };
@@ -87,12 +89,12 @@ function g() {
87
89
  for (let [e, r] of t.entries()) {
88
90
  r.index = e;
89
91
  let { source: t, target: i } = r;
90
- typeof t != "object" && (t = r.source = m(n, t)), typeof i != "object" && (i = r.target = m(n, i)), t.sourceLinks.push(r), i.targetLinks.push(r);
92
+ typeof t != "object" && (t = r.source = _(n, t)), typeof i != "object" && (i = r.target = _(n, i)), t.sourceLinks.push(r), i.targetLinks.push(r);
91
93
  }
92
94
  if (w != null) for (let { sourceLinks: t, targetLinks: n } of e) t.sort(w), n.sort(w);
93
95
  }
94
96
  function A({ nodes: e }) {
95
- for (let t of e) t.value = t.fixedValue === void 0 ? Math.max(r(t.sourceLinks, u), r(t.targetLinks, u)) : t.fixedValue;
97
+ for (let t of e) t.value = t.fixedValue === void 0 ? Math.max(n(t.sourceLinks, p), n(t.targetLinks, p)) : t.fixedValue;
96
98
  }
97
99
  function j({ nodes: e }) {
98
100
  let t = e.length, n = new Set(e), r = /* @__PURE__ */ new Set(), i = 0;
@@ -117,23 +119,23 @@ function g() {
117
119
  }
118
120
  }
119
121
  function N({ nodes: t }) {
120
- let r = n(t, (e) => e.depth) + 1, i = (g - e - v) / (r - 1), a = Array(r);
121
- for (let n of t) {
122
- let t = Math.max(0, Math.min(r - 1, Math.floor(S.call(null, n, r))));
123
- n.layer = t, n.x0 = e + t * i, n.x1 = n.x0 + v, a[t] ? a[t].push(n) : a[t] = [n];
122
+ let n = e(t, (e) => e.depth) + 1, i = (a - r - s) / (n - 1), o = Array(n);
123
+ for (let e of t) {
124
+ let t = Math.max(0, Math.min(n - 1, Math.floor(S.call(null, e, n))));
125
+ e.layer = t, e.x0 = r + t * i, e.x1 = e.x0 + s, o[t] ? o[t].push(e) : o[t] = [e];
124
126
  }
125
- if (C) for (let e of a) e.sort(C);
126
- return a;
127
+ if (C) for (let e of o) e.sort(C);
128
+ return o;
127
129
  }
128
130
  function P(e) {
129
- let n = t(e, (e) => (_ - i - (e.length - 1) * b) / r(e, u));
131
+ let r = t(e, (e) => (o - i - (e.length - 1) * b) / n(e, p));
130
132
  for (let t of e) {
131
133
  let e = i;
132
- for (let r of t) {
133
- r.y0 = e, r.y1 = e + r.value * n, e = r.y1 + b;
134
- for (let e of r.sourceLinks) e.width = e.value * n;
134
+ for (let n of t) {
135
+ n.y0 = e, n.y1 = e + n.value * r, e = n.y1 + b;
136
+ for (let e of n.sourceLinks) e.width = e.value * r;
135
137
  }
136
- e = (_ - e + b) / (t.length + 1);
138
+ e = (o - e + b) / (t.length + 1);
137
139
  for (let n = 0; n < t.length; ++n) {
138
140
  let r = t[n];
139
141
  r.y0 += e * (n + 1), r.y1 += e * (n + 1);
@@ -141,12 +143,12 @@ function g() {
141
143
  H(t);
142
144
  }
143
145
  }
144
- function F(e) {
145
- let t = N(e);
146
- b = Math.min(y, (_ - i) / (n(t, (e) => e.length) - 1)), P(t);
146
+ function F(t) {
147
+ let n = N(t);
148
+ b = Math.min(y, (o - i) / (e(n, (e) => e.length) - 1)), P(n);
147
149
  for (let e = 0; e < D; ++e) {
148
- let n = .99 ** e, r = Math.max(1 - n, (e + 1) / D);
149
- L(t, n, r), I(t, n, r);
150
+ let t = .99 ** e, r = Math.max(1 - t, (e + 1) / D);
151
+ L(n, t, r), I(n, t, r);
150
152
  }
151
153
  }
152
154
  function I(e, t, n) {
@@ -162,7 +164,7 @@ function g() {
162
164
  let i = (n / r - e.y0) * t;
163
165
  e.y0 += i, e.y1 += i, V(e);
164
166
  }
165
- C === void 0 && i.sort(l), R(i, n);
167
+ C === void 0 && i.sort(f), R(i, n);
166
168
  }
167
169
  }
168
170
  function L(e, t, n) {
@@ -178,12 +180,12 @@ function g() {
178
180
  let i = (n / r - e.y0) * t;
179
181
  e.y0 += i, e.y1 += i, V(e);
180
182
  }
181
- C === void 0 && i.sort(l), R(i, n);
183
+ C === void 0 && i.sort(f), R(i, n);
182
184
  }
183
185
  }
184
186
  function R(e, t) {
185
187
  let n = e.length >> 1, r = e[n];
186
- B(e, r.y0 - b, n - 1, t), z(e, r.y1 + b, n + 1, t), B(e, _, e.length - 1, t), z(e, i, 0, t);
188
+ B(e, r.y0 - b, n - 1, t), z(e, r.y1 + b, n + 1, t), B(e, o, e.length - 1, t), z(e, i, 0, t);
187
189
  }
188
190
  function z(e, t, n, r) {
189
191
  for (; n < e.length; ++n) {
@@ -199,12 +201,12 @@ function g() {
199
201
  }
200
202
  function V({ sourceLinks: e, targetLinks: t }) {
201
203
  if (w === void 0) {
202
- for (let { source: { sourceLinks: e } } of t) e.sort(c);
203
- for (let { target: { targetLinks: t } } of e) t.sort(s);
204
+ for (let { source: { sourceLinks: e } } of t) e.sort(d);
205
+ for (let { target: { targetLinks: t } } of e) t.sort(u);
204
206
  }
205
207
  }
206
208
  function H(e) {
207
- if (w === void 0) for (let { sourceLinks: t, targetLinks: n } of e) t.sort(c), n.sort(s);
209
+ if (w === void 0) for (let { sourceLinks: t, targetLinks: n } of e) t.sort(d), n.sort(u);
208
210
  }
209
211
  function U(e, t) {
210
212
  let n = e.y0 - (e.sourceLinks.length - 1) * b / 2;
@@ -234,127 +236,66 @@ function g() {
234
236
  }
235
237
  //#endregion
236
238
  //#region node_modules/d3-sankey/src/sankeyLinkHorizontal.js
237
- function _(e) {
239
+ function b(e) {
238
240
  return [e.source.x1, e.y0];
239
241
  }
240
- function v(e) {
242
+ function x(e) {
241
243
  return [e.target.x0, e.y1];
242
244
  }
243
- function y() {
244
- return i().source(_).target(v);
245
- }
246
- //#endregion
247
- //#region src/palette.ts
248
- var b = [
249
- {
250
- dark: "#3987e5",
251
- light: "#2a78d6"
252
- },
253
- {
254
- dark: "#d95926",
255
- light: "#eb6834"
256
- },
257
- {
258
- dark: "#199e70",
259
- light: "#1baf7a"
260
- },
261
- {
262
- dark: "#c98500",
263
- light: "#eda100"
264
- },
265
- {
266
- dark: "#d55181",
267
- light: "#e87ba4"
268
- },
269
- {
270
- dark: "#008300",
271
- light: "#008300"
272
- },
273
- {
274
- dark: "#9085e9",
275
- light: "#4a3aa7"
276
- },
277
- {
278
- dark: "#e66767",
279
- light: "#e34948"
280
- }
281
- ], x = {
282
- dark: {
283
- muted: "#898781",
284
- primary: "#ffffff",
285
- secondary: "#c3c2b7"
286
- },
287
- light: {
288
- muted: "#898781",
289
- primary: "#0b0b0b",
290
- secondary: "#52514e"
291
- }
292
- }, S = {
293
- dark: {
294
- border: "rgba(255,255,255,0.10)",
295
- chart: "#1a1a19"
296
- },
297
- light: {
298
- border: "rgba(11,11,11,0.10)",
299
- chart: "#fcfcfb"
300
- }
301
- };
302
- function C(e, t) {
303
- let n = b[(e % b.length + b.length) % b.length];
304
- if (n == null) throw Error("Categorical palette is empty.");
305
- return t === "dark" ? n.dark : n.light;
245
+ function S() {
246
+ return i().source(b).target(x);
306
247
  }
307
248
  //#endregion
308
249
  //#region src/sankeyDiagram.ts
309
- var w = 16, T = 12, E = 480, D = 640, O = 6;
310
- function k(t, n, r = {}) {
311
- let i = r.colorModeId ?? "light", a = x[i], o = S[i];
312
- getComputedStyle(n).position === "static" && (n.style.position = "relative");
313
- let s = e(n).append("div").attr("role", "tooltip").style("position", "absolute").style("pointer-events", "none").style("z-index", "1").style("opacity", "0").style("transition", "opacity 120ms ease").style("padding", "4px 8px").style("border-radius", "4px").style("font", "12px system-ui, -apple-system, \"Segoe UI\", sans-serif").style("white-space", "nowrap").style("background", o.chart).style("color", a.primary).style("border", `1px solid ${o.border}`).style("box-shadow", "0 2px 8px rgba(0,0,0,0.15)");
314
- function c(e, t) {
315
- let r = n.getBoundingClientRect();
316
- s.html(t).style("left", `${String(e.clientX - r.left + 12)}px`).style("top", `${String(e.clientY - r.top + 12)}px`).style("opacity", "1");
250
+ var C = 16, w = 12, T = 480, E = 640, D = 6;
251
+ function O(e, t, n = {}) {
252
+ let i = n.colorModeId ?? "light", c = s[i], l = a[i];
253
+ getComputedStyle(t).position === "static" && (t.style.position = "relative");
254
+ let u = r(t).append("div").attr("role", "tooltip").style("position", "absolute").style("pointer-events", "none").style("z-index", "1").style("opacity", "0").style("transition", "opacity 120ms ease").style("padding", "4px 8px").style("border-radius", "4px").style("font", "12px system-ui, -apple-system, \"Segoe UI\", sans-serif").style("white-space", "nowrap").style("background", l.chart).style("color", c.primary).style("border", `1px solid ${l.border}`).style("box-shadow", "0 2px 8px rgba(0,0,0,0.15)");
255
+ function d(e, n) {
256
+ let r = t.getBoundingClientRect();
257
+ u.html(n).style("left", `${String(e.clientX - r.left + 12)}px`).style("top", `${String(e.clientY - r.top + 12)}px`).style("opacity", "1");
317
258
  }
318
- function l() {
319
- s.style("opacity", "0");
259
+ function f() {
260
+ u.style("opacity", "0");
320
261
  }
321
- function u() {
322
- e(n).selectAll("svg").remove();
323
- let o = n.clientWidth || D, s = n.clientHeight || E, u = {
324
- links: t.links.map((e) => ({ ...e })),
325
- nodes: t.nodes.map((e) => ({ ...e }))
326
- }, { links: d, nodes: f } = g().nodeId((e) => e.id).nodeWidth(r.nodeWidth ?? w).nodePadding(r.nodePadding ?? T).extent([[1, 1], [o - 1, s - 1]])(u), p = e(n).insert("svg", "div").attr("viewBox", `0 0 ${String(o)} ${String(s)}`).attr("width", "100%").attr("height", "100%").attr("font-family", "system-ui, -apple-system, \"Segoe UI\", sans-serif").attr("font-size", 12), m = y();
327
- p.append("g").attr("fill", "none").selectAll("path").data(d).join("path").attr("d", m).attr("stroke", (e) => C(f.indexOf(e.source), i)).attr("stroke-opacity", .35).attr("stroke-width", (e) => Math.max(1, e.width ?? 1)).on("mouseenter", (t, n) => {
328
- e(t.currentTarget).attr("stroke-opacity", .6);
329
- let r = n.source, i = n.target;
330
- c(t, `${r.name} → ${i.name}<br>${n.value.toLocaleString()}`);
262
+ function p() {
263
+ r(t).selectAll("svg").remove();
264
+ let a = t.clientWidth || E, s = t.clientHeight || T, l = {
265
+ links: e.links.map((e) => ({ ...e })),
266
+ nodes: e.nodes.map((e) => ({ ...e }))
267
+ }, { links: u, nodes: p } = y().nodeId((e) => e.id).nodeWidth(n.nodeWidth ?? C).nodePadding(n.nodePadding ?? w).extent([[1, 1], [a - 1, s - 1]])(l), m = r(t).insert("svg", "div").attr("viewBox", `0 0 ${String(a)} ${String(s)}`).attr("width", "100%").attr("height", "100%").attr("font-family", "system-ui, -apple-system, \"Segoe UI\", sans-serif").attr("font-size", 12), h = S();
268
+ m.append("g").attr("fill", "none").selectAll("path").data(u).join("path").attr("d", h).attr("stroke", (e) => o(p.indexOf(e.source), i)).attr("stroke-opacity", .35).attr("stroke-width", (e) => Math.max(1, e.width ?? 1)).on("mouseenter", (e, t) => {
269
+ r(e.currentTarget).attr("stroke-opacity", .6);
270
+ let n = t.source, i = t.target;
271
+ d(e, `${n.name} → ${i.name}<br>${t.value.toLocaleString()}`);
331
272
  }).on("mousemove", (e, t) => {
332
273
  let n = t.source, r = t.target;
333
- c(e, `${n.name} → ${r.name}<br>${t.value.toLocaleString()}`);
334
- }).on("mouseleave", (t) => {
335
- e(t.currentTarget).attr("stroke-opacity", .35), l();
274
+ d(e, `${n.name} → ${r.name}<br>${t.value.toLocaleString()}`);
275
+ }).on("mouseleave", (e) => {
276
+ r(e.currentTarget).attr("stroke-opacity", .35), f();
336
277
  });
337
- let h = p.append("g").selectAll("g").data(f).join("g");
338
- h.append("rect").attr("x", (e) => e.x0 ?? 0).attr("y", (e) => e.y0 ?? 0).attr("width", (e) => (e.x1 ?? 0) - (e.x0 ?? 0)).attr("height", (e) => Math.max(1, (e.y1 ?? 0) - (e.y0 ?? 0))).attr("rx", 2).attr("fill", (e, t) => C(t, i)).on("mouseenter", (e, t) => {
339
- c(e, `${t.name}<br>${(t.value ?? 0).toLocaleString()}`);
278
+ let g = m.append("g").selectAll("g").data(p).join("g");
279
+ g.append("rect").attr("x", (e) => e.x0 ?? 0).attr("y", (e) => e.y0 ?? 0).attr("width", (e) => (e.x1 ?? 0) - (e.x0 ?? 0)).attr("height", (e) => Math.max(1, (e.y1 ?? 0) - (e.y0 ?? 0))).attr("rx", 2).attr("fill", (e, t) => o(t, i)).on("mouseenter", (e, t) => {
280
+ d(e, `${t.name}<br>${(t.value ?? 0).toLocaleString()}`);
340
281
  }).on("mousemove", (e, t) => {
341
- c(e, `${t.name}<br>${(t.value ?? 0).toLocaleString()}`);
342
- }).on("mouseleave", l), h.append("text").attr("x", (e) => (e.x0 ?? 0) < o / 2 ? (e.x1 ?? 0) + O : (e.x0 ?? 0) - O).attr("y", (e) => ((e.y0 ?? 0) + (e.y1 ?? 0)) / 2).attr("dy", "0.35em").attr("text-anchor", (e) => (e.x0 ?? 0) < o / 2 ? "start" : "end").attr("fill", a.primary).text((e) => e.name);
343
- let _ = p.node();
282
+ d(e, `${t.name}<br>${(t.value ?? 0).toLocaleString()}`);
283
+ }).on("mouseleave", f), g.append("text").attr("x", (e) => (e.x0 ?? 0) < a / 2 ? (e.x1 ?? 0) + D : (e.x0 ?? 0) - D).attr("y", (e) => ((e.y0 ?? 0) + (e.y1 ?? 0)) / 2).attr("dy", "0.35em").attr("text-anchor", (e) => (e.x0 ?? 0) < a / 2 ? "start" : "end").attr("fill", c.primary).text((e) => e.name);
284
+ let _ = m.node();
344
285
  if (_ == null) throw Error("Failed to create Sankey diagram SVG element.");
345
286
  return _;
346
287
  }
347
- let d = u();
288
+ let m = p();
348
289
  return {
349
290
  resize: () => {
350
- d = u();
291
+ m = p();
351
292
  },
352
293
  get svg() {
353
- return d;
294
+ return m;
354
295
  }
355
296
  };
356
297
  }
357
298
  //#endregion
358
- export { k as renderSankeyDiagram };
299
+ export { O as renderSankeyDiagram };
359
300
 
360
- //# sourceMappingURL=sankeyDiagram-BXTYCHPV.js.map
301
+ //# sourceMappingURL=sankeyDiagram-BT2RCRpi.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sankeyDiagram-BT2RCRpi.js","names":[],"sources":["../node_modules/d3-sankey/src/align.js","../node_modules/d3-sankey/src/constant.js","../node_modules/d3-sankey/src/sankey.js","../node_modules/d3-sankey/src/sankeyLinkHorizontal.js","../src/sankeyDiagram.ts"],"sourcesContent":["import {min} from \"d3-array\";\n\nfunction targetDepth(d) {\n return d.target.depth;\n}\n\nexport function left(node) {\n return node.depth;\n}\n\nexport function right(node, n) {\n return n - 1 - node.height;\n}\n\nexport function justify(node, n) {\n return node.sourceLinks.length ? node.depth : n - 1;\n}\n\nexport function center(node) {\n return node.targetLinks.length ? node.depth\n : node.sourceLinks.length ? min(node.sourceLinks, targetDepth) - 1\n : 0;\n}\n","export default function constant(x) {\n return function() {\n return x;\n };\n}\n","import {max, min, sum} from \"d3-array\";\nimport {justify} from \"./align.js\";\nimport constant from \"./constant.js\";\n\nfunction ascendingSourceBreadth(a, b) {\n return ascendingBreadth(a.source, b.source) || a.index - b.index;\n}\n\nfunction ascendingTargetBreadth(a, b) {\n return ascendingBreadth(a.target, b.target) || a.index - b.index;\n}\n\nfunction ascendingBreadth(a, b) {\n return a.y0 - b.y0;\n}\n\nfunction value(d) {\n return d.value;\n}\n\nfunction defaultId(d) {\n return d.index;\n}\n\nfunction defaultNodes(graph) {\n return graph.nodes;\n}\n\nfunction defaultLinks(graph) {\n return graph.links;\n}\n\nfunction find(nodeById, id) {\n const node = nodeById.get(id);\n if (!node) throw new Error(\"missing: \" + id);\n return node;\n}\n\nfunction computeLinkBreadths({nodes}) {\n for (const node of nodes) {\n let y0 = node.y0;\n let y1 = y0;\n for (const link of node.sourceLinks) {\n link.y0 = y0 + link.width / 2;\n y0 += link.width;\n }\n for (const link of node.targetLinks) {\n link.y1 = y1 + link.width / 2;\n y1 += link.width;\n }\n }\n}\n\nexport default function Sankey() {\n let x0 = 0, y0 = 0, x1 = 1, y1 = 1; // extent\n let dx = 24; // nodeWidth\n let dy = 8, py; // nodePadding\n let id = defaultId;\n let align = justify;\n let sort;\n let linkSort;\n let nodes = defaultNodes;\n let links = defaultLinks;\n let iterations = 6;\n\n function sankey() {\n const graph = {nodes: nodes.apply(null, arguments), links: links.apply(null, arguments)};\n computeNodeLinks(graph);\n computeNodeValues(graph);\n computeNodeDepths(graph);\n computeNodeHeights(graph);\n computeNodeBreadths(graph);\n computeLinkBreadths(graph);\n return graph;\n }\n\n sankey.update = function(graph) {\n computeLinkBreadths(graph);\n return graph;\n };\n\n sankey.nodeId = function(_) {\n return arguments.length ? (id = typeof _ === \"function\" ? _ : constant(_), sankey) : id;\n };\n\n sankey.nodeAlign = function(_) {\n return arguments.length ? (align = typeof _ === \"function\" ? _ : constant(_), sankey) : align;\n };\n\n sankey.nodeSort = function(_) {\n return arguments.length ? (sort = _, sankey) : sort;\n };\n\n sankey.nodeWidth = function(_) {\n return arguments.length ? (dx = +_, sankey) : dx;\n };\n\n sankey.nodePadding = function(_) {\n return arguments.length ? (dy = py = +_, sankey) : dy;\n };\n\n sankey.nodes = function(_) {\n return arguments.length ? (nodes = typeof _ === \"function\" ? _ : constant(_), sankey) : nodes;\n };\n\n sankey.links = function(_) {\n return arguments.length ? (links = typeof _ === \"function\" ? _ : constant(_), sankey) : links;\n };\n\n sankey.linkSort = function(_) {\n return arguments.length ? (linkSort = _, sankey) : linkSort;\n };\n\n sankey.size = function(_) {\n return arguments.length ? (x0 = y0 = 0, x1 = +_[0], y1 = +_[1], sankey) : [x1 - x0, y1 - y0];\n };\n\n sankey.extent = function(_) {\n return arguments.length ? (x0 = +_[0][0], x1 = +_[1][0], y0 = +_[0][1], y1 = +_[1][1], sankey) : [[x0, y0], [x1, y1]];\n };\n\n sankey.iterations = function(_) {\n return arguments.length ? (iterations = +_, sankey) : iterations;\n };\n\n function computeNodeLinks({nodes, links}) {\n for (const [i, node] of nodes.entries()) {\n node.index = i;\n node.sourceLinks = [];\n node.targetLinks = [];\n }\n const nodeById = new Map(nodes.map((d, i) => [id(d, i, nodes), d]));\n for (const [i, link] of links.entries()) {\n link.index = i;\n let {source, target} = link;\n if (typeof source !== \"object\") source = link.source = find(nodeById, source);\n if (typeof target !== \"object\") target = link.target = find(nodeById, target);\n source.sourceLinks.push(link);\n target.targetLinks.push(link);\n }\n if (linkSort != null) {\n for (const {sourceLinks, targetLinks} of nodes) {\n sourceLinks.sort(linkSort);\n targetLinks.sort(linkSort);\n }\n }\n }\n\n function computeNodeValues({nodes}) {\n for (const node of nodes) {\n node.value = node.fixedValue === undefined\n ? Math.max(sum(node.sourceLinks, value), sum(node.targetLinks, value))\n : node.fixedValue;\n }\n }\n\n function computeNodeDepths({nodes}) {\n const n = nodes.length;\n let current = new Set(nodes);\n let next = new Set;\n let x = 0;\n while (current.size) {\n for (const node of current) {\n node.depth = x;\n for (const {target} of node.sourceLinks) {\n next.add(target);\n }\n }\n if (++x > n) throw new Error(\"circular link\");\n current = next;\n next = new Set;\n }\n }\n\n function computeNodeHeights({nodes}) {\n const n = nodes.length;\n let current = new Set(nodes);\n let next = new Set;\n let x = 0;\n while (current.size) {\n for (const node of current) {\n node.height = x;\n for (const {source} of node.targetLinks) {\n next.add(source);\n }\n }\n if (++x > n) throw new Error(\"circular link\");\n current = next;\n next = new Set;\n }\n }\n\n function computeNodeLayers({nodes}) {\n const x = max(nodes, d => d.depth) + 1;\n const kx = (x1 - x0 - dx) / (x - 1);\n const columns = new Array(x);\n for (const node of nodes) {\n const i = Math.max(0, Math.min(x - 1, Math.floor(align.call(null, node, x))));\n node.layer = i;\n node.x0 = x0 + i * kx;\n node.x1 = node.x0 + dx;\n if (columns[i]) columns[i].push(node);\n else columns[i] = [node];\n }\n if (sort) for (const column of columns) {\n column.sort(sort);\n }\n return columns;\n }\n\n function initializeNodeBreadths(columns) {\n const ky = min(columns, c => (y1 - y0 - (c.length - 1) * py) / sum(c, value));\n for (const nodes of columns) {\n let y = y0;\n for (const node of nodes) {\n node.y0 = y;\n node.y1 = y + node.value * ky;\n y = node.y1 + py;\n for (const link of node.sourceLinks) {\n link.width = link.value * ky;\n }\n }\n y = (y1 - y + py) / (nodes.length + 1);\n for (let i = 0; i < nodes.length; ++i) {\n const node = nodes[i];\n node.y0 += y * (i + 1);\n node.y1 += y * (i + 1);\n }\n reorderLinks(nodes);\n }\n }\n\n function computeNodeBreadths(graph) {\n const columns = computeNodeLayers(graph);\n py = Math.min(dy, (y1 - y0) / (max(columns, c => c.length) - 1));\n initializeNodeBreadths(columns);\n for (let i = 0; i < iterations; ++i) {\n const alpha = Math.pow(0.99, i);\n const beta = Math.max(1 - alpha, (i + 1) / iterations);\n relaxRightToLeft(columns, alpha, beta);\n relaxLeftToRight(columns, alpha, beta);\n }\n }\n\n // Reposition each node based on its incoming (target) links.\n function relaxLeftToRight(columns, alpha, beta) {\n for (let i = 1, n = columns.length; i < n; ++i) {\n const column = columns[i];\n for (const target of column) {\n let y = 0;\n let w = 0;\n for (const {source, value} of target.targetLinks) {\n let v = value * (target.layer - source.layer);\n y += targetTop(source, target) * v;\n w += v;\n }\n if (!(w > 0)) continue;\n let dy = (y / w - target.y0) * alpha;\n target.y0 += dy;\n target.y1 += dy;\n reorderNodeLinks(target);\n }\n if (sort === undefined) column.sort(ascendingBreadth);\n resolveCollisions(column, beta);\n }\n }\n\n // Reposition each node based on its outgoing (source) links.\n function relaxRightToLeft(columns, alpha, beta) {\n for (let n = columns.length, i = n - 2; i >= 0; --i) {\n const column = columns[i];\n for (const source of column) {\n let y = 0;\n let w = 0;\n for (const {target, value} of source.sourceLinks) {\n let v = value * (target.layer - source.layer);\n y += sourceTop(source, target) * v;\n w += v;\n }\n if (!(w > 0)) continue;\n let dy = (y / w - source.y0) * alpha;\n source.y0 += dy;\n source.y1 += dy;\n reorderNodeLinks(source);\n }\n if (sort === undefined) column.sort(ascendingBreadth);\n resolveCollisions(column, beta);\n }\n }\n\n function resolveCollisions(nodes, alpha) {\n const i = nodes.length >> 1;\n const subject = nodes[i];\n resolveCollisionsBottomToTop(nodes, subject.y0 - py, i - 1, alpha);\n resolveCollisionsTopToBottom(nodes, subject.y1 + py, i + 1, alpha);\n resolveCollisionsBottomToTop(nodes, y1, nodes.length - 1, alpha);\n resolveCollisionsTopToBottom(nodes, y0, 0, alpha);\n }\n\n // Push any overlapping nodes down.\n function resolveCollisionsTopToBottom(nodes, y, i, alpha) {\n for (; i < nodes.length; ++i) {\n const node = nodes[i];\n const dy = (y - node.y0) * alpha;\n if (dy > 1e-6) node.y0 += dy, node.y1 += dy;\n y = node.y1 + py;\n }\n }\n\n // Push any overlapping nodes up.\n function resolveCollisionsBottomToTop(nodes, y, i, alpha) {\n for (; i >= 0; --i) {\n const node = nodes[i];\n const dy = (node.y1 - y) * alpha;\n if (dy > 1e-6) node.y0 -= dy, node.y1 -= dy;\n y = node.y0 - py;\n }\n }\n\n function reorderNodeLinks({sourceLinks, targetLinks}) {\n if (linkSort === undefined) {\n for (const {source: {sourceLinks}} of targetLinks) {\n sourceLinks.sort(ascendingTargetBreadth);\n }\n for (const {target: {targetLinks}} of sourceLinks) {\n targetLinks.sort(ascendingSourceBreadth);\n }\n }\n }\n\n function reorderLinks(nodes) {\n if (linkSort === undefined) {\n for (const {sourceLinks, targetLinks} of nodes) {\n sourceLinks.sort(ascendingTargetBreadth);\n targetLinks.sort(ascendingSourceBreadth);\n }\n }\n }\n\n // Returns the target.y0 that would produce an ideal link from source to target.\n function targetTop(source, target) {\n let y = source.y0 - (source.sourceLinks.length - 1) * py / 2;\n for (const {target: node, width} of source.sourceLinks) {\n if (node === target) break;\n y += width + py;\n }\n for (const {source: node, width} of target.targetLinks) {\n if (node === source) break;\n y -= width;\n }\n return y;\n }\n\n // Returns the source.y0 that would produce an ideal link from source to target.\n function sourceTop(source, target) {\n let y = target.y0 - (target.targetLinks.length - 1) * py / 2;\n for (const {source: node, width} of target.targetLinks) {\n if (node === source) break;\n y += width + py;\n }\n for (const {target: node, width} of source.sourceLinks) {\n if (node === target) break;\n y -= width;\n }\n return y;\n }\n\n return sankey;\n}\n","import {linkHorizontal} from \"d3-shape\";\n\nfunction horizontalSource(d) {\n return [d.source.x1, d.y0];\n}\n\nfunction horizontalTarget(d) {\n return [d.target.x0, d.y1];\n}\n\nexport default function() {\n return linkHorizontal()\n .source(horizontalSource)\n .target(horizontalTarget);\n}\n","// ── External Dependencies & Registrations\nimport { select } from 'd3-selection';\nimport { sankey, type SankeyGraph, type SankeyLink as SankeyLinkExtra, sankeyLinkHorizontal, type SankeyNode as SankeyNodeExtra } from 'd3-sankey';\n\n// ── Local\nimport { categoricalColor, type ColorModeId, INK, SURFACE } from '@/palette';\n\n// ── Types ────────────────────────────────────────────────────────────────────────────────────────────────────────────\n\nexport interface SankeyDiagramNode {\n id: string;\n name: string;\n}\n\nexport interface SankeyDiagramLink {\n source: string;\n target: string;\n value: number;\n}\n\nexport interface SankeyDiagramData {\n links: SankeyDiagramLink[];\n nodes: SankeyDiagramNode[];\n}\n\nexport interface SankeyDiagramOptions {\n colorModeId?: ColorModeId;\n nodePadding?: number;\n nodeWidth?: number;\n}\n\nexport interface SankeyDiagramHandle {\n resize: () => void;\n svg: SVGSVGElement;\n}\n\ntype LaidOutNode = SankeyDiagramNode & SankeyNodeExtra<SankeyDiagramNode, SankeyDiagramLink>;\ntype LaidOutLink = SankeyLinkExtra<SankeyDiagramNode, SankeyDiagramLink>;\n\n// ── Constants ────────────────────────────────────────────────────────────────────────────────────────────────────────\n\nconst DEFAULT_NODE_WIDTH = 16;\nconst DEFAULT_NODE_PADDING = 12;\nconst DEFAULT_HEIGHT = 480;\nconst DEFAULT_WIDTH = 640;\nconst LABEL_MARGIN = 6;\n\n// ── Actions ──────────────────────────────────────────────────────────────────────────────────────────────────────────\n\nexport function renderSankeyDiagram(data: SankeyDiagramData, renderTo: HTMLElement, options: SankeyDiagramOptions = {}): SankeyDiagramHandle {\n const colorModeId = options.colorModeId ?? 'light';\n const ink = INK[colorModeId];\n const surface = SURFACE[colorModeId];\n\n if (getComputedStyle(renderTo).position === 'static') renderTo.style.position = 'relative';\n\n const tooltip = select(renderTo)\n .append('div')\n .attr('role', 'tooltip')\n .style('position', 'absolute')\n .style('pointer-events', 'none')\n .style('z-index', '1')\n .style('opacity', '0')\n .style('transition', 'opacity 120ms ease')\n .style('padding', '4px 8px')\n .style('border-radius', '4px')\n .style('font', '12px system-ui, -apple-system, \"Segoe UI\", sans-serif')\n .style('white-space', 'nowrap')\n .style('background', surface.chart)\n .style('color', ink.primary)\n .style('border', `1px solid ${surface.border}`)\n .style('box-shadow', '0 2px 8px rgba(0,0,0,0.15)');\n\n function showTooltip(event: MouseEvent, text: string): void {\n const bounds = renderTo.getBoundingClientRect();\n tooltip\n .html(text)\n .style('left', `${String(event.clientX - bounds.left + 12)}px`)\n .style('top', `${String(event.clientY - bounds.top + 12)}px`)\n .style('opacity', '1');\n }\n\n function hideTooltip(): void {\n tooltip.style('opacity', '0');\n }\n\n function draw(): SVGSVGElement {\n select(renderTo).selectAll('svg').remove();\n\n const width = renderTo.clientWidth || DEFAULT_WIDTH;\n const height = renderTo.clientHeight || DEFAULT_HEIGHT;\n\n const graph: SankeyGraph<SankeyDiagramNode, SankeyDiagramLink> = {\n links: data.links.map((link) => ({ ...link })),\n nodes: data.nodes.map((node) => ({ ...node }))\n };\n\n const layout = sankey<SankeyDiagramNode, SankeyDiagramLink>()\n .nodeId((node) => node.id)\n .nodeWidth(options.nodeWidth ?? DEFAULT_NODE_WIDTH)\n .nodePadding(options.nodePadding ?? DEFAULT_NODE_PADDING)\n .extent([\n [1, 1],\n [width - 1, height - 1]\n ]);\n\n const { links, nodes } = layout(graph) as { links: LaidOutLink[]; nodes: LaidOutNode[] };\n\n const svgSelection = select(renderTo)\n .insert('svg', 'div')\n .attr('viewBox', `0 0 ${String(width)} ${String(height)}`)\n .attr('width', '100%')\n .attr('height', '100%')\n .attr('font-family', 'system-ui, -apple-system, \"Segoe UI\", sans-serif')\n .attr('font-size', 12);\n\n const linkPath = sankeyLinkHorizontal<SankeyDiagramNode, SankeyDiagramLink>();\n\n svgSelection\n .append('g')\n .attr('fill', 'none')\n .selectAll('path')\n .data(links)\n .join('path')\n .attr('d', linkPath)\n .attr('stroke', (link) => categoricalColor(nodes.indexOf(link.source as LaidOutNode), colorModeId))\n .attr('stroke-opacity', 0.35)\n .attr('stroke-width', (link) => Math.max(1, link.width ?? 1))\n .on('mouseenter', (event: MouseEvent, link) => {\n select(event.currentTarget as SVGPathElement).attr('stroke-opacity', 0.6);\n const source = link.source as LaidOutNode;\n const target = link.target as LaidOutNode;\n showTooltip(event, `${source.name} → ${target.name}<br>${link.value.toLocaleString()}`);\n })\n .on('mousemove', (event: MouseEvent, link) => {\n const source = link.source as LaidOutNode;\n const target = link.target as LaidOutNode;\n showTooltip(event, `${source.name} → ${target.name}<br>${link.value.toLocaleString()}`);\n })\n .on('mouseleave', (event: MouseEvent) => {\n select(event.currentTarget as SVGPathElement).attr('stroke-opacity', 0.35);\n hideTooltip();\n });\n\n const nodeGroup = svgSelection.append('g').selectAll('g').data(nodes).join('g');\n\n nodeGroup\n .append('rect')\n .attr('x', (node) => node.x0 ?? 0)\n .attr('y', (node) => node.y0 ?? 0)\n .attr('width', (node) => (node.x1 ?? 0) - (node.x0 ?? 0))\n .attr('height', (node) => Math.max(1, (node.y1 ?? 0) - (node.y0 ?? 0)))\n .attr('rx', 2)\n .attr('fill', (_node, index) => categoricalColor(index, colorModeId))\n .on('mouseenter', (event: MouseEvent, node) => {\n showTooltip(event, `${node.name}<br>${(node.value ?? 0).toLocaleString()}`);\n })\n .on('mousemove', (event: MouseEvent, node) => {\n showTooltip(event, `${node.name}<br>${(node.value ?? 0).toLocaleString()}`);\n })\n .on('mouseleave', hideTooltip);\n\n nodeGroup\n .append('text')\n .attr('x', (node) => ((node.x0 ?? 0) < width / 2 ? (node.x1 ?? 0) + LABEL_MARGIN : (node.x0 ?? 0) - LABEL_MARGIN))\n .attr('y', (node) => ((node.y0 ?? 0) + (node.y1 ?? 0)) / 2)\n .attr('dy', '0.35em')\n .attr('text-anchor', (node) => ((node.x0 ?? 0) < width / 2 ? 'start' : 'end'))\n .attr('fill', ink.primary)\n .text((node) => node.name);\n\n const svgNode = svgSelection.node();\n if (svgNode == null) throw new Error('Failed to create Sankey diagram SVG element.');\n return svgNode;\n }\n\n let svg = draw();\n\n return {\n resize: () => {\n svg = draw();\n },\n get svg() {\n return svg;\n }\n };\n}\n"],"x_google_ignoreList":[0,1,2,3],"mappings":";;;;;;AAcA,SAAgB,EAAQ,GAAM,GAAG;CAC/B,OAAO,EAAK,YAAY,SAAS,EAAK,QAAQ,IAAI;AACpD;;;AChBA,SAAwB,EAAS,GAAG;CAClC,OAAO,WAAW;EAChB,OAAO;CACT;AACF;;;ACAA,SAAS,EAAuB,GAAG,GAAG;CACpC,OAAO,EAAiB,EAAE,QAAQ,EAAE,MAAM,KAAK,EAAE,QAAQ,EAAE;AAC7D;AAEA,SAAS,EAAuB,GAAG,GAAG;CACpC,OAAO,EAAiB,EAAE,QAAQ,EAAE,MAAM,KAAK,EAAE,QAAQ,EAAE;AAC7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,EAAK,SAAS,EAAA,CAAG,eAAe,GAAG;EAC9E,CAAC,CAAC,CACD,GAAG,cAAc,CAAW,GAEjC,EACK,OAAO,MAAM,CAAC,CACd,KAAK,MAAM,OAAW,EAAK,MAAM,KAAK,IAAQ,KAAK,EAAK,MAAM,KAAK,KAAgB,EAAK,MAAM,KAAK,CAAa,CAAC,CACjH,KAAK,MAAM,QAAW,EAAK,MAAM,MAAM,EAAK,MAAM,MAAM,CAAC,CAAC,CAC1D,KAAK,MAAM,QAAQ,CAAC,CACpB,KAAK,gBAAgB,OAAW,EAAK,MAAM,KAAK,IAAQ,IAAI,UAAU,KAAM,CAAC,CAC7E,KAAK,QAAQ,EAAI,OAAO,CAAC,CACzB,MAAM,MAAS,EAAK,IAAI;EAE7B,IAAM,IAAU,EAAa,KAAK;EAClC,IAAI,KAAW,MAAM,MAAU,MAAM,8CAA8C;EACnF,OAAO;CACX;CAEA,IAAI,IAAM,EAAK;CAEf,OAAO;EACH,cAAc;GACV,IAAM,EAAK;EACf;EACA,IAAI,MAAM;GACN,OAAO;EACX;CACJ;AACJ"}
@@ -1,5 +1,6 @@
1
- import { t as e } from "./select-BIuoFcZG.js";
2
- import { a as t, d as n, i as r, n as i, u as a } from "./src-Du_hPZAX.js";
1
+ import { i as e, n as t } from "./src-yL3ZdoR1.js";
2
+ import { t as n } from "./select-BIuoFcZG.js";
3
+ import { n as r, s as i, t as a } from "./nodrag-Dq2tlBbe.js";
3
4
  //#region node_modules/d3-interpolate/src/zoom.js
4
5
  var o = 1e-12;
5
6
  function s(e) {
@@ -144,7 +145,7 @@ function C(e, t, n) {
144
145
  return e.translate(i > r ? (r + i) / 2 : Math.min(0, r) || Math.max(0, i), o > a ? (a + o) / 2 : Math.min(0, a) || Math.max(0, o));
145
146
  }
146
147
  function w() {
147
- var o = v, s = y, c = C, l = x, h = S, w = [0, Infinity], T = [[-Infinity, -Infinity], [Infinity, Infinity]], E = 250, D = u, O = a("start", "zoom", "end"), k, A, j, M = 500, N = 150, P = 0, F = 10;
148
+ var o = v, s = y, c = C, l = x, h = S, w = [0, Infinity], T = [[-Infinity, -Infinity], [Infinity, Infinity]], E = 250, D = u, O = e("start", "zoom", "end"), k, A, j, M = 500, N = 150, P = 0, F = 10;
148
149
  function I(e) {
149
150
  e.property("__zoom", b).on("wheel.zoom", U, { passive: !1 }).on("mousedown.zoom", W).on("dblclick.zoom", G).filter(h).on("touchstart.zoom", K).on("touchmove.zoom", q).on("touchend.zoom touchcancel.zoom", J).style("-webkit-tap-highlight-color", "rgba(0,0,0,0)");
150
151
  }
@@ -218,83 +219,83 @@ function w() {
218
219
  end: function() {
219
220
  return --this.active === 0 && (delete this.that.__zooming, this.emit("end")), this;
220
221
  },
221
- emit: function(t) {
222
- var n = e(this.that).datum();
223
- O.call(t, this.that, new f(t, {
222
+ emit: function(e) {
223
+ var t = n(this.that).datum();
224
+ O.call(e, this.that, new f(e, {
224
225
  sourceEvent: this.sourceEvent,
225
226
  target: I,
226
- type: t,
227
+ type: e,
227
228
  transform: this.that.__zoom,
228
229
  dispatch: O
229
- }), n);
230
+ }), t);
230
231
  }
231
232
  };
232
- function U(e, ...t) {
233
+ function U(e, ...n) {
233
234
  if (!o.apply(this, arguments)) return;
234
- var r = V(this, t).event(e), a = this.__zoom, s = Math.max(w[0], Math.min(w[1], a.k * 2 ** l.apply(this, arguments))), u = n(e);
235
+ var r = V(this, n).event(e), a = this.__zoom, s = Math.max(w[0], Math.min(w[1], a.k * 2 ** l.apply(this, arguments))), u = i(e);
235
236
  if (r.wheel) (r.mouse[0][0] !== u[0] || r.mouse[0][1] !== u[1]) && (r.mouse[1] = a.invert(r.mouse[0] = u)), clearTimeout(r.wheel);
236
237
  else if (a.k === s) return;
237
- else r.mouse = [u, a.invert(u)], i(this), r.start();
238
+ else r.mouse = [u, a.invert(u)], t(this), r.start();
238
239
  _(e), r.wheel = setTimeout(d, N), r.zoom("mouse", c(R(L(a, s), r.mouse[0], r.mouse[1]), r.extent, T));
239
240
  function d() {
240
241
  r.wheel = null, r.end();
241
242
  }
242
243
  }
243
- function W(a, ...s) {
244
+ function W(e, ...s) {
244
245
  if (j || !o.apply(this, arguments)) return;
245
- var l = a.currentTarget, u = V(this, s, !0).event(a), d = e(a.view).on("mousemove.zoom", h, !0).on("mouseup.zoom", v, !0), f = n(a, l), p = a.clientX, m = a.clientY;
246
- r(a.view), g(a), u.mouse = [f, this.__zoom.invert(f)], i(this), u.start();
246
+ var l = e.currentTarget, u = V(this, s, !0).event(e), d = n(e.view).on("mousemove.zoom", h, !0).on("mouseup.zoom", v, !0), f = i(e, l), p = e.clientX, m = e.clientY;
247
+ a(e.view), g(e), u.mouse = [f, this.__zoom.invert(f)], t(this), u.start();
247
248
  function h(e) {
248
249
  if (_(e), !u.moved) {
249
- var t = e.clientX - p, r = e.clientY - m;
250
- u.moved = t * t + r * r > P;
250
+ var t = e.clientX - p, n = e.clientY - m;
251
+ u.moved = t * t + n * n > P;
251
252
  }
252
- u.event(e).zoom("mouse", c(R(u.that.__zoom, u.mouse[0] = n(e, l), u.mouse[1]), u.extent, T));
253
+ u.event(e).zoom("mouse", c(R(u.that.__zoom, u.mouse[0] = i(e, l), u.mouse[1]), u.extent, T));
253
254
  }
254
255
  function v(e) {
255
- d.on("mousemove.zoom mouseup.zoom", null), t(e.view, u.moved), _(e), u.event(e).end();
256
+ d.on("mousemove.zoom mouseup.zoom", null), r(e.view, u.moved), _(e), u.event(e).end();
256
257
  }
257
258
  }
258
- function G(t, ...r) {
259
+ function G(e, ...t) {
259
260
  if (o.apply(this, arguments)) {
260
- var i = this.__zoom, a = n(t.changedTouches ? t.changedTouches[0] : t, this), l = i.invert(a), u = i.k * (t.shiftKey ? .5 : 2), d = c(R(L(i, u), a, l), s.apply(this, r), T);
261
- _(t), E > 0 ? e(this).transition().duration(E).call(B, d, a, t) : e(this).call(I.transform, d, a, t);
261
+ var r = this.__zoom, a = i(e.changedTouches ? e.changedTouches[0] : e, this), l = r.invert(a), u = r.k * (e.shiftKey ? .5 : 2), d = c(R(L(r, u), a, l), s.apply(this, t), T);
262
+ _(e), E > 0 ? n(this).transition().duration(E).call(B, d, a, e) : n(this).call(I.transform, d, a, e);
262
263
  }
263
264
  }
264
- function K(e, ...t) {
265
+ function K(e, ...n) {
265
266
  if (o.apply(this, arguments)) {
266
- var r = e.touches, a = r.length, s = V(this, t, e.changedTouches.length === a).event(e), c, l, u, d;
267
- for (g(e), l = 0; l < a; ++l) u = r[l], d = n(u, this), d = [
267
+ var r = e.touches, a = r.length, s = V(this, n, e.changedTouches.length === a).event(e), c, l, u, d;
268
+ for (g(e), l = 0; l < a; ++l) u = r[l], d = i(u, this), d = [
268
269
  d,
269
270
  this.__zoom.invert(d),
270
271
  u.identifier
271
272
  ], s.touch0 ? !s.touch1 && s.touch0[2] !== d[2] && (s.touch1 = d, s.taps = 0) : (s.touch0 = d, c = !0, s.taps = 1 + !!k);
272
273
  k &&= clearTimeout(k), c && (s.taps < 2 && (A = d[0], k = setTimeout(function() {
273
274
  k = null;
274
- }, M)), i(this), s.start());
275
+ }, M)), t(this), s.start());
275
276
  }
276
277
  }
277
278
  function q(e, ...t) {
278
279
  if (this.__zooming) {
279
- var r = V(this, t).event(e), i = e.changedTouches, a = i.length, o, s, l, u;
280
- for (_(e), o = 0; o < a; ++o) s = i[o], l = n(s, this), r.touch0 && r.touch0[2] === s.identifier ? r.touch0[0] = l : r.touch1 && r.touch1[2] === s.identifier && (r.touch1[0] = l);
281
- if (s = r.that.__zoom, r.touch1) {
282
- var d = r.touch0[0], f = r.touch0[1], p = r.touch1[0], m = r.touch1[1], h = (h = p[0] - d[0]) * h + (h = p[1] - d[1]) * h, g = (g = m[0] - f[0]) * g + (g = m[1] - f[1]) * g;
280
+ var n = V(this, t).event(e), r = e.changedTouches, a = r.length, o, s, l, u;
281
+ for (_(e), o = 0; o < a; ++o) s = r[o], l = i(s, this), n.touch0 && n.touch0[2] === s.identifier ? n.touch0[0] = l : n.touch1 && n.touch1[2] === s.identifier && (n.touch1[0] = l);
282
+ if (s = n.that.__zoom, n.touch1) {
283
+ var d = n.touch0[0], f = n.touch0[1], p = n.touch1[0], m = n.touch1[1], h = (h = p[0] - d[0]) * h + (h = p[1] - d[1]) * h, g = (g = m[0] - f[0]) * g + (g = m[1] - f[1]) * g;
283
284
  s = L(s, Math.sqrt(h / g)), l = [(d[0] + p[0]) / 2, (d[1] + p[1]) / 2], u = [(f[0] + m[0]) / 2, (f[1] + m[1]) / 2];
284
- } else if (r.touch0) l = r.touch0[0], u = r.touch0[1];
285
+ } else if (n.touch0) l = n.touch0[0], u = n.touch0[1];
285
286
  else return;
286
- r.zoom("touch", c(R(s, l, u), r.extent, T));
287
+ n.zoom("touch", c(R(s, l, u), n.extent, T));
287
288
  }
288
289
  }
289
- function J(t, ...r) {
290
+ function J(e, ...t) {
290
291
  if (this.__zooming) {
291
- var i = V(this, r).event(t), a = t.changedTouches, o = a.length, s, c;
292
- for (g(t), j && clearTimeout(j), j = setTimeout(function() {
292
+ var r = V(this, t).event(e), a = e.changedTouches, o = a.length, s, c;
293
+ for (g(e), j && clearTimeout(j), j = setTimeout(function() {
293
294
  j = null;
294
- }, M), s = 0; s < o; ++s) c = a[s], i.touch0 && i.touch0[2] === c.identifier ? delete i.touch0 : i.touch1 && i.touch1[2] === c.identifier && delete i.touch1;
295
- if (i.touch1 && !i.touch0 && (i.touch0 = i.touch1, delete i.touch1), i.touch0) i.touch0[1] = this.__zoom.invert(i.touch0[0]);
296
- else if (i.end(), i.taps === 2 && (c = n(c, this), Math.hypot(A[0] - c[0], A[1] - c[1]) < F)) {
297
- var l = e(this).on("dblclick.zoom");
295
+ }, M), s = 0; s < o; ++s) c = a[s], r.touch0 && r.touch0[2] === c.identifier ? delete r.touch0 : r.touch1 && r.touch1[2] === c.identifier && delete r.touch1;
296
+ if (r.touch1 && !r.touch0 && (r.touch0 = r.touch1, delete r.touch1), r.touch0) r.touch0[1] = this.__zoom.invert(r.touch0[0]);
297
+ else if (r.end(), r.taps === 2 && (c = i(c, this), Math.hypot(A[0] - c[0], A[1] - c[1]) < F)) {
298
+ var l = n(this).on("dblclick.zoom");
298
299
  l && l.apply(this, arguments);
299
300
  }
300
301
  }
@@ -329,4 +330,4 @@ function w() {
329
330
  //#endregion
330
331
  export { w as t };
331
332
 
332
- //# sourceMappingURL=src-Br_t1-IV.js.map
333
+ //# sourceMappingURL=src-WDualLFV.js.map