vue-data-ui 3.9.8 → 3.9.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{PackageVersion-k7oxI-bc.js → PackageVersion-DCZIL0_B.js} +1 -1
- package/dist/{Title-D1h0XGFy.js → Title-DFtCaCah.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-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-history-plot.js +1 -1
- package/dist/components/vue-ui-horizontal-bar.js +1 -1
- package/dist/components/vue-ui-kpi.js +1 -1
- package/dist/components/vue-ui-mini-loader.js +1 -1
- package/dist/components/vue-ui-molecule.js +1 -1
- package/dist/components/vue-ui-mood-radar.js +1 -1
- package/dist/components/vue-ui-nested-donuts.js +1 -1
- package/dist/components/vue-ui-onion.js +1 -1
- package/dist/components/vue-ui-parallel-coordinate-plot.js +1 -1
- package/dist/components/vue-ui-quadrant.js +1 -1
- package/dist/components/vue-ui-quick-chart.js +1 -1
- package/dist/components/vue-ui-radar.js +1 -1
- package/dist/components/vue-ui-rating.js +1 -1
- package/dist/components/vue-ui-relation-circle.js +1 -1
- package/dist/components/vue-ui-ridgeline.js +1 -1
- package/dist/components/vue-ui-rings.js +1 -1
- package/dist/components/vue-ui-scatter.js +1 -1
- package/dist/components/vue-ui-skeleton.js +1 -1
- package/dist/components/vue-ui-smiley.js +1 -1
- package/dist/components/vue-ui-spark-trend.js +1 -1
- package/dist/components/vue-ui-sparkbar.js +1 -1
- package/dist/components/vue-ui-sparkgauge.js +1 -1
- package/dist/components/vue-ui-sparkhistogram.js +1 -1
- package/dist/components/vue-ui-sparkline.js +1 -1
- package/dist/components/vue-ui-sparkstackbar.js +1 -1
- package/dist/components/vue-ui-stackbar.js +1 -1
- package/dist/components/vue-ui-stackline.js +1 -1
- package/dist/components/vue-ui-strip-plot.js +1 -1
- package/dist/components/vue-ui-table-heatmap.js +1 -1
- package/dist/components/vue-ui-table-sparkline.js +1 -1
- package/dist/components/vue-ui-table.js +1 -1
- package/dist/components/vue-ui-thermometer.js +1 -1
- package/dist/components/vue-ui-timer.js +1 -1
- package/dist/components/vue-ui-tiremarks.js +1 -1
- package/dist/components/vue-ui-treemap.js +1 -1
- package/dist/components/vue-ui-vertical-bar.js +1 -1
- package/dist/components/vue-ui-waffle.js +1 -1
- package/dist/components/vue-ui-wheel.js +1 -1
- package/dist/components/vue-ui-word-cloud.js +1 -1
- package/dist/components/vue-ui-world.js +1 -1
- package/dist/components/vue-ui-xy-canvas.js +1 -1
- package/dist/components/vue-ui-xy.js +1 -1
- package/dist/style.css +1 -1
- package/dist/types/vue-data-ui.d.ts +6 -0
- package/dist/{useNestedProp-B3m37PKe.js → useNestedProp-D-jUHecl.js} +6 -0
- package/dist/{vue-data-ui-wG8URsR4.js → vue-data-ui-ClRXBGda.js} +66 -66
- package/dist/vue-data-ui.js +68 -68
- package/dist/{vue-ui-3d-bar-Cv3ejm7T.js → vue-ui-3d-bar-TNgpzuEc.js} +3 -3
- package/dist/{vue-ui-accordion-CyEsYJt-.js → vue-ui-accordion-B6BX2vhq.js} +1 -1
- package/dist/{vue-ui-age-pyramid-nnJnP083.js → vue-ui-age-pyramid-BPTzdmW0.js} +3 -3
- package/dist/{vue-ui-annotator-ltpJX8iC.js → vue-ui-annotator-DB6dpuUU.js} +2 -2
- package/dist/{vue-ui-bullet-Cyf5C02W.js → vue-ui-bullet-DzFbSsu2.js} +3 -3
- package/dist/{vue-ui-candlestick-or8YNppc.js → vue-ui-candlestick-CAboED0U.js} +3 -3
- package/dist/{vue-ui-carousel-table-3RIzGfmz.js → vue-ui-carousel-table-DlrmY97e.js} +2 -2
- package/dist/{vue-ui-chestnut-W-WHzag3.js → vue-ui-chestnut-pbykwsi2.js} +2 -2
- package/dist/{vue-ui-chord-B1tkSoSL.js → vue-ui-chord-DJfFRfKV.js} +3 -3
- package/dist/{vue-ui-circle-pack-dR2peCrN.js → vue-ui-circle-pack-CQRZOtuK.js} +3 -3
- package/dist/{vue-ui-cursor-JhWOPlue.js → vue-ui-cursor-yyls4HGT.js} +2 -2
- package/dist/{vue-ui-dag-DSbiWNRz.js → vue-ui-dag-C8K66G3E.js} +654 -644
- package/dist/{vue-ui-dashboard-DDWIirwt.js → vue-ui-dashboard-D3Iyv0JD.js} +64 -64
- package/dist/{vue-ui-digits-BSPgk-5O.js → vue-ui-digits-DQz1eJc-.js} +1 -1
- package/dist/{vue-ui-donut-evolution-BbdMmK42.js → vue-ui-donut-evolution-fhLI01zC.js} +3 -3
- package/dist/{vue-ui-donut-dyuA_lh-.js → vue-ui-donut-xcE---Po.js} +3 -3
- package/dist/{vue-ui-dumbbell-B5q7CHPm.js → vue-ui-dumbbell-C9O0Bkf9.js} +3 -3
- package/dist/{vue-ui-flow-BQSAx0of.js → vue-ui-flow-CGOye6P4.js} +3 -3
- package/dist/{vue-ui-funnel-DqeutrjP.js → vue-ui-funnel-DsTz2cnF.js} +3 -3
- package/dist/{vue-ui-galaxy-BJn_YID0.js → vue-ui-galaxy-DU-o6sLX.js} +3 -3
- package/dist/{vue-ui-gauge-DK2PPQcs.js → vue-ui-gauge-RYEhh2WB.js} +3 -3
- package/dist/vue-ui-geo-DzFx9KIT.js +1298 -0
- package/dist/{vue-ui-gizmo-C0ruoX7v.js → vue-ui-gizmo-B4GeLU_H.js} +2 -2
- package/dist/{vue-ui-heatmap-CK0Z2Afj.js → vue-ui-heatmap-Di39E10i.js} +489 -424
- package/dist/{vue-ui-history-plot-CNUXKSKz.js → vue-ui-history-plot-DweGUMrh.js} +3 -3
- package/dist/{vue-ui-horizontal-bar-47vUiD1a.js → vue-ui-horizontal-bar-BRk_Qnvt.js} +4 -4
- package/dist/{vue-ui-kpi-ZQIY3YxS.js → vue-ui-kpi-BnCqocoi.js} +2 -2
- package/dist/{vue-ui-mini-loader-BFyTygMK.js → vue-ui-mini-loader-Dzqusv9i.js} +1 -1
- package/dist/{vue-ui-molecule-ChiK-Wl8.js → vue-ui-molecule-Dn3L3Pzv.js} +2 -2
- package/dist/{vue-ui-mood-radar-Bpni9n8k.js → vue-ui-mood-radar-CR8x29EU.js} +3 -3
- package/dist/{vue-ui-nested-donuts-B_eaN5fo.js → vue-ui-nested-donuts-DEmXu87c.js} +3 -3
- package/dist/{vue-ui-onion-B2aokd1_.js → vue-ui-onion-B_bd4qUM.js} +3 -3
- package/dist/{vue-ui-parallel-coordinate-plot-D9vq53-4.js → vue-ui-parallel-coordinate-plot-CjKb6-Uq.js} +3 -3
- package/dist/{vue-ui-quadrant-C6bsqo12.js → vue-ui-quadrant-B5OfygHr.js} +3 -3
- package/dist/{vue-ui-quick-chart-BycSnSJ9.js → vue-ui-quick-chart-MdfHmOs2.js} +2 -2
- package/dist/{vue-ui-radar-ciuRu1P4.js → vue-ui-radar-BLFDJ69V.js} +3 -3
- package/dist/{vue-ui-rating-YwRDNhIj.js → vue-ui-rating-BciQHmzs.js} +1 -1
- package/dist/{vue-ui-relation-circle-CvoN1OSn.js → vue-ui-relation-circle-xGWmFHf_.js} +3 -3
- package/dist/{vue-ui-ridgeline-DLMIzPvD.js → vue-ui-ridgeline-Dvwi6E9_.js} +3 -3
- package/dist/{vue-ui-rings-DeEPzX1M.js → vue-ui-rings-CGOWZybm.js} +3 -3
- package/dist/{vue-ui-scatter-gx--XmgC.js → vue-ui-scatter-CdCUg54d.js} +3 -3
- package/dist/{vue-ui-skeleton-D9VBR-dM.js → vue-ui-skeleton-DaomVcWl.js} +2 -2
- package/dist/{vue-ui-smiley-DSHWKC6h.js → vue-ui-smiley-C0Bqip2_.js} +1 -1
- package/dist/{vue-ui-spark-trend-Kkjw_ZVf.js → vue-ui-spark-trend-CCPXy2ZD.js} +2 -2
- package/dist/{vue-ui-sparkbar-BnBIa2eJ.js → vue-ui-sparkbar-DMuih6Dx.js} +2 -2
- package/dist/{vue-ui-sparkgauge-B1zvTOG5.js → vue-ui-sparkgauge-BZFeEMV9.js} +2 -2
- package/dist/{vue-ui-sparkhistogram-Dh_HlHC9.js → vue-ui-sparkhistogram-DahIfjLU.js} +2 -2
- package/dist/{vue-ui-sparkline-BOA11MZR.js → vue-ui-sparkline-CaehcwBo.js} +2 -2
- package/dist/{vue-ui-sparkstackbar-BSte0Azx.js → vue-ui-sparkstackbar-On4F24cq.js} +2 -2
- package/dist/{vue-ui-stackbar-DrOYeLWK.js → vue-ui-stackbar-aN5cfErv.js} +3 -3
- package/dist/{vue-ui-stackline-kuSASJXR.js → vue-ui-stackline-CTPUaU0K.js} +3 -3
- package/dist/{vue-ui-strip-plot-Bs0K-e1Z.js → vue-ui-strip-plot-BO7YQnRj.js} +3 -3
- package/dist/{vue-ui-table-oNEaOWiu.js → vue-ui-table-Dg6j7T65.js} +3 -3
- package/dist/{vue-ui-table-heatmap-BGEjaJLQ.js → vue-ui-table-heatmap-CDnzIKGy.js} +1 -1
- package/dist/{vue-ui-table-sparkline-BFbSph66.js → vue-ui-table-sparkline-DE_LyDJV.js} +2 -2
- package/dist/{vue-ui-thermometer-07xalNuL.js → vue-ui-thermometer-C6LrWdX4.js} +3 -3
- package/dist/{vue-ui-timer-Dl7m3cB6.js → vue-ui-timer-DCENDOVz.js} +3 -3
- package/dist/{vue-ui-tiremarks-C8pPFmMU.js → vue-ui-tiremarks-CEQM_3u0.js} +3 -3
- package/dist/{vue-ui-treemap-COJ74Xt4.js → vue-ui-treemap-Cighusxg.js} +3 -3
- package/dist/{vue-ui-waffle-7tGsSzS6.js → vue-ui-waffle-Cs4LXcYi.js} +3 -3
- package/dist/{vue-ui-wheel-DDYtoMJf.js → vue-ui-wheel-DchTydjv.js} +3 -3
- package/dist/{vue-ui-word-cloud-CwS6NzLs.js → vue-ui-word-cloud-BlsRq_M1.js} +3 -3
- package/dist/{vue-ui-world-DgrnTh0K.js → vue-ui-world-C8zN4MHP.js} +2 -2
- package/dist/{vue-ui-xy-3OjLID83.js → vue-ui-xy-1vhl0WmV.js} +4 -4
- package/dist/{vue-ui-xy-canvas-BOQ3nptA.js → vue-ui-xy-canvas-9tgX_s2v.js} +3 -3
- package/package.json +1 -1
- package/dist/vue-ui-geo-DbXBoMee.js +0 -1243
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { ref as
|
|
2
|
-
import { c as ut, az as dn, t as fn, o as hn, g as
|
|
1
|
+
import { ref as E, watchEffect as an, unref as v, defineAsyncComponent as et, toRefs as ln, computed as H, onMounted as Gt, nextTick as Ne, watch as Ae, onBeforeUnmount as jt, createElementBlock as _, openBlock as y, normalizeStyle as ce, normalizeClass as Wt, createCommentVNode as L, createBlock as te, createVNode as tt, toDisplayString as Se, withCtx as F, renderSlot as M, normalizeProps as z, guardReactiveProps as V, createSlots as cn, createElementVNode as K, Fragment as ue, renderList as Le, withModifiers as Yt, mergeProps as ot, createTextVNode as un, Transition as Ht, Teleport as Ut } from "vue";
|
|
2
|
+
import { c as ut, az as dn, t as fn, o as hn, g as Zt, l as Xt, X as mn, aq as gn } from "./lib-W9waxHL3.js";
|
|
3
3
|
import { t as vn, u as pn } from "./useResponsive-DfdjqQps.js";
|
|
4
4
|
import { u as bn } from "./usePanZoom-CDF7rb3o.js";
|
|
5
|
-
import { u as wn, a as nt } from "./useNestedProp-
|
|
5
|
+
import { u as wn, a as nt } from "./useNestedProp-D-jUHecl.js";
|
|
6
6
|
import { u as yn, B as kn } from "./BaseScanner-BMpwQAfz.js";
|
|
7
7
|
import { u as En } from "./usePrinter-DhoMn87n.js";
|
|
8
8
|
import { u as Cn } from "./useSvgExport-ByUukOZt.js";
|
|
9
9
|
import { u as _n } from "./useThemeCheck-DGJ31Vi5.js";
|
|
10
10
|
import { u as xn } from "./useUserOptionState-BIvW1Kz7.js";
|
|
11
11
|
import { u as Nn } from "./useChartAccessibility-9icAAmYg.js";
|
|
12
|
-
import An from "./Title-
|
|
13
|
-
import { B as
|
|
12
|
+
import An from "./Title-DFtCaCah.js";
|
|
13
|
+
import { B as qt } from "./BaseZoomControls-D8N7fb-c.js";
|
|
14
14
|
import Sn from "./img-BJzUSmkm.js";
|
|
15
15
|
import { _ as Ln } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
16
|
-
const Mn = "\0",
|
|
16
|
+
const Mn = "\0", de = "\0", Kt = "";
|
|
17
17
|
class oe {
|
|
18
18
|
_isDirected = !0;
|
|
19
19
|
_isMultigraph = !1;
|
|
@@ -47,7 +47,7 @@ class oe {
|
|
|
47
47
|
_parent;
|
|
48
48
|
_children;
|
|
49
49
|
constructor(t) {
|
|
50
|
-
t && (this._isDirected = Object.hasOwn(t, "directed") ? t.directed : !0, this._isMultigraph = Object.hasOwn(t, "multigraph") ? t.multigraph : !1, this._isCompound = Object.hasOwn(t, "compound") ? t.compound : !1), this._isCompound && (this._parent = {}, this._children = {}, this._children[
|
|
50
|
+
t && (this._isDirected = Object.hasOwn(t, "directed") ? t.directed : !0, this._isMultigraph = Object.hasOwn(t, "multigraph") ? t.multigraph : !1, this._isCompound = Object.hasOwn(t, "compound") ? t.compound : !1), this._isCompound && (this._parent = {}, this._children = {}, this._children[de] = {});
|
|
51
51
|
}
|
|
52
52
|
/* === Graph functions ========= */
|
|
53
53
|
/**
|
|
@@ -139,7 +139,7 @@ class oe {
|
|
|
139
139
|
* Complexity: O(1).
|
|
140
140
|
*/
|
|
141
141
|
setNode(t, o) {
|
|
142
|
-
return Object.hasOwn(this._nodes, t) ? (arguments.length > 1 && (this._nodes[t] = o), this) : (this._nodes[t] = arguments.length > 1 ? o : this._defaultNodeLabelFn(t), this._isCompound && (this._parent[t] =
|
|
142
|
+
return Object.hasOwn(this._nodes, t) ? (arguments.length > 1 && (this._nodes[t] = o), this) : (this._nodes[t] = arguments.length > 1 ? o : this._defaultNodeLabelFn(t), this._isCompound && (this._parent[t] = de, this._children[t] = {}, this._children[de][t] = !0), this._in[t] = {}, this._preds[t] = {}, this._out[t] = {}, this._sucs[t] = {}, ++this._nodeCount, this);
|
|
143
143
|
}
|
|
144
144
|
/**
|
|
145
145
|
* Gets the label of node with specified name.
|
|
@@ -180,7 +180,7 @@ class oe {
|
|
|
180
180
|
if (!this._isCompound)
|
|
181
181
|
throw new Error("Cannot set parent in a non-compound graph");
|
|
182
182
|
if (o === void 0)
|
|
183
|
-
o =
|
|
183
|
+
o = de;
|
|
184
184
|
else {
|
|
185
185
|
o += "";
|
|
186
186
|
for (let n = o; n !== void 0; n = this.parent(n))
|
|
@@ -202,7 +202,7 @@ class oe {
|
|
|
202
202
|
parent(t) {
|
|
203
203
|
if (this._isCompound) {
|
|
204
204
|
const o = this._parent[t];
|
|
205
|
-
if (o !==
|
|
205
|
+
if (o !== de)
|
|
206
206
|
return o;
|
|
207
207
|
}
|
|
208
208
|
}
|
|
@@ -210,13 +210,13 @@ class oe {
|
|
|
210
210
|
* Gets list of direct children of node nodeId.
|
|
211
211
|
* Complexity: O(1).
|
|
212
212
|
*/
|
|
213
|
-
children(t =
|
|
213
|
+
children(t = de) {
|
|
214
214
|
if (this._isCompound) {
|
|
215
215
|
const o = this._children[t];
|
|
216
216
|
if (o)
|
|
217
217
|
return Object.keys(o);
|
|
218
218
|
} else {
|
|
219
|
-
if (t ===
|
|
219
|
+
if (t === de)
|
|
220
220
|
return this.nodes();
|
|
221
221
|
if (this.hasNode(t))
|
|
222
222
|
return [];
|
|
@@ -331,21 +331,21 @@ class oe {
|
|
|
331
331
|
let t, o, n, s, i = !1;
|
|
332
332
|
const r = arguments[0];
|
|
333
333
|
typeof r == "object" && r !== null && "v" in r ? (t = r.v, o = r.w, n = r.name, arguments.length === 2 && (s = arguments[1], i = !0)) : (t = r, o = arguments[1], n = arguments[3], arguments.length > 2 && (s = arguments[2], i = !0)), t = "" + t, o = "" + o, n !== void 0 && (n = "" + n);
|
|
334
|
-
let a =
|
|
334
|
+
let a = Me(this._isDirected, t, o, n);
|
|
335
335
|
if (Object.hasOwn(this._edgeLabels, a))
|
|
336
336
|
return i && (this._edgeLabels[a] = s), this;
|
|
337
337
|
if (n !== void 0 && !this._isMultigraph)
|
|
338
338
|
throw new Error("Cannot set a named edge when isMultigraph = false");
|
|
339
339
|
this.setNode(t), this.setNode(o), this._edgeLabels[a] = i ? s : this._defaultEdgeLabelFn(t, o, n);
|
|
340
340
|
const l = On(this._isDirected, t, o, n);
|
|
341
|
-
return t = l.v, o = l.w, Object.freeze(l), this._edgeObjs[a] = l,
|
|
341
|
+
return t = l.v, o = l.w, Object.freeze(l), this._edgeObjs[a] = l, Jt(this._preds[o], t), Jt(this._sucs[t], o), this._in[o][a] = l, this._out[t][a] = l, this._edgeCount++, this;
|
|
342
342
|
}
|
|
343
343
|
/**
|
|
344
344
|
* Gets the label for the specified edge.
|
|
345
345
|
* Complexity: O(1).
|
|
346
346
|
*/
|
|
347
347
|
edge(t, o, n) {
|
|
348
|
-
const s = arguments.length === 1 ? st(this._isDirected, arguments[0]) :
|
|
348
|
+
const s = arguments.length === 1 ? st(this._isDirected, arguments[0]) : Me(this._isDirected, t, o, n);
|
|
349
349
|
return this._edgeLabels[s];
|
|
350
350
|
}
|
|
351
351
|
/**
|
|
@@ -361,7 +361,7 @@ class oe {
|
|
|
361
361
|
* Complexity: O(1).
|
|
362
362
|
*/
|
|
363
363
|
hasEdge(t, o, n) {
|
|
364
|
-
const s = arguments.length === 1 ? st(this._isDirected, arguments[0]) :
|
|
364
|
+
const s = arguments.length === 1 ? st(this._isDirected, arguments[0]) : Me(this._isDirected, t, o, n);
|
|
365
365
|
return Object.hasOwn(this._edgeLabels, s);
|
|
366
366
|
}
|
|
367
367
|
/**
|
|
@@ -369,8 +369,8 @@ class oe {
|
|
|
369
369
|
* Complexity: O(1).
|
|
370
370
|
*/
|
|
371
371
|
removeEdge(t, o, n) {
|
|
372
|
-
const s = arguments.length === 1 ? st(this._isDirected, arguments[0]) :
|
|
373
|
-
return i && (t = i.v, o = i.w, delete this._edgeLabels[s], delete this._edgeObjs[s],
|
|
372
|
+
const s = arguments.length === 1 ? st(this._isDirected, arguments[0]) : Me(this._isDirected, t, o, n), i = this._edgeObjs[s];
|
|
373
|
+
return i && (t = i.v, o = i.w, delete this._edgeLabels[s], delete this._edgeObjs[s], Qt(this._preds[o], t), Qt(this._sucs[t], o), delete this._in[o][s], delete this._out[t][s], this._edgeCount--), this;
|
|
374
374
|
}
|
|
375
375
|
/**
|
|
376
376
|
* Return all edges that point to the node v. Optionally filters those edges down to just those
|
|
@@ -407,19 +407,19 @@ class oe {
|
|
|
407
407
|
return n.concat(this.outEdges(t, o));
|
|
408
408
|
}
|
|
409
409
|
}
|
|
410
|
-
function
|
|
410
|
+
function Jt(e, t) {
|
|
411
411
|
e[t] ? e[t]++ : e[t] = 1;
|
|
412
412
|
}
|
|
413
|
-
function
|
|
413
|
+
function Qt(e, t) {
|
|
414
414
|
--e[t] || delete e[t];
|
|
415
415
|
}
|
|
416
|
-
function
|
|
416
|
+
function Me(e, t, o, n) {
|
|
417
417
|
let s = "" + t, i = "" + o;
|
|
418
418
|
if (!e && s > i) {
|
|
419
419
|
const r = s;
|
|
420
420
|
s = i, i = r;
|
|
421
421
|
}
|
|
422
|
-
return s +
|
|
422
|
+
return s + Kt + i + Kt + (n === void 0 ? Mn : n);
|
|
423
423
|
}
|
|
424
424
|
function On(e, t, o, n) {
|
|
425
425
|
let s = "" + t, i = "" + o;
|
|
@@ -431,7 +431,7 @@ function On(e, t, o, n) {
|
|
|
431
431
|
return n && (r.name = n), r;
|
|
432
432
|
}
|
|
433
433
|
function st(e, t) {
|
|
434
|
-
return
|
|
434
|
+
return Me(e, t.v, t.w, t.name);
|
|
435
435
|
}
|
|
436
436
|
class Dn {
|
|
437
437
|
constructor() {
|
|
@@ -441,11 +441,11 @@ class Dn {
|
|
|
441
441
|
dequeue() {
|
|
442
442
|
const t = this._sentinel, o = t._prev;
|
|
443
443
|
if (o !== t)
|
|
444
|
-
return
|
|
444
|
+
return eo(o), o;
|
|
445
445
|
}
|
|
446
446
|
enqueue(t) {
|
|
447
447
|
const o = this._sentinel;
|
|
448
|
-
t._prev && t._next &&
|
|
448
|
+
t._prev && t._next && eo(t), t._next = o._next, o._next._prev = t, o._next = t, t._prev = o;
|
|
449
449
|
}
|
|
450
450
|
toString() {
|
|
451
451
|
const t = [], o = this._sentinel;
|
|
@@ -455,7 +455,7 @@ class Dn {
|
|
|
455
455
|
return "[" + t.join(", ") + "]";
|
|
456
456
|
}
|
|
457
457
|
}
|
|
458
|
-
function
|
|
458
|
+
function eo(e) {
|
|
459
459
|
e._prev._next = e._next, e._next._prev = e._prev, delete e._next, delete e._prev;
|
|
460
460
|
}
|
|
461
461
|
function Rn(e, t) {
|
|
@@ -466,10 +466,10 @@ const Tn = () => 1;
|
|
|
466
466
|
function Pn(e, t) {
|
|
467
467
|
if (e.nodeCount() <= 1)
|
|
468
468
|
return [];
|
|
469
|
-
const o =
|
|
470
|
-
return
|
|
469
|
+
const o = Fn(e, t || Tn);
|
|
470
|
+
return $n(o.graph, o.buckets, o.zeroIndex).flatMap((s) => e.outEdges(s.v, s.w));
|
|
471
471
|
}
|
|
472
|
-
function
|
|
472
|
+
function $n(e, t, o) {
|
|
473
473
|
let n = [];
|
|
474
474
|
const s = t[t.length - 1], i = t[0];
|
|
475
475
|
let r;
|
|
@@ -498,14 +498,14 @@ function rt(e, t, o, n, s) {
|
|
|
498
498
|
l.in -= a, dt(t, o, l);
|
|
499
499
|
}), e.removeNode(n.v), i;
|
|
500
500
|
}
|
|
501
|
-
function
|
|
501
|
+
function Fn(e, t) {
|
|
502
502
|
const o = new oe();
|
|
503
503
|
let n = 0, s = 0;
|
|
504
504
|
e.nodes().forEach((a) => {
|
|
505
505
|
o.setNode(a, { v: a, in: 0, out: 0 });
|
|
506
506
|
}), e.edges().forEach((a) => {
|
|
507
|
-
const l = o.edge(a.v, a.w) || 0, c = t(a),
|
|
508
|
-
o.setEdge(a.v, a.w,
|
|
507
|
+
const l = o.edge(a.v, a.w) || 0, c = t(a), f = l + c;
|
|
508
|
+
o.setEdge(a.v, a.w, f), s = Math.max(s, o.node(a.v).out += c), n = Math.max(n, o.node(a.w).in += c);
|
|
509
509
|
});
|
|
510
510
|
const i = Bn(s + n + 3).map(() => new Dn()), r = n + 1;
|
|
511
511
|
return o.nodes().forEach((a) => {
|
|
@@ -525,13 +525,13 @@ function Bn(e) {
|
|
|
525
525
|
t.push(o);
|
|
526
526
|
return t;
|
|
527
527
|
}
|
|
528
|
-
function
|
|
528
|
+
function pe(e, t, o, n) {
|
|
529
529
|
let s = n;
|
|
530
530
|
for (; e.hasNode(s); )
|
|
531
531
|
s = Ve(n);
|
|
532
532
|
return o.dummy = t, e.setNode(s, o), s;
|
|
533
533
|
}
|
|
534
|
-
function
|
|
534
|
+
function fo(e) {
|
|
535
535
|
const t = new oe().setGraph(e.graph());
|
|
536
536
|
return e.nodes().forEach((o) => {
|
|
537
537
|
t.setNode(o, e.node(o));
|
|
@@ -578,14 +578,14 @@ function ft(e, t) {
|
|
|
578
578
|
let l, c;
|
|
579
579
|
return Math.abs(i) * r > Math.abs(s) * a ? (i < 0 && (a = -a), l = a * s / i, c = a) : (s < 0 && (r = -r), l = r, c = r * i / s), { x: o + l, y: n + c };
|
|
580
580
|
}
|
|
581
|
-
function
|
|
582
|
-
const t =
|
|
581
|
+
function De(e) {
|
|
582
|
+
const t = ve(mt(e) + 1).map(() => []);
|
|
583
583
|
return e.nodes().forEach((o) => {
|
|
584
584
|
const n = e.node(o), s = n.rank;
|
|
585
585
|
s !== void 0 && (t[s][n.order] = o);
|
|
586
586
|
}), t;
|
|
587
587
|
}
|
|
588
|
-
function
|
|
588
|
+
function ho(e) {
|
|
589
589
|
const t = e.nodes().map((n) => {
|
|
590
590
|
const s = e.node(n).rank;
|
|
591
591
|
return s === void 0 ? Number.MAX_VALUE : s;
|
|
@@ -595,7 +595,7 @@ function uo(e) {
|
|
|
595
595
|
Object.hasOwn(s, "rank") && (s.rank -= o);
|
|
596
596
|
});
|
|
597
597
|
}
|
|
598
|
-
function
|
|
598
|
+
function mo(e) {
|
|
599
599
|
const t = e.nodes().map((r) => e.node(r).rank).filter((r) => r !== void 0), o = X(Math.min, t), n = [];
|
|
600
600
|
e.nodes().forEach((r) => {
|
|
601
601
|
const a = e.node(r).rank - o;
|
|
@@ -614,10 +614,10 @@ function In(e, t, o, n) {
|
|
|
614
614
|
width: 0,
|
|
615
615
|
height: 0
|
|
616
616
|
};
|
|
617
|
-
return arguments.length >= 4 && (s.rank = o, s.order = n),
|
|
617
|
+
return arguments.length >= 4 && (s.rank = o, s.order = n), pe(e, "border", s, t);
|
|
618
618
|
}
|
|
619
|
-
const
|
|
620
|
-
function Gn(e, t =
|
|
619
|
+
const go = 65535;
|
|
620
|
+
function Gn(e, t = go) {
|
|
621
621
|
const o = [];
|
|
622
622
|
for (let n = 0; n < e.length; n += t) {
|
|
623
623
|
const s = e.slice(n, n + t);
|
|
@@ -626,7 +626,7 @@ function Gn(e, t = ho) {
|
|
|
626
626
|
return o;
|
|
627
627
|
}
|
|
628
628
|
function X(e, t) {
|
|
629
|
-
if (t.length >
|
|
629
|
+
if (t.length > go) {
|
|
630
630
|
const o = Gn(t);
|
|
631
631
|
return e.apply(
|
|
632
632
|
null,
|
|
@@ -642,13 +642,13 @@ function mt(e) {
|
|
|
642
642
|
});
|
|
643
643
|
return X(Math.max, o);
|
|
644
644
|
}
|
|
645
|
-
function
|
|
645
|
+
function vo(e, t) {
|
|
646
646
|
const o = { lhs: [], rhs: [] };
|
|
647
647
|
return e.forEach((n) => {
|
|
648
648
|
t(n) ? o.lhs.push(n) : o.rhs.push(n);
|
|
649
649
|
}), o;
|
|
650
650
|
}
|
|
651
|
-
function
|
|
651
|
+
function po(e, t) {
|
|
652
652
|
const o = Date.now();
|
|
653
653
|
try {
|
|
654
654
|
return t();
|
|
@@ -656,7 +656,7 @@ function go(e, t) {
|
|
|
656
656
|
console.log(e + " time: " + (Date.now() - o) + "ms");
|
|
657
657
|
}
|
|
658
658
|
}
|
|
659
|
-
function
|
|
659
|
+
function bo(e, t) {
|
|
660
660
|
return t();
|
|
661
661
|
}
|
|
662
662
|
let jn = 0;
|
|
@@ -664,7 +664,7 @@ function Ve(e) {
|
|
|
664
664
|
const t = ++jn;
|
|
665
665
|
return e + String(t);
|
|
666
666
|
}
|
|
667
|
-
function
|
|
667
|
+
function ve(e, t, o = 1) {
|
|
668
668
|
t == null && (t = e, e = 0);
|
|
669
669
|
let n = (i) => i < t;
|
|
670
670
|
o < 0 && (n = (i) => t < i);
|
|
@@ -673,13 +673,13 @@ function ge(e, t, o = 1) {
|
|
|
673
673
|
s.push(i);
|
|
674
674
|
return s;
|
|
675
675
|
}
|
|
676
|
-
function
|
|
676
|
+
function Oe(e, t) {
|
|
677
677
|
const o = {};
|
|
678
678
|
for (const n of t)
|
|
679
679
|
e[n] !== void 0 && (o[n] = e[n]);
|
|
680
680
|
return o;
|
|
681
681
|
}
|
|
682
|
-
function
|
|
682
|
+
function Re(e, t) {
|
|
683
683
|
let o = t;
|
|
684
684
|
if (typeof t == "string") {
|
|
685
685
|
const n = t;
|
|
@@ -692,23 +692,23 @@ function Ie(e, t) {
|
|
|
692
692
|
}
|
|
693
693
|
const ze = {
|
|
694
694
|
addBorderNode: In,
|
|
695
|
-
addDummyNode:
|
|
695
|
+
addDummyNode: pe,
|
|
696
696
|
applyWithChunking: X,
|
|
697
697
|
asNonCompoundGraph: ht,
|
|
698
|
-
buildLayerMatrix:
|
|
698
|
+
buildLayerMatrix: De,
|
|
699
699
|
intersectRect: ft,
|
|
700
|
-
mapValues:
|
|
700
|
+
mapValues: Re,
|
|
701
701
|
maxRank: mt,
|
|
702
|
-
normalizeRanks:
|
|
703
|
-
notime:
|
|
704
|
-
partition:
|
|
705
|
-
pick:
|
|
702
|
+
normalizeRanks: ho,
|
|
703
|
+
notime: bo,
|
|
704
|
+
partition: vo,
|
|
705
|
+
pick: Oe,
|
|
706
706
|
predecessorWeights: Vn,
|
|
707
|
-
range:
|
|
708
|
-
removeEmptyRanks:
|
|
709
|
-
simplify:
|
|
707
|
+
range: ve,
|
|
708
|
+
removeEmptyRanks: mo,
|
|
709
|
+
simplify: fo,
|
|
710
710
|
successorWeights: zn,
|
|
711
|
-
time:
|
|
711
|
+
time: po,
|
|
712
712
|
uniqueId: Ve,
|
|
713
713
|
zipObject: Ie
|
|
714
714
|
};
|
|
@@ -749,15 +749,15 @@ function Zn(e, t) {
|
|
|
749
749
|
if (i === n + 1)
|
|
750
750
|
return;
|
|
751
751
|
e.removeEdge(t);
|
|
752
|
-
let c,
|
|
752
|
+
let c, f, m;
|
|
753
753
|
for (m = 0, ++n; n < i; ++m, ++n)
|
|
754
|
-
a.points = [],
|
|
754
|
+
a.points = [], f = {
|
|
755
755
|
width: 0,
|
|
756
756
|
height: 0,
|
|
757
757
|
edgeLabel: a,
|
|
758
758
|
edgeObj: t,
|
|
759
759
|
rank: n
|
|
760
|
-
}, c =
|
|
760
|
+
}, c = pe(e, "edge", f, "_d"), n === l && (f.width = a.width, f.height = a.height, f.dummy = "edge-label", f.labelpos = a.labelpos), e.setEdge(o, c, { weight: a.weight }, r), m === 0 && e.graph().dummyChains.push(c), o = c;
|
|
761
761
|
e.setEdge(o, s, { weight: a.weight }, r);
|
|
762
762
|
}
|
|
763
763
|
function Xn(e) {
|
|
@@ -770,7 +770,7 @@ function Xn(e) {
|
|
|
770
770
|
s = e.successors(t)[0], e.removeNode(t), n.points.push({ x: o.x, y: o.y }), o.dummy === "edge-label" && (n.x = o.x, n.y = o.y, n.width = o.width, n.height = o.height), t = s, o = e.node(t);
|
|
771
771
|
});
|
|
772
772
|
}
|
|
773
|
-
function
|
|
773
|
+
function wo(e) {
|
|
774
774
|
function t(o) {
|
|
775
775
|
const n = e.node(o);
|
|
776
776
|
if (n && Object.prototype.hasOwnProperty.call(n, "rank"))
|
|
@@ -781,8 +781,8 @@ function po(e) {
|
|
|
781
781
|
const i = s.map((a) => {
|
|
782
782
|
if (!e.node(a.w))
|
|
783
783
|
return Number.POSITIVE_INFINITY;
|
|
784
|
-
const c = t(a.w),
|
|
785
|
-
return c -
|
|
784
|
+
const c = t(a.w), f = e.edge(a).minlen;
|
|
785
|
+
return c - f;
|
|
786
786
|
});
|
|
787
787
|
let r = X(Math.min, i);
|
|
788
788
|
return r === Number.POSITIVE_INFINITY && (r = 0), n && (n.rank = r), r;
|
|
@@ -805,8 +805,8 @@ function Kn(e) {
|
|
|
805
805
|
for (; s.size < o.length; ) {
|
|
806
806
|
const i = Qn(e, s);
|
|
807
807
|
if (!i) {
|
|
808
|
-
const
|
|
809
|
-
s.add(
|
|
808
|
+
const f = o.find((m) => !s.has(m));
|
|
809
|
+
s.add(f), t.setNode(f, {});
|
|
810
810
|
continue;
|
|
811
811
|
}
|
|
812
812
|
const { edgeObject: r, delta: a, attachFrom: l, attachTo: c } = i;
|
|
@@ -828,10 +828,10 @@ function Qn(e, t) {
|
|
|
828
828
|
return;
|
|
829
829
|
const r = qn(e, n), a = Math.abs(r);
|
|
830
830
|
if (!o || a < o.absoluteSlack) {
|
|
831
|
-
const l = s ? n.v : n.w, c = s ? n.w : n.v,
|
|
831
|
+
const l = s ? n.v : n.w, c = s ? n.w : n.v, f = s ? r : -r;
|
|
832
832
|
o = {
|
|
833
833
|
edgeObject: n,
|
|
834
|
-
delta:
|
|
834
|
+
delta: f,
|
|
835
835
|
attachFrom: l,
|
|
836
836
|
attachTo: c,
|
|
837
837
|
absoluteSlack: a
|
|
@@ -847,9 +847,9 @@ function es(e, t, o, n) {
|
|
|
847
847
|
}
|
|
848
848
|
});
|
|
849
849
|
}
|
|
850
|
-
function
|
|
851
|
-
const t =
|
|
852
|
-
return
|
|
850
|
+
function be(e) {
|
|
851
|
+
const t = fo(e);
|
|
852
|
+
return wo(t), t.nodes().forEach((o) => {
|
|
853
853
|
const n = t.node(o), s = e.node(o) || {};
|
|
854
854
|
s.rank = n.rank, e.setNode(o, s);
|
|
855
855
|
}), e;
|
|
@@ -867,19 +867,19 @@ function ss(e) {
|
|
|
867
867
|
function rs(e, t) {
|
|
868
868
|
return null;
|
|
869
869
|
}
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
const
|
|
870
|
+
be.initLowLimValues = ts;
|
|
871
|
+
be.initCutValues = os;
|
|
872
|
+
be.calcCutValue = ns;
|
|
873
|
+
be.leaveEdge = ss;
|
|
874
|
+
be.enterEdge = rs;
|
|
875
|
+
const yo = wo;
|
|
876
876
|
function is(e) {
|
|
877
877
|
const t = e.graph().ranker;
|
|
878
878
|
if (t instanceof Function)
|
|
879
879
|
return t(e);
|
|
880
880
|
switch (e.graph().ranker) {
|
|
881
881
|
case "network-simplex":
|
|
882
|
-
|
|
882
|
+
to(e);
|
|
883
883
|
break;
|
|
884
884
|
case "tight-tree":
|
|
885
885
|
ls(e);
|
|
@@ -890,29 +890,29 @@ function is(e) {
|
|
|
890
890
|
case "none":
|
|
891
891
|
break;
|
|
892
892
|
default:
|
|
893
|
-
|
|
893
|
+
to(e);
|
|
894
894
|
}
|
|
895
895
|
}
|
|
896
|
-
const as =
|
|
896
|
+
const as = yo;
|
|
897
897
|
function ls(e) {
|
|
898
|
-
|
|
898
|
+
yo(e), Kn(e);
|
|
899
899
|
}
|
|
900
|
-
function
|
|
901
|
-
|
|
900
|
+
function to(e) {
|
|
901
|
+
be(e);
|
|
902
902
|
}
|
|
903
903
|
function cs(e) {
|
|
904
904
|
const t = ds(e);
|
|
905
905
|
e.graph().dummyChains.forEach((o) => {
|
|
906
906
|
let n = e.node(o);
|
|
907
907
|
const s = n.edgeObj, i = us(e, t, s.v, s.w), r = i.path, a = i.lca;
|
|
908
|
-
let l = 0, c = r[l],
|
|
908
|
+
let l = 0, c = r[l], f = !0, m = o;
|
|
909
909
|
for (; m !== s.w; ) {
|
|
910
|
-
if (n = e.node(m),
|
|
910
|
+
if (n = e.node(m), f) {
|
|
911
911
|
for (; (c = r[l]) !== a && e.node(c).maxRank < n.rank; )
|
|
912
912
|
l++;
|
|
913
|
-
c === a && (
|
|
913
|
+
c === a && (f = !1);
|
|
914
914
|
}
|
|
915
|
-
if (!
|
|
915
|
+
if (!f) {
|
|
916
916
|
for (; l < r.length - 1 && e.node(c = r[l + 1]).minRank <= n.rank; )
|
|
917
917
|
l++;
|
|
918
918
|
c = r[l];
|
|
@@ -951,25 +951,25 @@ function fs(e) {
|
|
|
951
951
|
});
|
|
952
952
|
const r = ms(e) + 1;
|
|
953
953
|
e.children().forEach((a) => {
|
|
954
|
-
|
|
954
|
+
ko(e, t, i, r, s, o, a);
|
|
955
955
|
}), e.graph().nodeRankFactor = i;
|
|
956
956
|
}
|
|
957
|
-
function
|
|
957
|
+
function ko(e, t, o, n, s, i, r) {
|
|
958
958
|
const a = e.children(r);
|
|
959
959
|
if (!a.length) {
|
|
960
960
|
r !== t && e.setEdge(t, r, { weight: 0, minlen: o });
|
|
961
961
|
return;
|
|
962
962
|
}
|
|
963
|
-
const l = ze.addBorderNode(e, "_bt"), c = ze.addBorderNode(e, "_bb"),
|
|
964
|
-
e.setParent(l, r),
|
|
965
|
-
|
|
966
|
-
const g = e.node(m),
|
|
967
|
-
e.setEdge(l,
|
|
968
|
-
weight:
|
|
963
|
+
const l = ze.addBorderNode(e, "_bt"), c = ze.addBorderNode(e, "_bb"), f = e.node(r);
|
|
964
|
+
e.setParent(l, r), f.borderTop = l, e.setParent(c, r), f.borderBottom = c, a.forEach((m) => {
|
|
965
|
+
ko(e, t, o, n, s, i, m);
|
|
966
|
+
const g = e.node(m), w = g.borderTop ? g.borderTop : m, N = g.borderBottom ? g.borderBottom : m, x = g.borderTop ? n : 2 * n, P = w !== N ? 1 : s - i[r] + 1;
|
|
967
|
+
e.setEdge(l, w, {
|
|
968
|
+
weight: x,
|
|
969
969
|
minlen: P,
|
|
970
970
|
nestingEdge: !0
|
|
971
971
|
}), e.setEdge(N, c, {
|
|
972
|
-
weight:
|
|
972
|
+
weight: x,
|
|
973
973
|
minlen: P,
|
|
974
974
|
nestingEdge: !0
|
|
975
975
|
});
|
|
@@ -1001,36 +1001,36 @@ function vs(e) {
|
|
|
1001
1001
|
if (n.length && n.forEach(t), Object.hasOwn(s, "minRank")) {
|
|
1002
1002
|
s.borderLeft = [], s.borderRight = [];
|
|
1003
1003
|
for (let i = s.minRank, r = s.maxRank + 1; i < r; ++i)
|
|
1004
|
-
|
|
1004
|
+
oo(e, "borderLeft", "_bl", o, s, i), oo(e, "borderRight", "_br", o, s, i);
|
|
1005
1005
|
}
|
|
1006
1006
|
}
|
|
1007
1007
|
e.children().forEach(t);
|
|
1008
1008
|
}
|
|
1009
|
-
function
|
|
1009
|
+
function oo(e, t, o, n, s, i) {
|
|
1010
1010
|
const r = {
|
|
1011
1011
|
width: 0,
|
|
1012
1012
|
height: 0,
|
|
1013
1013
|
rank: i,
|
|
1014
1014
|
borderType: t
|
|
1015
|
-
}, a = s[t][i - 1], l =
|
|
1015
|
+
}, a = s[t][i - 1], l = pe(e, "border", r, o);
|
|
1016
1016
|
s[t][i] = l, e.setParent(l, n), a && e.setEdge(a, l, { weight: 1 });
|
|
1017
1017
|
}
|
|
1018
1018
|
function ps(e) {
|
|
1019
1019
|
const t = e.graph().rankdir.toLowerCase();
|
|
1020
|
-
(t === "lr" || t === "rl") &&
|
|
1020
|
+
(t === "lr" || t === "rl") && Eo(e);
|
|
1021
1021
|
}
|
|
1022
1022
|
function bs(e) {
|
|
1023
1023
|
const t = e.graph().rankdir.toLowerCase();
|
|
1024
|
-
(t === "bt" || t === "rl") && ws(e), (t === "lr" || t === "rl") && (ys(e),
|
|
1024
|
+
(t === "bt" || t === "rl") && ws(e), (t === "lr" || t === "rl") && (ys(e), Eo(e));
|
|
1025
1025
|
}
|
|
1026
|
-
function
|
|
1026
|
+
function Eo(e) {
|
|
1027
1027
|
e.nodes().forEach((t) => {
|
|
1028
|
-
|
|
1028
|
+
no(e.node(t));
|
|
1029
1029
|
}), e.edges().forEach((t) => {
|
|
1030
|
-
|
|
1030
|
+
no(e.edge(t));
|
|
1031
1031
|
});
|
|
1032
1032
|
}
|
|
1033
|
-
function
|
|
1033
|
+
function no(e) {
|
|
1034
1034
|
const t = e.width;
|
|
1035
1035
|
e.width = e.height, e.height = t;
|
|
1036
1036
|
}
|
|
@@ -1057,12 +1057,12 @@ function at(e) {
|
|
|
1057
1057
|
const t = e.x;
|
|
1058
1058
|
e.x = e.y, e.y = t;
|
|
1059
1059
|
}
|
|
1060
|
-
const
|
|
1060
|
+
const so = {
|
|
1061
1061
|
adjust: ps,
|
|
1062
1062
|
undo: bs
|
|
1063
1063
|
};
|
|
1064
1064
|
function ks(e) {
|
|
1065
|
-
const t = {}, o = e.nodes().filter((l) => e.children(l).length === 0), n = o.map((l) => e.node(l).rank), s = X(Math.max, n), i =
|
|
1065
|
+
const t = {}, o = e.nodes().filter((l) => e.children(l).length === 0), n = o.map((l) => e.node(l).rank), s = X(Math.max, n), i = ve(s + 1).map(() => []);
|
|
1066
1066
|
function r(l) {
|
|
1067
1067
|
if (t[l]) return;
|
|
1068
1068
|
t[l] = !0;
|
|
@@ -1082,11 +1082,11 @@ function Es(e, t) {
|
|
|
1082
1082
|
function Cs(e, t, o) {
|
|
1083
1083
|
const n = Ie(
|
|
1084
1084
|
o,
|
|
1085
|
-
o.map((c,
|
|
1086
|
-
), s = t.flatMap((c) => e.outEdges(c).map((
|
|
1087
|
-
pos: n[
|
|
1088
|
-
weight: e.edge(
|
|
1089
|
-
})).sort((
|
|
1085
|
+
o.map((c, f) => f)
|
|
1086
|
+
), s = t.flatMap((c) => e.outEdges(c).map((f) => ({
|
|
1087
|
+
pos: n[f.w],
|
|
1088
|
+
weight: e.edge(f).weight
|
|
1089
|
+
})).sort((f, m) => f.pos - m.pos));
|
|
1090
1090
|
let i = 1;
|
|
1091
1091
|
for (; i < o.length; ) i <<= 1;
|
|
1092
1092
|
const r = 2 * i - 1;
|
|
@@ -1094,11 +1094,11 @@ function Cs(e, t, o) {
|
|
|
1094
1094
|
const a = new Array(r).fill(0);
|
|
1095
1095
|
let l = 0;
|
|
1096
1096
|
return s.forEach((c) => {
|
|
1097
|
-
let
|
|
1098
|
-
a[
|
|
1097
|
+
let f = c.pos + i;
|
|
1098
|
+
a[f] += c.weight;
|
|
1099
1099
|
let m = 0;
|
|
1100
|
-
for (;
|
|
1101
|
-
|
|
1100
|
+
for (; f > 0; )
|
|
1101
|
+
f % 2 && (m += a[f + 1]), f = f - 1 >> 1, a[f] += c.weight;
|
|
1102
1102
|
l += c.weight * m;
|
|
1103
1103
|
}), l;
|
|
1104
1104
|
}
|
|
@@ -1158,22 +1158,22 @@ function Ns(e) {
|
|
|
1158
1158
|
const s = e.pop();
|
|
1159
1159
|
t.push(s), s.in.reverse().forEach(o(s)), s.out.forEach(n(s));
|
|
1160
1160
|
}
|
|
1161
|
-
return t.filter((s) => !s.merged).map((s) =>
|
|
1161
|
+
return t.filter((s) => !s.merged).map((s) => Oe(s, ["vs", "i", "barycenter", "weight"]));
|
|
1162
1162
|
}
|
|
1163
1163
|
function As(e, t) {
|
|
1164
1164
|
let o = 0, n = 0;
|
|
1165
1165
|
e.weight && (o += e.barycenter * e.weight, n += e.weight), t.weight && (o += t.barycenter * t.weight, n += t.weight), e.vs = t.vs.concat(e.vs), e.barycenter = o / n, e.weight = n, e.i = Math.min(t.i, e.i), t.merged = !0;
|
|
1166
1166
|
}
|
|
1167
1167
|
function Ss(e, t) {
|
|
1168
|
-
const o =
|
|
1168
|
+
const o = vo(e, (f) => Object.hasOwn(f, "barycenter")), n = o.lhs, s = o.rhs.sort((f, m) => m.i - f.i), i = [];
|
|
1169
1169
|
let r = 0, a = 0, l = 0;
|
|
1170
|
-
n.sort(Ls(!!t)), l =
|
|
1171
|
-
l +=
|
|
1170
|
+
n.sort(Ls(!!t)), l = ro(i, s, l), n.forEach((f) => {
|
|
1171
|
+
l += f.vs.length, i.push(f.vs), r += f.barycenter * f.weight, a += f.weight, l = ro(i, s, l);
|
|
1172
1172
|
});
|
|
1173
1173
|
const c = { vs: i.flat(!0) };
|
|
1174
1174
|
return a && (c.barycenter = r / a, c.weight = a), c;
|
|
1175
1175
|
}
|
|
1176
|
-
function
|
|
1176
|
+
function ro(e, t, o) {
|
|
1177
1177
|
let n;
|
|
1178
1178
|
for (; t.length && (n = t[t.length - 1]).i <= o; )
|
|
1179
1179
|
t.pop(), e.push(n.vs), o++;
|
|
@@ -1182,23 +1182,23 @@ function no(e, t, o) {
|
|
|
1182
1182
|
function Ls(e) {
|
|
1183
1183
|
return (t, o) => t.barycenter < o.barycenter ? -1 : t.barycenter > o.barycenter ? 1 : e ? o.i - t.i : t.i - o.i;
|
|
1184
1184
|
}
|
|
1185
|
-
function
|
|
1185
|
+
function Co(e, t, o, n) {
|
|
1186
1186
|
let s = e.children(t);
|
|
1187
1187
|
const i = e.node(t), r = i ? i.borderLeft : void 0, a = i ? i.borderRight : void 0, l = {};
|
|
1188
1188
|
r && (s = s.filter((g) => g !== r && g !== a));
|
|
1189
1189
|
const c = _s(e, s);
|
|
1190
1190
|
c.forEach((g) => {
|
|
1191
1191
|
if (e.children(g.v).length) {
|
|
1192
|
-
const
|
|
1193
|
-
l[g.v] =
|
|
1192
|
+
const w = Co(e, g.v, o, n);
|
|
1193
|
+
l[g.v] = w, Object.hasOwn(w, "barycenter") && Os(g, w);
|
|
1194
1194
|
}
|
|
1195
1195
|
});
|
|
1196
|
-
let
|
|
1197
|
-
Ms(
|
|
1198
|
-
const m = Ss(
|
|
1196
|
+
let f = xs(c, o);
|
|
1197
|
+
Ms(f, l);
|
|
1198
|
+
const m = Ss(f, n);
|
|
1199
1199
|
if (r && (m.vs = [r, m.vs, a].flat(!0), e.predecessors(r).length)) {
|
|
1200
|
-
const g = e.node(e.predecessors(r)[0]),
|
|
1201
|
-
Object.hasOwn(m, "barycenter") || (m.barycenter = 0, m.weight = 0), m.barycenter = (m.barycenter * m.weight + g.order +
|
|
1200
|
+
const g = e.node(e.predecessors(r)[0]), w = e.node(e.predecessors(a)[0]);
|
|
1201
|
+
Object.hasOwn(m, "barycenter") || (m.barycenter = 0, m.weight = 0), m.barycenter = (m.barycenter * m.weight + g.order + w.order) / (m.weight + 2), m.weight += 2;
|
|
1202
1202
|
}
|
|
1203
1203
|
return m;
|
|
1204
1204
|
}
|
|
@@ -1215,10 +1215,10 @@ function Ds(e, t, o, n) {
|
|
|
1215
1215
|
const s = Rs(e), i = new oe({ compound: !0 }).setGraph({ root: s }).setDefaultNodeLabel((r) => e.node(r));
|
|
1216
1216
|
return n.forEach((r) => {
|
|
1217
1217
|
const a = e.node(r), l = e.parent(r);
|
|
1218
|
-
(a.rank === t || a.minRank <= t && t <= a.maxRank) && (i.setNode(r), i.setParent(r, l || s), e[o](r).forEach((
|
|
1219
|
-
const m =
|
|
1218
|
+
(a.rank === t || a.minRank <= t && t <= a.maxRank) && (i.setNode(r), i.setParent(r, l || s), e[o](r).forEach((f) => {
|
|
1219
|
+
const m = f.v === r ? f.w : f.v, g = i.edge(m, r), w = g ? g.weight : 0;
|
|
1220
1220
|
i.setEdge(m, r, {
|
|
1221
|
-
weight: e.edge(
|
|
1221
|
+
weight: e.edge(f).weight + w
|
|
1222
1222
|
});
|
|
1223
1223
|
}), Object.hasOwn(a, "minRank") && i.setNode(r, {
|
|
1224
1224
|
borderLeft: a.borderLeft[t],
|
|
@@ -1244,34 +1244,34 @@ function Ts(e, t, o) {
|
|
|
1244
1244
|
}
|
|
1245
1245
|
});
|
|
1246
1246
|
}
|
|
1247
|
-
function
|
|
1247
|
+
function _o(e, t = {}) {
|
|
1248
1248
|
if (typeof t.customOrder == "function") {
|
|
1249
|
-
t.customOrder(e,
|
|
1249
|
+
t.customOrder(e, _o);
|
|
1250
1250
|
return;
|
|
1251
1251
|
}
|
|
1252
|
-
const o = mt(e), n =
|
|
1252
|
+
const o = mt(e), n = io(
|
|
1253
1253
|
e,
|
|
1254
|
-
|
|
1254
|
+
ve(1, o + 1),
|
|
1255
1255
|
"inEdges"
|
|
1256
|
-
), s =
|
|
1256
|
+
), s = io(
|
|
1257
1257
|
e,
|
|
1258
|
-
|
|
1258
|
+
ve(o - 1, -1, -1),
|
|
1259
1259
|
"outEdges"
|
|
1260
1260
|
);
|
|
1261
1261
|
let i = ks(e);
|
|
1262
|
-
if (
|
|
1262
|
+
if (ao(e, i), t.disableOptimalOrderHeuristic)
|
|
1263
1263
|
return;
|
|
1264
1264
|
let r = Number.POSITIVE_INFINITY, a;
|
|
1265
1265
|
const l = t.constraints || [];
|
|
1266
|
-
for (let c = 0,
|
|
1266
|
+
for (let c = 0, f = 0; f < 4; ++c, ++f) {
|
|
1267
1267
|
const m = c % 2 === 0 ? n : s, g = c % 4 >= 2;
|
|
1268
|
-
Ps(m, g, l), i =
|
|
1269
|
-
const
|
|
1270
|
-
|
|
1268
|
+
Ps(m, g, l), i = De(e);
|
|
1269
|
+
const w = Es(e, i);
|
|
1270
|
+
w < r ? (r = w, f = 0, a = structuredClone(i)) : w === r && (a = structuredClone(i));
|
|
1271
1271
|
}
|
|
1272
|
-
|
|
1272
|
+
ao(e, a);
|
|
1273
1273
|
}
|
|
1274
|
-
function
|
|
1274
|
+
function io(e, t, o) {
|
|
1275
1275
|
const n = /* @__PURE__ */ new Map();
|
|
1276
1276
|
function s(i, r) {
|
|
1277
1277
|
n.has(i) || n.set(i, []), n.get(i).push(r);
|
|
@@ -1295,52 +1295,52 @@ function Ps(e, t, o) {
|
|
|
1295
1295
|
const n = new oe();
|
|
1296
1296
|
e.forEach((s) => {
|
|
1297
1297
|
o.forEach((a) => n.setEdge(a.left, a.right));
|
|
1298
|
-
const i = s.graph().root, r =
|
|
1298
|
+
const i = s.graph().root, r = Co(s, i, n, t);
|
|
1299
1299
|
r.vs.forEach((a, l) => {
|
|
1300
1300
|
s.node(a).order = l;
|
|
1301
1301
|
}), Ts(s, n, r.vs);
|
|
1302
1302
|
});
|
|
1303
1303
|
}
|
|
1304
|
-
function
|
|
1304
|
+
function ao(e, t) {
|
|
1305
1305
|
Object.values(t).forEach((o) => {
|
|
1306
1306
|
o.forEach((n, s) => {
|
|
1307
1307
|
e.node(n).order = s;
|
|
1308
1308
|
});
|
|
1309
1309
|
});
|
|
1310
1310
|
}
|
|
1311
|
-
function
|
|
1311
|
+
function $s(e, t) {
|
|
1312
1312
|
const o = {};
|
|
1313
1313
|
function n(s, i) {
|
|
1314
1314
|
let r = 0, a = 0;
|
|
1315
1315
|
const l = s.length, c = i[i.length - 1];
|
|
1316
|
-
return i.forEach((
|
|
1317
|
-
const g = Bs(e,
|
|
1318
|
-
(g ||
|
|
1319
|
-
e.predecessors(N).forEach((
|
|
1320
|
-
const P = e.node(
|
|
1321
|
-
(J < r ||
|
|
1316
|
+
return i.forEach((f, m) => {
|
|
1317
|
+
const g = Bs(e, f), w = g ? e.node(g).order : l;
|
|
1318
|
+
(g || f === c) && (i.slice(a, m + 1).forEach((N) => {
|
|
1319
|
+
e.predecessors(N).forEach((x) => {
|
|
1320
|
+
const P = e.node(x), J = P.order;
|
|
1321
|
+
(J < r || w < J) && !(P.dummy && e.node(N).dummy) && xo(o, x, N);
|
|
1322
1322
|
});
|
|
1323
|
-
}), a = m + 1, r =
|
|
1323
|
+
}), a = m + 1, r = w);
|
|
1324
1324
|
}), i;
|
|
1325
1325
|
}
|
|
1326
1326
|
return t.length && t.reduce(n), o;
|
|
1327
1327
|
}
|
|
1328
|
-
function
|
|
1328
|
+
function Fs(e, t) {
|
|
1329
1329
|
const o = {};
|
|
1330
1330
|
function n(i, r, a, l, c) {
|
|
1331
|
-
let
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
const
|
|
1335
|
-
|
|
1331
|
+
let f;
|
|
1332
|
+
ve(r, a).forEach((m) => {
|
|
1333
|
+
f = i[m], e.node(f).dummy && e.predecessors(f).forEach((g) => {
|
|
1334
|
+
const w = e.node(g);
|
|
1335
|
+
w.dummy && (w.order < l || w.order > c) && xo(o, g, f);
|
|
1336
1336
|
});
|
|
1337
1337
|
});
|
|
1338
1338
|
}
|
|
1339
1339
|
function s(i, r) {
|
|
1340
1340
|
let a = -1, l, c = 0;
|
|
1341
|
-
return r.forEach((
|
|
1342
|
-
if (e.node(
|
|
1343
|
-
const g = e.predecessors(
|
|
1341
|
+
return r.forEach((f, m) => {
|
|
1342
|
+
if (e.node(f).dummy === "border") {
|
|
1343
|
+
const g = e.predecessors(f);
|
|
1344
1344
|
g.length && (l = e.node(g[0]).order, n(r, c, m, a, l), c = m, a = l);
|
|
1345
1345
|
}
|
|
1346
1346
|
n(r, c, r.length, l, i.length);
|
|
@@ -1352,7 +1352,7 @@ function Bs(e, t) {
|
|
|
1352
1352
|
if (e.node(t).dummy)
|
|
1353
1353
|
return e.predecessors(t).find((o) => e.node(o).dummy);
|
|
1354
1354
|
}
|
|
1355
|
-
function
|
|
1355
|
+
function xo(e, t, o) {
|
|
1356
1356
|
if (t > o) {
|
|
1357
1357
|
const s = t;
|
|
1358
1358
|
t = o, o = s;
|
|
@@ -1376,12 +1376,12 @@ function Vs(e, t, o, n) {
|
|
|
1376
1376
|
}), t.forEach((a) => {
|
|
1377
1377
|
let l = -1;
|
|
1378
1378
|
a.forEach((c) => {
|
|
1379
|
-
let
|
|
1380
|
-
if (
|
|
1381
|
-
|
|
1382
|
-
const m = (
|
|
1383
|
-
for (let g = Math.floor(m),
|
|
1384
|
-
const N =
|
|
1379
|
+
let f = n(c);
|
|
1380
|
+
if (f.length) {
|
|
1381
|
+
f = f.sort((g, w) => r[g] - r[w]);
|
|
1382
|
+
const m = (f.length - 1) / 2;
|
|
1383
|
+
for (let g = Math.floor(m), w = Math.ceil(m); g <= w; ++g) {
|
|
1384
|
+
const N = f[g];
|
|
1385
1385
|
i[c] === c && l < r[N] && !zs(o, c, N) && (i[N] = c, i[c] = s[c] = s[N], l = r[N]);
|
|
1386
1386
|
}
|
|
1387
1387
|
}
|
|
@@ -1391,27 +1391,27 @@ function Vs(e, t, o, n) {
|
|
|
1391
1391
|
function Is(e, t, o, n, s) {
|
|
1392
1392
|
const i = {}, r = Gs(e, t, o, s), a = s ? "borderLeft" : "borderRight";
|
|
1393
1393
|
function l(m, g) {
|
|
1394
|
-
const
|
|
1395
|
-
let
|
|
1396
|
-
for (;
|
|
1397
|
-
if (N[
|
|
1398
|
-
m(
|
|
1394
|
+
const w = r.nodes().slice(), N = {};
|
|
1395
|
+
let x = w.pop();
|
|
1396
|
+
for (; x; ) {
|
|
1397
|
+
if (N[x])
|
|
1398
|
+
m(x);
|
|
1399
1399
|
else {
|
|
1400
|
-
N[
|
|
1401
|
-
for (const P of g(
|
|
1402
|
-
|
|
1400
|
+
N[x] = !0, w.push(x);
|
|
1401
|
+
for (const P of g(x))
|
|
1402
|
+
w.push(P);
|
|
1403
1403
|
}
|
|
1404
|
-
|
|
1404
|
+
x = w.pop();
|
|
1405
1405
|
}
|
|
1406
1406
|
}
|
|
1407
1407
|
function c(m) {
|
|
1408
|
-
i[m] = r.inEdges(m).reduce((g,
|
|
1408
|
+
i[m] = r.inEdges(m).reduce((g, w) => Math.max(g, i[w.v] + r.edge(w)), 0);
|
|
1409
1409
|
}
|
|
1410
|
-
function
|
|
1411
|
-
const g = r.outEdges(m).reduce((N,
|
|
1412
|
-
g !== Number.POSITIVE_INFINITY &&
|
|
1410
|
+
function f(m) {
|
|
1411
|
+
const g = r.outEdges(m).reduce((N, x) => Math.min(N, i[x.w] - r.edge(x)), Number.POSITIVE_INFINITY), w = e.node(m);
|
|
1412
|
+
g !== Number.POSITIVE_INFINITY && w.borderType !== a && (i[m] = Math.max(i[m], g));
|
|
1413
1413
|
}
|
|
1414
|
-
return l(c, r.predecessors.bind(r)), l(
|
|
1414
|
+
return l(c, r.predecessors.bind(r)), l(f, r.successors.bind(r)), Object.keys(n).forEach((m) => {
|
|
1415
1415
|
i[m] = i[o[m]];
|
|
1416
1416
|
}), i;
|
|
1417
1417
|
}
|
|
@@ -1420,12 +1420,12 @@ function Gs(e, t, o, n) {
|
|
|
1420
1420
|
return t.forEach((a) => {
|
|
1421
1421
|
let l;
|
|
1422
1422
|
a.forEach((c) => {
|
|
1423
|
-
const
|
|
1424
|
-
if (s.setNode(
|
|
1425
|
-
const m = o[l], g = s.edge(m,
|
|
1423
|
+
const f = o[c];
|
|
1424
|
+
if (s.setNode(f), l) {
|
|
1425
|
+
const m = o[l], g = s.edge(m, f);
|
|
1426
1426
|
s.setEdge(
|
|
1427
1427
|
m,
|
|
1428
|
-
|
|
1428
|
+
f,
|
|
1429
1429
|
Math.max(r(e, c, l), g || 0)
|
|
1430
1430
|
);
|
|
1431
1431
|
}
|
|
@@ -1455,13 +1455,13 @@ function Ws(e, t) {
|
|
|
1455
1455
|
let l = e[a];
|
|
1456
1456
|
if (l === t) return;
|
|
1457
1457
|
const c = Object.values(l);
|
|
1458
|
-
let
|
|
1459
|
-
r !== "l" && (
|
|
1458
|
+
let f = n - X(Math.min, c);
|
|
1459
|
+
r !== "l" && (f = s - X(Math.max, c)), f && (l = Re(l, (m) => m + f), e[a] = l);
|
|
1460
1460
|
});
|
|
1461
1461
|
});
|
|
1462
1462
|
}
|
|
1463
1463
|
function Ys(e, t) {
|
|
1464
|
-
return
|
|
1464
|
+
return Re(e.ul, (o, n) => {
|
|
1465
1465
|
if (t)
|
|
1466
1466
|
return e[t.toLowerCase()][n];
|
|
1467
1467
|
const s = Object.values(e).map((i) => i[n]).sort((i, r) => i - r);
|
|
@@ -1469,9 +1469,9 @@ function Ys(e, t) {
|
|
|
1469
1469
|
});
|
|
1470
1470
|
}
|
|
1471
1471
|
function Hs(e) {
|
|
1472
|
-
const t =
|
|
1473
|
-
|
|
1474
|
-
|
|
1472
|
+
const t = De(e), o = Object.assign(
|
|
1473
|
+
$s(e, t),
|
|
1474
|
+
Fs(e, t)
|
|
1475
1475
|
), n = {};
|
|
1476
1476
|
let s;
|
|
1477
1477
|
["u", "d"].forEach((r) => {
|
|
@@ -1480,7 +1480,7 @@ function Hs(e) {
|
|
|
1480
1480
|
a === "r" && (l = l.map(
|
|
1481
1481
|
(g) => Object.values(g).reverse()
|
|
1482
1482
|
));
|
|
1483
|
-
const c = (r === "u" ? e.predecessors : e.successors).bind(e),
|
|
1483
|
+
const c = (r === "u" ? e.predecessors : e.successors).bind(e), f = Vs(
|
|
1484
1484
|
e,
|
|
1485
1485
|
l,
|
|
1486
1486
|
o,
|
|
@@ -1489,11 +1489,11 @@ function Hs(e) {
|
|
|
1489
1489
|
let m = Is(
|
|
1490
1490
|
e,
|
|
1491
1491
|
l,
|
|
1492
|
-
|
|
1493
|
-
|
|
1492
|
+
f.root,
|
|
1493
|
+
f.align,
|
|
1494
1494
|
a === "r"
|
|
1495
1495
|
);
|
|
1496
|
-
a === "r" && (m =
|
|
1496
|
+
a === "r" && (m = Re(m, (g) => -g)), n[r + a] = m;
|
|
1497
1497
|
});
|
|
1498
1498
|
});
|
|
1499
1499
|
const i = js(e, n);
|
|
@@ -1536,7 +1536,7 @@ function Xs(e) {
|
|
|
1536
1536
|
});
|
|
1537
1537
|
}
|
|
1538
1538
|
function qs(e) {
|
|
1539
|
-
const t =
|
|
1539
|
+
const t = De(e), o = e.graph().ranksep;
|
|
1540
1540
|
let n = 0;
|
|
1541
1541
|
t.forEach((s) => {
|
|
1542
1542
|
const i = s.reduce((r, a) => {
|
|
@@ -1549,14 +1549,14 @@ function qs(e) {
|
|
|
1549
1549
|
});
|
|
1550
1550
|
}
|
|
1551
1551
|
function Ks(e, t = {}) {
|
|
1552
|
-
const o = t.debugTiming ?
|
|
1552
|
+
const o = t.debugTiming ? po : bo;
|
|
1553
1553
|
return o("layout", () => {
|
|
1554
1554
|
const n = o(" buildLayoutGraph", () => ar(e));
|
|
1555
1555
|
return o(" runLayout", () => Js(n, o, t)), o(" updateInputGraph", () => Qs(e, n)), n;
|
|
1556
1556
|
});
|
|
1557
1557
|
}
|
|
1558
1558
|
function Js(e, t, o) {
|
|
1559
|
-
t(" makeSpaceForEdgeLabels", () => lr(e)), t(" removeSelfEdges", () => pr(e)), t(" acyclic", () => Wn(e)), t(" nestingGraph.run", () => fs(e)), t(" rank", () => is(ht(e))), t(" injectEdgeLabelProxies", () => cr(e)), t(" removeEmptyRanks", () =>
|
|
1559
|
+
t(" makeSpaceForEdgeLabels", () => lr(e)), t(" removeSelfEdges", () => pr(e)), t(" acyclic", () => Wn(e)), t(" nestingGraph.run", () => fs(e)), t(" rank", () => is(ht(e))), t(" injectEdgeLabelProxies", () => cr(e)), t(" removeEmptyRanks", () => mo(e)), t(" nestingGraph.cleanup", () => gs(e)), t(" normalizeRanks", () => ho(e)), t(" assignRankMinMax", () => ur(e)), t(" removeEdgeLabelProxies", () => dr(e)), t(" normalize.run", () => Un(e)), t(" parentDummyChains", () => cs(e)), t(" addBorderSegments", () => vs(e)), t(" order", () => _o(e, o)), t(" insertSelfEdges", () => br(e)), t(" adjustCoordinateSystem", () => so.adjust(e)), t(" position", () => Xs(e)), t(" positionSelfEdges", () => wr(e)), t(" removeBorderNodes", () => vr(e)), t(" normalize.undo", () => Xn(e)), t(" fixupEdgeLabelCoords", () => mr(e)), t(" undoCoordinateSystem", () => so.undo(e)), t(" translateGraph", () => fr(e)), t(" assignNodeIntersects", () => hr(e)), t(" reversePoints", () => gr(e)), t(" acyclic.undo", () => Yn(e));
|
|
1560
1560
|
}
|
|
1561
1561
|
function Qs(e, t) {
|
|
1562
1562
|
e.nodes().forEach((s) => {
|
|
@@ -1569,7 +1569,7 @@ function Qs(e, t) {
|
|
|
1569
1569
|
const o = t.graph(), n = e.graph();
|
|
1570
1570
|
n.width = o.width, n.height = o.height;
|
|
1571
1571
|
}
|
|
1572
|
-
const er = ["nodesep", "edgesep", "ranksep", "marginx", "marginy"], tr = { ranksep: 50, edgesep: 20, nodesep: 50, rankdir: "tb" }, or = ["acyclicer", "ranker", "rankdir", "align"], nr = ["width", "height", "rank"],
|
|
1572
|
+
const er = ["nodesep", "edgesep", "ranksep", "marginx", "marginy"], tr = { ranksep: 50, edgesep: 20, nodesep: 50, rankdir: "tb" }, or = ["acyclicer", "ranker", "rankdir", "align"], nr = ["width", "height", "rank"], lo = { width: 0, height: 0 }, sr = ["minlen", "weight", "width", "height", "labeloffset"], rr = {
|
|
1573
1573
|
minlen: 1,
|
|
1574
1574
|
weight: 1,
|
|
1575
1575
|
width: 0,
|
|
@@ -1581,12 +1581,12 @@ function ar(e) {
|
|
|
1581
1581
|
const t = ct(e.graph()), o = {
|
|
1582
1582
|
...tr,
|
|
1583
1583
|
...lt(t, er),
|
|
1584
|
-
...
|
|
1584
|
+
...Oe(t, or)
|
|
1585
1585
|
}, n = new oe({ multigraph: !0, compound: !0 });
|
|
1586
1586
|
return n.setGraph(o), e.nodes().forEach((s) => {
|
|
1587
1587
|
const i = ct(e.node(s)), r = lt(i, nr);
|
|
1588
|
-
Object.keys(
|
|
1589
|
-
r[a] === void 0 && (r[a] =
|
|
1588
|
+
Object.keys(lo).forEach((a) => {
|
|
1589
|
+
r[a] === void 0 && (r[a] = lo[a]);
|
|
1590
1590
|
}), n.setNode(s, r), n.setParent(s, e.parent(s));
|
|
1591
1591
|
}), e.edges().forEach((s) => {
|
|
1592
1592
|
const i = ct(e.edge(s));
|
|
@@ -1595,7 +1595,7 @@ function ar(e) {
|
|
|
1595
1595
|
{
|
|
1596
1596
|
...rr,
|
|
1597
1597
|
...lt(i, sr),
|
|
1598
|
-
...
|
|
1598
|
+
...Oe(i, ir)
|
|
1599
1599
|
}
|
|
1600
1600
|
);
|
|
1601
1601
|
}), n;
|
|
@@ -1612,7 +1612,7 @@ function cr(e) {
|
|
|
1612
1612
|
const o = e.edge(t);
|
|
1613
1613
|
if (o.width && o.height) {
|
|
1614
1614
|
const n = e.node(t.v), i = { rank: (e.node(t.w).rank - n.rank) / 2 + n.rank, e: t };
|
|
1615
|
-
|
|
1615
|
+
pe(e, "edge-proxy", i, "_ep");
|
|
1616
1616
|
}
|
|
1617
1617
|
});
|
|
1618
1618
|
}
|
|
@@ -1633,23 +1633,23 @@ function fr(e) {
|
|
|
1633
1633
|
let t = Number.POSITIVE_INFINITY, o = 0, n = Number.POSITIVE_INFINITY, s = 0;
|
|
1634
1634
|
const i = e.graph(), r = i.marginx || 0, a = i.marginy || 0;
|
|
1635
1635
|
function l(c) {
|
|
1636
|
-
const
|
|
1637
|
-
t = Math.min(t,
|
|
1636
|
+
const f = c.x, m = c.y, g = c.width, w = c.height;
|
|
1637
|
+
t = Math.min(t, f - g / 2), o = Math.max(o, f + g / 2), n = Math.min(n, m - w / 2), s = Math.max(s, m + w / 2);
|
|
1638
1638
|
}
|
|
1639
1639
|
e.nodes().forEach((c) => l(e.node(c))), e.edges().forEach((c) => {
|
|
1640
|
-
const
|
|
1641
|
-
Object.hasOwn(
|
|
1640
|
+
const f = e.edge(c);
|
|
1641
|
+
Object.hasOwn(f, "x") && l(f);
|
|
1642
1642
|
}), t -= r, n -= a, e.nodes().forEach((c) => {
|
|
1643
|
-
const
|
|
1644
|
-
|
|
1643
|
+
const f = e.node(c);
|
|
1644
|
+
f.x -= t, f.y -= n;
|
|
1645
1645
|
}), e.edges().forEach((c) => {
|
|
1646
|
-
const
|
|
1647
|
-
|
|
1646
|
+
const f = e.edge(c);
|
|
1647
|
+
f.points.forEach((m) => {
|
|
1648
1648
|
m.x -= t, m.y -= n;
|
|
1649
|
-
}), Object.hasOwn(
|
|
1649
|
+
}), Object.hasOwn(f, "x") && (f.x -= t), Object.hasOwn(f, "y") && (f.y -= n);
|
|
1650
1650
|
}), i.width = o - t + r, i.height = s - n + a;
|
|
1651
1651
|
}
|
|
1652
|
-
function
|
|
1652
|
+
function co(e, t, o) {
|
|
1653
1653
|
if (!t)
|
|
1654
1654
|
return e;
|
|
1655
1655
|
const n = t.x - e.x, s = t.y - e.y, i = Math.sqrt(n * n + s * s);
|
|
@@ -1666,9 +1666,9 @@ function hr(e) {
|
|
|
1666
1666
|
const n = e.edge(o), s = e.node(o.v), i = e.node(o.w);
|
|
1667
1667
|
let r, a;
|
|
1668
1668
|
!n.points || !n.points.length ? (n.points = [], r = i, a = s) : (r = n.points[0], a = n.points[n.points.length - 1]);
|
|
1669
|
-
const l = ft(s, r), c = ft(i, a),
|
|
1670
|
-
let
|
|
1671
|
-
|
|
1669
|
+
const l = ft(s, r), c = ft(i, a), f = n.points.length ? n.points[0] : r, m = n.points.length ? n.points[n.points.length - 1] : a, g = n.arrowshape, w = g === "normal" || g === "vee", N = !!n.reversed;
|
|
1670
|
+
let x = l, P = c;
|
|
1671
|
+
w && (N ? x = co(l, f, 4) : P = co(c, m, 4)), n.points.unshift(x), n.points.push(P);
|
|
1672
1672
|
});
|
|
1673
1673
|
}
|
|
1674
1674
|
function mr(e) {
|
|
@@ -1710,12 +1710,12 @@ function pr(e) {
|
|
|
1710
1710
|
});
|
|
1711
1711
|
}
|
|
1712
1712
|
function br(e) {
|
|
1713
|
-
|
|
1713
|
+
De(e).forEach((o) => {
|
|
1714
1714
|
let n = 0;
|
|
1715
1715
|
o.forEach((s, i) => {
|
|
1716
1716
|
const r = e.node(s);
|
|
1717
1717
|
r.order = i + n, (r.selfEdges || []).forEach((a) => {
|
|
1718
|
-
|
|
1718
|
+
pe(e, "selfedge", {
|
|
1719
1719
|
width: a.label.width,
|
|
1720
1720
|
height: a.label.height,
|
|
1721
1721
|
rank: r.rank,
|
|
@@ -1743,7 +1743,7 @@ function wr(e) {
|
|
|
1743
1743
|
});
|
|
1744
1744
|
}
|
|
1745
1745
|
function lt(e, t) {
|
|
1746
|
-
return
|
|
1746
|
+
return Re(Oe(e, t), Number);
|
|
1747
1747
|
}
|
|
1748
1748
|
function ct(e) {
|
|
1749
1749
|
const t = {};
|
|
@@ -1785,19 +1785,19 @@ function Er(e) {
|
|
|
1785
1785
|
let o = `M ${t.x} ${t.y}`;
|
|
1786
1786
|
for (let s = 1; s < e.length - 1; s += 1) {
|
|
1787
1787
|
e[s - 1];
|
|
1788
|
-
const i = e[s], r = e[s + 1], a = i.x, l = i.y, c = (i.x + r.x) / 2,
|
|
1789
|
-
o += ` Q ${a} ${l} ${c} ${
|
|
1788
|
+
const i = e[s], r = e[s + 1], a = i.x, l = i.y, c = (i.x + r.x) / 2, f = (i.y + r.y) / 2;
|
|
1789
|
+
o += ` Q ${a} ${l} ${c} ${f}`;
|
|
1790
1790
|
}
|
|
1791
1791
|
const n = e[e.length - 1];
|
|
1792
1792
|
return o += ` L ${n.x} ${n.y}`, o;
|
|
1793
1793
|
}
|
|
1794
1794
|
function Cr(e) {
|
|
1795
|
-
const { nodes: t, edges: o, configuration: n } = e, s =
|
|
1796
|
-
function a(l, c,
|
|
1795
|
+
const { nodes: t, edges: o, configuration: n } = e, s = E(null), i = E(null), r = `dag-arrow-${ut()}`;
|
|
1796
|
+
function a(l, c, f) {
|
|
1797
1797
|
i.value = null, s.value = null;
|
|
1798
1798
|
const m = {
|
|
1799
1799
|
...yr,
|
|
1800
|
-
...
|
|
1800
|
+
...f
|
|
1801
1801
|
}, g = new oe({ multigraph: !0, compound: !0 });
|
|
1802
1802
|
g.setGraph({
|
|
1803
1803
|
rankdir: m.rankDirection,
|
|
@@ -1818,7 +1818,7 @@ function Cr(e) {
|
|
|
1818
1818
|
arrowShape: m.arrowShape ?? "normal"
|
|
1819
1819
|
});
|
|
1820
1820
|
}), Ks(g);
|
|
1821
|
-
const
|
|
1821
|
+
const w = l.map((u) => {
|
|
1822
1822
|
const j = g.node(u.id);
|
|
1823
1823
|
return {
|
|
1824
1824
|
id: u.id,
|
|
@@ -1833,21 +1833,21 @@ function Cr(e) {
|
|
|
1833
1833
|
const j = g.edge(u), Q = j.points || [];
|
|
1834
1834
|
if (!Q.length)
|
|
1835
1835
|
return null;
|
|
1836
|
-
const
|
|
1836
|
+
const Te = m.curvedEdges ? Er(Q) : kr(Q), Pe = m.arrowShape !== "undirected" ? `url(#${r})` : null, $e = c.find((ye) => ye?.from === u.v && ye?.to === u.w);
|
|
1837
1837
|
return {
|
|
1838
1838
|
id: `${u.v}->${u.w}->${ut()}`,
|
|
1839
1839
|
from: u.v,
|
|
1840
1840
|
to: u.w,
|
|
1841
1841
|
points: Q,
|
|
1842
|
-
pathData:
|
|
1843
|
-
markerEnd:
|
|
1842
|
+
pathData: Te,
|
|
1843
|
+
markerEnd: Pe,
|
|
1844
1844
|
original: {
|
|
1845
|
-
|
|
1845
|
+
...$e,
|
|
1846
1846
|
...j
|
|
1847
1847
|
}
|
|
1848
1848
|
};
|
|
1849
|
-
}).filter(Boolean),
|
|
1850
|
-
if (!
|
|
1849
|
+
}).filter(Boolean), x = m.padding;
|
|
1850
|
+
if (!w.length) {
|
|
1851
1851
|
s.value = {
|
|
1852
1852
|
nodes: [],
|
|
1853
1853
|
edges: N,
|
|
@@ -1857,28 +1857,28 @@ function Cr(e) {
|
|
|
1857
1857
|
};
|
|
1858
1858
|
return;
|
|
1859
1859
|
}
|
|
1860
|
-
const P =
|
|
1860
|
+
const P = w.flatMap((u) => [
|
|
1861
1861
|
u.x - u.width / 2,
|
|
1862
1862
|
u.x + u.width / 2
|
|
1863
|
-
]), J =
|
|
1863
|
+
]), J = w.flatMap((u) => [
|
|
1864
1864
|
u.y - u.height / 2,
|
|
1865
1865
|
u.y + u.height / 2
|
|
1866
|
-
]),
|
|
1866
|
+
]), we = Math.min(...P) - x, fe = Math.max(...P) + x, $ = Math.min(...J) - x, I = Math.max(...J) + x;
|
|
1867
1867
|
s.value = {
|
|
1868
|
-
nodes:
|
|
1868
|
+
nodes: w,
|
|
1869
1869
|
edges: N.map((u) => ({
|
|
1870
1870
|
...u,
|
|
1871
1871
|
midpoint: u.pathData ? dn(u.pathData) : { x: 0, y: 0 }
|
|
1872
1872
|
})),
|
|
1873
|
-
viewBox: `${
|
|
1873
|
+
viewBox: `${we} ${$} ${fe - we} ${I - $}`,
|
|
1874
1874
|
arrowShape: m.arrowShape,
|
|
1875
1875
|
arrowSize: m.arrowSize
|
|
1876
1876
|
};
|
|
1877
1877
|
}
|
|
1878
|
-
return
|
|
1878
|
+
return an(() => {
|
|
1879
1879
|
try {
|
|
1880
|
-
const l = v(t) || [], c = v(o) || [],
|
|
1881
|
-
a(l, c,
|
|
1880
|
+
const l = v(t) || [], c = v(o) || [], f = v(n) || {};
|
|
1881
|
+
a(l, c, f);
|
|
1882
1882
|
} catch (l) {
|
|
1883
1883
|
console.error("[useDag] layout error:", l), i.value = l, s.value = null;
|
|
1884
1884
|
}
|
|
@@ -1887,35 +1887,35 @@ function Cr(e) {
|
|
|
1887
1887
|
lastError: i,
|
|
1888
1888
|
arrowMarkerIdentifier: r,
|
|
1889
1889
|
recomputeLayout: () => {
|
|
1890
|
-
const l = v(t) || [], c = v(o) || [],
|
|
1891
|
-
a(l, c,
|
|
1890
|
+
const l = v(t) || [], c = v(o) || [], f = v(n) || {};
|
|
1891
|
+
a(l, c, f);
|
|
1892
1892
|
}
|
|
1893
1893
|
};
|
|
1894
1894
|
}
|
|
1895
|
-
const
|
|
1895
|
+
const No = { style: { chart: { backgroundColor: "#1A1A1A", color: "#CCCCCC", backgroundPattern: { dotColor: "#3A3A3A" }, nodes: { stroke: "#6A6A6A", backgroundColor: "#2A2A2A", labels: { color: "#CCCCCC" }, tooltip: { backgroundColor: "#3A3A3A", color: "#CCCCCC" } }, edges: { stroke: "#6A6A6A" }, midpoints: { stroke: "#6A6A6A", fill: "#1A1A1A", tooltip: { backgroundColor: "#3A3A3A", color: "#CCCCCC" } }, controls: { backgroundColor: "#2A2A2A", buttonColor: "#2A2A2A", color: "#CCCCCC", border: "1px solid #4A4A4A" }, title: { color: "#CCCCCC", subtitle: { color: "#757575" } } } } }, Ao = { style: { chart: { backgroundColor: "#FFF8E1", color: "#424242", backgroundPattern: { dotColor: "#edc7bb" }, nodes: { stroke: "#5D4037", backgroundColor: "#fcf9f0", labels: { color: "#424242" }, tooltip: { backgroundColor: "#5D4037", color: "#FFF8E1" } }, edges: { stroke: "#5D4037" }, midpoints: { stroke: "#5D4037", fill: "#FFF8E1", tooltip: { backgroundColor: "#5D4037", color: "#FFF8E1" } }, controls: { backgroundColor: "#FFF8E1", buttonColor: "#FFF8E1", color: "#424242", border: "1px solid #d9bbb2" }, title: { color: "#424242", subtitle: { color: "#757575" } } } } }, So = { style: { chart: { backgroundColor: "#1E1E1E", color: "#BDBDBD", backgroundPattern: { dotColor: "#3E3E3E" }, nodes: { stroke: "#965039", backgroundColor: "#2A2A2A", labels: { color: "#BDBDBD" }, tooltip: { backgroundColor: "#3A3A3A", color: "#FFF8E1" } }, edges: { stroke: "#965039" }, midpoints: { stroke: "#965039", fill: "#1E1E1E", tooltip: { backgroundColor: "#3A3A3A", color: "#FFF8E1" } }, controls: { backgroundColor: "#1E1E1E", buttonColor: "#1E1E1E", color: "#BDBDBD", border: "1px solid #3A3A3A" }, title: { color: "#FFF8E1", subtitle: { color: "#BDBDBD" } } } } }, Lo = { style: { chart: { backgroundColor: "#1A1A1A", color: "#99AA99", backgroundPattern: { dotColor: "#2f3d2f" }, nodes: { stroke: "#66CC66", backgroundColor: "#2A2A2A", labels: { color: "#99AA99" }, tooltip: { backgroundColor: "#3A3A3A", color: "#99AA99" } }, edges: { stroke: "#66CC66" }, midpoints: { stroke: "#66CC66", fill: "#1A1A1A", tooltip: { backgroundColor: "#3A3A3A", color: "#99AA99" } }, controls: { backgroundColor: "#1A1A1A", buttonColor: "#1A1A1A", color: "#99AA99", border: "1px solid #1e361e" }, title: { color: "#66CC66", subtitle: { color: "#99AA99" } } } } }, Mo = { style: { chart: { backgroundColor: "#fbfafa", color: "#8A9892", backgroundPattern: { dotColor: "#dbcfc5" }, nodes: { stroke: "#8F837A", backgroundColor: "#ffffff", labels: { color: "#8A9892" }, tooltip: { backgroundColor: "#8F837A", color: "#fbfafa" } }, edges: { stroke: "#8F837A" }, midpoints: { stroke: "#8F837A", fill: "#fbfafa", tooltip: { backgroundColor: "#8F837A", color: "#fbfafa" } }, controls: { backgroundColor: "#fbfafa", buttonColor: "#fbfafa", color: "#99AA99", border: "1px solid #ebded3" }, title: { color: "#8A9892", subtitle: { color: "#99AA99" } } } } }, Oo = { style: { chart: { backgroundColor: "#f6f6fb", color: "#50606C", backgroundPattern: { dotColor: "#c3cfd9" }, layout: { arrowShape: "normal", curvedEdges: !1 }, nodes: { stroke: "#50606C", backgroundColor: "#ffffff", borderRadius: 0, labels: { color: "#50606C" }, tooltip: { backgroundColor: "#50606C", color: "#f6f6fb" } }, edges: { stroke: "#50606C" }, midpoints: { stroke: "#50606C", fill: "#fbfafa", tooltip: { backgroundColor: "#50606C", color: "#f6f6fb" } }, controls: { backgroundColor: "#f6f6fb", buttonColor: "#f6f6fb", color: "#50606C", border: "1px solid #98aab8", borderRadius: "0" }, title: { color: "#50606C", subtitle: { color: "#718890" } } } } }, Do = {
|
|
1896
1896
|
default: {},
|
|
1897
|
-
dark:
|
|
1898
|
-
celebration:
|
|
1899
|
-
celebrationNight:
|
|
1900
|
-
hack:
|
|
1901
|
-
zen:
|
|
1902
|
-
concrete:
|
|
1903
|
-
},
|
|
1897
|
+
dark: No,
|
|
1898
|
+
celebration: Ao,
|
|
1899
|
+
celebrationNight: So,
|
|
1900
|
+
hack: Lo,
|
|
1901
|
+
zen: Mo,
|
|
1902
|
+
concrete: Oo
|
|
1903
|
+
}, bi = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1904
1904
|
__proto__: null,
|
|
1905
|
-
celebration:
|
|
1906
|
-
celebrationNight:
|
|
1907
|
-
concrete:
|
|
1908
|
-
dark:
|
|
1909
|
-
default:
|
|
1910
|
-
hack:
|
|
1911
|
-
zen:
|
|
1905
|
+
celebration: Ao,
|
|
1906
|
+
celebrationNight: So,
|
|
1907
|
+
concrete: Oo,
|
|
1908
|
+
dark: No,
|
|
1909
|
+
default: Do,
|
|
1910
|
+
hack: Lo,
|
|
1911
|
+
zen: Mo
|
|
1912
1912
|
}, Symbol.toStringTag, { value: "Module" })), _r = ["id"], xr = {
|
|
1913
1913
|
key: 0,
|
|
1914
1914
|
class: "dag-chart-error"
|
|
1915
|
-
}, Nr = ["viewBox", "xmlns"], Ar = { key: 0 }, Sr = ["id", "width", "height"], Lr = ["cx", "cy", "r", "fill"], Mr = ["x", "y", "width", "height", "fill"], Or = { key: 2 }, Dr = ["id", "markerWidth", "markerHeight", "refX", "refY"], Rr = ["d", "fill", "stroke"], Tr = ["d", "fill", "stroke"], Pr = { class: "vue-ui-dag-edges" },
|
|
1915
|
+
}, Nr = ["viewBox", "xmlns"], Ar = { key: 0 }, Sr = ["id", "width", "height"], Lr = ["cx", "cy", "r", "fill"], Mr = ["x", "y", "width", "height", "fill"], Or = { key: 2 }, Dr = ["id", "markerWidth", "markerHeight", "refX", "refY"], Rr = ["d", "fill", "stroke"], Tr = ["d", "fill", "stroke"], Pr = { class: "vue-ui-dag-edges" }, $r = ["d", "stroke", "stroke-width"], Fr = ["cx", "cy", "r", "fill", "stroke", "stroke-width", "onMouseenter"], Br = { class: "vue-ui-dag-nodes" }, zr = ["onClick", "onMouseenter"], Vr = ["x", "y", "width", "height", "rx", "fill", "stroke", "stroke-width"], Ir = ["x", "y", "width", "height"], Gr = { class: "vue-ui-dag-edges" }, jr = ["d", "stroke-width", "marker-end"], Wr = { class: "vue-ui-dag-node-labels" }, Yr = ["onClick", "onMouseenter"], Hr = ["x", "y", "font-size", "fill", "font-weight"], Ur = ["x", "y", "font-size", "fill", "font-weight", "innerHTML"], Zr = { key: 1 }, Xr = {
|
|
1916
1916
|
key: 6,
|
|
1917
1917
|
class: "vue-data-ui-watermark"
|
|
1918
|
-
},
|
|
1918
|
+
}, qr = ["data-position"], Kr = { key: 0 }, Jr = ["data-position"], Qr = { key: 0 }, uo = 1.5, ei = {
|
|
1919
1919
|
__name: "vue-ui-dag",
|
|
1920
1920
|
props: {
|
|
1921
1921
|
dataset: {
|
|
@@ -1936,8 +1936,8 @@ const _o = { style: { chart: { backgroundColor: "#1A1A1A", color: "#CCCCCC", bac
|
|
|
1936
1936
|
},
|
|
1937
1937
|
emits: ["onNodeClick", "onMidpointEnter", "onMidpointLeave"],
|
|
1938
1938
|
setup(e, { expose: t, emit: o }) {
|
|
1939
|
-
const n = et(() => import("./PenAndPaper-CsqBamFZ.js")), s = et(() => import("./UserOptions-B-2A_KRb.js")), i = et(() => import("./PackageVersion-
|
|
1940
|
-
...
|
|
1939
|
+
const n = et(() => import("./PenAndPaper-CsqBamFZ.js")), s = et(() => import("./UserOptions-B-2A_KRb.js")), i = et(() => import("./PackageVersion-DCZIL0_B.js")), { vue_ui_dag: r } = wn(), { isThemeValid: a, warnInvalidTheme: l } = _n(), c = e, f = o, m = E(null), g = E(ut()), w = E(null), N = E(null), x = E(null), P = E(0), J = E(0), we = E(!1), fe = E(!1), $ = E(null), I = E(null), u = E(Ye()), j = E(u.value.style.chart.width), Q = E(u.value.style.chart.height), Te = E({ x: 0, y: 0 }), G = E(null), Pe = E(null), $e = E({ left: "0px", top: "0px" }), ye = E("top"), ne = E(!1), gt = E({ x: 0, y: 0 }), vt = E({ x: 0, y: 0 }), ke = E(null), Ge = E(null), je = E({ left: "0px", top: "0px" }), pt = E("top"), Fe = E(!1), Ee = E(!1), { svgRef: se } = Nn({ config: u.value.style.chart.title }), { userOptionsVisible: We, setUserOptionsVisibility: bt, keepUserOptionState: wt } = xn({ config: u.value }), ee = E(u.value.style.chart.layout.rankDirection), { loading: Ce, FINAL_DATASET: yt, manualLoading: kt } = yn({
|
|
1940
|
+
...ln(c),
|
|
1941
1941
|
FINAL_CONFIG: u,
|
|
1942
1942
|
prepareConfig: Ye,
|
|
1943
1943
|
skeletonDataset: {
|
|
@@ -1975,154 +1975,154 @@ const _o = { style: { chart: { backgroundColor: "#1A1A1A", color: "#CCCCCC", bac
|
|
|
1975
1975
|
})
|
|
1976
1976
|
});
|
|
1977
1977
|
function Ye() {
|
|
1978
|
-
const
|
|
1978
|
+
const h = nt({
|
|
1979
1979
|
userConfig: c.config,
|
|
1980
1980
|
defaultConfig: r
|
|
1981
|
-
}), p =
|
|
1982
|
-
if (!p) return
|
|
1983
|
-
if (!a.value(
|
|
1984
|
-
return l(
|
|
1985
|
-
const
|
|
1986
|
-
userConfig:
|
|
1987
|
-
defaultConfig:
|
|
1981
|
+
}), p = h.theme;
|
|
1982
|
+
if (!p) return h;
|
|
1983
|
+
if (!a.value(h))
|
|
1984
|
+
return l(h), h;
|
|
1985
|
+
const d = nt({
|
|
1986
|
+
userConfig: Do[p] || c.config,
|
|
1987
|
+
defaultConfig: h
|
|
1988
1988
|
});
|
|
1989
1989
|
return nt({
|
|
1990
1990
|
userConfig: c.config,
|
|
1991
|
-
defaultConfig:
|
|
1991
|
+
defaultConfig: d
|
|
1992
1992
|
});
|
|
1993
1993
|
}
|
|
1994
1994
|
const He = H(() => !!u.value.debug);
|
|
1995
|
-
|
|
1996
|
-
hn(c.dataset) && (
|
|
1995
|
+
Gt(async () => {
|
|
1996
|
+
hn(c.dataset) && (Zt({
|
|
1997
1997
|
componentName: "VueUiDag",
|
|
1998
1998
|
type: "dataset",
|
|
1999
1999
|
debug: He.value
|
|
2000
|
-
}),
|
|
2000
|
+
}), fe.value = !1, kt.value = !0), c.dataset.nodes || (Zt({
|
|
2001
2001
|
componentName: "VueUiDag",
|
|
2002
2002
|
type: "datasetAttributeEmpty",
|
|
2003
2003
|
property: "nodes",
|
|
2004
2004
|
index: 0,
|
|
2005
2005
|
debug: He.value
|
|
2006
|
-
}),
|
|
2007
|
-
}), Ae(() => c.config, async (
|
|
2008
|
-
|
|
2006
|
+
}), fe.value = !1, kt.value = !0), fe.value = !0, await Ne(), Vt();
|
|
2007
|
+
}), Ae(() => c.config, async (h) => {
|
|
2008
|
+
Ce.value || (u.value = Ye()), We.value = !u.value.userOptions.showOnChartHover, P.value += 1, ee.value = u.value.style.chart.layout.rankDirection, j.value = u.value.style.chart.width, Q.value = u.value.style.chart.height, he.value = u.value.style.chart.zoom.active, await Ne(), Vt();
|
|
2009
2009
|
}, { deep: !0 });
|
|
2010
2010
|
const { isPrinting: Et, isImaging: Ct, generatePdf: _t, generateImage: xt } = En({
|
|
2011
2011
|
elementId: `dag_${g.value}`,
|
|
2012
2012
|
fileName: u.value.style.chart.title.text || "vue-ui-dag",
|
|
2013
2013
|
options: u.value.userOptions.print
|
|
2014
|
-
}),
|
|
2014
|
+
}), Ro = H(() => u.value.style.chart.backgroundColor), To = H(() => u.value.style.chart.title), { exportSvg: Po, getSvg: $o } = Cn({
|
|
2015
2015
|
svg: se,
|
|
2016
|
-
title:
|
|
2016
|
+
title: To,
|
|
2017
2017
|
legend: void 0,
|
|
2018
2018
|
legendItems: void 0,
|
|
2019
|
-
backgroundColor:
|
|
2019
|
+
backgroundColor: Ro
|
|
2020
2020
|
});
|
|
2021
|
-
async function Nt({ isCb:
|
|
2022
|
-
if (
|
|
2023
|
-
const { blob: p, url:
|
|
2024
|
-
u.value.userOptions.callbacks.svg({ blob: p, url:
|
|
2021
|
+
async function Nt({ isCb: h }) {
|
|
2022
|
+
if (h) {
|
|
2023
|
+
const { blob: p, url: d, text: b, dataUrl: O } = await $o();
|
|
2024
|
+
u.value.userOptions.callbacks.svg({ blob: p, url: d, text: b, dataUrl: O });
|
|
2025
2025
|
} else
|
|
2026
|
-
|
|
2027
|
-
}
|
|
2028
|
-
function Po() {
|
|
2029
|
-
be.value = !0, bt(!0);
|
|
2026
|
+
Po();
|
|
2030
2027
|
}
|
|
2031
2028
|
function Fo() {
|
|
2032
|
-
|
|
2029
|
+
we.value = !0, bt(!0);
|
|
2030
|
+
}
|
|
2031
|
+
function Bo() {
|
|
2032
|
+
bt(!1), we.value = !1;
|
|
2033
2033
|
}
|
|
2034
2034
|
function At({
|
|
2035
|
-
tooltipRef:
|
|
2035
|
+
tooltipRef: h,
|
|
2036
2036
|
isVisibleRef: p,
|
|
2037
|
-
anchorRef:
|
|
2038
|
-
styleRef:
|
|
2037
|
+
anchorRef: d,
|
|
2038
|
+
styleRef: b,
|
|
2039
2039
|
placementRef: O,
|
|
2040
2040
|
offsetRef: A,
|
|
2041
|
-
margin:
|
|
2041
|
+
margin: C = 24
|
|
2042
2042
|
}) {
|
|
2043
2043
|
return function() {
|
|
2044
|
-
const W =
|
|
2044
|
+
const W = h.value;
|
|
2045
2045
|
if (!W || !p.value) return;
|
|
2046
|
-
const S = W.getBoundingClientRect(), T = window.innerWidth, B = window.innerHeight, Y =
|
|
2047
|
-
let D = q -
|
|
2048
|
-
if (D <
|
|
2049
|
-
const
|
|
2050
|
-
|
|
2046
|
+
const S = W.getBoundingClientRect(), T = window.innerWidth, B = window.innerHeight, Y = d.value.x, q = d.value.y, U = A?.value?.x ?? 0, le = A?.value?.y ?? 0;
|
|
2047
|
+
let D = q - le - S.height - C, Z = Y - S.width / 2, _e = "top";
|
|
2048
|
+
if (D < C) {
|
|
2049
|
+
const ge = q + le + C;
|
|
2050
|
+
ge + S.height <= B - C ? (D = ge, _e = "bottom") : (D = q - S.height / 2, D < C && (D = C), D + S.height > B - C && (D = B - S.height - C), _e = "center");
|
|
2051
2051
|
}
|
|
2052
|
-
Z <
|
|
2053
|
-
const
|
|
2054
|
-
if ((
|
|
2055
|
-
let
|
|
2056
|
-
const
|
|
2057
|
-
T - (Y + U) -
|
|
2052
|
+
Z < C && (Z = C), Z + S.width > T - C && (Z = T - S.width - C);
|
|
2053
|
+
const nn = Z <= C, sn = Z + S.width >= T - C;
|
|
2054
|
+
if ((nn || sn) && _e !== "center") {
|
|
2055
|
+
let ge, xe;
|
|
2056
|
+
const rn = Y - U - C;
|
|
2057
|
+
T - (Y + U) - C >= rn ? (ge = "right", xe = Y + U + C) : (ge = "left", xe = Y - U - C - S.width), xe >= C && xe + S.width <= T - C && (Z = xe, D = q - S.height / 2, D < C && (D = C), D + S.height > B - C && (D = B - S.height - C), _e = ge);
|
|
2058
2058
|
}
|
|
2059
|
-
O.value = _e,
|
|
2059
|
+
O.value = _e, b.value = {
|
|
2060
2060
|
left: `${Z}px`,
|
|
2061
2061
|
top: `${D}px`
|
|
2062
2062
|
};
|
|
2063
2063
|
};
|
|
2064
2064
|
}
|
|
2065
|
-
const
|
|
2066
|
-
...
|
|
2067
|
-
backgroundColor:
|
|
2068
|
-
color:
|
|
2069
|
-
}))),
|
|
2065
|
+
const zo = H(() => yt.value.nodes.map((h) => ({
|
|
2066
|
+
...h,
|
|
2067
|
+
backgroundColor: h.backgroundColor ? Xt(h.backgroundColor) : u.value.style.chart.nodes.backgroundColor,
|
|
2068
|
+
color: h.color ? Xt(h.color) : u.value.style.chart.nodes.labels.color
|
|
2069
|
+
}))), Vo = H(() => yt.value.edges), Io = H(() => ({
|
|
2070
2070
|
...u.value.style.chart.layout,
|
|
2071
2071
|
rankDirection: ee.value
|
|
2072
|
-
})), { layoutData: k, lastError: St, arrowMarkerIdentifier:
|
|
2073
|
-
nodes:
|
|
2074
|
-
edges:
|
|
2075
|
-
configuration:
|
|
2072
|
+
})), { layoutData: k, lastError: St, arrowMarkerIdentifier: Go } = Cr({
|
|
2073
|
+
nodes: zo,
|
|
2074
|
+
edges: Vo,
|
|
2075
|
+
configuration: Io
|
|
2076
2076
|
});
|
|
2077
|
-
function Lt(
|
|
2078
|
-
return k.value ? k.value.nodes.find((p) => p.id ===
|
|
2077
|
+
function Lt(h) {
|
|
2078
|
+
return k.value ? k.value.nodes.find((p) => p.id === h) : null;
|
|
2079
2079
|
}
|
|
2080
|
-
const
|
|
2080
|
+
const jo = H(() => {
|
|
2081
2081
|
if (!k.value) return [];
|
|
2082
|
-
const
|
|
2083
|
-
return k.value.edges.forEach((
|
|
2084
|
-
p.add(
|
|
2082
|
+
const h = u.value.style.chart.edges.stroke, p = /* @__PURE__ */ new Set();
|
|
2083
|
+
return k.value.edges.forEach((d) => {
|
|
2084
|
+
p.add(d.original?.color || h);
|
|
2085
2085
|
}), Array.from(p);
|
|
2086
2086
|
});
|
|
2087
|
-
function Mt(
|
|
2088
|
-
return `${
|
|
2087
|
+
function Mt(h) {
|
|
2088
|
+
return `${Go}-${String(h).replace(/[^a-zA-Z0-9_-]/g, "_")}`;
|
|
2089
2089
|
}
|
|
2090
2090
|
const Ot = H(() => {
|
|
2091
|
-
const
|
|
2091
|
+
const h = j.value, p = Q.value, d = Number(h), b = Number(p), O = Number.isFinite(d) && d > 0, A = Number.isFinite(b) && b > 0;
|
|
2092
2092
|
return !O && !A ? null : {
|
|
2093
|
-
width: O ?
|
|
2094
|
-
height: A ?
|
|
2093
|
+
width: O ? d : null,
|
|
2094
|
+
height: A ? b : null
|
|
2095
2095
|
};
|
|
2096
|
-
}),
|
|
2097
|
-
viewBox:
|
|
2098
|
-
resetZoom:
|
|
2099
|
-
setInitialViewBox:
|
|
2096
|
+
}), re = E(null), he = E(u.value.style.chart.zoom.active), {
|
|
2097
|
+
viewBox: me,
|
|
2098
|
+
resetZoom: Be,
|
|
2099
|
+
setInitialViewBox: Wo,
|
|
2100
2100
|
scale: Dt,
|
|
2101
2101
|
zoomByFactor: Rt
|
|
2102
2102
|
} = bn(
|
|
2103
2103
|
se,
|
|
2104
2104
|
{ x: 0, y: 0, width: 100, height: 100 },
|
|
2105
2105
|
1,
|
|
2106
|
-
|
|
2106
|
+
he,
|
|
2107
2107
|
() => {
|
|
2108
2108
|
ne.value = !1;
|
|
2109
2109
|
}
|
|
2110
2110
|
);
|
|
2111
|
-
function
|
|
2112
|
-
|
|
2111
|
+
function Yo() {
|
|
2112
|
+
he.value = !he.value;
|
|
2113
2113
|
}
|
|
2114
2114
|
function Tt() {
|
|
2115
|
-
const
|
|
2116
|
-
if (!
|
|
2117
|
-
const p = String(
|
|
2115
|
+
const h = k.value && k.value.viewBox;
|
|
2116
|
+
if (!h) return;
|
|
2117
|
+
const p = String(h).split(" ").map(Number);
|
|
2118
2118
|
if (p.length !== 4) return;
|
|
2119
|
-
const [
|
|
2120
|
-
if (!Number.isFinite(
|
|
2119
|
+
const [d, b, O, A] = p;
|
|
2120
|
+
if (!Number.isFinite(d) || !Number.isFinite(b) || !Number.isFinite(O) || !Number.isFinite(A))
|
|
2121
2121
|
return;
|
|
2122
|
-
let
|
|
2122
|
+
let C = O, R = A, W = d, S = b;
|
|
2123
2123
|
const T = Ot.value;
|
|
2124
|
-
T && (T.width !== null && (
|
|
2125
|
-
{ x: W, y: S, width:
|
|
2124
|
+
T && (T.width !== null && (C = T.width), T.height !== null && (R = T.height), W = d - (C - O) / 2, S = b - (R - A) / 2), Wo(
|
|
2125
|
+
{ x: W, y: S, width: C, height: R },
|
|
2126
2126
|
{ overwriteCurrentIfNotZoomed: !0 }
|
|
2127
2127
|
);
|
|
2128
2128
|
}
|
|
@@ -2137,36 +2137,36 @@ const _o = { style: { chart: { backgroundColor: "#1A1A1A", color: "#CCCCCC", bac
|
|
|
2137
2137
|
() => {
|
|
2138
2138
|
Tt();
|
|
2139
2139
|
}
|
|
2140
|
-
), Ae(() =>
|
|
2141
|
-
|
|
2140
|
+
), Ae(() => Ee.value, (h) => {
|
|
2141
|
+
he.value = !h;
|
|
2142
2142
|
});
|
|
2143
|
-
const
|
|
2144
|
-
const
|
|
2145
|
-
return
|
|
2146
|
-
}),
|
|
2147
|
-
function Pt(
|
|
2148
|
-
|
|
2143
|
+
const Ho = H(() => {
|
|
2144
|
+
const h = me.value;
|
|
2145
|
+
return h ? `${h.x} ${h.y} ${h.width} ${h.height}` : "0 0 0 0";
|
|
2146
|
+
}), ie = E(!1);
|
|
2147
|
+
function Pt(h) {
|
|
2148
|
+
ie.value = h, J.value += 1;
|
|
2149
2149
|
}
|
|
2150
2150
|
function Ue() {
|
|
2151
|
-
|
|
2151
|
+
Ee.value = !Ee.value;
|
|
2152
2152
|
}
|
|
2153
2153
|
function Ze() {
|
|
2154
|
-
Rt(
|
|
2154
|
+
Rt(uo, !0);
|
|
2155
2155
|
}
|
|
2156
2156
|
function Xe() {
|
|
2157
|
-
Rt(1 /
|
|
2157
|
+
Rt(1 / uo, !0);
|
|
2158
2158
|
}
|
|
2159
2159
|
const qe = ["TB", "RL", "BT", "LR"];
|
|
2160
2160
|
function Ke() {
|
|
2161
|
-
ee.value = qe[(qe.indexOf(ee.value) + 1) % qe.length],
|
|
2161
|
+
ee.value = qe[(qe.indexOf(ee.value) + 1) % qe.length], Be();
|
|
2162
2162
|
}
|
|
2163
|
-
const
|
|
2164
|
-
tooltipRef:
|
|
2163
|
+
const Uo = At({
|
|
2164
|
+
tooltipRef: Pe,
|
|
2165
2165
|
isVisibleRef: Fe,
|
|
2166
|
-
anchorRef:
|
|
2167
|
-
styleRef:
|
|
2168
|
-
placementRef:
|
|
2169
|
-
}),
|
|
2166
|
+
anchorRef: Te,
|
|
2167
|
+
styleRef: $e,
|
|
2168
|
+
placementRef: ye
|
|
2169
|
+
}), Zo = At({
|
|
2170
2170
|
tooltipRef: Ge,
|
|
2171
2171
|
isVisibleRef: ne,
|
|
2172
2172
|
anchorRef: gt,
|
|
@@ -2174,170 +2174,170 @@ const _o = { style: { chart: { backgroundColor: "#1A1A1A", color: "#CCCCCC", bac
|
|
|
2174
2174
|
placementRef: pt,
|
|
2175
2175
|
offsetRef: vt
|
|
2176
2176
|
});
|
|
2177
|
-
async function
|
|
2178
|
-
|
|
2177
|
+
async function Xo(h) {
|
|
2178
|
+
f("onMidpointEnter", h);
|
|
2179
2179
|
const p = se.value;
|
|
2180
|
-
if (!p || !
|
|
2181
|
-
const
|
|
2182
|
-
|
|
2183
|
-
const
|
|
2184
|
-
if (!
|
|
2185
|
-
const O =
|
|
2186
|
-
|
|
2180
|
+
if (!p || !h?.midpoint) return;
|
|
2181
|
+
const d = p.createSVGPoint();
|
|
2182
|
+
d.x = h.midpoint.x, d.y = h.midpoint.y;
|
|
2183
|
+
const b = p.getScreenCTM();
|
|
2184
|
+
if (!b) return;
|
|
2185
|
+
const O = d.matrixTransform(b);
|
|
2186
|
+
Te.value = {
|
|
2187
2187
|
x: O.x,
|
|
2188
2188
|
y: O.y
|
|
2189
|
-
}, G.value =
|
|
2189
|
+
}, G.value = h, Fe.value = !0, await Ne(), Uo();
|
|
2190
2190
|
}
|
|
2191
|
-
function
|
|
2192
|
-
Fe.value = !1, G.value = null,
|
|
2191
|
+
function qo() {
|
|
2192
|
+
Fe.value = !1, G.value = null, f("onMidpointLeave");
|
|
2193
2193
|
}
|
|
2194
|
-
async function
|
|
2195
|
-
if (
|
|
2194
|
+
async function $t(h) {
|
|
2195
|
+
if (f("onNodeClick", h), !u.value.style.chart.nodes.tooltip.showOnClick) return;
|
|
2196
2196
|
const p = se.value;
|
|
2197
2197
|
if (!p) return;
|
|
2198
|
-
const
|
|
2199
|
-
|
|
2200
|
-
const
|
|
2201
|
-
if (!
|
|
2202
|
-
const O =
|
|
2198
|
+
const d = p.createSVGPoint();
|
|
2199
|
+
d.x = h.x, d.y = h.y;
|
|
2200
|
+
const b = p.getScreenCTM();
|
|
2201
|
+
if (!b) return;
|
|
2202
|
+
const O = d.matrixTransform(b), A = u.value.style.chart.layout.nodeWidth, C = u.value.style.chart.layout.nodeHeight, R = b.a, W = b.d, S = A * R, T = C * W;
|
|
2203
2203
|
vt.value = {
|
|
2204
2204
|
x: S / 2,
|
|
2205
2205
|
y: T / 2
|
|
2206
2206
|
}, gt.value = {
|
|
2207
2207
|
x: O.x,
|
|
2208
2208
|
y: O.y
|
|
2209
|
-
},
|
|
2209
|
+
}, ke.value = h, ne.value = !0, await Ne(), Zo();
|
|
2210
2210
|
}
|
|
2211
2211
|
function Ft() {
|
|
2212
|
-
ne.value = !1,
|
|
2212
|
+
ne.value = !1, ke.value = null;
|
|
2213
2213
|
}
|
|
2214
|
-
function
|
|
2214
|
+
function Bt(h) {
|
|
2215
2215
|
if (!ne.value) return;
|
|
2216
2216
|
const p = Ge.value;
|
|
2217
|
-
if (p && p.contains(
|
|
2217
|
+
if (p && p.contains(h.target))
|
|
2218
2218
|
return;
|
|
2219
|
-
const
|
|
2220
|
-
|
|
2219
|
+
const d = se.value;
|
|
2220
|
+
d && d.contains(h.target) && h.target.closest(".vue-ui-dag-node") || Ft();
|
|
2221
2221
|
}
|
|
2222
|
-
function
|
|
2223
|
-
|
|
2222
|
+
function zt(h) {
|
|
2223
|
+
h.key === "Escape" && ne.value && Ft();
|
|
2224
2224
|
}
|
|
2225
|
-
|
|
2226
|
-
document.addEventListener("mousedown",
|
|
2227
|
-
}),
|
|
2228
|
-
document.removeEventListener("mousedown",
|
|
2225
|
+
Gt(() => {
|
|
2226
|
+
document.addEventListener("mousedown", Bt), document.addEventListener("keydown", zt);
|
|
2227
|
+
}), jt(() => {
|
|
2228
|
+
document.removeEventListener("mousedown", Bt), document.removeEventListener("keydown", zt), $.value && (I.value && $.value.unobserve(I.value), $.value.disconnect());
|
|
2229
2229
|
});
|
|
2230
|
-
function
|
|
2230
|
+
function Vt() {
|
|
2231
2231
|
if (!u.value.responsive) {
|
|
2232
|
-
|
|
2232
|
+
$.value && (I.value && $.value.unobserve(I.value), $.value.disconnect(), $.value = null, I.value = null);
|
|
2233
2233
|
return;
|
|
2234
2234
|
}
|
|
2235
|
-
const
|
|
2235
|
+
const h = vn(() => {
|
|
2236
2236
|
if (!m.value) return;
|
|
2237
|
-
const { width: p, height:
|
|
2237
|
+
const { width: p, height: d } = pn({
|
|
2238
2238
|
chart: m.value,
|
|
2239
|
-
title: u.value.style.chart.title.text ?
|
|
2240
|
-
legend: u.value.style.chart.controls.show ?
|
|
2239
|
+
title: u.value.style.chart.title.text ? w.value : null,
|
|
2240
|
+
legend: u.value.style.chart.controls.show ? x.value?.$el : null,
|
|
2241
2241
|
source: N.value
|
|
2242
2242
|
});
|
|
2243
2243
|
requestAnimationFrame(() => {
|
|
2244
|
-
j.value = Math.max(0.1, p), Q.value = Math.max(0.1,
|
|
2244
|
+
j.value = Math.max(0.1, p), Q.value = Math.max(0.1, d - 12);
|
|
2245
2245
|
});
|
|
2246
2246
|
});
|
|
2247
|
-
|
|
2247
|
+
$.value && (I.value && $.value.unobserve(I.value), $.value.disconnect()), $.value = new ResizeObserver(h), I.value = m.value ? m.value.parentNode : null, I.value && $.value.observe(I.value), h();
|
|
2248
2248
|
}
|
|
2249
|
-
function
|
|
2249
|
+
function Ko(h, p = {}) {
|
|
2250
2250
|
const {
|
|
2251
|
-
direction:
|
|
2252
|
-
mode:
|
|
2251
|
+
direction: d = -1,
|
|
2252
|
+
mode: b = "oneLapNearest",
|
|
2253
2253
|
dasharray: O = null
|
|
2254
2254
|
} = p;
|
|
2255
|
-
if (!
|
|
2255
|
+
if (!h || typeof h.getTotalLength != "function")
|
|
2256
2256
|
return He.value && console.warn(
|
|
2257
2257
|
"VueUiDag @getIdealDashoffsetDelta: invalid path element",
|
|
2258
|
-
|
|
2258
|
+
h
|
|
2259
2259
|
), 0;
|
|
2260
|
-
const A =
|
|
2260
|
+
const A = h.getTotalLength(), C = O ?? h.getAttribute("stroke-dasharray") ?? (typeof getComputedStyle == "function" ? getComputedStyle(h).strokeDasharray : ""), R = Y(C);
|
|
2261
2261
|
if (!Number.isFinite(R) || R <= 0)
|
|
2262
|
-
return
|
|
2262
|
+
return d * A;
|
|
2263
2263
|
const W = Math.max(1, Math.round(A / R)), S = Math.max(1, Math.ceil(A / R)), T = Math.max(1, Math.floor(A / R));
|
|
2264
2264
|
let B;
|
|
2265
|
-
return
|
|
2265
|
+
return b === "pattern" ? B = R : b === "oneLapCeil" ? B = S * R : b === "oneLapFloor" ? B = T * R : B = W * R, d * B;
|
|
2266
2266
|
function Y(q) {
|
|
2267
2267
|
if (!q || q === "none") return NaN;
|
|
2268
2268
|
const U = String(q).replace(/,/g, " ").trim().split(/\s+/).map((D) => Number.parseFloat(D)).filter((D) => Number.isFinite(D));
|
|
2269
2269
|
if (!U.length) return NaN;
|
|
2270
|
-
const
|
|
2271
|
-
return U.length % 2 === 1 ?
|
|
2270
|
+
const le = U.reduce((D, Z) => D + Z, 0);
|
|
2271
|
+
return U.length % 2 === 1 ? le * 2 : le;
|
|
2272
2272
|
}
|
|
2273
2273
|
}
|
|
2274
|
-
const Je =
|
|
2275
|
-
function
|
|
2276
|
-
return function(
|
|
2277
|
-
|
|
2274
|
+
const Je = E(/* @__PURE__ */ new Map()), Qe = E(/* @__PURE__ */ new Map());
|
|
2275
|
+
function Jo(h) {
|
|
2276
|
+
return function(d) {
|
|
2277
|
+
d ? Je.value.set(h, d) : Je.value.delete(h);
|
|
2278
2278
|
};
|
|
2279
2279
|
}
|
|
2280
|
-
function
|
|
2281
|
-
Qe.value.forEach((
|
|
2280
|
+
function It() {
|
|
2281
|
+
Qe.value.forEach((h) => {
|
|
2282
2282
|
try {
|
|
2283
|
-
|
|
2283
|
+
h.cancel();
|
|
2284
2284
|
} catch {
|
|
2285
2285
|
}
|
|
2286
2286
|
}), Qe.value.clear();
|
|
2287
2287
|
}
|
|
2288
|
-
function
|
|
2289
|
-
|
|
2290
|
-
const
|
|
2291
|
-
if (!
|
|
2292
|
-
const p = u.value.style.chart.edges.animations,
|
|
2293
|
-
|
|
2294
|
-
if (!!!
|
|
2295
|
-
const A = Je.value.get(
|
|
2288
|
+
function Qo() {
|
|
2289
|
+
It();
|
|
2290
|
+
const h = k.value?.edges ?? [];
|
|
2291
|
+
if (!h.length) return;
|
|
2292
|
+
const p = u.value.style.chart.edges.animations, d = Number(p.referenceDistance) > 0 ? Number(p.referenceDistance) : 24;
|
|
2293
|
+
h.forEach((b) => {
|
|
2294
|
+
if (!!!b?.original?.animated) return;
|
|
2295
|
+
const A = Je.value.get(b.id);
|
|
2296
2296
|
if (!A) return;
|
|
2297
|
-
const
|
|
2298
|
-
A.style.strokeDasharray = String(
|
|
2299
|
-
const R = ![void 0, null].includes(
|
|
2297
|
+
const C = b?.original?.dasharray ?? p.dasharray;
|
|
2298
|
+
A.style.strokeDasharray = String(C), A.style.strokeDashoffset = "0";
|
|
2299
|
+
const R = ![void 0, null].includes(b?.original?.animationDirection), W = ![void 0, null].includes(p.animationDirection), S = R ? Number(b.original.animationDirection) : W ? Number(p.animationDirection) : -1, T = Ko(A, {
|
|
2300
2300
|
direction: S,
|
|
2301
2301
|
mode: "oneLapNearest",
|
|
2302
|
-
dasharray: String(
|
|
2303
|
-
}), B =
|
|
2302
|
+
dasharray: String(C)
|
|
2303
|
+
}), B = b?.original?.animationDurationMs ?? p.animationDurationMs ?? 1e3, Y = Number(B), U = Number.isFinite(Y) && Y > 0 ? d / Y : d / 1e3, le = Math.max(1, Math.round(Math.abs(T) / Math.max(1e-9, U))), D = A.animate(
|
|
2304
2304
|
[{ strokeDashoffset: 0 }, { strokeDashoffset: T }],
|
|
2305
|
-
{ duration:
|
|
2305
|
+
{ duration: le, iterations: 1 / 0, easing: "linear" }
|
|
2306
2306
|
);
|
|
2307
|
-
Qe.value.set(
|
|
2307
|
+
Qe.value.set(b.id, D);
|
|
2308
2308
|
});
|
|
2309
2309
|
}
|
|
2310
2310
|
Ae(
|
|
2311
2311
|
() => k.value && k.value.edges,
|
|
2312
2312
|
async () => {
|
|
2313
|
-
await Ne(),
|
|
2313
|
+
await Ne(), Qo();
|
|
2314
2314
|
},
|
|
2315
2315
|
{ deep: !0, immediate: !0 }
|
|
2316
|
-
),
|
|
2317
|
-
|
|
2316
|
+
), jt(() => {
|
|
2317
|
+
It();
|
|
2318
2318
|
});
|
|
2319
|
-
async function
|
|
2319
|
+
async function en({ scale: h = 2 } = {}) {
|
|
2320
2320
|
if (!m.value) return;
|
|
2321
|
-
const { width: p, height:
|
|
2321
|
+
const { width: p, height: d } = m.value.getBoundingClientRect(), b = p / d, { imageUri: O, base64: A } = await Sn({ domElement: m.value, base64: !0, img: !0, scale: h });
|
|
2322
2322
|
return {
|
|
2323
2323
|
imageUri: O,
|
|
2324
2324
|
base64: A,
|
|
2325
2325
|
title: u.value.style.chart.title.text ?? "vue-ui-dag",
|
|
2326
2326
|
width: p,
|
|
2327
|
-
height:
|
|
2328
|
-
aspectRatio:
|
|
2327
|
+
height: d,
|
|
2328
|
+
aspectRatio: b
|
|
2329
2329
|
};
|
|
2330
2330
|
}
|
|
2331
|
-
const
|
|
2332
|
-
const
|
|
2333
|
-
return Number.isFinite(
|
|
2334
|
-
}),
|
|
2335
|
-
function
|
|
2331
|
+
const ae = H(() => {
|
|
2332
|
+
const h = Number(u.value.style.chart.layout.nodeHeight);
|
|
2333
|
+
return Number.isFinite(h) && h > 0 ? h / u.value.style.chart.backgroundPattern.spacingRatio : 12;
|
|
2334
|
+
}), tn = H(() => ae.value * (u.value.style.chart.backgroundPattern.dotRadiusRatio / 100));
|
|
2335
|
+
function on() {
|
|
2336
2336
|
return k.value;
|
|
2337
2337
|
}
|
|
2338
2338
|
return t({
|
|
2339
|
-
getData:
|
|
2340
|
-
getImage:
|
|
2339
|
+
getData: on,
|
|
2340
|
+
getImage: en,
|
|
2341
2341
|
generatePdf: _t,
|
|
2342
2342
|
generateSvg: Nt,
|
|
2343
2343
|
generateImage: xt,
|
|
@@ -2345,51 +2345,51 @@ const _o = { style: { chart: { backgroundColor: "#1A1A1A", color: "#CCCCCC", bac
|
|
|
2345
2345
|
toggleFullscreen: Pt,
|
|
2346
2346
|
zoomIn: Ze,
|
|
2347
2347
|
zoomOut: Xe,
|
|
2348
|
-
resetZoom:
|
|
2348
|
+
resetZoom: Be,
|
|
2349
2349
|
switchDirection: Ke
|
|
2350
|
-
}), (
|
|
2351
|
-
class:
|
|
2350
|
+
}), (h, p) => (y(), _("div", {
|
|
2351
|
+
class: Wt(`vue-data-ui-component vue-ui-dag ${ie.value ? "vue-data-ui-wrapper-fullscreen" : ""} ${u.value.responsive ? "vue-ui-dag-responsive" : ""}`),
|
|
2352
2352
|
id: `dag_${g.value}`,
|
|
2353
2353
|
ref_key: "dagChart",
|
|
2354
2354
|
ref: m,
|
|
2355
|
-
style:
|
|
2355
|
+
style: ce({
|
|
2356
2356
|
fontFamily: u.value.style.fontFamily,
|
|
2357
2357
|
backgroundColor: u.value.style.chart.backgroundColor,
|
|
2358
2358
|
padding: "0.5rem"
|
|
2359
2359
|
}),
|
|
2360
|
-
onMouseenter:
|
|
2361
|
-
onMouseleave:
|
|
2360
|
+
onMouseenter: Fo,
|
|
2361
|
+
onMouseleave: Bo
|
|
2362
2362
|
}, [
|
|
2363
|
-
v(St) ? (
|
|
2364
|
-
u.value.userOptions.buttons.annotator ? (
|
|
2363
|
+
v(St) ? (y(), _("div", xr, Se(String(v(St))), 1)) : L("", !0),
|
|
2364
|
+
u.value.userOptions.buttons.annotator ? (y(), te(v(n), {
|
|
2365
2365
|
key: 1,
|
|
2366
2366
|
svgRef: v(se),
|
|
2367
2367
|
backgroundColor: u.value.style.chart.backgroundColor,
|
|
2368
2368
|
color: u.value.style.chart.color,
|
|
2369
|
-
active:
|
|
2369
|
+
active: Ee.value,
|
|
2370
2370
|
onClose: Ue
|
|
2371
2371
|
}, {
|
|
2372
|
-
"annotator-action-close":
|
|
2373
|
-
M(
|
|
2372
|
+
"annotator-action-close": F(() => [
|
|
2373
|
+
M(h.$slots, "annotator-action-close", {}, void 0, !0)
|
|
2374
2374
|
]),
|
|
2375
|
-
"annotator-action-color":
|
|
2376
|
-
M(
|
|
2375
|
+
"annotator-action-color": F(({ color: d }) => [
|
|
2376
|
+
M(h.$slots, "annotator-action-color", z(V({ color: d })), void 0, !0)
|
|
2377
2377
|
]),
|
|
2378
|
-
"annotator-action-draw":
|
|
2379
|
-
M(
|
|
2378
|
+
"annotator-action-draw": F(({ mode: d }) => [
|
|
2379
|
+
M(h.$slots, "annotator-action-draw", z(V({ mode: d })), void 0, !0)
|
|
2380
2380
|
]),
|
|
2381
|
-
"annotator-action-undo":
|
|
2382
|
-
M(
|
|
2381
|
+
"annotator-action-undo": F(({ disabled: d }) => [
|
|
2382
|
+
M(h.$slots, "annotator-action-undo", z(V({ disabled: d })), void 0, !0)
|
|
2383
2383
|
]),
|
|
2384
|
-
"annotator-action-redo":
|
|
2385
|
-
M(
|
|
2384
|
+
"annotator-action-redo": F(({ disabled: d }) => [
|
|
2385
|
+
M(h.$slots, "annotator-action-redo", z(V({ disabled: d })), void 0, !0)
|
|
2386
2386
|
]),
|
|
2387
|
-
"annotator-action-delete":
|
|
2388
|
-
M(
|
|
2387
|
+
"annotator-action-delete": F(({ disabled: d }) => [
|
|
2388
|
+
M(h.$slots, "annotator-action-delete", z(V({ disabled: d })), void 0, !0)
|
|
2389
2389
|
]),
|
|
2390
2390
|
_: 3
|
|
2391
2391
|
}, 8, ["svgRef", "backgroundColor", "color", "active"])) : L("", !0),
|
|
2392
|
-
u.value.userOptions.show &&
|
|
2392
|
+
u.value.userOptions.show && fe.value && (v(wt) || v(We)) ? (y(), te(v(s), {
|
|
2393
2393
|
ref: "userOptionsRef",
|
|
2394
2394
|
key: `user_option_${J.value}`,
|
|
2395
2395
|
backgroundColor: u.value.style.chart.backgroundColor,
|
|
@@ -2405,83 +2405,83 @@ const _o = { style: { chart: { backgroundColor: "#1A1A1A", color: "#CCCCCC", bac
|
|
|
2405
2405
|
hasImg: u.value.userOptions.buttons.img,
|
|
2406
2406
|
hasSvg: u.value.userOptions.buttons.svg,
|
|
2407
2407
|
hasFullscreen: u.value.userOptions.buttons.fullscreen,
|
|
2408
|
-
isFullscreen:
|
|
2408
|
+
isFullscreen: ie.value,
|
|
2409
2409
|
chartElement: m.value,
|
|
2410
2410
|
position: u.value.userOptions.position,
|
|
2411
2411
|
titles: { ...u.value.userOptions.buttonTitles },
|
|
2412
2412
|
hasAnnotator: u.value.userOptions.buttons.annotator,
|
|
2413
|
-
isAnnotation:
|
|
2413
|
+
isAnnotation: Ee.value,
|
|
2414
2414
|
callbacks: u.value.userOptions.callbacks,
|
|
2415
2415
|
printScale: u.value.userOptions.print.scale,
|
|
2416
2416
|
hasZoom: u.value.userOptions.buttons.zoom,
|
|
2417
|
-
isZoom:
|
|
2417
|
+
isZoom: he.value,
|
|
2418
2418
|
onToggleFullscreen: Pt,
|
|
2419
2419
|
onGeneratePdf: v(_t),
|
|
2420
2420
|
onGenerateImage: v(xt),
|
|
2421
2421
|
onGenerateSvg: Nt,
|
|
2422
2422
|
onToggleAnnotator: Ue,
|
|
2423
|
-
onToggleZoom:
|
|
2424
|
-
style:
|
|
2423
|
+
onToggleZoom: Yo,
|
|
2424
|
+
style: ce({
|
|
2425
2425
|
visibility: v(wt) ? v(We) ? "visible" : "hidden" : "visible"
|
|
2426
2426
|
})
|
|
2427
|
-
},
|
|
2428
|
-
|
|
2427
|
+
}, cn({ _: 2 }, [
|
|
2428
|
+
h.$slots.menuIcon ? {
|
|
2429
2429
|
name: "menuIcon",
|
|
2430
|
-
fn:
|
|
2431
|
-
M(
|
|
2430
|
+
fn: F(({ isOpen: d, color: b }) => [
|
|
2431
|
+
M(h.$slots, "menuIcon", z(V({ isOpen: d, color: b })), void 0, !0)
|
|
2432
2432
|
]),
|
|
2433
2433
|
key: "0"
|
|
2434
2434
|
} : void 0,
|
|
2435
|
-
|
|
2435
|
+
h.$slots.optionPdf ? {
|
|
2436
2436
|
name: "optionPdf",
|
|
2437
|
-
fn:
|
|
2438
|
-
M(
|
|
2437
|
+
fn: F(() => [
|
|
2438
|
+
M(h.$slots, "optionPdf", {}, void 0, !0)
|
|
2439
2439
|
]),
|
|
2440
2440
|
key: "1"
|
|
2441
2441
|
} : void 0,
|
|
2442
|
-
|
|
2442
|
+
h.$slots.optionImg ? {
|
|
2443
2443
|
name: "optionImg",
|
|
2444
|
-
fn:
|
|
2445
|
-
M(
|
|
2444
|
+
fn: F(() => [
|
|
2445
|
+
M(h.$slots, "optionImg", {}, void 0, !0)
|
|
2446
2446
|
]),
|
|
2447
2447
|
key: "2"
|
|
2448
2448
|
} : void 0,
|
|
2449
|
-
|
|
2449
|
+
h.$slots.optionSvg ? {
|
|
2450
2450
|
name: "optionSvg",
|
|
2451
|
-
fn:
|
|
2452
|
-
M(
|
|
2451
|
+
fn: F(() => [
|
|
2452
|
+
M(h.$slots, "optionSvg", {}, void 0, !0)
|
|
2453
2453
|
]),
|
|
2454
2454
|
key: "3"
|
|
2455
2455
|
} : void 0,
|
|
2456
|
-
|
|
2456
|
+
h.$slots.optionFullscreen ? {
|
|
2457
2457
|
name: "optionFullscreen",
|
|
2458
|
-
fn:
|
|
2459
|
-
M(
|
|
2458
|
+
fn: F(({ toggleFullscreen: d, isFullscreen: b }) => [
|
|
2459
|
+
M(h.$slots, "optionFullscreen", z(V({ toggleFullscreen: d, isFullscreen: b })), void 0, !0)
|
|
2460
2460
|
]),
|
|
2461
2461
|
key: "4"
|
|
2462
2462
|
} : void 0,
|
|
2463
|
-
|
|
2463
|
+
h.$slots.optionAnnotator ? {
|
|
2464
2464
|
name: "optionAnnotator",
|
|
2465
|
-
fn:
|
|
2466
|
-
M(
|
|
2465
|
+
fn: F(({ toggleAnnotator: d, isAnnotator: b }) => [
|
|
2466
|
+
M(h.$slots, "optionAnnotator", z(V({ toggleAnnotator: d, isAnnotator: b })), void 0, !0)
|
|
2467
2467
|
]),
|
|
2468
2468
|
key: "5"
|
|
2469
2469
|
} : void 0,
|
|
2470
|
-
|
|
2470
|
+
h.$slots.optionZoom ? {
|
|
2471
2471
|
name: "optionZoom",
|
|
2472
|
-
fn:
|
|
2473
|
-
M(
|
|
2472
|
+
fn: F(({ toggleZoom: d, isZoomLocked: b }) => [
|
|
2473
|
+
M(h.$slots, "optionZoom", z(V({ toggleZoom: d, isZoomLocked: b })), void 0, !0)
|
|
2474
2474
|
]),
|
|
2475
2475
|
key: "6"
|
|
2476
2476
|
} : void 0
|
|
2477
2477
|
]), 1032, ["backgroundColor", "color", "isPrinting", "isImaging", "uid", "hasPdf", "hasImg", "hasSvg", "hasFullscreen", "isFullscreen", "chartElement", "position", "titles", "hasAnnotator", "isAnnotation", "callbacks", "printScale", "hasZoom", "isZoom", "onGeneratePdf", "onGenerateImage", "style"])) : L("", !0),
|
|
2478
|
-
u.value.style.chart.title.text ? (
|
|
2478
|
+
u.value.style.chart.title.text ? (y(), _("div", {
|
|
2479
2479
|
key: 3,
|
|
2480
2480
|
ref_key: "chartTitle",
|
|
2481
|
-
ref:
|
|
2481
|
+
ref: w,
|
|
2482
2482
|
style: "width:100%;background:transparent;"
|
|
2483
2483
|
}, [
|
|
2484
|
-
(
|
|
2484
|
+
(y(), te(An, {
|
|
2485
2485
|
key: `title_${P.value}`,
|
|
2486
2486
|
config: {
|
|
2487
2487
|
title: {
|
|
@@ -2495,70 +2495,70 @@ const _o = { style: { chart: { backgroundColor: "#1A1A1A", color: "#CCCCCC", bac
|
|
|
2495
2495
|
}
|
|
2496
2496
|
}, null, 8, ["config"]))
|
|
2497
2497
|
], 512)) : L("", !0),
|
|
2498
|
-
u.value.style.chart.controls.position === "top" && !v(
|
|
2498
|
+
u.value.style.chart.controls.position === "top" && !v(Ce) && u.value.style.chart.controls.show ? (y(), te(qt, {
|
|
2499
2499
|
key: 4,
|
|
2500
2500
|
ref_key: "zoomControls",
|
|
2501
|
-
ref:
|
|
2501
|
+
ref: x,
|
|
2502
2502
|
config: u.value,
|
|
2503
2503
|
scale: v(Dt),
|
|
2504
|
-
isFullscreen:
|
|
2504
|
+
isFullscreen: ie.value,
|
|
2505
2505
|
withDirection: "",
|
|
2506
2506
|
onZoomIn: Ze,
|
|
2507
2507
|
onZoomOut: Xe,
|
|
2508
|
-
onResetZoom: p[0] || (p[0] = () => v(
|
|
2508
|
+
onResetZoom: p[0] || (p[0] = () => v(Be)(!0)),
|
|
2509
2509
|
onSwitchDirection: Ke
|
|
2510
2510
|
}, null, 8, ["config", "scale", "isFullscreen"])) : L("", !0),
|
|
2511
|
-
v(k) ? (
|
|
2511
|
+
v(k) ? (y(), _("svg", {
|
|
2512
2512
|
key: 5,
|
|
2513
2513
|
ref_key: "svgRef",
|
|
2514
2514
|
ref: se,
|
|
2515
|
-
class:
|
|
2516
|
-
viewBox:
|
|
2515
|
+
class: Wt({ "vue-ui-dag-svg": !0, "vue-data-ui-loading": v(Ce) }),
|
|
2516
|
+
viewBox: Ho.value,
|
|
2517
2517
|
xmlns: v(mn),
|
|
2518
|
-
style:
|
|
2518
|
+
style: ce({
|
|
2519
2519
|
backgroundColor: u.value.style.chart.backgroundColor,
|
|
2520
2520
|
height: "100%",
|
|
2521
2521
|
width: "100%"
|
|
2522
2522
|
})
|
|
2523
2523
|
}, [
|
|
2524
2524
|
tt(v(i)),
|
|
2525
|
-
u.value.style.chart.backgroundPattern.show ? (
|
|
2525
|
+
u.value.style.chart.backgroundPattern.show ? (y(), _("defs", Ar, [
|
|
2526
2526
|
K("pattern", {
|
|
2527
2527
|
id: `dag_bg_pattern_${g.value}`,
|
|
2528
2528
|
patternUnits: "userSpaceOnUse",
|
|
2529
|
-
width:
|
|
2530
|
-
height:
|
|
2529
|
+
width: ae.value,
|
|
2530
|
+
height: ae.value
|
|
2531
2531
|
}, [
|
|
2532
|
-
M(
|
|
2533
|
-
x:
|
|
2534
|
-
y:
|
|
2532
|
+
M(h.$slots, "background-pattern", z(V({
|
|
2533
|
+
x: ae.value / 2,
|
|
2534
|
+
y: ae.value / 2,
|
|
2535
2535
|
color: u.value.style.chart.backgroundPattern.dotColor
|
|
2536
2536
|
})), () => [
|
|
2537
2537
|
K("circle", {
|
|
2538
|
-
cx:
|
|
2539
|
-
cy:
|
|
2540
|
-
r:
|
|
2538
|
+
cx: ae.value / 2,
|
|
2539
|
+
cy: ae.value / 2,
|
|
2540
|
+
r: tn.value,
|
|
2541
2541
|
fill: u.value.style.chart.backgroundPattern.dotColor
|
|
2542
2542
|
}, null, 8, Lr)
|
|
2543
2543
|
], !0)
|
|
2544
2544
|
], 8, Sr)
|
|
2545
2545
|
])) : L("", !0),
|
|
2546
|
-
u.value.style.chart.backgroundPattern.show ? (
|
|
2546
|
+
u.value.style.chart.backgroundPattern.show ? (y(), _("rect", {
|
|
2547
2547
|
key: 1,
|
|
2548
|
-
x: v(
|
|
2549
|
-
y: v(
|
|
2550
|
-
width: v(
|
|
2551
|
-
height: v(
|
|
2548
|
+
x: v(me)?.x ?? 0,
|
|
2549
|
+
y: v(me)?.y ?? 0,
|
|
2550
|
+
width: v(me)?.width ?? 0,
|
|
2551
|
+
height: v(me)?.height ?? 0,
|
|
2552
2552
|
fill: `url(#dag_bg_pattern_${g.value})`,
|
|
2553
|
-
style:
|
|
2553
|
+
style: ce({
|
|
2554
2554
|
pointerEvents: "none",
|
|
2555
2555
|
opacity: u.value.style.chart.backgroundPattern.opacity
|
|
2556
2556
|
})
|
|
2557
2557
|
}, null, 12, Mr)) : L("", !0),
|
|
2558
|
-
v(k).arrowShape !== "undirected" ? (
|
|
2559
|
-
(
|
|
2560
|
-
key:
|
|
2561
|
-
id: Mt(
|
|
2558
|
+
v(k).arrowShape !== "undirected" ? (y(), _("defs", Or, [
|
|
2559
|
+
(y(!0), _(ue, null, Le(jo.value, (d) => (y(), _("marker", {
|
|
2560
|
+
key: d,
|
|
2561
|
+
id: Mt(d),
|
|
2562
2562
|
markerWidth: v(k).arrowSize,
|
|
2563
2563
|
markerHeight: v(k).arrowSize,
|
|
2564
2564
|
refX: v(k).arrowSize - 3,
|
|
@@ -2566,185 +2566,195 @@ const _o = { style: { chart: { backgroundColor: "#1A1A1A", color: "#CCCCCC", bac
|
|
|
2566
2566
|
orient: "auto",
|
|
2567
2567
|
markerUnits: "strokeWidth"
|
|
2568
2568
|
}, [
|
|
2569
|
-
v(k).arrowShape === "normal" ? (
|
|
2569
|
+
v(k).arrowShape === "normal" ? (y(), _("path", {
|
|
2570
2570
|
key: 0,
|
|
2571
2571
|
d: `M 0 0 L ${v(k).arrowSize} ${v(k).arrowSize / 2} L 0 ${v(k).arrowSize} Z`,
|
|
2572
|
-
fill:
|
|
2573
|
-
stroke:
|
|
2572
|
+
fill: d,
|
|
2573
|
+
stroke: d,
|
|
2574
2574
|
"stroke-width": "0"
|
|
2575
|
-
}, null, 8, Rr)) : (
|
|
2575
|
+
}, null, 8, Rr)) : (y(), _("path", {
|
|
2576
2576
|
key: 1,
|
|
2577
2577
|
d: `M 0 0 L ${v(k).arrowSize} ${v(k).arrowSize / 2} L 0 ${v(k).arrowSize} L ${v(k).arrowSize / 3} ${v(k).arrowSize / 2} Z`,
|
|
2578
|
-
fill:
|
|
2579
|
-
stroke:
|
|
2578
|
+
fill: d,
|
|
2579
|
+
stroke: d,
|
|
2580
2580
|
"stroke-width": "0"
|
|
2581
2581
|
}, null, 8, Tr))
|
|
2582
2582
|
], 8, Dr))), 128))
|
|
2583
2583
|
])) : L("", !0),
|
|
2584
2584
|
K("g", Pr, [
|
|
2585
|
-
(
|
|
2586
|
-
key:
|
|
2585
|
+
(y(!0), _(ue, null, Le(v(k).edges, (d) => (y(), _(ue, {
|
|
2586
|
+
key: d.id
|
|
2587
2587
|
}, [
|
|
2588
2588
|
K("path", {
|
|
2589
2589
|
"data-cy-edge": "",
|
|
2590
2590
|
ref_for: !0,
|
|
2591
|
-
ref:
|
|
2592
|
-
d:
|
|
2591
|
+
ref: Jo(d.id),
|
|
2592
|
+
d: d.pathData,
|
|
2593
2593
|
fill: "none",
|
|
2594
|
-
stroke:
|
|
2595
|
-
"stroke-width": u.value.style.chart.edges.strokeWidth * (
|
|
2594
|
+
stroke: d.original.color ?? u.value.style.chart.edges.stroke,
|
|
2595
|
+
"stroke-width": u.value.style.chart.edges.strokeWidth * (d.from === re.value || d.id === G.value?.id ? 2 : 1),
|
|
2596
2596
|
"stroke-linecap": "round",
|
|
2597
2597
|
"stroke-linejoin": "round",
|
|
2598
2598
|
style: { "pointer-events": "none", transition: "stroke-width 0.2s ease-in-out" }
|
|
2599
|
-
}, null, 8,
|
|
2600
|
-
u.value.style.chart.midpoints.show ? (
|
|
2599
|
+
}, null, 8, $r),
|
|
2600
|
+
u.value.style.chart.midpoints.show ? (y(), _("circle", {
|
|
2601
2601
|
key: 0,
|
|
2602
2602
|
"data-cy-midpoint": "",
|
|
2603
2603
|
class: "vue-ui-dag-edge-midpoint",
|
|
2604
|
-
cx:
|
|
2605
|
-
cy:
|
|
2604
|
+
cx: d.midpoint.x,
|
|
2605
|
+
cy: d.midpoint.y,
|
|
2606
2606
|
r: u.value.style.chart.midpoints.radius,
|
|
2607
2607
|
fill: u.value.style.chart.midpoints.fill,
|
|
2608
|
-
stroke:
|
|
2609
|
-
"stroke-width": u.value.style.chart.midpoints.strokeWidth * (
|
|
2608
|
+
stroke: d.original.color ?? u.value.style.chart.midpoints.stroke,
|
|
2609
|
+
"stroke-width": u.value.style.chart.midpoints.strokeWidth * (d.from === re.value || d.id === G.value?.id ? 2 : 1),
|
|
2610
2610
|
style: { transition: "stroke-width 0.2s ease-in-out" },
|
|
2611
|
-
onMouseenter: (
|
|
2612
|
-
onMouseleave:
|
|
2613
|
-
}, null, 40,
|
|
2611
|
+
onMouseenter: (b) => Xo(d),
|
|
2612
|
+
onMouseleave: qo
|
|
2613
|
+
}, null, 40, Fr)) : L("", !0)
|
|
2614
2614
|
], 64))), 128))
|
|
2615
2615
|
]),
|
|
2616
2616
|
K("g", Br, [
|
|
2617
|
-
(
|
|
2618
|
-
key:
|
|
2617
|
+
(y(!0), _(ue, null, Le(v(k).nodes, (d) => (y(), _("g", {
|
|
2618
|
+
key: d.id,
|
|
2619
2619
|
class: "vue-ui-dag-node",
|
|
2620
|
-
onClick:
|
|
2621
|
-
onMouseenter: (
|
|
2622
|
-
onMouseleave: p[1] || (p[1] = (
|
|
2620
|
+
onClick: Yt((b) => u.value.style.chart.nodes.tooltip.showOnClick && $t(d), ["stop"]),
|
|
2621
|
+
onMouseenter: (b) => re.value = d.id,
|
|
2622
|
+
onMouseleave: p[1] || (p[1] = (b) => re.value = null)
|
|
2623
2623
|
}, [
|
|
2624
|
-
|
|
2625
|
-
|
|
2626
|
-
|
|
2627
|
-
|
|
2628
|
-
|
|
2629
|
-
|
|
2630
|
-
|
|
2631
|
-
|
|
2632
|
-
|
|
2633
|
-
|
|
2634
|
-
|
|
2635
|
-
|
|
2636
|
-
|
|
2637
|
-
|
|
2638
|
-
|
|
2639
|
-
|
|
2624
|
+
h.$slots.node ? L("", !0) : (y(), _("rect", {
|
|
2625
|
+
key: 0,
|
|
2626
|
+
"data-cy-node": "",
|
|
2627
|
+
x: d.x - d.width / 2,
|
|
2628
|
+
y: d.y - d.height / 2,
|
|
2629
|
+
width: d.width,
|
|
2630
|
+
height: d.height,
|
|
2631
|
+
rx: u.value.style.chart.nodes.borderRadius,
|
|
2632
|
+
fill: d.original.backgroundColor,
|
|
2633
|
+
stroke: u.value.style.chart.nodes.stroke,
|
|
2634
|
+
"stroke-width": u.value.style.chart.nodes.strokeWidth,
|
|
2635
|
+
style: ce({
|
|
2636
|
+
cursor: u.value.style.chart.nodes.tooltip.showOnClick ? "pointer" : "default"
|
|
2637
|
+
})
|
|
2638
|
+
}, null, 12, Vr)),
|
|
2639
|
+
h.$slots.node ? (y(), _("foreignObject", {
|
|
2640
|
+
key: 1,
|
|
2641
|
+
x: d.x - d.width / 2,
|
|
2642
|
+
y: d.y - d.height / 2,
|
|
2643
|
+
width: d.width,
|
|
2644
|
+
height: d.height
|
|
2645
|
+
}, [
|
|
2646
|
+
M(h.$slots, "node", ot({ ref_for: !0 }, { node: d, orientation: ee.value }), void 0, !0)
|
|
2647
|
+
], 8, Ir)) : L("", !0)
|
|
2648
|
+
], 40, zr))), 128))
|
|
2649
|
+
]),
|
|
2650
|
+
K("g", Gr, [
|
|
2651
|
+
(y(!0), _(ue, null, Le(v(k).edges, (d) => (y(), _("path", {
|
|
2652
|
+
key: d.id,
|
|
2653
|
+
d: d.pathData,
|
|
2654
|
+
fill: "none",
|
|
2655
|
+
stroke: "transparent",
|
|
2656
|
+
"stroke-width": u.value.style.chart.edges.strokeWidth * (d.from === re.value || d.id === G.value?.id ? 1.3 : 1),
|
|
2657
|
+
"stroke-linecap": "round",
|
|
2658
|
+
"stroke-linejoin": "round",
|
|
2659
|
+
"marker-end": v(k).arrowShape === "undirected" ? null : `url(#${Mt(d.original?.color || u.value.style.chart.edges.stroke)})`,
|
|
2660
|
+
style: { "pointer-events": "none", transition: "stroke-width 0.2s ease-in-out" }
|
|
2661
|
+
}, null, 8, jr))), 128))
|
|
2662
|
+
]),
|
|
2663
|
+
K("g", Wr, [
|
|
2664
|
+
(y(!0), _(ue, null, Le(v(k).nodes, (d) => (y(), _("g", {
|
|
2665
|
+
key: d.id,
|
|
2666
|
+
onClick: Yt((b) => u.value.style.chart.nodes.tooltip.showOnClick && $t(d), ["stop"]),
|
|
2667
|
+
onMouseenter: (b) => re.value = d.id,
|
|
2668
|
+
onMouseleave: p[2] || (p[2] = (b) => re.value = null)
|
|
2669
|
+
}, [
|
|
2670
|
+
h.$slots["free-node-label"] ? L("", !0) : (y(), _(ue, { key: 0 }, [
|
|
2671
|
+
h.$slots["node-label"] ? (y(), _("text", {
|
|
2640
2672
|
key: 0,
|
|
2641
|
-
x:
|
|
2642
|
-
y:
|
|
2673
|
+
x: d.x,
|
|
2674
|
+
y: d.y + u.value.style.chart.nodes.labels.fontSize / 3,
|
|
2643
2675
|
"text-anchor": "middle",
|
|
2644
2676
|
"font-size": u.value.style.chart.nodes.labels.fontSize,
|
|
2645
|
-
fill:
|
|
2677
|
+
fill: d.original.color,
|
|
2646
2678
|
"font-weight": u.value.style.chart.nodes.labels.bold ? "bold" : "normal"
|
|
2647
2679
|
}, [
|
|
2648
|
-
M(
|
|
2649
|
-
un(Se(
|
|
2680
|
+
M(h.$slots, "node-label", ot({ ref_for: !0 }, { node: d, orientation: ee.value }), () => [
|
|
2681
|
+
un(Se(d.label), 1)
|
|
2650
2682
|
], !0)
|
|
2651
|
-
], 8,
|
|
2683
|
+
], 8, Hr)) : !h.$slots["free-node-label"] && !h.$slots.node ? (y(), _("text", {
|
|
2652
2684
|
key: 1,
|
|
2653
2685
|
"data-cy-node-label": "",
|
|
2654
|
-
x:
|
|
2655
|
-
y:
|
|
2686
|
+
x: d.x,
|
|
2687
|
+
y: d.y + u.value.style.chart.nodes.labels.fontSize / 3,
|
|
2656
2688
|
"text-anchor": "middle",
|
|
2657
2689
|
"font-size": u.value.style.chart.nodes.labels.fontSize,
|
|
2658
|
-
fill:
|
|
2690
|
+
fill: d.original.color,
|
|
2659
2691
|
"font-weight": u.value.style.chart.nodes.labels.bold ? "bold" : "normal",
|
|
2660
2692
|
innerHTML: v(gn)({
|
|
2661
|
-
content:
|
|
2693
|
+
content: d.label,
|
|
2662
2694
|
fontSize: u.value.style.chart.nodes.labels.fontSize,
|
|
2663
2695
|
fontWeight: u.value.style.chart.nodes.labels.bold ? "bold" : "normal",
|
|
2664
|
-
fill:
|
|
2665
|
-
x:
|
|
2666
|
-
y:
|
|
2696
|
+
fill: d.original.color,
|
|
2697
|
+
x: d.x,
|
|
2698
|
+
y: d.y,
|
|
2667
2699
|
autoOffset: !0
|
|
2668
2700
|
})
|
|
2669
|
-
}, null, 8,
|
|
2701
|
+
}, null, 8, Ur)) : L("", !0)
|
|
2670
2702
|
], 64)),
|
|
2671
|
-
|
|
2672
|
-
M(
|
|
2673
|
-
])) : L("", !0)
|
|
2674
|
-
|
|
2675
|
-
key: 2,
|
|
2676
|
-
x: h.x - h.width / 2,
|
|
2677
|
-
y: h.y - h.height / 2,
|
|
2678
|
-
width: h.width,
|
|
2679
|
-
height: h.height
|
|
2680
|
-
}, [
|
|
2681
|
-
M(f.$slots, "node", ot({ ref_for: !0 }, { node: h, orientation: ee.value }), void 0, !0)
|
|
2682
|
-
], 8, Wr)) : L("", !0)
|
|
2683
|
-
], 40, zr))), 128))
|
|
2684
|
-
]),
|
|
2685
|
-
K("g", Yr, [
|
|
2686
|
-
(C(!0), x(me, null, Be(v(k).edges, (h) => (C(), x("path", {
|
|
2687
|
-
key: h.id,
|
|
2688
|
-
d: h.pathData,
|
|
2689
|
-
fill: "none",
|
|
2690
|
-
stroke: "transparent",
|
|
2691
|
-
"stroke-width": u.value.style.chart.edges.strokeWidth * (h.from === Ce.value || h.id === G.value?.id ? 1.3 : 1),
|
|
2692
|
-
"stroke-linecap": "round",
|
|
2693
|
-
"stroke-linejoin": "round",
|
|
2694
|
-
"marker-end": v(k).arrowShape === "undirected" ? null : `url(#${Mt(h.original?.color || u.value.style.chart.edges.stroke)})`,
|
|
2695
|
-
style: { "pointer-events": "none", transition: "stroke-width 0.2s ease-in-out" }
|
|
2696
|
-
}, null, 8, Hr))), 128))
|
|
2703
|
+
h.$slots["free-node-label"] ? (y(), _("g", Zr, [
|
|
2704
|
+
M(h.$slots, "free-node-label", ot({ ref_for: !0 }, { node: d, layoutData: v(k), orientation: ee.value }), void 0, !0)
|
|
2705
|
+
])) : L("", !0)
|
|
2706
|
+
], 40, Yr))), 128))
|
|
2697
2707
|
]),
|
|
2698
|
-
M(
|
|
2708
|
+
M(h.$slots, "svg", {
|
|
2699
2709
|
svg: {
|
|
2700
|
-
drawingArea: v(
|
|
2710
|
+
drawingArea: v(me),
|
|
2701
2711
|
data: v(k),
|
|
2702
2712
|
orientation: ee.value
|
|
2703
2713
|
}
|
|
2704
2714
|
}, void 0, !0)
|
|
2705
2715
|
], 14, Nr)) : L("", !0),
|
|
2706
|
-
|
|
2707
|
-
M(
|
|
2716
|
+
h.$slots.watermark ? (y(), _("div", Xr, [
|
|
2717
|
+
M(h.$slots, "watermark", z(V({ isPrinting: v(Et) || v(Ct) })), void 0, !0)
|
|
2708
2718
|
])) : L("", !0),
|
|
2709
|
-
tt(
|
|
2710
|
-
default:
|
|
2711
|
-
Fe.value ? (
|
|
2719
|
+
tt(Ht, { name: "fade" }, {
|
|
2720
|
+
default: F(() => [
|
|
2721
|
+
Fe.value ? (y(), te(Ut, {
|
|
2712
2722
|
key: 0,
|
|
2713
|
-
to:
|
|
2723
|
+
to: ie.value ? m.value : "body"
|
|
2714
2724
|
}, [
|
|
2715
2725
|
K("div", {
|
|
2716
2726
|
"data-cy-tooltip-midpoint": "",
|
|
2717
2727
|
ref_key: "tooltipRef",
|
|
2718
|
-
ref:
|
|
2728
|
+
ref: Pe,
|
|
2719
2729
|
class: "vue-ui-dag-tooltip",
|
|
2720
|
-
style:
|
|
2721
|
-
|
|
2730
|
+
style: ce({
|
|
2731
|
+
...$e.value,
|
|
2722
2732
|
maxWidth: u.value.style.chart.midpoints.tooltip.maxWidth,
|
|
2723
2733
|
"--vue-data-ui-dag-tooltip-background": u.value.style.chart.midpoints.tooltip.backgroundColor,
|
|
2724
2734
|
"--vue-data-ui-dag-tooltip-color": u.value.style.chart.midpoints.tooltip.color
|
|
2725
2735
|
}),
|
|
2726
|
-
"data-position":
|
|
2736
|
+
"data-position": ye.value
|
|
2727
2737
|
}, [
|
|
2728
|
-
M(
|
|
2729
|
-
G.value ? (
|
|
2738
|
+
M(h.$slots, "tooltip-midpoint", z(V({ edge: G.value, layoutData: v(k) })), () => [
|
|
2739
|
+
G.value ? (y(), _("div", Kr, Se(Lt(G.value.from)?.label ?? G.value.from) + " → " + Se(Lt(G.value.to)?.label ?? G.value.to), 1)) : L("", !0)
|
|
2730
2740
|
], !0)
|
|
2731
|
-
], 12,
|
|
2741
|
+
], 12, qr)
|
|
2732
2742
|
], 8, ["to"])) : L("", !0)
|
|
2733
2743
|
]),
|
|
2734
2744
|
_: 3
|
|
2735
2745
|
}),
|
|
2736
|
-
tt(
|
|
2737
|
-
default:
|
|
2738
|
-
ne.value ? (
|
|
2746
|
+
tt(Ht, { name: "fade" }, {
|
|
2747
|
+
default: F(() => [
|
|
2748
|
+
ne.value ? (y(), te(Ut, {
|
|
2739
2749
|
key: 0,
|
|
2740
|
-
to:
|
|
2750
|
+
to: ie.value ? m.value : "body"
|
|
2741
2751
|
}, [
|
|
2742
2752
|
K("div", {
|
|
2743
2753
|
"data-cy-tooltip-node": "",
|
|
2744
2754
|
ref_key: "nodeTooltipRef",
|
|
2745
2755
|
ref: Ge,
|
|
2746
2756
|
class: "vue-ui-dag-node-tooltip",
|
|
2747
|
-
style:
|
|
2757
|
+
style: ce({
|
|
2748
2758
|
maxWidth: u.value.style.chart.nodes.tooltip.maxWidth,
|
|
2749
2759
|
left: je.value.left,
|
|
2750
2760
|
top: je.value.top,
|
|
@@ -2753,44 +2763,44 @@ const _o = { style: { chart: { backgroundColor: "#1A1A1A", color: "#CCCCCC", bac
|
|
|
2753
2763
|
}),
|
|
2754
2764
|
"data-position": pt.value
|
|
2755
2765
|
}, [
|
|
2756
|
-
M(
|
|
2757
|
-
|
|
2766
|
+
M(h.$slots, "tooltip-node", z(V({ node: ke.value, layoutData: v(k) })), () => [
|
|
2767
|
+
ke.value ? (y(), _("div", Qr, Se(ke.value.label), 1)) : L("", !0)
|
|
2758
2768
|
], !0)
|
|
2759
|
-
], 12,
|
|
2769
|
+
], 12, Jr)
|
|
2760
2770
|
], 8, ["to"])) : L("", !0)
|
|
2761
2771
|
]),
|
|
2762
2772
|
_: 3
|
|
2763
2773
|
}),
|
|
2764
|
-
u.value.style.chart.controls.position === "bottom" && !v(
|
|
2774
|
+
u.value.style.chart.controls.position === "bottom" && !v(Ce) && u.value.style.chart.controls.show ? (y(), te(qt, {
|
|
2765
2775
|
key: 7,
|
|
2766
2776
|
ref_key: "zoomControls",
|
|
2767
|
-
ref:
|
|
2777
|
+
ref: x,
|
|
2768
2778
|
config: u.value,
|
|
2769
2779
|
scale: v(Dt),
|
|
2770
|
-
isFullscreen:
|
|
2780
|
+
isFullscreen: ie.value,
|
|
2771
2781
|
withDirection: "",
|
|
2772
2782
|
onZoomIn: Ze,
|
|
2773
2783
|
onZoomOut: Xe,
|
|
2774
|
-
onResetZoom: p[
|
|
2784
|
+
onResetZoom: p[3] || (p[3] = () => v(Be)(!0)),
|
|
2775
2785
|
onSwitchDirection: Ke
|
|
2776
2786
|
}, null, 8, ["config", "scale", "isFullscreen"])) : L("", !0),
|
|
2777
|
-
|
|
2787
|
+
h.$slots.source ? (y(), _("div", {
|
|
2778
2788
|
key: 8,
|
|
2779
2789
|
ref_key: "source",
|
|
2780
2790
|
ref: N,
|
|
2781
2791
|
dir: "auto"
|
|
2782
2792
|
}, [
|
|
2783
|
-
M(
|
|
2793
|
+
M(h.$slots, "source", {}, void 0, !0)
|
|
2784
2794
|
], 512)) : L("", !0),
|
|
2785
|
-
v(
|
|
2795
|
+
v(Ce) ? (y(), te(kn, { key: 9 })) : L("", !0)
|
|
2786
2796
|
], 46, _r));
|
|
2787
2797
|
}
|
|
2788
|
-
},
|
|
2798
|
+
}, ti = /* @__PURE__ */ Ln(ei, [["__scopeId", "data-v-5cf3932e"]]), wi = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
2789
2799
|
__proto__: null,
|
|
2790
|
-
default:
|
|
2800
|
+
default: ti
|
|
2791
2801
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
2792
2802
|
export {
|
|
2793
|
-
|
|
2794
|
-
|
|
2795
|
-
|
|
2803
|
+
bi as a,
|
|
2804
|
+
wi as b,
|
|
2805
|
+
ti as v
|
|
2796
2806
|
};
|