vue-data-ui 3.25.5 → 3.25.7
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/{BaseDraggableDialog-BM_R41j8.js → BaseDraggableDialog-Gm4Q30j0.js} +1 -1
- package/dist/{BaseIcon-t83PDe9k.js → BaseIcon-D8R6_sKH.js} +5 -5
- package/dist/{BaseLegendToggle-__JnV08B.js → BaseLegendToggle-CXQrLjd-.js} +1 -1
- package/dist/{BaseZoomControls-Xo16vFa4.js → BaseZoomControls-BTzjVDPM.js} +1 -1
- package/dist/{ColorPicker-Bn3MY7eL.js → ColorPicker-CUy15T72.js} +1 -1
- package/dist/{DataTable-COIO9gi4.js → DataTable-oiM9uWrQ.js} +1 -1
- package/dist/{HillActions-Cl-dNBZR.js → HillActions-Dn8aKOVJ.js} +1 -1
- package/dist/{NonSvgPenAndPaper-KXRhcsxM.js → NonSvgPenAndPaper-DFXjpRyl.js} +2 -2
- package/dist/{PackageVersion-M2Ws-VwJ.js → PackageVersion-UfoQuPMf.js} +1 -1
- package/dist/{PenAndPaper-BgH3m_LP.js → PenAndPaper-KFzKlvbi.js} +2 -2
- package/dist/{SlicerPreview-GvsdvE-h.js → SlicerPreview-B6iHOC9L.js} +1 -1
- package/dist/{UserOptions-f3Q0nqrj.js → UserOptions-2x4VklMW.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-icon.js +1 -1
- package/dist/components/vue-ui-kpi.js +1 -1
- package/dist/components/vue-ui-label.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-ta2JoIjx.js → package-B-3S5q00.js} +1 -1
- package/dist/{render-common-bvOuxfN3.js → render-common-CAXK7ycr.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 +10 -0
- package/dist/{useConfig-C_mX5pOZ.js → useConfig-CIQZ6_r7.js} +11 -1
- package/dist/{useObjectBindings-uXpBcVyo.js → useObjectBindings---mHNfbS.js} +2 -2
- package/dist/utils.js +1 -1
- package/dist/{vue-data-ui-BjdCpsRV.js → vue-data-ui-DlWT702n.js} +70 -70
- package/dist/vue-data-ui.js +71 -71
- package/dist/vue-ui-3d-bar-DbOk2kpM.js +1831 -0
- package/dist/{vue-ui-accordion-DRf3NQyH.js → vue-ui-accordion-BSmBUjwZ.js} +2 -2
- package/dist/vue-ui-age-pyramid-C7_mGIRk.js +1293 -0
- package/dist/{vue-ui-annotator-DZ0O8Xa5.js → vue-ui-annotator-CTQHAPho.js} +676 -676
- package/dist/vue-ui-bullet-CDy_dkYz.js +702 -0
- package/dist/{vue-ui-bump-DoHnD1Xy.js → vue-ui-bump-DP24leiD.js} +380 -380
- package/dist/vue-ui-candlestick-kJLmYaR7.js +1859 -0
- package/dist/{vue-ui-carousel-table-k1cBJ1i1.js → vue-ui-carousel-table-BQzAQDw6.js} +2 -2
- package/dist/vue-ui-chestnut-DnnRp3Kl.js +2016 -0
- package/dist/vue-ui-chord-DO15ZDCS.js +1347 -0
- package/dist/vue-ui-circle-pack-DYTllMPV.js +1635 -0
- package/dist/{vue-ui-cursor-CQWLyEx0.js → vue-ui-cursor-CtViSjNp.js} +2 -2
- package/dist/{vue-ui-dag-BqlsutMj.js → vue-ui-dag-NXtGYzqg.js} +792 -792
- package/dist/{vue-ui-dashboard-Be3MmkgS.js → vue-ui-dashboard-D3_4QohV.js} +67 -67
- package/dist/{vue-ui-digits-BqdfbcKX.js → vue-ui-digits-CB09pLQx.js} +2 -2
- package/dist/vue-ui-donut-evolution-DhrtxvAd.js +1552 -0
- package/dist/{vue-ui-donut-gzGZ42uH.js → vue-ui-donut-eysaEyTy.js} +2 -2
- package/dist/vue-ui-donut-yTE6D8yV.js +2415 -0
- package/dist/vue-ui-dumbbell-CmGIeULQ.js +1533 -0
- package/dist/vue-ui-flow-qYAq3Rmn.js +1217 -0
- package/dist/vue-ui-funnel-CLAii4wi.js +749 -0
- package/dist/vue-ui-galaxy-BVX-o2f-.js +1085 -0
- package/dist/vue-ui-gauge-D76-4Z_0.js +934 -0
- package/dist/{vue-ui-geo-Ca8kPYr-.js → vue-ui-geo-BQ7-UnuG.js} +429 -429
- package/dist/{vue-ui-gizmo-wUqHJICb.js → vue-ui-gizmo-C47zjcs-.js} +2 -2
- package/dist/vue-ui-heatmap-XJef60IZ.js +1558 -0
- package/dist/{vue-ui-hill-D6Y9Xy2K.js → vue-ui-hill-D5BYGPXB.js} +470 -470
- package/dist/vue-ui-history-plot-D-d-1ZiM.js +1698 -0
- package/dist/{vue-ui-horizontal-bar-3on3-H3B.js → vue-ui-horizontal-bar-BgFHi6_7.js} +511 -511
- package/dist/{vue-ui-kpi-CUpRRIUf.js → vue-ui-kpi-Cb8QJeaj.js} +2 -2
- package/dist/{vue-ui-label-DR2qUZOG.js → vue-ui-label-ClMQ5Gez.js} +1 -1
- package/dist/{vue-ui-mini-loader-D8W-fERs.js → vue-ui-mini-loader-DtPOVIkK.js} +1 -1
- package/dist/vue-ui-molecule-BzwMl-in.js +929 -0
- package/dist/{vue-ui-mood-radar-TW251icr.js → vue-ui-mood-radar-BUR_YCcr.js} +376 -376
- package/dist/vue-ui-nested-donuts-BEB4nfsD.js +1503 -0
- package/dist/vue-ui-onion-CG6myK7a.js +1235 -0
- package/dist/{vue-ui-parallel-coordinate-plot-RM25bxtf.js → vue-ui-parallel-coordinate-plot-CSO4johj.js} +407 -407
- package/dist/vue-ui-quadrant-CKav0I6g.js +1967 -0
- package/dist/{vue-ui-quick-chart-Cswm3_eI.js → vue-ui-quick-chart-BAQNS9_2.js} +4 -4
- package/dist/vue-ui-radar-ClPAgf5I.js +1374 -0
- package/dist/vue-ui-rating-CWFMoYpE.js +359 -0
- package/dist/vue-ui-relation-circle-Da2MhrVe.js +905 -0
- package/dist/vue-ui-ridgeline-D7gFs8yR.js +1630 -0
- package/dist/vue-ui-rings-DkDJ0k5b.js +1252 -0
- package/dist/vue-ui-scatter-yv4JzJID.js +2405 -0
- package/dist/{vue-ui-skeleton-D_u8EWeW.js → vue-ui-skeleton-oFnh5zWs.js} +698 -698
- package/dist/vue-ui-smiley-DJVusLnp.js +376 -0
- package/dist/vue-ui-spark-trend-IqZWPvSB.js +457 -0
- package/dist/vue-ui-sparkbar-_FW47iYj.js +401 -0
- package/dist/vue-ui-sparkgauge--2vk2Y23.js +268 -0
- package/dist/vue-ui-sparkhistogram-CFEIPa5n.js +589 -0
- package/dist/{vue-ui-sparkline-9qkNNZG6.js → vue-ui-sparkline-Cs9CJR6W.js} +511 -511
- package/dist/vue-ui-sparkstackbar-Cvbue77A.js +738 -0
- package/dist/vue-ui-stackbar-C5ANS2hd.js +2355 -0
- package/dist/vue-ui-stackline-7yajJFW4.js +2469 -0
- package/dist/vue-ui-strip-plot-BT6Eqhup.js +1740 -0
- package/dist/vue-ui-table-CiccGbRB.js +1352 -0
- package/dist/{vue-ui-table-heatmap-XmDK1aHJ.js → vue-ui-table-heatmap-DnP3pzh2.js} +2 -2
- package/dist/vue-ui-table-sparkline-Bp7RiZh4.js +738 -0
- package/dist/{vue-ui-thermometer-CLx3SPRv.js → vue-ui-thermometer-CawumQKP.js} +192 -192
- package/dist/{vue-ui-timer-BDWUNb6t.js → vue-ui-timer-CXinMW7q.js} +153 -153
- package/dist/vue-ui-tiremarks-BnI2uhki.js +540 -0
- package/dist/vue-ui-treemap-DTlFbfD6.js +1733 -0
- package/dist/vue-ui-waffle-CjgRkQAp.js +1621 -0
- package/dist/vue-ui-wheel-B02tiG0p.js +873 -0
- package/dist/vue-ui-word-cloud-BZnCOMHx.js +1710 -0
- package/dist/{vue-ui-world-C2atz4Xm.js → vue-ui-world-DO2VZ-T-.js} +524 -524
- package/dist/vue-ui-xy-BC9GVdWE.js +5283 -0
- package/dist/{vue-ui-xy-CpA0W6zM.js → vue-ui-xy-CD6BiP_g.js} +2 -2
- package/dist/vue-ui-xy-canvas-DANPuyf4.js +1824 -0
- package/dist/{vue_ui_age_pyramid-BY6c-oX_.js → vue_ui_age_pyramid-B2R66DgQ.js} +15 -6
- package/package.json +1 -1
- package/dist/vue-ui-3d-bar-C0aLR6lw.js +0 -1831
- package/dist/vue-ui-age-pyramid-DUcB3lYs.js +0 -1243
- package/dist/vue-ui-bullet-DIOCMF2H.js +0 -702
- package/dist/vue-ui-candlestick-Cf8TYPl5.js +0 -1859
- package/dist/vue-ui-chestnut-BMAuaeif.js +0 -2016
- package/dist/vue-ui-chord-DCe2iPjk.js +0 -1347
- package/dist/vue-ui-circle-pack-Eb5hS_z3.js +0 -1635
- package/dist/vue-ui-donut-CuQVKuZa.js +0 -2415
- package/dist/vue-ui-donut-evolution-DckruxZ9.js +0 -1552
- package/dist/vue-ui-dumbbell-BYU-hh2E.js +0 -1531
- package/dist/vue-ui-flow-DLRcNDLc.js +0 -1217
- package/dist/vue-ui-funnel-DjoqNN1U.js +0 -749
- package/dist/vue-ui-galaxy-BhR4IOra.js +0 -1085
- package/dist/vue-ui-gauge-Cq161Kwp.js +0 -934
- package/dist/vue-ui-heatmap-Bl5ymvi9.js +0 -1555
- package/dist/vue-ui-history-plot-CvVjsdCL.js +0 -1698
- package/dist/vue-ui-molecule-BExVLLgE.js +0 -929
- package/dist/vue-ui-nested-donuts-CWzJKr3S.js +0 -1503
- package/dist/vue-ui-onion-VaYZQK5i.js +0 -1235
- package/dist/vue-ui-quadrant-Dmtwow7n.js +0 -1967
- package/dist/vue-ui-radar-C3GYthqu.js +0 -1374
- package/dist/vue-ui-rating-CBdDXL80.js +0 -359
- package/dist/vue-ui-relation-circle-BA0qy0kp.js +0 -905
- package/dist/vue-ui-ridgeline-C5skjBTe.js +0 -1630
- package/dist/vue-ui-rings-BJ8yEQMw.js +0 -1252
- package/dist/vue-ui-scatter-DXg8ESgr.js +0 -2405
- package/dist/vue-ui-smiley-DQOp87rr.js +0 -376
- package/dist/vue-ui-spark-trend-CjCufXof.js +0 -457
- package/dist/vue-ui-sparkbar-BniEM15a.js +0 -401
- package/dist/vue-ui-sparkgauge-BtyCrqTQ.js +0 -268
- package/dist/vue-ui-sparkhistogram-DQdn3PW1.js +0 -589
- package/dist/vue-ui-sparkstackbar-BXQlOdOk.js +0 -738
- package/dist/vue-ui-stackbar-CkjicNDv.js +0 -2355
- package/dist/vue-ui-stackline-BB1IZta8.js +0 -2469
- package/dist/vue-ui-strip-plot-DGLGuH6e.js +0 -1740
- package/dist/vue-ui-table-BXz_HY2g.js +0 -1352
- package/dist/vue-ui-table-sparkline-MTEw3imE.js +0 -738
- package/dist/vue-ui-tiremarks-DoaypTC-.js +0 -540
- package/dist/vue-ui-treemap-Bv7PgpiC.js +0 -1733
- package/dist/vue-ui-waffle-z2DhvSAx.js +0 -1621
- package/dist/vue-ui-wheel-DYLBJuFb.js +0 -873
- package/dist/vue-ui-word-cloud-CbpEhSdL.js +0 -1710
- package/dist/vue-ui-xy-B3DQ6t46.js +0 -5283
- package/dist/vue-ui-xy-canvas-CJefORWc.js +0 -1824
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as e } from "./rolldown-runtime-Dy4uBu1J.js";
|
|
2
2
|
import { At as t, K as n, Pt as r, S as i, Zt as a, et as o, nt as s, q as c, t as l, vt as u } from "./lib-Dql7cqyA.js";
|
|
3
3
|
import { n as d, t as f } from "./useHints-Dq_w2E8B.js";
|
|
4
|
-
import { t as p } from "./useConfig-
|
|
4
|
+
import { t as p } from "./useConfig-CIQZ6_r7.js";
|
|
5
5
|
import { t as m } from "./usePrinter-DISD7q5m.js";
|
|
6
6
|
import { n as h, t as g } from "./BaseScanner-DZvpgOjM.js";
|
|
7
7
|
import { t as _ } from "./useNestedProp-Chvyfpl-.js";
|
|
@@ -15,11 +15,11 @@ import { t as se } from "./A11yDataTable-DdRsVULz.js";
|
|
|
15
15
|
import { t as ce } from "./useUserOptionState-DK-_1ddE.js";
|
|
16
16
|
import { t as le } from "./useChartAccessibility-DYqac8yF.js";
|
|
17
17
|
import { t as ue } from "./usePanZoom-CYU3B4T3.js";
|
|
18
|
-
import { t as de } from "./BaseZoomControls-
|
|
18
|
+
import { t as de } from "./BaseZoomControls-BTzjVDPM.js";
|
|
19
19
|
import { t as fe } from "./vue_ui_dag-TsJ_azQq.js";
|
|
20
|
-
import { Fragment as pe, Teleport as me, Transition as he, computed as v, createBlock as
|
|
20
|
+
import { Fragment as pe, Teleport as me, Transition as he, computed as v, createBlock as ge, createCommentVNode as y, createElementBlock as b, createElementVNode as x, createSlots as _e, createTextVNode as ve, createVNode as ye, defineAsyncComponent as be, guardReactiveProps as S, mergeProps as xe, nextTick as Se, normalizeClass as Ce, normalizeProps as C, normalizeStyle as we, onBeforeUnmount as Te, onMounted as Ee, openBlock as w, ref as T, renderList as De, renderSlot as E, toDisplayString as Oe, toRefs as ke, unref as D, watch as Ae, watchEffect as je, withCtx as O, withModifiers as Me } from "vue";
|
|
21
21
|
//#region src/DAG/graph.js
|
|
22
|
-
var
|
|
22
|
+
var Ne = "\0", Pe = "\0", Fe = "", Ie = class {
|
|
23
23
|
_isDirected = !0;
|
|
24
24
|
_isMultigraph = !1;
|
|
25
25
|
_isCompound = !1;
|
|
@@ -38,7 +38,7 @@ var Me = "\0", Ne = "\0", Pe = "", A = class {
|
|
|
38
38
|
_parent;
|
|
39
39
|
_children;
|
|
40
40
|
constructor(e) {
|
|
41
|
-
e && (this._isDirected = !Object.hasOwn(e, "directed") || e.directed, this._isMultigraph = Object.hasOwn(e, "multigraph") ? e.multigraph : !1, this._isCompound = Object.hasOwn(e, "compound") ? e.compound : !1), this._isCompound && (this._parent = {}, this._children = {}, this._children[
|
|
41
|
+
e && (this._isDirected = !Object.hasOwn(e, "directed") || e.directed, this._isMultigraph = Object.hasOwn(e, "multigraph") ? e.multigraph : !1, this._isCompound = Object.hasOwn(e, "compound") ? e.compound : !1), this._isCompound && (this._parent = {}, this._children = {}, this._children[Pe] = {});
|
|
42
42
|
}
|
|
43
43
|
isDirected() {
|
|
44
44
|
return this._isDirected;
|
|
@@ -79,7 +79,7 @@ var Me = "\0", Ne = "\0", Pe = "", A = class {
|
|
|
79
79
|
}), this;
|
|
80
80
|
}
|
|
81
81
|
setNode(e, t) {
|
|
82
|
-
return Object.hasOwn(this._nodes, e) ? (arguments.length > 1 && (this._nodes[e] = t), this) : (this._nodes[e] = arguments.length > 1 ? t : this._defaultNodeLabelFn(e), this._isCompound && (this._parent[e] =
|
|
82
|
+
return Object.hasOwn(this._nodes, e) ? (arguments.length > 1 && (this._nodes[e] = t), this) : (this._nodes[e] = arguments.length > 1 ? t : this._defaultNodeLabelFn(e), this._isCompound && (this._parent[e] = Pe, this._children[e] = {}, this._children[Pe][e] = !0), this._in[e] = {}, this._preds[e] = {}, this._out[e] = {}, this._sucs[e] = {}, ++this._nodeCount, this);
|
|
83
83
|
}
|
|
84
84
|
node(e) {
|
|
85
85
|
return this._nodes[e];
|
|
@@ -99,7 +99,7 @@ var Me = "\0", Ne = "\0", Pe = "", A = class {
|
|
|
99
99
|
}
|
|
100
100
|
setParent(e, t) {
|
|
101
101
|
if (!this._isCompound) throw Error("Cannot set parent in a non-compound graph");
|
|
102
|
-
if (t === void 0) t =
|
|
102
|
+
if (t === void 0) t = Pe;
|
|
103
103
|
else {
|
|
104
104
|
t += "";
|
|
105
105
|
for (let n = t; n !== void 0; n = this.parent(n)) if (n === e) throw Error("Setting " + t + " as parent of " + e + " would create a cycle");
|
|
@@ -113,14 +113,14 @@ var Me = "\0", Ne = "\0", Pe = "", A = class {
|
|
|
113
113
|
parent(e) {
|
|
114
114
|
if (this._isCompound) {
|
|
115
115
|
let t = this._parent[e];
|
|
116
|
-
if (t !==
|
|
116
|
+
if (t !== Pe) return t;
|
|
117
117
|
}
|
|
118
118
|
}
|
|
119
|
-
children(e =
|
|
119
|
+
children(e = Pe) {
|
|
120
120
|
if (this._isCompound) {
|
|
121
121
|
let t = this._children[e];
|
|
122
122
|
if (t) return Object.keys(t);
|
|
123
|
-
} else if (e ===
|
|
123
|
+
} else if (e === Pe) return this.nodes();
|
|
124
124
|
else if (this.hasNode(e)) return [];
|
|
125
125
|
}
|
|
126
126
|
predecessors(e) {
|
|
@@ -179,15 +179,15 @@ var Me = "\0", Ne = "\0", Pe = "", A = class {
|
|
|
179
179
|
setEdge() {
|
|
180
180
|
let e, t, n, r, i = !1, a = arguments[0];
|
|
181
181
|
typeof a == "object" && a && "v" in a ? (e = a.v, t = a.w, n = a.name, arguments.length === 2 && (r = arguments[1], i = !0)) : (e = a, t = arguments[1], n = arguments[3], arguments.length > 2 && (r = arguments[2], i = !0)), e = "" + e, t = "" + t, n !== void 0 && (n = "" + n);
|
|
182
|
-
let o =
|
|
182
|
+
let o = A(this._isDirected, e, t, n);
|
|
183
183
|
if (Object.hasOwn(this._edgeLabels, o)) return i && (this._edgeLabels[o] = r), this;
|
|
184
184
|
if (n !== void 0 && !this._isMultigraph) throw Error("Cannot set a named edge when isMultigraph = false");
|
|
185
185
|
this.setNode(e), this.setNode(t), this._edgeLabels[o] = i ? r : this._defaultEdgeLabelFn(e, t, n);
|
|
186
|
-
let s =
|
|
187
|
-
return e = s.v, t = s.w, Object.freeze(s), this._edgeObjs[o] = s,
|
|
186
|
+
let s = j(this._isDirected, e, t, n);
|
|
187
|
+
return e = s.v, t = s.w, Object.freeze(s), this._edgeObjs[o] = s, Le(this._preds[t], e), Le(this._sucs[e], t), this._in[t][o] = s, this._out[e][o] = s, this._edgeCount++, this;
|
|
188
188
|
}
|
|
189
189
|
edge(e, t, n) {
|
|
190
|
-
let r = arguments.length === 1 ?
|
|
190
|
+
let r = arguments.length === 1 ? M(this._isDirected, arguments[0]) : A(this._isDirected, e, t, n);
|
|
191
191
|
return this._edgeLabels[r];
|
|
192
192
|
}
|
|
193
193
|
edgeAsObj() {
|
|
@@ -195,12 +195,12 @@ var Me = "\0", Ne = "\0", Pe = "", A = class {
|
|
|
195
195
|
return typeof e == "object" ? e : { label: e };
|
|
196
196
|
}
|
|
197
197
|
hasEdge(e, t, n) {
|
|
198
|
-
let r = arguments.length === 1 ?
|
|
198
|
+
let r = arguments.length === 1 ? M(this._isDirected, arguments[0]) : A(this._isDirected, e, t, n);
|
|
199
199
|
return Object.hasOwn(this._edgeLabels, r);
|
|
200
200
|
}
|
|
201
201
|
removeEdge(e, t, n) {
|
|
202
|
-
let r = arguments.length === 1 ?
|
|
203
|
-
return i && (e = i.v, t = i.w, delete this._edgeLabels[r], delete this._edgeObjs[r],
|
|
202
|
+
let r = arguments.length === 1 ? M(this._isDirected, arguments[0]) : A(this._isDirected, e, t, n), i = this._edgeObjs[r];
|
|
203
|
+
return i && (e = i.v, t = i.w, delete this._edgeLabels[r], delete this._edgeObjs[r], k(this._preds[t], e), k(this._sucs[e], t), delete this._in[t][r], delete this._out[e][r], this._edgeCount--), this;
|
|
204
204
|
}
|
|
205
205
|
inEdges(e, t) {
|
|
206
206
|
let n = this._in[e];
|
|
@@ -221,21 +221,21 @@ var Me = "\0", Ne = "\0", Pe = "", A = class {
|
|
|
221
221
|
if (n) return n.concat(this.outEdges(e, t));
|
|
222
222
|
}
|
|
223
223
|
};
|
|
224
|
-
function
|
|
224
|
+
function Le(e, t) {
|
|
225
225
|
e[t] ? e[t]++ : e[t] = 1;
|
|
226
226
|
}
|
|
227
|
-
function
|
|
227
|
+
function k(e, t) {
|
|
228
228
|
--e[t] || delete e[t];
|
|
229
229
|
}
|
|
230
|
-
function
|
|
230
|
+
function A(e, t, n, r) {
|
|
231
231
|
let i = "" + t, a = "" + n;
|
|
232
232
|
if (!e && i > a) {
|
|
233
233
|
let e = i;
|
|
234
234
|
i = a, a = e;
|
|
235
235
|
}
|
|
236
|
-
return i +
|
|
236
|
+
return i + Fe + a + Fe + (r === void 0 ? Ne : r);
|
|
237
237
|
}
|
|
238
|
-
function
|
|
238
|
+
function j(e, t, n, r) {
|
|
239
239
|
let i = "" + t, a = "" + n;
|
|
240
240
|
if (!e && i > a) {
|
|
241
241
|
let e = i;
|
|
@@ -247,73 +247,73 @@ function N(e, t, n, r) {
|
|
|
247
247
|
};
|
|
248
248
|
return r && (o.name = r), o;
|
|
249
249
|
}
|
|
250
|
-
function
|
|
251
|
-
return
|
|
250
|
+
function M(e, t) {
|
|
251
|
+
return A(e, t.v, t.w, t.name);
|
|
252
252
|
}
|
|
253
253
|
//#endregion
|
|
254
254
|
//#region src/DAG/data/list.js
|
|
255
|
-
var
|
|
255
|
+
var Re = class {
|
|
256
256
|
constructor() {
|
|
257
257
|
let e = {};
|
|
258
258
|
e._next = e._prev = e, this._sentinel = e;
|
|
259
259
|
}
|
|
260
260
|
dequeue() {
|
|
261
261
|
let e = this._sentinel, t = e._prev;
|
|
262
|
-
if (t !== e) return
|
|
262
|
+
if (t !== e) return ze(t), t;
|
|
263
263
|
}
|
|
264
264
|
enqueue(e) {
|
|
265
265
|
let t = this._sentinel;
|
|
266
|
-
e._prev && e._next &&
|
|
266
|
+
e._prev && e._next && ze(e), e._next = t._next, t._next._prev = e, t._next = e, e._prev = t;
|
|
267
267
|
}
|
|
268
268
|
toString() {
|
|
269
269
|
let e = [], t = this._sentinel, n = t._prev;
|
|
270
|
-
for (; n !== t;) e.push(JSON.stringify(n,
|
|
270
|
+
for (; n !== t;) e.push(JSON.stringify(n, Be)), n = n._prev;
|
|
271
271
|
return "[" + e.join(", ") + "]";
|
|
272
272
|
}
|
|
273
273
|
};
|
|
274
|
-
function
|
|
274
|
+
function ze(e) {
|
|
275
275
|
e._prev._next = e._next, e._next._prev = e._prev, delete e._next, delete e._prev;
|
|
276
276
|
}
|
|
277
|
-
function
|
|
277
|
+
function Be(e, t) {
|
|
278
278
|
if (e !== "_next" && e !== "_prev") return t;
|
|
279
279
|
}
|
|
280
280
|
//#endregion
|
|
281
281
|
//#region src/DAG/greedy-fas.js
|
|
282
|
-
var
|
|
283
|
-
function
|
|
282
|
+
var Ve = () => 1;
|
|
283
|
+
function He(e, t) {
|
|
284
284
|
if (e.nodeCount() <= 1) return [];
|
|
285
|
-
let n =
|
|
286
|
-
return
|
|
285
|
+
let n = N(e, t || Ve);
|
|
286
|
+
return Ue(n.graph, n.buckets, n.zeroIndex).flatMap((t) => e.outEdges(t.v, t.w));
|
|
287
287
|
}
|
|
288
|
-
function
|
|
288
|
+
function Ue(e, t, n) {
|
|
289
289
|
let r = [], i = t[t.length - 1], a = t[0], o;
|
|
290
290
|
for (; e.nodeCount();) {
|
|
291
|
-
for (; o = a.dequeue();)
|
|
292
|
-
for (; o = i.dequeue();)
|
|
291
|
+
for (; o = a.dequeue();) We(e, t, n, o);
|
|
292
|
+
for (; o = i.dequeue();) We(e, t, n, o);
|
|
293
293
|
if (e.nodeCount()) {
|
|
294
294
|
for (let i = t.length - 2; i > 0; --i) if (o = t[i].dequeue(), o) {
|
|
295
|
-
r = r.concat(
|
|
295
|
+
r = r.concat(We(e, t, n, o, !0));
|
|
296
296
|
break;
|
|
297
297
|
}
|
|
298
298
|
}
|
|
299
299
|
}
|
|
300
300
|
return r;
|
|
301
301
|
}
|
|
302
|
-
function
|
|
302
|
+
function We(e, t, n, r, i) {
|
|
303
303
|
let a = i ? [] : void 0;
|
|
304
304
|
return e.inEdges(r.v).forEach((r) => {
|
|
305
305
|
let o = e.edge(r), s = e.node(r.v);
|
|
306
306
|
i && a.push({
|
|
307
307
|
v: r.v,
|
|
308
308
|
w: r.w
|
|
309
|
-
}), s.out -= o,
|
|
309
|
+
}), s.out -= o, P(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, P(t, n, a);
|
|
313
313
|
}), e.removeNode(r.v), a;
|
|
314
314
|
}
|
|
315
|
-
function
|
|
316
|
-
let n = new
|
|
315
|
+
function N(e, t) {
|
|
316
|
+
let n = new Ie(), r = 0, i = 0;
|
|
317
317
|
e.nodes().forEach((e) => {
|
|
318
318
|
n.setNode(e, {
|
|
319
319
|
v: e,
|
|
@@ -324,32 +324,32 @@ function F(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 = F(i + r + 3).map(() => new Re()), o = r + 1;
|
|
328
328
|
return n.nodes().forEach((e) => {
|
|
329
|
-
|
|
329
|
+
P(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 P(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 F(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 I(e, t, n, r) {
|
|
347
347
|
let i = r;
|
|
348
|
-
for (; e.hasNode(i);) i =
|
|
348
|
+
for (; e.hasNode(i);) i = et(r);
|
|
349
349
|
return n.dummy = t, e.setNode(i, n), i;
|
|
350
350
|
}
|
|
351
|
-
function
|
|
352
|
-
let t = new
|
|
351
|
+
function Ge(e) {
|
|
352
|
+
let t = new Ie().setGraph(e.graph());
|
|
353
353
|
return e.nodes().forEach((n) => {
|
|
354
354
|
t.setNode(n, e.node(n));
|
|
355
355
|
}), e.edges().forEach((n) => {
|
|
@@ -363,33 +363,33 @@ function Ue(e) {
|
|
|
363
363
|
});
|
|
364
364
|
}), t;
|
|
365
365
|
}
|
|
366
|
-
function
|
|
367
|
-
let t = new
|
|
366
|
+
function Ke(e) {
|
|
367
|
+
let t = new Ie({ 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));
|
|
370
370
|
}), e.edges().forEach((n) => {
|
|
371
371
|
t.setEdge(n, e.edge(n));
|
|
372
372
|
}), t;
|
|
373
373
|
}
|
|
374
|
-
function
|
|
374
|
+
function qe(e) {
|
|
375
375
|
let t = e.nodes().map((t) => {
|
|
376
376
|
let n = {};
|
|
377
377
|
return e.outEdges(t).forEach((t) => {
|
|
378
378
|
n[t.w] = (n[t.w] || 0) + e.edge(t).weight;
|
|
379
379
|
}), n;
|
|
380
380
|
});
|
|
381
|
-
return
|
|
381
|
+
return rt(e.nodes(), t);
|
|
382
382
|
}
|
|
383
|
-
function
|
|
383
|
+
function L(e) {
|
|
384
384
|
let t = e.nodes().map((t) => {
|
|
385
385
|
let n = {};
|
|
386
386
|
return e.inEdges(t).forEach((t) => {
|
|
387
387
|
n[t.v] = (n[t.v] || 0) + e.edge(t).weight;
|
|
388
388
|
}), n;
|
|
389
389
|
});
|
|
390
|
-
return
|
|
390
|
+
return rt(e.nodes(), t);
|
|
391
391
|
}
|
|
392
|
-
function
|
|
392
|
+
function R(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,25 +398,25 @@ function Ke(e, t) {
|
|
|
398
398
|
y: r + l
|
|
399
399
|
};
|
|
400
400
|
}
|
|
401
|
-
function
|
|
402
|
-
let t =
|
|
401
|
+
function z(e) {
|
|
402
|
+
let t = tt(U(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);
|
|
406
406
|
}), t;
|
|
407
407
|
}
|
|
408
|
-
function
|
|
408
|
+
function B(e) {
|
|
409
409
|
let t = e.nodes().map((t) => {
|
|
410
410
|
let n = e.node(t).rank;
|
|
411
411
|
return n === void 0 ? Number.MAX_VALUE : n;
|
|
412
|
-
}), n =
|
|
412
|
+
}), n = H(Math.min, t);
|
|
413
413
|
e.nodes().forEach((t) => {
|
|
414
414
|
let r = e.node(t);
|
|
415
415
|
Object.hasOwn(r, "rank") && (r.rank -= n);
|
|
416
416
|
});
|
|
417
417
|
}
|
|
418
|
-
function
|
|
419
|
-
let t = e.nodes().map((t) => e.node(t).rank).filter((e) => e !== void 0), n =
|
|
418
|
+
function V(e) {
|
|
419
|
+
let t = e.nodes().map((t) => e.node(t).rank).filter((e) => e !== void 0), n = H(Math.min, t), r = [];
|
|
420
420
|
e.nodes().forEach((t) => {
|
|
421
421
|
let i = e.node(t).rank - n;
|
|
422
422
|
r[i] || (r[i] = []), r[i].push(t);
|
|
@@ -428,15 +428,15 @@ function Ye(e) {
|
|
|
428
428
|
});
|
|
429
429
|
});
|
|
430
430
|
}
|
|
431
|
-
function
|
|
431
|
+
function Je(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), I(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);
|
|
@@ -444,21 +444,21 @@ function Ze(e, t = Xe) {
|
|
|
444
444
|
}
|
|
445
445
|
return n;
|
|
446
446
|
}
|
|
447
|
-
function
|
|
448
|
-
if (t.length >
|
|
449
|
-
let n =
|
|
447
|
+
function H(e, t) {
|
|
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 U(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
|
-
return
|
|
459
|
+
return H(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();
|
|
@@ -475,15 +475,15 @@ function $e(e, t) {
|
|
|
475
475
|
console.log(e + " time: " + (Date.now() - n) + "ms");
|
|
476
476
|
}
|
|
477
477
|
}
|
|
478
|
-
function
|
|
478
|
+
function $e(e, t) {
|
|
479
479
|
return t();
|
|
480
480
|
}
|
|
481
|
-
var
|
|
482
|
-
function
|
|
483
|
-
let t = ++
|
|
481
|
+
var W = 0;
|
|
482
|
+
function et(e) {
|
|
483
|
+
let t = ++W;
|
|
484
484
|
return e + String(t);
|
|
485
485
|
}
|
|
486
|
-
function
|
|
486
|
+
function tt(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 rt(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 G(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 nt(e, t) {
|
|
500
500
|
let n = t;
|
|
501
501
|
if (typeof t == "string") {
|
|
502
502
|
let e = t;
|
|
@@ -504,37 +504,37 @@ function W(e, t) {
|
|
|
504
504
|
}
|
|
505
505
|
return Object.entries(e).reduce((e, [t, r]) => (e[t] = n(r, t), e), {});
|
|
506
506
|
}
|
|
507
|
-
function
|
|
507
|
+
function rt(e, t) {
|
|
508
508
|
return e.reduce((e, n, r) => (e[n] = t[r], e), {});
|
|
509
509
|
}
|
|
510
510
|
var it = {
|
|
511
|
-
addBorderNode:
|
|
512
|
-
addDummyNode:
|
|
513
|
-
applyWithChunking:
|
|
514
|
-
asNonCompoundGraph:
|
|
515
|
-
buildLayerMatrix:
|
|
516
|
-
intersectRect:
|
|
517
|
-
mapValues:
|
|
518
|
-
maxRank:
|
|
519
|
-
normalizeRanks:
|
|
520
|
-
notime:
|
|
521
|
-
partition:
|
|
522
|
-
pick:
|
|
523
|
-
predecessorWeights:
|
|
524
|
-
range:
|
|
525
|
-
removeEmptyRanks:
|
|
526
|
-
simplify:
|
|
527
|
-
successorWeights:
|
|
528
|
-
time:
|
|
529
|
-
uniqueId:
|
|
530
|
-
zipObject:
|
|
511
|
+
addBorderNode: Je,
|
|
512
|
+
addDummyNode: I,
|
|
513
|
+
applyWithChunking: H,
|
|
514
|
+
asNonCompoundGraph: Ke,
|
|
515
|
+
buildLayerMatrix: z,
|
|
516
|
+
intersectRect: R,
|
|
517
|
+
mapValues: nt,
|
|
518
|
+
maxRank: U,
|
|
519
|
+
normalizeRanks: B,
|
|
520
|
+
notime: $e,
|
|
521
|
+
partition: Ze,
|
|
522
|
+
pick: G,
|
|
523
|
+
predecessorWeights: L,
|
|
524
|
+
range: tt,
|
|
525
|
+
removeEmptyRanks: V,
|
|
526
|
+
simplify: Ge,
|
|
527
|
+
successorWeights: qe,
|
|
528
|
+
time: Qe,
|
|
529
|
+
uniqueId: et,
|
|
530
|
+
zipObject: rt
|
|
531
531
|
};
|
|
532
532
|
//#endregion
|
|
533
533
|
//#region src/DAG/acyclic.js
|
|
534
534
|
function at(e) {
|
|
535
|
-
(e.graph().acyclicer === "greedy" ?
|
|
535
|
+
(e.graph().acyclicer === "greedy" ? He(e, t(e)) : K(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, et("rev"));
|
|
538
538
|
});
|
|
539
539
|
function t(e) {
|
|
540
540
|
return (t) => e.edge(t).weight;
|
|
@@ -575,7 +575,7 @@ function ct(e, t) {
|
|
|
575
575
|
edgeLabel: s,
|
|
576
576
|
edgeObj: t,
|
|
577
577
|
rank: r
|
|
578
|
-
}, l =
|
|
578
|
+
}, l = I(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
581
|
function lt(e) {
|
|
@@ -591,25 +591,25 @@ function lt(e) {
|
|
|
591
591
|
}
|
|
592
592
|
//#endregion
|
|
593
593
|
//#region src/DAG/rank/util.js
|
|
594
|
-
function
|
|
594
|
+
function q(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;
|
|
598
598
|
let i = e.outEdges(n) || [];
|
|
599
599
|
if (!i.length) return r && (r.rank = 0), 0;
|
|
600
|
-
let a = i.map((n) => e.node(n.w) ? t(n.w) - e.edge(n).minlen : Infinity), o =
|
|
600
|
+
let a = i.map((n) => e.node(n.w) ? t(n.w) - e.edge(n).minlen : Infinity), o = H(Math.min, a);
|
|
601
601
|
return o === Infinity && (o = 0), r && (r.rank = o), o;
|
|
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
|
-
|
|
612
|
-
let t = new
|
|
610
|
+
function dt(e) {
|
|
611
|
+
ft(e);
|
|
612
|
+
let t = new Ie();
|
|
613
613
|
e.nodes().forEach((e) => {
|
|
614
614
|
t.setNode(e, {});
|
|
615
615
|
});
|
|
@@ -617,29 +617,29 @@ function ft(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 mt(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,56 +662,56 @@ function ht(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 = Ge(e);
|
|
667
|
+
return q(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 gt(e, t) {}
|
|
672
673
|
function _t(e, t) {}
|
|
673
|
-
function vt(e, t) {
|
|
674
|
-
function yt(e, t, n) {
|
|
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 = q;
|
|
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
|
+
Tt(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: Tt(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 Tt(e) {
|
|
709
|
+
ht(e);
|
|
710
710
|
}
|
|
711
711
|
//#endregion
|
|
712
712
|
//#region src/DAG/parent-dummy-chains.js
|
|
713
713
|
function Et(e) {
|
|
714
|
-
let t =
|
|
714
|
+
let t = Ot(e);
|
|
715
715
|
e.graph().dummyChains.forEach((n) => {
|
|
716
716
|
let r = e.node(n), i = r.edgeObj, a = Dt(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;) {
|
|
@@ -739,7 +739,7 @@ function Dt(e, t, n, r) {
|
|
|
739
739
|
lca: l
|
|
740
740
|
};
|
|
741
741
|
}
|
|
742
|
-
function
|
|
742
|
+
function Ot(e) {
|
|
743
743
|
let t = {}, n = 0;
|
|
744
744
|
function r(i) {
|
|
745
745
|
let a = n;
|
|
@@ -752,12 +752,12 @@ function J(e) {
|
|
|
752
752
|
}
|
|
753
753
|
//#endregion
|
|
754
754
|
//#region src/DAG/nested-graph.js
|
|
755
|
-
function
|
|
756
|
-
let t = it.addDummyNode(e, "root", {}, "_root"), n =
|
|
755
|
+
function J(e) {
|
|
756
|
+
let t = it.addDummyNode(e, "root", {}, "_root"), n = At(e), r = Object.values(n), i = it.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 = Y(e) + 1;
|
|
761
761
|
e.children().forEach((r) => {
|
|
762
762
|
kt(e, t, a, o, i, n, r);
|
|
763
763
|
}), e.graph().nodeRankFactor = a;
|
|
@@ -789,7 +789,7 @@ function kt(e, t, n, r, i, a, o) {
|
|
|
789
789
|
minlen: i + a[o]
|
|
790
790
|
});
|
|
791
791
|
}
|
|
792
|
-
function
|
|
792
|
+
function At(e) {
|
|
793
793
|
let t = {};
|
|
794
794
|
function n(r, i) {
|
|
795
795
|
let a = e.children(r);
|
|
@@ -797,7 +797,7 @@ function Y(e) {
|
|
|
797
797
|
}
|
|
798
798
|
return e.children().forEach((e) => n(e, 1)), t;
|
|
799
799
|
}
|
|
800
|
-
function
|
|
800
|
+
function Y(e) {
|
|
801
801
|
return e.edges().reduce((t, n) => t + e.edge(n).weight, 0);
|
|
802
802
|
}
|
|
803
803
|
function jt(e) {
|
|
@@ -813,50 +813,50 @@ function Mt(e) {
|
|
|
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) X(e, "borderLeft", "_bl", n, i, t), X(e, "borderRight", "_br", n, i, t);
|
|
817
817
|
}
|
|
818
818
|
}
|
|
819
819
|
e.children().forEach(t);
|
|
820
820
|
}
|
|
821
|
-
function
|
|
821
|
+
function X(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 = I(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 Nt(e) {
|
|
833
833
|
let t = e.graph().rankdir.toLowerCase();
|
|
834
|
-
(t === "lr" || t === "rl") &&
|
|
834
|
+
(t === "lr" || t === "rl") && Ft(e);
|
|
835
835
|
}
|
|
836
|
-
function
|
|
836
|
+
function Pt(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), Ft(e));
|
|
839
839
|
}
|
|
840
|
-
function
|
|
840
|
+
function Ft(e) {
|
|
841
841
|
e.nodes().forEach((t) => {
|
|
842
|
-
|
|
842
|
+
It(e.node(t));
|
|
843
843
|
}), e.edges().forEach((t) => {
|
|
844
|
-
|
|
844
|
+
It(e.edge(t));
|
|
845
845
|
});
|
|
846
846
|
}
|
|
847
|
-
function
|
|
847
|
+
function It(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
862
|
function zt(e) {
|
|
@@ -872,13 +872,13 @@ function Bt(e) {
|
|
|
872
872
|
e.x = e.y, e.y = t;
|
|
873
873
|
}
|
|
874
874
|
var Vt = {
|
|
875
|
-
adjust:
|
|
876
|
-
undo:
|
|
875
|
+
adjust: Nt,
|
|
876
|
+
undo: Pt
|
|
877
877
|
};
|
|
878
878
|
//#endregion
|
|
879
879
|
//#region src/DAG/order/init-order.js
|
|
880
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 =
|
|
881
|
+
let t = {}, n = e.nodes().filter((t) => e.children(t).length === 0), r = n.map((t) => e.node(t).rank), i = tt(H(Math.max, r) + 1).map(() => []);
|
|
882
882
|
function a(n) {
|
|
883
883
|
if (t[n]) return;
|
|
884
884
|
t[n] = !0;
|
|
@@ -895,7 +895,7 @@ function Ut(e, t) {
|
|
|
895
895
|
return n;
|
|
896
896
|
}
|
|
897
897
|
function Wt(e, t, n) {
|
|
898
|
-
let r =
|
|
898
|
+
let r = rt(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
|
|
901
901
|
})).sort((e, t) => e.pos - t.pos)), a = 1;
|
|
@@ -950,13 +950,13 @@ function Kt(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
|
+
}), qt(Object.values(n).filter((e) => !e.indegree));
|
|
954
954
|
}
|
|
955
|
-
function
|
|
955
|
+
function qt(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) && Jt(e, t);
|
|
960
960
|
};
|
|
961
961
|
}
|
|
962
962
|
function r(t) {
|
|
@@ -968,50 +968,50 @@ function Z(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) => G(e, [
|
|
972
972
|
"vs",
|
|
973
973
|
"i",
|
|
974
974
|
"barycenter",
|
|
975
975
|
"weight"
|
|
976
976
|
]));
|
|
977
977
|
}
|
|
978
|
-
function
|
|
978
|
+
function Jt(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 Yt(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(Z(!!t)), c = Xt(a, i, c), r.forEach((e) => {
|
|
987
|
+
c += e.vs.length, a.push(e.vs), o += e.barycenter * e.weight, s += e.weight, c = Xt(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 Xt(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 Z(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 Zt(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
1005
|
let l = Gt(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 = Zt(e, t.v, n, r);
|
|
1009
|
+
c[t.v] = i, Object.hasOwn(i, "barycenter") && $t(t, i);
|
|
1010
1010
|
}
|
|
1011
1011
|
});
|
|
1012
1012
|
let u = Kt(l, n);
|
|
1013
|
-
|
|
1014
|
-
let d =
|
|
1013
|
+
Qt(u, c);
|
|
1014
|
+
let d = Yt(u, r);
|
|
1015
1015
|
if (o && (d.vs = [
|
|
1016
1016
|
o,
|
|
1017
1017
|
d.vs,
|
|
@@ -1022,19 +1022,19 @@ function Xt(e, t, n, r) {
|
|
|
1022
1022
|
}
|
|
1023
1023
|
return d;
|
|
1024
1024
|
}
|
|
1025
|
-
function
|
|
1025
|
+
function Qt(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 $t(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 en(e, t, n, r) {
|
|
1036
1036
|
r ||= e.nodes();
|
|
1037
|
-
let i =
|
|
1037
|
+
let i = tn(e), a = new Ie({ 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 $t(e, t, n, r) {
|
|
|
1046
1046
|
}));
|
|
1047
1047
|
}), a;
|
|
1048
1048
|
}
|
|
1049
|
-
function
|
|
1049
|
+
function tn(e) {
|
|
1050
1050
|
let t;
|
|
1051
|
-
for (; e.hasNode(t =
|
|
1051
|
+
for (; e.hasNode(t = et("_root")););
|
|
1052
1052
|
return t;
|
|
1053
1053
|
}
|
|
1054
1054
|
//#endregion
|
|
1055
1055
|
//#region src/DAG/order/add-subgraph-constraints.js
|
|
1056
|
-
function
|
|
1056
|
+
function nn(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 tn(e, t, n) {
|
|
|
1068
1068
|
}
|
|
1069
1069
|
//#endregion
|
|
1070
1070
|
//#region src/DAG/order/index.js
|
|
1071
|
-
function
|
|
1071
|
+
function rn(e, t = {}) {
|
|
1072
1072
|
if (typeof t.customOrder == "function") {
|
|
1073
|
-
t.customOrder(e,
|
|
1073
|
+
t.customOrder(e, rn);
|
|
1074
1074
|
return;
|
|
1075
1075
|
}
|
|
1076
|
-
let n =
|
|
1077
|
-
if (
|
|
1076
|
+
let n = U(e), r = an(e, tt(1, n + 1), "inEdges"), i = an(e, tt(n - 1, -1, -1), "outEdges"), a = Ht(e);
|
|
1077
|
+
if (sn(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
|
-
|
|
1080
|
+
on(t % 2 == 0 ? r : i, t % 4 >= 2, c), a = z(e);
|
|
1081
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
|
+
sn(e, s);
|
|
1085
1085
|
}
|
|
1086
|
-
function
|
|
1086
|
+
function an(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 rn(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) => en(e, t, n, r.get(t) || []));
|
|
1096
1096
|
}
|
|
1097
|
-
function
|
|
1098
|
-
let r = new
|
|
1097
|
+
function on(e, t, n) {
|
|
1098
|
+
let r = new Ie();
|
|
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 = Zt(e, i, r, t);
|
|
1102
1102
|
a.vs.forEach((t, n) => {
|
|
1103
1103
|
e.node(t).order = n;
|
|
1104
|
-
}),
|
|
1104
|
+
}), nn(e, r, a.vs);
|
|
1105
1105
|
});
|
|
1106
1106
|
}
|
|
1107
|
-
function
|
|
1107
|
+
function sn(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 on(e, t) {
|
|
|
1113
1113
|
}
|
|
1114
1114
|
//#endregion
|
|
1115
1115
|
//#region src/DAG/position/bk.js
|
|
1116
|
-
function
|
|
1116
|
+
function cn(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 = un(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) && dn(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 ln(e, t) {
|
|
1133
1133
|
let n = {};
|
|
1134
1134
|
function r(t, r, i, a, o) {
|
|
1135
1135
|
let s;
|
|
1136
|
-
|
|
1136
|
+
tt(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) && dn(n, t, s);
|
|
1140
1140
|
});
|
|
1141
1141
|
});
|
|
1142
1142
|
}
|
|
@@ -1152,10 +1152,10 @@ function cn(e, t) {
|
|
|
1152
1152
|
}
|
|
1153
1153
|
return t.length && t.reduce(i), n;
|
|
1154
1154
|
}
|
|
1155
|
-
function
|
|
1155
|
+
function un(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 dn(e, t, n) {
|
|
1159
1159
|
if (t > n) {
|
|
1160
1160
|
let e = t;
|
|
1161
1161
|
t = n, n = e;
|
|
@@ -1163,14 +1163,14 @@ function ln(e, t, n) {
|
|
|
1163
1163
|
let r = e[t];
|
|
1164
1164
|
r || (e[t] = r = {}), r[n] = !0;
|
|
1165
1165
|
}
|
|
1166
|
-
function
|
|
1166
|
+
function fn(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 pn(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 dn(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] && !fn(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 dn(e, t, n, r) {
|
|
|
1194
1194
|
align: a
|
|
1195
1195
|
};
|
|
1196
1196
|
}
|
|
1197
|
-
function
|
|
1198
|
-
let a = {}, o =
|
|
1197
|
+
function Q(e, t, n, r, i) {
|
|
1198
|
+
let a = {}, o = mn(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 fn(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 mn(e, t, n, r) {
|
|
1222
|
+
let i = new e.constructor(), a = e.graph(), o = yn(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 pn(e, t, n, r) {
|
|
|
1232
1232
|
});
|
|
1233
1233
|
}), i;
|
|
1234
1234
|
}
|
|
1235
|
-
function
|
|
1235
|
+
function hn(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 = bn(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
|
|
1247
|
-
let n = Object.values(t), r =
|
|
1246
|
+
function gn(e, t) {
|
|
1247
|
+
let n = Object.values(t), r = H(Math.min, n), i = H(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
|
-
let c = Object.values(s), l = r -
|
|
1253
|
-
a !== "l" && (l = i -
|
|
1252
|
+
let c = Object.values(s), l = r - H(Math.min, c);
|
|
1253
|
+
a !== "l" && (l = i - H(Math.max, c)), l && (s = nt(s, (e) => e + l), e[o] = s);
|
|
1254
1254
|
});
|
|
1255
1255
|
});
|
|
1256
1256
|
}
|
|
1257
|
-
function
|
|
1258
|
-
return
|
|
1257
|
+
function _n(e, t) {
|
|
1258
|
+
return nt(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 vn(e) {
|
|
1265
|
+
let t = z(e), n = Object.assign(cn(e, t), ln(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 = pn(e, o, n, s), l = Q(e, o, c.root, c.align, t === "r");
|
|
1271
|
+
t === "r" && (l = nt(l, (e) => -e)), r[a + t] = l;
|
|
1272
1272
|
});
|
|
1273
|
-
}),
|
|
1273
|
+
}), gn(r, hn(e, r)), _n(r, e.graph().align);
|
|
1274
1274
|
}
|
|
1275
|
-
function
|
|
1275
|
+
function yn(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 vn(e, t, n) {
|
|
|
1290
1290
|
return l && (c += n ? l : -l), l = 0, c;
|
|
1291
1291
|
};
|
|
1292
1292
|
}
|
|
1293
|
-
function
|
|
1293
|
+
function bn(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 xn(e) {
|
|
1299
|
+
let t = Ke(e);
|
|
1300
|
+
Sn(t);
|
|
1301
|
+
let n = vn(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 Sn(e) {
|
|
1307
|
+
let t = z(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,17 +1317,17 @@ function xn(e) {
|
|
|
1317
1317
|
}
|
|
1318
1318
|
//#endregion
|
|
1319
1319
|
//#region src/DAG/layout.js
|
|
1320
|
-
function
|
|
1321
|
-
let n = t.debugTiming ?
|
|
1320
|
+
function Cn(e, t = {}) {
|
|
1321
|
+
let n = t.debugTiming ? Qe : $e;
|
|
1322
1322
|
return n("layout", () => {
|
|
1323
1323
|
let r = n(" buildLayoutGraph", () => Nn(e));
|
|
1324
|
-
return n(" runLayout", () =>
|
|
1324
|
+
return n(" runLayout", () => wn(r, n, t)), n(" updateInputGraph", () => Tn(e, r)), r;
|
|
1325
1325
|
});
|
|
1326
1326
|
}
|
|
1327
|
-
function
|
|
1328
|
-
t(" makeSpaceForEdgeLabels", () => Pn(e)), t(" removeSelfEdges", () => Wn(e)), t(" acyclic", () => at(e)), t(" nestingGraph.run", () =>
|
|
1327
|
+
function wn(e, t, n) {
|
|
1328
|
+
t(" makeSpaceForEdgeLabels", () => Pn(e)), t(" removeSelfEdges", () => Wn(e)), t(" acyclic", () => at(e)), t(" nestingGraph.run", () => J(e)), t(" rank", () => St(Ke(e))), t(" injectEdgeLabelProxies", () => Fn(e)), t(" removeEmptyRanks", () => V(e)), t(" nestingGraph.cleanup", () => jt(e)), t(" normalizeRanks", () => B(e)), t(" assignRankMinMax", () => In(e)), t(" removeEdgeLabelProxies", () => Ln(e)), t(" normalize.run", () => st(e)), t(" parentDummyChains", () => Et(e)), t(" addBorderSegments", () => Mt(e)), t(" order", () => rn(e, n)), t(" insertSelfEdges", () => Gn(e)), t(" adjustCoordinateSystem", () => Vt.adjust(e)), t(" position", () => xn(e)), t(" positionSelfEdges", () => Kn(e)), t(" removeBorderNodes", () => Un(e)), t(" normalize.undo", () => lt(e)), t(" fixupEdgeLabelCoords", () => Vn(e)), t(" undoCoordinateSystem", () => Vt.undo(e)), t(" translateGraph", () => Rn(e)), t(" assignNodeIntersects", () => Bn(e)), t(" reversePoints", () => Hn(e)), t(" acyclic.undo", () => ot(e));
|
|
1329
1329
|
}
|
|
1330
|
-
function
|
|
1330
|
+
function Tn(e, t) {
|
|
1331
1331
|
e.nodes().forEach((n) => {
|
|
1332
1332
|
let r = e.node(n), i = t.node(n);
|
|
1333
1333
|
r && (r.x = i.x, r.y = i.y, r.order = i.order, r.rank = i.rank, t.children(n).length && (r.width = i.width, r.height = i.height));
|
|
@@ -1338,27 +1338,27 @@ function wn(e, t) {
|
|
|
1338
1338
|
let n = t.graph(), r = e.graph();
|
|
1339
1339
|
r.width = n.width, r.height = n.height;
|
|
1340
1340
|
}
|
|
1341
|
-
var
|
|
1341
|
+
var En = [
|
|
1342
1342
|
"nodesep",
|
|
1343
1343
|
"edgesep",
|
|
1344
1344
|
"ranksep",
|
|
1345
1345
|
"marginx",
|
|
1346
1346
|
"marginy"
|
|
1347
|
-
],
|
|
1347
|
+
], Dn = {
|
|
1348
1348
|
ranksep: 50,
|
|
1349
1349
|
edgesep: 20,
|
|
1350
1350
|
nodesep: 50,
|
|
1351
1351
|
rankdir: "tb"
|
|
1352
|
-
},
|
|
1352
|
+
}, On = [
|
|
1353
1353
|
"acyclicer",
|
|
1354
1354
|
"ranker",
|
|
1355
1355
|
"rankdir",
|
|
1356
1356
|
"align"
|
|
1357
|
-
],
|
|
1357
|
+
], kn = [
|
|
1358
1358
|
"width",
|
|
1359
1359
|
"height",
|
|
1360
1360
|
"rank"
|
|
1361
|
-
],
|
|
1361
|
+
], $ = {
|
|
1362
1362
|
width: 0,
|
|
1363
1363
|
height: 0
|
|
1364
1364
|
}, An = [
|
|
@@ -1377,24 +1377,24 @@ var Tn = [
|
|
|
1377
1377
|
}, Mn = ["labelpos", "arrowshape"];
|
|
1378
1378
|
function Nn(e) {
|
|
1379
1379
|
let t = Jn(e.graph()), n = {
|
|
1380
|
-
...
|
|
1381
|
-
...qn(t,
|
|
1382
|
-
...
|
|
1383
|
-
}, r = new
|
|
1380
|
+
...Dn,
|
|
1381
|
+
...qn(t, En),
|
|
1382
|
+
...G(t, On)
|
|
1383
|
+
}, r = new Ie({
|
|
1384
1384
|
multigraph: !0,
|
|
1385
1385
|
compound: !0
|
|
1386
1386
|
});
|
|
1387
1387
|
return r.setGraph(n), e.nodes().forEach((t) => {
|
|
1388
|
-
let n = qn(Jn(e.node(t)),
|
|
1389
|
-
Object.keys(
|
|
1390
|
-
n[e] === void 0 && (n[e] =
|
|
1388
|
+
let n = qn(Jn(e.node(t)), kn);
|
|
1389
|
+
Object.keys($).forEach((e) => {
|
|
1390
|
+
n[e] === void 0 && (n[e] = $[e]);
|
|
1391
1391
|
}), r.setNode(t, n), r.setParent(t, e.parent(t));
|
|
1392
1392
|
}), e.edges().forEach((t) => {
|
|
1393
1393
|
let n = Jn(e.edge(t));
|
|
1394
1394
|
r.setEdge(t, {
|
|
1395
1395
|
...jn,
|
|
1396
1396
|
...qn(n, An),
|
|
1397
|
-
...
|
|
1397
|
+
...G(n, Mn)
|
|
1398
1398
|
});
|
|
1399
1399
|
}), r;
|
|
1400
1400
|
}
|
|
@@ -1410,7 +1410,7 @@ function Fn(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
|
+
I(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 Bn(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 = R(r, a), c = R(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 = zn(s, l, 4) : h = zn(c, u, 4)), n.points.unshift(m), n.points.push(h);
|
|
1468
1468
|
});
|
|
1469
1469
|
}
|
|
@@ -1506,12 +1506,12 @@ function Wn(e) {
|
|
|
1506
1506
|
});
|
|
1507
1507
|
}
|
|
1508
1508
|
function Gn(e) {
|
|
1509
|
-
|
|
1509
|
+
z(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
|
+
I(e, "selfedge", {
|
|
1515
1515
|
width: t.label.width,
|
|
1516
1516
|
height: t.label.height,
|
|
1517
1517
|
rank: i.rank,
|
|
@@ -1554,7 +1554,7 @@ function Kn(e) {
|
|
|
1554
1554
|
});
|
|
1555
1555
|
}
|
|
1556
1556
|
function qn(e, t) {
|
|
1557
|
-
return
|
|
1557
|
+
return nt(G(e, t), Number);
|
|
1558
1558
|
}
|
|
1559
1559
|
function Jn(e) {
|
|
1560
1560
|
let t = {};
|
|
@@ -1598,13 +1598,13 @@ function Zn(e) {
|
|
|
1598
1598
|
return n += ` L ${r.x} ${r.y}`, n;
|
|
1599
1599
|
}
|
|
1600
1600
|
function Qn(e) {
|
|
1601
|
-
let { nodes: t, edges: n, configuration: r } = e, i =
|
|
1601
|
+
let { nodes: t, edges: n, configuration: r } = e, i = T(null), a = T(null), o = `dag-arrow-${c()}`;
|
|
1602
1602
|
function s(e, t, n) {
|
|
1603
1603
|
a.value = null, i.value = null;
|
|
1604
1604
|
let r = {
|
|
1605
1605
|
...Yn,
|
|
1606
1606
|
...n
|
|
1607
|
-
}, s = new
|
|
1607
|
+
}, s = new Ie({
|
|
1608
1608
|
multigraph: !0,
|
|
1609
1609
|
compound: !0
|
|
1610
1610
|
});
|
|
@@ -1626,7 +1626,7 @@ function Qn(e) {
|
|
|
1626
1626
|
minlen: e.minLength ?? 1,
|
|
1627
1627
|
arrowShape: r.arrowShape ?? "normal"
|
|
1628
1628
|
});
|
|
1629
|
-
}),
|
|
1629
|
+
}), Cn(s);
|
|
1630
1630
|
let l = e.map((e) => {
|
|
1631
1631
|
let t = s.node(e.id);
|
|
1632
1632
|
return {
|
|
@@ -1680,9 +1680,9 @@ function Qn(e) {
|
|
|
1680
1680
|
arrowSize: r.arrowSize
|
|
1681
1681
|
};
|
|
1682
1682
|
}
|
|
1683
|
-
return
|
|
1683
|
+
return je(() => {
|
|
1684
1684
|
try {
|
|
1685
|
-
s(
|
|
1685
|
+
s(D(t) || [], D(n) || [], D(r) || {});
|
|
1686
1686
|
} catch (e) {
|
|
1687
1687
|
console.error("[useDag] layout error:", e), a.value = e, i.value = null;
|
|
1688
1688
|
}
|
|
@@ -1691,7 +1691,7 @@ function Qn(e) {
|
|
|
1691
1691
|
lastError: a,
|
|
1692
1692
|
arrowMarkerIdentifier: o,
|
|
1693
1693
|
recomputeLayout: () => {
|
|
1694
|
-
s(
|
|
1694
|
+
s(D(t) || [], D(n) || [], D(r) || {});
|
|
1695
1695
|
}
|
|
1696
1696
|
};
|
|
1697
1697
|
}
|
|
@@ -1807,29 +1807,29 @@ var $n = /* @__PURE__ */ e({ default: () => Nr }), er = ["id"], tr = ["id"], nr
|
|
|
1807
1807
|
"rotate"
|
|
1808
1808
|
],
|
|
1809
1809
|
setup(e, { expose: u, emit: ie }) {
|
|
1810
|
-
let
|
|
1810
|
+
let je = be(() => import("./PenAndPaper-KFzKlvbi.js").then((e) => e.t)), Ne = be(() => import("./UserOptions-2x4VklMW.js").then((e) => e.n)), Pe = be(() => import("./PackageVersion-UfoQuPMf.js").then((e) => e.t)), { vue_ui_dag: Fe } = p(), { isThemeValid: Ie, warnInvalidTheme: Le } = ee(), k = e, A = ie, j = T(null), M = T(c()), Re = T(null), ze = T(null), Be = T(null), Ve = T(0), He = T(0), Ue = T(!1), We = T(!1), N = T(null), P = T(null), F = T(null), I = T(null), Ge = T(null), Ke = T("pointer"), qe = T(!1), L = T(mt()), R = v(() => L.value.style.chart.nodes), z = v(() => L.value.style.chart.edges), B = v(() => L.value.style.chart.midpoints), V = v(() => L.value.style.chart);
|
|
1811
1811
|
d({
|
|
1812
|
-
config: () =>
|
|
1813
|
-
dataset: () =>
|
|
1812
|
+
config: () => L.value,
|
|
1813
|
+
dataset: () => k.dataset,
|
|
1814
1814
|
component: "VueUiDag",
|
|
1815
1815
|
rules: [f.noHint]
|
|
1816
1816
|
});
|
|
1817
|
-
let
|
|
1817
|
+
let Je = v(() => L.value.userOptions.useCursorPointer), Ye = T(L.value.style.chart.width), Xe = T(L.value.style.chart.height), H = T({
|
|
1818
1818
|
x: 0,
|
|
1819
1819
|
y: 0
|
|
1820
|
-
}),
|
|
1820
|
+
}), U = T(null), Ze = T(null), Qe = T({
|
|
1821
1821
|
left: "0px",
|
|
1822
1822
|
top: "0px"
|
|
1823
|
-
}),
|
|
1823
|
+
}), $e = T("top"), W = T(!1), et = T({
|
|
1824
1824
|
x: 0,
|
|
1825
1825
|
y: 0
|
|
1826
|
-
}),
|
|
1826
|
+
}), tt = T({
|
|
1827
1827
|
x: 0,
|
|
1828
1828
|
y: 0
|
|
1829
|
-
}),
|
|
1829
|
+
}), G = T(null), nt = T(null), rt = T({
|
|
1830
1830
|
left: "0px",
|
|
1831
1831
|
top: "0px"
|
|
1832
|
-
}),
|
|
1832
|
+
}), it = T("top"), at = T(!1), ot = T(!1), { svgRef: K } = le({ config: V.value.title }), { userOptionsVisible: st, setUserOptionsVisibility: ct, keepUserOptionState: lt } = ce({ config: L.value }), q = T(L.value.style.chart.layout.rankDirection), ut = v(() => a({
|
|
1833
1833
|
defaultConfig: {
|
|
1834
1834
|
userOptions: { show: !1 },
|
|
1835
1835
|
style: { chart: {
|
|
@@ -1845,12 +1845,12 @@ var $n = /* @__PURE__ */ e({ default: () => Nr }), er = ["id"], tr = ["id"], nr
|
|
|
1845
1845
|
}
|
|
1846
1846
|
} }
|
|
1847
1847
|
},
|
|
1848
|
-
userConfig:
|
|
1849
|
-
})), { loading:
|
|
1850
|
-
...
|
|
1851
|
-
FINAL_CONFIG:
|
|
1852
|
-
prepareConfig:
|
|
1853
|
-
skeletonDataset:
|
|
1848
|
+
userConfig: L.value.skeletonConfig ?? {}
|
|
1849
|
+
})), { loading: dt, FINAL_DATASET: ft, manualLoading: pt } = h({
|
|
1850
|
+
...ke(k),
|
|
1851
|
+
FINAL_CONFIG: L,
|
|
1852
|
+
prepareConfig: mt,
|
|
1853
|
+
skeletonDataset: k.config?.skeletonDataset ?? {
|
|
1854
1854
|
nodes: [
|
|
1855
1855
|
{
|
|
1856
1856
|
id: "A",
|
|
@@ -1874,62 +1874,62 @@ var $n = /* @__PURE__ */ e({ default: () => Nr }), er = ["id"], tr = ["id"], nr
|
|
|
1874
1874
|
}]
|
|
1875
1875
|
},
|
|
1876
1876
|
skeletonConfig: a({
|
|
1877
|
-
defaultConfig:
|
|
1878
|
-
userConfig:
|
|
1877
|
+
defaultConfig: L.value,
|
|
1878
|
+
userConfig: ut.value
|
|
1879
1879
|
})
|
|
1880
1880
|
});
|
|
1881
|
-
function
|
|
1881
|
+
function mt() {
|
|
1882
1882
|
let e = _({
|
|
1883
|
-
userConfig:
|
|
1884
|
-
defaultConfig:
|
|
1883
|
+
userConfig: k.config,
|
|
1884
|
+
defaultConfig: Fe
|
|
1885
1885
|
}), t = e.theme;
|
|
1886
1886
|
if (!t) return e;
|
|
1887
|
-
if (!
|
|
1887
|
+
if (!Ie.value(e)) return Le(e), e;
|
|
1888
1888
|
let n = _({
|
|
1889
|
-
userConfig: fe[t] ||
|
|
1889
|
+
userConfig: fe[t] || k.config,
|
|
1890
1890
|
defaultConfig: e
|
|
1891
1891
|
});
|
|
1892
1892
|
return _({
|
|
1893
|
-
userConfig:
|
|
1893
|
+
userConfig: k.config,
|
|
1894
1894
|
defaultConfig: n
|
|
1895
1895
|
});
|
|
1896
1896
|
}
|
|
1897
|
-
let
|
|
1898
|
-
|
|
1899
|
-
r(
|
|
1897
|
+
let ht = v(() => L.value.debug);
|
|
1898
|
+
Ee(async () => {
|
|
1899
|
+
r(k.dataset) && (s({
|
|
1900
1900
|
componentName: "VueUiDag",
|
|
1901
1901
|
type: "dataset",
|
|
1902
|
-
debug:
|
|
1903
|
-
}),
|
|
1902
|
+
debug: ht.value
|
|
1903
|
+
}), We.value = !1, pt.value = !0), (!k.dataset.nodes || k.dataset.nodes.length === 0) && (s({
|
|
1904
1904
|
componentName: "VueUiDag",
|
|
1905
1905
|
type: "datasetAttributeEmpty",
|
|
1906
1906
|
property: "nodes",
|
|
1907
1907
|
index: 0,
|
|
1908
|
-
debug:
|
|
1909
|
-
}),
|
|
1910
|
-
}),
|
|
1911
|
-
|
|
1908
|
+
debug: ht.value
|
|
1909
|
+
}), We.value = !1, pt.value = !0), We.value = !0, await Se(), rn();
|
|
1910
|
+
}), Ae(() => k.config, async (e) => {
|
|
1911
|
+
dt.value || (L.value = mt()), st.value = !L.value.userOptions.showOnChartHover, Ve.value += 1, q.value = V.value.layout.rankDirection, Ye.value = V.value.width, Xe.value = V.value.height, Mt.value = V.value.zoom.active, await Se(), rn();
|
|
1912
1912
|
}, { deep: !0 });
|
|
1913
|
-
let { isPrinting:
|
|
1914
|
-
elementId: `dag_${
|
|
1915
|
-
fileName:
|
|
1916
|
-
options:
|
|
1917
|
-
}),
|
|
1918
|
-
svg:
|
|
1919
|
-
title:
|
|
1913
|
+
let { isPrinting: gt, isImaging: _t, generatePdf: vt, generateImage: yt } = m({
|
|
1914
|
+
elementId: `dag_${M.value}`,
|
|
1915
|
+
fileName: V.value.title.text || "vue-ui-dag",
|
|
1916
|
+
options: L.value.userOptions.print
|
|
1917
|
+
}), bt = v(() => V.value.backgroundColor), xt = v(() => V.value.title), { isCallbackImaging: St, isCallbackSvg: Ct, generateSvg: wt, onGenerateImage: Tt } = te({
|
|
1918
|
+
svg: K,
|
|
1919
|
+
title: xt,
|
|
1920
1920
|
legend: null,
|
|
1921
1921
|
legendItems: null,
|
|
1922
|
-
backgroundColor:
|
|
1923
|
-
getSvgCallback: () =>
|
|
1924
|
-
generateImage:
|
|
1922
|
+
backgroundColor: bt,
|
|
1923
|
+
getSvgCallback: () => L.value.userOptions.callbacks.svg,
|
|
1924
|
+
generateImage: yt
|
|
1925
1925
|
});
|
|
1926
|
-
function
|
|
1927
|
-
|
|
1926
|
+
function Et() {
|
|
1927
|
+
Ue.value = !0, ct(!0);
|
|
1928
1928
|
}
|
|
1929
|
-
function
|
|
1930
|
-
|
|
1929
|
+
function Dt() {
|
|
1930
|
+
ct(!1), Ue.value = !1;
|
|
1931
1931
|
}
|
|
1932
|
-
function
|
|
1932
|
+
function Ot({ tooltipRef: e, isVisibleRef: t, anchorRef: n, styleRef: r, placementRef: i, offsetRef: a, margin: o = 24 }) {
|
|
1933
1933
|
return function() {
|
|
1934
1934
|
let s = e.value;
|
|
1935
1935
|
if (!s || !t.value) return;
|
|
@@ -1950,25 +1950,25 @@ var $n = /* @__PURE__ */ e({ default: () => Nr }), er = ["id"], tr = ["id"], nr
|
|
|
1950
1950
|
};
|
|
1951
1951
|
};
|
|
1952
1952
|
}
|
|
1953
|
-
let { layoutData:
|
|
1954
|
-
nodes: v(() =>
|
|
1953
|
+
let { layoutData: J, lastError: kt, arrowMarkerIdentifier: At } = Qn({
|
|
1954
|
+
nodes: v(() => ft.value.nodes.map((e) => ({
|
|
1955
1955
|
...e,
|
|
1956
|
-
backgroundColor: e.backgroundColor ? i(e.backgroundColor) :
|
|
1957
|
-
color: e.color ? i(e.color) :
|
|
1956
|
+
backgroundColor: e.backgroundColor ? i(e.backgroundColor) : R.value.backgroundColor,
|
|
1957
|
+
color: e.color ? i(e.color) : R.value.labels.color
|
|
1958
1958
|
}))),
|
|
1959
|
-
edges: v(() =>
|
|
1959
|
+
edges: v(() => ft.value.edges),
|
|
1960
1960
|
configuration: v(() => ({
|
|
1961
|
-
...
|
|
1962
|
-
rankDirection:
|
|
1961
|
+
...V.value.layout,
|
|
1962
|
+
rankDirection: q.value
|
|
1963
1963
|
}))
|
|
1964
1964
|
});
|
|
1965
|
-
function
|
|
1966
|
-
return
|
|
1965
|
+
function Y(e) {
|
|
1966
|
+
return J.value ? J.value.nodes.find((t) => t.id === e) : null;
|
|
1967
1967
|
}
|
|
1968
1968
|
v(() => {
|
|
1969
|
-
if (!
|
|
1970
|
-
let e = z.value.
|
|
1971
|
-
return
|
|
1969
|
+
if (!J.value) return [];
|
|
1970
|
+
let e = z.value.stroke, t = /* @__PURE__ */ new Set();
|
|
1971
|
+
return J.value.edges.forEach((n) => {
|
|
1972
1972
|
t.add({
|
|
1973
1973
|
id: n.id,
|
|
1974
1974
|
from: n.from,
|
|
@@ -1977,35 +1977,35 @@ var $n = /* @__PURE__ */ e({ default: () => Nr }), er = ["id"], tr = ["id"], nr
|
|
|
1977
1977
|
});
|
|
1978
1978
|
}), Array.from(t);
|
|
1979
1979
|
});
|
|
1980
|
-
let
|
|
1981
|
-
let e =
|
|
1980
|
+
let jt = v(() => {
|
|
1981
|
+
let e = Ye.value, t = Xe.value, n = Number(e), r = Number(t), i = Number.isFinite(n) && n > 0, a = Number.isFinite(r) && r > 0;
|
|
1982
1982
|
return !i && !a ? null : {
|
|
1983
1983
|
width: i ? n : null,
|
|
1984
1984
|
height: a ? r : null
|
|
1985
1985
|
};
|
|
1986
|
-
}),
|
|
1986
|
+
}), Mt = T(V.value.zoom.active), { viewBox: X, resetZoom: Nt, setInitialViewBox: Pt, scale: Ft, zoomByFactor: It } = ue(K, {
|
|
1987
1987
|
x: 0,
|
|
1988
1988
|
y: 0,
|
|
1989
1989
|
width: 100,
|
|
1990
1990
|
height: 100
|
|
1991
|
-
}, 1,
|
|
1992
|
-
|
|
1993
|
-
}),
|
|
1994
|
-
async function
|
|
1995
|
-
let s =
|
|
1991
|
+
}, 1, Mt, () => {
|
|
1992
|
+
W.value = !1;
|
|
1993
|
+
}), Lt = null;
|
|
1994
|
+
async function Rt(e, { smooth: n = !0, duration: r = 300, zoomReset: i = !1, zoom: a = null } = {}) {
|
|
1995
|
+
let s = Y(e);
|
|
1996
1996
|
if (!s) return !1;
|
|
1997
|
-
let c =
|
|
1997
|
+
let c = X.value;
|
|
1998
1998
|
if (!c) return !1;
|
|
1999
1999
|
let l = {
|
|
2000
2000
|
x: Number(c.x),
|
|
2001
2001
|
y: Number(c.y),
|
|
2002
2002
|
width: Number(c.width),
|
|
2003
2003
|
height: Number(c.height)
|
|
2004
|
-
}, u =
|
|
2004
|
+
}, u = Ft.value, d = l.width, f = l.height, p = u;
|
|
2005
2005
|
if (Number.isFinite(a) && a > 0 || i) {
|
|
2006
|
-
|
|
2007
|
-
let e =
|
|
2008
|
-
d = Number(e.width) / t, f = Number(e.height) / t, p = t,
|
|
2006
|
+
Nt(!1);
|
|
2007
|
+
let e = X.value, t = Number.isFinite(a) && a > 0 ? a / 100 : 1;
|
|
2008
|
+
d = Number(e.width) / t, f = Number(e.height) / t, p = t, X.value = { ...l }, Ft.value = u;
|
|
2009
2009
|
}
|
|
2010
2010
|
let m = Number(s.x), h = Number(s.y);
|
|
2011
2011
|
if (!Number.isFinite(l.x) || !Number.isFinite(l.y) || !Number.isFinite(l.width) || !Number.isFinite(l.height) || !Number.isFinite(d) || !Number.isFinite(f) || !Number.isFinite(m) || !Number.isFinite(h)) return !1;
|
|
@@ -2015,164 +2015,164 @@ var $n = /* @__PURE__ */ e({ default: () => Nr }), er = ["id"], tr = ["id"], nr
|
|
|
2015
2015
|
width: d,
|
|
2016
2016
|
height: f
|
|
2017
2017
|
};
|
|
2018
|
-
if (
|
|
2018
|
+
if (Lt !== null && (cancelAnimationFrame(Lt), Lt = null), W.value = !1, !n || r <= 0) return X.value = g, Ft.value = p, !0;
|
|
2019
2019
|
let _ = performance.now();
|
|
2020
2020
|
function ee(e) {
|
|
2021
2021
|
let n = Math.min((e - _) / r, 1), i = o(n);
|
|
2022
|
-
|
|
2022
|
+
X.value = {
|
|
2023
2023
|
x: t(l.x, g.x, i),
|
|
2024
2024
|
y: t(l.y, g.y, i),
|
|
2025
2025
|
width: t(l.width, g.width, i),
|
|
2026
2026
|
height: t(l.height, g.height, i)
|
|
2027
|
-
},
|
|
2027
|
+
}, Ft.value = t(u, p, i), n < 1 ? Lt = requestAnimationFrame(ee) : (X.value = g, Ft.value = p, Lt = null);
|
|
2028
2028
|
}
|
|
2029
|
-
return
|
|
2029
|
+
return Lt = requestAnimationFrame(ee), !0;
|
|
2030
2030
|
}
|
|
2031
|
-
function
|
|
2032
|
-
|
|
2031
|
+
function zt() {
|
|
2032
|
+
Mt.value = !Mt.value;
|
|
2033
2033
|
}
|
|
2034
|
-
function
|
|
2035
|
-
let e =
|
|
2034
|
+
function Bt() {
|
|
2035
|
+
let e = J.value && J.value.viewBox;
|
|
2036
2036
|
if (!e) return;
|
|
2037
2037
|
let t = String(e).split(" ").map(Number);
|
|
2038
2038
|
if (t.length !== 4) return;
|
|
2039
2039
|
let [n, r, i, a] = t;
|
|
2040
2040
|
if (!Number.isFinite(n) || !Number.isFinite(r) || !Number.isFinite(i) || !Number.isFinite(a)) return;
|
|
2041
|
-
let o = i, s = a, c = n, l = r, u =
|
|
2042
|
-
u && (u.width !== null && (o = u.width), u.height !== null && (s = u.height), c = n - (o - i) / 2, l = r - (s - a) / 2),
|
|
2041
|
+
let o = i, s = a, c = n, l = r, u = jt.value;
|
|
2042
|
+
u && (u.width !== null && (o = u.width), u.height !== null && (s = u.height), c = n - (o - i) / 2, l = r - (s - a) / 2), Pt({
|
|
2043
2043
|
x: c,
|
|
2044
2044
|
y: l,
|
|
2045
2045
|
width: o,
|
|
2046
2046
|
height: s
|
|
2047
2047
|
}, { overwriteCurrentIfNotZoomed: !0 });
|
|
2048
2048
|
}
|
|
2049
|
-
|
|
2050
|
-
|
|
2051
|
-
}, { immediate: !0 }),
|
|
2052
|
-
|
|
2053
|
-
}),
|
|
2054
|
-
|
|
2049
|
+
Ae(() => J.value && J.value.viewBox, () => {
|
|
2050
|
+
Bt();
|
|
2051
|
+
}, { immediate: !0 }), Ae(() => jt.value, () => {
|
|
2052
|
+
Bt();
|
|
2053
|
+
}), Ae(() => ot.value, (e) => {
|
|
2054
|
+
Mt.value = !e;
|
|
2055
2055
|
});
|
|
2056
|
-
let
|
|
2057
|
-
let e =
|
|
2056
|
+
let Vt = v(() => {
|
|
2057
|
+
let e = X.value;
|
|
2058
2058
|
return e ? `${e.x} ${e.y} ${e.width} ${e.height}` : "0 0 0 0";
|
|
2059
|
-
}),
|
|
2060
|
-
function
|
|
2061
|
-
|
|
2059
|
+
}), Ht = T(!1);
|
|
2060
|
+
function Ut(e) {
|
|
2061
|
+
Ht.value = e, He.value += 1;
|
|
2062
2062
|
}
|
|
2063
|
-
function
|
|
2064
|
-
|
|
2063
|
+
function Wt() {
|
|
2064
|
+
ot.value = !ot.value;
|
|
2065
2065
|
}
|
|
2066
|
-
function
|
|
2067
|
-
|
|
2066
|
+
function Gt() {
|
|
2067
|
+
It(Mr, !0);
|
|
2068
2068
|
}
|
|
2069
|
-
function
|
|
2070
|
-
|
|
2069
|
+
function Kt() {
|
|
2070
|
+
It(1 / Mr, !0);
|
|
2071
2071
|
}
|
|
2072
|
-
let
|
|
2072
|
+
let qt = [
|
|
2073
2073
|
"TB",
|
|
2074
2074
|
"RL",
|
|
2075
2075
|
"BT",
|
|
2076
2076
|
"LR"
|
|
2077
2077
|
];
|
|
2078
|
-
function
|
|
2079
|
-
|
|
2080
|
-
}
|
|
2081
|
-
let
|
|
2082
|
-
tooltipRef:
|
|
2083
|
-
isVisibleRef:
|
|
2084
|
-
anchorRef:
|
|
2085
|
-
styleRef:
|
|
2086
|
-
placementRef:
|
|
2078
|
+
function Jt() {
|
|
2079
|
+
q.value = qt[(qt.indexOf(q.value) + 1) % qt.length], Nt(), A("rotate", q.value);
|
|
2080
|
+
}
|
|
2081
|
+
let Yt = Ot({
|
|
2082
|
+
tooltipRef: Ze,
|
|
2083
|
+
isVisibleRef: at,
|
|
2084
|
+
anchorRef: H,
|
|
2085
|
+
styleRef: Qe,
|
|
2086
|
+
placementRef: $e,
|
|
2087
2087
|
isNode: !1
|
|
2088
|
-
}),
|
|
2089
|
-
tooltipRef:
|
|
2090
|
-
isVisibleRef:
|
|
2091
|
-
anchorRef:
|
|
2092
|
-
styleRef:
|
|
2093
|
-
placementRef:
|
|
2094
|
-
offsetRef:
|
|
2095
|
-
}), Z =
|
|
2096
|
-
async function
|
|
2097
|
-
|
|
2098
|
-
let t =
|
|
2088
|
+
}), Xt = Ot({
|
|
2089
|
+
tooltipRef: nt,
|
|
2090
|
+
isVisibleRef: W,
|
|
2091
|
+
anchorRef: et,
|
|
2092
|
+
styleRef: rt,
|
|
2093
|
+
placementRef: it,
|
|
2094
|
+
offsetRef: tt
|
|
2095
|
+
}), Z = T(null);
|
|
2096
|
+
async function Zt(e) {
|
|
2097
|
+
A("onMidpointEnter", e);
|
|
2098
|
+
let t = K.value;
|
|
2099
2099
|
if (!t || !e?.midpoint) return;
|
|
2100
2100
|
let n = t.createSVGPoint();
|
|
2101
2101
|
n.x = e.midpoint.x, n.y = e.midpoint.y;
|
|
2102
2102
|
let r = t.getScreenCTM();
|
|
2103
2103
|
if (!r) return;
|
|
2104
2104
|
let i = n.matrixTransform(r);
|
|
2105
|
-
|
|
2105
|
+
H.value = {
|
|
2106
2106
|
x: i.x,
|
|
2107
2107
|
y: i.y
|
|
2108
|
-
},
|
|
2108
|
+
}, U.value = e, at.value = !0, B.value.selectedEdge.animated === !0 && (Z.value = e.id, un()), await Se(), Yt();
|
|
2109
2109
|
}
|
|
2110
|
-
function
|
|
2111
|
-
|
|
2110
|
+
function Qt() {
|
|
2111
|
+
at.value = !1, U.value = null, A("onMidpointLeave"), B.value.selectedEdge.animated === !0 && (Z.value = null, un());
|
|
2112
2112
|
}
|
|
2113
|
-
async function
|
|
2114
|
-
if (
|
|
2115
|
-
let t =
|
|
2113
|
+
async function $t(e) {
|
|
2114
|
+
if (A("onNodeClick", e), !R.value.tooltip.showOnClick) return;
|
|
2115
|
+
let t = K.value;
|
|
2116
2116
|
if (!t) return;
|
|
2117
2117
|
let n = t.createSVGPoint();
|
|
2118
2118
|
n.x = e.x, n.y = e.y;
|
|
2119
2119
|
let r = t.getScreenCTM();
|
|
2120
2120
|
if (!r) return;
|
|
2121
|
-
let i = n.matrixTransform(r), a =
|
|
2122
|
-
|
|
2121
|
+
let i = n.matrixTransform(r), a = V.value.layout.nodeWidth, o = V.value.layout.nodeHeight, s = r.a, c = r.d, l = a * s, u = o * c;
|
|
2122
|
+
tt.value = {
|
|
2123
2123
|
x: l / 2,
|
|
2124
2124
|
y: u / 2
|
|
2125
|
-
},
|
|
2125
|
+
}, et.value = {
|
|
2126
2126
|
x: i.x,
|
|
2127
2127
|
y: i.y
|
|
2128
|
-
},
|
|
2128
|
+
}, G.value = e, W.value = !0, await Se(), Xt();
|
|
2129
2129
|
}
|
|
2130
|
-
function
|
|
2131
|
-
|
|
2130
|
+
function en() {
|
|
2131
|
+
W.value = !1, G.value = null;
|
|
2132
2132
|
}
|
|
2133
|
-
function
|
|
2134
|
-
if (!(
|
|
2135
|
-
let t =
|
|
2133
|
+
function tn(e) {
|
|
2134
|
+
if (!(W.value || at.value)) return;
|
|
2135
|
+
let t = nt.value;
|
|
2136
2136
|
if (t && t.contains(e.target)) return;
|
|
2137
|
-
let n =
|
|
2137
|
+
let n = Ze.value;
|
|
2138
2138
|
if (n && n.contains(e.target)) return;
|
|
2139
|
-
let r =
|
|
2139
|
+
let r = K.value;
|
|
2140
2140
|
if (r && r.contains(e.target)) {
|
|
2141
2141
|
let t = e.target.closest(".vue-ui-dag-node"), n = e.target.closest(".vue-ui-dag-edge-midpoint");
|
|
2142
2142
|
if (t || n) return;
|
|
2143
2143
|
}
|
|
2144
|
-
|
|
2144
|
+
en(), Qt(), qe.value || In();
|
|
2145
2145
|
}
|
|
2146
|
-
function
|
|
2147
|
-
e.key === "Escape" && (
|
|
2146
|
+
function nn(e) {
|
|
2147
|
+
e.key === "Escape" && (W.value && en(), at.value && Qt());
|
|
2148
2148
|
}
|
|
2149
|
-
|
|
2150
|
-
document.addEventListener("mousedown",
|
|
2151
|
-
}),
|
|
2152
|
-
document.removeEventListener("mousedown",
|
|
2149
|
+
Ee(() => {
|
|
2150
|
+
document.addEventListener("mousedown", tn), document.addEventListener("keydown", nn);
|
|
2151
|
+
}), Te(() => {
|
|
2152
|
+
document.removeEventListener("mousedown", tn), document.removeEventListener("keydown", nn), N.value && (P.value && N.value.unobserve(P.value), N.value.disconnect());
|
|
2153
2153
|
});
|
|
2154
|
-
function
|
|
2155
|
-
if (!
|
|
2156
|
-
|
|
2154
|
+
function rn() {
|
|
2155
|
+
if (!L.value.responsive) {
|
|
2156
|
+
N.value && (P.value && N.value.unobserve(P.value), N.value.disconnect(), N.value = null, P.value = null);
|
|
2157
2157
|
return;
|
|
2158
2158
|
}
|
|
2159
2159
|
let e = ae(() => {
|
|
2160
|
-
if (!
|
|
2160
|
+
if (!j.value) return;
|
|
2161
2161
|
let { width: e, height: t } = oe({
|
|
2162
|
-
chart:
|
|
2163
|
-
title:
|
|
2164
|
-
legend:
|
|
2165
|
-
source:
|
|
2162
|
+
chart: j.value,
|
|
2163
|
+
title: V.value.title.text ? Re.value : null,
|
|
2164
|
+
legend: V.value.controls.show ? Be.value?.$el : null,
|
|
2165
|
+
source: ze.value
|
|
2166
2166
|
});
|
|
2167
2167
|
requestAnimationFrame(() => {
|
|
2168
|
-
|
|
2168
|
+
Ye.value = Math.max(.1, e), Xe.value = Math.max(.1, t - 12);
|
|
2169
2169
|
});
|
|
2170
2170
|
});
|
|
2171
|
-
|
|
2171
|
+
N.value && (P.value && N.value.unobserve(P.value), N.value.disconnect()), N.value = new ResizeObserver(e), P.value = j.value ? j.value.parentNode : null, P.value && N.value.observe(P.value), e();
|
|
2172
2172
|
}
|
|
2173
|
-
function
|
|
2173
|
+
function an(e, t = {}) {
|
|
2174
2174
|
let { direction: n = -1, mode: r = "oneLapNearest", dasharray: i = null } = t;
|
|
2175
|
-
if (!e || typeof e.getTotalLength != "function") return
|
|
2175
|
+
if (!e || typeof e.getTotalLength != "function") return ht.value && console.warn("VueUiDag @getIdealDashoffsetDelta: invalid path element", e), 0;
|
|
2176
2176
|
let a = e.getTotalLength(), o = d(i ?? e.getAttribute("stroke-dasharray") ?? (typeof getComputedStyle == "function" ? getComputedStyle(e).strokeDasharray : ""));
|
|
2177
2177
|
if (!Number.isFinite(o) || o <= 0) return n * a;
|
|
2178
2178
|
let s = Math.max(1, Math.round(a / o)), c = Math.max(1, Math.ceil(a / o)), l = Math.max(1, Math.floor(a / o)), u;
|
|
@@ -2185,26 +2185,26 @@ var $n = /* @__PURE__ */ e({ default: () => Nr }), er = ["id"], tr = ["id"], nr
|
|
|
2185
2185
|
return t.length % 2 == 1 ? n * 2 : n;
|
|
2186
2186
|
}
|
|
2187
2187
|
}
|
|
2188
|
-
let
|
|
2189
|
-
function
|
|
2188
|
+
let on = T(/* @__PURE__ */ new Map()), sn = T(/* @__PURE__ */ new Map());
|
|
2189
|
+
function cn(e) {
|
|
2190
2190
|
return function(t) {
|
|
2191
|
-
t ?
|
|
2191
|
+
t ? on.value.set(e, t) : on.value.delete(e);
|
|
2192
2192
|
};
|
|
2193
2193
|
}
|
|
2194
|
-
function
|
|
2195
|
-
|
|
2194
|
+
function ln() {
|
|
2195
|
+
sn.value.forEach((e) => {
|
|
2196
2196
|
try {
|
|
2197
2197
|
e.cancel();
|
|
2198
2198
|
} catch {}
|
|
2199
|
-
}),
|
|
2199
|
+
}), sn.value.clear();
|
|
2200
2200
|
}
|
|
2201
|
-
function
|
|
2202
|
-
|
|
2203
|
-
let e =
|
|
2201
|
+
function un() {
|
|
2202
|
+
ln();
|
|
2203
|
+
let e = J.value?.edges ?? [];
|
|
2204
2204
|
if (!e.length) return;
|
|
2205
|
-
let t = z.value.
|
|
2205
|
+
let t = z.value.animations, n = Number(t.referenceDistance) > 0 ? Number(t.referenceDistance) : 24;
|
|
2206
2206
|
e.forEach((e) => {
|
|
2207
|
-
let r =
|
|
2207
|
+
let r = B.value.selectedEdge.animated === !0 && Z.value != null && e.id === Z.value, i = !!e?.original?.animated || !!e?.animated || r, a = on.value.get(e.id);
|
|
2208
2208
|
if (!a) return;
|
|
2209
2209
|
if (!i) {
|
|
2210
2210
|
a.style.strokeDasharray = "0", a.style.strokeDashoffset = "0";
|
|
@@ -2212,7 +2212,7 @@ var $n = /* @__PURE__ */ e({ default: () => Nr }), er = ["id"], tr = ["id"], nr
|
|
|
2212
2212
|
}
|
|
2213
2213
|
let o = e?.original?.dasharray ?? t.dasharray;
|
|
2214
2214
|
a.style.strokeDasharray = String(o), a.style.strokeDashoffset = "0";
|
|
2215
|
-
let s = ![void 0, null].includes(e?.original?.animationDirection), c = ![void 0, null].includes(t.animationDirection), l =
|
|
2215
|
+
let s = ![void 0, null].includes(e?.original?.animationDirection), c = ![void 0, null].includes(t.animationDirection), l = an(a, {
|
|
2216
2216
|
direction: s ? Number(e.original.animationDirection) : c ? Number(t.animationDirection) : -1,
|
|
2217
2217
|
mode: "oneLapNearest",
|
|
2218
2218
|
dasharray: String(o)
|
|
@@ -2221,21 +2221,21 @@ var $n = /* @__PURE__ */ e({ default: () => Nr }), er = ["id"], tr = ["id"], nr
|
|
|
2221
2221
|
iterations: Infinity,
|
|
2222
2222
|
easing: "linear"
|
|
2223
2223
|
});
|
|
2224
|
-
|
|
2224
|
+
sn.value.set(e.id, m);
|
|
2225
2225
|
});
|
|
2226
2226
|
}
|
|
2227
|
-
|
|
2228
|
-
await
|
|
2227
|
+
Ae(() => J.value && J.value.edges, async () => {
|
|
2228
|
+
await Se(), un();
|
|
2229
2229
|
}, {
|
|
2230
2230
|
deep: !0,
|
|
2231
2231
|
immediate: !0
|
|
2232
|
-
}),
|
|
2233
|
-
|
|
2232
|
+
}), Te(() => {
|
|
2233
|
+
ln();
|
|
2234
2234
|
});
|
|
2235
|
-
async function
|
|
2236
|
-
if (!
|
|
2237
|
-
let { width: t, height: n } =
|
|
2238
|
-
domElement:
|
|
2235
|
+
async function dn({ scale: e = 2 } = {}) {
|
|
2236
|
+
if (!j.value) return;
|
|
2237
|
+
let { width: t, height: n } = j.value.getBoundingClientRect(), r = t / n, { imageUri: i, base64: a } = await ne({
|
|
2238
|
+
domElement: j.value,
|
|
2239
2239
|
base64: !0,
|
|
2240
2240
|
img: !0,
|
|
2241
2241
|
scale: e
|
|
@@ -2243,121 +2243,121 @@ var $n = /* @__PURE__ */ e({ default: () => Nr }), er = ["id"], tr = ["id"], nr
|
|
|
2243
2243
|
return {
|
|
2244
2244
|
imageUri: i,
|
|
2245
2245
|
base64: a,
|
|
2246
|
-
title:
|
|
2246
|
+
title: V.value.title.text ?? "vue-ui-dag",
|
|
2247
2247
|
width: t,
|
|
2248
2248
|
height: n,
|
|
2249
2249
|
aspectRatio: r
|
|
2250
2250
|
};
|
|
2251
2251
|
}
|
|
2252
|
-
let
|
|
2253
|
-
let e = Number(
|
|
2254
|
-
return Number.isFinite(e) && e > 0 ? e /
|
|
2255
|
-
}),
|
|
2256
|
-
function
|
|
2257
|
-
|
|
2252
|
+
let fn = v(() => {
|
|
2253
|
+
let e = Number(V.value.layout.nodeHeight);
|
|
2254
|
+
return Number.isFinite(e) && e > 0 ? e / V.value.backgroundPattern.spacingRatio : 12;
|
|
2255
|
+
}), pn = v(() => fn.value * (V.value.backgroundPattern.dotRadiusRatio / 100)), Q = T(null), mn = null, hn = 0;
|
|
2256
|
+
function gn(e) {
|
|
2257
|
+
mn &&= (clearTimeout(mn), null), Q.value !== e && (Q.value = e, (R.value.selected.downstreamEdges.animated === !0 || R.value.selected.upstreamEdges.animated === !0) && un());
|
|
2258
2258
|
}
|
|
2259
|
-
function
|
|
2260
|
-
|
|
2259
|
+
function _n(e) {
|
|
2260
|
+
Ke.value = "pointer", Z.value = null, gn(e);
|
|
2261
2261
|
}
|
|
2262
|
-
async function
|
|
2263
|
-
|
|
2262
|
+
async function vn(e) {
|
|
2263
|
+
Ke.value = "pointer", Q.value = null, await Zt(e);
|
|
2264
2264
|
}
|
|
2265
|
-
function
|
|
2266
|
-
let t = ++
|
|
2267
|
-
|
|
2268
|
-
t ===
|
|
2265
|
+
function yn(e) {
|
|
2266
|
+
let t = ++hn;
|
|
2267
|
+
mn && clearTimeout(mn), mn = setTimeout(() => {
|
|
2268
|
+
t === hn && Q.value === e && (Q.value = null, (R.value.selected.downstreamEdges.animated === !0 || R.value.selected.upstreamEdges.animated === !0) && un());
|
|
2269
2269
|
}, 20);
|
|
2270
2270
|
}
|
|
2271
|
-
function
|
|
2272
|
-
let t = e.from ===
|
|
2273
|
-
return i &&
|
|
2271
|
+
function bn(e) {
|
|
2272
|
+
let t = e.from === Q.value, n = e.to === Q.value, r = I.value === "midpoint" && F.value === e.id, i = Z.value === e.id || U.value?.id === e.id || r, a = e.original.color ?? z.value.stroke;
|
|
2273
|
+
return i && B.value.selectedEdge.stroke != null ? a = B.value.selectedEdge.stroke : t && R.value.selected.downstreamEdges.stroke != null ? a = R.value.selected.downstreamEdges.stroke : n && R.value.selected.upstreamEdges.stroke != null && (a = R.value.selected.upstreamEdges.stroke), e.animated = t && R.value.selected.downstreamEdges.animated === !0 || n && R.value.selected.upstreamEdges.animated === !0 || r && B.value.selectedEdge.animated === !0 ? !0 : (J.value?.edges.find((t) => t.id === e.id))?.original?.animated ?? !1, {
|
|
2274
2274
|
d: e.pathData,
|
|
2275
2275
|
fill: "none",
|
|
2276
2276
|
stroke: a,
|
|
2277
|
-
"stroke-width": z.value.
|
|
2277
|
+
"stroke-width": z.value.strokeWidth * (i || e.from === Q.value ? 2 : 1),
|
|
2278
2278
|
"stroke-linecap": "round",
|
|
2279
2279
|
"stroke-linejoin": "round"
|
|
2280
2280
|
};
|
|
2281
2281
|
}
|
|
2282
|
-
function
|
|
2283
|
-
return
|
|
2282
|
+
function xn(e) {
|
|
2283
|
+
return I.value === "node" && F.value === e;
|
|
2284
2284
|
}
|
|
2285
|
-
function
|
|
2286
|
-
let t =
|
|
2285
|
+
function Sn(e) {
|
|
2286
|
+
let t = Q.value === e.id, n = I.value === "node" && F.value === e.id, r = t || n, i = r && R.value.selected.backgroundColor != null ? R.value.selected.backgroundColor : e.original.backgroundColor, a = r && R.value.selected.stroke != null ? R.value.selected.stroke : R.value.stroke, o = r && R.value.selected.strokeWidth != null ? R.value.selected.strokeWidth : R.value.strokeWidth;
|
|
2287
2287
|
return {
|
|
2288
2288
|
x: e.x - e.width / 2,
|
|
2289
2289
|
y: e.y - e.height / 2,
|
|
2290
2290
|
width: e.width,
|
|
2291
2291
|
height: e.height,
|
|
2292
|
-
rx:
|
|
2292
|
+
rx: R.value.borderRadius,
|
|
2293
2293
|
fill: i,
|
|
2294
2294
|
stroke: a,
|
|
2295
2295
|
"stroke-width": o
|
|
2296
2296
|
};
|
|
2297
2297
|
}
|
|
2298
|
-
function
|
|
2299
|
-
let t = e.from ===
|
|
2300
|
-
return i &&
|
|
2298
|
+
function Cn(e) {
|
|
2299
|
+
let t = e.from === Q.value, n = e.to === Q.value, r = I.value === "midpoint" && F.value === e.id, i = Z.value === e.id || U.value?.id === e.id || r, a = e.original.color ?? z.value.stroke;
|
|
2300
|
+
return i && B.value.selectedEdge.stroke != null ? a = B.value.selectedEdge.stroke : t && R.value.selected.downstreamEdges.stroke != null ? a = R.value.selected.downstreamEdges.stroke : n && R.value.selected.upstreamEdges.stroke != null && (a = R.value.selected.upstreamEdges.stroke), {
|
|
2301
2301
|
cx: e?.midpoint?.x,
|
|
2302
2302
|
cy: e?.midpoint?.y,
|
|
2303
|
-
r:
|
|
2304
|
-
fill: r ?
|
|
2303
|
+
r: B.value.radius,
|
|
2304
|
+
fill: r ? B.value.selectedEdge.stroke ?? B.value.fill : B.value.fill,
|
|
2305
2305
|
stroke: a,
|
|
2306
|
-
"stroke-width": z.value.
|
|
2306
|
+
"stroke-width": z.value.strokeWidth * (i || e.from === Q.value ? 2 : 1)
|
|
2307
2307
|
};
|
|
2308
2308
|
}
|
|
2309
|
-
function
|
|
2310
|
-
let t = e.from ===
|
|
2311
|
-
return i &&
|
|
2309
|
+
function wn(e) {
|
|
2310
|
+
let t = e.from === Q.value, n = e.to === Q.value, r = I.value === "midpoint" && F.value === e.id, i = Z.value === e.id || U.value?.id === e.id || r, a = e.color ?? e.original?.color ?? z.value.stroke;
|
|
2311
|
+
return i && B.value.selectedEdge.stroke != null ? a = B.value.selectedEdge.stroke : t && R.value.selected.downstreamEdges.stroke != null ? a = R.value.selected.downstreamEdges.stroke : n && R.value.selected.upstreamEdges.stroke != null && (a = R.value.selected.upstreamEdges.stroke), a;
|
|
2312
2312
|
}
|
|
2313
|
-
function
|
|
2314
|
-
return `${
|
|
2313
|
+
function Tn(e) {
|
|
2314
|
+
return `${At}-${String(e).replace(/[^a-zA-Z0-9_-]/g, "_")}`;
|
|
2315
2315
|
}
|
|
2316
|
-
function
|
|
2317
|
-
return
|
|
2316
|
+
function En() {
|
|
2317
|
+
return J.value;
|
|
2318
2318
|
}
|
|
2319
|
-
async function
|
|
2320
|
-
if (
|
|
2321
|
-
config:
|
|
2322
|
-
dataset:
|
|
2323
|
-
}), !
|
|
2319
|
+
async function Dn() {
|
|
2320
|
+
if (A("copyAlt", {
|
|
2321
|
+
config: L.value,
|
|
2322
|
+
dataset: ft.value
|
|
2323
|
+
}), !L.value.userOptions.callbacks.altCopy) {
|
|
2324
2324
|
console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.");
|
|
2325
2325
|
return;
|
|
2326
2326
|
}
|
|
2327
|
-
await Promise.resolve(
|
|
2328
|
-
config:
|
|
2329
|
-
dataset:
|
|
2327
|
+
await Promise.resolve(L.value.userOptions.callbacks.altCopy({
|
|
2328
|
+
config: L.value,
|
|
2329
|
+
dataset: ft.value
|
|
2330
2330
|
}));
|
|
2331
2331
|
}
|
|
2332
|
-
let
|
|
2332
|
+
let On = v(() => (J.value?.nodes ?? []).map((e) => ({
|
|
2333
2333
|
id: e.id,
|
|
2334
2334
|
type: "node",
|
|
2335
2335
|
x: e.x,
|
|
2336
2336
|
y: e.y,
|
|
2337
2337
|
label: e.label ?? e.id,
|
|
2338
2338
|
raw: e
|
|
2339
|
-
}))),
|
|
2339
|
+
}))), kn = v(() => B.value.show ? (J.value?.edges ?? []).filter((e) => e?.midpoint).map((e) => ({
|
|
2340
2340
|
id: e.id,
|
|
2341
2341
|
type: "midpoint",
|
|
2342
2342
|
x: e.midpoint.x,
|
|
2343
2343
|
y: e.midpoint.y,
|
|
2344
|
-
label: `${
|
|
2344
|
+
label: `${Y(e.from)?.label ?? e.from} → ${Y(e.to)?.label ?? e.to}`,
|
|
2345
2345
|
raw: e
|
|
2346
|
-
})) : []),
|
|
2346
|
+
})) : []), $ = v(() => [...On.value, ...kn.value].sort((e, t) => e.x === t.x ? e.y - t.y : e.x - t.x)), An = v(() => {
|
|
2347
2347
|
let e = /* @__PURE__ */ new Map();
|
|
2348
|
-
return
|
|
2348
|
+
return $.value.forEach((t, n) => {
|
|
2349
2349
|
e.set(`${t.type}:${t.id}`, n);
|
|
2350
2350
|
}), e;
|
|
2351
|
-
}),
|
|
2352
|
-
let e =
|
|
2351
|
+
}), jn = v(() => {
|
|
2352
|
+
let e = J.value?.nodes ?? [], t = J.value?.edges ?? [];
|
|
2353
2353
|
return {
|
|
2354
2354
|
headers: [
|
|
2355
|
-
|
|
2356
|
-
|
|
2357
|
-
|
|
2355
|
+
L.value.a11y?.translations?.node ?? "Node",
|
|
2356
|
+
L.value.a11y?.translations?.parents ?? "Parents",
|
|
2357
|
+
L.value.a11y?.translations?.children ?? "Children"
|
|
2358
2358
|
],
|
|
2359
2359
|
rows: e.map((e) => {
|
|
2360
|
-
let n = t.filter((t) => t.to === e.id).map((e) =>
|
|
2360
|
+
let n = t.filter((t) => t.to === e.id).map((e) => Y(e.from)?.label ?? e.from).join(", "), r = t.filter((t) => t.from === e.id).map((e) => Y(e.to)?.label ?? e.to).join(", ");
|
|
2361
2361
|
return [
|
|
2362
2362
|
e.label ?? e.id,
|
|
2363
2363
|
n || "—",
|
|
@@ -2366,140 +2366,140 @@ var $n = /* @__PURE__ */ e({ default: () => Nr }), er = ["id"], tr = ["id"], nr
|
|
|
2366
2366
|
})
|
|
2367
2367
|
};
|
|
2368
2368
|
});
|
|
2369
|
-
function
|
|
2369
|
+
function Mn(e) {
|
|
2370
2370
|
return `${e.type}:${e.id}`;
|
|
2371
2371
|
}
|
|
2372
|
-
function
|
|
2373
|
-
return
|
|
2372
|
+
function Nn() {
|
|
2373
|
+
return F.value == null || I.value == null ? null : $.value.find((e) => e.id === F.value && e.type === I.value) ?? null;
|
|
2374
2374
|
}
|
|
2375
|
-
async function
|
|
2375
|
+
async function Pn(e) {
|
|
2376
2376
|
if (e) {
|
|
2377
2377
|
if (e.type === "node") {
|
|
2378
|
-
|
|
2378
|
+
Qt();
|
|
2379
2379
|
return;
|
|
2380
2380
|
}
|
|
2381
|
-
e.type === "midpoint" && (
|
|
2381
|
+
e.type === "midpoint" && (en(), await Zt(e.raw));
|
|
2382
2382
|
}
|
|
2383
2383
|
}
|
|
2384
|
-
function
|
|
2384
|
+
function Fn(e) {
|
|
2385
2385
|
if (e) {
|
|
2386
|
-
if (
|
|
2387
|
-
|
|
2386
|
+
if (F.value = e.id, I.value = e.type, Ge.value = An.value.get(Mn(e)) ?? null, e.type === "node") {
|
|
2387
|
+
gn(e.id), Z.value = null;
|
|
2388
2388
|
return;
|
|
2389
2389
|
}
|
|
2390
|
-
e.type === "midpoint" && (
|
|
2390
|
+
e.type === "midpoint" && (Q.value = null, Z.value = e.id, B.value.selectedEdge.animated === !0 && un());
|
|
2391
2391
|
}
|
|
2392
2392
|
}
|
|
2393
|
-
function
|
|
2394
|
-
|
|
2393
|
+
function In() {
|
|
2394
|
+
F.value = null, I.value = null, Ge.value = null, W.value || (Q.value = null), at.value || (Z.value = null, B.value.selectedEdge.animated === !0 && un());
|
|
2395
2395
|
}
|
|
2396
|
-
function
|
|
2397
|
-
|
|
2396
|
+
function Ln() {
|
|
2397
|
+
qe.value = !0, In();
|
|
2398
2398
|
}
|
|
2399
|
-
function
|
|
2400
|
-
|
|
2399
|
+
function Rn() {
|
|
2400
|
+
qe.value = !1, en(), Qt(), In();
|
|
2401
2401
|
}
|
|
2402
|
-
function
|
|
2402
|
+
function zn(e, t, n) {
|
|
2403
2403
|
let r = t.x - e.x, i = t.y - e.y;
|
|
2404
2404
|
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);
|
|
2405
2405
|
}
|
|
2406
|
-
function
|
|
2407
|
-
let n =
|
|
2406
|
+
function Bn(e, t) {
|
|
2407
|
+
let n = $.value.filter((t) => Mn(t) !== Mn(e));
|
|
2408
2408
|
if (!n.length) return null;
|
|
2409
2409
|
let r = null, i = Infinity;
|
|
2410
2410
|
return n.forEach((n) => {
|
|
2411
|
-
let a =
|
|
2411
|
+
let a = zn(e, n, t);
|
|
2412
2412
|
a < i && (i = a, r = n);
|
|
2413
|
-
}), r || (t === "right" || t === "down" ?
|
|
2413
|
+
}), r || (t === "right" || t === "down" ? $.value[0] ?? null : $.value[$.value.length - 1] ?? null);
|
|
2414
2414
|
}
|
|
2415
|
-
async function
|
|
2416
|
-
e && (
|
|
2415
|
+
async function Vn(e) {
|
|
2416
|
+
e && (Ke.value = "keyboard", e.type === "node" && (Qt(), await $t(e.raw)));
|
|
2417
2417
|
}
|
|
2418
|
-
async function
|
|
2419
|
-
if (!
|
|
2418
|
+
async function Hn(e) {
|
|
2419
|
+
if (!K.value || ot.value || document.activeElement !== K.value || !$.value.length) return;
|
|
2420
2420
|
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";
|
|
2421
2421
|
if (!t && !n && !r && !i && !a && !o) return;
|
|
2422
2422
|
if (e.preventDefault(), e.stopPropagation(), o) {
|
|
2423
|
-
|
|
2423
|
+
en(), Qt(), In();
|
|
2424
2424
|
return;
|
|
2425
2425
|
}
|
|
2426
|
-
let s =
|
|
2426
|
+
let s = Nn();
|
|
2427
2427
|
if (a) {
|
|
2428
2428
|
if (!s) return;
|
|
2429
|
-
s.type === "node" && await
|
|
2429
|
+
s.type === "node" && await Vn(s);
|
|
2430
2430
|
return;
|
|
2431
2431
|
}
|
|
2432
2432
|
if (!s) {
|
|
2433
|
-
let e =
|
|
2433
|
+
let e = $.value[0];
|
|
2434
2434
|
if (!e) return;
|
|
2435
|
-
|
|
2435
|
+
Fn(e), await Pn(e);
|
|
2436
2436
|
return;
|
|
2437
2437
|
}
|
|
2438
2438
|
let c = null;
|
|
2439
|
-
n ? c =
|
|
2439
|
+
n ? c = Bn(s, "right") : t ? c = Bn(s, "left") : i ? c = Bn(s, "down") : r && (c = Bn(s, "up")), c && (en(), Qt(), Fn(c), await Pn(c));
|
|
2440
2440
|
}
|
|
2441
2441
|
return u({
|
|
2442
|
-
getData:
|
|
2443
|
-
getImage:
|
|
2444
|
-
generatePdf:
|
|
2445
|
-
generateSvg:
|
|
2446
|
-
generateImage:
|
|
2447
|
-
toggleAnnotator:
|
|
2448
|
-
toggleFullscreen:
|
|
2449
|
-
zoomIn:
|
|
2450
|
-
zoomOut:
|
|
2451
|
-
resetZoom:
|
|
2452
|
-
switchDirection:
|
|
2453
|
-
copyAlt:
|
|
2454
|
-
focusOnNode:
|
|
2455
|
-
}), (e, t) => (
|
|
2456
|
-
class:
|
|
2457
|
-
id: `dag_${
|
|
2442
|
+
getData: En,
|
|
2443
|
+
getImage: dn,
|
|
2444
|
+
generatePdf: vt,
|
|
2445
|
+
generateSvg: wt,
|
|
2446
|
+
generateImage: yt,
|
|
2447
|
+
toggleAnnotator: Wt,
|
|
2448
|
+
toggleFullscreen: Ut,
|
|
2449
|
+
zoomIn: Gt,
|
|
2450
|
+
zoomOut: Kt,
|
|
2451
|
+
resetZoom: Nt,
|
|
2452
|
+
switchDirection: Jt,
|
|
2453
|
+
copyAlt: Dn,
|
|
2454
|
+
focusOnNode: Rt
|
|
2455
|
+
}), (e, t) => (w(), b("div", {
|
|
2456
|
+
class: Ce(`vue-data-ui-component vue-ui-dag ${Ht.value ? "vue-data-ui-wrapper-fullscreen" : ""} ${L.value.responsive ? "vue-ui-dag-responsive" : ""}`),
|
|
2457
|
+
id: `dag_${M.value}`,
|
|
2458
2458
|
ref_key: "dagChart",
|
|
2459
|
-
ref:
|
|
2460
|
-
style:
|
|
2461
|
-
fontFamily:
|
|
2462
|
-
backgroundColor:
|
|
2459
|
+
ref: j,
|
|
2460
|
+
style: we({
|
|
2461
|
+
fontFamily: L.value.style.fontFamily,
|
|
2462
|
+
backgroundColor: V.value.backgroundColor,
|
|
2463
2463
|
padding: "0.5rem"
|
|
2464
2464
|
}),
|
|
2465
|
-
onMouseenter:
|
|
2466
|
-
onMouseleave:
|
|
2465
|
+
onMouseenter: Et,
|
|
2466
|
+
onMouseleave: Dt
|
|
2467
2467
|
}, [
|
|
2468
|
-
|
|
2469
|
-
id: `chart-instructions-${
|
|
2468
|
+
x("div", {
|
|
2469
|
+
id: `chart-instructions-${M.value}`,
|
|
2470
2470
|
class: "sr-only"
|
|
2471
|
-
}, [
|
|
2472
|
-
|
|
2471
|
+
}, [x("p", null, Oe(L.value.a11y.translations.keyboardNavigation), 1)], 8, tr),
|
|
2472
|
+
jn.value?.rows?.length ? (w(), ge(se, {
|
|
2473
2473
|
key: 0,
|
|
2474
|
-
uid:
|
|
2475
|
-
head:
|
|
2476
|
-
body:
|
|
2477
|
-
notice:
|
|
2478
|
-
caption:
|
|
2474
|
+
uid: M.value,
|
|
2475
|
+
head: jn.value.headers,
|
|
2476
|
+
body: jn.value.rows,
|
|
2477
|
+
notice: L.value.a11y.translations.tableAvailable,
|
|
2478
|
+
caption: L.value.a11y.translations.tableCaption
|
|
2479
2479
|
}, null, 8, [
|
|
2480
2480
|
"uid",
|
|
2481
2481
|
"head",
|
|
2482
2482
|
"body",
|
|
2483
2483
|
"notice",
|
|
2484
2484
|
"caption"
|
|
2485
|
-
])) :
|
|
2486
|
-
|
|
2487
|
-
|
|
2485
|
+
])) : y("", !0),
|
|
2486
|
+
D(kt) ? (w(), b("div", nr, Oe(String(D(kt))), 1)) : y("", !0),
|
|
2487
|
+
L.value.userOptions.buttons.annotator ? (w(), ge(D(je), {
|
|
2488
2488
|
key: 2,
|
|
2489
|
-
svgRef:
|
|
2490
|
-
backgroundColor:
|
|
2491
|
-
color:
|
|
2492
|
-
active:
|
|
2493
|
-
isCursorPointer:
|
|
2494
|
-
palette:
|
|
2495
|
-
onClose:
|
|
2489
|
+
svgRef: D(K),
|
|
2490
|
+
backgroundColor: V.value.backgroundColor,
|
|
2491
|
+
color: V.value.color,
|
|
2492
|
+
active: ot.value,
|
|
2493
|
+
isCursorPointer: Je.value,
|
|
2494
|
+
palette: L.value.userOptions.annotatorPalette,
|
|
2495
|
+
onClose: Wt
|
|
2496
2496
|
}, {
|
|
2497
|
-
"annotator-action-close":
|
|
2498
|
-
"annotator-action-color":
|
|
2499
|
-
"annotator-action-draw":
|
|
2500
|
-
"annotator-action-undo":
|
|
2501
|
-
"annotator-action-redo":
|
|
2502
|
-
"annotator-action-delete":
|
|
2497
|
+
"annotator-action-close": O(() => [E(e.$slots, "annotator-action-close", {}, void 0, !0)]),
|
|
2498
|
+
"annotator-action-color": O(({ color: t }) => [E(e.$slots, "annotator-action-color", C(S({ color: t })), void 0, !0)]),
|
|
2499
|
+
"annotator-action-draw": O(({ mode: t }) => [E(e.$slots, "annotator-action-draw", C(S({ mode: t })), void 0, !0)]),
|
|
2500
|
+
"annotator-action-undo": O(({ disabled: t }) => [E(e.$slots, "annotator-action-undo", C(S({ disabled: t })), void 0, !0)]),
|
|
2501
|
+
"annotator-action-redo": O(({ disabled: t }) => [E(e.$slots, "annotator-action-redo", C(S({ disabled: t })), void 0, !0)]),
|
|
2502
|
+
"annotator-action-delete": O(({ disabled: t }) => [E(e.$slots, "annotator-action-delete", C(S({ disabled: t })), void 0, !0)]),
|
|
2503
2503
|
_: 3
|
|
2504
2504
|
}, 8, [
|
|
2505
2505
|
"svgRef",
|
|
@@ -2508,47 +2508,47 @@ var $n = /* @__PURE__ */ e({ default: () => Nr }), er = ["id"], tr = ["id"], nr
|
|
|
2508
2508
|
"active",
|
|
2509
2509
|
"isCursorPointer",
|
|
2510
2510
|
"palette"
|
|
2511
|
-
])) :
|
|
2512
|
-
|
|
2511
|
+
])) : y("", !0),
|
|
2512
|
+
L.value.userOptions.show && We.value && (D(lt) || D(st)) ? (w(), ge(D(Ne), {
|
|
2513
2513
|
ref: "userOptionsRef",
|
|
2514
|
-
key: `user_option_${
|
|
2515
|
-
backgroundColor:
|
|
2516
|
-
color:
|
|
2517
|
-
isPrinting:
|
|
2518
|
-
isImaging:
|
|
2519
|
-
uid:
|
|
2514
|
+
key: `user_option_${He.value}`,
|
|
2515
|
+
backgroundColor: V.value.backgroundColor,
|
|
2516
|
+
color: V.value.color,
|
|
2517
|
+
isPrinting: D(gt),
|
|
2518
|
+
isImaging: D(_t),
|
|
2519
|
+
uid: M.value,
|
|
2520
2520
|
hasTooltip: !1,
|
|
2521
2521
|
hasTable: !1,
|
|
2522
2522
|
hasXls: !1,
|
|
2523
2523
|
hasLabel: !1,
|
|
2524
|
-
hasPdf:
|
|
2525
|
-
hasImg:
|
|
2526
|
-
hasSvg:
|
|
2527
|
-
hasFullscreen:
|
|
2528
|
-
hasAltCopy:
|
|
2529
|
-
isFullscreen:
|
|
2530
|
-
chartElement:
|
|
2531
|
-
position:
|
|
2532
|
-
titles: { ...
|
|
2533
|
-
hasAnnotator:
|
|
2534
|
-
isAnnotation:
|
|
2535
|
-
callbacks:
|
|
2536
|
-
printScale:
|
|
2537
|
-
hasZoom:
|
|
2538
|
-
isZoom:
|
|
2539
|
-
isCursorPointer:
|
|
2540
|
-
onToggleFullscreen:
|
|
2541
|
-
onGeneratePdf:
|
|
2542
|
-
onGenerateImage:
|
|
2543
|
-
onGenerateSvg:
|
|
2544
|
-
onToggleAnnotator:
|
|
2545
|
-
onToggleZoom:
|
|
2546
|
-
onCopyAlt:
|
|
2547
|
-
style:
|
|
2548
|
-
},
|
|
2524
|
+
hasPdf: L.value.userOptions.buttons.pdf,
|
|
2525
|
+
hasImg: L.value.userOptions.buttons.img,
|
|
2526
|
+
hasSvg: L.value.userOptions.buttons.svg,
|
|
2527
|
+
hasFullscreen: L.value.userOptions.buttons.fullscreen,
|
|
2528
|
+
hasAltCopy: L.value.userOptions.buttons.altCopy,
|
|
2529
|
+
isFullscreen: Ht.value,
|
|
2530
|
+
chartElement: j.value,
|
|
2531
|
+
position: L.value.userOptions.position,
|
|
2532
|
+
titles: { ...L.value.userOptions.buttonTitles },
|
|
2533
|
+
hasAnnotator: L.value.userOptions.buttons.annotator,
|
|
2534
|
+
isAnnotation: ot.value,
|
|
2535
|
+
callbacks: L.value.userOptions.callbacks,
|
|
2536
|
+
printScale: L.value.userOptions.print.scale,
|
|
2537
|
+
hasZoom: L.value.userOptions.buttons.zoom,
|
|
2538
|
+
isZoom: Mt.value,
|
|
2539
|
+
isCursorPointer: Je.value,
|
|
2540
|
+
onToggleFullscreen: Ut,
|
|
2541
|
+
onGeneratePdf: D(vt),
|
|
2542
|
+
onGenerateImage: D(Tt),
|
|
2543
|
+
onGenerateSvg: D(wt),
|
|
2544
|
+
onToggleAnnotator: Wt,
|
|
2545
|
+
onToggleZoom: zt,
|
|
2546
|
+
onCopyAlt: Dn,
|
|
2547
|
+
style: we({ visibility: D(lt) ? D(st) ? "visible" : "hidden" : "visible" })
|
|
2548
|
+
}, _e({ _: 2 }, [
|
|
2549
2549
|
e.$slots.menuIcon ? {
|
|
2550
2550
|
name: "menuIcon",
|
|
2551
|
-
fn:
|
|
2551
|
+
fn: O(({ isOpen: t, color: n }) => [E(e.$slots, "menuIcon", C(S({
|
|
2552
2552
|
isOpen: t,
|
|
2553
2553
|
color: n
|
|
2554
2554
|
})), void 0, !0)]),
|
|
@@ -2556,22 +2556,22 @@ var $n = /* @__PURE__ */ e({ default: () => Nr }), er = ["id"], tr = ["id"], nr
|
|
|
2556
2556
|
} : void 0,
|
|
2557
2557
|
e.$slots.optionPdf ? {
|
|
2558
2558
|
name: "optionPdf",
|
|
2559
|
-
fn:
|
|
2559
|
+
fn: O(() => [E(e.$slots, "optionPdf", {}, void 0, !0)]),
|
|
2560
2560
|
key: "1"
|
|
2561
2561
|
} : void 0,
|
|
2562
2562
|
e.$slots.optionImg ? {
|
|
2563
2563
|
name: "optionImg",
|
|
2564
|
-
fn:
|
|
2564
|
+
fn: O(() => [E(e.$slots, "optionImg", {}, void 0, !0)]),
|
|
2565
2565
|
key: "2"
|
|
2566
2566
|
} : void 0,
|
|
2567
2567
|
e.$slots.optionSvg ? {
|
|
2568
2568
|
name: "optionSvg",
|
|
2569
|
-
fn:
|
|
2569
|
+
fn: O(() => [E(e.$slots, "optionSvg", {}, void 0, !0)]),
|
|
2570
2570
|
key: "3"
|
|
2571
2571
|
} : void 0,
|
|
2572
2572
|
e.$slots.optionFullscreen ? {
|
|
2573
2573
|
name: "optionFullscreen",
|
|
2574
|
-
fn:
|
|
2574
|
+
fn: O(({ toggleFullscreen: t, isFullscreen: n }) => [E(e.$slots, "optionFullscreen", C(S({
|
|
2575
2575
|
toggleFullscreen: t,
|
|
2576
2576
|
isFullscreen: n
|
|
2577
2577
|
})), void 0, !0)]),
|
|
@@ -2579,7 +2579,7 @@ var $n = /* @__PURE__ */ e({ default: () => Nr }), er = ["id"], tr = ["id"], nr
|
|
|
2579
2579
|
} : void 0,
|
|
2580
2580
|
e.$slots.optionAnnotator ? {
|
|
2581
2581
|
name: "optionAnnotator",
|
|
2582
|
-
fn:
|
|
2582
|
+
fn: O(({ toggleAnnotator: t, isAnnotator: n }) => [E(e.$slots, "optionAnnotator", C(S({
|
|
2583
2583
|
toggleAnnotator: t,
|
|
2584
2584
|
isAnnotator: n
|
|
2585
2585
|
})), void 0, !0)]),
|
|
@@ -2587,7 +2587,7 @@ var $n = /* @__PURE__ */ e({ default: () => Nr }), er = ["id"], tr = ["id"], nr
|
|
|
2587
2587
|
} : void 0,
|
|
2588
2588
|
e.$slots.optionZoom ? {
|
|
2589
2589
|
name: "optionZoom",
|
|
2590
|
-
fn:
|
|
2590
|
+
fn: O(({ toggleZoom: t, isZoomLocked: n }) => [E(e.$slots, "optionZoom", C(S({
|
|
2591
2591
|
toggleZoom: t,
|
|
2592
2592
|
isZoomLocked: n
|
|
2593
2593
|
})), void 0, !0)]),
|
|
@@ -2595,17 +2595,17 @@ var $n = /* @__PURE__ */ e({ default: () => Nr }), er = ["id"], tr = ["id"], nr
|
|
|
2595
2595
|
} : void 0,
|
|
2596
2596
|
e.$slots.optionAltCopy ? {
|
|
2597
2597
|
name: "optionAltCopy",
|
|
2598
|
-
fn:
|
|
2598
|
+
fn: O(({ altCopy: t }) => [E(e.$slots, "optionAltCopy", C(S({ altCopy: t })), void 0, !0)]),
|
|
2599
2599
|
key: "7"
|
|
2600
2600
|
} : void 0,
|
|
2601
2601
|
e.$slots["custom-menu-before"] ? {
|
|
2602
2602
|
name: "custom-menu-before",
|
|
2603
|
-
fn:
|
|
2603
|
+
fn: O(() => [E(e.$slots, "custom-menu-before", {}, void 0, !0)]),
|
|
2604
2604
|
key: "8"
|
|
2605
2605
|
} : void 0,
|
|
2606
2606
|
e.$slots["custom-menu-after"] ? {
|
|
2607
2607
|
name: "custom-menu-after",
|
|
2608
|
-
fn:
|
|
2608
|
+
fn: O(() => [E(e.$slots, "custom-menu-after", {}, void 0, !0)]),
|
|
2609
2609
|
key: "9"
|
|
2610
2610
|
} : void 0
|
|
2611
2611
|
]), 1032, [
|
|
@@ -2634,298 +2634,298 @@ var $n = /* @__PURE__ */ e({ default: () => Nr }), er = ["id"], tr = ["id"], nr
|
|
|
2634
2634
|
"onGenerateImage",
|
|
2635
2635
|
"onGenerateSvg",
|
|
2636
2636
|
"style"
|
|
2637
|
-
])) :
|
|
2638
|
-
|
|
2637
|
+
])) : y("", !0),
|
|
2638
|
+
V.value.title.text ? (w(), b("div", {
|
|
2639
2639
|
key: 4,
|
|
2640
2640
|
ref_key: "chartTitle",
|
|
2641
|
-
ref:
|
|
2641
|
+
ref: Re,
|
|
2642
2642
|
style: "width:100%;background:transparent;"
|
|
2643
|
-
}, [(
|
|
2644
|
-
key: `title_${
|
|
2643
|
+
}, [(w(), ge(re, {
|
|
2644
|
+
key: `title_${Ve.value}`,
|
|
2645
2645
|
config: {
|
|
2646
2646
|
title: {
|
|
2647
2647
|
cy: "dag-title",
|
|
2648
|
-
...
|
|
2648
|
+
...V.value.title
|
|
2649
2649
|
},
|
|
2650
2650
|
subtitle: {
|
|
2651
2651
|
cy: "dag-subtitle",
|
|
2652
|
-
...
|
|
2652
|
+
...V.value.title.subtitle
|
|
2653
2653
|
}
|
|
2654
2654
|
}
|
|
2655
|
-
}, null, 8, ["config"]))], 512)) :
|
|
2656
|
-
|
|
2655
|
+
}, null, 8, ["config"]))], 512)) : y("", !0),
|
|
2656
|
+
V.value.controls.position === "top" && !D(dt) && V.value.controls.show ? (w(), ge(de, {
|
|
2657
2657
|
key: 5,
|
|
2658
2658
|
ref_key: "zoomControls",
|
|
2659
|
-
ref:
|
|
2660
|
-
config:
|
|
2661
|
-
scale:
|
|
2662
|
-
isFullscreen:
|
|
2659
|
+
ref: Be,
|
|
2660
|
+
config: L.value,
|
|
2661
|
+
scale: D(Ft),
|
|
2662
|
+
isFullscreen: Ht.value,
|
|
2663
2663
|
withDirection: "",
|
|
2664
|
-
onZoomIn:
|
|
2665
|
-
onZoomOut:
|
|
2666
|
-
onResetZoom: t[0] ||= () =>
|
|
2667
|
-
onSwitchDirection:
|
|
2664
|
+
onZoomIn: Gt,
|
|
2665
|
+
onZoomOut: Kt,
|
|
2666
|
+
onResetZoom: t[0] ||= () => D(Nt)(!0),
|
|
2667
|
+
onSwitchDirection: Jt
|
|
2668
2668
|
}, null, 8, [
|
|
2669
2669
|
"config",
|
|
2670
2670
|
"scale",
|
|
2671
2671
|
"isFullscreen"
|
|
2672
|
-
])) :
|
|
2673
|
-
|
|
2672
|
+
])) : y("", !0),
|
|
2673
|
+
x("div", rr, [D(J) ? (w(), b("svg", {
|
|
2674
2674
|
key: 0,
|
|
2675
2675
|
ref_key: "svgRef",
|
|
2676
|
-
ref:
|
|
2677
|
-
class:
|
|
2676
|
+
ref: K,
|
|
2677
|
+
class: Ce({
|
|
2678
2678
|
"vue-ui-dag-svg": !0,
|
|
2679
|
-
"vue-data-ui-loading":
|
|
2679
|
+
"vue-data-ui-loading": D(dt)
|
|
2680
2680
|
}),
|
|
2681
|
-
viewBox:
|
|
2682
|
-
xmlns:
|
|
2683
|
-
style:
|
|
2684
|
-
backgroundColor:
|
|
2681
|
+
viewBox: Vt.value,
|
|
2682
|
+
xmlns: D(l),
|
|
2683
|
+
style: we({
|
|
2684
|
+
backgroundColor: V.value.backgroundColor,
|
|
2685
2685
|
height: "100%",
|
|
2686
2686
|
width: "100%"
|
|
2687
2687
|
}),
|
|
2688
2688
|
tabindex: "0",
|
|
2689
|
-
"aria-describedby": `chart-instructions-${
|
|
2690
|
-
onFocus:
|
|
2691
|
-
onBlur:
|
|
2692
|
-
onKeydown:
|
|
2689
|
+
"aria-describedby": `chart-instructions-${M.value}`,
|
|
2690
|
+
onFocus: Ln,
|
|
2691
|
+
onBlur: Rn,
|
|
2692
|
+
onKeydown: Hn
|
|
2693
2693
|
}, [
|
|
2694
|
-
|
|
2695
|
-
|
|
2696
|
-
id: `dag_bg_pattern_${
|
|
2694
|
+
ye(D(Pe)),
|
|
2695
|
+
V.value.backgroundPattern.show ? (w(), b("defs", ar, [x("pattern", {
|
|
2696
|
+
id: `dag_bg_pattern_${M.value}`,
|
|
2697
2697
|
patternUnits: "userSpaceOnUse",
|
|
2698
|
-
width:
|
|
2699
|
-
height:
|
|
2700
|
-
}, [
|
|
2701
|
-
x:
|
|
2702
|
-
y:
|
|
2703
|
-
color:
|
|
2704
|
-
})), () => [
|
|
2705
|
-
cx:
|
|
2706
|
-
cy:
|
|
2707
|
-
r:
|
|
2708
|
-
fill:
|
|
2709
|
-
}, null, 8, sr)], !0)], 8, or)])) :
|
|
2710
|
-
|
|
2698
|
+
width: fn.value,
|
|
2699
|
+
height: fn.value
|
|
2700
|
+
}, [E(e.$slots, "background-pattern", C(S({
|
|
2701
|
+
x: fn.value / 2,
|
|
2702
|
+
y: fn.value / 2,
|
|
2703
|
+
color: V.value.backgroundPattern.dotColor
|
|
2704
|
+
})), () => [x("circle", {
|
|
2705
|
+
cx: fn.value / 2,
|
|
2706
|
+
cy: fn.value / 2,
|
|
2707
|
+
r: pn.value,
|
|
2708
|
+
fill: V.value.backgroundPattern.dotColor
|
|
2709
|
+
}, null, 8, sr)], !0)], 8, or)])) : y("", !0),
|
|
2710
|
+
V.value.backgroundPattern.show ? (w(), b("rect", {
|
|
2711
2711
|
key: 1,
|
|
2712
|
-
x:
|
|
2713
|
-
y:
|
|
2714
|
-
width:
|
|
2715
|
-
height:
|
|
2716
|
-
fill: `url(#dag_bg_pattern_${
|
|
2717
|
-
style:
|
|
2712
|
+
x: D(X)?.x ?? 0,
|
|
2713
|
+
y: D(X)?.y ?? 0,
|
|
2714
|
+
width: D(X)?.width ?? 0,
|
|
2715
|
+
height: D(X)?.height ?? 0,
|
|
2716
|
+
fill: `url(#dag_bg_pattern_${M.value})`,
|
|
2717
|
+
style: we({
|
|
2718
2718
|
pointerEvents: "none",
|
|
2719
|
-
opacity:
|
|
2719
|
+
opacity: V.value.backgroundPattern.opacity
|
|
2720
2720
|
})
|
|
2721
|
-
}, null, 12, cr)) :
|
|
2722
|
-
|
|
2721
|
+
}, null, 12, cr)) : y("", !0),
|
|
2722
|
+
D(J).arrowShape === "undirected" ? y("", !0) : (w(), b("defs", lr, [(w(!0), b(pe, null, De(D(J).edges, (e) => (w(), b("marker", {
|
|
2723
2723
|
key: `marker_${e.id}`,
|
|
2724
|
-
id:
|
|
2725
|
-
markerWidth:
|
|
2726
|
-
markerHeight:
|
|
2727
|
-
refX:
|
|
2728
|
-
refY:
|
|
2724
|
+
id: Tn(e.id),
|
|
2725
|
+
markerWidth: D(J).arrowSize,
|
|
2726
|
+
markerHeight: D(J).arrowSize,
|
|
2727
|
+
refX: D(J).arrowSize - 3,
|
|
2728
|
+
refY: D(J).arrowSize / 2,
|
|
2729
2729
|
orient: "auto",
|
|
2730
2730
|
markerUnits: "strokeWidth"
|
|
2731
|
-
}, [
|
|
2731
|
+
}, [D(J).arrowShape === "normal" ? (w(), b("path", {
|
|
2732
2732
|
key: 0,
|
|
2733
|
-
d: `M 0 0 L ${
|
|
2734
|
-
fill:
|
|
2735
|
-
stroke:
|
|
2733
|
+
d: `M 0 0 L ${D(J).arrowSize} ${D(J).arrowSize / 2} L 0 ${D(J).arrowSize} Z`,
|
|
2734
|
+
fill: wn(e),
|
|
2735
|
+
stroke: wn(e),
|
|
2736
2736
|
"stroke-width": "0",
|
|
2737
2737
|
style: { transition: "stroke 0.2s ease-in-out,\n fill 0.2s ease-in-out,\n stroke-width 0.2s ease-in-out" }
|
|
2738
|
-
}, null, 8, dr)) : (
|
|
2738
|
+
}, null, 8, dr)) : (w(), b("path", {
|
|
2739
2739
|
key: 1,
|
|
2740
|
-
d: `M 0 0 L ${
|
|
2741
|
-
fill:
|
|
2742
|
-
stroke:
|
|
2740
|
+
d: `M 0 0 L ${D(J).arrowSize} ${D(J).arrowSize / 2} L 0 ${D(J).arrowSize} L ${D(J).arrowSize / 3} ${D(J).arrowSize / 2} Z`,
|
|
2741
|
+
fill: wn(e),
|
|
2742
|
+
stroke: wn(e),
|
|
2743
2743
|
"stroke-width": "0",
|
|
2744
2744
|
style: { transition: "stroke 0.2s ease-in-out,\n fill 0.2s ease-in-out,\n stroke-width 0.2s ease-in-out" }
|
|
2745
2745
|
}, null, 8, fr))], 8, ur))), 128))])),
|
|
2746
|
-
|
|
2746
|
+
x("g", pr, [(w(!0), b(pe, null, De(D(J).edges, (e) => (w(), b(pe, { key: e.id }, [x("path", xe({
|
|
2747
2747
|
"data-cy-edge": "",
|
|
2748
2748
|
ref_for: !0,
|
|
2749
|
-
ref:
|
|
2750
|
-
}, { ref_for: !0 },
|
|
2749
|
+
ref: cn(e.id)
|
|
2750
|
+
}, { ref_for: !0 }, bn(e), { style: {
|
|
2751
2751
|
"pointer-events": "none",
|
|
2752
2752
|
transition: "stroke-width 0.2s ease-in-out,\n stroke 0.2s ease-in-out"
|
|
2753
|
-
} }), null, 16),
|
|
2753
|
+
} }), null, 16), B.value.show ? (w(), b("circle", xe({
|
|
2754
2754
|
key: 0,
|
|
2755
2755
|
"data-cy-midpoint": "",
|
|
2756
2756
|
class: "vue-ui-dag-edge-midpoint",
|
|
2757
2757
|
"data-a11y-midpoint-id": e.id
|
|
2758
|
-
}, { ref_for: !0 },
|
|
2759
|
-
"aria-label": `${
|
|
2758
|
+
}, { ref_for: !0 }, Cn(e), {
|
|
2759
|
+
"aria-label": `${Y(e.from)?.label ?? e.from} to ${Y(e.to)?.label ?? e.to}`,
|
|
2760
2760
|
style: { transition: "stroke-width 0.2s ease-in-out,\n stroke 0.2s ease-in-out,\n fill 0.2s ease-in-out" },
|
|
2761
|
-
onMouseenter: (t) =>
|
|
2762
|
-
onMouseleave:
|
|
2763
|
-
}), null, 16, mr)) :
|
|
2764
|
-
|
|
2761
|
+
onMouseenter: (t) => vn(e),
|
|
2762
|
+
onMouseleave: Qt
|
|
2763
|
+
}), null, 16, mr)) : y("", !0)], 64))), 128))]),
|
|
2764
|
+
x("g", hr, [(w(!0), b(pe, null, De(D(J).nodes, (t) => (w(), b("g", {
|
|
2765
2765
|
key: t.id,
|
|
2766
2766
|
class: "vue-ui-dag-node",
|
|
2767
|
-
onClick:
|
|
2768
|
-
onMouseenter: (e) =>
|
|
2769
|
-
onMouseleave: (e) =>
|
|
2770
|
-
}, [e.$slots.node ?
|
|
2767
|
+
onClick: Me((e) => R.value.tooltip.showOnClick && $t(t), ["stop"]),
|
|
2768
|
+
onMouseenter: (e) => _n(t.id),
|
|
2769
|
+
onMouseleave: (e) => yn(t.id)
|
|
2770
|
+
}, [e.$slots.node ? y("", !0) : (w(), b("rect", xe({
|
|
2771
2771
|
key: 0,
|
|
2772
2772
|
"data-cy-node": ""
|
|
2773
|
-
}, { ref_for: !0 },
|
|
2773
|
+
}, { ref_for: !0 }, Sn(t), {
|
|
2774
2774
|
"data-a11y-node-id": t.id,
|
|
2775
2775
|
"aria-label": `${t.label ?? t.id}`,
|
|
2776
2776
|
style: {
|
|
2777
|
-
cursor:
|
|
2777
|
+
cursor: R.value.tooltip.showOnClick && Je.value ? "pointer" : "default",
|
|
2778
2778
|
transition: "stroke 0.2s ease-in-out, stroke-width 0.2s ease-in-out, fill 0.2s ease-in-out"
|
|
2779
2779
|
}
|
|
2780
|
-
}), null, 16, _r)), e.$slots.node ? (
|
|
2780
|
+
}), null, 16, _r)), e.$slots.node ? (w(), b("foreignObject", {
|
|
2781
2781
|
key: 1,
|
|
2782
2782
|
x: t.x - t.width / 2,
|
|
2783
2783
|
y: t.y - t.height / 2,
|
|
2784
2784
|
width: t.width,
|
|
2785
2785
|
height: t.height,
|
|
2786
2786
|
style: { overflow: "visible" }
|
|
2787
|
-
}, [
|
|
2787
|
+
}, [E(e.$slots, "node", xe({ ref_for: !0 }, {
|
|
2788
2788
|
node: t,
|
|
2789
|
-
orientation:
|
|
2790
|
-
}), void 0, !0)], 8, vr)) :
|
|
2791
|
-
|
|
2789
|
+
orientation: q.value
|
|
2790
|
+
}), void 0, !0)], 8, vr)) : y("", !0)], 40, gr))), 128))]),
|
|
2791
|
+
x("g", yr, [(w(!0), b(pe, null, De(D(J).edges, (e) => (w(), b("path", {
|
|
2792
2792
|
key: e.id,
|
|
2793
2793
|
d: e.pathData,
|
|
2794
2794
|
fill: "none",
|
|
2795
2795
|
stroke: "transparent",
|
|
2796
|
-
"stroke-width": z.value.
|
|
2796
|
+
"stroke-width": z.value.strokeWidth * (e.from === Q.value || e.id === U.value?.id ? 1.3 : 1),
|
|
2797
2797
|
"stroke-linecap": "round",
|
|
2798
2798
|
"stroke-linejoin": "round",
|
|
2799
|
-
"marker-end":
|
|
2799
|
+
"marker-end": D(J).arrowShape === "undirected" ? null : `url(#${Tn(e.id)})`,
|
|
2800
2800
|
style: {
|
|
2801
2801
|
"pointer-events": "none",
|
|
2802
2802
|
transition: "stroke-width 0.2s ease-in-out,\n stroke 0.2s ease-in-out"
|
|
2803
2803
|
}
|
|
2804
2804
|
}, null, 8, br))), 128))]),
|
|
2805
|
-
|
|
2805
|
+
x("g", xr, [(w(!0), b(pe, null, De(D(J).nodes, (t) => (w(), b("g", {
|
|
2806
2806
|
key: t.id,
|
|
2807
|
-
onClick:
|
|
2808
|
-
onMouseenter: (e) =>
|
|
2809
|
-
onMouseleave: (e) =>
|
|
2810
|
-
}, [e.$slots["free-node-label"] ?
|
|
2807
|
+
onClick: Me((e) => R.value.tooltip.showOnClick && $t(t), ["stop"]),
|
|
2808
|
+
onMouseenter: (e) => gn(t.id),
|
|
2809
|
+
onMouseleave: (e) => yn(t.id)
|
|
2810
|
+
}, [e.$slots["free-node-label"] ? y("", !0) : (w(), b(pe, { key: 0 }, [e.$slots["node-label"] ? (w(), b("text", {
|
|
2811
2811
|
key: 0,
|
|
2812
2812
|
x: t.x,
|
|
2813
|
-
y: t.y +
|
|
2813
|
+
y: t.y + R.value.labels.fontSize / 3,
|
|
2814
2814
|
"text-anchor": "middle",
|
|
2815
|
-
"font-size":
|
|
2816
|
-
fill:
|
|
2817
|
-
"font-weight":
|
|
2815
|
+
"font-size": R.value.labels.fontSize,
|
|
2816
|
+
fill: Q.value === t.id && R.value.selected.labelColor != null ? R.value.selected.labelColor : t.original.color,
|
|
2817
|
+
"font-weight": R.value.labels.bold ? "bold" : "normal",
|
|
2818
2818
|
style: { transition: "fill 0.2s ease-in-out" }
|
|
2819
|
-
}, [
|
|
2819
|
+
}, [E(e.$slots, "node-label", xe({ ref_for: !0 }, {
|
|
2820
2820
|
node: t,
|
|
2821
|
-
orientation:
|
|
2822
|
-
}), () => [
|
|
2821
|
+
orientation: q.value
|
|
2822
|
+
}), () => [ve(Oe(t.label), 1)], !0)], 8, Cr)) : !e.$slots["free-node-label"] && !e.$slots.node ? (w(), b("text", {
|
|
2823
2823
|
key: 1,
|
|
2824
2824
|
"data-cy-node-label": "",
|
|
2825
2825
|
x: t.x,
|
|
2826
|
-
y: t.y +
|
|
2826
|
+
y: t.y + R.value.labels.fontSize / 3,
|
|
2827
2827
|
"text-anchor": "middle",
|
|
2828
|
-
"font-size":
|
|
2829
|
-
fill: (
|
|
2830
|
-
"font-weight":
|
|
2828
|
+
"font-size": R.value.labels.fontSize,
|
|
2829
|
+
fill: (Q.value === t.id || xn(t.id)) && R.value.selected.labelColor != null ? R.value.selected.labelColor : t.original.color,
|
|
2830
|
+
"font-weight": R.value.labels.bold ? "bold" : "normal",
|
|
2831
2831
|
style: { transition: "fill 0.2s ease-in-out" },
|
|
2832
|
-
innerHTML:
|
|
2832
|
+
innerHTML: D(n)({
|
|
2833
2833
|
content: t.label,
|
|
2834
|
-
fontSize:
|
|
2835
|
-
fontWeight:
|
|
2836
|
-
fill: (
|
|
2834
|
+
fontSize: R.value.labels.fontSize,
|
|
2835
|
+
fontWeight: V.value.nodes.labels.bold ? "bold" : "normal",
|
|
2836
|
+
fill: (Q.value === t.id || xn(t.id)) && R.value.selected.labelColor != null ? R.value.selected.labelColor : t.original.color,
|
|
2837
2837
|
x: t.x,
|
|
2838
2838
|
y: t.y,
|
|
2839
2839
|
autoOffset: !0
|
|
2840
2840
|
})
|
|
2841
|
-
}, null, 8, wr)) :
|
|
2841
|
+
}, null, 8, wr)) : y("", !0)], 64)), e.$slots["free-node-label"] ? (w(), b("g", Tr, [E(e.$slots, "free-node-label", xe({ ref_for: !0 }, {
|
|
2842
2842
|
node: t,
|
|
2843
|
-
layoutData:
|
|
2844
|
-
orientation:
|
|
2845
|
-
}), void 0, !0)])) :
|
|
2846
|
-
|
|
2847
|
-
drawingArea:
|
|
2848
|
-
data:
|
|
2849
|
-
orientation:
|
|
2850
|
-
isPrintingImg:
|
|
2851
|
-
isPrintingSvg:
|
|
2843
|
+
layoutData: D(J),
|
|
2844
|
+
orientation: q.value
|
|
2845
|
+
}), void 0, !0)])) : y("", !0)], 40, Sr))), 128))]),
|
|
2846
|
+
E(e.$slots, "svg", { svg: {
|
|
2847
|
+
drawingArea: D(X),
|
|
2848
|
+
data: D(J),
|
|
2849
|
+
orientation: q.value,
|
|
2850
|
+
isPrintingImg: D(gt) || D(_t) || D(St),
|
|
2851
|
+
isPrintingSvg: D(Ct)
|
|
2852
2852
|
} }, void 0, !0)
|
|
2853
|
-
], 46, ir)) :
|
|
2854
|
-
hint:
|
|
2855
|
-
isVisible:
|
|
2856
|
-
})), void 0, !0)])) :
|
|
2857
|
-
e.$slots.watermark ? (
|
|
2858
|
-
|
|
2859
|
-
default:
|
|
2853
|
+
], 46, ir)) : y("", !0), e.$slots.hint ? (w(), b("div", Er, [E(e.$slots, "hint", C(S({
|
|
2854
|
+
hint: L.value.a11y.translations.keyboardNavigation,
|
|
2855
|
+
isVisible: qe.value
|
|
2856
|
+
})), void 0, !0)])) : y("", !0)]),
|
|
2857
|
+
e.$slots.watermark ? (w(), b("div", Dr, [E(e.$slots, "watermark", C(S({ isPrinting: D(gt) || D(_t) || D(St) || D(Ct) })), void 0, !0)])) : y("", !0),
|
|
2858
|
+
ye(he, { name: "fade" }, {
|
|
2859
|
+
default: O(() => [at.value ? (w(), ge(me, {
|
|
2860
2860
|
key: 0,
|
|
2861
|
-
to:
|
|
2862
|
-
}, [
|
|
2861
|
+
to: Ht.value ? j.value : "body"
|
|
2862
|
+
}, [x("div", {
|
|
2863
2863
|
"data-cy-tooltip-midpoint": "",
|
|
2864
2864
|
ref_key: "tooltipRef",
|
|
2865
|
-
ref:
|
|
2865
|
+
ref: Ze,
|
|
2866
2866
|
class: "vue-ui-dag-tooltip",
|
|
2867
|
-
style:
|
|
2868
|
-
...
|
|
2869
|
-
maxWidth:
|
|
2870
|
-
"--vue-data-ui-dag-tooltip-background":
|
|
2871
|
-
"--vue-data-ui-dag-tooltip-color":
|
|
2867
|
+
style: we({
|
|
2868
|
+
...Qe.value,
|
|
2869
|
+
maxWidth: B.value.tooltip.maxWidth,
|
|
2870
|
+
"--vue-data-ui-dag-tooltip-background": B.value.tooltip.backgroundColor,
|
|
2871
|
+
"--vue-data-ui-dag-tooltip-color": B.value.tooltip.color
|
|
2872
2872
|
}),
|
|
2873
|
-
"data-position":
|
|
2874
|
-
}, [
|
|
2875
|
-
edge:
|
|
2876
|
-
layoutData:
|
|
2877
|
-
})), () => [
|
|
2873
|
+
"data-position": $e.value
|
|
2874
|
+
}, [E(e.$slots, "tooltip-midpoint", C(S({
|
|
2875
|
+
edge: U.value,
|
|
2876
|
+
layoutData: D(J)
|
|
2877
|
+
})), () => [U.value ? (w(), b("div", kr, Oe(Y(U.value.from)?.label ?? U.value.from) + " → " + Oe(Y(U.value.to)?.label ?? U.value.to), 1)) : y("", !0)], !0)], 12, Or)], 8, ["to"])) : y("", !0)]),
|
|
2878
2878
|
_: 3
|
|
2879
2879
|
}),
|
|
2880
|
-
|
|
2881
|
-
default:
|
|
2880
|
+
ye(he, { name: "fade" }, {
|
|
2881
|
+
default: O(() => [W.value ? (w(), ge(me, {
|
|
2882
2882
|
key: 0,
|
|
2883
|
-
to:
|
|
2884
|
-
}, [
|
|
2883
|
+
to: Ht.value ? j.value : "body"
|
|
2884
|
+
}, [x("div", {
|
|
2885
2885
|
"data-cy-tooltip-node": "",
|
|
2886
2886
|
ref_key: "nodeTooltipRef",
|
|
2887
|
-
ref:
|
|
2887
|
+
ref: nt,
|
|
2888
2888
|
class: "vue-ui-dag-node-tooltip",
|
|
2889
|
-
style:
|
|
2890
|
-
maxWidth:
|
|
2891
|
-
left:
|
|
2892
|
-
top:
|
|
2893
|
-
"--vue-data-ui-dag-node-tooltip-background":
|
|
2894
|
-
"--vue-data-ui-dag-node-tooltip-color":
|
|
2889
|
+
style: we({
|
|
2890
|
+
maxWidth: R.value.tooltip.maxWidth,
|
|
2891
|
+
left: rt.value.left,
|
|
2892
|
+
top: rt.value.top,
|
|
2893
|
+
"--vue-data-ui-dag-node-tooltip-background": R.value.tooltip.backgroundColor,
|
|
2894
|
+
"--vue-data-ui-dag-node-tooltip-color": R.value.tooltip.color
|
|
2895
2895
|
}),
|
|
2896
|
-
"data-position":
|
|
2897
|
-
}, [
|
|
2898
|
-
node:
|
|
2899
|
-
layoutData:
|
|
2900
|
-
})), () => [
|
|
2896
|
+
"data-position": it.value
|
|
2897
|
+
}, [E(e.$slots, "tooltip-node", C(S({
|
|
2898
|
+
node: G.value,
|
|
2899
|
+
layoutData: D(J)
|
|
2900
|
+
})), () => [G.value ? (w(), b("div", jr, Oe(G.value.label), 1)) : y("", !0)], !0)], 12, Ar)], 8, ["to"])) : y("", !0)]),
|
|
2901
2901
|
_: 3
|
|
2902
2902
|
}),
|
|
2903
|
-
|
|
2903
|
+
V.value.controls.position === "bottom" && !D(dt) && V.value.controls.show ? (w(), ge(de, {
|
|
2904
2904
|
key: 7,
|
|
2905
2905
|
ref_key: "zoomControls",
|
|
2906
|
-
ref:
|
|
2907
|
-
config:
|
|
2908
|
-
scale:
|
|
2909
|
-
isFullscreen:
|
|
2906
|
+
ref: Be,
|
|
2907
|
+
config: L.value,
|
|
2908
|
+
scale: D(Ft),
|
|
2909
|
+
isFullscreen: Ht.value,
|
|
2910
2910
|
withDirection: "",
|
|
2911
|
-
onZoomIn:
|
|
2912
|
-
onZoomOut:
|
|
2913
|
-
onResetZoom: t[1] ||= () =>
|
|
2914
|
-
onSwitchDirection:
|
|
2911
|
+
onZoomIn: Gt,
|
|
2912
|
+
onZoomOut: Kt,
|
|
2913
|
+
onResetZoom: t[1] ||= () => D(Nt)(!0),
|
|
2914
|
+
onSwitchDirection: Jt
|
|
2915
2915
|
}, null, 8, [
|
|
2916
2916
|
"config",
|
|
2917
2917
|
"scale",
|
|
2918
2918
|
"isFullscreen"
|
|
2919
|
-
])) :
|
|
2920
|
-
e.$slots.source ? (
|
|
2919
|
+
])) : y("", !0),
|
|
2920
|
+
e.$slots.source ? (w(), b("div", {
|
|
2921
2921
|
key: 8,
|
|
2922
2922
|
ref_key: "source",
|
|
2923
|
-
ref:
|
|
2923
|
+
ref: ze,
|
|
2924
2924
|
dir: "auto"
|
|
2925
|
-
}, [
|
|
2926
|
-
|
|
2925
|
+
}, [E(e.$slots, "source", {}, void 0, !0)], 512)) : y("", !0),
|
|
2926
|
+
E(e.$slots, "skeleton", {}, () => [D(dt) ? (w(), ge(g, { key: 0 })) : y("", !0)], !0)
|
|
2927
2927
|
], 46, er));
|
|
2928
2928
|
}
|
|
2929
|
-
}, [["__scopeId", "data-v-
|
|
2929
|
+
}, [["__scopeId", "data-v-69c478dd"]]);
|
|
2930
2930
|
//#endregion
|
|
2931
2931
|
export { $n as n, Nr as t };
|