@zjlab-frontier/markdown 1.0.15 → 1.0.17
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/{arc-BDq_UErm.mjs → arc-BjPzcPGr.mjs} +1 -1
- package/dist/{blockDiagram-c4efeb88-CDyIdbtK.mjs → blockDiagram-c4efeb88-CF7cv0po.mjs} +5 -5
- package/dist/{c4Diagram-c83219d4-DXQI8rSn.mjs → c4Diagram-c83219d4-BERRbSr-.mjs} +2 -2
- package/dist/{channel-mrMpJpdh.mjs → channel-CyPkXXxC.mjs} +1 -1
- package/dist/{classDiagram-beda092f-DF5PP90H.mjs → classDiagram-beda092f-BjoXUQBq.mjs} +5 -5
- package/dist/{classDiagram-v2-2358418a-2KOhq15N.mjs → classDiagram-v2-2358418a-D6QjfH_7.mjs} +5 -5
- package/dist/{clone-CPLr1RMr.mjs → clone-DX5vJwAT.mjs} +1 -1
- package/dist/{createText-1719965b-BCSzEdi6.mjs → createText-1719965b-CMA05nPn.mjs} +1 -1
- package/dist/{edges-96097737-CSR-2StN.mjs → edges-96097737-DDCADa6_.mjs} +3 -3
- package/dist/{erDiagram-0228fc6a-DHkqubvF.mjs → erDiagram-0228fc6a-DovQSTYk.mjs} +4 -4
- package/dist/{flowDb-c6c81e3f-ClBL6Z4y.mjs → flowDb-c6c81e3f-CRG2IrpR.mjs} +1 -1
- package/dist/{flowDiagram-50d868cf-D0QshpZ_.mjs → flowDiagram-50d868cf-CfwPCnST.mjs} +6 -6
- package/dist/{flowDiagram-v2-4f6560a1-BgkWR5z0.mjs → flowDiagram-v2-4f6560a1-CUOqo5JF.mjs} +5 -5
- package/dist/{flowchart-elk-definition-6af322e1-mbKzokm0.mjs → flowchart-elk-definition-6af322e1-1BgZl9nw.mjs} +4 -4
- package/dist/{ganttDiagram-a2739b55-CJB6oR5Z.mjs → ganttDiagram-a2739b55-BR4CPr9q.mjs} +40 -40
- package/dist/{gitGraphDiagram-82fe8481-DE5yHrtf.mjs → gitGraphDiagram-82fe8481-CITiUTqP.mjs} +1 -1
- package/dist/{graph-4HSTUhTa.mjs → graph-C23uBOqf.mjs} +1 -1
- package/dist/{index-5325376f-CaGR1iTQ.mjs → index-5325376f-CVwQyG0O.mjs} +6 -6
- package/dist/{index-DMbKvIFW.mjs → index-CH7DSWtv.mjs} +13170 -12968
- package/dist/index.es.js +10 -0
- package/dist/index.umd.js +234 -279
- package/dist/{infoDiagram-8eee0895-D1xUBhdr.mjs → infoDiagram-8eee0895-D0JcV5UO.mjs} +1 -1
- package/dist/{journeyDiagram-c64418c1-CGck4bFe.mjs → journeyDiagram-c64418c1-Bzjja0DB.mjs} +3 -3
- package/dist/{layout-C08K7-fX.mjs → layout-BZWe5gOt.mjs} +2 -2
- package/dist/{line-amr281ap.mjs → line-oDxIWdFG.mjs} +1 -1
- package/dist/{linear-tZvsdWna.mjs → linear-BZpz6DKS.mjs} +1 -1
- package/dist/markdown.d.ts +2 -2
- package/dist/{mindmap-definition-8da855dc-DiV2EEVh.mjs → mindmap-definition-8da855dc-Bj7bvLcz.mjs} +574 -588
- package/dist/{pieDiagram-a8764435-TCzfl67x.mjs → pieDiagram-a8764435-DqrpmRdi.mjs} +2 -2
- package/dist/{quadrantDiagram-1e28029f-nOzgOPva.mjs → quadrantDiagram-1e28029f-CCKVF-eC.mjs} +2 -2
- package/dist/{requirementDiagram-08caed73-DRzKZ5sJ.mjs → requirementDiagram-08caed73-C6ZYcPpl.mjs} +4 -4
- package/dist/{sankeyDiagram-a04cb91d-vyP3B38N.mjs → sankeyDiagram-a04cb91d-CvRSHP-3.mjs} +1 -1
- package/dist/{sequenceDiagram-c5b8d532-C_--pF1U.mjs → sequenceDiagram-c5b8d532-CJyRPy1h.mjs} +2 -2
- package/dist/{stateDiagram-1ecb1508-DTnEWYWE.mjs → stateDiagram-1ecb1508-B9wNYQ-E.mjs} +5 -5
- package/dist/{stateDiagram-v2-c2b004d7-Dk46LZKI.mjs → stateDiagram-v2-c2b004d7-CGXJVMqB.mjs} +5 -5
- package/dist/{styles-b4e223ce-0kkfIfCC.mjs → styles-b4e223ce-C-yG_-rk.mjs} +1 -1
- package/dist/{styles-ca3715f6-BeH-56XZ.mjs → styles-ca3715f6-DAbEM90t.mjs} +1 -1
- package/dist/{styles-d45a18b0-CKtnslBQ.mjs → styles-d45a18b0-d-wy3dve.mjs} +4 -4
- package/dist/{svgDrawCommon-b86b1483-9Un5LUnq.mjs → svgDrawCommon-b86b1483-BEcVAilx.mjs} +1 -1
- package/dist/{timeline-definition-faaaa080-BexB9fva.mjs → timeline-definition-faaaa080-CHG25BHg.mjs} +2 -2
- package/dist/{xychartDiagram-f5964ef8-CDxBXpgi.mjs → xychartDiagram-f5964ef8-CIHgxdZJ.mjs} +4 -4
- package/package.json +11 -14
- package/dist/index.css +0 -1
- package/dist/index.mjs +0 -9
- package/dist/styles/highlight.scss +0 -107
- package/dist/styles/markdown.scss +0 -1169
- package/dist/vite.config.d.ts +0 -2
package/dist/{mindmap-definition-8da855dc-DiV2EEVh.mjs → mindmap-definition-8da855dc-Bj7bvLcz.mjs}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { P as yv, l as Nr, ar as mv, as as bv, at as wv, g as ao, T as Ev, o as xv, X as Cn, i as Dn, d as Tv, W as Cv } from "./index-
|
|
2
|
-
import { a as Dv } from "./createText-1719965b-
|
|
1
|
+
import { P as yv, l as Nr, ar as mv, as as bv, at as wv, g as ao, T as Ev, o as xv, X as Cn, i as Dn, d as Tv, W as Cv } from "./index-CH7DSWtv.mjs";
|
|
2
|
+
import { a as Dv } from "./createText-1719965b-CMA05nPn.mjs";
|
|
3
3
|
function Bs(t, e) {
|
|
4
4
|
(e == null || e > t.length) && (e = t.length);
|
|
5
5
|
for (var r = 0, a = Array(e); r < e; r++) a[r] = t[r];
|
|
@@ -151,10 +151,10 @@ var tt = typeof window > "u" ? null : window, No = tt ? tt.navigator : null;
|
|
|
151
151
|
tt && tt.document;
|
|
152
152
|
var kv = nt(""), gf = nt({}), Nv = nt(function() {
|
|
153
153
|
}), Bv = typeof HTMLElement > "u" ? "undefined" : nt(HTMLElement), Ba = function(e) {
|
|
154
|
-
return e && e.instanceString &&
|
|
154
|
+
return e && e.instanceString && He(e.instanceString) ? e.instanceString() : null;
|
|
155
155
|
}, ge = function(e) {
|
|
156
156
|
return e != null && nt(e) == kv;
|
|
157
|
-
},
|
|
157
|
+
}, He = function(e) {
|
|
158
158
|
return e != null && nt(e) === Nv;
|
|
159
159
|
}, Ve = function(e) {
|
|
160
160
|
return !Lt(e) && (Array.isArray ? Array.isArray(e) : e != null && e instanceof Array);
|
|
@@ -188,7 +188,7 @@ var kv = nt(""), gf = nt({}), Nv = nt(function() {
|
|
|
188
188
|
}, Vv = function(e) {
|
|
189
189
|
return Oe(e) && ne(e.x1) && ne(e.x2) && ne(e.y1) && ne(e.y2);
|
|
190
190
|
}, Uv = function(e) {
|
|
191
|
-
return Fv(e) &&
|
|
191
|
+
return Fv(e) && He(e.then);
|
|
192
192
|
}, qv = function() {
|
|
193
193
|
return No && No.userAgent.match(/msie|trident|edge/i);
|
|
194
194
|
}, ta = function(e, r) {
|
|
@@ -222,7 +222,7 @@ var kv = nt(""), gf = nt({}), Nv = nt(function() {
|
|
|
222
222
|
return fr(e) ? e : e.charAt(0).toUpperCase() + e.substring(1);
|
|
223
223
|
}, ir = function(e, r) {
|
|
224
224
|
return e.slice(-1 * r.length) === r;
|
|
225
|
-
}, at = "(?:[-+]?(?:(?:\\d+|\\d*\\.\\d+)(?:[Ee][+-]?\\d+)?))",
|
|
225
|
+
}, at = "(?:[-+]?(?:(?:\\d+|\\d*\\.\\d+)(?:[Ee][+-]?\\d+)?))", $v = "rgb[a]?\\((" + at + "[%]?)\\s*,\\s*(" + at + "[%]?)\\s*,\\s*(" + at + "[%]?)(?:\\s*,\\s*(" + at + "))?\\)", Yv = "rgb[a]?\\((?:" + at + "[%]?)\\s*,\\s*(?:" + at + "[%]?)\\s*,\\s*(?:" + at + "[%]?)(?:\\s*,\\s*(?:" + at + "))?\\)", Hv = "hsl[a]?\\((" + at + ")\\s*,\\s*(" + at + "[%])\\s*,\\s*(" + at + "[%])(?:\\s*,\\s*(" + at + "))?\\)", Xv = "hsl[a]?\\((?:" + at + ")\\s*,\\s*(?:" + at + "[%])\\s*,\\s*(?:" + at + "[%])(?:\\s*,\\s*(?:" + at + "))?\\)", Wv = "\\#[0-9a-fA-F]{3}", Kv = "\\#[0-9a-fA-F]{6}", bf = function(e, r) {
|
|
226
226
|
return e < r ? -1 : e > r ? 1 : 0;
|
|
227
227
|
}, Zv = function(e, r) {
|
|
228
228
|
return -1 * bf(e, r);
|
|
@@ -246,7 +246,7 @@ var kv = nt(""), gf = nt({}), Nv = nt(function() {
|
|
|
246
246
|
function f(d, p, g) {
|
|
247
247
|
return g < 0 && (g += 1), g > 1 && (g -= 1), g < 1 / 6 ? d + (p - d) * 6 * g : g < 1 / 2 ? p : g < 2 / 3 ? d + (p - d) * (2 / 3 - g) * 6 : d;
|
|
248
248
|
}
|
|
249
|
-
var c = new RegExp("^" +
|
|
249
|
+
var c = new RegExp("^" + Hv + "$").exec(e);
|
|
250
250
|
if (c) {
|
|
251
251
|
if (a = parseInt(c[1]), a < 0 ? a = (360 - -1 * a % 360) % 360 : a > 360 && (a = a % 360), a /= 360, n = parseFloat(c[2]), n < 0 || n > 100 || (n = n / 100, i = parseFloat(c[3]), i < 0 || i > 100) || (i = i / 100, s = c[4], s !== void 0 && (s = parseFloat(s), s < 0 || s > 1)))
|
|
252
252
|
return;
|
|
@@ -260,7 +260,7 @@ var kv = nt(""), gf = nt({}), Nv = nt(function() {
|
|
|
260
260
|
}
|
|
261
261
|
return r;
|
|
262
262
|
}, jv = function(e) {
|
|
263
|
-
var r, a = new RegExp("^" +
|
|
263
|
+
var r, a = new RegExp("^" + $v + "$").exec(e);
|
|
264
264
|
if (a) {
|
|
265
265
|
r = [];
|
|
266
266
|
for (var n = [], i = 1; i <= 3; i++) {
|
|
@@ -518,10 +518,10 @@ function oo() {
|
|
|
518
518
|
var t = Vn(), e = t.Symbol;
|
|
519
519
|
return vi = e, vi;
|
|
520
520
|
}
|
|
521
|
-
var hi,
|
|
521
|
+
var hi, $o;
|
|
522
522
|
function sh() {
|
|
523
|
-
if (
|
|
524
|
-
|
|
523
|
+
if ($o) return hi;
|
|
524
|
+
$o = 1;
|
|
525
525
|
var t = oo(), e = Object.prototype, r = e.hasOwnProperty, a = e.toString, n = t ? t.toStringTag : void 0;
|
|
526
526
|
function i(s) {
|
|
527
527
|
var o = r.call(s, n), u = s[n];
|
|
@@ -535,30 +535,30 @@ function sh() {
|
|
|
535
535
|
}
|
|
536
536
|
return hi = i, hi;
|
|
537
537
|
}
|
|
538
|
-
var di,
|
|
538
|
+
var di, Yo;
|
|
539
539
|
function oh() {
|
|
540
|
-
if (
|
|
541
|
-
|
|
540
|
+
if (Yo) return di;
|
|
541
|
+
Yo = 1;
|
|
542
542
|
var t = Object.prototype, e = t.toString;
|
|
543
543
|
function r(a) {
|
|
544
544
|
return e.call(a);
|
|
545
545
|
}
|
|
546
546
|
return di = r, di;
|
|
547
547
|
}
|
|
548
|
-
var gi,
|
|
548
|
+
var gi, Ho;
|
|
549
549
|
function Tf() {
|
|
550
|
-
if (
|
|
551
|
-
|
|
550
|
+
if (Ho) return gi;
|
|
551
|
+
Ho = 1;
|
|
552
552
|
var t = oo(), e = sh(), r = oh(), a = "[object Null]", n = "[object Undefined]", i = t ? t.toStringTag : void 0;
|
|
553
553
|
function s(o) {
|
|
554
554
|
return o == null ? o === void 0 ? n : a : i && i in Object(o) ? e(o) : r(o);
|
|
555
555
|
}
|
|
556
556
|
return gi = s, gi;
|
|
557
557
|
}
|
|
558
|
-
var pi,
|
|
558
|
+
var pi, Xo;
|
|
559
559
|
function uh() {
|
|
560
|
-
if (
|
|
561
|
-
|
|
560
|
+
if (Xo) return pi;
|
|
561
|
+
Xo = 1;
|
|
562
562
|
function t(e) {
|
|
563
563
|
return e != null && typeof e == "object";
|
|
564
564
|
}
|
|
@@ -680,7 +680,7 @@ var ch = fh(), Va = /* @__PURE__ */ _a(ch), wi = tt ? tt.performance : null, Cf
|
|
|
680
680
|
};
|
|
681
681
|
})(), Ln = function(e) {
|
|
682
682
|
return vh(e);
|
|
683
|
-
}, Qt = Cf, Ar = 9261, Df = 65599,
|
|
683
|
+
}, Qt = Cf, Ar = 9261, Df = 65599, Xr = 5381, Sf = function(e) {
|
|
684
684
|
for (var r = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : Ar, a = r, n; n = e.next(), !n.done; )
|
|
685
685
|
a = a * Df + n.value | 0;
|
|
686
686
|
return a;
|
|
@@ -688,7 +688,7 @@ var ch = fh(), Va = /* @__PURE__ */ _a(ch), wi = tt ? tt.performance : null, Cf
|
|
|
688
688
|
var r = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : Ar;
|
|
689
689
|
return r * Df + e | 0;
|
|
690
690
|
}, Aa = function(e) {
|
|
691
|
-
var r = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] :
|
|
691
|
+
var r = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : Xr;
|
|
692
692
|
return (r << 5) + r + e | 0;
|
|
693
693
|
}, hh = function(e, r) {
|
|
694
694
|
return e * 2097152 + r;
|
|
@@ -753,7 +753,7 @@ var Jo = !0, mh = console.warn != null, bh = console.trace != null, uo = Number.
|
|
|
753
753
|
}, jo = function() {
|
|
754
754
|
return 0;
|
|
755
755
|
}, lo = function() {
|
|
756
|
-
},
|
|
756
|
+
}, Ye = function(e) {
|
|
757
757
|
throw new Error(e);
|
|
758
758
|
}, Rf = function(e) {
|
|
759
759
|
if (e !== void 0)
|
|
@@ -892,12 +892,12 @@ var Jo = !0, mh = console.warn != null, bh = console.trace != null, uo = Number.
|
|
|
892
892
|
})(), na = (typeof Set > "u" ? "undefined" : nt(Set)) !== Dh ? Set : Sh, Un = function(e, r) {
|
|
893
893
|
var a = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !0;
|
|
894
894
|
if (e === void 0 || r === void 0 || !io(e)) {
|
|
895
|
-
|
|
895
|
+
Ye("An element must have a core reference and parameters set");
|
|
896
896
|
return;
|
|
897
897
|
}
|
|
898
898
|
var n = r.group;
|
|
899
899
|
if (n == null && (r.data && r.data.source != null && r.data.target != null ? n = "edges" : n = "nodes"), n !== "nodes" && n !== "edges") {
|
|
900
|
-
|
|
900
|
+
Ye("An element must be of type `nodes` or `edges`; you specified `" + n + "`");
|
|
901
901
|
return;
|
|
902
902
|
}
|
|
903
903
|
this.length = 1, this[0] = this;
|
|
@@ -1015,7 +1015,7 @@ var Jo = !0, mh = console.warn != null, bh = console.trace != null, uo = Number.
|
|
|
1015
1015
|
dfs: e.dfs || !e.bfs
|
|
1016
1016
|
}, function(a, n, i) {
|
|
1017
1017
|
var s;
|
|
1018
|
-
Oe(a) && !Lt(a) && (s = a, a = s.roots || s.root, n = s.visit, i = s.directed), i = arguments.length === 2 && !
|
|
1018
|
+
Oe(a) && !Lt(a) && (s = a, a = s.roots || s.root, n = s.visit, i = s.directed), i = arguments.length === 2 && !He(n) ? n : i, n = He(n) ? n : function() {
|
|
1019
1019
|
};
|
|
1020
1020
|
for (var o = this._private.cy, u = a = ge(a) ? this.filter(a) : a, l = [], f = [], c = {}, v = {}, h = {}, d = 0, p, g = this.byGroup(), y = g.nodes, b = g.edges, m = 0; m < u.length; m++) {
|
|
1021
1021
|
var E = u[m], T = E.id();
|
|
@@ -1036,10 +1036,10 @@ var Jo = !0, mh = console.warn != null, bh = console.trace != null, uo = Number.
|
|
|
1036
1036
|
for (var F = R.connectedEdges().filter(function(W) {
|
|
1037
1037
|
return (!i || W.source().same(R)) && b.has(W);
|
|
1038
1038
|
}), G = 0; G < F.length; G++) {
|
|
1039
|
-
var
|
|
1039
|
+
var Y = F[G], $ = Y.connectedNodes().filter(function(W) {
|
|
1040
1040
|
return !W.same(R) && y.has(W);
|
|
1041
|
-
}),
|
|
1042
|
-
|
|
1041
|
+
}), H = $.id();
|
|
1042
|
+
$.length !== 0 && !h[H] && ($ = $[0], l.push($), e.bfs && (h[H] = !0, f.push($)), c[H] = Y, v[H] = v[P] + 1);
|
|
1043
1043
|
}
|
|
1044
1044
|
}, w; l.length !== 0 && (w = S(), !(w !== 0 && w === 1)); )
|
|
1045
1045
|
;
|
|
@@ -1212,8 +1212,8 @@ var Ph = Rh(), Ua = /* @__PURE__ */ _a(Ph), Ih = ht({
|
|
|
1212
1212
|
}
|
|
1213
1213
|
for (var T = function(N, O) {
|
|
1214
1214
|
for (var k = (s ? N.edgesTo(O) : N.edgesWith(O)).intersect(p), B = 1 / 0, _, F = 0; F < k.length; F++) {
|
|
1215
|
-
var G = k[F],
|
|
1216
|
-
(
|
|
1215
|
+
var G = k[F], Y = u(G);
|
|
1216
|
+
(Y < B || !_) && (B = Y, _ = G);
|
|
1217
1217
|
}
|
|
1218
1218
|
return {
|
|
1219
1219
|
edge: _,
|
|
@@ -1336,10 +1336,10 @@ var Ph = Rh(), Ua = /* @__PURE__ */ _a(Ph), Ih = ht({
|
|
|
1336
1336
|
}), Fh = {
|
|
1337
1337
|
// Implemented from pseudocode from wikipedia
|
|
1338
1338
|
floydWarshall: function(e) {
|
|
1339
|
-
for (var r = this.cy(), a = Bh(e), n = a.weight, i = a.directed, s = n, o = this.byGroup(), u = o.nodes, l = o.edges, f = u.length, c = f * f, v = function(
|
|
1340
|
-
return u.indexOf(
|
|
1341
|
-
}, h = function(
|
|
1342
|
-
return u[
|
|
1339
|
+
for (var r = this.cy(), a = Bh(e), n = a.weight, i = a.directed, s = n, o = this.byGroup(), u = o.nodes, l = o.edges, f = u.length, c = f * f, v = function(Y) {
|
|
1340
|
+
return u.indexOf(Y);
|
|
1341
|
+
}, h = function(Y) {
|
|
1342
|
+
return u[Y];
|
|
1343
1343
|
}, d = new Array(c), p = 0; p < c; p++) {
|
|
1344
1344
|
var g = p % f, y = (p - g) / f;
|
|
1345
1345
|
y === g ? d[p] = 0 : d[p] = 1 / 0;
|
|
@@ -1360,24 +1360,24 @@ var Ph = Rh(), Ua = /* @__PURE__ */ _a(Ph), Ih = ht({
|
|
|
1360
1360
|
var O = P * f + N, k = R * f + N;
|
|
1361
1361
|
d[M] + d[k] < d[O] && (d[O] = d[M] + d[k], b[O] = b[M]);
|
|
1362
1362
|
}
|
|
1363
|
-
var B = function(
|
|
1364
|
-
return (ge(
|
|
1365
|
-
}, _ = function(
|
|
1366
|
-
return v(B(
|
|
1363
|
+
var B = function(Y) {
|
|
1364
|
+
return (ge(Y) ? r.filter(Y) : Y)[0];
|
|
1365
|
+
}, _ = function(Y) {
|
|
1366
|
+
return v(B(Y));
|
|
1367
1367
|
}, F = {
|
|
1368
|
-
distance: function(
|
|
1369
|
-
var
|
|
1370
|
-
return d[
|
|
1368
|
+
distance: function(Y, $) {
|
|
1369
|
+
var H = _(Y), W = _($);
|
|
1370
|
+
return d[H * f + W];
|
|
1371
1371
|
},
|
|
1372
|
-
path: function(
|
|
1373
|
-
var
|
|
1374
|
-
if (
|
|
1372
|
+
path: function(Y, $) {
|
|
1373
|
+
var H = _(Y), W = _($), ee = h(H);
|
|
1374
|
+
if (H === W)
|
|
1375
1375
|
return ee.collection();
|
|
1376
|
-
if (b[
|
|
1376
|
+
if (b[H * f + W] == null)
|
|
1377
1377
|
return r.collection();
|
|
1378
|
-
var ae = r.collection(), J =
|
|
1379
|
-
for (ae.merge(ee);
|
|
1380
|
-
J =
|
|
1378
|
+
var ae = r.collection(), J = H, z;
|
|
1379
|
+
for (ae.merge(ee); H !== W; )
|
|
1380
|
+
J = H, H = b[H * f + W], z = m[J * f + H], ae.merge(z), ae.merge(h(H));
|
|
1381
1381
|
return ae;
|
|
1382
1382
|
}
|
|
1383
1383
|
};
|
|
@@ -1432,11 +1432,11 @@ var Ph = Rh(), Ua = /* @__PURE__ */ _a(Ph), Ih = ht({
|
|
|
1432
1432
|
}
|
|
1433
1433
|
if (C)
|
|
1434
1434
|
for (var B = [], _ = 0; _ < y; _++) {
|
|
1435
|
-
var F = c[_], G = F.source(),
|
|
1436
|
-
if (
|
|
1435
|
+
var F = c[_], G = F.source(), Y = F.target(), $ = o(F), H = b(G).dist, W = b(Y).dist;
|
|
1436
|
+
if (H + $ < W || !i && W + $ < H)
|
|
1437
1437
|
if (p || (Ge("Graph contains a negative weight cycle for Bellman-Ford"), p = !0), e.findNegativeWeightCycles !== !1) {
|
|
1438
1438
|
var ee = [];
|
|
1439
|
-
|
|
1439
|
+
H + $ < W && ee.push(G), !i && W + $ < H && ee.push(Y);
|
|
1440
1440
|
for (var ae = ee.length, J = 0; J < ae; J++) {
|
|
1441
1441
|
var z = ee[J], V = [z];
|
|
1442
1442
|
V.push(b(z).edge);
|
|
@@ -1463,7 +1463,7 @@ var Ph = Rh(), Ua = /* @__PURE__ */ _a(Ph), Ih = ht({
|
|
|
1463
1463
|
}
|
|
1464
1464
|
// bellmanFord
|
|
1465
1465
|
}, zh = Math.sqrt(2), Vh = function(e, r, a) {
|
|
1466
|
-
a.length === 0 &&
|
|
1466
|
+
a.length === 0 && Ye("Karger-Stein must be run on a connected (sub)graph");
|
|
1467
1467
|
for (var n = a[e], i = n[1], s = n[2], o = r[i], u = r[s], l = a, f = l.length - 1; f >= 0; f--) {
|
|
1468
1468
|
var c = l[f], v = c[1], h = c[2];
|
|
1469
1469
|
(r[v] === o && r[h] === u || r[v] === u && r[h] === o) && l.splice(f, 1);
|
|
@@ -1491,7 +1491,7 @@ var Ph = Rh(), Ua = /* @__PURE__ */ _a(Ph), Ih = ht({
|
|
|
1491
1491
|
});
|
|
1492
1492
|
var i = a.length, s = n.length, o = Math.ceil(Math.pow(Math.log(i) / Math.LN2, 2)), u = Math.floor(i / zh);
|
|
1493
1493
|
if (i < 2) {
|
|
1494
|
-
|
|
1494
|
+
Ye("At least 2 nodes are required for Karger-Stein algorithm");
|
|
1495
1495
|
return;
|
|
1496
1496
|
}
|
|
1497
1497
|
for (var l = [], f = 0; f < s; f++) {
|
|
@@ -1552,25 +1552,25 @@ var Ph = Rh(), Ua = /* @__PURE__ */ _a(Ph), Ih = ht({
|
|
|
1552
1552
|
x: e[0],
|
|
1553
1553
|
y: e[1]
|
|
1554
1554
|
};
|
|
1555
|
-
},
|
|
1555
|
+
}, $h = function(e) {
|
|
1556
1556
|
for (var r = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0, a = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : e.length, n = 1 / 0, i = r; i < a; i++) {
|
|
1557
1557
|
var s = e[i];
|
|
1558
1558
|
isFinite(s) && (n = Math.min(s, n));
|
|
1559
1559
|
}
|
|
1560
1560
|
return n;
|
|
1561
|
-
},
|
|
1561
|
+
}, Yh = function(e) {
|
|
1562
1562
|
for (var r = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0, a = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : e.length, n = -1 / 0, i = r; i < a; i++) {
|
|
1563
1563
|
var s = e[i];
|
|
1564
1564
|
isFinite(s) && (n = Math.max(s, n));
|
|
1565
1565
|
}
|
|
1566
1566
|
return n;
|
|
1567
|
-
},
|
|
1567
|
+
}, Hh = function(e) {
|
|
1568
1568
|
for (var r = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0, a = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : e.length, n = 0, i = 0, s = r; s < a; s++) {
|
|
1569
1569
|
var o = e[s];
|
|
1570
1570
|
isFinite(o) && (n += o, i++);
|
|
1571
1571
|
}
|
|
1572
1572
|
return n / i;
|
|
1573
|
-
},
|
|
1573
|
+
}, Xh = function(e) {
|
|
1574
1574
|
var r = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0, a = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : e.length, n = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : !0, i = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : !0, s = arguments.length > 5 && arguments[5] !== void 0 ? arguments[5] : !0;
|
|
1575
1575
|
n ? e = e.slice(r, a) : (a < e.length && e.splice(a, e.length - a), r > 0 && e.splice(0, r));
|
|
1576
1576
|
for (var o = 0, u = e.length - 1; u >= 0; u--) {
|
|
@@ -1808,8 +1808,8 @@ var Nf = function(e, r, a, n, i, s, o) {
|
|
|
1808
1808
|
return [M[0], M[1]];
|
|
1809
1809
|
}
|
|
1810
1810
|
{
|
|
1811
|
-
var G = a - f + l,
|
|
1812
|
-
if (M = wa(e, r, a, n, G,
|
|
1811
|
+
var G = a - f + l, Y = n + c - l;
|
|
1812
|
+
if (M = wa(e, r, a, n, G, Y, l + o), M.length > 0 && M[0] <= G && M[1] >= Y)
|
|
1813
1813
|
return [M[0], M[1]];
|
|
1814
1814
|
}
|
|
1815
1815
|
return [];
|
|
@@ -2100,12 +2100,12 @@ var dd = ht({
|
|
|
2100
2100
|
for (var k = new Array(c), B = new Array(c), _, F = 0; F < c; F++)
|
|
2101
2101
|
k[F] = 1;
|
|
2102
2102
|
for (var G = 0; G < i; G++) {
|
|
2103
|
-
for (var H = 0; H < c; H++)
|
|
2104
|
-
B[H] = 0;
|
|
2105
2103
|
for (var Y = 0; Y < c; Y++)
|
|
2106
|
-
|
|
2107
|
-
|
|
2108
|
-
|
|
2104
|
+
B[Y] = 0;
|
|
2105
|
+
for (var $ = 0; $ < c; $++)
|
|
2106
|
+
for (var H = 0; H < c; H++) {
|
|
2107
|
+
var W = $ * c + H;
|
|
2108
|
+
B[$] += d[W] * k[H];
|
|
2109
2109
|
}
|
|
2110
2110
|
Kh(B), _ = k, k = B, B = _;
|
|
2111
2111
|
for (var ee = 0, ae = 0; ae < c; ae++) {
|
|
@@ -2260,8 +2260,8 @@ var pd = ht({
|
|
|
2260
2260
|
a ? u[d] = h.outgoers().nodes() : u[d] = h.openNeighborhood().nodes(), c.set(d, 0);
|
|
2261
2261
|
}
|
|
2262
2262
|
for (var p = function() {
|
|
2263
|
-
for (var m = o[g].id(), E = [], T = {}, S = {}, w = {}, x = new Ua(function(
|
|
2264
|
-
return w[
|
|
2263
|
+
for (var m = o[g].id(), E = [], T = {}, S = {}, w = {}, x = new Ua(function($, H) {
|
|
2264
|
+
return w[$] - w[H];
|
|
2265
2265
|
}), C = 0; C < o.length; C++) {
|
|
2266
2266
|
var D = o[C].id();
|
|
2267
2267
|
T[D] = [], S[D] = 0, w[D] = 1 / 0;
|
|
@@ -2285,8 +2285,8 @@ var pd = ht({
|
|
|
2285
2285
|
B[o[_].id()] = 0;
|
|
2286
2286
|
for (; E.length > 0; ) {
|
|
2287
2287
|
for (var F = E.pop(), G = 0; G < T[F].length; G++) {
|
|
2288
|
-
var
|
|
2289
|
-
B[
|
|
2288
|
+
var Y = T[F][G];
|
|
2289
|
+
B[Y] = B[Y] + S[Y] / S[F] * (1 + B[F]);
|
|
2290
2290
|
}
|
|
2291
2291
|
F != o[g].id() && c.set(F, c.get(F) + B[F]);
|
|
2292
2292
|
}
|
|
@@ -2431,9 +2431,9 @@ var yd = ht({
|
|
|
2431
2431
|
};
|
|
2432
2432
|
ra["squared-euclidean"] = ra.squaredEuclidean;
|
|
2433
2433
|
ra.squaredeuclidean = ra.squaredEuclidean;
|
|
2434
|
-
function
|
|
2434
|
+
function $n(t, e, r, a, n, i) {
|
|
2435
2435
|
var s;
|
|
2436
|
-
return
|
|
2436
|
+
return He(t) ? s = t : s = ra[t] || ra.euclidean, e === 0 && He(t) ? s(n, i) : s(e, r, a, n, i);
|
|
2437
2437
|
}
|
|
2438
2438
|
var Md = ht({
|
|
2439
2439
|
k: 2,
|
|
@@ -2454,7 +2454,7 @@ var Md = ht({
|
|
|
2454
2454
|
}, u = function(v) {
|
|
2455
2455
|
return n[v](r);
|
|
2456
2456
|
}, l = a, f = r;
|
|
2457
|
-
return
|
|
2457
|
+
return $n(e, n.length, o, u, l, f);
|
|
2458
2458
|
}, Si = function(e, r, a) {
|
|
2459
2459
|
for (var n = a.length, i = new Array(n), s = new Array(n), o = new Array(r), u = null, l = 0; l < n; l++)
|
|
2460
2460
|
i[l] = e.min(a[l]).value, s[l] = e.max(a[l]).value;
|
|
@@ -2629,12 +2629,12 @@ var Md = ht({
|
|
|
2629
2629
|
}), qd = {
|
|
2630
2630
|
single: "min",
|
|
2631
2631
|
complete: "max"
|
|
2632
|
-
},
|
|
2632
|
+
}, $d = function(e) {
|
|
2633
2633
|
var r = Ud(e), a = qd[r.linkage];
|
|
2634
2634
|
return a != null && (r.linkage = a), r;
|
|
2635
2635
|
}, hu = function(e, r, a, n, i) {
|
|
2636
2636
|
for (var s = 0, o = 1 / 0, u, l = i.attributes, f = function(C, D) {
|
|
2637
|
-
return
|
|
2637
|
+
return $n(i.distance, l.length, function(A) {
|
|
2638
2638
|
return l[A](C);
|
|
2639
2639
|
}, function(A) {
|
|
2640
2640
|
return l[A](D);
|
|
@@ -2701,8 +2701,8 @@ var Md = ht({
|
|
|
2701
2701
|
var n = [], i = [], s = [];
|
|
2702
2702
|
return r === 0 ? (e.left && Kr(e.left, n), e.right && Kr(e.right, i), s = n.concat(i), [a.collection(s)]) : r === 1 ? e.value ? [a.collection(e.value)] : (e.left && Kr(e.left, n), e.right && Kr(e.right, i), [a.collection(n), a.collection(i)]) : e.value ? [a.collection(e.value)] : (e.left && (n = Vs(e.left, r - 1, a)), e.right && (i = Vs(e.right, r - 1, a)), n.concat(i));
|
|
2703
2703
|
}, du = function(e) {
|
|
2704
|
-
for (var r = this.cy(), a = this.nodes(), n =
|
|
2705
|
-
return
|
|
2704
|
+
for (var r = this.cy(), a = this.nodes(), n = $d(e), i = n.attributes, s = function(m, E) {
|
|
2705
|
+
return $n(n.distance, i.length, function(T) {
|
|
2706
2706
|
return i[T](m);
|
|
2707
2707
|
}, function(T) {
|
|
2708
2708
|
return i[T](E);
|
|
@@ -2726,10 +2726,10 @@ var Md = ht({
|
|
|
2726
2726
|
return n.mode === "dendrogram" ? (y = Vs(o[0], n.dendrogramDepth, r), n.addDendrogram && zs(o[0], r)) : (y = new Array(o.length), o.forEach(function(b, m) {
|
|
2727
2727
|
b.key = b.index = null, y[m] = r.collection(b.value);
|
|
2728
2728
|
})), y;
|
|
2729
|
-
},
|
|
2729
|
+
}, Yd = {
|
|
2730
2730
|
hierarchicalClustering: du,
|
|
2731
2731
|
hca: du
|
|
2732
|
-
},
|
|
2732
|
+
}, Hd = ht({
|
|
2733
2733
|
distance: "euclidean",
|
|
2734
2734
|
// distance metric to compare attributes between two nodes
|
|
2735
2735
|
preference: "median",
|
|
@@ -2744,27 +2744,27 @@ var Md = ht({
|
|
|
2744
2744
|
// functions to quantify the similarity between any two points
|
|
2745
2745
|
// e.g. node => node.data('weight')
|
|
2746
2746
|
]
|
|
2747
|
-
}),
|
|
2747
|
+
}), Xd = function(e) {
|
|
2748
2748
|
var r = e.damping, a = e.preference;
|
|
2749
|
-
0.5 <= r && r < 1 ||
|
|
2749
|
+
0.5 <= r && r < 1 || Ye("Damping must range on [0.5, 1). Got: ".concat(r));
|
|
2750
2750
|
var n = ["median", "mean", "min", "max"];
|
|
2751
2751
|
return n.some(function(i) {
|
|
2752
2752
|
return i === a;
|
|
2753
|
-
}) || ne(a) ||
|
|
2753
|
+
}) || ne(a) || Ye("Preference must be one of [".concat(n.map(function(i) {
|
|
2754
2754
|
return "'".concat(i, "'");
|
|
2755
|
-
}).join(", "), "] or a number. Got: ").concat(a)),
|
|
2755
|
+
}).join(", "), "] or a number. Got: ").concat(a)), Hd(e);
|
|
2756
2756
|
}, Wd = function(e, r, a, n) {
|
|
2757
2757
|
var i = function(o, u) {
|
|
2758
2758
|
return n[u](o);
|
|
2759
2759
|
};
|
|
2760
|
-
return
|
|
2760
|
+
return -$n(e, n.length, function(s) {
|
|
2761
2761
|
return i(r, s);
|
|
2762
2762
|
}, function(s) {
|
|
2763
2763
|
return i(a, s);
|
|
2764
2764
|
}, r, a);
|
|
2765
2765
|
}, Kd = function(e, r) {
|
|
2766
2766
|
var a = null;
|
|
2767
|
-
return r === "median" ? a =
|
|
2767
|
+
return r === "median" ? a = Xh(e) : r === "mean" ? a = Hh(e) : r === "min" ? a = $h(e) : r === "max" ? a = Yh(e) : a = r, a;
|
|
2768
2768
|
}, Zd = function(e, r, a) {
|
|
2769
2769
|
for (var n = [], i = 0; i < e; i++)
|
|
2770
2770
|
r[i * e + i] + a[i * e + i] > 0 && n.push(i);
|
|
@@ -2793,7 +2793,7 @@ var Md = ht({
|
|
|
2793
2793
|
}
|
|
2794
2794
|
return n = gu(e, r, a), n;
|
|
2795
2795
|
}, pu = function(e) {
|
|
2796
|
-
for (var r = this.cy(), a = this.nodes(), n =
|
|
2796
|
+
for (var r = this.cy(), a = this.nodes(), n = Xd(e), i = {}, s = 0; s < a.length; s++)
|
|
2797
2797
|
i[a[s].id()] = s;
|
|
2798
2798
|
var o, u, l, f, c, v;
|
|
2799
2799
|
o = a.length, u = o * o, l = new Array(u);
|
|
@@ -2833,17 +2833,17 @@ var Md = ht({
|
|
|
2833
2833
|
v[O * o + O] = (1 - n.damping) * (k - E[O]) + n.damping * m[O];
|
|
2834
2834
|
}
|
|
2835
2835
|
for (var F = 0, G = 0; G < o; G++) {
|
|
2836
|
-
var
|
|
2837
|
-
w[C % n.minIterations * o + G] =
|
|
2836
|
+
var Y = v[G * o + G] + c[G * o + G] > 0 ? 1 : 0;
|
|
2837
|
+
w[C % n.minIterations * o + G] = Y, F += Y;
|
|
2838
2838
|
}
|
|
2839
2839
|
if (F > 0 && (C >= n.minIterations - 1 || C == n.maxIterations - 1)) {
|
|
2840
|
-
for (var
|
|
2841
|
-
T[
|
|
2840
|
+
for (var $ = 0, H = 0; H < o; H++) {
|
|
2841
|
+
T[H] = 0;
|
|
2842
2842
|
for (var W = 0; W < n.minIterations; W++)
|
|
2843
|
-
T[
|
|
2844
|
-
(T[
|
|
2843
|
+
T[H] += w[W * o + H];
|
|
2844
|
+
(T[H] === 0 || T[H] === n.minIterations) && $++;
|
|
2845
2845
|
}
|
|
2846
|
-
if (
|
|
2846
|
+
if ($ === o)
|
|
2847
2847
|
break;
|
|
2848
2848
|
}
|
|
2849
2849
|
}
|
|
@@ -3016,15 +3016,10 @@ var Md = ht({
|
|
|
3016
3016
|
tscc: tn,
|
|
3017
3017
|
tarjanStronglyConnectedComponents: tn
|
|
3018
3018
|
}, Uf = {};
|
|
3019
|
-
[La, Mh, Oh, Nh, Fh, Gh, Uh, gd, Jr, jr, Gs, Ld, Vd,
|
|
3019
|
+
[La, Mh, Oh, Nh, Fh, Gh, Uh, gd, Jr, jr, Gs, Ld, Vd, Yd, Jd, eg, tg, rg].forEach(function(t) {
|
|
3020
3020
|
be(Uf, t);
|
|
3021
3021
|
});
|
|
3022
|
-
|
|
3023
|
-
Embeddable Minimum Strictly-Compliant Promises/A+ 1.1.1 Thenable
|
|
3024
|
-
Copyright (c) 2013-2014 Ralf S. Engelschall (http://engelschall.com)
|
|
3025
|
-
Licensed under The MIT License (http://opensource.org/licenses/MIT)
|
|
3026
|
-
*/
|
|
3027
|
-
var qf = 0, Yf = 1, Hf = 2, _t = function(e) {
|
|
3022
|
+
var qf = 0, $f = 1, Yf = 2, _t = function(e) {
|
|
3028
3023
|
if (!(this instanceof _t)) return new _t(e);
|
|
3029
3024
|
this.id = "Thenable/1.0.7", this.state = qf, this.fulfillValue = void 0, this.rejectReason = void 0, this.onFulfilled = [], this.onRejected = [], this.proxy = {
|
|
3030
3025
|
then: this.then.bind(this)
|
|
@@ -3033,21 +3028,21 @@ var qf = 0, Yf = 1, Hf = 2, _t = function(e) {
|
|
|
3033
3028
|
_t.prototype = {
|
|
3034
3029
|
/* promise resolving methods */
|
|
3035
3030
|
fulfill: function(e) {
|
|
3036
|
-
return yu(this,
|
|
3031
|
+
return yu(this, $f, "fulfillValue", e);
|
|
3037
3032
|
},
|
|
3038
3033
|
reject: function(e) {
|
|
3039
|
-
return yu(this,
|
|
3034
|
+
return yu(this, Yf, "rejectReason", e);
|
|
3040
3035
|
},
|
|
3041
3036
|
/* "The then Method" [Promises/A+ 1.1, 1.2, 2.2] */
|
|
3042
3037
|
then: function(e, r) {
|
|
3043
3038
|
var a = this, n = new _t();
|
|
3044
|
-
return a.onFulfilled.push(bu(e, n, "fulfill")), a.onRejected.push(bu(r, n, "reject")),
|
|
3039
|
+
return a.onFulfilled.push(bu(e, n, "fulfill")), a.onRejected.push(bu(r, n, "reject")), Hf(a), n.proxy;
|
|
3045
3040
|
}
|
|
3046
3041
|
};
|
|
3047
3042
|
var yu = function(e, r, a, n) {
|
|
3048
|
-
return e.state === qf && (e.state = r, e[a] = n,
|
|
3049
|
-
},
|
|
3050
|
-
e.state ===
|
|
3043
|
+
return e.state === qf && (e.state = r, e[a] = n, Hf(e)), e;
|
|
3044
|
+
}, Hf = function(e) {
|
|
3045
|
+
e.state === $f ? mu(e, "onFulfilled", e.fulfillValue) : e.state === Yf && mu(e, "onRejected", e.rejectReason);
|
|
3051
3046
|
}, mu = function(e, r, a) {
|
|
3052
3047
|
if (e[r].length !== 0) {
|
|
3053
3048
|
var n = e[r];
|
|
@@ -3069,10 +3064,10 @@ var yu = function(e, r, a, n) {
|
|
|
3069
3064
|
r.reject(s);
|
|
3070
3065
|
return;
|
|
3071
3066
|
}
|
|
3072
|
-
|
|
3067
|
+
Xf(r, i);
|
|
3073
3068
|
}
|
|
3074
3069
|
};
|
|
3075
|
-
},
|
|
3070
|
+
}, Xf = function(e, r) {
|
|
3076
3071
|
if (e === r || e.proxy === r) {
|
|
3077
3072
|
e.reject(new TypeError("cannot resolve promise with itself"));
|
|
3078
3073
|
return;
|
|
@@ -3093,7 +3088,7 @@ var yu = function(e, r, a, n) {
|
|
|
3093
3088
|
/* resolvePromise */
|
|
3094
3089
|
/* [Promises/A+ 2.3.3.3.1] */
|
|
3095
3090
|
function(i) {
|
|
3096
|
-
n || (n = !0, i === r ? e.reject(new TypeError("circular thenable chain")) :
|
|
3091
|
+
n || (n = !0, i === r ? e.reject(new TypeError("circular thenable chain")) : Xf(e, i));
|
|
3097
3092
|
},
|
|
3098
3093
|
/* rejectPromise */
|
|
3099
3094
|
/* [Promises/A+ 2.3.3.3.2] */
|
|
@@ -3142,7 +3137,7 @@ var ia = typeof Promise < "u" ? Promise : _t, Us = function(e, r, a) {
|
|
|
3142
3137
|
var n = io(e), i = !n, s = this._private = be({
|
|
3143
3138
|
duration: 1e3
|
|
3144
3139
|
}, r, a);
|
|
3145
|
-
if (s.target = e, s.style = s.style || s.css, s.started = !1, s.playing = !1, s.hooked = !1, s.applying = !1, s.progress = 0, s.completes = [], s.frames = [], s.complete &&
|
|
3140
|
+
if (s.target = e, s.style = s.style || s.css, s.started = !1, s.playing = !1, s.hooked = !1, s.applying = !1, s.progress = 0, s.completes = [], s.frames = [], s.complete && He(s.complete) && s.completes.push(s.complete), i) {
|
|
3146
3141
|
var o = e.position();
|
|
3147
3142
|
s.startPosition = s.startPosition || {
|
|
3148
3143
|
x: o.x,
|
|
@@ -3370,7 +3365,7 @@ var ag = {
|
|
|
3370
3365
|
}
|
|
3371
3366
|
// stop
|
|
3372
3367
|
}, Ai, wu;
|
|
3373
|
-
function
|
|
3368
|
+
function Yn() {
|
|
3374
3369
|
if (wu) return Ai;
|
|
3375
3370
|
wu = 1;
|
|
3376
3371
|
var t = Array.isArray;
|
|
@@ -3380,7 +3375,7 @@ var Li, Eu;
|
|
|
3380
3375
|
function ng() {
|
|
3381
3376
|
if (Eu) return Li;
|
|
3382
3377
|
Eu = 1;
|
|
3383
|
-
var t =
|
|
3378
|
+
var t = Yn(), e = za(), r = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, a = /^\w*$/;
|
|
3384
3379
|
function n(i, s) {
|
|
3385
3380
|
if (t(i))
|
|
3386
3381
|
return !1;
|
|
@@ -3478,7 +3473,7 @@ function yo() {
|
|
|
3478
3473
|
return Ni = r, Ni;
|
|
3479
3474
|
}
|
|
3480
3475
|
var Bi, Ru;
|
|
3481
|
-
function
|
|
3476
|
+
function Hn() {
|
|
3482
3477
|
if (Ru) return Bi;
|
|
3483
3478
|
Ru = 1;
|
|
3484
3479
|
var t = yo(), e = t(Object, "create");
|
|
@@ -3488,7 +3483,7 @@ var Fi, Pu;
|
|
|
3488
3483
|
function cg() {
|
|
3489
3484
|
if (Pu) return Fi;
|
|
3490
3485
|
Pu = 1;
|
|
3491
|
-
var t =
|
|
3486
|
+
var t = Hn();
|
|
3492
3487
|
function e() {
|
|
3493
3488
|
this.__data__ = t ? t(null) : {}, this.size = 0;
|
|
3494
3489
|
}
|
|
@@ -3508,7 +3503,7 @@ var Gi, Mu;
|
|
|
3508
3503
|
function hg() {
|
|
3509
3504
|
if (Mu) return Gi;
|
|
3510
3505
|
Mu = 1;
|
|
3511
|
-
var t =
|
|
3506
|
+
var t = Hn(), e = "__lodash_hash_undefined__", r = Object.prototype, a = r.hasOwnProperty;
|
|
3512
3507
|
function n(i) {
|
|
3513
3508
|
var s = this.__data__;
|
|
3514
3509
|
if (t) {
|
|
@@ -3523,7 +3518,7 @@ var zi, Ou;
|
|
|
3523
3518
|
function dg() {
|
|
3524
3519
|
if (Ou) return zi;
|
|
3525
3520
|
Ou = 1;
|
|
3526
|
-
var t =
|
|
3521
|
+
var t = Hn(), e = Object.prototype, r = e.hasOwnProperty;
|
|
3527
3522
|
function a(n) {
|
|
3528
3523
|
var i = this.__data__;
|
|
3529
3524
|
return t ? i[n] !== void 0 : r.call(i, n);
|
|
@@ -3534,7 +3529,7 @@ var Vi, ku;
|
|
|
3534
3529
|
function gg() {
|
|
3535
3530
|
if (ku) return Vi;
|
|
3536
3531
|
ku = 1;
|
|
3537
|
-
var t =
|
|
3532
|
+
var t = Hn(), e = "__lodash_hash_undefined__";
|
|
3538
3533
|
function r(a, n) {
|
|
3539
3534
|
var i = this.__data__;
|
|
3540
3535
|
return this.size += this.has(a) ? 0 : 1, i[a] = t && n === void 0 ? e : n, this;
|
|
@@ -3564,18 +3559,18 @@ function yg() {
|
|
|
3564
3559
|
}
|
|
3565
3560
|
return qi = t, qi;
|
|
3566
3561
|
}
|
|
3567
|
-
var
|
|
3562
|
+
var $i, Fu;
|
|
3568
3563
|
function Wf() {
|
|
3569
|
-
if (Fu) return
|
|
3564
|
+
if (Fu) return $i;
|
|
3570
3565
|
Fu = 1;
|
|
3571
3566
|
function t(e, r) {
|
|
3572
3567
|
return e === r || e !== e && r !== r;
|
|
3573
3568
|
}
|
|
3574
|
-
return
|
|
3569
|
+
return $i = t, $i;
|
|
3575
3570
|
}
|
|
3576
|
-
var
|
|
3577
|
-
function
|
|
3578
|
-
if (_u) return
|
|
3571
|
+
var Yi, _u;
|
|
3572
|
+
function Xn() {
|
|
3573
|
+
if (_u) return Yi;
|
|
3579
3574
|
_u = 1;
|
|
3580
3575
|
var t = Wf();
|
|
3581
3576
|
function e(r, a) {
|
|
@@ -3584,13 +3579,13 @@ function $n() {
|
|
|
3584
3579
|
return n;
|
|
3585
3580
|
return -1;
|
|
3586
3581
|
}
|
|
3587
|
-
return
|
|
3582
|
+
return Yi = e, Yi;
|
|
3588
3583
|
}
|
|
3589
|
-
var
|
|
3584
|
+
var Hi, Gu;
|
|
3590
3585
|
function mg() {
|
|
3591
|
-
if (Gu) return
|
|
3586
|
+
if (Gu) return Hi;
|
|
3592
3587
|
Gu = 1;
|
|
3593
|
-
var t =
|
|
3588
|
+
var t = Xn(), e = Array.prototype, r = e.splice;
|
|
3594
3589
|
function a(n) {
|
|
3595
3590
|
var i = this.__data__, s = t(i, n);
|
|
3596
3591
|
if (s < 0)
|
|
@@ -3598,24 +3593,24 @@ function mg() {
|
|
|
3598
3593
|
var o = i.length - 1;
|
|
3599
3594
|
return s == o ? i.pop() : r.call(i, s, 1), --this.size, !0;
|
|
3600
3595
|
}
|
|
3601
|
-
return
|
|
3596
|
+
return Hi = a, Hi;
|
|
3602
3597
|
}
|
|
3603
|
-
var
|
|
3598
|
+
var Xi, zu;
|
|
3604
3599
|
function bg() {
|
|
3605
|
-
if (zu) return
|
|
3600
|
+
if (zu) return Xi;
|
|
3606
3601
|
zu = 1;
|
|
3607
|
-
var t =
|
|
3602
|
+
var t = Xn();
|
|
3608
3603
|
function e(r) {
|
|
3609
3604
|
var a = this.__data__, n = t(a, r);
|
|
3610
3605
|
return n < 0 ? void 0 : a[n][1];
|
|
3611
3606
|
}
|
|
3612
|
-
return
|
|
3607
|
+
return Xi = e, Xi;
|
|
3613
3608
|
}
|
|
3614
3609
|
var Wi, Vu;
|
|
3615
3610
|
function wg() {
|
|
3616
3611
|
if (Vu) return Wi;
|
|
3617
3612
|
Vu = 1;
|
|
3618
|
-
var t =
|
|
3613
|
+
var t = Xn();
|
|
3619
3614
|
function e(r) {
|
|
3620
3615
|
return t(this.__data__, r) > -1;
|
|
3621
3616
|
}
|
|
@@ -3625,7 +3620,7 @@ var Ki, Uu;
|
|
|
3625
3620
|
function Eg() {
|
|
3626
3621
|
if (Uu) return Ki;
|
|
3627
3622
|
Uu = 1;
|
|
3628
|
-
var t =
|
|
3623
|
+
var t = Xn();
|
|
3629
3624
|
function e(r, a) {
|
|
3630
3625
|
var n = this.__data__, i = t(n, r);
|
|
3631
3626
|
return i < 0 ? (++this.size, n.push([r, a])) : n[i][1] = a, this;
|
|
@@ -3646,17 +3641,17 @@ function xg() {
|
|
|
3646
3641
|
}
|
|
3647
3642
|
return i.prototype.clear = t, i.prototype.delete = e, i.prototype.get = r, i.prototype.has = a, i.prototype.set = n, Zi = i, Zi;
|
|
3648
3643
|
}
|
|
3649
|
-
var Qi,
|
|
3644
|
+
var Qi, $u;
|
|
3650
3645
|
function Tg() {
|
|
3651
|
-
if (
|
|
3652
|
-
|
|
3646
|
+
if ($u) return Qi;
|
|
3647
|
+
$u = 1;
|
|
3653
3648
|
var t = yo(), e = Vn(), r = t(e, "Map");
|
|
3654
3649
|
return Qi = r, Qi;
|
|
3655
3650
|
}
|
|
3656
|
-
var Ji,
|
|
3651
|
+
var Ji, Yu;
|
|
3657
3652
|
function Cg() {
|
|
3658
|
-
if (
|
|
3659
|
-
|
|
3653
|
+
if (Yu) return Ji;
|
|
3654
|
+
Yu = 1;
|
|
3660
3655
|
var t = pg(), e = xg(), r = Tg();
|
|
3661
3656
|
function a() {
|
|
3662
3657
|
this.size = 0, this.__data__ = {
|
|
@@ -3667,20 +3662,20 @@ function Cg() {
|
|
|
3667
3662
|
}
|
|
3668
3663
|
return Ji = a, Ji;
|
|
3669
3664
|
}
|
|
3670
|
-
var ji,
|
|
3665
|
+
var ji, Hu;
|
|
3671
3666
|
function Dg() {
|
|
3672
|
-
if (
|
|
3673
|
-
|
|
3667
|
+
if (Hu) return ji;
|
|
3668
|
+
Hu = 1;
|
|
3674
3669
|
function t(e) {
|
|
3675
3670
|
var r = typeof e;
|
|
3676
3671
|
return r == "string" || r == "number" || r == "symbol" || r == "boolean" ? e !== "__proto__" : e === null;
|
|
3677
3672
|
}
|
|
3678
3673
|
return ji = t, ji;
|
|
3679
3674
|
}
|
|
3680
|
-
var es,
|
|
3675
|
+
var es, Xu;
|
|
3681
3676
|
function Wn() {
|
|
3682
|
-
if (
|
|
3683
|
-
|
|
3677
|
+
if (Xu) return es;
|
|
3678
|
+
Xu = 1;
|
|
3684
3679
|
var t = Dg();
|
|
3685
3680
|
function e(r, a) {
|
|
3686
3681
|
var n = r.__data__;
|
|
@@ -3803,7 +3798,7 @@ var fs, al;
|
|
|
3803
3798
|
function Og() {
|
|
3804
3799
|
if (al) return fs;
|
|
3805
3800
|
al = 1;
|
|
3806
|
-
var t = oo(), e = Zf(), r =
|
|
3801
|
+
var t = oo(), e = Zf(), r = Yn(), a = za(), n = t ? t.prototype : void 0, i = n ? n.toString : void 0;
|
|
3807
3802
|
function s(o) {
|
|
3808
3803
|
if (typeof o == "string")
|
|
3809
3804
|
return o;
|
|
@@ -3830,7 +3825,7 @@ var vs, il;
|
|
|
3830
3825
|
function Jf() {
|
|
3831
3826
|
if (il) return vs;
|
|
3832
3827
|
il = 1;
|
|
3833
|
-
var t =
|
|
3828
|
+
var t = Yn(), e = ng(), r = Kf(), a = Qf();
|
|
3834
3829
|
function n(i, s) {
|
|
3835
3830
|
return t(i) ? i : e(i, s) ? [i] : r(a(i));
|
|
3836
3831
|
}
|
|
@@ -3956,8 +3951,8 @@ function qg() {
|
|
|
3956
3951
|
}
|
|
3957
3952
|
return Es = e, Es;
|
|
3958
3953
|
}
|
|
3959
|
-
var
|
|
3960
|
-
function
|
|
3954
|
+
var $g = qg(), Yg = /* @__PURE__ */ _a($g), xs, gl;
|
|
3955
|
+
function Hg() {
|
|
3961
3956
|
if (gl) return xs;
|
|
3962
3957
|
gl = 1;
|
|
3963
3958
|
function t(e, r) {
|
|
@@ -3969,16 +3964,16 @@ function Xg() {
|
|
|
3969
3964
|
return xs = t, xs;
|
|
3970
3965
|
}
|
|
3971
3966
|
var Ts, pl;
|
|
3972
|
-
function
|
|
3967
|
+
function Xg() {
|
|
3973
3968
|
if (pl) return Ts;
|
|
3974
3969
|
pl = 1;
|
|
3975
|
-
var t = Zf(), e =
|
|
3970
|
+
var t = Zf(), e = Hg(), r = Yn(), a = za(), n = Kf(), i = mo(), s = Qf();
|
|
3976
3971
|
function o(u) {
|
|
3977
3972
|
return r(u) ? t(u, i) : a(u) ? [u] : e(n(s(u)));
|
|
3978
3973
|
}
|
|
3979
3974
|
return Ts = o, Ts;
|
|
3980
3975
|
}
|
|
3981
|
-
var Wg =
|
|
3976
|
+
var Wg = Xg(), Kg = /* @__PURE__ */ _a(Wg), Zg = {
|
|
3982
3977
|
// access data field
|
|
3983
3978
|
data: function(e) {
|
|
3984
3979
|
var r = {
|
|
@@ -4017,7 +4012,7 @@ var Wg = $g(), Kg = /* @__PURE__ */ _a(Wg), Zg = {
|
|
|
4017
4012
|
s.beforeSet(o, p);
|
|
4018
4013
|
for (var g = 0, y = l.length; g < y; g++) {
|
|
4019
4014
|
var b = l[g];
|
|
4020
|
-
s.canSet(b) && (v && f._private[s.field][n] === void 0 ?
|
|
4015
|
+
s.canSet(b) && (v && f._private[s.field][n] === void 0 ? Yg(b._private[s.field], v, i) : b._private[s.field][n] = i);
|
|
4021
4016
|
}
|
|
4022
4017
|
s.updateStyle && o.updateStyle(), s.onSet(o), s.settingTriggersEvent && o[s.triggerFnName](s.settingEvent);
|
|
4023
4018
|
}
|
|
@@ -4035,7 +4030,7 @@ var Wg = $g(), Kg = /* @__PURE__ */ _a(Wg), Zg = {
|
|
|
4035
4030
|
}
|
|
4036
4031
|
}
|
|
4037
4032
|
s.updateStyle && o.updateStyle(), s.onSet(o), s.settingTriggersEvent && o[s.triggerFnName](s.settingEvent);
|
|
4038
|
-
} else if (s.allowBinding &&
|
|
4033
|
+
} else if (s.allowBinding && He(n)) {
|
|
4039
4034
|
var A = n;
|
|
4040
4035
|
o.on(s.bindingEvent, A);
|
|
4041
4036
|
} else if (s.allowGetting && n === void 0) {
|
|
@@ -4399,7 +4394,7 @@ var ze = function() {
|
|
|
4399
4394
|
});
|
|
4400
4395
|
}, ar = function(e, r, a) {
|
|
4401
4396
|
e[e.length - 1] = a;
|
|
4402
|
-
},
|
|
4397
|
+
}, $s = [{
|
|
4403
4398
|
name: "group",
|
|
4404
4399
|
// just used for identifying when debugging
|
|
4405
4400
|
query: !0,
|
|
@@ -4634,12 +4629,12 @@ var ze = function() {
|
|
|
4634
4629
|
i === se.DIRECTED_EDGE ? n.type = se.NODE_TARGET : i === se.UNDIRECTED_EDGE && (n.type = se.NODE_NEIGHBOR, n.node = n.nodes[1], n.neighbor = n.nodes[0], n.nodes = null);
|
|
4635
4630
|
}
|
|
4636
4631
|
}];
|
|
4637
|
-
|
|
4632
|
+
$s.forEach(function(t) {
|
|
4638
4633
|
return t.regexObj = new RegExp("^" + t.regex);
|
|
4639
4634
|
});
|
|
4640
4635
|
var rp = function(e) {
|
|
4641
|
-
for (var r, a, n, i = 0; i <
|
|
4642
|
-
var s =
|
|
4636
|
+
for (var r, a, n, i = 0; i < $s.length; i++) {
|
|
4637
|
+
var s = $s[i], o = s.name, u = e.match(s.regexObj);
|
|
4643
4638
|
if (u != null) {
|
|
4644
4639
|
a = u, r = s, n = o;
|
|
4645
4640
|
var l = u[0];
|
|
@@ -4793,7 +4788,7 @@ var rp = function(e) {
|
|
|
4793
4788
|
return e.data(r);
|
|
4794
4789
|
}, lp = function(e, r) {
|
|
4795
4790
|
return e[r]();
|
|
4796
|
-
}, We = [],
|
|
4791
|
+
}, We = [], $e = function(e, r) {
|
|
4797
4792
|
return e.checks.every(function(a) {
|
|
4798
4793
|
return We[a.type](a, r);
|
|
4799
4794
|
});
|
|
@@ -4832,46 +4827,46 @@ We[se.DATA_EXIST] = function(t, e) {
|
|
|
4832
4827
|
};
|
|
4833
4828
|
We[se.UNDIRECTED_EDGE] = function(t, e) {
|
|
4834
4829
|
var r = t.nodes[0], a = t.nodes[1], n = e.source(), i = e.target();
|
|
4835
|
-
return
|
|
4830
|
+
return $e(r, n) && $e(a, i) || $e(a, n) && $e(r, i);
|
|
4836
4831
|
};
|
|
4837
4832
|
We[se.NODE_NEIGHBOR] = function(t, e) {
|
|
4838
|
-
return
|
|
4839
|
-
return r.isNode() &&
|
|
4833
|
+
return $e(t.node, e) && e.neighborhood().some(function(r) {
|
|
4834
|
+
return r.isNode() && $e(t.neighbor, r);
|
|
4840
4835
|
});
|
|
4841
4836
|
};
|
|
4842
4837
|
We[se.DIRECTED_EDGE] = function(t, e) {
|
|
4843
|
-
return
|
|
4838
|
+
return $e(t.source, e.source()) && $e(t.target, e.target());
|
|
4844
4839
|
};
|
|
4845
4840
|
We[se.NODE_SOURCE] = function(t, e) {
|
|
4846
|
-
return
|
|
4847
|
-
return r.isNode() &&
|
|
4841
|
+
return $e(t.source, e) && e.outgoers().some(function(r) {
|
|
4842
|
+
return r.isNode() && $e(t.target, r);
|
|
4848
4843
|
});
|
|
4849
4844
|
};
|
|
4850
4845
|
We[se.NODE_TARGET] = function(t, e) {
|
|
4851
|
-
return
|
|
4852
|
-
return r.isNode() &&
|
|
4846
|
+
return $e(t.target, e) && e.incomers().some(function(r) {
|
|
4847
|
+
return r.isNode() && $e(t.source, r);
|
|
4853
4848
|
});
|
|
4854
4849
|
};
|
|
4855
4850
|
We[se.CHILD] = function(t, e) {
|
|
4856
|
-
return
|
|
4851
|
+
return $e(t.child, e) && $e(t.parent, e.parent());
|
|
4857
4852
|
};
|
|
4858
4853
|
We[se.PARENT] = function(t, e) {
|
|
4859
|
-
return
|
|
4860
|
-
return
|
|
4854
|
+
return $e(t.parent, e) && e.children().some(function(r) {
|
|
4855
|
+
return $e(t.child, r);
|
|
4861
4856
|
});
|
|
4862
4857
|
};
|
|
4863
4858
|
We[se.DESCENDANT] = function(t, e) {
|
|
4864
|
-
return
|
|
4865
|
-
return
|
|
4859
|
+
return $e(t.descendant, e) && e.ancestors().some(function(r) {
|
|
4860
|
+
return $e(t.ancestor, r);
|
|
4866
4861
|
});
|
|
4867
4862
|
};
|
|
4868
4863
|
We[se.ANCESTOR] = function(t, e) {
|
|
4869
|
-
return
|
|
4870
|
-
return
|
|
4864
|
+
return $e(t.ancestor, e) && e.descendants().some(function(r) {
|
|
4865
|
+
return $e(t.descendant, r);
|
|
4871
4866
|
});
|
|
4872
4867
|
};
|
|
4873
4868
|
We[se.COMPOUND_SPLIT] = function(t, e) {
|
|
4874
|
-
return
|
|
4869
|
+
return $e(t.subject, e) && $e(t.left, e) && $e(t.right, e);
|
|
4875
4870
|
};
|
|
4876
4871
|
We[se.TRUE] = function() {
|
|
4877
4872
|
return !0;
|
|
@@ -4891,7 +4886,7 @@ var fp = function(e) {
|
|
|
4891
4886
|
var a = function(i) {
|
|
4892
4887
|
for (var s = 0; s < r.length; s++) {
|
|
4893
4888
|
var o = r[s];
|
|
4894
|
-
if (
|
|
4889
|
+
if ($e(o, i))
|
|
4895
4890
|
return !0;
|
|
4896
4891
|
}
|
|
4897
4892
|
return !1;
|
|
@@ -4902,7 +4897,7 @@ var fp = function(e) {
|
|
|
4902
4897
|
}, cp = function(e) {
|
|
4903
4898
|
for (var r = this, a = 0; a < r.length; a++) {
|
|
4904
4899
|
var n = r[a];
|
|
4905
|
-
if (
|
|
4900
|
+
if ($e(n, e))
|
|
4906
4901
|
return !0;
|
|
4907
4902
|
}
|
|
4908
4903
|
return !1;
|
|
@@ -4915,12 +4910,12 @@ var fp = function(e) {
|
|
|
4915
4910
|
type: se.COLLECTION,
|
|
4916
4911
|
value: e.collection()
|
|
4917
4912
|
}]
|
|
4918
|
-
}) :
|
|
4913
|
+
}) : He(e) ? this.addQuery({
|
|
4919
4914
|
checks: [{
|
|
4920
4915
|
type: se.FILTER,
|
|
4921
4916
|
value: e
|
|
4922
4917
|
}]
|
|
4923
|
-
}) : ge(e) ? this.parse(e) || (this.invalid = !0) :
|
|
4918
|
+
}) : ge(e) ? this.parse(e) || (this.invalid = !0) : Ye("A selector must be created from a string; found "));
|
|
4924
4919
|
}, dr = hr.prototype;
|
|
4925
4920
|
[sp, vp].forEach(function(t) {
|
|
4926
4921
|
return be(dr, t);
|
|
@@ -5315,7 +5310,7 @@ Bt = ac = {
|
|
|
5315
5310
|
positions: function(e, r) {
|
|
5316
5311
|
if (Oe(e))
|
|
5317
5312
|
r ? this.silentPosition(e) : this.position(e);
|
|
5318
|
-
else if (
|
|
5313
|
+
else if (He(e)) {
|
|
5319
5314
|
var a = e, n = this.cy();
|
|
5320
5315
|
n.startBatch();
|
|
5321
5316
|
for (var i = 0; i < this.length; i++) {
|
|
@@ -5561,9 +5556,9 @@ var It = function(e) {
|
|
|
5561
5556
|
A += M, L += N, R += O, P += k;
|
|
5562
5557
|
var B = a || "main", _ = i.labelBounds, F = _[B] = _[B] || {};
|
|
5563
5558
|
F.x1 = A, F.y1 = R, F.x2 = L, F.y2 = P, F.w = L - A, F.h = P - R, F.leftPad = M, F.rightPad = N, F.topPad = O, F.botPad = k;
|
|
5564
|
-
var G = g && y.strValue === "autorotate",
|
|
5565
|
-
if (G ||
|
|
5566
|
-
var
|
|
5559
|
+
var G = g && y.strValue === "autorotate", Y = y.pfValue != null && y.pfValue !== 0;
|
|
5560
|
+
if (G || Y) {
|
|
5561
|
+
var $ = G ? da(i.rstyle, "labelAngle", a) : y.pfValue, H = Math.cos($), W = Math.sin($), ee = (A + L) / 2, ae = (R + P) / 2;
|
|
5567
5562
|
if (!g) {
|
|
5568
5563
|
switch (u.value) {
|
|
5569
5564
|
case "left":
|
|
@@ -5584,8 +5579,8 @@ var It = function(e) {
|
|
|
5584
5579
|
}
|
|
5585
5580
|
var J = function(Te, we) {
|
|
5586
5581
|
return Te = Te - ee, we = we - ae, {
|
|
5587
|
-
x: Te *
|
|
5588
|
-
y: Te * W + we *
|
|
5582
|
+
x: Te * H - we * W + ee,
|
|
5583
|
+
y: Te * W + we * H + ae
|
|
5589
5584
|
};
|
|
5590
5585
|
}, z = J(A, R), V = J(A, P), q = J(L, R), Z = J(L, P);
|
|
5591
5586
|
A = Math.min(z.x, V.x, q.x, Z.x), L = Math.max(z.x, V.x, q.x, Z.x), R = Math.min(z.y, V.y, q.y, Z.y), P = Math.max(z.y, V.y, q.y, Z.y);
|
|
@@ -5666,8 +5661,8 @@ var It = function(e) {
|
|
|
5666
5661
|
}
|
|
5667
5662
|
}
|
|
5668
5663
|
} else {
|
|
5669
|
-
var
|
|
5670
|
-
if (f =
|
|
5664
|
+
var Y = e.source(), $ = Y.position(), H = e.target(), W = H.position();
|
|
5665
|
+
if (f = $.x, c = W.x, v = $.y, h = W.y, f > c) {
|
|
5671
5666
|
var ee = f;
|
|
5672
5667
|
f = c, c = ee;
|
|
5673
5668
|
}
|
|
@@ -5892,13 +5887,6 @@ var bp = qa, wp = function(e, r) {
|
|
|
5892
5887
|
return Ep(this, r.get);
|
|
5893
5888
|
}, t;
|
|
5894
5889
|
}, {}), Pp = be({}, gp, mp, bp, Rp);
|
|
5895
|
-
/*!
|
|
5896
|
-
Event object based on jQuery events, MIT license
|
|
5897
|
-
|
|
5898
|
-
https://jquery.org/license/
|
|
5899
|
-
https://tldrlegal.com/license/mit-license
|
|
5900
|
-
https://github.com/jquery/jquery/blob/master/src/event.js
|
|
5901
|
-
*/
|
|
5902
5890
|
var lc = function(e, r) {
|
|
5903
5891
|
this.recycle(e, r);
|
|
5904
5892
|
};
|
|
@@ -5971,7 +5959,7 @@ function Zn() {
|
|
|
5971
5959
|
this.context = e || this.context, this.listeners = [], this.emitting = 0;
|
|
5972
5960
|
}
|
|
5973
5961
|
var gr = Zn.prototype, vc = function(e, r, a, n, i, s, o) {
|
|
5974
|
-
|
|
5962
|
+
He(n) && (i = n, n = null), o && (s == null ? s = o : s = be({}, s, o));
|
|
5975
5963
|
for (var u = Ve(a) ? a : a.split(/\s+/), l = 0; l < u.length; l++) {
|
|
5976
5964
|
var f = u[l];
|
|
5977
5965
|
if (!fr(f)) {
|
|
@@ -6010,7 +5998,7 @@ var gr = Zn.prototype, vc = function(e, r, a, n, i, s, o) {
|
|
|
6010
5998
|
};
|
|
6011
5999
|
gr.on = gr.addListener = function(t, e, r, a, n) {
|
|
6012
6000
|
return vc(this, function(i, s, o, u, l, f, c) {
|
|
6013
|
-
|
|
6001
|
+
He(f) && i.listeners.push({
|
|
6014
6002
|
event: s,
|
|
6015
6003
|
// full event string
|
|
6016
6004
|
callback: f,
|
|
@@ -6184,7 +6172,7 @@ var dc = {
|
|
|
6184
6172
|
return this;
|
|
6185
6173
|
if (ge(e) || Lt(e))
|
|
6186
6174
|
return new hr(e).filter(this);
|
|
6187
|
-
if (
|
|
6175
|
+
if (He(e)) {
|
|
6188
6176
|
for (var a = this.spawn(), n = this, i = 0; i < n.length; i++) {
|
|
6189
6177
|
var s = n[i], o = r ? e.apply(r, [s, i, n]) : e(s, i, n);
|
|
6190
6178
|
o && a.push(s);
|
|
@@ -6399,7 +6387,7 @@ var Np = {
|
|
|
6399
6387
|
return l !== 0 ? l : e.poolIndex() - r.poolIndex();
|
|
6400
6388
|
}, On = {
|
|
6401
6389
|
forEach: function(e, r) {
|
|
6402
|
-
if (
|
|
6390
|
+
if (He(e))
|
|
6403
6391
|
for (var a = this.length, n = 0; n < a; n++) {
|
|
6404
6392
|
var i = this[n], s = r ? e.apply(r, [i, n, this]) : e(i, n, this);
|
|
6405
6393
|
if (s === !1)
|
|
@@ -6438,7 +6426,7 @@ var Np = {
|
|
|
6438
6426
|
return !this.empty();
|
|
6439
6427
|
},
|
|
6440
6428
|
sort: function(e) {
|
|
6441
|
-
if (!
|
|
6429
|
+
if (!He(e))
|
|
6442
6430
|
return this;
|
|
6443
6431
|
var r = this.toArray().sort(e);
|
|
6444
6432
|
return this.spawn(r);
|
|
@@ -6855,7 +6843,7 @@ function Dl(t) {
|
|
|
6855
6843
|
if (e.length === 2) {
|
|
6856
6844
|
var a = e[0], n = e[1];
|
|
6857
6845
|
this.on(t.event, a, n);
|
|
6858
|
-
} else if (e.length === 1 &&
|
|
6846
|
+
} else if (e.length === 1 && He(e[0])) {
|
|
6859
6847
|
var i = e[0];
|
|
6860
6848
|
this.on(t.event, i);
|
|
6861
6849
|
} else if (e.length === 0 || e.length === 1 && Ve(e[0])) {
|
|
@@ -7167,7 +7155,7 @@ pt.componentsOf = pt.components;
|
|
|
7167
7155
|
var vt = function(e, r) {
|
|
7168
7156
|
var a = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !1, n = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : !1;
|
|
7169
7157
|
if (e === void 0) {
|
|
7170
|
-
|
|
7158
|
+
Ye("A collection must have a reference to the core");
|
|
7171
7159
|
return;
|
|
7172
7160
|
}
|
|
7173
7161
|
var i = new Zt(), s = !1;
|
|
@@ -7342,10 +7330,10 @@ qe.restore = function() {
|
|
|
7342
7330
|
else if (ne(p.id))
|
|
7343
7331
|
p.id = "" + p.id;
|
|
7344
7332
|
else if (fr(p.id) || !ge(p.id)) {
|
|
7345
|
-
|
|
7333
|
+
Ye("Can not create element with invalid string ID `" + p.id + "`"), v();
|
|
7346
7334
|
continue;
|
|
7347
7335
|
} else if (a.hasElementWithId(p.id)) {
|
|
7348
|
-
|
|
7336
|
+
Ye("Can not create second element with ID `" + p.id + "`"), v();
|
|
7349
7337
|
continue;
|
|
7350
7338
|
}
|
|
7351
7339
|
}
|
|
@@ -7357,7 +7345,7 @@ qe.restore = function() {
|
|
|
7357
7345
|
if (h.isEdge()) {
|
|
7358
7346
|
for (var b = h, m = ["source", "target"], E = m.length, T = !1, S = 0; S < E; S++) {
|
|
7359
7347
|
var w = m[S], x = p[w];
|
|
7360
|
-
ne(x) && (x = p[w] = "" + p[w]), x == null || x === "" ? (
|
|
7348
|
+
ne(x) && (x = p[w] = "" + p[w]), x == null || x === "" ? (Ye("Can not create edge `" + g + "` with unspecified " + w), T = !0) : a.hasElementWithId(x) || (Ye("Can not create edge `" + g + "` with nonexistant " + w + " `" + x + "`"), T = !0);
|
|
7361
7349
|
}
|
|
7362
7350
|
if (T) {
|
|
7363
7351
|
v();
|
|
@@ -7555,7 +7543,6 @@ var Up = {
|
|
|
7555
7543
|
return e.remove();
|
|
7556
7544
|
}
|
|
7557
7545
|
};
|
|
7558
|
-
/*! Bezier curve function generator. Copyright Gaetan Renaudeau. MIT License: http://en.wikipedia.org/wiki/MIT_License */
|
|
7559
7546
|
function qp(t, e, r, a) {
|
|
7560
7547
|
var n = 4, i = 1e-3, s = 1e-7, o = 10, u = 11, l = 1 / (u - 1), f = typeof Float32Array < "u";
|
|
7561
7548
|
if (arguments.length !== 4)
|
|
@@ -7629,8 +7616,7 @@ function qp(t, e, r, a) {
|
|
|
7629
7616
|
return C;
|
|
7630
7617
|
}, x;
|
|
7631
7618
|
}
|
|
7632
|
-
|
|
7633
|
-
var Yp = /* @__PURE__ */ (function() {
|
|
7619
|
+
var $p = /* @__PURE__ */ (function() {
|
|
7634
7620
|
function t(a) {
|
|
7635
7621
|
return -a.tension * a.x - a.friction * a.v;
|
|
7636
7622
|
}
|
|
@@ -7712,7 +7698,7 @@ var Yp = /* @__PURE__ */ (function() {
|
|
|
7712
7698
|
spring: function(e, r, a) {
|
|
7713
7699
|
if (a === 0)
|
|
7714
7700
|
return gn.linear;
|
|
7715
|
-
var n =
|
|
7701
|
+
var n = $p(e, r, a);
|
|
7716
7702
|
return function(i, s, o) {
|
|
7717
7703
|
return i + (s - i) * n(o);
|
|
7718
7704
|
};
|
|
@@ -7746,7 +7732,7 @@ function Vr(t, e, r, a, n) {
|
|
|
7746
7732
|
return u;
|
|
7747
7733
|
}
|
|
7748
7734
|
}
|
|
7749
|
-
function
|
|
7735
|
+
function Yp(t, e, r, a) {
|
|
7750
7736
|
var n = !a, i = t._private, s = e._private, o = s.easing, u = s.startTime, l = a ? t : t.cy(), f = l.style();
|
|
7751
7737
|
if (!s.easingImpl)
|
|
7752
7738
|
if (o == null)
|
|
@@ -7788,7 +7774,7 @@ function Hp(t, e, r, a) {
|
|
|
7788
7774
|
function pa(t, e) {
|
|
7789
7775
|
return t == null || e == null ? !1 : ne(t) && ne(e) ? !0 : !!(t && e);
|
|
7790
7776
|
}
|
|
7791
|
-
function
|
|
7777
|
+
function Hp(t, e, r, a) {
|
|
7792
7778
|
var n = e._private;
|
|
7793
7779
|
n.started = !0, n.startTime = r - n.progress * n.duration;
|
|
7794
7780
|
}
|
|
@@ -7812,7 +7798,7 @@ function kl(t, e) {
|
|
|
7812
7798
|
h.splice(b, 1), E.hooked = !1, E.playing = !1, E.started = !1, y(E.frames);
|
|
7813
7799
|
continue;
|
|
7814
7800
|
}
|
|
7815
|
-
!E.playing && !E.applying || (E.playing && E.applying && (E.applying = !1), E.started ||
|
|
7801
|
+
!E.playing && !E.applying || (E.playing && E.applying && (E.applying = !1), E.started || Hp(f, m, t), Yp(f, m, t, c), E.applying && (E.applying = !1), y(E.frames), E.step != null && E.step(t), m.completed() && (h.splice(b, 1), E.hooked = !1, E.playing = !1, E.started = !1, y(E.completes)), p = !0);
|
|
7816
7802
|
}
|
|
7817
7803
|
return !c && h.length === 0 && d.length === 0 && a.push(f), p;
|
|
7818
7804
|
}
|
|
@@ -7823,7 +7809,7 @@ function kl(t, e) {
|
|
|
7823
7809
|
var l = n(e, !0);
|
|
7824
7810
|
(i || l) && (r.length > 0 ? e.notify("draw", r) : e.notify("draw")), r.unmerge(a), e.emit("step");
|
|
7825
7811
|
}
|
|
7826
|
-
var
|
|
7812
|
+
var Xp = {
|
|
7827
7813
|
// pull in animation functions
|
|
7828
7814
|
animate: _e.animate(),
|
|
7829
7815
|
animation: _e.animation(),
|
|
@@ -7900,7 +7886,7 @@ var $p = {
|
|
|
7900
7886
|
}
|
|
7901
7887
|
};
|
|
7902
7888
|
_e.eventAliasesOn(yc);
|
|
7903
|
-
var
|
|
7889
|
+
var Ys = {
|
|
7904
7890
|
png: function(e) {
|
|
7905
7891
|
var r = this._private.renderer;
|
|
7906
7892
|
return e = e || {}, r.png(e);
|
|
@@ -7910,21 +7896,21 @@ var Hs = {
|
|
|
7910
7896
|
return e = e || {}, e.bg = e.bg || "#fff", r.jpg(e);
|
|
7911
7897
|
}
|
|
7912
7898
|
};
|
|
7913
|
-
|
|
7899
|
+
Ys.jpeg = Ys.jpg;
|
|
7914
7900
|
var pn = {
|
|
7915
7901
|
layout: function(e) {
|
|
7916
7902
|
var r = this;
|
|
7917
7903
|
if (e == null) {
|
|
7918
|
-
|
|
7904
|
+
Ye("Layout options must be specified to make a layout");
|
|
7919
7905
|
return;
|
|
7920
7906
|
}
|
|
7921
7907
|
if (e.name == null) {
|
|
7922
|
-
|
|
7908
|
+
Ye("A `name` must be specified to make a layout");
|
|
7923
7909
|
return;
|
|
7924
7910
|
}
|
|
7925
7911
|
var a = e.name, n = r.extension("layout", a);
|
|
7926
7912
|
if (n == null) {
|
|
7927
|
-
|
|
7913
|
+
Ye("No such layout `" + a + "` found. Did you forget to import it and `cytoscape.use()` it?");
|
|
7928
7914
|
return;
|
|
7929
7915
|
}
|
|
7930
7916
|
var i;
|
|
@@ -8014,7 +8000,7 @@ var Kp = {
|
|
|
8014
8000
|
webglBatchSize: 2048,
|
|
8015
8001
|
webglTexPerBatch: 14,
|
|
8016
8002
|
webglBgColor: [255, 255, 255]
|
|
8017
|
-
}),
|
|
8003
|
+
}), Hs = {
|
|
8018
8004
|
renderTo: function(e, r, a, n) {
|
|
8019
8005
|
var i = this._private.renderer;
|
|
8020
8006
|
return i.renderTo(e, r, a, n), this;
|
|
@@ -8031,7 +8017,7 @@ var Kp = {
|
|
|
8031
8017
|
initRenderer: function(e) {
|
|
8032
8018
|
var r = this, a = r.extension("renderer", e.name);
|
|
8033
8019
|
if (a == null) {
|
|
8034
|
-
|
|
8020
|
+
Ye("Can not initialise: No such renderer `".concat(e.name, "` found. Did you forget to import it and `cytoscape.use()` it?"));
|
|
8035
8021
|
return;
|
|
8036
8022
|
}
|
|
8037
8023
|
e.wheelSensitivity !== void 0 && Ge("You have set a custom wheel sensitivity. This will make your app zoom unnaturally when using mainstream mice. You should change this value from the default only if you can guarantee that all your users will use the same hardware and OS configuration as your current machine.");
|
|
@@ -8057,7 +8043,7 @@ var Kp = {
|
|
|
8057
8043
|
return this.off("render", e);
|
|
8058
8044
|
}
|
|
8059
8045
|
};
|
|
8060
|
-
|
|
8046
|
+
Hs.invalidateDimensions = Hs.resize;
|
|
8061
8047
|
var yn = {
|
|
8062
8048
|
// get a collection
|
|
8063
8049
|
// - empty collection on no args
|
|
@@ -8190,7 +8176,7 @@ lt.updateStyleHints = function(t) {
|
|
|
8190
8176
|
a = Object.keys(u);
|
|
8191
8177
|
for (var l = 0; l < n.length; l++) {
|
|
8192
8178
|
var f = n[l];
|
|
8193
|
-
e.styleKeys[f] = [Ar,
|
|
8179
|
+
e.styleKeys[f] = [Ar, Xr];
|
|
8194
8180
|
}
|
|
8195
8181
|
for (var c = function(q, Z) {
|
|
8196
8182
|
return e.styleKeys[Z][0] = Sa(q, e.styleKeys[Z][0]);
|
|
@@ -8218,7 +8204,7 @@ lt.updateStyleHints = function(t) {
|
|
|
8218
8204
|
d(m.strValue, S);
|
|
8219
8205
|
}
|
|
8220
8206
|
}
|
|
8221
|
-
for (var P = [Ar,
|
|
8207
|
+
for (var P = [Ar, Xr], M = 0; M < n.length; M++) {
|
|
8222
8208
|
var N = n[M], O = e.styleKeys[N];
|
|
8223
8209
|
P[0] = Sa(O[0], P[0]), P[1] = Aa(O[1], P[1]);
|
|
8224
8210
|
}
|
|
@@ -8233,10 +8219,10 @@ lt.updateStyleHints = function(t) {
|
|
|
8233
8219
|
e.targetLabelKey = rr(F), e.targetLabelStyleKey = rr(Qa(k.commonLabel, F));
|
|
8234
8220
|
}
|
|
8235
8221
|
if (o) {
|
|
8236
|
-
var G = e.styleKeys,
|
|
8222
|
+
var G = e.styleKeys, Y = G.nodeBody, $ = G.nodeBorder, H = G.nodeOutline, W = G.backgroundImage, ee = G.compound, ae = G.pie, J = G.stripe, z = [Y, $, H, W, ee, ae, J].filter(function(V) {
|
|
8237
8223
|
return V != null;
|
|
8238
|
-
}).reduce(Qa, [Ar,
|
|
8239
|
-
e.nodeKey = rr(z), e.hasPie = ae != null && ae[0] !== Ar && ae[1] !==
|
|
8224
|
+
}).reduce(Qa, [Ar, Xr]);
|
|
8225
|
+
e.nodeKey = rr(z), e.hasPie = ae != null && ae[0] !== Ar && ae[1] !== Xr, e.hasStripe = J != null && J[0] !== Ar && J[1] !== Xr;
|
|
8240
8226
|
}
|
|
8241
8227
|
return s !== e.styleKey;
|
|
8242
8228
|
};
|
|
@@ -8245,11 +8231,11 @@ lt.clearStyleHints = function(t) {
|
|
|
8245
8231
|
e.styleCxtKey = "", e.styleKeys = {}, e.styleKey = null, e.labelKey = null, e.labelStyleKey = null, e.sourceLabelKey = null, e.sourceLabelStyleKey = null, e.targetLabelKey = null, e.targetLabelStyleKey = null, e.nodeKey = null, e.hasPie = null, e.hasStripe = null;
|
|
8246
8232
|
};
|
|
8247
8233
|
lt.applyParsedProperty = function(t, e) {
|
|
8248
|
-
var r = this, a = e, n = t._private.style, i, s = r.types, o = r.properties[a.name].type, u = a.bypass, l = n[a.name], f = l && l.bypass, c = t._private, v = "mapping", h = function(
|
|
8249
|
-
return
|
|
8234
|
+
var r = this, a = e, n = t._private.style, i, s = r.types, o = r.properties[a.name].type, u = a.bypass, l = n[a.name], f = l && l.bypass, c = t._private, v = "mapping", h = function(Y) {
|
|
8235
|
+
return Y == null ? null : Y.pfValue != null ? Y.pfValue : Y.value;
|
|
8250
8236
|
}, d = function() {
|
|
8251
|
-
var
|
|
8252
|
-
r.checkTriggers(t, a.name,
|
|
8237
|
+
var Y = h(l), $ = h(a);
|
|
8238
|
+
r.checkTriggers(t, a.name, Y, $);
|
|
8253
8239
|
};
|
|
8254
8240
|
if (e.name === "curve-style" && t.isEdge() && // loops must be bundled beziers
|
|
8255
8241
|
(e.value !== "bezier" && t.isLoop() || // edges connected to compound nodes can not be haystacks
|
|
@@ -8407,8 +8393,8 @@ lt.checkParallelEdgesBoundsTrigger = function(t, e, r, a) {
|
|
|
8407
8393
|
lt.checkTriggers = function(t, e, r, a) {
|
|
8408
8394
|
t.dirtyStyleCache(), this.checkZOrderTrigger(t, e, r, a), this.checkBoundsTrigger(t, e, r, a), this.checkConnectedEdgesBoundsTrigger(t, e, r, a), this.checkParallelEdgesBoundsTrigger(t, e, r, a);
|
|
8409
8395
|
};
|
|
8410
|
-
var
|
|
8411
|
-
|
|
8396
|
+
var $a = {};
|
|
8397
|
+
$a.applyBypass = function(t, e, r, a) {
|
|
8412
8398
|
var n = this, i = [], s = !0;
|
|
8413
8399
|
if (e === "*" || e === "**") {
|
|
8414
8400
|
if (r !== void 0)
|
|
@@ -8448,17 +8434,17 @@ Ya.applyBypass = function(t, e, r, a) {
|
|
|
8448
8434
|
}
|
|
8449
8435
|
return b;
|
|
8450
8436
|
};
|
|
8451
|
-
|
|
8437
|
+
$a.overrideBypass = function(t, e, r) {
|
|
8452
8438
|
e = so(e);
|
|
8453
8439
|
for (var a = 0; a < t.length; a++) {
|
|
8454
8440
|
var n = t[a], i = n._private.style[e], s = this.properties[e].type, o = s.color, u = s.mutiple, l = i ? i.pfValue != null ? i.pfValue : i.value : null;
|
|
8455
8441
|
!i || !i.bypass ? this.applyBypass(n, e, r) : (i.value = r, i.pfValue != null && (i.pfValue = r), o ? i.strValue = "rgb(" + r.join(",") + ")" : u ? i.strValue = r.join(" ") : i.strValue = "" + r, this.updateStyleHints(n)), this.checkTriggers(n, e, l, r);
|
|
8456
8442
|
}
|
|
8457
8443
|
};
|
|
8458
|
-
|
|
8444
|
+
$a.removeAllBypasses = function(t, e) {
|
|
8459
8445
|
return this.removeBypasses(t, this.propertyNames, e);
|
|
8460
8446
|
};
|
|
8461
|
-
|
|
8447
|
+
$a.removeBypasses = function(t, e, r) {
|
|
8462
8448
|
for (var a = !0, n = 0; n < t.length; n++) {
|
|
8463
8449
|
for (var i = t[n], s = {}, o = 0; o < e.length; o++) {
|
|
8464
8450
|
var u = e[o], l = this.properties[u], f = i.pstyle(l.name);
|
|
@@ -8658,7 +8644,7 @@ To.fromString = function(t) {
|
|
|
8658
8644
|
};
|
|
8659
8645
|
var Qe = {};
|
|
8660
8646
|
(function() {
|
|
8661
|
-
var t = at, e =
|
|
8647
|
+
var t = at, e = Yv, r = Xv, a = Wv, n = Kv, i = function(V) {
|
|
8662
8648
|
return "^" + V + "\\s*\\(\\s*([\\w\\.]+)\\s*\\)$";
|
|
8663
8649
|
}, s = function(V) {
|
|
8664
8650
|
var q = t + "|\\w+|" + e + "|" + r + "|" + a + "|" + n;
|
|
@@ -9737,7 +9723,7 @@ var Qe = {};
|
|
|
9737
9723
|
return V.groupKey = z;
|
|
9738
9724
|
});
|
|
9739
9725
|
});
|
|
9740
|
-
var
|
|
9726
|
+
var Y = Qe.aliases = [{
|
|
9741
9727
|
name: "content",
|
|
9742
9728
|
pointsTo: "label"
|
|
9743
9729
|
}, {
|
|
@@ -9774,12 +9760,12 @@ var Qe = {};
|
|
|
9774
9760
|
Qe.propertyNames = B.map(function(z) {
|
|
9775
9761
|
return z.name;
|
|
9776
9762
|
});
|
|
9777
|
-
for (var
|
|
9778
|
-
var
|
|
9779
|
-
B[
|
|
9763
|
+
for (var $ = 0; $ < B.length; $++) {
|
|
9764
|
+
var H = B[$];
|
|
9765
|
+
B[H.name] = H;
|
|
9780
9766
|
}
|
|
9781
|
-
for (var W = 0; W <
|
|
9782
|
-
var ee =
|
|
9767
|
+
for (var W = 0; W < Y.length; W++) {
|
|
9768
|
+
var ee = Y[W], ae = B[ee.pointsTo], J = {
|
|
9783
9769
|
name: ee.name,
|
|
9784
9770
|
alias: !0,
|
|
9785
9771
|
pointsTo: ae
|
|
@@ -10064,7 +10050,7 @@ Qe.addDefaultStylesheet = function() {
|
|
|
10064
10050
|
var ei = {};
|
|
10065
10051
|
ei.parse = function(t, e, r, a) {
|
|
10066
10052
|
var n = this;
|
|
10067
|
-
if (
|
|
10053
|
+
if (He(e))
|
|
10068
10054
|
return n.parseImplWarn(t, e, r, a);
|
|
10069
10055
|
var i = a === "mapping" || a === !0 || a === !1 || a == null ? "dontcare" : a, s = r ? "t" : "f", o = "" + e, u = Af(t, o, s, i), l = n.propCache = n.propCache || [], f;
|
|
10070
10056
|
return (f = l[u]) || (f = l[u] = n.parseImplWarn(t, e, r, a)), (r || a === "mapping") && (f = Ut(f), f && (f.value = Ut(f.value))), f;
|
|
@@ -10092,7 +10078,7 @@ ei.parseImpl = function(t, e, r, a) {
|
|
|
10092
10078
|
bypass: !0,
|
|
10093
10079
|
deleteBypass: !0
|
|
10094
10080
|
};
|
|
10095
|
-
if (
|
|
10081
|
+
if (He(e))
|
|
10096
10082
|
return {
|
|
10097
10083
|
name: t,
|
|
10098
10084
|
value: e,
|
|
@@ -10235,12 +10221,12 @@ ei.parseImpl = function(t, e, r, a) {
|
|
|
10235
10221
|
} : null;
|
|
10236
10222
|
} else if (l.regex || l.regexes) {
|
|
10237
10223
|
if (l.enums) {
|
|
10238
|
-
var
|
|
10239
|
-
if (
|
|
10240
|
-
return
|
|
10224
|
+
var Y = A();
|
|
10225
|
+
if (Y)
|
|
10226
|
+
return Y;
|
|
10241
10227
|
}
|
|
10242
|
-
for (var
|
|
10243
|
-
var W = new RegExp(
|
|
10228
|
+
for (var $ = l.regexes ? l.regexes : [l.regex], H = 0; H < $.length; H++) {
|
|
10229
|
+
var W = new RegExp($[H]), ee = W.exec(e);
|
|
10244
10230
|
if (ee)
|
|
10245
10231
|
return {
|
|
10246
10232
|
name: t,
|
|
@@ -10261,7 +10247,7 @@ var ut = function(e) {
|
|
|
10261
10247
|
if (!(this instanceof ut))
|
|
10262
10248
|
return new ut(e);
|
|
10263
10249
|
if (!io(e)) {
|
|
10264
|
-
|
|
10250
|
+
Ye("A style must have a core reference");
|
|
10265
10251
|
return;
|
|
10266
10252
|
}
|
|
10267
10253
|
this._private = {
|
|
@@ -10326,7 +10312,7 @@ ut.fromJson = function(t, e) {
|
|
|
10326
10312
|
ut.fromString = function(t, e) {
|
|
10327
10313
|
return new ut(t).fromString(e);
|
|
10328
10314
|
};
|
|
10329
|
-
[lt,
|
|
10315
|
+
[lt, $a, xo, qt, jn, To, Qe, ei].forEach(function(t) {
|
|
10330
10316
|
be(yt, t);
|
|
10331
10317
|
});
|
|
10332
10318
|
ut.types = yt.types;
|
|
@@ -10774,7 +10760,7 @@ var ka = function(e) {
|
|
|
10774
10760
|
f([o.style, o.elements], function(h) {
|
|
10775
10761
|
var d = h[0], p = h[1];
|
|
10776
10762
|
l.styleEnabled && r.style().append(d), v(p, function() {
|
|
10777
|
-
r.startAnimationLoop(), l.ready = !0,
|
|
10763
|
+
r.startAnimationLoop(), l.ready = !0, He(o.ready) && r.on("ready", o.ready);
|
|
10778
10764
|
for (var g = 0; g < i.length; g++) {
|
|
10779
10765
|
var y = i[g];
|
|
10780
10766
|
r.on("ready", y);
|
|
@@ -10914,7 +10900,7 @@ be(kn, {
|
|
|
10914
10900
|
}
|
|
10915
10901
|
});
|
|
10916
10902
|
kn.$id = kn.getElementById;
|
|
10917
|
-
[Up,
|
|
10903
|
+
[Up, Xp, yc, Ys, pn, Kp, Hs, yn, Jp, Or, Oa].forEach(function(t) {
|
|
10918
10904
|
be(kn, t);
|
|
10919
10905
|
});
|
|
10920
10906
|
var ey = {
|
|
@@ -11076,7 +11062,7 @@ mc.prototype.run = function() {
|
|
|
11076
11062
|
var k = a[O], B = k.layoutDimensions(t), _ = B.w, F = B.h;
|
|
11077
11063
|
N = Math.max(N, _, F);
|
|
11078
11064
|
}
|
|
11079
|
-
var G = {},
|
|
11065
|
+
var G = {}, Y = function(ie) {
|
|
11080
11066
|
if (G[ie.id()])
|
|
11081
11067
|
return G[ie.id()];
|
|
11082
11068
|
for (var he = Ur(ie).depth, de = ie.neighborhood(), xe = 0, pe = 0, De = 0; De < de.length; De++) {
|
|
@@ -11093,21 +11079,21 @@ mc.prototype.run = function() {
|
|
|
11093
11079
|
}
|
|
11094
11080
|
}
|
|
11095
11081
|
return pe = Math.max(1, pe), xe = xe / pe, pe === 0 && (xe = 0), G[ie.id()] = xe, xe;
|
|
11096
|
-
},
|
|
11097
|
-
var de =
|
|
11082
|
+
}, $ = function(ie, he) {
|
|
11083
|
+
var de = Y(ie), xe = Y(he), pe = de - xe;
|
|
11098
11084
|
return pe === 0 ? bf(ie.id(), he.id()) : pe;
|
|
11099
11085
|
};
|
|
11100
|
-
t.depthSort !== void 0 && (
|
|
11101
|
-
for (var
|
|
11102
|
-
y[W].sort(
|
|
11086
|
+
t.depthSort !== void 0 && ($ = t.depthSort);
|
|
11087
|
+
for (var H = y.length, W = 0; W < H; W++)
|
|
11088
|
+
y[W].sort($), x(W);
|
|
11103
11089
|
for (var ee = [], ae = 0; ae < T.length; ae++)
|
|
11104
11090
|
ee.push(T[ae]);
|
|
11105
11091
|
var J = function() {
|
|
11106
|
-
for (var ie = 0; ie <
|
|
11092
|
+
for (var ie = 0; ie < H; ie++)
|
|
11107
11093
|
x(ie);
|
|
11108
11094
|
};
|
|
11109
|
-
ee.length && (y.unshift(ee),
|
|
11110
|
-
for (var z = 0, V = 0; V <
|
|
11095
|
+
ee.length && (y.unshift(ee), H = y.length, J());
|
|
11096
|
+
for (var z = 0, V = 0; V < H; V++)
|
|
11111
11097
|
z = Math.max(y[V].length, z);
|
|
11112
11098
|
var q = {
|
|
11113
11099
|
x: u.x1 + u.w / 2,
|
|
@@ -11126,9 +11112,9 @@ mc.prototype.run = function() {
|
|
|
11126
11112
|
h: -1
|
|
11127
11113
|
}), re = Math.max(
|
|
11128
11114
|
// only one depth
|
|
11129
|
-
|
|
11115
|
+
H === 1 ? 0 : (
|
|
11130
11116
|
// inside a bounding box, no need for top & bottom padding
|
|
11131
|
-
o ? (u.h - t.padding * 2 - Z.h) / (
|
|
11117
|
+
o ? (u.h - t.padding * 2 - Z.h) / (H - 1) : (u.h - t.padding * 2 - Z.h) / (H + 1)
|
|
11132
11118
|
),
|
|
11133
11119
|
N
|
|
11134
11120
|
), ve = y.reduce(function(ye, ie) {
|
|
@@ -11136,9 +11122,9 @@ mc.prototype.run = function() {
|
|
|
11136
11122
|
}, 0), Pe = function(ie) {
|
|
11137
11123
|
var he = Ur(ie), de = he.depth, xe = he.index;
|
|
11138
11124
|
if (t.circle) {
|
|
11139
|
-
var pe = Math.min(u.w / 2 /
|
|
11125
|
+
var pe = Math.min(u.w / 2 / H, u.h / 2 / H);
|
|
11140
11126
|
pe = Math.max(pe, N);
|
|
11141
|
-
var De = pe * de + pe - (
|
|
11127
|
+
var De = pe * de + pe - (H > 0 && y[0].length <= 3 ? pe / 2 : 0), Ie = 2 * Math.PI / y[de].length * xe;
|
|
11142
11128
|
return de === 0 && y[0].length === 1 && (De = 1), {
|
|
11143
11129
|
x: q.x + De * Math.cos(Ie),
|
|
11144
11130
|
y: q.y + De * Math.sin(Ie)
|
|
@@ -11153,7 +11139,7 @@ mc.prototype.run = function() {
|
|
|
11153
11139
|
N
|
|
11154
11140
|
), Fe = {
|
|
11155
11141
|
x: q.x + (xe + 1 - (Ne + 1) / 2) * Be,
|
|
11156
|
-
y: q.y + (de + 1 - (
|
|
11142
|
+
y: q.y + (de + 1 - (H + 1) / 2) * re
|
|
11157
11143
|
};
|
|
11158
11144
|
return Fe;
|
|
11159
11145
|
}
|
|
@@ -11163,7 +11149,7 @@ mc.prototype.run = function() {
|
|
|
11163
11149
|
upward: 180,
|
|
11164
11150
|
rightward: -90
|
|
11165
11151
|
};
|
|
11166
|
-
Object.keys(Te).indexOf(t.direction) === -1 &&
|
|
11152
|
+
Object.keys(Te).indexOf(t.direction) === -1 && Ye("Invalid direction '".concat(t.direction, "' specified for breadthfirst layout. Valid values are: ").concat(Object.keys(Te).join(", ")));
|
|
11167
11153
|
var we = function(ie) {
|
|
11168
11154
|
return yh(Pe(ie), u, Te[t.direction]);
|
|
11169
11155
|
};
|
|
@@ -11349,22 +11335,22 @@ wc.prototype.run = function() {
|
|
|
11349
11335
|
k = Math.max(k, G);
|
|
11350
11336
|
}
|
|
11351
11337
|
B = 0;
|
|
11352
|
-
for (var
|
|
11353
|
-
var
|
|
11354
|
-
|
|
11338
|
+
for (var Y = 0; Y < y.length; Y++) {
|
|
11339
|
+
var $ = y[Y];
|
|
11340
|
+
Y === 0 && (B = $.r), $.r = B, B += k;
|
|
11355
11341
|
}
|
|
11356
11342
|
}
|
|
11357
|
-
for (var
|
|
11343
|
+
for (var H = {}, W = 0; W < y.length; W++)
|
|
11358
11344
|
for (var ee = y[W], ae = ee.dTheta, J = ee.r, z = 0; z < ee.length; z++) {
|
|
11359
11345
|
var V = ee[z], q = e.startAngle + (r ? 1 : -1) * ae * z, Z = {
|
|
11360
11346
|
x: o.x + J * Math.cos(q),
|
|
11361
11347
|
y: o.y + J * Math.sin(q)
|
|
11362
11348
|
};
|
|
11363
|
-
|
|
11349
|
+
H[V.node.id()] = Z;
|
|
11364
11350
|
}
|
|
11365
11351
|
return n.nodes().layoutPositions(this, e, function(re) {
|
|
11366
11352
|
var ve = re.id();
|
|
11367
|
-
return
|
|
11353
|
+
return H[ve];
|
|
11368
11354
|
}), this;
|
|
11369
11355
|
};
|
|
11370
11356
|
var As, ny = {
|
|
@@ -11519,7 +11505,7 @@ var iy = function(e, r, a) {
|
|
|
11519
11505
|
}
|
|
11520
11506
|
for (var f = 0; f < o.nodeSize; f++) {
|
|
11521
11507
|
var d = i[f], p = d.layoutDimensions(a), g = {};
|
|
11522
|
-
g.isLocked = d.locked(), g.id = d.data("id"), g.parentId = d.data("parent"), g.cmptId = l[d.id()], g.children = [], g.positionX = d.position("x"), g.positionY = d.position("y"), g.offsetX = 0, g.offsetY = 0, g.height = p.w, g.width = p.h, g.maxX = g.positionX + g.width / 2, g.minX = g.positionX - g.width / 2, g.maxY = g.positionY + g.height / 2, g.minY = g.positionY - g.height / 2, g.padLeft = parseFloat(d.style("padding")), g.padRight = parseFloat(d.style("padding")), g.padTop = parseFloat(d.style("padding")), g.padBottom = parseFloat(d.style("padding")), g.nodeRepulsion =
|
|
11508
|
+
g.isLocked = d.locked(), g.id = d.data("id"), g.parentId = d.data("parent"), g.cmptId = l[d.id()], g.children = [], g.positionX = d.position("x"), g.positionY = d.position("y"), g.offsetX = 0, g.offsetY = 0, g.height = p.w, g.width = p.h, g.maxX = g.positionX + g.width / 2, g.minX = g.positionX - g.width / 2, g.maxY = g.positionY + g.height / 2, g.minY = g.positionY - g.height / 2, g.padLeft = parseFloat(d.style("padding")), g.padRight = parseFloat(d.style("padding")), g.padTop = parseFloat(d.style("padding")), g.padBottom = parseFloat(d.style("padding")), g.nodeRepulsion = He(a.nodeRepulsion) ? a.nodeRepulsion(d) : a.nodeRepulsion, o.layoutNodes.push(g), o.idToIndex[g.id] = f;
|
|
11523
11509
|
}
|
|
11524
11510
|
for (var y = [], b = 0, m = -1, E = [], f = 0; f < o.nodeSize; f++) {
|
|
11525
11511
|
var d = o.layoutNodes[f], T = d.parentId;
|
|
@@ -11541,7 +11527,7 @@ var iy = function(e, r, a) {
|
|
|
11541
11527
|
for (var f = 0; f < o.edgeSize; f++) {
|
|
11542
11528
|
var A = n[f], L = {};
|
|
11543
11529
|
L.id = A.data("id"), L.sourceId = A.data("source"), L.targetId = A.data("target");
|
|
11544
|
-
var R =
|
|
11530
|
+
var R = He(a.idealEdgeLength) ? a.idealEdgeLength(A) : a.idealEdgeLength, P = He(a.edgeElasticity) ? a.edgeElasticity(A) : a.edgeElasticity, M = o.idToIndex[L.sourceId], N = o.idToIndex[L.targetId], O = o.indexToGraph[M], k = o.indexToGraph[N];
|
|
11545
11531
|
if (O != k) {
|
|
11546
11532
|
for (var B = sy(L.sourceId, L.targetId, o), _ = o.graphSet[B], F = 0, g = o.layoutNodes[M]; _.indexOf(g.id) === -1; )
|
|
11547
11533
|
g = o.layoutNodes[o.idToIndex[g.parentId]], F++;
|
|
@@ -11815,23 +11801,23 @@ Cc.prototype.run = function() {
|
|
|
11815
11801
|
h: r.height()
|
|
11816
11802
|
});
|
|
11817
11803
|
if (i.h === 0 || i.w === 0)
|
|
11818
|
-
a.nodes().layoutPositions(this, e, function(
|
|
11804
|
+
a.nodes().layoutPositions(this, e, function(Y) {
|
|
11819
11805
|
return {
|
|
11820
11806
|
x: i.x1,
|
|
11821
11807
|
y: i.y1
|
|
11822
11808
|
};
|
|
11823
11809
|
});
|
|
11824
11810
|
else {
|
|
11825
|
-
var s = n.size(), o = Math.sqrt(s * i.h / i.w), u = Math.round(o), l = Math.round(i.w / i.h * o), f = function(
|
|
11826
|
-
if (
|
|
11811
|
+
var s = n.size(), o = Math.sqrt(s * i.h / i.w), u = Math.round(o), l = Math.round(i.w / i.h * o), f = function($) {
|
|
11812
|
+
if ($ == null)
|
|
11827
11813
|
return Math.min(u, l);
|
|
11828
|
-
var
|
|
11829
|
-
|
|
11830
|
-
}, c = function(
|
|
11831
|
-
if (
|
|
11814
|
+
var H = Math.min(u, l);
|
|
11815
|
+
H == u ? u = $ : l = $;
|
|
11816
|
+
}, c = function($) {
|
|
11817
|
+
if ($ == null)
|
|
11832
11818
|
return Math.max(u, l);
|
|
11833
|
-
var
|
|
11834
|
-
|
|
11819
|
+
var H = Math.max(u, l);
|
|
11820
|
+
H == u ? u = $ : l = $;
|
|
11835
11821
|
}, v = e.rows, h = e.cols != null ? e.cols : e.columns;
|
|
11836
11822
|
if (v != null && h != null)
|
|
11837
11823
|
u = v, l = h;
|
|
@@ -11855,10 +11841,10 @@ Cc.prototype.run = function() {
|
|
|
11855
11841
|
var w = T.layoutDimensions(e), x = e.avoidOverlapPadding, C = w.w + x, D = w.h + x;
|
|
11856
11842
|
b = Math.max(b, C), m = Math.max(m, D);
|
|
11857
11843
|
}
|
|
11858
|
-
for (var A = {}, L = function(
|
|
11859
|
-
return !!A["c-" +
|
|
11860
|
-
}, R = function(
|
|
11861
|
-
A["c-" +
|
|
11844
|
+
for (var A = {}, L = function($, H) {
|
|
11845
|
+
return !!A["c-" + $ + "-" + H];
|
|
11846
|
+
}, R = function($, H) {
|
|
11847
|
+
A["c-" + $ + "-" + H] = !0;
|
|
11862
11848
|
}, P = 0, M = 0, N = function() {
|
|
11863
11849
|
M++, M >= l && (M = 0, P++);
|
|
11864
11850
|
}, O = {}, k = 0; k < n.length; k++) {
|
|
@@ -11877,11 +11863,11 @@ Cc.prototype.run = function() {
|
|
|
11877
11863
|
O[B.id()] = F, R(F.row, F.col);
|
|
11878
11864
|
}
|
|
11879
11865
|
}
|
|
11880
|
-
var G = function(
|
|
11866
|
+
var G = function($, H) {
|
|
11881
11867
|
var W, ee;
|
|
11882
|
-
if (
|
|
11868
|
+
if ($.locked() || $.isParent())
|
|
11883
11869
|
return !1;
|
|
11884
|
-
var ae = O[
|
|
11870
|
+
var ae = O[$.id()];
|
|
11885
11871
|
if (ae)
|
|
11886
11872
|
W = ae.col * b + b / 2 + i.x1, ee = ae.row * m + m / 2 + i.y1;
|
|
11887
11873
|
else {
|
|
@@ -11957,7 +11943,7 @@ function Dc(t) {
|
|
|
11957
11943
|
this.options = be({}, Ey, t);
|
|
11958
11944
|
}
|
|
11959
11945
|
Dc.prototype.run = function() {
|
|
11960
|
-
var t = this.options, e = t.eles, r = e.nodes(), a =
|
|
11946
|
+
var t = this.options, e = t.eles, r = e.nodes(), a = He(t.positions);
|
|
11961
11947
|
function n(i) {
|
|
11962
11948
|
if (t.positions == null)
|
|
11963
11949
|
return qh(i.position());
|
|
@@ -12302,14 +12288,14 @@ Br.findNearestElements = function(t, e, r, a) {
|
|
|
12302
12288
|
y: C.midY,
|
|
12303
12289
|
angle: C.midtgtArrowAngle
|
|
12304
12290
|
}], O = 0; O < F.length; O++) {
|
|
12305
|
-
var G = F[O],
|
|
12306
|
-
if (
|
|
12291
|
+
var G = F[O], Y = i.arrowShapes[w.pstyle(G.name + "-arrow-shape").value], $ = w.pstyle("width").pfValue;
|
|
12292
|
+
if (Y.roughCollide(t, e, _, G.angle, {
|
|
12307
12293
|
x: G.x,
|
|
12308
12294
|
y: G.y
|
|
12309
|
-
},
|
|
12295
|
+
}, $, f) && Y.collide(t, e, _, G.angle, {
|
|
12310
12296
|
x: G.x,
|
|
12311
12297
|
y: G.y
|
|
12312
|
-
},
|
|
12298
|
+
}, $, f))
|
|
12313
12299
|
return g(w), !0;
|
|
12314
12300
|
}
|
|
12315
12301
|
l && o.length > 0 && (y(k), y(B));
|
|
@@ -12322,14 +12308,14 @@ Br.findNearestElements = function(t, e, r, a) {
|
|
|
12322
12308
|
x ? A = x + "-" : A = "", w.boundingBox();
|
|
12323
12309
|
var L = C.labelBounds[x || "main"], R = w.pstyle(A + "label").value, P = w.pstyle("text-events").strValue === "yes";
|
|
12324
12310
|
if (!(!P || !R)) {
|
|
12325
|
-
var M = m(C.rscratch, "labelX", x), N = m(C.rscratch, "labelY", x), O = m(C.rscratch, "labelAngle", x), k = w.pstyle(A + "text-margin-x").pfValue, B = w.pstyle(A + "text-margin-y").pfValue, _ = L.x1 - D - k, F = L.x2 + D - k, G = L.y1 - D - B,
|
|
12311
|
+
var M = m(C.rscratch, "labelX", x), N = m(C.rscratch, "labelY", x), O = m(C.rscratch, "labelAngle", x), k = w.pstyle(A + "text-margin-x").pfValue, B = w.pstyle(A + "text-margin-y").pfValue, _ = L.x1 - D - k, F = L.x2 + D - k, G = L.y1 - D - B, Y = L.y2 + D - B;
|
|
12326
12312
|
if (O) {
|
|
12327
|
-
var
|
|
12313
|
+
var $ = Math.cos(O), H = Math.sin(O), W = function(Z, re) {
|
|
12328
12314
|
return Z = Z - M, re = re - N, {
|
|
12329
|
-
x: Z *
|
|
12330
|
-
y: Z *
|
|
12315
|
+
x: Z * $ - re * H + M,
|
|
12316
|
+
y: Z * H + re * $ + N
|
|
12331
12317
|
};
|
|
12332
|
-
}, ee = W(_, G), ae = W(_,
|
|
12318
|
+
}, ee = W(_, G), ae = W(_, Y), J = W(F, G), z = W(F, Y), V = [
|
|
12333
12319
|
// with the margin added after the rotation is applied
|
|
12334
12320
|
ee.x + k,
|
|
12335
12321
|
ee.y + B,
|
|
@@ -12478,23 +12464,23 @@ Br.getAllInBox = function(t, e, r, a) {
|
|
|
12478
12464
|
if (O.startX != null && O.startY != null && O.endX != null && O.endY != null && (sr(v, O.startX, O.startY) || sr(v, O.endX, O.endY)))
|
|
12479
12465
|
o.push(M), G = !0;
|
|
12480
12466
|
else if (!G && O.edgeType === "haystack") {
|
|
12481
|
-
for (var
|
|
12482
|
-
if (nu(v,
|
|
12467
|
+
for (var Y = N.rstyle.haystackPts, $ = 0; $ < Y.length; $++)
|
|
12468
|
+
if (nu(v, Y[$])) {
|
|
12483
12469
|
o.push(M), G = !0;
|
|
12484
12470
|
break;
|
|
12485
12471
|
}
|
|
12486
12472
|
}
|
|
12487
12473
|
if (!G) {
|
|
12488
|
-
var
|
|
12489
|
-
if ((!
|
|
12474
|
+
var H = N.rstyle.bezierPts || N.rstyle.linePts || N.rstyle.haystackPts;
|
|
12475
|
+
if ((!H || H.length < 2) && O.edgeType === "straight" && O.startX != null && O.startY != null && O.endX != null && O.endY != null && (H = [{
|
|
12490
12476
|
x: O.startX,
|
|
12491
12477
|
y: O.startY
|
|
12492
12478
|
}, {
|
|
12493
12479
|
x: O.endX,
|
|
12494
12480
|
y: O.endY
|
|
12495
|
-
}]), !
|
|
12496
|
-
for (var W = 0; W <
|
|
12497
|
-
for (var ee =
|
|
12481
|
+
}]), !H || H.length < 2) continue;
|
|
12482
|
+
for (var W = 0; W < H.length - 1; W++) {
|
|
12483
|
+
for (var ee = H[W], ae = H[W + 1], J = 0; J < d.length; J++) {
|
|
12498
12484
|
var z = Je(d[J], 2), V = z[0], q = z[1];
|
|
12499
12485
|
if (y(ee, ae, V, q)) {
|
|
12500
12486
|
o.push(M), G = !0;
|
|
@@ -12565,16 +12551,16 @@ Bn.getArrowWidth = Bn.getArrowHeight = function(t, e) {
|
|
|
12565
12551
|
var r = this.arrowWidthCache = this.arrowWidthCache || {}, a = r[t + ", " + e];
|
|
12566
12552
|
return a || (a = Math.max(Math.pow(t * 13.37, 0.9), 29) * e, r[t + ", " + e] = a, a);
|
|
12567
12553
|
};
|
|
12568
|
-
var
|
|
12554
|
+
var Xs, Ws, Vt = {}, Pt = {}, zl, Vl, Lr, mn, Wt, Tr, Sr, Gt, qr, on, Lc, Rc, Ks, Zs, Ul, ql = function(e, r, a) {
|
|
12569
12555
|
a.x = r.x - e.x, a.y = r.y - e.y, a.len = Math.sqrt(a.x * a.x + a.y * a.y), a.nx = a.x / a.len, a.ny = a.y / a.len, a.ang = Math.atan2(a.ny, a.nx);
|
|
12570
12556
|
}, Cy = function(e, r) {
|
|
12571
12557
|
r.x = e.x * -1, r.y = e.y * -1, r.nx = e.nx * -1, r.ny = e.ny * -1, r.ang = e.ang > 0 ? -(Math.PI - e.ang) : Math.PI + e.ang;
|
|
12572
12558
|
}, Dy = function(e, r, a, n, i) {
|
|
12573
12559
|
if (e !== Ul ? ql(r, e, Vt) : Cy(Pt, Vt), ql(r, a, Pt), zl = Vt.nx * Pt.ny - Vt.ny * Pt.nx, Vl = Vt.nx * Pt.nx - Vt.ny * -Pt.ny, Wt = Math.asin(Math.max(-1, Math.min(1, zl))), Math.abs(Wt) < 1e-6) {
|
|
12574
|
-
|
|
12560
|
+
Xs = r.x, Ws = r.y, Sr = qr = 0;
|
|
12575
12561
|
return;
|
|
12576
12562
|
}
|
|
12577
|
-
Lr = 1, mn = !1, Vl < 0 ? Wt < 0 ? Wt = Math.PI + Wt : (Wt = Math.PI - Wt, Lr = -1, mn = !0) : Wt > 0 && (Lr = -1, mn = !0), r.radius !== void 0 ? qr = r.radius : qr = n, Tr = Wt / 2, on = Math.min(Vt.len / 2, Pt.len / 2), i ? (Gt = Math.abs(Math.cos(Tr) * qr / Math.sin(Tr)), Gt > on ? (Gt = on, Sr = Math.abs(Gt * Math.sin(Tr) / Math.cos(Tr))) : Sr = qr) : (Gt = Math.min(on, qr), Sr = Math.abs(Gt * Math.sin(Tr) / Math.cos(Tr))), Ks = r.x + Pt.nx * Gt, Zs = r.y + Pt.ny * Gt,
|
|
12563
|
+
Lr = 1, mn = !1, Vl < 0 ? Wt < 0 ? Wt = Math.PI + Wt : (Wt = Math.PI - Wt, Lr = -1, mn = !0) : Wt > 0 && (Lr = -1, mn = !0), r.radius !== void 0 ? qr = r.radius : qr = n, Tr = Wt / 2, on = Math.min(Vt.len / 2, Pt.len / 2), i ? (Gt = Math.abs(Math.cos(Tr) * qr / Math.sin(Tr)), Gt > on ? (Gt = on, Sr = Math.abs(Gt * Math.sin(Tr) / Math.cos(Tr))) : Sr = qr) : (Gt = Math.min(on, qr), Sr = Math.abs(Gt * Math.sin(Tr) / Math.cos(Tr))), Ks = r.x + Pt.nx * Gt, Zs = r.y + Pt.ny * Gt, Xs = Ks - Pt.ny * Sr * Lr, Ws = Zs + Pt.nx * Sr * Lr, Lc = r.x + Vt.nx * Gt, Rc = r.y + Vt.ny * Gt, Ul = r;
|
|
12578
12564
|
};
|
|
12579
12565
|
function Pc(t, e) {
|
|
12580
12566
|
e.radius === 0 ? t.lineTo(e.cx, e.cy) : t.arc(e.cx, e.cy, e.radius, e.startAngle, e.endAngle, e.counterClockwise);
|
|
@@ -12593,7 +12579,7 @@ function So(t, e, r, a) {
|
|
|
12593
12579
|
endAngle: void 0,
|
|
12594
12580
|
counterClockwise: void 0
|
|
12595
12581
|
} : (Dy(t, e, r, a, n), {
|
|
12596
|
-
cx:
|
|
12582
|
+
cx: Xs,
|
|
12597
12583
|
cy: Ws,
|
|
12598
12584
|
radius: Sr,
|
|
12599
12585
|
startX: Lc,
|
|
@@ -12723,12 +12709,12 @@ mt.findTaxiPoints = function(t, e) {
|
|
|
12723
12709
|
var G = T < 0 ? 1 + T : T;
|
|
12724
12710
|
F = G * O;
|
|
12725
12711
|
} else {
|
|
12726
|
-
var
|
|
12727
|
-
F =
|
|
12712
|
+
var Y = T < 0 ? O : 0;
|
|
12713
|
+
F = Y + T * B;
|
|
12728
12714
|
}
|
|
12729
|
-
var
|
|
12715
|
+
var $ = function(I) {
|
|
12730
12716
|
return Math.abs(I) < w || Math.abs(I) >= Math.abs(O);
|
|
12731
|
-
},
|
|
12717
|
+
}, H = $(F), W = $(Math.abs(O) - Math.abs(F)), ee = H || W;
|
|
12732
12718
|
if (ee && !_)
|
|
12733
12719
|
if (N) {
|
|
12734
12720
|
var ae = Math.abs(k) <= v / 2, J = Math.abs(D) <= h / 2;
|
|
@@ -12915,7 +12901,7 @@ mt.findEdgeControlPoints = function(t) {
|
|
|
12915
12901
|
var B = O;
|
|
12916
12902
|
O = k, k = B;
|
|
12917
12903
|
}
|
|
12918
|
-
var _ = R.srcPos = O.position(), F = R.tgtPos = k.position(), G = R.srcW = O.outerWidth(),
|
|
12904
|
+
var _ = R.srcPos = O.position(), F = R.tgtPos = k.position(), G = R.srcW = O.outerWidth(), Y = R.srcH = O.outerHeight(), $ = R.tgtW = k.outerWidth(), H = R.tgtH = k.outerHeight(), W = R.srcShape = r.nodeShapes[e.getNodeShape(O)], ee = R.tgtShape = r.nodeShapes[e.getNodeShape(k)], ae = R.srcCornerRadius = O.pstyle("corner-radius").value === "auto" ? "auto" : O.pstyle("corner-radius").pfValue, J = R.tgtCornerRadius = k.pstyle("corner-radius").value === "auto" ? "auto" : k.pstyle("corner-radius").pfValue, z = R.tgtRs = k._private.rscratch, V = R.srcRs = O._private.rscratch;
|
|
12919
12905
|
R.dirCounts = {
|
|
12920
12906
|
north: 0,
|
|
12921
12907
|
west: 0,
|
|
@@ -12930,7 +12916,7 @@ mt.findEdgeControlPoints = function(t) {
|
|
|
12930
12916
|
var Z = R.eles[q], re = Z[0]._private.rscratch, ve = Z.pstyle("curve-style").value, Pe = ve === "unbundled-bezier" || ir(ve, "segments") || ir(ve, "taxi"), Te = !O.same(Z.source());
|
|
12931
12917
|
if (!R.calculatedIntersection && O !== k && (R.hasBezier || R.hasUnbundled)) {
|
|
12932
12918
|
R.calculatedIntersection = !0;
|
|
12933
|
-
var we = W.intersectLine(_.x, _.y, G,
|
|
12919
|
+
var we = W.intersectLine(_.x, _.y, G, Y, F.x, F.y, 0, ae, V), ye = R.srcIntn = we, ie = ee.intersectLine(F.x, F.y, $, H, _.x, _.y, 0, J, z), he = R.tgtIntn = ie, de = R.intersectionPts = {
|
|
12934
12920
|
x1: we[0],
|
|
12935
12921
|
x2: ie[0],
|
|
12936
12922
|
y1: we[1],
|
|
@@ -12952,7 +12938,7 @@ mt.findEdgeControlPoints = function(t) {
|
|
|
12952
12938
|
x: -Be.y,
|
|
12953
12939
|
y: Be.x
|
|
12954
12940
|
};
|
|
12955
|
-
R.nodesOverlap = !ne(Ie) || ee.checkPoint(we[0], we[1], 0,
|
|
12941
|
+
R.nodesOverlap = !ne(Ie) || ee.checkPoint(we[0], we[1], 0, $, H, F.x, F.y, J, z) || W.checkPoint(ie[0], ie[1], 0, G, Y, _.x, _.y, ae, V), R.vectorNormInverse = Fe, P = {
|
|
12956
12942
|
nodesOverlap: R.nodesOverlap,
|
|
12957
12943
|
dirCounts: R.dirCounts,
|
|
12958
12944
|
calculatedIntersection: !0,
|
|
@@ -12963,10 +12949,10 @@ mt.findEdgeControlPoints = function(t) {
|
|
|
12963
12949
|
srcRs: z,
|
|
12964
12950
|
tgtPos: _,
|
|
12965
12951
|
tgtRs: V,
|
|
12966
|
-
srcW:
|
|
12967
|
-
srcH:
|
|
12952
|
+
srcW: $,
|
|
12953
|
+
srcH: H,
|
|
12968
12954
|
tgtW: G,
|
|
12969
|
-
tgtH:
|
|
12955
|
+
tgtH: Y,
|
|
12970
12956
|
srcIntn: he,
|
|
12971
12957
|
tgtIntn: ye,
|
|
12972
12958
|
srcShape: ee,
|
|
@@ -13039,8 +13025,8 @@ mt.getEdgeMidpoint = function(t) {
|
|
|
13039
13025
|
y: e.midY
|
|
13040
13026
|
};
|
|
13041
13027
|
};
|
|
13042
|
-
var
|
|
13043
|
-
|
|
13028
|
+
var Ya = {};
|
|
13029
|
+
Ya.manualEndptToPx = function(t, e) {
|
|
13044
13030
|
var r = this, a = t.position(), n = t.outerWidth(), i = t.outerHeight(), s = t._private.rscratch;
|
|
13045
13031
|
if (e.value.length === 2) {
|
|
13046
13032
|
var o = [e.pfValue[0], e.pfValue[1]];
|
|
@@ -13052,15 +13038,15 @@ Ha.manualEndptToPx = function(t, e) {
|
|
|
13052
13038
|
return r.nodeShapes[this.getNodeShape(t)].intersectLine(a.x, a.y, n, i, f[0], f[1], 0, t.pstyle("corner-radius").value === "auto" ? "auto" : t.pstyle("corner-radius").pfValue, s);
|
|
13053
13039
|
}
|
|
13054
13040
|
};
|
|
13055
|
-
|
|
13041
|
+
Ya.findEndpoints = function(t) {
|
|
13056
13042
|
var e, r, a, n, i = this, s, o = t.source()[0], u = t.target()[0], l = o.position(), f = u.position(), c = t.pstyle("target-arrow-shape").value, v = t.pstyle("source-arrow-shape").value, h = t.pstyle("target-distance-from-node").pfValue, d = t.pstyle("source-distance-from-node").pfValue, p = o._private.rscratch, g = u._private.rscratch, y = t.pstyle("curve-style").value, b = t._private.rscratch, m = b.edgeType, E = ir(y, "taxi"), T = m === "self" || m === "compound", S = m === "bezier" || m === "multibezier" || T, w = m !== "bezier", x = m === "straight" || m === "segments", C = m === "segments", D = S || w || x, A = T || E, L = t.pstyle("source-endpoint"), R = A ? "outside-to-node" : L.value, P = o.pstyle("corner-radius").value === "auto" ? "auto" : o.pstyle("corner-radius").pfValue, M = t.pstyle("target-endpoint"), N = A ? "outside-to-node" : M.value, O = u.pstyle("corner-radius").value === "auto" ? "auto" : u.pstyle("corner-radius").pfValue;
|
|
13057
13043
|
b.srcManEndpt = L, b.tgtManEndpt = M;
|
|
13058
|
-
var k, B, _, F, G = (e = (M == null || (r = M.pfValue) === null || r === void 0 ? void 0 : r.length) === 2 ? M.pfValue : null) !== null && e !== void 0 ? e : [0, 0],
|
|
13044
|
+
var k, B, _, F, G = (e = (M == null || (r = M.pfValue) === null || r === void 0 ? void 0 : r.length) === 2 ? M.pfValue : null) !== null && e !== void 0 ? e : [0, 0], Y = (a = (L == null || (n = L.pfValue) === null || n === void 0 ? void 0 : n.length) === 2 ? L.pfValue : null) !== null && a !== void 0 ? a : [0, 0];
|
|
13059
13045
|
if (S) {
|
|
13060
|
-
var
|
|
13061
|
-
k =
|
|
13046
|
+
var $ = [b.ctrlpts[0], b.ctrlpts[1]], H = w ? [b.ctrlpts[b.ctrlpts.length - 2], b.ctrlpts[b.ctrlpts.length - 1]] : $;
|
|
13047
|
+
k = H, B = $;
|
|
13062
13048
|
} else if (x) {
|
|
13063
|
-
var W = C ? b.segpts.slice(0, 2) : [f.x + G[0], f.y + G[1]], ee = C ? b.segpts.slice(b.segpts.length - 2) : [l.x +
|
|
13049
|
+
var W = C ? b.segpts.slice(0, 2) : [f.x + G[0], f.y + G[1]], ee = C ? b.segpts.slice(b.segpts.length - 2) : [l.x + Y[0], l.y + Y[1]];
|
|
13064
13050
|
k = ee, B = W;
|
|
13065
13051
|
}
|
|
13066
13052
|
if (N === "inside-to-node")
|
|
@@ -13100,9 +13086,9 @@ Ha.findEndpoints = function(t) {
|
|
|
13100
13086
|
I === "left" ? Be -= Ee : I === "right" && (Be += Ee);
|
|
13101
13087
|
var U = Pa(F[0], F[1], [Be - Ee, Fe - ue, Be + Ee, Fe - ue, Be + Ee, Fe + ue, Be - Ee, Fe + ue], l.x, l.y);
|
|
13102
13088
|
if (U.length > 0) {
|
|
13103
|
-
var
|
|
13089
|
+
var X = f, K = Dr(X, Wr(s)), j = Dr(X, Wr(U)), oe = K;
|
|
13104
13090
|
if (j < K && (s = [U[0], U[1]], oe = j), U.length > 2) {
|
|
13105
|
-
var te = Dr(
|
|
13091
|
+
var te = Dr(X, {
|
|
13106
13092
|
x: U[2],
|
|
13107
13093
|
y: U[3]
|
|
13108
13094
|
});
|
|
@@ -13113,7 +13099,7 @@ Ha.findEndpoints = function(t) {
|
|
|
13113
13099
|
var fe = ja(s, B, i.arrowShapes[v].spacing(t) + d), le = ja(s, B, i.arrowShapes[v].gap(t) + d);
|
|
13114
13100
|
b.startX = le[0], b.startY = le[1], b.arrowStartX = fe[0], b.arrowStartY = fe[1], D && (!ne(b.startX) || !ne(b.startY) || !ne(b.endX) || !ne(b.endY) ? b.badLine = !0 : b.badLine = !1);
|
|
13115
13101
|
};
|
|
13116
|
-
|
|
13102
|
+
Ya.getSourceEndpoint = function(t) {
|
|
13117
13103
|
var e = t[0]._private.rscratch;
|
|
13118
13104
|
switch (this.recalculateRenderedStyle(t), e.edgeType) {
|
|
13119
13105
|
case "haystack":
|
|
@@ -13128,7 +13114,7 @@ Ha.getSourceEndpoint = function(t) {
|
|
|
13128
13114
|
};
|
|
13129
13115
|
}
|
|
13130
13116
|
};
|
|
13131
|
-
|
|
13117
|
+
Ya.getTargetEndpoint = function(t) {
|
|
13132
13118
|
var e = t[0]._private.rscratch;
|
|
13133
13119
|
switch (this.recalculateRenderedStyle(t), e.edgeType) {
|
|
13134
13120
|
case "haystack":
|
|
@@ -13182,8 +13168,8 @@ Ao.storeEdgeProjections = function(t) {
|
|
|
13182
13168
|
Ao.recalculateEdgeProjections = function(t) {
|
|
13183
13169
|
this.findEdgeControlPoints(t);
|
|
13184
13170
|
};
|
|
13185
|
-
var
|
|
13186
|
-
|
|
13171
|
+
var $t = {};
|
|
13172
|
+
$t.recalculateNodeLabelProjection = function(t) {
|
|
13187
13173
|
var e = t.pstyle("label").strValue;
|
|
13188
13174
|
if (!fr(e)) {
|
|
13189
13175
|
var r, a, n = t._private, i = t.width(), s = t.height(), o = t.padding(), u = t.position(), l = t.pstyle("text-halign").strValue, f = t.pstyle("text-valign").strValue, c = n.rscratch, v = n.rstyle;
|
|
@@ -13220,7 +13206,7 @@ var Mc = function(e, r) {
|
|
|
13220
13206
|
var i = Ra(0, n - 1e-3, 1), s = Ra(0, n + 1e-3, 1), o = Qr(e, r, a, i), u = Qr(e, r, a, s);
|
|
13221
13207
|
return Oc(o, u);
|
|
13222
13208
|
};
|
|
13223
|
-
|
|
13209
|
+
$t.recalculateEdgeLabelProjections = function(t) {
|
|
13224
13210
|
var e, r = t._private, a = r.rscratch, n = this, i = {
|
|
13225
13211
|
mid: t.pstyle("label").strValue,
|
|
13226
13212
|
source: t.pstyle("source-label").strValue,
|
|
@@ -13335,10 +13321,10 @@ Yt.recalculateEdgeLabelProjections = function(t) {
|
|
|
13335
13321
|
l("source"), l("target"), this.applyLabelDimensions(t);
|
|
13336
13322
|
}
|
|
13337
13323
|
};
|
|
13338
|
-
|
|
13324
|
+
$t.applyLabelDimensions = function(t) {
|
|
13339
13325
|
this.applyPrefixedLabelDimensions(t), t.isEdge() && (this.applyPrefixedLabelDimensions(t, "source"), this.applyPrefixedLabelDimensions(t, "target"));
|
|
13340
13326
|
};
|
|
13341
|
-
|
|
13327
|
+
$t.applyPrefixedLabelDimensions = function(t, e) {
|
|
13342
13328
|
var r = t._private, a = this.getLabelText(t, e), n = Pr(a, t._private.labelDimsKey);
|
|
13343
13329
|
if (Dt(r.rscratch, "prefixedLabelDimsKey", e) !== n) {
|
|
13344
13330
|
Kt(r.rscratch, "prefixedLabelDimsKey", e, n);
|
|
@@ -13346,9 +13332,9 @@ Yt.applyPrefixedLabelDimensions = function(t, e) {
|
|
|
13346
13332
|
Kt(r.rstyle, "labelWidth", e, v), Kt(r.rscratch, "labelWidth", e, v), Kt(r.rstyle, "labelHeight", e, h), Kt(r.rscratch, "labelHeight", e, h), Kt(r.rscratch, "labelLineHeight", e, c);
|
|
13347
13333
|
}
|
|
13348
13334
|
};
|
|
13349
|
-
|
|
13350
|
-
var r = t._private, a = e ? e + "-" : "", n = t.pstyle(a + "label").strValue, i = t.pstyle("text-transform").value, s = function(
|
|
13351
|
-
return
|
|
13335
|
+
$t.getLabelText = function(t, e) {
|
|
13336
|
+
var r = t._private, a = e ? e + "-" : "", n = t.pstyle(a + "label").strValue, i = t.pstyle("text-transform").value, s = function(Y, $) {
|
|
13337
|
+
return $ ? (Kt(r.rscratch, Y, e, $), $) : Dt(r.rscratch, Y, e);
|
|
13352
13338
|
};
|
|
13353
13339
|
if (!n)
|
|
13354
13340
|
return "";
|
|
@@ -13399,7 +13385,7 @@ Yt.getLabelText = function(t, e) {
|
|
|
13399
13385
|
}
|
|
13400
13386
|
return n;
|
|
13401
13387
|
};
|
|
13402
|
-
|
|
13388
|
+
$t.getLabelJustification = function(t) {
|
|
13403
13389
|
var e = t.pstyle("text-justification").strValue, r = t.pstyle("text-halign").strValue;
|
|
13404
13390
|
if (e === "auto")
|
|
13405
13391
|
if (t.isNode())
|
|
@@ -13416,7 +13402,7 @@ Yt.getLabelJustification = function(t) {
|
|
|
13416
13402
|
else
|
|
13417
13403
|
return e;
|
|
13418
13404
|
};
|
|
13419
|
-
|
|
13405
|
+
$t.calculateLabelDimensions = function(t, e) {
|
|
13420
13406
|
var r = this, a = r.cy.window(), n = a.document, i = 0, s = t.pstyle("font-style").strValue, o = t.pstyle("font-size").pfValue, u = t.pstyle("font-family").strValue, l = t.pstyle("font-weight").strValue, f = this.labelCalcCanvas, c = this.labelCalcCanvasContext;
|
|
13421
13407
|
if (!f) {
|
|
13422
13408
|
f = this.labelCalcCanvas = n.createElement("canvas"), c = this.labelCalcCanvasContext = f.getContext("2d");
|
|
@@ -13434,19 +13420,19 @@ Yt.calculateLabelDimensions = function(t, e) {
|
|
|
13434
13420
|
height: d
|
|
13435
13421
|
};
|
|
13436
13422
|
};
|
|
13437
|
-
|
|
13423
|
+
$t.calculateLabelAngle = function(t, e) {
|
|
13438
13424
|
var r = t._private, a = r.rscratch, n = t.isEdge(), i = e ? e + "-" : "", s = t.pstyle(i + "text-rotation"), o = s.strValue;
|
|
13439
13425
|
return o === "none" ? 0 : n && o === "autorotate" ? a.labelAutoAngle : o === "autorotate" ? 0 : s.pfValue;
|
|
13440
13426
|
};
|
|
13441
|
-
|
|
13427
|
+
$t.calculateLabelAngles = function(t) {
|
|
13442
13428
|
var e = this, r = t.isEdge(), a = t._private, n = a.rscratch;
|
|
13443
13429
|
n.labelAngle = e.calculateLabelAngle(t), r && (n.sourceLabelAngle = e.calculateLabelAngle(t, "source"), n.targetLabelAngle = e.calculateLabelAngle(t, "target"));
|
|
13444
13430
|
};
|
|
13445
|
-
var kc = {},
|
|
13431
|
+
var kc = {}, $l = 28, Yl = !1;
|
|
13446
13432
|
kc.getNodeShape = function(t) {
|
|
13447
13433
|
var e = this, r = t.pstyle("shape").value;
|
|
13448
|
-
if (r === "cutrectangle" && (t.width() <
|
|
13449
|
-
return
|
|
13434
|
+
if (r === "cutrectangle" && (t.width() < $l || t.height() < $l))
|
|
13435
|
+
return Yl || (Ge("The `cutrectangle` node shape can not be used at small sizes so `rectangle` is used instead"), Yl = !0), "rectangle";
|
|
13450
13436
|
if (t.isParent())
|
|
13451
13437
|
return r === "rectangle" || r === "roundrectangle" || r === "round-rectangle" || r === "cutrectangle" || r === "cut-rectangle" || r === "barrel" ? r : "rectangle";
|
|
13452
13438
|
if (r === "polygon") {
|
|
@@ -13551,7 +13537,7 @@ ai.getCachedZSortedEles = function(t) {
|
|
|
13551
13537
|
return e;
|
|
13552
13538
|
};
|
|
13553
13539
|
var Nc = {};
|
|
13554
|
-
[Br, Bn, mt,
|
|
13540
|
+
[Br, Bn, mt, Ya, Ao, $t, kc, ri, ai].forEach(function(t) {
|
|
13555
13541
|
be(Nc, t);
|
|
13556
13542
|
});
|
|
13557
13543
|
var Bc = {};
|
|
@@ -13629,12 +13615,12 @@ ua.load = function() {
|
|
|
13629
13615
|
var U = I.getRootNode();
|
|
13630
13616
|
if (U && U.nodeType === 11 && U.host !== void 0)
|
|
13631
13617
|
return U;
|
|
13632
|
-
}, n = function(I, U,
|
|
13618
|
+
}, n = function(I, U, X, K) {
|
|
13633
13619
|
I == null && (I = t.cy);
|
|
13634
13620
|
for (var j = 0; j < U.length; j++) {
|
|
13635
13621
|
var oe = U[j];
|
|
13636
13622
|
I.emit({
|
|
13637
|
-
originalEvent:
|
|
13623
|
+
originalEvent: X,
|
|
13638
13624
|
type: oe,
|
|
13639
13625
|
position: K
|
|
13640
13626
|
});
|
|
@@ -13642,18 +13628,18 @@ ua.load = function() {
|
|
|
13642
13628
|
}, i = function(I) {
|
|
13643
13629
|
return I.shiftKey || I.metaKey || I.ctrlKey;
|
|
13644
13630
|
}, s = function(I, U) {
|
|
13645
|
-
var
|
|
13631
|
+
var X = !0;
|
|
13646
13632
|
if (t.cy.hasCompoundNodes() && I && I.pannable())
|
|
13647
13633
|
for (var K = 0; U && K < U.length; K++) {
|
|
13648
13634
|
var I = U[K];
|
|
13649
13635
|
if (I.isNode() && I.isParent() && !I.pannable()) {
|
|
13650
|
-
|
|
13636
|
+
X = !1;
|
|
13651
13637
|
break;
|
|
13652
13638
|
}
|
|
13653
13639
|
}
|
|
13654
13640
|
else
|
|
13655
|
-
|
|
13656
|
-
return
|
|
13641
|
+
X = !0;
|
|
13642
|
+
return X;
|
|
13657
13643
|
}, o = function(I) {
|
|
13658
13644
|
I[0]._private.grabbed = !0;
|
|
13659
13645
|
}, u = function(I) {
|
|
@@ -13667,18 +13653,18 @@ ua.load = function() {
|
|
|
13667
13653
|
}, v = function(I) {
|
|
13668
13654
|
I[0]._private.rscratch.isGrabTarget = !1;
|
|
13669
13655
|
}, h = function(I, U) {
|
|
13670
|
-
var
|
|
13671
|
-
!K && I.grabbable() && !I.locked() && (
|
|
13656
|
+
var X = U.addToList, K = X.has(I);
|
|
13657
|
+
!K && I.grabbable() && !I.locked() && (X.merge(I), o(I));
|
|
13672
13658
|
}, d = function(I, U) {
|
|
13673
13659
|
if (I.cy().hasCompoundNodes() && !(U.inDragLayer == null && U.addToList == null)) {
|
|
13674
|
-
var
|
|
13675
|
-
U.inDragLayer && (
|
|
13660
|
+
var X = I.descendants();
|
|
13661
|
+
U.inDragLayer && (X.forEach(l), X.connectedEdges().forEach(l)), U.addToList && h(X, U);
|
|
13676
13662
|
}
|
|
13677
13663
|
}, p = function(I, U) {
|
|
13678
13664
|
U = U || {};
|
|
13679
|
-
var
|
|
13665
|
+
var X = I.cy().hasCompoundNodes();
|
|
13680
13666
|
U.inDragLayer && (I.forEach(l), I.neighborhood().stdFilter(function(K) {
|
|
13681
|
-
return
|
|
13667
|
+
return !X || K.isEdge();
|
|
13682
13668
|
}).forEach(l)), U.addToList && I.forEach(function(K) {
|
|
13683
13669
|
h(K, U);
|
|
13684
13670
|
}), d(I, U), b(I, {
|
|
@@ -13690,9 +13676,9 @@ ua.load = function() {
|
|
|
13690
13676
|
}), t.updateCachedGrabbedEles());
|
|
13691
13677
|
}, b = function(I, U) {
|
|
13692
13678
|
if (!(U.inDragLayer == null && U.addToList == null) && I.cy().hasCompoundNodes()) {
|
|
13693
|
-
var
|
|
13694
|
-
if (
|
|
13695
|
-
var K =
|
|
13679
|
+
var X = I.ancestors().orphans();
|
|
13680
|
+
if (!X.same(I)) {
|
|
13681
|
+
var K = X.descendants().spawnSelf().merge(X).unmerge(I).unmerge(I.descendants()), j = K.connectedEdges();
|
|
13696
13682
|
U.inDragLayer && (j.forEach(l), K.forEach(l)), U.addToList && K.forEach(function(oe) {
|
|
13697
13683
|
h(oe, U);
|
|
13698
13684
|
});
|
|
@@ -13703,10 +13689,10 @@ ua.load = function() {
|
|
|
13703
13689
|
}, E = typeof MutationObserver < "u", T = typeof ResizeObserver < "u";
|
|
13704
13690
|
E ? (t.removeObserver = new MutationObserver(function(Q) {
|
|
13705
13691
|
for (var I = 0; I < Q.length; I++) {
|
|
13706
|
-
var U = Q[I],
|
|
13707
|
-
if (
|
|
13708
|
-
for (var K = 0; K <
|
|
13709
|
-
var j =
|
|
13692
|
+
var U = Q[I], X = U.removedNodes;
|
|
13693
|
+
if (X)
|
|
13694
|
+
for (var K = 0; K < X.length; K++) {
|
|
13695
|
+
var j = X[K];
|
|
13710
13696
|
if (j === t.container) {
|
|
13711
13697
|
t.destroy();
|
|
13712
13698
|
break;
|
|
@@ -13738,9 +13724,9 @@ ua.load = function() {
|
|
|
13738
13724
|
var C = function() {
|
|
13739
13725
|
return t.selection[4] !== 0;
|
|
13740
13726
|
}, D = function(I) {
|
|
13741
|
-
for (var U = t.findContainerClientCoords(),
|
|
13727
|
+
for (var U = t.findContainerClientCoords(), X = U[0], K = U[1], j = U[2], oe = U[3], te = I.touches ? I.touches : [I], fe = !1, le = 0; le < te.length; le++) {
|
|
13742
13728
|
var me = te[le];
|
|
13743
|
-
if (
|
|
13729
|
+
if (X <= me.clientX && me.clientX <= X + j && K <= me.clientY && me.clientY <= K + oe) {
|
|
13744
13730
|
fe = !0;
|
|
13745
13731
|
break;
|
|
13746
13732
|
}
|
|
@@ -13759,8 +13745,8 @@ ua.load = function() {
|
|
|
13759
13745
|
t.registerBinding(t.container, "mousedown", function(I) {
|
|
13760
13746
|
if (D(I) && !(t.hoverData.which === 1 && I.which !== 1)) {
|
|
13761
13747
|
I.preventDefault(), m(), t.hoverData.capture = !0, t.hoverData.which = I.which;
|
|
13762
|
-
var U = t.cy,
|
|
13763
|
-
t.hoverData.mdownPos = K, t.hoverData.mdownGPos =
|
|
13748
|
+
var U = t.cy, X = [I.clientX, I.clientY], K = t.projectIntoViewport(X[0], X[1]), j = t.selection, oe = t.findNearestElements(K[0], K[1], !0, !1), te = oe[0], fe = t.dragData.possibleDragElements;
|
|
13749
|
+
t.hoverData.mdownPos = K, t.hoverData.mdownGPos = X;
|
|
13764
13750
|
var le = function(Le) {
|
|
13765
13751
|
return {
|
|
13766
13752
|
originalEvent: I,
|
|
@@ -13828,11 +13814,11 @@ ua.load = function() {
|
|
|
13828
13814
|
t.registerBinding([e, A], "mousemove", function(I) {
|
|
13829
13815
|
var U = t.hoverData.capture;
|
|
13830
13816
|
if (!(!U && !D(I))) {
|
|
13831
|
-
var
|
|
13817
|
+
var X = !1, K = t.cy, j = K.zoom(), oe = [I.clientX, I.clientY], te = t.projectIntoViewport(oe[0], oe[1]), fe = t.hoverData.mdownPos, le = t.hoverData.mdownGPos, me = t.selection, Ae = null;
|
|
13832
13818
|
!t.hoverData.draggingEles && !t.hoverData.dragging && !t.hoverData.selecting && (Ae = t.findNearestElement(te[0], te[1], !0, !1));
|
|
13833
13819
|
var Ce = t.hoverData.last, ce = t.hoverData.down, Re = [te[0] - me[2], te[1] - me[3]], Le = t.dragData.possibleDragElements, je;
|
|
13834
13820
|
if (le) {
|
|
13835
|
-
var
|
|
13821
|
+
var Xe = oe[0] - le[0], bt = Xe * Xe, Ke = oe[1] - le[1], st = Ke * Ke, et = bt + st;
|
|
13836
13822
|
t.hoverData.isOverThresholdDrag = je = et >= t.desktopTapThreshold2;
|
|
13837
13823
|
}
|
|
13838
13824
|
var ft = i(I);
|
|
@@ -13841,7 +13827,7 @@ ua.load = function() {
|
|
|
13841
13827
|
var Rt = t.hoverData.dragDelta = t.hoverData.dragDelta || [];
|
|
13842
13828
|
Rt.length === 0 ? (Rt.push(Re[0]), Rt.push(Re[1])) : (Rt[0] += Re[0], Rt[1] += Re[1]);
|
|
13843
13829
|
};
|
|
13844
|
-
|
|
13830
|
+
X = !0, n(Ae, ["mousemove", "vmousemove", "tapdrag"], I, {
|
|
13845
13831
|
x: te[0],
|
|
13846
13832
|
y: te[1]
|
|
13847
13833
|
});
|
|
@@ -13854,16 +13840,16 @@ ua.load = function() {
|
|
|
13854
13840
|
y: te[1]
|
|
13855
13841
|
}
|
|
13856
13842
|
};
|
|
13857
|
-
},
|
|
13843
|
+
}, Ht = function() {
|
|
13858
13844
|
t.data.bgActivePosistion = void 0, t.hoverData.selecting || K.emit(Ze("boxstart")), me[4] = 1, t.hoverData.selecting = !0, t.redrawHint("select", !0), t.redraw();
|
|
13859
13845
|
};
|
|
13860
13846
|
if (t.hoverData.which === 3) {
|
|
13861
13847
|
if (je) {
|
|
13862
|
-
var
|
|
13863
|
-
ce ? ce.emit(
|
|
13848
|
+
var Xt = Ze("cxtdrag");
|
|
13849
|
+
ce ? ce.emit(Xt) : K.emit(Xt), t.hoverData.cxtDragged = !0, (!t.hoverData.cxtOver || Ae !== t.hoverData.cxtOver) && (t.hoverData.cxtOver && t.hoverData.cxtOver.emit(Ze("cxtdragout")), t.hoverData.cxtOver = Ae, Ae && Ae.emit(Ze("cxtdragover")));
|
|
13864
13850
|
}
|
|
13865
13851
|
} else if (t.hoverData.dragging) {
|
|
13866
|
-
if (
|
|
13852
|
+
if (X = !0, K.panningEnabled() && K.userPanningEnabled()) {
|
|
13867
13853
|
var _r;
|
|
13868
13854
|
if (t.hoverData.justStartedPan) {
|
|
13869
13855
|
var Wa = t.hoverData.mdownPos;
|
|
@@ -13882,7 +13868,7 @@ ua.load = function() {
|
|
|
13882
13868
|
} else if (me[4] == 1 && (ce == null || ce.pannable())) {
|
|
13883
13869
|
if (je) {
|
|
13884
13870
|
if (!t.hoverData.dragging && K.boxSelectionEnabled() && (ft || !K.panningEnabled() || !K.userPanningEnabled()))
|
|
13885
|
-
|
|
13871
|
+
Ht();
|
|
13886
13872
|
else if (!t.hoverData.selecting && K.panningEnabled() && K.userPanningEnabled()) {
|
|
13887
13873
|
var xr = s(ce, t.hoverData.downs);
|
|
13888
13874
|
xr && (t.hoverData.dragging = !0, t.hoverData.justStartedPan = !0, me[4] = 0, t.data.bgActivePosistion = Wr(fe), t.redrawHint("select", !0), t.redraw());
|
|
@@ -13899,7 +13885,7 @@ ua.load = function() {
|
|
|
13899
13885
|
}), t.hoverData.last = Ae), ce)
|
|
13900
13886
|
if (je) {
|
|
13901
13887
|
if (K.boxSelectionEnabled() && ft)
|
|
13902
|
-
ce && ce.grabbed() && (y(Le), ce.emit(Ze("freeon")), Le.emit(Ze("free")), t.dragData.didDrag && (ce.emit(Ze("dragfreeon")), Le.emit(Ze("dragfree")))),
|
|
13888
|
+
ce && ce.grabbed() && (y(Le), ce.emit(Ze("freeon")), Le.emit(Ze("free")), t.dragData.didDrag && (ce.emit(Ze("dragfreeon")), Le.emit(Ze("dragfree")))), Ht();
|
|
13903
13889
|
else if (ce && ce.grabbed() && t.nodeIsDraggable(ce)) {
|
|
13904
13890
|
var Tt = !t.dragData.didDrag;
|
|
13905
13891
|
Tt && t.redrawHint("eles", !0), t.dragData.didDrag = !0, t.hoverData.draggingEles || p(Le, {
|
|
@@ -13917,9 +13903,9 @@ ua.load = function() {
|
|
|
13917
13903
|
}
|
|
13918
13904
|
} else
|
|
13919
13905
|
tr();
|
|
13920
|
-
|
|
13906
|
+
X = !0;
|
|
13921
13907
|
}
|
|
13922
|
-
if (me[2] = te[0], me[3] = te[1],
|
|
13908
|
+
if (me[2] = te[0], me[3] = te[1], X)
|
|
13923
13909
|
return I.stopPropagation && I.stopPropagation(), I.preventDefault && I.preventDefault(), !1;
|
|
13924
13910
|
}
|
|
13925
13911
|
}, !1);
|
|
@@ -13929,12 +13915,12 @@ ua.load = function() {
|
|
|
13929
13915
|
var U = t.hoverData.capture;
|
|
13930
13916
|
if (U) {
|
|
13931
13917
|
t.hoverData.capture = !1;
|
|
13932
|
-
var
|
|
13918
|
+
var X = t.cy, K = t.projectIntoViewport(I.clientX, I.clientY), j = t.selection, oe = t.findNearestElement(K[0], K[1], !0, !1), te = t.dragData.possibleDragElements, fe = t.hoverData.down, le = i(I);
|
|
13933
13919
|
t.data.bgActivePosistion && (t.redrawHint("select", !0), t.redraw()), t.hoverData.tapholdCancelled = !0, t.data.bgActivePosistion = void 0, fe && fe.unactivate();
|
|
13934
|
-
var me = function(
|
|
13920
|
+
var me = function(Xe) {
|
|
13935
13921
|
return {
|
|
13936
13922
|
originalEvent: I,
|
|
13937
|
-
type:
|
|
13923
|
+
type: Xe,
|
|
13938
13924
|
position: {
|
|
13939
13925
|
x: K[0],
|
|
13940
13926
|
y: K[1]
|
|
@@ -13943,9 +13929,9 @@ ua.load = function() {
|
|
|
13943
13929
|
};
|
|
13944
13930
|
if (t.hoverData.which === 3) {
|
|
13945
13931
|
var Ae = me("cxttapend");
|
|
13946
|
-
if (fe ? fe.emit(Ae) :
|
|
13932
|
+
if (fe ? fe.emit(Ae) : X.emit(Ae), !t.hoverData.cxtDragged) {
|
|
13947
13933
|
var Ce = me("cxttap");
|
|
13948
|
-
fe ? fe.emit(Ce) :
|
|
13934
|
+
fe ? fe.emit(Ce) : X.emit(Ce);
|
|
13949
13935
|
}
|
|
13950
13936
|
t.hoverData.cxtDragged = !1, t.hoverData.which = null;
|
|
13951
13937
|
} else if (t.hoverData.which === 1) {
|
|
@@ -13958,7 +13944,7 @@ ua.load = function() {
|
|
|
13958
13944
|
!t.hoverData.isOverThresholdDrag && (n(fe, ["click", "tap", "vclick"], I, {
|
|
13959
13945
|
x: K[0],
|
|
13960
13946
|
y: K[1]
|
|
13961
|
-
}), R = !1, I.timeStamp - P <=
|
|
13947
|
+
}), R = !1, I.timeStamp - P <= X.multiClickDebounceTime() ? (L && clearTimeout(L), R = !0, P = null, n(fe, ["dblclick", "dbltap", "vdblclick"], I, {
|
|
13962
13948
|
x: K[0],
|
|
13963
13949
|
y: K[1]
|
|
13964
13950
|
})) : (L = setTimeout(function() {
|
|
@@ -13966,13 +13952,13 @@ ua.load = function() {
|
|
|
13966
13952
|
x: K[0],
|
|
13967
13953
|
y: K[1]
|
|
13968
13954
|
});
|
|
13969
|
-
},
|
|
13970
|
-
var ce =
|
|
13971
|
-
t.redrawHint("select", !0), ce.length > 0 && t.redrawHint("eles", !0),
|
|
13972
|
-
var Re = function(
|
|
13973
|
-
return
|
|
13955
|
+
}, X.multiClickDebounceTime()), P = I.timeStamp)), fe == null && !t.dragData.didDrag && !t.hoverData.selecting && !t.hoverData.dragged && !i(I) && (X.$(r).unselect(["tapunselect"]), te.length > 0 && t.redrawHint("eles", !0), t.dragData.possibleDragElements = te = X.collection()), oe == fe && !t.dragData.didDrag && !t.hoverData.selecting && oe != null && oe._private.selectable && (t.hoverData.dragging || (X.selectionType() === "additive" || le ? oe.selected() ? oe.unselect(["tapunselect"]) : oe.select(["tapselect"]) : le || (X.$(r).unmerge(oe).unselect(["tapunselect"]), oe.select(["tapselect"]))), t.redrawHint("eles", !0)), t.hoverData.selecting) {
|
|
13956
|
+
var ce = X.collection(t.getAllInBox(j[0], j[1], j[2], j[3]));
|
|
13957
|
+
t.redrawHint("select", !0), ce.length > 0 && t.redrawHint("eles", !0), X.emit(me("boxend"));
|
|
13958
|
+
var Re = function(Xe) {
|
|
13959
|
+
return Xe.selectable() && !Xe.selected();
|
|
13974
13960
|
};
|
|
13975
|
-
|
|
13961
|
+
X.selectionType() === "additive" || le || X.$(r).unmerge(ce).unselect(), ce.emit(me("box")).stdFilter(Re).select().emit(me("boxselect")), t.redraw();
|
|
13976
13962
|
}
|
|
13977
13963
|
if (t.hoverData.dragging && (t.hoverData.dragging = !1, t.redrawHint("select", !0), t.redrawHint("eles", !0), t.redraw()), !j[4]) {
|
|
13978
13964
|
t.redrawHint("drag", !0), t.redrawHint("eles", !0);
|
|
@@ -13985,18 +13971,18 @@ ua.load = function() {
|
|
|
13985
13971
|
}
|
|
13986
13972
|
}, !1);
|
|
13987
13973
|
var M = [], N = 4, O, k = 1e5, B = function(I, U) {
|
|
13988
|
-
for (var
|
|
13989
|
-
if (I[
|
|
13974
|
+
for (var X = 0; X < I.length; X++)
|
|
13975
|
+
if (I[X] % U !== 0)
|
|
13990
13976
|
return !1;
|
|
13991
13977
|
return !0;
|
|
13992
13978
|
}, _ = function(I) {
|
|
13993
|
-
for (var U = Math.abs(I[0]),
|
|
13994
|
-
if (Math.abs(I[
|
|
13979
|
+
for (var U = Math.abs(I[0]), X = 1; X < I.length; X++)
|
|
13980
|
+
if (Math.abs(I[X]) !== U)
|
|
13995
13981
|
return !1;
|
|
13996
13982
|
return !0;
|
|
13997
13983
|
}, F = function(I) {
|
|
13998
|
-
var U = !1,
|
|
13999
|
-
if (
|
|
13984
|
+
var U = !1, X = I.deltaY;
|
|
13985
|
+
if (X == null && (I.wheelDeltaY != null ? X = I.wheelDeltaY / 4 : I.wheelDelta != null && (X = I.wheelDelta / 4)), X !== 0) {
|
|
14000
13986
|
if (O == null)
|
|
14001
13987
|
if (M.length >= N) {
|
|
14002
13988
|
var K = M;
|
|
@@ -14008,8 +13994,8 @@ ua.load = function() {
|
|
|
14008
13994
|
for (var oe = 0; oe < K.length; oe++)
|
|
14009
13995
|
k = Math.min(Math.abs(K[oe]), k);
|
|
14010
13996
|
} else
|
|
14011
|
-
M.push(
|
|
14012
|
-
else O && (k = Math.min(Math.abs(
|
|
13997
|
+
M.push(X), U = !0;
|
|
13998
|
+
else O && (k = Math.min(Math.abs(X), k));
|
|
14013
13999
|
if (!t.scrollingPage) {
|
|
14014
14000
|
var te = t.cy, fe = te.zoom(), le = te.pan(), me = t.projectIntoViewport(I.clientX, I.clientY), Ae = [me[0] * fe + le.x, me[1] * fe + le.y];
|
|
14015
14001
|
if (t.hoverData.draggingEles || t.hoverData.dragging || t.hoverData.cxtStarted || C()) {
|
|
@@ -14021,7 +14007,7 @@ ua.load = function() {
|
|
|
14021
14007
|
t.data.wheelZooming = !1, t.redrawHint("eles", !0), t.redraw();
|
|
14022
14008
|
}, 150);
|
|
14023
14009
|
var Ce;
|
|
14024
|
-
U && Math.abs(
|
|
14010
|
+
U && Math.abs(X) > 5 && (X = vo(X) * 5), Ce = X / -250, O && (Ce /= k, Ce *= 3), Ce = Ce * t.wheelSensitivity;
|
|
14025
14011
|
var ce = I.deltaMode === 1;
|
|
14026
14012
|
ce && (Ce *= 33);
|
|
14027
14013
|
var Re = te.zoom() * Math.pow(10, Ce);
|
|
@@ -14072,46 +14058,46 @@ ua.load = function() {
|
|
|
14072
14058
|
}
|
|
14073
14059
|
});
|
|
14074
14060
|
}, !1);
|
|
14075
|
-
var G,
|
|
14076
|
-
return Math.sqrt((
|
|
14077
|
-
}, Pe = function(I, U,
|
|
14078
|
-
return (
|
|
14061
|
+
var G, Y, $, H, W, ee, ae, J, z, V, q, Z, re, ve = function(I, U, X, K) {
|
|
14062
|
+
return Math.sqrt((X - I) * (X - I) + (K - U) * (K - U));
|
|
14063
|
+
}, Pe = function(I, U, X, K) {
|
|
14064
|
+
return (X - I) * (X - I) + (K - U) * (K - U);
|
|
14079
14065
|
}, Te;
|
|
14080
14066
|
t.registerBinding(t.container, "touchstart", Te = function(I) {
|
|
14081
14067
|
if (t.hasTouchStarted = !0, !!D(I)) {
|
|
14082
14068
|
m(), t.touchData.capture = !0, t.data.bgActivePosistion = void 0;
|
|
14083
|
-
var U = t.cy,
|
|
14069
|
+
var U = t.cy, X = t.touchData.now, K = t.touchData.earlier;
|
|
14084
14070
|
if (I.touches[0]) {
|
|
14085
14071
|
var j = t.projectIntoViewport(I.touches[0].clientX, I.touches[0].clientY);
|
|
14086
|
-
|
|
14072
|
+
X[0] = j[0], X[1] = j[1];
|
|
14087
14073
|
}
|
|
14088
14074
|
if (I.touches[1]) {
|
|
14089
14075
|
var j = t.projectIntoViewport(I.touches[1].clientX, I.touches[1].clientY);
|
|
14090
|
-
|
|
14076
|
+
X[2] = j[0], X[3] = j[1];
|
|
14091
14077
|
}
|
|
14092
14078
|
if (I.touches[2]) {
|
|
14093
14079
|
var j = t.projectIntoViewport(I.touches[2].clientX, I.touches[2].clientY);
|
|
14094
|
-
|
|
14080
|
+
X[4] = j[0], X[5] = j[1];
|
|
14095
14081
|
}
|
|
14096
14082
|
var oe = function(ft) {
|
|
14097
14083
|
return {
|
|
14098
14084
|
originalEvent: I,
|
|
14099
14085
|
type: ft,
|
|
14100
14086
|
position: {
|
|
14101
|
-
x:
|
|
14102
|
-
y:
|
|
14087
|
+
x: X[0],
|
|
14088
|
+
y: X[1]
|
|
14103
14089
|
}
|
|
14104
14090
|
};
|
|
14105
14091
|
};
|
|
14106
14092
|
if (I.touches[1]) {
|
|
14107
14093
|
t.touchData.singleTouchMoved = !0, y(t.dragData.touchDragEles);
|
|
14108
14094
|
var te = t.findContainerClientCoords();
|
|
14109
|
-
z = te[0], V = te[1], q = te[2], Z = te[3], G = I.touches[0].clientX - z,
|
|
14095
|
+
z = te[0], V = te[1], q = te[2], Z = te[3], G = I.touches[0].clientX - z, Y = I.touches[0].clientY - V, $ = I.touches[1].clientX - z, H = I.touches[1].clientY - V, re = 0 <= G && G <= q && 0 <= $ && $ <= q && 0 <= Y && Y <= Z && 0 <= H && H <= Z;
|
|
14110
14096
|
var fe = U.pan(), le = U.zoom();
|
|
14111
|
-
W = ve(G,
|
|
14097
|
+
W = ve(G, Y, $, H), ee = Pe(G, Y, $, H), ae = [(G + $) / 2, (Y + H) / 2], J = [(ae[0] - fe.x) / le, (ae[1] - fe.y) / le];
|
|
14112
14098
|
var me = 200, Ae = me * me;
|
|
14113
14099
|
if (ee < Ae && !I.touches[2]) {
|
|
14114
|
-
var Ce = t.findNearestElement(
|
|
14100
|
+
var Ce = t.findNearestElement(X[0], X[1], !0, !0), ce = t.findNearestElement(X[2], X[3], !0, !0);
|
|
14115
14101
|
Ce && Ce.isNode() ? (Ce.activate().emit(oe("cxttapstart")), t.touchData.start = Ce) : ce && ce.isNode() ? (ce.activate().emit(oe("cxttapstart")), t.touchData.start = ce) : U.emit(oe("cxttapstart")), t.touchData.start && (t.touchData.start._private.grabbed = !1), t.touchData.cxt = !0, t.touchData.cxtDragged = !1, t.data.bgActivePosistion = void 0, t.redraw();
|
|
14116
14102
|
return;
|
|
14117
14103
|
}
|
|
@@ -14120,36 +14106,36 @@ ua.load = function() {
|
|
|
14120
14106
|
U.boxSelectionEnabled() && I.preventDefault();
|
|
14121
14107
|
else if (!I.touches[1]) {
|
|
14122
14108
|
if (I.touches[0]) {
|
|
14123
|
-
var Re = t.findNearestElements(
|
|
14109
|
+
var Re = t.findNearestElements(X[0], X[1], !0, !0), Le = Re[0];
|
|
14124
14110
|
if (Le != null && (Le.activate(), t.touchData.start = Le, t.touchData.starts = Re, t.nodeIsGrabbable(Le))) {
|
|
14125
|
-
var je = t.dragData.touchDragEles = U.collection(),
|
|
14126
|
-
t.redrawHint("eles", !0), t.redrawHint("drag", !0), Le.selected() ? (
|
|
14111
|
+
var je = t.dragData.touchDragEles = U.collection(), Xe = null;
|
|
14112
|
+
t.redrawHint("eles", !0), t.redrawHint("drag", !0), Le.selected() ? (Xe = U.$(function(et) {
|
|
14127
14113
|
return et.selected() && t.nodeIsGrabbable(et);
|
|
14128
|
-
}), p(
|
|
14114
|
+
}), p(Xe, {
|
|
14129
14115
|
addToList: je
|
|
14130
14116
|
})) : g(Le, {
|
|
14131
14117
|
addToList: je
|
|
14132
|
-
}), c(Le), Le.emit(oe("grabon")),
|
|
14118
|
+
}), c(Le), Le.emit(oe("grabon")), Xe ? Xe.forEach(function(et) {
|
|
14133
14119
|
et.emit(oe("grab"));
|
|
14134
14120
|
}) : Le.emit(oe("grab"));
|
|
14135
14121
|
}
|
|
14136
14122
|
n(Le, ["touchstart", "tapstart", "vmousedown"], I, {
|
|
14137
|
-
x:
|
|
14138
|
-
y:
|
|
14123
|
+
x: X[0],
|
|
14124
|
+
y: X[1]
|
|
14139
14125
|
}), Le == null && (t.data.bgActivePosistion = {
|
|
14140
14126
|
x: j[0],
|
|
14141
14127
|
y: j[1]
|
|
14142
14128
|
}, t.redrawHint("select", !0), t.redraw()), t.touchData.singleTouchMoved = !1, t.touchData.singleTouchStartTime = +/* @__PURE__ */ new Date(), clearTimeout(t.touchData.tapholdTimeout), t.touchData.tapholdTimeout = setTimeout(function() {
|
|
14143
14129
|
t.touchData.singleTouchMoved === !1 && !t.pinching && !t.touchData.selecting && n(t.touchData.start, ["taphold"], I, {
|
|
14144
|
-
x:
|
|
14145
|
-
y:
|
|
14130
|
+
x: X[0],
|
|
14131
|
+
y: X[1]
|
|
14146
14132
|
});
|
|
14147
14133
|
}, t.tapholdDuration);
|
|
14148
14134
|
}
|
|
14149
14135
|
}
|
|
14150
14136
|
if (I.touches.length >= 1) {
|
|
14151
|
-
for (var bt = t.touchData.startPosition = [null, null, null, null, null, null], Ke = 0; Ke <
|
|
14152
|
-
bt[Ke] = K[Ke] =
|
|
14137
|
+
for (var bt = t.touchData.startPosition = [null, null, null, null, null, null], Ke = 0; Ke < X.length; Ke++)
|
|
14138
|
+
bt[Ke] = K[Ke] = X[Ke];
|
|
14153
14139
|
var st = I.touches[0];
|
|
14154
14140
|
t.touchData.startGPosition = [st.clientX, st.clientY];
|
|
14155
14141
|
}
|
|
@@ -14159,7 +14145,7 @@ ua.load = function() {
|
|
|
14159
14145
|
t.registerBinding(e, "touchmove", we = function(I) {
|
|
14160
14146
|
var U = t.touchData.capture;
|
|
14161
14147
|
if (!(!U && !D(I))) {
|
|
14162
|
-
var
|
|
14148
|
+
var X = t.selection, K = t.cy, j = t.touchData.now, oe = t.touchData.earlier, te = K.zoom();
|
|
14163
14149
|
if (I.touches[0]) {
|
|
14164
14150
|
var fe = t.projectIntoViewport(I.touches[0].clientX, I.touches[0].clientY);
|
|
14165
14151
|
j[0] = fe[0], j[1] = fe[1];
|
|
@@ -14185,13 +14171,13 @@ ua.load = function() {
|
|
|
14185
14171
|
if (U && I.touches[0] && me) {
|
|
14186
14172
|
for (var Ce = [], ce = 0; ce < j.length; ce++)
|
|
14187
14173
|
Ce[ce] = j[ce] - oe[ce];
|
|
14188
|
-
var Re = I.touches[0].clientX - me[0], Le = Re * Re, je = I.touches[0].clientY - me[1],
|
|
14174
|
+
var Re = I.touches[0].clientX - me[0], Le = Re * Re, je = I.touches[0].clientY - me[1], Xe = je * je, bt = Le + Xe;
|
|
14189
14175
|
Ae = bt >= t.touchTapThreshold2;
|
|
14190
14176
|
}
|
|
14191
14177
|
if (U && t.touchData.cxt) {
|
|
14192
14178
|
I.preventDefault();
|
|
14193
|
-
var Ke = I.touches[0].clientX - z, st = I.touches[0].clientY - V, et = I.touches[1].clientX - z, ft = I.touches[1].clientY - V, tr = Pe(Ke, st, et, ft), Ze = tr / ee,
|
|
14194
|
-
if (Ze >= Wa || tr >=
|
|
14179
|
+
var Ke = I.touches[0].clientX - z, st = I.touches[0].clientY - V, et = I.touches[1].clientX - z, ft = I.touches[1].clientY - V, tr = Pe(Ke, st, et, ft), Ze = tr / ee, Ht = 150, Xt = Ht * Ht, _r = 1.5, Wa = _r * _r;
|
|
14180
|
+
if (Ze >= Wa || tr >= Xt) {
|
|
14195
14181
|
t.touchData.cxt = !1, t.data.bgActivePosistion = void 0, t.redrawHint("select", !0);
|
|
14196
14182
|
var xr = le("cxttapend");
|
|
14197
14183
|
t.touchData.start ? (t.touchData.start.unactivate().emit(xr), t.touchData.start = null) : K.emit(xr);
|
|
@@ -14203,7 +14189,7 @@ ua.load = function() {
|
|
|
14203
14189
|
var Tt = t.findNearestElement(j[0], j[1], !0, !0);
|
|
14204
14190
|
(!t.touchData.cxtOver || Tt !== t.touchData.cxtOver) && (t.touchData.cxtOver && t.touchData.cxtOver.emit(le("cxtdragout")), t.touchData.cxtOver = Tt, Tt && Tt.emit(le("cxtdragover")));
|
|
14205
14191
|
} else if (U && I.touches[2] && K.boxSelectionEnabled())
|
|
14206
|
-
I.preventDefault(), t.data.bgActivePosistion = void 0, this.lastThreeTouch = +/* @__PURE__ */ new Date(), t.touchData.selecting || K.emit(le("boxstart")), t.touchData.selecting = !0, t.touchData.didSelect = !0,
|
|
14192
|
+
I.preventDefault(), t.data.bgActivePosistion = void 0, this.lastThreeTouch = +/* @__PURE__ */ new Date(), t.touchData.selecting || K.emit(le("boxstart")), t.touchData.selecting = !0, t.touchData.didSelect = !0, X[4] = 1, !X || X.length === 0 || X[0] === void 0 ? (X[0] = (j[0] + j[2] + j[4]) / 3, X[1] = (j[1] + j[3] + j[5]) / 3, X[2] = (j[0] + j[2] + j[4]) / 3 + 1, X[3] = (j[1] + j[3] + j[5]) / 3 + 1) : (X[2] = (j[0] + j[2] + j[4]) / 3, X[3] = (j[1] + j[3] + j[5]) / 3), t.redrawHint("select", !0), t.redraw();
|
|
14207
14193
|
else if (U && I.touches[1] && !t.touchData.didSelect && K.zoomingEnabled() && K.panningEnabled() && K.userZoomingEnabled() && K.userPanningEnabled()) {
|
|
14208
14194
|
I.preventDefault(), t.data.bgActivePosistion = void 0, t.redrawHint("select", !0);
|
|
14209
14195
|
var gt = t.dragData.touchDragEles;
|
|
@@ -14216,7 +14202,7 @@ ua.load = function() {
|
|
|
14216
14202
|
}
|
|
14217
14203
|
var Rt = t.touchData.start, Ke = I.touches[0].clientX - z, st = I.touches[0].clientY - V, et = I.touches[1].clientX - z, ft = I.touches[1].clientY - V, Io = ve(Ke, st, et, ft), ov = Io / W;
|
|
14218
14204
|
if (re) {
|
|
14219
|
-
var uv = Ke - G, lv = st -
|
|
14205
|
+
var uv = Ke - G, lv = st - Y, fv = et - $, cv = ft - H, vv = (uv + fv) / 2, hv = (lv + cv) / 2, ca = K.zoom(), ni = ca * ov, Ka = K.pan(), Mo = J[0] * ca + Ka.x, Oo = J[1] * ca + Ka.y, dv = {
|
|
14220
14206
|
x: -ni / ca * (Mo - Ka.x - vv) + Mo,
|
|
14221
14207
|
y: -ni / ca * (Oo - Ka.y - hv) + Oo
|
|
14222
14208
|
};
|
|
@@ -14228,7 +14214,7 @@ ua.load = function() {
|
|
|
14228
14214
|
zoom: ni,
|
|
14229
14215
|
pan: dv,
|
|
14230
14216
|
cancelOnFailedZoom: !0
|
|
14231
|
-
}), K.emit(le("pinchzoom")), W = Io, G = Ke,
|
|
14217
|
+
}), K.emit(le("pinchzoom")), W = Io, G = Ke, Y = st, $ = et, H = ft, t.pinching = !0;
|
|
14232
14218
|
}
|
|
14233
14219
|
if (I.touches[0]) {
|
|
14234
14220
|
var fe = t.projectIntoViewport(I.touches[0].clientX, I.touches[0].clientY);
|
|
@@ -14295,8 +14281,8 @@ ua.load = function() {
|
|
|
14295
14281
|
});
|
|
14296
14282
|
var ie, he, de, xe;
|
|
14297
14283
|
if (t.registerBinding(e, "touchend", ie = function(I) {
|
|
14298
|
-
var U = t.touchData.start,
|
|
14299
|
-
if (
|
|
14284
|
+
var U = t.touchData.start, X = t.touchData.capture;
|
|
14285
|
+
if (X)
|
|
14300
14286
|
I.touches.length === 0 && (t.touchData.capture = !1), I.preventDefault();
|
|
14301
14287
|
else
|
|
14302
14288
|
return;
|
|
@@ -14315,10 +14301,10 @@ ua.load = function() {
|
|
|
14315
14301
|
var le = t.projectIntoViewport(I.touches[2].clientX, I.touches[2].clientY);
|
|
14316
14302
|
te[4] = le[0], te[5] = le[1];
|
|
14317
14303
|
}
|
|
14318
|
-
var me = function(
|
|
14304
|
+
var me = function(Xt) {
|
|
14319
14305
|
return {
|
|
14320
14306
|
originalEvent: I,
|
|
14321
|
-
type:
|
|
14307
|
+
type: Xt,
|
|
14322
14308
|
position: {
|
|
14323
14309
|
x: te[0],
|
|
14324
14310
|
y: te[1]
|
|
@@ -14339,8 +14325,8 @@ ua.load = function() {
|
|
|
14339
14325
|
t.touchData.selecting = !1;
|
|
14340
14326
|
var ce = j.collection(t.getAllInBox(K[0], K[1], K[2], K[3]));
|
|
14341
14327
|
K[0] = void 0, K[1] = void 0, K[2] = void 0, K[3] = void 0, K[4] = 0, t.redrawHint("select", !0), j.emit(me("boxend"));
|
|
14342
|
-
var Re = function(
|
|
14343
|
-
return
|
|
14328
|
+
var Re = function(Xt) {
|
|
14329
|
+
return Xt.selectable() && !Xt.selected();
|
|
14344
14330
|
};
|
|
14345
14331
|
ce.emit(me("box")).stdFilter(Re).select().emit(me("boxselect")), ce.nonempty() && t.redrawHint("eles", !0), t.redraw();
|
|
14346
14332
|
}
|
|
@@ -14358,8 +14344,8 @@ ua.load = function() {
|
|
|
14358
14344
|
y: te[1]
|
|
14359
14345
|
}), U.unactivate(), t.touchData.start = null;
|
|
14360
14346
|
} else {
|
|
14361
|
-
var
|
|
14362
|
-
n(
|
|
14347
|
+
var Xe = t.findNearestElement(te[0], te[1], !0, !0);
|
|
14348
|
+
n(Xe, ["touchend", "tapend", "vmouseup", "tapdragout"], I, {
|
|
14363
14349
|
x: te[0],
|
|
14364
14350
|
y: te[1]
|
|
14365
14351
|
});
|
|
@@ -14407,15 +14393,15 @@ ua.load = function() {
|
|
|
14407
14393
|
pe.push(Ie(I));
|
|
14408
14394
|
}, Be = function(I) {
|
|
14409
14395
|
for (var U = 0; U < pe.length; U++) {
|
|
14410
|
-
var
|
|
14411
|
-
if (
|
|
14396
|
+
var X = pe[U];
|
|
14397
|
+
if (X.event.pointerId === I.pointerId) {
|
|
14412
14398
|
pe.splice(U, 1);
|
|
14413
14399
|
return;
|
|
14414
14400
|
}
|
|
14415
14401
|
}
|
|
14416
14402
|
}, Fe = function(I) {
|
|
14417
|
-
var U = pe.filter(function(
|
|
14418
|
-
return
|
|
14403
|
+
var U = pe.filter(function(X) {
|
|
14404
|
+
return X.event.pointerId === I.pointerId;
|
|
14419
14405
|
})[0];
|
|
14420
14406
|
U.event = I, U.touch = De(I);
|
|
14421
14407
|
}, Ee = function(I) {
|
|
@@ -14612,8 +14598,8 @@ jt.generateBarrel = function() {
|
|
|
14612
14598
|
for (var v = this.generateBarrelBezierPts(n, i, s, o), h = function(x, C, D) {
|
|
14613
14599
|
var A = D[4], L = D[2], R = D[0], P = D[5], M = D[1], N = Math.min(A, R), O = Math.max(A, R), k = Math.min(P, M), B = Math.max(P, M);
|
|
14614
14600
|
if (N <= x && x <= O && k <= C && C <= B) {
|
|
14615
|
-
var _ = hd(A, L, R), F = id(_[0], _[1], _[2], x), G = F.filter(function(
|
|
14616
|
-
return 0 <=
|
|
14601
|
+
var _ = hd(A, L, R), F = id(_[0], _[1], _[2], x), G = F.filter(function(Y) {
|
|
14602
|
+
return 0 <= Y && Y <= 1;
|
|
14617
14603
|
});
|
|
14618
14604
|
if (G.length > 0)
|
|
14619
14605
|
return G[0];
|
|
@@ -14680,18 +14666,18 @@ jt.registerNodeShapes = function() {
|
|
|
14680
14666
|
return (v = this[c]) ? v : e.generatePolygon(c, l);
|
|
14681
14667
|
};
|
|
14682
14668
|
};
|
|
14683
|
-
var
|
|
14684
|
-
|
|
14669
|
+
var Ha = {};
|
|
14670
|
+
Ha.timeToRender = function() {
|
|
14685
14671
|
return this.redrawTotalTime / this.redrawCount;
|
|
14686
14672
|
};
|
|
14687
|
-
|
|
14673
|
+
Ha.redraw = function(t) {
|
|
14688
14674
|
t = t || If();
|
|
14689
14675
|
var e = this;
|
|
14690
14676
|
e.averageRedrawTime === void 0 && (e.averageRedrawTime = 0), e.lastRedrawTime === void 0 && (e.lastRedrawTime = 0), e.lastDrawTime === void 0 && (e.lastDrawTime = 0), e.requestedFrame = !0, e.renderOptions = t;
|
|
14691
14677
|
};
|
|
14692
|
-
|
|
14678
|
+
Ha.beforeRender = function(t, e) {
|
|
14693
14679
|
if (!this.destroyed) {
|
|
14694
|
-
e == null &&
|
|
14680
|
+
e == null && Ye("Priority is not optional for beforeRender");
|
|
14695
14681
|
var r = this.beforeRenderCallbacks;
|
|
14696
14682
|
r.push({
|
|
14697
14683
|
fn: t,
|
|
@@ -14701,18 +14687,18 @@ Xa.beforeRender = function(t, e) {
|
|
|
14701
14687
|
});
|
|
14702
14688
|
}
|
|
14703
14689
|
};
|
|
14704
|
-
var
|
|
14690
|
+
var Hl = function(e, r, a) {
|
|
14705
14691
|
for (var n = e.beforeRenderCallbacks, i = 0; i < n.length; i++)
|
|
14706
14692
|
n[i].fn(r, a);
|
|
14707
14693
|
};
|
|
14708
|
-
|
|
14694
|
+
Ha.startRenderLoop = function() {
|
|
14709
14695
|
var t = this, e = t.cy;
|
|
14710
14696
|
if (!t.renderLoopStarted) {
|
|
14711
14697
|
t.renderLoopStarted = !0;
|
|
14712
14698
|
var r = function(n) {
|
|
14713
14699
|
if (!t.destroyed) {
|
|
14714
14700
|
if (!e.batching()) if (t.requestedFrame && !t.skipFrame) {
|
|
14715
|
-
|
|
14701
|
+
Hl(t, !0, n);
|
|
14716
14702
|
var i = Qt();
|
|
14717
14703
|
t.render(t.renderOptions);
|
|
14718
14704
|
var s = t.lastDrawTime = Qt();
|
|
@@ -14720,7 +14706,7 @@ Xa.startRenderLoop = function() {
|
|
|
14720
14706
|
var o = s - i;
|
|
14721
14707
|
t.redrawTotalTime += o, t.lastRedrawTime = o, t.averageRedrawTime = t.averageRedrawTime / 2 + o / 2, t.requestedFrame = !1;
|
|
14722
14708
|
} else
|
|
14723
|
-
|
|
14709
|
+
Hl(t, !1, n);
|
|
14724
14710
|
t.skipFrame = !1, Ln(r);
|
|
14725
14711
|
}
|
|
14726
14712
|
};
|
|
@@ -14802,7 +14788,7 @@ la.destroy = function() {
|
|
|
14802
14788
|
la.isHeadless = function() {
|
|
14803
14789
|
return !1;
|
|
14804
14790
|
};
|
|
14805
|
-
[Do, Nc, Bc, ua, jt,
|
|
14791
|
+
[Do, Nc, Bc, ua, jt, Ha].forEach(function(t) {
|
|
14806
14792
|
be(la, t);
|
|
14807
14793
|
});
|
|
14808
14794
|
var Ls = 1e3 / 60, _c = {
|
|
@@ -14847,7 +14833,7 @@ var Ls = 1e3 / 60, _c = {
|
|
|
14847
14833
|
return mr(t, [{
|
|
14848
14834
|
key: "getIdsFor",
|
|
14849
14835
|
value: function(r) {
|
|
14850
|
-
r == null &&
|
|
14836
|
+
r == null && Ye("Can not get id list for null key");
|
|
14851
14837
|
var a = this.idsByKey, n = this.idsByKey.get(r);
|
|
14852
14838
|
return n || (n = new na(), a.set(r, n)), n;
|
|
14853
14839
|
}
|
|
@@ -14963,11 +14949,11 @@ var Ls = 1e3 / 60, _c = {
|
|
|
14963
14949
|
return i && this.invalidateKey(n), i || this.getNumberOfIdsForKey(n) === 0;
|
|
14964
14950
|
}
|
|
14965
14951
|
}]);
|
|
14966
|
-
})(),
|
|
14952
|
+
})(), Xl = 25, un = 50, bn = -4, Qs = 3, Gc = 7.99, Iy = 8, My = 1024, Oy = 1024, ky = 1024, Ny = 0.2, By = 0.8, Fy = 10, _y = 0.15, Gy = 0.1, zy = 0.9, Vy = 0.9, Uy = 100, qy = 1, Zr = {
|
|
14967
14953
|
dequeue: "dequeue",
|
|
14968
14954
|
downscale: "downscale",
|
|
14969
14955
|
highQuality: "highQuality"
|
|
14970
|
-
},
|
|
14956
|
+
}, $y = ht({
|
|
14971
14957
|
getKey: null,
|
|
14972
14958
|
doesEleInvalidateKey: Rn,
|
|
14973
14959
|
drawElement: null,
|
|
@@ -14980,7 +14966,7 @@ var Ls = 1e3 / 60, _c = {
|
|
|
14980
14966
|
}), xa = function(e, r) {
|
|
14981
14967
|
var a = this;
|
|
14982
14968
|
a.renderer = e, a.onDequeues = [];
|
|
14983
|
-
var n =
|
|
14969
|
+
var n = $y(r);
|
|
14984
14970
|
be(a, n), a.lookup = new Py(n.getKey, n.doesEleInvalidateKey), a.setupDequeueing();
|
|
14985
14971
|
}, it = xa.prototype;
|
|
14986
14972
|
it.reasons = Zr;
|
|
@@ -15017,7 +15003,7 @@ it.getElement = function(t, e, r, a, n) {
|
|
|
15017
15003
|
if (h && h.invalidated && (h.invalidated = !1, h.texture.invalidatedWidth -= h.width), h)
|
|
15018
15004
|
return h;
|
|
15019
15005
|
var d;
|
|
15020
|
-
if (f <=
|
|
15006
|
+
if (f <= Xl ? d = Xl : f <= un ? d = un : d = Math.ceil(f / un) * un, f > ky || c > Oy)
|
|
15021
15007
|
return null;
|
|
15022
15008
|
var p = i.getTextureQueue(d), g = p[p.length - 2], y = function() {
|
|
15023
15009
|
return i.recycleTexture(d, c) || i.addTexture(d, c);
|
|
@@ -15180,7 +15166,7 @@ it.setupDequeueing = _c.setupDequeueing({
|
|
|
15180
15166
|
return e.renderer.beforeRenderPriorities.eleTxrDeq;
|
|
15181
15167
|
}
|
|
15182
15168
|
});
|
|
15183
|
-
var
|
|
15169
|
+
var Yy = 1, Ca = -4, Fn = 2, Hy = 3.99, Xy = 50, Wy = 50, Ky = 0.15, Zy = 0.1, Qy = 0.9, Jy = 0.9, jy = 1, Wl = 250, em = 4e3 * 4e3, Kl = 32767, tm = !0, zc = function(e) {
|
|
15184
15170
|
var r = this, a = r.renderer = e, n = a.cy;
|
|
15185
15171
|
r.layersByLevel = {}, r.firstGet = !0, r.lastInvalidationTime = Qt() - 2 * Wl, r.skipping = !1, r.eleTxrDeqs = n.collection(), r.scheduleElementRefinement = Va(function() {
|
|
15186
15172
|
r.refineElementTextures(r.eleTxrDeqs), r.eleTxrDeqs.unmerge(r.eleTxrDeqs);
|
|
@@ -15212,7 +15198,7 @@ dt.getLayers = function(t, e, r) {
|
|
|
15212
15198
|
if (a.firstGet = !1, r == null) {
|
|
15213
15199
|
if (r = Math.ceil(co(s * e)), r < Ca)
|
|
15214
15200
|
r = Ca;
|
|
15215
|
-
else if (s >=
|
|
15201
|
+
else if (s >= Hy || r > Fn)
|
|
15216
15202
|
return null;
|
|
15217
15203
|
}
|
|
15218
15204
|
a.validateLayersElesOrdering(r, t);
|
|
@@ -15261,7 +15247,7 @@ dt.getLayers = function(t, e, r) {
|
|
|
15261
15247
|
};
|
|
15262
15248
|
if (a.skipping && !o)
|
|
15263
15249
|
return null;
|
|
15264
|
-
for (var y = null, b = t.length /
|
|
15250
|
+
for (var y = null, b = t.length / Yy, m = !o, E = 0; E < t.length; E++) {
|
|
15265
15251
|
var T = t[E], S = T._private.rscratch, w = S.imgLayerCaches = S.imgLayerCaches || {}, x = w[r];
|
|
15266
15252
|
if (x) {
|
|
15267
15253
|
y = x;
|
|
@@ -15407,7 +15393,7 @@ dt.requestRedraw = Va(function() {
|
|
|
15407
15393
|
t.redrawHint("eles", !0), t.redrawHint("drag", !0), t.redraw();
|
|
15408
15394
|
}, 100);
|
|
15409
15395
|
dt.setupDequeueing = _c.setupDequeueing({
|
|
15410
|
-
deqRedrawThreshold:
|
|
15396
|
+
deqRedrawThreshold: Xy,
|
|
15411
15397
|
deqCost: Ky,
|
|
15412
15398
|
deqAvgCost: Zy,
|
|
15413
15399
|
deqNoDrawCost: Qy,
|
|
@@ -15472,20 +15458,20 @@ Vc.arrowShapeImpl = function(t) {
|
|
|
15472
15458
|
circle: sm
|
|
15473
15459
|
}))[t];
|
|
15474
15460
|
};
|
|
15475
|
-
var
|
|
15476
|
-
|
|
15461
|
+
var Yt = {};
|
|
15462
|
+
Yt.drawElement = function(t, e, r, a, n, i) {
|
|
15477
15463
|
var s = this;
|
|
15478
15464
|
e.isNode() ? s.drawNode(t, e, r, a, n, i) : s.drawEdge(t, e, r, a, n, i);
|
|
15479
15465
|
};
|
|
15480
|
-
|
|
15466
|
+
Yt.drawElementOverlay = function(t, e) {
|
|
15481
15467
|
var r = this;
|
|
15482
15468
|
e.isNode() ? r.drawNodeOverlay(t, e) : r.drawEdgeOverlay(t, e);
|
|
15483
15469
|
};
|
|
15484
|
-
|
|
15470
|
+
Yt.drawElementUnderlay = function(t, e) {
|
|
15485
15471
|
var r = this;
|
|
15486
15472
|
e.isNode() ? r.drawNodeUnderlay(t, e) : r.drawEdgeUnderlay(t, e);
|
|
15487
15473
|
};
|
|
15488
|
-
|
|
15474
|
+
Yt.drawCachedElementPortion = function(t, e, r, a, n, i, s, o) {
|
|
15489
15475
|
var u = this, l = r.getBoundingBox(e);
|
|
15490
15476
|
if (!(l.w === 0 || l.h === 0)) {
|
|
15491
15477
|
var f = r.getElement(e, l, a, n, i);
|
|
@@ -15520,32 +15506,32 @@ var om = function() {
|
|
|
15520
15506
|
}, Rs = function(e, r) {
|
|
15521
15507
|
return r.pstyle("text-opacity").pfValue * r.effectiveOpacity();
|
|
15522
15508
|
};
|
|
15523
|
-
|
|
15509
|
+
Yt.drawCachedElement = function(t, e, r, a, n, i) {
|
|
15524
15510
|
var s = this, o = s.data, u = o.eleTxrCache, l = o.lblTxrCache, f = o.slbTxrCache, c = o.tlbTxrCache, v = e.boundingBox(), h = i === !0 ? u.reasons.highQuality : null;
|
|
15525
15511
|
if (!(v.w === 0 || v.h === 0 || !e.visible()) && (!a || ho(v, a))) {
|
|
15526
15512
|
var d = e.isEdge(), p = e.element()._private.rscratch.badLine;
|
|
15527
15513
|
s.drawElementUnderlay(t, e), s.drawCachedElementPortion(t, e, u, r, n, h, om, cm), (!d || !p) && s.drawCachedElementPortion(t, e, l, r, n, h, um, Rs), d && !p && (s.drawCachedElementPortion(t, e, f, r, n, h, lm, Rs), s.drawCachedElementPortion(t, e, c, r, n, h, fm, Rs)), s.drawElementOverlay(t, e);
|
|
15528
15514
|
}
|
|
15529
15515
|
};
|
|
15530
|
-
|
|
15516
|
+
Yt.drawElements = function(t, e) {
|
|
15531
15517
|
for (var r = this, a = 0; a < e.length; a++) {
|
|
15532
15518
|
var n = e[a];
|
|
15533
15519
|
r.drawElement(t, n);
|
|
15534
15520
|
}
|
|
15535
15521
|
};
|
|
15536
|
-
|
|
15522
|
+
Yt.drawCachedElements = function(t, e, r, a) {
|
|
15537
15523
|
for (var n = this, i = 0; i < e.length; i++) {
|
|
15538
15524
|
var s = e[i];
|
|
15539
15525
|
n.drawCachedElement(t, s, r, a);
|
|
15540
15526
|
}
|
|
15541
15527
|
};
|
|
15542
|
-
|
|
15528
|
+
Yt.drawCachedNodes = function(t, e, r, a) {
|
|
15543
15529
|
for (var n = this, i = 0; i < e.length; i++) {
|
|
15544
15530
|
var s = e[i];
|
|
15545
15531
|
s.isNode() && n.drawCachedElement(t, s, r, a);
|
|
15546
15532
|
}
|
|
15547
15533
|
};
|
|
15548
|
-
|
|
15534
|
+
Yt.drawLayeredElements = function(t, e, r, a) {
|
|
15549
15535
|
var n = this, i = n.data.lyrTxrCache.getLayers(e, r);
|
|
15550
15536
|
if (i)
|
|
15551
15537
|
for (var s = 0; s < i.length; s++) {
|
|
@@ -15732,16 +15718,16 @@ Lo.drawInscribedImage = function(t, e, r, a, n) {
|
|
|
15732
15718
|
B === "%" ? k += (y - A) * _ : k += _;
|
|
15733
15719
|
var F = f(r, "background-offset-y", "units", a), G = f(r, "background-offset-y", "pfValue", a);
|
|
15734
15720
|
F === "%" ? k += (y - A) * G : k += G, b.pathCache && (R -= o, k -= u, o = 0, u = 0);
|
|
15735
|
-
var
|
|
15721
|
+
var Y = t.globalAlpha;
|
|
15736
15722
|
t.globalAlpha = T;
|
|
15737
|
-
var
|
|
15738
|
-
if (S === "no" &&
|
|
15723
|
+
var $ = i.getImgSmoothing(t), H = !1;
|
|
15724
|
+
if (S === "no" && $ ? (i.setImgSmoothing(t, !1), H = !0) : S === "yes" && !$ && (i.setImgSmoothing(t, !0), H = !0), v === "no-repeat")
|
|
15739
15725
|
E && (t.save(), b.pathCache ? t.clip(b.pathCache) : (i.nodeShapes[i.getNodeShape(r)].draw(t, o, u, g, y, w, b), t.clip())), i.safeDrawImage(t, e, 0, 0, x, C, R, k, D, A), E && t.restore();
|
|
15740
15726
|
else {
|
|
15741
15727
|
var W = t.createPattern(e, v);
|
|
15742
15728
|
t.fillStyle = W, i.nodeShapes[i.getNodeShape(r)].draw(t, o, u, g, y, w, b), t.translate(R, k), t.fill(), t.translate(-R, -k);
|
|
15743
15729
|
}
|
|
15744
|
-
t.globalAlpha =
|
|
15730
|
+
t.globalAlpha = Y, H && i.setImgSmoothing(t, $);
|
|
15745
15731
|
}
|
|
15746
15732
|
};
|
|
15747
15733
|
var Fr = {};
|
|
@@ -15836,7 +15822,7 @@ Fr.drawText = function(t, e, r) {
|
|
|
15836
15822
|
G -= d / 2;
|
|
15837
15823
|
break;
|
|
15838
15824
|
}
|
|
15839
|
-
var
|
|
15825
|
+
var Y = l - p - C, $ = d + 2 * C, H = p + 2 * C;
|
|
15840
15826
|
if (_ && (t.fillStyle = "rgba(".concat(O[0], ",").concat(O[1], ",").concat(O[2], ",").concat(S * o, ")")), F && (t.strokeStyle = "rgba(".concat(k[0], ",").concat(k[1], ",").concat(k[2], ",").concat(w * o, ")"), t.lineWidth = x, t.setLineDash))
|
|
15841
15827
|
switch (B) {
|
|
15842
15828
|
case "dotted":
|
|
@@ -15853,9 +15839,9 @@ Fr.drawText = function(t, e, r) {
|
|
|
15853
15839
|
t.setLineDash([]);
|
|
15854
15840
|
break;
|
|
15855
15841
|
}
|
|
15856
|
-
if (A ? (t.beginPath(), jl(t, G,
|
|
15842
|
+
if (A ? (t.beginPath(), jl(t, G, Y, $, H, R)) : L ? (t.beginPath(), vm(t, G, Y, $, H)) : (t.beginPath(), t.rect(G, Y, $, H)), _ && t.fill(), F && t.stroke(), F && B === "double") {
|
|
15857
15843
|
var W = x / 2;
|
|
15858
|
-
t.beginPath(), A ? jl(t, G + W,
|
|
15844
|
+
t.beginPath(), A ? jl(t, G + W, Y + W, $ - 2 * W, H - 2 * W, R) : t.rect(G + W, Y + W, $ - 2 * W, H - 2 * W), t.stroke();
|
|
15859
15845
|
}
|
|
15860
15846
|
t.fillStyle = P, t.strokeStyle = M, t.lineWidth = N, t.setLineDash && t.setLineDash([]);
|
|
15861
15847
|
}
|
|
@@ -15896,7 +15882,7 @@ wr.drawNode = function(t, e, r) {
|
|
|
15896
15882
|
});
|
|
15897
15883
|
}
|
|
15898
15884
|
}
|
|
15899
|
-
var A = e.pstyle("background-blacken").value, L = e.pstyle("border-width").pfValue, R = e.pstyle("background-opacity").value * v, P = e.pstyle("border-color").value, M = e.pstyle("border-style").value, N = e.pstyle("border-join").value, O = e.pstyle("border-cap").value, k = e.pstyle("border-position").value, B = e.pstyle("border-dash-pattern").pfValue, _ = e.pstyle("border-dash-offset").pfValue, F = e.pstyle("border-opacity").value * v, G = e.pstyle("outline-width").pfValue,
|
|
15885
|
+
var A = e.pstyle("background-blacken").value, L = e.pstyle("border-width").pfValue, R = e.pstyle("background-opacity").value * v, P = e.pstyle("border-color").value, M = e.pstyle("border-style").value, N = e.pstyle("border-join").value, O = e.pstyle("border-cap").value, k = e.pstyle("border-position").value, B = e.pstyle("border-dash-pattern").pfValue, _ = e.pstyle("border-dash-offset").pfValue, F = e.pstyle("border-opacity").value * v, G = e.pstyle("outline-width").pfValue, Y = e.pstyle("outline-color").value, $ = e.pstyle("outline-style").value, H = e.pstyle("outline-opacity").value * v, W = e.pstyle("outline-offset").value, ee = e.pstyle("corner-radius").value;
|
|
15900
15886
|
ee !== "auto" && (ee = e.pstyle("corner-radius").pfValue);
|
|
15901
15887
|
var ae = function() {
|
|
15902
15888
|
var ue = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : R;
|
|
@@ -15905,11 +15891,11 @@ wr.drawNode = function(t, e, r) {
|
|
|
15905
15891
|
var ue = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : F;
|
|
15906
15892
|
s.colorStrokeStyle(t, P[0], P[1], P[2], ue);
|
|
15907
15893
|
}, z = function() {
|
|
15908
|
-
var ue = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] :
|
|
15909
|
-
s.colorStrokeStyle(t,
|
|
15894
|
+
var ue = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : H;
|
|
15895
|
+
s.colorStrokeStyle(t, Y[0], Y[1], Y[2], ue);
|
|
15910
15896
|
}, V = function(ue, Q, I, U) {
|
|
15911
|
-
var
|
|
15912
|
-
return j != null ? (oe = j, te = !0, f.pathCache = oe) : (oe = new Path2D(),
|
|
15897
|
+
var X = s.nodePathCache = s.nodePathCache || [], K = Af(I === "polygon" ? I + "," + U.join(",") : I, "" + Q, "" + ue, "" + ee), j = X[K], oe, te = !1;
|
|
15898
|
+
return j != null ? (oe = j, te = !0, f.pathCache = oe) : (oe = new Path2D(), X[K] = f.pathCache = oe), {
|
|
15913
15899
|
path: oe,
|
|
15914
15900
|
cacheHit: te
|
|
15915
15901
|
};
|
|
@@ -15929,13 +15915,13 @@ wr.drawNode = function(t, e, r) {
|
|
|
15929
15915
|
}
|
|
15930
15916
|
h ? t.fill(d) : t.fill();
|
|
15931
15917
|
}, Pe = function() {
|
|
15932
|
-
for (var ue = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : v, Q = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0, I = l.backgrounding, U = 0,
|
|
15933
|
-
var K = e.cy().style().getIndexedStyle(e, "background-image-containment", "value",
|
|
15918
|
+
for (var ue = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : v, Q = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0, I = l.backgrounding, U = 0, X = 0; X < T.length; X++) {
|
|
15919
|
+
var K = e.cy().style().getIndexedStyle(e, "background-image-containment", "value", X);
|
|
15934
15920
|
if (Q && K === "over" || !Q && K === "inside") {
|
|
15935
15921
|
U++;
|
|
15936
15922
|
continue;
|
|
15937
15923
|
}
|
|
15938
|
-
E[
|
|
15924
|
+
E[X] && T[X].complete && !T[X].error && (U++, s.drawInscribedImage(t, T[X], e, X, ue));
|
|
15939
15925
|
}
|
|
15940
15926
|
l.backgrounding = U !== S, I !== l.backgrounding && e.updateStyle(!1);
|
|
15941
15927
|
}, Te = function() {
|
|
@@ -15982,7 +15968,7 @@ wr.drawNode = function(t, e, r) {
|
|
|
15982
15968
|
}, he = function() {
|
|
15983
15969
|
if (G > 0) {
|
|
15984
15970
|
if (t.lineWidth = G, t.lineCap = "butt", t.setLineDash)
|
|
15985
|
-
switch (
|
|
15971
|
+
switch ($) {
|
|
15986
15972
|
case "dotted":
|
|
15987
15973
|
t.setLineDash([1, 1]);
|
|
15988
15974
|
break;
|
|
@@ -16001,7 +15987,7 @@ wr.drawNode = function(t, e, r) {
|
|
|
16001
15987
|
});
|
|
16002
15988
|
var Q = s.getNodeShape(e), I = L;
|
|
16003
15989
|
k === "inside" && (I = 0), k === "outside" && (I *= 2);
|
|
16004
|
-
var U = (o + I + (G + W)) / o,
|
|
15990
|
+
var U = (o + I + (G + W)) / o, X = (u + I + (G + W)) / u, K = o * U, j = u * X, oe = s.nodeShapes[Q].points, te;
|
|
16005
15991
|
if (h) {
|
|
16006
15992
|
var fe = V(K, j, Q, oe);
|
|
16007
15993
|
te = fe.path;
|
|
@@ -16010,16 +15996,16 @@ wr.drawNode = function(t, e, r) {
|
|
|
16010
15996
|
s.drawEllipsePath(te || t, ue.x, ue.y, K, j);
|
|
16011
15997
|
else if (["round-diamond", "round-heptagon", "round-hexagon", "round-octagon", "round-pentagon", "round-polygon", "round-triangle", "round-tag"].includes(Q)) {
|
|
16012
15998
|
var le = 0, me = 0, Ae = 0;
|
|
16013
|
-
Q === "round-diamond" ? le = (I + W + G) * 1.4 : Q === "round-heptagon" ? (le = (I + W + G) * 1.075, Ae = -(I / 2 + W + G) / 35) : Q === "round-hexagon" ? le = (I + W + G) * 1.12 : Q === "round-pentagon" ? (le = (I + W + G) * 1.13, Ae = -(I / 2 + W + G) / 15) : Q === "round-tag" ? (le = (I + W + G) * 1.12, me = (I / 2 + G + W) * 0.07) : Q === "round-triangle" && (le = (I + W + G) * (Math.PI / 2), Ae = -(I + W / 2 + G) / Math.PI), le !== 0 && (U = (o + le) / o, K = o * U, ["round-hexagon", "round-tag"].includes(Q) || (
|
|
16014
|
-
for (var Ce = K / 2, ce = j / 2, Re = ee + (I + G + W) / 2, Le = new Array(oe.length / 2), je = new Array(oe.length / 2),
|
|
16015
|
-
Le[
|
|
16016
|
-
x: ue.x + me + Ce * oe[
|
|
16017
|
-
y: ue.y + Ae + ce * oe[
|
|
15999
|
+
Q === "round-diamond" ? le = (I + W + G) * 1.4 : Q === "round-heptagon" ? (le = (I + W + G) * 1.075, Ae = -(I / 2 + W + G) / 35) : Q === "round-hexagon" ? le = (I + W + G) * 1.12 : Q === "round-pentagon" ? (le = (I + W + G) * 1.13, Ae = -(I / 2 + W + G) / 15) : Q === "round-tag" ? (le = (I + W + G) * 1.12, me = (I / 2 + G + W) * 0.07) : Q === "round-triangle" && (le = (I + W + G) * (Math.PI / 2), Ae = -(I + W / 2 + G) / Math.PI), le !== 0 && (U = (o + le) / o, K = o * U, ["round-hexagon", "round-tag"].includes(Q) || (X = (u + le) / u, j = u * X)), ee = ee === "auto" ? Ff(K, j) : ee;
|
|
16000
|
+
for (var Ce = K / 2, ce = j / 2, Re = ee + (I + G + W) / 2, Le = new Array(oe.length / 2), je = new Array(oe.length / 2), Xe = 0; Xe < oe.length / 2; Xe++)
|
|
16001
|
+
Le[Xe] = {
|
|
16002
|
+
x: ue.x + me + Ce * oe[Xe * 2],
|
|
16003
|
+
y: ue.y + Ae + ce * oe[Xe * 2 + 1]
|
|
16018
16004
|
};
|
|
16019
16005
|
var bt, Ke, st, et, ft = Le.length;
|
|
16020
16006
|
for (Ke = Le[ft - 1], bt = 0; bt < ft; bt++)
|
|
16021
16007
|
st = Le[bt % ft], et = Le[(bt + 1) % ft], je[bt] = So(Ke, st, et, Re), Ke = st, st = et;
|
|
16022
|
-
s.drawRoundPolygonPath(te || t, ue.x + me, ue.y + Ae, o * U, u *
|
|
16008
|
+
s.drawRoundPolygonPath(te || t, ue.x + me, ue.y + Ae, o * U, u * X, oe, je);
|
|
16023
16009
|
} else if (["roundrectangle", "round-rectangle"].includes(Q))
|
|
16024
16010
|
ee = ee === "auto" ? vr(K, j) : ee, s.drawRoundRectanglePath(te || t, ue.x, ue.y, K, j, ee + (I + G + W) / 2);
|
|
16025
16011
|
else if (["cutrectangle", "cut-rectangle"].includes(Q))
|
|
@@ -16035,10 +16021,10 @@ wr.drawNode = function(t, e, r) {
|
|
|
16035
16021
|
var Ze = (I + G + W) / o;
|
|
16036
16022
|
oe = Pn(In(oe, -Ze)), s.drawPolygonPath(te || t, ue.x, ue.y, o, u, oe);
|
|
16037
16023
|
}
|
|
16038
|
-
if (h ? t.stroke(te) : t.stroke(),
|
|
16024
|
+
if (h ? t.stroke(te) : t.stroke(), $ === "double") {
|
|
16039
16025
|
t.lineWidth = I / 3;
|
|
16040
|
-
var
|
|
16041
|
-
t.globalCompositeOperation = "destination-out", h ? t.stroke(te) : t.stroke(), t.globalCompositeOperation =
|
|
16026
|
+
var Ht = t.globalCompositeOperation;
|
|
16027
|
+
t.globalCompositeOperation = "destination-out", h ? t.stroke(te) : t.stroke(), t.globalCompositeOperation = Ht;
|
|
16042
16028
|
}
|
|
16043
16029
|
t.setLineDash && t.setLineDash([]);
|
|
16044
16030
|
}
|
|
@@ -16315,15 +16301,15 @@ xt.render = function(t) {
|
|
|
16315
16301
|
} else e.textureOnViewport && !a && (e.textureCache = null);
|
|
16316
16302
|
var k = r.extent(), B = e.pinching || e.hoverData.dragging || e.swipePanning || e.data.wheelZooming || e.hoverData.draggingEles || e.cy.animated(), _ = e.hideEdgesOnViewport && B, F = [];
|
|
16317
16303
|
if (F[e.NODE] = !f[e.NODE] && v && !e.clearedForMotionBlur[e.NODE] || e.clearingMotionBlur, F[e.NODE] && (e.clearedForMotionBlur[e.NODE] = !0), F[e.DRAG] = !f[e.DRAG] && v && !e.clearedForMotionBlur[e.DRAG] || e.clearingMotionBlur, F[e.DRAG] && (e.clearedForMotionBlur[e.DRAG] = !0), f[e.NODE] || n || i || F[e.NODE]) {
|
|
16318
|
-
var G = v && !F[e.NODE] && h !== 1, P = a || (G ? e.data.bufferContexts[e.MOTIONBLUR_BUFFER_NODE] : l.contexts[e.NODE]),
|
|
16319
|
-
L(P,
|
|
16304
|
+
var G = v && !F[e.NODE] && h !== 1, P = a || (G ? e.data.bufferContexts[e.MOTIONBLUR_BUFFER_NODE] : l.contexts[e.NODE]), Y = v && !G ? "motionBlur" : void 0;
|
|
16305
|
+
L(P, Y), _ ? e.drawCachedNodes(P, D.nondrag, u, k) : e.drawLayeredElements(P, D.nondrag, u, k), e.debug && e.drawDebugPoints(P, D.nondrag), !n && !v && (f[e.NODE] = !1);
|
|
16320
16306
|
}
|
|
16321
16307
|
if (!i && (f[e.DRAG] || n || F[e.DRAG])) {
|
|
16322
16308
|
var G = v && !F[e.DRAG] && h !== 1, P = a || (G ? e.data.bufferContexts[e.MOTIONBLUR_BUFFER_DRAG] : l.contexts[e.DRAG]);
|
|
16323
16309
|
L(P, v && !G ? "motionBlur" : void 0), _ ? e.drawCachedNodes(P, D.drag, u, k) : e.drawCachedElements(P, D.drag, u, k), e.debug && e.drawDebugPoints(P, D.drag), !n && !v && (f[e.DRAG] = !1);
|
|
16324
16310
|
}
|
|
16325
16311
|
if (this.drawSelectionRectangle(t, L), v && h !== 1) {
|
|
16326
|
-
var
|
|
16312
|
+
var $ = l.contexts[e.NODE], H = e.data.bufferCanvases[e.MOTIONBLUR_BUFFER_NODE], W = l.contexts[e.DRAG], ee = e.data.bufferCanvases[e.MOTIONBLUR_BUFFER_DRAG], ae = function(z, V, q) {
|
|
16327
16313
|
z.setTransform(1, 0, 0, 1, 0, 0), q || !y ? z.clearRect(0, 0, e.canvasWidth, e.canvasHeight) : A(z, 0, 0, e.canvasWidth, e.canvasHeight);
|
|
16328
16314
|
var Z = h;
|
|
16329
16315
|
z.drawImage(
|
|
@@ -16343,7 +16329,7 @@ xt.render = function(t) {
|
|
|
16343
16329
|
// w, h
|
|
16344
16330
|
);
|
|
16345
16331
|
};
|
|
16346
|
-
(f[e.NODE] || F[e.NODE]) && (ae(
|
|
16332
|
+
(f[e.NODE] || F[e.NODE]) && (ae($, H, F[e.NODE]), f[e.NODE] = !1), (f[e.DRAG] || F[e.DRAG]) && (ae(W, ee, F[e.DRAG]), f[e.DRAG] = !1);
|
|
16347
16333
|
}
|
|
16348
16334
|
e.prevViewport = w, e.clearingMotionBlur && (e.clearingMotionBlur = !1, e.motionBlurCleared = !0, e.motionBlur = !0), v && (e.motionBlurTimeout = setTimeout(function() {
|
|
16349
16335
|
e.motionBlurTimeout = null, e.clearedForMotionBlur[e.NODE] = !1, e.clearedForMotionBlur[e.DRAG] = !1, e.motionBlur = !1, e.clearingMotionBlur = !c, e.mbFrames = 0, f[e.NODE] = !0, f[e.DRAG] = !0, e.redraw();
|
|
@@ -16429,7 +16415,7 @@ function Cr(t, e, r) {
|
|
|
16429
16415
|
var a = t[0] / 255, n = t[1] / 255, i = t[2] / 255, s = e, o = r || new Array(4);
|
|
16430
16416
|
return o[0] = a * s, o[1] = n * s, o[2] = i * s, o[3] = s, o;
|
|
16431
16417
|
}
|
|
16432
|
-
function
|
|
16418
|
+
function $r(t, e) {
|
|
16433
16419
|
var r = e || new Array(4);
|
|
16434
16420
|
return r[0] = (t >> 0 & 255) / 255, r[1] = (t >> 8 & 255) / 255, r[2] = (t >> 16 & 255) / 255, r[3] = (t >> 24 & 255) / 255, r;
|
|
16435
16421
|
}
|
|
@@ -16444,7 +16430,7 @@ function Em(t, e) {
|
|
|
16444
16430
|
t.deleteTexture(r);
|
|
16445
16431
|
}, r;
|
|
16446
16432
|
}
|
|
16447
|
-
function
|
|
16433
|
+
function $c(t, e) {
|
|
16448
16434
|
switch (e) {
|
|
16449
16435
|
case "float":
|
|
16450
16436
|
return [1, t.FLOAT, 4];
|
|
@@ -16460,7 +16446,7 @@ function Yc(t, e) {
|
|
|
16460
16446
|
return [2, t.INT, 4];
|
|
16461
16447
|
}
|
|
16462
16448
|
}
|
|
16463
|
-
function
|
|
16449
|
+
function Yc(t, e, r) {
|
|
16464
16450
|
switch (e) {
|
|
16465
16451
|
case t.FLOAT:
|
|
16466
16452
|
return new Float32Array(r);
|
|
@@ -16477,11 +16463,11 @@ function xm(t, e, r, a, n, i) {
|
|
|
16477
16463
|
}
|
|
16478
16464
|
}
|
|
16479
16465
|
function Tm(t, e, r, a) {
|
|
16480
|
-
var n =
|
|
16466
|
+
var n = $c(t, e), i = Je(n, 2), s = i[0], o = i[1], u = Yc(t, o, a), l = t.createBuffer();
|
|
16481
16467
|
return t.bindBuffer(t.ARRAY_BUFFER, l), t.bufferData(t.ARRAY_BUFFER, u, t.STATIC_DRAW), o === t.FLOAT ? t.vertexAttribPointer(r, s, o, !1, 0, 0) : o === t.INT && t.vertexAttribIPointer(r, s, o, 0, 0), t.enableVertexAttribArray(r), t.bindBuffer(t.ARRAY_BUFFER, null), l;
|
|
16482
16468
|
}
|
|
16483
16469
|
function zt(t, e, r, a) {
|
|
16484
|
-
var n =
|
|
16470
|
+
var n = $c(t, r), i = Je(n, 3), s = i[0], o = i[1], u = i[2], l = Yc(t, o, e * s), f = s * u, c = t.createBuffer();
|
|
16485
16471
|
t.bindBuffer(t.ARRAY_BUFFER, c), t.bufferData(t.ARRAY_BUFFER, e * f, t.DYNAMIC_DRAW), t.enableVertexAttribArray(a), o === t.FLOAT ? t.vertexAttribPointer(a, s, o, !1, f, 0) : o === t.INT && t.vertexAttribIPointer(a, s, o, f, 0), t.vertexAttribDivisor(a, 1), t.bindBuffer(t.ARRAY_BUFFER, null);
|
|
16486
16472
|
for (var v = new Array(e), h = 0; h < e; h++)
|
|
16487
16473
|
v[h] = xm(t, o, l, f, s, h);
|
|
@@ -17072,7 +17058,7 @@ var Im = /* @__PURE__ */ (function() {
|
|
|
17072
17058
|
// don't render the texture at all
|
|
17073
17059
|
USE_BB: 2
|
|
17074
17060
|
// render the bounding box as an opaque rectangle
|
|
17075
|
-
}, Is = 0, nf = 1, sf = 2, Ms = 3,
|
|
17061
|
+
}, Is = 0, nf = 1, sf = 2, Ms = 3, Yr = 4, ln = 5, ma = 6, ba = 7, Fm = /* @__PURE__ */ (function() {
|
|
17076
17062
|
function t(e, r, a) {
|
|
17077
17063
|
yr(this, t), this.r = e, this.gl = r, this.maxInstances = a.webglBatchSize, this.atlasSize = a.webglTexSize, this.bgColor = a.bgColor, this.debug = a.webglDebug, this.batchDebugInfo = [], a.enableWrapping = !0, a.createTextureCanvas = gm, this.atlasManager = new Im(e, a), this.batchManager = new Mm(a), this.simpleShapeOptions = /* @__PURE__ */ new Map(), this.program = this._createShaderProgram(Da.SCREEN), this.pickingProgram = this._createShaderProgram(Da.PICKING), this.vao = this._createVAO();
|
|
17078
17064
|
}
|
|
@@ -17219,7 +17205,7 @@ var Im = /* @__PURE__ */ (function() {
|
|
|
17219
17205
|
|
|
17220
17206
|
gl_Position = vec4(uPanZoomMatrix * aTransform * vec3(position, 1.0), 1.0);
|
|
17221
17207
|
}
|
|
17222
|
-
else if(aVertType == `).concat(
|
|
17208
|
+
else if(aVertType == `).concat(Yr, " || aVertType == ").concat(ba, `
|
|
17223
17209
|
|| aVertType == `).concat(ln, " || aVertType == ").concat(ma, `) { // simple shapes
|
|
17224
17210
|
|
|
17225
17211
|
// the bounding box is needed by the fragment shader
|
|
@@ -17377,10 +17363,10 @@ var Im = /* @__PURE__ */ (function() {
|
|
|
17377
17363
|
outColor = blend(vColor, uBGColor);
|
|
17378
17364
|
outColor.a = 1.0; // make opaque, masks out line under arrow
|
|
17379
17365
|
}
|
|
17380
|
-
else if(vVertType == `).concat(
|
|
17366
|
+
else if(vVertType == `).concat(Yr, ` && vBorderWidth == vec2(0.0)) { // simple rectangle with no border
|
|
17381
17367
|
outColor = vColor; // unit square is already transformed to the rectangle, nothing else needs to be done
|
|
17382
17368
|
}
|
|
17383
|
-
else if(vVertType == `).concat(
|
|
17369
|
+
else if(vVertType == `).concat(Yr, " || vVertType == ").concat(ba, `
|
|
17384
17370
|
|| vVertType == `).concat(ln, " || vVertType == ").concat(ma, `) { // use SDF
|
|
17385
17371
|
|
|
17386
17372
|
float outerBorder = vBorderWidth[0];
|
|
@@ -17392,7 +17378,7 @@ var Im = /* @__PURE__ */ (function() {
|
|
|
17392
17378
|
vec2 p = vPosition - vec2(vTopRight.x - b[0] - outerBorder, vTopRight.y - b[1] - outerBorder); // translate to center
|
|
17393
17379
|
|
|
17394
17380
|
float d; // signed distance
|
|
17395
|
-
if(vVertType == `).concat(
|
|
17381
|
+
if(vVertType == `).concat(Yr, `) {
|
|
17396
17382
|
d = rectangleSD(p, b);
|
|
17397
17383
|
} else if(vVertType == `).concat(ba, ` && w == h) {
|
|
17398
17384
|
d = circleSD(p, b.x); // faster than ellipse
|
|
@@ -17509,7 +17495,7 @@ var Im = /* @__PURE__ */ (function() {
|
|
|
17509
17495
|
var S = this.instanceCount;
|
|
17510
17496
|
this.vertTypeBuffer.getView(S)[0] = Is;
|
|
17511
17497
|
var w = this.indexBuffer.getView(S);
|
|
17512
|
-
|
|
17498
|
+
$r(a, w);
|
|
17513
17499
|
var x = this.atlasIdBuffer.getView(S);
|
|
17514
17500
|
x[0] = g;
|
|
17515
17501
|
var C = this.texBuffer.getView(S);
|
|
@@ -17589,9 +17575,9 @@ var Im = /* @__PURE__ */ (function() {
|
|
|
17589
17575
|
key: "drawPickingRectangle",
|
|
17590
17576
|
value: function(r, a, n) {
|
|
17591
17577
|
var i = this.atlasManager.getRenderTypeOpts(n), s = this.instanceCount;
|
|
17592
|
-
this.vertTypeBuffer.getView(s)[0] =
|
|
17578
|
+
this.vertTypeBuffer.getView(s)[0] = Yr;
|
|
17593
17579
|
var o = this.indexBuffer.getView(s);
|
|
17594
|
-
|
|
17580
|
+
$r(a, o);
|
|
17595
17581
|
var u = this.colorBuffer.getView(s);
|
|
17596
17582
|
Cr([0, 0, 0], 1, u);
|
|
17597
17583
|
var l = this.transformBuffer.getMatrixView(s);
|
|
@@ -17616,7 +17602,7 @@ var Im = /* @__PURE__ */ (function() {
|
|
|
17616
17602
|
c[0] = f, c[1] = f, c[2] = f, c[3] = f, o === ma && (c[0] = 0, c[2] = 0);
|
|
17617
17603
|
}
|
|
17618
17604
|
var v = this.indexBuffer.getView(u);
|
|
17619
|
-
|
|
17605
|
+
$r(a, v);
|
|
17620
17606
|
var h = r.pstyle(s.color).value, d = r.pstyle(s.opacity).value, p = this.colorBuffer.getView(u);
|
|
17621
17607
|
Cr(h, d, p);
|
|
17622
17608
|
var g = this.lineWidthBuffer.getView(u);
|
|
@@ -17646,7 +17632,7 @@ var Im = /* @__PURE__ */ (function() {
|
|
|
17646
17632
|
var n = r.pstyle(a).value;
|
|
17647
17633
|
switch (n) {
|
|
17648
17634
|
case "rectangle":
|
|
17649
|
-
return
|
|
17635
|
+
return Yr;
|
|
17650
17636
|
case "ellipse":
|
|
17651
17637
|
return ba;
|
|
17652
17638
|
case "roundrectangle":
|
|
@@ -17681,7 +17667,7 @@ var Im = /* @__PURE__ */ (function() {
|
|
|
17681
17667
|
var f = r.pstyle(n + "-arrow-color").value, c = r.pstyle("opacity").value, v = r.pstyle("line-opacity").value, h = c * v, d = r.pstyle("width").pfValue, p = r.pstyle("arrow-scale").value, g = this.r.getArrowWidth(d, p), y = this.instanceCount, b = this.transformBuffer.getMatrixView(y);
|
|
17682
17668
|
rf(b), wn(b, b, [s, o]), Js(b, b, [g, g]), af(b, b, u), this.vertTypeBuffer.getView(y)[0] = Ms;
|
|
17683
17669
|
var m = this.indexBuffer.getView(y);
|
|
17684
|
-
|
|
17670
|
+
$r(a, m);
|
|
17685
17671
|
var E = this.colorBuffer.getView(y);
|
|
17686
17672
|
Cr(f, h, E), this.instanceCount++, this.instanceCount >= this.maxInstances && this.endBatch();
|
|
17687
17673
|
}
|
|
@@ -17702,7 +17688,7 @@ var Im = /* @__PURE__ */ (function() {
|
|
|
17702
17688
|
var f = this.instanceCount;
|
|
17703
17689
|
this.vertTypeBuffer.getView(f)[0] = nf;
|
|
17704
17690
|
var c = this.indexBuffer.getView(f);
|
|
17705
|
-
|
|
17691
|
+
$r(a, c);
|
|
17706
17692
|
var v = this.colorBuffer.getView(f);
|
|
17707
17693
|
Cr(u, l, v);
|
|
17708
17694
|
var h = this.lineWidthBuffer.getView(f);
|
|
@@ -17714,7 +17700,7 @@ var Im = /* @__PURE__ */ (function() {
|
|
|
17714
17700
|
var g = this.instanceCount;
|
|
17715
17701
|
this.vertTypeBuffer.getView(g)[0] = sf;
|
|
17716
17702
|
var y = this.indexBuffer.getView(g);
|
|
17717
|
-
|
|
17703
|
+
$r(a, y);
|
|
17718
17704
|
var b = this.colorBuffer.getView(g);
|
|
17719
17705
|
Cr(u, l, b);
|
|
17720
17706
|
var m = this.lineWidthBuffer.getView(g);
|
|
@@ -17832,8 +17818,8 @@ var Im = /* @__PURE__ */ (function() {
|
|
|
17832
17818
|
};
|
|
17833
17819
|
}
|
|
17834
17820
|
}]);
|
|
17835
|
-
})(),
|
|
17836
|
-
|
|
17821
|
+
})(), Hc = {};
|
|
17822
|
+
Hc.initWebgl = function(t, e) {
|
|
17837
17823
|
var r = this, a = r.data.contexts[r.WEBGL];
|
|
17838
17824
|
t.bgColor = _m(r), t.webglTexSize = Math.min(t.webglTexSize, a.getParameter(a.MAX_TEXTURE_SIZE)), t.webglTexRows = Math.min(t.webglTexRows, 54), t.webglTexRowsNodes = Math.min(t.webglTexRowsNodes, 54), t.webglBatchSize = Math.min(t.webglBatchSize, 16384), t.webglTexPerBatch = Math.min(t.webglTexPerBatch, a.getParameter(a.MAX_TEXTURE_IMAGE_UNITS)), r.webglDebug = t.webglDebug, r.webglDebugShowAtlases = t.webglDebugShowAtlases, r.pickingFrameBuffer = Dm(a), r.pickingFrameBuffer.needsDraw = !0, r.drawing = new Fm(r, a, t);
|
|
17839
17825
|
var n = function(c) {
|
|
@@ -17947,13 +17933,13 @@ function _m(t) {
|
|
|
17947
17933
|
var e = t.cy.container(), r = e && e.style && e.style.backgroundColor || "white";
|
|
17948
17934
|
return wf(r);
|
|
17949
17935
|
}
|
|
17950
|
-
function
|
|
17936
|
+
function Xc(t, e) {
|
|
17951
17937
|
var r = t._private.rscratch;
|
|
17952
17938
|
return Dt(r, "labelWrapCachedLines", e) || [];
|
|
17953
17939
|
}
|
|
17954
17940
|
var Os = function(e, r) {
|
|
17955
17941
|
return function(a) {
|
|
17956
|
-
var n = e(a), i =
|
|
17942
|
+
var n = e(a), i = Xc(a, r);
|
|
17957
17943
|
return i.length > 1 ? i.map(function(s, o) {
|
|
17958
17944
|
return "".concat(n, "_").concat(o);
|
|
17959
17945
|
}) : n;
|
|
@@ -17964,7 +17950,7 @@ var Os = function(e, r) {
|
|
|
17964
17950
|
if (typeof n == "string") {
|
|
17965
17951
|
var s = n.indexOf("_");
|
|
17966
17952
|
if (s > 0) {
|
|
17967
|
-
var o = Number(n.substring(s + 1)), u =
|
|
17953
|
+
var o = Number(n.substring(s + 1)), u = Xc(a, r), l = i.h / u.length, f = l * o, c = i.y1 + f;
|
|
17968
17954
|
return {
|
|
17969
17955
|
x1: i.x1,
|
|
17970
17956
|
w: i.w,
|
|
@@ -17993,7 +17979,7 @@ function Gm(t) {
|
|
|
17993
17979
|
};
|
|
17994
17980
|
}
|
|
17995
17981
|
t.findNearestElements = function(i, s, o, u) {
|
|
17996
|
-
return
|
|
17982
|
+
return Xm(t, i, s);
|
|
17997
17983
|
};
|
|
17998
17984
|
{
|
|
17999
17985
|
var a = t.invalidateCachedZSortedEles;
|
|
@@ -18037,11 +18023,11 @@ function qm(t, e) {
|
|
|
18037
18023
|
return Wc(t, r);
|
|
18038
18024
|
});
|
|
18039
18025
|
}
|
|
18040
|
-
function
|
|
18026
|
+
function $m(t) {
|
|
18041
18027
|
var e = t.data.contexts[t.NODE];
|
|
18042
18028
|
e.save(), Wc(t, e), e.strokeStyle = "rgba(0, 0, 0, 0.3)", e.beginPath(), e.moveTo(-1e3, 0), e.lineTo(1e3, 0), e.stroke(), e.beginPath(), e.moveTo(0, -1e3), e.lineTo(0, 1e3), e.stroke(), e.restore();
|
|
18043
18029
|
}
|
|
18044
|
-
function
|
|
18030
|
+
function Ym(t) {
|
|
18045
18031
|
var e = function(n, i, s) {
|
|
18046
18032
|
for (var o = n.atlasManager.getAtlasCollection(i), u = t.data.contexts[t.NODE], l = o.atlases, f = 0; f < l.length; f++) {
|
|
18047
18033
|
var c = l[f], v = c.canvas;
|
|
@@ -18053,7 +18039,7 @@ function Hm(t) {
|
|
|
18053
18039
|
}, r = 0;
|
|
18054
18040
|
e(t.drawing, "node", r++), e(t.drawing, "label", r++);
|
|
18055
18041
|
}
|
|
18056
|
-
function
|
|
18042
|
+
function Hm(t, e, r, a, n) {
|
|
18057
18043
|
var i, s, o, u, l = Ro(t), f = l.pan, c = l.zoom;
|
|
18058
18044
|
{
|
|
18059
18045
|
var v = ym(t, f, c, e, r), h = Je(v, 2), d = h[0], p = h[1], g = 6;
|
|
@@ -18071,8 +18057,8 @@ function Xm(t, e, r, a, n) {
|
|
|
18071
18057
|
}
|
|
18072
18058
|
return E;
|
|
18073
18059
|
}
|
|
18074
|
-
function
|
|
18075
|
-
var a =
|
|
18060
|
+
function Xm(t, e, r) {
|
|
18061
|
+
var a = Hm(t, e, r), n = t.getCachedZSortedEles(), i, s, o = At(a), u;
|
|
18076
18062
|
try {
|
|
18077
18063
|
for (o.s(); !(u = o.n()).done; ) {
|
|
18078
18064
|
var l = u.value, f = n[l];
|
|
@@ -18106,7 +18092,7 @@ function Kc(t, e, r) {
|
|
|
18106
18092
|
} else if (r.picking)
|
|
18107
18093
|
for (var c = 0; c < u.length; c++)
|
|
18108
18094
|
Ns(t, c, u[c]);
|
|
18109
|
-
n.endFrame(), r.screen && t.webglDebugShowAtlases && (
|
|
18095
|
+
n.endFrame(), r.screen && t.webglDebugShowAtlases && ($m(t), Ym(t)), t.data.canvasNeedsRedraw[t.NODE] = !1, t.data.canvasNeedsRedraw[t.DRAG] = !1;
|
|
18110
18096
|
}
|
|
18111
18097
|
if (t.webglDebug) {
|
|
18112
18098
|
var v = performance.now(), h = !1, d = Math.ceil(v - a), p = n.getDebugInfo(), g = ["".concat(i, " elements"), "".concat(p.totalInstances, " instances"), "".concat(p.batchCount, " batches"), "".concat(p.totalAtlases, " atlases"), "".concat(p.wrappedCount, " wrapped textures"), "".concat(p.simpleCount, " simple shapes")].join(", ");
|
|
@@ -18160,8 +18146,8 @@ Er.drawBarrelPath = function(t, e, r, a, n) {
|
|
|
18160
18146
|
t.beginPath && t.beginPath(), t.moveTo(o, l + h), t.lineTo(o, f - h), t.quadraticCurveTo(o + d, f, o + v, f), t.lineTo(u - v, f), t.quadraticCurveTo(u - d, f, u, f - h), t.lineTo(u, l + h), t.quadraticCurveTo(u - d, l, u - v, l), t.lineTo(o + v, l), t.quadraticCurveTo(o + d, l, o, l + h), t.closePath();
|
|
18161
18147
|
};
|
|
18162
18148
|
var of = Math.sin(0), uf = Math.cos(0), js = {}, eo = {}, Zc = Math.PI / 40;
|
|
18163
|
-
for (var
|
|
18164
|
-
js[
|
|
18149
|
+
for (var Hr = 0 * Math.PI; Hr < 2 * Math.PI; Hr += Zc)
|
|
18150
|
+
js[Hr] = Math.sin(Hr), eo[Hr] = Math.cos(Hr);
|
|
18165
18151
|
Er.drawEllipsePath = function(t, e, r, a, n) {
|
|
18166
18152
|
if (t.beginPath && t.beginPath(), t.ellipse)
|
|
18167
18153
|
t.ellipse(e, r, a / 2, n / 2, 0, 0, 2 * Math.PI);
|
|
@@ -18170,12 +18156,12 @@ Er.drawEllipsePath = function(t, e, r, a, n) {
|
|
|
18170
18156
|
i = e - o * js[l] * of + o * eo[l] * uf, s = r + u * eo[l] * of + u * js[l] * uf, l === 0 ? t.moveTo(i, s) : t.lineTo(i, s);
|
|
18171
18157
|
t.closePath();
|
|
18172
18158
|
};
|
|
18173
|
-
var
|
|
18174
|
-
|
|
18159
|
+
var Xa = {};
|
|
18160
|
+
Xa.createBuffer = function(t, e) {
|
|
18175
18161
|
var r = document.createElement("canvas");
|
|
18176
18162
|
return r.width = t, r.height = e, [r, r.getContext("2d")];
|
|
18177
18163
|
};
|
|
18178
|
-
|
|
18164
|
+
Xa.bufferCanvasImage = function(t) {
|
|
18179
18165
|
var e = this.cy, r = e.mutableElements(), a = r.boundingBox(), n = this.findContainerClientCoords(), i = t.full ? Math.ceil(a.w) : n[2], s = t.full ? Math.ceil(a.h) : n[3], o = ne(t.maxWidth) || ne(t.maxHeight), u = this.getPixelRatio(), l = 1;
|
|
18180
18166
|
if (t.scale !== void 0)
|
|
18181
18167
|
i *= t.scale, s *= t.scale, l = t.scale;
|
|
@@ -18238,10 +18224,10 @@ function Qc(t, e, r) {
|
|
|
18238
18224
|
return a();
|
|
18239
18225
|
}
|
|
18240
18226
|
}
|
|
18241
|
-
|
|
18227
|
+
Xa.png = function(t) {
|
|
18242
18228
|
return Qc(t, this.bufferCanvasImage(t), "image/png");
|
|
18243
18229
|
};
|
|
18244
|
-
|
|
18230
|
+
Xa.jpg = function(t) {
|
|
18245
18231
|
return Qc(t, this.bufferCanvasImage(t), "image/jpeg");
|
|
18246
18232
|
};
|
|
18247
18233
|
var Jc = {};
|
|
@@ -18302,7 +18288,7 @@ function jc(t) {
|
|
|
18302
18288
|
qv() && (u["-ms-touch-action"] = "none", u["touch-action"] = "none");
|
|
18303
18289
|
for (var l = 0; l < Se.CANVAS_LAYERS; l++) {
|
|
18304
18290
|
var f = e.data.canvases[l] = a.createElement("canvas"), c = Se.CANVAS_TYPES[l];
|
|
18305
|
-
e.data.contexts[l] = f.getContext(c), e.data.contexts[l] ||
|
|
18291
|
+
e.data.contexts[l] = f.getContext(c), e.data.contexts[l] || Ye("Could not create canvas of type " + c), Object.keys(u).forEach(function(J) {
|
|
18306
18292
|
f.style[J] = u[J];
|
|
18307
18293
|
}), f.style.position = "absolute", f.setAttribute("data-id", "layer" + l), f.style.zIndex = String(Se.CANVAS_LAYERS - l), e.data.canvasContainer.appendChild(f), e.data.canvasNeedsRedraw[l] = !1;
|
|
18308
18294
|
}
|
|
@@ -18396,7 +18382,7 @@ function jc(t) {
|
|
|
18396
18382
|
}
|
|
18397
18383
|
}
|
|
18398
18384
|
return q;
|
|
18399
|
-
},
|
|
18385
|
+
}, Y = e.data.eleTxrCache = new xa(e, {
|
|
18400
18386
|
getKey: g,
|
|
18401
18387
|
doesEleInvalidateKey: p,
|
|
18402
18388
|
drawElement: E,
|
|
@@ -18405,14 +18391,14 @@ function jc(t) {
|
|
|
18405
18391
|
getRotationOffset: B,
|
|
18406
18392
|
allowEdgeTxrCaching: !1,
|
|
18407
18393
|
allowParentTxrCaching: !1
|
|
18408
|
-
}),
|
|
18394
|
+
}), $ = e.data.lblTxrCache = new xa(e, {
|
|
18409
18395
|
getKey: y,
|
|
18410
18396
|
drawElement: T,
|
|
18411
18397
|
getBoundingBox: C,
|
|
18412
18398
|
getRotationPoint: N,
|
|
18413
18399
|
getRotationOffset: G,
|
|
18414
18400
|
isVisible: L
|
|
18415
|
-
}),
|
|
18401
|
+
}), H = e.data.slbTxrCache = new xa(e, {
|
|
18416
18402
|
getKey: b,
|
|
18417
18403
|
drawElement: S,
|
|
18418
18404
|
getBoundingBox: D,
|
|
@@ -18428,7 +18414,7 @@ function jc(t) {
|
|
|
18428
18414
|
isVisible: L
|
|
18429
18415
|
}), ee = e.data.lyrTxrCache = new zc(e);
|
|
18430
18416
|
e.onUpdateEleCalcs(function(z, V) {
|
|
18431
|
-
|
|
18417
|
+
Y.invalidateElements(V), $.invalidateElements(V), H.invalidateElements(V), W.invalidateElements(V), ee.invalidateElements(V);
|
|
18432
18418
|
for (var q = 0; q < V.length; q++) {
|
|
18433
18419
|
var Z = V[q]._private;
|
|
18434
18420
|
Z.oldBackgroundTimestamp = Z.backgroundTimestamp;
|
|
@@ -18438,7 +18424,7 @@ function jc(t) {
|
|
|
18438
18424
|
for (var V = 0; V < z.length; V++)
|
|
18439
18425
|
ee.enqueueElementRefinement(z[V].ele);
|
|
18440
18426
|
};
|
|
18441
|
-
|
|
18427
|
+
Y.onDequeue(ae), $.onDequeue(ae), H.onDequeue(ae), W.onDequeue(ae), t.webgl && e.initWebgl(t, {
|
|
18442
18428
|
getStyleKey: g,
|
|
18443
18429
|
getLabelKey: y,
|
|
18444
18430
|
getSourceLabelKey: b,
|
|
@@ -18503,7 +18489,7 @@ Se.makeOffscreenCanvas = function(t, e) {
|
|
|
18503
18489
|
}
|
|
18504
18490
|
return r;
|
|
18505
18491
|
};
|
|
18506
|
-
[Vc,
|
|
18492
|
+
[Vc, Yt, er, Lo, Fr, wr, xt, Hc, Er, Xa, Jc].forEach(function(t) {
|
|
18507
18493
|
be(Se, t);
|
|
18508
18494
|
});
|
|
18509
18495
|
var Qm = [{
|
|
@@ -18616,11 +18602,11 @@ function rv(t, e, r) {
|
|
|
18616
18602
|
b[S] = g[S];
|
|
18617
18603
|
d.clientFunctions.forEach(function(w) {
|
|
18618
18604
|
b[w] = b[w] || function() {
|
|
18619
|
-
|
|
18605
|
+
Ye("Renderer does not implement `renderer." + w + "()` on its prototype");
|
|
18620
18606
|
};
|
|
18621
18607
|
}), a = y;
|
|
18622
18608
|
} else if (t === "__proto__" || t === "constructor" || t === "prototype")
|
|
18623
|
-
return
|
|
18609
|
+
return Ye(t + " is an illegal type to be registered, possibly lead to prototype pollutions");
|
|
18624
18610
|
return Ef({
|
|
18625
18611
|
map: ev,
|
|
18626
18612
|
keys: [t, e],
|
|
@@ -18655,7 +18641,7 @@ var to = function() {
|
|
|
18655
18641
|
return e0.apply(null, arguments);
|
|
18656
18642
|
if (arguments.length === 5)
|
|
18657
18643
|
return jm.apply(null, arguments);
|
|
18658
|
-
|
|
18644
|
+
Ye("Invalid extension access syntax");
|
|
18659
18645
|
};
|
|
18660
18646
|
ka.prototype.extension = to;
|
|
18661
18647
|
Jm.forEach(function(t) {
|
|
@@ -19378,7 +19364,7 @@ function a0() {
|
|
|
19378
19364
|
if (f < v)
|
|
19379
19365
|
return l[0] = g, l[1] = c, l[2] = S, l[3] = h, !1;
|
|
19380
19366
|
} else {
|
|
19381
|
-
var N = o.height / o.width, O = u.height / u.width, k = (h - c) / (v - f), B = void 0, _ = void 0, F = void 0, G = void 0,
|
|
19367
|
+
var N = o.height / o.width, O = u.height / u.width, k = (h - c) / (v - f), B = void 0, _ = void 0, F = void 0, G = void 0, Y = void 0, $ = void 0;
|
|
19382
19368
|
if (-N === k ? f > v ? (l[0] = y, l[1] = b, P = !0) : (l[0] = g, l[1] = p, P = !0) : N === k && (f > v ? (l[0] = d, l[1] = p, P = !0) : (l[0] = m, l[1] = b, P = !0)), -O === k ? v > f ? (l[2] = C, l[3] = D, M = !0) : (l[2] = x, l[3] = w, M = !0) : O === k && (v > f ? (l[2] = S, l[3] = w, M = !0) : (l[2] = A, l[3] = D, M = !0)), P && M)
|
|
19383
19369
|
return !1;
|
|
19384
19370
|
if (f > v ? c > h ? (B = this.getCardinalDirection(N, k, 4), _ = this.getCardinalDirection(O, k, 2)) : (B = this.getCardinalDirection(-N, k, 3), _ = this.getCardinalDirection(-O, k, 1)) : c > h ? (B = this.getCardinalDirection(-N, k, 1), _ = this.getCardinalDirection(-O, k, 3)) : (B = this.getCardinalDirection(N, k, 2), _ = this.getCardinalDirection(O, k, 4)), !P)
|
|
@@ -19399,16 +19385,16 @@ function a0() {
|
|
|
19399
19385
|
if (!M)
|
|
19400
19386
|
switch (_) {
|
|
19401
19387
|
case 1:
|
|
19402
|
-
|
|
19388
|
+
$ = w, Y = v + -R / k, l[2] = Y, l[3] = $;
|
|
19403
19389
|
break;
|
|
19404
19390
|
case 2:
|
|
19405
|
-
|
|
19391
|
+
Y = A, $ = h + L * k, l[2] = Y, l[3] = $;
|
|
19406
19392
|
break;
|
|
19407
19393
|
case 3:
|
|
19408
|
-
|
|
19394
|
+
$ = D, Y = v + R / k, l[2] = Y, l[3] = $;
|
|
19409
19395
|
break;
|
|
19410
19396
|
case 4:
|
|
19411
|
-
|
|
19397
|
+
Y = C, $ = h + -L * k, l[2] = Y, l[3] = $;
|
|
19412
19398
|
break;
|
|
19413
19399
|
}
|
|
19414
19400
|
}
|
|
@@ -20634,13 +20620,13 @@ function i0() {
|
|
|
20634
20620
|
k = k.concat(w.getEdges());
|
|
20635
20621
|
var B = k.length;
|
|
20636
20622
|
x != null && B--;
|
|
20637
|
-
for (var _ = 0, F = k.length, G,
|
|
20638
|
-
var
|
|
20639
|
-
|
|
20640
|
-
var
|
|
20641
|
-
|
|
20623
|
+
for (var _ = 0, F = k.length, G, Y = w.getEdgesBetween(x); Y.length > 1; ) {
|
|
20624
|
+
var $ = Y[0];
|
|
20625
|
+
Y.splice(0, 1);
|
|
20626
|
+
var H = k.indexOf($);
|
|
20627
|
+
H >= 0 && k.splice(H, 1), F--, B--;
|
|
20642
20628
|
}
|
|
20643
|
-
x != null ? G = (k.indexOf(
|
|
20629
|
+
x != null ? G = (k.indexOf(Y[0]) + 1) % F : G = 0;
|
|
20644
20630
|
for (var W = Math.abs(D - C) / B, ee = G; _ != B; ee = ++ee % F) {
|
|
20645
20631
|
var ae = k[ee].getOtherEnd(w);
|
|
20646
20632
|
if (ae != x) {
|
|
@@ -20863,18 +20849,18 @@ function i0() {
|
|
|
20863
20849
|
if (A > 0)
|
|
20864
20850
|
for (var _ = R; _ <= P; _++)
|
|
20865
20851
|
B[3] += this.grid[A - 1][_].length + this.grid[A][_].length - 1;
|
|
20866
|
-
for (var F = y.MAX_VALUE, G,
|
|
20867
|
-
B[
|
|
20852
|
+
for (var F = y.MAX_VALUE, G, Y, $ = 0; $ < B.length; $++)
|
|
20853
|
+
B[$] < F ? (F = B[$], G = 1, Y = $) : B[$] == F && G++;
|
|
20868
20854
|
if (G == 3 && F == 0)
|
|
20869
20855
|
B[0] == 0 && B[1] == 0 && B[2] == 0 ? x = 1 : B[0] == 0 && B[1] == 0 && B[3] == 0 ? x = 0 : B[0] == 0 && B[2] == 0 && B[3] == 0 ? x = 3 : B[1] == 0 && B[2] == 0 && B[3] == 0 && (x = 2);
|
|
20870
20856
|
else if (G == 2 && F == 0) {
|
|
20871
|
-
var
|
|
20872
|
-
B[0] == 0 && B[1] == 0 ?
|
|
20857
|
+
var H = Math.floor(Math.random() * 2);
|
|
20858
|
+
B[0] == 0 && B[1] == 0 ? H == 0 ? x = 0 : x = 1 : B[0] == 0 && B[2] == 0 ? H == 0 ? x = 0 : x = 2 : B[0] == 0 && B[3] == 0 ? H == 0 ? x = 0 : x = 3 : B[1] == 0 && B[2] == 0 ? H == 0 ? x = 1 : x = 2 : B[1] == 0 && B[3] == 0 ? H == 0 ? x = 1 : x = 3 : H == 0 ? x = 2 : x = 3;
|
|
20873
20859
|
} else if (G == 4 && F == 0) {
|
|
20874
|
-
var
|
|
20875
|
-
x = X;
|
|
20876
|
-
} else
|
|
20860
|
+
var H = Math.floor(Math.random() * 4);
|
|
20877
20861
|
x = H;
|
|
20862
|
+
} else
|
|
20863
|
+
x = Y;
|
|
20878
20864
|
x == 0 ? D.setCenter(C.getCenterX(), C.getCenterY() - C.getHeight() / 2 - v.DEFAULT_EDGE_LENGTH - D.getHeight() / 2) : x == 1 ? D.setCenter(C.getCenterX() + C.getWidth() / 2 + v.DEFAULT_EDGE_LENGTH + D.getWidth() / 2, C.getCenterY()) : x == 2 ? D.setCenter(C.getCenterX(), C.getCenterY() + C.getHeight() / 2 + v.DEFAULT_EDGE_LENGTH + D.getHeight() / 2) : D.setCenter(C.getCenterX() - C.getWidth() / 2 - v.DEFAULT_EDGE_LENGTH - D.getWidth() / 2, C.getCenterY());
|
|
20879
20865
|
}, a.exports = T;
|
|
20880
20866
|
}),
|
|
@@ -21051,16 +21037,16 @@ function o0() {
|
|
|
21051
21037
|
return;
|
|
21052
21038
|
}
|
|
21053
21039
|
var G = S.layout.getPositionsData();
|
|
21054
|
-
E.eles.nodes().positions(function(
|
|
21055
|
-
if (typeof
|
|
21056
|
-
for (var
|
|
21040
|
+
E.eles.nodes().positions(function(Y, $) {
|
|
21041
|
+
if (typeof Y == "number" && (Y = $), !Y.isParent()) {
|
|
21042
|
+
for (var H = Y.id(), W = G[H], ee = Y; W == null && (W = G[ee.data("parent")] || G["DummyCompound_" + ee.data("parent")], G[H] = W, ee = ee.parent()[0], ee != null); )
|
|
21057
21043
|
;
|
|
21058
21044
|
return W != null ? {
|
|
21059
21045
|
x: W.x,
|
|
21060
21046
|
y: W.y
|
|
21061
21047
|
} : {
|
|
21062
|
-
x:
|
|
21063
|
-
y:
|
|
21048
|
+
x: Y.position("x"),
|
|
21049
|
+
y: Y.position("y")
|
|
21064
21050
|
};
|
|
21065
21051
|
}
|
|
21066
21052
|
}), k(), m = requestAnimationFrame(O);
|
|
@@ -21190,31 +21176,31 @@ var ro = (function() {
|
|
|
21190
21176
|
D.push(F);
|
|
21191
21177
|
var G = k.options && k.options.ranges;
|
|
21192
21178
|
typeof B.yy.parseError == "function" ? this.parseError = B.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
|
|
21193
|
-
function
|
|
21179
|
+
function Y() {
|
|
21194
21180
|
var re;
|
|
21195
21181
|
return re = x.pop() || k.lex() || N, typeof re != "number" && (re instanceof Array && (x = re, re = x.pop()), re = S.symbols_[re] || re), re;
|
|
21196
21182
|
}
|
|
21197
|
-
for (var
|
|
21198
|
-
if (
|
|
21183
|
+
for (var $, H, W, ee, ae = {}, J, z, V, q; ; ) {
|
|
21184
|
+
if (H = w[w.length - 1], this.defaultActions[H] ? W = this.defaultActions[H] : (($ === null || typeof $ > "u") && ($ = Y()), W = A[H] && A[H][$]), typeof W > "u" || !W.length || !W[0]) {
|
|
21199
21185
|
var Z = "";
|
|
21200
21186
|
q = [];
|
|
21201
|
-
for (J in A[
|
|
21187
|
+
for (J in A[H])
|
|
21202
21188
|
this.terminals_[J] && J > M && q.push("'" + this.terminals_[J] + "'");
|
|
21203
21189
|
k.showPosition ? Z = "Parse error on line " + (R + 1) + `:
|
|
21204
21190
|
` + k.showPosition() + `
|
|
21205
|
-
Expecting ` + q.join(", ") + ", got '" + (this.terminals_[
|
|
21191
|
+
Expecting ` + q.join(", ") + ", got '" + (this.terminals_[$] || $) + "'" : Z = "Parse error on line " + (R + 1) + ": Unexpected " + ($ == N ? "end of input" : "'" + (this.terminals_[$] || $) + "'"), this.parseError(Z, {
|
|
21206
21192
|
text: k.match,
|
|
21207
|
-
token: this.terminals_[
|
|
21193
|
+
token: this.terminals_[$] || $,
|
|
21208
21194
|
line: k.yylineno,
|
|
21209
21195
|
loc: F,
|
|
21210
21196
|
expected: q
|
|
21211
21197
|
});
|
|
21212
21198
|
}
|
|
21213
21199
|
if (W[0] instanceof Array && W.length > 1)
|
|
21214
|
-
throw new Error("Parse Error: multiple actions possible at state: " +
|
|
21200
|
+
throw new Error("Parse Error: multiple actions possible at state: " + H + ", token: " + $);
|
|
21215
21201
|
switch (W[0]) {
|
|
21216
21202
|
case 1:
|
|
21217
|
-
w.push(
|
|
21203
|
+
w.push($), C.push(k.yytext), D.push(k.yylloc), w.push(W[1]), $ = null, P = k.yyleng, L = k.yytext, R = k.yylineno, F = k.yylloc;
|
|
21218
21204
|
break;
|
|
21219
21205
|
case 2:
|
|
21220
21206
|
if (z = this.productions_[W[1]][1], ae.$ = C[C.length - z], ae._$ = {
|
|
@@ -21925,12 +21911,12 @@ const F0 = async (t, e, r, a) => {
|
|
|
21925
21911
|
dominant-baseline: middle;
|
|
21926
21912
|
text-align: center;
|
|
21927
21913
|
}
|
|
21928
|
-
`, V0 = z0,
|
|
21914
|
+
`, V0 = z0, Y0 = {
|
|
21929
21915
|
db: x0,
|
|
21930
21916
|
renderer: _0,
|
|
21931
21917
|
parser: f0,
|
|
21932
21918
|
styles: V0
|
|
21933
21919
|
};
|
|
21934
21920
|
export {
|
|
21935
|
-
|
|
21921
|
+
Y0 as diagram
|
|
21936
21922
|
};
|