@skydesign/tf 0.3.3 → 0.3.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +18 -0
- package/dist/index.js +1 -1
- package/dist/index.mjs +351 -346
- package/dist/{render-BqWiqrE9.mjs → render-SK2uaqmj.mjs} +1047 -1004
- package/dist/render-aoKrPS96.js +106 -0
- package/dist/server.d.ts +2 -0
- package/dist/server.js +2 -2
- package/dist/server.mjs +2 -1
- package/package.json +2 -1
- package/dist/render-cE_lsgcR.js +0 -94
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
function
|
|
1
|
+
function Za(t) {
|
|
2
2
|
return JSON.stringify(JSON.stringify(t)).slice(1, -1);
|
|
3
3
|
}
|
|
4
|
-
function
|
|
4
|
+
function Ct(t) {
|
|
5
5
|
try {
|
|
6
6
|
return JSON.parse(t);
|
|
7
7
|
} catch {
|
|
@@ -9,43 +9,43 @@ function Mt(t) {
|
|
|
9
9
|
return JSON.parse(e);
|
|
10
10
|
}
|
|
11
11
|
}
|
|
12
|
-
var
|
|
12
|
+
var _n = { value: () => {
|
|
13
13
|
} };
|
|
14
|
-
function
|
|
14
|
+
function ie() {
|
|
15
15
|
for (var t = 0, e = arguments.length, n = {}, r; t < e; ++t) {
|
|
16
16
|
if (!(r = arguments[t] + "") || r in n || /[\s.]/.test(r)) throw new Error("illegal type: " + r);
|
|
17
17
|
n[r] = [];
|
|
18
18
|
}
|
|
19
|
-
return new
|
|
19
|
+
return new kt(n);
|
|
20
20
|
}
|
|
21
|
-
function
|
|
21
|
+
function kt(t) {
|
|
22
22
|
this._ = t;
|
|
23
23
|
}
|
|
24
|
-
function
|
|
24
|
+
function wn(t, e) {
|
|
25
25
|
return t.trim().split(/^|\s+/).map(function(n) {
|
|
26
26
|
var r = "", i = n.indexOf(".");
|
|
27
27
|
if (i >= 0 && (r = n.slice(i + 1), n = n.slice(0, i)), n && !e.hasOwnProperty(n)) throw new Error("unknown type: " + n);
|
|
28
28
|
return { type: n, name: r };
|
|
29
29
|
});
|
|
30
30
|
}
|
|
31
|
-
|
|
32
|
-
constructor:
|
|
31
|
+
kt.prototype = ie.prototype = {
|
|
32
|
+
constructor: kt,
|
|
33
33
|
on: function(t, e) {
|
|
34
|
-
var n = this._, r =
|
|
34
|
+
var n = this._, r = wn(t + "", n), i, a = -1, o = r.length;
|
|
35
35
|
if (arguments.length < 2) {
|
|
36
|
-
for (; ++a < o; ) if ((i = (t = r[a]).type) && (i =
|
|
36
|
+
for (; ++a < o; ) if ((i = (t = r[a]).type) && (i = vn(n[i], t.name))) return i;
|
|
37
37
|
return;
|
|
38
38
|
}
|
|
39
39
|
if (e != null && typeof e != "function") throw new Error("invalid callback: " + e);
|
|
40
40
|
for (; ++a < o; )
|
|
41
|
-
if (i = (t = r[a]).type) n[i] =
|
|
42
|
-
else if (e == null) for (i in n) n[i] =
|
|
41
|
+
if (i = (t = r[a]).type) n[i] = he(n[i], t.name, e);
|
|
42
|
+
else if (e == null) for (i in n) n[i] = he(n[i], t.name, null);
|
|
43
43
|
return this;
|
|
44
44
|
},
|
|
45
45
|
copy: function() {
|
|
46
46
|
var t = {}, e = this._;
|
|
47
47
|
for (var n in e) t[n] = e[n].slice();
|
|
48
|
-
return new
|
|
48
|
+
return new kt(t);
|
|
49
49
|
},
|
|
50
50
|
call: function(t, e) {
|
|
51
51
|
if ((i = arguments.length - 2) > 0) for (var n = new Array(i), r = 0, i, a; r < i; ++r) n[r] = arguments[r + 2];
|
|
@@ -57,135 +57,135 @@ $t.prototype = re.prototype = {
|
|
|
57
57
|
for (var r = this._[t], i = 0, a = r.length; i < a; ++i) r[i].value.apply(e, n);
|
|
58
58
|
}
|
|
59
59
|
};
|
|
60
|
-
function
|
|
60
|
+
function vn(t, e) {
|
|
61
61
|
for (var n = 0, r = t.length, i; n < r; ++n)
|
|
62
62
|
if ((i = t[n]).name === e)
|
|
63
63
|
return i.value;
|
|
64
64
|
}
|
|
65
|
-
function
|
|
65
|
+
function he(t, e, n) {
|
|
66
66
|
for (var r = 0, i = t.length; r < i; ++r)
|
|
67
67
|
if (t[r].name === e) {
|
|
68
|
-
t[r] =
|
|
68
|
+
t[r] = _n, t = t.slice(0, r).concat(t.slice(r + 1));
|
|
69
69
|
break;
|
|
70
70
|
}
|
|
71
71
|
return n != null && t.push({ name: e, value: n }), t;
|
|
72
72
|
}
|
|
73
|
-
var
|
|
74
|
-
const
|
|
73
|
+
var Xt = "http://www.w3.org/1999/xhtml";
|
|
74
|
+
const de = {
|
|
75
75
|
svg: "http://www.w3.org/2000/svg",
|
|
76
|
-
xhtml:
|
|
76
|
+
xhtml: Xt,
|
|
77
77
|
xlink: "http://www.w3.org/1999/xlink",
|
|
78
78
|
xml: "http://www.w3.org/XML/1998/namespace",
|
|
79
79
|
xmlns: "http://www.w3.org/2000/xmlns/"
|
|
80
80
|
};
|
|
81
|
-
function
|
|
81
|
+
function Lt(t) {
|
|
82
82
|
var e = t += "", n = e.indexOf(":");
|
|
83
|
-
return n >= 0 && (e = t.slice(0, n)) !== "xmlns" && (t = t.slice(n + 1)),
|
|
83
|
+
return n >= 0 && (e = t.slice(0, n)) !== "xmlns" && (t = t.slice(n + 1)), de.hasOwnProperty(e) ? { space: de[e], local: t } : t;
|
|
84
84
|
}
|
|
85
|
-
function
|
|
85
|
+
function bn(t) {
|
|
86
86
|
return function() {
|
|
87
87
|
var e = this.ownerDocument, n = this.namespaceURI;
|
|
88
|
-
return n ===
|
|
88
|
+
return n === Xt && e.documentElement.namespaceURI === Xt ? e.createElement(t) : e.createElementNS(n, t);
|
|
89
89
|
};
|
|
90
90
|
}
|
|
91
|
-
function
|
|
91
|
+
function En(t) {
|
|
92
92
|
return function() {
|
|
93
93
|
return this.ownerDocument.createElementNS(t.space, t.local);
|
|
94
94
|
};
|
|
95
95
|
}
|
|
96
96
|
function Pe(t) {
|
|
97
|
-
var e =
|
|
98
|
-
return (e.local ?
|
|
97
|
+
var e = Lt(t);
|
|
98
|
+
return (e.local ? En : bn)(e);
|
|
99
99
|
}
|
|
100
|
-
function
|
|
100
|
+
function Nn() {
|
|
101
101
|
}
|
|
102
|
-
function
|
|
103
|
-
return t == null ?
|
|
102
|
+
function oe(t) {
|
|
103
|
+
return t == null ? Nn : function() {
|
|
104
104
|
return this.querySelector(t);
|
|
105
105
|
};
|
|
106
106
|
}
|
|
107
|
-
function
|
|
108
|
-
typeof t != "function" && (t =
|
|
107
|
+
function $n(t) {
|
|
108
|
+
typeof t != "function" && (t = oe(t));
|
|
109
109
|
for (var e = this._groups, n = e.length, r = new Array(n), i = 0; i < n; ++i)
|
|
110
110
|
for (var a = e[i], o = a.length, c = r[i] = new Array(o), s, l, u = 0; u < o; ++u)
|
|
111
111
|
(s = a[u]) && (l = t.call(s, s.__data__, u, a)) && ("__data__" in s && (l.__data__ = s.__data__), c[u] = l);
|
|
112
|
-
return new
|
|
112
|
+
return new W(r, this._parents);
|
|
113
113
|
}
|
|
114
|
-
function
|
|
114
|
+
function kn(t) {
|
|
115
115
|
return t == null ? [] : Array.isArray(t) ? t : Array.from(t);
|
|
116
116
|
}
|
|
117
|
-
function
|
|
117
|
+
function Sn() {
|
|
118
118
|
return [];
|
|
119
119
|
}
|
|
120
|
-
function
|
|
121
|
-
return t == null ?
|
|
120
|
+
function Ye(t) {
|
|
121
|
+
return t == null ? Sn : function() {
|
|
122
122
|
return this.querySelectorAll(t);
|
|
123
123
|
};
|
|
124
124
|
}
|
|
125
|
-
function
|
|
125
|
+
function An(t) {
|
|
126
126
|
return function() {
|
|
127
|
-
return
|
|
127
|
+
return kn(t.apply(this, arguments));
|
|
128
128
|
};
|
|
129
129
|
}
|
|
130
|
-
function
|
|
131
|
-
typeof t == "function" ? t =
|
|
130
|
+
function In(t) {
|
|
131
|
+
typeof t == "function" ? t = An(t) : t = Ye(t);
|
|
132
132
|
for (var e = this._groups, n = e.length, r = [], i = [], a = 0; a < n; ++a)
|
|
133
133
|
for (var o = e[a], c = o.length, s, l = 0; l < c; ++l)
|
|
134
134
|
(s = o[l]) && (r.push(t.call(s, s.__data__, l, o)), i.push(s));
|
|
135
|
-
return new
|
|
135
|
+
return new W(r, i);
|
|
136
136
|
}
|
|
137
137
|
function ze(t) {
|
|
138
138
|
return function() {
|
|
139
139
|
return this.matches(t);
|
|
140
140
|
};
|
|
141
141
|
}
|
|
142
|
-
function
|
|
142
|
+
function Re(t) {
|
|
143
143
|
return function(e) {
|
|
144
144
|
return e.matches(t);
|
|
145
145
|
};
|
|
146
146
|
}
|
|
147
|
-
var
|
|
148
|
-
function
|
|
147
|
+
var Tn = Array.prototype.find;
|
|
148
|
+
function Cn(t) {
|
|
149
149
|
return function() {
|
|
150
|
-
return
|
|
150
|
+
return Tn.call(this.children, t);
|
|
151
151
|
};
|
|
152
152
|
}
|
|
153
|
-
function
|
|
153
|
+
function Mn() {
|
|
154
154
|
return this.firstElementChild;
|
|
155
155
|
}
|
|
156
|
-
function
|
|
157
|
-
return this.select(t == null ?
|
|
156
|
+
function Dn(t) {
|
|
157
|
+
return this.select(t == null ? Mn : Cn(typeof t == "function" ? t : Re(t)));
|
|
158
158
|
}
|
|
159
|
-
var
|
|
160
|
-
function
|
|
159
|
+
var Pn = Array.prototype.filter;
|
|
160
|
+
function Yn() {
|
|
161
161
|
return Array.from(this.children);
|
|
162
162
|
}
|
|
163
|
-
function
|
|
163
|
+
function zn(t) {
|
|
164
164
|
return function() {
|
|
165
|
-
return
|
|
165
|
+
return Pn.call(this.children, t);
|
|
166
166
|
};
|
|
167
167
|
}
|
|
168
|
-
function
|
|
169
|
-
return this.selectAll(t == null ?
|
|
168
|
+
function Rn(t) {
|
|
169
|
+
return this.selectAll(t == null ? Yn : zn(typeof t == "function" ? t : Re(t)));
|
|
170
170
|
}
|
|
171
|
-
function
|
|
171
|
+
function Ln(t) {
|
|
172
172
|
typeof t != "function" && (t = ze(t));
|
|
173
173
|
for (var e = this._groups, n = e.length, r = new Array(n), i = 0; i < n; ++i)
|
|
174
174
|
for (var a = e[i], o = a.length, c = r[i] = [], s, l = 0; l < o; ++l)
|
|
175
175
|
(s = a[l]) && t.call(s, s.__data__, l, a) && c.push(s);
|
|
176
|
-
return new
|
|
176
|
+
return new W(r, this._parents);
|
|
177
177
|
}
|
|
178
|
-
function
|
|
178
|
+
function Le(t) {
|
|
179
179
|
return new Array(t.length);
|
|
180
180
|
}
|
|
181
|
-
function
|
|
182
|
-
return new
|
|
181
|
+
function On() {
|
|
182
|
+
return new W(this._enter || this._groups.map(Le), this._parents);
|
|
183
183
|
}
|
|
184
|
-
function
|
|
184
|
+
function Mt(t, e) {
|
|
185
185
|
this.ownerDocument = t.ownerDocument, this.namespaceURI = t.namespaceURI, this._next = null, this._parent = t, this.__data__ = e;
|
|
186
186
|
}
|
|
187
|
-
|
|
188
|
-
constructor:
|
|
187
|
+
Mt.prototype = {
|
|
188
|
+
constructor: Mt,
|
|
189
189
|
appendChild: function(t) {
|
|
190
190
|
return this._parent.insertBefore(t, this._next);
|
|
191
191
|
},
|
|
@@ -199,70 +199,70 @@ Ct.prototype = {
|
|
|
199
199
|
return this._parent.querySelectorAll(t);
|
|
200
200
|
}
|
|
201
201
|
};
|
|
202
|
-
function
|
|
202
|
+
function Bn(t) {
|
|
203
203
|
return function() {
|
|
204
204
|
return t;
|
|
205
205
|
};
|
|
206
206
|
}
|
|
207
|
-
function
|
|
207
|
+
function Hn(t, e, n, r, i, a) {
|
|
208
208
|
for (var o = 0, c, s = e.length, l = a.length; o < l; ++o)
|
|
209
|
-
(c = e[o]) ? (c.__data__ = a[o], r[o] = c) : n[o] = new
|
|
209
|
+
(c = e[o]) ? (c.__data__ = a[o], r[o] = c) : n[o] = new Mt(t, a[o]);
|
|
210
210
|
for (; o < s; ++o)
|
|
211
211
|
(c = e[o]) && (i[o] = c);
|
|
212
212
|
}
|
|
213
|
-
function
|
|
213
|
+
function Fn(t, e, n, r, i, a, o) {
|
|
214
214
|
var c, s, l = /* @__PURE__ */ new Map(), u = e.length, f = a.length, h = new Array(u), g;
|
|
215
215
|
for (c = 0; c < u; ++c)
|
|
216
216
|
(s = e[c]) && (h[c] = g = o.call(s, s.__data__, c, e) + "", l.has(g) ? i[c] = s : l.set(g, s));
|
|
217
217
|
for (c = 0; c < f; ++c)
|
|
218
|
-
g = o.call(t, a[c], c, a) + "", (s = l.get(g)) ? (r[c] = s, s.__data__ = a[c], l.delete(g)) : n[c] = new
|
|
218
|
+
g = o.call(t, a[c], c, a) + "", (s = l.get(g)) ? (r[c] = s, s.__data__ = a[c], l.delete(g)) : n[c] = new Mt(t, a[c]);
|
|
219
219
|
for (c = 0; c < u; ++c)
|
|
220
220
|
(s = e[c]) && l.get(h[c]) === s && (i[c] = s);
|
|
221
221
|
}
|
|
222
|
-
function
|
|
222
|
+
function Wn(t) {
|
|
223
223
|
return t.__data__;
|
|
224
224
|
}
|
|
225
|
-
function
|
|
226
|
-
if (!arguments.length) return Array.from(this,
|
|
227
|
-
var n = e ?
|
|
228
|
-
typeof t != "function" && (t =
|
|
225
|
+
function Gn(t, e) {
|
|
226
|
+
if (!arguments.length) return Array.from(this, Wn);
|
|
227
|
+
var n = e ? Fn : Hn, r = this._parents, i = this._groups;
|
|
228
|
+
typeof t != "function" && (t = Bn(t));
|
|
229
229
|
for (var a = i.length, o = new Array(a), c = new Array(a), s = new Array(a), l = 0; l < a; ++l) {
|
|
230
|
-
var u = r[l], f = i[l], h = f.length, g =
|
|
230
|
+
var u = r[l], f = i[l], h = f.length, g = Vn(t.call(u, u && u.__data__, l, r)), m = g.length, x = c[l] = new Array(m), y = o[l] = new Array(m), p = s[l] = new Array(h);
|
|
231
231
|
n(u, f, x, y, p, g, e);
|
|
232
|
-
for (var w = 0,
|
|
233
|
-
if (
|
|
234
|
-
for (w >=
|
|
235
|
-
|
|
232
|
+
for (var w = 0, E = 0, S, $; w < m; ++w)
|
|
233
|
+
if (S = x[w]) {
|
|
234
|
+
for (w >= E && (E = w + 1); !($ = y[E]) && ++E < m; ) ;
|
|
235
|
+
S._next = $ || null;
|
|
236
236
|
}
|
|
237
237
|
}
|
|
238
|
-
return o = new
|
|
238
|
+
return o = new W(o, r), o._enter = c, o._exit = s, o;
|
|
239
239
|
}
|
|
240
|
-
function
|
|
240
|
+
function Vn(t) {
|
|
241
241
|
return typeof t == "object" && "length" in t ? t : Array.from(t);
|
|
242
242
|
}
|
|
243
|
-
function
|
|
244
|
-
return new
|
|
243
|
+
function Xn() {
|
|
244
|
+
return new W(this._exit || this._groups.map(Le), this._parents);
|
|
245
245
|
}
|
|
246
|
-
function
|
|
246
|
+
function qn(t, e, n) {
|
|
247
247
|
var r = this.enter(), i = this, a = this.exit();
|
|
248
248
|
return typeof t == "function" ? (r = t(r), r && (r = r.selection())) : r = r.append(t + ""), e != null && (i = e(i), i && (i = i.selection())), n == null ? a.remove() : n(a), r && i ? r.merge(i).order() : i;
|
|
249
249
|
}
|
|
250
|
-
function
|
|
250
|
+
function Un(t) {
|
|
251
251
|
for (var e = t.selection ? t.selection() : t, n = this._groups, r = e._groups, i = n.length, a = r.length, o = Math.min(i, a), c = new Array(i), s = 0; s < o; ++s)
|
|
252
252
|
for (var l = n[s], u = r[s], f = l.length, h = c[s] = new Array(f), g, m = 0; m < f; ++m)
|
|
253
253
|
(g = l[m] || u[m]) && (h[m] = g);
|
|
254
254
|
for (; s < i; ++s)
|
|
255
255
|
c[s] = n[s];
|
|
256
|
-
return new
|
|
256
|
+
return new W(c, this._parents);
|
|
257
257
|
}
|
|
258
|
-
function
|
|
258
|
+
function Zn() {
|
|
259
259
|
for (var t = this._groups, e = -1, n = t.length; ++e < n; )
|
|
260
260
|
for (var r = t[e], i = r.length - 1, a = r[i], o; --i >= 0; )
|
|
261
261
|
(o = r[i]) && (a && o.compareDocumentPosition(a) ^ 4 && a.parentNode.insertBefore(o, a), a = o);
|
|
262
262
|
return this;
|
|
263
263
|
}
|
|
264
|
-
function
|
|
265
|
-
t || (t =
|
|
264
|
+
function Kn(t) {
|
|
265
|
+
t || (t = Qn);
|
|
266
266
|
function e(f, h) {
|
|
267
267
|
return f && h ? t(f.__data__, h.__data__) : !f - !h;
|
|
268
268
|
}
|
|
@@ -271,19 +271,19 @@ function Xn(t) {
|
|
|
271
271
|
(l = o[u]) && (s[u] = l);
|
|
272
272
|
s.sort(e);
|
|
273
273
|
}
|
|
274
|
-
return new
|
|
274
|
+
return new W(i, this._parents).order();
|
|
275
275
|
}
|
|
276
|
-
function
|
|
276
|
+
function Qn(t, e) {
|
|
277
277
|
return t < e ? -1 : t > e ? 1 : t >= e ? 0 : NaN;
|
|
278
278
|
}
|
|
279
|
-
function
|
|
279
|
+
function Jn() {
|
|
280
280
|
var t = arguments[0];
|
|
281
281
|
return arguments[0] = this, t.apply(null, arguments), this;
|
|
282
282
|
}
|
|
283
|
-
function
|
|
283
|
+
function jn() {
|
|
284
284
|
return Array.from(this);
|
|
285
285
|
}
|
|
286
|
-
function
|
|
286
|
+
function tr() {
|
|
287
287
|
for (var t = this._groups, e = 0, n = t.length; e < n; ++e)
|
|
288
288
|
for (var r = t[e], i = 0, a = r.length; i < a; ++i) {
|
|
289
289
|
var o = r[i];
|
|
@@ -291,108 +291,108 @@ function Kn() {
|
|
|
291
291
|
}
|
|
292
292
|
return null;
|
|
293
293
|
}
|
|
294
|
-
function
|
|
294
|
+
function er() {
|
|
295
295
|
let t = 0;
|
|
296
296
|
for (const e of this) ++t;
|
|
297
297
|
return t;
|
|
298
298
|
}
|
|
299
|
-
function
|
|
299
|
+
function nr() {
|
|
300
300
|
return !this.node();
|
|
301
301
|
}
|
|
302
|
-
function
|
|
302
|
+
function rr(t) {
|
|
303
303
|
for (var e = this._groups, n = 0, r = e.length; n < r; ++n)
|
|
304
304
|
for (var i = e[n], a = 0, o = i.length, c; a < o; ++a)
|
|
305
305
|
(c = i[a]) && t.call(c, c.__data__, a, i);
|
|
306
306
|
return this;
|
|
307
307
|
}
|
|
308
|
-
function
|
|
308
|
+
function ir(t) {
|
|
309
309
|
return function() {
|
|
310
310
|
this.removeAttribute(t);
|
|
311
311
|
};
|
|
312
312
|
}
|
|
313
|
-
function
|
|
313
|
+
function or(t) {
|
|
314
314
|
return function() {
|
|
315
315
|
this.removeAttributeNS(t.space, t.local);
|
|
316
316
|
};
|
|
317
317
|
}
|
|
318
|
-
function
|
|
318
|
+
function ar(t, e) {
|
|
319
319
|
return function() {
|
|
320
320
|
this.setAttribute(t, e);
|
|
321
321
|
};
|
|
322
322
|
}
|
|
323
|
-
function
|
|
323
|
+
function sr(t, e) {
|
|
324
324
|
return function() {
|
|
325
325
|
this.setAttributeNS(t.space, t.local, e);
|
|
326
326
|
};
|
|
327
327
|
}
|
|
328
|
-
function
|
|
328
|
+
function cr(t, e) {
|
|
329
329
|
return function() {
|
|
330
330
|
var n = e.apply(this, arguments);
|
|
331
331
|
n == null ? this.removeAttribute(t) : this.setAttribute(t, n);
|
|
332
332
|
};
|
|
333
333
|
}
|
|
334
|
-
function
|
|
334
|
+
function lr(t, e) {
|
|
335
335
|
return function() {
|
|
336
336
|
var n = e.apply(this, arguments);
|
|
337
337
|
n == null ? this.removeAttributeNS(t.space, t.local) : this.setAttributeNS(t.space, t.local, n);
|
|
338
338
|
};
|
|
339
339
|
}
|
|
340
|
-
function
|
|
341
|
-
var n =
|
|
340
|
+
function ur(t, e) {
|
|
341
|
+
var n = Lt(t);
|
|
342
342
|
if (arguments.length < 2) {
|
|
343
343
|
var r = this.node();
|
|
344
344
|
return n.local ? r.getAttributeNS(n.space, n.local) : r.getAttribute(n);
|
|
345
345
|
}
|
|
346
|
-
return this.each((e == null ? n.local ?
|
|
346
|
+
return this.each((e == null ? n.local ? or : ir : typeof e == "function" ? n.local ? lr : cr : n.local ? sr : ar)(n, e));
|
|
347
347
|
}
|
|
348
|
-
function
|
|
348
|
+
function Oe(t) {
|
|
349
349
|
return t.ownerDocument && t.ownerDocument.defaultView || t.document && t || t.defaultView;
|
|
350
350
|
}
|
|
351
|
-
function
|
|
351
|
+
function fr(t) {
|
|
352
352
|
return function() {
|
|
353
353
|
this.style.removeProperty(t);
|
|
354
354
|
};
|
|
355
355
|
}
|
|
356
|
-
function
|
|
356
|
+
function hr(t, e, n) {
|
|
357
357
|
return function() {
|
|
358
358
|
this.style.setProperty(t, e, n);
|
|
359
359
|
};
|
|
360
360
|
}
|
|
361
|
-
function
|
|
361
|
+
function dr(t, e, n) {
|
|
362
362
|
return function() {
|
|
363
363
|
var r = e.apply(this, arguments);
|
|
364
364
|
r == null ? this.style.removeProperty(t) : this.style.setProperty(t, r, n);
|
|
365
365
|
};
|
|
366
366
|
}
|
|
367
|
-
function
|
|
368
|
-
return arguments.length > 1 ? this.each((e == null ?
|
|
367
|
+
function gr(t, e, n) {
|
|
368
|
+
return arguments.length > 1 ? this.each((e == null ? fr : typeof e == "function" ? dr : hr)(t, e, n ?? "")) : lt(this.node(), t);
|
|
369
369
|
}
|
|
370
370
|
function lt(t, e) {
|
|
371
|
-
return t.style.getPropertyValue(e) ||
|
|
371
|
+
return t.style.getPropertyValue(e) || Oe(t).getComputedStyle(t, null).getPropertyValue(e);
|
|
372
372
|
}
|
|
373
|
-
function
|
|
373
|
+
function pr(t) {
|
|
374
374
|
return function() {
|
|
375
375
|
delete this[t];
|
|
376
376
|
};
|
|
377
377
|
}
|
|
378
|
-
function
|
|
378
|
+
function mr(t, e) {
|
|
379
379
|
return function() {
|
|
380
380
|
this[t] = e;
|
|
381
381
|
};
|
|
382
382
|
}
|
|
383
|
-
function
|
|
383
|
+
function yr(t, e) {
|
|
384
384
|
return function() {
|
|
385
385
|
var n = e.apply(this, arguments);
|
|
386
386
|
n == null ? delete this[t] : this[t] = n;
|
|
387
387
|
};
|
|
388
388
|
}
|
|
389
|
-
function
|
|
390
|
-
return arguments.length > 1 ? this.each((e == null ?
|
|
389
|
+
function xr(t, e) {
|
|
390
|
+
return arguments.length > 1 ? this.each((e == null ? pr : typeof e == "function" ? yr : mr)(t, e)) : this.node()[t];
|
|
391
391
|
}
|
|
392
392
|
function Be(t) {
|
|
393
393
|
return t.trim().split(/^|\s+/);
|
|
394
394
|
}
|
|
395
|
-
function
|
|
395
|
+
function ae(t) {
|
|
396
396
|
return t.classList || new He(t);
|
|
397
397
|
}
|
|
398
398
|
function He(t) {
|
|
@@ -411,129 +411,129 @@ He.prototype = {
|
|
|
411
411
|
return this._names.indexOf(t) >= 0;
|
|
412
412
|
}
|
|
413
413
|
};
|
|
414
|
-
function Oe(t, e) {
|
|
415
|
-
for (var n = oe(t), r = -1, i = e.length; ++r < i; ) n.add(e[r]);
|
|
416
|
-
}
|
|
417
414
|
function Fe(t, e) {
|
|
418
|
-
for (var n =
|
|
415
|
+
for (var n = ae(t), r = -1, i = e.length; ++r < i; ) n.add(e[r]);
|
|
419
416
|
}
|
|
420
|
-
function
|
|
417
|
+
function We(t, e) {
|
|
418
|
+
for (var n = ae(t), r = -1, i = e.length; ++r < i; ) n.remove(e[r]);
|
|
419
|
+
}
|
|
420
|
+
function _r(t) {
|
|
421
421
|
return function() {
|
|
422
|
-
|
|
422
|
+
Fe(this, t);
|
|
423
423
|
};
|
|
424
424
|
}
|
|
425
|
-
function
|
|
425
|
+
function wr(t) {
|
|
426
426
|
return function() {
|
|
427
|
-
|
|
427
|
+
We(this, t);
|
|
428
428
|
};
|
|
429
429
|
}
|
|
430
|
-
function
|
|
430
|
+
function vr(t, e) {
|
|
431
431
|
return function() {
|
|
432
|
-
(e.apply(this, arguments) ?
|
|
432
|
+
(e.apply(this, arguments) ? Fe : We)(this, t);
|
|
433
433
|
};
|
|
434
434
|
}
|
|
435
|
-
function
|
|
435
|
+
function br(t, e) {
|
|
436
436
|
var n = Be(t + "");
|
|
437
437
|
if (arguments.length < 2) {
|
|
438
|
-
for (var r =
|
|
438
|
+
for (var r = ae(this.node()), i = -1, a = n.length; ++i < a; ) if (!r.contains(n[i])) return !1;
|
|
439
439
|
return !0;
|
|
440
440
|
}
|
|
441
|
-
return this.each((typeof e == "function" ?
|
|
441
|
+
return this.each((typeof e == "function" ? vr : e ? _r : wr)(n, e));
|
|
442
442
|
}
|
|
443
|
-
function
|
|
443
|
+
function Er() {
|
|
444
444
|
this.textContent = "";
|
|
445
445
|
}
|
|
446
|
-
function
|
|
446
|
+
function Nr(t) {
|
|
447
447
|
return function() {
|
|
448
448
|
this.textContent = t;
|
|
449
449
|
};
|
|
450
450
|
}
|
|
451
|
-
function
|
|
451
|
+
function $r(t) {
|
|
452
452
|
return function() {
|
|
453
453
|
var e = t.apply(this, arguments);
|
|
454
454
|
this.textContent = e ?? "";
|
|
455
455
|
};
|
|
456
456
|
}
|
|
457
|
-
function
|
|
458
|
-
return arguments.length ? this.each(t == null ?
|
|
457
|
+
function kr(t) {
|
|
458
|
+
return arguments.length ? this.each(t == null ? Er : (typeof t == "function" ? $r : Nr)(t)) : this.node().textContent;
|
|
459
459
|
}
|
|
460
|
-
function
|
|
460
|
+
function Sr() {
|
|
461
461
|
this.innerHTML = "";
|
|
462
462
|
}
|
|
463
|
-
function
|
|
463
|
+
function Ar(t) {
|
|
464
464
|
return function() {
|
|
465
465
|
this.innerHTML = t;
|
|
466
466
|
};
|
|
467
467
|
}
|
|
468
|
-
function
|
|
468
|
+
function Ir(t) {
|
|
469
469
|
return function() {
|
|
470
470
|
var e = t.apply(this, arguments);
|
|
471
471
|
this.innerHTML = e ?? "";
|
|
472
472
|
};
|
|
473
473
|
}
|
|
474
|
-
function
|
|
475
|
-
return arguments.length ? this.each(t == null ?
|
|
474
|
+
function Tr(t) {
|
|
475
|
+
return arguments.length ? this.each(t == null ? Sr : (typeof t == "function" ? Ir : Ar)(t)) : this.node().innerHTML;
|
|
476
476
|
}
|
|
477
|
-
function
|
|
477
|
+
function Cr() {
|
|
478
478
|
this.nextSibling && this.parentNode.appendChild(this);
|
|
479
479
|
}
|
|
480
|
-
function
|
|
481
|
-
return this.each(
|
|
480
|
+
function Mr() {
|
|
481
|
+
return this.each(Cr);
|
|
482
482
|
}
|
|
483
|
-
function
|
|
483
|
+
function Dr() {
|
|
484
484
|
this.previousSibling && this.parentNode.insertBefore(this, this.parentNode.firstChild);
|
|
485
485
|
}
|
|
486
|
-
function
|
|
487
|
-
return this.each(
|
|
486
|
+
function Pr() {
|
|
487
|
+
return this.each(Dr);
|
|
488
488
|
}
|
|
489
|
-
function
|
|
489
|
+
function Yr(t) {
|
|
490
490
|
var e = typeof t == "function" ? t : Pe(t);
|
|
491
491
|
return this.select(function() {
|
|
492
492
|
return this.appendChild(e.apply(this, arguments));
|
|
493
493
|
});
|
|
494
494
|
}
|
|
495
|
-
function
|
|
495
|
+
function zr() {
|
|
496
496
|
return null;
|
|
497
497
|
}
|
|
498
|
-
function
|
|
499
|
-
var n = typeof t == "function" ? t : Pe(t), r = e == null ?
|
|
498
|
+
function Rr(t, e) {
|
|
499
|
+
var n = typeof t == "function" ? t : Pe(t), r = e == null ? zr : typeof e == "function" ? e : oe(e);
|
|
500
500
|
return this.select(function() {
|
|
501
501
|
return this.insertBefore(n.apply(this, arguments), r.apply(this, arguments) || null);
|
|
502
502
|
});
|
|
503
503
|
}
|
|
504
|
-
function
|
|
504
|
+
function Lr() {
|
|
505
505
|
var t = this.parentNode;
|
|
506
506
|
t && t.removeChild(this);
|
|
507
507
|
}
|
|
508
|
-
function
|
|
509
|
-
return this.each(
|
|
508
|
+
function Or() {
|
|
509
|
+
return this.each(Lr);
|
|
510
510
|
}
|
|
511
|
-
function
|
|
511
|
+
function Br() {
|
|
512
512
|
var t = this.cloneNode(!1), e = this.parentNode;
|
|
513
513
|
return e ? e.insertBefore(t, this.nextSibling) : t;
|
|
514
514
|
}
|
|
515
|
-
function
|
|
515
|
+
function Hr() {
|
|
516
516
|
var t = this.cloneNode(!0), e = this.parentNode;
|
|
517
517
|
return e ? e.insertBefore(t, this.nextSibling) : t;
|
|
518
518
|
}
|
|
519
|
-
function
|
|
520
|
-
return this.select(t ?
|
|
519
|
+
function Fr(t) {
|
|
520
|
+
return this.select(t ? Hr : Br);
|
|
521
521
|
}
|
|
522
|
-
function
|
|
522
|
+
function Wr(t) {
|
|
523
523
|
return arguments.length ? this.property("__data__", t) : this.node().__data__;
|
|
524
524
|
}
|
|
525
|
-
function
|
|
525
|
+
function Gr(t) {
|
|
526
526
|
return function(e) {
|
|
527
527
|
t.call(this, e, this.__data__);
|
|
528
528
|
};
|
|
529
529
|
}
|
|
530
|
-
function
|
|
530
|
+
function Vr(t) {
|
|
531
531
|
return t.trim().split(/^|\s+/).map(function(e) {
|
|
532
532
|
var n = "", r = e.indexOf(".");
|
|
533
533
|
return r >= 0 && (n = e.slice(r + 1), e = e.slice(0, r)), { type: e, name: n };
|
|
534
534
|
});
|
|
535
535
|
}
|
|
536
|
-
function
|
|
536
|
+
function Xr(t) {
|
|
537
537
|
return function() {
|
|
538
538
|
var e = this.__on;
|
|
539
539
|
if (e) {
|
|
@@ -543,9 +543,9 @@ function Fr(t) {
|
|
|
543
543
|
}
|
|
544
544
|
};
|
|
545
545
|
}
|
|
546
|
-
function
|
|
546
|
+
function qr(t, e, n) {
|
|
547
547
|
return function() {
|
|
548
|
-
var r = this.__on, i, a =
|
|
548
|
+
var r = this.__on, i, a = Gr(e);
|
|
549
549
|
if (r) {
|
|
550
550
|
for (var o = 0, c = r.length; o < c; ++o)
|
|
551
551
|
if ((i = r[o]).type === t.type && i.name === t.name) {
|
|
@@ -556,8 +556,8 @@ function Wr(t, e, n) {
|
|
|
556
556
|
this.addEventListener(t.type, a, n), i = { type: t.type, name: t.name, value: e, listener: a, options: n }, r ? r.push(i) : this.__on = [i];
|
|
557
557
|
};
|
|
558
558
|
}
|
|
559
|
-
function
|
|
560
|
-
var r =
|
|
559
|
+
function Ur(t, e, n) {
|
|
560
|
+
var r = Vr(t + ""), i, a = r.length, o;
|
|
561
561
|
if (arguments.length < 2) {
|
|
562
562
|
var c = this.node().__on;
|
|
563
563
|
if (c) {
|
|
@@ -568,89 +568,89 @@ function Gr(t, e, n) {
|
|
|
568
568
|
}
|
|
569
569
|
return;
|
|
570
570
|
}
|
|
571
|
-
for (c = e ?
|
|
571
|
+
for (c = e ? qr : Xr, i = 0; i < a; ++i) this.each(c(r[i], e, n));
|
|
572
572
|
return this;
|
|
573
573
|
}
|
|
574
|
-
function
|
|
575
|
-
var r =
|
|
574
|
+
function Ge(t, e, n) {
|
|
575
|
+
var r = Oe(t), i = r.CustomEvent;
|
|
576
576
|
typeof i == "function" ? i = new i(e, n) : (i = r.document.createEvent("Event"), n ? (i.initEvent(e, n.bubbles, n.cancelable), i.detail = n.detail) : i.initEvent(e, !1, !1)), t.dispatchEvent(i);
|
|
577
577
|
}
|
|
578
|
-
function
|
|
578
|
+
function Zr(t, e) {
|
|
579
579
|
return function() {
|
|
580
|
-
return
|
|
580
|
+
return Ge(this, t, e);
|
|
581
581
|
};
|
|
582
582
|
}
|
|
583
|
-
function
|
|
583
|
+
function Kr(t, e) {
|
|
584
584
|
return function() {
|
|
585
|
-
return
|
|
585
|
+
return Ge(this, t, e.apply(this, arguments));
|
|
586
586
|
};
|
|
587
587
|
}
|
|
588
|
-
function
|
|
589
|
-
return this.each((typeof e == "function" ?
|
|
588
|
+
function Qr(t, e) {
|
|
589
|
+
return this.each((typeof e == "function" ? Kr : Zr)(t, e));
|
|
590
590
|
}
|
|
591
|
-
function*
|
|
591
|
+
function* Jr() {
|
|
592
592
|
for (var t = this._groups, e = 0, n = t.length; e < n; ++e)
|
|
593
593
|
for (var r = t[e], i = 0, a = r.length, o; i < a; ++i)
|
|
594
594
|
(o = r[i]) && (yield o);
|
|
595
595
|
}
|
|
596
|
-
var
|
|
597
|
-
function
|
|
596
|
+
var Ve = [null];
|
|
597
|
+
function W(t, e) {
|
|
598
598
|
this._groups = t, this._parents = e;
|
|
599
599
|
}
|
|
600
|
-
function
|
|
601
|
-
return new
|
|
600
|
+
function wt() {
|
|
601
|
+
return new W([[document.documentElement]], Ve);
|
|
602
602
|
}
|
|
603
|
-
function
|
|
603
|
+
function jr() {
|
|
604
604
|
return this;
|
|
605
605
|
}
|
|
606
|
-
|
|
607
|
-
constructor:
|
|
608
|
-
select:
|
|
609
|
-
selectAll:
|
|
610
|
-
selectChild:
|
|
611
|
-
selectChildren:
|
|
612
|
-
filter:
|
|
613
|
-
data:
|
|
614
|
-
enter:
|
|
615
|
-
exit:
|
|
616
|
-
join:
|
|
617
|
-
merge:
|
|
618
|
-
selection:
|
|
619
|
-
order:
|
|
620
|
-
sort:
|
|
621
|
-
call:
|
|
622
|
-
nodes:
|
|
623
|
-
node:
|
|
624
|
-
size:
|
|
625
|
-
empty:
|
|
626
|
-
each:
|
|
627
|
-
attr:
|
|
628
|
-
style:
|
|
629
|
-
property:
|
|
630
|
-
classed:
|
|
631
|
-
text:
|
|
632
|
-
html:
|
|
633
|
-
raise:
|
|
634
|
-
lower:
|
|
635
|
-
append:
|
|
636
|
-
insert:
|
|
637
|
-
remove:
|
|
638
|
-
clone:
|
|
639
|
-
datum:
|
|
640
|
-
on:
|
|
641
|
-
dispatch:
|
|
642
|
-
[Symbol.iterator]:
|
|
606
|
+
W.prototype = wt.prototype = {
|
|
607
|
+
constructor: W,
|
|
608
|
+
select: $n,
|
|
609
|
+
selectAll: In,
|
|
610
|
+
selectChild: Dn,
|
|
611
|
+
selectChildren: Rn,
|
|
612
|
+
filter: Ln,
|
|
613
|
+
data: Gn,
|
|
614
|
+
enter: On,
|
|
615
|
+
exit: Xn,
|
|
616
|
+
join: qn,
|
|
617
|
+
merge: Un,
|
|
618
|
+
selection: jr,
|
|
619
|
+
order: Zn,
|
|
620
|
+
sort: Kn,
|
|
621
|
+
call: Jn,
|
|
622
|
+
nodes: jn,
|
|
623
|
+
node: tr,
|
|
624
|
+
size: er,
|
|
625
|
+
empty: nr,
|
|
626
|
+
each: rr,
|
|
627
|
+
attr: ur,
|
|
628
|
+
style: gr,
|
|
629
|
+
property: xr,
|
|
630
|
+
classed: br,
|
|
631
|
+
text: kr,
|
|
632
|
+
html: Tr,
|
|
633
|
+
raise: Mr,
|
|
634
|
+
lower: Pr,
|
|
635
|
+
append: Yr,
|
|
636
|
+
insert: Rr,
|
|
637
|
+
remove: Or,
|
|
638
|
+
clone: Fr,
|
|
639
|
+
datum: Wr,
|
|
640
|
+
on: Ur,
|
|
641
|
+
dispatch: Qr,
|
|
642
|
+
[Symbol.iterator]: Jr
|
|
643
643
|
};
|
|
644
|
-
function
|
|
645
|
-
return typeof t == "string" ? new
|
|
644
|
+
function Y(t) {
|
|
645
|
+
return typeof t == "string" ? new W([[document.querySelector(t)]], [document.documentElement]) : new W([[t]], Ve);
|
|
646
646
|
}
|
|
647
|
-
function
|
|
647
|
+
function ti(t) {
|
|
648
648
|
let e;
|
|
649
649
|
for (; e = t.sourceEvent; ) t = e;
|
|
650
650
|
return t;
|
|
651
651
|
}
|
|
652
|
-
function
|
|
653
|
-
if (t =
|
|
652
|
+
function rt(t, e) {
|
|
653
|
+
if (t = ti(t), e === void 0 && (e = t.currentTarget), e) {
|
|
654
654
|
var n = e.ownerSVGElement || e;
|
|
655
655
|
if (n.createSVGPoint) {
|
|
656
656
|
var r = n.createSVGPoint();
|
|
@@ -663,31 +663,31 @@ function nt(t, e) {
|
|
|
663
663
|
}
|
|
664
664
|
return [t.pageX, t.pageY];
|
|
665
665
|
}
|
|
666
|
-
const
|
|
667
|
-
function
|
|
666
|
+
const qt = { capture: !0, passive: !1 };
|
|
667
|
+
function Ut(t) {
|
|
668
668
|
t.preventDefault(), t.stopImmediatePropagation();
|
|
669
669
|
}
|
|
670
|
-
function
|
|
671
|
-
var e = t.document.documentElement, n =
|
|
672
|
-
"onselectstart" in e ? n.on("selectstart.drag",
|
|
670
|
+
function ei(t) {
|
|
671
|
+
var e = t.document.documentElement, n = Y(t).on("dragstart.drag", Ut, qt);
|
|
672
|
+
"onselectstart" in e ? n.on("selectstart.drag", Ut, qt) : (e.__noselect = e.style.MozUserSelect, e.style.MozUserSelect = "none");
|
|
673
673
|
}
|
|
674
|
-
function
|
|
675
|
-
var n = t.document.documentElement, r =
|
|
676
|
-
e && (r.on("click.drag",
|
|
674
|
+
function ni(t, e) {
|
|
675
|
+
var n = t.document.documentElement, r = Y(t).on("dragstart.drag", null);
|
|
676
|
+
e && (r.on("click.drag", Ut, qt), setTimeout(function() {
|
|
677
677
|
r.on("click.drag", null);
|
|
678
678
|
}, 0)), "onselectstart" in n ? r.on("selectstart.drag", null) : (n.style.MozUserSelect = n.__noselect, delete n.__noselect);
|
|
679
679
|
}
|
|
680
|
-
function
|
|
680
|
+
function se(t, e, n) {
|
|
681
681
|
t.prototype = e.prototype = n, n.constructor = t;
|
|
682
682
|
}
|
|
683
|
-
function
|
|
683
|
+
function Xe(t, e) {
|
|
684
684
|
var n = Object.create(t.prototype);
|
|
685
685
|
for (var r in e) n[r] = e[r];
|
|
686
686
|
return n;
|
|
687
687
|
}
|
|
688
|
-
function
|
|
688
|
+
function vt() {
|
|
689
689
|
}
|
|
690
|
-
var pt = 0.7,
|
|
690
|
+
var pt = 0.7, Dt = 1 / pt, ct = "\\s*([+-]?\\d+)\\s*", mt = "\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*", U = "\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*", ri = /^#([0-9a-f]{3,8})$/, ii = new RegExp(`^rgb\\(${ct},${ct},${ct}\\)$`), oi = new RegExp(`^rgb\\(${U},${U},${U}\\)$`), ai = new RegExp(`^rgba\\(${ct},${ct},${ct},${mt}\\)$`), si = new RegExp(`^rgba\\(${U},${U},${U},${mt}\\)$`), ci = new RegExp(`^hsl\\(${mt},${U},${U}\\)$`), li = new RegExp(`^hsla\\(${mt},${U},${U},${mt}\\)$`), ge = {
|
|
691
691
|
aliceblue: 15792383,
|
|
692
692
|
antiquewhite: 16444375,
|
|
693
693
|
aqua: 65535,
|
|
@@ -837,203 +837,203 @@ var pt = 0.7, It = 1 / pt, ct = "\\s*([+-]?\\d+)\\s*", mt = "\\s*([+-]?(?:\\d*\\
|
|
|
837
837
|
yellow: 16776960,
|
|
838
838
|
yellowgreen: 10145074
|
|
839
839
|
};
|
|
840
|
-
|
|
840
|
+
se(vt, yt, {
|
|
841
841
|
copy(t) {
|
|
842
842
|
return Object.assign(new this.constructor(), this, t);
|
|
843
843
|
},
|
|
844
844
|
displayable() {
|
|
845
845
|
return this.rgb().displayable();
|
|
846
846
|
},
|
|
847
|
-
hex:
|
|
847
|
+
hex: pe,
|
|
848
848
|
// Deprecated! Use color.formatHex.
|
|
849
|
-
formatHex:
|
|
850
|
-
formatHex8:
|
|
851
|
-
formatHsl:
|
|
852
|
-
formatRgb:
|
|
853
|
-
toString:
|
|
849
|
+
formatHex: pe,
|
|
850
|
+
formatHex8: ui,
|
|
851
|
+
formatHsl: fi,
|
|
852
|
+
formatRgb: me,
|
|
853
|
+
toString: me
|
|
854
854
|
});
|
|
855
|
-
function
|
|
855
|
+
function pe() {
|
|
856
856
|
return this.rgb().formatHex();
|
|
857
857
|
}
|
|
858
|
-
function
|
|
858
|
+
function ui() {
|
|
859
859
|
return this.rgb().formatHex8();
|
|
860
860
|
}
|
|
861
|
-
function
|
|
862
|
-
return
|
|
861
|
+
function fi() {
|
|
862
|
+
return qe(this).formatHsl();
|
|
863
863
|
}
|
|
864
|
-
function
|
|
864
|
+
function me() {
|
|
865
865
|
return this.rgb().formatRgb();
|
|
866
866
|
}
|
|
867
867
|
function yt(t) {
|
|
868
868
|
var e, n;
|
|
869
|
-
return t = (t + "").trim().toLowerCase(), (e =
|
|
869
|
+
return t = (t + "").trim().toLowerCase(), (e = ri.exec(t)) ? (n = e[1].length, e = parseInt(e[1], 16), n === 6 ? ye(e) : n === 3 ? new F(e >> 8 & 15 | e >> 4 & 240, e >> 4 & 15 | e & 240, (e & 15) << 4 | e & 15, 1) : n === 8 ? bt(e >> 24 & 255, e >> 16 & 255, e >> 8 & 255, (e & 255) / 255) : n === 4 ? bt(e >> 12 & 15 | e >> 8 & 240, e >> 8 & 15 | e >> 4 & 240, e >> 4 & 15 | e & 240, ((e & 15) << 4 | e & 15) / 255) : null) : (e = ii.exec(t)) ? new F(e[1], e[2], e[3], 1) : (e = oi.exec(t)) ? new F(e[1] * 255 / 100, e[2] * 255 / 100, e[3] * 255 / 100, 1) : (e = ai.exec(t)) ? bt(e[1], e[2], e[3], e[4]) : (e = si.exec(t)) ? bt(e[1] * 255 / 100, e[2] * 255 / 100, e[3] * 255 / 100, e[4]) : (e = ci.exec(t)) ? we(e[1], e[2] / 100, e[3] / 100, 1) : (e = li.exec(t)) ? we(e[1], e[2] / 100, e[3] / 100, e[4]) : ge.hasOwnProperty(t) ? ye(ge[t]) : t === "transparent" ? new F(NaN, NaN, NaN, 0) : null;
|
|
870
870
|
}
|
|
871
|
-
function
|
|
872
|
-
return new
|
|
871
|
+
function ye(t) {
|
|
872
|
+
return new F(t >> 16 & 255, t >> 8 & 255, t & 255, 1);
|
|
873
873
|
}
|
|
874
|
-
function
|
|
875
|
-
return r <= 0 && (t = e = n = NaN), new
|
|
874
|
+
function bt(t, e, n, r) {
|
|
875
|
+
return r <= 0 && (t = e = n = NaN), new F(t, e, n, r);
|
|
876
876
|
}
|
|
877
|
-
function
|
|
878
|
-
return t instanceof
|
|
877
|
+
function hi(t) {
|
|
878
|
+
return t instanceof vt || (t = yt(t)), t ? (t = t.rgb(), new F(t.r, t.g, t.b, t.opacity)) : new F();
|
|
879
879
|
}
|
|
880
|
-
function
|
|
881
|
-
return arguments.length === 1 ?
|
|
880
|
+
function Zt(t, e, n, r) {
|
|
881
|
+
return arguments.length === 1 ? hi(t) : new F(t, e, n, r ?? 1);
|
|
882
882
|
}
|
|
883
|
-
function
|
|
883
|
+
function F(t, e, n, r) {
|
|
884
884
|
this.r = +t, this.g = +e, this.b = +n, this.opacity = +r;
|
|
885
885
|
}
|
|
886
|
-
|
|
886
|
+
se(F, Zt, Xe(vt, {
|
|
887
887
|
brighter(t) {
|
|
888
|
-
return t = t == null ?
|
|
888
|
+
return t = t == null ? Dt : Math.pow(Dt, t), new F(this.r * t, this.g * t, this.b * t, this.opacity);
|
|
889
889
|
},
|
|
890
890
|
darker(t) {
|
|
891
|
-
return t = t == null ? pt : Math.pow(pt, t), new
|
|
891
|
+
return t = t == null ? pt : Math.pow(pt, t), new F(this.r * t, this.g * t, this.b * t, this.opacity);
|
|
892
892
|
},
|
|
893
893
|
rgb() {
|
|
894
894
|
return this;
|
|
895
895
|
},
|
|
896
896
|
clamp() {
|
|
897
|
-
return new
|
|
897
|
+
return new F(at(this.r), at(this.g), at(this.b), Pt(this.opacity));
|
|
898
898
|
},
|
|
899
899
|
displayable() {
|
|
900
900
|
return -0.5 <= this.r && this.r < 255.5 && -0.5 <= this.g && this.g < 255.5 && -0.5 <= this.b && this.b < 255.5 && 0 <= this.opacity && this.opacity <= 1;
|
|
901
901
|
},
|
|
902
|
-
hex:
|
|
902
|
+
hex: xe,
|
|
903
903
|
// Deprecated! Use color.formatHex.
|
|
904
|
-
formatHex:
|
|
905
|
-
formatHex8:
|
|
906
|
-
formatRgb:
|
|
907
|
-
toString:
|
|
904
|
+
formatHex: xe,
|
|
905
|
+
formatHex8: di,
|
|
906
|
+
formatRgb: _e,
|
|
907
|
+
toString: _e
|
|
908
908
|
}));
|
|
909
|
-
function
|
|
910
|
-
return `#${
|
|
909
|
+
function xe() {
|
|
910
|
+
return `#${ot(this.r)}${ot(this.g)}${ot(this.b)}`;
|
|
911
911
|
}
|
|
912
|
-
function
|
|
913
|
-
return `#${
|
|
912
|
+
function di() {
|
|
913
|
+
return `#${ot(this.r)}${ot(this.g)}${ot(this.b)}${ot((isNaN(this.opacity) ? 1 : this.opacity) * 255)}`;
|
|
914
914
|
}
|
|
915
|
-
function
|
|
915
|
+
function _e() {
|
|
916
916
|
const t = Pt(this.opacity);
|
|
917
|
-
return `${t === 1 ? "rgb(" : "rgba("}${
|
|
917
|
+
return `${t === 1 ? "rgb(" : "rgba("}${at(this.r)}, ${at(this.g)}, ${at(this.b)}${t === 1 ? ")" : `, ${t})`}`;
|
|
918
918
|
}
|
|
919
919
|
function Pt(t) {
|
|
920
920
|
return isNaN(t) ? 1 : Math.max(0, Math.min(1, t));
|
|
921
921
|
}
|
|
922
|
-
function
|
|
922
|
+
function at(t) {
|
|
923
923
|
return Math.max(0, Math.min(255, Math.round(t) || 0));
|
|
924
924
|
}
|
|
925
|
-
function
|
|
926
|
-
return t =
|
|
925
|
+
function ot(t) {
|
|
926
|
+
return t = at(t), (t < 16 ? "0" : "") + t.toString(16);
|
|
927
927
|
}
|
|
928
|
-
function
|
|
929
|
-
return r <= 0 ? t = e = n = NaN : n <= 0 || n >= 1 ? t = e = NaN : e <= 0 && (t = NaN), new
|
|
928
|
+
function we(t, e, n, r) {
|
|
929
|
+
return r <= 0 ? t = e = n = NaN : n <= 0 || n >= 1 ? t = e = NaN : e <= 0 && (t = NaN), new X(t, e, n, r);
|
|
930
930
|
}
|
|
931
|
-
function
|
|
932
|
-
if (t instanceof
|
|
933
|
-
if (t instanceof
|
|
934
|
-
if (t instanceof
|
|
931
|
+
function qe(t) {
|
|
932
|
+
if (t instanceof X) return new X(t.h, t.s, t.l, t.opacity);
|
|
933
|
+
if (t instanceof vt || (t = yt(t)), !t) return new X();
|
|
934
|
+
if (t instanceof X) return t;
|
|
935
935
|
t = t.rgb();
|
|
936
936
|
var e = t.r / 255, n = t.g / 255, r = t.b / 255, i = Math.min(e, n, r), a = Math.max(e, n, r), o = NaN, c = a - i, s = (a + i) / 2;
|
|
937
|
-
return c ? (e === a ? o = (n - r) / c + (n < r) * 6 : n === a ? o = (r - e) / c + 2 : o = (e - n) / c + 4, c /= s < 0.5 ? a + i : 2 - a - i, o *= 60) : c = s > 0 && s < 1 ? 0 : o, new
|
|
937
|
+
return c ? (e === a ? o = (n - r) / c + (n < r) * 6 : n === a ? o = (r - e) / c + 2 : o = (e - n) / c + 4, c /= s < 0.5 ? a + i : 2 - a - i, o *= 60) : c = s > 0 && s < 1 ? 0 : o, new X(o, c, s, t.opacity);
|
|
938
938
|
}
|
|
939
|
-
function
|
|
940
|
-
return arguments.length === 1 ?
|
|
939
|
+
function gi(t, e, n, r) {
|
|
940
|
+
return arguments.length === 1 ? qe(t) : new X(t, e, n, r ?? 1);
|
|
941
941
|
}
|
|
942
|
-
function
|
|
942
|
+
function X(t, e, n, r) {
|
|
943
943
|
this.h = +t, this.s = +e, this.l = +n, this.opacity = +r;
|
|
944
944
|
}
|
|
945
|
-
|
|
945
|
+
se(X, gi, Xe(vt, {
|
|
946
946
|
brighter(t) {
|
|
947
|
-
return t = t == null ?
|
|
947
|
+
return t = t == null ? Dt : Math.pow(Dt, t), new X(this.h, this.s, this.l * t, this.opacity);
|
|
948
948
|
},
|
|
949
949
|
darker(t) {
|
|
950
|
-
return t = t == null ? pt : Math.pow(pt, t), new
|
|
950
|
+
return t = t == null ? pt : Math.pow(pt, t), new X(this.h, this.s, this.l * t, this.opacity);
|
|
951
951
|
},
|
|
952
952
|
rgb() {
|
|
953
953
|
var t = this.h % 360 + (this.h < 0) * 360, e = isNaN(t) || isNaN(this.s) ? 0 : this.s, n = this.l, r = n + (n < 0.5 ? n : 1 - n) * e, i = 2 * n - r;
|
|
954
|
-
return new
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
954
|
+
return new F(
|
|
955
|
+
Wt(t >= 240 ? t - 240 : t + 120, i, r),
|
|
956
|
+
Wt(t, i, r),
|
|
957
|
+
Wt(t < 120 ? t + 240 : t - 120, i, r),
|
|
958
958
|
this.opacity
|
|
959
959
|
);
|
|
960
960
|
},
|
|
961
961
|
clamp() {
|
|
962
|
-
return new
|
|
962
|
+
return new X(ve(this.h), Et(this.s), Et(this.l), Pt(this.opacity));
|
|
963
963
|
},
|
|
964
964
|
displayable() {
|
|
965
965
|
return (0 <= this.s && this.s <= 1 || isNaN(this.s)) && 0 <= this.l && this.l <= 1 && 0 <= this.opacity && this.opacity <= 1;
|
|
966
966
|
},
|
|
967
967
|
formatHsl() {
|
|
968
968
|
const t = Pt(this.opacity);
|
|
969
|
-
return `${t === 1 ? "hsl(" : "hsla("}${
|
|
969
|
+
return `${t === 1 ? "hsl(" : "hsla("}${ve(this.h)}, ${Et(this.s) * 100}%, ${Et(this.l) * 100}%${t === 1 ? ")" : `, ${t})`}`;
|
|
970
970
|
}
|
|
971
971
|
}));
|
|
972
|
-
function
|
|
972
|
+
function ve(t) {
|
|
973
973
|
return t = (t || 0) % 360, t < 0 ? t + 360 : t;
|
|
974
974
|
}
|
|
975
|
-
function
|
|
975
|
+
function Et(t) {
|
|
976
976
|
return Math.max(0, Math.min(1, t || 0));
|
|
977
977
|
}
|
|
978
|
-
function
|
|
978
|
+
function Wt(t, e, n) {
|
|
979
979
|
return (t < 60 ? e + (n - e) * t / 60 : t < 180 ? n : t < 240 ? e + (n - e) * (240 - t) / 60 : e) * 255;
|
|
980
980
|
}
|
|
981
|
-
const
|
|
982
|
-
function
|
|
981
|
+
const Ue = (t) => () => t;
|
|
982
|
+
function pi(t, e) {
|
|
983
983
|
return function(n) {
|
|
984
984
|
return t + n * e;
|
|
985
985
|
};
|
|
986
986
|
}
|
|
987
|
-
function
|
|
987
|
+
function mi(t, e, n) {
|
|
988
988
|
return t = Math.pow(t, n), e = Math.pow(e, n) - t, n = 1 / n, function(r) {
|
|
989
989
|
return Math.pow(t + r * e, n);
|
|
990
990
|
};
|
|
991
991
|
}
|
|
992
|
-
function
|
|
993
|
-
return (t = +t) == 1 ?
|
|
994
|
-
return n - e ?
|
|
992
|
+
function yi(t) {
|
|
993
|
+
return (t = +t) == 1 ? Ze : function(e, n) {
|
|
994
|
+
return n - e ? mi(e, n, t) : Ue(isNaN(e) ? n : e);
|
|
995
995
|
};
|
|
996
996
|
}
|
|
997
|
-
function
|
|
997
|
+
function Ze(t, e) {
|
|
998
998
|
var n = e - t;
|
|
999
|
-
return n ?
|
|
999
|
+
return n ? pi(t, n) : Ue(isNaN(t) ? e : t);
|
|
1000
1000
|
}
|
|
1001
|
-
const
|
|
1002
|
-
var n =
|
|
1001
|
+
const be = (function t(e) {
|
|
1002
|
+
var n = yi(e);
|
|
1003
1003
|
function r(i, a) {
|
|
1004
|
-
var o = n((i =
|
|
1004
|
+
var o = n((i = Zt(i)).r, (a = Zt(a)).r), c = n(i.g, a.g), s = n(i.b, a.b), l = Ze(i.opacity, a.opacity);
|
|
1005
1005
|
return function(u) {
|
|
1006
1006
|
return i.r = o(u), i.g = c(u), i.b = s(u), i.opacity = l(u), i + "";
|
|
1007
1007
|
};
|
|
1008
1008
|
}
|
|
1009
1009
|
return r.gamma = t, r;
|
|
1010
1010
|
})(1);
|
|
1011
|
-
function
|
|
1011
|
+
function et(t, e) {
|
|
1012
1012
|
return t = +t, e = +e, function(n) {
|
|
1013
1013
|
return t * (1 - n) + e * n;
|
|
1014
1014
|
};
|
|
1015
1015
|
}
|
|
1016
|
-
var
|
|
1017
|
-
function
|
|
1016
|
+
var Kt = /[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g, Gt = new RegExp(Kt.source, "g");
|
|
1017
|
+
function xi(t) {
|
|
1018
1018
|
return function() {
|
|
1019
1019
|
return t;
|
|
1020
1020
|
};
|
|
1021
1021
|
}
|
|
1022
|
-
function
|
|
1022
|
+
function _i(t) {
|
|
1023
1023
|
return function(e) {
|
|
1024
1024
|
return t(e) + "";
|
|
1025
1025
|
};
|
|
1026
1026
|
}
|
|
1027
|
-
function
|
|
1028
|
-
var n =
|
|
1029
|
-
for (t = t + "", e = e + ""; (r =
|
|
1030
|
-
(a = i.index) > n && (a = e.slice(n, a), c[o] ? c[o] += a : c[++o] = a), (r = r[0]) === (i = i[0]) ? c[o] ? c[o] += i : c[++o] = i : (c[++o] = null, s.push({ i: o, x:
|
|
1031
|
-
return n < e.length && (a = e.slice(n), c[o] ? c[o] += a : c[++o] = a), c.length < 2 ? s[0] ?
|
|
1027
|
+
function wi(t, e) {
|
|
1028
|
+
var n = Kt.lastIndex = Gt.lastIndex = 0, r, i, a, o = -1, c = [], s = [];
|
|
1029
|
+
for (t = t + "", e = e + ""; (r = Kt.exec(t)) && (i = Gt.exec(e)); )
|
|
1030
|
+
(a = i.index) > n && (a = e.slice(n, a), c[o] ? c[o] += a : c[++o] = a), (r = r[0]) === (i = i[0]) ? c[o] ? c[o] += i : c[++o] = i : (c[++o] = null, s.push({ i: o, x: et(r, i) })), n = Gt.lastIndex;
|
|
1031
|
+
return n < e.length && (a = e.slice(n), c[o] ? c[o] += a : c[++o] = a), c.length < 2 ? s[0] ? _i(s[0].x) : xi(e) : (e = s.length, function(l) {
|
|
1032
1032
|
for (var u = 0, f; u < e; ++u) c[(f = s[u]).i] = f.x(l);
|
|
1033
1033
|
return c.join("");
|
|
1034
1034
|
});
|
|
1035
1035
|
}
|
|
1036
|
-
var
|
|
1036
|
+
var Ee = 180 / Math.PI, Qt = {
|
|
1037
1037
|
translateX: 0,
|
|
1038
1038
|
translateY: 0,
|
|
1039
1039
|
rotate: 0,
|
|
@@ -1041,45 +1041,45 @@ var be = 180 / Math.PI, Kt = {
|
|
|
1041
1041
|
scaleX: 1,
|
|
1042
1042
|
scaleY: 1
|
|
1043
1043
|
};
|
|
1044
|
-
function
|
|
1044
|
+
function Ke(t, e, n, r, i, a) {
|
|
1045
1045
|
var o, c, s;
|
|
1046
1046
|
return (o = Math.sqrt(t * t + e * e)) && (t /= o, e /= o), (s = t * n + e * r) && (n -= t * s, r -= e * s), (c = Math.sqrt(n * n + r * r)) && (n /= c, r /= c, s /= c), t * r < e * n && (t = -t, e = -e, s = -s, o = -o), {
|
|
1047
1047
|
translateX: i,
|
|
1048
1048
|
translateY: a,
|
|
1049
|
-
rotate: Math.atan2(e, t) *
|
|
1050
|
-
skewX: Math.atan(s) *
|
|
1049
|
+
rotate: Math.atan2(e, t) * Ee,
|
|
1050
|
+
skewX: Math.atan(s) * Ee,
|
|
1051
1051
|
scaleX: o,
|
|
1052
1052
|
scaleY: c
|
|
1053
1053
|
};
|
|
1054
1054
|
}
|
|
1055
|
-
var
|
|
1056
|
-
function
|
|
1055
|
+
var Nt;
|
|
1056
|
+
function vi(t) {
|
|
1057
1057
|
const e = new (typeof DOMMatrix == "function" ? DOMMatrix : WebKitCSSMatrix)(t + "");
|
|
1058
|
-
return e.isIdentity ?
|
|
1058
|
+
return e.isIdentity ? Qt : Ke(e.a, e.b, e.c, e.d, e.e, e.f);
|
|
1059
1059
|
}
|
|
1060
|
-
function
|
|
1061
|
-
return t == null || (
|
|
1060
|
+
function bi(t) {
|
|
1061
|
+
return t == null || (Nt || (Nt = document.createElementNS("http://www.w3.org/2000/svg", "g")), Nt.setAttribute("transform", t), !(t = Nt.transform.baseVal.consolidate())) ? Qt : (t = t.matrix, Ke(t.a, t.b, t.c, t.d, t.e, t.f));
|
|
1062
1062
|
}
|
|
1063
|
-
function
|
|
1063
|
+
function Qe(t, e, n, r) {
|
|
1064
1064
|
function i(l) {
|
|
1065
1065
|
return l.length ? l.pop() + " " : "";
|
|
1066
1066
|
}
|
|
1067
1067
|
function a(l, u, f, h, g, m) {
|
|
1068
1068
|
if (l !== f || u !== h) {
|
|
1069
1069
|
var x = g.push("translate(", null, e, null, n);
|
|
1070
|
-
m.push({ i: x - 4, x:
|
|
1070
|
+
m.push({ i: x - 4, x: et(l, f) }, { i: x - 2, x: et(u, h) });
|
|
1071
1071
|
} else (f || h) && g.push("translate(" + f + e + h + n);
|
|
1072
1072
|
}
|
|
1073
1073
|
function o(l, u, f, h) {
|
|
1074
|
-
l !== u ? (l - u > 180 ? u += 360 : u - l > 180 && (l += 360), h.push({ i: f.push(i(f) + "rotate(", null, r) - 2, x:
|
|
1074
|
+
l !== u ? (l - u > 180 ? u += 360 : u - l > 180 && (l += 360), h.push({ i: f.push(i(f) + "rotate(", null, r) - 2, x: et(l, u) })) : u && f.push(i(f) + "rotate(" + u + r);
|
|
1075
1075
|
}
|
|
1076
1076
|
function c(l, u, f, h) {
|
|
1077
|
-
l !== u ? h.push({ i: f.push(i(f) + "skewX(", null, r) - 2, x:
|
|
1077
|
+
l !== u ? h.push({ i: f.push(i(f) + "skewX(", null, r) - 2, x: et(l, u) }) : u && f.push(i(f) + "skewX(" + u + r);
|
|
1078
1078
|
}
|
|
1079
1079
|
function s(l, u, f, h, g, m) {
|
|
1080
1080
|
if (l !== f || u !== h) {
|
|
1081
1081
|
var x = g.push(i(g) + "scale(", null, ",", null, ")");
|
|
1082
|
-
m.push({ i: x - 4, x:
|
|
1082
|
+
m.push({ i: x - 4, x: et(l, f) }, { i: x - 2, x: et(u, h) });
|
|
1083
1083
|
} else (f !== 1 || h !== 1) && g.push(i(g) + "scale(" + f + "," + h + ")");
|
|
1084
1084
|
}
|
|
1085
1085
|
return function(l, u) {
|
|
@@ -1090,35 +1090,35 @@ function Ke(t, e, n, r) {
|
|
|
1090
1090
|
};
|
|
1091
1091
|
};
|
|
1092
1092
|
}
|
|
1093
|
-
var
|
|
1094
|
-
function
|
|
1093
|
+
var Ei = Qe(vi, "px, ", "px)", "deg)"), Ni = Qe(bi, ", ", ")", ")"), $i = 1e-12;
|
|
1094
|
+
function Ne(t) {
|
|
1095
1095
|
return ((t = Math.exp(t)) + 1 / t) / 2;
|
|
1096
1096
|
}
|
|
1097
|
-
function
|
|
1097
|
+
function ki(t) {
|
|
1098
1098
|
return ((t = Math.exp(t)) - 1 / t) / 2;
|
|
1099
1099
|
}
|
|
1100
|
-
function
|
|
1100
|
+
function Si(t) {
|
|
1101
1101
|
return ((t = Math.exp(2 * t)) - 1) / (t + 1);
|
|
1102
1102
|
}
|
|
1103
|
-
const
|
|
1103
|
+
const Ai = (function t(e, n, r) {
|
|
1104
1104
|
function i(a, o) {
|
|
1105
1105
|
var c = a[0], s = a[1], l = a[2], u = o[0], f = o[1], h = o[2], g = u - c, m = f - s, x = g * g + m * m, y, p;
|
|
1106
|
-
if (x <
|
|
1107
|
-
p = Math.log(h / l) / e, y = function(
|
|
1106
|
+
if (x < $i)
|
|
1107
|
+
p = Math.log(h / l) / e, y = function(k) {
|
|
1108
1108
|
return [
|
|
1109
|
-
c +
|
|
1110
|
-
s +
|
|
1111
|
-
l * Math.exp(e *
|
|
1109
|
+
c + k * g,
|
|
1110
|
+
s + k * m,
|
|
1111
|
+
l * Math.exp(e * k * p)
|
|
1112
1112
|
];
|
|
1113
1113
|
};
|
|
1114
1114
|
else {
|
|
1115
|
-
var w = Math.sqrt(x),
|
|
1116
|
-
p = (
|
|
1117
|
-
var
|
|
1115
|
+
var w = Math.sqrt(x), E = (h * h - l * l + r * x) / (2 * l * n * w), S = (h * h - l * l - r * x) / (2 * h * n * w), $ = Math.log(Math.sqrt(E * E + 1) - E), v = Math.log(Math.sqrt(S * S + 1) - S);
|
|
1116
|
+
p = (v - $) / e, y = function(k) {
|
|
1117
|
+
var M = k * p, D = Ne($), C = l / (n * w) * (D * Si(e * M + $) - ki($));
|
|
1118
1118
|
return [
|
|
1119
1119
|
c + C * g,
|
|
1120
1120
|
s + C * m,
|
|
1121
|
-
l * D /
|
|
1121
|
+
l * D / Ne(e * M + $)
|
|
1122
1122
|
];
|
|
1123
1123
|
};
|
|
1124
1124
|
}
|
|
@@ -1129,107 +1129,107 @@ const Ni = (function t(e, n, r) {
|
|
|
1129
1129
|
return t(o, c, s);
|
|
1130
1130
|
}, i;
|
|
1131
1131
|
})(Math.SQRT2, 2, 4);
|
|
1132
|
-
var ut = 0, dt = 0, ft = 0,
|
|
1132
|
+
var ut = 0, dt = 0, ft = 0, Je = 1e3, Yt, gt, zt = 0, st = 0, Ot = 0, xt = typeof performance == "object" && performance.now ? performance : Date, je = typeof window == "object" && window.requestAnimationFrame ? window.requestAnimationFrame.bind(window) : function(t) {
|
|
1133
1133
|
setTimeout(t, 17);
|
|
1134
1134
|
};
|
|
1135
|
-
function
|
|
1136
|
-
return
|
|
1135
|
+
function ce() {
|
|
1136
|
+
return st || (je(Ii), st = xt.now() + Ot);
|
|
1137
1137
|
}
|
|
1138
|
-
function
|
|
1139
|
-
|
|
1138
|
+
function Ii() {
|
|
1139
|
+
st = 0;
|
|
1140
1140
|
}
|
|
1141
|
-
function
|
|
1141
|
+
function Rt() {
|
|
1142
1142
|
this._call = this._time = this._next = null;
|
|
1143
1143
|
}
|
|
1144
|
-
|
|
1145
|
-
constructor:
|
|
1144
|
+
Rt.prototype = tn.prototype = {
|
|
1145
|
+
constructor: Rt,
|
|
1146
1146
|
restart: function(t, e, n) {
|
|
1147
1147
|
if (typeof t != "function") throw new TypeError("callback is not a function");
|
|
1148
|
-
n = (n == null ?
|
|
1148
|
+
n = (n == null ? ce() : +n) + (e == null ? 0 : +e), !this._next && gt !== this && (gt ? gt._next = this : Yt = this, gt = this), this._call = t, this._time = n, Jt();
|
|
1149
1149
|
},
|
|
1150
1150
|
stop: function() {
|
|
1151
|
-
this._call && (this._call = null, this._time = 1 / 0,
|
|
1151
|
+
this._call && (this._call = null, this._time = 1 / 0, Jt());
|
|
1152
1152
|
}
|
|
1153
1153
|
};
|
|
1154
|
-
function
|
|
1155
|
-
var r = new
|
|
1154
|
+
function tn(t, e, n) {
|
|
1155
|
+
var r = new Rt();
|
|
1156
1156
|
return r.restart(t, e, n), r;
|
|
1157
1157
|
}
|
|
1158
|
-
function
|
|
1159
|
-
|
|
1160
|
-
for (var t =
|
|
1161
|
-
(e =
|
|
1158
|
+
function Ti() {
|
|
1159
|
+
ce(), ++ut;
|
|
1160
|
+
for (var t = Yt, e; t; )
|
|
1161
|
+
(e = st - t._time) >= 0 && t._call.call(void 0, e), t = t._next;
|
|
1162
1162
|
--ut;
|
|
1163
1163
|
}
|
|
1164
|
-
function
|
|
1165
|
-
|
|
1164
|
+
function $e() {
|
|
1165
|
+
st = (zt = xt.now()) + Ot, ut = dt = 0;
|
|
1166
1166
|
try {
|
|
1167
|
-
|
|
1167
|
+
Ti();
|
|
1168
1168
|
} finally {
|
|
1169
|
-
ut = 0,
|
|
1169
|
+
ut = 0, Mi(), st = 0;
|
|
1170
1170
|
}
|
|
1171
1171
|
}
|
|
1172
|
-
function
|
|
1172
|
+
function Ci() {
|
|
1173
1173
|
var t = xt.now(), e = t - zt;
|
|
1174
|
-
e >
|
|
1174
|
+
e > Je && (Ot -= e, zt = t);
|
|
1175
1175
|
}
|
|
1176
|
-
function
|
|
1177
|
-
for (var t, e =
|
|
1178
|
-
e._call ? (r > e._time && (r = e._time), t = e, e = e._next) : (n = e._next, e._next = null, e = t ? t._next = n :
|
|
1179
|
-
gt = t,
|
|
1176
|
+
function Mi() {
|
|
1177
|
+
for (var t, e = Yt, n, r = 1 / 0; e; )
|
|
1178
|
+
e._call ? (r > e._time && (r = e._time), t = e, e = e._next) : (n = e._next, e._next = null, e = t ? t._next = n : Yt = n);
|
|
1179
|
+
gt = t, Jt(r);
|
|
1180
1180
|
}
|
|
1181
|
-
function
|
|
1181
|
+
function Jt(t) {
|
|
1182
1182
|
if (!ut) {
|
|
1183
1183
|
dt && (dt = clearTimeout(dt));
|
|
1184
|
-
var e = t -
|
|
1185
|
-
e > 24 ? (t < 1 / 0 && (dt = setTimeout(
|
|
1184
|
+
var e = t - st;
|
|
1185
|
+
e > 24 ? (t < 1 / 0 && (dt = setTimeout($e, t - xt.now() - Ot)), ft && (ft = clearInterval(ft))) : (ft || (zt = xt.now(), ft = setInterval(Ci, Je)), ut = 1, je($e));
|
|
1186
1186
|
}
|
|
1187
1187
|
}
|
|
1188
|
-
function
|
|
1189
|
-
var r = new
|
|
1188
|
+
function ke(t, e, n) {
|
|
1189
|
+
var r = new Rt();
|
|
1190
1190
|
return e = e == null ? 0 : +e, r.restart((i) => {
|
|
1191
1191
|
r.stop(), t(i + e);
|
|
1192
1192
|
}, e, n), r;
|
|
1193
1193
|
}
|
|
1194
|
-
var
|
|
1194
|
+
var Di = ie("start", "end", "cancel", "interrupt"), Pi = [], en = 0, Se = 1, jt = 2, St = 3, Ae = 4, te = 5, At = 6;
|
|
1195
1195
|
function Bt(t, e, n, r, i, a) {
|
|
1196
1196
|
var o = t.__transition;
|
|
1197
1197
|
if (!o) t.__transition = {};
|
|
1198
1198
|
else if (n in o) return;
|
|
1199
|
-
|
|
1199
|
+
Yi(t, n, {
|
|
1200
1200
|
name: e,
|
|
1201
1201
|
index: r,
|
|
1202
1202
|
// For context during callback.
|
|
1203
1203
|
group: i,
|
|
1204
1204
|
// For context during callback.
|
|
1205
|
-
on:
|
|
1206
|
-
tween:
|
|
1205
|
+
on: Di,
|
|
1206
|
+
tween: Pi,
|
|
1207
1207
|
time: a.time,
|
|
1208
1208
|
delay: a.delay,
|
|
1209
1209
|
duration: a.duration,
|
|
1210
1210
|
ease: a.ease,
|
|
1211
1211
|
timer: null,
|
|
1212
|
-
state:
|
|
1212
|
+
state: en
|
|
1213
1213
|
});
|
|
1214
1214
|
}
|
|
1215
|
-
function
|
|
1216
|
-
var n =
|
|
1217
|
-
if (n.state >
|
|
1215
|
+
function le(t, e) {
|
|
1216
|
+
var n = q(t, e);
|
|
1217
|
+
if (n.state > en) throw new Error("too late; already scheduled");
|
|
1218
1218
|
return n;
|
|
1219
1219
|
}
|
|
1220
|
-
function
|
|
1221
|
-
var n =
|
|
1220
|
+
function Z(t, e) {
|
|
1221
|
+
var n = q(t, e);
|
|
1222
1222
|
if (n.state > St) throw new Error("too late; already running");
|
|
1223
1223
|
return n;
|
|
1224
1224
|
}
|
|
1225
|
-
function
|
|
1225
|
+
function q(t, e) {
|
|
1226
1226
|
var n = t.__transition;
|
|
1227
1227
|
if (!n || !(n = n[e])) throw new Error("transition not found");
|
|
1228
1228
|
return n;
|
|
1229
1229
|
}
|
|
1230
|
-
function
|
|
1230
|
+
function Yi(t, e, n) {
|
|
1231
1231
|
var r = t.__transition, i;
|
|
1232
|
-
r[e] = n, n.timer =
|
|
1232
|
+
r[e] = n, n.timer = tn(a, 0, n.time);
|
|
1233
1233
|
function a(l) {
|
|
1234
1234
|
n.state = Se, n.timer.restart(o, n.delay, n.time), n.delay <= l && o(l - n.delay);
|
|
1235
1235
|
}
|
|
@@ -1238,29 +1238,29 @@ function Ci(t, e, n) {
|
|
|
1238
1238
|
if (n.state !== Se) return s();
|
|
1239
1239
|
for (u in r)
|
|
1240
1240
|
if (g = r[u], g.name === n.name) {
|
|
1241
|
-
if (g.state === St) return
|
|
1242
|
-
g.state ===
|
|
1241
|
+
if (g.state === St) return ke(o);
|
|
1242
|
+
g.state === Ae ? (g.state = At, g.timer.stop(), g.on.call("interrupt", t, t.__data__, g.index, g.group), delete r[u]) : +u < e && (g.state = At, g.timer.stop(), g.on.call("cancel", t, t.__data__, g.index, g.group), delete r[u]);
|
|
1243
1243
|
}
|
|
1244
|
-
if (
|
|
1245
|
-
n.state === St && (n.state =
|
|
1246
|
-
}), n.state =
|
|
1244
|
+
if (ke(function() {
|
|
1245
|
+
n.state === St && (n.state = Ae, n.timer.restart(c, n.delay, n.time), c(l));
|
|
1246
|
+
}), n.state = jt, n.on.call("start", t, t.__data__, n.index, n.group), n.state === jt) {
|
|
1247
1247
|
for (n.state = St, i = new Array(h = n.tween.length), u = 0, f = -1; u < h; ++u)
|
|
1248
1248
|
(g = n.tween[u].value.call(t, t.__data__, n.index, n.group)) && (i[++f] = g);
|
|
1249
1249
|
i.length = f + 1;
|
|
1250
1250
|
}
|
|
1251
1251
|
}
|
|
1252
1252
|
function c(l) {
|
|
1253
|
-
for (var u = l < n.duration ? n.ease.call(null, l / n.duration) : (n.timer.restart(s), n.state =
|
|
1253
|
+
for (var u = l < n.duration ? n.ease.call(null, l / n.duration) : (n.timer.restart(s), n.state = te, 1), f = -1, h = i.length; ++f < h; )
|
|
1254
1254
|
i[f].call(t, u);
|
|
1255
|
-
n.state ===
|
|
1255
|
+
n.state === te && (n.on.call("end", t, t.__data__, n.index, n.group), s());
|
|
1256
1256
|
}
|
|
1257
1257
|
function s() {
|
|
1258
|
-
n.state =
|
|
1258
|
+
n.state = At, n.timer.stop(), delete r[e];
|
|
1259
1259
|
for (var l in r) return;
|
|
1260
1260
|
delete t.__transition;
|
|
1261
1261
|
}
|
|
1262
1262
|
}
|
|
1263
|
-
function
|
|
1263
|
+
function It(t, e) {
|
|
1264
1264
|
var n = t.__transition, r, i, a = !0, o;
|
|
1265
1265
|
if (n) {
|
|
1266
1266
|
e = e == null ? null : e + "";
|
|
@@ -1269,20 +1269,20 @@ function At(t, e) {
|
|
|
1269
1269
|
a = !1;
|
|
1270
1270
|
continue;
|
|
1271
1271
|
}
|
|
1272
|
-
i = r.state >
|
|
1272
|
+
i = r.state > jt && r.state < te, r.state = At, r.timer.stop(), r.on.call(i ? "interrupt" : "cancel", t, t.__data__, r.index, r.group), delete n[o];
|
|
1273
1273
|
}
|
|
1274
1274
|
a && delete t.__transition;
|
|
1275
1275
|
}
|
|
1276
1276
|
}
|
|
1277
|
-
function
|
|
1277
|
+
function zi(t) {
|
|
1278
1278
|
return this.each(function() {
|
|
1279
|
-
|
|
1279
|
+
It(this, t);
|
|
1280
1280
|
});
|
|
1281
1281
|
}
|
|
1282
|
-
function
|
|
1282
|
+
function Ri(t, e) {
|
|
1283
1283
|
var n, r;
|
|
1284
1284
|
return function() {
|
|
1285
|
-
var i =
|
|
1285
|
+
var i = Z(this, t), a = i.tween;
|
|
1286
1286
|
if (a !== n) {
|
|
1287
1287
|
r = n = a;
|
|
1288
1288
|
for (var o = 0, c = r.length; o < c; ++o)
|
|
@@ -1294,11 +1294,11 @@ function Pi(t, e) {
|
|
|
1294
1294
|
i.tween = r;
|
|
1295
1295
|
};
|
|
1296
1296
|
}
|
|
1297
|
-
function
|
|
1297
|
+
function Li(t, e, n) {
|
|
1298
1298
|
var r, i;
|
|
1299
1299
|
if (typeof n != "function") throw new Error();
|
|
1300
1300
|
return function() {
|
|
1301
|
-
var a =
|
|
1301
|
+
var a = Z(this, t), o = a.tween;
|
|
1302
1302
|
if (o !== r) {
|
|
1303
1303
|
i = (r = o).slice();
|
|
1304
1304
|
for (var c = { name: e, value: n }, s = 0, l = i.length; s < l; ++s)
|
|
@@ -1311,317 +1311,317 @@ function Di(t, e, n) {
|
|
|
1311
1311
|
a.tween = i;
|
|
1312
1312
|
};
|
|
1313
1313
|
}
|
|
1314
|
-
function
|
|
1314
|
+
function Oi(t, e) {
|
|
1315
1315
|
var n = this._id;
|
|
1316
1316
|
if (t += "", arguments.length < 2) {
|
|
1317
|
-
for (var r =
|
|
1317
|
+
for (var r = q(this.node(), n).tween, i = 0, a = r.length, o; i < a; ++i)
|
|
1318
1318
|
if ((o = r[i]).name === t)
|
|
1319
1319
|
return o.value;
|
|
1320
1320
|
return null;
|
|
1321
1321
|
}
|
|
1322
|
-
return this.each((e == null ?
|
|
1322
|
+
return this.each((e == null ? Ri : Li)(n, t, e));
|
|
1323
1323
|
}
|
|
1324
|
-
function
|
|
1324
|
+
function ue(t, e, n) {
|
|
1325
1325
|
var r = t._id;
|
|
1326
1326
|
return t.each(function() {
|
|
1327
|
-
var i =
|
|
1327
|
+
var i = Z(this, r);
|
|
1328
1328
|
(i.value || (i.value = {}))[e] = n.apply(this, arguments);
|
|
1329
1329
|
}), function(i) {
|
|
1330
|
-
return
|
|
1330
|
+
return q(i, r).value[e];
|
|
1331
1331
|
};
|
|
1332
1332
|
}
|
|
1333
|
-
function
|
|
1333
|
+
function nn(t, e) {
|
|
1334
1334
|
var n;
|
|
1335
|
-
return (typeof e == "number" ?
|
|
1335
|
+
return (typeof e == "number" ? et : e instanceof yt ? be : (n = yt(e)) ? (e = n, be) : wi)(t, e);
|
|
1336
1336
|
}
|
|
1337
|
-
function
|
|
1337
|
+
function Bi(t) {
|
|
1338
1338
|
return function() {
|
|
1339
1339
|
this.removeAttribute(t);
|
|
1340
1340
|
};
|
|
1341
1341
|
}
|
|
1342
|
-
function
|
|
1342
|
+
function Hi(t) {
|
|
1343
1343
|
return function() {
|
|
1344
1344
|
this.removeAttributeNS(t.space, t.local);
|
|
1345
1345
|
};
|
|
1346
1346
|
}
|
|
1347
|
-
function
|
|
1347
|
+
function Fi(t, e, n) {
|
|
1348
1348
|
var r, i = n + "", a;
|
|
1349
1349
|
return function() {
|
|
1350
1350
|
var o = this.getAttribute(t);
|
|
1351
1351
|
return o === i ? null : o === r ? a : a = e(r = o, n);
|
|
1352
1352
|
};
|
|
1353
1353
|
}
|
|
1354
|
-
function
|
|
1354
|
+
function Wi(t, e, n) {
|
|
1355
1355
|
var r, i = n + "", a;
|
|
1356
1356
|
return function() {
|
|
1357
1357
|
var o = this.getAttributeNS(t.space, t.local);
|
|
1358
1358
|
return o === i ? null : o === r ? a : a = e(r = o, n);
|
|
1359
1359
|
};
|
|
1360
1360
|
}
|
|
1361
|
-
function
|
|
1361
|
+
function Gi(t, e, n) {
|
|
1362
1362
|
var r, i, a;
|
|
1363
1363
|
return function() {
|
|
1364
1364
|
var o, c = n(this), s;
|
|
1365
1365
|
return c == null ? void this.removeAttribute(t) : (o = this.getAttribute(t), s = c + "", o === s ? null : o === r && s === i ? a : (i = s, a = e(r = o, c)));
|
|
1366
1366
|
};
|
|
1367
1367
|
}
|
|
1368
|
-
function
|
|
1368
|
+
function Vi(t, e, n) {
|
|
1369
1369
|
var r, i, a;
|
|
1370
1370
|
return function() {
|
|
1371
1371
|
var o, c = n(this), s;
|
|
1372
1372
|
return c == null ? void this.removeAttributeNS(t.space, t.local) : (o = this.getAttributeNS(t.space, t.local), s = c + "", o === s ? null : o === r && s === i ? a : (i = s, a = e(r = o, c)));
|
|
1373
1373
|
};
|
|
1374
1374
|
}
|
|
1375
|
-
function
|
|
1376
|
-
var n =
|
|
1377
|
-
return this.attrTween(t, typeof e == "function" ? (n.local ?
|
|
1375
|
+
function Xi(t, e) {
|
|
1376
|
+
var n = Lt(t), r = n === "transform" ? Ni : nn;
|
|
1377
|
+
return this.attrTween(t, typeof e == "function" ? (n.local ? Vi : Gi)(n, r, ue(this, "attr." + t, e)) : e == null ? (n.local ? Hi : Bi)(n) : (n.local ? Wi : Fi)(n, r, e));
|
|
1378
1378
|
}
|
|
1379
|
-
function
|
|
1379
|
+
function qi(t, e) {
|
|
1380
1380
|
return function(n) {
|
|
1381
1381
|
this.setAttribute(t, e.call(this, n));
|
|
1382
1382
|
};
|
|
1383
1383
|
}
|
|
1384
|
-
function
|
|
1384
|
+
function Ui(t, e) {
|
|
1385
1385
|
return function(n) {
|
|
1386
1386
|
this.setAttributeNS(t.space, t.local, e.call(this, n));
|
|
1387
1387
|
};
|
|
1388
1388
|
}
|
|
1389
|
-
function
|
|
1389
|
+
function Zi(t, e) {
|
|
1390
1390
|
var n, r;
|
|
1391
1391
|
function i() {
|
|
1392
1392
|
var a = e.apply(this, arguments);
|
|
1393
|
-
return a !== r && (n = (r = a) &&
|
|
1393
|
+
return a !== r && (n = (r = a) && Ui(t, a)), n;
|
|
1394
1394
|
}
|
|
1395
1395
|
return i._value = e, i;
|
|
1396
1396
|
}
|
|
1397
|
-
function
|
|
1397
|
+
function Ki(t, e) {
|
|
1398
1398
|
var n, r;
|
|
1399
1399
|
function i() {
|
|
1400
1400
|
var a = e.apply(this, arguments);
|
|
1401
|
-
return a !== r && (n = (r = a) &&
|
|
1401
|
+
return a !== r && (n = (r = a) && qi(t, a)), n;
|
|
1402
1402
|
}
|
|
1403
1403
|
return i._value = e, i;
|
|
1404
1404
|
}
|
|
1405
|
-
function
|
|
1405
|
+
function Qi(t, e) {
|
|
1406
1406
|
var n = "attr." + t;
|
|
1407
1407
|
if (arguments.length < 2) return (n = this.tween(n)) && n._value;
|
|
1408
1408
|
if (e == null) return this.tween(n, null);
|
|
1409
1409
|
if (typeof e != "function") throw new Error();
|
|
1410
|
-
var r =
|
|
1411
|
-
return this.tween(n, (r.local ?
|
|
1410
|
+
var r = Lt(t);
|
|
1411
|
+
return this.tween(n, (r.local ? Zi : Ki)(r, e));
|
|
1412
1412
|
}
|
|
1413
|
-
function
|
|
1413
|
+
function Ji(t, e) {
|
|
1414
1414
|
return function() {
|
|
1415
|
-
|
|
1415
|
+
le(this, t).delay = +e.apply(this, arguments);
|
|
1416
1416
|
};
|
|
1417
1417
|
}
|
|
1418
|
-
function
|
|
1418
|
+
function ji(t, e) {
|
|
1419
1419
|
return e = +e, function() {
|
|
1420
|
-
|
|
1420
|
+
le(this, t).delay = e;
|
|
1421
1421
|
};
|
|
1422
1422
|
}
|
|
1423
|
-
function
|
|
1423
|
+
function to(t) {
|
|
1424
1424
|
var e = this._id;
|
|
1425
|
-
return arguments.length ? this.each((typeof t == "function" ?
|
|
1425
|
+
return arguments.length ? this.each((typeof t == "function" ? Ji : ji)(e, t)) : q(this.node(), e).delay;
|
|
1426
1426
|
}
|
|
1427
|
-
function
|
|
1427
|
+
function eo(t, e) {
|
|
1428
1428
|
return function() {
|
|
1429
|
-
|
|
1429
|
+
Z(this, t).duration = +e.apply(this, arguments);
|
|
1430
1430
|
};
|
|
1431
1431
|
}
|
|
1432
|
-
function
|
|
1432
|
+
function no(t, e) {
|
|
1433
1433
|
return e = +e, function() {
|
|
1434
|
-
|
|
1434
|
+
Z(this, t).duration = e;
|
|
1435
1435
|
};
|
|
1436
1436
|
}
|
|
1437
|
-
function
|
|
1437
|
+
function ro(t) {
|
|
1438
1438
|
var e = this._id;
|
|
1439
|
-
return arguments.length ? this.each((typeof t == "function" ?
|
|
1439
|
+
return arguments.length ? this.each((typeof t == "function" ? eo : no)(e, t)) : q(this.node(), e).duration;
|
|
1440
1440
|
}
|
|
1441
|
-
function
|
|
1441
|
+
function io(t, e) {
|
|
1442
1442
|
if (typeof e != "function") throw new Error();
|
|
1443
1443
|
return function() {
|
|
1444
|
-
|
|
1444
|
+
Z(this, t).ease = e;
|
|
1445
1445
|
};
|
|
1446
1446
|
}
|
|
1447
|
-
function
|
|
1447
|
+
function oo(t) {
|
|
1448
1448
|
var e = this._id;
|
|
1449
|
-
return arguments.length ? this.each(
|
|
1449
|
+
return arguments.length ? this.each(io(e, t)) : q(this.node(), e).ease;
|
|
1450
1450
|
}
|
|
1451
|
-
function
|
|
1451
|
+
function ao(t, e) {
|
|
1452
1452
|
return function() {
|
|
1453
1453
|
var n = e.apply(this, arguments);
|
|
1454
1454
|
if (typeof n != "function") throw new Error();
|
|
1455
|
-
|
|
1455
|
+
Z(this, t).ease = n;
|
|
1456
1456
|
};
|
|
1457
1457
|
}
|
|
1458
|
-
function
|
|
1458
|
+
function so(t) {
|
|
1459
1459
|
if (typeof t != "function") throw new Error();
|
|
1460
|
-
return this.each(
|
|
1460
|
+
return this.each(ao(this._id, t));
|
|
1461
1461
|
}
|
|
1462
|
-
function
|
|
1462
|
+
function co(t) {
|
|
1463
1463
|
typeof t != "function" && (t = ze(t));
|
|
1464
1464
|
for (var e = this._groups, n = e.length, r = new Array(n), i = 0; i < n; ++i)
|
|
1465
1465
|
for (var a = e[i], o = a.length, c = r[i] = [], s, l = 0; l < o; ++l)
|
|
1466
1466
|
(s = a[l]) && t.call(s, s.__data__, l, a) && c.push(s);
|
|
1467
|
-
return new
|
|
1467
|
+
return new tt(r, this._parents, this._name, this._id);
|
|
1468
1468
|
}
|
|
1469
|
-
function
|
|
1469
|
+
function lo(t) {
|
|
1470
1470
|
if (t._id !== this._id) throw new Error();
|
|
1471
1471
|
for (var e = this._groups, n = t._groups, r = e.length, i = n.length, a = Math.min(r, i), o = new Array(r), c = 0; c < a; ++c)
|
|
1472
1472
|
for (var s = e[c], l = n[c], u = s.length, f = o[c] = new Array(u), h, g = 0; g < u; ++g)
|
|
1473
1473
|
(h = s[g] || l[g]) && (f[g] = h);
|
|
1474
1474
|
for (; c < r; ++c)
|
|
1475
1475
|
o[c] = e[c];
|
|
1476
|
-
return new
|
|
1476
|
+
return new tt(o, this._parents, this._name, this._id);
|
|
1477
1477
|
}
|
|
1478
|
-
function
|
|
1478
|
+
function uo(t) {
|
|
1479
1479
|
return (t + "").trim().split(/^|\s+/).every(function(e) {
|
|
1480
1480
|
var n = e.indexOf(".");
|
|
1481
1481
|
return n >= 0 && (e = e.slice(0, n)), !e || e === "start";
|
|
1482
1482
|
});
|
|
1483
1483
|
}
|
|
1484
|
-
function
|
|
1485
|
-
var r, i, a =
|
|
1484
|
+
function fo(t, e, n) {
|
|
1485
|
+
var r, i, a = uo(e) ? le : Z;
|
|
1486
1486
|
return function() {
|
|
1487
1487
|
var o = a(this, t), c = o.on;
|
|
1488
1488
|
c !== r && (i = (r = c).copy()).on(e, n), o.on = i;
|
|
1489
1489
|
};
|
|
1490
1490
|
}
|
|
1491
|
-
function
|
|
1491
|
+
function ho(t, e) {
|
|
1492
1492
|
var n = this._id;
|
|
1493
|
-
return arguments.length < 2 ?
|
|
1493
|
+
return arguments.length < 2 ? q(this.node(), n).on.on(t) : this.each(fo(n, t, e));
|
|
1494
1494
|
}
|
|
1495
|
-
function
|
|
1495
|
+
function go(t) {
|
|
1496
1496
|
return function() {
|
|
1497
1497
|
var e = this.parentNode;
|
|
1498
1498
|
for (var n in this.__transition) if (+n !== t) return;
|
|
1499
1499
|
e && e.removeChild(this);
|
|
1500
1500
|
};
|
|
1501
1501
|
}
|
|
1502
|
-
function
|
|
1503
|
-
return this.on("end.remove",
|
|
1502
|
+
function po() {
|
|
1503
|
+
return this.on("end.remove", go(this._id));
|
|
1504
1504
|
}
|
|
1505
|
-
function
|
|
1505
|
+
function mo(t) {
|
|
1506
1506
|
var e = this._name, n = this._id;
|
|
1507
|
-
typeof t != "function" && (t =
|
|
1507
|
+
typeof t != "function" && (t = oe(t));
|
|
1508
1508
|
for (var r = this._groups, i = r.length, a = new Array(i), o = 0; o < i; ++o)
|
|
1509
1509
|
for (var c = r[o], s = c.length, l = a[o] = new Array(s), u, f, h = 0; h < s; ++h)
|
|
1510
|
-
(u = c[h]) && (f = t.call(u, u.__data__, h, c)) && ("__data__" in u && (f.__data__ = u.__data__), l[h] = f, Bt(l[h], e, n, h, l,
|
|
1511
|
-
return new
|
|
1510
|
+
(u = c[h]) && (f = t.call(u, u.__data__, h, c)) && ("__data__" in u && (f.__data__ = u.__data__), l[h] = f, Bt(l[h], e, n, h, l, q(u, n)));
|
|
1511
|
+
return new tt(a, this._parents, e, n);
|
|
1512
1512
|
}
|
|
1513
|
-
function
|
|
1513
|
+
function yo(t) {
|
|
1514
1514
|
var e = this._name, n = this._id;
|
|
1515
|
-
typeof t != "function" && (t =
|
|
1515
|
+
typeof t != "function" && (t = Ye(t));
|
|
1516
1516
|
for (var r = this._groups, i = r.length, a = [], o = [], c = 0; c < i; ++c)
|
|
1517
1517
|
for (var s = r[c], l = s.length, u, f = 0; f < l; ++f)
|
|
1518
1518
|
if (u = s[f]) {
|
|
1519
|
-
for (var h = t.call(u, u.__data__, f, s), g, m =
|
|
1519
|
+
for (var h = t.call(u, u.__data__, f, s), g, m = q(u, n), x = 0, y = h.length; x < y; ++x)
|
|
1520
1520
|
(g = h[x]) && Bt(g, e, n, x, h, m);
|
|
1521
1521
|
a.push(h), o.push(u);
|
|
1522
1522
|
}
|
|
1523
|
-
return new
|
|
1523
|
+
return new tt(a, o, e, n);
|
|
1524
1524
|
}
|
|
1525
|
-
var
|
|
1526
|
-
function
|
|
1527
|
-
return new
|
|
1525
|
+
var xo = wt.prototype.constructor;
|
|
1526
|
+
function _o() {
|
|
1527
|
+
return new xo(this._groups, this._parents);
|
|
1528
1528
|
}
|
|
1529
|
-
function
|
|
1529
|
+
function wo(t, e) {
|
|
1530
1530
|
var n, r, i;
|
|
1531
1531
|
return function() {
|
|
1532
1532
|
var a = lt(this, t), o = (this.style.removeProperty(t), lt(this, t));
|
|
1533
1533
|
return a === o ? null : a === n && o === r ? i : i = e(n = a, r = o);
|
|
1534
1534
|
};
|
|
1535
1535
|
}
|
|
1536
|
-
function
|
|
1536
|
+
function rn(t) {
|
|
1537
1537
|
return function() {
|
|
1538
1538
|
this.style.removeProperty(t);
|
|
1539
1539
|
};
|
|
1540
1540
|
}
|
|
1541
|
-
function
|
|
1541
|
+
function vo(t, e, n) {
|
|
1542
1542
|
var r, i = n + "", a;
|
|
1543
1543
|
return function() {
|
|
1544
1544
|
var o = lt(this, t);
|
|
1545
1545
|
return o === i ? null : o === r ? a : a = e(r = o, n);
|
|
1546
1546
|
};
|
|
1547
1547
|
}
|
|
1548
|
-
function
|
|
1548
|
+
function bo(t, e, n) {
|
|
1549
1549
|
var r, i, a;
|
|
1550
1550
|
return function() {
|
|
1551
1551
|
var o = lt(this, t), c = n(this), s = c + "";
|
|
1552
1552
|
return c == null && (s = c = (this.style.removeProperty(t), lt(this, t))), o === s ? null : o === r && s === i ? a : (i = s, a = e(r = o, c));
|
|
1553
1553
|
};
|
|
1554
1554
|
}
|
|
1555
|
-
function
|
|
1555
|
+
function Eo(t, e) {
|
|
1556
1556
|
var n, r, i, a = "style." + e, o = "end." + a, c;
|
|
1557
1557
|
return function() {
|
|
1558
|
-
var s =
|
|
1558
|
+
var s = Z(this, t), l = s.on, u = s.value[a] == null ? c || (c = rn(e)) : void 0;
|
|
1559
1559
|
(l !== n || i !== u) && (r = (n = l).copy()).on(o, i = u), s.on = r;
|
|
1560
1560
|
};
|
|
1561
1561
|
}
|
|
1562
|
-
function
|
|
1563
|
-
var r = (t += "") == "transform" ?
|
|
1564
|
-
return e == null ? this.styleTween(t,
|
|
1562
|
+
function No(t, e, n) {
|
|
1563
|
+
var r = (t += "") == "transform" ? Ei : nn;
|
|
1564
|
+
return e == null ? this.styleTween(t, wo(t, r)).on("end.style." + t, rn(t)) : typeof e == "function" ? this.styleTween(t, bo(t, r, ue(this, "style." + t, e))).each(Eo(this._id, t)) : this.styleTween(t, vo(t, r, e), n).on("end.style." + t, null);
|
|
1565
1565
|
}
|
|
1566
|
-
function
|
|
1566
|
+
function $o(t, e, n) {
|
|
1567
1567
|
return function(r) {
|
|
1568
1568
|
this.style.setProperty(t, e.call(this, r), n);
|
|
1569
1569
|
};
|
|
1570
1570
|
}
|
|
1571
|
-
function
|
|
1571
|
+
function ko(t, e, n) {
|
|
1572
1572
|
var r, i;
|
|
1573
1573
|
function a() {
|
|
1574
1574
|
var o = e.apply(this, arguments);
|
|
1575
|
-
return o !== i && (r = (i = o) &&
|
|
1575
|
+
return o !== i && (r = (i = o) && $o(t, o, n)), r;
|
|
1576
1576
|
}
|
|
1577
1577
|
return a._value = e, a;
|
|
1578
1578
|
}
|
|
1579
|
-
function
|
|
1579
|
+
function So(t, e, n) {
|
|
1580
1580
|
var r = "style." + (t += "");
|
|
1581
1581
|
if (arguments.length < 2) return (r = this.tween(r)) && r._value;
|
|
1582
1582
|
if (e == null) return this.tween(r, null);
|
|
1583
1583
|
if (typeof e != "function") throw new Error();
|
|
1584
|
-
return this.tween(r,
|
|
1584
|
+
return this.tween(r, ko(t, e, n ?? ""));
|
|
1585
1585
|
}
|
|
1586
|
-
function
|
|
1586
|
+
function Ao(t) {
|
|
1587
1587
|
return function() {
|
|
1588
1588
|
this.textContent = t;
|
|
1589
1589
|
};
|
|
1590
1590
|
}
|
|
1591
|
-
function
|
|
1591
|
+
function Io(t) {
|
|
1592
1592
|
return function() {
|
|
1593
1593
|
var e = t(this);
|
|
1594
1594
|
this.textContent = e ?? "";
|
|
1595
1595
|
};
|
|
1596
1596
|
}
|
|
1597
|
-
function
|
|
1598
|
-
return this.tween("text", typeof t == "function" ?
|
|
1597
|
+
function To(t) {
|
|
1598
|
+
return this.tween("text", typeof t == "function" ? Io(ue(this, "text", t)) : Ao(t == null ? "" : t + ""));
|
|
1599
1599
|
}
|
|
1600
|
-
function
|
|
1600
|
+
function Co(t) {
|
|
1601
1601
|
return function(e) {
|
|
1602
1602
|
this.textContent = t.call(this, e);
|
|
1603
1603
|
};
|
|
1604
1604
|
}
|
|
1605
|
-
function
|
|
1605
|
+
function Mo(t) {
|
|
1606
1606
|
var e, n;
|
|
1607
1607
|
function r() {
|
|
1608
1608
|
var i = t.apply(this, arguments);
|
|
1609
|
-
return i !== n && (e = (n = i) &&
|
|
1609
|
+
return i !== n && (e = (n = i) && Co(i)), e;
|
|
1610
1610
|
}
|
|
1611
1611
|
return r._value = t, r;
|
|
1612
1612
|
}
|
|
1613
|
-
function
|
|
1613
|
+
function Do(t) {
|
|
1614
1614
|
var e = "text";
|
|
1615
1615
|
if (arguments.length < 1) return (e = this.tween(e)) && e._value;
|
|
1616
1616
|
if (t == null) return this.tween(e, null);
|
|
1617
1617
|
if (typeof t != "function") throw new Error();
|
|
1618
|
-
return this.tween(e,
|
|
1618
|
+
return this.tween(e, Mo(t));
|
|
1619
1619
|
}
|
|
1620
|
-
function
|
|
1621
|
-
for (var t = this._name, e = this._id, n =
|
|
1620
|
+
function Po() {
|
|
1621
|
+
for (var t = this._name, e = this._id, n = on(), r = this._groups, i = r.length, a = 0; a < i; ++a)
|
|
1622
1622
|
for (var o = r[a], c = o.length, s, l = 0; l < c; ++l)
|
|
1623
1623
|
if (s = o[l]) {
|
|
1624
|
-
var u =
|
|
1624
|
+
var u = q(s, e);
|
|
1625
1625
|
Bt(s, t, n, l, o, {
|
|
1626
1626
|
time: u.time + u.delay + u.duration,
|
|
1627
1627
|
delay: 0,
|
|
@@ -1629,88 +1629,88 @@ function Mo() {
|
|
|
1629
1629
|
ease: u.ease
|
|
1630
1630
|
});
|
|
1631
1631
|
}
|
|
1632
|
-
return new
|
|
1632
|
+
return new tt(r, this._parents, t, n);
|
|
1633
1633
|
}
|
|
1634
|
-
function
|
|
1634
|
+
function Yo() {
|
|
1635
1635
|
var t, e, n = this, r = n._id, i = n.size();
|
|
1636
1636
|
return new Promise(function(a, o) {
|
|
1637
1637
|
var c = { value: o }, s = { value: function() {
|
|
1638
1638
|
--i === 0 && a();
|
|
1639
1639
|
} };
|
|
1640
1640
|
n.each(function() {
|
|
1641
|
-
var l =
|
|
1641
|
+
var l = Z(this, r), u = l.on;
|
|
1642
1642
|
u !== t && (e = (t = u).copy(), e._.cancel.push(c), e._.interrupt.push(c), e._.end.push(s)), l.on = e;
|
|
1643
1643
|
}), i === 0 && a();
|
|
1644
1644
|
});
|
|
1645
1645
|
}
|
|
1646
|
-
var
|
|
1647
|
-
function
|
|
1646
|
+
var zo = 0;
|
|
1647
|
+
function tt(t, e, n, r) {
|
|
1648
1648
|
this._groups = t, this._parents = e, this._name = n, this._id = r;
|
|
1649
1649
|
}
|
|
1650
|
-
function
|
|
1651
|
-
return ++
|
|
1652
|
-
}
|
|
1653
|
-
var
|
|
1654
|
-
|
|
1655
|
-
constructor:
|
|
1656
|
-
select:
|
|
1657
|
-
selectAll:
|
|
1658
|
-
selectChild:
|
|
1659
|
-
selectChildren:
|
|
1660
|
-
filter:
|
|
1661
|
-
merge:
|
|
1662
|
-
selection:
|
|
1663
|
-
transition:
|
|
1664
|
-
call:
|
|
1665
|
-
nodes:
|
|
1666
|
-
node:
|
|
1667
|
-
size:
|
|
1668
|
-
empty:
|
|
1669
|
-
each:
|
|
1670
|
-
on:
|
|
1671
|
-
attr:
|
|
1672
|
-
attrTween:
|
|
1673
|
-
style:
|
|
1674
|
-
styleTween:
|
|
1675
|
-
text:
|
|
1676
|
-
textTween:
|
|
1677
|
-
remove:
|
|
1678
|
-
tween:
|
|
1679
|
-
delay:
|
|
1680
|
-
duration:
|
|
1681
|
-
ease:
|
|
1682
|
-
easeVarying:
|
|
1683
|
-
end:
|
|
1684
|
-
[Symbol.iterator]:
|
|
1650
|
+
function on() {
|
|
1651
|
+
return ++zo;
|
|
1652
|
+
}
|
|
1653
|
+
var J = wt.prototype;
|
|
1654
|
+
tt.prototype = {
|
|
1655
|
+
constructor: tt,
|
|
1656
|
+
select: mo,
|
|
1657
|
+
selectAll: yo,
|
|
1658
|
+
selectChild: J.selectChild,
|
|
1659
|
+
selectChildren: J.selectChildren,
|
|
1660
|
+
filter: co,
|
|
1661
|
+
merge: lo,
|
|
1662
|
+
selection: _o,
|
|
1663
|
+
transition: Po,
|
|
1664
|
+
call: J.call,
|
|
1665
|
+
nodes: J.nodes,
|
|
1666
|
+
node: J.node,
|
|
1667
|
+
size: J.size,
|
|
1668
|
+
empty: J.empty,
|
|
1669
|
+
each: J.each,
|
|
1670
|
+
on: ho,
|
|
1671
|
+
attr: Xi,
|
|
1672
|
+
attrTween: Qi,
|
|
1673
|
+
style: No,
|
|
1674
|
+
styleTween: So,
|
|
1675
|
+
text: To,
|
|
1676
|
+
textTween: Do,
|
|
1677
|
+
remove: po,
|
|
1678
|
+
tween: Oi,
|
|
1679
|
+
delay: to,
|
|
1680
|
+
duration: ro,
|
|
1681
|
+
ease: oo,
|
|
1682
|
+
easeVarying: so,
|
|
1683
|
+
end: Yo,
|
|
1684
|
+
[Symbol.iterator]: J[Symbol.iterator]
|
|
1685
1685
|
};
|
|
1686
|
-
function
|
|
1686
|
+
function Ro(t) {
|
|
1687
1687
|
return ((t *= 2) <= 1 ? t * t * t : (t -= 2) * t * t + 2) / 2;
|
|
1688
1688
|
}
|
|
1689
|
-
var
|
|
1689
|
+
var Lo = {
|
|
1690
1690
|
time: null,
|
|
1691
1691
|
// Set on use.
|
|
1692
1692
|
delay: 0,
|
|
1693
1693
|
duration: 250,
|
|
1694
|
-
ease:
|
|
1694
|
+
ease: Ro
|
|
1695
1695
|
};
|
|
1696
|
-
function
|
|
1696
|
+
function Oo(t, e) {
|
|
1697
1697
|
for (var n; !(n = t.__transition) || !(n = n[e]); )
|
|
1698
1698
|
if (!(t = t.parentNode))
|
|
1699
1699
|
throw new Error(`transition ${e} not found`);
|
|
1700
1700
|
return n;
|
|
1701
1701
|
}
|
|
1702
|
-
function
|
|
1702
|
+
function Bo(t) {
|
|
1703
1703
|
var e, n;
|
|
1704
|
-
t instanceof
|
|
1704
|
+
t instanceof tt ? (e = t._id, t = t._name) : (e = on(), (n = Lo).time = ce(), t = t == null ? null : t + "");
|
|
1705
1705
|
for (var r = this._groups, i = r.length, a = 0; a < i; ++a)
|
|
1706
1706
|
for (var o = r[a], c = o.length, s, l = 0; l < c; ++l)
|
|
1707
|
-
(s = o[l]) && Bt(s, t, e, l, o, n ||
|
|
1708
|
-
return new
|
|
1707
|
+
(s = o[l]) && Bt(s, t, e, l, o, n || Oo(s, e));
|
|
1708
|
+
return new tt(r, this._parents, t, e);
|
|
1709
1709
|
}
|
|
1710
|
-
|
|
1711
|
-
|
|
1712
|
-
const
|
|
1713
|
-
function
|
|
1710
|
+
wt.prototype.interrupt = zi;
|
|
1711
|
+
wt.prototype.transition = Bo;
|
|
1712
|
+
const $t = (t) => () => t;
|
|
1713
|
+
function Ho(t, {
|
|
1714
1714
|
sourceEvent: e,
|
|
1715
1715
|
target: n,
|
|
1716
1716
|
transform: r,
|
|
@@ -1724,16 +1724,16 @@ function Ro(t, {
|
|
|
1724
1724
|
_: { value: i }
|
|
1725
1725
|
});
|
|
1726
1726
|
}
|
|
1727
|
-
function
|
|
1727
|
+
function j(t, e, n) {
|
|
1728
1728
|
this.k = t, this.x = e, this.y = n;
|
|
1729
1729
|
}
|
|
1730
|
-
|
|
1731
|
-
constructor:
|
|
1730
|
+
j.prototype = {
|
|
1731
|
+
constructor: j,
|
|
1732
1732
|
scale: function(t) {
|
|
1733
|
-
return t === 1 ? this : new
|
|
1733
|
+
return t === 1 ? this : new j(this.k * t, this.x, this.y);
|
|
1734
1734
|
},
|
|
1735
1735
|
translate: function(t, e) {
|
|
1736
|
-
return t === 0 & e === 0 ? this : new
|
|
1736
|
+
return t === 0 & e === 0 ? this : new j(this.k, this.x + this.k * t, this.y + this.k * e);
|
|
1737
1737
|
},
|
|
1738
1738
|
apply: function(t) {
|
|
1739
1739
|
return [t[0] * this.k + this.x, t[1] * this.k + this.y];
|
|
@@ -1763,218 +1763,218 @@ J.prototype = {
|
|
|
1763
1763
|
return "translate(" + this.x + "," + this.y + ") scale(" + this.k + ")";
|
|
1764
1764
|
}
|
|
1765
1765
|
};
|
|
1766
|
-
var Ht = new
|
|
1767
|
-
|
|
1768
|
-
function
|
|
1766
|
+
var Ht = new j(1, 0, 0);
|
|
1767
|
+
Fo.prototype = j.prototype;
|
|
1768
|
+
function Fo(t) {
|
|
1769
1769
|
for (; !t.__zoom; ) if (!(t = t.parentNode)) return Ht;
|
|
1770
1770
|
return t.__zoom;
|
|
1771
1771
|
}
|
|
1772
|
-
function
|
|
1772
|
+
function Vt(t) {
|
|
1773
1773
|
t.stopImmediatePropagation();
|
|
1774
1774
|
}
|
|
1775
1775
|
function ht(t) {
|
|
1776
1776
|
t.preventDefault(), t.stopImmediatePropagation();
|
|
1777
1777
|
}
|
|
1778
|
-
function
|
|
1778
|
+
function Wo(t) {
|
|
1779
1779
|
return (!t.ctrlKey || t.type === "wheel") && !t.button;
|
|
1780
1780
|
}
|
|
1781
|
-
function
|
|
1781
|
+
function Go() {
|
|
1782
1782
|
var t = this;
|
|
1783
1783
|
return t instanceof SVGElement ? (t = t.ownerSVGElement || t, t.hasAttribute("viewBox") ? (t = t.viewBox.baseVal, [[t.x, t.y], [t.x + t.width, t.y + t.height]]) : [[0, 0], [t.width.baseVal.value, t.height.baseVal.value]]) : [[0, 0], [t.clientWidth, t.clientHeight]];
|
|
1784
1784
|
}
|
|
1785
|
-
function
|
|
1785
|
+
function Ie() {
|
|
1786
1786
|
return this.__zoom || Ht;
|
|
1787
1787
|
}
|
|
1788
|
-
function
|
|
1788
|
+
function Vo(t) {
|
|
1789
1789
|
return -t.deltaY * (t.deltaMode === 1 ? 0.05 : t.deltaMode ? 1 : 2e-3) * (t.ctrlKey ? 10 : 1);
|
|
1790
1790
|
}
|
|
1791
|
-
function
|
|
1791
|
+
function Xo() {
|
|
1792
1792
|
return navigator.maxTouchPoints || "ontouchstart" in this;
|
|
1793
1793
|
}
|
|
1794
|
-
function
|
|
1794
|
+
function qo(t, e, n) {
|
|
1795
1795
|
var r = t.invertX(e[0][0]) - n[0][0], i = t.invertX(e[1][0]) - n[1][0], a = t.invertY(e[0][1]) - n[0][1], o = t.invertY(e[1][1]) - n[1][1];
|
|
1796
1796
|
return t.translate(
|
|
1797
1797
|
i > r ? (r + i) / 2 : Math.min(0, r) || Math.max(0, i),
|
|
1798
1798
|
o > a ? (a + o) / 2 : Math.min(0, a) || Math.max(0, o)
|
|
1799
1799
|
);
|
|
1800
1800
|
}
|
|
1801
|
-
function
|
|
1802
|
-
var t =
|
|
1801
|
+
function an() {
|
|
1802
|
+
var t = Wo, e = Go, n = qo, r = Vo, i = Xo, a = [0, 1 / 0], o = [[-1 / 0, -1 / 0], [1 / 0, 1 / 0]], c = 250, s = Ai, l = ie("start", "zoom", "end"), u, f, h, g = 500, m = 150, x = 0, y = 10;
|
|
1803
1803
|
function p(d) {
|
|
1804
|
-
d.property("__zoom",
|
|
1804
|
+
d.property("__zoom", Ie).on("wheel.zoom", M, { passive: !1 }).on("mousedown.zoom", D).on("dblclick.zoom", C).filter(i).on("touchstart.zoom", L).on("touchmove.zoom", B).on("touchend.zoom touchcancel.zoom", G).style("-webkit-tap-highlight-color", "rgba(0,0,0,0)");
|
|
1805
1805
|
}
|
|
1806
|
-
p.transform = function(d,
|
|
1807
|
-
var
|
|
1808
|
-
|
|
1809
|
-
|
|
1806
|
+
p.transform = function(d, N, _, b) {
|
|
1807
|
+
var A = d.selection ? d.selection() : d;
|
|
1808
|
+
A.property("__zoom", Ie), d !== A ? $(d, N, _, b) : A.interrupt().each(function() {
|
|
1809
|
+
v(this, arguments).event(b).start().zoom(null, typeof N == "function" ? N.apply(this, arguments) : N).end();
|
|
1810
1810
|
});
|
|
1811
|
-
}, p.scaleBy = function(d,
|
|
1811
|
+
}, p.scaleBy = function(d, N, _, b) {
|
|
1812
1812
|
p.scaleTo(d, function() {
|
|
1813
|
-
var
|
|
1814
|
-
return
|
|
1815
|
-
}, _,
|
|
1816
|
-
}, p.scaleTo = function(d,
|
|
1813
|
+
var A = this.__zoom.k, I = typeof N == "function" ? N.apply(this, arguments) : N;
|
|
1814
|
+
return A * I;
|
|
1815
|
+
}, _, b);
|
|
1816
|
+
}, p.scaleTo = function(d, N, _, b) {
|
|
1817
1817
|
p.transform(d, function() {
|
|
1818
|
-
var
|
|
1819
|
-
return n(
|
|
1820
|
-
}, _,
|
|
1821
|
-
}, p.translateBy = function(d,
|
|
1818
|
+
var A = e.apply(this, arguments), I = this.__zoom, T = _ == null ? S(A) : typeof _ == "function" ? _.apply(this, arguments) : _, P = I.invert(T), z = typeof N == "function" ? N.apply(this, arguments) : N;
|
|
1819
|
+
return n(E(w(I, z), T, P), A, o);
|
|
1820
|
+
}, _, b);
|
|
1821
|
+
}, p.translateBy = function(d, N, _, b) {
|
|
1822
1822
|
p.transform(d, function() {
|
|
1823
1823
|
return n(this.__zoom.translate(
|
|
1824
|
-
typeof
|
|
1824
|
+
typeof N == "function" ? N.apply(this, arguments) : N,
|
|
1825
1825
|
typeof _ == "function" ? _.apply(this, arguments) : _
|
|
1826
1826
|
), e.apply(this, arguments), o);
|
|
1827
|
-
}, null,
|
|
1828
|
-
}, p.translateTo = function(d,
|
|
1827
|
+
}, null, b);
|
|
1828
|
+
}, p.translateTo = function(d, N, _, b, A) {
|
|
1829
1829
|
p.transform(d, function() {
|
|
1830
|
-
var
|
|
1831
|
-
return n(Ht.translate(
|
|
1832
|
-
typeof
|
|
1830
|
+
var I = e.apply(this, arguments), T = this.__zoom, P = b == null ? S(I) : typeof b == "function" ? b.apply(this, arguments) : b;
|
|
1831
|
+
return n(Ht.translate(P[0], P[1]).scale(T.k).translate(
|
|
1832
|
+
typeof N == "function" ? -N.apply(this, arguments) : -N,
|
|
1833
1833
|
typeof _ == "function" ? -_.apply(this, arguments) : -_
|
|
1834
|
-
),
|
|
1835
|
-
},
|
|
1834
|
+
), I, o);
|
|
1835
|
+
}, b, A);
|
|
1836
1836
|
};
|
|
1837
|
-
function w(d,
|
|
1838
|
-
return
|
|
1837
|
+
function w(d, N) {
|
|
1838
|
+
return N = Math.max(a[0], Math.min(a[1], N)), N === d.k ? d : new j(N, d.x, d.y);
|
|
1839
1839
|
}
|
|
1840
|
-
function
|
|
1841
|
-
var
|
|
1842
|
-
return
|
|
1840
|
+
function E(d, N, _) {
|
|
1841
|
+
var b = N[0] - _[0] * d.k, A = N[1] - _[1] * d.k;
|
|
1842
|
+
return b === d.x && A === d.y ? d : new j(d.k, b, A);
|
|
1843
1843
|
}
|
|
1844
|
-
function
|
|
1844
|
+
function S(d) {
|
|
1845
1845
|
return [(+d[0][0] + +d[1][0]) / 2, (+d[0][1] + +d[1][1]) / 2];
|
|
1846
1846
|
}
|
|
1847
|
-
function
|
|
1847
|
+
function $(d, N, _, b) {
|
|
1848
1848
|
d.on("start.zoom", function() {
|
|
1849
|
-
|
|
1849
|
+
v(this, arguments).event(b).start();
|
|
1850
1850
|
}).on("interrupt.zoom end.zoom", function() {
|
|
1851
|
-
|
|
1851
|
+
v(this, arguments).event(b).end();
|
|
1852
1852
|
}).tween("zoom", function() {
|
|
1853
|
-
var
|
|
1854
|
-
return function(
|
|
1855
|
-
if (
|
|
1853
|
+
var A = this, I = arguments, T = v(A, I).event(b), P = e.apply(A, I), z = _ == null ? S(P) : typeof _ == "function" ? _.apply(A, I) : _, R = Math.max(P[1][0] - P[0][0], P[1][1] - P[0][1]), O = A.__zoom, H = typeof N == "function" ? N.apply(A, I) : N, K = s(O.invert(z).concat(R / O.k), H.invert(z).concat(R / H.k));
|
|
1854
|
+
return function(V) {
|
|
1855
|
+
if (V === 1) V = H;
|
|
1856
1856
|
else {
|
|
1857
|
-
var
|
|
1858
|
-
|
|
1857
|
+
var Q = K(V), Ft = R / Q[2];
|
|
1858
|
+
V = new j(Ft, z[0] - Q[0] * Ft, z[1] - Q[1] * Ft);
|
|
1859
1859
|
}
|
|
1860
|
-
|
|
1860
|
+
T.zoom(null, V);
|
|
1861
1861
|
};
|
|
1862
1862
|
});
|
|
1863
1863
|
}
|
|
1864
|
-
function
|
|
1865
|
-
return !_ && d.__zooming || new
|
|
1864
|
+
function v(d, N, _) {
|
|
1865
|
+
return !_ && d.__zooming || new k(d, N);
|
|
1866
1866
|
}
|
|
1867
|
-
function
|
|
1868
|
-
this.that = d, this.args =
|
|
1867
|
+
function k(d, N) {
|
|
1868
|
+
this.that = d, this.args = N, this.active = 0, this.sourceEvent = null, this.extent = e.apply(d, N), this.taps = 0;
|
|
1869
1869
|
}
|
|
1870
|
-
|
|
1870
|
+
k.prototype = {
|
|
1871
1871
|
event: function(d) {
|
|
1872
1872
|
return d && (this.sourceEvent = d), this;
|
|
1873
1873
|
},
|
|
1874
1874
|
start: function() {
|
|
1875
1875
|
return ++this.active === 1 && (this.that.__zooming = this, this.emit("start")), this;
|
|
1876
1876
|
},
|
|
1877
|
-
zoom: function(d,
|
|
1878
|
-
return this.mouse && d !== "mouse" && (this.mouse[1] =
|
|
1877
|
+
zoom: function(d, N) {
|
|
1878
|
+
return this.mouse && d !== "mouse" && (this.mouse[1] = N.invert(this.mouse[0])), this.touch0 && d !== "touch" && (this.touch0[1] = N.invert(this.touch0[0])), this.touch1 && d !== "touch" && (this.touch1[1] = N.invert(this.touch1[0])), this.that.__zoom = N, this.emit("zoom"), this;
|
|
1879
1879
|
},
|
|
1880
1880
|
end: function() {
|
|
1881
1881
|
return --this.active === 0 && (delete this.that.__zooming, this.emit("end")), this;
|
|
1882
1882
|
},
|
|
1883
1883
|
emit: function(d) {
|
|
1884
|
-
var
|
|
1884
|
+
var N = Y(this.that).datum();
|
|
1885
1885
|
l.call(
|
|
1886
1886
|
d,
|
|
1887
1887
|
this.that,
|
|
1888
|
-
new
|
|
1888
|
+
new Ho(d, {
|
|
1889
1889
|
sourceEvent: this.sourceEvent,
|
|
1890
1890
|
target: p,
|
|
1891
1891
|
transform: this.that.__zoom,
|
|
1892
1892
|
dispatch: l
|
|
1893
1893
|
}),
|
|
1894
|
-
|
|
1894
|
+
N
|
|
1895
1895
|
);
|
|
1896
1896
|
}
|
|
1897
1897
|
};
|
|
1898
|
-
function
|
|
1898
|
+
function M(d, ...N) {
|
|
1899
1899
|
if (!t.apply(this, arguments)) return;
|
|
1900
|
-
var _ =
|
|
1900
|
+
var _ = v(this, N).event(d), b = this.__zoom, A = Math.max(a[0], Math.min(a[1], b.k * Math.pow(2, r.apply(this, arguments)))), I = rt(d);
|
|
1901
1901
|
if (_.wheel)
|
|
1902
|
-
(_.mouse[0][0] !==
|
|
1902
|
+
(_.mouse[0][0] !== I[0] || _.mouse[0][1] !== I[1]) && (_.mouse[1] = b.invert(_.mouse[0] = I)), clearTimeout(_.wheel);
|
|
1903
1903
|
else {
|
|
1904
|
-
if (
|
|
1905
|
-
_.mouse = [
|
|
1904
|
+
if (b.k === A) return;
|
|
1905
|
+
_.mouse = [I, b.invert(I)], It(this), _.start();
|
|
1906
1906
|
}
|
|
1907
|
-
ht(d), _.wheel = setTimeout(
|
|
1908
|
-
function
|
|
1907
|
+
ht(d), _.wheel = setTimeout(T, m), _.zoom("mouse", n(E(w(b, A), _.mouse[0], _.mouse[1]), _.extent, o));
|
|
1908
|
+
function T() {
|
|
1909
1909
|
_.wheel = null, _.end();
|
|
1910
1910
|
}
|
|
1911
1911
|
}
|
|
1912
|
-
function D(d, ...
|
|
1912
|
+
function D(d, ...N) {
|
|
1913
1913
|
if (h || !t.apply(this, arguments)) return;
|
|
1914
|
-
var _ = d.currentTarget,
|
|
1915
|
-
|
|
1916
|
-
function
|
|
1917
|
-
if (ht(
|
|
1918
|
-
var
|
|
1919
|
-
|
|
1914
|
+
var _ = d.currentTarget, b = v(this, N, !0).event(d), A = Y(d.view).on("mousemove.zoom", z, !0).on("mouseup.zoom", R, !0), I = rt(d, _), T = d.clientX, P = d.clientY;
|
|
1915
|
+
ei(d.view), Vt(d), b.mouse = [I, this.__zoom.invert(I)], It(this), b.start();
|
|
1916
|
+
function z(O) {
|
|
1917
|
+
if (ht(O), !b.moved) {
|
|
1918
|
+
var H = O.clientX - T, K = O.clientY - P;
|
|
1919
|
+
b.moved = H * H + K * K > x;
|
|
1920
1920
|
}
|
|
1921
|
-
|
|
1921
|
+
b.event(O).zoom("mouse", n(E(b.that.__zoom, b.mouse[0] = rt(O, _), b.mouse[1]), b.extent, o));
|
|
1922
1922
|
}
|
|
1923
|
-
function O
|
|
1924
|
-
|
|
1923
|
+
function R(O) {
|
|
1924
|
+
A.on("mousemove.zoom mouseup.zoom", null), ni(O.view, b.moved), ht(O), b.event(O).end();
|
|
1925
1925
|
}
|
|
1926
1926
|
}
|
|
1927
|
-
function C(d, ...
|
|
1927
|
+
function C(d, ...N) {
|
|
1928
1928
|
if (t.apply(this, arguments)) {
|
|
1929
|
-
var _ = this.__zoom,
|
|
1930
|
-
ht(d), c > 0 ?
|
|
1929
|
+
var _ = this.__zoom, b = rt(d.changedTouches ? d.changedTouches[0] : d, this), A = _.invert(b), I = _.k * (d.shiftKey ? 0.5 : 2), T = n(E(w(_, I), b, A), e.apply(this, N), o);
|
|
1930
|
+
ht(d), c > 0 ? Y(this).transition().duration(c).call($, T, b, d) : Y(this).call(p.transform, T, b, d);
|
|
1931
1931
|
}
|
|
1932
1932
|
}
|
|
1933
|
-
function
|
|
1933
|
+
function L(d, ...N) {
|
|
1934
1934
|
if (t.apply(this, arguments)) {
|
|
1935
|
-
var _ = d.touches,
|
|
1936
|
-
for (
|
|
1937
|
-
|
|
1938
|
-
u && (u = clearTimeout(u)),
|
|
1935
|
+
var _ = d.touches, b = _.length, A = v(this, N, d.changedTouches.length === b).event(d), I, T, P, z;
|
|
1936
|
+
for (Vt(d), T = 0; T < b; ++T)
|
|
1937
|
+
P = _[T], z = rt(P, this), z = [z, this.__zoom.invert(z), P.identifier], A.touch0 ? !A.touch1 && A.touch0[2] !== z[2] && (A.touch1 = z, A.taps = 0) : (A.touch0 = z, I = !0, A.taps = 1 + !!u);
|
|
1938
|
+
u && (u = clearTimeout(u)), I && (A.taps < 2 && (f = z[0], u = setTimeout(function() {
|
|
1939
1939
|
u = null;
|
|
1940
|
-
}, g)),
|
|
1940
|
+
}, g)), It(this), A.start());
|
|
1941
1941
|
}
|
|
1942
1942
|
}
|
|
1943
|
-
function B(d, ...
|
|
1943
|
+
function B(d, ...N) {
|
|
1944
1944
|
if (this.__zooming) {
|
|
1945
|
-
var _ =
|
|
1946
|
-
for (ht(d),
|
|
1947
|
-
|
|
1948
|
-
if (
|
|
1949
|
-
var
|
|
1950
|
-
|
|
1951
|
-
} else if (_.touch0)
|
|
1945
|
+
var _ = v(this, N).event(d), b = d.changedTouches, A = b.length, I, T, P, z;
|
|
1946
|
+
for (ht(d), I = 0; I < A; ++I)
|
|
1947
|
+
T = b[I], P = rt(T, this), _.touch0 && _.touch0[2] === T.identifier ? _.touch0[0] = P : _.touch1 && _.touch1[2] === T.identifier && (_.touch1[0] = P);
|
|
1948
|
+
if (T = _.that.__zoom, _.touch1) {
|
|
1949
|
+
var R = _.touch0[0], O = _.touch0[1], H = _.touch1[0], K = _.touch1[1], V = (V = H[0] - R[0]) * V + (V = H[1] - R[1]) * V, Q = (Q = K[0] - O[0]) * Q + (Q = K[1] - O[1]) * Q;
|
|
1950
|
+
T = w(T, Math.sqrt(V / Q)), P = [(R[0] + H[0]) / 2, (R[1] + H[1]) / 2], z = [(O[0] + K[0]) / 2, (O[1] + K[1]) / 2];
|
|
1951
|
+
} else if (_.touch0) P = _.touch0[0], z = _.touch0[1];
|
|
1952
1952
|
else return;
|
|
1953
|
-
_.zoom("touch", n(
|
|
1953
|
+
_.zoom("touch", n(E(T, P, z), _.extent, o));
|
|
1954
1954
|
}
|
|
1955
1955
|
}
|
|
1956
|
-
function
|
|
1956
|
+
function G(d, ...N) {
|
|
1957
1957
|
if (this.__zooming) {
|
|
1958
|
-
var _ =
|
|
1959
|
-
for (
|
|
1958
|
+
var _ = v(this, N).event(d), b = d.changedTouches, A = b.length, I, T;
|
|
1959
|
+
for (Vt(d), h && clearTimeout(h), h = setTimeout(function() {
|
|
1960
1960
|
h = null;
|
|
1961
|
-
}, g),
|
|
1962
|
-
|
|
1961
|
+
}, g), I = 0; I < A; ++I)
|
|
1962
|
+
T = b[I], _.touch0 && _.touch0[2] === T.identifier ? delete _.touch0 : _.touch1 && _.touch1[2] === T.identifier && delete _.touch1;
|
|
1963
1963
|
if (_.touch1 && !_.touch0 && (_.touch0 = _.touch1, delete _.touch1), _.touch0) _.touch0[1] = this.__zoom.invert(_.touch0[0]);
|
|
1964
|
-
else if (_.end(), _.taps === 2 && (
|
|
1965
|
-
var
|
|
1966
|
-
|
|
1964
|
+
else if (_.end(), _.taps === 2 && (T = rt(T, this), Math.hypot(f[0] - T[0], f[1] - T[1]) < y)) {
|
|
1965
|
+
var P = Y(this).on("dblclick.zoom");
|
|
1966
|
+
P && P.apply(this, arguments);
|
|
1967
1967
|
}
|
|
1968
1968
|
}
|
|
1969
1969
|
}
|
|
1970
1970
|
return p.wheelDelta = function(d) {
|
|
1971
|
-
return arguments.length ? (r = typeof d == "function" ? d :
|
|
1971
|
+
return arguments.length ? (r = typeof d == "function" ? d : $t(+d), p) : r;
|
|
1972
1972
|
}, p.filter = function(d) {
|
|
1973
|
-
return arguments.length ? (t = typeof d == "function" ? d :
|
|
1973
|
+
return arguments.length ? (t = typeof d == "function" ? d : $t(!!d), p) : t;
|
|
1974
1974
|
}, p.touchable = function(d) {
|
|
1975
|
-
return arguments.length ? (i = typeof d == "function" ? d :
|
|
1975
|
+
return arguments.length ? (i = typeof d == "function" ? d : $t(!!d), p) : i;
|
|
1976
1976
|
}, p.extent = function(d) {
|
|
1977
|
-
return arguments.length ? (e = typeof d == "function" ? d :
|
|
1977
|
+
return arguments.length ? (e = typeof d == "function" ? d : $t([[+d[0][0], +d[0][1]], [+d[1][0], +d[1][1]]]), p) : e;
|
|
1978
1978
|
}, p.scaleExtent = function(d) {
|
|
1979
1979
|
return arguments.length ? (a[0] = +d[0], a[1] = +d[1], p) : [a[0], a[1]];
|
|
1980
1980
|
}, p.translateExtent = function(d) {
|
|
@@ -1994,18 +1994,18 @@ function on() {
|
|
|
1994
1994
|
return arguments.length ? (y = +d, p) : y;
|
|
1995
1995
|
}, p;
|
|
1996
1996
|
}
|
|
1997
|
-
const
|
|
1997
|
+
const nt = 72, Uo = 240, Zo = 74, Ko = 40 / 74, _t = 16, sn = 6, cn = "tf-chain-icon", ln = 50, Qo = 80, Jo = 20, jo = 20, ee = 0.9, ta = 16, ea = 32, na = 3, un = 800, fn = [
|
|
1998
1998
|
0,
|
|
1999
1999
|
0,
|
|
2000
2000
|
1e3,
|
|
2001
2001
|
800
|
|
2002
|
-
],
|
|
2003
|
-
class
|
|
2002
|
+
], fe = 40;
|
|
2003
|
+
class hn {
|
|
2004
2004
|
constructor(e, n, r, i, a) {
|
|
2005
2005
|
this.type = e, this._gvid = n, this.name = r, this._draw_ = i, this._ldraw_ = a;
|
|
2006
2006
|
}
|
|
2007
2007
|
}
|
|
2008
|
-
class
|
|
2008
|
+
class dn extends hn {
|
|
2009
2009
|
// Reference to the edge this virtual node represents
|
|
2010
2010
|
constructor({
|
|
2011
2011
|
_gvid: e,
|
|
@@ -2032,13 +2032,13 @@ class un extends ln {
|
|
|
2032
2032
|
* Get width in points (1 inch = 72 points)
|
|
2033
2033
|
*/
|
|
2034
2034
|
getWidthPoints() {
|
|
2035
|
-
return parseFloat(this.width || "1") *
|
|
2035
|
+
return parseFloat(this.width || "1") * nt;
|
|
2036
2036
|
}
|
|
2037
2037
|
/**
|
|
2038
2038
|
* Get height in points (1 inch = 72 points)
|
|
2039
2039
|
*/
|
|
2040
2040
|
getHeightPoints() {
|
|
2041
|
-
return parseFloat(this.height || "0.5") *
|
|
2041
|
+
return parseFloat(this.height || "0.5") * nt;
|
|
2042
2042
|
}
|
|
2043
2043
|
/**
|
|
2044
2044
|
* Get bounding box coordinates (x, y is top-left corner)
|
|
@@ -2096,7 +2096,7 @@ class un extends ln {
|
|
|
2096
2096
|
} : null;
|
|
2097
2097
|
}
|
|
2098
2098
|
}
|
|
2099
|
-
class
|
|
2099
|
+
class ra extends hn {
|
|
2100
2100
|
constructor({
|
|
2101
2101
|
_gvid: e,
|
|
2102
2102
|
name: n,
|
|
@@ -2110,7 +2110,7 @@ class Jo extends ln {
|
|
|
2110
2110
|
}) {
|
|
2111
2111
|
if (super("edge", e, n, r, i), this.isBaseEdge = !1, this.depth = 0, this.baseOffset = 0, this.midY = 0, this._hdraw_ = a, this._tdraw_ = o, this.head = c, this.tail = s, this.label = l, l)
|
|
2112
2112
|
try {
|
|
2113
|
-
this.edgeContent =
|
|
2113
|
+
this.edgeContent = Ct(l), this.edgeIndex = this.edgeContent.index, this.edgeColor = this.edgeContent.color;
|
|
2114
2114
|
} catch (u) {
|
|
2115
2115
|
/^\s*</.test(l) || console.warn(`Failed to decode edge label for ${n}:`, u);
|
|
2116
2116
|
}
|
|
@@ -2212,7 +2212,7 @@ class Jo extends ln {
|
|
|
2212
2212
|
return e;
|
|
2213
2213
|
}
|
|
2214
2214
|
}
|
|
2215
|
-
class
|
|
2215
|
+
class gn {
|
|
2216
2216
|
constructor(e, n = 0) {
|
|
2217
2217
|
this.index = e, this.aboveY = n, this.belowY = n;
|
|
2218
2218
|
}
|
|
@@ -2230,7 +2230,7 @@ class fn {
|
|
|
2230
2230
|
return { above: this.aboveY, below: this.belowY };
|
|
2231
2231
|
}
|
|
2232
2232
|
}
|
|
2233
|
-
class
|
|
2233
|
+
class ia extends gn {
|
|
2234
2234
|
constructor(e, n = 0) {
|
|
2235
2235
|
super(e, n), this.nodes = [];
|
|
2236
2236
|
}
|
|
@@ -2238,12 +2238,12 @@ class jo extends fn {
|
|
|
2238
2238
|
if (this.nodes.push(e), !n) return;
|
|
2239
2239
|
const r = e.getPosition();
|
|
2240
2240
|
if (r) {
|
|
2241
|
-
const i = e.height ? parseFloat(e.height) *
|
|
2241
|
+
const i = e.height ? parseFloat(e.height) * nt : fe, a = r[1] - i / 2, o = r[1] + i / 2;
|
|
2242
2242
|
this.aboveY = Math.min(this.aboveY, a), this.belowY = Math.max(this.belowY, o);
|
|
2243
2243
|
}
|
|
2244
2244
|
}
|
|
2245
2245
|
}
|
|
2246
|
-
class
|
|
2246
|
+
class oa extends gn {
|
|
2247
2247
|
constructor(e, n, r = 0) {
|
|
2248
2248
|
super(Math.min(e, n), r), this.edges = [], this.baseEdgeIndex = -1, this.sourceColIndex = e, this.targetColIndex = n;
|
|
2249
2249
|
}
|
|
@@ -2260,7 +2260,7 @@ class ta extends fn {
|
|
|
2260
2260
|
return `${e}-${n}`;
|
|
2261
2261
|
}
|
|
2262
2262
|
}
|
|
2263
|
-
const
|
|
2263
|
+
const aa = 0.6, sa = /mono|fira|consolas|courier|menlo|roboto mono|ui-monospace/i, Te = {
|
|
2264
2264
|
i: 0.27,
|
|
2265
2265
|
l: 0.27,
|
|
2266
2266
|
j: 0.27,
|
|
@@ -2280,32 +2280,32 @@ const ea = 0.6, na = /mono|fira|consolas|courier|menlo|roboto mono|ui-monospace/
|
|
|
2280
2280
|
"[": 0.34,
|
|
2281
2281
|
"]": 0.34,
|
|
2282
2282
|
" ": 0.28
|
|
2283
|
-
},
|
|
2283
|
+
}, Ce = {
|
|
2284
2284
|
m: 0.85,
|
|
2285
2285
|
w: 0.74,
|
|
2286
2286
|
M: 0.83,
|
|
2287
2287
|
W: 0.86,
|
|
2288
2288
|
"@": 0.92
|
|
2289
2289
|
};
|
|
2290
|
-
function
|
|
2290
|
+
function ca(t) {
|
|
2291
2291
|
if (t in Te) return Te[t];
|
|
2292
|
-
if (t in
|
|
2292
|
+
if (t in Ce) return Ce[t];
|
|
2293
2293
|
const e = t.charCodeAt(0);
|
|
2294
2294
|
return e >= 48 && e <= 57 ? 0.57 : e >= 65 && e <= 90 ? 0.66 : e >= 97 && e <= 122 ? 0.53 : e >= 33 && e <= 126 ? 0.5 : e > 11904 ? 1 : 0.55;
|
|
2295
2295
|
}
|
|
2296
|
-
function
|
|
2297
|
-
return !!t &&
|
|
2296
|
+
function la(t) {
|
|
2297
|
+
return !!t && sa.test(t);
|
|
2298
2298
|
}
|
|
2299
|
-
function
|
|
2299
|
+
function ua(t, e, n) {
|
|
2300
2300
|
if (!t) return 0;
|
|
2301
|
-
if (
|
|
2302
|
-
return t.length * n *
|
|
2301
|
+
if (la(e))
|
|
2302
|
+
return t.length * n * aa;
|
|
2303
2303
|
let r = 0;
|
|
2304
|
-
for (const i of t) r +=
|
|
2304
|
+
for (const i of t) r += ca(i);
|
|
2305
2305
|
return r * n;
|
|
2306
2306
|
}
|
|
2307
|
-
function
|
|
2308
|
-
const r = t.attr("font-family") || void 0, i = parseFloat(t.attr("font-size") || "12") || 12, a = (l) =>
|
|
2307
|
+
function ne(t, e, n) {
|
|
2308
|
+
const r = t.attr("font-family") || void 0, i = parseFloat(t.attr("font-size") || "12") || 12, a = (l) => ua(l, r, i);
|
|
2309
2309
|
if (t.text(n), a(n) <= e) return;
|
|
2310
2310
|
const o = "...";
|
|
2311
2311
|
let c = 0, s = n.length;
|
|
@@ -2315,7 +2315,7 @@ function ee(t, e, n) {
|
|
|
2315
2315
|
}
|
|
2316
2316
|
c > 0 ? t.text(n.slice(0, c) + o) : t.text(o);
|
|
2317
2317
|
}
|
|
2318
|
-
function
|
|
2318
|
+
function fa(t) {
|
|
2319
2319
|
if (!t) return [];
|
|
2320
2320
|
const e = [], n = /<TD[^>]*>(.*?)<\/TD>/gi;
|
|
2321
2321
|
let r;
|
|
@@ -2329,26 +2329,26 @@ function aa(t) {
|
|
|
2329
2329
|
}
|
|
2330
2330
|
return e;
|
|
2331
2331
|
}
|
|
2332
|
-
function
|
|
2332
|
+
function ha(t) {
|
|
2333
2333
|
var a;
|
|
2334
2334
|
if (!t || !/<TABLE/i.test(t)) return null;
|
|
2335
2335
|
const e = /<B>([\s\S]*?)<\/B>/i.exec(t), n = e ? e[1].replace(/<[^>]+>/g, "").trim() : "", r = t.replace(/<[^>]+>/g, " "), i = ((a = /0x[0-9a-fA-F]{8,}/.exec(r)) == null ? void 0 : a[0]) ?? "";
|
|
2336
2336
|
return !n && !i ? null : { tags: [], label: n, text: i };
|
|
2337
2337
|
}
|
|
2338
|
-
function
|
|
2338
|
+
function pn(t, e) {
|
|
2339
2339
|
const n = /^\[(\d+)\]$/.exec(t);
|
|
2340
2340
|
return n ? `[${n[1]}/${e}]` : t;
|
|
2341
2341
|
}
|
|
2342
|
-
function
|
|
2342
|
+
function da(t, e) {
|
|
2343
2343
|
return !t || t.length === 0 ? t : t.map(
|
|
2344
|
-
(n, r) => r === 0 ? { ...n, text:
|
|
2344
|
+
(n, r) => r === 0 ? { ...n, text: pn(n.text, e) } : n
|
|
2345
2345
|
);
|
|
2346
2346
|
}
|
|
2347
|
-
function
|
|
2347
|
+
function mn(t, e, n) {
|
|
2348
2348
|
var l;
|
|
2349
|
-
const r =
|
|
2349
|
+
const r = da((l = t.edgeContent) == null ? void 0 : l.elems, n);
|
|
2350
2350
|
let i = "";
|
|
2351
|
-
r && r.length > 0 && (i = r.map((u) => u.text).join(" ")), i || (i =
|
|
2351
|
+
r && r.length > 0 && (i = r.map((u) => u.text).join(" ")), i || (i = fa(t.label ?? "").map((f, h) => h === 0 ? pn(f, n) : f).map((f) => f.length > 20 ? f.slice(0, 20) + "..." : f).join(" "));
|
|
2352
2352
|
const a = i.length > 60 ? i.slice(0, 60) + "..." : i, o = e.labelFontSize, c = o * 0.6, s = e.labelPadding;
|
|
2353
2353
|
return {
|
|
2354
2354
|
displayElems: r,
|
|
@@ -2357,7 +2357,7 @@ function dn(t, e, n) {
|
|
|
2357
2357
|
boxHeight: o + s * 2
|
|
2358
2358
|
};
|
|
2359
2359
|
}
|
|
2360
|
-
const
|
|
2360
|
+
const yn = {
|
|
2361
2361
|
// Edge Routing
|
|
2362
2362
|
horizontalExtension: 50,
|
|
2363
2363
|
minEdgeDistance: 50,
|
|
@@ -2370,7 +2370,7 @@ const gn = {
|
|
|
2370
2370
|
arrowHeight: 6,
|
|
2371
2371
|
// Label
|
|
2372
2372
|
labelHeight: 15,
|
|
2373
|
-
labelFontSize:
|
|
2373
|
+
labelFontSize: 12,
|
|
2374
2374
|
labelPadding: 6,
|
|
2375
2375
|
labelCornerRadius: 4,
|
|
2376
2376
|
// Node
|
|
@@ -2379,13 +2379,13 @@ const gn = {
|
|
|
2379
2379
|
nearlyHorizontalThreshold: 5,
|
|
2380
2380
|
nearlyAlignedThreshold: 30
|
|
2381
2381
|
};
|
|
2382
|
-
function
|
|
2382
|
+
function ga(t) {
|
|
2383
2383
|
return {
|
|
2384
|
-
...
|
|
2384
|
+
...yn,
|
|
2385
2385
|
...t
|
|
2386
2386
|
};
|
|
2387
2387
|
}
|
|
2388
|
-
function
|
|
2388
|
+
function pa(t) {
|
|
2389
2389
|
if (t.length < 2) return t;
|
|
2390
2390
|
const e = [t[0]];
|
|
2391
2391
|
for (let n = 1; n < t.length; n++) {
|
|
@@ -2394,7 +2394,7 @@ function ua(t) {
|
|
|
2394
2394
|
}
|
|
2395
2395
|
return e;
|
|
2396
2396
|
}
|
|
2397
|
-
function
|
|
2397
|
+
function Me(t, e, n) {
|
|
2398
2398
|
const { start: r, pathEnd: i, isNearlyHorizontal: a, startExtensionX: o, endExtensionX: c } = n, s = n.minVerticalSegment, l = Math.abs(r.y - e), u = Math.abs(e - i.y);
|
|
2399
2399
|
let f = [], h = e;
|
|
2400
2400
|
switch (t) {
|
|
@@ -2516,10 +2516,10 @@ function Ce(t, e, n) {
|
|
|
2516
2516
|
], h = e;
|
|
2517
2517
|
break;
|
|
2518
2518
|
}
|
|
2519
|
-
const g =
|
|
2519
|
+
const g = pa(f);
|
|
2520
2520
|
return g.length > 0 ? { points: g, actualMidY: h } : null;
|
|
2521
2521
|
}
|
|
2522
|
-
function Tt(t, e, n, r =
|
|
2522
|
+
function Tt(t, e, n, r = yn) {
|
|
2523
2523
|
const i = t.getStartPoint(), a = t.getEndPoint(), o = t.getDirection();
|
|
2524
2524
|
if (!i || !a || !o || o === "self")
|
|
2525
2525
|
return;
|
|
@@ -2549,14 +2549,14 @@ function Tt(t, e, n, r = gn) {
|
|
|
2549
2549
|
let y;
|
|
2550
2550
|
f ? y = x.isNearlyHorizontal ? ["straight", "3seg"] : ["3seg"] : y = x.isNearlyHorizontal ? ["straight", "3seg", "4seg", "5seg", "6seg"] : ["3seg", "4seg", "5seg", "6seg"];
|
|
2551
2551
|
for (const w of y) {
|
|
2552
|
-
const
|
|
2553
|
-
if (
|
|
2554
|
-
return { midY:
|
|
2552
|
+
const E = Me(w, g, x);
|
|
2553
|
+
if (E)
|
|
2554
|
+
return { midY: E.actualMidY, points: E.points };
|
|
2555
2555
|
}
|
|
2556
|
-
const p =
|
|
2556
|
+
const p = Me("6seg", g, x);
|
|
2557
2557
|
return p ? { midY: p.actualMidY, points: p.points } : void 0;
|
|
2558
2558
|
}
|
|
2559
|
-
function
|
|
2559
|
+
function De(t, e) {
|
|
2560
2560
|
if (t.length < 2) return "";
|
|
2561
2561
|
if (e === 0 || t.length === 2)
|
|
2562
2562
|
return `M${t[0].x},${t[0].y} ${t.slice(1).map((i) => `L${i.x},${i.y}`).join(" ")}`;
|
|
@@ -2579,7 +2579,7 @@ function Ie(t, e) {
|
|
|
2579
2579
|
const r = t[t.length - 1];
|
|
2580
2580
|
return n.push(`L${r.x},${r.y}`), n.join(" ");
|
|
2581
2581
|
}
|
|
2582
|
-
function
|
|
2582
|
+
function re(t, e, n, r, i) {
|
|
2583
2583
|
const a = i.topLeft || 0, o = i.topRight || 0, c = i.bottomRight || 0, s = i.bottomLeft || 0;
|
|
2584
2584
|
return `
|
|
2585
2585
|
M ${t + a} ${e}
|
|
@@ -2594,7 +2594,7 @@ function ne(t, e, n, r, i) {
|
|
|
2594
2594
|
Z
|
|
2595
2595
|
`.trim().replace(/\s+/g, " ");
|
|
2596
2596
|
}
|
|
2597
|
-
function
|
|
2597
|
+
function ma(t, e, n, r, i, a, o) {
|
|
2598
2598
|
const c = a.loopRadius, s = a.horizontalExtension, l = a.cornerRadius, u = () => {
|
|
2599
2599
|
const g = n.x - c, m = n.y - c, x = r.x + c, y = r.y - c;
|
|
2600
2600
|
return `M${n.x},${n.y} C${g},${m} ${x},${y} ${r.x},${r.y}`;
|
|
@@ -2626,7 +2626,7 @@ function fa(t, e, n, r, i, a, o) {
|
|
|
2626
2626
|
r
|
|
2627
2627
|
// rightIn of source node
|
|
2628
2628
|
];
|
|
2629
|
-
return
|
|
2629
|
+
return De(x, l);
|
|
2630
2630
|
}
|
|
2631
2631
|
return u();
|
|
2632
2632
|
}
|
|
@@ -2636,42 +2636,42 @@ function fa(t, e, n, r, i, a, o) {
|
|
|
2636
2636
|
if (t.orthogonalPathPoints && t.orthogonalPathPoints.length > 0)
|
|
2637
2637
|
h = t.orthogonalPathPoints;
|
|
2638
2638
|
else {
|
|
2639
|
-
const g = Math.abs(n.y - t.midY), m = Math.abs(t.midY - r.y), x = 20, y = g >= x, p = m >= x, w = e === "right" ? n.x + s : n.x - s,
|
|
2639
|
+
const g = Math.abs(n.y - t.midY), m = Math.abs(t.midY - r.y), x = 20, y = g >= x, p = m >= x, w = e === "right" ? n.x + s : n.x - s, E = e === "right" ? r.x - f : r.x + f;
|
|
2640
2640
|
if (h = [], !y && !p) {
|
|
2641
|
-
const
|
|
2641
|
+
const S = (n.y + r.y) / 2;
|
|
2642
2642
|
h.push(
|
|
2643
2643
|
n,
|
|
2644
|
-
{ x: w, y:
|
|
2645
|
-
{ x:
|
|
2644
|
+
{ x: w, y: S },
|
|
2645
|
+
{ x: E, y: S },
|
|
2646
2646
|
r
|
|
2647
2647
|
);
|
|
2648
2648
|
} else y ? p ? h.push(
|
|
2649
2649
|
n,
|
|
2650
2650
|
{ x: w, y: n.y },
|
|
2651
2651
|
{ x: w, y: t.midY },
|
|
2652
|
-
{ x:
|
|
2653
|
-
{ x:
|
|
2652
|
+
{ x: E, y: t.midY },
|
|
2653
|
+
{ x: E, y: r.y },
|
|
2654
2654
|
r
|
|
2655
2655
|
) : h.push(
|
|
2656
2656
|
n,
|
|
2657
2657
|
{ x: w, y: n.y },
|
|
2658
2658
|
{ x: w, y: t.midY },
|
|
2659
|
-
{ x:
|
|
2659
|
+
{ x: E, y: t.midY },
|
|
2660
2660
|
r
|
|
2661
2661
|
) : h.push(
|
|
2662
2662
|
n,
|
|
2663
2663
|
{ x: w, y: t.midY },
|
|
2664
|
-
{ x:
|
|
2665
|
-
{ x:
|
|
2664
|
+
{ x: E, y: t.midY },
|
|
2665
|
+
{ x: E, y: r.y },
|
|
2666
2666
|
r
|
|
2667
2667
|
);
|
|
2668
2668
|
}
|
|
2669
|
-
return
|
|
2669
|
+
return De(h, l);
|
|
2670
2670
|
}
|
|
2671
|
-
function
|
|
2672
|
-
|
|
2671
|
+
function ya(t, e, n, r, i) {
|
|
2672
|
+
xa(t, r, i), _a(t, e, n, r, i);
|
|
2673
2673
|
}
|
|
2674
|
-
function
|
|
2674
|
+
function xa(t, e, n) {
|
|
2675
2675
|
const r = n.loopRadius, i = n.edgeSpacing, a = n.labelHeight;
|
|
2676
2676
|
t.forEach((o) => {
|
|
2677
2677
|
const c = o.edges;
|
|
@@ -2693,41 +2693,41 @@ function da(t, e, n) {
|
|
|
2693
2693
|
const y = c[x];
|
|
2694
2694
|
if (y.depth !== 0) continue;
|
|
2695
2695
|
if (y.getDirection() === "self") {
|
|
2696
|
-
const
|
|
2697
|
-
|
|
2696
|
+
const $ = y.getStartPoint();
|
|
2697
|
+
$ && (y.midY = e - $.y - r);
|
|
2698
2698
|
continue;
|
|
2699
2699
|
}
|
|
2700
2700
|
const w = y.label ? i + a : i;
|
|
2701
2701
|
y.midY = o.aboveY - w, o.aboveY = y.midY, y.baseDirection = "above", y.baseOffset = -(l - x);
|
|
2702
|
-
const
|
|
2702
|
+
const E = x < c.length - 1 ? c[x + 1] : void 0, S = Tt(
|
|
2703
2703
|
y,
|
|
2704
2704
|
e,
|
|
2705
|
-
|
|
2705
|
+
E,
|
|
2706
2706
|
n
|
|
2707
2707
|
);
|
|
2708
|
-
|
|
2708
|
+
S && (y.midY = S.midY, y.orthogonalPathPoints = S.points, o.aboveY = y.midY);
|
|
2709
2709
|
}
|
|
2710
2710
|
for (let x = l + 1; x < c.length; x++) {
|
|
2711
2711
|
const y = c[x];
|
|
2712
2712
|
if (y.depth !== 0) continue;
|
|
2713
2713
|
if (y.getDirection() === "self") {
|
|
2714
|
-
const
|
|
2715
|
-
|
|
2714
|
+
const $ = y.getStartPoint();
|
|
2715
|
+
$ && (y.midY = e - $.y - r);
|
|
2716
2716
|
continue;
|
|
2717
2717
|
}
|
|
2718
2718
|
const w = y.label ? i + a : i;
|
|
2719
2719
|
y.midY = o.belowY + w, o.belowY = y.midY, y.baseDirection = "below", y.baseOffset = x - l;
|
|
2720
|
-
const
|
|
2720
|
+
const E = x > 0 ? c[x - 1] : void 0, S = Tt(
|
|
2721
2721
|
y,
|
|
2722
2722
|
e,
|
|
2723
|
-
|
|
2723
|
+
E,
|
|
2724
2724
|
n
|
|
2725
2725
|
);
|
|
2726
|
-
|
|
2726
|
+
S && (y.midY = S.midY, y.orthogonalPathPoints = S.points, o.belowY = y.midY);
|
|
2727
2727
|
}
|
|
2728
2728
|
});
|
|
2729
2729
|
}
|
|
2730
|
-
function
|
|
2730
|
+
function _a(t, e, n, r, i) {
|
|
2731
2731
|
const a = i.loopRadius, o = i.edgeSpacing, c = i.labelHeight, s = [];
|
|
2732
2732
|
t.forEach((f) => {
|
|
2733
2733
|
const h = f.edges;
|
|
@@ -2751,17 +2751,17 @@ function ga(t, e, n, r, i) {
|
|
|
2751
2751
|
if (h === void 0 || g === void 0) return;
|
|
2752
2752
|
const m = Math.min(h, g), x = Math.max(h, g), y = [];
|
|
2753
2753
|
for (let C = m; C <= x; C++) {
|
|
2754
|
-
const
|
|
2755
|
-
|
|
2754
|
+
const L = e.get(C);
|
|
2755
|
+
L && y.push(...L.nodes);
|
|
2756
2756
|
}
|
|
2757
2757
|
const p = y.map((C) => {
|
|
2758
|
-
const
|
|
2759
|
-
if (!
|
|
2760
|
-
const B = r -
|
|
2761
|
-
return { y: B, height:
|
|
2758
|
+
const L = C.getPosition();
|
|
2759
|
+
if (!L) return null;
|
|
2760
|
+
const B = r - L[1], G = C.height ? parseFloat(C.height) * nt : fe;
|
|
2761
|
+
return { y: B, height: G, bottomY: B + G / 2 };
|
|
2762
2762
|
}).filter(
|
|
2763
2763
|
(C) => C !== null
|
|
2764
|
-
).sort((C,
|
|
2764
|
+
).sort((C, L) => C.y - L.y);
|
|
2765
2765
|
let w;
|
|
2766
2766
|
if (p.length === 0)
|
|
2767
2767
|
w = (l + u) / 2;
|
|
@@ -2771,25 +2771,25 @@ function ga(t, e, n, r, i) {
|
|
|
2771
2771
|
const C = p.length / 2;
|
|
2772
2772
|
w = (p[C - 1].bottomY + p[C].bottomY) / 2;
|
|
2773
2773
|
}
|
|
2774
|
-
const
|
|
2775
|
-
f.baseDirection =
|
|
2776
|
-
const
|
|
2777
|
-
let
|
|
2778
|
-
|
|
2774
|
+
const E = f.getStartPoint(), S = f.getEndPoint(), v = (E && S ? r - (E.y + S.y) / 2 : w) < w ? "above" : "below";
|
|
2775
|
+
f.baseDirection = v;
|
|
2776
|
+
const k = f.label ? o + c : o;
|
|
2777
|
+
let M;
|
|
2778
|
+
v === "above" ? (f.midY = l - k, M = l, l = f.midY) : (f.midY = u + k, M = u, u = f.midY);
|
|
2779
2779
|
const D = Tt(
|
|
2780
2780
|
f,
|
|
2781
2781
|
r,
|
|
2782
|
-
{ midY:
|
|
2782
|
+
{ midY: M },
|
|
2783
2783
|
i
|
|
2784
2784
|
);
|
|
2785
|
-
D && (f.midY = D.midY, f.orthogonalPathPoints = D.points,
|
|
2785
|
+
D && (f.midY = D.midY, f.orthogonalPathPoints = D.points, v === "above" ? l = Math.min(l, D.midY) : u = Math.max(u, D.midY));
|
|
2786
2786
|
});
|
|
2787
2787
|
}
|
|
2788
|
-
function
|
|
2788
|
+
function wa(t) {
|
|
2789
2789
|
if (!t.sourceNode) return null;
|
|
2790
2790
|
const e = t.sourceNode.getPosition();
|
|
2791
2791
|
if (!e) return null;
|
|
2792
|
-
const n =
|
|
2792
|
+
const n = ln / nt, r = new dn({
|
|
2793
2793
|
_gvid: -1e3 - t._gvid,
|
|
2794
2794
|
// Negative ID to distinguish from real nodes
|
|
2795
2795
|
name: `virtual_edge_${t._gvid}`,
|
|
@@ -2803,7 +2803,7 @@ function pa(t) {
|
|
|
2803
2803
|
});
|
|
2804
2804
|
return r.virtualNode = !0, r.edge = t, t.virtualNode = r, r;
|
|
2805
2805
|
}
|
|
2806
|
-
function
|
|
2806
|
+
function va(t, e, n) {
|
|
2807
2807
|
const r = e.nodes, i = r.findIndex((a) => a._gvid === n._gvid);
|
|
2808
2808
|
if (i === -1) {
|
|
2809
2809
|
r.push(t);
|
|
@@ -2811,8 +2811,8 @@ function ma(t, e, n) {
|
|
|
2811
2811
|
}
|
|
2812
2812
|
r.splice(i, 0, t);
|
|
2813
2813
|
}
|
|
2814
|
-
function
|
|
2815
|
-
const n =
|
|
2814
|
+
function ba(t, e) {
|
|
2815
|
+
const n = Jo, r = [], i = /* @__PURE__ */ new Map();
|
|
2816
2816
|
t.forEach((l) => {
|
|
2817
2817
|
const u = l.getPosition();
|
|
2818
2818
|
if (!u) return;
|
|
@@ -2831,15 +2831,15 @@ function ya(t, e) {
|
|
|
2831
2831
|
const c = /* @__PURE__ */ new Map();
|
|
2832
2832
|
t.forEach((l) => {
|
|
2833
2833
|
const u = i.get(l._gvid);
|
|
2834
|
-
u !== void 0 && (c.has(u) || c.set(u, new
|
|
2834
|
+
u !== void 0 && (c.has(u) || c.set(u, new ia(u, 0)), c.get(u).addNode(l, !1));
|
|
2835
2835
|
}), e.forEach((l) => {
|
|
2836
2836
|
if (!l.sourceNode || !l.targetNode || l.sourceNode._gvid !== l.targetNode._gvid) return;
|
|
2837
2837
|
const u = i.get(l.sourceNode._gvid);
|
|
2838
2838
|
if (u === void 0) return;
|
|
2839
2839
|
const f = c.get(u);
|
|
2840
2840
|
if (!f) return;
|
|
2841
|
-
const h =
|
|
2842
|
-
h &&
|
|
2841
|
+
const h = wa(l);
|
|
2842
|
+
h && va(h, f, l.sourceNode);
|
|
2843
2843
|
});
|
|
2844
2844
|
const s = /* @__PURE__ */ new Map();
|
|
2845
2845
|
return e.forEach((l) => {
|
|
@@ -2848,7 +2848,7 @@ function ya(t, e) {
|
|
|
2848
2848
|
if (u === void 0 || f === void 0) return;
|
|
2849
2849
|
l.depth = Math.abs(f - u) - 1, l.depth < 0 && (l.depth = 0);
|
|
2850
2850
|
const h = Math.min(u, f), g = Math.max(u, f), m = `${h}-${g}`;
|
|
2851
|
-
s.has(m) || s.set(m, new
|
|
2851
|
+
s.has(m) || s.set(m, new oa(u, f, 0)), s.get(m).addEdge(l);
|
|
2852
2852
|
}), s.forEach((l) => {
|
|
2853
2853
|
l.edges.sort((u, f) => {
|
|
2854
2854
|
const h = u.getStartPoint(), g = u.getEndPoint(), m = h && g ? (h.y + g.y) / 2 : 0, x = f.getStartPoint(), y = f.getEndPoint();
|
|
@@ -2856,19 +2856,19 @@ function ya(t, e) {
|
|
|
2856
2856
|
});
|
|
2857
2857
|
}), { nodeColumnMap: i, nodeColumns: c, edgeColumns: s };
|
|
2858
2858
|
}
|
|
2859
|
-
function
|
|
2859
|
+
function Ea(t, e) {
|
|
2860
2860
|
t.forEach((n) => {
|
|
2861
2861
|
if (n.nodes.length === 0) return;
|
|
2862
2862
|
let r = !0;
|
|
2863
2863
|
n.nodes.forEach((i) => {
|
|
2864
2864
|
const a = i.getPosition();
|
|
2865
2865
|
if (!a) return;
|
|
2866
|
-
const o = i.height ? parseFloat(i.height) *
|
|
2866
|
+
const o = i.height ? parseFloat(i.height) * nt : fe, c = e - a[1], s = c - o / 2, l = c + o / 2;
|
|
2867
2867
|
r ? (n.aboveY = s, n.belowY = l, r = !1) : (n.aboveY = Math.min(n.aboveY, s), n.belowY = Math.max(n.belowY, l));
|
|
2868
2868
|
});
|
|
2869
2869
|
});
|
|
2870
2870
|
}
|
|
2871
|
-
function
|
|
2871
|
+
function Na(t, e) {
|
|
2872
2872
|
t.length !== 0 && e.forEach((n) => {
|
|
2873
2873
|
const r = n.edges;
|
|
2874
2874
|
if (r.length === 0) return;
|
|
@@ -2886,9 +2886,9 @@ function _a(t, e) {
|
|
|
2886
2886
|
});
|
|
2887
2887
|
});
|
|
2888
2888
|
}
|
|
2889
|
-
function
|
|
2889
|
+
function $a(t, e, n) {
|
|
2890
2890
|
const i = (t.objects || []).map(
|
|
2891
|
-
(s) => new
|
|
2891
|
+
(s) => new dn({
|
|
2892
2892
|
_gvid: s._gvid,
|
|
2893
2893
|
name: s.name,
|
|
2894
2894
|
_draw_: s._draw_,
|
|
@@ -2896,8 +2896,8 @@ function wa(t, e, n) {
|
|
|
2896
2896
|
bb: s.bb,
|
|
2897
2897
|
pos: s.pos,
|
|
2898
2898
|
// Apply custom node dimensions if provided (convert points to inches)
|
|
2899
|
-
width: e !== null ? String(e /
|
|
2900
|
-
height: n !== null ? String(n /
|
|
2899
|
+
width: e !== null ? String(e / nt) : s.width,
|
|
2900
|
+
height: n !== null ? String(n / nt) : s.height,
|
|
2901
2901
|
label: s.label
|
|
2902
2902
|
})
|
|
2903
2903
|
), a = /* @__PURE__ */ new Map();
|
|
@@ -2905,7 +2905,7 @@ function wa(t, e, n) {
|
|
|
2905
2905
|
a.set(s._gvid, s);
|
|
2906
2906
|
});
|
|
2907
2907
|
const c = (t.edges || []).map((s) => {
|
|
2908
|
-
const l = new
|
|
2908
|
+
const l = new ra({
|
|
2909
2909
|
_gvid: s._gvid,
|
|
2910
2910
|
name: s.name,
|
|
2911
2911
|
_draw_: s._draw_,
|
|
@@ -2920,7 +2920,7 @@ function wa(t, e, n) {
|
|
|
2920
2920
|
});
|
|
2921
2921
|
return { nodes: i, edges: c };
|
|
2922
2922
|
}
|
|
2923
|
-
function
|
|
2923
|
+
function ka(t, e, n, r) {
|
|
2924
2924
|
let i = 0;
|
|
2925
2925
|
t.forEach((o) => {
|
|
2926
2926
|
i = Math.max(i, o.getWidthPoints());
|
|
@@ -2928,70 +2928,73 @@ function va(t, e, n, r) {
|
|
|
2928
2928
|
let a = 0;
|
|
2929
2929
|
return e.forEach((o) => {
|
|
2930
2930
|
if (o.depth !== 0 || !o.label || o.getDirection() === "self") return;
|
|
2931
|
-
const { boxWidth: c } =
|
|
2931
|
+
const { boxWidth: c } = mn(o, n, r);
|
|
2932
2932
|
a = Math.max(a, c);
|
|
2933
|
-
}), i + 2 * n.horizontalExtension + a + 2 *
|
|
2933
|
+
}), i + 2 * n.horizontalExtension + a + 2 * jo;
|
|
2934
2934
|
}
|
|
2935
|
-
function
|
|
2936
|
-
const r = Array.from(t.keys()).sort((l, u) => l - u), i = r.length, a =
|
|
2935
|
+
function Sa(t, e, n) {
|
|
2936
|
+
const r = Array.from(t.keys()).sort((l, u) => l - u), i = r.length, a = Qo, o = n, s = (i > 1 ? (i - 1) * o : 0) + 2 * a;
|
|
2937
2937
|
return r.forEach((l, u) => {
|
|
2938
2938
|
const f = t.get(l);
|
|
2939
2939
|
if (!f) return;
|
|
2940
2940
|
const h = f.nodes;
|
|
2941
2941
|
if (h.length === 0) return;
|
|
2942
2942
|
const g = i > 1 ? a + u * o : s / 2;
|
|
2943
|
-
h.sort((
|
|
2944
|
-
const
|
|
2945
|
-
return !
|
|
2943
|
+
h.sort((v, k) => {
|
|
2944
|
+
const M = v.getPosition(), D = k.getPosition();
|
|
2945
|
+
return !M || !D ? 0 : D[1] - M[1];
|
|
2946
2946
|
});
|
|
2947
|
-
const m =
|
|
2947
|
+
const m = ln, x = h.filter((v) => !v.virtualNode), y = x.length;
|
|
2948
2948
|
if (y === 0) {
|
|
2949
|
-
let
|
|
2950
|
-
h.forEach((
|
|
2951
|
-
const
|
|
2952
|
-
|
|
2949
|
+
let v = (e + h.reduce((k, M) => k + M.getHeightPoints(), 0)) / 2;
|
|
2950
|
+
h.forEach((k) => {
|
|
2951
|
+
const M = k.getHeightPoints();
|
|
2952
|
+
v -= M / 2, k.pos = `${g},${v}`, v -= M / 2;
|
|
2953
2953
|
});
|
|
2954
2954
|
return;
|
|
2955
2955
|
}
|
|
2956
2956
|
let p, w;
|
|
2957
2957
|
if (y % 2 === 1) {
|
|
2958
|
-
const
|
|
2959
|
-
w = h.indexOf(
|
|
2958
|
+
const v = Math.floor(y / 2), k = x[v];
|
|
2959
|
+
w = h.indexOf(k), p = e / 2;
|
|
2960
2960
|
} else {
|
|
2961
|
-
const
|
|
2962
|
-
w = h.indexOf(
|
|
2961
|
+
const v = y / 2 - 1, k = x[v];
|
|
2962
|
+
w = h.indexOf(k), p = e / 2;
|
|
2963
2963
|
}
|
|
2964
|
-
const
|
|
2965
|
-
|
|
2966
|
-
let
|
|
2967
|
-
for (let
|
|
2968
|
-
const
|
|
2969
|
-
|
|
2964
|
+
const E = h[w], S = E.getHeightPoints();
|
|
2965
|
+
E.pos = `${g},${p}`;
|
|
2966
|
+
let $ = p + S / 2;
|
|
2967
|
+
for (let v = w - 1; v >= 0; v--) {
|
|
2968
|
+
const k = h[v], M = h[v + 1], D = k.getHeightPoints(), C = k.virtualNode || M.virtualNode ? 0 : m;
|
|
2969
|
+
$ += C + D / 2, k.pos = `${g},${$}`, $ += D / 2;
|
|
2970
2970
|
}
|
|
2971
|
-
|
|
2972
|
-
for (let
|
|
2973
|
-
const
|
|
2974
|
-
|
|
2971
|
+
$ = p - S / 2;
|
|
2972
|
+
for (let v = w + 1; v < h.length; v++) {
|
|
2973
|
+
const k = h[v], M = h[v - 1], D = k.getHeightPoints(), C = k.virtualNode || M.virtualNode ? 0 : m;
|
|
2974
|
+
$ -= C + D / 2, k.pos = `${g},${$}`, $ -= D / 2;
|
|
2975
2975
|
}
|
|
2976
2976
|
}), s;
|
|
2977
2977
|
}
|
|
2978
|
-
function
|
|
2978
|
+
function xn(t, e, n) {
|
|
2979
|
+
t.append("use").attr("href", `#${cn}`).attr("x", e).attr("y", n - _t / 2);
|
|
2980
|
+
}
|
|
2981
|
+
function Aa(t, e, n) {
|
|
2979
2982
|
t.style("cursor", "pointer").on("mouseenter", function() {
|
|
2980
2983
|
if (e.attr("opacity", 1), n.select(".edge.selected").size() > 0)
|
|
2981
2984
|
return;
|
|
2982
|
-
const i =
|
|
2985
|
+
const i = Y(this).attr("data-node-id"), a = /* @__PURE__ */ new Set([i]);
|
|
2983
2986
|
n.selectAll(".edge").each(function() {
|
|
2984
|
-
const o =
|
|
2985
|
-
o === i || c === i ? o === i ? a.add(c) : a.add(o) :
|
|
2987
|
+
const o = Y(this).attr("data-source-node-id"), c = Y(this).attr("data-target-node-id");
|
|
2988
|
+
o === i || c === i ? o === i ? a.add(c) : a.add(o) : Y(this).classed("dimmed", !0);
|
|
2986
2989
|
}), n.selectAll(".node").each(function() {
|
|
2987
|
-
const o =
|
|
2988
|
-
a.has(o) ||
|
|
2990
|
+
const o = Y(this).attr("data-node-id");
|
|
2991
|
+
a.has(o) || Y(this).classed("dimmed", !0);
|
|
2989
2992
|
});
|
|
2990
2993
|
}).on("mouseleave", function() {
|
|
2991
2994
|
e.attr("opacity", 0), n.selectAll(".edge.dimmed").classed("dimmed", !1), n.selectAll(".node.dimmed").classed("dimmed", !1);
|
|
2992
2995
|
});
|
|
2993
2996
|
}
|
|
2994
|
-
function
|
|
2997
|
+
function Ia(t) {
|
|
2995
2998
|
const {
|
|
2996
2999
|
nodeGroup: e,
|
|
2997
3000
|
g: n,
|
|
@@ -3005,38 +3008,41 @@ function Na(t) {
|
|
|
3005
3008
|
addressText: u,
|
|
3006
3009
|
nodeTextColor: f,
|
|
3007
3010
|
nodeBackground: h,
|
|
3008
|
-
hasCustomBackground: g
|
|
3009
|
-
|
|
3010
|
-
|
|
3011
|
+
hasCustomBackground: g,
|
|
3012
|
+
hasChainIcon: m
|
|
3013
|
+
} = t, x = o * Ko, y = o - x, p = c - i - o / 2, w = 4, E = "var(--border-primary, #D3D1D4)";
|
|
3014
|
+
e.append("path").attr("d", re(
|
|
3011
3015
|
r - a / 2,
|
|
3012
|
-
|
|
3016
|
+
p,
|
|
3013
3017
|
a,
|
|
3014
|
-
|
|
3015
|
-
{ topLeft:
|
|
3016
|
-
)).attr("fill", g ? h : "var(--bg-quaternary, #
|
|
3018
|
+
x,
|
|
3019
|
+
{ topLeft: w, topRight: w }
|
|
3020
|
+
)).attr("fill", g ? h : "var(--bg-quaternary, #F2F2F3)").attr("stroke", E).attr("stroke-width", 1), g && e.append("line").attr("x1", r - a / 2).attr("y1", p + x).attr("x2", r + a / 2).attr("y2", p + x).attr("stroke", f).attr("stroke-width", 1), e.append("path").attr("d", re(
|
|
3017
3021
|
r - a / 2,
|
|
3018
|
-
|
|
3022
|
+
p + x,
|
|
3019
3023
|
a,
|
|
3020
|
-
|
|
3021
|
-
{ bottomLeft:
|
|
3022
|
-
)).attr("fill", g ? h : "var(--bg-primary, #fff)").attr("stroke",
|
|
3023
|
-
const
|
|
3024
|
-
|
|
3025
|
-
let
|
|
3026
|
-
const
|
|
3027
|
-
if (s.forEach((
|
|
3028
|
-
const
|
|
3029
|
-
e.append("rect").attr("x",
|
|
3024
|
+
y,
|
|
3025
|
+
{ bottomLeft: w, bottomRight: w }
|
|
3026
|
+
)).attr("fill", g ? h : "var(--bg-primary, #fff)").attr("stroke", E).attr("stroke-width", 1);
|
|
3027
|
+
const S = e.append("rect").attr("x", r - a / 2 - 4).attr("y", p - 4).attr("width", a + 8).attr("height", o + 8).attr("rx", 5).attr("ry", 5).attr("fill", "none").attr("stroke", "var(--gray-700, #43444C)").attr("stroke-width", 2).attr("opacity", 0).style("pointer-events", "none");
|
|
3028
|
+
Aa(e, S, n);
|
|
3029
|
+
let $ = r - a / 2 + 8;
|
|
3030
|
+
const v = p + x / 2, k = 7.2, M = 6, D = 18, C = 4;
|
|
3031
|
+
if (s.forEach((L) => {
|
|
3032
|
+
const G = L.length * k + M * 2;
|
|
3033
|
+
e.append("rect").attr("x", $).attr("y", v - D / 2).attr("width", G).attr("height", D).attr("rx", 5).attr("ry", 5).attr("fill", "var(--bg-warning-primary, #FFF8E1)").attr("stroke", "var(--border-warning-light, #FFD66D)").attr("stroke-width", 1), e.append("text").attr("x", $ + M).attr("y", v).attr("text-anchor", "start").attr("dominant-baseline", "middle").attr("font-family", "var(--font-inter), Inter, Helvetica, Arial").attr("font-size", "12px").attr("font-weight", "500").attr("fill", "var(--text-warning-primary, #CD7004)").text(L), $ += G + C;
|
|
3030
3034
|
}), l) {
|
|
3031
|
-
const
|
|
3032
|
-
|
|
3035
|
+
const L = r + a / 2 - 8 - $, B = e.append("text").attr("x", $).attr("y", v).attr("text-anchor", "start").attr("dominant-baseline", "middle").attr("font-family", "var(--font-inter), Inter, Helvetica, Arial").attr("font-size", "16px").attr("font-weight", "500").attr("fill", f);
|
|
3036
|
+
ne(B, L, l);
|
|
3033
3037
|
}
|
|
3034
3038
|
if (u) {
|
|
3035
|
-
const
|
|
3036
|
-
|
|
3039
|
+
const L = p + x + y / 2, B = m ? _t + sn : 0;
|
|
3040
|
+
m && xn(e, r - a / 2 + 8, L);
|
|
3041
|
+
const G = a - 16 - B, d = e.append("text").attr("x", r - a / 2 + 8 + B).attr("y", L).attr("text-anchor", "start").attr("dominant-baseline", "middle").attr("font-family", "var(--font-fira-code), Fira Code, monospace").attr("font-size", "12px").attr("font-weight", "400").attr("fill", f);
|
|
3042
|
+
ne(d, G, u);
|
|
3037
3043
|
}
|
|
3038
3044
|
}
|
|
3039
|
-
function
|
|
3045
|
+
function Ta(t) {
|
|
3040
3046
|
const {
|
|
3041
3047
|
nodeGroup: e,
|
|
3042
3048
|
x: n,
|
|
@@ -3051,76 +3057,80 @@ function $a(t) {
|
|
|
3051
3057
|
addressText: f,
|
|
3052
3058
|
nodeTextColor: h,
|
|
3053
3059
|
nodeBackground: g,
|
|
3054
|
-
hasCustomBackground: m
|
|
3055
|
-
|
|
3060
|
+
hasCustomBackground: m,
|
|
3061
|
+
hasChainIcon: x
|
|
3062
|
+
} = t, y = 4, p = s ? "#EF4444" : "var(--border-primary, #D3D1D4)", w = e.append("path").attr("d", re(
|
|
3056
3063
|
n - i / 2,
|
|
3057
3064
|
o - r - a / 2,
|
|
3058
3065
|
i,
|
|
3059
3066
|
a,
|
|
3060
|
-
{ topLeft:
|
|
3061
|
-
)).attr("fill", m ? g : "var(--bg-primary, #fff)").attr("stroke",
|
|
3067
|
+
{ topLeft: y, topRight: y, bottomLeft: y, bottomRight: y }
|
|
3068
|
+
)).attr("fill", m ? g : "var(--bg-primary, #fff)").attr("stroke", p).attr("stroke-width", s ? 2 : 1);
|
|
3062
3069
|
if (!c) {
|
|
3063
|
-
const
|
|
3064
|
-
|
|
3065
|
-
|
|
3070
|
+
const E = e.append("rect").attr("x", n - i / 2 - 4).attr("y", o - r - a / 2 - 4).attr("width", i + 8).attr("height", a + 8).attr("rx", 5).attr("ry", 5).attr("fill", "none").attr("stroke", "#000000").attr("stroke-width", 2).attr("opacity", 0).style("pointer-events", "none");
|
|
3071
|
+
w.style("cursor", "pointer").on("mouseenter", function() {
|
|
3072
|
+
E.attr("opacity", 1);
|
|
3066
3073
|
}).on("mouseleave", function() {
|
|
3067
|
-
|
|
3074
|
+
E.attr("opacity", 0);
|
|
3068
3075
|
});
|
|
3069
3076
|
}
|
|
3070
3077
|
if (l)
|
|
3071
3078
|
if (c) {
|
|
3072
|
-
const
|
|
3079
|
+
const E = u || f;
|
|
3073
3080
|
e.append("text").attr("x", n).attr("y", o - r).attr("text-anchor", "middle").attr("dominant-baseline", "middle").attr("font-family", "Inter, Helvetica, Arial").attr("font-size", "10px").attr("fill", "#991B1B").text(
|
|
3074
|
-
|
|
3081
|
+
E.length > 20 ? E.slice(0, 20) + "..." : E
|
|
3075
3082
|
);
|
|
3076
3083
|
} else {
|
|
3077
|
-
const
|
|
3078
|
-
|
|
3084
|
+
const E = f || u, S = o - r, $ = x ? _t + sn : 0;
|
|
3085
|
+
x && xn(e, n - i / 2 + 8, S);
|
|
3086
|
+
const v = i - 16 - $, k = e.append("text").attr("x", n - i / 2 + 8 + $).attr("y", S).attr("text-anchor", "start").attr("dominant-baseline", "middle").attr("font-family", "var(--font-fira-code), Fira Code, monospace").attr("font-size", "12px").attr("font-weight", "400").attr("fill", h);
|
|
3087
|
+
ne(k, v, E);
|
|
3079
3088
|
}
|
|
3080
3089
|
}
|
|
3081
|
-
function
|
|
3082
|
-
const
|
|
3083
|
-
if (!
|
|
3084
|
-
const [
|
|
3085
|
-
if (
|
|
3086
|
-
const
|
|
3087
|
-
let
|
|
3090
|
+
function Ca(t, e, n, r, i) {
|
|
3091
|
+
const a = t.getPosition();
|
|
3092
|
+
if (!a) return;
|
|
3093
|
+
const [o, c] = a, s = t.getWidthPoints(), l = t.getHeightPoints(), u = t.virtualNode;
|
|
3094
|
+
if (u && !r) return;
|
|
3095
|
+
const f = e.append("g").attr("class", u ? "node virtual-node" : "node").attr("id", t.name).attr("data-node-id", t.name);
|
|
3096
|
+
let h = null;
|
|
3088
3097
|
try {
|
|
3089
|
-
t.label && (
|
|
3090
|
-
} catch (
|
|
3091
|
-
|
|
3098
|
+
t.label && (h = Ct(t.label));
|
|
3099
|
+
} catch (v) {
|
|
3100
|
+
h = ha(t.label), h || console.warn(`Failed to decode node label for ${t.name}:`, v);
|
|
3092
3101
|
}
|
|
3093
|
-
|
|
3094
|
-
const
|
|
3095
|
-
nodeGroup:
|
|
3102
|
+
h != null && h.key && f.attr("data-key", h.key);
|
|
3103
|
+
const g = r && u, m = (h == null ? void 0 : h.tags) || [], x = (h == null ? void 0 : h.label) || "", y = (h == null ? void 0 : h.text) || "", p = (h == null ? void 0 : h.color) || "var(--text-primary, #1A171B)", w = (h == null ? void 0 : h.background) || "white", E = w !== "white", S = m.length > 0 || x.length > 0, $ = {
|
|
3104
|
+
nodeGroup: f,
|
|
3096
3105
|
g: e,
|
|
3097
|
-
x:
|
|
3098
|
-
y:
|
|
3099
|
-
w:
|
|
3100
|
-
h:
|
|
3106
|
+
x: o,
|
|
3107
|
+
y: c,
|
|
3108
|
+
w: s,
|
|
3109
|
+
h: l,
|
|
3101
3110
|
height: n,
|
|
3102
|
-
isVirtual:
|
|
3103
|
-
showVirtualStyle:
|
|
3104
|
-
nodeContent:
|
|
3105
|
-
badges:
|
|
3106
|
-
labelText:
|
|
3107
|
-
addressText:
|
|
3108
|
-
nodeTextColor:
|
|
3109
|
-
nodeBackground:
|
|
3110
|
-
hasCustomBackground:
|
|
3111
|
-
|
|
3112
|
-
|
|
3113
|
-
|
|
3111
|
+
isVirtual: u,
|
|
3112
|
+
showVirtualStyle: g,
|
|
3113
|
+
nodeContent: h,
|
|
3114
|
+
badges: m,
|
|
3115
|
+
labelText: x,
|
|
3116
|
+
addressText: y,
|
|
3117
|
+
nodeTextColor: p,
|
|
3118
|
+
nodeBackground: w,
|
|
3119
|
+
hasCustomBackground: E,
|
|
3120
|
+
hasChainIcon: i
|
|
3121
|
+
};
|
|
3122
|
+
S && !u ? Ia($) : Ta($), !t.label && t._ldraw_ && t._ldraw_.length > 0 && !u && t._ldraw_.forEach((v) => {
|
|
3123
|
+
v.op === "T" && v.text && f.append("text").attr("x", o - s / 2 + 8).attr("y", n - c).attr("text-anchor", "start").attr("dominant-baseline", "middle").attr("font-family", v.face || "Inter, Helvetica, Arial").attr("font-size", `${v.size || 11}px`).attr("fill", v.color || "#334155").text(v.text);
|
|
3114
3124
|
});
|
|
3115
3125
|
}
|
|
3116
|
-
function
|
|
3117
|
-
e.forEach((
|
|
3118
|
-
|
|
3119
|
-
|
|
3126
|
+
function Ma(t, e, n, r, i) {
|
|
3127
|
+
e.forEach((a) => {
|
|
3128
|
+
a.nodes.forEach((o) => {
|
|
3129
|
+
Ca(o, t, n, r, i);
|
|
3120
3130
|
});
|
|
3121
3131
|
});
|
|
3122
3132
|
}
|
|
3123
|
-
const
|
|
3133
|
+
const Da = `
|
|
3124
3134
|
<style>
|
|
3125
3135
|
@keyframes selected-pulse {
|
|
3126
3136
|
0%, 100% {
|
|
@@ -3163,6 +3173,18 @@ const Aa = `
|
|
|
3163
3173
|
stroke-width: 4px;
|
|
3164
3174
|
animation: marching-ants 0.6s linear infinite;
|
|
3165
3175
|
}
|
|
3176
|
+
/* Selected edge label: solid pill in the edge's own color, white text */
|
|
3177
|
+
.edge.selected .label-bg {
|
|
3178
|
+
fill: var(--edge-color);
|
|
3179
|
+
stroke: var(--edge-color);
|
|
3180
|
+
}
|
|
3181
|
+
.edge.selected .label-text,
|
|
3182
|
+
.edge.selected .label-text-elem {
|
|
3183
|
+
fill: #fff;
|
|
3184
|
+
}
|
|
3185
|
+
.edge.selected .label-elem-bg {
|
|
3186
|
+
display: none;
|
|
3187
|
+
}
|
|
3166
3188
|
/* Dimmed state for edge hover focus effect */
|
|
3167
3189
|
.edge.dimmed,
|
|
3168
3190
|
.node.dimmed {
|
|
@@ -3193,7 +3215,7 @@ const Aa = `
|
|
|
3193
3215
|
<symbol id="arrow-right" viewBox="0 0 12 12">
|
|
3194
3216
|
<path d="M11.53 5.46967C11.8229 5.76256 11.8229 6.23744 11.53 6.53033L6.75736 11.303C6.46447 11.5959 5.98959 11.5959 5.6967 11.303C5.40381 11.0101 5.40381 10.5352 5.6967 10.2423L9.93934 6L5.6967 1.75736C5.40381 1.46447 5.40381 0.989593 5.6967 0.696699C5.98959 0.403806 6.46447 0.403806 6.75736 0.696699L11.53 5.46967ZM0 5.25H11V6.75H0V5.25Z"/>
|
|
3195
3217
|
</symbol>
|
|
3196
|
-
`,
|
|
3218
|
+
`, Pa = `
|
|
3197
3219
|
<style>
|
|
3198
3220
|
.node rect, .node ellipse, .node polygon {
|
|
3199
3221
|
cursor: pointer;
|
|
@@ -3203,7 +3225,7 @@ const Aa = `
|
|
|
3203
3225
|
}
|
|
3204
3226
|
</style>
|
|
3205
3227
|
`;
|
|
3206
|
-
function
|
|
3228
|
+
function it(t, e, n) {
|
|
3207
3229
|
let r = "#000000", i = "#000000", a = "#000000";
|
|
3208
3230
|
e.forEach((o) => {
|
|
3209
3231
|
switch (o.op) {
|
|
@@ -3267,42 +3289,42 @@ function rt(t, e, n) {
|
|
|
3267
3289
|
}
|
|
3268
3290
|
});
|
|
3269
3291
|
}
|
|
3270
|
-
function
|
|
3292
|
+
function Ka(t, e, n = 14) {
|
|
3271
3293
|
var y;
|
|
3272
3294
|
t.innerHTML = "";
|
|
3273
|
-
const r = ((y = e.bb) == null ? void 0 : y.split(",").map(Number)) ||
|
|
3274
|
-
o.append("defs").html(
|
|
3295
|
+
const r = ((y = e.bb) == null ? void 0 : y.split(",").map(Number)) || fn, [, , i, a] = r, o = Y(t).append("svg").attr("width", "100%").attr("height", "100%").attr("viewBox", `0 0 ${i} ${a}`);
|
|
3296
|
+
o.append("defs").html(Pa);
|
|
3275
3297
|
const c = o.append("g").attr("id", "graph0");
|
|
3276
3298
|
(e.objects || []).forEach((p) => {
|
|
3277
3299
|
const w = c.append("g").attr("class", "node").attr("id", p.name);
|
|
3278
|
-
p._draw_ &&
|
|
3300
|
+
p._draw_ && it(w, p._draw_, a), p._ldraw_ && it(w, p._ldraw_, a);
|
|
3279
3301
|
});
|
|
3280
3302
|
const l = e.edges || [];
|
|
3281
3303
|
l.forEach((p) => {
|
|
3282
3304
|
const w = c.append("g").attr("class", "edge").attr("id", `edge_${p._gvid}`);
|
|
3283
|
-
p._draw_ &&
|
|
3305
|
+
p._draw_ && it(w, p._draw_, a), p._hdraw_ && it(w, p._hdraw_, a), p._tdraw_ && it(w, p._tdraw_, a), p._ldraw_ && it(w, p._ldraw_, a);
|
|
3284
3306
|
});
|
|
3285
|
-
const u =
|
|
3307
|
+
const u = an().scaleExtent([0.1, 10]).on("zoom", (p) => {
|
|
3286
3308
|
c.attr("transform", p.transform.toString());
|
|
3287
3309
|
});
|
|
3288
3310
|
o.call(u);
|
|
3289
|
-
const f = t.clientWidth ||
|
|
3311
|
+
const f = t.clientWidth || un, h = n * (f / i), g = l.filter((p) => {
|
|
3290
3312
|
if (!p.label) return !1;
|
|
3291
3313
|
try {
|
|
3292
|
-
const w =
|
|
3314
|
+
const w = Ct(p.label);
|
|
3293
3315
|
return (w == null ? void 0 : w.index) !== void 0;
|
|
3294
3316
|
} catch {
|
|
3295
3317
|
return !1;
|
|
3296
3318
|
}
|
|
3297
3319
|
}).map((p) => {
|
|
3298
|
-
var
|
|
3299
|
-
const w =
|
|
3320
|
+
var E;
|
|
3321
|
+
const w = Ct(p.label);
|
|
3300
3322
|
return {
|
|
3301
3323
|
id: p._gvid,
|
|
3302
3324
|
index: w.index,
|
|
3303
3325
|
sourceNodeId: String(p.tail ?? ""),
|
|
3304
3326
|
targetNodeId: String(p.head ?? ""),
|
|
3305
|
-
label: ((
|
|
3327
|
+
label: ((E = w.elems) == null ? void 0 : E.map((S) => S.text).join(" ")) || null
|
|
3306
3328
|
};
|
|
3307
3329
|
}).sort((p, w) => p.index - w.index), m = o.node(), x = c.node();
|
|
3308
3330
|
if (!m || !x)
|
|
@@ -3316,62 +3338,62 @@ function Ga(t, e, n = 14) {
|
|
|
3316
3338
|
edges: g
|
|
3317
3339
|
};
|
|
3318
3340
|
}
|
|
3319
|
-
const
|
|
3320
|
-
function
|
|
3321
|
-
const i = (t.clientWidth ||
|
|
3322
|
-
return Math.max(
|
|
3341
|
+
const Ya = "data-label-center-x", za = "data-label-center-y";
|
|
3342
|
+
function Ra(t, e, n) {
|
|
3343
|
+
const i = (t.clientWidth || un) / e, a = ea / (n * i);
|
|
3344
|
+
return Math.max(na, a);
|
|
3323
3345
|
}
|
|
3324
|
-
function
|
|
3346
|
+
function La(t, e, n, r) {
|
|
3325
3347
|
if (e.initialTransform)
|
|
3326
3348
|
return e.initialTransform;
|
|
3327
3349
|
if (e.headless) {
|
|
3328
|
-
const l =
|
|
3350
|
+
const l = ee;
|
|
3329
3351
|
return {
|
|
3330
3352
|
x: n / 2 - n / 2 * l,
|
|
3331
3353
|
y: r / 2 - r / 2 * l,
|
|
3332
3354
|
k: l
|
|
3333
3355
|
};
|
|
3334
3356
|
}
|
|
3335
|
-
const i = t.node(), a = i ? i.getBBox() : { x: 0, y: 0, width: n, height: r }, o =
|
|
3357
|
+
const i = t.node(), a = i ? i.getBBox() : { x: 0, y: 0, width: n, height: r }, o = ee * n / a.width, c = a.x + a.width / 2, s = a.y + a.height / 2;
|
|
3336
3358
|
return {
|
|
3337
3359
|
x: n / 2 - c * o,
|
|
3338
3360
|
y: r / 2 - s * o,
|
|
3339
3361
|
k: o
|
|
3340
3362
|
};
|
|
3341
3363
|
}
|
|
3342
|
-
function
|
|
3343
|
-
return
|
|
3364
|
+
function Qa(t, e) {
|
|
3365
|
+
return ee * t / e;
|
|
3344
3366
|
}
|
|
3345
|
-
function
|
|
3367
|
+
function Ja(t, e, n) {
|
|
3346
3368
|
const r = e / n;
|
|
3347
|
-
return
|
|
3369
|
+
return ta / (t * r);
|
|
3348
3370
|
}
|
|
3349
|
-
function
|
|
3350
|
-
return
|
|
3371
|
+
function Oa(t, e, n, r) {
|
|
3372
|
+
return an().scaleExtent([0.1, Ra(e, n, r)]).on("zoom", (i) => {
|
|
3351
3373
|
const a = i.transform;
|
|
3352
3374
|
!isNaN(a.x) && !isNaN(a.y) && !isNaN(a.k) && t.attr("transform", a.toString());
|
|
3353
3375
|
});
|
|
3354
3376
|
}
|
|
3355
|
-
function
|
|
3377
|
+
function Ba(t, e) {
|
|
3356
3378
|
t.on("mouseenter", function() {
|
|
3357
|
-
|
|
3358
|
-
const n =
|
|
3379
|
+
Y(this).raise();
|
|
3380
|
+
const n = Y(this).select(".arrow-group");
|
|
3359
3381
|
if (!n.empty()) {
|
|
3360
3382
|
const s = n.attr("data-base-transform") || "";
|
|
3361
3383
|
n.attr("transform", s + " scale(1.3)");
|
|
3362
3384
|
}
|
|
3363
|
-
const r = e.select(".edge.selected").size() > 0, i =
|
|
3364
|
-
r && !i ? (
|
|
3365
|
-
const s =
|
|
3366
|
-
(s === a || s === o) &&
|
|
3385
|
+
const r = e.select(".edge.selected").size() > 0, i = Y(this).classed("selected"), a = Y(this).attr("data-source-node-id"), o = Y(this).attr("data-target-node-id"), c = Y(this).attr("id");
|
|
3386
|
+
r && !i ? (Y(this).classed("hover-highlight", !0), e.selectAll(".node").each(function() {
|
|
3387
|
+
const s = Y(this).attr("data-node-id");
|
|
3388
|
+
(s === a || s === o) && Y(this).classed("hover-highlight", !0);
|
|
3367
3389
|
})) : (e.selectAll(".edge").each(function() {
|
|
3368
|
-
|
|
3390
|
+
Y(this).attr("id") !== c && Y(this).classed("dimmed", !0);
|
|
3369
3391
|
}), e.selectAll(".node").each(function() {
|
|
3370
|
-
const s =
|
|
3371
|
-
s !== a && s !== o &&
|
|
3392
|
+
const s = Y(this).attr("data-node-id");
|
|
3393
|
+
s !== a && s !== o && Y(this).classed("dimmed", !0);
|
|
3372
3394
|
}));
|
|
3373
3395
|
}).on("mouseleave", function() {
|
|
3374
|
-
const n =
|
|
3396
|
+
const n = Y(this).select(".arrow-group");
|
|
3375
3397
|
if (!n.empty()) {
|
|
3376
3398
|
const r = n.attr("data-base-transform") || "";
|
|
3377
3399
|
n.attr("transform", r);
|
|
@@ -3379,29 +3401,39 @@ function za(t, e) {
|
|
|
3379
3401
|
e.selectAll(".edge.hover-highlight").classed("hover-highlight", !1), e.selectAll(".node.hover-highlight").classed("hover-highlight", !1), e.selectAll(".edge.dimmed").classed("dimmed", !1), e.selectAll(".node.dimmed").classed("dimmed", !1);
|
|
3380
3402
|
});
|
|
3381
3403
|
}
|
|
3382
|
-
function
|
|
3404
|
+
function Ha(t, e, n, r, i, a, o) {
|
|
3383
3405
|
if (e && e.length > 0) {
|
|
3384
|
-
const f = e.map((m) => {
|
|
3385
|
-
const x = m.text.length *
|
|
3406
|
+
const c = o * 0.62, s = 1, l = 0, u = 2, f = e.map((m) => {
|
|
3407
|
+
const x = m.text.length * c, y = m.background && m.background !== "transparent", p = x + s * 2;
|
|
3386
3408
|
return { textWidth: x, hasBackground: y, totalWidth: p };
|
|
3387
|
-
}), h = f.reduce((m, x, y) => m + x.totalWidth + (y > 0
|
|
3409
|
+
}), h = f.reduce((m, x, y) => m + x.totalWidth + (y > 0 ? l : 0), 0);
|
|
3388
3410
|
let g = n - h / 2;
|
|
3389
3411
|
e.forEach((m, x) => {
|
|
3390
3412
|
const y = f[x];
|
|
3391
|
-
x > 0 && (g +=
|
|
3413
|
+
x > 0 && (g += l), y.hasBackground && t.append("rect").attr("class", "label-elem-bg").attr("x", g).attr("y", r - o / 2 - u).attr("width", y.totalWidth).attr("height", o + u * 2).attr("rx", 2).attr("ry", 2).attr("fill", m.background).style("pointer-events", "none"), t.append("text").attr("class", "label-text-elem").attr("x", g + s).attr("y", r).attr("text-anchor", "start").attr("dominant-baseline", "middle").attr("font-family", "Inter, Helvetica, Arial").attr("font-size", o + "px").attr("font-weight", "500").attr("fill", m.color && m.color.length > 0 ? m.color : i).style("pointer-events", "none").text(m.text), g += y.totalWidth;
|
|
3392
3414
|
});
|
|
3393
3415
|
} else
|
|
3394
|
-
t.append("text").attr("class", "label-text").attr("x", n).attr("y", r).attr("text-anchor", "middle").attr("dominant-baseline", "middle").attr("font-family", "Inter, Helvetica, Arial").attr("font-size", "
|
|
3395
|
-
}
|
|
3396
|
-
function
|
|
3397
|
-
const { edge: e, edgeGroup: n, labelMidpoint: r, edgeColor: i, isSelected: a, ctx: o } = t, { config: c, onEdgeSelect: s,
|
|
3398
|
-
|
|
3399
|
-
const
|
|
3400
|
-
|
|
3401
|
-
|
|
3402
|
-
}),
|
|
3416
|
+
t.append("text").attr("class", "label-text").attr("x", n).attr("y", r).attr("text-anchor", "middle").attr("dominant-baseline", "middle").attr("font-family", "Inter, Helvetica, Arial").attr("font-size", o + "px").attr("font-weight", "500").attr("fill", i).style("pointer-events", "none").text(a);
|
|
3417
|
+
}
|
|
3418
|
+
function Fa(t) {
|
|
3419
|
+
const { edge: e, edgeGroup: n, labelMidpoint: r, edgeColor: i, isSelected: a, ctx: o } = t, { config: c, onEdgeSelect: s, onEdgeLabelClick: l, debug: u } = o, { displayElems: f, finalText: h, boxWidth: g, boxHeight: m } = mn(e, c, o.edgeCount), x = e.edgeIndex !== void 0, y = g, p = m, w = r.y, E = r.x, S = n.append("g").attr("class", "label-area");
|
|
3420
|
+
S.append("rect").attr("class", "label-bg").attr("x", E - y / 2).attr("y", w - p / 2).attr("width", y).attr("height", p).attr("rx", 5).attr("ry", 5).attr("fill", "var(--bg-primary, #fff)").attr("stroke", "var(--border-tertiary, #F2F2F3)").attr("stroke-width", 1.5);
|
|
3421
|
+
const $ = E;
|
|
3422
|
+
x && s && n.style("cursor", "pointer").on("click", function(v) {
|
|
3423
|
+
v.stopPropagation(), !a && s(e.edgeIndex);
|
|
3424
|
+
}), x && l && S.on("click", function(v) {
|
|
3425
|
+
v.stopPropagation(), l(e.edgeIndex);
|
|
3426
|
+
}), Ha(
|
|
3427
|
+
S,
|
|
3428
|
+
f,
|
|
3429
|
+
$,
|
|
3430
|
+
w,
|
|
3431
|
+
i,
|
|
3432
|
+
h,
|
|
3433
|
+
c.labelFontSize
|
|
3434
|
+
), u && n.append("circle").attr("cx", r.x).attr("cy", r.y).attr("r", 4).attr("fill", "blue").attr("opacity", 0.8).style("pointer-events", "none").attr("class", "debug-label-center");
|
|
3403
3435
|
}
|
|
3404
|
-
function
|
|
3436
|
+
function Wa(t, e, n) {
|
|
3405
3437
|
e._ldraw_.forEach((r) => {
|
|
3406
3438
|
if (r.op === "T" && r.text) {
|
|
3407
3439
|
const i = r.size || 10, a = i * 0.6, o = r.text.length * a, c = i, s = 6, l = o + s * 2, u = c + s * 2, f = 4, h = n.y;
|
|
@@ -3409,7 +3441,7 @@ function La(t, e, n) {
|
|
|
3409
3441
|
}
|
|
3410
3442
|
});
|
|
3411
3443
|
}
|
|
3412
|
-
function
|
|
3444
|
+
function Ga(t, e, n) {
|
|
3413
3445
|
e._draw_ && e._draw_.forEach((r) => {
|
|
3414
3446
|
if (r.op === "b" && r.points) {
|
|
3415
3447
|
const i = r.points.map(([o, c]) => [o, n - c]), a = `M${i[0][0]},${i[0][1]} C${i.slice(1).map((o) => `${o[0]},${o[1]}`).join(" ")}`;
|
|
@@ -3420,19 +3452,19 @@ function Ba(t, e, n) {
|
|
|
3420
3452
|
const i = r.points.map(([a, o]) => [a, n - o]);
|
|
3421
3453
|
t.append("polygon").attr("points", i.map((a) => a.join(",")).join(" ")).attr("fill", r.color || "#9AA4B2");
|
|
3422
3454
|
}
|
|
3423
|
-
}), e._ldraw_ &&
|
|
3455
|
+
}), e._ldraw_ && it(t, e._ldraw_, n);
|
|
3424
3456
|
}
|
|
3425
|
-
function
|
|
3426
|
-
var C,
|
|
3427
|
-
const { g: n, height: r, config: i, useOrthogonalRendering: a, selectedEdgeId: o, debug: c } = e, s = o != null && t.edgeIndex === o, l = t.getColor(), u = n.append("g").attr("class", s ? "edge selected" : "edge").attr("id", `edge_${t._gvid}`).attr("data-edge-id", t.edgeIndex !== void 0 ? String(t.edgeIndex) : "").attr("data-is-base", t.isBaseEdge ? "true" : "false").attr("data-color", l).attr("data-source-node-id", ((C = t.sourceNode) == null ? void 0 : C.name) || "").attr("data-target-node-id", ((
|
|
3457
|
+
function Va(t, e) {
|
|
3458
|
+
var C, L;
|
|
3459
|
+
const { g: n, height: r, config: i, useOrthogonalRendering: a, selectedEdgeId: o, debug: c } = e, s = o != null && t.edgeIndex === o, l = t.getColor(), u = n.append("g").attr("class", s ? "edge selected" : "edge").attr("id", `edge_${t._gvid}`).attr("data-edge-id", t.edgeIndex !== void 0 ? String(t.edgeIndex) : "").attr("data-is-base", t.isBaseEdge ? "true" : "false").attr("data-color", l).attr("data-source-node-id", ((C = t.sourceNode) == null ? void 0 : C.name) || "").attr("data-target-node-id", ((L = t.targetNode) == null ? void 0 : L.name) || "").attr("style", `--edge-color: ${l}`), f = t.getStartPoint(), h = t.getEndPoint(), g = t.getDirection(), m = i.arrowWidth;
|
|
3428
3460
|
if (!(f && h && g)) {
|
|
3429
|
-
|
|
3461
|
+
Ga(u, t, r);
|
|
3430
3462
|
return;
|
|
3431
3463
|
}
|
|
3432
3464
|
const x = { x: f.x, y: r - f.y }, y = { x: h.x, y: r - h.y }, p = { x: y.x, y: y.y };
|
|
3433
3465
|
let w = { x: y.x, y: y.y };
|
|
3434
3466
|
g === "right" ? w = { x: y.x - m, y: y.y } : g === "left" ? w = { x: y.x + m, y: y.y } : g === "self" && (w = { x: y.x + m, y: y.y });
|
|
3435
|
-
const
|
|
3467
|
+
const E = ma(
|
|
3436
3468
|
t,
|
|
3437
3469
|
g,
|
|
3438
3470
|
x,
|
|
@@ -3440,59 +3472,67 @@ function Ha(t, e) {
|
|
|
3440
3472
|
r,
|
|
3441
3473
|
i,
|
|
3442
3474
|
a
|
|
3443
|
-
),
|
|
3444
|
-
u.append("path").attr("d",
|
|
3445
|
-
const
|
|
3446
|
-
let
|
|
3447
|
-
g === "right" ?
|
|
3475
|
+
), S = c && t.isBaseEdge ? "#000000" : t.getColor(), $ = c && t.isBaseEdge ? 4 : 1.5;
|
|
3476
|
+
u.append("path").attr("d", E).attr("fill", "none").attr("stroke", "transparent").attr("stroke-width", 10).attr("class", "edge-hit-area").style("cursor", "pointer"), u.append("path").attr("d", E).attr("fill", "none").attr("stroke", S).attr("stroke-width", $).attr("class", "edge-path").style("pointer-events", "none"), Ba(u, n);
|
|
3477
|
+
const v = 12;
|
|
3478
|
+
let k = "";
|
|
3479
|
+
g === "right" ? k = `translate(${p.x - v / 2}, ${p.y})` : g === "left" ? k = `translate(${p.x + v / 2}, ${p.y}) rotate(180)` : g === "self" && (k = `translate(${p.x + v / 2}, ${p.y}) rotate(180)`), u.append("g").attr("class", "arrow-group").attr("transform", k).attr("data-base-transform", k).append("use").attr("class", "edge-arrow").attr("href", "#arrow-right").attr("width", v).attr("height", v).attr("x", -v / 2).attr("y", -v / 2).attr("fill", S).attr("stroke", S).style("stroke-width", 0);
|
|
3448
3480
|
const D = {
|
|
3449
3481
|
x: (x.x + y.x) / 2,
|
|
3450
3482
|
y: t.midY
|
|
3451
3483
|
};
|
|
3452
|
-
if (u.attr(
|
|
3484
|
+
if (u.attr(Ya, D.x).attr(za, D.y), t.label ? Fa({
|
|
3453
3485
|
edge: t,
|
|
3454
3486
|
edgeGroup: u,
|
|
3455
3487
|
labelMidpoint: D,
|
|
3456
|
-
edgeColor:
|
|
3488
|
+
edgeColor: S,
|
|
3457
3489
|
isSelected: s,
|
|
3458
3490
|
ctx: e
|
|
3459
|
-
}) : t._ldraw_ &&
|
|
3491
|
+
}) : t._ldraw_ && Wa(u, t, D), c) {
|
|
3460
3492
|
let B;
|
|
3461
3493
|
t.depth === 0 ? B = `d:0 dir:${t.baseDirection || "base"} off:${t.baseOffset} id:${t._gvid}` : B = `d:${t.depth} dir:${t.baseDirection || "?"} midY:${Math.round(t.midY)} id:${t._gvid}`, u.append("text").attr("x", D.x).attr("y", D.y + 15).attr("text-anchor", "middle").attr("dominant-baseline", "middle").attr("font-family", "monospace").attr("font-size", "9px").attr("fill", "#999").text(B);
|
|
3462
3494
|
}
|
|
3463
3495
|
}
|
|
3464
|
-
function
|
|
3496
|
+
function Xa(t) {
|
|
3465
3497
|
const e = t.node();
|
|
3466
3498
|
if (!e) return;
|
|
3467
3499
|
const n = e.getBBox(), r = n.x + n.width / 2, i = n.y + n.height / 2;
|
|
3468
3500
|
t.append("rect").attr("x", n.x).attr("y", n.y).attr("width", n.width).attr("height", n.height).attr("fill", "none").attr("stroke", "yellow").attr("stroke-width", 3).attr("opacity", 0.8).style("pointer-events", "none").attr("class", "debug-root-border"), t.append("circle").attr("cx", r).attr("cy", i).attr("r", 10).attr("fill", "yellow").attr("stroke", "orange").attr("stroke-width", 2).attr("opacity", 0.9).style("pointer-events", "none").attr("class", "debug-geometric-center");
|
|
3469
3501
|
}
|
|
3470
|
-
function
|
|
3502
|
+
function qa(t, e, n) {
|
|
3471
3503
|
const r = Math.max(e, n) * 3e-3;
|
|
3472
3504
|
t.append("circle").attr("cx", e / 2).attr("cy", n / 2).attr("r", r).attr("fill", "red").attr("opacity", 0.9).style("pointer-events", "none").attr("class", "debug-center-marker");
|
|
3473
3505
|
}
|
|
3474
|
-
function
|
|
3506
|
+
function ja(t = {}) {
|
|
3475
3507
|
return {
|
|
3476
3508
|
nodeMapping: {},
|
|
3477
3509
|
maxDepth: null,
|
|
3478
3510
|
includeLesserDepths: !0,
|
|
3479
|
-
config:
|
|
3511
|
+
config: ga(),
|
|
3480
3512
|
useOrthogonalRendering: !0,
|
|
3481
3513
|
svgFontSize: 14,
|
|
3482
3514
|
debug: !1,
|
|
3483
3515
|
selectedEdgeId: null,
|
|
3484
3516
|
onEdgeSelect: void 0,
|
|
3485
|
-
|
|
3486
|
-
|
|
3517
|
+
onEdgeLabelClick: void 0,
|
|
3518
|
+
nodeWidth: Uo,
|
|
3519
|
+
nodeHeight: Zo,
|
|
3487
3520
|
nodeColumnSpacing: null,
|
|
3488
3521
|
enableWheelZoom: !0,
|
|
3489
3522
|
headless: !1,
|
|
3490
3523
|
initialTransform: void 0,
|
|
3524
|
+
chainIcon: void 0,
|
|
3491
3525
|
...t
|
|
3492
3526
|
};
|
|
3493
3527
|
}
|
|
3494
|
-
function Ua(t
|
|
3495
|
-
|
|
3528
|
+
function Ua(t) {
|
|
3529
|
+
return t.replace(/<svg\b([^>]*)>/i, (e, n) => {
|
|
3530
|
+
const r = n.replace(/\s+(width|height|id)="[^"]*"/gi, "");
|
|
3531
|
+
return `<svg id="${cn}" width="${_t}" height="${_t}"${r}>`;
|
|
3532
|
+
});
|
|
3533
|
+
}
|
|
3534
|
+
function ts(t, e, n) {
|
|
3535
|
+
var z;
|
|
3496
3536
|
const {
|
|
3497
3537
|
maxDepth: r,
|
|
3498
3538
|
includeLesserDepths: i,
|
|
@@ -3502,85 +3542,88 @@ function Ua(t, e, n) {
|
|
|
3502
3542
|
debug: s,
|
|
3503
3543
|
selectedEdgeId: l,
|
|
3504
3544
|
onEdgeSelect: u,
|
|
3505
|
-
|
|
3506
|
-
|
|
3507
|
-
|
|
3508
|
-
|
|
3509
|
-
|
|
3545
|
+
onEdgeLabelClick: f,
|
|
3546
|
+
nodeWidth: h,
|
|
3547
|
+
nodeHeight: g,
|
|
3548
|
+
nodeColumnSpacing: m,
|
|
3549
|
+
enableWheelZoom: x,
|
|
3550
|
+
headless: y,
|
|
3551
|
+
chainIcon: p
|
|
3510
3552
|
} = n;
|
|
3511
3553
|
t.innerHTML = "";
|
|
3512
|
-
const
|
|
3513
|
-
let
|
|
3514
|
-
const
|
|
3515
|
-
|
|
3516
|
-
const
|
|
3517
|
-
|
|
3518
|
-
|
|
3519
|
-
),
|
|
3520
|
-
|
|
3521
|
-
const
|
|
3522
|
-
|
|
3554
|
+
const w = ((z = e.bb) == null ? void 0 : z.split(",").map(Number)) || fn, [, , E, S] = w;
|
|
3555
|
+
let $ = E;
|
|
3556
|
+
const v = S, k = Y(t).append("svg").attr("width", "100%").attr("height", "100%").attr("viewBox", `0 0 ${$} ${v}`);
|
|
3557
|
+
k.append("defs").html(Da + (p ? Ua(p) : ""));
|
|
3558
|
+
const M = k.append("g").attr("id", "graph0"), { nodes: D, edges: C } = $a(e, h, g), { nodeColumnMap: L, nodeColumns: B, edgeColumns: G } = ba(
|
|
3559
|
+
D,
|
|
3560
|
+
C
|
|
3561
|
+
), d = C.length, N = m ?? ka(D, C, a, d);
|
|
3562
|
+
$ = Sa(B, v, N), k.attr("viewBox", `0 0 ${$} ${v}`), Ma(M, B, v, s, p !== void 0), o && (Ea(B, v), Na(C, G), ya(G, B, L, v, a));
|
|
3563
|
+
const _ = Oa(M, t, $, c);
|
|
3564
|
+
y || k.call(_), !y && !x && (k.on("wheel.zoom", null), k.on("dblclick.zoom", null)), C.forEach((R) => {
|
|
3523
3565
|
if (r !== null) {
|
|
3524
3566
|
if (i) {
|
|
3525
|
-
if (
|
|
3526
|
-
} else if (
|
|
3567
|
+
if (R.depth > r) return;
|
|
3568
|
+
} else if (R.depth !== r) return;
|
|
3527
3569
|
}
|
|
3528
|
-
|
|
3529
|
-
g:
|
|
3530
|
-
height:
|
|
3570
|
+
Va(R, {
|
|
3571
|
+
g: M,
|
|
3572
|
+
height: v,
|
|
3531
3573
|
config: a,
|
|
3532
3574
|
useOrthogonalRendering: o,
|
|
3533
|
-
zoomBehavior:
|
|
3534
|
-
svgSelection:
|
|
3575
|
+
zoomBehavior: _,
|
|
3576
|
+
svgSelection: k,
|
|
3535
3577
|
container: t,
|
|
3536
|
-
svgWidth:
|
|
3537
|
-
svgHeight:
|
|
3578
|
+
svgWidth: $,
|
|
3579
|
+
svgHeight: v,
|
|
3538
3580
|
selectedEdgeId: l,
|
|
3539
3581
|
onEdgeSelect: u,
|
|
3582
|
+
onEdgeLabelClick: f,
|
|
3540
3583
|
debug: s,
|
|
3541
|
-
edgeCount:
|
|
3584
|
+
edgeCount: d
|
|
3542
3585
|
});
|
|
3543
|
-
}), s &&
|
|
3544
|
-
const
|
|
3545
|
-
|
|
3546
|
-
|
|
3547
|
-
Ht.translate(
|
|
3548
|
-
), s &&
|
|
3549
|
-
const
|
|
3550
|
-
var
|
|
3586
|
+
}), s && Xa(M);
|
|
3587
|
+
const b = La(M, n, $, v), A = `translate(${b.x},${b.y}) scale(${b.k})`;
|
|
3588
|
+
y ? M.attr("transform", A) : k.call(
|
|
3589
|
+
_.transform,
|
|
3590
|
+
Ht.translate(b.x, b.y).scale(b.k)
|
|
3591
|
+
), s && qa(k, $, v);
|
|
3592
|
+
const I = C.filter((R) => R.edgeIndex !== void 0).map((R) => {
|
|
3593
|
+
var O, H;
|
|
3551
3594
|
return {
|
|
3552
|
-
id:
|
|
3553
|
-
index:
|
|
3554
|
-
sourceNodeId: ((
|
|
3555
|
-
targetNodeId: ((
|
|
3556
|
-
label:
|
|
3595
|
+
id: R._gvid,
|
|
3596
|
+
index: R.edgeIndex,
|
|
3597
|
+
sourceNodeId: ((O = R.sourceNode) == null ? void 0 : O.name) || "",
|
|
3598
|
+
targetNodeId: ((H = R.targetNode) == null ? void 0 : H.name) || "",
|
|
3599
|
+
label: R.getLabelText()
|
|
3557
3600
|
};
|
|
3558
|
-
}).sort((
|
|
3559
|
-
if (!
|
|
3601
|
+
}).sort((R, O) => R.index - O.index), T = k.node(), P = M.node();
|
|
3602
|
+
if (!T || !P)
|
|
3560
3603
|
throw new Error("Failed to construct SVG elements");
|
|
3561
3604
|
return {
|
|
3562
|
-
zoomBehavior:
|
|
3563
|
-
svgElement:
|
|
3564
|
-
gElement:
|
|
3605
|
+
zoomBehavior: _,
|
|
3606
|
+
svgElement: T,
|
|
3607
|
+
gElement: P,
|
|
3565
3608
|
baseFontSize: c,
|
|
3566
|
-
viewBoxWidth:
|
|
3567
|
-
edges:
|
|
3568
|
-
initialTransform:
|
|
3609
|
+
viewBoxWidth: $,
|
|
3610
|
+
edges: I,
|
|
3611
|
+
initialTransform: b
|
|
3569
3612
|
};
|
|
3570
3613
|
}
|
|
3571
3614
|
export {
|
|
3572
|
-
|
|
3573
|
-
|
|
3574
|
-
|
|
3575
|
-
|
|
3576
|
-
|
|
3577
|
-
|
|
3578
|
-
|
|
3579
|
-
|
|
3580
|
-
|
|
3615
|
+
Uo as D,
|
|
3616
|
+
Qa as a,
|
|
3617
|
+
ts as b,
|
|
3618
|
+
Ja as c,
|
|
3619
|
+
ja as d,
|
|
3620
|
+
Zo as e,
|
|
3621
|
+
Za as f,
|
|
3622
|
+
Ct as g,
|
|
3623
|
+
ga as h,
|
|
3581
3624
|
Ht as i,
|
|
3582
|
-
|
|
3583
|
-
|
|
3584
|
-
|
|
3585
|
-
|
|
3625
|
+
yn as j,
|
|
3626
|
+
Ka as r,
|
|
3627
|
+
Y as s,
|
|
3628
|
+
Fo as t
|
|
3586
3629
|
};
|