@dpuse/dpuse-tool-d3 0.0.2 → 0.0.3
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 +151 -67
- package/dist/dpuse-tool-d3.es.js +2543 -390
- package/dist/dpuse-tool-d3.es.js.map +1 -1
- package/dist/types/src/index.d.ts +7 -0
- package/dist/types/src/networkDiagram.d.ts +22 -0
- package/dist/types/tests/networkDiagram.test.d.ts +1 -0
- package/package.json +10 -4
package/dist/dpuse-tool-d3.es.js
CHANGED
|
@@ -44,7 +44,7 @@ function o(e) {
|
|
|
44
44
|
function s(e) {
|
|
45
45
|
typeof e != "function" && (e = o(e));
|
|
46
46
|
for (var t = this._groups, n = t.length, r = Array(n), i = 0; i < n; ++i) for (var a = t[i], s = a.length, c = r[i] = Array(s), l, u, d = 0; d < s; ++d) (l = a[d]) && (u = e.call(l, l.__data__, d, a)) && ("__data__" in l && (u.__data__ = l.__data__), c[d] = u);
|
|
47
|
-
return new
|
|
47
|
+
return new T(r, this._parents);
|
|
48
48
|
}
|
|
49
49
|
//#endregion
|
|
50
50
|
//#region node_modules/d3-selection/src/array.js
|
|
@@ -71,7 +71,7 @@ function d(e) {
|
|
|
71
71
|
function f(e) {
|
|
72
72
|
e = typeof e == "function" ? d(e) : u(e);
|
|
73
73
|
for (var t = this._groups, n = t.length, r = [], i = [], a = 0; a < n; ++a) for (var o = t[a], s = o.length, c, l = 0; l < s; ++l) (c = o[l]) && (r.push(e.call(c, c.__data__, l, o)), i.push(c));
|
|
74
|
-
return new
|
|
74
|
+
return new T(r, i);
|
|
75
75
|
}
|
|
76
76
|
//#endregion
|
|
77
77
|
//#region node_modules/d3-selection/src/matcher.js
|
|
@@ -115,26 +115,26 @@ function S(e) {
|
|
|
115
115
|
}
|
|
116
116
|
//#endregion
|
|
117
117
|
//#region node_modules/d3-selection/src/selection/filter.js
|
|
118
|
-
function
|
|
118
|
+
function ee(e) {
|
|
119
119
|
typeof e != "function" && (e = p(e));
|
|
120
120
|
for (var t = this._groups, n = t.length, r = Array(n), i = 0; i < n; ++i) for (var a = t[i], o = a.length, s = r[i] = [], c, l = 0; l < o; ++l) (c = a[l]) && e.call(c, c.__data__, l, a) && s.push(c);
|
|
121
|
-
return new
|
|
121
|
+
return new T(r, this._parents);
|
|
122
122
|
}
|
|
123
123
|
//#endregion
|
|
124
124
|
//#region node_modules/d3-selection/src/selection/sparse.js
|
|
125
|
-
function
|
|
125
|
+
function te(e) {
|
|
126
126
|
return Array(e.length);
|
|
127
127
|
}
|
|
128
128
|
//#endregion
|
|
129
129
|
//#region node_modules/d3-selection/src/selection/enter.js
|
|
130
|
-
function
|
|
131
|
-
return new
|
|
130
|
+
function ne() {
|
|
131
|
+
return new T(this._enter || this._groups.map(te), this._parents);
|
|
132
132
|
}
|
|
133
|
-
function
|
|
133
|
+
function C(e, t) {
|
|
134
134
|
this.ownerDocument = e.ownerDocument, this.namespaceURI = e.namespaceURI, this._next = null, this._parent = e, this.__data__ = t;
|
|
135
135
|
}
|
|
136
|
-
|
|
137
|
-
constructor:
|
|
136
|
+
C.prototype = {
|
|
137
|
+
constructor: C,
|
|
138
138
|
appendChild: function(e) {
|
|
139
139
|
return this._parent.insertBefore(e, this._next);
|
|
140
140
|
},
|
|
@@ -150,71 +150,71 @@ E.prototype = {
|
|
|
150
150
|
};
|
|
151
151
|
//#endregion
|
|
152
152
|
//#region node_modules/d3-selection/src/constant.js
|
|
153
|
-
function
|
|
153
|
+
function re(e) {
|
|
154
154
|
return function() {
|
|
155
155
|
return e;
|
|
156
156
|
};
|
|
157
157
|
}
|
|
158
158
|
//#endregion
|
|
159
159
|
//#region node_modules/d3-selection/src/selection/data.js
|
|
160
|
-
function
|
|
161
|
-
for (var o = 0, s, c = t.length, l = a.length; o < l; ++o) (s = t[o]) ? (s.__data__ = a[o], r[o] = s) : n[o] = new
|
|
160
|
+
function ie(e, t, n, r, i, a) {
|
|
161
|
+
for (var o = 0, s, c = t.length, l = a.length; o < l; ++o) (s = t[o]) ? (s.__data__ = a[o], r[o] = s) : n[o] = new C(e, a[o]);
|
|
162
162
|
for (; o < c; ++o) (s = t[o]) && (i[o] = s);
|
|
163
163
|
}
|
|
164
|
-
function
|
|
164
|
+
function ae(e, t, n, r, i, a, o) {
|
|
165
165
|
var s, c, l = /* @__PURE__ */ new Map(), u = t.length, d = a.length, f = Array(u), p;
|
|
166
166
|
for (s = 0; s < u; ++s) (c = t[s]) && (f[s] = p = o.call(c, c.__data__, s, t) + "", l.has(p) ? i[s] = c : l.set(p, c));
|
|
167
|
-
for (s = 0; s < d; ++s) p = o.call(e, a[s], s, a) + "", (c = l.get(p)) ? (r[s] = c, c.__data__ = a[s], l.delete(p)) : n[s] = new
|
|
167
|
+
for (s = 0; s < d; ++s) p = o.call(e, a[s], s, a) + "", (c = l.get(p)) ? (r[s] = c, c.__data__ = a[s], l.delete(p)) : n[s] = new C(e, a[s]);
|
|
168
168
|
for (s = 0; s < u; ++s) (c = t[s]) && l.get(f[s]) === c && (i[s] = c);
|
|
169
169
|
}
|
|
170
|
-
function
|
|
170
|
+
function oe(e) {
|
|
171
171
|
return e.__data__;
|
|
172
172
|
}
|
|
173
|
-
function
|
|
174
|
-
if (!arguments.length) return Array.from(this,
|
|
175
|
-
var n = t ?
|
|
176
|
-
typeof e != "function" && (e =
|
|
173
|
+
function se(e, t) {
|
|
174
|
+
if (!arguments.length) return Array.from(this, oe);
|
|
175
|
+
var n = t ? ae : ie, r = this._parents, i = this._groups;
|
|
176
|
+
typeof e != "function" && (e = re(e));
|
|
177
177
|
for (var a = i.length, o = Array(a), s = Array(a), c = Array(a), l = 0; l < a; ++l) {
|
|
178
|
-
var u = r[l], d = i[l], f = d.length, p =
|
|
178
|
+
var u = r[l], d = i[l], f = d.length, p = ce(e.call(u, u && u.__data__, l, r)), m = p.length, h = s[l] = Array(m), g = o[l] = Array(m);
|
|
179
179
|
n(u, d, h, g, c[l] = Array(f), p, t);
|
|
180
180
|
for (var _ = 0, v = 0, y, b; _ < m; ++_) if (y = h[_]) {
|
|
181
181
|
for (_ >= v && (v = _ + 1); !(b = g[v]) && ++v < m;);
|
|
182
182
|
y._next = b || null;
|
|
183
183
|
}
|
|
184
184
|
}
|
|
185
|
-
return o = new
|
|
185
|
+
return o = new T(o, r), o._enter = s, o._exit = c, o;
|
|
186
186
|
}
|
|
187
|
-
function
|
|
187
|
+
function ce(e) {
|
|
188
188
|
return typeof e == "object" && "length" in e ? e : Array.from(e);
|
|
189
189
|
}
|
|
190
190
|
//#endregion
|
|
191
191
|
//#region node_modules/d3-selection/src/selection/exit.js
|
|
192
|
-
function
|
|
193
|
-
return new
|
|
192
|
+
function le() {
|
|
193
|
+
return new T(this._exit || this._groups.map(te), this._parents);
|
|
194
194
|
}
|
|
195
195
|
//#endregion
|
|
196
196
|
//#region node_modules/d3-selection/src/selection/join.js
|
|
197
|
-
function
|
|
197
|
+
function ue(e, t, n) {
|
|
198
198
|
var r = this.enter(), i = this, a = this.exit();
|
|
199
199
|
return typeof e == "function" ? (r = e(r), r &&= r.selection()) : r = r.append(e + ""), t != null && (i = t(i), i &&= i.selection()), n == null ? a.remove() : n(a), r && i ? r.merge(i).order() : i;
|
|
200
200
|
}
|
|
201
201
|
//#endregion
|
|
202
202
|
//#region node_modules/d3-selection/src/selection/merge.js
|
|
203
|
-
function
|
|
203
|
+
function de(e) {
|
|
204
204
|
for (var t = e.selection ? e.selection() : e, n = this._groups, r = t._groups, i = n.length, a = r.length, o = Math.min(i, a), s = Array(i), c = 0; c < o; ++c) for (var l = n[c], u = r[c], d = l.length, f = s[c] = Array(d), p, m = 0; m < d; ++m) (p = l[m] || u[m]) && (f[m] = p);
|
|
205
205
|
for (; c < i; ++c) s[c] = n[c];
|
|
206
|
-
return new
|
|
206
|
+
return new T(s, this._parents);
|
|
207
207
|
}
|
|
208
208
|
//#endregion
|
|
209
209
|
//#region node_modules/d3-selection/src/selection/order.js
|
|
210
|
-
function
|
|
210
|
+
function fe() {
|
|
211
211
|
for (var e = this._groups, t = -1, n = e.length; ++t < n;) for (var r = e[t], i = r.length - 1, a = r[i], o; --i >= 0;) (o = r[i]) && (a && o.compareDocumentPosition(a) ^ 4 && a.parentNode.insertBefore(o, a), a = o);
|
|
212
212
|
return this;
|
|
213
213
|
}
|
|
214
214
|
//#endregion
|
|
215
215
|
//#region node_modules/d3-selection/src/selection/sort.js
|
|
216
|
-
function
|
|
217
|
-
e ||=
|
|
216
|
+
function pe(e) {
|
|
217
|
+
e ||= me;
|
|
218
218
|
function t(t, n) {
|
|
219
219
|
return t && n ? e(t.__data__, n.__data__) : !t - !n;
|
|
220
220
|
}
|
|
@@ -222,25 +222,25 @@ function ce(e) {
|
|
|
222
222
|
for (var o = n[a], s = o.length, c = i[a] = Array(s), l, u = 0; u < s; ++u) (l = o[u]) && (c[u] = l);
|
|
223
223
|
c.sort(t);
|
|
224
224
|
}
|
|
225
|
-
return new
|
|
225
|
+
return new T(i, this._parents).order();
|
|
226
226
|
}
|
|
227
|
-
function
|
|
227
|
+
function me(e, t) {
|
|
228
228
|
return e < t ? -1 : e > t ? 1 : e >= t ? 0 : NaN;
|
|
229
229
|
}
|
|
230
230
|
//#endregion
|
|
231
231
|
//#region node_modules/d3-selection/src/selection/call.js
|
|
232
|
-
function
|
|
232
|
+
function he() {
|
|
233
233
|
var e = arguments[0];
|
|
234
234
|
return arguments[0] = this, e.apply(null, arguments), this;
|
|
235
235
|
}
|
|
236
236
|
//#endregion
|
|
237
237
|
//#region node_modules/d3-selection/src/selection/nodes.js
|
|
238
|
-
function
|
|
238
|
+
function ge() {
|
|
239
239
|
return Array.from(this);
|
|
240
240
|
}
|
|
241
241
|
//#endregion
|
|
242
242
|
//#region node_modules/d3-selection/src/selection/node.js
|
|
243
|
-
function
|
|
243
|
+
function _e() {
|
|
244
244
|
for (var e = this._groups, t = 0, n = e.length; t < n; ++t) for (var r = e[t], i = 0, a = r.length; i < a; ++i) {
|
|
245
245
|
var o = r[i];
|
|
246
246
|
if (o) return o;
|
|
@@ -249,403 +249,2544 @@ function fe() {
|
|
|
249
249
|
}
|
|
250
250
|
//#endregion
|
|
251
251
|
//#region node_modules/d3-selection/src/selection/size.js
|
|
252
|
-
function
|
|
252
|
+
function ve() {
|
|
253
253
|
let e = 0;
|
|
254
254
|
for (let t of this) ++e;
|
|
255
255
|
return e;
|
|
256
256
|
}
|
|
257
257
|
//#endregion
|
|
258
258
|
//#region node_modules/d3-selection/src/selection/empty.js
|
|
259
|
-
function
|
|
259
|
+
function ye() {
|
|
260
260
|
return !this.node();
|
|
261
261
|
}
|
|
262
262
|
//#endregion
|
|
263
263
|
//#region node_modules/d3-selection/src/selection/each.js
|
|
264
|
-
function
|
|
264
|
+
function be(e) {
|
|
265
265
|
for (var t = this._groups, n = 0, r = t.length; n < r; ++n) for (var i = t[n], a = 0, o = i.length, s; a < o; ++a) (s = i[a]) && e.call(s, s.__data__, a, i);
|
|
266
266
|
return this;
|
|
267
267
|
}
|
|
268
268
|
//#endregion
|
|
269
269
|
//#region node_modules/d3-selection/src/selection/attr.js
|
|
270
|
-
function
|
|
270
|
+
function xe(e) {
|
|
271
271
|
return function() {
|
|
272
272
|
this.removeAttribute(e);
|
|
273
273
|
};
|
|
274
274
|
}
|
|
275
|
-
function
|
|
275
|
+
function Se(e) {
|
|
276
276
|
return function() {
|
|
277
277
|
this.removeAttributeNS(e.space, e.local);
|
|
278
278
|
};
|
|
279
279
|
}
|
|
280
|
-
function
|
|
280
|
+
function Ce(e, t) {
|
|
281
281
|
return function() {
|
|
282
282
|
this.setAttribute(e, t);
|
|
283
283
|
};
|
|
284
284
|
}
|
|
285
|
-
function
|
|
285
|
+
function we(e, t) {
|
|
286
286
|
return function() {
|
|
287
287
|
this.setAttributeNS(e.space, e.local, t);
|
|
288
288
|
};
|
|
289
289
|
}
|
|
290
|
-
function
|
|
290
|
+
function Te(e, t) {
|
|
291
291
|
return function() {
|
|
292
292
|
var n = t.apply(this, arguments);
|
|
293
293
|
n == null ? this.removeAttribute(e) : this.setAttribute(e, n);
|
|
294
294
|
};
|
|
295
295
|
}
|
|
296
|
-
function
|
|
296
|
+
function Ee(e, t) {
|
|
297
297
|
return function() {
|
|
298
298
|
var n = t.apply(this, arguments);
|
|
299
299
|
n == null ? this.removeAttributeNS(e.space, e.local) : this.setAttributeNS(e.space, e.local, n);
|
|
300
300
|
};
|
|
301
301
|
}
|
|
302
|
-
function
|
|
302
|
+
function De(e, n) {
|
|
303
303
|
var r = t(e);
|
|
304
304
|
if (arguments.length < 2) {
|
|
305
305
|
var i = this.node();
|
|
306
306
|
return r.local ? i.getAttributeNS(r.space, r.local) : i.getAttribute(r);
|
|
307
307
|
}
|
|
308
|
-
return this.each((n == null ? r.local ?
|
|
308
|
+
return this.each((n == null ? r.local ? Se : xe : typeof n == "function" ? r.local ? Ee : Te : r.local ? we : Ce)(r, n));
|
|
309
309
|
}
|
|
310
310
|
//#endregion
|
|
311
311
|
//#region node_modules/d3-selection/src/window.js
|
|
312
|
-
function
|
|
312
|
+
function Oe(e) {
|
|
313
313
|
return e.ownerDocument && e.ownerDocument.defaultView || e.document && e || e.defaultView;
|
|
314
314
|
}
|
|
315
315
|
//#endregion
|
|
316
316
|
//#region node_modules/d3-selection/src/selection/style.js
|
|
317
|
-
function
|
|
317
|
+
function ke(e) {
|
|
318
318
|
return function() {
|
|
319
319
|
this.style.removeProperty(e);
|
|
320
320
|
};
|
|
321
321
|
}
|
|
322
|
-
function
|
|
322
|
+
function Ae(e, t, n) {
|
|
323
323
|
return function() {
|
|
324
324
|
this.style.setProperty(e, t, n);
|
|
325
325
|
};
|
|
326
326
|
}
|
|
327
|
-
function
|
|
327
|
+
function je(e, t, n) {
|
|
328
328
|
return function() {
|
|
329
329
|
var r = t.apply(this, arguments);
|
|
330
330
|
r == null ? this.style.removeProperty(e) : this.style.setProperty(e, r, n);
|
|
331
331
|
};
|
|
332
332
|
}
|
|
333
|
-
function
|
|
334
|
-
return arguments.length > 1 ? this.each((t == null ?
|
|
333
|
+
function Me(e, t, n) {
|
|
334
|
+
return arguments.length > 1 ? this.each((t == null ? ke : typeof t == "function" ? je : Ae)(e, t, n ?? "")) : w(this.node(), e);
|
|
335
335
|
}
|
|
336
|
-
function
|
|
337
|
-
return e.style.getPropertyValue(t) ||
|
|
336
|
+
function w(e, t) {
|
|
337
|
+
return e.style.getPropertyValue(t) || Oe(e).getComputedStyle(e, null).getPropertyValue(t);
|
|
338
338
|
}
|
|
339
339
|
//#endregion
|
|
340
340
|
//#region node_modules/d3-selection/src/selection/property.js
|
|
341
|
-
function
|
|
341
|
+
function Ne(e) {
|
|
342
342
|
return function() {
|
|
343
343
|
delete this[e];
|
|
344
344
|
};
|
|
345
345
|
}
|
|
346
|
-
function
|
|
346
|
+
function Pe(e, t) {
|
|
347
347
|
return function() {
|
|
348
348
|
this[e] = t;
|
|
349
349
|
};
|
|
350
350
|
}
|
|
351
|
-
function
|
|
351
|
+
function Fe(e, t) {
|
|
352
352
|
return function() {
|
|
353
353
|
var n = t.apply(this, arguments);
|
|
354
354
|
n == null ? delete this[e] : this[e] = n;
|
|
355
355
|
};
|
|
356
356
|
}
|
|
357
|
-
function
|
|
358
|
-
return arguments.length > 1 ? this.each((t == null ?
|
|
357
|
+
function Ie(e, t) {
|
|
358
|
+
return arguments.length > 1 ? this.each((t == null ? Ne : typeof t == "function" ? Fe : Pe)(e, t)) : this.node()[e];
|
|
359
|
+
}
|
|
360
|
+
//#endregion
|
|
361
|
+
//#region node_modules/d3-selection/src/selection/classed.js
|
|
362
|
+
function Le(e) {
|
|
363
|
+
return e.trim().split(/^|\s+/);
|
|
364
|
+
}
|
|
365
|
+
function Re(e) {
|
|
366
|
+
return e.classList || new ze(e);
|
|
367
|
+
}
|
|
368
|
+
function ze(e) {
|
|
369
|
+
this._node = e, this._names = Le(e.getAttribute("class") || "");
|
|
370
|
+
}
|
|
371
|
+
ze.prototype = {
|
|
372
|
+
add: function(e) {
|
|
373
|
+
this._names.indexOf(e) < 0 && (this._names.push(e), this._node.setAttribute("class", this._names.join(" ")));
|
|
374
|
+
},
|
|
375
|
+
remove: function(e) {
|
|
376
|
+
var t = this._names.indexOf(e);
|
|
377
|
+
t >= 0 && (this._names.splice(t, 1), this._node.setAttribute("class", this._names.join(" ")));
|
|
378
|
+
},
|
|
379
|
+
contains: function(e) {
|
|
380
|
+
return this._names.indexOf(e) >= 0;
|
|
381
|
+
}
|
|
382
|
+
};
|
|
383
|
+
function Be(e, t) {
|
|
384
|
+
for (var n = Re(e), r = -1, i = t.length; ++r < i;) n.add(t[r]);
|
|
385
|
+
}
|
|
386
|
+
function Ve(e, t) {
|
|
387
|
+
for (var n = Re(e), r = -1, i = t.length; ++r < i;) n.remove(t[r]);
|
|
388
|
+
}
|
|
389
|
+
function He(e) {
|
|
390
|
+
return function() {
|
|
391
|
+
Be(this, e);
|
|
392
|
+
};
|
|
393
|
+
}
|
|
394
|
+
function Ue(e) {
|
|
395
|
+
return function() {
|
|
396
|
+
Ve(this, e);
|
|
397
|
+
};
|
|
398
|
+
}
|
|
399
|
+
function We(e, t) {
|
|
400
|
+
return function() {
|
|
401
|
+
(t.apply(this, arguments) ? Be : Ve)(this, e);
|
|
402
|
+
};
|
|
403
|
+
}
|
|
404
|
+
function Ge(e, t) {
|
|
405
|
+
var n = Le(e + "");
|
|
406
|
+
if (arguments.length < 2) {
|
|
407
|
+
for (var r = Re(this.node()), i = -1, a = n.length; ++i < a;) if (!r.contains(n[i])) return !1;
|
|
408
|
+
return !0;
|
|
409
|
+
}
|
|
410
|
+
return this.each((typeof t == "function" ? We : t ? He : Ue)(n, t));
|
|
411
|
+
}
|
|
412
|
+
//#endregion
|
|
413
|
+
//#region node_modules/d3-selection/src/selection/text.js
|
|
414
|
+
function Ke() {
|
|
415
|
+
this.textContent = "";
|
|
416
|
+
}
|
|
417
|
+
function qe(e) {
|
|
418
|
+
return function() {
|
|
419
|
+
this.textContent = e;
|
|
420
|
+
};
|
|
421
|
+
}
|
|
422
|
+
function Je(e) {
|
|
423
|
+
return function() {
|
|
424
|
+
var t = e.apply(this, arguments);
|
|
425
|
+
this.textContent = t ?? "";
|
|
426
|
+
};
|
|
427
|
+
}
|
|
428
|
+
function Ye(e) {
|
|
429
|
+
return arguments.length ? this.each(e == null ? Ke : (typeof e == "function" ? Je : qe)(e)) : this.node().textContent;
|
|
430
|
+
}
|
|
431
|
+
//#endregion
|
|
432
|
+
//#region node_modules/d3-selection/src/selection/html.js
|
|
433
|
+
function Xe() {
|
|
434
|
+
this.innerHTML = "";
|
|
435
|
+
}
|
|
436
|
+
function Ze(e) {
|
|
437
|
+
return function() {
|
|
438
|
+
this.innerHTML = e;
|
|
439
|
+
};
|
|
440
|
+
}
|
|
441
|
+
function Qe(e) {
|
|
442
|
+
return function() {
|
|
443
|
+
var t = e.apply(this, arguments);
|
|
444
|
+
this.innerHTML = t ?? "";
|
|
445
|
+
};
|
|
446
|
+
}
|
|
447
|
+
function $e(e) {
|
|
448
|
+
return arguments.length ? this.each(e == null ? Xe : (typeof e == "function" ? Qe : Ze)(e)) : this.node().innerHTML;
|
|
449
|
+
}
|
|
450
|
+
//#endregion
|
|
451
|
+
//#region node_modules/d3-selection/src/selection/raise.js
|
|
452
|
+
function et() {
|
|
453
|
+
this.nextSibling && this.parentNode.appendChild(this);
|
|
454
|
+
}
|
|
455
|
+
function tt() {
|
|
456
|
+
return this.each(et);
|
|
457
|
+
}
|
|
458
|
+
//#endregion
|
|
459
|
+
//#region node_modules/d3-selection/src/selection/lower.js
|
|
460
|
+
function nt() {
|
|
461
|
+
this.previousSibling && this.parentNode.insertBefore(this, this.parentNode.firstChild);
|
|
462
|
+
}
|
|
463
|
+
function rt() {
|
|
464
|
+
return this.each(nt);
|
|
465
|
+
}
|
|
466
|
+
//#endregion
|
|
467
|
+
//#region node_modules/d3-selection/src/selection/append.js
|
|
468
|
+
function it(e) {
|
|
469
|
+
var t = typeof e == "function" ? e : i(e);
|
|
470
|
+
return this.select(function() {
|
|
471
|
+
return this.appendChild(t.apply(this, arguments));
|
|
472
|
+
});
|
|
473
|
+
}
|
|
474
|
+
//#endregion
|
|
475
|
+
//#region node_modules/d3-selection/src/selection/insert.js
|
|
476
|
+
function at() {
|
|
477
|
+
return null;
|
|
478
|
+
}
|
|
479
|
+
function ot(e, t) {
|
|
480
|
+
var n = typeof e == "function" ? e : i(e), r = t == null ? at : typeof t == "function" ? t : o(t);
|
|
481
|
+
return this.select(function() {
|
|
482
|
+
return this.insertBefore(n.apply(this, arguments), r.apply(this, arguments) || null);
|
|
483
|
+
});
|
|
484
|
+
}
|
|
485
|
+
//#endregion
|
|
486
|
+
//#region node_modules/d3-selection/src/selection/remove.js
|
|
487
|
+
function st() {
|
|
488
|
+
var e = this.parentNode;
|
|
489
|
+
e && e.removeChild(this);
|
|
490
|
+
}
|
|
491
|
+
function ct() {
|
|
492
|
+
return this.each(st);
|
|
493
|
+
}
|
|
494
|
+
//#endregion
|
|
495
|
+
//#region node_modules/d3-selection/src/selection/clone.js
|
|
496
|
+
function lt() {
|
|
497
|
+
var e = this.cloneNode(!1), t = this.parentNode;
|
|
498
|
+
return t ? t.insertBefore(e, this.nextSibling) : e;
|
|
499
|
+
}
|
|
500
|
+
function ut() {
|
|
501
|
+
var e = this.cloneNode(!0), t = this.parentNode;
|
|
502
|
+
return t ? t.insertBefore(e, this.nextSibling) : e;
|
|
503
|
+
}
|
|
504
|
+
function dt(e) {
|
|
505
|
+
return this.select(e ? ut : lt);
|
|
506
|
+
}
|
|
507
|
+
//#endregion
|
|
508
|
+
//#region node_modules/d3-selection/src/selection/datum.js
|
|
509
|
+
function ft(e) {
|
|
510
|
+
return arguments.length ? this.property("__data__", e) : this.node().__data__;
|
|
511
|
+
}
|
|
512
|
+
//#endregion
|
|
513
|
+
//#region node_modules/d3-selection/src/selection/on.js
|
|
514
|
+
function pt(e) {
|
|
515
|
+
return function(t) {
|
|
516
|
+
e.call(this, t, this.__data__);
|
|
517
|
+
};
|
|
518
|
+
}
|
|
519
|
+
function mt(e) {
|
|
520
|
+
return e.trim().split(/^|\s+/).map(function(e) {
|
|
521
|
+
var t = "", n = e.indexOf(".");
|
|
522
|
+
return n >= 0 && (t = e.slice(n + 1), e = e.slice(0, n)), {
|
|
523
|
+
type: e,
|
|
524
|
+
name: t
|
|
525
|
+
};
|
|
526
|
+
});
|
|
527
|
+
}
|
|
528
|
+
function ht(e) {
|
|
529
|
+
return function() {
|
|
530
|
+
var t = this.__on;
|
|
531
|
+
if (t) {
|
|
532
|
+
for (var n = 0, r = -1, i = t.length, a; n < i; ++n) a = t[n], (!e.type || a.type === e.type) && a.name === e.name ? this.removeEventListener(a.type, a.listener, a.options) : t[++r] = a;
|
|
533
|
+
++r ? t.length = r : delete this.__on;
|
|
534
|
+
}
|
|
535
|
+
};
|
|
536
|
+
}
|
|
537
|
+
function gt(e, t, n) {
|
|
538
|
+
return function() {
|
|
539
|
+
var r = this.__on, i, a = pt(t);
|
|
540
|
+
if (r) {
|
|
541
|
+
for (var o = 0, s = r.length; o < s; ++o) if ((i = r[o]).type === e.type && i.name === e.name) {
|
|
542
|
+
this.removeEventListener(i.type, i.listener, i.options), this.addEventListener(i.type, i.listener = a, i.options = n), i.value = t;
|
|
543
|
+
return;
|
|
544
|
+
}
|
|
545
|
+
}
|
|
546
|
+
this.addEventListener(e.type, a, n), i = {
|
|
547
|
+
type: e.type,
|
|
548
|
+
name: e.name,
|
|
549
|
+
value: t,
|
|
550
|
+
listener: a,
|
|
551
|
+
options: n
|
|
552
|
+
}, r ? r.push(i) : this.__on = [i];
|
|
553
|
+
};
|
|
554
|
+
}
|
|
555
|
+
function _t(e, t, n) {
|
|
556
|
+
var r = mt(e + ""), i, a = r.length, o;
|
|
557
|
+
if (arguments.length < 2) {
|
|
558
|
+
var s = this.node().__on;
|
|
559
|
+
if (s) {
|
|
560
|
+
for (var c = 0, l = s.length, u; c < l; ++c) for (i = 0, u = s[c]; i < a; ++i) if ((o = r[i]).type === u.type && o.name === u.name) return u.value;
|
|
561
|
+
}
|
|
562
|
+
return;
|
|
563
|
+
}
|
|
564
|
+
for (s = t ? gt : ht, i = 0; i < a; ++i) this.each(s(r[i], t, n));
|
|
565
|
+
return this;
|
|
566
|
+
}
|
|
567
|
+
//#endregion
|
|
568
|
+
//#region node_modules/d3-selection/src/selection/dispatch.js
|
|
569
|
+
function vt(e, t, n) {
|
|
570
|
+
var r = Oe(e), i = r.CustomEvent;
|
|
571
|
+
typeof i == "function" ? i = new i(t, n) : (i = r.document.createEvent("Event"), n ? (i.initEvent(t, n.bubbles, n.cancelable), i.detail = n.detail) : i.initEvent(t, !1, !1)), e.dispatchEvent(i);
|
|
572
|
+
}
|
|
573
|
+
function yt(e, t) {
|
|
574
|
+
return function() {
|
|
575
|
+
return vt(this, e, t);
|
|
576
|
+
};
|
|
577
|
+
}
|
|
578
|
+
function bt(e, t) {
|
|
579
|
+
return function() {
|
|
580
|
+
return vt(this, e, t.apply(this, arguments));
|
|
581
|
+
};
|
|
582
|
+
}
|
|
583
|
+
function xt(e, t) {
|
|
584
|
+
return this.each((typeof t == "function" ? bt : yt)(e, t));
|
|
585
|
+
}
|
|
586
|
+
//#endregion
|
|
587
|
+
//#region node_modules/d3-selection/src/selection/iterator.js
|
|
588
|
+
function* St() {
|
|
589
|
+
for (var e = this._groups, t = 0, n = e.length; t < n; ++t) for (var r = e[t], i = 0, a = r.length, o; i < a; ++i) (o = r[i]) && (yield o);
|
|
590
|
+
}
|
|
591
|
+
//#endregion
|
|
592
|
+
//#region node_modules/d3-selection/src/selection/index.js
|
|
593
|
+
var Ct = [null];
|
|
594
|
+
function T(e, t) {
|
|
595
|
+
this._groups = e, this._parents = t;
|
|
596
|
+
}
|
|
597
|
+
function wt() {
|
|
598
|
+
return new T([[document.documentElement]], Ct);
|
|
599
|
+
}
|
|
600
|
+
function Tt() {
|
|
601
|
+
return this;
|
|
602
|
+
}
|
|
603
|
+
T.prototype = wt.prototype = {
|
|
604
|
+
constructor: T,
|
|
605
|
+
select: s,
|
|
606
|
+
selectAll: f,
|
|
607
|
+
selectChild: v,
|
|
608
|
+
selectChildren: S,
|
|
609
|
+
filter: ee,
|
|
610
|
+
data: se,
|
|
611
|
+
enter: ne,
|
|
612
|
+
exit: le,
|
|
613
|
+
join: ue,
|
|
614
|
+
merge: de,
|
|
615
|
+
selection: Tt,
|
|
616
|
+
order: fe,
|
|
617
|
+
sort: pe,
|
|
618
|
+
call: he,
|
|
619
|
+
nodes: ge,
|
|
620
|
+
node: _e,
|
|
621
|
+
size: ve,
|
|
622
|
+
empty: ye,
|
|
623
|
+
each: be,
|
|
624
|
+
attr: De,
|
|
625
|
+
style: Me,
|
|
626
|
+
property: Ie,
|
|
627
|
+
classed: Ge,
|
|
628
|
+
text: Ye,
|
|
629
|
+
html: $e,
|
|
630
|
+
raise: tt,
|
|
631
|
+
lower: rt,
|
|
632
|
+
append: it,
|
|
633
|
+
insert: ot,
|
|
634
|
+
remove: ct,
|
|
635
|
+
clone: dt,
|
|
636
|
+
datum: ft,
|
|
637
|
+
on: _t,
|
|
638
|
+
dispatch: xt,
|
|
639
|
+
[Symbol.iterator]: St
|
|
640
|
+
};
|
|
641
|
+
//#endregion
|
|
642
|
+
//#region node_modules/d3-selection/src/select.js
|
|
643
|
+
function E(e) {
|
|
644
|
+
return typeof e == "string" ? new T([[document.querySelector(e)]], [document.documentElement]) : new T([[e]], Ct);
|
|
645
|
+
}
|
|
646
|
+
//#endregion
|
|
647
|
+
//#region node_modules/d3-selection/src/sourceEvent.js
|
|
648
|
+
function Et(e) {
|
|
649
|
+
let t;
|
|
650
|
+
for (; t = e.sourceEvent;) e = t;
|
|
651
|
+
return e;
|
|
652
|
+
}
|
|
653
|
+
//#endregion
|
|
654
|
+
//#region node_modules/d3-selection/src/pointer.js
|
|
655
|
+
function D(e, t) {
|
|
656
|
+
if (e = Et(e), t === void 0 && (t = e.currentTarget), t) {
|
|
657
|
+
var n = t.ownerSVGElement || t;
|
|
658
|
+
if (n.createSVGPoint) {
|
|
659
|
+
var r = n.createSVGPoint();
|
|
660
|
+
return r.x = e.clientX, r.y = e.clientY, r = r.matrixTransform(t.getScreenCTM().inverse()), [r.x, r.y];
|
|
661
|
+
}
|
|
662
|
+
if (t.getBoundingClientRect) {
|
|
663
|
+
var i = t.getBoundingClientRect();
|
|
664
|
+
return [e.clientX - i.left - t.clientLeft, e.clientY - i.top - t.clientTop];
|
|
665
|
+
}
|
|
666
|
+
}
|
|
667
|
+
return [e.pageX, e.pageY];
|
|
668
|
+
}
|
|
669
|
+
//#endregion
|
|
670
|
+
//#region node_modules/d3-dispatch/src/dispatch.js
|
|
671
|
+
var Dt = { value: () => {} };
|
|
672
|
+
function O() {
|
|
673
|
+
for (var e = 0, t = arguments.length, n = {}, r; e < t; ++e) {
|
|
674
|
+
if (!(r = arguments[e] + "") || r in n || /[\s.]/.test(r)) throw Error("illegal type: " + r);
|
|
675
|
+
n[r] = [];
|
|
676
|
+
}
|
|
677
|
+
return new Ot(n);
|
|
678
|
+
}
|
|
679
|
+
function Ot(e) {
|
|
680
|
+
this._ = e;
|
|
681
|
+
}
|
|
682
|
+
function kt(e, t) {
|
|
683
|
+
return e.trim().split(/^|\s+/).map(function(e) {
|
|
684
|
+
var n = "", r = e.indexOf(".");
|
|
685
|
+
if (r >= 0 && (n = e.slice(r + 1), e = e.slice(0, r)), e && !t.hasOwnProperty(e)) throw Error("unknown type: " + e);
|
|
686
|
+
return {
|
|
687
|
+
type: e,
|
|
688
|
+
name: n
|
|
689
|
+
};
|
|
690
|
+
});
|
|
691
|
+
}
|
|
692
|
+
Ot.prototype = O.prototype = {
|
|
693
|
+
constructor: Ot,
|
|
694
|
+
on: function(e, t) {
|
|
695
|
+
var n = this._, r = kt(e + "", n), i, a = -1, o = r.length;
|
|
696
|
+
if (arguments.length < 2) {
|
|
697
|
+
for (; ++a < o;) if ((i = (e = r[a]).type) && (i = At(n[i], e.name))) return i;
|
|
698
|
+
return;
|
|
699
|
+
}
|
|
700
|
+
if (t != null && typeof t != "function") throw Error("invalid callback: " + t);
|
|
701
|
+
for (; ++a < o;) if (i = (e = r[a]).type) n[i] = jt(n[i], e.name, t);
|
|
702
|
+
else if (t == null) for (i in n) n[i] = jt(n[i], e.name, null);
|
|
703
|
+
return this;
|
|
704
|
+
},
|
|
705
|
+
copy: function() {
|
|
706
|
+
var e = {}, t = this._;
|
|
707
|
+
for (var n in t) e[n] = t[n].slice();
|
|
708
|
+
return new Ot(e);
|
|
709
|
+
},
|
|
710
|
+
call: function(e, t) {
|
|
711
|
+
if ((i = arguments.length - 2) > 0) for (var n = Array(i), r = 0, i, a; r < i; ++r) n[r] = arguments[r + 2];
|
|
712
|
+
if (!this._.hasOwnProperty(e)) throw Error("unknown type: " + e);
|
|
713
|
+
for (a = this._[e], r = 0, i = a.length; r < i; ++r) a[r].value.apply(t, n);
|
|
714
|
+
},
|
|
715
|
+
apply: function(e, t, n) {
|
|
716
|
+
if (!this._.hasOwnProperty(e)) throw Error("unknown type: " + e);
|
|
717
|
+
for (var r = this._[e], i = 0, a = r.length; i < a; ++i) r[i].value.apply(t, n);
|
|
718
|
+
}
|
|
719
|
+
};
|
|
720
|
+
function At(e, t) {
|
|
721
|
+
for (var n = 0, r = e.length, i; n < r; ++n) if ((i = e[n]).name === t) return i.value;
|
|
722
|
+
}
|
|
723
|
+
function jt(e, t, n) {
|
|
724
|
+
for (var r = 0, i = e.length; r < i; ++r) if (e[r].name === t) {
|
|
725
|
+
e[r] = Dt, e = e.slice(0, r).concat(e.slice(r + 1));
|
|
726
|
+
break;
|
|
727
|
+
}
|
|
728
|
+
return n != null && e.push({
|
|
729
|
+
name: t,
|
|
730
|
+
value: n
|
|
731
|
+
}), e;
|
|
732
|
+
}
|
|
733
|
+
//#endregion
|
|
734
|
+
//#region node_modules/d3-drag/src/noevent.js
|
|
735
|
+
var Mt = { passive: !1 }, k = {
|
|
736
|
+
capture: !0,
|
|
737
|
+
passive: !1
|
|
738
|
+
};
|
|
739
|
+
function Nt(e) {
|
|
740
|
+
e.stopImmediatePropagation();
|
|
741
|
+
}
|
|
742
|
+
function A(e) {
|
|
743
|
+
e.preventDefault(), e.stopImmediatePropagation();
|
|
744
|
+
}
|
|
745
|
+
//#endregion
|
|
746
|
+
//#region node_modules/d3-drag/src/nodrag.js
|
|
747
|
+
function Pt(e) {
|
|
748
|
+
var t = e.document.documentElement, n = E(e).on("dragstart.drag", A, k);
|
|
749
|
+
"onselectstart" in t ? n.on("selectstart.drag", A, k) : (t.__noselect = t.style.MozUserSelect, t.style.MozUserSelect = "none");
|
|
750
|
+
}
|
|
751
|
+
function Ft(e, t) {
|
|
752
|
+
var n = e.document.documentElement, r = E(e).on("dragstart.drag", null);
|
|
753
|
+
t && (r.on("click.drag", A, k), setTimeout(function() {
|
|
754
|
+
r.on("click.drag", null);
|
|
755
|
+
}, 0)), "onselectstart" in n ? r.on("selectstart.drag", null) : (n.style.MozUserSelect = n.__noselect, delete n.__noselect);
|
|
756
|
+
}
|
|
757
|
+
//#endregion
|
|
758
|
+
//#region node_modules/d3-drag/src/constant.js
|
|
759
|
+
var It = (e) => () => e;
|
|
760
|
+
//#endregion
|
|
761
|
+
//#region node_modules/d3-drag/src/event.js
|
|
762
|
+
function Lt(e, { sourceEvent: t, subject: n, target: r, identifier: i, active: a, x: o, y: s, dx: c, dy: l, dispatch: u }) {
|
|
763
|
+
Object.defineProperties(this, {
|
|
764
|
+
type: {
|
|
765
|
+
value: e,
|
|
766
|
+
enumerable: !0,
|
|
767
|
+
configurable: !0
|
|
768
|
+
},
|
|
769
|
+
sourceEvent: {
|
|
770
|
+
value: t,
|
|
771
|
+
enumerable: !0,
|
|
772
|
+
configurable: !0
|
|
773
|
+
},
|
|
774
|
+
subject: {
|
|
775
|
+
value: n,
|
|
776
|
+
enumerable: !0,
|
|
777
|
+
configurable: !0
|
|
778
|
+
},
|
|
779
|
+
target: {
|
|
780
|
+
value: r,
|
|
781
|
+
enumerable: !0,
|
|
782
|
+
configurable: !0
|
|
783
|
+
},
|
|
784
|
+
identifier: {
|
|
785
|
+
value: i,
|
|
786
|
+
enumerable: !0,
|
|
787
|
+
configurable: !0
|
|
788
|
+
},
|
|
789
|
+
active: {
|
|
790
|
+
value: a,
|
|
791
|
+
enumerable: !0,
|
|
792
|
+
configurable: !0
|
|
793
|
+
},
|
|
794
|
+
x: {
|
|
795
|
+
value: o,
|
|
796
|
+
enumerable: !0,
|
|
797
|
+
configurable: !0
|
|
798
|
+
},
|
|
799
|
+
y: {
|
|
800
|
+
value: s,
|
|
801
|
+
enumerable: !0,
|
|
802
|
+
configurable: !0
|
|
803
|
+
},
|
|
804
|
+
dx: {
|
|
805
|
+
value: c,
|
|
806
|
+
enumerable: !0,
|
|
807
|
+
configurable: !0
|
|
808
|
+
},
|
|
809
|
+
dy: {
|
|
810
|
+
value: l,
|
|
811
|
+
enumerable: !0,
|
|
812
|
+
configurable: !0
|
|
813
|
+
},
|
|
814
|
+
_: { value: u }
|
|
815
|
+
});
|
|
816
|
+
}
|
|
817
|
+
Lt.prototype.on = function() {
|
|
818
|
+
var e = this._.on.apply(this._, arguments);
|
|
819
|
+
return e === this._ ? this : e;
|
|
820
|
+
};
|
|
821
|
+
//#endregion
|
|
822
|
+
//#region node_modules/d3-drag/src/drag.js
|
|
823
|
+
function Rt(e) {
|
|
824
|
+
return !e.ctrlKey && !e.button;
|
|
825
|
+
}
|
|
826
|
+
function zt() {
|
|
827
|
+
return this.parentNode;
|
|
828
|
+
}
|
|
829
|
+
function Bt(e, t) {
|
|
830
|
+
return t ?? {
|
|
831
|
+
x: e.x,
|
|
832
|
+
y: e.y
|
|
833
|
+
};
|
|
834
|
+
}
|
|
835
|
+
function Vt() {
|
|
836
|
+
return navigator.maxTouchPoints || "ontouchstart" in this;
|
|
837
|
+
}
|
|
838
|
+
function Ht() {
|
|
839
|
+
var e = Rt, t = zt, n = Bt, r = Vt, i = {}, a = O("start", "drag", "end"), o = 0, s, c, l, u, d = 0;
|
|
840
|
+
function f(e) {
|
|
841
|
+
e.on("mousedown.drag", p).filter(r).on("touchstart.drag", g).on("touchmove.drag", _, Mt).on("touchend.drag touchcancel.drag", v).style("touch-action", "none").style("-webkit-tap-highlight-color", "rgba(0,0,0,0)");
|
|
842
|
+
}
|
|
843
|
+
function p(n, r) {
|
|
844
|
+
if (!(u || !e.call(this, n, r))) {
|
|
845
|
+
var i = y(this, t.call(this, n, r), n, r, "mouse");
|
|
846
|
+
i && (E(n.view).on("mousemove.drag", m, k).on("mouseup.drag", h, k), Pt(n.view), Nt(n), l = !1, s = n.clientX, c = n.clientY, i("start", n));
|
|
847
|
+
}
|
|
848
|
+
}
|
|
849
|
+
function m(e) {
|
|
850
|
+
if (A(e), !l) {
|
|
851
|
+
var t = e.clientX - s, n = e.clientY - c;
|
|
852
|
+
l = t * t + n * n > d;
|
|
853
|
+
}
|
|
854
|
+
i.mouse("drag", e);
|
|
855
|
+
}
|
|
856
|
+
function h(e) {
|
|
857
|
+
E(e.view).on("mousemove.drag mouseup.drag", null), Ft(e.view, l), A(e), i.mouse("end", e);
|
|
858
|
+
}
|
|
859
|
+
function g(n, r) {
|
|
860
|
+
if (e.call(this, n, r)) {
|
|
861
|
+
var i = n.changedTouches, a = t.call(this, n, r), o = i.length, s, c;
|
|
862
|
+
for (s = 0; s < o; ++s) (c = y(this, a, n, r, i[s].identifier, i[s])) && (Nt(n), c("start", n, i[s]));
|
|
863
|
+
}
|
|
864
|
+
}
|
|
865
|
+
function _(e) {
|
|
866
|
+
var t = e.changedTouches, n = t.length, r, a;
|
|
867
|
+
for (r = 0; r < n; ++r) (a = i[t[r].identifier]) && (A(e), a("drag", e, t[r]));
|
|
868
|
+
}
|
|
869
|
+
function v(e) {
|
|
870
|
+
var t = e.changedTouches, n = t.length, r, a;
|
|
871
|
+
for (u && clearTimeout(u), u = setTimeout(function() {
|
|
872
|
+
u = null;
|
|
873
|
+
}, 500), r = 0; r < n; ++r) (a = i[t[r].identifier]) && (Nt(e), a("end", e, t[r]));
|
|
874
|
+
}
|
|
875
|
+
function y(e, t, r, s, c, l) {
|
|
876
|
+
var u = a.copy(), d = D(l || r, t), p, m, h;
|
|
877
|
+
if ((h = n.call(e, new Lt("beforestart", {
|
|
878
|
+
sourceEvent: r,
|
|
879
|
+
target: f,
|
|
880
|
+
identifier: c,
|
|
881
|
+
active: o,
|
|
882
|
+
x: d[0],
|
|
883
|
+
y: d[1],
|
|
884
|
+
dx: 0,
|
|
885
|
+
dy: 0,
|
|
886
|
+
dispatch: u
|
|
887
|
+
}), s)) != null) return p = h.x - d[0] || 0, m = h.y - d[1] || 0, function n(r, a, l) {
|
|
888
|
+
var g = d, _;
|
|
889
|
+
switch (r) {
|
|
890
|
+
case "start":
|
|
891
|
+
i[c] = n, _ = o++;
|
|
892
|
+
break;
|
|
893
|
+
case "end": delete i[c], --o;
|
|
894
|
+
case "drag": d = D(l || a, t), _ = o;
|
|
895
|
+
}
|
|
896
|
+
u.call(r, e, new Lt(r, {
|
|
897
|
+
sourceEvent: a,
|
|
898
|
+
subject: h,
|
|
899
|
+
target: f,
|
|
900
|
+
identifier: c,
|
|
901
|
+
active: _,
|
|
902
|
+
x: d[0] + p,
|
|
903
|
+
y: d[1] + m,
|
|
904
|
+
dx: d[0] - g[0],
|
|
905
|
+
dy: d[1] - g[1],
|
|
906
|
+
dispatch: u
|
|
907
|
+
}), s);
|
|
908
|
+
};
|
|
909
|
+
}
|
|
910
|
+
return f.filter = function(t) {
|
|
911
|
+
return arguments.length ? (e = typeof t == "function" ? t : It(!!t), f) : e;
|
|
912
|
+
}, f.container = function(e) {
|
|
913
|
+
return arguments.length ? (t = typeof e == "function" ? e : It(e), f) : t;
|
|
914
|
+
}, f.subject = function(e) {
|
|
915
|
+
return arguments.length ? (n = typeof e == "function" ? e : It(e), f) : n;
|
|
916
|
+
}, f.touchable = function(e) {
|
|
917
|
+
return arguments.length ? (r = typeof e == "function" ? e : It(!!e), f) : r;
|
|
918
|
+
}, f.on = function() {
|
|
919
|
+
var e = a.on.apply(a, arguments);
|
|
920
|
+
return e === a ? f : e;
|
|
921
|
+
}, f.clickDistance = function(e) {
|
|
922
|
+
return arguments.length ? (d = (e = +e) * e, f) : Math.sqrt(d);
|
|
923
|
+
}, f;
|
|
924
|
+
}
|
|
925
|
+
//#endregion
|
|
926
|
+
//#region node_modules/d3-color/src/define.js
|
|
927
|
+
function Ut(e, t, n) {
|
|
928
|
+
e.prototype = t.prototype = n, n.constructor = e;
|
|
929
|
+
}
|
|
930
|
+
function Wt(e, t) {
|
|
931
|
+
var n = Object.create(e.prototype);
|
|
932
|
+
for (var r in t) n[r] = t[r];
|
|
933
|
+
return n;
|
|
934
|
+
}
|
|
935
|
+
//#endregion
|
|
936
|
+
//#region node_modules/d3-color/src/color.js
|
|
937
|
+
function j() {}
|
|
938
|
+
var Gt = .7, Kt = 1 / Gt, M = "\\s*([+-]?\\d+)\\s*", qt = "\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*", N = "\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*", Jt = /^#([0-9a-f]{3,8})$/, Yt = RegExp(`^rgb\\(${M},${M},${M}\\)$`), Xt = RegExp(`^rgb\\(${N},${N},${N}\\)$`), Zt = RegExp(`^rgba\\(${M},${M},${M},${qt}\\)$`), Qt = RegExp(`^rgba\\(${N},${N},${N},${qt}\\)$`), $t = RegExp(`^hsl\\(${qt},${N},${N}\\)$`), en = RegExp(`^hsla\\(${qt},${N},${N},${qt}\\)$`), tn = {
|
|
939
|
+
aliceblue: 15792383,
|
|
940
|
+
antiquewhite: 16444375,
|
|
941
|
+
aqua: 65535,
|
|
942
|
+
aquamarine: 8388564,
|
|
943
|
+
azure: 15794175,
|
|
944
|
+
beige: 16119260,
|
|
945
|
+
bisque: 16770244,
|
|
946
|
+
black: 0,
|
|
947
|
+
blanchedalmond: 16772045,
|
|
948
|
+
blue: 255,
|
|
949
|
+
blueviolet: 9055202,
|
|
950
|
+
brown: 10824234,
|
|
951
|
+
burlywood: 14596231,
|
|
952
|
+
cadetblue: 6266528,
|
|
953
|
+
chartreuse: 8388352,
|
|
954
|
+
chocolate: 13789470,
|
|
955
|
+
coral: 16744272,
|
|
956
|
+
cornflowerblue: 6591981,
|
|
957
|
+
cornsilk: 16775388,
|
|
958
|
+
crimson: 14423100,
|
|
959
|
+
cyan: 65535,
|
|
960
|
+
darkblue: 139,
|
|
961
|
+
darkcyan: 35723,
|
|
962
|
+
darkgoldenrod: 12092939,
|
|
963
|
+
darkgray: 11119017,
|
|
964
|
+
darkgreen: 25600,
|
|
965
|
+
darkgrey: 11119017,
|
|
966
|
+
darkkhaki: 12433259,
|
|
967
|
+
darkmagenta: 9109643,
|
|
968
|
+
darkolivegreen: 5597999,
|
|
969
|
+
darkorange: 16747520,
|
|
970
|
+
darkorchid: 10040012,
|
|
971
|
+
darkred: 9109504,
|
|
972
|
+
darksalmon: 15308410,
|
|
973
|
+
darkseagreen: 9419919,
|
|
974
|
+
darkslateblue: 4734347,
|
|
975
|
+
darkslategray: 3100495,
|
|
976
|
+
darkslategrey: 3100495,
|
|
977
|
+
darkturquoise: 52945,
|
|
978
|
+
darkviolet: 9699539,
|
|
979
|
+
deeppink: 16716947,
|
|
980
|
+
deepskyblue: 49151,
|
|
981
|
+
dimgray: 6908265,
|
|
982
|
+
dimgrey: 6908265,
|
|
983
|
+
dodgerblue: 2003199,
|
|
984
|
+
firebrick: 11674146,
|
|
985
|
+
floralwhite: 16775920,
|
|
986
|
+
forestgreen: 2263842,
|
|
987
|
+
fuchsia: 16711935,
|
|
988
|
+
gainsboro: 14474460,
|
|
989
|
+
ghostwhite: 16316671,
|
|
990
|
+
gold: 16766720,
|
|
991
|
+
goldenrod: 14329120,
|
|
992
|
+
gray: 8421504,
|
|
993
|
+
green: 32768,
|
|
994
|
+
greenyellow: 11403055,
|
|
995
|
+
grey: 8421504,
|
|
996
|
+
honeydew: 15794160,
|
|
997
|
+
hotpink: 16738740,
|
|
998
|
+
indianred: 13458524,
|
|
999
|
+
indigo: 4915330,
|
|
1000
|
+
ivory: 16777200,
|
|
1001
|
+
khaki: 15787660,
|
|
1002
|
+
lavender: 15132410,
|
|
1003
|
+
lavenderblush: 16773365,
|
|
1004
|
+
lawngreen: 8190976,
|
|
1005
|
+
lemonchiffon: 16775885,
|
|
1006
|
+
lightblue: 11393254,
|
|
1007
|
+
lightcoral: 15761536,
|
|
1008
|
+
lightcyan: 14745599,
|
|
1009
|
+
lightgoldenrodyellow: 16448210,
|
|
1010
|
+
lightgray: 13882323,
|
|
1011
|
+
lightgreen: 9498256,
|
|
1012
|
+
lightgrey: 13882323,
|
|
1013
|
+
lightpink: 16758465,
|
|
1014
|
+
lightsalmon: 16752762,
|
|
1015
|
+
lightseagreen: 2142890,
|
|
1016
|
+
lightskyblue: 8900346,
|
|
1017
|
+
lightslategray: 7833753,
|
|
1018
|
+
lightslategrey: 7833753,
|
|
1019
|
+
lightsteelblue: 11584734,
|
|
1020
|
+
lightyellow: 16777184,
|
|
1021
|
+
lime: 65280,
|
|
1022
|
+
limegreen: 3329330,
|
|
1023
|
+
linen: 16445670,
|
|
1024
|
+
magenta: 16711935,
|
|
1025
|
+
maroon: 8388608,
|
|
1026
|
+
mediumaquamarine: 6737322,
|
|
1027
|
+
mediumblue: 205,
|
|
1028
|
+
mediumorchid: 12211667,
|
|
1029
|
+
mediumpurple: 9662683,
|
|
1030
|
+
mediumseagreen: 3978097,
|
|
1031
|
+
mediumslateblue: 8087790,
|
|
1032
|
+
mediumspringgreen: 64154,
|
|
1033
|
+
mediumturquoise: 4772300,
|
|
1034
|
+
mediumvioletred: 13047173,
|
|
1035
|
+
midnightblue: 1644912,
|
|
1036
|
+
mintcream: 16121850,
|
|
1037
|
+
mistyrose: 16770273,
|
|
1038
|
+
moccasin: 16770229,
|
|
1039
|
+
navajowhite: 16768685,
|
|
1040
|
+
navy: 128,
|
|
1041
|
+
oldlace: 16643558,
|
|
1042
|
+
olive: 8421376,
|
|
1043
|
+
olivedrab: 7048739,
|
|
1044
|
+
orange: 16753920,
|
|
1045
|
+
orangered: 16729344,
|
|
1046
|
+
orchid: 14315734,
|
|
1047
|
+
palegoldenrod: 15657130,
|
|
1048
|
+
palegreen: 10025880,
|
|
1049
|
+
paleturquoise: 11529966,
|
|
1050
|
+
palevioletred: 14381203,
|
|
1051
|
+
papayawhip: 16773077,
|
|
1052
|
+
peachpuff: 16767673,
|
|
1053
|
+
peru: 13468991,
|
|
1054
|
+
pink: 16761035,
|
|
1055
|
+
plum: 14524637,
|
|
1056
|
+
powderblue: 11591910,
|
|
1057
|
+
purple: 8388736,
|
|
1058
|
+
rebeccapurple: 6697881,
|
|
1059
|
+
red: 16711680,
|
|
1060
|
+
rosybrown: 12357519,
|
|
1061
|
+
royalblue: 4286945,
|
|
1062
|
+
saddlebrown: 9127187,
|
|
1063
|
+
salmon: 16416882,
|
|
1064
|
+
sandybrown: 16032864,
|
|
1065
|
+
seagreen: 3050327,
|
|
1066
|
+
seashell: 16774638,
|
|
1067
|
+
sienna: 10506797,
|
|
1068
|
+
silver: 12632256,
|
|
1069
|
+
skyblue: 8900331,
|
|
1070
|
+
slateblue: 6970061,
|
|
1071
|
+
slategray: 7372944,
|
|
1072
|
+
slategrey: 7372944,
|
|
1073
|
+
snow: 16775930,
|
|
1074
|
+
springgreen: 65407,
|
|
1075
|
+
steelblue: 4620980,
|
|
1076
|
+
tan: 13808780,
|
|
1077
|
+
teal: 32896,
|
|
1078
|
+
thistle: 14204888,
|
|
1079
|
+
tomato: 16737095,
|
|
1080
|
+
turquoise: 4251856,
|
|
1081
|
+
violet: 15631086,
|
|
1082
|
+
wheat: 16113331,
|
|
1083
|
+
white: 16777215,
|
|
1084
|
+
whitesmoke: 16119285,
|
|
1085
|
+
yellow: 16776960,
|
|
1086
|
+
yellowgreen: 10145074
|
|
1087
|
+
};
|
|
1088
|
+
Ut(j, P, {
|
|
1089
|
+
copy(e) {
|
|
1090
|
+
return Object.assign(new this.constructor(), this, e);
|
|
1091
|
+
},
|
|
1092
|
+
displayable() {
|
|
1093
|
+
return this.rgb().displayable();
|
|
1094
|
+
},
|
|
1095
|
+
hex: nn,
|
|
1096
|
+
formatHex: nn,
|
|
1097
|
+
formatHex8: rn,
|
|
1098
|
+
formatHsl: an,
|
|
1099
|
+
formatRgb: on,
|
|
1100
|
+
toString: on
|
|
1101
|
+
});
|
|
1102
|
+
function nn() {
|
|
1103
|
+
return this.rgb().formatHex();
|
|
1104
|
+
}
|
|
1105
|
+
function rn() {
|
|
1106
|
+
return this.rgb().formatHex8();
|
|
1107
|
+
}
|
|
1108
|
+
function an() {
|
|
1109
|
+
return gn(this).formatHsl();
|
|
1110
|
+
}
|
|
1111
|
+
function on() {
|
|
1112
|
+
return this.rgb().formatRgb();
|
|
1113
|
+
}
|
|
1114
|
+
function P(e) {
|
|
1115
|
+
var t, n;
|
|
1116
|
+
return e = (e + "").trim().toLowerCase(), (t = Jt.exec(e)) ? (n = t[1].length, t = parseInt(t[1], 16), n === 6 ? sn(t) : n === 3 ? new F(t >> 8 & 15 | t >> 4 & 240, t >> 4 & 15 | t & 240, (t & 15) << 4 | t & 15, 1) : n === 8 ? cn(t >> 24 & 255, t >> 16 & 255, t >> 8 & 255, (t & 255) / 255) : n === 4 ? cn(t >> 12 & 15 | t >> 8 & 240, t >> 8 & 15 | t >> 4 & 240, t >> 4 & 15 | t & 240, ((t & 15) << 4 | t & 15) / 255) : null) : (t = Yt.exec(e)) ? new F(t[1], t[2], t[3], 1) : (t = Xt.exec(e)) ? new F(t[1] * 255 / 100, t[2] * 255 / 100, t[3] * 255 / 100, 1) : (t = Zt.exec(e)) ? cn(t[1], t[2], t[3], t[4]) : (t = Qt.exec(e)) ? cn(t[1] * 255 / 100, t[2] * 255 / 100, t[3] * 255 / 100, t[4]) : (t = $t.exec(e)) ? hn(t[1], t[2] / 100, t[3] / 100, 1) : (t = en.exec(e)) ? hn(t[1], t[2] / 100, t[3] / 100, t[4]) : tn.hasOwnProperty(e) ? sn(tn[e]) : e === "transparent" ? new F(NaN, NaN, NaN, 0) : null;
|
|
1117
|
+
}
|
|
1118
|
+
function sn(e) {
|
|
1119
|
+
return new F(e >> 16 & 255, e >> 8 & 255, e & 255, 1);
|
|
1120
|
+
}
|
|
1121
|
+
function cn(e, t, n, r) {
|
|
1122
|
+
return r <= 0 && (e = t = n = NaN), new F(e, t, n, r);
|
|
1123
|
+
}
|
|
1124
|
+
function ln(e) {
|
|
1125
|
+
return e instanceof j || (e = P(e)), e ? (e = e.rgb(), new F(e.r, e.g, e.b, e.opacity)) : new F();
|
|
1126
|
+
}
|
|
1127
|
+
function un(e, t, n, r) {
|
|
1128
|
+
return arguments.length === 1 ? ln(e) : new F(e, t, n, r ?? 1);
|
|
1129
|
+
}
|
|
1130
|
+
function F(e, t, n, r) {
|
|
1131
|
+
this.r = +e, this.g = +t, this.b = +n, this.opacity = +r;
|
|
1132
|
+
}
|
|
1133
|
+
Ut(F, un, Wt(j, {
|
|
1134
|
+
brighter(e) {
|
|
1135
|
+
return e = e == null ? Kt : Kt ** +e, new F(this.r * e, this.g * e, this.b * e, this.opacity);
|
|
1136
|
+
},
|
|
1137
|
+
darker(e) {
|
|
1138
|
+
return e = e == null ? Gt : Gt ** +e, new F(this.r * e, this.g * e, this.b * e, this.opacity);
|
|
1139
|
+
},
|
|
1140
|
+
rgb() {
|
|
1141
|
+
return this;
|
|
1142
|
+
},
|
|
1143
|
+
clamp() {
|
|
1144
|
+
return new F(I(this.r), I(this.g), I(this.b), mn(this.opacity));
|
|
1145
|
+
},
|
|
1146
|
+
displayable() {
|
|
1147
|
+
return -.5 <= this.r && this.r < 255.5 && -.5 <= this.g && this.g < 255.5 && -.5 <= this.b && this.b < 255.5 && 0 <= this.opacity && this.opacity <= 1;
|
|
1148
|
+
},
|
|
1149
|
+
hex: dn,
|
|
1150
|
+
formatHex: dn,
|
|
1151
|
+
formatHex8: fn,
|
|
1152
|
+
formatRgb: pn,
|
|
1153
|
+
toString: pn
|
|
1154
|
+
}));
|
|
1155
|
+
function dn() {
|
|
1156
|
+
return `#${L(this.r)}${L(this.g)}${L(this.b)}`;
|
|
1157
|
+
}
|
|
1158
|
+
function fn() {
|
|
1159
|
+
return `#${L(this.r)}${L(this.g)}${L(this.b)}${L((isNaN(this.opacity) ? 1 : this.opacity) * 255)}`;
|
|
1160
|
+
}
|
|
1161
|
+
function pn() {
|
|
1162
|
+
let e = mn(this.opacity);
|
|
1163
|
+
return `${e === 1 ? "rgb(" : "rgba("}${I(this.r)}, ${I(this.g)}, ${I(this.b)}${e === 1 ? ")" : `, ${e})`}`;
|
|
1164
|
+
}
|
|
1165
|
+
function mn(e) {
|
|
1166
|
+
return isNaN(e) ? 1 : Math.max(0, Math.min(1, e));
|
|
1167
|
+
}
|
|
1168
|
+
function I(e) {
|
|
1169
|
+
return Math.max(0, Math.min(255, Math.round(e) || 0));
|
|
1170
|
+
}
|
|
1171
|
+
function L(e) {
|
|
1172
|
+
return e = I(e), (e < 16 ? "0" : "") + e.toString(16);
|
|
1173
|
+
}
|
|
1174
|
+
function hn(e, t, n, r) {
|
|
1175
|
+
return r <= 0 ? e = t = n = NaN : n <= 0 || n >= 1 ? e = t = NaN : t <= 0 && (e = NaN), new R(e, t, n, r);
|
|
1176
|
+
}
|
|
1177
|
+
function gn(e) {
|
|
1178
|
+
if (e instanceof R) return new R(e.h, e.s, e.l, e.opacity);
|
|
1179
|
+
if (e instanceof j || (e = P(e)), !e) return new R();
|
|
1180
|
+
if (e instanceof R) return e;
|
|
1181
|
+
e = e.rgb();
|
|
1182
|
+
var t = e.r / 255, n = e.g / 255, r = e.b / 255, i = Math.min(t, n, r), a = Math.max(t, n, r), o = NaN, s = a - i, c = (a + i) / 2;
|
|
1183
|
+
return s ? (o = t === a ? (n - r) / s + (n < r) * 6 : n === a ? (r - t) / s + 2 : (t - n) / s + 4, s /= c < .5 ? a + i : 2 - a - i, o *= 60) : s = c > 0 && c < 1 ? 0 : o, new R(o, s, c, e.opacity);
|
|
1184
|
+
}
|
|
1185
|
+
function _n(e, t, n, r) {
|
|
1186
|
+
return arguments.length === 1 ? gn(e) : new R(e, t, n, r ?? 1);
|
|
1187
|
+
}
|
|
1188
|
+
function R(e, t, n, r) {
|
|
1189
|
+
this.h = +e, this.s = +t, this.l = +n, this.opacity = +r;
|
|
1190
|
+
}
|
|
1191
|
+
Ut(R, _n, Wt(j, {
|
|
1192
|
+
brighter(e) {
|
|
1193
|
+
return e = e == null ? Kt : Kt ** +e, new R(this.h, this.s, this.l * e, this.opacity);
|
|
1194
|
+
},
|
|
1195
|
+
darker(e) {
|
|
1196
|
+
return e = e == null ? Gt : Gt ** +e, new R(this.h, this.s, this.l * e, this.opacity);
|
|
1197
|
+
},
|
|
1198
|
+
rgb() {
|
|
1199
|
+
var e = this.h % 360 + (this.h < 0) * 360, t = isNaN(e) || isNaN(this.s) ? 0 : this.s, n = this.l, r = n + (n < .5 ? n : 1 - n) * t, i = 2 * n - r;
|
|
1200
|
+
return new F(bn(e >= 240 ? e - 240 : e + 120, i, r), bn(e, i, r), bn(e < 120 ? e + 240 : e - 120, i, r), this.opacity);
|
|
1201
|
+
},
|
|
1202
|
+
clamp() {
|
|
1203
|
+
return new R(vn(this.h), yn(this.s), yn(this.l), mn(this.opacity));
|
|
1204
|
+
},
|
|
1205
|
+
displayable() {
|
|
1206
|
+
return (0 <= this.s && this.s <= 1 || isNaN(this.s)) && 0 <= this.l && this.l <= 1 && 0 <= this.opacity && this.opacity <= 1;
|
|
1207
|
+
},
|
|
1208
|
+
formatHsl() {
|
|
1209
|
+
let e = mn(this.opacity);
|
|
1210
|
+
return `${e === 1 ? "hsl(" : "hsla("}${vn(this.h)}, ${yn(this.s) * 100}%, ${yn(this.l) * 100}%${e === 1 ? ")" : `, ${e})`}`;
|
|
1211
|
+
}
|
|
1212
|
+
}));
|
|
1213
|
+
function vn(e) {
|
|
1214
|
+
return e = (e || 0) % 360, e < 0 ? e + 360 : e;
|
|
1215
|
+
}
|
|
1216
|
+
function yn(e) {
|
|
1217
|
+
return Math.max(0, Math.min(1, e || 0));
|
|
1218
|
+
}
|
|
1219
|
+
function bn(e, t, n) {
|
|
1220
|
+
return (e < 60 ? t + (n - t) * e / 60 : e < 180 ? n : e < 240 ? t + (n - t) * (240 - e) / 60 : t) * 255;
|
|
1221
|
+
}
|
|
1222
|
+
//#endregion
|
|
1223
|
+
//#region node_modules/d3-interpolate/src/constant.js
|
|
1224
|
+
var xn = (e) => () => e;
|
|
1225
|
+
//#endregion
|
|
1226
|
+
//#region node_modules/d3-interpolate/src/color.js
|
|
1227
|
+
function Sn(e, t) {
|
|
1228
|
+
return function(n) {
|
|
1229
|
+
return e + n * t;
|
|
1230
|
+
};
|
|
1231
|
+
}
|
|
1232
|
+
function Cn(e, t, n) {
|
|
1233
|
+
return e **= +n, t = t ** +n - e, n = 1 / n, function(r) {
|
|
1234
|
+
return (e + r * t) ** +n;
|
|
1235
|
+
};
|
|
1236
|
+
}
|
|
1237
|
+
function wn(e) {
|
|
1238
|
+
return (e = +e) == 1 ? Tn : function(t, n) {
|
|
1239
|
+
return n - t ? Cn(t, n, e) : xn(isNaN(t) ? n : t);
|
|
1240
|
+
};
|
|
1241
|
+
}
|
|
1242
|
+
function Tn(e, t) {
|
|
1243
|
+
var n = t - e;
|
|
1244
|
+
return n ? Sn(e, n) : xn(isNaN(e) ? t : e);
|
|
1245
|
+
}
|
|
1246
|
+
//#endregion
|
|
1247
|
+
//#region node_modules/d3-interpolate/src/rgb.js
|
|
1248
|
+
var En = (function e(t) {
|
|
1249
|
+
var n = wn(t);
|
|
1250
|
+
function r(e, t) {
|
|
1251
|
+
var r = n((e = un(e)).r, (t = un(t)).r), i = n(e.g, t.g), a = n(e.b, t.b), o = Tn(e.opacity, t.opacity);
|
|
1252
|
+
return function(t) {
|
|
1253
|
+
return e.r = r(t), e.g = i(t), e.b = a(t), e.opacity = o(t), e + "";
|
|
1254
|
+
};
|
|
1255
|
+
}
|
|
1256
|
+
return r.gamma = e, r;
|
|
1257
|
+
})(1);
|
|
1258
|
+
//#endregion
|
|
1259
|
+
//#region node_modules/d3-interpolate/src/number.js
|
|
1260
|
+
function z(e, t) {
|
|
1261
|
+
return e = +e, t = +t, function(n) {
|
|
1262
|
+
return e * (1 - n) + t * n;
|
|
1263
|
+
};
|
|
1264
|
+
}
|
|
1265
|
+
//#endregion
|
|
1266
|
+
//#region node_modules/d3-interpolate/src/string.js
|
|
1267
|
+
var Dn = /[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g, On = new RegExp(Dn.source, "g");
|
|
1268
|
+
function kn(e) {
|
|
1269
|
+
return function() {
|
|
1270
|
+
return e;
|
|
1271
|
+
};
|
|
1272
|
+
}
|
|
1273
|
+
function An(e) {
|
|
1274
|
+
return function(t) {
|
|
1275
|
+
return e(t) + "";
|
|
1276
|
+
};
|
|
1277
|
+
}
|
|
1278
|
+
function jn(e, t) {
|
|
1279
|
+
var n = Dn.lastIndex = On.lastIndex = 0, r, i, a, o = -1, s = [], c = [];
|
|
1280
|
+
for (e += "", t += ""; (r = Dn.exec(e)) && (i = On.exec(t));) (a = i.index) > n && (a = t.slice(n, a), s[o] ? s[o] += a : s[++o] = a), (r = r[0]) === (i = i[0]) ? s[o] ? s[o] += i : s[++o] = i : (s[++o] = null, c.push({
|
|
1281
|
+
i: o,
|
|
1282
|
+
x: z(r, i)
|
|
1283
|
+
})), n = On.lastIndex;
|
|
1284
|
+
return n < t.length && (a = t.slice(n), s[o] ? s[o] += a : s[++o] = a), s.length < 2 ? c[0] ? An(c[0].x) : kn(t) : (t = c.length, function(e) {
|
|
1285
|
+
for (var n = 0, r; n < t; ++n) s[(r = c[n]).i] = r.x(e);
|
|
1286
|
+
return s.join("");
|
|
1287
|
+
});
|
|
1288
|
+
}
|
|
1289
|
+
//#endregion
|
|
1290
|
+
//#region node_modules/d3-interpolate/src/transform/decompose.js
|
|
1291
|
+
var Mn = 180 / Math.PI, Nn = {
|
|
1292
|
+
translateX: 0,
|
|
1293
|
+
translateY: 0,
|
|
1294
|
+
rotate: 0,
|
|
1295
|
+
skewX: 0,
|
|
1296
|
+
scaleX: 1,
|
|
1297
|
+
scaleY: 1
|
|
1298
|
+
};
|
|
1299
|
+
function Pn(e, t, n, r, i, a) {
|
|
1300
|
+
var o, s, c;
|
|
1301
|
+
return (o = Math.sqrt(e * e + t * t)) && (e /= o, t /= o), (c = e * n + t * r) && (n -= e * c, r -= t * c), (s = Math.sqrt(n * n + r * r)) && (n /= s, r /= s, c /= s), e * r < t * n && (e = -e, t = -t, c = -c, o = -o), {
|
|
1302
|
+
translateX: i,
|
|
1303
|
+
translateY: a,
|
|
1304
|
+
rotate: Math.atan2(t, e) * Mn,
|
|
1305
|
+
skewX: Math.atan(c) * Mn,
|
|
1306
|
+
scaleX: o,
|
|
1307
|
+
scaleY: s
|
|
1308
|
+
};
|
|
1309
|
+
}
|
|
1310
|
+
//#endregion
|
|
1311
|
+
//#region node_modules/d3-interpolate/src/transform/parse.js
|
|
1312
|
+
var Fn;
|
|
1313
|
+
function In(e) {
|
|
1314
|
+
let t = new (typeof DOMMatrix == "function" ? DOMMatrix : WebKitCSSMatrix)(e + "");
|
|
1315
|
+
return t.isIdentity ? Nn : Pn(t.a, t.b, t.c, t.d, t.e, t.f);
|
|
1316
|
+
}
|
|
1317
|
+
function Ln(e) {
|
|
1318
|
+
return e == null || (Fn ||= document.createElementNS("http://www.w3.org/2000/svg", "g"), Fn.setAttribute("transform", e), !(e = Fn.transform.baseVal.consolidate())) ? Nn : (e = e.matrix, Pn(e.a, e.b, e.c, e.d, e.e, e.f));
|
|
1319
|
+
}
|
|
1320
|
+
//#endregion
|
|
1321
|
+
//#region node_modules/d3-interpolate/src/transform/index.js
|
|
1322
|
+
function Rn(e, t, n, r) {
|
|
1323
|
+
function i(e) {
|
|
1324
|
+
return e.length ? e.pop() + " " : "";
|
|
1325
|
+
}
|
|
1326
|
+
function a(e, r, i, a, o, s) {
|
|
1327
|
+
if (e !== i || r !== a) {
|
|
1328
|
+
var c = o.push("translate(", null, t, null, n);
|
|
1329
|
+
s.push({
|
|
1330
|
+
i: c - 4,
|
|
1331
|
+
x: z(e, i)
|
|
1332
|
+
}, {
|
|
1333
|
+
i: c - 2,
|
|
1334
|
+
x: z(r, a)
|
|
1335
|
+
});
|
|
1336
|
+
} else (i || a) && o.push("translate(" + i + t + a + n);
|
|
1337
|
+
}
|
|
1338
|
+
function o(e, t, n, a) {
|
|
1339
|
+
e === t ? t && n.push(i(n) + "rotate(" + t + r) : (e - t > 180 ? t += 360 : t - e > 180 && (e += 360), a.push({
|
|
1340
|
+
i: n.push(i(n) + "rotate(", null, r) - 2,
|
|
1341
|
+
x: z(e, t)
|
|
1342
|
+
}));
|
|
1343
|
+
}
|
|
1344
|
+
function s(e, t, n, a) {
|
|
1345
|
+
e === t ? t && n.push(i(n) + "skewX(" + t + r) : a.push({
|
|
1346
|
+
i: n.push(i(n) + "skewX(", null, r) - 2,
|
|
1347
|
+
x: z(e, t)
|
|
1348
|
+
});
|
|
1349
|
+
}
|
|
1350
|
+
function c(e, t, n, r, a, o) {
|
|
1351
|
+
if (e !== n || t !== r) {
|
|
1352
|
+
var s = a.push(i(a) + "scale(", null, ",", null, ")");
|
|
1353
|
+
o.push({
|
|
1354
|
+
i: s - 4,
|
|
1355
|
+
x: z(e, n)
|
|
1356
|
+
}, {
|
|
1357
|
+
i: s - 2,
|
|
1358
|
+
x: z(t, r)
|
|
1359
|
+
});
|
|
1360
|
+
} else (n !== 1 || r !== 1) && a.push(i(a) + "scale(" + n + "," + r + ")");
|
|
1361
|
+
}
|
|
1362
|
+
return function(t, n) {
|
|
1363
|
+
var r = [], i = [];
|
|
1364
|
+
return t = e(t), n = e(n), a(t.translateX, t.translateY, n.translateX, n.translateY, r, i), o(t.rotate, n.rotate, r, i), s(t.skewX, n.skewX, r, i), c(t.scaleX, t.scaleY, n.scaleX, n.scaleY, r, i), t = n = null, function(e) {
|
|
1365
|
+
for (var t = -1, n = i.length, a; ++t < n;) r[(a = i[t]).i] = a.x(e);
|
|
1366
|
+
return r.join("");
|
|
1367
|
+
};
|
|
1368
|
+
};
|
|
1369
|
+
}
|
|
1370
|
+
var zn = Rn(In, "px, ", "px)", "deg)"), Bn = Rn(Ln, ", ", ")", ")"), Vn = 1e-12;
|
|
1371
|
+
function Hn(e) {
|
|
1372
|
+
return ((e = Math.exp(e)) + 1 / e) / 2;
|
|
1373
|
+
}
|
|
1374
|
+
function Un(e) {
|
|
1375
|
+
return ((e = Math.exp(e)) - 1 / e) / 2;
|
|
1376
|
+
}
|
|
1377
|
+
function Wn(e) {
|
|
1378
|
+
return ((e = Math.exp(2 * e)) - 1) / (e + 1);
|
|
1379
|
+
}
|
|
1380
|
+
var Gn = (function e(t, n, r) {
|
|
1381
|
+
function i(e, i) {
|
|
1382
|
+
var a = e[0], o = e[1], s = e[2], c = i[0], l = i[1], u = i[2], d = c - a, f = l - o, p = d * d + f * f, m, h;
|
|
1383
|
+
if (p < Vn) h = Math.log(u / s) / t, m = function(e) {
|
|
1384
|
+
return [
|
|
1385
|
+
a + e * d,
|
|
1386
|
+
o + e * f,
|
|
1387
|
+
s * Math.exp(t * e * h)
|
|
1388
|
+
];
|
|
1389
|
+
};
|
|
1390
|
+
else {
|
|
1391
|
+
var g = Math.sqrt(p), _ = (u * u - s * s + r * p) / (2 * s * n * g), v = (u * u - s * s - r * p) / (2 * u * n * g), y = Math.log(Math.sqrt(_ * _ + 1) - _);
|
|
1392
|
+
h = (Math.log(Math.sqrt(v * v + 1) - v) - y) / t, m = function(e) {
|
|
1393
|
+
var r = e * h, i = Hn(y), c = s / (n * g) * (i * Wn(t * r + y) - Un(y));
|
|
1394
|
+
return [
|
|
1395
|
+
a + c * d,
|
|
1396
|
+
o + c * f,
|
|
1397
|
+
s * i / Hn(t * r + y)
|
|
1398
|
+
];
|
|
1399
|
+
};
|
|
1400
|
+
}
|
|
1401
|
+
return m.duration = h * 1e3 * t / Math.SQRT2, m;
|
|
1402
|
+
}
|
|
1403
|
+
return i.rho = function(t) {
|
|
1404
|
+
var n = Math.max(.001, +t), r = n * n;
|
|
1405
|
+
return e(n, r, r * r);
|
|
1406
|
+
}, i;
|
|
1407
|
+
})(Math.SQRT2, 2, 4), B = 0, Kn = 0, qn = 0, Jn = 1e3, Yn, V, Xn = 0, H = 0, Zn = 0, U = typeof performance == "object" && performance.now ? performance : Date, Qn = typeof window == "object" && window.requestAnimationFrame ? window.requestAnimationFrame.bind(window) : function(e) {
|
|
1408
|
+
setTimeout(e, 17);
|
|
1409
|
+
};
|
|
1410
|
+
function $n() {
|
|
1411
|
+
return H ||= (Qn(er), U.now() + Zn);
|
|
1412
|
+
}
|
|
1413
|
+
function er() {
|
|
1414
|
+
H = 0;
|
|
1415
|
+
}
|
|
1416
|
+
function tr() {
|
|
1417
|
+
this._call = this._time = this._next = null;
|
|
1418
|
+
}
|
|
1419
|
+
tr.prototype = nr.prototype = {
|
|
1420
|
+
constructor: tr,
|
|
1421
|
+
restart: function(e, t, n) {
|
|
1422
|
+
if (typeof e != "function") throw TypeError("callback is not a function");
|
|
1423
|
+
n = (n == null ? $n() : +n) + (t == null ? 0 : +t), !this._next && V !== this && (V ? V._next = this : Yn = this, V = this), this._call = e, this._time = n, sr();
|
|
1424
|
+
},
|
|
1425
|
+
stop: function() {
|
|
1426
|
+
this._call && (this._call = null, this._time = Infinity, sr());
|
|
1427
|
+
}
|
|
1428
|
+
};
|
|
1429
|
+
function nr(e, t, n) {
|
|
1430
|
+
var r = new tr();
|
|
1431
|
+
return r.restart(e, t, n), r;
|
|
1432
|
+
}
|
|
1433
|
+
function rr() {
|
|
1434
|
+
$n(), ++B;
|
|
1435
|
+
for (var e = Yn, t; e;) (t = H - e._time) >= 0 && e._call.call(void 0, t), e = e._next;
|
|
1436
|
+
--B;
|
|
1437
|
+
}
|
|
1438
|
+
function ir() {
|
|
1439
|
+
H = (Xn = U.now()) + Zn, B = Kn = 0;
|
|
1440
|
+
try {
|
|
1441
|
+
rr();
|
|
1442
|
+
} finally {
|
|
1443
|
+
B = 0, or(), H = 0;
|
|
1444
|
+
}
|
|
1445
|
+
}
|
|
1446
|
+
function ar() {
|
|
1447
|
+
var e = U.now(), t = e - Xn;
|
|
1448
|
+
t > Jn && (Zn -= t, Xn = e);
|
|
1449
|
+
}
|
|
1450
|
+
function or() {
|
|
1451
|
+
for (var e, t = Yn, n, r = Infinity; t;) t._call ? (r > t._time && (r = t._time), e = t, t = t._next) : (n = t._next, t._next = null, t = e ? e._next = n : Yn = n);
|
|
1452
|
+
V = e, sr(r);
|
|
1453
|
+
}
|
|
1454
|
+
function sr(e) {
|
|
1455
|
+
B || (Kn &&= clearTimeout(Kn), e - H > 24 ? (e < Infinity && (Kn = setTimeout(ir, e - U.now() - Zn)), qn &&= clearInterval(qn)) : (qn ||= (Xn = U.now(), setInterval(ar, Jn)), B = 1, Qn(ir)));
|
|
1456
|
+
}
|
|
1457
|
+
//#endregion
|
|
1458
|
+
//#region node_modules/d3-timer/src/timeout.js
|
|
1459
|
+
function cr(e, t, n) {
|
|
1460
|
+
var r = new tr();
|
|
1461
|
+
return t = t == null ? 0 : +t, r.restart((n) => {
|
|
1462
|
+
r.stop(), e(n + t);
|
|
1463
|
+
}, t, n), r;
|
|
1464
|
+
}
|
|
1465
|
+
//#endregion
|
|
1466
|
+
//#region node_modules/d3-transition/src/transition/schedule.js
|
|
1467
|
+
var lr = O("start", "end", "cancel", "interrupt"), ur = [];
|
|
1468
|
+
function dr(e, t, n, r, i, a) {
|
|
1469
|
+
var o = e.__transition;
|
|
1470
|
+
if (!o) e.__transition = {};
|
|
1471
|
+
else if (n in o) return;
|
|
1472
|
+
pr(e, n, {
|
|
1473
|
+
name: t,
|
|
1474
|
+
index: r,
|
|
1475
|
+
group: i,
|
|
1476
|
+
on: lr,
|
|
1477
|
+
tween: ur,
|
|
1478
|
+
time: a.time,
|
|
1479
|
+
delay: a.delay,
|
|
1480
|
+
duration: a.duration,
|
|
1481
|
+
ease: a.ease,
|
|
1482
|
+
timer: null,
|
|
1483
|
+
state: 0
|
|
1484
|
+
});
|
|
1485
|
+
}
|
|
1486
|
+
function fr(e, t) {
|
|
1487
|
+
var n = G(e, t);
|
|
1488
|
+
if (n.state > 0) throw Error("too late; already scheduled");
|
|
1489
|
+
return n;
|
|
1490
|
+
}
|
|
1491
|
+
function W(e, t) {
|
|
1492
|
+
var n = G(e, t);
|
|
1493
|
+
if (n.state > 3) throw Error("too late; already running");
|
|
1494
|
+
return n;
|
|
1495
|
+
}
|
|
1496
|
+
function G(e, t) {
|
|
1497
|
+
var n = e.__transition;
|
|
1498
|
+
if (!n || !(n = n[t])) throw Error("transition not found");
|
|
1499
|
+
return n;
|
|
1500
|
+
}
|
|
1501
|
+
function pr(e, t, n) {
|
|
1502
|
+
var r = e.__transition, i;
|
|
1503
|
+
r[t] = n, n.timer = nr(a, 0, n.time);
|
|
1504
|
+
function a(e) {
|
|
1505
|
+
n.state = 1, n.timer.restart(o, n.delay, n.time), n.delay <= e && o(e - n.delay);
|
|
1506
|
+
}
|
|
1507
|
+
function o(a) {
|
|
1508
|
+
var l, u, d, f;
|
|
1509
|
+
if (n.state !== 1) return c();
|
|
1510
|
+
for (l in r) if (f = r[l], f.name === n.name) {
|
|
1511
|
+
if (f.state === 3) return cr(o);
|
|
1512
|
+
f.state === 4 ? (f.state = 6, f.timer.stop(), f.on.call("interrupt", e, e.__data__, f.index, f.group), delete r[l]) : +l < t && (f.state = 6, f.timer.stop(), f.on.call("cancel", e, e.__data__, f.index, f.group), delete r[l]);
|
|
1513
|
+
}
|
|
1514
|
+
if (cr(function() {
|
|
1515
|
+
n.state === 3 && (n.state = 4, n.timer.restart(s, n.delay, n.time), s(a));
|
|
1516
|
+
}), n.state = 2, n.on.call("start", e, e.__data__, n.index, n.group), n.state === 2) {
|
|
1517
|
+
for (n.state = 3, i = Array(d = n.tween.length), l = 0, u = -1; l < d; ++l) (f = n.tween[l].value.call(e, e.__data__, n.index, n.group)) && (i[++u] = f);
|
|
1518
|
+
i.length = u + 1;
|
|
1519
|
+
}
|
|
1520
|
+
}
|
|
1521
|
+
function s(t) {
|
|
1522
|
+
for (var r = t < n.duration ? n.ease.call(null, t / n.duration) : (n.timer.restart(c), n.state = 5, 1), a = -1, o = i.length; ++a < o;) i[a].call(e, r);
|
|
1523
|
+
n.state === 5 && (n.on.call("end", e, e.__data__, n.index, n.group), c());
|
|
1524
|
+
}
|
|
1525
|
+
function c() {
|
|
1526
|
+
for (var i in n.state = 6, n.timer.stop(), delete r[t], r) return;
|
|
1527
|
+
delete e.__transition;
|
|
1528
|
+
}
|
|
1529
|
+
}
|
|
1530
|
+
//#endregion
|
|
1531
|
+
//#region node_modules/d3-transition/src/interrupt.js
|
|
1532
|
+
function mr(e, t) {
|
|
1533
|
+
var n = e.__transition, r, i, a = !0, o;
|
|
1534
|
+
if (n) {
|
|
1535
|
+
for (o in t = t == null ? null : t + "", n) {
|
|
1536
|
+
if ((r = n[o]).name !== t) {
|
|
1537
|
+
a = !1;
|
|
1538
|
+
continue;
|
|
1539
|
+
}
|
|
1540
|
+
i = r.state > 2 && r.state < 5, r.state = 6, r.timer.stop(), r.on.call(i ? "interrupt" : "cancel", e, e.__data__, r.index, r.group), delete n[o];
|
|
1541
|
+
}
|
|
1542
|
+
a && delete e.__transition;
|
|
1543
|
+
}
|
|
1544
|
+
}
|
|
1545
|
+
//#endregion
|
|
1546
|
+
//#region node_modules/d3-transition/src/selection/interrupt.js
|
|
1547
|
+
function hr(e) {
|
|
1548
|
+
return this.each(function() {
|
|
1549
|
+
mr(this, e);
|
|
1550
|
+
});
|
|
1551
|
+
}
|
|
1552
|
+
//#endregion
|
|
1553
|
+
//#region node_modules/d3-transition/src/transition/tween.js
|
|
1554
|
+
function gr(e, t) {
|
|
1555
|
+
var n, r;
|
|
1556
|
+
return function() {
|
|
1557
|
+
var i = W(this, e), a = i.tween;
|
|
1558
|
+
if (a !== n) {
|
|
1559
|
+
r = n = a;
|
|
1560
|
+
for (var o = 0, s = r.length; o < s; ++o) if (r[o].name === t) {
|
|
1561
|
+
r = r.slice(), r.splice(o, 1);
|
|
1562
|
+
break;
|
|
1563
|
+
}
|
|
1564
|
+
}
|
|
1565
|
+
i.tween = r;
|
|
1566
|
+
};
|
|
1567
|
+
}
|
|
1568
|
+
function _r(e, t, n) {
|
|
1569
|
+
var r, i;
|
|
1570
|
+
if (typeof n != "function") throw Error();
|
|
1571
|
+
return function() {
|
|
1572
|
+
var a = W(this, e), o = a.tween;
|
|
1573
|
+
if (o !== r) {
|
|
1574
|
+
i = (r = o).slice();
|
|
1575
|
+
for (var s = {
|
|
1576
|
+
name: t,
|
|
1577
|
+
value: n
|
|
1578
|
+
}, c = 0, l = i.length; c < l; ++c) if (i[c].name === t) {
|
|
1579
|
+
i[c] = s;
|
|
1580
|
+
break;
|
|
1581
|
+
}
|
|
1582
|
+
c === l && i.push(s);
|
|
1583
|
+
}
|
|
1584
|
+
a.tween = i;
|
|
1585
|
+
};
|
|
1586
|
+
}
|
|
1587
|
+
function vr(e, t) {
|
|
1588
|
+
var n = this._id;
|
|
1589
|
+
if (e += "", arguments.length < 2) {
|
|
1590
|
+
for (var r = G(this.node(), n).tween, i = 0, a = r.length, o; i < a; ++i) if ((o = r[i]).name === e) return o.value;
|
|
1591
|
+
return null;
|
|
1592
|
+
}
|
|
1593
|
+
return this.each((t == null ? gr : _r)(n, e, t));
|
|
1594
|
+
}
|
|
1595
|
+
function yr(e, t, n) {
|
|
1596
|
+
var r = e._id;
|
|
1597
|
+
return e.each(function() {
|
|
1598
|
+
var e = W(this, r);
|
|
1599
|
+
(e.value ||= {})[t] = n.apply(this, arguments);
|
|
1600
|
+
}), function(e) {
|
|
1601
|
+
return G(e, r).value[t];
|
|
1602
|
+
};
|
|
1603
|
+
}
|
|
1604
|
+
//#endregion
|
|
1605
|
+
//#region node_modules/d3-transition/src/transition/interpolate.js
|
|
1606
|
+
function br(e, t) {
|
|
1607
|
+
var n;
|
|
1608
|
+
return (typeof t == "number" ? z : t instanceof P ? En : (n = P(t)) ? (t = n, En) : jn)(e, t);
|
|
1609
|
+
}
|
|
1610
|
+
//#endregion
|
|
1611
|
+
//#region node_modules/d3-transition/src/transition/attr.js
|
|
1612
|
+
function xr(e) {
|
|
1613
|
+
return function() {
|
|
1614
|
+
this.removeAttribute(e);
|
|
1615
|
+
};
|
|
1616
|
+
}
|
|
1617
|
+
function Sr(e) {
|
|
1618
|
+
return function() {
|
|
1619
|
+
this.removeAttributeNS(e.space, e.local);
|
|
1620
|
+
};
|
|
1621
|
+
}
|
|
1622
|
+
function Cr(e, t, n) {
|
|
1623
|
+
var r, i = n + "", a;
|
|
1624
|
+
return function() {
|
|
1625
|
+
var o = this.getAttribute(e);
|
|
1626
|
+
return o === i ? null : o === r ? a : a = t(r = o, n);
|
|
1627
|
+
};
|
|
1628
|
+
}
|
|
1629
|
+
function wr(e, t, n) {
|
|
1630
|
+
var r, i = n + "", a;
|
|
1631
|
+
return function() {
|
|
1632
|
+
var o = this.getAttributeNS(e.space, e.local);
|
|
1633
|
+
return o === i ? null : o === r ? a : a = t(r = o, n);
|
|
1634
|
+
};
|
|
1635
|
+
}
|
|
1636
|
+
function Tr(e, t, n) {
|
|
1637
|
+
var r, i, a;
|
|
1638
|
+
return function() {
|
|
1639
|
+
var o, s = n(this), c;
|
|
1640
|
+
return s == null ? void this.removeAttribute(e) : (o = this.getAttribute(e), c = s + "", o === c ? null : o === r && c === i ? a : (i = c, a = t(r = o, s)));
|
|
1641
|
+
};
|
|
1642
|
+
}
|
|
1643
|
+
function Er(e, t, n) {
|
|
1644
|
+
var r, i, a;
|
|
1645
|
+
return function() {
|
|
1646
|
+
var o, s = n(this), c;
|
|
1647
|
+
return s == null ? void this.removeAttributeNS(e.space, e.local) : (o = this.getAttributeNS(e.space, e.local), c = s + "", o === c ? null : o === r && c === i ? a : (i = c, a = t(r = o, s)));
|
|
1648
|
+
};
|
|
1649
|
+
}
|
|
1650
|
+
function Dr(e, n) {
|
|
1651
|
+
var r = t(e), i = r === "transform" ? Bn : br;
|
|
1652
|
+
return this.attrTween(e, typeof n == "function" ? (r.local ? Er : Tr)(r, i, yr(this, "attr." + e, n)) : n == null ? (r.local ? Sr : xr)(r) : (r.local ? wr : Cr)(r, i, n));
|
|
1653
|
+
}
|
|
1654
|
+
//#endregion
|
|
1655
|
+
//#region node_modules/d3-transition/src/transition/attrTween.js
|
|
1656
|
+
function Or(e, t) {
|
|
1657
|
+
return function(n) {
|
|
1658
|
+
this.setAttribute(e, t.call(this, n));
|
|
1659
|
+
};
|
|
1660
|
+
}
|
|
1661
|
+
function kr(e, t) {
|
|
1662
|
+
return function(n) {
|
|
1663
|
+
this.setAttributeNS(e.space, e.local, t.call(this, n));
|
|
1664
|
+
};
|
|
1665
|
+
}
|
|
1666
|
+
function Ar(e, t) {
|
|
1667
|
+
var n, r;
|
|
1668
|
+
function i() {
|
|
1669
|
+
var i = t.apply(this, arguments);
|
|
1670
|
+
return i !== r && (n = (r = i) && kr(e, i)), n;
|
|
1671
|
+
}
|
|
1672
|
+
return i._value = t, i;
|
|
1673
|
+
}
|
|
1674
|
+
function jr(e, t) {
|
|
1675
|
+
var n, r;
|
|
1676
|
+
function i() {
|
|
1677
|
+
var i = t.apply(this, arguments);
|
|
1678
|
+
return i !== r && (n = (r = i) && Or(e, i)), n;
|
|
1679
|
+
}
|
|
1680
|
+
return i._value = t, i;
|
|
1681
|
+
}
|
|
1682
|
+
function Mr(e, n) {
|
|
1683
|
+
var r = "attr." + e;
|
|
1684
|
+
if (arguments.length < 2) return (r = this.tween(r)) && r._value;
|
|
1685
|
+
if (n == null) return this.tween(r, null);
|
|
1686
|
+
if (typeof n != "function") throw Error();
|
|
1687
|
+
var i = t(e);
|
|
1688
|
+
return this.tween(r, (i.local ? Ar : jr)(i, n));
|
|
1689
|
+
}
|
|
1690
|
+
//#endregion
|
|
1691
|
+
//#region node_modules/d3-transition/src/transition/delay.js
|
|
1692
|
+
function Nr(e, t) {
|
|
1693
|
+
return function() {
|
|
1694
|
+
fr(this, e).delay = +t.apply(this, arguments);
|
|
1695
|
+
};
|
|
1696
|
+
}
|
|
1697
|
+
function Pr(e, t) {
|
|
1698
|
+
return t = +t, function() {
|
|
1699
|
+
fr(this, e).delay = t;
|
|
1700
|
+
};
|
|
1701
|
+
}
|
|
1702
|
+
function Fr(e) {
|
|
1703
|
+
var t = this._id;
|
|
1704
|
+
return arguments.length ? this.each((typeof e == "function" ? Nr : Pr)(t, e)) : G(this.node(), t).delay;
|
|
1705
|
+
}
|
|
1706
|
+
//#endregion
|
|
1707
|
+
//#region node_modules/d3-transition/src/transition/duration.js
|
|
1708
|
+
function Ir(e, t) {
|
|
1709
|
+
return function() {
|
|
1710
|
+
W(this, e).duration = +t.apply(this, arguments);
|
|
1711
|
+
};
|
|
1712
|
+
}
|
|
1713
|
+
function Lr(e, t) {
|
|
1714
|
+
return t = +t, function() {
|
|
1715
|
+
W(this, e).duration = t;
|
|
1716
|
+
};
|
|
1717
|
+
}
|
|
1718
|
+
function Rr(e) {
|
|
1719
|
+
var t = this._id;
|
|
1720
|
+
return arguments.length ? this.each((typeof e == "function" ? Ir : Lr)(t, e)) : G(this.node(), t).duration;
|
|
1721
|
+
}
|
|
1722
|
+
//#endregion
|
|
1723
|
+
//#region node_modules/d3-transition/src/transition/ease.js
|
|
1724
|
+
function zr(e, t) {
|
|
1725
|
+
if (typeof t != "function") throw Error();
|
|
1726
|
+
return function() {
|
|
1727
|
+
W(this, e).ease = t;
|
|
1728
|
+
};
|
|
1729
|
+
}
|
|
1730
|
+
function Br(e) {
|
|
1731
|
+
var t = this._id;
|
|
1732
|
+
return arguments.length ? this.each(zr(t, e)) : G(this.node(), t).ease;
|
|
1733
|
+
}
|
|
1734
|
+
//#endregion
|
|
1735
|
+
//#region node_modules/d3-transition/src/transition/easeVarying.js
|
|
1736
|
+
function Vr(e, t) {
|
|
1737
|
+
return function() {
|
|
1738
|
+
var n = t.apply(this, arguments);
|
|
1739
|
+
if (typeof n != "function") throw Error();
|
|
1740
|
+
W(this, e).ease = n;
|
|
1741
|
+
};
|
|
1742
|
+
}
|
|
1743
|
+
function Hr(e) {
|
|
1744
|
+
if (typeof e != "function") throw Error();
|
|
1745
|
+
return this.each(Vr(this._id, e));
|
|
1746
|
+
}
|
|
1747
|
+
//#endregion
|
|
1748
|
+
//#region node_modules/d3-transition/src/transition/filter.js
|
|
1749
|
+
function Ur(e) {
|
|
1750
|
+
typeof e != "function" && (e = p(e));
|
|
1751
|
+
for (var t = this._groups, n = t.length, r = Array(n), i = 0; i < n; ++i) for (var a = t[i], o = a.length, s = r[i] = [], c, l = 0; l < o; ++l) (c = a[l]) && e.call(c, c.__data__, l, a) && s.push(c);
|
|
1752
|
+
return new K(r, this._parents, this._name, this._id);
|
|
1753
|
+
}
|
|
1754
|
+
//#endregion
|
|
1755
|
+
//#region node_modules/d3-transition/src/transition/merge.js
|
|
1756
|
+
function Wr(e) {
|
|
1757
|
+
if (e._id !== this._id) throw Error();
|
|
1758
|
+
for (var t = this._groups, n = e._groups, r = t.length, i = n.length, a = Math.min(r, i), o = Array(r), s = 0; s < a; ++s) for (var c = t[s], l = n[s], u = c.length, d = o[s] = Array(u), f, p = 0; p < u; ++p) (f = c[p] || l[p]) && (d[p] = f);
|
|
1759
|
+
for (; s < r; ++s) o[s] = t[s];
|
|
1760
|
+
return new K(o, this._parents, this._name, this._id);
|
|
1761
|
+
}
|
|
1762
|
+
//#endregion
|
|
1763
|
+
//#region node_modules/d3-transition/src/transition/on.js
|
|
1764
|
+
function Gr(e) {
|
|
1765
|
+
return (e + "").trim().split(/^|\s+/).every(function(e) {
|
|
1766
|
+
var t = e.indexOf(".");
|
|
1767
|
+
return t >= 0 && (e = e.slice(0, t)), !e || e === "start";
|
|
1768
|
+
});
|
|
1769
|
+
}
|
|
1770
|
+
function Kr(e, t, n) {
|
|
1771
|
+
var r, i, a = Gr(t) ? fr : W;
|
|
1772
|
+
return function() {
|
|
1773
|
+
var o = a(this, e), s = o.on;
|
|
1774
|
+
s !== r && (i = (r = s).copy()).on(t, n), o.on = i;
|
|
1775
|
+
};
|
|
1776
|
+
}
|
|
1777
|
+
function qr(e, t) {
|
|
1778
|
+
var n = this._id;
|
|
1779
|
+
return arguments.length < 2 ? G(this.node(), n).on.on(e) : this.each(Kr(n, e, t));
|
|
1780
|
+
}
|
|
1781
|
+
//#endregion
|
|
1782
|
+
//#region node_modules/d3-transition/src/transition/remove.js
|
|
1783
|
+
function Jr(e) {
|
|
1784
|
+
return function() {
|
|
1785
|
+
var t = this.parentNode;
|
|
1786
|
+
for (var n in this.__transition) if (+n !== e) return;
|
|
1787
|
+
t && t.removeChild(this);
|
|
1788
|
+
};
|
|
1789
|
+
}
|
|
1790
|
+
function Yr() {
|
|
1791
|
+
return this.on("end.remove", Jr(this._id));
|
|
1792
|
+
}
|
|
1793
|
+
//#endregion
|
|
1794
|
+
//#region node_modules/d3-transition/src/transition/select.js
|
|
1795
|
+
function Xr(e) {
|
|
1796
|
+
var t = this._name, n = this._id;
|
|
1797
|
+
typeof e != "function" && (e = o(e));
|
|
1798
|
+
for (var r = this._groups, i = r.length, a = Array(i), s = 0; s < i; ++s) for (var c = r[s], l = c.length, u = a[s] = Array(l), d, f, p = 0; p < l; ++p) (d = c[p]) && (f = e.call(d, d.__data__, p, c)) && ("__data__" in d && (f.__data__ = d.__data__), u[p] = f, dr(u[p], t, n, p, u, G(d, n)));
|
|
1799
|
+
return new K(a, this._parents, t, n);
|
|
1800
|
+
}
|
|
1801
|
+
//#endregion
|
|
1802
|
+
//#region node_modules/d3-transition/src/transition/selectAll.js
|
|
1803
|
+
function Zr(e) {
|
|
1804
|
+
var t = this._name, n = this._id;
|
|
1805
|
+
typeof e != "function" && (e = u(e));
|
|
1806
|
+
for (var r = this._groups, i = r.length, a = [], o = [], s = 0; s < i; ++s) for (var c = r[s], l = c.length, d, f = 0; f < l; ++f) if (d = c[f]) {
|
|
1807
|
+
for (var p = e.call(d, d.__data__, f, c), m, h = G(d, n), g = 0, _ = p.length; g < _; ++g) (m = p[g]) && dr(m, t, n, g, p, h);
|
|
1808
|
+
a.push(p), o.push(d);
|
|
1809
|
+
}
|
|
1810
|
+
return new K(a, o, t, n);
|
|
1811
|
+
}
|
|
1812
|
+
//#endregion
|
|
1813
|
+
//#region node_modules/d3-transition/src/transition/selection.js
|
|
1814
|
+
var Qr = wt.prototype.constructor;
|
|
1815
|
+
function $r() {
|
|
1816
|
+
return new Qr(this._groups, this._parents);
|
|
1817
|
+
}
|
|
1818
|
+
//#endregion
|
|
1819
|
+
//#region node_modules/d3-transition/src/transition/style.js
|
|
1820
|
+
function ei(e, t) {
|
|
1821
|
+
var n, r, i;
|
|
1822
|
+
return function() {
|
|
1823
|
+
var a = w(this, e), o = (this.style.removeProperty(e), w(this, e));
|
|
1824
|
+
return a === o ? null : a === n && o === r ? i : i = t(n = a, r = o);
|
|
1825
|
+
};
|
|
1826
|
+
}
|
|
1827
|
+
function ti(e) {
|
|
1828
|
+
return function() {
|
|
1829
|
+
this.style.removeProperty(e);
|
|
1830
|
+
};
|
|
1831
|
+
}
|
|
1832
|
+
function ni(e, t, n) {
|
|
1833
|
+
var r, i = n + "", a;
|
|
1834
|
+
return function() {
|
|
1835
|
+
var o = w(this, e);
|
|
1836
|
+
return o === i ? null : o === r ? a : a = t(r = o, n);
|
|
1837
|
+
};
|
|
1838
|
+
}
|
|
1839
|
+
function ri(e, t, n) {
|
|
1840
|
+
var r, i, a;
|
|
1841
|
+
return function() {
|
|
1842
|
+
var o = w(this, e), s = n(this), c = s + "";
|
|
1843
|
+
return s ?? (c = s = (this.style.removeProperty(e), w(this, e))), o === c ? null : o === r && c === i ? a : (i = c, a = t(r = o, s));
|
|
1844
|
+
};
|
|
1845
|
+
}
|
|
1846
|
+
function ii(e, t) {
|
|
1847
|
+
var n, r, i, a = "style." + t, o = "end." + a, s;
|
|
1848
|
+
return function() {
|
|
1849
|
+
var c = W(this, e), l = c.on, u = c.value[a] == null ? s ||= ti(t) : void 0;
|
|
1850
|
+
(l !== n || i !== u) && (r = (n = l).copy()).on(o, i = u), c.on = r;
|
|
1851
|
+
};
|
|
1852
|
+
}
|
|
1853
|
+
function ai(e, t, n) {
|
|
1854
|
+
var r = (e += "") == "transform" ? zn : br;
|
|
1855
|
+
return t == null ? this.styleTween(e, ei(e, r)).on("end.style." + e, ti(e)) : typeof t == "function" ? this.styleTween(e, ri(e, r, yr(this, "style." + e, t))).each(ii(this._id, e)) : this.styleTween(e, ni(e, r, t), n).on("end.style." + e, null);
|
|
1856
|
+
}
|
|
1857
|
+
//#endregion
|
|
1858
|
+
//#region node_modules/d3-transition/src/transition/styleTween.js
|
|
1859
|
+
function oi(e, t, n) {
|
|
1860
|
+
return function(r) {
|
|
1861
|
+
this.style.setProperty(e, t.call(this, r), n);
|
|
1862
|
+
};
|
|
1863
|
+
}
|
|
1864
|
+
function si(e, t, n) {
|
|
1865
|
+
var r, i;
|
|
1866
|
+
function a() {
|
|
1867
|
+
var a = t.apply(this, arguments);
|
|
1868
|
+
return a !== i && (r = (i = a) && oi(e, a, n)), r;
|
|
1869
|
+
}
|
|
1870
|
+
return a._value = t, a;
|
|
1871
|
+
}
|
|
1872
|
+
function ci(e, t, n) {
|
|
1873
|
+
var r = "style." + (e += "");
|
|
1874
|
+
if (arguments.length < 2) return (r = this.tween(r)) && r._value;
|
|
1875
|
+
if (t == null) return this.tween(r, null);
|
|
1876
|
+
if (typeof t != "function") throw Error();
|
|
1877
|
+
return this.tween(r, si(e, t, n ?? ""));
|
|
1878
|
+
}
|
|
1879
|
+
//#endregion
|
|
1880
|
+
//#region node_modules/d3-transition/src/transition/text.js
|
|
1881
|
+
function li(e) {
|
|
1882
|
+
return function() {
|
|
1883
|
+
this.textContent = e;
|
|
1884
|
+
};
|
|
1885
|
+
}
|
|
1886
|
+
function ui(e) {
|
|
1887
|
+
return function() {
|
|
1888
|
+
var t = e(this);
|
|
1889
|
+
this.textContent = t ?? "";
|
|
1890
|
+
};
|
|
1891
|
+
}
|
|
1892
|
+
function di(e) {
|
|
1893
|
+
return this.tween("text", typeof e == "function" ? ui(yr(this, "text", e)) : li(e == null ? "" : e + ""));
|
|
1894
|
+
}
|
|
1895
|
+
//#endregion
|
|
1896
|
+
//#region node_modules/d3-transition/src/transition/textTween.js
|
|
1897
|
+
function fi(e) {
|
|
1898
|
+
return function(t) {
|
|
1899
|
+
this.textContent = e.call(this, t);
|
|
1900
|
+
};
|
|
1901
|
+
}
|
|
1902
|
+
function pi(e) {
|
|
1903
|
+
var t, n;
|
|
1904
|
+
function r() {
|
|
1905
|
+
var r = e.apply(this, arguments);
|
|
1906
|
+
return r !== n && (t = (n = r) && fi(r)), t;
|
|
1907
|
+
}
|
|
1908
|
+
return r._value = e, r;
|
|
1909
|
+
}
|
|
1910
|
+
function mi(e) {
|
|
1911
|
+
var t = "text";
|
|
1912
|
+
if (arguments.length < 1) return (t = this.tween(t)) && t._value;
|
|
1913
|
+
if (e == null) return this.tween(t, null);
|
|
1914
|
+
if (typeof e != "function") throw Error();
|
|
1915
|
+
return this.tween(t, pi(e));
|
|
1916
|
+
}
|
|
1917
|
+
//#endregion
|
|
1918
|
+
//#region node_modules/d3-transition/src/transition/transition.js
|
|
1919
|
+
function hi() {
|
|
1920
|
+
for (var e = this._name, t = this._id, n = vi(), r = this._groups, i = r.length, a = 0; a < i; ++a) for (var o = r[a], s = o.length, c, l = 0; l < s; ++l) if (c = o[l]) {
|
|
1921
|
+
var u = G(c, t);
|
|
1922
|
+
dr(c, e, n, l, o, {
|
|
1923
|
+
time: u.time + u.delay + u.duration,
|
|
1924
|
+
delay: 0,
|
|
1925
|
+
duration: u.duration,
|
|
1926
|
+
ease: u.ease
|
|
1927
|
+
});
|
|
1928
|
+
}
|
|
1929
|
+
return new K(r, this._parents, e, n);
|
|
1930
|
+
}
|
|
1931
|
+
//#endregion
|
|
1932
|
+
//#region node_modules/d3-transition/src/transition/end.js
|
|
1933
|
+
function gi() {
|
|
1934
|
+
var e, t, n = this, r = n._id, i = n.size();
|
|
1935
|
+
return new Promise(function(a, o) {
|
|
1936
|
+
var s = { value: o }, c = { value: function() {
|
|
1937
|
+
--i === 0 && a();
|
|
1938
|
+
} };
|
|
1939
|
+
n.each(function() {
|
|
1940
|
+
var n = W(this, r), i = n.on;
|
|
1941
|
+
i !== e && (t = (e = i).copy(), t._.cancel.push(s), t._.interrupt.push(s), t._.end.push(c)), n.on = t;
|
|
1942
|
+
}), i === 0 && a();
|
|
1943
|
+
});
|
|
1944
|
+
}
|
|
1945
|
+
//#endregion
|
|
1946
|
+
//#region node_modules/d3-transition/src/transition/index.js
|
|
1947
|
+
var _i = 0;
|
|
1948
|
+
function K(e, t, n, r) {
|
|
1949
|
+
this._groups = e, this._parents = t, this._name = n, this._id = r;
|
|
1950
|
+
}
|
|
1951
|
+
function vi() {
|
|
1952
|
+
return ++_i;
|
|
1953
|
+
}
|
|
1954
|
+
var q = wt.prototype;
|
|
1955
|
+
K.prototype = {
|
|
1956
|
+
constructor: K,
|
|
1957
|
+
select: Xr,
|
|
1958
|
+
selectAll: Zr,
|
|
1959
|
+
selectChild: q.selectChild,
|
|
1960
|
+
selectChildren: q.selectChildren,
|
|
1961
|
+
filter: Ur,
|
|
1962
|
+
merge: Wr,
|
|
1963
|
+
selection: $r,
|
|
1964
|
+
transition: hi,
|
|
1965
|
+
call: q.call,
|
|
1966
|
+
nodes: q.nodes,
|
|
1967
|
+
node: q.node,
|
|
1968
|
+
size: q.size,
|
|
1969
|
+
empty: q.empty,
|
|
1970
|
+
each: q.each,
|
|
1971
|
+
on: qr,
|
|
1972
|
+
attr: Dr,
|
|
1973
|
+
attrTween: Mr,
|
|
1974
|
+
style: ai,
|
|
1975
|
+
styleTween: ci,
|
|
1976
|
+
text: di,
|
|
1977
|
+
textTween: mi,
|
|
1978
|
+
remove: Yr,
|
|
1979
|
+
tween: vr,
|
|
1980
|
+
delay: Fr,
|
|
1981
|
+
duration: Rr,
|
|
1982
|
+
ease: Br,
|
|
1983
|
+
easeVarying: Hr,
|
|
1984
|
+
end: gi,
|
|
1985
|
+
[Symbol.iterator]: q[Symbol.iterator]
|
|
1986
|
+
};
|
|
1987
|
+
//#endregion
|
|
1988
|
+
//#region node_modules/d3-ease/src/cubic.js
|
|
1989
|
+
function yi(e) {
|
|
1990
|
+
return ((e *= 2) <= 1 ? e * e * e : (e -= 2) * e * e + 2) / 2;
|
|
1991
|
+
}
|
|
1992
|
+
//#endregion
|
|
1993
|
+
//#region node_modules/d3-transition/src/selection/transition.js
|
|
1994
|
+
var bi = {
|
|
1995
|
+
time: null,
|
|
1996
|
+
delay: 0,
|
|
1997
|
+
duration: 250,
|
|
1998
|
+
ease: yi
|
|
1999
|
+
};
|
|
2000
|
+
function xi(e, t) {
|
|
2001
|
+
for (var n; !(n = e.__transition) || !(n = n[t]);) if (!(e = e.parentNode)) throw Error(`transition ${t} not found`);
|
|
2002
|
+
return n;
|
|
2003
|
+
}
|
|
2004
|
+
function Si(e) {
|
|
2005
|
+
var t, n;
|
|
2006
|
+
e instanceof K ? (t = e._id, e = e._name) : (t = vi(), (n = bi).time = $n(), e = e == null ? null : e + "");
|
|
2007
|
+
for (var r = this._groups, i = r.length, a = 0; a < i; ++a) for (var o = r[a], s = o.length, c, l = 0; l < s; ++l) (c = o[l]) && dr(c, e, t, l, o, n || xi(c, t));
|
|
2008
|
+
return new K(r, this._parents, e, t);
|
|
2009
|
+
}
|
|
2010
|
+
wt.prototype.interrupt = hr, wt.prototype.transition = Si;
|
|
2011
|
+
//#endregion
|
|
2012
|
+
//#region node_modules/d3-zoom/src/constant.js
|
|
2013
|
+
var Ci = (e) => () => e;
|
|
2014
|
+
//#endregion
|
|
2015
|
+
//#region node_modules/d3-zoom/src/event.js
|
|
2016
|
+
function wi(e, { sourceEvent: t, target: n, transform: r, dispatch: i }) {
|
|
2017
|
+
Object.defineProperties(this, {
|
|
2018
|
+
type: {
|
|
2019
|
+
value: e,
|
|
2020
|
+
enumerable: !0,
|
|
2021
|
+
configurable: !0
|
|
2022
|
+
},
|
|
2023
|
+
sourceEvent: {
|
|
2024
|
+
value: t,
|
|
2025
|
+
enumerable: !0,
|
|
2026
|
+
configurable: !0
|
|
2027
|
+
},
|
|
2028
|
+
target: {
|
|
2029
|
+
value: n,
|
|
2030
|
+
enumerable: !0,
|
|
2031
|
+
configurable: !0
|
|
2032
|
+
},
|
|
2033
|
+
transform: {
|
|
2034
|
+
value: r,
|
|
2035
|
+
enumerable: !0,
|
|
2036
|
+
configurable: !0
|
|
2037
|
+
},
|
|
2038
|
+
_: { value: i }
|
|
2039
|
+
});
|
|
2040
|
+
}
|
|
2041
|
+
//#endregion
|
|
2042
|
+
//#region node_modules/d3-zoom/src/transform.js
|
|
2043
|
+
function J(e, t, n) {
|
|
2044
|
+
this.k = e, this.x = t, this.y = n;
|
|
2045
|
+
}
|
|
2046
|
+
J.prototype = {
|
|
2047
|
+
constructor: J,
|
|
2048
|
+
scale: function(e) {
|
|
2049
|
+
return e === 1 ? this : new J(this.k * e, this.x, this.y);
|
|
2050
|
+
},
|
|
2051
|
+
translate: function(e, t) {
|
|
2052
|
+
return e === 0 & t === 0 ? this : new J(this.k, this.x + this.k * e, this.y + this.k * t);
|
|
2053
|
+
},
|
|
2054
|
+
apply: function(e) {
|
|
2055
|
+
return [e[0] * this.k + this.x, e[1] * this.k + this.y];
|
|
2056
|
+
},
|
|
2057
|
+
applyX: function(e) {
|
|
2058
|
+
return e * this.k + this.x;
|
|
2059
|
+
},
|
|
2060
|
+
applyY: function(e) {
|
|
2061
|
+
return e * this.k + this.y;
|
|
2062
|
+
},
|
|
2063
|
+
invert: function(e) {
|
|
2064
|
+
return [(e[0] - this.x) / this.k, (e[1] - this.y) / this.k];
|
|
2065
|
+
},
|
|
2066
|
+
invertX: function(e) {
|
|
2067
|
+
return (e - this.x) / this.k;
|
|
2068
|
+
},
|
|
2069
|
+
invertY: function(e) {
|
|
2070
|
+
return (e - this.y) / this.k;
|
|
2071
|
+
},
|
|
2072
|
+
rescaleX: function(e) {
|
|
2073
|
+
return e.copy().domain(e.range().map(this.invertX, this).map(e.invert, e));
|
|
2074
|
+
},
|
|
2075
|
+
rescaleY: function(e) {
|
|
2076
|
+
return e.copy().domain(e.range().map(this.invertY, this).map(e.invert, e));
|
|
2077
|
+
},
|
|
2078
|
+
toString: function() {
|
|
2079
|
+
return "translate(" + this.x + "," + this.y + ") scale(" + this.k + ")";
|
|
2080
|
+
}
|
|
2081
|
+
};
|
|
2082
|
+
var Ti = new J(1, 0, 0);
|
|
2083
|
+
Ei.prototype = J.prototype;
|
|
2084
|
+
function Ei(e) {
|
|
2085
|
+
for (; !e.__zoom;) if (!(e = e.parentNode)) return Ti;
|
|
2086
|
+
return e.__zoom;
|
|
2087
|
+
}
|
|
2088
|
+
//#endregion
|
|
2089
|
+
//#region node_modules/d3-zoom/src/noevent.js
|
|
2090
|
+
function Di(e) {
|
|
2091
|
+
e.stopImmediatePropagation();
|
|
2092
|
+
}
|
|
2093
|
+
function Oi(e) {
|
|
2094
|
+
e.preventDefault(), e.stopImmediatePropagation();
|
|
359
2095
|
}
|
|
360
2096
|
//#endregion
|
|
361
|
-
//#region node_modules/d3-
|
|
362
|
-
function
|
|
363
|
-
return e.
|
|
2097
|
+
//#region node_modules/d3-zoom/src/zoom.js
|
|
2098
|
+
function ki(e) {
|
|
2099
|
+
return (!e.ctrlKey || e.type === "wheel") && !e.button;
|
|
364
2100
|
}
|
|
365
|
-
function
|
|
366
|
-
|
|
2101
|
+
function Ai() {
|
|
2102
|
+
var e = this;
|
|
2103
|
+
return e instanceof SVGElement ? (e = e.ownerSVGElement || e, e.hasAttribute("viewBox") ? (e = e.viewBox.baseVal, [[e.x, e.y], [e.x + e.width, e.y + e.height]]) : [[0, 0], [e.width.baseVal.value, e.height.baseVal.value]]) : [[0, 0], [e.clientWidth, e.clientHeight]];
|
|
367
2104
|
}
|
|
368
|
-
function
|
|
369
|
-
|
|
2105
|
+
function ji() {
|
|
2106
|
+
return this.__zoom || Ti;
|
|
370
2107
|
}
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
this._names.indexOf(e) < 0 && (this._names.push(e), this._node.setAttribute("class", this._names.join(" ")));
|
|
374
|
-
},
|
|
375
|
-
remove: function(e) {
|
|
376
|
-
var t = this._names.indexOf(e);
|
|
377
|
-
t >= 0 && (this._names.splice(t, 1), this._node.setAttribute("class", this._names.join(" ")));
|
|
378
|
-
},
|
|
379
|
-
contains: function(e) {
|
|
380
|
-
return this._names.indexOf(e) >= 0;
|
|
381
|
-
}
|
|
382
|
-
};
|
|
383
|
-
function N(e, t) {
|
|
384
|
-
for (var n = j(e), r = -1, i = t.length; ++r < i;) n.add(t[r]);
|
|
2108
|
+
function Mi(e) {
|
|
2109
|
+
return -e.deltaY * (e.deltaMode === 1 ? .05 : e.deltaMode ? 1 : .002) * (e.ctrlKey ? 10 : 1);
|
|
385
2110
|
}
|
|
386
|
-
function
|
|
387
|
-
|
|
2111
|
+
function Ni() {
|
|
2112
|
+
return navigator.maxTouchPoints || "ontouchstart" in this;
|
|
388
2113
|
}
|
|
389
|
-
function
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
};
|
|
2114
|
+
function Pi(e, t, n) {
|
|
2115
|
+
var r = e.invertX(t[0][0]) - n[0][0], i = e.invertX(t[1][0]) - n[1][0], a = e.invertY(t[0][1]) - n[0][1], o = e.invertY(t[1][1]) - n[1][1];
|
|
2116
|
+
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));
|
|
393
2117
|
}
|
|
394
|
-
function
|
|
395
|
-
|
|
396
|
-
|
|
2118
|
+
function Fi() {
|
|
2119
|
+
var e = ki, t = Ai, n = Pi, r = Mi, i = Ni, a = [0, Infinity], o = [[-Infinity, -Infinity], [Infinity, Infinity]], s = 250, c = Gn, l = O("start", "zoom", "end"), u, d, f, p = 500, m = 150, h = 0, g = 10;
|
|
2120
|
+
function _(e) {
|
|
2121
|
+
e.property("__zoom", ji).on("wheel.zoom", te, { passive: !1 }).on("mousedown.zoom", ne).on("dblclick.zoom", C).filter(i).on("touchstart.zoom", re).on("touchmove.zoom", ie).on("touchend.zoom touchcancel.zoom", ae).style("-webkit-tap-highlight-color", "rgba(0,0,0,0)");
|
|
2122
|
+
}
|
|
2123
|
+
_.transform = function(e, t, n, r) {
|
|
2124
|
+
var i = e.selection ? e.selection() : e;
|
|
2125
|
+
i.property("__zoom", ji), e === i ? i.interrupt().each(function() {
|
|
2126
|
+
S(this, arguments).event(r).start().zoom(null, typeof t == "function" ? t.apply(this, arguments) : t).end();
|
|
2127
|
+
}) : x(e, t, n, r);
|
|
2128
|
+
}, _.scaleBy = function(e, t, n, r) {
|
|
2129
|
+
_.scaleTo(e, function() {
|
|
2130
|
+
return this.__zoom.k * (typeof t == "function" ? t.apply(this, arguments) : t);
|
|
2131
|
+
}, n, r);
|
|
2132
|
+
}, _.scaleTo = function(e, r, i, a) {
|
|
2133
|
+
_.transform(e, function() {
|
|
2134
|
+
var e = t.apply(this, arguments), a = this.__zoom, s = i == null ? b(e) : typeof i == "function" ? i.apply(this, arguments) : i, c = a.invert(s), l = typeof r == "function" ? r.apply(this, arguments) : r;
|
|
2135
|
+
return n(y(v(a, l), s, c), e, o);
|
|
2136
|
+
}, i, a);
|
|
2137
|
+
}, _.translateBy = function(e, r, i, a) {
|
|
2138
|
+
_.transform(e, function() {
|
|
2139
|
+
return n(this.__zoom.translate(typeof r == "function" ? r.apply(this, arguments) : r, typeof i == "function" ? i.apply(this, arguments) : i), t.apply(this, arguments), o);
|
|
2140
|
+
}, null, a);
|
|
2141
|
+
}, _.translateTo = function(e, r, i, a, s) {
|
|
2142
|
+
_.transform(e, function() {
|
|
2143
|
+
var e = t.apply(this, arguments), s = this.__zoom, c = a == null ? b(e) : typeof a == "function" ? a.apply(this, arguments) : a;
|
|
2144
|
+
return n(Ti.translate(c[0], c[1]).scale(s.k).translate(typeof r == "function" ? -r.apply(this, arguments) : -r, typeof i == "function" ? -i.apply(this, arguments) : -i), e, o);
|
|
2145
|
+
}, a, s);
|
|
397
2146
|
};
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
2147
|
+
function v(e, t) {
|
|
2148
|
+
return t = Math.max(a[0], Math.min(a[1], t)), t === e.k ? e : new J(t, e.x, e.y);
|
|
2149
|
+
}
|
|
2150
|
+
function y(e, t, n) {
|
|
2151
|
+
var r = t[0] - n[0] * e.k, i = t[1] - n[1] * e.k;
|
|
2152
|
+
return r === e.x && i === e.y ? e : new J(e.k, r, i);
|
|
2153
|
+
}
|
|
2154
|
+
function b(e) {
|
|
2155
|
+
return [(+e[0][0] + +e[1][0]) / 2, (+e[0][1] + +e[1][1]) / 2];
|
|
2156
|
+
}
|
|
2157
|
+
function x(e, n, r, i) {
|
|
2158
|
+
e.on("start.zoom", function() {
|
|
2159
|
+
S(this, arguments).event(i).start();
|
|
2160
|
+
}).on("interrupt.zoom end.zoom", function() {
|
|
2161
|
+
S(this, arguments).event(i).end();
|
|
2162
|
+
}).tween("zoom", function() {
|
|
2163
|
+
var e = this, a = arguments, o = S(e, a).event(i), s = t.apply(e, a), l = r == null ? b(s) : typeof r == "function" ? r.apply(e, a) : r, u = Math.max(s[1][0] - s[0][0], s[1][1] - s[0][1]), d = e.__zoom, f = typeof n == "function" ? n.apply(e, a) : n, p = c(d.invert(l).concat(u / d.k), f.invert(l).concat(u / f.k));
|
|
2164
|
+
return function(e) {
|
|
2165
|
+
if (e === 1) e = f;
|
|
2166
|
+
else {
|
|
2167
|
+
var t = p(e), n = u / t[2];
|
|
2168
|
+
e = new J(n, l[0] - t[0] * n, l[1] - t[1] * n);
|
|
2169
|
+
}
|
|
2170
|
+
o.zoom(null, e);
|
|
2171
|
+
};
|
|
2172
|
+
});
|
|
2173
|
+
}
|
|
2174
|
+
function S(e, t, n) {
|
|
2175
|
+
return !n && e.__zooming || new ee(e, t);
|
|
2176
|
+
}
|
|
2177
|
+
function ee(e, n) {
|
|
2178
|
+
this.that = e, this.args = n, this.active = 0, this.sourceEvent = null, this.extent = t.apply(e, n), this.taps = 0;
|
|
2179
|
+
}
|
|
2180
|
+
ee.prototype = {
|
|
2181
|
+
event: function(e) {
|
|
2182
|
+
return e && (this.sourceEvent = e), this;
|
|
2183
|
+
},
|
|
2184
|
+
start: function() {
|
|
2185
|
+
return ++this.active === 1 && (this.that.__zooming = this, this.emit("start")), this;
|
|
2186
|
+
},
|
|
2187
|
+
zoom: function(e, t) {
|
|
2188
|
+
return this.mouse && e !== "mouse" && (this.mouse[1] = t.invert(this.mouse[0])), this.touch0 && e !== "touch" && (this.touch0[1] = t.invert(this.touch0[0])), this.touch1 && e !== "touch" && (this.touch1[1] = t.invert(this.touch1[0])), this.that.__zoom = t, this.emit("zoom"), this;
|
|
2189
|
+
},
|
|
2190
|
+
end: function() {
|
|
2191
|
+
return --this.active === 0 && (delete this.that.__zooming, this.emit("end")), this;
|
|
2192
|
+
},
|
|
2193
|
+
emit: function(e) {
|
|
2194
|
+
var t = E(this.that).datum();
|
|
2195
|
+
l.call(e, this.that, new wi(e, {
|
|
2196
|
+
sourceEvent: this.sourceEvent,
|
|
2197
|
+
target: _,
|
|
2198
|
+
type: e,
|
|
2199
|
+
transform: this.that.__zoom,
|
|
2200
|
+
dispatch: l
|
|
2201
|
+
}), t);
|
|
2202
|
+
}
|
|
402
2203
|
};
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
2204
|
+
function te(t, ...i) {
|
|
2205
|
+
if (!e.apply(this, arguments)) return;
|
|
2206
|
+
var s = S(this, i).event(t), c = this.__zoom, l = Math.max(a[0], Math.min(a[1], c.k * 2 ** r.apply(this, arguments))), u = D(t);
|
|
2207
|
+
if (s.wheel) (s.mouse[0][0] !== u[0] || s.mouse[0][1] !== u[1]) && (s.mouse[1] = c.invert(s.mouse[0] = u)), clearTimeout(s.wheel);
|
|
2208
|
+
else if (c.k === l) return;
|
|
2209
|
+
else s.mouse = [u, c.invert(u)], mr(this), s.start();
|
|
2210
|
+
Oi(t), s.wheel = setTimeout(d, m), s.zoom("mouse", n(y(v(c, l), s.mouse[0], s.mouse[1]), s.extent, o));
|
|
2211
|
+
function d() {
|
|
2212
|
+
s.wheel = null, s.end();
|
|
2213
|
+
}
|
|
2214
|
+
}
|
|
2215
|
+
function ne(t, ...r) {
|
|
2216
|
+
if (f || !e.apply(this, arguments)) return;
|
|
2217
|
+
var i = t.currentTarget, a = S(this, r, !0).event(t), s = E(t.view).on("mousemove.zoom", d, !0).on("mouseup.zoom", p, !0), c = D(t, i), l = t.clientX, u = t.clientY;
|
|
2218
|
+
Pt(t.view), Di(t), a.mouse = [c, this.__zoom.invert(c)], mr(this), a.start();
|
|
2219
|
+
function d(e) {
|
|
2220
|
+
if (Oi(e), !a.moved) {
|
|
2221
|
+
var t = e.clientX - l, r = e.clientY - u;
|
|
2222
|
+
a.moved = t * t + r * r > h;
|
|
2223
|
+
}
|
|
2224
|
+
a.event(e).zoom("mouse", n(y(a.that.__zoom, a.mouse[0] = D(e, i), a.mouse[1]), a.extent, o));
|
|
2225
|
+
}
|
|
2226
|
+
function p(e) {
|
|
2227
|
+
s.on("mousemove.zoom mouseup.zoom", null), Ft(e.view, a.moved), Oi(e), a.event(e).end();
|
|
2228
|
+
}
|
|
2229
|
+
}
|
|
2230
|
+
function C(r, ...i) {
|
|
2231
|
+
if (e.apply(this, arguments)) {
|
|
2232
|
+
var a = this.__zoom, c = D(r.changedTouches ? r.changedTouches[0] : r, this), l = a.invert(c), u = a.k * (r.shiftKey ? .5 : 2), d = n(y(v(a, u), c, l), t.apply(this, i), o);
|
|
2233
|
+
Oi(r), s > 0 ? E(this).transition().duration(s).call(x, d, c, r) : E(this).call(_.transform, d, c, r);
|
|
2234
|
+
}
|
|
2235
|
+
}
|
|
2236
|
+
function re(t, ...n) {
|
|
2237
|
+
if (e.apply(this, arguments)) {
|
|
2238
|
+
var r = t.touches, i = r.length, a = S(this, n, t.changedTouches.length === i).event(t), o, s, c, l;
|
|
2239
|
+
for (Di(t), s = 0; s < i; ++s) c = r[s], l = D(c, this), l = [
|
|
2240
|
+
l,
|
|
2241
|
+
this.__zoom.invert(l),
|
|
2242
|
+
c.identifier
|
|
2243
|
+
], a.touch0 ? !a.touch1 && a.touch0[2] !== l[2] && (a.touch1 = l, a.taps = 0) : (a.touch0 = l, o = !0, a.taps = 1 + !!u);
|
|
2244
|
+
u &&= clearTimeout(u), o && (a.taps < 2 && (d = l[0], u = setTimeout(function() {
|
|
2245
|
+
u = null;
|
|
2246
|
+
}, p)), mr(this), a.start());
|
|
2247
|
+
}
|
|
2248
|
+
}
|
|
2249
|
+
function ie(e, ...t) {
|
|
2250
|
+
if (this.__zooming) {
|
|
2251
|
+
var r = S(this, t).event(e), i = e.changedTouches, a = i.length, s, c, l, u;
|
|
2252
|
+
for (Oi(e), s = 0; s < a; ++s) c = i[s], l = D(c, this), r.touch0 && r.touch0[2] === c.identifier ? r.touch0[0] = l : r.touch1 && r.touch1[2] === c.identifier && (r.touch1[0] = l);
|
|
2253
|
+
if (c = r.that.__zoom, r.touch1) {
|
|
2254
|
+
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;
|
|
2255
|
+
c = v(c, 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];
|
|
2256
|
+
} else if (r.touch0) l = r.touch0[0], u = r.touch0[1];
|
|
2257
|
+
else return;
|
|
2258
|
+
r.zoom("touch", n(y(c, l, u), r.extent, o));
|
|
2259
|
+
}
|
|
409
2260
|
}
|
|
410
|
-
|
|
2261
|
+
function ae(e, ...t) {
|
|
2262
|
+
if (this.__zooming) {
|
|
2263
|
+
var n = S(this, t).event(e), r = e.changedTouches, i = r.length, a, o;
|
|
2264
|
+
for (Di(e), f && clearTimeout(f), f = setTimeout(function() {
|
|
2265
|
+
f = null;
|
|
2266
|
+
}, p), a = 0; a < i; ++a) o = r[a], n.touch0 && n.touch0[2] === o.identifier ? delete n.touch0 : n.touch1 && n.touch1[2] === o.identifier && delete n.touch1;
|
|
2267
|
+
if (n.touch1 && !n.touch0 && (n.touch0 = n.touch1, delete n.touch1), n.touch0) n.touch0[1] = this.__zoom.invert(n.touch0[0]);
|
|
2268
|
+
else if (n.end(), n.taps === 2 && (o = D(o, this), Math.hypot(d[0] - o[0], d[1] - o[1]) < g)) {
|
|
2269
|
+
var s = E(this).on("dblclick.zoom");
|
|
2270
|
+
s && s.apply(this, arguments);
|
|
2271
|
+
}
|
|
2272
|
+
}
|
|
2273
|
+
}
|
|
2274
|
+
return _.wheelDelta = function(e) {
|
|
2275
|
+
return arguments.length ? (r = typeof e == "function" ? e : Ci(+e), _) : r;
|
|
2276
|
+
}, _.filter = function(t) {
|
|
2277
|
+
return arguments.length ? (e = typeof t == "function" ? t : Ci(!!t), _) : e;
|
|
2278
|
+
}, _.touchable = function(e) {
|
|
2279
|
+
return arguments.length ? (i = typeof e == "function" ? e : Ci(!!e), _) : i;
|
|
2280
|
+
}, _.extent = function(e) {
|
|
2281
|
+
return arguments.length ? (t = typeof e == "function" ? e : Ci([[+e[0][0], +e[0][1]], [+e[1][0], +e[1][1]]]), _) : t;
|
|
2282
|
+
}, _.scaleExtent = function(e) {
|
|
2283
|
+
return arguments.length ? (a[0] = +e[0], a[1] = +e[1], _) : [a[0], a[1]];
|
|
2284
|
+
}, _.translateExtent = function(e) {
|
|
2285
|
+
return arguments.length ? (o[0][0] = +e[0][0], o[1][0] = +e[1][0], o[0][1] = +e[0][1], o[1][1] = +e[1][1], _) : [[o[0][0], o[0][1]], [o[1][0], o[1][1]]];
|
|
2286
|
+
}, _.constrain = function(e) {
|
|
2287
|
+
return arguments.length ? (n = e, _) : n;
|
|
2288
|
+
}, _.duration = function(e) {
|
|
2289
|
+
return arguments.length ? (s = +e, _) : s;
|
|
2290
|
+
}, _.interpolate = function(e) {
|
|
2291
|
+
return arguments.length ? (c = e, _) : c;
|
|
2292
|
+
}, _.on = function() {
|
|
2293
|
+
var e = l.on.apply(l, arguments);
|
|
2294
|
+
return e === l ? _ : e;
|
|
2295
|
+
}, _.clickDistance = function(e) {
|
|
2296
|
+
return arguments.length ? (h = (e = +e) * e, _) : Math.sqrt(h);
|
|
2297
|
+
}, _.tapDistance = function(e) {
|
|
2298
|
+
return arguments.length ? (g = +e, _) : g;
|
|
2299
|
+
}, _;
|
|
411
2300
|
}
|
|
412
2301
|
//#endregion
|
|
413
|
-
//#region node_modules/d3-
|
|
414
|
-
function
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
function
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
2302
|
+
//#region node_modules/d3-force/src/center.js
|
|
2303
|
+
function Ii(e, t) {
|
|
2304
|
+
var n, r = 1;
|
|
2305
|
+
e ??= 0, t ??= 0;
|
|
2306
|
+
function i() {
|
|
2307
|
+
var i, a = n.length, o, s = 0, c = 0;
|
|
2308
|
+
for (i = 0; i < a; ++i) o = n[i], s += o.x, c += o.y;
|
|
2309
|
+
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;
|
|
2310
|
+
}
|
|
2311
|
+
return i.initialize = function(e) {
|
|
2312
|
+
n = e;
|
|
2313
|
+
}, i.x = function(t) {
|
|
2314
|
+
return arguments.length ? (e = +t, i) : e;
|
|
2315
|
+
}, i.y = function(e) {
|
|
2316
|
+
return arguments.length ? (t = +e, i) : t;
|
|
2317
|
+
}, i.strength = function(e) {
|
|
2318
|
+
return arguments.length ? (r = +e, i) : r;
|
|
2319
|
+
}, i;
|
|
421
2320
|
}
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
2321
|
+
//#endregion
|
|
2322
|
+
//#region node_modules/d3-quadtree/src/add.js
|
|
2323
|
+
function Li(e) {
|
|
2324
|
+
let t = +this._x.call(null, e), n = +this._y.call(null, e);
|
|
2325
|
+
return Ri(this.cover(t, n), t, n, e);
|
|
2326
|
+
}
|
|
2327
|
+
function Ri(e, t, n, r) {
|
|
2328
|
+
if (isNaN(t) || isNaN(n)) return e;
|
|
2329
|
+
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;
|
|
2330
|
+
if (!a) return e._root = o, e;
|
|
2331
|
+
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;
|
|
2332
|
+
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;
|
|
2333
|
+
do
|
|
2334
|
+
i = i ? i[_] = [
|
|
2335
|
+
,
|
|
2336
|
+
,
|
|
2337
|
+
,
|
|
2338
|
+
,
|
|
2339
|
+
] : e._root = [
|
|
2340
|
+
,
|
|
2341
|
+
,
|
|
2342
|
+
,
|
|
2343
|
+
,
|
|
2344
|
+
], (h = t >= (d = (s + l) / 2)) ? s = d : l = d, (g = n >= (f = (c + u) / 2)) ? c = f : u = f;
|
|
2345
|
+
while ((_ = g << 1 | h) == (v = (m >= f) << 1 | p >= d));
|
|
2346
|
+
return i[v] = a, i[_] = o, e;
|
|
2347
|
+
}
|
|
2348
|
+
function zi(e) {
|
|
2349
|
+
var t, n, r = e.length, i, a, o = Array(r), s = Array(r), c = Infinity, l = Infinity, u = -Infinity, d = -Infinity;
|
|
2350
|
+
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, s[n] = a, i < c && (c = i), i > u && (u = i), a < l && (l = a), a > d && (d = a));
|
|
2351
|
+
if (c > u || l > d) return this;
|
|
2352
|
+
for (this.cover(c, l).cover(u, d), n = 0; n < r; ++n) Ri(this, o[n], s[n], e[n]);
|
|
2353
|
+
return this;
|
|
427
2354
|
}
|
|
428
|
-
|
|
429
|
-
|
|
2355
|
+
//#endregion
|
|
2356
|
+
//#region node_modules/d3-quadtree/src/cover.js
|
|
2357
|
+
function Bi(e, t) {
|
|
2358
|
+
if (isNaN(e = +e) || isNaN(t = +t)) return this;
|
|
2359
|
+
var n = this._x0, r = this._y0, i = this._x1, a = this._y1;
|
|
2360
|
+
if (isNaN(n)) i = (n = Math.floor(e)) + 1, a = (r = Math.floor(t)) + 1;
|
|
2361
|
+
else {
|
|
2362
|
+
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 = [
|
|
2363
|
+
,
|
|
2364
|
+
,
|
|
2365
|
+
,
|
|
2366
|
+
,
|
|
2367
|
+
], c[l] = s, s = c, o *= 2, l) {
|
|
2368
|
+
case 0:
|
|
2369
|
+
i = n + o, a = r + o;
|
|
2370
|
+
break;
|
|
2371
|
+
case 1:
|
|
2372
|
+
n = i - o, a = r + o;
|
|
2373
|
+
break;
|
|
2374
|
+
case 2:
|
|
2375
|
+
i = n + o, r = a - o;
|
|
2376
|
+
break;
|
|
2377
|
+
case 3: n = i - o, r = a - o;
|
|
2378
|
+
}
|
|
2379
|
+
this._root && this._root.length && (this._root = s);
|
|
2380
|
+
}
|
|
2381
|
+
return this._x0 = n, this._y0 = r, this._x1 = i, this._y1 = a, this;
|
|
430
2382
|
}
|
|
431
2383
|
//#endregion
|
|
432
|
-
//#region node_modules/d3-
|
|
433
|
-
function
|
|
434
|
-
|
|
2384
|
+
//#region node_modules/d3-quadtree/src/data.js
|
|
2385
|
+
function Vi() {
|
|
2386
|
+
var e = [];
|
|
2387
|
+
return this.visit(function(t) {
|
|
2388
|
+
if (!t.length) do
|
|
2389
|
+
e.push(t.data);
|
|
2390
|
+
while (t = t.next);
|
|
2391
|
+
}), e;
|
|
435
2392
|
}
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
2393
|
+
//#endregion
|
|
2394
|
+
//#region node_modules/d3-quadtree/src/extent.js
|
|
2395
|
+
function Hi(e) {
|
|
2396
|
+
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]];
|
|
440
2397
|
}
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
};
|
|
2398
|
+
//#endregion
|
|
2399
|
+
//#region node_modules/d3-quadtree/src/quad.js
|
|
2400
|
+
function Y(e, t, n, r, i) {
|
|
2401
|
+
this.node = e, this.x0 = t, this.y0 = n, this.x1 = r, this.y1 = i;
|
|
446
2402
|
}
|
|
447
|
-
|
|
448
|
-
|
|
2403
|
+
//#endregion
|
|
2404
|
+
//#region node_modules/d3-quadtree/src/find.js
|
|
2405
|
+
function Ui(e, t, n) {
|
|
2406
|
+
var r, i = this._x0, a = this._y0, o, s, c, l, u = this._x1, d = this._y1, f = [], p = this._root, m, h;
|
|
2407
|
+
for (p && f.push(new Y(p, i, a, u, d)), n == null ? n = Infinity : (i = e - n, a = t - n, u = e + n, d = t + n, n *= n); m = f.pop();) if (!(!(p = m.node) || (o = m.x0) > u || (s = m.y0) > d || (c = m.x1) < i || (l = m.y1) < a)) if (p.length) {
|
|
2408
|
+
var g = (o + c) / 2, _ = (s + l) / 2;
|
|
2409
|
+
f.push(new Y(p[3], g, _, c, l), new Y(p[2], o, _, g, l), new Y(p[1], g, s, c, _), new Y(p[0], o, s, g, _)), (h = (t >= _) << 1 | e >= g) && (m = f[f.length - 1], f[f.length - 1] = f[f.length - 1 - h], f[f.length - 1 - h] = m);
|
|
2410
|
+
} else {
|
|
2411
|
+
var v = e - +this._x.call(null, p.data), y = t - +this._y.call(null, p.data), b = v * v + y * y;
|
|
2412
|
+
if (b < n) {
|
|
2413
|
+
var x = Math.sqrt(n = b);
|
|
2414
|
+
i = e - x, a = t - x, u = e + x, d = t + x, r = p.data;
|
|
2415
|
+
}
|
|
2416
|
+
}
|
|
2417
|
+
return r;
|
|
449
2418
|
}
|
|
450
2419
|
//#endregion
|
|
451
|
-
//#region node_modules/d3-
|
|
452
|
-
function
|
|
453
|
-
this.
|
|
2420
|
+
//#region node_modules/d3-quadtree/src/remove.js
|
|
2421
|
+
function Wi(e) {
|
|
2422
|
+
if (isNaN(u = +this._x.call(null, e)) || isNaN(d = +this._y.call(null, e))) return this;
|
|
2423
|
+
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, _;
|
|
2424
|
+
if (!n) return this;
|
|
2425
|
+
if (n.length) for (;;) {
|
|
2426
|
+
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;
|
|
2427
|
+
if (!n.length) break;
|
|
2428
|
+
(t[g + 1 & 3] || t[g + 2 & 3] || t[g + 3 & 3]) && (r = t, _ = g);
|
|
2429
|
+
}
|
|
2430
|
+
for (; n.data !== e;) if (i = n, !(n = n.next)) return this;
|
|
2431
|
+
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);
|
|
454
2432
|
}
|
|
455
|
-
function
|
|
456
|
-
|
|
2433
|
+
function Gi(e) {
|
|
2434
|
+
for (var t = 0, n = e.length; t < n; ++t) this.remove(e[t]);
|
|
2435
|
+
return this;
|
|
457
2436
|
}
|
|
458
2437
|
//#endregion
|
|
459
|
-
//#region node_modules/d3-
|
|
460
|
-
function
|
|
461
|
-
|
|
462
|
-
}
|
|
463
|
-
function qe() {
|
|
464
|
-
return this.each(Ke);
|
|
2438
|
+
//#region node_modules/d3-quadtree/src/root.js
|
|
2439
|
+
function Ki() {
|
|
2440
|
+
return this._root;
|
|
465
2441
|
}
|
|
466
2442
|
//#endregion
|
|
467
|
-
//#region node_modules/d3-
|
|
468
|
-
function
|
|
469
|
-
var
|
|
470
|
-
return this.
|
|
471
|
-
|
|
472
|
-
|
|
2443
|
+
//#region node_modules/d3-quadtree/src/size.js
|
|
2444
|
+
function qi() {
|
|
2445
|
+
var e = 0;
|
|
2446
|
+
return this.visit(function(t) {
|
|
2447
|
+
if (!t.length) do
|
|
2448
|
+
++e;
|
|
2449
|
+
while (t = t.next);
|
|
2450
|
+
}), e;
|
|
473
2451
|
}
|
|
474
2452
|
//#endregion
|
|
475
|
-
//#region node_modules/d3-
|
|
476
|
-
function
|
|
477
|
-
|
|
2453
|
+
//#region node_modules/d3-quadtree/src/visit.js
|
|
2454
|
+
function Ji(e) {
|
|
2455
|
+
var t = [], n, r = this._root, i, a, o, s, c;
|
|
2456
|
+
for (r && t.push(new Y(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) {
|
|
2457
|
+
var l = (a + s) / 2, u = (o + c) / 2;
|
|
2458
|
+
(i = r[3]) && t.push(new Y(i, l, u, s, c)), (i = r[2]) && t.push(new Y(i, a, u, l, c)), (i = r[1]) && t.push(new Y(i, l, o, s, u)), (i = r[0]) && t.push(new Y(i, a, o, l, u));
|
|
2459
|
+
}
|
|
2460
|
+
return this;
|
|
478
2461
|
}
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
2462
|
+
//#endregion
|
|
2463
|
+
//#region node_modules/d3-quadtree/src/visitAfter.js
|
|
2464
|
+
function Yi(e) {
|
|
2465
|
+
var t = [], n = [], r;
|
|
2466
|
+
for (this._root && t.push(new Y(this._root, this._x0, this._y0, this._x1, this._y1)); r = t.pop();) {
|
|
2467
|
+
var i = r.node;
|
|
2468
|
+
if (i.length) {
|
|
2469
|
+
var a, o = r.x0, s = r.y0, c = r.x1, l = r.y1, u = (o + c) / 2, d = (s + l) / 2;
|
|
2470
|
+
(a = i[0]) && t.push(new Y(a, o, s, u, d)), (a = i[1]) && t.push(new Y(a, u, s, c, d)), (a = i[2]) && t.push(new Y(a, o, d, u, l)), (a = i[3]) && t.push(new Y(a, u, d, c, l));
|
|
2471
|
+
}
|
|
2472
|
+
n.push(r);
|
|
2473
|
+
}
|
|
2474
|
+
for (; r = n.pop();) e(r.node, r.x0, r.y0, r.x1, r.y1);
|
|
2475
|
+
return this;
|
|
484
2476
|
}
|
|
485
2477
|
//#endregion
|
|
486
|
-
//#region node_modules/d3-
|
|
487
|
-
function
|
|
488
|
-
|
|
489
|
-
e && e.removeChild(this);
|
|
2478
|
+
//#region node_modules/d3-quadtree/src/x.js
|
|
2479
|
+
function Xi(e) {
|
|
2480
|
+
return e[0];
|
|
490
2481
|
}
|
|
491
|
-
function
|
|
492
|
-
return this.
|
|
2482
|
+
function Zi(e) {
|
|
2483
|
+
return arguments.length ? (this._x = e, this) : this._x;
|
|
493
2484
|
}
|
|
494
2485
|
//#endregion
|
|
495
|
-
//#region node_modules/d3-
|
|
496
|
-
function
|
|
497
|
-
|
|
498
|
-
return t ? t.insertBefore(e, this.nextSibling) : e;
|
|
499
|
-
}
|
|
500
|
-
function et() {
|
|
501
|
-
var e = this.cloneNode(!0), t = this.parentNode;
|
|
502
|
-
return t ? t.insertBefore(e, this.nextSibling) : e;
|
|
2486
|
+
//#region node_modules/d3-quadtree/src/y.js
|
|
2487
|
+
function Qi(e) {
|
|
2488
|
+
return e[1];
|
|
503
2489
|
}
|
|
504
|
-
function
|
|
505
|
-
return
|
|
2490
|
+
function $i(e) {
|
|
2491
|
+
return arguments.length ? (this._y = e, this) : this._y;
|
|
506
2492
|
}
|
|
507
2493
|
//#endregion
|
|
508
|
-
//#region node_modules/d3-
|
|
509
|
-
function
|
|
510
|
-
|
|
511
|
-
|
|
2494
|
+
//#region node_modules/d3-quadtree/src/quadtree.js
|
|
2495
|
+
function ea(e, t, n) {
|
|
2496
|
+
var r = new ta(t ?? Xi, n ?? Qi, NaN, NaN, NaN, NaN);
|
|
2497
|
+
return e == null ? r : r.addAll(e);
|
|
2498
|
+
}
|
|
2499
|
+
function ta(e, t, n, r, i, a) {
|
|
2500
|
+
this._x = e, this._y = t, this._x0 = n, this._y0 = r, this._x1 = i, this._y1 = a, this._root = void 0;
|
|
2501
|
+
}
|
|
2502
|
+
function na(e) {
|
|
2503
|
+
for (var t = { data: e.data }, n = t; e = e.next;) n = n.next = { data: e.data };
|
|
2504
|
+
return t;
|
|
2505
|
+
}
|
|
2506
|
+
var X = ea.prototype = ta.prototype;
|
|
2507
|
+
X.copy = function() {
|
|
2508
|
+
var e = new ta(this._x, this._y, this._x0, this._y0, this._x1, this._y1), t = this._root, n, r;
|
|
2509
|
+
if (!t) return e;
|
|
2510
|
+
if (!t.length) return e._root = na(t), e;
|
|
2511
|
+
for (n = [{
|
|
2512
|
+
source: t,
|
|
2513
|
+
target: e._root = [
|
|
2514
|
+
,
|
|
2515
|
+
,
|
|
2516
|
+
,
|
|
2517
|
+
,
|
|
2518
|
+
]
|
|
2519
|
+
}]; t = n.pop();) for (var i = 0; i < 4; ++i) (r = t.source[i]) && (r.length ? n.push({
|
|
2520
|
+
source: r,
|
|
2521
|
+
target: t.target[i] = [
|
|
2522
|
+
,
|
|
2523
|
+
,
|
|
2524
|
+
,
|
|
2525
|
+
,
|
|
2526
|
+
]
|
|
2527
|
+
}) : t.target[i] = na(r));
|
|
2528
|
+
return e;
|
|
2529
|
+
}, X.add = Li, X.addAll = zi, X.cover = Bi, X.data = Vi, X.extent = Hi, X.find = Ui, X.remove = Wi, X.removeAll = Gi, X.root = Ki, X.size = qi, X.visit = Ji, X.visitAfter = Yi, X.x = Zi, X.y = $i;
|
|
512
2530
|
//#endregion
|
|
513
|
-
//#region node_modules/d3-
|
|
514
|
-
function
|
|
515
|
-
return function(
|
|
516
|
-
e
|
|
2531
|
+
//#region node_modules/d3-force/src/constant.js
|
|
2532
|
+
function ra(e) {
|
|
2533
|
+
return function() {
|
|
2534
|
+
return e;
|
|
517
2535
|
};
|
|
518
2536
|
}
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
type: e,
|
|
524
|
-
name: t
|
|
525
|
-
};
|
|
526
|
-
});
|
|
2537
|
+
//#endregion
|
|
2538
|
+
//#region node_modules/d3-force/src/jiggle.js
|
|
2539
|
+
function Z(e) {
|
|
2540
|
+
return (e() - .5) * 1e-6;
|
|
527
2541
|
}
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
for (var n = 0, r = -1, i = t.length, a; n < i; ++n) a = t[n], (!e.type || a.type === e.type) && a.name === e.name ? this.removeEventListener(a.type, a.listener, a.options) : t[++r] = a;
|
|
533
|
-
++r ? t.length = r : delete this.__on;
|
|
534
|
-
}
|
|
535
|
-
};
|
|
2542
|
+
//#endregion
|
|
2543
|
+
//#region node_modules/d3-force/src/link.js
|
|
2544
|
+
function ia(e) {
|
|
2545
|
+
return e.index;
|
|
536
2546
|
}
|
|
537
|
-
function
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
for (var o = 0, s = r.length; o < s; ++o) if ((i = r[o]).type === e.type && i.name === e.name) {
|
|
542
|
-
this.removeEventListener(i.type, i.listener, i.options), this.addEventListener(i.type, i.listener = a, i.options = n), i.value = t;
|
|
543
|
-
return;
|
|
544
|
-
}
|
|
545
|
-
}
|
|
546
|
-
this.addEventListener(e.type, a, n), i = {
|
|
547
|
-
type: e.type,
|
|
548
|
-
name: e.name,
|
|
549
|
-
value: t,
|
|
550
|
-
listener: a,
|
|
551
|
-
options: n
|
|
552
|
-
}, r ? r.push(i) : this.__on = [i];
|
|
553
|
-
};
|
|
2547
|
+
function aa(e, t) {
|
|
2548
|
+
var n = e.get(t);
|
|
2549
|
+
if (!n) throw Error("node not found: " + t);
|
|
2550
|
+
return n;
|
|
554
2551
|
}
|
|
555
|
-
function
|
|
556
|
-
var
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
2552
|
+
function oa(e) {
|
|
2553
|
+
var t = ia, n = d, r, i = ra(30), a, o, s, c, l, u = 1;
|
|
2554
|
+
e ??= [];
|
|
2555
|
+
function d(e) {
|
|
2556
|
+
return 1 / Math.min(s[e.source.index], s[e.target.index]);
|
|
2557
|
+
}
|
|
2558
|
+
function f(t) {
|
|
2559
|
+
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 || Z(l), m = f.y + f.vy - d.y - d.vy || Z(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;
|
|
2560
|
+
}
|
|
2561
|
+
function p() {
|
|
2562
|
+
if (o) {
|
|
2563
|
+
var n, i = o.length, l = e.length, u = new Map(o.map((e, n) => [t(e, n, o), e])), d;
|
|
2564
|
+
for (n = 0, s = Array(i); n < l; ++n) d = e[n], d.index = n, typeof d.source != "object" && (d.source = aa(u, d.source)), typeof d.target != "object" && (d.target = aa(u, d.target)), s[d.source.index] = (s[d.source.index] || 0) + 1, s[d.target.index] = (s[d.target.index] || 0) + 1;
|
|
2565
|
+
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]);
|
|
2566
|
+
r = Array(l), m(), a = Array(l), h();
|
|
561
2567
|
}
|
|
562
|
-
return;
|
|
563
2568
|
}
|
|
564
|
-
|
|
565
|
-
|
|
2569
|
+
function m() {
|
|
2570
|
+
if (o) for (var t = 0, i = e.length; t < i; ++t) r[t] = +n(e[t], t, e);
|
|
2571
|
+
}
|
|
2572
|
+
function h() {
|
|
2573
|
+
if (o) for (var t = 0, n = e.length; t < n; ++t) a[t] = +i(e[t], t, e);
|
|
2574
|
+
}
|
|
2575
|
+
return f.initialize = function(e, t) {
|
|
2576
|
+
o = e, l = t, p();
|
|
2577
|
+
}, f.links = function(t) {
|
|
2578
|
+
return arguments.length ? (e = t, p(), f) : e;
|
|
2579
|
+
}, f.id = function(e) {
|
|
2580
|
+
return arguments.length ? (t = e, f) : t;
|
|
2581
|
+
}, f.iterations = function(e) {
|
|
2582
|
+
return arguments.length ? (u = +e, f) : u;
|
|
2583
|
+
}, f.strength = function(e) {
|
|
2584
|
+
return arguments.length ? (n = typeof e == "function" ? e : ra(+e), m(), f) : n;
|
|
2585
|
+
}, f.distance = function(e) {
|
|
2586
|
+
return arguments.length ? (i = typeof e == "function" ? e : ra(+e), h(), f) : i;
|
|
2587
|
+
}, f;
|
|
566
2588
|
}
|
|
567
2589
|
//#endregion
|
|
568
|
-
//#region node_modules/d3-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
2590
|
+
//#region node_modules/d3-force/src/lcg.js
|
|
2591
|
+
var sa = 1664525, ca = 1013904223, la = 4294967296;
|
|
2592
|
+
function ua() {
|
|
2593
|
+
let e = 1;
|
|
2594
|
+
return () => (e = (sa * e + ca) % la) / la;
|
|
572
2595
|
}
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
}
|
|
578
|
-
function
|
|
579
|
-
return
|
|
580
|
-
|
|
2596
|
+
//#endregion
|
|
2597
|
+
//#region node_modules/d3-force/src/simulation.js
|
|
2598
|
+
function da(e) {
|
|
2599
|
+
return e.x;
|
|
2600
|
+
}
|
|
2601
|
+
function fa(e) {
|
|
2602
|
+
return e.y;
|
|
2603
|
+
}
|
|
2604
|
+
var pa = 10, ma = Math.PI * (3 - Math.sqrt(5));
|
|
2605
|
+
function ha(e) {
|
|
2606
|
+
var t, n = 1, r = .001, i = 1 - r ** (1 / 300), a = 0, o = .6, s = /* @__PURE__ */ new Map(), c = nr(d), l = O("tick", "end"), u = ua();
|
|
2607
|
+
e ??= [];
|
|
2608
|
+
function d() {
|
|
2609
|
+
f(), l.call("tick", t), n < r && (c.stop(), l.call("end", t));
|
|
2610
|
+
}
|
|
2611
|
+
function f(r) {
|
|
2612
|
+
var c, l = e.length, u;
|
|
2613
|
+
r === void 0 && (r = 1);
|
|
2614
|
+
for (var d = 0; d < r; ++d) for (n += (a - n) * i, s.forEach(function(e) {
|
|
2615
|
+
e(n);
|
|
2616
|
+
}), c = 0; c < l; ++c) u = e[c], u.fx == null ? u.x += u.vx *= o : (u.x = u.fx, u.vx = 0), u.fy == null ? u.y += u.vy *= o : (u.y = u.fy, u.vy = 0);
|
|
2617
|
+
return t;
|
|
2618
|
+
}
|
|
2619
|
+
function p() {
|
|
2620
|
+
for (var t = 0, n = e.length, r; t < n; ++t) {
|
|
2621
|
+
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)) {
|
|
2622
|
+
var i = pa * Math.sqrt(.5 + t), a = t * ma;
|
|
2623
|
+
r.x = i * Math.cos(a), r.y = i * Math.sin(a);
|
|
2624
|
+
}
|
|
2625
|
+
(isNaN(r.vx) || isNaN(r.vy)) && (r.vx = r.vy = 0);
|
|
2626
|
+
}
|
|
2627
|
+
}
|
|
2628
|
+
function m(t) {
|
|
2629
|
+
return t.initialize && t.initialize(e, u), t;
|
|
2630
|
+
}
|
|
2631
|
+
return p(), t = {
|
|
2632
|
+
tick: f,
|
|
2633
|
+
restart: function() {
|
|
2634
|
+
return c.restart(d), t;
|
|
2635
|
+
},
|
|
2636
|
+
stop: function() {
|
|
2637
|
+
return c.stop(), t;
|
|
2638
|
+
},
|
|
2639
|
+
nodes: function(n) {
|
|
2640
|
+
return arguments.length ? (e = n, p(), s.forEach(m), t) : e;
|
|
2641
|
+
},
|
|
2642
|
+
alpha: function(e) {
|
|
2643
|
+
return arguments.length ? (n = +e, t) : n;
|
|
2644
|
+
},
|
|
2645
|
+
alphaMin: function(e) {
|
|
2646
|
+
return arguments.length ? (r = +e, t) : r;
|
|
2647
|
+
},
|
|
2648
|
+
alphaDecay: function(e) {
|
|
2649
|
+
return arguments.length ? (i = +e, t) : +i;
|
|
2650
|
+
},
|
|
2651
|
+
alphaTarget: function(e) {
|
|
2652
|
+
return arguments.length ? (a = +e, t) : a;
|
|
2653
|
+
},
|
|
2654
|
+
velocityDecay: function(e) {
|
|
2655
|
+
return arguments.length ? (o = 1 - e, t) : 1 - o;
|
|
2656
|
+
},
|
|
2657
|
+
randomSource: function(e) {
|
|
2658
|
+
return arguments.length ? (u = e, s.forEach(m), t) : u;
|
|
2659
|
+
},
|
|
2660
|
+
force: function(e, n) {
|
|
2661
|
+
return arguments.length > 1 ? (n == null ? s.delete(e) : s.set(e, m(n)), t) : s.get(e);
|
|
2662
|
+
},
|
|
2663
|
+
find: function(t, n, r) {
|
|
2664
|
+
var i = 0, a = e.length, o, s, c, l, u;
|
|
2665
|
+
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);
|
|
2666
|
+
return u;
|
|
2667
|
+
},
|
|
2668
|
+
on: function(e, n) {
|
|
2669
|
+
return arguments.length > 1 ? (l.on(e, n), t) : l.on(e);
|
|
2670
|
+
}
|
|
581
2671
|
};
|
|
582
2672
|
}
|
|
583
|
-
function ut(e, t) {
|
|
584
|
-
return this.each((typeof t == "function" ? lt : ct)(e, t));
|
|
585
|
-
}
|
|
586
2673
|
//#endregion
|
|
587
|
-
//#region node_modules/d3-
|
|
588
|
-
function
|
|
589
|
-
|
|
2674
|
+
//#region node_modules/d3-force/src/manyBody.js
|
|
2675
|
+
function ga() {
|
|
2676
|
+
var e, t, n, r, i = ra(-30), a, o = 1, s = Infinity, c = .81;
|
|
2677
|
+
function l(n) {
|
|
2678
|
+
var i, a = e.length, o = ea(e, da, fa).visitAfter(d);
|
|
2679
|
+
for (r = n, i = 0; i < a; ++i) t = e[i], o.visit(f);
|
|
2680
|
+
}
|
|
2681
|
+
function u() {
|
|
2682
|
+
if (e) {
|
|
2683
|
+
var t, n = e.length, r;
|
|
2684
|
+
for (a = Array(n), t = 0; t < n; ++t) r = e[t], a[r.index] = +i(r, t, e);
|
|
2685
|
+
}
|
|
2686
|
+
}
|
|
2687
|
+
function d(e) {
|
|
2688
|
+
var t = 0, n, r, i = 0, o, s, c;
|
|
2689
|
+
if (e.length) {
|
|
2690
|
+
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);
|
|
2691
|
+
e.x = o / i, e.y = s / i;
|
|
2692
|
+
} else {
|
|
2693
|
+
n = e, n.x = n.data.x, n.y = n.data.y;
|
|
2694
|
+
do
|
|
2695
|
+
t += a[n.data.index];
|
|
2696
|
+
while (n = n.next);
|
|
2697
|
+
}
|
|
2698
|
+
e.value = t;
|
|
2699
|
+
}
|
|
2700
|
+
function f(e, i, l, u) {
|
|
2701
|
+
if (!e.value) return !0;
|
|
2702
|
+
var d = e.x - t.x, f = e.y - t.y, p = u - i, m = d * d + f * f;
|
|
2703
|
+
if (p * p / c < m) return m < s && (d === 0 && (d = Z(n), m += d * d), f === 0 && (f = Z(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;
|
|
2704
|
+
if (!(e.length || m >= s)) {
|
|
2705
|
+
(e.data !== t || e.next) && (d === 0 && (d = Z(n), m += d * d), f === 0 && (f = Z(n), m += f * f), m < o && (m = Math.sqrt(o * m)));
|
|
2706
|
+
do
|
|
2707
|
+
e.data !== t && (p = a[e.data.index] * r / m, t.vx += d * p, t.vy += f * p);
|
|
2708
|
+
while (e = e.next);
|
|
2709
|
+
}
|
|
2710
|
+
}
|
|
2711
|
+
return l.initialize = function(t, r) {
|
|
2712
|
+
e = t, n = r, u();
|
|
2713
|
+
}, l.strength = function(e) {
|
|
2714
|
+
return arguments.length ? (i = typeof e == "function" ? e : ra(+e), u(), l) : i;
|
|
2715
|
+
}, l.distanceMin = function(e) {
|
|
2716
|
+
return arguments.length ? (o = e * e, l) : Math.sqrt(o);
|
|
2717
|
+
}, l.distanceMax = function(e) {
|
|
2718
|
+
return arguments.length ? (s = e * e, l) : Math.sqrt(s);
|
|
2719
|
+
}, l.theta = function(e) {
|
|
2720
|
+
return arguments.length ? (c = e * e, l) : Math.sqrt(c);
|
|
2721
|
+
}, l;
|
|
590
2722
|
}
|
|
591
2723
|
//#endregion
|
|
592
|
-
//#region
|
|
593
|
-
var
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
}
|
|
603
|
-
L.prototype = ft.prototype = {
|
|
604
|
-
constructor: L,
|
|
605
|
-
select: s,
|
|
606
|
-
selectAll: f,
|
|
607
|
-
selectChild: v,
|
|
608
|
-
selectChildren: S,
|
|
609
|
-
filter: C,
|
|
610
|
-
data: ne,
|
|
611
|
-
enter: T,
|
|
612
|
-
exit: ie,
|
|
613
|
-
join: ae,
|
|
614
|
-
merge: oe,
|
|
615
|
-
selection: pt,
|
|
616
|
-
order: se,
|
|
617
|
-
sort: ce,
|
|
618
|
-
call: ue,
|
|
619
|
-
nodes: de,
|
|
620
|
-
node: fe,
|
|
621
|
-
size: pe,
|
|
622
|
-
empty: me,
|
|
623
|
-
each: he,
|
|
624
|
-
attr: Se,
|
|
625
|
-
style: Ee,
|
|
626
|
-
property: je,
|
|
627
|
-
classed: Fe,
|
|
628
|
-
text: ze,
|
|
629
|
-
html: Ue,
|
|
630
|
-
raise: Ge,
|
|
631
|
-
lower: qe,
|
|
632
|
-
append: Je,
|
|
633
|
-
insert: Xe,
|
|
634
|
-
remove: Qe,
|
|
635
|
-
clone: tt,
|
|
636
|
-
datum: nt,
|
|
637
|
-
on: st,
|
|
638
|
-
dispatch: ut,
|
|
639
|
-
[Symbol.iterator]: dt
|
|
2724
|
+
//#region src/networkDiagram.ts
|
|
2725
|
+
var _a = -300, va = 100, ya = 640, ba = 480, xa = 180, Sa = 20, Ca = 22, Q = {
|
|
2726
|
+
linkStroke: "#9ca3af",
|
|
2727
|
+
nodeFill: "#2563eb",
|
|
2728
|
+
nodeFillHovered: "#3b82f6",
|
|
2729
|
+
nodeFillSelected: "#f59e0b",
|
|
2730
|
+
nodeStroke: "#1e40af",
|
|
2731
|
+
nodeStrokeHovered: "#1d4ed8",
|
|
2732
|
+
nodeStrokeSelected: "#b45309",
|
|
2733
|
+
nodeText: "#ffffff"
|
|
640
2734
|
};
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
2735
|
+
function wa(e, t, n = {}) {
|
|
2736
|
+
let r = t.clientWidth || ya, i = t.clientHeight || ba, a = e.nodes.map((e) => ({ ...e })), o = e.links.map((e) => ({ ...e })), s = Math.min(r, i) * .22;
|
|
2737
|
+
for (let [e, t] of a.entries()) {
|
|
2738
|
+
let n = e / a.length * Math.PI * 2;
|
|
2739
|
+
t.x = r / 2 + Math.cos(n) * s, t.y = i / 2 + Math.sin(n) * s;
|
|
2740
|
+
}
|
|
2741
|
+
let c = ha(a).force("link", oa(o).id((e) => e.id).distance(n.linkDistance ?? va)).force("charge", ga().strength(n.chargeStrength ?? _a)).force("center", Ii(r / 2, i / 2)), l = E(t).append("svg").attr("width", r).attr("height", i).attr("viewBox", `0 0 ${String(r)} ${String(i)}`).style("touch-action", "none"), u = l.append("g"), d = u.selectAll("line").data(o).join("line").attr("stroke", Q.linkStroke).attr("stroke-width", 2), f = u.selectAll("g").data(a).join("g").style("cursor", "pointer");
|
|
2742
|
+
f.append("circle").attr("r", Sa).attr("fill", Q.nodeFill).attr("stroke", Q.nodeStroke).attr("stroke-width", 2), f.append("text").text((e) => e.id).attr("text-anchor", "middle").attr("dy", 4).attr("fill", Q.nodeText);
|
|
2743
|
+
let p = null, m = null, h = () => {
|
|
2744
|
+
f.selectAll("circle").attr("fill", (e) => e.id === p ? Q.nodeFillSelected : e.id === m ? Q.nodeFillHovered : Q.nodeFill).attr("stroke", (e) => e.id === p ? Q.nodeStrokeSelected : e.id === m ? Q.nodeStrokeHovered : Q.nodeStroke).attr("stroke-width", (e) => e.id === p ? 3 : 2).attr("r", (e) => e.id === p || e.id === m ? Ca : Sa);
|
|
2745
|
+
};
|
|
2746
|
+
f.on("mouseenter", (e, t) => {
|
|
2747
|
+
m = t.id, h();
|
|
2748
|
+
}).on("mouseleave", (e, t) => {
|
|
2749
|
+
m === t.id && (m = null), h();
|
|
2750
|
+
}).on("click", (e, t) => {
|
|
2751
|
+
e.stopPropagation(), p = p === t.id ? null : t.id, h();
|
|
2752
|
+
}), l.on("click", () => {
|
|
2753
|
+
p = null, h();
|
|
2754
|
+
});
|
|
2755
|
+
let g = Fi().scaleExtent([.5, 4]).on("zoom", (e) => {
|
|
2756
|
+
u.attr("transform", e.transform.toString());
|
|
2757
|
+
});
|
|
2758
|
+
l.call(g).on("dblclick.zoom", null);
|
|
2759
|
+
let _ = (e, t) => typeof e == "object" ? e[t] ?? 0 : 0, v = () => {
|
|
2760
|
+
d.attr("x1", (e) => _(e.source, "x")).attr("y1", (e) => _(e.source, "y")).attr("x2", (e) => _(e.target, "x")).attr("y2", (e) => _(e.target, "y")), f.attr("transform", (e) => `translate(${String(e.x ?? 0)},${String(e.y ?? 0)})`);
|
|
2761
|
+
};
|
|
2762
|
+
c.stop(), f.call(Ht().on("start", (e, t) => {
|
|
2763
|
+
e.sourceEvent?.stopPropagation(), t.fx = t.x, t.fy = t.y;
|
|
2764
|
+
}).on("drag", (e, t) => {
|
|
2765
|
+
t.x = e.x, t.y = e.y, t.fx = e.x, t.fy = e.y, v();
|
|
2766
|
+
}).on("end", (e, t) => {
|
|
2767
|
+
t.fx = null, t.fy = null;
|
|
2768
|
+
})), v();
|
|
2769
|
+
let y = l.node();
|
|
2770
|
+
if (y == null) throw Error("Failed to create network diagram SVG element.");
|
|
2771
|
+
return {
|
|
2772
|
+
destroy: () => {
|
|
2773
|
+
c.stop(), l.remove();
|
|
2774
|
+
},
|
|
2775
|
+
resize: () => {
|
|
2776
|
+
let e = t.clientWidth || ya, n = t.clientHeight || ba;
|
|
2777
|
+
l.attr("width", e).attr("height", n).attr("viewBox", `0 0 ${String(e)} ${String(n)}`), c.force("center", Ii(e / 2, n / 2));
|
|
2778
|
+
},
|
|
2779
|
+
svg: y,
|
|
2780
|
+
triggerAutoLayout: () => {
|
|
2781
|
+
c.alpha(1);
|
|
2782
|
+
for (let e = 0; e < xa; e += 1) c.tick();
|
|
2783
|
+
c.stop(), v();
|
|
2784
|
+
}
|
|
2785
|
+
};
|
|
645
2786
|
}
|
|
646
2787
|
//#endregion
|
|
647
2788
|
//#region node_modules/d3-array/src/max.js
|
|
648
|
-
function
|
|
2789
|
+
function Ta(e, t) {
|
|
649
2790
|
let n;
|
|
650
2791
|
if (t === void 0) for (let t of e) t != null && (n < t || n === void 0 && t >= t) && (n = t);
|
|
651
2792
|
else {
|
|
@@ -656,7 +2797,7 @@ function z(e, t) {
|
|
|
656
2797
|
}
|
|
657
2798
|
//#endregion
|
|
658
2799
|
//#region node_modules/d3-array/src/min.js
|
|
659
|
-
function
|
|
2800
|
+
function Ea(e, t) {
|
|
660
2801
|
let n;
|
|
661
2802
|
if (t === void 0) for (let t of e) t != null && (n > t || n === void 0 && t >= t) && (n = t);
|
|
662
2803
|
else {
|
|
@@ -667,7 +2808,7 @@ function mt(e, t) {
|
|
|
667
2808
|
}
|
|
668
2809
|
//#endregion
|
|
669
2810
|
//#region node_modules/d3-array/src/sum.js
|
|
670
|
-
function
|
|
2811
|
+
function Da(e, t) {
|
|
671
2812
|
let n = 0;
|
|
672
2813
|
if (t === void 0) for (let t of e) (t = +t) && (n += t);
|
|
673
2814
|
else {
|
|
@@ -678,66 +2819,66 @@ function B(e, t) {
|
|
|
678
2819
|
}
|
|
679
2820
|
//#endregion
|
|
680
2821
|
//#region node_modules/d3-sankey/src/align.js
|
|
681
|
-
function
|
|
2822
|
+
function Oa(e, t) {
|
|
682
2823
|
return e.sourceLinks.length ? e.depth : t - 1;
|
|
683
2824
|
}
|
|
684
2825
|
//#endregion
|
|
685
2826
|
//#region node_modules/d3-sankey/src/constant.js
|
|
686
|
-
function
|
|
2827
|
+
function ka(e) {
|
|
687
2828
|
return function() {
|
|
688
2829
|
return e;
|
|
689
2830
|
};
|
|
690
2831
|
}
|
|
691
2832
|
//#endregion
|
|
692
2833
|
//#region node_modules/d3-sankey/src/sankey.js
|
|
693
|
-
function
|
|
694
|
-
return
|
|
2834
|
+
function Aa(e, t) {
|
|
2835
|
+
return Ma(e.source, t.source) || e.index - t.index;
|
|
695
2836
|
}
|
|
696
|
-
function
|
|
697
|
-
return
|
|
2837
|
+
function ja(e, t) {
|
|
2838
|
+
return Ma(e.target, t.target) || e.index - t.index;
|
|
698
2839
|
}
|
|
699
|
-
function
|
|
2840
|
+
function Ma(e, t) {
|
|
700
2841
|
return e.y0 - t.y0;
|
|
701
2842
|
}
|
|
702
|
-
function
|
|
2843
|
+
function Na(e) {
|
|
703
2844
|
return e.value;
|
|
704
2845
|
}
|
|
705
|
-
function
|
|
2846
|
+
function Pa(e) {
|
|
706
2847
|
return e.index;
|
|
707
2848
|
}
|
|
708
|
-
function
|
|
2849
|
+
function Fa(e) {
|
|
709
2850
|
return e.nodes;
|
|
710
2851
|
}
|
|
711
|
-
function
|
|
2852
|
+
function Ia(e) {
|
|
712
2853
|
return e.links;
|
|
713
2854
|
}
|
|
714
|
-
function
|
|
2855
|
+
function La(e, t) {
|
|
715
2856
|
let n = e.get(t);
|
|
716
2857
|
if (!n) throw Error("missing: " + t);
|
|
717
2858
|
return n;
|
|
718
2859
|
}
|
|
719
|
-
function
|
|
2860
|
+
function Ra({ nodes: e }) {
|
|
720
2861
|
for (let t of e) {
|
|
721
2862
|
let e = t.y0, n = e;
|
|
722
2863
|
for (let n of t.sourceLinks) n.y0 = e + n.width / 2, e += n.width;
|
|
723
2864
|
for (let e of t.targetLinks) e.y1 = n + e.width / 2, n += e.width;
|
|
724
2865
|
}
|
|
725
2866
|
}
|
|
726
|
-
function
|
|
727
|
-
let e = 0, t = 0, n = 1, r = 1, i = 24, a = 8, o, s =
|
|
2867
|
+
function za() {
|
|
2868
|
+
let e = 0, t = 0, n = 1, r = 1, i = 24, a = 8, o, s = Pa, c = Oa, l, u, d = Fa, f = Ia, p = 6;
|
|
728
2869
|
function m() {
|
|
729
2870
|
let e = {
|
|
730
2871
|
nodes: d.apply(null, arguments),
|
|
731
2872
|
links: f.apply(null, arguments)
|
|
732
2873
|
};
|
|
733
|
-
return h(e), g(e), _(e), v(e), x(e),
|
|
2874
|
+
return h(e), g(e), _(e), v(e), x(e), Ra(e), e;
|
|
734
2875
|
}
|
|
735
2876
|
m.update = function(e) {
|
|
736
|
-
return
|
|
2877
|
+
return Ra(e), e;
|
|
737
2878
|
}, m.nodeId = function(e) {
|
|
738
|
-
return arguments.length ? (s = typeof e == "function" ? e :
|
|
2879
|
+
return arguments.length ? (s = typeof e == "function" ? e : ka(e), m) : s;
|
|
739
2880
|
}, m.nodeAlign = function(e) {
|
|
740
|
-
return arguments.length ? (c = typeof e == "function" ? e :
|
|
2881
|
+
return arguments.length ? (c = typeof e == "function" ? e : ka(e), m) : c;
|
|
741
2882
|
}, m.nodeSort = function(e) {
|
|
742
2883
|
return arguments.length ? (l = e, m) : l;
|
|
743
2884
|
}, m.nodeWidth = function(e) {
|
|
@@ -745,9 +2886,9 @@ function yt() {
|
|
|
745
2886
|
}, m.nodePadding = function(e) {
|
|
746
2887
|
return arguments.length ? (a = o = +e, m) : a;
|
|
747
2888
|
}, m.nodes = function(e) {
|
|
748
|
-
return arguments.length ? (d = typeof e == "function" ? e :
|
|
2889
|
+
return arguments.length ? (d = typeof e == "function" ? e : ka(e), m) : d;
|
|
749
2890
|
}, m.links = function(e) {
|
|
750
|
-
return arguments.length ? (f = typeof e == "function" ? e :
|
|
2891
|
+
return arguments.length ? (f = typeof e == "function" ? e : ka(e), m) : f;
|
|
751
2892
|
}, m.linkSort = function(e) {
|
|
752
2893
|
return arguments.length ? (u = e, m) : u;
|
|
753
2894
|
}, m.size = function(i) {
|
|
@@ -763,12 +2904,12 @@ function yt() {
|
|
|
763
2904
|
for (let [e, r] of t.entries()) {
|
|
764
2905
|
r.index = e;
|
|
765
2906
|
let { source: t, target: i } = r;
|
|
766
|
-
typeof t != "object" && (t = r.source =
|
|
2907
|
+
typeof t != "object" && (t = r.source = La(n, t)), typeof i != "object" && (i = r.target = La(n, i)), t.sourceLinks.push(r), i.targetLinks.push(r);
|
|
767
2908
|
}
|
|
768
2909
|
if (u != null) for (let { sourceLinks: t, targetLinks: n } of e) t.sort(u), n.sort(u);
|
|
769
2910
|
}
|
|
770
2911
|
function g({ nodes: e }) {
|
|
771
|
-
for (let t of e) t.value = t.fixedValue === void 0 ? Math.max(
|
|
2912
|
+
for (let t of e) t.value = t.fixedValue === void 0 ? Math.max(Da(t.sourceLinks, Na), Da(t.targetLinks, Na)) : t.fixedValue;
|
|
772
2913
|
}
|
|
773
2914
|
function _({ nodes: e }) {
|
|
774
2915
|
let t = e.length, n = new Set(e), r = /* @__PURE__ */ new Set(), i = 0;
|
|
@@ -793,7 +2934,7 @@ function yt() {
|
|
|
793
2934
|
}
|
|
794
2935
|
}
|
|
795
2936
|
function y({ nodes: t }) {
|
|
796
|
-
let r =
|
|
2937
|
+
let r = Ta(t, (e) => e.depth) + 1, a = (n - e - i) / (r - 1), o = Array(r);
|
|
797
2938
|
for (let n of t) {
|
|
798
2939
|
let t = Math.max(0, Math.min(r - 1, Math.floor(c.call(null, n, r))));
|
|
799
2940
|
n.layer = t, n.x0 = e + t * a, n.x1 = n.x0 + i, o[t] ? o[t].push(n) : o[t] = [n];
|
|
@@ -802,7 +2943,7 @@ function yt() {
|
|
|
802
2943
|
return o;
|
|
803
2944
|
}
|
|
804
2945
|
function b(e) {
|
|
805
|
-
let n =
|
|
2946
|
+
let n = Ea(e, (e) => (r - t - (e.length - 1) * o) / Da(e, Na));
|
|
806
2947
|
for (let i of e) {
|
|
807
2948
|
let e = t;
|
|
808
2949
|
for (let t of i) {
|
|
@@ -814,15 +2955,15 @@ function yt() {
|
|
|
814
2955
|
let n = i[t];
|
|
815
2956
|
n.y0 += e * (t + 1), n.y1 += e * (t + 1);
|
|
816
2957
|
}
|
|
817
|
-
|
|
2958
|
+
ie(i);
|
|
818
2959
|
}
|
|
819
2960
|
}
|
|
820
2961
|
function x(e) {
|
|
821
2962
|
let n = y(e);
|
|
822
|
-
o = Math.min(a, (r - t) / (
|
|
2963
|
+
o = Math.min(a, (r - t) / (Ta(n, (e) => e.length) - 1)), b(n);
|
|
823
2964
|
for (let e = 0; e < p; ++e) {
|
|
824
2965
|
let t = .99 ** e, r = Math.max(1 - t, (e + 1) / p);
|
|
825
|
-
|
|
2966
|
+
ee(n, t, r), S(n, t, r);
|
|
826
2967
|
}
|
|
827
2968
|
}
|
|
828
2969
|
function S(e, t, n) {
|
|
@@ -832,57 +2973,57 @@ function yt() {
|
|
|
832
2973
|
let n = 0, r = 0;
|
|
833
2974
|
for (let { source: t, value: i } of e.targetLinks) {
|
|
834
2975
|
let a = i * (e.layer - t.layer);
|
|
835
|
-
n +=
|
|
2976
|
+
n += ae(t, e) * a, r += a;
|
|
836
2977
|
}
|
|
837
2978
|
if (!(r > 0)) continue;
|
|
838
2979
|
let i = (n / r - e.y0) * t;
|
|
839
|
-
e.y0 += i, e.y1 += i,
|
|
2980
|
+
e.y0 += i, e.y1 += i, re(e);
|
|
840
2981
|
}
|
|
841
|
-
l === void 0 && i.sort(
|
|
2982
|
+
l === void 0 && i.sort(Ma), te(i, n);
|
|
842
2983
|
}
|
|
843
2984
|
}
|
|
844
|
-
function
|
|
2985
|
+
function ee(e, t, n) {
|
|
845
2986
|
for (let r = e.length - 2; r >= 0; --r) {
|
|
846
2987
|
let i = e[r];
|
|
847
2988
|
for (let e of i) {
|
|
848
2989
|
let n = 0, r = 0;
|
|
849
2990
|
for (let { target: t, value: i } of e.sourceLinks) {
|
|
850
2991
|
let a = i * (t.layer - e.layer);
|
|
851
|
-
n +=
|
|
2992
|
+
n += oe(e, t) * a, r += a;
|
|
852
2993
|
}
|
|
853
2994
|
if (!(r > 0)) continue;
|
|
854
2995
|
let i = (n / r - e.y0) * t;
|
|
855
|
-
e.y0 += i, e.y1 += i,
|
|
2996
|
+
e.y0 += i, e.y1 += i, re(e);
|
|
856
2997
|
}
|
|
857
|
-
l === void 0 && i.sort(
|
|
2998
|
+
l === void 0 && i.sort(Ma), te(i, n);
|
|
858
2999
|
}
|
|
859
3000
|
}
|
|
860
|
-
function
|
|
3001
|
+
function te(e, n) {
|
|
861
3002
|
let i = e.length >> 1, a = e[i];
|
|
862
|
-
|
|
3003
|
+
C(e, a.y0 - o, i - 1, n), ne(e, a.y1 + o, i + 1, n), C(e, r, e.length - 1, n), ne(e, t, 0, n);
|
|
863
3004
|
}
|
|
864
|
-
function
|
|
3005
|
+
function ne(e, t, n, r) {
|
|
865
3006
|
for (; n < e.length; ++n) {
|
|
866
3007
|
let i = e[n], a = (t - i.y0) * r;
|
|
867
3008
|
a > 1e-6 && (i.y0 += a, i.y1 += a), t = i.y1 + o;
|
|
868
3009
|
}
|
|
869
3010
|
}
|
|
870
|
-
function
|
|
3011
|
+
function C(e, t, n, r) {
|
|
871
3012
|
for (; n >= 0; --n) {
|
|
872
3013
|
let i = e[n], a = (i.y1 - t) * r;
|
|
873
3014
|
a > 1e-6 && (i.y0 -= a, i.y1 -= a), t = i.y0 - o;
|
|
874
3015
|
}
|
|
875
3016
|
}
|
|
876
|
-
function
|
|
3017
|
+
function re({ sourceLinks: e, targetLinks: t }) {
|
|
877
3018
|
if (u === void 0) {
|
|
878
|
-
for (let { source: { sourceLinks: e } } of t) e.sort(
|
|
879
|
-
for (let { target: { targetLinks: t } } of e) t.sort(
|
|
3019
|
+
for (let { source: { sourceLinks: e } } of t) e.sort(ja);
|
|
3020
|
+
for (let { target: { targetLinks: t } } of e) t.sort(Aa);
|
|
880
3021
|
}
|
|
881
3022
|
}
|
|
882
|
-
function
|
|
883
|
-
if (u === void 0) for (let { sourceLinks: t, targetLinks: n } of e) t.sort(
|
|
3023
|
+
function ie(e) {
|
|
3024
|
+
if (u === void 0) for (let { sourceLinks: t, targetLinks: n } of e) t.sort(ja), n.sort(Aa);
|
|
884
3025
|
}
|
|
885
|
-
function
|
|
3026
|
+
function ae(e, t) {
|
|
886
3027
|
let n = e.y0 - (e.sourceLinks.length - 1) * o / 2;
|
|
887
3028
|
for (let { target: r, width: i } of e.sourceLinks) {
|
|
888
3029
|
if (r === t) break;
|
|
@@ -894,7 +3035,7 @@ function yt() {
|
|
|
894
3035
|
}
|
|
895
3036
|
return n;
|
|
896
3037
|
}
|
|
897
|
-
function
|
|
3038
|
+
function oe(e, t) {
|
|
898
3039
|
let n = t.y0 - (t.targetLinks.length - 1) * o / 2;
|
|
899
3040
|
for (let { source: r, width: i } of t.targetLinks) {
|
|
900
3041
|
if (r === e) break;
|
|
@@ -910,15 +3051,15 @@ function yt() {
|
|
|
910
3051
|
}
|
|
911
3052
|
//#endregion
|
|
912
3053
|
//#region node_modules/d3-path/src/path.js
|
|
913
|
-
var
|
|
914
|
-
function
|
|
3054
|
+
var Ba = Math.PI, Va = 2 * Ba, $ = 1e-6, Ha = Va - $;
|
|
3055
|
+
function Ua() {
|
|
915
3056
|
this._x0 = this._y0 = this._x1 = this._y1 = null, this._ = "";
|
|
916
3057
|
}
|
|
917
|
-
function
|
|
918
|
-
return new
|
|
3058
|
+
function Wa() {
|
|
3059
|
+
return new Ua();
|
|
919
3060
|
}
|
|
920
|
-
|
|
921
|
-
constructor:
|
|
3061
|
+
Ua.prototype = Wa.prototype = {
|
|
3062
|
+
constructor: Ua,
|
|
922
3063
|
moveTo: function(e, t) {
|
|
923
3064
|
this._ += "M" + (this._x0 = this._x1 = +e) + "," + (this._y0 = this._y1 = +t);
|
|
924
3065
|
},
|
|
@@ -939,17 +3080,17 @@ Z.prototype = Q.prototype = {
|
|
|
939
3080
|
var a = this._x1, o = this._y1, s = n - e, c = r - t, l = a - e, u = o - t, d = l * l + u * u;
|
|
940
3081
|
if (i < 0) throw Error("negative radius: " + i);
|
|
941
3082
|
if (this._x1 === null) this._ += "M" + (this._x1 = e) + "," + (this._y1 = t);
|
|
942
|
-
else if (d >
|
|
3083
|
+
else if (d > $) if (!(Math.abs(u * s - c * l) > $) || !i) this._ += "L" + (this._x1 = e) + "," + (this._y1 = t);
|
|
943
3084
|
else {
|
|
944
|
-
var f = n - a, p = r - o, m = s * s + c * c, h = f * f + p * p, g = Math.sqrt(m), _ = Math.sqrt(d), v = i * Math.tan((
|
|
945
|
-
Math.abs(y - 1) >
|
|
3085
|
+
var f = n - a, p = r - o, m = s * s + c * c, h = f * f + p * p, g = Math.sqrt(m), _ = Math.sqrt(d), v = i * Math.tan((Ba - Math.acos((m + d - h) / (2 * g * _))) / 2), y = v / _, b = v / g;
|
|
3086
|
+
Math.abs(y - 1) > $ && (this._ += "L" + (e + y * l) + "," + (t + y * u)), this._ += "A" + i + "," + i + ",0,0," + +(u * f > l * p) + "," + (this._x1 = e + b * s) + "," + (this._y1 = t + b * c);
|
|
946
3087
|
}
|
|
947
3088
|
},
|
|
948
3089
|
arc: function(e, t, n, r, i, a) {
|
|
949
3090
|
e = +e, t = +t, n = +n, a = !!a;
|
|
950
3091
|
var o = n * Math.cos(r), s = n * Math.sin(r), c = e + o, l = t + s, u = 1 ^ a, d = a ? r - i : i - r;
|
|
951
3092
|
if (n < 0) throw Error("negative radius: " + n);
|
|
952
|
-
this._x1 === null ? this._ += "M" + c + "," + l : (Math.abs(this._x1 - c) >
|
|
3093
|
+
this._x1 === null ? this._ += "M" + c + "," + l : (Math.abs(this._x1 - c) > $ || Math.abs(this._y1 - l) > $) && (this._ += "L" + c + "," + l), n && (d < 0 && (d = d % Va + Va), d > Ha ? this._ += "A" + n + "," + n + ",0,1," + u + "," + (e - o) + "," + (t - s) + "A" + n + "," + n + ",0,1," + u + "," + (this._x1 = c) + "," + (this._y1 = l) : d > $ && (this._ += "A" + n + "," + n + ",0," + +(d >= Ba) + "," + u + "," + (this._x1 = e + n * Math.cos(i)) + "," + (this._y1 = t + n * Math.sin(i))));
|
|
953
3094
|
},
|
|
954
3095
|
rect: function(e, t, n, r) {
|
|
955
3096
|
this._ += "M" + (this._x0 = this._x1 = +e) + "," + (this._y0 = this._y1 = +t) + "h" + +n + "v" + +r + "h" + -n + "Z";
|
|
@@ -960,68 +3101,68 @@ Z.prototype = Q.prototype = {
|
|
|
960
3101
|
};
|
|
961
3102
|
//#endregion
|
|
962
3103
|
//#region node_modules/d3-shape/src/constant.js
|
|
963
|
-
function
|
|
3104
|
+
function Ga(e) {
|
|
964
3105
|
return function() {
|
|
965
3106
|
return e;
|
|
966
3107
|
};
|
|
967
3108
|
}
|
|
968
3109
|
//#endregion
|
|
969
3110
|
//#region node_modules/d3-shape/src/point.js
|
|
970
|
-
function
|
|
3111
|
+
function Ka(e) {
|
|
971
3112
|
return e[0];
|
|
972
3113
|
}
|
|
973
|
-
function
|
|
3114
|
+
function qa(e) {
|
|
974
3115
|
return e[1];
|
|
975
3116
|
}
|
|
976
3117
|
//#endregion
|
|
977
3118
|
//#region node_modules/d3-shape/src/array.js
|
|
978
|
-
var
|
|
3119
|
+
var Ja = Array.prototype.slice;
|
|
979
3120
|
//#endregion
|
|
980
3121
|
//#region node_modules/d3-shape/src/link/index.js
|
|
981
|
-
function
|
|
3122
|
+
function Ya(e) {
|
|
982
3123
|
return e.source;
|
|
983
3124
|
}
|
|
984
|
-
function
|
|
3125
|
+
function Xa(e) {
|
|
985
3126
|
return e.target;
|
|
986
3127
|
}
|
|
987
|
-
function
|
|
988
|
-
var t =
|
|
3128
|
+
function Za(e) {
|
|
3129
|
+
var t = Ya, n = Xa, r = Ka, i = qa, a = null;
|
|
989
3130
|
function o() {
|
|
990
|
-
var o, s =
|
|
991
|
-
if (a ||= o =
|
|
3131
|
+
var o, s = Ja.call(arguments), c = t.apply(this, s), l = n.apply(this, s);
|
|
3132
|
+
if (a ||= o = Wa(), e(a, +r.apply(this, (s[0] = c, s)), +i.apply(this, s), +r.apply(this, (s[0] = l, s)), +i.apply(this, s)), o) return a = null, o + "" || null;
|
|
992
3133
|
}
|
|
993
3134
|
return o.source = function(e) {
|
|
994
3135
|
return arguments.length ? (t = e, o) : t;
|
|
995
3136
|
}, o.target = function(e) {
|
|
996
3137
|
return arguments.length ? (n = e, o) : n;
|
|
997
3138
|
}, o.x = function(e) {
|
|
998
|
-
return arguments.length ? (r = typeof e == "function" ? e :
|
|
3139
|
+
return arguments.length ? (r = typeof e == "function" ? e : Ga(+e), o) : r;
|
|
999
3140
|
}, o.y = function(e) {
|
|
1000
|
-
return arguments.length ? (i = typeof e == "function" ? e :
|
|
3141
|
+
return arguments.length ? (i = typeof e == "function" ? e : Ga(+e), o) : i;
|
|
1001
3142
|
}, o.context = function(e) {
|
|
1002
3143
|
return arguments.length ? (a = e ?? null, o) : a;
|
|
1003
3144
|
}, o;
|
|
1004
3145
|
}
|
|
1005
|
-
function
|
|
3146
|
+
function Qa(e, t, n, r, i) {
|
|
1006
3147
|
e.moveTo(t, n), e.bezierCurveTo(t = (t + r) / 2, n, t, i, r, i);
|
|
1007
3148
|
}
|
|
1008
|
-
function
|
|
1009
|
-
return
|
|
3149
|
+
function $a() {
|
|
3150
|
+
return Za(Qa);
|
|
1010
3151
|
}
|
|
1011
3152
|
//#endregion
|
|
1012
3153
|
//#region node_modules/d3-sankey/src/sankeyLinkHorizontal.js
|
|
1013
|
-
function
|
|
3154
|
+
function eo(e) {
|
|
1014
3155
|
return [e.source.x1, e.y0];
|
|
1015
3156
|
}
|
|
1016
|
-
function
|
|
3157
|
+
function to(e) {
|
|
1017
3158
|
return [e.target.x0, e.y1];
|
|
1018
3159
|
}
|
|
1019
|
-
function
|
|
1020
|
-
return
|
|
3160
|
+
function no() {
|
|
3161
|
+
return $a().source(eo).target(to);
|
|
1021
3162
|
}
|
|
1022
3163
|
//#endregion
|
|
1023
3164
|
//#region src/palette.ts
|
|
1024
|
-
var
|
|
3165
|
+
var ro = [
|
|
1025
3166
|
{
|
|
1026
3167
|
dark: "#3987e5",
|
|
1027
3168
|
light: "#2a78d6"
|
|
@@ -1054,7 +3195,7 @@ var $ = [
|
|
|
1054
3195
|
dark: "#e66767",
|
|
1055
3196
|
light: "#e34948"
|
|
1056
3197
|
}
|
|
1057
|
-
],
|
|
3198
|
+
], io = {
|
|
1058
3199
|
dark: {
|
|
1059
3200
|
muted: "#898781",
|
|
1060
3201
|
primary: "#ffffff",
|
|
@@ -1065,7 +3206,7 @@ var $ = [
|
|
|
1065
3206
|
primary: "#0b0b0b",
|
|
1066
3207
|
secondary: "#52514e"
|
|
1067
3208
|
}
|
|
1068
|
-
},
|
|
3209
|
+
}, ao = {
|
|
1069
3210
|
dark: {
|
|
1070
3211
|
border: "rgba(255,255,255,0.10)",
|
|
1071
3212
|
chart: "#1a1a19"
|
|
@@ -1075,18 +3216,18 @@ var $ = [
|
|
|
1075
3216
|
chart: "#fcfcfb"
|
|
1076
3217
|
}
|
|
1077
3218
|
};
|
|
1078
|
-
function
|
|
1079
|
-
let n =
|
|
3219
|
+
function oo(e, t) {
|
|
3220
|
+
let n = ro[(e % ro.length + ro.length) % ro.length];
|
|
1080
3221
|
if (n == null) throw Error("Categorical palette is empty.");
|
|
1081
3222
|
return t === "dark" ? n.dark : n.light;
|
|
1082
3223
|
}
|
|
1083
3224
|
//#endregion
|
|
1084
3225
|
//#region src/sankeyDiagram.ts
|
|
1085
|
-
var
|
|
1086
|
-
function
|
|
1087
|
-
let r = n.colorModeId ?? "light", i =
|
|
3226
|
+
var so = 16, co = 12, lo = 480, uo = 640, fo = 6;
|
|
3227
|
+
function po(e, t, n = {}) {
|
|
3228
|
+
let r = n.colorModeId ?? "light", i = io[r], a = ao[r];
|
|
1088
3229
|
getComputedStyle(t).position === "static" && (t.style.position = "relative");
|
|
1089
|
-
let o =
|
|
3230
|
+
let o = E(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", a.chart).style("color", i.primary).style("border", `1px solid ${a.border}`).style("box-shadow", "0 2px 8px rgba(0,0,0,0.15)");
|
|
1090
3231
|
function s(e, n) {
|
|
1091
3232
|
let r = t.getBoundingClientRect();
|
|
1092
3233
|
o.html(n).style("left", `${String(e.clientX - r.left + 12)}px`).style("top", `${String(e.clientY - r.top + 12)}px`).style("opacity", "1");
|
|
@@ -1095,27 +3236,27 @@ function Vt(e, t, n = {}) {
|
|
|
1095
3236
|
o.style("opacity", "0");
|
|
1096
3237
|
}
|
|
1097
3238
|
function l() {
|
|
1098
|
-
|
|
1099
|
-
let a = t.clientWidth ||
|
|
3239
|
+
E(t).selectAll("svg").remove();
|
|
3240
|
+
let a = t.clientWidth || uo, o = t.clientHeight || lo, l = {
|
|
1100
3241
|
links: e.links.map((e) => ({ ...e })),
|
|
1101
3242
|
nodes: e.nodes.map((e) => ({ ...e }))
|
|
1102
|
-
}, { links: u, nodes: d } =
|
|
1103
|
-
f.append("g").attr("fill", "none").selectAll("path").data(u).join("path").attr("d", p).attr("stroke", (e) =>
|
|
1104
|
-
|
|
3243
|
+
}, { links: u, nodes: d } = za().nodeId((e) => e.id).nodeWidth(n.nodeWidth ?? so).nodePadding(n.nodePadding ?? co).extent([[1, 1], [a - 1, o - 1]])(l), f = E(t).insert("svg", "div").attr("viewBox", `0 0 ${String(a)} ${String(o)}`).attr("width", "100%").attr("height", "100%").attr("font-family", "system-ui, -apple-system, \"Segoe UI\", sans-serif").attr("font-size", 12), p = no();
|
|
3244
|
+
f.append("g").attr("fill", "none").selectAll("path").data(u).join("path").attr("d", p).attr("stroke", (e) => oo(d.indexOf(e.source), r)).attr("stroke-opacity", .35).attr("stroke-width", (e) => Math.max(1, e.width ?? 1)).on("mouseenter", (e, t) => {
|
|
3245
|
+
E(e.currentTarget).attr("stroke-opacity", .6);
|
|
1105
3246
|
let n = t.source, r = t.target;
|
|
1106
3247
|
s(e, `${n.name} → ${r.name}<br>${t.value.toLocaleString()}`);
|
|
1107
3248
|
}).on("mousemove", (e, t) => {
|
|
1108
3249
|
let n = t.source, r = t.target;
|
|
1109
3250
|
s(e, `${n.name} → ${r.name}<br>${t.value.toLocaleString()}`);
|
|
1110
3251
|
}).on("mouseleave", (e) => {
|
|
1111
|
-
|
|
3252
|
+
E(e.currentTarget).attr("stroke-opacity", .35), c();
|
|
1112
3253
|
});
|
|
1113
3254
|
let m = f.append("g").selectAll("g").data(d).join("g");
|
|
1114
|
-
m.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) =>
|
|
3255
|
+
m.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) => oo(t, r)).on("mouseenter", (e, t) => {
|
|
1115
3256
|
s(e, `${t.name}<br>${(t.value ?? 0).toLocaleString()}`);
|
|
1116
3257
|
}).on("mousemove", (e, t) => {
|
|
1117
3258
|
s(e, `${t.name}<br>${(t.value ?? 0).toLocaleString()}`);
|
|
1118
|
-
}).on("mouseleave", c), m.append("text").attr("x", (e) => (e.x0 ?? 0) < a / 2 ? (e.x1 ?? 0) +
|
|
3259
|
+
}).on("mouseleave", c), m.append("text").attr("x", (e) => (e.x0 ?? 0) < a / 2 ? (e.x1 ?? 0) + fo : (e.x0 ?? 0) - fo).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", i.primary).text((e) => e.name);
|
|
1119
3260
|
let h = f.node();
|
|
1120
3261
|
if (h == null) throw Error("Failed to create Sankey diagram SVG element.");
|
|
1121
3262
|
return h;
|
|
@@ -1132,19 +3273,31 @@ function Vt(e, t, n = {}) {
|
|
|
1132
3273
|
}
|
|
1133
3274
|
//#endregion
|
|
1134
3275
|
//#region src/index.ts
|
|
1135
|
-
var
|
|
3276
|
+
var mo = "d3", ho = class {
|
|
3277
|
+
renderNetworkDiagram(e, t, n, r) {
|
|
3278
|
+
let i = wa(e, t, n);
|
|
3279
|
+
return r?.(), {
|
|
3280
|
+
destroy: i.destroy,
|
|
3281
|
+
resize: i.resize,
|
|
3282
|
+
get svg() {
|
|
3283
|
+
return i.svg;
|
|
3284
|
+
},
|
|
3285
|
+
triggerAutoLayout: i.triggerAutoLayout,
|
|
3286
|
+
vendorId: mo
|
|
3287
|
+
};
|
|
3288
|
+
}
|
|
1136
3289
|
renderSankeyDiagram(e, t, n, r) {
|
|
1137
|
-
let i =
|
|
3290
|
+
let i = po(e, t, n);
|
|
1138
3291
|
return r?.(), {
|
|
1139
3292
|
resize: i.resize,
|
|
1140
3293
|
get svg() {
|
|
1141
3294
|
return i.svg;
|
|
1142
3295
|
},
|
|
1143
|
-
vendorId:
|
|
3296
|
+
vendorId: mo
|
|
1144
3297
|
};
|
|
1145
3298
|
}
|
|
1146
3299
|
};
|
|
1147
3300
|
//#endregion
|
|
1148
|
-
export {
|
|
3301
|
+
export { ho as D3Tool };
|
|
1149
3302
|
|
|
1150
3303
|
//# sourceMappingURL=dpuse-tool-d3.es.js.map
|