@dpuse/dpuse-tool-d3 0.0.10 → 0.0.11
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/README.md +243 -208
- package/dist/axis-DbjL_93j.js +1621 -0
- package/dist/axis-DbjL_93j.js.map +1 -0
- package/dist/bump-znhpCF6A.js +75 -0
- package/dist/bump-znhpCF6A.js.map +1 -0
- package/dist/dpuse-tool-d3.es.js +4958 -16433
- package/dist/dpuse-tool-d3.es.js.map +1 -1
- package/dist/drag-B46QGUMq.js +173 -0
- package/dist/drag-B46QGUMq.js.map +1 -0
- package/dist/{erdDiagram-DNEvMuIA.js → erdDiagram-b-qDkEhY.js} +22 -20
- package/dist/erdDiagram-b-qDkEhY.js.map +1 -0
- package/dist/linear-J4iYa1Bf.js +34 -0
- package/dist/linear-J4iYa1Bf.js.map +1 -0
- package/dist/link-Dti9fi9g.js +33 -0
- package/dist/link-Dti9fi9g.js.map +1 -0
- package/dist/networkDiagram-QWVy8iRy.js +493 -0
- package/dist/networkDiagram-QWVy8iRy.js.map +1 -0
- package/dist/observablePlot-CNlbR_T4.js +7008 -0
- package/dist/observablePlot-CNlbR_T4.js.map +1 -0
- package/dist/path-Bt1sPr2f.js +65 -0
- package/dist/path-Bt1sPr2f.js.map +1 -0
- package/dist/sankeyDiagram-Dgf87Zt4.js +360 -0
- package/dist/sankeyDiagram-Dgf87Zt4.js.map +1 -0
- package/dist/{bump-S1d-3Q8P.js → select-BIuoFcZG.js} +161 -325
- package/dist/select-BIuoFcZG.js.map +1 -0
- package/dist/src-B7SGbtRQ.js +332 -0
- package/dist/src-B7SGbtRQ.js.map +1 -0
- package/dist/src-DnMaAyIP.js +1194 -0
- package/dist/src-DnMaAyIP.js.map +1 -0
- package/dist/sum-BAZU479z.js +36 -0
- package/dist/sum-BAZU479z.js.map +1 -0
- package/dist/treeDiagram-BJ_QF4os.js +277 -0
- package/dist/treeDiagram-BJ_QF4os.js.map +1 -0
- package/dist/types/src/index.d.ts +6 -4
- package/dist/types/src/observablePlot.d.ts +8 -0
- package/package.json +1 -1
- package/dist/bump-S1d-3Q8P.js.map +0 -1
- package/dist/erdDiagram-DNEvMuIA.js.map +0 -1
- package/dist/types/src/plotBarChart.d.ts +0 -7
- /package/dist/types/tests/{plotBarChart.test.d.ts → observablePlot.test.d.ts} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"link-Dti9fi9g.js","names":["x","pointX","y","pointY","constant"],"sources":["../node_modules/d3-shape/src/link.js"],"sourcesContent":["import {slice} from \"./array.js\";\nimport constant from \"./constant.js\";\nimport {bumpX, bumpY, bumpRadial} from \"./curve/bump.js\";\nimport {withPath} from \"./path.js\";\nimport {x as pointX, y as pointY} from \"./point.js\";\n\nfunction linkSource(d) {\n return d.source;\n}\n\nfunction linkTarget(d) {\n return d.target;\n}\n\nexport function link(curve) {\n let source = linkSource,\n target = linkTarget,\n x = pointX,\n y = pointY,\n context = null,\n output = null,\n path = withPath(link);\n\n function link() {\n let buffer;\n const argv = slice.call(arguments);\n const s = source.apply(this, argv);\n const t = target.apply(this, argv);\n if (context == null) output = curve(buffer = path());\n output.lineStart();\n argv[0] = s, output.point(+x.apply(this, argv), +y.apply(this, argv));\n argv[0] = t, output.point(+x.apply(this, argv), +y.apply(this, argv));\n output.lineEnd();\n if (buffer) return output = null, buffer + \"\" || null;\n }\n\n link.source = function(_) {\n return arguments.length ? (source = _, link) : source;\n };\n\n link.target = function(_) {\n return arguments.length ? (target = _, link) : target;\n };\n\n link.x = function(_) {\n return arguments.length ? (x = typeof _ === \"function\" ? _ : constant(+_), link) : x;\n };\n\n link.y = function(_) {\n return arguments.length ? (y = typeof _ === \"function\" ? _ : constant(+_), link) : y;\n };\n\n link.context = function(_) {\n return arguments.length ? (_ == null ? context = output = null : output = curve(context = _), link) : context;\n };\n\n return link;\n}\n\nexport function linkHorizontal() {\n return link(bumpX);\n}\n\nexport function linkVertical() {\n return link(bumpY);\n}\n\nexport function linkRadial() {\n const l = link(bumpRadial);\n l.angle = l.x, delete l.x;\n l.radius = l.y, delete l.y;\n return l;\n}\n"],"x_google_ignoreList":[0],"mappings":";;AAMA,SAAS,EAAW,GAAG;CACrB,OAAO,EAAE;AACX;AAEA,SAAS,EAAW,GAAG;CACrB,OAAO,EAAE;AACX;AAEA,SAAgB,EAAK,GAAO;CAC1B,IAAI,IAAS,GACT,IAAS,GACTA,IAAIC,GACJC,IAAIC,GACJ,IAAU,MACV,IAAS,MACT,IAAO,EAAS,CAAI;CAExB,SAAS,IAAO;EACd,IAAI,GACE,IAAO,EAAM,KAAK,SAAS,GAC3B,IAAI,EAAO,MAAM,MAAM,CAAI,GAC3B,IAAI,EAAO,MAAM,MAAM,CAAI;EAMjC,IALI,MAAiB,IAAS,EAAM,IAAS,EAAK,CAAC,IACnD,EAAO,UAAU,GACjB,EAAK,KAAK,GAAG,EAAO,MAAM,CAACH,EAAE,MAAM,MAAM,CAAI,GAAG,CAACE,EAAE,MAAM,MAAM,CAAI,CAAC,GACpE,EAAK,KAAK,GAAG,EAAO,MAAM,CAACF,EAAE,MAAM,MAAM,CAAI,GAAG,CAACE,EAAE,MAAM,MAAM,CAAI,CAAC,GACpE,EAAO,QAAQ,GACX,GAAQ,OAAO,IAAS,MAAM,IAAS,MAAM;CACnD;CAsBA,OApBA,EAAK,SAAS,SAAS,GAAG;EACxB,OAAO,UAAU,UAAU,IAAS,GAAG,KAAQ;CACjD,GAEA,EAAK,SAAS,SAAS,GAAG;EACxB,OAAO,UAAU,UAAU,IAAS,GAAG,KAAQ;CACjD,GAEA,EAAK,IAAI,SAAS,GAAG;EACnB,OAAO,UAAU,UAAU,IAAI,OAAO,KAAM,aAAa,IAAIE,EAAS,CAAC,CAAC,GAAG,KAAQJ;CACrF,GAEA,EAAK,IAAI,SAAS,GAAG;EACnB,OAAO,UAAU,UAAU,IAAI,OAAO,KAAM,aAAa,IAAII,EAAS,CAAC,CAAC,GAAG,KAAQF;CACrF,GAEA,EAAK,UAAU,SAAS,GAAG;EACzB,OAAO,UAAU,UAAU,KAAK,OAAO,IAAU,IAAS,OAAO,IAAS,EAAM,IAAU,CAAC,GAAG,KAAQ;CACxG,GAEO;AACT;AAEA,SAAgB,IAAiB;CAC/B,OAAO,EAAK,CAAK;AACnB"}
|
|
@@ -0,0 +1,493 @@
|
|
|
1
|
+
import { t as e } from "./select-BIuoFcZG.js";
|
|
2
|
+
import { D as t, r as n } from "./src-DnMaAyIP.js";
|
|
3
|
+
import { t as r } from "./drag-B46QGUMq.js";
|
|
4
|
+
import { t as i } from "./src-B7SGbtRQ.js";
|
|
5
|
+
//#region node_modules/d3-force/src/center.js
|
|
6
|
+
function a(e, t) {
|
|
7
|
+
var n, r = 1;
|
|
8
|
+
e ??= 0, t ??= 0;
|
|
9
|
+
function i() {
|
|
10
|
+
var i, a = n.length, o, s = 0, c = 0;
|
|
11
|
+
for (i = 0; i < a; ++i) o = n[i], s += o.x, c += o.y;
|
|
12
|
+
for (s = (s / a - e) * r, c = (c / a - t) * r, i = 0; i < a; ++i) o = n[i], o.x -= s, o.y -= c;
|
|
13
|
+
}
|
|
14
|
+
return i.initialize = function(e) {
|
|
15
|
+
n = e;
|
|
16
|
+
}, i.x = function(t) {
|
|
17
|
+
return arguments.length ? (e = +t, i) : e;
|
|
18
|
+
}, i.y = function(e) {
|
|
19
|
+
return arguments.length ? (t = +e, i) : t;
|
|
20
|
+
}, i.strength = function(e) {
|
|
21
|
+
return arguments.length ? (r = +e, i) : r;
|
|
22
|
+
}, i;
|
|
23
|
+
}
|
|
24
|
+
//#endregion
|
|
25
|
+
//#region node_modules/d3-quadtree/src/add.js
|
|
26
|
+
function o(e) {
|
|
27
|
+
let t = +this._x.call(null, e), n = +this._y.call(null, e);
|
|
28
|
+
return s(this.cover(t, n), t, n, e);
|
|
29
|
+
}
|
|
30
|
+
function s(e, t, n, r) {
|
|
31
|
+
if (isNaN(t) || isNaN(n)) return e;
|
|
32
|
+
var i, a = e._root, o = { data: r }, s = e._x0, c = e._y0, l = e._x1, u = e._y1, d, f, p, m, h, g, _, v;
|
|
33
|
+
if (!a) return e._root = o, e;
|
|
34
|
+
for (; a.length;) if ((h = t >= (d = (s + l) / 2)) ? s = d : l = d, (g = n >= (f = (c + u) / 2)) ? c = f : u = f, i = a, !(a = a[_ = g << 1 | h])) return i[_] = o, e;
|
|
35
|
+
if (p = +e._x.call(null, a.data), m = +e._y.call(null, a.data), t === p && n === m) return o.next = a, i ? i[_] = o : e._root = o, e;
|
|
36
|
+
do
|
|
37
|
+
i = i ? i[_] = [
|
|
38
|
+
,
|
|
39
|
+
,
|
|
40
|
+
,
|
|
41
|
+
,
|
|
42
|
+
] : e._root = [
|
|
43
|
+
,
|
|
44
|
+
,
|
|
45
|
+
,
|
|
46
|
+
,
|
|
47
|
+
], (h = t >= (d = (s + l) / 2)) ? s = d : l = d, (g = n >= (f = (c + u) / 2)) ? c = f : u = f;
|
|
48
|
+
while ((_ = g << 1 | h) == (v = (m >= f) << 1 | p >= d));
|
|
49
|
+
return i[v] = a, i[_] = o, e;
|
|
50
|
+
}
|
|
51
|
+
function c(e) {
|
|
52
|
+
var t, n, r = e.length, i, a, o = Array(r), c = Array(r), l = Infinity, u = Infinity, d = -Infinity, f = -Infinity;
|
|
53
|
+
for (n = 0; n < r; ++n) isNaN(i = +this._x.call(null, t = e[n])) || isNaN(a = +this._y.call(null, t)) || (o[n] = i, c[n] = a, i < l && (l = i), i > d && (d = i), a < u && (u = a), a > f && (f = a));
|
|
54
|
+
if (l > d || u > f) return this;
|
|
55
|
+
for (this.cover(l, u).cover(d, f), n = 0; n < r; ++n) s(this, o[n], c[n], e[n]);
|
|
56
|
+
return this;
|
|
57
|
+
}
|
|
58
|
+
//#endregion
|
|
59
|
+
//#region node_modules/d3-quadtree/src/cover.js
|
|
60
|
+
function l(e, t) {
|
|
61
|
+
if (isNaN(e = +e) || isNaN(t = +t)) return this;
|
|
62
|
+
var n = this._x0, r = this._y0, i = this._x1, a = this._y1;
|
|
63
|
+
if (isNaN(n)) i = (n = Math.floor(e)) + 1, a = (r = Math.floor(t)) + 1;
|
|
64
|
+
else {
|
|
65
|
+
for (var o = i - n || 1, s = this._root, c, l; n > e || e >= i || r > t || t >= a;) switch (l = (t < r) << 1 | e < n, c = [
|
|
66
|
+
,
|
|
67
|
+
,
|
|
68
|
+
,
|
|
69
|
+
,
|
|
70
|
+
], c[l] = s, s = c, o *= 2, l) {
|
|
71
|
+
case 0:
|
|
72
|
+
i = n + o, a = r + o;
|
|
73
|
+
break;
|
|
74
|
+
case 1:
|
|
75
|
+
n = i - o, a = r + o;
|
|
76
|
+
break;
|
|
77
|
+
case 2:
|
|
78
|
+
i = n + o, r = a - o;
|
|
79
|
+
break;
|
|
80
|
+
case 3: n = i - o, r = a - o;
|
|
81
|
+
}
|
|
82
|
+
this._root && this._root.length && (this._root = s);
|
|
83
|
+
}
|
|
84
|
+
return this._x0 = n, this._y0 = r, this._x1 = i, this._y1 = a, this;
|
|
85
|
+
}
|
|
86
|
+
//#endregion
|
|
87
|
+
//#region node_modules/d3-quadtree/src/data.js
|
|
88
|
+
function u() {
|
|
89
|
+
var e = [];
|
|
90
|
+
return this.visit(function(t) {
|
|
91
|
+
if (!t.length) do
|
|
92
|
+
e.push(t.data);
|
|
93
|
+
while (t = t.next);
|
|
94
|
+
}), e;
|
|
95
|
+
}
|
|
96
|
+
//#endregion
|
|
97
|
+
//#region node_modules/d3-quadtree/src/extent.js
|
|
98
|
+
function d(e) {
|
|
99
|
+
return arguments.length ? this.cover(+e[0][0], +e[0][1]).cover(+e[1][0], +e[1][1]) : isNaN(this._x0) ? void 0 : [[this._x0, this._y0], [this._x1, this._y1]];
|
|
100
|
+
}
|
|
101
|
+
//#endregion
|
|
102
|
+
//#region node_modules/d3-quadtree/src/quad.js
|
|
103
|
+
function f(e, t, n, r, i) {
|
|
104
|
+
this.node = e, this.x0 = t, this.y0 = n, this.x1 = r, this.y1 = i;
|
|
105
|
+
}
|
|
106
|
+
//#endregion
|
|
107
|
+
//#region node_modules/d3-quadtree/src/find.js
|
|
108
|
+
function p(e, t, n) {
|
|
109
|
+
var r, i = this._x0, a = this._y0, o, s, c, l, u = this._x1, d = this._y1, p = [], m = this._root, h, g;
|
|
110
|
+
for (m && p.push(new f(m, i, a, u, d)), n == null ? n = Infinity : (i = e - n, a = t - n, u = e + n, d = t + n, n *= n); h = p.pop();) if (!(!(m = h.node) || (o = h.x0) > u || (s = h.y0) > d || (c = h.x1) < i || (l = h.y1) < a)) if (m.length) {
|
|
111
|
+
var _ = (o + c) / 2, v = (s + l) / 2;
|
|
112
|
+
p.push(new f(m[3], _, v, c, l), new f(m[2], o, v, _, l), new f(m[1], _, s, c, v), new f(m[0], o, s, _, v)), (g = (t >= v) << 1 | e >= _) && (h = p[p.length - 1], p[p.length - 1] = p[p.length - 1 - g], p[p.length - 1 - g] = h);
|
|
113
|
+
} else {
|
|
114
|
+
var y = e - +this._x.call(null, m.data), b = t - +this._y.call(null, m.data), x = y * y + b * b;
|
|
115
|
+
if (x < n) {
|
|
116
|
+
var S = Math.sqrt(n = x);
|
|
117
|
+
i = e - S, a = t - S, u = e + S, d = t + S, r = m.data;
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
return r;
|
|
121
|
+
}
|
|
122
|
+
//#endregion
|
|
123
|
+
//#region node_modules/d3-quadtree/src/remove.js
|
|
124
|
+
function m(e) {
|
|
125
|
+
if (isNaN(u = +this._x.call(null, e)) || isNaN(d = +this._y.call(null, e))) return this;
|
|
126
|
+
var t, n = this._root, r, i, a, o = this._x0, s = this._y0, c = this._x1, l = this._y1, u, d, f, p, m, h, g, _;
|
|
127
|
+
if (!n) return this;
|
|
128
|
+
if (n.length) for (;;) {
|
|
129
|
+
if ((m = u >= (f = (o + c) / 2)) ? o = f : c = f, (h = d >= (p = (s + l) / 2)) ? s = p : l = p, t = n, !(n = n[g = h << 1 | m])) return this;
|
|
130
|
+
if (!n.length) break;
|
|
131
|
+
(t[g + 1 & 3] || t[g + 2 & 3] || t[g + 3 & 3]) && (r = t, _ = g);
|
|
132
|
+
}
|
|
133
|
+
for (; n.data !== e;) if (i = n, !(n = n.next)) return this;
|
|
134
|
+
return (a = n.next) && delete n.next, i ? (a ? i.next = a : delete i.next, this) : t ? (a ? t[g] = a : delete t[g], (n = t[0] || t[1] || t[2] || t[3]) && n === (t[3] || t[2] || t[1] || t[0]) && !n.length && (r ? r[_] = n : this._root = n), this) : (this._root = a, this);
|
|
135
|
+
}
|
|
136
|
+
function h(e) {
|
|
137
|
+
for (var t = 0, n = e.length; t < n; ++t) this.remove(e[t]);
|
|
138
|
+
return this;
|
|
139
|
+
}
|
|
140
|
+
//#endregion
|
|
141
|
+
//#region node_modules/d3-quadtree/src/root.js
|
|
142
|
+
function g() {
|
|
143
|
+
return this._root;
|
|
144
|
+
}
|
|
145
|
+
//#endregion
|
|
146
|
+
//#region node_modules/d3-quadtree/src/size.js
|
|
147
|
+
function _() {
|
|
148
|
+
var e = 0;
|
|
149
|
+
return this.visit(function(t) {
|
|
150
|
+
if (!t.length) do
|
|
151
|
+
++e;
|
|
152
|
+
while (t = t.next);
|
|
153
|
+
}), e;
|
|
154
|
+
}
|
|
155
|
+
//#endregion
|
|
156
|
+
//#region node_modules/d3-quadtree/src/visit.js
|
|
157
|
+
function v(e) {
|
|
158
|
+
var t = [], n, r = this._root, i, a, o, s, c;
|
|
159
|
+
for (r && t.push(new f(r, this._x0, this._y0, this._x1, this._y1)); n = t.pop();) if (!e(r = n.node, a = n.x0, o = n.y0, s = n.x1, c = n.y1) && r.length) {
|
|
160
|
+
var l = (a + s) / 2, u = (o + c) / 2;
|
|
161
|
+
(i = r[3]) && t.push(new f(i, l, u, s, c)), (i = r[2]) && t.push(new f(i, a, u, l, c)), (i = r[1]) && t.push(new f(i, l, o, s, u)), (i = r[0]) && t.push(new f(i, a, o, l, u));
|
|
162
|
+
}
|
|
163
|
+
return this;
|
|
164
|
+
}
|
|
165
|
+
//#endregion
|
|
166
|
+
//#region node_modules/d3-quadtree/src/visitAfter.js
|
|
167
|
+
function y(e) {
|
|
168
|
+
var t = [], n = [], r;
|
|
169
|
+
for (this._root && t.push(new f(this._root, this._x0, this._y0, this._x1, this._y1)); r = t.pop();) {
|
|
170
|
+
var i = r.node;
|
|
171
|
+
if (i.length) {
|
|
172
|
+
var a, o = r.x0, s = r.y0, c = r.x1, l = r.y1, u = (o + c) / 2, d = (s + l) / 2;
|
|
173
|
+
(a = i[0]) && t.push(new f(a, o, s, u, d)), (a = i[1]) && t.push(new f(a, u, s, c, d)), (a = i[2]) && t.push(new f(a, o, d, u, l)), (a = i[3]) && t.push(new f(a, u, d, c, l));
|
|
174
|
+
}
|
|
175
|
+
n.push(r);
|
|
176
|
+
}
|
|
177
|
+
for (; r = n.pop();) e(r.node, r.x0, r.y0, r.x1, r.y1);
|
|
178
|
+
return this;
|
|
179
|
+
}
|
|
180
|
+
//#endregion
|
|
181
|
+
//#region node_modules/d3-quadtree/src/x.js
|
|
182
|
+
function b(e) {
|
|
183
|
+
return e[0];
|
|
184
|
+
}
|
|
185
|
+
function x(e) {
|
|
186
|
+
return arguments.length ? (this._x = e, this) : this._x;
|
|
187
|
+
}
|
|
188
|
+
//#endregion
|
|
189
|
+
//#region node_modules/d3-quadtree/src/y.js
|
|
190
|
+
function S(e) {
|
|
191
|
+
return e[1];
|
|
192
|
+
}
|
|
193
|
+
function C(e) {
|
|
194
|
+
return arguments.length ? (this._y = e, this) : this._y;
|
|
195
|
+
}
|
|
196
|
+
//#endregion
|
|
197
|
+
//#region node_modules/d3-quadtree/src/quadtree.js
|
|
198
|
+
function w(e, t, n) {
|
|
199
|
+
var r = new T(t ?? b, n ?? S, NaN, NaN, NaN, NaN);
|
|
200
|
+
return e == null ? r : r.addAll(e);
|
|
201
|
+
}
|
|
202
|
+
function T(e, t, n, r, i, a) {
|
|
203
|
+
this._x = e, this._y = t, this._x0 = n, this._y0 = r, this._x1 = i, this._y1 = a, this._root = void 0;
|
|
204
|
+
}
|
|
205
|
+
function E(e) {
|
|
206
|
+
for (var t = { data: e.data }, n = t; e = e.next;) n = n.next = { data: e.data };
|
|
207
|
+
return t;
|
|
208
|
+
}
|
|
209
|
+
var D = w.prototype = T.prototype;
|
|
210
|
+
D.copy = function() {
|
|
211
|
+
var e = new T(this._x, this._y, this._x0, this._y0, this._x1, this._y1), t = this._root, n, r;
|
|
212
|
+
if (!t) return e;
|
|
213
|
+
if (!t.length) return e._root = E(t), e;
|
|
214
|
+
for (n = [{
|
|
215
|
+
source: t,
|
|
216
|
+
target: e._root = [
|
|
217
|
+
,
|
|
218
|
+
,
|
|
219
|
+
,
|
|
220
|
+
,
|
|
221
|
+
]
|
|
222
|
+
}]; t = n.pop();) for (var i = 0; i < 4; ++i) (r = t.source[i]) && (r.length ? n.push({
|
|
223
|
+
source: r,
|
|
224
|
+
target: t.target[i] = [
|
|
225
|
+
,
|
|
226
|
+
,
|
|
227
|
+
,
|
|
228
|
+
,
|
|
229
|
+
]
|
|
230
|
+
}) : t.target[i] = E(r));
|
|
231
|
+
return e;
|
|
232
|
+
}, D.add = o, D.addAll = c, D.cover = l, D.data = u, D.extent = d, D.find = p, D.remove = m, D.removeAll = h, D.root = g, D.size = _, D.visit = v, D.visitAfter = y, D.x = x, D.y = C;
|
|
233
|
+
//#endregion
|
|
234
|
+
//#region node_modules/d3-force/src/constant.js
|
|
235
|
+
function O(e) {
|
|
236
|
+
return function() {
|
|
237
|
+
return e;
|
|
238
|
+
};
|
|
239
|
+
}
|
|
240
|
+
//#endregion
|
|
241
|
+
//#region node_modules/d3-force/src/jiggle.js
|
|
242
|
+
function k(e) {
|
|
243
|
+
return (e() - .5) * 1e-6;
|
|
244
|
+
}
|
|
245
|
+
//#endregion
|
|
246
|
+
//#region node_modules/d3-force/src/link.js
|
|
247
|
+
function A(e) {
|
|
248
|
+
return e.index;
|
|
249
|
+
}
|
|
250
|
+
function j(e, t) {
|
|
251
|
+
var n = e.get(t);
|
|
252
|
+
if (!n) throw Error("node not found: " + t);
|
|
253
|
+
return n;
|
|
254
|
+
}
|
|
255
|
+
function M(e) {
|
|
256
|
+
var t = A, n = d, r, i = O(30), a, o, s, c, l, u = 1;
|
|
257
|
+
e ??= [];
|
|
258
|
+
function d(e) {
|
|
259
|
+
return 1 / Math.min(s[e.source.index], s[e.target.index]);
|
|
260
|
+
}
|
|
261
|
+
function f(t) {
|
|
262
|
+
for (var n = 0, i = e.length; n < u; ++n) for (var o = 0, s, d, f, p, m, h, g; o < i; ++o) s = e[o], d = s.source, f = s.target, p = f.x + f.vx - d.x - d.vx || k(l), m = f.y + f.vy - d.y - d.vy || k(l), h = Math.sqrt(p * p + m * m), h = (h - a[o]) / h * t * r[o], p *= h, m *= h, f.vx -= p * (g = c[o]), f.vy -= m * g, d.vx += p * (g = 1 - g), d.vy += m * g;
|
|
263
|
+
}
|
|
264
|
+
function p() {
|
|
265
|
+
if (o) {
|
|
266
|
+
var n, i = o.length, l = e.length, u = new Map(o.map((e, n) => [t(e, n, o), e])), d;
|
|
267
|
+
for (n = 0, s = Array(i); n < l; ++n) d = e[n], d.index = n, typeof d.source != "object" && (d.source = j(u, d.source)), typeof d.target != "object" && (d.target = j(u, d.target)), s[d.source.index] = (s[d.source.index] || 0) + 1, s[d.target.index] = (s[d.target.index] || 0) + 1;
|
|
268
|
+
for (n = 0, c = Array(l); n < l; ++n) d = e[n], c[n] = s[d.source.index] / (s[d.source.index] + s[d.target.index]);
|
|
269
|
+
r = Array(l), m(), a = Array(l), h();
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
function m() {
|
|
273
|
+
if (o) for (var t = 0, i = e.length; t < i; ++t) r[t] = +n(e[t], t, e);
|
|
274
|
+
}
|
|
275
|
+
function h() {
|
|
276
|
+
if (o) for (var t = 0, n = e.length; t < n; ++t) a[t] = +i(e[t], t, e);
|
|
277
|
+
}
|
|
278
|
+
return f.initialize = function(e, t) {
|
|
279
|
+
o = e, l = t, p();
|
|
280
|
+
}, f.links = function(t) {
|
|
281
|
+
return arguments.length ? (e = t, p(), f) : e;
|
|
282
|
+
}, f.id = function(e) {
|
|
283
|
+
return arguments.length ? (t = e, f) : t;
|
|
284
|
+
}, f.iterations = function(e) {
|
|
285
|
+
return arguments.length ? (u = +e, f) : u;
|
|
286
|
+
}, f.strength = function(e) {
|
|
287
|
+
return arguments.length ? (n = typeof e == "function" ? e : O(+e), m(), f) : n;
|
|
288
|
+
}, f.distance = function(e) {
|
|
289
|
+
return arguments.length ? (i = typeof e == "function" ? e : O(+e), h(), f) : i;
|
|
290
|
+
}, f;
|
|
291
|
+
}
|
|
292
|
+
//#endregion
|
|
293
|
+
//#region node_modules/d3-force/src/lcg.js
|
|
294
|
+
var N = 1664525, P = 1013904223, F = 4294967296;
|
|
295
|
+
function I() {
|
|
296
|
+
let e = 1;
|
|
297
|
+
return () => (e = (N * e + P) % F) / F;
|
|
298
|
+
}
|
|
299
|
+
//#endregion
|
|
300
|
+
//#region node_modules/d3-force/src/simulation.js
|
|
301
|
+
function L(e) {
|
|
302
|
+
return e.x;
|
|
303
|
+
}
|
|
304
|
+
function R(e) {
|
|
305
|
+
return e.y;
|
|
306
|
+
}
|
|
307
|
+
var z = 10, B = Math.PI * (3 - Math.sqrt(5));
|
|
308
|
+
function V(e) {
|
|
309
|
+
var r, i = 1, a = .001, o = 1 - a ** (1 / 300), s = 0, c = .6, l = /* @__PURE__ */ new Map(), u = n(p), d = t("tick", "end"), f = I();
|
|
310
|
+
e ??= [];
|
|
311
|
+
function p() {
|
|
312
|
+
m(), d.call("tick", r), i < a && (u.stop(), d.call("end", r));
|
|
313
|
+
}
|
|
314
|
+
function m(t) {
|
|
315
|
+
var n, a = e.length, u;
|
|
316
|
+
t === void 0 && (t = 1);
|
|
317
|
+
for (var d = 0; d < t; ++d) for (i += (s - i) * o, l.forEach(function(e) {
|
|
318
|
+
e(i);
|
|
319
|
+
}), n = 0; n < a; ++n) u = e[n], u.fx == null ? u.x += u.vx *= c : (u.x = u.fx, u.vx = 0), u.fy == null ? u.y += u.vy *= c : (u.y = u.fy, u.vy = 0);
|
|
320
|
+
return r;
|
|
321
|
+
}
|
|
322
|
+
function h() {
|
|
323
|
+
for (var t = 0, n = e.length, r; t < n; ++t) {
|
|
324
|
+
if (r = e[t], r.index = t, r.fx != null && (r.x = r.fx), r.fy != null && (r.y = r.fy), isNaN(r.x) || isNaN(r.y)) {
|
|
325
|
+
var i = z * Math.sqrt(.5 + t), a = t * B;
|
|
326
|
+
r.x = i * Math.cos(a), r.y = i * Math.sin(a);
|
|
327
|
+
}
|
|
328
|
+
(isNaN(r.vx) || isNaN(r.vy)) && (r.vx = r.vy = 0);
|
|
329
|
+
}
|
|
330
|
+
}
|
|
331
|
+
function g(t) {
|
|
332
|
+
return t.initialize && t.initialize(e, f), t;
|
|
333
|
+
}
|
|
334
|
+
return h(), r = {
|
|
335
|
+
tick: m,
|
|
336
|
+
restart: function() {
|
|
337
|
+
return u.restart(p), r;
|
|
338
|
+
},
|
|
339
|
+
stop: function() {
|
|
340
|
+
return u.stop(), r;
|
|
341
|
+
},
|
|
342
|
+
nodes: function(t) {
|
|
343
|
+
return arguments.length ? (e = t, h(), l.forEach(g), r) : e;
|
|
344
|
+
},
|
|
345
|
+
alpha: function(e) {
|
|
346
|
+
return arguments.length ? (i = +e, r) : i;
|
|
347
|
+
},
|
|
348
|
+
alphaMin: function(e) {
|
|
349
|
+
return arguments.length ? (a = +e, r) : a;
|
|
350
|
+
},
|
|
351
|
+
alphaDecay: function(e) {
|
|
352
|
+
return arguments.length ? (o = +e, r) : +o;
|
|
353
|
+
},
|
|
354
|
+
alphaTarget: function(e) {
|
|
355
|
+
return arguments.length ? (s = +e, r) : s;
|
|
356
|
+
},
|
|
357
|
+
velocityDecay: function(e) {
|
|
358
|
+
return arguments.length ? (c = 1 - e, r) : 1 - c;
|
|
359
|
+
},
|
|
360
|
+
randomSource: function(e) {
|
|
361
|
+
return arguments.length ? (f = e, l.forEach(g), r) : f;
|
|
362
|
+
},
|
|
363
|
+
force: function(e, t) {
|
|
364
|
+
return arguments.length > 1 ? (t == null ? l.delete(e) : l.set(e, g(t)), r) : l.get(e);
|
|
365
|
+
},
|
|
366
|
+
find: function(t, n, r) {
|
|
367
|
+
var i = 0, a = e.length, o, s, c, l, u;
|
|
368
|
+
for (r == null ? r = Infinity : r *= r, i = 0; i < a; ++i) l = e[i], o = t - l.x, s = n - l.y, c = o * o + s * s, c < r && (u = l, r = c);
|
|
369
|
+
return u;
|
|
370
|
+
},
|
|
371
|
+
on: function(e, t) {
|
|
372
|
+
return arguments.length > 1 ? (d.on(e, t), r) : d.on(e);
|
|
373
|
+
}
|
|
374
|
+
};
|
|
375
|
+
}
|
|
376
|
+
//#endregion
|
|
377
|
+
//#region node_modules/d3-force/src/manyBody.js
|
|
378
|
+
function H() {
|
|
379
|
+
var e, t, n, r, i = O(-30), a, o = 1, s = Infinity, c = .81;
|
|
380
|
+
function l(n) {
|
|
381
|
+
var i, a = e.length, o = w(e, L, R).visitAfter(d);
|
|
382
|
+
for (r = n, i = 0; i < a; ++i) t = e[i], o.visit(f);
|
|
383
|
+
}
|
|
384
|
+
function u() {
|
|
385
|
+
if (e) {
|
|
386
|
+
var t, n = e.length, r;
|
|
387
|
+
for (a = Array(n), t = 0; t < n; ++t) r = e[t], a[r.index] = +i(r, t, e);
|
|
388
|
+
}
|
|
389
|
+
}
|
|
390
|
+
function d(e) {
|
|
391
|
+
var t = 0, n, r, i = 0, o, s, c;
|
|
392
|
+
if (e.length) {
|
|
393
|
+
for (o = s = c = 0; c < 4; ++c) (n = e[c]) && (r = Math.abs(n.value)) && (t += n.value, i += r, o += r * n.x, s += r * n.y);
|
|
394
|
+
e.x = o / i, e.y = s / i;
|
|
395
|
+
} else {
|
|
396
|
+
n = e, n.x = n.data.x, n.y = n.data.y;
|
|
397
|
+
do
|
|
398
|
+
t += a[n.data.index];
|
|
399
|
+
while (n = n.next);
|
|
400
|
+
}
|
|
401
|
+
e.value = t;
|
|
402
|
+
}
|
|
403
|
+
function f(e, i, l, u) {
|
|
404
|
+
if (!e.value) return !0;
|
|
405
|
+
var d = e.x - t.x, f = e.y - t.y, p = u - i, m = d * d + f * f;
|
|
406
|
+
if (p * p / c < m) return m < s && (d === 0 && (d = k(n), m += d * d), f === 0 && (f = k(n), m += f * f), m < o && (m = Math.sqrt(o * m)), t.vx += d * e.value * r / m, t.vy += f * e.value * r / m), !0;
|
|
407
|
+
if (!(e.length || m >= s)) {
|
|
408
|
+
(e.data !== t || e.next) && (d === 0 && (d = k(n), m += d * d), f === 0 && (f = k(n), m += f * f), m < o && (m = Math.sqrt(o * m)));
|
|
409
|
+
do
|
|
410
|
+
e.data !== t && (p = a[e.data.index] * r / m, t.vx += d * p, t.vy += f * p);
|
|
411
|
+
while (e = e.next);
|
|
412
|
+
}
|
|
413
|
+
}
|
|
414
|
+
return l.initialize = function(t, r) {
|
|
415
|
+
e = t, n = r, u();
|
|
416
|
+
}, l.strength = function(e) {
|
|
417
|
+
return arguments.length ? (i = typeof e == "function" ? e : O(+e), u(), l) : i;
|
|
418
|
+
}, l.distanceMin = function(e) {
|
|
419
|
+
return arguments.length ? (o = e * e, l) : Math.sqrt(o);
|
|
420
|
+
}, l.distanceMax = function(e) {
|
|
421
|
+
return arguments.length ? (s = e * e, l) : Math.sqrt(s);
|
|
422
|
+
}, l.theta = function(e) {
|
|
423
|
+
return arguments.length ? (c = e * e, l) : Math.sqrt(c);
|
|
424
|
+
}, l;
|
|
425
|
+
}
|
|
426
|
+
//#endregion
|
|
427
|
+
//#region src/networkDiagram.ts
|
|
428
|
+
var U = -300, W = 100, G = 640, K = 480, q = 180, J = 20, Y = 22, X = {
|
|
429
|
+
linkStroke: "#9ca3af",
|
|
430
|
+
nodeFill: "#2563eb",
|
|
431
|
+
nodeFillHovered: "#3b82f6",
|
|
432
|
+
nodeFillSelected: "#f59e0b",
|
|
433
|
+
nodeStroke: "#1e40af",
|
|
434
|
+
nodeStrokeHovered: "#1d4ed8",
|
|
435
|
+
nodeStrokeSelected: "#b45309",
|
|
436
|
+
nodeText: "#ffffff"
|
|
437
|
+
};
|
|
438
|
+
function Z(t, n, o = {}) {
|
|
439
|
+
let s = n.clientWidth || G, c = n.clientHeight || K, l = t.nodes.map((e) => ({ ...e })), u = t.links.map((e) => ({ ...e })), d = Math.min(s, c) * .22;
|
|
440
|
+
for (let [e, t] of l.entries()) {
|
|
441
|
+
let n = e / l.length * Math.PI * 2;
|
|
442
|
+
t.x = s / 2 + Math.cos(n) * d, t.y = c / 2 + Math.sin(n) * d;
|
|
443
|
+
}
|
|
444
|
+
let f = V(l).force("link", M(u).id((e) => e.id).distance(o.linkDistance ?? W)).force("charge", H().strength(o.chargeStrength ?? U)).force("center", a(s / 2, c / 2)), p = e(n).append("svg").attr("width", s).attr("height", c).attr("viewBox", `0 0 ${String(s)} ${String(c)}`).style("touch-action", "none"), m = p.append("g"), h = m.selectAll("line").data(u).join("line").attr("stroke", X.linkStroke).attr("stroke-width", 2), g = m.selectAll("g").data(l).join("g").style("cursor", "pointer");
|
|
445
|
+
g.append("circle").attr("r", J).attr("fill", X.nodeFill).attr("stroke", X.nodeStroke).attr("stroke-width", 2), g.append("text").text((e) => e.id).attr("text-anchor", "middle").attr("dy", 4).attr("fill", X.nodeText);
|
|
446
|
+
let _ = null, v = null, y = () => {
|
|
447
|
+
g.selectAll("circle").attr("fill", (e) => e.id === _ ? X.nodeFillSelected : e.id === v ? X.nodeFillHovered : X.nodeFill).attr("stroke", (e) => e.id === _ ? X.nodeStrokeSelected : e.id === v ? X.nodeStrokeHovered : X.nodeStroke).attr("stroke-width", (e) => e.id === _ ? 3 : 2).attr("r", (e) => e.id === _ || e.id === v ? Y : J);
|
|
448
|
+
};
|
|
449
|
+
g.on("mouseenter", (e, t) => {
|
|
450
|
+
v = t.id, y();
|
|
451
|
+
}).on("mouseleave", (e, t) => {
|
|
452
|
+
v === t.id && (v = null), y();
|
|
453
|
+
}).on("click", (e, t) => {
|
|
454
|
+
e.stopPropagation(), _ = _ === t.id ? null : t.id, y();
|
|
455
|
+
}), p.on("click", () => {
|
|
456
|
+
_ = null, y();
|
|
457
|
+
});
|
|
458
|
+
let b = i().scaleExtent([.5, 4]).on("zoom", (e) => {
|
|
459
|
+
m.attr("transform", e.transform.toString());
|
|
460
|
+
});
|
|
461
|
+
p.call(b).on("dblclick.zoom", null);
|
|
462
|
+
let x = (e, t) => typeof e == "object" ? e[t] ?? 0 : 0, S = () => {
|
|
463
|
+
h.attr("x1", (e) => x(e.source, "x")).attr("y1", (e) => x(e.source, "y")).attr("x2", (e) => x(e.target, "x")).attr("y2", (e) => x(e.target, "y")), g.attr("transform", (e) => `translate(${String(e.x ?? 0)},${String(e.y ?? 0)})`);
|
|
464
|
+
};
|
|
465
|
+
f.stop(), g.call(r().on("start", (e, t) => {
|
|
466
|
+
e.sourceEvent?.stopPropagation(), t.fx = t.x, t.fy = t.y;
|
|
467
|
+
}).on("drag", (e, t) => {
|
|
468
|
+
t.x = e.x, t.y = e.y, t.fx = e.x, t.fy = e.y, S();
|
|
469
|
+
}).on("end", (e, t) => {
|
|
470
|
+
t.fx = null, t.fy = null;
|
|
471
|
+
})), S();
|
|
472
|
+
let C = p.node();
|
|
473
|
+
if (C == null) throw Error("Failed to create network diagram SVG element.");
|
|
474
|
+
return {
|
|
475
|
+
destroy: () => {
|
|
476
|
+
f.stop(), p.remove();
|
|
477
|
+
},
|
|
478
|
+
resize: () => {
|
|
479
|
+
let e = n.clientWidth || G, t = n.clientHeight || K;
|
|
480
|
+
p.attr("width", e).attr("height", t).attr("viewBox", `0 0 ${String(e)} ${String(t)}`), f.force("center", a(e / 2, t / 2));
|
|
481
|
+
},
|
|
482
|
+
svg: C,
|
|
483
|
+
triggerAutoLayout: () => {
|
|
484
|
+
f.alpha(1);
|
|
485
|
+
for (let e = 0; e < q; e += 1) f.tick();
|
|
486
|
+
f.stop(), S();
|
|
487
|
+
}
|
|
488
|
+
};
|
|
489
|
+
}
|
|
490
|
+
//#endregion
|
|
491
|
+
export { Z as renderNetworkDiagram };
|
|
492
|
+
|
|
493
|
+
//# sourceMappingURL=networkDiagram-QWVy8iRy.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"networkDiagram-QWVy8iRy.js","names":["Quad","Quad","Quad","tree_add","tree_addAll","tree_cover","tree_data","tree_extent","tree_find","tree_remove","tree_removeAll","tree_root","tree_size","tree_visit","tree_visitAfter","tree_x","tree_y","constant","jiggle","lcg","constant","jiggle"],"sources":["../node_modules/d3-force/src/center.js","../node_modules/d3-quadtree/src/add.js","../node_modules/d3-quadtree/src/cover.js","../node_modules/d3-quadtree/src/data.js","../node_modules/d3-quadtree/src/extent.js","../node_modules/d3-quadtree/src/quad.js","../node_modules/d3-quadtree/src/find.js","../node_modules/d3-quadtree/src/remove.js","../node_modules/d3-quadtree/src/root.js","../node_modules/d3-quadtree/src/size.js","../node_modules/d3-quadtree/src/visit.js","../node_modules/d3-quadtree/src/visitAfter.js","../node_modules/d3-quadtree/src/x.js","../node_modules/d3-quadtree/src/y.js","../node_modules/d3-quadtree/src/quadtree.js","../node_modules/d3-force/src/constant.js","../node_modules/d3-force/src/jiggle.js","../node_modules/d3-force/src/link.js","../node_modules/d3-force/src/lcg.js","../node_modules/d3-force/src/simulation.js","../node_modules/d3-force/src/manyBody.js","../src/networkDiagram.ts"],"sourcesContent":["export default function(x, y) {\n var nodes, strength = 1;\n\n if (x == null) x = 0;\n if (y == null) y = 0;\n\n function force() {\n var i,\n n = nodes.length,\n node,\n sx = 0,\n sy = 0;\n\n for (i = 0; i < n; ++i) {\n node = nodes[i], sx += node.x, sy += node.y;\n }\n\n for (sx = (sx / n - x) * strength, sy = (sy / n - y) * strength, i = 0; i < n; ++i) {\n node = nodes[i], node.x -= sx, node.y -= sy;\n }\n }\n\n force.initialize = function(_) {\n nodes = _;\n };\n\n force.x = function(_) {\n return arguments.length ? (x = +_, force) : x;\n };\n\n force.y = function(_) {\n return arguments.length ? (y = +_, force) : y;\n };\n\n force.strength = function(_) {\n return arguments.length ? (strength = +_, force) : strength;\n };\n\n return force;\n}\n","export default function(d) {\n const x = +this._x.call(null, d),\n y = +this._y.call(null, d);\n return add(this.cover(x, y), x, y, d);\n}\n\nfunction add(tree, x, y, d) {\n if (isNaN(x) || isNaN(y)) return tree; // ignore invalid points\n\n var parent,\n node = tree._root,\n leaf = {data: d},\n x0 = tree._x0,\n y0 = tree._y0,\n x1 = tree._x1,\n y1 = tree._y1,\n xm,\n ym,\n xp,\n yp,\n right,\n bottom,\n i,\n j;\n\n // If the tree is empty, initialize the root as a leaf.\n if (!node) return tree._root = leaf, tree;\n\n // Find the existing leaf for the new point, or add it.\n while (node.length) {\n if (right = x >= (xm = (x0 + x1) / 2)) x0 = xm; else x1 = xm;\n if (bottom = y >= (ym = (y0 + y1) / 2)) y0 = ym; else y1 = ym;\n if (parent = node, !(node = node[i = bottom << 1 | right])) return parent[i] = leaf, tree;\n }\n\n // Is the new point is exactly coincident with the existing point?\n xp = +tree._x.call(null, node.data);\n yp = +tree._y.call(null, node.data);\n if (x === xp && y === yp) return leaf.next = node, parent ? parent[i] = leaf : tree._root = leaf, tree;\n\n // Otherwise, split the leaf node until the old and new point are separated.\n do {\n parent = parent ? parent[i] = new Array(4) : tree._root = new Array(4);\n if (right = x >= (xm = (x0 + x1) / 2)) x0 = xm; else x1 = xm;\n if (bottom = y >= (ym = (y0 + y1) / 2)) y0 = ym; else y1 = ym;\n } while ((i = bottom << 1 | right) === (j = (yp >= ym) << 1 | (xp >= xm)));\n return parent[j] = node, parent[i] = leaf, tree;\n}\n\nexport function addAll(data) {\n var d, i, n = data.length,\n x,\n y,\n xz = new Array(n),\n yz = new Array(n),\n x0 = Infinity,\n y0 = Infinity,\n x1 = -Infinity,\n y1 = -Infinity;\n\n // Compute the points and their extent.\n for (i = 0; i < n; ++i) {\n if (isNaN(x = +this._x.call(null, d = data[i])) || isNaN(y = +this._y.call(null, d))) continue;\n xz[i] = x;\n yz[i] = y;\n if (x < x0) x0 = x;\n if (x > x1) x1 = x;\n if (y < y0) y0 = y;\n if (y > y1) y1 = y;\n }\n\n // If there were no (valid) points, abort.\n if (x0 > x1 || y0 > y1) return this;\n\n // Expand the tree to cover the new points.\n this.cover(x0, y0).cover(x1, y1);\n\n // Add the new points.\n for (i = 0; i < n; ++i) {\n add(this, xz[i], yz[i], data[i]);\n }\n\n return this;\n}\n","export default function(x, y) {\n if (isNaN(x = +x) || isNaN(y = +y)) return this; // ignore invalid points\n\n var x0 = this._x0,\n y0 = this._y0,\n x1 = this._x1,\n y1 = this._y1;\n\n // If the quadtree has no extent, initialize them.\n // Integer extent are necessary so that if we later double the extent,\n // the existing quadrant boundaries don’t change due to floating point error!\n if (isNaN(x0)) {\n x1 = (x0 = Math.floor(x)) + 1;\n y1 = (y0 = Math.floor(y)) + 1;\n }\n\n // Otherwise, double repeatedly to cover.\n else {\n var z = x1 - x0 || 1,\n node = this._root,\n parent,\n i;\n\n while (x0 > x || x >= x1 || y0 > y || y >= y1) {\n i = (y < y0) << 1 | (x < x0);\n parent = new Array(4), parent[i] = node, node = parent, z *= 2;\n switch (i) {\n case 0: x1 = x0 + z, y1 = y0 + z; break;\n case 1: x0 = x1 - z, y1 = y0 + z; break;\n case 2: x1 = x0 + z, y0 = y1 - z; break;\n case 3: x0 = x1 - z, y0 = y1 - z; break;\n }\n }\n\n if (this._root && this._root.length) this._root = node;\n }\n\n this._x0 = x0;\n this._y0 = y0;\n this._x1 = x1;\n this._y1 = y1;\n return this;\n}\n","export default function() {\n var data = [];\n this.visit(function(node) {\n if (!node.length) do data.push(node.data); while (node = node.next)\n });\n return data;\n}\n","export default function(_) {\n return arguments.length\n ? this.cover(+_[0][0], +_[0][1]).cover(+_[1][0], +_[1][1])\n : isNaN(this._x0) ? undefined : [[this._x0, this._y0], [this._x1, this._y1]];\n}\n","export default function(node, x0, y0, x1, y1) {\n this.node = node;\n this.x0 = x0;\n this.y0 = y0;\n this.x1 = x1;\n this.y1 = y1;\n}\n","import Quad from \"./quad.js\";\n\nexport default function(x, y, radius) {\n var data,\n x0 = this._x0,\n y0 = this._y0,\n x1,\n y1,\n x2,\n y2,\n x3 = this._x1,\n y3 = this._y1,\n quads = [],\n node = this._root,\n q,\n i;\n\n if (node) quads.push(new Quad(node, x0, y0, x3, y3));\n if (radius == null) radius = Infinity;\n else {\n x0 = x - radius, y0 = y - radius;\n x3 = x + radius, y3 = y + radius;\n radius *= radius;\n }\n\n while (q = quads.pop()) {\n\n // Stop searching if this quadrant can’t contain a closer node.\n if (!(node = q.node)\n || (x1 = q.x0) > x3\n || (y1 = q.y0) > y3\n || (x2 = q.x1) < x0\n || (y2 = q.y1) < y0) continue;\n\n // Bisect the current quadrant.\n if (node.length) {\n var xm = (x1 + x2) / 2,\n ym = (y1 + y2) / 2;\n\n quads.push(\n new Quad(node[3], xm, ym, x2, y2),\n new Quad(node[2], x1, ym, xm, y2),\n new Quad(node[1], xm, y1, x2, ym),\n new Quad(node[0], x1, y1, xm, ym)\n );\n\n // Visit the closest quadrant first.\n if (i = (y >= ym) << 1 | (x >= xm)) {\n q = quads[quads.length - 1];\n quads[quads.length - 1] = quads[quads.length - 1 - i];\n quads[quads.length - 1 - i] = q;\n }\n }\n\n // Visit this point. (Visiting coincident points isn’t necessary!)\n else {\n var dx = x - +this._x.call(null, node.data),\n dy = y - +this._y.call(null, node.data),\n d2 = dx * dx + dy * dy;\n if (d2 < radius) {\n var d = Math.sqrt(radius = d2);\n x0 = x - d, y0 = y - d;\n x3 = x + d, y3 = y + d;\n data = node.data;\n }\n }\n }\n\n return data;\n}\n","export default function(d) {\n if (isNaN(x = +this._x.call(null, d)) || isNaN(y = +this._y.call(null, d))) return this; // ignore invalid points\n\n var parent,\n node = this._root,\n retainer,\n previous,\n next,\n x0 = this._x0,\n y0 = this._y0,\n x1 = this._x1,\n y1 = this._y1,\n x,\n y,\n xm,\n ym,\n right,\n bottom,\n i,\n j;\n\n // If the tree is empty, initialize the root as a leaf.\n if (!node) return this;\n\n // Find the leaf node for the point.\n // While descending, also retain the deepest parent with a non-removed sibling.\n if (node.length) while (true) {\n if (right = x >= (xm = (x0 + x1) / 2)) x0 = xm; else x1 = xm;\n if (bottom = y >= (ym = (y0 + y1) / 2)) y0 = ym; else y1 = ym;\n if (!(parent = node, node = node[i = bottom << 1 | right])) return this;\n if (!node.length) break;\n if (parent[(i + 1) & 3] || parent[(i + 2) & 3] || parent[(i + 3) & 3]) retainer = parent, j = i;\n }\n\n // Find the point to remove.\n while (node.data !== d) if (!(previous = node, node = node.next)) return this;\n if (next = node.next) delete node.next;\n\n // If there are multiple coincident points, remove just the point.\n if (previous) return (next ? previous.next = next : delete previous.next), this;\n\n // If this is the root point, remove it.\n if (!parent) return this._root = next, this;\n\n // Remove this leaf.\n next ? parent[i] = next : delete parent[i];\n\n // If the parent now contains exactly one leaf, collapse superfluous parents.\n if ((node = parent[0] || parent[1] || parent[2] || parent[3])\n && node === (parent[3] || parent[2] || parent[1] || parent[0])\n && !node.length) {\n if (retainer) retainer[j] = node;\n else this._root = node;\n }\n\n return this;\n}\n\nexport function removeAll(data) {\n for (var i = 0, n = data.length; i < n; ++i) this.remove(data[i]);\n return this;\n}\n","export default function() {\n return this._root;\n}\n","export default function() {\n var size = 0;\n this.visit(function(node) {\n if (!node.length) do ++size; while (node = node.next)\n });\n return size;\n}\n","import Quad from \"./quad.js\";\n\nexport default function(callback) {\n var quads = [], q, node = this._root, child, x0, y0, x1, y1;\n if (node) quads.push(new Quad(node, this._x0, this._y0, this._x1, this._y1));\n while (q = quads.pop()) {\n if (!callback(node = q.node, x0 = q.x0, y0 = q.y0, x1 = q.x1, y1 = q.y1) && node.length) {\n var xm = (x0 + x1) / 2, ym = (y0 + y1) / 2;\n if (child = node[3]) quads.push(new Quad(child, xm, ym, x1, y1));\n if (child = node[2]) quads.push(new Quad(child, x0, ym, xm, y1));\n if (child = node[1]) quads.push(new Quad(child, xm, y0, x1, ym));\n if (child = node[0]) quads.push(new Quad(child, x0, y0, xm, ym));\n }\n }\n return this;\n}\n","import Quad from \"./quad.js\";\n\nexport default function(callback) {\n var quads = [], next = [], q;\n if (this._root) quads.push(new Quad(this._root, this._x0, this._y0, this._x1, this._y1));\n while (q = quads.pop()) {\n var node = q.node;\n if (node.length) {\n var child, x0 = q.x0, y0 = q.y0, x1 = q.x1, y1 = q.y1, xm = (x0 + x1) / 2, ym = (y0 + y1) / 2;\n if (child = node[0]) quads.push(new Quad(child, x0, y0, xm, ym));\n if (child = node[1]) quads.push(new Quad(child, xm, y0, x1, ym));\n if (child = node[2]) quads.push(new Quad(child, x0, ym, xm, y1));\n if (child = node[3]) quads.push(new Quad(child, xm, ym, x1, y1));\n }\n next.push(q);\n }\n while (q = next.pop()) {\n callback(q.node, q.x0, q.y0, q.x1, q.y1);\n }\n return this;\n}\n","export function defaultX(d) {\n return d[0];\n}\n\nexport default function(_) {\n return arguments.length ? (this._x = _, this) : this._x;\n}\n","export function defaultY(d) {\n return d[1];\n}\n\nexport default function(_) {\n return arguments.length ? (this._y = _, this) : this._y;\n}\n","import tree_add, {addAll as tree_addAll} from \"./add.js\";\nimport tree_cover from \"./cover.js\";\nimport tree_data from \"./data.js\";\nimport tree_extent from \"./extent.js\";\nimport tree_find from \"./find.js\";\nimport tree_remove, {removeAll as tree_removeAll} from \"./remove.js\";\nimport tree_root from \"./root.js\";\nimport tree_size from \"./size.js\";\nimport tree_visit from \"./visit.js\";\nimport tree_visitAfter from \"./visitAfter.js\";\nimport tree_x, {defaultX} from \"./x.js\";\nimport tree_y, {defaultY} from \"./y.js\";\n\nexport default function quadtree(nodes, x, y) {\n var tree = new Quadtree(x == null ? defaultX : x, y == null ? defaultY : y, NaN, NaN, NaN, NaN);\n return nodes == null ? tree : tree.addAll(nodes);\n}\n\nfunction Quadtree(x, y, x0, y0, x1, y1) {\n this._x = x;\n this._y = y;\n this._x0 = x0;\n this._y0 = y0;\n this._x1 = x1;\n this._y1 = y1;\n this._root = undefined;\n}\n\nfunction leaf_copy(leaf) {\n var copy = {data: leaf.data}, next = copy;\n while (leaf = leaf.next) next = next.next = {data: leaf.data};\n return copy;\n}\n\nvar treeProto = quadtree.prototype = Quadtree.prototype;\n\ntreeProto.copy = function() {\n var copy = new Quadtree(this._x, this._y, this._x0, this._y0, this._x1, this._y1),\n node = this._root,\n nodes,\n child;\n\n if (!node) return copy;\n\n if (!node.length) return copy._root = leaf_copy(node), copy;\n\n nodes = [{source: node, target: copy._root = new Array(4)}];\n while (node = nodes.pop()) {\n for (var i = 0; i < 4; ++i) {\n if (child = node.source[i]) {\n if (child.length) nodes.push({source: child, target: node.target[i] = new Array(4)});\n else node.target[i] = leaf_copy(child);\n }\n }\n }\n\n return copy;\n};\n\ntreeProto.add = tree_add;\ntreeProto.addAll = tree_addAll;\ntreeProto.cover = tree_cover;\ntreeProto.data = tree_data;\ntreeProto.extent = tree_extent;\ntreeProto.find = tree_find;\ntreeProto.remove = tree_remove;\ntreeProto.removeAll = tree_removeAll;\ntreeProto.root = tree_root;\ntreeProto.size = tree_size;\ntreeProto.visit = tree_visit;\ntreeProto.visitAfter = tree_visitAfter;\ntreeProto.x = tree_x;\ntreeProto.y = tree_y;\n","export default function(x) {\n return function() {\n return x;\n };\n}\n","export default function(random) {\n return (random() - 0.5) * 1e-6;\n}\n","import constant from \"./constant.js\";\nimport jiggle from \"./jiggle.js\";\n\nfunction index(d) {\n return d.index;\n}\n\nfunction find(nodeById, nodeId) {\n var node = nodeById.get(nodeId);\n if (!node) throw new Error(\"node not found: \" + nodeId);\n return node;\n}\n\nexport default function(links) {\n var id = index,\n strength = defaultStrength,\n strengths,\n distance = constant(30),\n distances,\n nodes,\n count,\n bias,\n random,\n iterations = 1;\n\n if (links == null) links = [];\n\n function defaultStrength(link) {\n return 1 / Math.min(count[link.source.index], count[link.target.index]);\n }\n\n function force(alpha) {\n for (var k = 0, n = links.length; k < iterations; ++k) {\n for (var i = 0, link, source, target, x, y, l, b; i < n; ++i) {\n link = links[i], source = link.source, target = link.target;\n x = target.x + target.vx - source.x - source.vx || jiggle(random);\n y = target.y + target.vy - source.y - source.vy || jiggle(random);\n l = Math.sqrt(x * x + y * y);\n l = (l - distances[i]) / l * alpha * strengths[i];\n x *= l, y *= l;\n target.vx -= x * (b = bias[i]);\n target.vy -= y * b;\n source.vx += x * (b = 1 - b);\n source.vy += y * b;\n }\n }\n }\n\n function initialize() {\n if (!nodes) return;\n\n var i,\n n = nodes.length,\n m = links.length,\n nodeById = new Map(nodes.map((d, i) => [id(d, i, nodes), d])),\n link;\n\n for (i = 0, count = new Array(n); i < m; ++i) {\n link = links[i], link.index = i;\n if (typeof link.source !== \"object\") link.source = find(nodeById, link.source);\n if (typeof link.target !== \"object\") link.target = find(nodeById, link.target);\n count[link.source.index] = (count[link.source.index] || 0) + 1;\n count[link.target.index] = (count[link.target.index] || 0) + 1;\n }\n\n for (i = 0, bias = new Array(m); i < m; ++i) {\n link = links[i], bias[i] = count[link.source.index] / (count[link.source.index] + count[link.target.index]);\n }\n\n strengths = new Array(m), initializeStrength();\n distances = new Array(m), initializeDistance();\n }\n\n function initializeStrength() {\n if (!nodes) return;\n\n for (var i = 0, n = links.length; i < n; ++i) {\n strengths[i] = +strength(links[i], i, links);\n }\n }\n\n function initializeDistance() {\n if (!nodes) return;\n\n for (var i = 0, n = links.length; i < n; ++i) {\n distances[i] = +distance(links[i], i, links);\n }\n }\n\n force.initialize = function(_nodes, _random) {\n nodes = _nodes;\n random = _random;\n initialize();\n };\n\n force.links = function(_) {\n return arguments.length ? (links = _, initialize(), force) : links;\n };\n\n force.id = function(_) {\n return arguments.length ? (id = _, force) : id;\n };\n\n force.iterations = function(_) {\n return arguments.length ? (iterations = +_, force) : iterations;\n };\n\n force.strength = function(_) {\n return arguments.length ? (strength = typeof _ === \"function\" ? _ : constant(+_), initializeStrength(), force) : strength;\n };\n\n force.distance = function(_) {\n return arguments.length ? (distance = typeof _ === \"function\" ? _ : constant(+_), initializeDistance(), force) : distance;\n };\n\n return force;\n}\n","// https://en.wikipedia.org/wiki/Linear_congruential_generator#Parameters_in_common_use\nconst a = 1664525;\nconst c = 1013904223;\nconst m = 4294967296; // 2^32\n\nexport default function() {\n let s = 1;\n return () => (s = (a * s + c) % m) / m;\n}\n","import {dispatch} from \"d3-dispatch\";\nimport {timer} from \"d3-timer\";\nimport lcg from \"./lcg.js\";\n\nexport function x(d) {\n return d.x;\n}\n\nexport function y(d) {\n return d.y;\n}\n\nvar initialRadius = 10,\n initialAngle = Math.PI * (3 - Math.sqrt(5));\n\nexport default function(nodes) {\n var simulation,\n alpha = 1,\n alphaMin = 0.001,\n alphaDecay = 1 - Math.pow(alphaMin, 1 / 300),\n alphaTarget = 0,\n velocityDecay = 0.6,\n forces = new Map(),\n stepper = timer(step),\n event = dispatch(\"tick\", \"end\"),\n random = lcg();\n\n if (nodes == null) nodes = [];\n\n function step() {\n tick();\n event.call(\"tick\", simulation);\n if (alpha < alphaMin) {\n stepper.stop();\n event.call(\"end\", simulation);\n }\n }\n\n function tick(iterations) {\n var i, n = nodes.length, node;\n\n if (iterations === undefined) iterations = 1;\n\n for (var k = 0; k < iterations; ++k) {\n alpha += (alphaTarget - alpha) * alphaDecay;\n\n forces.forEach(function(force) {\n force(alpha);\n });\n\n for (i = 0; i < n; ++i) {\n node = nodes[i];\n if (node.fx == null) node.x += node.vx *= velocityDecay;\n else node.x = node.fx, node.vx = 0;\n if (node.fy == null) node.y += node.vy *= velocityDecay;\n else node.y = node.fy, node.vy = 0;\n }\n }\n\n return simulation;\n }\n\n function initializeNodes() {\n for (var i = 0, n = nodes.length, node; i < n; ++i) {\n node = nodes[i], node.index = i;\n if (node.fx != null) node.x = node.fx;\n if (node.fy != null) node.y = node.fy;\n if (isNaN(node.x) || isNaN(node.y)) {\n var radius = initialRadius * Math.sqrt(0.5 + i), angle = i * initialAngle;\n node.x = radius * Math.cos(angle);\n node.y = radius * Math.sin(angle);\n }\n if (isNaN(node.vx) || isNaN(node.vy)) {\n node.vx = node.vy = 0;\n }\n }\n }\n\n function initializeForce(force) {\n if (force.initialize) force.initialize(nodes, random);\n return force;\n }\n\n initializeNodes();\n\n return simulation = {\n tick: tick,\n\n restart: function() {\n return stepper.restart(step), simulation;\n },\n\n stop: function() {\n return stepper.stop(), simulation;\n },\n\n nodes: function(_) {\n return arguments.length ? (nodes = _, initializeNodes(), forces.forEach(initializeForce), simulation) : nodes;\n },\n\n alpha: function(_) {\n return arguments.length ? (alpha = +_, simulation) : alpha;\n },\n\n alphaMin: function(_) {\n return arguments.length ? (alphaMin = +_, simulation) : alphaMin;\n },\n\n alphaDecay: function(_) {\n return arguments.length ? (alphaDecay = +_, simulation) : +alphaDecay;\n },\n\n alphaTarget: function(_) {\n return arguments.length ? (alphaTarget = +_, simulation) : alphaTarget;\n },\n\n velocityDecay: function(_) {\n return arguments.length ? (velocityDecay = 1 - _, simulation) : 1 - velocityDecay;\n },\n\n randomSource: function(_) {\n return arguments.length ? (random = _, forces.forEach(initializeForce), simulation) : random;\n },\n\n force: function(name, _) {\n return arguments.length > 1 ? ((_ == null ? forces.delete(name) : forces.set(name, initializeForce(_))), simulation) : forces.get(name);\n },\n\n find: function(x, y, radius) {\n var i = 0,\n n = nodes.length,\n dx,\n dy,\n d2,\n node,\n closest;\n\n if (radius == null) radius = Infinity;\n else radius *= radius;\n\n for (i = 0; i < n; ++i) {\n node = nodes[i];\n dx = x - node.x;\n dy = y - node.y;\n d2 = dx * dx + dy * dy;\n if (d2 < radius) closest = node, radius = d2;\n }\n\n return closest;\n },\n\n on: function(name, _) {\n return arguments.length > 1 ? (event.on(name, _), simulation) : event.on(name);\n }\n };\n}\n","import {quadtree} from \"d3-quadtree\";\nimport constant from \"./constant.js\";\nimport jiggle from \"./jiggle.js\";\nimport {x, y} from \"./simulation.js\";\n\nexport default function() {\n var nodes,\n node,\n random,\n alpha,\n strength = constant(-30),\n strengths,\n distanceMin2 = 1,\n distanceMax2 = Infinity,\n theta2 = 0.81;\n\n function force(_) {\n var i, n = nodes.length, tree = quadtree(nodes, x, y).visitAfter(accumulate);\n for (alpha = _, i = 0; i < n; ++i) node = nodes[i], tree.visit(apply);\n }\n\n function initialize() {\n if (!nodes) return;\n var i, n = nodes.length, node;\n strengths = new Array(n);\n for (i = 0; i < n; ++i) node = nodes[i], strengths[node.index] = +strength(node, i, nodes);\n }\n\n function accumulate(quad) {\n var strength = 0, q, c, weight = 0, x, y, i;\n\n // For internal nodes, accumulate forces from child quadrants.\n if (quad.length) {\n for (x = y = i = 0; i < 4; ++i) {\n if ((q = quad[i]) && (c = Math.abs(q.value))) {\n strength += q.value, weight += c, x += c * q.x, y += c * q.y;\n }\n }\n quad.x = x / weight;\n quad.y = y / weight;\n }\n\n // For leaf nodes, accumulate forces from coincident quadrants.\n else {\n q = quad;\n q.x = q.data.x;\n q.y = q.data.y;\n do strength += strengths[q.data.index];\n while (q = q.next);\n }\n\n quad.value = strength;\n }\n\n function apply(quad, x1, _, x2) {\n if (!quad.value) return true;\n\n var x = quad.x - node.x,\n y = quad.y - node.y,\n w = x2 - x1,\n l = x * x + y * y;\n\n // Apply the Barnes-Hut approximation if possible.\n // Limit forces for very close nodes; randomize direction if coincident.\n if (w * w / theta2 < l) {\n if (l < distanceMax2) {\n if (x === 0) x = jiggle(random), l += x * x;\n if (y === 0) y = jiggle(random), l += y * y;\n if (l < distanceMin2) l = Math.sqrt(distanceMin2 * l);\n node.vx += x * quad.value * alpha / l;\n node.vy += y * quad.value * alpha / l;\n }\n return true;\n }\n\n // Otherwise, process points directly.\n else if (quad.length || l >= distanceMax2) return;\n\n // Limit forces for very close nodes; randomize direction if coincident.\n if (quad.data !== node || quad.next) {\n if (x === 0) x = jiggle(random), l += x * x;\n if (y === 0) y = jiggle(random), l += y * y;\n if (l < distanceMin2) l = Math.sqrt(distanceMin2 * l);\n }\n\n do if (quad.data !== node) {\n w = strengths[quad.data.index] * alpha / l;\n node.vx += x * w;\n node.vy += y * w;\n } while (quad = quad.next);\n }\n\n force.initialize = function(_nodes, _random) {\n nodes = _nodes;\n random = _random;\n initialize();\n };\n\n force.strength = function(_) {\n return arguments.length ? (strength = typeof _ === \"function\" ? _ : constant(+_), initialize(), force) : strength;\n };\n\n force.distanceMin = function(_) {\n return arguments.length ? (distanceMin2 = _ * _, force) : Math.sqrt(distanceMin2);\n };\n\n force.distanceMax = function(_) {\n return arguments.length ? (distanceMax2 = _ * _, force) : Math.sqrt(distanceMax2);\n };\n\n force.theta = function(_) {\n return arguments.length ? (theta2 = _ * _, force) : Math.sqrt(theta2);\n };\n\n return force;\n}\n","// ── External Dependencies & Registrations\nimport { select } from 'd3-selection';\nimport { type D3DragEvent, drag } from 'd3-drag';\nimport { type D3ZoomEvent, zoom } from 'd3-zoom';\nimport { forceCenter, forceLink, forceManyBody, forceSimulation, type Simulation, type SimulationLinkDatum, type SimulationNodeDatum } from 'd3-force';\n\n// ── Types ────────────────────────────────────────────────────────────────────────────────────────────────────────────\n\nexport interface NetworkDiagramNode {\n id: string;\n}\n\nexport interface NetworkDiagramLink {\n source: string;\n target: string;\n}\n\nexport interface NetworkDiagramData {\n links: NetworkDiagramLink[];\n nodes: NetworkDiagramNode[];\n}\n\nexport interface NetworkDiagramOptions {\n chargeStrength?: number;\n linkDistance?: number;\n}\n\nexport interface NetworkDiagramHandle {\n destroy: () => void;\n resize: () => void;\n svg: SVGSVGElement;\n triggerAutoLayout: () => void;\n}\n\ntype LaidOutNode = NetworkDiagramNode & SimulationNodeDatum;\ntype LaidOutLink = SimulationLinkDatum<LaidOutNode>;\n\n// ── Constants ────────────────────────────────────────────────────────────────────────────────────────────────────────\n\nconst DEFAULT_CHARGE_STRENGTH = -300;\nconst DEFAULT_LINK_DISTANCE = 100;\nconst DEFAULT_WIDTH = 640;\nconst DEFAULT_HEIGHT = 480;\nconst AUTO_LAYOUT_TICKS = 180;\nconst NODE_RADIUS = 20;\nconst NODE_RADIUS_ACTIVE = 22;\n\nconst COLOR = {\n linkStroke: '#9ca3af',\n nodeFill: '#2563eb',\n nodeFillHovered: '#3b82f6',\n nodeFillSelected: '#f59e0b',\n nodeStroke: '#1e40af',\n nodeStrokeHovered: '#1d4ed8',\n nodeStrokeSelected: '#b45309',\n nodeText: '#ffffff'\n};\n\n// ── Actions ──────────────────────────────────────────────────────────────────────────────────────────────────────────\n\nexport function renderNetworkDiagram(data: NetworkDiagramData, renderTo: HTMLElement, options: NetworkDiagramOptions = {}): NetworkDiagramHandle {\n const width = renderTo.clientWidth || DEFAULT_WIDTH;\n const height = renderTo.clientHeight || DEFAULT_HEIGHT;\n\n const nodes: LaidOutNode[] = data.nodes.map((node) => ({ ...node }));\n const links: LaidOutLink[] = data.links.map((link) => ({ ...link }));\n\n // Set deterministic initial positions so the graph is readable before force layout runs.\n const startRadius = Math.min(width, height) * 0.22;\n for (const [index, node] of nodes.entries()) {\n const angle = (index / nodes.length) * Math.PI * 2;\n node.x = width / 2 + Math.cos(angle) * startRadius;\n node.y = height / 2 + Math.sin(angle) * startRadius;\n }\n\n const simulation: Simulation<LaidOutNode, LaidOutLink> = forceSimulation(nodes)\n .force(\n 'link',\n forceLink<LaidOutNode, LaidOutLink>(links)\n .id((node) => node.id)\n .distance(options.linkDistance ?? DEFAULT_LINK_DISTANCE)\n )\n .force('charge', forceManyBody().strength(options.chargeStrength ?? DEFAULT_CHARGE_STRENGTH))\n .force('center', forceCenter(width / 2, height / 2));\n\n const svgSelection = select(renderTo)\n .append('svg')\n .attr('width', width)\n .attr('height', height)\n .attr('viewBox', `0 0 ${String(width)} ${String(height)}`)\n .style('touch-action', 'none');\n const viewport = svgSelection.append('g');\n\n const link = viewport.selectAll<SVGLineElement, LaidOutLink>('line').data(links).join('line').attr('stroke', COLOR.linkStroke).attr('stroke-width', 2);\n\n const node = viewport.selectAll<SVGGElement, LaidOutNode>('g').data(nodes).join('g').style('cursor', 'pointer');\n node.append('circle').attr('r', NODE_RADIUS).attr('fill', COLOR.nodeFill).attr('stroke', COLOR.nodeStroke).attr('stroke-width', 2);\n node.append('text')\n .text((laidOutNode) => laidOutNode.id)\n .attr('text-anchor', 'middle')\n .attr('dy', 4)\n .attr('fill', COLOR.nodeText); // explicit - iOS Safari can default to transparent\n\n let selectedNodeId: string | null = null;\n let hoveredNodeId: string | null = null;\n\n const updateNodeStyles = (): void => {\n node.selectAll<SVGCircleElement, LaidOutNode>('circle')\n .attr('fill', (laidOutNode) => {\n if (laidOutNode.id === selectedNodeId) return COLOR.nodeFillSelected;\n if (laidOutNode.id === hoveredNodeId) return COLOR.nodeFillHovered;\n return COLOR.nodeFill;\n })\n .attr('stroke', (laidOutNode) => {\n if (laidOutNode.id === selectedNodeId) return COLOR.nodeStrokeSelected;\n if (laidOutNode.id === hoveredNodeId) return COLOR.nodeStrokeHovered;\n return COLOR.nodeStroke;\n })\n .attr('stroke-width', (laidOutNode) => (laidOutNode.id === selectedNodeId ? 3 : 2))\n .attr('r', (laidOutNode) => (laidOutNode.id === selectedNodeId || laidOutNode.id === hoveredNodeId ? NODE_RADIUS_ACTIVE : NODE_RADIUS));\n };\n\n node.on('mouseenter', (_event, laidOutNode) => {\n hoveredNodeId = laidOutNode.id;\n updateNodeStyles();\n })\n .on('mouseleave', (_event, laidOutNode) => {\n if (hoveredNodeId === laidOutNode.id) hoveredNodeId = null;\n updateNodeStyles();\n })\n .on('click', (event: MouseEvent, laidOutNode) => {\n event.stopPropagation();\n selectedNodeId = selectedNodeId === laidOutNode.id ? null : laidOutNode.id;\n updateNodeStyles();\n });\n\n svgSelection.on('click', () => {\n selectedNodeId = null;\n updateNodeStyles();\n });\n\n const zoomBehavior = zoom<SVGSVGElement, unknown>()\n .scaleExtent([0.5, 4])\n .on('zoom', (event: D3ZoomEvent<SVGSVGElement, unknown>) => {\n viewport.attr('transform', event.transform.toString());\n });\n\n svgSelection.call(zoomBehavior).on('dblclick.zoom', null);\n\n const getNodePosition = (value: LaidOutNode | string | number, axis: 'x' | 'y'): number => {\n if (typeof value === 'object') return value[axis] ?? 0;\n return 0;\n };\n\n const renderGraph = (): void => {\n link.attr('x1', (laidOutLink) => getNodePosition(laidOutLink.source, 'x'))\n .attr('y1', (laidOutLink) => getNodePosition(laidOutLink.source, 'y'))\n .attr('x2', (laidOutLink) => getNodePosition(laidOutLink.target, 'x'))\n .attr('y2', (laidOutLink) => getNodePosition(laidOutLink.target, 'y'));\n node.attr('transform', (laidOutNode) => `translate(${String(laidOutNode.x ?? 0)},${String(laidOutNode.y ?? 0)})`);\n };\n\n // Keep force simulation idle by default; run it only on explicit request.\n simulation.stop();\n\n type DragEvent = D3DragEvent<SVGGElement, LaidOutNode, LaidOutNode>;\n\n node.call(\n drag<SVGGElement, LaidOutNode>()\n .on('start', (event: DragEvent, laidOutNode) => {\n (event.sourceEvent as MouseEvent | TouchEvent | undefined)?.stopPropagation();\n laidOutNode.fx = laidOutNode.x;\n laidOutNode.fy = laidOutNode.y;\n })\n .on('drag', (event: DragEvent, laidOutNode) => {\n laidOutNode.x = event.x;\n laidOutNode.y = event.y;\n laidOutNode.fx = event.x;\n laidOutNode.fy = event.y;\n renderGraph();\n })\n .on('end', (_event: DragEvent, laidOutNode) => {\n laidOutNode.fx = null;\n laidOutNode.fy = null;\n })\n );\n\n renderGraph();\n\n const svgNode = svgSelection.node();\n if (svgNode == null) throw new Error('Failed to create network diagram SVG element.');\n\n return {\n destroy: () => {\n simulation.stop();\n svgSelection.remove();\n },\n resize: () => {\n const newWidth = renderTo.clientWidth || DEFAULT_WIDTH;\n const newHeight = renderTo.clientHeight || DEFAULT_HEIGHT;\n svgSelection.attr('width', newWidth).attr('height', newHeight).attr('viewBox', `0 0 ${String(newWidth)} ${String(newHeight)}`);\n simulation.force('center', forceCenter(newWidth / 2, newHeight / 2));\n },\n svg: svgNode,\n triggerAutoLayout: () => {\n simulation.alpha(1);\n for (let step = 0; step < AUTO_LAYOUT_TICKS; step += 1) simulation.tick();\n simulation.stop();\n renderGraph();\n }\n };\n}\n"],"x_google_ignoreList":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20],"mappings":";;;;;AAAA,SAAA,EAAwB,GAAG,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