vue-data-ui 3.23.1 → 3.23.2
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/{PackageVersion-D6d8SCp9.js → PackageVersion-DXU7nRr9.js} +1 -1
- package/dist/components/vue-ui-3d-bar.js +1 -1
- package/dist/components/vue-ui-accordion.js +1 -1
- package/dist/components/vue-ui-age-pyramid.js +1 -1
- package/dist/components/vue-ui-annotator.js +1 -1
- package/dist/components/vue-ui-bullet.js +1 -1
- package/dist/components/vue-ui-bump.js +1 -1
- package/dist/components/vue-ui-candlestick.js +1 -1
- package/dist/components/vue-ui-carousel-table.js +1 -1
- package/dist/components/vue-ui-chestnut.js +1 -1
- package/dist/components/vue-ui-chord.js +1 -1
- package/dist/components/vue-ui-circle-pack.js +1 -1
- package/dist/components/vue-ui-cursor.js +1 -1
- package/dist/components/vue-ui-dag.js +1 -1
- package/dist/components/vue-ui-dashboard.js +1 -1
- package/dist/components/vue-ui-digits.js +1 -1
- package/dist/components/vue-ui-donut-evolution.js +1 -1
- package/dist/components/vue-ui-donut.js +1 -1
- package/dist/components/vue-ui-dumbbell.js +1 -1
- package/dist/components/vue-ui-flow.js +1 -1
- package/dist/components/vue-ui-funnel.js +1 -1
- package/dist/components/vue-ui-galaxy.js +1 -1
- package/dist/components/vue-ui-gauge.js +1 -1
- package/dist/components/vue-ui-geo.js +1 -1
- package/dist/components/vue-ui-gizmo.js +1 -1
- package/dist/components/vue-ui-heatmap.js +1 -1
- package/dist/components/vue-ui-hill.js +1 -1
- package/dist/components/vue-ui-history-plot.js +1 -1
- package/dist/components/vue-ui-horizontal-bar.js +1 -1
- package/dist/components/vue-ui-kpi.js +1 -1
- package/dist/components/vue-ui-mini-loader.js +1 -1
- package/dist/components/vue-ui-molecule.js +1 -1
- package/dist/components/vue-ui-mood-radar.js +1 -1
- package/dist/components/vue-ui-nested-donuts.js +1 -1
- package/dist/components/vue-ui-onion.js +1 -1
- package/dist/components/vue-ui-parallel-coordinate-plot.js +1 -1
- package/dist/components/vue-ui-quadrant.js +1 -1
- package/dist/components/vue-ui-quick-chart.js +1 -1
- package/dist/components/vue-ui-radar.js +1 -1
- package/dist/components/vue-ui-rating.js +1 -1
- package/dist/components/vue-ui-relation-circle.js +1 -1
- package/dist/components/vue-ui-ridgeline.js +1 -1
- package/dist/components/vue-ui-rings.js +1 -1
- package/dist/components/vue-ui-scatter.js +1 -1
- package/dist/components/vue-ui-skeleton.js +1 -1
- package/dist/components/vue-ui-smiley.js +1 -1
- package/dist/components/vue-ui-spark-trend.js +1 -1
- package/dist/components/vue-ui-sparkbar.js +1 -1
- package/dist/components/vue-ui-sparkgauge.js +1 -1
- package/dist/components/vue-ui-sparkhistogram.js +1 -1
- package/dist/components/vue-ui-sparkline.js +1 -1
- package/dist/components/vue-ui-sparkstackbar.js +1 -1
- package/dist/components/vue-ui-stackbar.js +1 -1
- package/dist/components/vue-ui-stackline.js +1 -1
- package/dist/components/vue-ui-strip-plot.js +1 -1
- package/dist/components/vue-ui-table-heatmap.js +1 -1
- package/dist/components/vue-ui-table-sparkline.js +1 -1
- package/dist/components/vue-ui-table.js +1 -1
- package/dist/components/vue-ui-thermometer.js +1 -1
- package/dist/components/vue-ui-timer.js +1 -1
- package/dist/components/vue-ui-tiremarks.js +1 -1
- package/dist/components/vue-ui-treemap.js +1 -1
- package/dist/components/vue-ui-vertical-bar.js +1 -1
- package/dist/components/vue-ui-waffle.js +1 -1
- package/dist/components/vue-ui-wheel.js +1 -1
- package/dist/components/vue-ui-word-cloud.js +1 -1
- package/dist/components/vue-ui-world.js +1 -1
- package/dist/components/vue-ui-xy-canvas.js +1 -1
- package/dist/components/vue-ui-xy.js +1 -1
- package/dist/{package-KvlL5CqE.js → package-bsfpO6y3.js} +1 -1
- package/dist/{render-common-oDYGTc5P.js → render-common-C0PEe9so.js} +1 -1
- package/dist/ssr/vue-ui-donut.js +1 -1
- package/dist/ssr/vue-ui-xy.js +1 -1
- package/dist/ssr.js +2 -2
- package/dist/style.css +1 -1
- package/dist/types/vue-data-ui.d.ts +6 -0
- package/dist/{useSvgExport-DH-FfcqQ.js → useChartExport-DNiwdPmb.js} +47 -1
- package/dist/{useConfig-D3scuR88.js → useConfig-DlNpz6P8.js} +6 -0
- package/dist/{useObjectBindings-Brg8mm5J.js → useObjectBindings-BeWS5v0i.js} +1 -1
- package/dist/utils.js +1 -1
- package/dist/{vue-data-ui-DGWDPCwC.js → vue-data-ui-BNxtW8pK.js} +68 -68
- package/dist/vue-data-ui.js +69 -69
- package/dist/{vue-ui-3d-bar-C_Su9fve.js → vue-ui-3d-bar-BYumVxZG.js} +164 -182
- package/dist/{vue-ui-accordion-BxGriZik.js → vue-ui-accordion-DegI2lzR.js} +1 -1
- package/dist/vue-ui-age-pyramid-tJx_hCsS.js +1241 -0
- package/dist/{vue-ui-annotator-CCtnM8Rv.js → vue-ui-annotator-DfG79D4r.js} +2 -2
- package/dist/vue-ui-bullet-DrWG4jRy.js +700 -0
- package/dist/{vue-ui-bump-CcdzJZ9n.js → vue-ui-bump-mKysp0KO.js} +213 -263
- package/dist/vue-ui-candlestick-PgKcBZdy.js +1837 -0
- package/dist/vue-ui-carousel-table-DRvycNBl.js +467 -0
- package/dist/vue-ui-chestnut-Dpklo-VE.js +2014 -0
- package/dist/vue-ui-chord-7PPVH_iG.js +1345 -0
- package/dist/vue-ui-circle-pack-DW4Os6_8.js +1636 -0
- package/dist/{vue-ui-cursor-BqHr0n1Z.js → vue-ui-cursor-DIt7vOwc.js} +2 -2
- package/dist/{vue-ui-dag-jMLVoQkb.js → vue-ui-dag-Cl0WdSLb.js} +492 -515
- package/dist/{vue-ui-dashboard-DVAUFETR.js → vue-ui-dashboard-BwxRLR4E.js} +65 -65
- package/dist/{vue-ui-digits-Dy4gG6qm.js → vue-ui-digits-Bp1OH_t1.js} +2 -2
- package/dist/{vue-ui-donut-C0cWRLbU.js → vue-ui-donut-BZUT7QYt.js} +333 -359
- package/dist/vue-ui-donut-evolution-CQy3ZKXk.js +1549 -0
- package/dist/{vue-ui-donut-CYpxGBhl.js → vue-ui-donut-y6tOAVyY.js} +2 -2
- package/dist/{vue-ui-dumbbell-DxVbRjKR.js → vue-ui-dumbbell-BtKZcAOV.js} +378 -428
- package/dist/{vue-ui-flow-DWaZF4FS.js → vue-ui-flow-BF_cndsv.js} +182 -207
- package/dist/vue-ui-funnel-z3AeiDu6.js +750 -0
- package/dist/{vue-ui-galaxy-CWBP9oH9.js → vue-ui-galaxy-ClWaSOmM.js} +308 -334
- package/dist/vue-ui-gauge-CJstpakj.js +932 -0
- package/dist/{vue-ui-geo-ZA7CBy8f.js → vue-ui-geo-B1tOD3HC.js} +362 -413
- package/dist/{vue-ui-gizmo-SQCou0bQ.js → vue-ui-gizmo-foatosAv.js} +2 -2
- package/dist/{vue-ui-heatmap-CHd9gs_p.js → vue-ui-heatmap-By33A9dZ.js} +292 -315
- package/dist/vue-ui-hill-ewqkK9s5.js +1745 -0
- package/dist/{vue-ui-history-plot-BwnlC1mx.js → vue-ui-history-plot-FEIwXlsz.js} +258 -283
- package/dist/{vue-ui-horizontal-bar-BUar2HUH.js → vue-ui-horizontal-bar-D51sAeVu.js} +273 -298
- package/dist/{vue-ui-kpi-BF_9WWoo.js → vue-ui-kpi-y3EkgqJQ.js} +2 -2
- package/dist/{vue-ui-mini-loader-CvfukjXi.js → vue-ui-mini-loader-CtTewZJG.js} +1 -1
- package/dist/vue-ui-molecule-paWHp18h.js +935 -0
- package/dist/{vue-ui-mood-radar-_zpbmvJs.js → vue-ui-mood-radar-wBRTZI5k.js} +337 -386
- package/dist/vue-ui-nested-donuts-CB-HOLo2.js +1503 -0
- package/dist/{vue-ui-onion-CB5RYIy5.js → vue-ui-onion-B2Q2n55x.js} +257 -282
- package/dist/{vue-ui-parallel-coordinate-plot-BUwt-apg.js → vue-ui-parallel-coordinate-plot-GpkXiIZA.js} +190 -215
- package/dist/{vue-ui-quadrant-CoROD3er.js → vue-ui-quadrant-DOPuejDE.js} +213 -243
- package/dist/{vue-ui-quick-chart-BcH7eY4-.js → vue-ui-quick-chart-CgHX9njq.js} +52 -61
- package/dist/{vue-ui-radar-DGbaXGme.js → vue-ui-radar-BLvG-_zE.js} +343 -370
- package/dist/{vue-ui-rating-Bo3zD3yW.js → vue-ui-rating-BDVSVFA0.js} +8 -9
- package/dist/vue-ui-relation-circle-plOXwxJ5.js +903 -0
- package/dist/{vue-ui-ridgeline-BCaGcyfk.js → vue-ui-ridgeline-BbrnXvBo.js} +267 -317
- package/dist/{vue-ui-rings-BJUBn8_b.js → vue-ui-rings-B3cKfMWy.js} +407 -432
- package/dist/vue-ui-scatter-BY7waF2T.js +2403 -0
- package/dist/{vue-ui-skeleton-EeJcGbCo.js → vue-ui-skeleton-DwKxd7fk.js} +2 -2
- package/dist/{vue-ui-smiley-D0gibt5c.js → vue-ui-smiley-5iHJeTPc.js} +62 -63
- package/dist/{vue-ui-spark-trend-BRoQ7JpQ.js → vue-ui-spark-trend-MpvrV5Wd.js} +2 -2
- package/dist/{vue-ui-sparkbar-DFp2k7-7.js → vue-ui-sparkbar-s-2rBmEz.js} +97 -100
- package/dist/{vue-ui-sparkgauge-D0Bq85Hs.js → vue-ui-sparkgauge-B-BYVv4p.js} +2 -2
- package/dist/{vue-ui-sparkhistogram-BPln7v63.js → vue-ui-sparkhistogram-D7D4NHdi.js} +7 -8
- package/dist/{vue-ui-sparkline-C6Q45Dqp.js → vue-ui-sparkline-RbeYtLWp.js} +6 -7
- package/dist/{vue-ui-sparkstackbar-CjK4bcQg.js → vue-ui-sparkstackbar-ohN7mtbg.js} +191 -195
- package/dist/{vue-ui-stackbar-Ca8EPf3e.js → vue-ui-stackbar-D2bpvQYt.js} +524 -549
- package/dist/{vue-ui-stackline-Pz5WWlWT.js → vue-ui-stackline-Bo1oE8yq.js} +570 -595
- package/dist/vue-ui-strip-plot-CZ-C4a5x.js +1734 -0
- package/dist/{vue-ui-table-Bjg-ujJu.js → vue-ui-table-3PPiJPV6.js} +3 -3
- package/dist/{vue-ui-table-heatmap-ljeYW8Wc.js → vue-ui-table-heatmap-D1bbPXKG.js} +48 -49
- package/dist/{vue-ui-table-sparkline-iRFmtK5S.js → vue-ui-table-sparkline-l1cUX3ny.js} +7 -9
- package/dist/{vue-ui-thermometer-D8uiOaeA.js → vue-ui-thermometer-DltAELO7.js} +240 -261
- package/dist/{vue-ui-timer-CYw983oL.js → vue-ui-timer-DWNdx47q.js} +2 -2
- package/dist/vue-ui-tiremarks-GYhji_fa.js +538 -0
- package/dist/{vue-ui-treemap-h4VbnqPA.js → vue-ui-treemap-DjNlnOG5.js} +498 -524
- package/dist/vue-ui-waffle-BAA9EX6O.js +1386 -0
- package/dist/{vue-ui-wheel-tLvJadk5.js → vue-ui-wheel-DrefGLos.js} +188 -209
- package/dist/{vue-ui-word-cloud-BjpGSsod.js → vue-ui-word-cloud-CQZ8AyOi.js} +375 -398
- package/dist/{vue-ui-world-B4fCS3jN.js → vue-ui-world-Y7a3VEjq.js} +428 -453
- package/dist/{vue-ui-xy-7ZT9IRD8.js → vue-ui-xy-CJcdttNL.js} +857 -883
- package/dist/{vue-ui-xy-gyNS0yH0.js → vue-ui-xy-DPxtkYGc.js} +2 -2
- package/dist/{vue-ui-xy-canvas-BnLEwBpi.js → vue-ui-xy-canvas-1rbwMA1m.js} +13 -12
- package/package.json +1 -1
- package/dist/Slicer-CIk57nL4.js +0 -1163
- package/dist/vue-ui-age-pyramid-D4k1MkAL.js +0 -1264
- package/dist/vue-ui-bullet-DLZr2Uk8.js +0 -724
- package/dist/vue-ui-candlestick-EEEt7ORC.js +0 -1866
- package/dist/vue-ui-carousel-table-BicIpNAD.js +0 -463
- package/dist/vue-ui-chestnut-BI7mC5dd.js +0 -2068
- package/dist/vue-ui-chord-DXaq8ZMu.js +0 -1396
- package/dist/vue-ui-circle-pack-XHJBMG51.js +0 -1659
- package/dist/vue-ui-donut-evolution-DwR47A2r.js +0 -1603
- package/dist/vue-ui-funnel-Bmpx5GHR.js +0 -797
- package/dist/vue-ui-gauge-ByE_txav.js +0 -953
- package/dist/vue-ui-hill-BT183G-_.js +0 -1768
- package/dist/vue-ui-molecule-Bi2CKHer.js +0 -958
- package/dist/vue-ui-nested-donuts-qHZAJ70u.js +0 -1528
- package/dist/vue-ui-relation-circle-DaU1eTsG.js +0 -925
- package/dist/vue-ui-scatter-Pcft1bUt.js +0 -2428
- package/dist/vue-ui-strip-plot-Dw4MGDSO.js +0 -1757
- package/dist/vue-ui-tiremarks-CekiW2Ru.js +0 -559
- package/dist/vue-ui-waffle-cu0w_s6L.js +0 -1412
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { t as e } from "./rolldown-runtime-Dy4uBu1J.js";
|
|
2
2
|
import { Jt as t, K as n, S as r, gt as i, jt as a, q as o, t as s, tt as c } from "./lib-Bttd6u5E.js";
|
|
3
3
|
import { n as l, t as u } from "./useHints-Dq_w2E8B.js";
|
|
4
|
-
import { t as d } from "./useConfig-
|
|
4
|
+
import { t as d } from "./useConfig-DlNpz6P8.js";
|
|
5
5
|
import { t as f } from "./usePrinter-DN5bYhTG.js";
|
|
6
6
|
import { n as p, t as m } from "./BaseScanner-DZvpgOjM.js";
|
|
7
|
-
import { t as h } from "./
|
|
8
|
-
import { t as g } from "./
|
|
9
|
-
import { t as ee } from "./
|
|
7
|
+
import { t as h } from "./useNestedProp-vPNvh7rV.js";
|
|
8
|
+
import { t as g } from "./useThemeCheck-C43Tcqmk.js";
|
|
9
|
+
import { t as ee } from "./useChartExport-DNiwdPmb.js";
|
|
10
10
|
import { t as te } from "./img-Bnokohej.js";
|
|
11
11
|
import { n as ne } from "./Title-BE3qg9xl.js";
|
|
12
12
|
import { t as re } from "./_plugin-vue_export-helper-B3ysoDQm.js";
|
|
@@ -282,7 +282,7 @@ function Le(e, t) {
|
|
|
282
282
|
var Re = () => 1;
|
|
283
283
|
function ze(e, t) {
|
|
284
284
|
if (e.nodeCount() <= 1) return [];
|
|
285
|
-
let n =
|
|
285
|
+
let n = P(e, t || Re);
|
|
286
286
|
return Be(n.graph, n.buckets, n.zeroIndex).flatMap((t) => e.outEdges(t.v, t.w));
|
|
287
287
|
}
|
|
288
288
|
function Be(e, t, n) {
|
|
@@ -306,13 +306,13 @@ function Ve(e, t, n, r, i) {
|
|
|
306
306
|
i && a.push({
|
|
307
307
|
v: r.v,
|
|
308
308
|
w: r.w
|
|
309
|
-
}), s.out -= o,
|
|
309
|
+
}), s.out -= o, F(t, n, s);
|
|
310
310
|
}), e.outEdges(r.v).forEach((r) => {
|
|
311
311
|
let i = e.edge(r), a = e.node(r.w);
|
|
312
|
-
a.in -= i,
|
|
312
|
+
a.in -= i, F(t, n, a);
|
|
313
313
|
}), e.removeNode(r.v), a;
|
|
314
314
|
}
|
|
315
|
-
function
|
|
315
|
+
function P(e, t) {
|
|
316
316
|
let n = new k(), r = 0, i = 0;
|
|
317
317
|
e.nodes().forEach((e) => {
|
|
318
318
|
n.setNode(e, {
|
|
@@ -324,31 +324,31 @@ function He(e, t) {
|
|
|
324
324
|
let a = n.edge(e.v, e.w) || 0, o = t(e), s = a + o;
|
|
325
325
|
n.setEdge(e.v, e.w, s), i = Math.max(i, n.node(e.v).out += o), r = Math.max(r, n.node(e.w).in += o);
|
|
326
326
|
});
|
|
327
|
-
let a =
|
|
327
|
+
let a = I(i + r + 3).map(() => new Fe()), o = r + 1;
|
|
328
328
|
return n.nodes().forEach((e) => {
|
|
329
|
-
|
|
329
|
+
F(a, o, n.node(e));
|
|
330
330
|
}), {
|
|
331
331
|
graph: n,
|
|
332
332
|
buckets: a,
|
|
333
333
|
zeroIndex: o
|
|
334
334
|
};
|
|
335
335
|
}
|
|
336
|
-
function
|
|
336
|
+
function F(e, t, n) {
|
|
337
337
|
n.out ? n.in ? e[n.out - n.in + t].enqueue(n) : e[e.length - 1].enqueue(n) : e[0].enqueue(n);
|
|
338
338
|
}
|
|
339
|
-
function
|
|
339
|
+
function I(e) {
|
|
340
340
|
let t = [];
|
|
341
341
|
for (let n = 0; n < e; n++) t.push(n);
|
|
342
342
|
return t;
|
|
343
343
|
}
|
|
344
344
|
//#endregion
|
|
345
345
|
//#region src/DAG/util.js
|
|
346
|
-
function
|
|
346
|
+
function L(e, t, n, r) {
|
|
347
347
|
let i = r;
|
|
348
|
-
for (; e.hasNode(i);) i =
|
|
348
|
+
for (; e.hasNode(i);) i = tt(r);
|
|
349
349
|
return n.dummy = t, e.setNode(i, n), i;
|
|
350
350
|
}
|
|
351
|
-
function
|
|
351
|
+
function He(e) {
|
|
352
352
|
let t = new k().setGraph(e.graph());
|
|
353
353
|
return e.nodes().forEach((n) => {
|
|
354
354
|
t.setNode(n, e.node(n));
|
|
@@ -363,7 +363,7 @@ function I(e) {
|
|
|
363
363
|
});
|
|
364
364
|
}), t;
|
|
365
365
|
}
|
|
366
|
-
function
|
|
366
|
+
function Ue(e) {
|
|
367
367
|
let t = new k({ multigraph: e.isMultigraph() }).setGraph(e.graph());
|
|
368
368
|
return e.nodes().forEach((n) => {
|
|
369
369
|
e.children(n).length || t.setNode(n, e.node(n));
|
|
@@ -380,7 +380,7 @@ function We(e) {
|
|
|
380
380
|
});
|
|
381
381
|
return W(e.nodes(), t);
|
|
382
382
|
}
|
|
383
|
-
function
|
|
383
|
+
function R(e) {
|
|
384
384
|
let t = e.nodes().map((t) => {
|
|
385
385
|
let n = {};
|
|
386
386
|
return e.inEdges(t).forEach((t) => {
|
|
@@ -389,7 +389,7 @@ function Ge(e) {
|
|
|
389
389
|
});
|
|
390
390
|
return W(e.nodes(), t);
|
|
391
391
|
}
|
|
392
|
-
function
|
|
392
|
+
function Ge(e, t) {
|
|
393
393
|
let n = e.x, r = e.y, i = t.x - n, a = t.y - r, o = e.width / 2, s = e.height / 2;
|
|
394
394
|
if (!i && !a) throw Error("Not possible to find intersection inside of the rectangle");
|
|
395
395
|
let c, l;
|
|
@@ -398,8 +398,8 @@ function Ke(e, t) {
|
|
|
398
398
|
y: r + l
|
|
399
399
|
};
|
|
400
400
|
}
|
|
401
|
-
function
|
|
402
|
-
let t =
|
|
401
|
+
function Ke(e) {
|
|
402
|
+
let t = nt(V(e) + 1).map(() => []);
|
|
403
403
|
return e.nodes().forEach((n) => {
|
|
404
404
|
let r = e.node(n), i = r.rank;
|
|
405
405
|
i !== void 0 && (t[i][r.order] = n);
|
|
@@ -428,15 +428,15 @@ function Je(e) {
|
|
|
428
428
|
});
|
|
429
429
|
});
|
|
430
430
|
}
|
|
431
|
-
function
|
|
431
|
+
function z(e, t, n, r) {
|
|
432
432
|
let i = {
|
|
433
433
|
width: 0,
|
|
434
434
|
height: 0
|
|
435
435
|
};
|
|
436
|
-
return arguments.length >= 4 && (i.rank = n, i.order = r),
|
|
436
|
+
return arguments.length >= 4 && (i.rank = n, i.order = r), L(e, "border", i, t);
|
|
437
437
|
}
|
|
438
|
-
var
|
|
439
|
-
function
|
|
438
|
+
var Ye = 65535;
|
|
439
|
+
function Xe(e, t = Ye) {
|
|
440
440
|
let n = [];
|
|
441
441
|
for (let r = 0; r < e.length; r += t) {
|
|
442
442
|
let i = e.slice(r, r + t);
|
|
@@ -445,20 +445,20 @@ function z(e, t = Xe) {
|
|
|
445
445
|
return n;
|
|
446
446
|
}
|
|
447
447
|
function B(e, t) {
|
|
448
|
-
if (t.length >
|
|
449
|
-
let n =
|
|
448
|
+
if (t.length > Ye) {
|
|
449
|
+
let n = Xe(t);
|
|
450
450
|
return e.apply(null, n.map((t) => e.apply(null, t)));
|
|
451
451
|
}
|
|
452
452
|
return e.apply(null, t);
|
|
453
453
|
}
|
|
454
|
-
function
|
|
454
|
+
function V(e) {
|
|
455
455
|
let t = e.nodes().map((t) => {
|
|
456
456
|
let n = e.node(t).rank;
|
|
457
457
|
return n === void 0 ? Number.MIN_VALUE : n;
|
|
458
458
|
});
|
|
459
459
|
return B(Math.max, t);
|
|
460
460
|
}
|
|
461
|
-
function
|
|
461
|
+
function Ze(e, t) {
|
|
462
462
|
let n = {
|
|
463
463
|
lhs: [],
|
|
464
464
|
rhs: []
|
|
@@ -467,7 +467,7 @@ function Qe(e, t) {
|
|
|
467
467
|
t(e) ? n.lhs.push(e) : n.rhs.push(e);
|
|
468
468
|
}), n;
|
|
469
469
|
}
|
|
470
|
-
function
|
|
470
|
+
function Qe(e, t) {
|
|
471
471
|
let n = Date.now();
|
|
472
472
|
try {
|
|
473
473
|
return t();
|
|
@@ -479,11 +479,11 @@ function $e(e, t) {
|
|
|
479
479
|
return t();
|
|
480
480
|
}
|
|
481
481
|
var et = 0;
|
|
482
|
-
function
|
|
482
|
+
function tt(e) {
|
|
483
483
|
let t = ++et;
|
|
484
484
|
return e + String(t);
|
|
485
485
|
}
|
|
486
|
-
function
|
|
486
|
+
function nt(e, t, n = 1) {
|
|
487
487
|
t ?? (t = e, e = 0);
|
|
488
488
|
let r = (e) => e < t;
|
|
489
489
|
n < 0 && (r = (e) => t < e);
|
|
@@ -491,12 +491,12 @@ function U(e, t, n = 1) {
|
|
|
491
491
|
for (let t = e; r(t); t += n) i.push(t);
|
|
492
492
|
return i;
|
|
493
493
|
}
|
|
494
|
-
function
|
|
494
|
+
function H(e, t) {
|
|
495
495
|
let n = {};
|
|
496
496
|
for (let r of t) e[r] !== void 0 && (n[r] = e[r]);
|
|
497
497
|
return n;
|
|
498
498
|
}
|
|
499
|
-
function
|
|
499
|
+
function U(e, t) {
|
|
500
500
|
let n = t;
|
|
501
501
|
if (typeof t == "string") {
|
|
502
502
|
let e = t;
|
|
@@ -507,40 +507,40 @@ function nt(e, t) {
|
|
|
507
507
|
function W(e, t) {
|
|
508
508
|
return e.reduce((e, n, r) => (e[n] = t[r], e), {});
|
|
509
509
|
}
|
|
510
|
-
var
|
|
511
|
-
addBorderNode:
|
|
512
|
-
addDummyNode:
|
|
510
|
+
var rt = {
|
|
511
|
+
addBorderNode: z,
|
|
512
|
+
addDummyNode: L,
|
|
513
513
|
applyWithChunking: B,
|
|
514
|
-
asNonCompoundGraph:
|
|
515
|
-
buildLayerMatrix:
|
|
516
|
-
intersectRect:
|
|
517
|
-
mapValues:
|
|
518
|
-
maxRank:
|
|
514
|
+
asNonCompoundGraph: Ue,
|
|
515
|
+
buildLayerMatrix: Ke,
|
|
516
|
+
intersectRect: Ge,
|
|
517
|
+
mapValues: U,
|
|
518
|
+
maxRank: V,
|
|
519
519
|
normalizeRanks: qe,
|
|
520
520
|
notime: $e,
|
|
521
|
-
partition:
|
|
522
|
-
pick:
|
|
523
|
-
predecessorWeights:
|
|
524
|
-
range:
|
|
521
|
+
partition: Ze,
|
|
522
|
+
pick: H,
|
|
523
|
+
predecessorWeights: R,
|
|
524
|
+
range: nt,
|
|
525
525
|
removeEmptyRanks: Je,
|
|
526
|
-
simplify:
|
|
526
|
+
simplify: He,
|
|
527
527
|
successorWeights: We,
|
|
528
|
-
time:
|
|
529
|
-
uniqueId:
|
|
528
|
+
time: Qe,
|
|
529
|
+
uniqueId: tt,
|
|
530
530
|
zipObject: W
|
|
531
531
|
};
|
|
532
532
|
//#endregion
|
|
533
533
|
//#region src/DAG/acyclic.js
|
|
534
|
-
function
|
|
535
|
-
(e.graph().acyclicer === "greedy" ? ze(e, t(e)) :
|
|
534
|
+
function it(e) {
|
|
535
|
+
(e.graph().acyclicer === "greedy" ? ze(e, t(e)) : G(e)).forEach((t) => {
|
|
536
536
|
let n = e.edge(t);
|
|
537
|
-
e.removeEdge(t), n.forwardName = t.name, n.reversed = !0, e.setEdge(t.w, t.v, n,
|
|
537
|
+
e.removeEdge(t), n.forwardName = t.name, n.reversed = !0, e.setEdge(t.w, t.v, n, tt("rev"));
|
|
538
538
|
});
|
|
539
539
|
function t(e) {
|
|
540
540
|
return (t) => e.edge(t).weight;
|
|
541
541
|
}
|
|
542
542
|
}
|
|
543
|
-
function
|
|
543
|
+
function at(e) {
|
|
544
544
|
e.edges().forEach((t) => {
|
|
545
545
|
let n = e.edge(t);
|
|
546
546
|
if (n.reversed) {
|
|
@@ -550,7 +550,7 @@ function rt(e) {
|
|
|
550
550
|
}
|
|
551
551
|
});
|
|
552
552
|
}
|
|
553
|
-
function
|
|
553
|
+
function G(e) {
|
|
554
554
|
let t = [], n = {}, r = {};
|
|
555
555
|
function i(a) {
|
|
556
556
|
Object.hasOwn(r, a) || (r[a] = !0, n[a] = !0, e.outEdges(a).forEach((e) => {
|
|
@@ -561,10 +561,10 @@ function it(e) {
|
|
|
561
561
|
}
|
|
562
562
|
//#endregion
|
|
563
563
|
//#region src/DAG/normalize.js
|
|
564
|
-
function
|
|
565
|
-
e.graph().dummyChains = [], e.edges().forEach((t) =>
|
|
564
|
+
function ot(e) {
|
|
565
|
+
e.graph().dummyChains = [], e.edges().forEach((t) => st(e, t));
|
|
566
566
|
}
|
|
567
|
-
function
|
|
567
|
+
function st(e, t) {
|
|
568
568
|
let n = t.v, r = e.node(n).rank, i = t.w, a = e.node(i).rank, o = t.name, s = e.edge(t), c = s.labelRank;
|
|
569
569
|
if (a === r + 1) return;
|
|
570
570
|
e.removeEdge(t);
|
|
@@ -575,10 +575,10 @@ function q(e, t) {
|
|
|
575
575
|
edgeLabel: s,
|
|
576
576
|
edgeObj: t,
|
|
577
577
|
rank: r
|
|
578
|
-
}, l =
|
|
578
|
+
}, l = L(e, "edge", u, "_d"), r === c && (u.width = s.width, u.height = s.height, u.dummy = "edge-label", u.labelpos = s.labelpos), e.setEdge(n, l, { weight: s.weight }, o), d === 0 && e.graph().dummyChains.push(l), n = l;
|
|
579
579
|
e.setEdge(n, i, { weight: s.weight }, o);
|
|
580
580
|
}
|
|
581
|
-
function
|
|
581
|
+
function ct(e) {
|
|
582
582
|
e.graph().dummyChains.forEach((t) => {
|
|
583
583
|
let n = e.node(t), r = n.edgeLabel;
|
|
584
584
|
e.setEdge(n.edgeObj, r);
|
|
@@ -591,7 +591,7 @@ function ot(e) {
|
|
|
591
591
|
}
|
|
592
592
|
//#endregion
|
|
593
593
|
//#region src/DAG/rank/util.js
|
|
594
|
-
function
|
|
594
|
+
function lt(e) {
|
|
595
595
|
function t(n) {
|
|
596
596
|
let r = e.node(n);
|
|
597
597
|
if (r && Object.prototype.hasOwnProperty.call(r, "rank")) return r.rank;
|
|
@@ -602,13 +602,13 @@ function st(e) {
|
|
|
602
602
|
}
|
|
603
603
|
(e.sources() || []).forEach(t);
|
|
604
604
|
}
|
|
605
|
-
function
|
|
605
|
+
function ut(e, t) {
|
|
606
606
|
return e.node(t.w).rank - e.node(t.v).rank - e.edge(t).minlen;
|
|
607
607
|
}
|
|
608
608
|
//#endregion
|
|
609
609
|
//#region src/DAG/rank/feasible-tree.js
|
|
610
|
-
function
|
|
611
|
-
|
|
610
|
+
function dt(e) {
|
|
611
|
+
ft(e);
|
|
612
612
|
let t = new k();
|
|
613
613
|
e.nodes().forEach((e) => {
|
|
614
614
|
t.setNode(e, {});
|
|
@@ -617,29 +617,29 @@ function lt(e) {
|
|
|
617
617
|
if (!n.length) return t;
|
|
618
618
|
let r = n[0], i = /* @__PURE__ */ new Set([r]);
|
|
619
619
|
for (; i.size < n.length;) {
|
|
620
|
-
let r =
|
|
620
|
+
let r = pt(e, i);
|
|
621
621
|
if (!r) {
|
|
622
622
|
let e = n.find((e) => !i.has(e));
|
|
623
623
|
i.add(e), t.setNode(e, {});
|
|
624
624
|
continue;
|
|
625
625
|
}
|
|
626
626
|
let { edgeObject: a, delta: o, attachFrom: s, attachTo: c } = r;
|
|
627
|
-
|
|
627
|
+
mt(e, i, s, o), t.setEdge(a.v, a.w, {}), i.add(c);
|
|
628
628
|
}
|
|
629
629
|
return t;
|
|
630
630
|
}
|
|
631
|
-
function
|
|
631
|
+
function ft(e) {
|
|
632
632
|
e.nodes().forEach((t) => {
|
|
633
633
|
let n = e.node(t) || {};
|
|
634
634
|
Object.prototype.hasOwnProperty.call(n, "rank") || (n.rank = 0, e.setNode(t, n));
|
|
635
635
|
});
|
|
636
636
|
}
|
|
637
|
-
function
|
|
637
|
+
function pt(e, t) {
|
|
638
638
|
let n = null;
|
|
639
639
|
return e.edges().forEach((r) => {
|
|
640
640
|
let i = t.has(r.v);
|
|
641
641
|
if (i === t.has(r.w)) return;
|
|
642
|
-
let a =
|
|
642
|
+
let a = ut(e, r), o = Math.abs(a);
|
|
643
643
|
if (!n || o < n.absoluteSlack) {
|
|
644
644
|
let e = i ? r.v : r.w, t = i ? r.w : r.v;
|
|
645
645
|
n = {
|
|
@@ -652,7 +652,7 @@ function dt(e, t) {
|
|
|
652
652
|
}
|
|
653
653
|
}), n;
|
|
654
654
|
}
|
|
655
|
-
function
|
|
655
|
+
function mt(e, t, n, r) {
|
|
656
656
|
r && e.nodes().forEach((n) => {
|
|
657
657
|
if (!t.has(n)) {
|
|
658
658
|
let t = e.node(n);
|
|
@@ -662,58 +662,58 @@ function ft(e, t, n, r) {
|
|
|
662
662
|
}
|
|
663
663
|
//#endregion
|
|
664
664
|
//#region src/DAG/rank/network-simplex.js
|
|
665
|
-
function
|
|
666
|
-
let t =
|
|
667
|
-
return
|
|
665
|
+
function ht(e) {
|
|
666
|
+
let t = He(e);
|
|
667
|
+
return lt(t), t.nodes().forEach((n) => {
|
|
668
668
|
let r = t.node(n), i = e.node(n) || {};
|
|
669
669
|
i.rank = r.rank, e.setNode(n, i);
|
|
670
670
|
}), e;
|
|
671
671
|
}
|
|
672
|
-
function
|
|
673
|
-
function
|
|
674
|
-
function
|
|
672
|
+
function gt(e, t) {}
|
|
673
|
+
function _t(e, t) {}
|
|
674
|
+
function vt(e, t, n) {
|
|
675
675
|
return 0;
|
|
676
676
|
}
|
|
677
|
-
function
|
|
677
|
+
function yt(e) {
|
|
678
678
|
return null;
|
|
679
679
|
}
|
|
680
|
-
function
|
|
680
|
+
function bt(e, t) {
|
|
681
681
|
return null;
|
|
682
682
|
}
|
|
683
|
-
|
|
683
|
+
ht.initLowLimValues = gt, ht.initCutValues = _t, ht.calcCutValue = vt, ht.leaveEdge = yt, ht.enterEdge = bt;
|
|
684
684
|
//#endregion
|
|
685
685
|
//#region src/DAG/rank/index.js
|
|
686
|
-
var
|
|
687
|
-
function
|
|
686
|
+
var xt = lt;
|
|
687
|
+
function St(e) {
|
|
688
688
|
let t = e.graph().ranker;
|
|
689
689
|
if (t instanceof Function) return t(e);
|
|
690
690
|
switch (e.graph().ranker) {
|
|
691
691
|
case "network-simplex":
|
|
692
|
-
|
|
692
|
+
K(e);
|
|
693
693
|
break;
|
|
694
694
|
case "tight-tree":
|
|
695
|
-
|
|
695
|
+
wt(e);
|
|
696
696
|
break;
|
|
697
697
|
case "longest-path":
|
|
698
|
-
|
|
698
|
+
Ct(e);
|
|
699
699
|
break;
|
|
700
700
|
case "none": break;
|
|
701
|
-
default:
|
|
701
|
+
default: K(e);
|
|
702
702
|
}
|
|
703
703
|
}
|
|
704
|
-
var
|
|
705
|
-
function
|
|
706
|
-
|
|
704
|
+
var Ct = xt;
|
|
705
|
+
function wt(e) {
|
|
706
|
+
xt(e), dt(e);
|
|
707
707
|
}
|
|
708
|
-
function
|
|
709
|
-
|
|
708
|
+
function K(e) {
|
|
709
|
+
ht(e);
|
|
710
710
|
}
|
|
711
711
|
//#endregion
|
|
712
712
|
//#region src/DAG/parent-dummy-chains.js
|
|
713
|
-
function
|
|
714
|
-
let t =
|
|
713
|
+
function Tt(e) {
|
|
714
|
+
let t = q(e);
|
|
715
715
|
e.graph().dummyChains.forEach((n) => {
|
|
716
|
-
let r = e.node(n), i = r.edgeObj, a =
|
|
716
|
+
let r = e.node(n), i = r.edgeObj, a = Et(e, t, i.v, i.w), o = a.path, s = a.lca, c = 0, l = o[c], u = !0, d = n;
|
|
717
717
|
for (; d !== i.w;) {
|
|
718
718
|
if (r = e.node(d), u) {
|
|
719
719
|
for (; (l = o[c]) !== s && e.node(l).maxRank < r.rank;) c++;
|
|
@@ -727,7 +727,7 @@ function Y(e) {
|
|
|
727
727
|
}
|
|
728
728
|
});
|
|
729
729
|
}
|
|
730
|
-
function
|
|
730
|
+
function Et(e, t, n, r) {
|
|
731
731
|
let i = [], a = [], o = Math.min(t[n].low, t[r].low), s = Math.max(t[n].lim, t[r].lim), c, l;
|
|
732
732
|
c = n;
|
|
733
733
|
do
|
|
@@ -739,7 +739,7 @@ function Ct(e, t, n, r) {
|
|
|
739
739
|
lca: l
|
|
740
740
|
};
|
|
741
741
|
}
|
|
742
|
-
function
|
|
742
|
+
function q(e) {
|
|
743
743
|
let t = {}, n = 0;
|
|
744
744
|
function r(i) {
|
|
745
745
|
let a = n;
|
|
@@ -752,17 +752,17 @@ function wt(e) {
|
|
|
752
752
|
}
|
|
753
753
|
//#endregion
|
|
754
754
|
//#region src/DAG/nested-graph.js
|
|
755
|
-
function
|
|
756
|
-
let t =
|
|
755
|
+
function Dt(e) {
|
|
756
|
+
let t = rt.addDummyNode(e, "root", {}, "_root"), n = kt(e), r = Object.values(n), i = rt.applyWithChunking(Math.max, r) - 1, a = 2 * i + 1;
|
|
757
757
|
e.graph().nestingRoot = t, e.edges().forEach((t) => {
|
|
758
758
|
e.edge(t).minlen *= a;
|
|
759
759
|
});
|
|
760
|
-
let o =
|
|
760
|
+
let o = At(e) + 1;
|
|
761
761
|
e.children().forEach((r) => {
|
|
762
|
-
|
|
762
|
+
Ot(e, t, a, o, i, n, r);
|
|
763
763
|
}), e.graph().nodeRankFactor = a;
|
|
764
764
|
}
|
|
765
|
-
function
|
|
765
|
+
function Ot(e, t, n, r, i, a, o) {
|
|
766
766
|
let s = e.children(o);
|
|
767
767
|
if (!s.length) {
|
|
768
768
|
o !== t && e.setEdge(t, o, {
|
|
@@ -771,9 +771,9 @@ function Tt(e, t, n, r, i, a, o) {
|
|
|
771
771
|
});
|
|
772
772
|
return;
|
|
773
773
|
}
|
|
774
|
-
let c =
|
|
774
|
+
let c = rt.addBorderNode(e, "_bt"), l = rt.addBorderNode(e, "_bb"), u = e.node(o);
|
|
775
775
|
e.setParent(c, o), u.borderTop = c, e.setParent(l, o), u.borderBottom = l, s.forEach((s) => {
|
|
776
|
-
|
|
776
|
+
Ot(e, t, n, r, i, a, s);
|
|
777
777
|
let u = e.node(s), d = u.borderTop ? u.borderTop : s, f = u.borderBottom ? u.borderBottom : s, p = u.borderTop ? r : 2 * r, m = d === f ? i - a[o] + 1 : 1;
|
|
778
778
|
e.setEdge(c, d, {
|
|
779
779
|
weight: p,
|
|
@@ -789,7 +789,7 @@ function Tt(e, t, n, r, i, a, o) {
|
|
|
789
789
|
minlen: i + a[o]
|
|
790
790
|
});
|
|
791
791
|
}
|
|
792
|
-
function
|
|
792
|
+
function kt(e) {
|
|
793
793
|
let t = {};
|
|
794
794
|
function n(r, i) {
|
|
795
795
|
let a = e.children(r);
|
|
@@ -797,10 +797,10 @@ function Et(e) {
|
|
|
797
797
|
}
|
|
798
798
|
return e.children().forEach((e) => n(e, 1)), t;
|
|
799
799
|
}
|
|
800
|
-
function
|
|
800
|
+
function At(e) {
|
|
801
801
|
return e.edges().reduce((t, n) => t + e.edge(n).weight, 0);
|
|
802
802
|
}
|
|
803
|
-
function
|
|
803
|
+
function jt(e) {
|
|
804
804
|
let t = e.graph();
|
|
805
805
|
e.removeNode(t.nestingRoot), delete t.nestingRoot, e.edges().forEach((t) => {
|
|
806
806
|
e.edge(t).nestingEdge && e.removeEdge(t);
|
|
@@ -808,77 +808,77 @@ function Ot(e) {
|
|
|
808
808
|
}
|
|
809
809
|
//#endregion
|
|
810
810
|
//#region src/DAG/add-border-segments.js
|
|
811
|
-
function
|
|
811
|
+
function Mt(e) {
|
|
812
812
|
function t(n) {
|
|
813
813
|
let r = e.children(n), i = e.node(n);
|
|
814
814
|
if (r.length && r.forEach(t), Object.hasOwn(i, "minRank")) {
|
|
815
815
|
i.borderLeft = [], i.borderRight = [];
|
|
816
|
-
for (let t = i.minRank, r = i.maxRank + 1; t < r; ++t)
|
|
816
|
+
for (let t = i.minRank, r = i.maxRank + 1; t < r; ++t) Nt(e, "borderLeft", "_bl", n, i, t), Nt(e, "borderRight", "_br", n, i, t);
|
|
817
817
|
}
|
|
818
818
|
}
|
|
819
819
|
e.children().forEach(t);
|
|
820
820
|
}
|
|
821
|
-
function
|
|
821
|
+
function Nt(e, t, n, r, i, a) {
|
|
822
822
|
let o = {
|
|
823
823
|
width: 0,
|
|
824
824
|
height: 0,
|
|
825
825
|
rank: a,
|
|
826
826
|
borderType: t
|
|
827
|
-
}, s = i[t][a - 1], c =
|
|
827
|
+
}, s = i[t][a - 1], c = L(e, "border", o, n);
|
|
828
828
|
i[t][a] = c, e.setParent(c, r), s && e.setEdge(s, c, { weight: 1 });
|
|
829
829
|
}
|
|
830
830
|
//#endregion
|
|
831
831
|
//#region src/DAG/coordinate-system.js
|
|
832
|
-
function
|
|
832
|
+
function Pt(e) {
|
|
833
833
|
let t = e.graph().rankdir.toLowerCase();
|
|
834
|
-
(t === "lr" || t === "rl") &&
|
|
834
|
+
(t === "lr" || t === "rl") && It(e);
|
|
835
835
|
}
|
|
836
|
-
function
|
|
836
|
+
function Ft(e) {
|
|
837
837
|
let t = e.graph().rankdir.toLowerCase();
|
|
838
|
-
(t === "bt" || t === "rl") &&
|
|
838
|
+
(t === "bt" || t === "rl") && Lt(e), (t === "lr" || t === "rl") && (zt(e), It(e));
|
|
839
839
|
}
|
|
840
|
-
function
|
|
840
|
+
function It(e) {
|
|
841
841
|
e.nodes().forEach((t) => {
|
|
842
|
-
|
|
842
|
+
J(e.node(t));
|
|
843
843
|
}), e.edges().forEach((t) => {
|
|
844
|
-
|
|
844
|
+
J(e.edge(t));
|
|
845
845
|
});
|
|
846
846
|
}
|
|
847
|
-
function
|
|
847
|
+
function J(e) {
|
|
848
848
|
let t = e.width;
|
|
849
849
|
e.width = e.height, e.height = t;
|
|
850
850
|
}
|
|
851
|
-
function
|
|
851
|
+
function Lt(e) {
|
|
852
852
|
e.nodes().forEach((t) => {
|
|
853
|
-
|
|
853
|
+
Rt(e.node(t));
|
|
854
854
|
}), e.edges().forEach((t) => {
|
|
855
855
|
let n = e.edge(t);
|
|
856
|
-
n.points.forEach(
|
|
856
|
+
n.points.forEach(Rt), Object.hasOwn(n, "y") && Rt(n);
|
|
857
857
|
});
|
|
858
858
|
}
|
|
859
|
-
function
|
|
859
|
+
function Rt(e) {
|
|
860
860
|
e.y = -e.y;
|
|
861
861
|
}
|
|
862
|
-
function
|
|
862
|
+
function zt(e) {
|
|
863
863
|
e.nodes().forEach((t) => {
|
|
864
|
-
|
|
864
|
+
Bt(e.node(t));
|
|
865
865
|
}), e.edges().forEach((t) => {
|
|
866
866
|
let n = e.edge(t);
|
|
867
|
-
n.points.forEach(
|
|
867
|
+
n.points.forEach(Bt), Object.hasOwn(n, "x") && Bt(n);
|
|
868
868
|
});
|
|
869
869
|
}
|
|
870
|
-
function
|
|
870
|
+
function Bt(e) {
|
|
871
871
|
let t = e.x;
|
|
872
872
|
e.x = e.y, e.y = t;
|
|
873
873
|
}
|
|
874
|
-
var
|
|
875
|
-
adjust:
|
|
876
|
-
undo:
|
|
874
|
+
var Vt = {
|
|
875
|
+
adjust: Pt,
|
|
876
|
+
undo: Ft
|
|
877
877
|
};
|
|
878
878
|
//#endregion
|
|
879
879
|
//#region src/DAG/order/init-order.js
|
|
880
|
-
function
|
|
881
|
-
let t = {}, n = e.nodes().filter((t) => e.children(t).length === 0), r = n.map((t) => e.node(t).rank), i =
|
|
880
|
+
function Ht(e) {
|
|
881
|
+
let t = {}, n = e.nodes().filter((t) => e.children(t).length === 0), r = n.map((t) => e.node(t).rank), i = nt(B(Math.max, r) + 1).map(() => []);
|
|
882
882
|
function a(n) {
|
|
883
883
|
if (t[n]) return;
|
|
884
884
|
t[n] = !0;
|
|
@@ -889,12 +889,12 @@ function Bt(e) {
|
|
|
889
889
|
}
|
|
890
890
|
//#endregion
|
|
891
891
|
//#region src/DAG/order/cross-count.js
|
|
892
|
-
function
|
|
892
|
+
function Ut(e, t) {
|
|
893
893
|
let n = 0;
|
|
894
|
-
for (let r = 1; r < t.length; ++r) n +=
|
|
894
|
+
for (let r = 1; r < t.length; ++r) n += Wt(e, t[r - 1], t[r]);
|
|
895
895
|
return n;
|
|
896
896
|
}
|
|
897
|
-
function
|
|
897
|
+
function Wt(e, t, n) {
|
|
898
898
|
let r = W(n, n.map((e, t) => t)), i = t.flatMap((t) => e.outEdges(t).map((t) => ({
|
|
899
899
|
pos: r[t.w],
|
|
900
900
|
weight: e.edge(t).weight
|
|
@@ -913,7 +913,7 @@ function Ht(e, t, n) {
|
|
|
913
913
|
}
|
|
914
914
|
//#endregion
|
|
915
915
|
//#region src/DAG/order/barycenter.js
|
|
916
|
-
function
|
|
916
|
+
function Y(e, t = []) {
|
|
917
917
|
return t.map((t) => {
|
|
918
918
|
let n = e.inEdges(t);
|
|
919
919
|
if (!n.length) return { v: t };
|
|
@@ -936,7 +936,7 @@ function Ut(e, t = []) {
|
|
|
936
936
|
}
|
|
937
937
|
//#endregion
|
|
938
938
|
//#region src/DAG/order/resolve-conflicts.js
|
|
939
|
-
function
|
|
939
|
+
function Gt(e, t) {
|
|
940
940
|
let n = {};
|
|
941
941
|
return e.forEach((e, t) => {
|
|
942
942
|
let r = n[e.v] = {
|
|
@@ -950,13 +950,13 @@ function Z(e, t) {
|
|
|
950
950
|
}), t.edges().forEach((e) => {
|
|
951
951
|
let t = n[e.v], r = n[e.w];
|
|
952
952
|
t !== void 0 && r !== void 0 && (r.indegree++, t.out.push(r));
|
|
953
|
-
}),
|
|
953
|
+
}), X(Object.values(n).filter((e) => !e.indegree));
|
|
954
954
|
}
|
|
955
|
-
function
|
|
955
|
+
function X(e) {
|
|
956
956
|
let t = [];
|
|
957
957
|
function n(e) {
|
|
958
958
|
return (t) => {
|
|
959
|
-
t.merged || (t.barycenter === void 0 || e.barycenter === void 0 || t.barycenter >= e.barycenter) &&
|
|
959
|
+
t.merged || (t.barycenter === void 0 || e.barycenter === void 0 || t.barycenter >= e.barycenter) && Kt(e, t);
|
|
960
960
|
};
|
|
961
961
|
}
|
|
962
962
|
function r(t) {
|
|
@@ -968,50 +968,50 @@ function Wt(e) {
|
|
|
968
968
|
let i = e.pop();
|
|
969
969
|
t.push(i), i.in.reverse().forEach(n(i)), i.out.forEach(r(i));
|
|
970
970
|
}
|
|
971
|
-
return t.filter((e) => !e.merged).map((e) =>
|
|
971
|
+
return t.filter((e) => !e.merged).map((e) => H(e, [
|
|
972
972
|
"vs",
|
|
973
973
|
"i",
|
|
974
974
|
"barycenter",
|
|
975
975
|
"weight"
|
|
976
976
|
]));
|
|
977
977
|
}
|
|
978
|
-
function
|
|
978
|
+
function Kt(e, t) {
|
|
979
979
|
let n = 0, r = 0;
|
|
980
980
|
e.weight && (n += e.barycenter * e.weight, r += e.weight), t.weight && (n += t.barycenter * t.weight, r += t.weight), e.vs = t.vs.concat(e.vs), e.barycenter = n / r, e.weight = r, e.i = Math.min(t.i, e.i), t.merged = !0;
|
|
981
981
|
}
|
|
982
982
|
//#endregion
|
|
983
983
|
//#region src/DAG/order/sort.js
|
|
984
|
-
function
|
|
985
|
-
let n =
|
|
986
|
-
r.sort(
|
|
987
|
-
c += e.vs.length, a.push(e.vs), o += e.barycenter * e.weight, s += e.weight, c =
|
|
984
|
+
function qt(e, t) {
|
|
985
|
+
let n = Ze(e, (e) => Object.hasOwn(e, "barycenter")), r = n.lhs, i = n.rhs.sort((e, t) => t.i - e.i), a = [], o = 0, s = 0, c = 0;
|
|
986
|
+
r.sort(Yt(!!t)), c = Jt(a, i, c), r.forEach((e) => {
|
|
987
|
+
c += e.vs.length, a.push(e.vs), o += e.barycenter * e.weight, s += e.weight, c = Jt(a, i, c);
|
|
988
988
|
});
|
|
989
989
|
let l = { vs: a.flat(!0) };
|
|
990
990
|
return s && (l.barycenter = o / s, l.weight = s), l;
|
|
991
991
|
}
|
|
992
|
-
function
|
|
992
|
+
function Jt(e, t, n) {
|
|
993
993
|
let r;
|
|
994
994
|
for (; t.length && (r = t[t.length - 1]).i <= n;) t.pop(), e.push(r.vs), n++;
|
|
995
995
|
return n;
|
|
996
996
|
}
|
|
997
|
-
function
|
|
997
|
+
function Yt(e) {
|
|
998
998
|
return (t, n) => t.barycenter < n.barycenter ? -1 : t.barycenter > n.barycenter ? 1 : e ? n.i - t.i : t.i - n.i;
|
|
999
999
|
}
|
|
1000
1000
|
//#endregion
|
|
1001
1001
|
//#region src/DAG/order/sort-subgraph.js
|
|
1002
|
-
function
|
|
1002
|
+
function Xt(e, t, n, r) {
|
|
1003
1003
|
let i = e.children(t), a = e.node(t), o = a ? a.borderLeft : void 0, s = a ? a.borderRight : void 0, c = {};
|
|
1004
1004
|
o && (i = i.filter((e) => e !== o && e !== s));
|
|
1005
|
-
let l =
|
|
1005
|
+
let l = Y(e, i);
|
|
1006
1006
|
l.forEach((t) => {
|
|
1007
1007
|
if (e.children(t.v).length) {
|
|
1008
|
-
let i =
|
|
1009
|
-
c[t.v] = i, Object.hasOwn(i, "barycenter") &&
|
|
1008
|
+
let i = Xt(e, t.v, n, r);
|
|
1009
|
+
c[t.v] = i, Object.hasOwn(i, "barycenter") && Qt(t, i);
|
|
1010
1010
|
}
|
|
1011
1011
|
});
|
|
1012
|
-
let u =
|
|
1013
|
-
|
|
1014
|
-
let d =
|
|
1012
|
+
let u = Gt(l, n);
|
|
1013
|
+
Zt(u, c);
|
|
1014
|
+
let d = qt(u, r);
|
|
1015
1015
|
if (o && (d.vs = [
|
|
1016
1016
|
o,
|
|
1017
1017
|
d.vs,
|
|
@@ -1022,19 +1022,19 @@ function Jt(e, t, n, r) {
|
|
|
1022
1022
|
}
|
|
1023
1023
|
return d;
|
|
1024
1024
|
}
|
|
1025
|
-
function
|
|
1025
|
+
function Zt(e, t) {
|
|
1026
1026
|
e.forEach((e) => {
|
|
1027
1027
|
e.vs = e.vs.flatMap((e) => t[e] ? t[e].vs : e);
|
|
1028
1028
|
});
|
|
1029
1029
|
}
|
|
1030
|
-
function
|
|
1030
|
+
function Qt(e, t) {
|
|
1031
1031
|
e.barycenter === void 0 ? (e.barycenter = t.barycenter, e.weight = t.weight) : (e.barycenter = (e.barycenter * e.weight + t.barycenter * t.weight) / (e.weight + t.weight), e.weight += t.weight);
|
|
1032
1032
|
}
|
|
1033
1033
|
//#endregion
|
|
1034
1034
|
//#region src/DAG/order/build-layer-graph.js
|
|
1035
|
-
function
|
|
1035
|
+
function $t(e, t, n, r) {
|
|
1036
1036
|
r ||= e.nodes();
|
|
1037
|
-
let i =
|
|
1037
|
+
let i = en(e), a = new k({ compound: !0 }).setGraph({ root: i }).setDefaultNodeLabel((t) => e.node(t));
|
|
1038
1038
|
return r.forEach((r) => {
|
|
1039
1039
|
let o = e.node(r), s = e.parent(r);
|
|
1040
1040
|
(o.rank === t || o.minRank <= t && t <= o.maxRank) && (a.setNode(r), a.setParent(r, s || i), e[n](r).forEach((t) => {
|
|
@@ -1046,14 +1046,14 @@ function Zt(e, t, n, r) {
|
|
|
1046
1046
|
}));
|
|
1047
1047
|
}), a;
|
|
1048
1048
|
}
|
|
1049
|
-
function
|
|
1049
|
+
function en(e) {
|
|
1050
1050
|
let t;
|
|
1051
|
-
for (; e.hasNode(t =
|
|
1051
|
+
for (; e.hasNode(t = tt("_root")););
|
|
1052
1052
|
return t;
|
|
1053
1053
|
}
|
|
1054
1054
|
//#endregion
|
|
1055
1055
|
//#region src/DAG/order/add-subgraph-constraints.js
|
|
1056
|
-
function
|
|
1056
|
+
function tn(e, t, n) {
|
|
1057
1057
|
let r = {}, i;
|
|
1058
1058
|
n.forEach((n) => {
|
|
1059
1059
|
let a = e.parent(n), o, s;
|
|
@@ -1068,22 +1068,22 @@ function $t(e, t, n) {
|
|
|
1068
1068
|
}
|
|
1069
1069
|
//#endregion
|
|
1070
1070
|
//#region src/DAG/order/index.js
|
|
1071
|
-
function
|
|
1071
|
+
function Z(e, t = {}) {
|
|
1072
1072
|
if (typeof t.customOrder == "function") {
|
|
1073
|
-
t.customOrder(e,
|
|
1073
|
+
t.customOrder(e, Z);
|
|
1074
1074
|
return;
|
|
1075
1075
|
}
|
|
1076
|
-
let n =
|
|
1077
|
-
if (
|
|
1076
|
+
let n = V(e), r = nn(e, nt(1, n + 1), "inEdges"), i = nn(e, nt(n - 1, -1, -1), "outEdges"), a = Ht(e);
|
|
1077
|
+
if (an(e, a), t.disableOptimalOrderHeuristic) return;
|
|
1078
1078
|
let o = Infinity, s, c = t.constraints || [];
|
|
1079
1079
|
for (let t = 0, n = 0; n < 4; ++t, ++n) {
|
|
1080
|
-
|
|
1081
|
-
let l =
|
|
1080
|
+
rn(t % 2 == 0 ? r : i, t % 4 >= 2, c), a = Ke(e);
|
|
1081
|
+
let l = Ut(e, a);
|
|
1082
1082
|
l < o ? (o = l, n = 0, s = structuredClone(a)) : l === o && (s = structuredClone(a));
|
|
1083
1083
|
}
|
|
1084
|
-
|
|
1084
|
+
an(e, s);
|
|
1085
1085
|
}
|
|
1086
|
-
function
|
|
1086
|
+
function nn(e, t, n) {
|
|
1087
1087
|
let r = /* @__PURE__ */ new Map();
|
|
1088
1088
|
function i(e, t) {
|
|
1089
1089
|
r.has(e) || r.set(e, []), r.get(e).push(t);
|
|
@@ -1092,19 +1092,19 @@ function tn(e, t, n) {
|
|
|
1092
1092
|
let n = e.node(t);
|
|
1093
1093
|
if (typeof n.rank == "number" && i(n.rank, t), typeof n.minRank == "number" && typeof n.maxRank == "number") for (let e = n.minRank; e <= n.maxRank; e++) e !== n.rank && i(e, t);
|
|
1094
1094
|
}
|
|
1095
|
-
return t.map((t) =>
|
|
1095
|
+
return t.map((t) => $t(e, t, n, r.get(t) || []));
|
|
1096
1096
|
}
|
|
1097
|
-
function
|
|
1097
|
+
function rn(e, t, n) {
|
|
1098
1098
|
let r = new k();
|
|
1099
1099
|
e.forEach((e) => {
|
|
1100
1100
|
n.forEach((e) => r.setEdge(e.left, e.right));
|
|
1101
|
-
let i = e.graph().root, a =
|
|
1101
|
+
let i = e.graph().root, a = Xt(e, i, r, t);
|
|
1102
1102
|
a.vs.forEach((t, n) => {
|
|
1103
1103
|
e.node(t).order = n;
|
|
1104
|
-
}),
|
|
1104
|
+
}), tn(e, r, a.vs);
|
|
1105
1105
|
});
|
|
1106
1106
|
}
|
|
1107
|
-
function
|
|
1107
|
+
function an(e, t) {
|
|
1108
1108
|
Object.values(t).forEach((t) => {
|
|
1109
1109
|
t.forEach((t, n) => {
|
|
1110
1110
|
e.node(t).order = n;
|
|
@@ -1113,30 +1113,30 @@ function rn(e, t) {
|
|
|
1113
1113
|
}
|
|
1114
1114
|
//#endregion
|
|
1115
1115
|
//#region src/DAG/position/bk.js
|
|
1116
|
-
function
|
|
1116
|
+
function Q(e, t) {
|
|
1117
1117
|
let n = {};
|
|
1118
1118
|
function r(t, r) {
|
|
1119
1119
|
let i = 0, a = 0, o = t.length, s = r[r.length - 1];
|
|
1120
1120
|
return r.forEach((t, c) => {
|
|
1121
|
-
let l =
|
|
1121
|
+
let l = sn(e, t), u = l ? e.node(l).order : o;
|
|
1122
1122
|
(l || t === s) && (r.slice(a, c + 1).forEach((t) => {
|
|
1123
1123
|
e.predecessors(t).forEach((r) => {
|
|
1124
1124
|
let a = e.node(r), o = a.order;
|
|
1125
|
-
(o < i || u < o) && !(a.dummy && e.node(t).dummy) &&
|
|
1125
|
+
(o < i || u < o) && !(a.dummy && e.node(t).dummy) && cn(n, r, t);
|
|
1126
1126
|
});
|
|
1127
1127
|
}), a = c + 1, i = u);
|
|
1128
1128
|
}), r;
|
|
1129
1129
|
}
|
|
1130
1130
|
return t.length && t.reduce(r), n;
|
|
1131
1131
|
}
|
|
1132
|
-
function
|
|
1132
|
+
function on(e, t) {
|
|
1133
1133
|
let n = {};
|
|
1134
1134
|
function r(t, r, i, a, o) {
|
|
1135
1135
|
let s;
|
|
1136
|
-
|
|
1136
|
+
nt(r, i).forEach((r) => {
|
|
1137
1137
|
s = t[r], e.node(s).dummy && e.predecessors(s).forEach((t) => {
|
|
1138
1138
|
let r = e.node(t);
|
|
1139
|
-
r.dummy && (r.order < a || r.order > o) &&
|
|
1139
|
+
r.dummy && (r.order < a || r.order > o) && cn(n, t, s);
|
|
1140
1140
|
});
|
|
1141
1141
|
});
|
|
1142
1142
|
}
|
|
@@ -1152,10 +1152,10 @@ function $(e, t) {
|
|
|
1152
1152
|
}
|
|
1153
1153
|
return t.length && t.reduce(i), n;
|
|
1154
1154
|
}
|
|
1155
|
-
function
|
|
1155
|
+
function sn(e, t) {
|
|
1156
1156
|
if (e.node(t).dummy) return e.predecessors(t).find((t) => e.node(t).dummy);
|
|
1157
1157
|
}
|
|
1158
|
-
function
|
|
1158
|
+
function cn(e, t, n) {
|
|
1159
1159
|
if (t > n) {
|
|
1160
1160
|
let e = t;
|
|
1161
1161
|
t = n, n = e;
|
|
@@ -1163,14 +1163,14 @@ function sn(e, t, n) {
|
|
|
1163
1163
|
let r = e[t];
|
|
1164
1164
|
r || (e[t] = r = {}), r[n] = !0;
|
|
1165
1165
|
}
|
|
1166
|
-
function
|
|
1166
|
+
function ln(e, t, n) {
|
|
1167
1167
|
if (t > n) {
|
|
1168
1168
|
let e = t;
|
|
1169
1169
|
t = n, n = e;
|
|
1170
1170
|
}
|
|
1171
1171
|
return !!e[t] && Object.hasOwn(e[t], n);
|
|
1172
1172
|
}
|
|
1173
|
-
function
|
|
1173
|
+
function un(e, t, n, r) {
|
|
1174
1174
|
let i = {}, a = {}, o = {};
|
|
1175
1175
|
return t.forEach((e) => {
|
|
1176
1176
|
e.forEach((e, t) => {
|
|
@@ -1185,7 +1185,7 @@ function ln(e, t, n, r) {
|
|
|
1185
1185
|
let r = (s.length - 1) / 2;
|
|
1186
1186
|
for (let c = Math.floor(r), l = Math.ceil(r); c <= l; ++c) {
|
|
1187
1187
|
let r = s[c];
|
|
1188
|
-
a[e] === e && t < o[r] && !
|
|
1188
|
+
a[e] === e && t < o[r] && !ln(n, e, r) && (a[r] = e, a[e] = i[e] = i[r], t = o[r]);
|
|
1189
1189
|
}
|
|
1190
1190
|
}
|
|
1191
1191
|
});
|
|
@@ -1194,8 +1194,8 @@ function ln(e, t, n, r) {
|
|
|
1194
1194
|
align: a
|
|
1195
1195
|
};
|
|
1196
1196
|
}
|
|
1197
|
-
function
|
|
1198
|
-
let a = {}, o =
|
|
1197
|
+
function dn(e, t, n, r, i) {
|
|
1198
|
+
let a = {}, o = fn(e, t, n, i), s = i ? "borderLeft" : "borderRight";
|
|
1199
1199
|
function c(e, t) {
|
|
1200
1200
|
let n = o.nodes().slice(), r = {}, i = n.pop();
|
|
1201
1201
|
for (; i;) {
|
|
@@ -1218,8 +1218,8 @@ function un(e, t, n, r, i) {
|
|
|
1218
1218
|
a[e] = a[n[e]];
|
|
1219
1219
|
}), a;
|
|
1220
1220
|
}
|
|
1221
|
-
function
|
|
1222
|
-
let i = new e.constructor(), a = e.graph(), o =
|
|
1221
|
+
function fn(e, t, n, r) {
|
|
1222
|
+
let i = new e.constructor(), a = e.graph(), o = _n(a.nodesep, a.edgesep, r);
|
|
1223
1223
|
return t.forEach((t) => {
|
|
1224
1224
|
let r;
|
|
1225
1225
|
t.forEach((t) => {
|
|
@@ -1232,47 +1232,47 @@ function dn(e, t, n, r) {
|
|
|
1232
1232
|
});
|
|
1233
1233
|
}), i;
|
|
1234
1234
|
}
|
|
1235
|
-
function
|
|
1235
|
+
function pn(e, t) {
|
|
1236
1236
|
return Object.values(t).reduce((t, n) => {
|
|
1237
1237
|
let r = -Infinity, i = Infinity;
|
|
1238
1238
|
Object.entries(n).forEach(([t, n]) => {
|
|
1239
|
-
let a =
|
|
1239
|
+
let a = vn(e, t) / 2;
|
|
1240
1240
|
r = Math.max(n + a, r), i = Math.min(n - a, i);
|
|
1241
1241
|
});
|
|
1242
1242
|
let a = r - i;
|
|
1243
1243
|
return a < t[0] && (t = [a, n]), t;
|
|
1244
1244
|
}, [Infinity, null])[1];
|
|
1245
1245
|
}
|
|
1246
|
-
function
|
|
1246
|
+
function mn(e, t) {
|
|
1247
1247
|
let n = Object.values(t), r = B(Math.min, n), i = B(Math.max, n);
|
|
1248
1248
|
["u", "d"].forEach((n) => {
|
|
1249
1249
|
["l", "r"].forEach((a) => {
|
|
1250
1250
|
let o = n + a, s = e[o];
|
|
1251
1251
|
if (s === t) return;
|
|
1252
1252
|
let c = Object.values(s), l = r - B(Math.min, c);
|
|
1253
|
-
a !== "l" && (l = i - B(Math.max, c)), l && (s =
|
|
1253
|
+
a !== "l" && (l = i - B(Math.max, c)), l && (s = U(s, (e) => e + l), e[o] = s);
|
|
1254
1254
|
});
|
|
1255
1255
|
});
|
|
1256
1256
|
}
|
|
1257
|
-
function
|
|
1258
|
-
return
|
|
1257
|
+
function hn(e, t) {
|
|
1258
|
+
return U(e.ul, (n, r) => {
|
|
1259
1259
|
if (t) return e[t.toLowerCase()][r];
|
|
1260
1260
|
let i = Object.values(e).map((e) => e[r]).sort((e, t) => e - t);
|
|
1261
1261
|
return (i[1] + i[2]) / 2;
|
|
1262
1262
|
});
|
|
1263
1263
|
}
|
|
1264
|
-
function
|
|
1265
|
-
let t =
|
|
1264
|
+
function gn(e) {
|
|
1265
|
+
let t = Ke(e), n = Object.assign(Q(e, t), on(e, t)), r = {}, i;
|
|
1266
1266
|
return ["u", "d"].forEach((a) => {
|
|
1267
1267
|
i = a === "u" ? t : Object.values(t).reverse(), ["l", "r"].forEach((t) => {
|
|
1268
1268
|
let o = i;
|
|
1269
1269
|
t === "r" && (o = o.map((e) => Object.values(e).reverse()));
|
|
1270
|
-
let s = (a === "u" ? e.predecessors : e.successors).bind(e), c =
|
|
1271
|
-
t === "r" && (l =
|
|
1270
|
+
let s = (a === "u" ? e.predecessors : e.successors).bind(e), c = un(e, o, n, s), l = dn(e, o, c.root, c.align, t === "r");
|
|
1271
|
+
t === "r" && (l = U(l, (e) => -e)), r[a + t] = l;
|
|
1272
1272
|
});
|
|
1273
|
-
}),
|
|
1273
|
+
}), mn(r, pn(e, r)), hn(r, e.graph().align);
|
|
1274
1274
|
}
|
|
1275
|
-
function
|
|
1275
|
+
function _n(e, t, n) {
|
|
1276
1276
|
return (r, i, a) => {
|
|
1277
1277
|
let o = r.node(i), s = r.node(a), c = 0, l;
|
|
1278
1278
|
if (c += o.width / 2, Object.hasOwn(o, "labelpos")) switch (o.labelpos.toLowerCase()) {
|
|
@@ -1290,21 +1290,21 @@ function gn(e, t, n) {
|
|
|
1290
1290
|
return l && (c += n ? l : -l), l = 0, c;
|
|
1291
1291
|
};
|
|
1292
1292
|
}
|
|
1293
|
-
function
|
|
1293
|
+
function vn(e, t) {
|
|
1294
1294
|
return e.node(t).width;
|
|
1295
1295
|
}
|
|
1296
1296
|
//#endregion
|
|
1297
1297
|
//#region src/DAG/position/index.js
|
|
1298
|
-
function
|
|
1299
|
-
let t =
|
|
1300
|
-
|
|
1301
|
-
let n =
|
|
1298
|
+
function yn(e) {
|
|
1299
|
+
let t = Ue(e);
|
|
1300
|
+
bn(t);
|
|
1301
|
+
let n = gn(t);
|
|
1302
1302
|
Object.entries(n).forEach(([t, n]) => {
|
|
1303
1303
|
e.node(t).x = n;
|
|
1304
1304
|
});
|
|
1305
1305
|
}
|
|
1306
|
-
function
|
|
1307
|
-
let t =
|
|
1306
|
+
function bn(e) {
|
|
1307
|
+
let t = Ke(e), n = e.graph().ranksep, r = 0;
|
|
1308
1308
|
t.forEach((t) => {
|
|
1309
1309
|
let i = t.reduce((t, n) => {
|
|
1310
1310
|
let r = e.node(n).height;
|
|
@@ -1317,15 +1317,15 @@ function yn(e) {
|
|
|
1317
1317
|
}
|
|
1318
1318
|
//#endregion
|
|
1319
1319
|
//#region src/DAG/layout.js
|
|
1320
|
-
function
|
|
1321
|
-
let n = t.debugTiming ?
|
|
1320
|
+
function xn(e, t = {}) {
|
|
1321
|
+
let n = t.debugTiming ? Qe : $e;
|
|
1322
1322
|
return n("layout", () => {
|
|
1323
1323
|
let r = n(" buildLayoutGraph", () => jn(e));
|
|
1324
|
-
return n(" runLayout", () =>
|
|
1324
|
+
return n(" runLayout", () => $(r, n, t)), n(" updateInputGraph", () => Sn(e, r)), r;
|
|
1325
1325
|
});
|
|
1326
1326
|
}
|
|
1327
|
-
function
|
|
1328
|
-
t(" makeSpaceForEdgeLabels", () => Mn(e)), t(" removeSelfEdges", () => Hn(e)), t(" acyclic", () =>
|
|
1327
|
+
function $(e, t, n) {
|
|
1328
|
+
t(" makeSpaceForEdgeLabels", () => Mn(e)), t(" removeSelfEdges", () => Hn(e)), t(" acyclic", () => it(e)), t(" nestingGraph.run", () => Dt(e)), t(" rank", () => St(Ue(e))), t(" injectEdgeLabelProxies", () => Nn(e)), t(" removeEmptyRanks", () => Je(e)), t(" nestingGraph.cleanup", () => jt(e)), t(" normalizeRanks", () => qe(e)), t(" assignRankMinMax", () => Pn(e)), t(" removeEdgeLabelProxies", () => Fn(e)), t(" normalize.run", () => ot(e)), t(" parentDummyChains", () => Tt(e)), t(" addBorderSegments", () => Mt(e)), t(" order", () => Z(e, n)), t(" insertSelfEdges", () => Un(e)), t(" adjustCoordinateSystem", () => Vt.adjust(e)), t(" position", () => yn(e)), t(" positionSelfEdges", () => Wn(e)), t(" removeBorderNodes", () => Vn(e)), t(" normalize.undo", () => ct(e)), t(" fixupEdgeLabelCoords", () => zn(e)), t(" undoCoordinateSystem", () => Vt.undo(e)), t(" translateGraph", () => In(e)), t(" assignNodeIntersects", () => Rn(e)), t(" reversePoints", () => Bn(e)), t(" acyclic.undo", () => at(e));
|
|
1329
1329
|
}
|
|
1330
1330
|
function Sn(e, t) {
|
|
1331
1331
|
e.nodes().forEach((n) => {
|
|
@@ -1379,7 +1379,7 @@ function jn(e) {
|
|
|
1379
1379
|
let t = Kn(e.graph()), n = {
|
|
1380
1380
|
...wn,
|
|
1381
1381
|
...Gn(t, Cn),
|
|
1382
|
-
...
|
|
1382
|
+
...H(t, Tn)
|
|
1383
1383
|
}, r = new k({
|
|
1384
1384
|
multigraph: !0,
|
|
1385
1385
|
compound: !0
|
|
@@ -1394,7 +1394,7 @@ function jn(e) {
|
|
|
1394
1394
|
r.setEdge(t, {
|
|
1395
1395
|
...kn,
|
|
1396
1396
|
...Gn(n, On),
|
|
1397
|
-
...
|
|
1397
|
+
...H(n, An)
|
|
1398
1398
|
});
|
|
1399
1399
|
}), r;
|
|
1400
1400
|
}
|
|
@@ -1410,7 +1410,7 @@ function Nn(e) {
|
|
|
1410
1410
|
let n = e.edge(t);
|
|
1411
1411
|
if (n.width && n.height) {
|
|
1412
1412
|
let n = e.node(t.v);
|
|
1413
|
-
|
|
1413
|
+
L(e, "edge-proxy", {
|
|
1414
1414
|
rank: (e.node(t.w).rank - n.rank) / 2 + n.rank,
|
|
1415
1415
|
e: t
|
|
1416
1416
|
}, "_ep");
|
|
@@ -1463,7 +1463,7 @@ function Rn(e) {
|
|
|
1463
1463
|
e.edges().forEach((t) => {
|
|
1464
1464
|
let n = e.edge(t), r = e.node(t.v), i = e.node(t.w), a, o;
|
|
1465
1465
|
!n.points || !n.points.length ? (n.points = [], a = i, o = r) : (a = n.points[0], o = n.points[n.points.length - 1]);
|
|
1466
|
-
let s =
|
|
1466
|
+
let s = Ge(r, a), c = Ge(i, o), l = n.points.length ? n.points[0] : a, u = n.points.length ? n.points[n.points.length - 1] : o, d = n.arrowshape, f = d === "normal" || d === "vee", p = !!n.reversed, m = s, h = c;
|
|
1467
1467
|
f && (p ? m = Ln(s, l, 4) : h = Ln(c, u, 4)), n.points.unshift(m), n.points.push(h);
|
|
1468
1468
|
});
|
|
1469
1469
|
}
|
|
@@ -1506,12 +1506,12 @@ function Hn(e) {
|
|
|
1506
1506
|
});
|
|
1507
1507
|
}
|
|
1508
1508
|
function Un(e) {
|
|
1509
|
-
|
|
1509
|
+
Ke(e).forEach((t) => {
|
|
1510
1510
|
let n = 0;
|
|
1511
1511
|
t.forEach((t, r) => {
|
|
1512
1512
|
let i = e.node(t);
|
|
1513
1513
|
i.order = r + n, (i.selfEdges || []).forEach((t) => {
|
|
1514
|
-
|
|
1514
|
+
L(e, "selfedge", {
|
|
1515
1515
|
width: t.label.width,
|
|
1516
1516
|
height: t.label.height,
|
|
1517
1517
|
rank: i.rank,
|
|
@@ -1554,7 +1554,7 @@ function Wn(e) {
|
|
|
1554
1554
|
});
|
|
1555
1555
|
}
|
|
1556
1556
|
function Gn(e, t) {
|
|
1557
|
-
return
|
|
1557
|
+
return U(H(e, t), Number);
|
|
1558
1558
|
}
|
|
1559
1559
|
function Kn(e) {
|
|
1560
1560
|
let t = {};
|
|
@@ -1626,7 +1626,7 @@ function Xn(e) {
|
|
|
1626
1626
|
minlen: e.minLength ?? 1,
|
|
1627
1627
|
arrowShape: r.arrowShape ?? "normal"
|
|
1628
1628
|
});
|
|
1629
|
-
}),
|
|
1629
|
+
}), xn(l);
|
|
1630
1630
|
let u = e.map((e) => {
|
|
1631
1631
|
let t = l.node(e.id);
|
|
1632
1632
|
return {
|
|
@@ -1807,29 +1807,29 @@ var Zn = /* @__PURE__ */ e({ default: () => jr }), Qn = ["id"], $n = ["id"], er
|
|
|
1807
1807
|
"rotate"
|
|
1808
1808
|
],
|
|
1809
1809
|
setup(e, { expose: i, emit: re }) {
|
|
1810
|
-
let ke = ve(() => import("./PenAndPaper-DAE-tnEQ.js").then((e) => e.t)), je = ve(() => import("./UserOptions-Dt98of5H.js").then((e) => e.n)), Me = ve(() => import("./PackageVersion-
|
|
1810
|
+
let ke = ve(() => import("./PenAndPaper-DAE-tnEQ.js").then((e) => e.t)), je = ve(() => import("./UserOptions-Dt98of5H.js").then((e) => e.n)), Me = ve(() => import("./PackageVersion-DXU7nRr9.js").then((e) => e.t)), { vue_ui_dag: Ne } = d(), { isThemeValid: k, warnInvalidTheme: Pe } = g(), A = e, j = re, M = T(null), N = T(o()), Fe = T(null), Ie = T(null), Le = T(null), Re = T(0), ze = T(0), Be = T(!1), Ve = T(!1), P = T(null), F = T(null), I = T(null), L = T(null), He = T(null), Ue = T("pointer"), We = T(!1), R = T(ut());
|
|
1811
1811
|
l({
|
|
1812
1812
|
config: () => R.value,
|
|
1813
1813
|
dataset: () => A.dataset,
|
|
1814
1814
|
component: "VueUiDag",
|
|
1815
1815
|
rules: [u.noHint]
|
|
1816
1816
|
});
|
|
1817
|
-
let
|
|
1817
|
+
let Ge = _(() => R.value.userOptions.useCursorPointer), Ke = T(R.value.style.chart.width), qe = T(R.value.style.chart.height), Je = T({
|
|
1818
1818
|
x: 0,
|
|
1819
1819
|
y: 0
|
|
1820
|
-
}), z = T(null),
|
|
1820
|
+
}), z = T(null), Ye = T(null), Xe = T({
|
|
1821
1821
|
left: "0px",
|
|
1822
1822
|
top: "0px"
|
|
1823
|
-
}),
|
|
1823
|
+
}), B = T("top"), V = T(!1), Ze = T({
|
|
1824
1824
|
x: 0,
|
|
1825
1825
|
y: 0
|
|
1826
|
-
}),
|
|
1826
|
+
}), Qe = T({
|
|
1827
1827
|
x: 0,
|
|
1828
1828
|
y: 0
|
|
1829
|
-
}),
|
|
1829
|
+
}), $e = T(null), et = T(null), tt = T({
|
|
1830
1830
|
left: "0px",
|
|
1831
1831
|
top: "0px"
|
|
1832
|
-
}), nt = T("top"),
|
|
1832
|
+
}), nt = T("top"), H = T(!1), U = T(!1), { svgRef: W } = ce({ config: R.value.style.chart.title }), { userOptionsVisible: rt, setUserOptionsVisibility: it, keepUserOptionState: at } = se({ config: R.value }), G = T(R.value.style.chart.layout.rankDirection), ot = _(() => t({
|
|
1833
1833
|
defaultConfig: {
|
|
1834
1834
|
userOptions: { show: !1 },
|
|
1835
1835
|
style: { chart: {
|
|
@@ -1879,71 +1879,57 @@ var Zn = /* @__PURE__ */ e({ default: () => jr }), Qn = ["id"], $n = ["id"], er
|
|
|
1879
1879
|
})
|
|
1880
1880
|
});
|
|
1881
1881
|
function ut() {
|
|
1882
|
-
let e =
|
|
1882
|
+
let e = h({
|
|
1883
1883
|
userConfig: A.config,
|
|
1884
1884
|
defaultConfig: Ne
|
|
1885
1885
|
}), t = e.theme;
|
|
1886
1886
|
if (!t) return e;
|
|
1887
1887
|
if (!k.value(e)) return Pe(e), e;
|
|
1888
|
-
let n =
|
|
1888
|
+
let n = h({
|
|
1889
1889
|
userConfig: de[t] || A.config,
|
|
1890
1890
|
defaultConfig: e
|
|
1891
1891
|
});
|
|
1892
|
-
return
|
|
1892
|
+
return h({
|
|
1893
1893
|
userConfig: A.config,
|
|
1894
1894
|
defaultConfig: n
|
|
1895
1895
|
});
|
|
1896
1896
|
}
|
|
1897
|
-
let dt = _(() =>
|
|
1897
|
+
let dt = _(() => R.value.debug);
|
|
1898
1898
|
we(async () => {
|
|
1899
1899
|
a(A.dataset) && (c({
|
|
1900
1900
|
componentName: "VueUiDag",
|
|
1901
1901
|
type: "dataset",
|
|
1902
1902
|
debug: dt.value
|
|
1903
|
-
}), Ve.value = !1, lt.value = !0), A.dataset.nodes || (c({
|
|
1903
|
+
}), Ve.value = !1, lt.value = !0), (!A.dataset.nodes || A.dataset.nodes.length === 0) && (c({
|
|
1904
1904
|
componentName: "VueUiDag",
|
|
1905
1905
|
type: "datasetAttributeEmpty",
|
|
1906
1906
|
property: "nodes",
|
|
1907
1907
|
index: 0,
|
|
1908
1908
|
debug: dt.value
|
|
1909
|
-
}), Ve.value = !1, lt.value = !0), Ve.value = !0, await be(),
|
|
1909
|
+
}), Ve.value = !1, lt.value = !0), Ve.value = !0, await be(), Xt();
|
|
1910
1910
|
}), Oe(() => A.config, async (e) => {
|
|
1911
|
-
st.value || (R.value = ut()), rt.value = !R.value.userOptions.showOnChartHover, Re.value += 1,
|
|
1911
|
+
st.value || (R.value = ut()), rt.value = !R.value.userOptions.showOnChartHover, Re.value += 1, G.value = R.value.style.chart.layout.rankDirection, Ke.value = R.value.style.chart.width, qe.value = R.value.style.chart.height, Ot.value = R.value.style.chart.zoom.active, await be(), Xt();
|
|
1912
1912
|
}, { deep: !0 });
|
|
1913
|
-
let { isPrinting: ft, isImaging:
|
|
1913
|
+
let { isPrinting: ft, isImaging: pt, generatePdf: mt, generateImage: ht } = f({
|
|
1914
1914
|
elementId: `dag_${N.value}`,
|
|
1915
1915
|
fileName: R.value.style.chart.title.text || "vue-ui-dag",
|
|
1916
1916
|
options: R.value.userOptions.print
|
|
1917
|
-
}),
|
|
1918
|
-
svg:
|
|
1919
|
-
title:
|
|
1920
|
-
legend:
|
|
1921
|
-
legendItems:
|
|
1922
|
-
backgroundColor:
|
|
1917
|
+
}), gt = _(() => R.value.style.chart.backgroundColor), _t = _(() => R.value.style.chart.title), { isCallbackImaging: vt, isCallbackSvg: yt, generateSvg: bt, onGenerateImage: xt } = ee({
|
|
1918
|
+
svg: W,
|
|
1919
|
+
title: _t,
|
|
1920
|
+
legend: null,
|
|
1921
|
+
legendItems: null,
|
|
1922
|
+
backgroundColor: gt,
|
|
1923
|
+
getSvgCallback: () => R.value.userOptions.callbacks.svg,
|
|
1924
|
+
generateImage: ht
|
|
1923
1925
|
});
|
|
1924
|
-
|
|
1925
|
-
Ue.value = !0, await be();
|
|
1926
|
-
try {
|
|
1927
|
-
if (e) {
|
|
1928
|
-
let { blob: e, url: t, text: n, dataUrl: r } = await vt();
|
|
1929
|
-
await Promise.resolve(R.value.userOptions.callbacks.svg({
|
|
1930
|
-
blob: e,
|
|
1931
|
-
url: t,
|
|
1932
|
-
text: n,
|
|
1933
|
-
dataUrl: r
|
|
1934
|
-
}));
|
|
1935
|
-
} else await Promise.resolve(_t());
|
|
1936
|
-
} finally {
|
|
1937
|
-
Ue.value = !1;
|
|
1938
|
-
}
|
|
1939
|
-
}
|
|
1940
|
-
function bt() {
|
|
1926
|
+
function St() {
|
|
1941
1927
|
Be.value = !0, it(!0);
|
|
1942
1928
|
}
|
|
1943
|
-
function
|
|
1929
|
+
function Ct() {
|
|
1944
1930
|
it(!1), Be.value = !1;
|
|
1945
1931
|
}
|
|
1946
|
-
function
|
|
1932
|
+
function wt({ tooltipRef: e, isVisibleRef: t, anchorRef: n, styleRef: r, placementRef: i, offsetRef: a, margin: o = 24 }) {
|
|
1947
1933
|
return function() {
|
|
1948
1934
|
let s = e.value;
|
|
1949
1935
|
if (!s || !t.value) return;
|
|
@@ -1964,7 +1950,7 @@ var Zn = /* @__PURE__ */ e({ default: () => jr }), Qn = ["id"], $n = ["id"], er
|
|
|
1964
1950
|
};
|
|
1965
1951
|
};
|
|
1966
1952
|
}
|
|
1967
|
-
let { layoutData:
|
|
1953
|
+
let { layoutData: K, lastError: Tt, arrowMarkerIdentifier: Et } = Xn({
|
|
1968
1954
|
nodes: _(() => ct.value.nodes.map((e) => ({
|
|
1969
1955
|
...e,
|
|
1970
1956
|
backgroundColor: e.backgroundColor ? r(e.backgroundColor) : R.value.style.chart.nodes.backgroundColor,
|
|
@@ -1973,16 +1959,16 @@ var Zn = /* @__PURE__ */ e({ default: () => jr }), Qn = ["id"], $n = ["id"], er
|
|
|
1973
1959
|
edges: _(() => ct.value.edges),
|
|
1974
1960
|
configuration: _(() => ({
|
|
1975
1961
|
...R.value.style.chart.layout,
|
|
1976
|
-
rankDirection:
|
|
1962
|
+
rankDirection: G.value
|
|
1977
1963
|
}))
|
|
1978
1964
|
});
|
|
1979
|
-
function
|
|
1980
|
-
return
|
|
1965
|
+
function q(e) {
|
|
1966
|
+
return K.value ? K.value.nodes.find((t) => t.id === e) : null;
|
|
1981
1967
|
}
|
|
1982
1968
|
_(() => {
|
|
1983
|
-
if (!
|
|
1969
|
+
if (!K.value) return [];
|
|
1984
1970
|
let e = R.value.style.chart.edges.stroke, t = /* @__PURE__ */ new Set();
|
|
1985
|
-
return
|
|
1971
|
+
return K.value.edges.forEach((n) => {
|
|
1986
1972
|
t.add({
|
|
1987
1973
|
id: n.id,
|
|
1988
1974
|
from: n.from,
|
|
@@ -1991,144 +1977,144 @@ var Zn = /* @__PURE__ */ e({ default: () => jr }), Qn = ["id"], $n = ["id"], er
|
|
|
1991
1977
|
});
|
|
1992
1978
|
}), Array.from(t);
|
|
1993
1979
|
});
|
|
1994
|
-
let
|
|
1995
|
-
let e =
|
|
1980
|
+
let Dt = _(() => {
|
|
1981
|
+
let e = Ke.value, t = qe.value, n = Number(e), r = Number(t), i = Number.isFinite(n) && n > 0, a = Number.isFinite(r) && r > 0;
|
|
1996
1982
|
return !i && !a ? null : {
|
|
1997
1983
|
width: i ? n : null,
|
|
1998
1984
|
height: a ? r : null
|
|
1999
1985
|
};
|
|
2000
|
-
}),
|
|
1986
|
+
}), Ot = T(R.value.style.chart.zoom.active), { viewBox: kt, resetZoom: At, setInitialViewBox: jt, scale: Mt, zoomByFactor: Nt } = le(W, {
|
|
2001
1987
|
x: 0,
|
|
2002
1988
|
y: 0,
|
|
2003
1989
|
width: 100,
|
|
2004
1990
|
height: 100
|
|
2005
|
-
}, 1,
|
|
1991
|
+
}, 1, Ot, () => {
|
|
2006
1992
|
V.value = !1;
|
|
2007
1993
|
});
|
|
2008
|
-
function
|
|
2009
|
-
|
|
1994
|
+
function Pt() {
|
|
1995
|
+
Ot.value = !Ot.value;
|
|
2010
1996
|
}
|
|
2011
|
-
function
|
|
2012
|
-
let e =
|
|
1997
|
+
function Ft() {
|
|
1998
|
+
let e = K.value && K.value.viewBox;
|
|
2013
1999
|
if (!e) return;
|
|
2014
2000
|
let t = String(e).split(" ").map(Number);
|
|
2015
2001
|
if (t.length !== 4) return;
|
|
2016
2002
|
let [n, r, i, a] = t;
|
|
2017
2003
|
if (!Number.isFinite(n) || !Number.isFinite(r) || !Number.isFinite(i) || !Number.isFinite(a)) return;
|
|
2018
|
-
let o = i, s = a, c = n, l = r, u =
|
|
2019
|
-
u && (u.width !== null && (o = u.width), u.height !== null && (s = u.height), c = n - (o - i) / 2, l = r - (s - a) / 2),
|
|
2004
|
+
let o = i, s = a, c = n, l = r, u = Dt.value;
|
|
2005
|
+
u && (u.width !== null && (o = u.width), u.height !== null && (s = u.height), c = n - (o - i) / 2, l = r - (s - a) / 2), jt({
|
|
2020
2006
|
x: c,
|
|
2021
2007
|
y: l,
|
|
2022
2008
|
width: o,
|
|
2023
2009
|
height: s
|
|
2024
2010
|
}, { overwriteCurrentIfNotZoomed: !0 });
|
|
2025
2011
|
}
|
|
2026
|
-
Oe(() =>
|
|
2027
|
-
|
|
2028
|
-
}, { immediate: !0 }), Oe(() =>
|
|
2029
|
-
|
|
2030
|
-
}), Oe(() =>
|
|
2031
|
-
|
|
2012
|
+
Oe(() => K.value && K.value.viewBox, () => {
|
|
2013
|
+
Ft();
|
|
2014
|
+
}, { immediate: !0 }), Oe(() => Dt.value, () => {
|
|
2015
|
+
Ft();
|
|
2016
|
+
}), Oe(() => U.value, (e) => {
|
|
2017
|
+
Ot.value = !e;
|
|
2032
2018
|
});
|
|
2033
|
-
let
|
|
2034
|
-
let e =
|
|
2019
|
+
let It = _(() => {
|
|
2020
|
+
let e = kt.value;
|
|
2035
2021
|
return e ? `${e.x} ${e.y} ${e.width} ${e.height}` : "0 0 0 0";
|
|
2036
|
-
}),
|
|
2037
|
-
function
|
|
2038
|
-
|
|
2039
|
-
}
|
|
2040
|
-
function Lt() {
|
|
2041
|
-
G.value = !G.value;
|
|
2022
|
+
}), J = T(!1);
|
|
2023
|
+
function Lt(e) {
|
|
2024
|
+
J.value = e, ze.value += 1;
|
|
2042
2025
|
}
|
|
2043
2026
|
function Rt() {
|
|
2044
|
-
|
|
2027
|
+
U.value = !U.value;
|
|
2045
2028
|
}
|
|
2046
2029
|
function zt() {
|
|
2047
|
-
|
|
2030
|
+
Nt(Ar, !0);
|
|
2031
|
+
}
|
|
2032
|
+
function Bt() {
|
|
2033
|
+
Nt(1 / Ar, !0);
|
|
2048
2034
|
}
|
|
2049
|
-
let
|
|
2035
|
+
let Vt = [
|
|
2050
2036
|
"TB",
|
|
2051
2037
|
"RL",
|
|
2052
2038
|
"BT",
|
|
2053
2039
|
"LR"
|
|
2054
2040
|
];
|
|
2055
|
-
function
|
|
2056
|
-
|
|
2057
|
-
}
|
|
2058
|
-
let
|
|
2059
|
-
tooltipRef:
|
|
2060
|
-
isVisibleRef:
|
|
2061
|
-
anchorRef:
|
|
2062
|
-
styleRef:
|
|
2063
|
-
placementRef:
|
|
2041
|
+
function Ht() {
|
|
2042
|
+
G.value = Vt[(Vt.indexOf(G.value) + 1) % Vt.length], At(), j("rotate", G.value);
|
|
2043
|
+
}
|
|
2044
|
+
let Ut = wt({
|
|
2045
|
+
tooltipRef: Ye,
|
|
2046
|
+
isVisibleRef: H,
|
|
2047
|
+
anchorRef: Je,
|
|
2048
|
+
styleRef: Xe,
|
|
2049
|
+
placementRef: B,
|
|
2064
2050
|
isNode: !1
|
|
2065
|
-
}),
|
|
2066
|
-
tooltipRef:
|
|
2051
|
+
}), Wt = wt({
|
|
2052
|
+
tooltipRef: et,
|
|
2067
2053
|
isVisibleRef: V,
|
|
2068
|
-
anchorRef:
|
|
2054
|
+
anchorRef: Ze,
|
|
2069
2055
|
styleRef: tt,
|
|
2070
2056
|
placementRef: nt,
|
|
2071
|
-
offsetRef:
|
|
2072
|
-
}),
|
|
2073
|
-
async function
|
|
2057
|
+
offsetRef: Qe
|
|
2058
|
+
}), Y = T(null);
|
|
2059
|
+
async function Gt(e) {
|
|
2074
2060
|
j("onMidpointEnter", e);
|
|
2075
|
-
let t =
|
|
2061
|
+
let t = W.value;
|
|
2076
2062
|
if (!t || !e?.midpoint) return;
|
|
2077
2063
|
let n = t.createSVGPoint();
|
|
2078
2064
|
n.x = e.midpoint.x, n.y = e.midpoint.y;
|
|
2079
2065
|
let r = t.getScreenCTM();
|
|
2080
2066
|
if (!r) return;
|
|
2081
2067
|
let i = n.matrixTransform(r);
|
|
2082
|
-
|
|
2068
|
+
Je.value = {
|
|
2083
2069
|
x: i.x,
|
|
2084
2070
|
y: i.y
|
|
2085
|
-
}, z.value = e,
|
|
2071
|
+
}, z.value = e, H.value = !0, R.value.style.chart.midpoints.selectedEdge.animated === !0 && (Y.value = e.id, Z()), await be(), Ut();
|
|
2086
2072
|
}
|
|
2087
|
-
function
|
|
2088
|
-
|
|
2073
|
+
function X() {
|
|
2074
|
+
H.value = !1, z.value = null, j("onMidpointLeave"), R.value.style.chart.midpoints.selectedEdge.animated === !0 && (Y.value = null, Z());
|
|
2089
2075
|
}
|
|
2090
|
-
async function
|
|
2076
|
+
async function Kt(e) {
|
|
2091
2077
|
if (j("onNodeClick", e), !R.value.style.chart.nodes.tooltip.showOnClick) return;
|
|
2092
|
-
let t =
|
|
2078
|
+
let t = W.value;
|
|
2093
2079
|
if (!t) return;
|
|
2094
2080
|
let n = t.createSVGPoint();
|
|
2095
2081
|
n.x = e.x, n.y = e.y;
|
|
2096
2082
|
let r = t.getScreenCTM();
|
|
2097
2083
|
if (!r) return;
|
|
2098
2084
|
let i = n.matrixTransform(r), a = R.value.style.chart.layout.nodeWidth, o = R.value.style.chart.layout.nodeHeight, s = r.a, c = r.d, l = a * s, u = o * c;
|
|
2099
|
-
|
|
2085
|
+
Qe.value = {
|
|
2100
2086
|
x: l / 2,
|
|
2101
2087
|
y: u / 2
|
|
2102
|
-
},
|
|
2088
|
+
}, Ze.value = {
|
|
2103
2089
|
x: i.x,
|
|
2104
2090
|
y: i.y
|
|
2105
|
-
},
|
|
2091
|
+
}, $e.value = e, V.value = !0, await be(), Wt();
|
|
2106
2092
|
}
|
|
2107
|
-
function
|
|
2108
|
-
V.value = !1,
|
|
2093
|
+
function qt() {
|
|
2094
|
+
V.value = !1, $e.value = null;
|
|
2109
2095
|
}
|
|
2110
|
-
function
|
|
2111
|
-
if (!(V.value ||
|
|
2112
|
-
let t =
|
|
2096
|
+
function Jt(e) {
|
|
2097
|
+
if (!(V.value || H.value)) return;
|
|
2098
|
+
let t = et.value;
|
|
2113
2099
|
if (t && t.contains(e.target)) return;
|
|
2114
|
-
let n =
|
|
2100
|
+
let n = Ye.value;
|
|
2115
2101
|
if (n && n.contains(e.target)) return;
|
|
2116
|
-
let r =
|
|
2102
|
+
let r = W.value;
|
|
2117
2103
|
if (r && r.contains(e.target)) {
|
|
2118
2104
|
let t = e.target.closest(".vue-ui-dag-node"), n = e.target.closest(".vue-ui-dag-edge-midpoint");
|
|
2119
2105
|
if (t || n) return;
|
|
2120
2106
|
}
|
|
2121
|
-
|
|
2107
|
+
qt(), X(), We.value || On();
|
|
2122
2108
|
}
|
|
2123
|
-
function
|
|
2124
|
-
e.key === "Escape" && (V.value &&
|
|
2109
|
+
function Yt(e) {
|
|
2110
|
+
e.key === "Escape" && (V.value && qt(), H.value && X());
|
|
2125
2111
|
}
|
|
2126
2112
|
we(() => {
|
|
2127
|
-
document.addEventListener("mousedown",
|
|
2113
|
+
document.addEventListener("mousedown", Jt), document.addEventListener("keydown", Yt);
|
|
2128
2114
|
}), Ce(() => {
|
|
2129
|
-
document.removeEventListener("mousedown",
|
|
2115
|
+
document.removeEventListener("mousedown", Jt), document.removeEventListener("keydown", Yt), P.value && (F.value && P.value.unobserve(F.value), P.value.disconnect());
|
|
2130
2116
|
});
|
|
2131
|
-
function
|
|
2117
|
+
function Xt() {
|
|
2132
2118
|
if (!R.value.responsive) {
|
|
2133
2119
|
P.value && (F.value && P.value.unobserve(F.value), P.value.disconnect(), P.value = null, F.value = null);
|
|
2134
2120
|
return;
|
|
@@ -2142,12 +2128,12 @@ var Zn = /* @__PURE__ */ e({ default: () => jr }), Qn = ["id"], $n = ["id"], er
|
|
|
2142
2128
|
source: Ie.value
|
|
2143
2129
|
});
|
|
2144
2130
|
requestAnimationFrame(() => {
|
|
2145
|
-
|
|
2131
|
+
Ke.value = Math.max(.1, e), qe.value = Math.max(.1, t - 12);
|
|
2146
2132
|
});
|
|
2147
2133
|
});
|
|
2148
2134
|
P.value && (F.value && P.value.unobserve(F.value), P.value.disconnect()), P.value = new ResizeObserver(e), F.value = M.value ? M.value.parentNode : null, F.value && P.value.observe(F.value), e();
|
|
2149
2135
|
}
|
|
2150
|
-
function
|
|
2136
|
+
function Zt(e, t = {}) {
|
|
2151
2137
|
let { direction: n = -1, mode: r = "oneLapNearest", dasharray: i = null } = t;
|
|
2152
2138
|
if (!e || typeof e.getTotalLength != "function") return dt.value && console.warn("VueUiDag @getIdealDashoffsetDelta: invalid path element", e), 0;
|
|
2153
2139
|
let a = e.getTotalLength(), o = d(i ?? e.getAttribute("stroke-dasharray") ?? (typeof getComputedStyle == "function" ? getComputedStyle(e).strokeDasharray : ""));
|
|
@@ -2162,26 +2148,26 @@ var Zn = /* @__PURE__ */ e({ default: () => jr }), Qn = ["id"], $n = ["id"], er
|
|
|
2162
2148
|
return t.length % 2 == 1 ? n * 2 : n;
|
|
2163
2149
|
}
|
|
2164
2150
|
}
|
|
2165
|
-
let
|
|
2166
|
-
function
|
|
2151
|
+
let Qt = T(/* @__PURE__ */ new Map()), $t = T(/* @__PURE__ */ new Map());
|
|
2152
|
+
function en(e) {
|
|
2167
2153
|
return function(t) {
|
|
2168
|
-
t ?
|
|
2154
|
+
t ? Qt.value.set(e, t) : Qt.value.delete(e);
|
|
2169
2155
|
};
|
|
2170
2156
|
}
|
|
2171
|
-
function
|
|
2172
|
-
|
|
2157
|
+
function tn() {
|
|
2158
|
+
$t.value.forEach((e) => {
|
|
2173
2159
|
try {
|
|
2174
2160
|
e.cancel();
|
|
2175
2161
|
} catch {}
|
|
2176
|
-
}),
|
|
2162
|
+
}), $t.value.clear();
|
|
2177
2163
|
}
|
|
2178
|
-
function
|
|
2179
|
-
|
|
2180
|
-
let e =
|
|
2164
|
+
function Z() {
|
|
2165
|
+
tn();
|
|
2166
|
+
let e = K.value?.edges ?? [];
|
|
2181
2167
|
if (!e.length) return;
|
|
2182
2168
|
let t = R.value.style.chart.edges.animations, n = Number(t.referenceDistance) > 0 ? Number(t.referenceDistance) : 24;
|
|
2183
2169
|
e.forEach((e) => {
|
|
2184
|
-
let r = R.value.style.chart.midpoints.selectedEdge.animated === !0 &&
|
|
2170
|
+
let r = R.value.style.chart.midpoints.selectedEdge.animated === !0 && Y.value != null && e.id === Y.value, i = !!e?.original?.animated || !!e?.animated || r, a = Qt.value.get(e.id);
|
|
2185
2171
|
if (!a) return;
|
|
2186
2172
|
if (!i) {
|
|
2187
2173
|
a.style.strokeDasharray = "0", a.style.strokeDashoffset = "0";
|
|
@@ -2189,7 +2175,7 @@ var Zn = /* @__PURE__ */ e({ default: () => jr }), Qn = ["id"], $n = ["id"], er
|
|
|
2189
2175
|
}
|
|
2190
2176
|
let o = e?.original?.dasharray ?? t.dasharray;
|
|
2191
2177
|
a.style.strokeDasharray = String(o), a.style.strokeDashoffset = "0";
|
|
2192
|
-
let s = ![void 0, null].includes(e?.original?.animationDirection), c = ![void 0, null].includes(t.animationDirection), l =
|
|
2178
|
+
let s = ![void 0, null].includes(e?.original?.animationDirection), c = ![void 0, null].includes(t.animationDirection), l = Zt(a, {
|
|
2193
2179
|
direction: s ? Number(e.original.animationDirection) : c ? Number(t.animationDirection) : -1,
|
|
2194
2180
|
mode: "oneLapNearest",
|
|
2195
2181
|
dasharray: String(o)
|
|
@@ -2198,16 +2184,16 @@ var Zn = /* @__PURE__ */ e({ default: () => jr }), Qn = ["id"], $n = ["id"], er
|
|
|
2198
2184
|
iterations: Infinity,
|
|
2199
2185
|
easing: "linear"
|
|
2200
2186
|
});
|
|
2201
|
-
|
|
2187
|
+
$t.value.set(e.id, m);
|
|
2202
2188
|
});
|
|
2203
2189
|
}
|
|
2204
|
-
Oe(() =>
|
|
2205
|
-
await be(),
|
|
2190
|
+
Oe(() => K.value && K.value.edges, async () => {
|
|
2191
|
+
await be(), Z();
|
|
2206
2192
|
}, {
|
|
2207
2193
|
deep: !0,
|
|
2208
2194
|
immediate: !0
|
|
2209
2195
|
}), Ce(() => {
|
|
2210
|
-
|
|
2196
|
+
tn();
|
|
2211
2197
|
});
|
|
2212
2198
|
async function nn({ scale: e = 2 } = {}) {
|
|
2213
2199
|
if (!M.value) return;
|
|
@@ -2229,29 +2215,29 @@ var Zn = /* @__PURE__ */ e({ default: () => jr }), Qn = ["id"], $n = ["id"], er
|
|
|
2229
2215
|
let rn = _(() => {
|
|
2230
2216
|
let e = Number(R.value.style.chart.layout.nodeHeight);
|
|
2231
2217
|
return Number.isFinite(e) && e > 0 ? e / R.value.style.chart.backgroundPattern.spacingRatio : 12;
|
|
2232
|
-
}), an = _(() => rn.value * (R.value.style.chart.backgroundPattern.dotRadiusRatio / 100)),
|
|
2218
|
+
}), an = _(() => rn.value * (R.value.style.chart.backgroundPattern.dotRadiusRatio / 100)), Q = T(null), on = null, sn = 0;
|
|
2233
2219
|
function cn(e) {
|
|
2234
|
-
on &&= (clearTimeout(on), null),
|
|
2220
|
+
on &&= (clearTimeout(on), null), Q.value !== e && (Q.value = e, (R.value.style.chart.nodes.selected.downstreamEdges.animated === !0 || R.value.style.chart.nodes.selected.upstreamEdges.animated === !0) && Z());
|
|
2235
2221
|
}
|
|
2236
2222
|
function ln(e) {
|
|
2237
|
-
|
|
2223
|
+
Ue.value = "pointer", Y.value = null, cn(e);
|
|
2238
2224
|
}
|
|
2239
2225
|
async function un(e) {
|
|
2240
|
-
|
|
2226
|
+
Ue.value = "pointer", Q.value = null, await Gt(e);
|
|
2241
2227
|
}
|
|
2242
2228
|
function dn(e) {
|
|
2243
2229
|
let t = ++sn;
|
|
2244
2230
|
on && clearTimeout(on), on = setTimeout(() => {
|
|
2245
|
-
t === sn &&
|
|
2231
|
+
t === sn && Q.value === e && (Q.value = null, (R.value.style.chart.nodes.selected.downstreamEdges.animated === !0 || R.value.style.chart.nodes.selected.upstreamEdges.animated === !0) && Z());
|
|
2246
2232
|
}, 20);
|
|
2247
2233
|
}
|
|
2248
2234
|
function fn(e) {
|
|
2249
|
-
let t = e.from ===
|
|
2250
|
-
return i && R.value.style.chart.midpoints.selectedEdge.stroke != null ? a = R.value.style.chart.midpoints.selectedEdge.stroke : t && R.value.style.chart.nodes.selected.downstreamEdges.stroke != null ? a = R.value.style.chart.nodes.selected.downstreamEdges.stroke : n && R.value.style.chart.nodes.selected.upstreamEdges.stroke != null && (a = R.value.style.chart.nodes.selected.upstreamEdges.stroke), e.animated = t && R.value.style.chart.nodes.selected.downstreamEdges.animated === !0 || n && R.value.style.chart.nodes.selected.upstreamEdges.animated === !0 || r && R.value.style.chart.midpoints.selectedEdge.animated === !0 ? !0 : (
|
|
2235
|
+
let t = e.from === Q.value, n = e.to === Q.value, r = L.value === "midpoint" && I.value === e.id, i = Y.value === e.id || z.value?.id === e.id || r, a = e.original.color ?? R.value.style.chart.edges.stroke;
|
|
2236
|
+
return i && R.value.style.chart.midpoints.selectedEdge.stroke != null ? a = R.value.style.chart.midpoints.selectedEdge.stroke : t && R.value.style.chart.nodes.selected.downstreamEdges.stroke != null ? a = R.value.style.chart.nodes.selected.downstreamEdges.stroke : n && R.value.style.chart.nodes.selected.upstreamEdges.stroke != null && (a = R.value.style.chart.nodes.selected.upstreamEdges.stroke), e.animated = t && R.value.style.chart.nodes.selected.downstreamEdges.animated === !0 || n && R.value.style.chart.nodes.selected.upstreamEdges.animated === !0 || r && R.value.style.chart.midpoints.selectedEdge.animated === !0 ? !0 : (K.value?.edges.find((t) => t.id === e.id))?.original?.animated ?? !1, {
|
|
2251
2237
|
d: e.pathData,
|
|
2252
2238
|
fill: "none",
|
|
2253
2239
|
stroke: a,
|
|
2254
|
-
"stroke-width": R.value.style.chart.edges.strokeWidth * (i || e.from ===
|
|
2240
|
+
"stroke-width": R.value.style.chart.edges.strokeWidth * (i || e.from === Q.value ? 2 : 1),
|
|
2255
2241
|
"stroke-linecap": "round",
|
|
2256
2242
|
"stroke-linejoin": "round"
|
|
2257
2243
|
};
|
|
@@ -2260,7 +2246,7 @@ var Zn = /* @__PURE__ */ e({ default: () => jr }), Qn = ["id"], $n = ["id"], er
|
|
|
2260
2246
|
return L.value === "node" && I.value === e;
|
|
2261
2247
|
}
|
|
2262
2248
|
function mn(e) {
|
|
2263
|
-
let t =
|
|
2249
|
+
let t = Q.value === e.id, n = L.value === "node" && I.value === e.id, r = t || n, i = r && R.value.style.chart.nodes.selected.backgroundColor != null ? R.value.style.chart.nodes.selected.backgroundColor : e.original.backgroundColor, a = r && R.value.style.chart.nodes.selected.stroke != null ? R.value.style.chart.nodes.selected.stroke : R.value.style.chart.nodes.stroke, o = r && R.value.style.chart.nodes.selected.strokeWidth != null ? R.value.style.chart.nodes.selected.strokeWidth : R.value.style.chart.nodes.strokeWidth;
|
|
2264
2250
|
return {
|
|
2265
2251
|
x: e.x - e.width / 2,
|
|
2266
2252
|
y: e.y - e.height / 2,
|
|
@@ -2273,38 +2259,27 @@ var Zn = /* @__PURE__ */ e({ default: () => jr }), Qn = ["id"], $n = ["id"], er
|
|
|
2273
2259
|
};
|
|
2274
2260
|
}
|
|
2275
2261
|
function hn(e) {
|
|
2276
|
-
let t = e.from ===
|
|
2262
|
+
let t = e.from === Q.value, n = e.to === Q.value, r = L.value === "midpoint" && I.value === e.id, i = Y.value === e.id || z.value?.id === e.id || r, a = e.original.color ?? R.value.style.chart.edges.stroke;
|
|
2277
2263
|
return i && R.value.style.chart.midpoints.selectedEdge.stroke != null ? a = R.value.style.chart.midpoints.selectedEdge.stroke : t && R.value.style.chart.nodes.selected.downstreamEdges.stroke != null ? a = R.value.style.chart.nodes.selected.downstreamEdges.stroke : n && R.value.style.chart.nodes.selected.upstreamEdges.stroke != null && (a = R.value.style.chart.nodes.selected.upstreamEdges.stroke), {
|
|
2278
|
-
cx: e
|
|
2279
|
-
cy: e
|
|
2264
|
+
cx: e?.midpoint?.x,
|
|
2265
|
+
cy: e?.midpoint?.y,
|
|
2280
2266
|
r: R.value.style.chart.midpoints.radius,
|
|
2281
2267
|
fill: r ? R.value.style.chart.midpoints.selectedEdge.stroke ?? R.value.style.chart.midpoints.fill : R.value.style.chart.midpoints.fill,
|
|
2282
2268
|
stroke: a,
|
|
2283
|
-
"stroke-width": R.value.style.chart.edges.strokeWidth * (i || e.from ===
|
|
2269
|
+
"stroke-width": R.value.style.chart.edges.strokeWidth * (i || e.from === Q.value ? 2 : 1)
|
|
2284
2270
|
};
|
|
2285
2271
|
}
|
|
2286
2272
|
function gn(e) {
|
|
2287
|
-
let t = e.from ===
|
|
2273
|
+
let t = e.from === Q.value, n = e.to === Q.value, r = L.value === "midpoint" && I.value === e.id, i = Y.value === e.id || z.value?.id === e.id || r, a = e.color ?? e.original?.color ?? R.value.style.chart.edges.stroke;
|
|
2288
2274
|
return i && R.value.style.chart.midpoints.selectedEdge.stroke != null ? a = R.value.style.chart.midpoints.selectedEdge.stroke : t && R.value.style.chart.nodes.selected.downstreamEdges.stroke != null ? a = R.value.style.chart.nodes.selected.downstreamEdges.stroke : n && R.value.style.chart.nodes.selected.upstreamEdges.stroke != null && (a = R.value.style.chart.nodes.selected.upstreamEdges.stroke), a;
|
|
2289
2275
|
}
|
|
2290
2276
|
function _n(e) {
|
|
2291
|
-
return `${
|
|
2277
|
+
return `${Et}-${String(e).replace(/[^a-zA-Z0-9_-]/g, "_")}`;
|
|
2292
2278
|
}
|
|
2293
2279
|
function vn() {
|
|
2294
|
-
return
|
|
2295
|
-
}
|
|
2296
|
-
function yn(e) {
|
|
2297
|
-
if (e?.stage === "start") {
|
|
2298
|
-
He.value = !0;
|
|
2299
|
-
return;
|
|
2300
|
-
}
|
|
2301
|
-
if (e?.stage === "end") {
|
|
2302
|
-
He.value = !1;
|
|
2303
|
-
return;
|
|
2304
|
-
}
|
|
2305
|
-
mt();
|
|
2280
|
+
return K.value;
|
|
2306
2281
|
}
|
|
2307
|
-
async function
|
|
2282
|
+
async function yn() {
|
|
2308
2283
|
if (j("copyAlt", {
|
|
2309
2284
|
config: R.value,
|
|
2310
2285
|
dataset: ct.value
|
|
@@ -2317,27 +2292,27 @@ var Zn = /* @__PURE__ */ e({ default: () => jr }), Qn = ["id"], $n = ["id"], er
|
|
|
2317
2292
|
dataset: ct.value
|
|
2318
2293
|
}));
|
|
2319
2294
|
}
|
|
2320
|
-
let
|
|
2295
|
+
let bn = _(() => (K.value?.nodes ?? []).map((e) => ({
|
|
2321
2296
|
id: e.id,
|
|
2322
2297
|
type: "node",
|
|
2323
2298
|
x: e.x,
|
|
2324
2299
|
y: e.y,
|
|
2325
2300
|
label: e.label ?? e.id,
|
|
2326
2301
|
raw: e
|
|
2327
|
-
}))),
|
|
2302
|
+
}))), xn = _(() => R.value.style.chart.midpoints.show ? (K.value?.edges ?? []).filter((e) => e?.midpoint).map((e) => ({
|
|
2328
2303
|
id: e.id,
|
|
2329
2304
|
type: "midpoint",
|
|
2330
2305
|
x: e.midpoint.x,
|
|
2331
2306
|
y: e.midpoint.y,
|
|
2332
|
-
label: `${
|
|
2307
|
+
label: `${q(e.from)?.label ?? e.from} → ${q(e.to)?.label ?? e.to}`,
|
|
2333
2308
|
raw: e
|
|
2334
|
-
})) : []),
|
|
2309
|
+
})) : []), $ = _(() => [...bn.value, ...xn.value].sort((e, t) => e.x === t.x ? e.y - t.y : e.x - t.x)), Sn = _(() => {
|
|
2335
2310
|
let e = /* @__PURE__ */ new Map();
|
|
2336
|
-
return
|
|
2311
|
+
return $.value.forEach((t, n) => {
|
|
2337
2312
|
e.set(`${t.type}:${t.id}`, n);
|
|
2338
2313
|
}), e;
|
|
2339
|
-
}),
|
|
2340
|
-
let e =
|
|
2314
|
+
}), Cn = _(() => {
|
|
2315
|
+
let e = K.value?.nodes ?? [], t = K.value?.edges ?? [];
|
|
2341
2316
|
return {
|
|
2342
2317
|
headers: [
|
|
2343
2318
|
R.value.a11y?.translations?.node ?? "Node",
|
|
@@ -2345,7 +2320,7 @@ var Zn = /* @__PURE__ */ e({ default: () => jr }), Qn = ["id"], $n = ["id"], er
|
|
|
2345
2320
|
R.value.a11y?.translations?.children ?? "Children"
|
|
2346
2321
|
],
|
|
2347
2322
|
rows: e.map((e) => {
|
|
2348
|
-
let n = t.filter((t) => t.to === e.id).map((e) =>
|
|
2323
|
+
let n = t.filter((t) => t.to === e.id).map((e) => q(e.from)?.label ?? e.from).join(", "), r = t.filter((t) => t.from === e.id).map((e) => q(e.to)?.label ?? e.to).join(", ");
|
|
2349
2324
|
return [
|
|
2350
2325
|
e.label ?? e.id,
|
|
2351
2326
|
n || "—",
|
|
@@ -2354,93 +2329,93 @@ var Zn = /* @__PURE__ */ e({ default: () => jr }), Qn = ["id"], $n = ["id"], er
|
|
|
2354
2329
|
})
|
|
2355
2330
|
};
|
|
2356
2331
|
});
|
|
2357
|
-
function
|
|
2332
|
+
function wn(e) {
|
|
2358
2333
|
return `${e.type}:${e.id}`;
|
|
2359
2334
|
}
|
|
2360
|
-
function
|
|
2361
|
-
return I.value == null || L.value == null ? null :
|
|
2335
|
+
function Tn() {
|
|
2336
|
+
return I.value == null || L.value == null ? null : $.value.find((e) => e.id === I.value && e.type === L.value) ?? null;
|
|
2362
2337
|
}
|
|
2363
|
-
async function
|
|
2338
|
+
async function En(e) {
|
|
2364
2339
|
if (e) {
|
|
2365
2340
|
if (e.type === "node") {
|
|
2366
|
-
|
|
2341
|
+
X();
|
|
2367
2342
|
return;
|
|
2368
2343
|
}
|
|
2369
|
-
e.type === "midpoint" && (
|
|
2344
|
+
e.type === "midpoint" && (qt(), await Gt(e.raw));
|
|
2370
2345
|
}
|
|
2371
2346
|
}
|
|
2372
|
-
function
|
|
2347
|
+
function Dn(e) {
|
|
2373
2348
|
if (e) {
|
|
2374
|
-
if (I.value = e.id, L.value = e.type,
|
|
2375
|
-
cn(e.id),
|
|
2349
|
+
if (I.value = e.id, L.value = e.type, He.value = Sn.value.get(wn(e)) ?? null, e.type === "node") {
|
|
2350
|
+
cn(e.id), Y.value = null;
|
|
2376
2351
|
return;
|
|
2377
2352
|
}
|
|
2378
|
-
e.type === "midpoint" && (
|
|
2353
|
+
e.type === "midpoint" && (Q.value = null, Y.value = e.id, R.value.style.chart.midpoints.selectedEdge.animated === !0 && Z());
|
|
2379
2354
|
}
|
|
2380
2355
|
}
|
|
2381
|
-
function
|
|
2382
|
-
I.value = null, L.value = null,
|
|
2356
|
+
function On() {
|
|
2357
|
+
I.value = null, L.value = null, He.value = null, V.value || (Q.value = null), H.value || (Y.value = null, R.value.style.chart.midpoints.selectedEdge.animated === !0 && Z());
|
|
2383
2358
|
}
|
|
2384
|
-
function
|
|
2385
|
-
|
|
2359
|
+
function kn() {
|
|
2360
|
+
We.value = !0, On();
|
|
2386
2361
|
}
|
|
2387
|
-
function
|
|
2388
|
-
|
|
2362
|
+
function An() {
|
|
2363
|
+
We.value = !1, qt(), X(), On();
|
|
2389
2364
|
}
|
|
2390
|
-
function
|
|
2365
|
+
function jn(e, t, n) {
|
|
2391
2366
|
let r = t.x - e.x, i = t.y - e.y;
|
|
2392
2367
|
return n === "right" && r <= 0 || n === "left" && r >= 0 || n === "down" && i <= 0 || n === "up" && i >= 0 ? Infinity : n === "right" || n === "left" ? Math.abs(r) * 1e3 + Math.abs(i) : Math.abs(i) * 1e3 + Math.abs(r);
|
|
2393
2368
|
}
|
|
2394
|
-
function
|
|
2395
|
-
let n =
|
|
2369
|
+
function Mn(e, t) {
|
|
2370
|
+
let n = $.value.filter((t) => wn(t) !== wn(e));
|
|
2396
2371
|
if (!n.length) return null;
|
|
2397
2372
|
let r = null, i = Infinity;
|
|
2398
2373
|
return n.forEach((n) => {
|
|
2399
|
-
let a =
|
|
2374
|
+
let a = jn(e, n, t);
|
|
2400
2375
|
a < i && (i = a, r = n);
|
|
2401
|
-
}), r || (t === "right" || t === "down" ?
|
|
2376
|
+
}), r || (t === "right" || t === "down" ? $.value[0] ?? null : $.value[$.value.length - 1] ?? null);
|
|
2402
2377
|
}
|
|
2403
|
-
async function
|
|
2404
|
-
e && (
|
|
2378
|
+
async function Nn(e) {
|
|
2379
|
+
e && (Ue.value = "keyboard", e.type === "node" && (X(), await Kt(e.raw)));
|
|
2405
2380
|
}
|
|
2406
|
-
async function
|
|
2407
|
-
if (!
|
|
2381
|
+
async function Pn(e) {
|
|
2382
|
+
if (!W.value || U.value || document.activeElement !== W.value || !$.value.length) return;
|
|
2408
2383
|
let t = e.key === "ArrowLeft", n = e.key === "ArrowRight", r = e.key === "ArrowUp", i = e.key === "ArrowDown", a = e.key === "Enter" || e.key === " ", o = e.key === "Escape";
|
|
2409
2384
|
if (!t && !n && !r && !i && !a && !o) return;
|
|
2410
2385
|
if (e.preventDefault(), e.stopPropagation(), o) {
|
|
2411
|
-
|
|
2386
|
+
qt(), X(), On();
|
|
2412
2387
|
return;
|
|
2413
2388
|
}
|
|
2414
|
-
let s =
|
|
2389
|
+
let s = Tn();
|
|
2415
2390
|
if (a) {
|
|
2416
2391
|
if (!s) return;
|
|
2417
|
-
s.type === "node" && await
|
|
2392
|
+
s.type === "node" && await Nn(s);
|
|
2418
2393
|
return;
|
|
2419
2394
|
}
|
|
2420
2395
|
if (!s) {
|
|
2421
|
-
let e =
|
|
2396
|
+
let e = $.value[0];
|
|
2422
2397
|
if (!e) return;
|
|
2423
|
-
|
|
2398
|
+
Dn(e), await En(e);
|
|
2424
2399
|
return;
|
|
2425
2400
|
}
|
|
2426
2401
|
let c = null;
|
|
2427
|
-
n ? c =
|
|
2402
|
+
n ? c = Mn(s, "right") : t ? c = Mn(s, "left") : i ? c = Mn(s, "down") : r && (c = Mn(s, "up")), c && (qt(), X(), Dn(c), await En(c));
|
|
2428
2403
|
}
|
|
2429
2404
|
return i({
|
|
2430
2405
|
getData: vn,
|
|
2431
2406
|
getImage: nn,
|
|
2432
|
-
generatePdf:
|
|
2433
|
-
generateSvg:
|
|
2434
|
-
generateImage:
|
|
2435
|
-
toggleAnnotator:
|
|
2436
|
-
toggleFullscreen:
|
|
2437
|
-
zoomIn:
|
|
2438
|
-
zoomOut:
|
|
2439
|
-
resetZoom:
|
|
2440
|
-
switchDirection:
|
|
2441
|
-
copyAlt:
|
|
2407
|
+
generatePdf: mt,
|
|
2408
|
+
generateSvg: bt,
|
|
2409
|
+
generateImage: ht,
|
|
2410
|
+
toggleAnnotator: Rt,
|
|
2411
|
+
toggleFullscreen: Lt,
|
|
2412
|
+
zoomIn: zt,
|
|
2413
|
+
zoomOut: Bt,
|
|
2414
|
+
resetZoom: At,
|
|
2415
|
+
switchDirection: Ht,
|
|
2416
|
+
copyAlt: yn
|
|
2442
2417
|
}), (e, t) => (w(), b("div", {
|
|
2443
|
-
class: xe(`vue-data-ui-component vue-ui-dag ${
|
|
2418
|
+
class: xe(`vue-data-ui-component vue-ui-dag ${J.value ? "vue-data-ui-wrapper-fullscreen" : ""} ${R.value.responsive ? "vue-ui-dag-responsive" : ""}`),
|
|
2444
2419
|
id: `dag_${N.value}`,
|
|
2445
2420
|
ref_key: "dagChart",
|
|
2446
2421
|
ref: M,
|
|
@@ -2449,18 +2424,18 @@ var Zn = /* @__PURE__ */ e({ default: () => jr }), Qn = ["id"], $n = ["id"], er
|
|
|
2449
2424
|
backgroundColor: R.value.style.chart.backgroundColor,
|
|
2450
2425
|
padding: "0.5rem"
|
|
2451
2426
|
}),
|
|
2452
|
-
onMouseenter:
|
|
2453
|
-
onMouseleave:
|
|
2427
|
+
onMouseenter: St,
|
|
2428
|
+
onMouseleave: Ct
|
|
2454
2429
|
}, [
|
|
2455
2430
|
x("div", {
|
|
2456
2431
|
id: `chart-instructions-${N.value}`,
|
|
2457
2432
|
class: "sr-only"
|
|
2458
2433
|
}, [x("p", null, Ee(R.value.a11y.translations.keyboardNavigation), 1)], 8, $n),
|
|
2459
|
-
|
|
2434
|
+
Cn.value?.rows?.length ? (w(), v(oe, {
|
|
2460
2435
|
key: 0,
|
|
2461
2436
|
uid: N.value,
|
|
2462
|
-
head:
|
|
2463
|
-
body:
|
|
2437
|
+
head: Cn.value.headers,
|
|
2438
|
+
body: Cn.value.rows,
|
|
2464
2439
|
notice: R.value.a11y.translations.tableAvailable,
|
|
2465
2440
|
caption: R.value.a11y.translations.tableCaption
|
|
2466
2441
|
}, null, 8, [
|
|
@@ -2470,15 +2445,15 @@ var Zn = /* @__PURE__ */ e({ default: () => jr }), Qn = ["id"], $n = ["id"], er
|
|
|
2470
2445
|
"notice",
|
|
2471
2446
|
"caption"
|
|
2472
2447
|
])) : y("", !0),
|
|
2473
|
-
D(
|
|
2448
|
+
D(Tt) ? (w(), b("div", er, Ee(String(D(Tt))), 1)) : y("", !0),
|
|
2474
2449
|
R.value.userOptions.buttons.annotator ? (w(), v(D(ke), {
|
|
2475
2450
|
key: 2,
|
|
2476
|
-
svgRef: D(
|
|
2451
|
+
svgRef: D(W),
|
|
2477
2452
|
backgroundColor: R.value.style.chart.backgroundColor,
|
|
2478
2453
|
color: R.value.style.chart.color,
|
|
2479
|
-
active:
|
|
2480
|
-
isCursorPointer:
|
|
2481
|
-
onClose:
|
|
2454
|
+
active: U.value,
|
|
2455
|
+
isCursorPointer: Ge.value,
|
|
2456
|
+
onClose: Rt
|
|
2482
2457
|
}, {
|
|
2483
2458
|
"annotator-action-close": O(() => [E(e.$slots, "annotator-action-close", {}, void 0, !0)]),
|
|
2484
2459
|
"annotator-action-color": O(({ color: t }) => [E(e.$slots, "annotator-action-color", C(S({ color: t })), void 0, !0)]),
|
|
@@ -2500,7 +2475,7 @@ var Zn = /* @__PURE__ */ e({ default: () => jr }), Qn = ["id"], $n = ["id"], er
|
|
|
2500
2475
|
backgroundColor: R.value.style.chart.backgroundColor,
|
|
2501
2476
|
color: R.value.style.chart.color,
|
|
2502
2477
|
isPrinting: D(ft),
|
|
2503
|
-
isImaging: D(
|
|
2478
|
+
isImaging: D(pt),
|
|
2504
2479
|
uid: N.value,
|
|
2505
2480
|
hasTooltip: !1,
|
|
2506
2481
|
hasTable: !1,
|
|
@@ -2511,24 +2486,24 @@ var Zn = /* @__PURE__ */ e({ default: () => jr }), Qn = ["id"], $n = ["id"], er
|
|
|
2511
2486
|
hasSvg: R.value.userOptions.buttons.svg,
|
|
2512
2487
|
hasFullscreen: R.value.userOptions.buttons.fullscreen,
|
|
2513
2488
|
hasAltCopy: R.value.userOptions.buttons.altCopy,
|
|
2514
|
-
isFullscreen:
|
|
2489
|
+
isFullscreen: J.value,
|
|
2515
2490
|
chartElement: M.value,
|
|
2516
2491
|
position: R.value.userOptions.position,
|
|
2517
2492
|
titles: { ...R.value.userOptions.buttonTitles },
|
|
2518
2493
|
hasAnnotator: R.value.userOptions.buttons.annotator,
|
|
2519
|
-
isAnnotation:
|
|
2494
|
+
isAnnotation: U.value,
|
|
2520
2495
|
callbacks: R.value.userOptions.callbacks,
|
|
2521
2496
|
printScale: R.value.userOptions.print.scale,
|
|
2522
2497
|
hasZoom: R.value.userOptions.buttons.zoom,
|
|
2523
|
-
isZoom:
|
|
2524
|
-
isCursorPointer:
|
|
2525
|
-
onToggleFullscreen:
|
|
2526
|
-
onGeneratePdf: D(
|
|
2527
|
-
onGenerateImage:
|
|
2528
|
-
onGenerateSvg:
|
|
2529
|
-
onToggleAnnotator:
|
|
2530
|
-
onToggleZoom:
|
|
2531
|
-
onCopyAlt:
|
|
2498
|
+
isZoom: Ot.value,
|
|
2499
|
+
isCursorPointer: Ge.value,
|
|
2500
|
+
onToggleFullscreen: Lt,
|
|
2501
|
+
onGeneratePdf: D(mt),
|
|
2502
|
+
onGenerateImage: D(xt),
|
|
2503
|
+
onGenerateSvg: D(bt),
|
|
2504
|
+
onToggleAnnotator: Rt,
|
|
2505
|
+
onToggleZoom: Pt,
|
|
2506
|
+
onCopyAlt: yn,
|
|
2532
2507
|
style: Se({ visibility: D(at) ? D(rt) ? "visible" : "hidden" : "visible" })
|
|
2533
2508
|
}, he({ _: 2 }, [
|
|
2534
2509
|
e.$slots.menuIcon ? {
|
|
@@ -2616,6 +2591,8 @@ var Zn = /* @__PURE__ */ e({ default: () => jr }), Qn = ["id"], $n = ["id"], er
|
|
|
2616
2591
|
"isZoom",
|
|
2617
2592
|
"isCursorPointer",
|
|
2618
2593
|
"onGeneratePdf",
|
|
2594
|
+
"onGenerateImage",
|
|
2595
|
+
"onGenerateSvg",
|
|
2619
2596
|
"style"
|
|
2620
2597
|
])) : y("", !0),
|
|
2621
2598
|
R.value.style.chart.title.text ? (w(), b("div", {
|
|
@@ -2641,27 +2618,27 @@ var Zn = /* @__PURE__ */ e({ default: () => jr }), Qn = ["id"], $n = ["id"], er
|
|
|
2641
2618
|
ref_key: "zoomControls",
|
|
2642
2619
|
ref: Le,
|
|
2643
2620
|
config: R.value,
|
|
2644
|
-
scale: D(
|
|
2645
|
-
isFullscreen:
|
|
2621
|
+
scale: D(Mt),
|
|
2622
|
+
isFullscreen: J.value,
|
|
2646
2623
|
withDirection: "",
|
|
2647
|
-
onZoomIn:
|
|
2648
|
-
onZoomOut:
|
|
2649
|
-
onResetZoom: t[0] ||= () => D(
|
|
2650
|
-
onSwitchDirection:
|
|
2624
|
+
onZoomIn: zt,
|
|
2625
|
+
onZoomOut: Bt,
|
|
2626
|
+
onResetZoom: t[0] ||= () => D(At)(!0),
|
|
2627
|
+
onSwitchDirection: Ht
|
|
2651
2628
|
}, null, 8, [
|
|
2652
2629
|
"config",
|
|
2653
2630
|
"scale",
|
|
2654
2631
|
"isFullscreen"
|
|
2655
2632
|
])) : y("", !0),
|
|
2656
|
-
x("div", tr, [D(
|
|
2633
|
+
x("div", tr, [D(K) ? (w(), b("svg", {
|
|
2657
2634
|
key: 0,
|
|
2658
2635
|
ref_key: "svgRef",
|
|
2659
|
-
ref:
|
|
2636
|
+
ref: W,
|
|
2660
2637
|
class: xe({
|
|
2661
2638
|
"vue-ui-dag-svg": !0,
|
|
2662
2639
|
"vue-data-ui-loading": D(st)
|
|
2663
2640
|
}),
|
|
2664
|
-
viewBox:
|
|
2641
|
+
viewBox: It.value,
|
|
2665
2642
|
xmlns: D(s),
|
|
2666
2643
|
style: Se({
|
|
2667
2644
|
backgroundColor: R.value.style.chart.backgroundColor,
|
|
@@ -2670,9 +2647,9 @@ var Zn = /* @__PURE__ */ e({ default: () => jr }), Qn = ["id"], $n = ["id"], er
|
|
|
2670
2647
|
}),
|
|
2671
2648
|
tabindex: "0",
|
|
2672
2649
|
"aria-describedby": `chart-instructions-${N.value}`,
|
|
2673
|
-
onFocus:
|
|
2674
|
-
onBlur:
|
|
2675
|
-
onKeydown:
|
|
2650
|
+
onFocus: kn,
|
|
2651
|
+
onBlur: An,
|
|
2652
|
+
onKeydown: Pn
|
|
2676
2653
|
}, [
|
|
2677
2654
|
_e(D(Me)),
|
|
2678
2655
|
R.value.style.chart.backgroundPattern.show ? (w(), b("defs", rr, [x("pattern", {
|
|
@@ -2692,44 +2669,44 @@ var Zn = /* @__PURE__ */ e({ default: () => jr }), Qn = ["id"], $n = ["id"], er
|
|
|
2692
2669
|
}, null, 8, ar)], !0)], 8, ir)])) : y("", !0),
|
|
2693
2670
|
R.value.style.chart.backgroundPattern.show ? (w(), b("rect", {
|
|
2694
2671
|
key: 1,
|
|
2695
|
-
x: D(
|
|
2696
|
-
y: D(
|
|
2697
|
-
width: D(
|
|
2698
|
-
height: D(
|
|
2672
|
+
x: D(kt)?.x ?? 0,
|
|
2673
|
+
y: D(kt)?.y ?? 0,
|
|
2674
|
+
width: D(kt)?.width ?? 0,
|
|
2675
|
+
height: D(kt)?.height ?? 0,
|
|
2699
2676
|
fill: `url(#dag_bg_pattern_${N.value})`,
|
|
2700
2677
|
style: Se({
|
|
2701
2678
|
pointerEvents: "none",
|
|
2702
2679
|
opacity: R.value.style.chart.backgroundPattern.opacity
|
|
2703
2680
|
})
|
|
2704
2681
|
}, null, 12, or)) : y("", !0),
|
|
2705
|
-
D(
|
|
2682
|
+
D(K).arrowShape === "undirected" ? y("", !0) : (w(), b("defs", sr, [(w(!0), b(fe, null, Te(D(K).edges, (e) => (w(), b("marker", {
|
|
2706
2683
|
key: `marker_${e.id}`,
|
|
2707
2684
|
id: _n(e.id),
|
|
2708
|
-
markerWidth: D(
|
|
2709
|
-
markerHeight: D(
|
|
2710
|
-
refX: D(
|
|
2711
|
-
refY: D(
|
|
2685
|
+
markerWidth: D(K).arrowSize,
|
|
2686
|
+
markerHeight: D(K).arrowSize,
|
|
2687
|
+
refX: D(K).arrowSize - 3,
|
|
2688
|
+
refY: D(K).arrowSize / 2,
|
|
2712
2689
|
orient: "auto",
|
|
2713
2690
|
markerUnits: "strokeWidth"
|
|
2714
|
-
}, [D(
|
|
2691
|
+
}, [D(K).arrowShape === "normal" ? (w(), b("path", {
|
|
2715
2692
|
key: 0,
|
|
2716
|
-
d: `M 0 0 L ${D(
|
|
2693
|
+
d: `M 0 0 L ${D(K).arrowSize} ${D(K).arrowSize / 2} L 0 ${D(K).arrowSize} Z`,
|
|
2717
2694
|
fill: gn(e),
|
|
2718
2695
|
stroke: gn(e),
|
|
2719
2696
|
"stroke-width": "0",
|
|
2720
2697
|
style: { transition: "stroke 0.2s ease-in-out,\n fill 0.2s ease-in-out,\n stroke-width 0.2s ease-in-out" }
|
|
2721
2698
|
}, null, 8, lr)) : (w(), b("path", {
|
|
2722
2699
|
key: 1,
|
|
2723
|
-
d: `M 0 0 L ${D(
|
|
2700
|
+
d: `M 0 0 L ${D(K).arrowSize} ${D(K).arrowSize / 2} L 0 ${D(K).arrowSize} L ${D(K).arrowSize / 3} ${D(K).arrowSize / 2} Z`,
|
|
2724
2701
|
fill: gn(e),
|
|
2725
2702
|
stroke: gn(e),
|
|
2726
2703
|
"stroke-width": "0",
|
|
2727
2704
|
style: { transition: "stroke 0.2s ease-in-out,\n fill 0.2s ease-in-out,\n stroke-width 0.2s ease-in-out" }
|
|
2728
2705
|
}, null, 8, ur))], 8, cr))), 128))])),
|
|
2729
|
-
x("g", dr, [(w(!0), b(fe, null, Te(D(
|
|
2706
|
+
x("g", dr, [(w(!0), b(fe, null, Te(D(K).edges, (e) => (w(), b(fe, { key: e.id }, [x("path", ye({
|
|
2730
2707
|
"data-cy-edge": "",
|
|
2731
2708
|
ref_for: !0,
|
|
2732
|
-
ref:
|
|
2709
|
+
ref: en(e.id)
|
|
2733
2710
|
}, { ref_for: !0 }, fn(e), { style: {
|
|
2734
2711
|
"pointer-events": "none",
|
|
2735
2712
|
transition: "stroke-width 0.2s ease-in-out,\n stroke 0.2s ease-in-out"
|
|
@@ -2739,15 +2716,15 @@ var Zn = /* @__PURE__ */ e({ default: () => jr }), Qn = ["id"], $n = ["id"], er
|
|
|
2739
2716
|
class: "vue-ui-dag-edge-midpoint",
|
|
2740
2717
|
"data-a11y-midpoint-id": e.id
|
|
2741
2718
|
}, { ref_for: !0 }, hn(e), {
|
|
2742
|
-
"aria-label": `${
|
|
2719
|
+
"aria-label": `${q(e.from)?.label ?? e.from} to ${q(e.to)?.label ?? e.to}`,
|
|
2743
2720
|
style: { transition: "stroke-width 0.2s ease-in-out,\n stroke 0.2s ease-in-out,\n fill 0.2s ease-in-out" },
|
|
2744
2721
|
onMouseenter: (t) => un(e),
|
|
2745
|
-
onMouseleave:
|
|
2722
|
+
onMouseleave: X
|
|
2746
2723
|
}), null, 16, fr)) : y("", !0)], 64))), 128))]),
|
|
2747
|
-
x("g", pr, [(w(!0), b(fe, null, Te(D(
|
|
2724
|
+
x("g", pr, [(w(!0), b(fe, null, Te(D(K).nodes, (t) => (w(), b("g", {
|
|
2748
2725
|
key: t.id,
|
|
2749
2726
|
class: "vue-ui-dag-node",
|
|
2750
|
-
onClick: Ae((e) => R.value.style.chart.nodes.tooltip.showOnClick &&
|
|
2727
|
+
onClick: Ae((e) => R.value.style.chart.nodes.tooltip.showOnClick && Kt(t), ["stop"]),
|
|
2751
2728
|
onMouseenter: (e) => ln(t.id),
|
|
2752
2729
|
onMouseleave: (e) => dn(t.id)
|
|
2753
2730
|
}, [e.$slots.node ? y("", !0) : (w(), b("rect", ye({
|
|
@@ -2757,7 +2734,7 @@ var Zn = /* @__PURE__ */ e({ default: () => jr }), Qn = ["id"], $n = ["id"], er
|
|
|
2757
2734
|
"data-a11y-node-id": t.id,
|
|
2758
2735
|
"aria-label": `${t.label ?? t.id}`,
|
|
2759
2736
|
style: {
|
|
2760
|
-
cursor: R.value.style.chart.nodes.tooltip.showOnClick &&
|
|
2737
|
+
cursor: R.value.style.chart.nodes.tooltip.showOnClick && Ge.value ? "pointer" : "default",
|
|
2761
2738
|
transition: "stroke 0.2s ease-in-out, stroke-width 0.2s ease-in-out, fill 0.2s ease-in-out"
|
|
2762
2739
|
}
|
|
2763
2740
|
}), null, 16, hr)), e.$slots.node ? (w(), b("foreignObject", {
|
|
@@ -2769,25 +2746,25 @@ var Zn = /* @__PURE__ */ e({ default: () => jr }), Qn = ["id"], $n = ["id"], er
|
|
|
2769
2746
|
style: { overflow: "visible" }
|
|
2770
2747
|
}, [E(e.$slots, "node", ye({ ref_for: !0 }, {
|
|
2771
2748
|
node: t,
|
|
2772
|
-
orientation:
|
|
2749
|
+
orientation: G.value
|
|
2773
2750
|
}), void 0, !0)], 8, gr)) : y("", !0)], 40, mr))), 128))]),
|
|
2774
|
-
x("g", _r, [(w(!0), b(fe, null, Te(D(
|
|
2751
|
+
x("g", _r, [(w(!0), b(fe, null, Te(D(K).edges, (e) => (w(), b("path", {
|
|
2775
2752
|
key: e.id,
|
|
2776
2753
|
d: e.pathData,
|
|
2777
2754
|
fill: "none",
|
|
2778
2755
|
stroke: "transparent",
|
|
2779
|
-
"stroke-width": R.value.style.chart.edges.strokeWidth * (e.from ===
|
|
2756
|
+
"stroke-width": R.value.style.chart.edges.strokeWidth * (e.from === Q.value || e.id === z.value?.id ? 1.3 : 1),
|
|
2780
2757
|
"stroke-linecap": "round",
|
|
2781
2758
|
"stroke-linejoin": "round",
|
|
2782
|
-
"marker-end": D(
|
|
2759
|
+
"marker-end": D(K).arrowShape === "undirected" ? null : `url(#${_n(e.id)})`,
|
|
2783
2760
|
style: {
|
|
2784
2761
|
"pointer-events": "none",
|
|
2785
2762
|
transition: "stroke-width 0.2s ease-in-out,\n stroke 0.2s ease-in-out"
|
|
2786
2763
|
}
|
|
2787
2764
|
}, null, 8, vr))), 128))]),
|
|
2788
|
-
x("g", yr, [(w(!0), b(fe, null, Te(D(
|
|
2765
|
+
x("g", yr, [(w(!0), b(fe, null, Te(D(K).nodes, (t) => (w(), b("g", {
|
|
2789
2766
|
key: t.id,
|
|
2790
|
-
onClick: Ae((e) => R.value.style.chart.nodes.tooltip.showOnClick &&
|
|
2767
|
+
onClick: Ae((e) => R.value.style.chart.nodes.tooltip.showOnClick && Kt(t), ["stop"]),
|
|
2791
2768
|
onMouseenter: (e) => cn(t.id),
|
|
2792
2769
|
onMouseleave: (e) => dn(t.id)
|
|
2793
2770
|
}, [e.$slots["free-node-label"] ? y("", !0) : (w(), b(fe, { key: 0 }, [e.$slots["node-label"] ? (w(), b("text", {
|
|
@@ -2796,12 +2773,12 @@ var Zn = /* @__PURE__ */ e({ default: () => jr }), Qn = ["id"], $n = ["id"], er
|
|
|
2796
2773
|
y: t.y + R.value.style.chart.nodes.labels.fontSize / 3,
|
|
2797
2774
|
"text-anchor": "middle",
|
|
2798
2775
|
"font-size": R.value.style.chart.nodes.labels.fontSize,
|
|
2799
|
-
fill:
|
|
2776
|
+
fill: Q.value === t.id && R.value.style.chart.nodes.selected.labelColor != null ? R.value.style.chart.nodes.selected.labelColor : t.original.color,
|
|
2800
2777
|
"font-weight": R.value.style.chart.nodes.labels.bold ? "bold" : "normal",
|
|
2801
2778
|
style: { transition: "fill 0.2s ease-in-out" }
|
|
2802
2779
|
}, [E(e.$slots, "node-label", ye({ ref_for: !0 }, {
|
|
2803
2780
|
node: t,
|
|
2804
|
-
orientation:
|
|
2781
|
+
orientation: G.value
|
|
2805
2782
|
}), () => [ge(Ee(t.label), 1)], !0)], 8, xr)) : !e.$slots["free-node-label"] && !e.$slots.node ? (w(), b("text", {
|
|
2806
2783
|
key: 1,
|
|
2807
2784
|
"data-cy-node-label": "",
|
|
@@ -2809,65 +2786,65 @@ var Zn = /* @__PURE__ */ e({ default: () => jr }), Qn = ["id"], $n = ["id"], er
|
|
|
2809
2786
|
y: t.y + R.value.style.chart.nodes.labels.fontSize / 3,
|
|
2810
2787
|
"text-anchor": "middle",
|
|
2811
2788
|
"font-size": R.value.style.chart.nodes.labels.fontSize,
|
|
2812
|
-
fill: (
|
|
2789
|
+
fill: (Q.value === t.id || pn(t.id)) && R.value.style.chart.nodes.selected.labelColor != null ? R.value.style.chart.nodes.selected.labelColor : t.original.color,
|
|
2813
2790
|
"font-weight": R.value.style.chart.nodes.labels.bold ? "bold" : "normal",
|
|
2814
2791
|
style: { transition: "fill 0.2s ease-in-out" },
|
|
2815
2792
|
innerHTML: D(n)({
|
|
2816
2793
|
content: t.label,
|
|
2817
2794
|
fontSize: R.value.style.chart.nodes.labels.fontSize,
|
|
2818
2795
|
fontWeight: R.value.style.chart.nodes.labels.bold ? "bold" : "normal",
|
|
2819
|
-
fill: (
|
|
2796
|
+
fill: (Q.value === t.id || pn(t.id)) && R.value.style.chart.nodes.selected.labelColor != null ? R.value.style.chart.nodes.selected.labelColor : t.original.color,
|
|
2820
2797
|
x: t.x,
|
|
2821
2798
|
y: t.y,
|
|
2822
2799
|
autoOffset: !0
|
|
2823
2800
|
})
|
|
2824
2801
|
}, null, 8, Sr)) : y("", !0)], 64)), e.$slots["free-node-label"] ? (w(), b("g", Cr, [E(e.$slots, "free-node-label", ye({ ref_for: !0 }, {
|
|
2825
2802
|
node: t,
|
|
2826
|
-
layoutData: D(
|
|
2827
|
-
orientation:
|
|
2803
|
+
layoutData: D(K),
|
|
2804
|
+
orientation: G.value
|
|
2828
2805
|
}), void 0, !0)])) : y("", !0)], 40, br))), 128))]),
|
|
2829
2806
|
E(e.$slots, "svg", { svg: {
|
|
2830
|
-
drawingArea: D(
|
|
2831
|
-
data: D(
|
|
2832
|
-
orientation:
|
|
2833
|
-
isPrintingImg: D(ft) || D(
|
|
2834
|
-
isPrintingSvg:
|
|
2807
|
+
drawingArea: D(kt),
|
|
2808
|
+
data: D(K),
|
|
2809
|
+
orientation: G.value,
|
|
2810
|
+
isPrintingImg: D(ft) || D(pt) || D(vt),
|
|
2811
|
+
isPrintingSvg: D(yt)
|
|
2835
2812
|
} }, void 0, !0)
|
|
2836
2813
|
], 46, nr)) : y("", !0), e.$slots.hint ? (w(), b("div", wr, [E(e.$slots, "hint", C(S({
|
|
2837
2814
|
hint: R.value.a11y.translations.keyboardNavigation,
|
|
2838
|
-
isVisible:
|
|
2815
|
+
isVisible: We.value
|
|
2839
2816
|
})), void 0, !0)])) : y("", !0)]),
|
|
2840
|
-
e.$slots.watermark ? (w(), b("div", Tr, [E(e.$slots, "watermark", C(S({ isPrinting: D(ft) || D(
|
|
2817
|
+
e.$slots.watermark ? (w(), b("div", Tr, [E(e.$slots, "watermark", C(S({ isPrinting: D(ft) || D(pt) || D(vt) || D(yt) })), void 0, !0)])) : y("", !0),
|
|
2841
2818
|
_e(me, { name: "fade" }, {
|
|
2842
|
-
default: O(() => [
|
|
2819
|
+
default: O(() => [H.value ? (w(), v(pe, {
|
|
2843
2820
|
key: 0,
|
|
2844
|
-
to:
|
|
2821
|
+
to: J.value ? M.value : "body"
|
|
2845
2822
|
}, [x("div", {
|
|
2846
2823
|
"data-cy-tooltip-midpoint": "",
|
|
2847
2824
|
ref_key: "tooltipRef",
|
|
2848
|
-
ref:
|
|
2825
|
+
ref: Ye,
|
|
2849
2826
|
class: "vue-ui-dag-tooltip",
|
|
2850
2827
|
style: Se({
|
|
2851
|
-
...
|
|
2828
|
+
...Xe.value,
|
|
2852
2829
|
maxWidth: R.value.style.chart.midpoints.tooltip.maxWidth,
|
|
2853
2830
|
"--vue-data-ui-dag-tooltip-background": R.value.style.chart.midpoints.tooltip.backgroundColor,
|
|
2854
2831
|
"--vue-data-ui-dag-tooltip-color": R.value.style.chart.midpoints.tooltip.color
|
|
2855
2832
|
}),
|
|
2856
|
-
"data-position":
|
|
2833
|
+
"data-position": B.value
|
|
2857
2834
|
}, [E(e.$slots, "tooltip-midpoint", C(S({
|
|
2858
2835
|
edge: z.value,
|
|
2859
|
-
layoutData: D(
|
|
2860
|
-
})), () => [z.value ? (w(), b("div", Dr, Ee(
|
|
2836
|
+
layoutData: D(K)
|
|
2837
|
+
})), () => [z.value ? (w(), b("div", Dr, Ee(q(z.value.from)?.label ?? z.value.from) + " → " + Ee(q(z.value.to)?.label ?? z.value.to), 1)) : y("", !0)], !0)], 12, Er)], 8, ["to"])) : y("", !0)]),
|
|
2861
2838
|
_: 3
|
|
2862
2839
|
}),
|
|
2863
2840
|
_e(me, { name: "fade" }, {
|
|
2864
2841
|
default: O(() => [V.value ? (w(), v(pe, {
|
|
2865
2842
|
key: 0,
|
|
2866
|
-
to:
|
|
2843
|
+
to: J.value ? M.value : "body"
|
|
2867
2844
|
}, [x("div", {
|
|
2868
2845
|
"data-cy-tooltip-node": "",
|
|
2869
2846
|
ref_key: "nodeTooltipRef",
|
|
2870
|
-
ref:
|
|
2847
|
+
ref: et,
|
|
2871
2848
|
class: "vue-ui-dag-node-tooltip",
|
|
2872
2849
|
style: Se({
|
|
2873
2850
|
maxWidth: R.value.style.chart.nodes.tooltip.maxWidth,
|
|
@@ -2878,9 +2855,9 @@ var Zn = /* @__PURE__ */ e({ default: () => jr }), Qn = ["id"], $n = ["id"], er
|
|
|
2878
2855
|
}),
|
|
2879
2856
|
"data-position": nt.value
|
|
2880
2857
|
}, [E(e.$slots, "tooltip-node", C(S({
|
|
2881
|
-
node:
|
|
2882
|
-
layoutData: D(
|
|
2883
|
-
})), () => [
|
|
2858
|
+
node: $e.value,
|
|
2859
|
+
layoutData: D(K)
|
|
2860
|
+
})), () => [$e.value ? (w(), b("div", kr, Ee($e.value.label), 1)) : y("", !0)], !0)], 12, Or)], 8, ["to"])) : y("", !0)]),
|
|
2884
2861
|
_: 3
|
|
2885
2862
|
}),
|
|
2886
2863
|
R.value.style.chart.controls.position === "bottom" && !D(st) && R.value.style.chart.controls.show ? (w(), v(ue, {
|
|
@@ -2888,13 +2865,13 @@ var Zn = /* @__PURE__ */ e({ default: () => jr }), Qn = ["id"], $n = ["id"], er
|
|
|
2888
2865
|
ref_key: "zoomControls",
|
|
2889
2866
|
ref: Le,
|
|
2890
2867
|
config: R.value,
|
|
2891
|
-
scale: D(
|
|
2892
|
-
isFullscreen:
|
|
2868
|
+
scale: D(Mt),
|
|
2869
|
+
isFullscreen: J.value,
|
|
2893
2870
|
withDirection: "",
|
|
2894
|
-
onZoomIn:
|
|
2895
|
-
onZoomOut:
|
|
2896
|
-
onResetZoom: t[1] ||= () => D(
|
|
2897
|
-
onSwitchDirection:
|
|
2871
|
+
onZoomIn: zt,
|
|
2872
|
+
onZoomOut: Bt,
|
|
2873
|
+
onResetZoom: t[1] ||= () => D(At)(!0),
|
|
2874
|
+
onSwitchDirection: Ht
|
|
2898
2875
|
}, null, 8, [
|
|
2899
2876
|
"config",
|
|
2900
2877
|
"scale",
|
|
@@ -2909,6 +2886,6 @@ var Zn = /* @__PURE__ */ e({ default: () => jr }), Qn = ["id"], $n = ["id"], er
|
|
|
2909
2886
|
E(e.$slots, "skeleton", {}, () => [D(st) ? (w(), v(m, { key: 0 })) : y("", !0)], !0)
|
|
2910
2887
|
], 46, Qn));
|
|
2911
2888
|
}
|
|
2912
|
-
}, [["__scopeId", "data-v-
|
|
2889
|
+
}, [["__scopeId", "data-v-aed1b7b3"]]);
|
|
2913
2890
|
//#endregion
|
|
2914
2891
|
export { Zn as n, jr as t };
|