vue-data-ui 3.8.2 → 3.8.4
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/{Arrow-pvqmWZAQ.js → Arrow-i6njovHV.js} +1 -1
- package/dist/{BaseDraggableDialog-BYwNgX3M.js → BaseDraggableDialog-C2wzOVzX.js} +2 -2
- package/dist/{BaseIcon-CALhpING.js → BaseIcon-_2VlkSHq.js} +1 -1
- package/dist/{ColorPicker-B_9b0REv.js → ColorPicker-Y-VfX-24.js} +2 -2
- package/dist/{DataTable-Ca1twcf7.js → DataTable-CokMin24.js} +2 -2
- package/dist/{Legend-Djkw4FGq.js → Legend-PhhPyrZ0.js} +2 -2
- package/dist/{NonSvgPenAndPaper-DCQPVA4M.js → NonSvgPenAndPaper-ir3Z1ZAu.js} +3 -3
- package/dist/{PackageVersion-CR86X4r9.js → PackageVersion-BuD3uLvK.js} +1 -1
- package/dist/PenAndPaper-CFRubEEG.js +402 -0
- package/dist/{Shape-BEGGcaL8.js → Shape-BuBasQnO.js} +1 -1
- package/dist/{Slicer-DaUi0o8i.js → Slicer-CVcdknEx.js} +2 -2
- package/dist/{SlicerPreview-Bk-h_ANq.js → SlicerPreview-C1EQEgYE.js} +2 -2
- package/dist/{SparkTooltip-BWdCP-h3.js → SparkTooltip-yKdo0Bx6.js} +1 -1
- package/dist/{Title-CWX8otQg.js → Title-DnykBvFl.js} +1 -1
- package/dist/{Tooltip-OHx7yHlS.js → Tooltip-l2pmtXwi.js} +1 -1
- package/dist/{UserOptions-ChRXLqps.js → UserOptions-M5A9w5GL.js} +2 -2
- package/dist/components/arrow.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-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-icon.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/{dom-to-png-VQEAYRVr.js → dom-to-png-CNmX1SJg.js} +1 -1
- package/dist/{img-CwrkWkkl.js → img-C5q4A7ke.js} +1 -1
- package/dist/{lib-qMPkcvmh.js → lib-_nVZfi2t.js} +29 -28
- package/dist/{pdf-BMMrFX8S.js → pdf-B7obJjyd.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/types/vue-data-ui.d.ts +3 -0
- package/dist/{useAutoSizeLabelsInsideViewbox-CY90KinM.js → useAutoSizeLabelsInsideViewbox-Cj4ZcFAh.js} +1 -1
- package/dist/{useNestedProp-DH2Pjkde.js → useNestedProp-CNjAKn-Z.js} +5 -1
- package/dist/{usePrinter-CjGh4mFJ.js → usePrinter-DXIMGR61.js} +2 -2
- package/dist/{vue-data-ui-DSoAFYh6.js → vue-data-ui-DXfEvcys.js} +66 -66
- package/dist/vue-data-ui.js +70 -70
- package/dist/{vue-ui-3d-bar-Dr9yOng4.js → vue-ui-3d-bar-BR7AtlR0.js} +6 -6
- package/dist/{vue-ui-accordion-DiNnR-ZE.js → vue-ui-accordion-WOPRF2Tv.js} +3 -3
- package/dist/{vue-ui-age-pyramid-D1wY760N.js → vue-ui-age-pyramid-DUcx-5pl.js} +6 -6
- package/dist/{vue-ui-annotator-D_z1JO0m.js → vue-ui-annotator-BBgWTQxm.js} +7 -7
- package/dist/{vue-ui-bullet-CATRx7fX.js → vue-ui-bullet-e-E8vgoK.js} +7 -7
- package/dist/{vue-ui-candlestick-Wbwh9a_1.js → vue-ui-candlestick-ofOO-UZd.js} +7 -7
- package/dist/{vue-ui-carousel-table-B-3Okj00.js → vue-ui-carousel-table-Cw9AZ6K_.js} +4 -4
- package/dist/{vue-ui-chestnut-DEIG2RoM.js → vue-ui-chestnut-BfxiZIas.js} +5 -5
- package/dist/{vue-ui-chord-enRLQOLg.js → vue-ui-chord-BZplQ2Ah.js} +8 -8
- package/dist/{vue-ui-circle-pack-Bn-xTRny.js → vue-ui-circle-pack-65-cbeZq.js} +6 -6
- package/dist/{vue-ui-cursor-CZ58l0J2.js → vue-ui-cursor-CowLXeRB.js} +3 -3
- package/dist/{vue-ui-dag-CeF87qTR.js → vue-ui-dag-Cnv5koqb.js} +546 -545
- package/dist/{vue-ui-dashboard-DIRH3qPO.js → vue-ui-dashboard-CH4lfPnJ.js} +68 -68
- package/dist/{vue-ui-digits-B7rN8UWS.js → vue-ui-digits-DwsMbBDJ.js} +2 -2
- package/dist/{vue-ui-donut-evolution-DrdfQnMs.js → vue-ui-donut-evolution-DNicvCVK.js} +8 -8
- package/dist/vue-ui-donut-gntDZdB4.js +2001 -0
- package/dist/{vue-ui-dumbbell-CDq2-NBe.js → vue-ui-dumbbell-CQIJgRxY.js} +7 -7
- package/dist/{vue-ui-flow-Y9omWd2u.js → vue-ui-flow-BUThxO9F.js} +7 -7
- package/dist/{vue-ui-funnel-BCVF1KTv.js → vue-ui-funnel-fPcBhjoP.js} +6 -6
- package/dist/{vue-ui-galaxy-D7DBAhIy.js → vue-ui-galaxy-ClBzduIz.js} +7 -7
- package/dist/{vue-ui-gauge-BlxvYBkd.js → vue-ui-gauge-BnWsuqfT.js} +7 -7
- package/dist/{vue-ui-gizmo-TAA6z0iU.js → vue-ui-gizmo-B1RWjhoX.js} +3 -3
- package/dist/{vue-ui-heatmap-BS1CinF0.js → vue-ui-heatmap-CdGmGjGH.js} +7 -7
- package/dist/{vue-ui-history-plot-DNgE02I6.js → vue-ui-history-plot-CyUvc35T.js} +7 -7
- package/dist/{vue-ui-horizontal-bar-DQcgNmg8.js → vue-ui-horizontal-bar-CUwFkoh_.js} +13 -13
- package/dist/{vue-ui-kpi-B6oDMqQL.js → vue-ui-kpi-BXQvKfTh.js} +3 -3
- package/dist/{vue-ui-mini-loader-BXLMnXR4.js → vue-ui-mini-loader-DFBgplMk.js} +2 -2
- package/dist/{vue-ui-molecule-Dp_ZSzsj.js → vue-ui-molecule-BTaGK6l7.js} +54 -54
- package/dist/{vue-ui-mood-radar-BdRrOGLR.js → vue-ui-mood-radar-DIxGLyf6.js} +7 -7
- package/dist/{vue-ui-nested-donuts-AIyLN3zs.js → vue-ui-nested-donuts-Buo1qlvt.js} +7 -7
- package/dist/{vue-ui-onion-VFqPdMEh.js → vue-ui-onion-CTRuEQxm.js} +8 -8
- package/dist/{vue-ui-parallel-coordinate-plot-E9SLS7RW.js → vue-ui-parallel-coordinate-plot-CX_sxW2v.js} +28 -28
- package/dist/{vue-ui-quadrant-BcbUHmkA.js → vue-ui-quadrant-DmVXReZH.js} +8 -8
- package/dist/{vue-ui-quick-chart-DOCz-s43.js → vue-ui-quick-chart-B9hUcTr6.js} +6 -6
- package/dist/{vue-ui-radar-BIGTJvWQ.js → vue-ui-radar-DCIkshOp.js} +8 -8
- package/dist/{vue-ui-rating-CtkV7O_k.js → vue-ui-rating-jjJl1N9l.js} +2 -2
- package/dist/{vue-ui-relation-circle-C3TjhX13.js → vue-ui-relation-circle-CM2duT_R.js} +7 -7
- package/dist/{vue-ui-ridgeline-BCvf2QDN.js → vue-ui-ridgeline-y7Fwkr-1.js} +8 -8
- package/dist/{vue-ui-rings-IrmvR-uv.js → vue-ui-rings-B6HLC79S.js} +8 -8
- package/dist/{vue-ui-scatter-ST5ZySnk.js → vue-ui-scatter-BDp469sU.js} +8 -8
- package/dist/{vue-ui-skeleton-CbF8cNtW.js → vue-ui-skeleton-CTivICoM.js} +3 -3
- package/dist/{vue-ui-smiley-C-mXyFxi.js → vue-ui-smiley-YLy2xBa-.js} +2 -2
- package/dist/{vue-ui-spark-trend-CIJLfHtS.js → vue-ui-spark-trend-B2wOWiSY.js} +3 -3
- package/dist/{vue-ui-sparkbar-BVcnZro1.js → vue-ui-sparkbar-CqwjRMPQ.js} +3 -3
- package/dist/{vue-ui-sparkgauge-Bzl9AdPu.js → vue-ui-sparkgauge-BNv5nBv8.js} +3 -3
- package/dist/{vue-ui-sparkhistogram-nEOjS0kw.js → vue-ui-sparkhistogram-ZrALpNpM.js} +4 -4
- package/dist/{vue-ui-sparkline-DBMs4QF-.js → vue-ui-sparkline-D7_6htbE.js} +3 -3
- package/dist/{vue-ui-sparkstackbar-Drqffzag.js → vue-ui-sparkstackbar-BQD6cbOE.js} +3 -3
- package/dist/{vue-ui-stackbar-DmECmpBp.js → vue-ui-stackbar-C9KeiS-Q.js} +9 -9
- package/dist/{vue-ui-stackline-CDWhnKV8.js → vue-ui-stackline-qJW5y3GA.js} +9 -9
- package/dist/{vue-ui-strip-plot-BSkWmE37.js → vue-ui-strip-plot-Bgt_dkJ3.js} +7 -7
- package/dist/{vue-ui-table-DhKfklhX.js → vue-ui-table-BvpnTcTk.js} +5 -5
- package/dist/{vue-ui-table-heatmap-DODhMbZE.js → vue-ui-table-heatmap-UkSDagXf.js} +10 -10
- package/dist/{vue-ui-table-sparkline-BB7y9MEg.js → vue-ui-table-sparkline-D-UoYPFq.js} +4 -4
- package/dist/{vue-ui-thermometer-KpasFVWs.js → vue-ui-thermometer-CCySf8Ei.js} +7 -7
- package/dist/{vue-ui-timer-CSesYHmN.js → vue-ui-timer-D2-YQFf3.js} +5 -5
- package/dist/{vue-ui-tiremarks-DfXDAMEy.js → vue-ui-tiremarks-NDuNR9MY.js} +6 -6
- package/dist/{vue-ui-treemap-80KNxaAC.js → vue-ui-treemap-Dzlc-kC5.js} +8 -8
- package/dist/{vue-ui-waffle-IsPJ8tOx.js → vue-ui-waffle-CBBfrQqs.js} +8 -8
- package/dist/{vue-ui-wheel-BQZ0ABos.js → vue-ui-wheel-iFV_KfLw.js} +6 -6
- package/dist/{vue-ui-word-cloud-Dx0HYmL4.js → vue-ui-word-cloud-DLBK1KRY.js} +6 -6
- package/dist/{vue-ui-world-Cvop-Bfx.js → vue-ui-world-BinQefwp.js} +6 -6
- package/dist/{vue-ui-xy-5xj16K5g.js → vue-ui-xy-BSxvJyZM.js} +9 -9
- package/dist/{vue-ui-xy-canvas-Cq-lVd9y.js → vue-ui-xy-canvas-Bl4ZS4GS.js} +10 -10
- package/package.json +1 -1
- package/dist/PenAndPaper-DscVdZ1u.js +0 -388
- package/dist/vue-ui-donut-CL2l-Mq-.js +0 -1713
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { ref as k, watchEffect as
|
|
2
|
-
import { c as lt,
|
|
3
|
-
import { t as
|
|
4
|
-
import { u as
|
|
5
|
-
import { u as
|
|
6
|
-
import { u as
|
|
7
|
-
import { u as
|
|
8
|
-
import { u as
|
|
9
|
-
import { u as
|
|
10
|
-
import { u as
|
|
11
|
-
import { u as
|
|
12
|
-
import
|
|
13
|
-
import Qe from "./BaseIcon-
|
|
14
|
-
import { _ as
|
|
15
|
-
import
|
|
16
|
-
const
|
|
17
|
-
class
|
|
1
|
+
import { ref as k, watchEffect as Qo, unref as v, createElementBlock as _, openBlock as y, normalizeStyle as q, normalizeClass as it, createElementVNode as G, createCommentVNode as S, createVNode as ce, toDisplayString as ae, defineAsyncComponent as qe, toRefs as en, computed as W, onMounted as Vt, nextTick as De, watch as Fe, onBeforeUnmount as tn, createBlock as X, withCtx as M, renderSlot as A, normalizeProps as B, guardReactiveProps as V, createSlots as on, Fragment as le, renderList as Pe, withModifiers as nn, mergeProps as Ke, createTextVNode as sn, Transition as It, Teleport as Gt } from "vue";
|
|
2
|
+
import { c as lt, az as rn, l as xe, n as ln, r as an, h as cn, t as ro, o as un, g as jt, X as dn, a9 as fn } from "./lib-_nVZfi2t.js";
|
|
3
|
+
import { t as hn, u as mn } from "./useResponsive-DfdjqQps.js";
|
|
4
|
+
import { u as gn } from "./usePanZoom-DMfuOfaC.js";
|
|
5
|
+
import { u as vn, a as Je } from "./useNestedProp-CNjAKn-Z.js";
|
|
6
|
+
import { u as bn, B as pn } from "./BaseScanner-BgWxam9d.js";
|
|
7
|
+
import { u as wn } from "./usePrinter-DXIMGR61.js";
|
|
8
|
+
import { u as yn } from "./useSvgExport-DrjCWun4.js";
|
|
9
|
+
import { u as kn } from "./useThemeCheck-DGJ31Vi5.js";
|
|
10
|
+
import { u as En } from "./useUserOptionState-BIvW1Kz7.js";
|
|
11
|
+
import { u as Cn } from "./useChartAccessibility-9icAAmYg.js";
|
|
12
|
+
import xn from "./Title-DnykBvFl.js";
|
|
13
|
+
import Qe from "./BaseIcon-_2VlkSHq.js";
|
|
14
|
+
import { _ as io } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
15
|
+
import _n from "./img-C5q4A7ke.js";
|
|
16
|
+
const Nn = "\0", oe = "\0", Wt = "";
|
|
17
|
+
class K {
|
|
18
18
|
_isDirected = !0;
|
|
19
19
|
_isMultigraph = !1;
|
|
20
20
|
_isCompound = !1;
|
|
@@ -47,7 +47,7 @@ class q {
|
|
|
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[oe] = {});
|
|
51
51
|
}
|
|
52
52
|
/* === Graph functions ========= */
|
|
53
53
|
/**
|
|
@@ -139,7 +139,7 @@ class q {
|
|
|
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] = oe, this._children[t] = {}, this._children[oe][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 q {
|
|
|
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 = oe;
|
|
184
184
|
else {
|
|
185
185
|
o += "";
|
|
186
186
|
for (let n = o; n !== void 0; n = this.parent(n))
|
|
@@ -202,7 +202,7 @@ class q {
|
|
|
202
202
|
parent(t) {
|
|
203
203
|
if (this._isCompound) {
|
|
204
204
|
const o = this._parent[t];
|
|
205
|
-
if (o !==
|
|
205
|
+
if (o !== oe)
|
|
206
206
|
return o;
|
|
207
207
|
}
|
|
208
208
|
}
|
|
@@ -210,13 +210,13 @@ class q {
|
|
|
210
210
|
* Gets list of direct children of node nodeId.
|
|
211
211
|
* Complexity: O(1).
|
|
212
212
|
*/
|
|
213
|
-
children(t =
|
|
213
|
+
children(t = oe) {
|
|
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 === oe)
|
|
220
220
|
return this.nodes();
|
|
221
221
|
if (this.hasNode(t))
|
|
222
222
|
return [];
|
|
@@ -331,13 +331,13 @@ class q {
|
|
|
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 l =
|
|
334
|
+
let l = Ce(this._isDirected, t, o, n);
|
|
335
335
|
if (Object.hasOwn(this._edgeLabels, l))
|
|
336
336
|
return i && (this._edgeLabels[l] = 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[l] = i ? s : this._defaultEdgeLabelFn(t, o, n);
|
|
340
|
-
const a =
|
|
340
|
+
const a = An(this._isDirected, t, o, n);
|
|
341
341
|
return t = a.v, o = a.w, Object.freeze(a), this._edgeObjs[l] = a, Yt(this._preds[o], t), Yt(this._sucs[t], o), this._in[o][l] = a, this._out[t][l] = a, this._edgeCount++, this;
|
|
342
342
|
}
|
|
343
343
|
/**
|
|
@@ -345,7 +345,7 @@ class q {
|
|
|
345
345
|
* Complexity: O(1).
|
|
346
346
|
*/
|
|
347
347
|
edge(t, o, n) {
|
|
348
|
-
const s = arguments.length === 1 ? et(this._isDirected, arguments[0]) :
|
|
348
|
+
const s = arguments.length === 1 ? et(this._isDirected, arguments[0]) : Ce(this._isDirected, t, o, n);
|
|
349
349
|
return this._edgeLabels[s];
|
|
350
350
|
}
|
|
351
351
|
/**
|
|
@@ -361,7 +361,7 @@ class q {
|
|
|
361
361
|
* Complexity: O(1).
|
|
362
362
|
*/
|
|
363
363
|
hasEdge(t, o, n) {
|
|
364
|
-
const s = arguments.length === 1 ? et(this._isDirected, arguments[0]) :
|
|
364
|
+
const s = arguments.length === 1 ? et(this._isDirected, arguments[0]) : Ce(this._isDirected, t, o, n);
|
|
365
365
|
return Object.hasOwn(this._edgeLabels, s);
|
|
366
366
|
}
|
|
367
367
|
/**
|
|
@@ -369,7 +369,7 @@ class q {
|
|
|
369
369
|
* Complexity: O(1).
|
|
370
370
|
*/
|
|
371
371
|
removeEdge(t, o, n) {
|
|
372
|
-
const s = arguments.length === 1 ? et(this._isDirected, arguments[0]) :
|
|
372
|
+
const s = arguments.length === 1 ? et(this._isDirected, arguments[0]) : Ce(this._isDirected, t, o, n), i = this._edgeObjs[s];
|
|
373
373
|
return i && (t = i.v, o = i.w, delete this._edgeLabels[s], delete this._edgeObjs[s], Ht(this._preds[o], t), Ht(this._sucs[t], o), delete this._in[o][s], delete this._out[t][s], this._edgeCount--), this;
|
|
374
374
|
}
|
|
375
375
|
/**
|
|
@@ -413,15 +413,15 @@ function Yt(e, t) {
|
|
|
413
413
|
function Ht(e, t) {
|
|
414
414
|
--e[t] || delete e[t];
|
|
415
415
|
}
|
|
416
|
-
function
|
|
416
|
+
function Ce(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 + Wt + i + Wt + (n === void 0 ?
|
|
422
|
+
return s + Wt + i + Wt + (n === void 0 ? Nn : n);
|
|
423
423
|
}
|
|
424
|
-
function
|
|
424
|
+
function An(e, t, o, n) {
|
|
425
425
|
let s = "" + t, i = "" + o;
|
|
426
426
|
if (!e && s > i) {
|
|
427
427
|
const l = s;
|
|
@@ -431,9 +431,9 @@ function Nn(e, t, o, n) {
|
|
|
431
431
|
return n && (r.name = n), r;
|
|
432
432
|
}
|
|
433
433
|
function et(e, t) {
|
|
434
|
-
return
|
|
434
|
+
return Ce(e, t.v, t.w, t.name);
|
|
435
435
|
}
|
|
436
|
-
class
|
|
436
|
+
class Sn {
|
|
437
437
|
constructor() {
|
|
438
438
|
const t = {};
|
|
439
439
|
t._next = t._prev = t, this._sentinel = t;
|
|
@@ -451,25 +451,25 @@ class An {
|
|
|
451
451
|
const t = [], o = this._sentinel;
|
|
452
452
|
let n = o._prev;
|
|
453
453
|
for (; n !== o; )
|
|
454
|
-
t.push(JSON.stringify(n,
|
|
454
|
+
t.push(JSON.stringify(n, Ln)), n = n._prev;
|
|
455
455
|
return "[" + t.join(", ") + "]";
|
|
456
456
|
}
|
|
457
457
|
}
|
|
458
458
|
function Zt(e) {
|
|
459
459
|
e._prev._next = e._next, e._next._prev = e._prev, delete e._next, delete e._prev;
|
|
460
460
|
}
|
|
461
|
-
function
|
|
461
|
+
function Ln(e, t) {
|
|
462
462
|
if (e !== "_next" && e !== "_prev")
|
|
463
463
|
return t;
|
|
464
464
|
}
|
|
465
|
-
const
|
|
466
|
-
function
|
|
465
|
+
const On = () => 1;
|
|
466
|
+
function Tn(e, t) {
|
|
467
467
|
if (e.nodeCount() <= 1)
|
|
468
468
|
return [];
|
|
469
|
-
const o =
|
|
470
|
-
return
|
|
469
|
+
const o = Mn(e, t || On);
|
|
470
|
+
return Rn(o.graph, o.buckets, o.zeroIndex).flatMap((s) => e.outEdges(s.v, s.w));
|
|
471
471
|
}
|
|
472
|
-
function
|
|
472
|
+
function Rn(e, t, o) {
|
|
473
473
|
let n = [];
|
|
474
474
|
const s = t[t.length - 1], i = t[0];
|
|
475
475
|
let r;
|
|
@@ -498,8 +498,8 @@ function tt(e, t, o, n, s) {
|
|
|
498
498
|
a.in -= l, at(t, o, a);
|
|
499
499
|
}), e.removeNode(n.v), i;
|
|
500
500
|
}
|
|
501
|
-
function
|
|
502
|
-
const o = new
|
|
501
|
+
function Mn(e, t) {
|
|
502
|
+
const o = new K();
|
|
503
503
|
let n = 0, s = 0;
|
|
504
504
|
e.nodes().forEach((l) => {
|
|
505
505
|
o.setNode(l, { v: l, in: 0, out: 0 });
|
|
@@ -507,7 +507,7 @@ function Rn(e, t) {
|
|
|
507
507
|
const a = o.edge(l.v, l.w) || 0, c = t(l), d = a + c;
|
|
508
508
|
o.setEdge(l.v, l.w, d), s = Math.max(s, o.node(l.v).out += c), n = Math.max(n, o.node(l.w).in += c);
|
|
509
509
|
});
|
|
510
|
-
const i =
|
|
510
|
+
const i = $n(s + n + 3).map(() => new Sn()), r = n + 1;
|
|
511
511
|
return o.nodes().forEach((l) => {
|
|
512
512
|
at(i, r, o.node(l));
|
|
513
513
|
}), {
|
|
@@ -519,20 +519,20 @@ function Rn(e, t) {
|
|
|
519
519
|
function at(e, t, o) {
|
|
520
520
|
o.out ? o.in ? e[o.out - o.in + t].enqueue(o) : e[e.length - 1].enqueue(o) : e[0].enqueue(o);
|
|
521
521
|
}
|
|
522
|
-
function
|
|
522
|
+
function $n(e) {
|
|
523
523
|
const t = [];
|
|
524
524
|
for (let o = 0; o < e; o++)
|
|
525
525
|
t.push(o);
|
|
526
526
|
return t;
|
|
527
527
|
}
|
|
528
|
-
function
|
|
528
|
+
function de(e, t, o, n) {
|
|
529
529
|
let s = n;
|
|
530
530
|
for (; e.hasNode(s); )
|
|
531
531
|
s = Be(n);
|
|
532
532
|
return o.dummy = t, e.setNode(s, o), s;
|
|
533
533
|
}
|
|
534
|
-
function
|
|
535
|
-
const t = new
|
|
534
|
+
function lo(e) {
|
|
535
|
+
const t = new K().setGraph(e.graph());
|
|
536
536
|
return e.nodes().forEach((o) => {
|
|
537
537
|
t.setNode(o, e.node(o));
|
|
538
538
|
}), e.edges().forEach((o) => {
|
|
@@ -544,14 +544,14 @@ function io(e) {
|
|
|
544
544
|
}), t;
|
|
545
545
|
}
|
|
546
546
|
function ut(e) {
|
|
547
|
-
const t = new
|
|
547
|
+
const t = new K({ multigraph: e.isMultigraph() }).setGraph(e.graph());
|
|
548
548
|
return e.nodes().forEach((o) => {
|
|
549
549
|
e.children(o).length || t.setNode(o, e.node(o));
|
|
550
550
|
}), e.edges().forEach((o) => {
|
|
551
551
|
t.setEdge(o, e.edge(o));
|
|
552
552
|
}), t;
|
|
553
553
|
}
|
|
554
|
-
function
|
|
554
|
+
function Dn(e) {
|
|
555
555
|
const t = e.nodes().map((o) => {
|
|
556
556
|
const n = {};
|
|
557
557
|
return e.outEdges(o).forEach((s) => {
|
|
@@ -560,7 +560,7 @@ function $n(e) {
|
|
|
560
560
|
});
|
|
561
561
|
return Ve(e.nodes(), t);
|
|
562
562
|
}
|
|
563
|
-
function
|
|
563
|
+
function Fn(e) {
|
|
564
564
|
const t = e.nodes().map((o) => {
|
|
565
565
|
const n = {};
|
|
566
566
|
return e.inEdges(o).forEach((s) => {
|
|
@@ -578,25 +578,25 @@ function ct(e, t) {
|
|
|
578
578
|
let a, c;
|
|
579
579
|
return Math.abs(i) * r > Math.abs(s) * l ? (i < 0 && (l = -l), a = l * s / i, c = l) : (s < 0 && (r = -r), a = r, c = r * i / s), { x: o + a, y: n + c };
|
|
580
580
|
}
|
|
581
|
-
function
|
|
582
|
-
const t =
|
|
581
|
+
function Ne(e) {
|
|
582
|
+
const t = ue(dt(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 ao(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;
|
|
592
|
-
}), o =
|
|
592
|
+
}), o = j(Math.min, t);
|
|
593
593
|
e.nodes().forEach((n) => {
|
|
594
594
|
const s = e.node(n);
|
|
595
595
|
Object.hasOwn(s, "rank") && (s.rank -= o);
|
|
596
596
|
});
|
|
597
597
|
}
|
|
598
|
-
function
|
|
599
|
-
const t = e.nodes().map((r) => e.node(r).rank).filter((r) => r !== void 0), o =
|
|
598
|
+
function co(e) {
|
|
599
|
+
const t = e.nodes().map((r) => e.node(r).rank).filter((r) => r !== void 0), o = j(Math.min, t), n = [];
|
|
600
600
|
e.nodes().forEach((r) => {
|
|
601
601
|
const l = e.node(r).rank - o;
|
|
602
602
|
n[l] || (n[l] = []), n[l].push(r);
|
|
@@ -609,15 +609,15 @@ function ao(e) {
|
|
|
609
609
|
});
|
|
610
610
|
});
|
|
611
611
|
}
|
|
612
|
-
function
|
|
612
|
+
function Pn(e, t, o, n) {
|
|
613
613
|
const s = {
|
|
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), de(e, "border", s, t);
|
|
618
618
|
}
|
|
619
|
-
const
|
|
620
|
-
function
|
|
619
|
+
const uo = 65535;
|
|
620
|
+
function zn(e, t = uo) {
|
|
621
621
|
const o = [];
|
|
622
622
|
for (let n = 0; n < e.length; n += t) {
|
|
623
623
|
const s = e.slice(n, n + t);
|
|
@@ -625,9 +625,9 @@ function Pn(e, t = co) {
|
|
|
625
625
|
}
|
|
626
626
|
return o;
|
|
627
627
|
}
|
|
628
|
-
function
|
|
629
|
-
if (t.length >
|
|
630
|
-
const o =
|
|
628
|
+
function j(e, t) {
|
|
629
|
+
if (t.length > uo) {
|
|
630
|
+
const o = zn(t);
|
|
631
631
|
return e.apply(
|
|
632
632
|
null,
|
|
633
633
|
o.map((n) => e.apply(null, n))
|
|
@@ -640,15 +640,15 @@ function dt(e) {
|
|
|
640
640
|
const s = e.node(n).rank;
|
|
641
641
|
return s === void 0 ? Number.MIN_VALUE : s;
|
|
642
642
|
});
|
|
643
|
-
return
|
|
643
|
+
return j(Math.max, o);
|
|
644
644
|
}
|
|
645
|
-
function
|
|
645
|
+
function fo(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 ho(e, t) {
|
|
652
652
|
const o = Date.now();
|
|
653
653
|
try {
|
|
654
654
|
return t();
|
|
@@ -656,15 +656,15 @@ function fo(e, t) {
|
|
|
656
656
|
console.log(e + " time: " + (Date.now() - o) + "ms");
|
|
657
657
|
}
|
|
658
658
|
}
|
|
659
|
-
function
|
|
659
|
+
function mo(e, t) {
|
|
660
660
|
return t();
|
|
661
661
|
}
|
|
662
|
-
let
|
|
662
|
+
let Bn = 0;
|
|
663
663
|
function Be(e) {
|
|
664
|
-
const t = ++
|
|
664
|
+
const t = ++Bn;
|
|
665
665
|
return e + String(t);
|
|
666
666
|
}
|
|
667
|
-
function
|
|
667
|
+
function ue(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 ce(e, t, o = 1) {
|
|
|
673
673
|
s.push(i);
|
|
674
674
|
return s;
|
|
675
675
|
}
|
|
676
|
-
function
|
|
676
|
+
function _e(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 Ae(e, t) {
|
|
683
683
|
let o = t;
|
|
684
684
|
if (typeof t == "string") {
|
|
685
685
|
const n = t;
|
|
@@ -691,29 +691,29 @@ function Ve(e, t) {
|
|
|
691
691
|
return e.reduce((o, n, s) => (o[n] = t[s], o), {});
|
|
692
692
|
}
|
|
693
693
|
const ze = {
|
|
694
|
-
addBorderNode:
|
|
695
|
-
addDummyNode:
|
|
696
|
-
applyWithChunking:
|
|
694
|
+
addBorderNode: Pn,
|
|
695
|
+
addDummyNode: de,
|
|
696
|
+
applyWithChunking: j,
|
|
697
697
|
asNonCompoundGraph: ut,
|
|
698
|
-
buildLayerMatrix:
|
|
698
|
+
buildLayerMatrix: Ne,
|
|
699
699
|
intersectRect: ct,
|
|
700
|
-
mapValues:
|
|
700
|
+
mapValues: Ae,
|
|
701
701
|
maxRank: dt,
|
|
702
|
-
normalizeRanks:
|
|
703
|
-
notime:
|
|
704
|
-
partition:
|
|
705
|
-
pick:
|
|
706
|
-
predecessorWeights:
|
|
707
|
-
range:
|
|
708
|
-
removeEmptyRanks:
|
|
709
|
-
simplify:
|
|
710
|
-
successorWeights:
|
|
711
|
-
time:
|
|
702
|
+
normalizeRanks: ao,
|
|
703
|
+
notime: mo,
|
|
704
|
+
partition: fo,
|
|
705
|
+
pick: _e,
|
|
706
|
+
predecessorWeights: Fn,
|
|
707
|
+
range: ue,
|
|
708
|
+
removeEmptyRanks: co,
|
|
709
|
+
simplify: lo,
|
|
710
|
+
successorWeights: Dn,
|
|
711
|
+
time: ho,
|
|
712
712
|
uniqueId: Be,
|
|
713
713
|
zipObject: Ve
|
|
714
714
|
};
|
|
715
|
-
function
|
|
716
|
-
(e.graph().acyclicer === "greedy" ?
|
|
715
|
+
function Vn(e) {
|
|
716
|
+
(e.graph().acyclicer === "greedy" ? Tn(e, o(e)) : Gn(e)).forEach((n) => {
|
|
717
717
|
const s = e.edge(n);
|
|
718
718
|
e.removeEdge(n), s.forwardName = n.name, s.reversed = !0, e.setEdge(n.w, n.v, s, Be("rev"));
|
|
719
719
|
});
|
|
@@ -721,7 +721,7 @@ function Bn(e) {
|
|
|
721
721
|
return (s) => n.edge(s).weight;
|
|
722
722
|
}
|
|
723
723
|
}
|
|
724
|
-
function
|
|
724
|
+
function In(e) {
|
|
725
725
|
e.edges().forEach((t) => {
|
|
726
726
|
const o = e.edge(t);
|
|
727
727
|
if (o.reversed) {
|
|
@@ -731,7 +731,7 @@ function Vn(e) {
|
|
|
731
731
|
}
|
|
732
732
|
});
|
|
733
733
|
}
|
|
734
|
-
function
|
|
734
|
+
function Gn(e) {
|
|
735
735
|
const t = [], o = {}, n = {};
|
|
736
736
|
function s(i) {
|
|
737
737
|
Object.hasOwn(n, i) || (n[i] = !0, o[i] = !0, e.outEdges(i).forEach((r) => {
|
|
@@ -740,10 +740,10 @@ function In(e) {
|
|
|
740
740
|
}
|
|
741
741
|
return e.nodes().forEach(s), t;
|
|
742
742
|
}
|
|
743
|
-
function
|
|
744
|
-
e.graph().dummyChains = [], e.edges().forEach((t) =>
|
|
743
|
+
function jn(e) {
|
|
744
|
+
e.graph().dummyChains = [], e.edges().forEach((t) => Wn(e, t));
|
|
745
745
|
}
|
|
746
|
-
function
|
|
746
|
+
function Wn(e, t) {
|
|
747
747
|
let o = t.v, n = e.node(o).rank;
|
|
748
748
|
const s = t.w, i = e.node(s).rank, r = t.name, l = e.edge(t), a = l.labelRank;
|
|
749
749
|
if (i === n + 1)
|
|
@@ -757,10 +757,10 @@ function jn(e, t) {
|
|
|
757
757
|
edgeLabel: l,
|
|
758
758
|
edgeObj: t,
|
|
759
759
|
rank: n
|
|
760
|
-
}, c =
|
|
760
|
+
}, c = de(e, "edge", d, "_d"), n === a && (d.width = l.width, d.height = l.height, d.dummy = "edge-label", d.labelpos = l.labelpos), e.setEdge(o, c, { weight: l.weight }, r), f === 0 && e.graph().dummyChains.push(c), o = c;
|
|
761
761
|
e.setEdge(o, s, { weight: l.weight }, r);
|
|
762
762
|
}
|
|
763
|
-
function
|
|
763
|
+
function Yn(e) {
|
|
764
764
|
e.graph().dummyChains.forEach((t) => {
|
|
765
765
|
let o = e.node(t);
|
|
766
766
|
const n = o.edgeLabel;
|
|
@@ -770,7 +770,7 @@ function Wn(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 go(e) {
|
|
774
774
|
function t(o) {
|
|
775
775
|
const n = e.node(o);
|
|
776
776
|
if (n && Object.prototype.hasOwnProperty.call(n, "rank"))
|
|
@@ -784,17 +784,17 @@ function mo(e) {
|
|
|
784
784
|
const c = t(l.w), d = e.edge(l).minlen;
|
|
785
785
|
return c - d;
|
|
786
786
|
});
|
|
787
|
-
let r =
|
|
787
|
+
let r = j(Math.min, i);
|
|
788
788
|
return r === Number.POSITIVE_INFINITY && (r = 0), n && (n.rank = r), r;
|
|
789
789
|
}
|
|
790
790
|
(e.sources() || []).forEach(t);
|
|
791
791
|
}
|
|
792
|
-
function
|
|
792
|
+
function Hn(e, t) {
|
|
793
793
|
return e.node(t.w).rank - e.node(t.v).rank - e.edge(t).minlen;
|
|
794
794
|
}
|
|
795
|
-
function
|
|
796
|
-
|
|
797
|
-
const t = new
|
|
795
|
+
function Zn(e) {
|
|
796
|
+
Un(e);
|
|
797
|
+
const t = new K();
|
|
798
798
|
e.nodes().forEach((i) => {
|
|
799
799
|
t.setNode(i, {});
|
|
800
800
|
});
|
|
@@ -803,30 +803,30 @@ function Hn(e) {
|
|
|
803
803
|
return t;
|
|
804
804
|
const n = o[0], s = /* @__PURE__ */ new Set([n]);
|
|
805
805
|
for (; s.size < o.length; ) {
|
|
806
|
-
const i =
|
|
806
|
+
const i = Xn(e, s);
|
|
807
807
|
if (!i) {
|
|
808
808
|
const d = o.find((f) => !s.has(f));
|
|
809
809
|
s.add(d), t.setNode(d, {});
|
|
810
810
|
continue;
|
|
811
811
|
}
|
|
812
812
|
const { edgeObject: r, delta: l, attachFrom: a, attachTo: c } = i;
|
|
813
|
-
|
|
813
|
+
qn(e, s, a, l), t.setEdge(r.v, r.w, {}), s.add(c);
|
|
814
814
|
}
|
|
815
815
|
return t;
|
|
816
816
|
}
|
|
817
|
-
function
|
|
817
|
+
function Un(e) {
|
|
818
818
|
e.nodes().forEach((t) => {
|
|
819
819
|
const o = e.node(t) || {};
|
|
820
820
|
Object.prototype.hasOwnProperty.call(o, "rank") || (o.rank = 0, e.setNode(t, o));
|
|
821
821
|
});
|
|
822
822
|
}
|
|
823
|
-
function
|
|
823
|
+
function Xn(e, t) {
|
|
824
824
|
let o = null;
|
|
825
825
|
return e.edges().forEach((n) => {
|
|
826
826
|
const s = t.has(n.v), i = t.has(n.w);
|
|
827
827
|
if (s === i)
|
|
828
828
|
return;
|
|
829
|
-
const r =
|
|
829
|
+
const r = Hn(e, n), l = Math.abs(r);
|
|
830
830
|
if (!o || l < o.absoluteSlack) {
|
|
831
831
|
const a = s ? n.v : n.w, c = s ? n.w : n.v, d = s ? r : -r;
|
|
832
832
|
o = {
|
|
@@ -839,7 +839,7 @@ function Un(e, t) {
|
|
|
839
839
|
}
|
|
840
840
|
}), o;
|
|
841
841
|
}
|
|
842
|
-
function
|
|
842
|
+
function qn(e, t, o, n) {
|
|
843
843
|
n && e.nodes().forEach((s) => {
|
|
844
844
|
if (!t.has(s)) {
|
|
845
845
|
const i = e.node(s);
|
|
@@ -847,33 +847,33 @@ function Xn(e, t, o, n) {
|
|
|
847
847
|
}
|
|
848
848
|
});
|
|
849
849
|
}
|
|
850
|
-
function
|
|
851
|
-
const t =
|
|
852
|
-
return
|
|
850
|
+
function fe(e) {
|
|
851
|
+
const t = lo(e);
|
|
852
|
+
return go(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;
|
|
856
856
|
}
|
|
857
|
-
function qn(e, t) {
|
|
858
|
-
}
|
|
859
857
|
function Kn(e, t) {
|
|
860
858
|
}
|
|
861
|
-
function Jn(e, t
|
|
859
|
+
function Jn(e, t) {
|
|
860
|
+
}
|
|
861
|
+
function Qn(e, t, o) {
|
|
862
862
|
return 0;
|
|
863
863
|
}
|
|
864
|
-
function
|
|
864
|
+
function es(e) {
|
|
865
865
|
return null;
|
|
866
866
|
}
|
|
867
|
-
function
|
|
867
|
+
function ts(e, t) {
|
|
868
868
|
return null;
|
|
869
869
|
}
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
const
|
|
876
|
-
function
|
|
870
|
+
fe.initLowLimValues = Kn;
|
|
871
|
+
fe.initCutValues = Jn;
|
|
872
|
+
fe.calcCutValue = Qn;
|
|
873
|
+
fe.leaveEdge = es;
|
|
874
|
+
fe.enterEdge = ts;
|
|
875
|
+
const vo = go;
|
|
876
|
+
function os(e) {
|
|
877
877
|
const t = e.graph().ranker;
|
|
878
878
|
if (t instanceof Function)
|
|
879
879
|
return t(e);
|
|
@@ -882,10 +882,10 @@ function ts(e) {
|
|
|
882
882
|
Ut(e);
|
|
883
883
|
break;
|
|
884
884
|
case "tight-tree":
|
|
885
|
-
|
|
885
|
+
ss(e);
|
|
886
886
|
break;
|
|
887
887
|
case "longest-path":
|
|
888
|
-
|
|
888
|
+
ns(e);
|
|
889
889
|
break;
|
|
890
890
|
case "none":
|
|
891
891
|
break;
|
|
@@ -893,18 +893,18 @@ function ts(e) {
|
|
|
893
893
|
Ut(e);
|
|
894
894
|
}
|
|
895
895
|
}
|
|
896
|
-
const
|
|
897
|
-
function
|
|
898
|
-
|
|
896
|
+
const ns = vo;
|
|
897
|
+
function ss(e) {
|
|
898
|
+
vo(e), Zn(e);
|
|
899
899
|
}
|
|
900
900
|
function Ut(e) {
|
|
901
|
-
|
|
901
|
+
fe(e);
|
|
902
902
|
}
|
|
903
|
-
function
|
|
904
|
-
const t =
|
|
903
|
+
function rs(e) {
|
|
904
|
+
const t = ls(e);
|
|
905
905
|
e.graph().dummyChains.forEach((o) => {
|
|
906
906
|
let n = e.node(o);
|
|
907
|
-
const s = n.edgeObj, i =
|
|
907
|
+
const s = n.edgeObj, i = is(e, t, s.v, s.w), r = i.path, l = i.lca;
|
|
908
908
|
let a = 0, c = r[a], d = !0, f = o;
|
|
909
909
|
for (; f !== s.w; ) {
|
|
910
910
|
if (n = e.node(f), d) {
|
|
@@ -921,7 +921,7 @@ function ss(e) {
|
|
|
921
921
|
}
|
|
922
922
|
});
|
|
923
923
|
}
|
|
924
|
-
function
|
|
924
|
+
function is(e, t, o, n) {
|
|
925
925
|
const s = [], i = [], r = Math.min(t[o].low, t[n].low), l = Math.max(t[o].lim, t[n].lim);
|
|
926
926
|
let a, c;
|
|
927
927
|
a = o;
|
|
@@ -935,7 +935,7 @@ function rs(e, t, o, n) {
|
|
|
935
935
|
lca: c
|
|
936
936
|
};
|
|
937
937
|
}
|
|
938
|
-
function
|
|
938
|
+
function ls(e) {
|
|
939
939
|
const t = {};
|
|
940
940
|
let o = 0;
|
|
941
941
|
function n(s) {
|
|
@@ -944,17 +944,17 @@ function is(e) {
|
|
|
944
944
|
}
|
|
945
945
|
return e.children().forEach(n), t;
|
|
946
946
|
}
|
|
947
|
-
function
|
|
948
|
-
const t = ze.addDummyNode(e, "root", {}, "_root"), o =
|
|
947
|
+
function as(e) {
|
|
948
|
+
const t = ze.addDummyNode(e, "root", {}, "_root"), o = cs(e), n = Object.values(o), s = ze.applyWithChunking(Math.max, n) - 1, i = 2 * s + 1;
|
|
949
949
|
e.graph().nestingRoot = t, e.edges().forEach((l) => {
|
|
950
950
|
e.edge(l).minlen *= i;
|
|
951
951
|
});
|
|
952
|
-
const r =
|
|
952
|
+
const r = us(e) + 1;
|
|
953
953
|
e.children().forEach((l) => {
|
|
954
|
-
|
|
954
|
+
bo(e, t, i, r, s, o, l);
|
|
955
955
|
}), e.graph().nodeRankFactor = i;
|
|
956
956
|
}
|
|
957
|
-
function
|
|
957
|
+
function bo(e, t, o, n, s, i, r) {
|
|
958
958
|
const l = e.children(r);
|
|
959
959
|
if (!l.length) {
|
|
960
960
|
r !== t && e.setEdge(t, r, { weight: 0, minlen: o });
|
|
@@ -962,7 +962,7 @@ function vo(e, t, o, n, s, i, r) {
|
|
|
962
962
|
}
|
|
963
963
|
const a = ze.addBorderNode(e, "_bt"), c = ze.addBorderNode(e, "_bb"), d = e.node(r);
|
|
964
964
|
e.setParent(a, r), d.borderTop = a, e.setParent(c, r), d.borderBottom = c, l.forEach((f) => {
|
|
965
|
-
|
|
965
|
+
bo(e, t, o, n, s, i, f);
|
|
966
966
|
const g = e.node(f), b = g.borderTop ? g.borderTop : f, N = g.borderBottom ? g.borderBottom : f, x = g.borderTop ? n : 2 * n, T = b !== N ? 1 : s - i[r] + 1;
|
|
967
967
|
e.setEdge(a, b, {
|
|
968
968
|
weight: x,
|
|
@@ -978,7 +978,7 @@ function vo(e, t, o, n, s, i, r) {
|
|
|
978
978
|
minlen: s + i[r]
|
|
979
979
|
});
|
|
980
980
|
}
|
|
981
|
-
function
|
|
981
|
+
function cs(e) {
|
|
982
982
|
const t = {};
|
|
983
983
|
function o(n, s) {
|
|
984
984
|
const i = e.children(n);
|
|
@@ -986,16 +986,16 @@ function as(e) {
|
|
|
986
986
|
}
|
|
987
987
|
return e.children().forEach((n) => o(n, 1)), t;
|
|
988
988
|
}
|
|
989
|
-
function
|
|
989
|
+
function us(e) {
|
|
990
990
|
return e.edges().reduce((t, o) => t + e.edge(o).weight, 0);
|
|
991
991
|
}
|
|
992
|
-
function
|
|
992
|
+
function ds(e) {
|
|
993
993
|
const t = e.graph();
|
|
994
994
|
e.removeNode(t.nestingRoot), delete t.nestingRoot, e.edges().forEach((o) => {
|
|
995
995
|
e.edge(o).nestingEdge && e.removeEdge(o);
|
|
996
996
|
});
|
|
997
997
|
}
|
|
998
|
-
function
|
|
998
|
+
function fs(e) {
|
|
999
999
|
function t(o) {
|
|
1000
1000
|
const n = e.children(o), s = e.node(o);
|
|
1001
1001
|
if (n.length && n.forEach(t), Object.hasOwn(s, "minRank")) {
|
|
@@ -1012,18 +1012,18 @@ function Xt(e, t, o, n, s, i) {
|
|
|
1012
1012
|
height: 0,
|
|
1013
1013
|
rank: i,
|
|
1014
1014
|
borderType: t
|
|
1015
|
-
}, l = s[t][i - 1], a =
|
|
1015
|
+
}, l = s[t][i - 1], a = de(e, "border", r, o);
|
|
1016
1016
|
s[t][i] = a, e.setParent(a, n), l && e.setEdge(l, a, { weight: 1 });
|
|
1017
1017
|
}
|
|
1018
|
-
function
|
|
1018
|
+
function hs(e) {
|
|
1019
1019
|
const t = e.graph().rankdir.toLowerCase();
|
|
1020
|
-
(t === "lr" || t === "rl") &&
|
|
1020
|
+
(t === "lr" || t === "rl") && po(e);
|
|
1021
1021
|
}
|
|
1022
|
-
function
|
|
1022
|
+
function ms(e) {
|
|
1023
1023
|
const t = e.graph().rankdir.toLowerCase();
|
|
1024
|
-
(t === "bt" || t === "rl") &&
|
|
1024
|
+
(t === "bt" || t === "rl") && gs(e), (t === "lr" || t === "rl") && (vs(e), po(e));
|
|
1025
1025
|
}
|
|
1026
|
-
function
|
|
1026
|
+
function po(e) {
|
|
1027
1027
|
e.nodes().forEach((t) => {
|
|
1028
1028
|
qt(e.node(t));
|
|
1029
1029
|
}), e.edges().forEach((t) => {
|
|
@@ -1034,7 +1034,7 @@ function qt(e) {
|
|
|
1034
1034
|
const t = e.width;
|
|
1035
1035
|
e.width = e.height, e.height = t;
|
|
1036
1036
|
}
|
|
1037
|
-
function
|
|
1037
|
+
function gs(e) {
|
|
1038
1038
|
e.nodes().forEach((t) => {
|
|
1039
1039
|
ot(e.node(t));
|
|
1040
1040
|
}), e.edges().forEach((t) => {
|
|
@@ -1045,7 +1045,7 @@ function ms(e) {
|
|
|
1045
1045
|
function ot(e) {
|
|
1046
1046
|
e.y = -e.y;
|
|
1047
1047
|
}
|
|
1048
|
-
function
|
|
1048
|
+
function vs(e) {
|
|
1049
1049
|
e.nodes().forEach((t) => {
|
|
1050
1050
|
nt(e.node(t));
|
|
1051
1051
|
}), e.edges().forEach((t) => {
|
|
@@ -1058,11 +1058,11 @@ function nt(e) {
|
|
|
1058
1058
|
e.x = e.y, e.y = t;
|
|
1059
1059
|
}
|
|
1060
1060
|
const Kt = {
|
|
1061
|
-
adjust:
|
|
1062
|
-
undo:
|
|
1061
|
+
adjust: hs,
|
|
1062
|
+
undo: ms
|
|
1063
1063
|
};
|
|
1064
|
-
function
|
|
1065
|
-
const t = {}, o = e.nodes().filter((a) => e.children(a).length === 0), n = o.map((a) => e.node(a).rank), s =
|
|
1064
|
+
function bs(e) {
|
|
1065
|
+
const t = {}, o = e.nodes().filter((a) => e.children(a).length === 0), n = o.map((a) => e.node(a).rank), s = j(Math.max, n), i = ue(s + 1).map(() => []);
|
|
1066
1066
|
function r(a) {
|
|
1067
1067
|
if (t[a]) return;
|
|
1068
1068
|
t[a] = !0;
|
|
@@ -1073,13 +1073,13 @@ function vs(e) {
|
|
|
1073
1073
|
(a, c) => e.node(a).rank - e.node(c).rank
|
|
1074
1074
|
).forEach(r), i;
|
|
1075
1075
|
}
|
|
1076
|
-
function
|
|
1076
|
+
function ps(e, t) {
|
|
1077
1077
|
let o = 0;
|
|
1078
1078
|
for (let n = 1; n < t.length; ++n)
|
|
1079
|
-
o +=
|
|
1079
|
+
o += ws(e, t[n - 1], t[n]);
|
|
1080
1080
|
return o;
|
|
1081
1081
|
}
|
|
1082
|
-
function
|
|
1082
|
+
function ws(e, t, o) {
|
|
1083
1083
|
const n = Ve(
|
|
1084
1084
|
o,
|
|
1085
1085
|
o.map((c, d) => d)
|
|
@@ -1102,7 +1102,7 @@ function ps(e, t, o) {
|
|
|
1102
1102
|
a += c.weight * f;
|
|
1103
1103
|
}), a;
|
|
1104
1104
|
}
|
|
1105
|
-
function
|
|
1105
|
+
function ys(e, t = []) {
|
|
1106
1106
|
return t.map((o) => {
|
|
1107
1107
|
const n = e.inEdges(o);
|
|
1108
1108
|
if (!n.length)
|
|
@@ -1124,7 +1124,7 @@ function ws(e, t = []) {
|
|
|
1124
1124
|
};
|
|
1125
1125
|
});
|
|
1126
1126
|
}
|
|
1127
|
-
function
|
|
1127
|
+
function ks(e, t) {
|
|
1128
1128
|
const o = {};
|
|
1129
1129
|
e.forEach((s, i) => {
|
|
1130
1130
|
const r = o[s.v] = {
|
|
@@ -1140,13 +1140,13 @@ function ys(e, t) {
|
|
|
1140
1140
|
i !== void 0 && r !== void 0 && (r.indegree++, i.out.push(r));
|
|
1141
1141
|
});
|
|
1142
1142
|
const n = Object.values(o).filter((s) => !s.indegree);
|
|
1143
|
-
return
|
|
1143
|
+
return Es(n);
|
|
1144
1144
|
}
|
|
1145
|
-
function
|
|
1145
|
+
function Es(e) {
|
|
1146
1146
|
const t = [];
|
|
1147
1147
|
function o(s) {
|
|
1148
1148
|
return (i) => {
|
|
1149
|
-
i.merged || (i.barycenter === void 0 || s.barycenter === void 0 || i.barycenter >= s.barycenter) &&
|
|
1149
|
+
i.merged || (i.barycenter === void 0 || s.barycenter === void 0 || i.barycenter >= s.barycenter) && Cs(s, i);
|
|
1150
1150
|
};
|
|
1151
1151
|
}
|
|
1152
1152
|
function n(s) {
|
|
@@ -1158,16 +1158,16 @@ function ks(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) => _e(s, ["vs", "i", "barycenter", "weight"]));
|
|
1162
1162
|
}
|
|
1163
|
-
function
|
|
1163
|
+
function Cs(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
|
-
function
|
|
1168
|
-
const o =
|
|
1167
|
+
function xs(e, t) {
|
|
1168
|
+
const o = fo(e, (d) => Object.hasOwn(d, "barycenter")), n = o.lhs, s = o.rhs.sort((d, f) => f.i - d.i), i = [];
|
|
1169
1169
|
let r = 0, l = 0, a = 0;
|
|
1170
|
-
n.sort(
|
|
1170
|
+
n.sort(_s(!!t)), a = Jt(i, s, a), n.forEach((d) => {
|
|
1171
1171
|
a += d.vs.length, i.push(d.vs), r += d.barycenter * d.weight, l += d.weight, a = Jt(i, s, a);
|
|
1172
1172
|
});
|
|
1173
1173
|
const c = { vs: i.flat(!0) };
|
|
@@ -1179,40 +1179,40 @@ function Jt(e, t, o) {
|
|
|
1179
1179
|
t.pop(), e.push(n.vs), o++;
|
|
1180
1180
|
return o;
|
|
1181
1181
|
}
|
|
1182
|
-
function
|
|
1182
|
+
function _s(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 wo(e, t, o, n) {
|
|
1186
1186
|
let s = e.children(t);
|
|
1187
1187
|
const i = e.node(t), r = i ? i.borderLeft : void 0, l = i ? i.borderRight : void 0, a = {};
|
|
1188
1188
|
r && (s = s.filter((g) => g !== r && g !== l));
|
|
1189
|
-
const c =
|
|
1189
|
+
const c = ys(e, s);
|
|
1190
1190
|
c.forEach((g) => {
|
|
1191
1191
|
if (e.children(g.v).length) {
|
|
1192
|
-
const b =
|
|
1193
|
-
a[g.v] = b, Object.hasOwn(b, "barycenter") &&
|
|
1192
|
+
const b = wo(e, g.v, o, n);
|
|
1193
|
+
a[g.v] = b, Object.hasOwn(b, "barycenter") && As(g, b);
|
|
1194
1194
|
}
|
|
1195
1195
|
});
|
|
1196
|
-
let d =
|
|
1197
|
-
|
|
1198
|
-
const f =
|
|
1196
|
+
let d = ks(c, o);
|
|
1197
|
+
Ns(d, a);
|
|
1198
|
+
const f = xs(d, n);
|
|
1199
1199
|
if (r && (f.vs = [r, f.vs, l].flat(!0), e.predecessors(r).length)) {
|
|
1200
1200
|
const g = e.node(e.predecessors(r)[0]), b = e.node(e.predecessors(l)[0]);
|
|
1201
1201
|
Object.hasOwn(f, "barycenter") || (f.barycenter = 0, f.weight = 0), f.barycenter = (f.barycenter * f.weight + g.order + b.order) / (f.weight + 2), f.weight += 2;
|
|
1202
1202
|
}
|
|
1203
1203
|
return f;
|
|
1204
1204
|
}
|
|
1205
|
-
function
|
|
1205
|
+
function Ns(e, t) {
|
|
1206
1206
|
e.forEach((o) => {
|
|
1207
1207
|
o.vs = o.vs.flatMap((n) => t[n] ? t[n].vs : n);
|
|
1208
1208
|
});
|
|
1209
1209
|
}
|
|
1210
|
-
function
|
|
1210
|
+
function As(e, t) {
|
|
1211
1211
|
e.barycenter !== void 0 ? (e.barycenter = (e.barycenter * e.weight + t.barycenter * t.weight) / (e.weight + t.weight), e.weight += t.weight) : (e.barycenter = t.barycenter, e.weight = t.weight);
|
|
1212
1212
|
}
|
|
1213
|
-
function
|
|
1213
|
+
function Ss(e, t, o, n) {
|
|
1214
1214
|
n || (n = e.nodes());
|
|
1215
|
-
const s =
|
|
1215
|
+
const s = Ls(e), i = new K({ compound: !0 }).setGraph({ root: s }).setDefaultNodeLabel((r) => e.node(r));
|
|
1216
1216
|
return n.forEach((r) => {
|
|
1217
1217
|
const l = e.node(r), a = e.parent(r);
|
|
1218
1218
|
(l.rank === t || l.minRank <= t && t <= l.maxRank) && (i.setNode(r), i.setParent(r, a || s), e[o](r).forEach((d) => {
|
|
@@ -1226,12 +1226,12 @@ function As(e, t, o, n) {
|
|
|
1226
1226
|
}));
|
|
1227
1227
|
}), i;
|
|
1228
1228
|
}
|
|
1229
|
-
function
|
|
1229
|
+
function Ls(e) {
|
|
1230
1230
|
let t;
|
|
1231
1231
|
for (; e.hasNode(t = Be("_root")); ) ;
|
|
1232
1232
|
return t;
|
|
1233
1233
|
}
|
|
1234
|
-
function
|
|
1234
|
+
function Os(e, t, o) {
|
|
1235
1235
|
let n = {}, s;
|
|
1236
1236
|
o.forEach((i) => {
|
|
1237
1237
|
let r = e.parent(i), l, a;
|
|
@@ -1244,29 +1244,29 @@ function Ls(e, t, o) {
|
|
|
1244
1244
|
}
|
|
1245
1245
|
});
|
|
1246
1246
|
}
|
|
1247
|
-
function
|
|
1247
|
+
function yo(e, t = {}) {
|
|
1248
1248
|
if (typeof t.customOrder == "function") {
|
|
1249
|
-
t.customOrder(e,
|
|
1249
|
+
t.customOrder(e, yo);
|
|
1250
1250
|
return;
|
|
1251
1251
|
}
|
|
1252
1252
|
const o = dt(e), n = Qt(
|
|
1253
1253
|
e,
|
|
1254
|
-
|
|
1254
|
+
ue(1, o + 1),
|
|
1255
1255
|
"inEdges"
|
|
1256
1256
|
), s = Qt(
|
|
1257
1257
|
e,
|
|
1258
|
-
|
|
1258
|
+
ue(o - 1, -1, -1),
|
|
1259
1259
|
"outEdges"
|
|
1260
1260
|
);
|
|
1261
|
-
let i =
|
|
1261
|
+
let i = bs(e);
|
|
1262
1262
|
if (eo(e, i), t.disableOptimalOrderHeuristic)
|
|
1263
1263
|
return;
|
|
1264
1264
|
let r = Number.POSITIVE_INFINITY, l;
|
|
1265
1265
|
const a = t.constraints || [];
|
|
1266
1266
|
for (let c = 0, d = 0; d < 4; ++c, ++d) {
|
|
1267
1267
|
const f = c % 2 === 0 ? n : s, g = c % 4 >= 2;
|
|
1268
|
-
|
|
1269
|
-
const b =
|
|
1268
|
+
Ts(f, g, a), i = Ne(e);
|
|
1269
|
+
const b = ps(e, i);
|
|
1270
1270
|
b < r ? (r = b, d = 0, l = structuredClone(i)) : b === r && (l = structuredClone(i));
|
|
1271
1271
|
}
|
|
1272
1272
|
eo(e, l);
|
|
@@ -1283,7 +1283,7 @@ function Qt(e, t, o) {
|
|
|
1283
1283
|
l !== r.rank && s(l, i);
|
|
1284
1284
|
}
|
|
1285
1285
|
return t.map(
|
|
1286
|
-
(i) =>
|
|
1286
|
+
(i) => Ss(
|
|
1287
1287
|
e,
|
|
1288
1288
|
i,
|
|
1289
1289
|
o,
|
|
@@ -1291,14 +1291,14 @@ function Qt(e, t, o) {
|
|
|
1291
1291
|
)
|
|
1292
1292
|
);
|
|
1293
1293
|
}
|
|
1294
|
-
function
|
|
1295
|
-
const n = new
|
|
1294
|
+
function Ts(e, t, o) {
|
|
1295
|
+
const n = new K();
|
|
1296
1296
|
e.forEach((s) => {
|
|
1297
1297
|
o.forEach((l) => n.setEdge(l.left, l.right));
|
|
1298
|
-
const i = s.graph().root, r =
|
|
1298
|
+
const i = s.graph().root, r = wo(s, i, n, t);
|
|
1299
1299
|
r.vs.forEach((l, a) => {
|
|
1300
1300
|
s.node(l).order = a;
|
|
1301
|
-
}),
|
|
1301
|
+
}), Os(s, n, r.vs);
|
|
1302
1302
|
});
|
|
1303
1303
|
}
|
|
1304
1304
|
function eo(e, t) {
|
|
@@ -1308,31 +1308,31 @@ function eo(e, t) {
|
|
|
1308
1308
|
});
|
|
1309
1309
|
});
|
|
1310
1310
|
}
|
|
1311
|
-
function
|
|
1311
|
+
function Rs(e, t) {
|
|
1312
1312
|
const o = {};
|
|
1313
1313
|
function n(s, i) {
|
|
1314
1314
|
let r = 0, l = 0;
|
|
1315
1315
|
const a = s.length, c = i[i.length - 1];
|
|
1316
1316
|
return i.forEach((d, f) => {
|
|
1317
|
-
const g =
|
|
1317
|
+
const g = $s(e, d), b = g ? e.node(g).order : a;
|
|
1318
1318
|
(g || d === c) && (i.slice(l, f + 1).forEach((N) => {
|
|
1319
1319
|
e.predecessors(N).forEach((x) => {
|
|
1320
|
-
const T = e.node(x),
|
|
1321
|
-
(
|
|
1320
|
+
const T = e.node(x), Y = T.order;
|
|
1321
|
+
(Y < r || b < Y) && !(T.dummy && e.node(N).dummy) && ko(o, x, N);
|
|
1322
1322
|
});
|
|
1323
1323
|
}), l = f + 1, r = b);
|
|
1324
1324
|
}), i;
|
|
1325
1325
|
}
|
|
1326
1326
|
return t.length && t.reduce(n), o;
|
|
1327
1327
|
}
|
|
1328
|
-
function
|
|
1328
|
+
function Ms(e, t) {
|
|
1329
1329
|
const o = {};
|
|
1330
1330
|
function n(i, r, l, a, c) {
|
|
1331
1331
|
let d;
|
|
1332
|
-
|
|
1332
|
+
ue(r, l).forEach((f) => {
|
|
1333
1333
|
d = i[f], e.node(d).dummy && e.predecessors(d).forEach((g) => {
|
|
1334
1334
|
const b = e.node(g);
|
|
1335
|
-
b.dummy && (b.order < a || b.order > c) &&
|
|
1335
|
+
b.dummy && (b.order < a || b.order > c) && ko(o, g, d);
|
|
1336
1336
|
});
|
|
1337
1337
|
});
|
|
1338
1338
|
}
|
|
@@ -1348,11 +1348,11 @@ function Rs(e, t) {
|
|
|
1348
1348
|
}
|
|
1349
1349
|
return t.length && t.reduce(s), o;
|
|
1350
1350
|
}
|
|
1351
|
-
function
|
|
1351
|
+
function $s(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 ko(e, t, o) {
|
|
1356
1356
|
if (t > o) {
|
|
1357
1357
|
const s = t;
|
|
1358
1358
|
t = o, o = s;
|
|
@@ -1360,14 +1360,14 @@ function yo(e, t, o) {
|
|
|
1360
1360
|
let n = e[t];
|
|
1361
1361
|
n || (e[t] = n = {}), n[o] = !0;
|
|
1362
1362
|
}
|
|
1363
|
-
function
|
|
1363
|
+
function Ds(e, t, o) {
|
|
1364
1364
|
if (t > o) {
|
|
1365
1365
|
const n = t;
|
|
1366
1366
|
t = o, o = n;
|
|
1367
1367
|
}
|
|
1368
1368
|
return !!e[t] && Object.hasOwn(e[t], o);
|
|
1369
1369
|
}
|
|
1370
|
-
function
|
|
1370
|
+
function Fs(e, t, o, n) {
|
|
1371
1371
|
const s = {}, i = {}, r = {};
|
|
1372
1372
|
return t.forEach((l) => {
|
|
1373
1373
|
l.forEach((a, c) => {
|
|
@@ -1382,14 +1382,14 @@ function Ds(e, t, o, n) {
|
|
|
1382
1382
|
const f = (d.length - 1) / 2;
|
|
1383
1383
|
for (let g = Math.floor(f), b = Math.ceil(f); g <= b; ++g) {
|
|
1384
1384
|
const N = d[g];
|
|
1385
|
-
i[c] === c && a < r[N] &&
|
|
1385
|
+
i[c] === c && a < r[N] && !Ds(o, c, N) && (i[N] = c, i[c] = s[c] = s[N], a = r[N]);
|
|
1386
1386
|
}
|
|
1387
1387
|
}
|
|
1388
1388
|
});
|
|
1389
1389
|
}), { root: s, align: i };
|
|
1390
1390
|
}
|
|
1391
|
-
function
|
|
1392
|
-
const i = {}, r =
|
|
1391
|
+
function Ps(e, t, o, n, s) {
|
|
1392
|
+
const i = {}, r = zs(e, t, o, s), l = s ? "borderLeft" : "borderRight";
|
|
1393
1393
|
function a(f, g) {
|
|
1394
1394
|
const b = r.nodes().slice(), N = {};
|
|
1395
1395
|
let x = b.pop();
|
|
@@ -1415,8 +1415,8 @@ function Fs(e, t, o, n, s) {
|
|
|
1415
1415
|
i[f] = i[o[f]];
|
|
1416
1416
|
}), i;
|
|
1417
1417
|
}
|
|
1418
|
-
function
|
|
1419
|
-
const s = new e.constructor(), i = e.graph(), r =
|
|
1418
|
+
function zs(e, t, o, n) {
|
|
1419
|
+
const s = new e.constructor(), i = e.graph(), r = js(i.nodesep, i.edgesep, n);
|
|
1420
1420
|
return t.forEach((l) => {
|
|
1421
1421
|
let a;
|
|
1422
1422
|
l.forEach((c) => {
|
|
@@ -1433,12 +1433,12 @@ function Ps(e, t, o, n) {
|
|
|
1433
1433
|
});
|
|
1434
1434
|
}), s;
|
|
1435
1435
|
}
|
|
1436
|
-
function
|
|
1436
|
+
function Bs(e, t) {
|
|
1437
1437
|
return Object.values(t).reduce(
|
|
1438
1438
|
(o, n) => {
|
|
1439
1439
|
let s = Number.NEGATIVE_INFINITY, i = Number.POSITIVE_INFINITY;
|
|
1440
1440
|
Object.entries(n).forEach(([l, a]) => {
|
|
1441
|
-
const c =
|
|
1441
|
+
const c = Ws(e, l) / 2;
|
|
1442
1442
|
s = Math.max(a + c, s), i = Math.min(a - c, i);
|
|
1443
1443
|
});
|
|
1444
1444
|
const r = s - i;
|
|
@@ -1447,31 +1447,31 @@ function zs(e, t) {
|
|
|
1447
1447
|
[Number.POSITIVE_INFINITY, null]
|
|
1448
1448
|
)[1];
|
|
1449
1449
|
}
|
|
1450
|
-
function
|
|
1451
|
-
const o = Object.values(t), n =
|
|
1450
|
+
function Vs(e, t) {
|
|
1451
|
+
const o = Object.values(t), n = j(Math.min, o), s = j(Math.max, o);
|
|
1452
1452
|
["u", "d"].forEach((i) => {
|
|
1453
1453
|
["l", "r"].forEach((r) => {
|
|
1454
1454
|
const l = i + r;
|
|
1455
1455
|
let a = e[l];
|
|
1456
1456
|
if (a === t) return;
|
|
1457
1457
|
const c = Object.values(a);
|
|
1458
|
-
let d = n -
|
|
1459
|
-
r !== "l" && (d = s -
|
|
1458
|
+
let d = n - j(Math.min, c);
|
|
1459
|
+
r !== "l" && (d = s - j(Math.max, c)), d && (a = Ae(a, (f) => f + d), e[l] = a);
|
|
1460
1460
|
});
|
|
1461
1461
|
});
|
|
1462
1462
|
}
|
|
1463
|
-
function
|
|
1464
|
-
return
|
|
1463
|
+
function Is(e, t) {
|
|
1464
|
+
return Ae(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);
|
|
1468
1468
|
return (s[1] + s[2]) / 2;
|
|
1469
1469
|
});
|
|
1470
1470
|
}
|
|
1471
|
-
function
|
|
1472
|
-
const t =
|
|
1473
|
-
|
|
1474
|
-
|
|
1471
|
+
function Gs(e) {
|
|
1472
|
+
const t = Ne(e), o = Object.assign(
|
|
1473
|
+
Rs(e, t),
|
|
1474
|
+
Ms(e, t)
|
|
1475
1475
|
), n = {};
|
|
1476
1476
|
let s;
|
|
1477
1477
|
["u", "d"].forEach((r) => {
|
|
@@ -1480,26 +1480,26 @@ function Is(e) {
|
|
|
1480
1480
|
l === "r" && (a = a.map(
|
|
1481
1481
|
(g) => Object.values(g).reverse()
|
|
1482
1482
|
));
|
|
1483
|
-
const c = (r === "u" ? e.predecessors : e.successors).bind(e), d =
|
|
1483
|
+
const c = (r === "u" ? e.predecessors : e.successors).bind(e), d = Fs(
|
|
1484
1484
|
e,
|
|
1485
1485
|
a,
|
|
1486
1486
|
o,
|
|
1487
1487
|
c
|
|
1488
1488
|
);
|
|
1489
|
-
let f =
|
|
1489
|
+
let f = Ps(
|
|
1490
1490
|
e,
|
|
1491
1491
|
a,
|
|
1492
1492
|
d.root,
|
|
1493
1493
|
d.align,
|
|
1494
1494
|
l === "r"
|
|
1495
1495
|
);
|
|
1496
|
-
l === "r" && (f =
|
|
1496
|
+
l === "r" && (f = Ae(f, (g) => -g)), n[r + l] = f;
|
|
1497
1497
|
});
|
|
1498
1498
|
});
|
|
1499
|
-
const i =
|
|
1500
|
-
return
|
|
1499
|
+
const i = Bs(e, n);
|
|
1500
|
+
return Vs(n, i), Is(n, e.graph().align);
|
|
1501
1501
|
}
|
|
1502
|
-
function
|
|
1502
|
+
function js(e, t, o) {
|
|
1503
1503
|
return (n, s, i) => {
|
|
1504
1504
|
const r = n.node(s), l = n.node(i);
|
|
1505
1505
|
let a = 0, c;
|
|
@@ -1524,19 +1524,19 @@ function Gs(e, t, o) {
|
|
|
1524
1524
|
return c && (a += o ? c : -c), c = 0, a;
|
|
1525
1525
|
};
|
|
1526
1526
|
}
|
|
1527
|
-
function
|
|
1527
|
+
function Ws(e, t) {
|
|
1528
1528
|
return e.node(t).width;
|
|
1529
1529
|
}
|
|
1530
|
-
function
|
|
1530
|
+
function Ys(e) {
|
|
1531
1531
|
const t = ut(e);
|
|
1532
|
-
|
|
1533
|
-
const o =
|
|
1532
|
+
Hs(t);
|
|
1533
|
+
const o = Gs(t);
|
|
1534
1534
|
Object.entries(o).forEach(([n, s]) => {
|
|
1535
1535
|
e.node(n).x = s;
|
|
1536
1536
|
});
|
|
1537
1537
|
}
|
|
1538
|
-
function
|
|
1539
|
-
const t =
|
|
1538
|
+
function Hs(e) {
|
|
1539
|
+
const t = Ne(e), o = e.graph().ranksep;
|
|
1540
1540
|
let n = 0;
|
|
1541
1541
|
t.forEach((s) => {
|
|
1542
1542
|
const i = s.reduce((r, l) => {
|
|
@@ -1548,17 +1548,17 @@ function Ys(e) {
|
|
|
1548
1548
|
}), n += i + o;
|
|
1549
1549
|
});
|
|
1550
1550
|
}
|
|
1551
|
-
function
|
|
1552
|
-
const o = t.debugTiming ?
|
|
1551
|
+
function Zs(e, t = {}) {
|
|
1552
|
+
const o = t.debugTiming ? ho : mo;
|
|
1553
1553
|
return o("layout", () => {
|
|
1554
|
-
const n = o(" buildLayoutGraph", () =>
|
|
1555
|
-
return o(" runLayout", () =>
|
|
1554
|
+
const n = o(" buildLayoutGraph", () => nr(e));
|
|
1555
|
+
return o(" runLayout", () => Us(n, o, t)), o(" updateInputGraph", () => Xs(e, n)), n;
|
|
1556
1556
|
});
|
|
1557
1557
|
}
|
|
1558
|
-
function
|
|
1559
|
-
t(" makeSpaceForEdgeLabels", () =>
|
|
1558
|
+
function Us(e, t, o) {
|
|
1559
|
+
t(" makeSpaceForEdgeLabels", () => sr(e)), t(" removeSelfEdges", () => hr(e)), t(" acyclic", () => Vn(e)), t(" nestingGraph.run", () => as(e)), t(" rank", () => os(ut(e))), t(" injectEdgeLabelProxies", () => rr(e)), t(" removeEmptyRanks", () => co(e)), t(" nestingGraph.cleanup", () => ds(e)), t(" normalizeRanks", () => ao(e)), t(" assignRankMinMax", () => ir(e)), t(" removeEdgeLabelProxies", () => lr(e)), t(" normalize.run", () => jn(e)), t(" parentDummyChains", () => rs(e)), t(" addBorderSegments", () => fs(e)), t(" order", () => yo(e, o)), t(" insertSelfEdges", () => mr(e)), t(" adjustCoordinateSystem", () => Kt.adjust(e)), t(" position", () => Ys(e)), t(" positionSelfEdges", () => gr(e)), t(" removeBorderNodes", () => fr(e)), t(" normalize.undo", () => Yn(e)), t(" fixupEdgeLabelCoords", () => ur(e)), t(" undoCoordinateSystem", () => Kt.undo(e)), t(" translateGraph", () => ar(e)), t(" assignNodeIntersects", () => cr(e)), t(" reversePoints", () => dr(e)), t(" acyclic.undo", () => In(e));
|
|
1560
1560
|
}
|
|
1561
|
-
function
|
|
1561
|
+
function Xs(e, t) {
|
|
1562
1562
|
e.nodes().forEach((s) => {
|
|
1563
1563
|
const i = e.node(s), r = t.node(s);
|
|
1564
1564
|
i && (i.x = r.x, i.y = r.y, i.order = r.order, i.rank = r.rank, t.children(s).length && (i.width = r.width, i.height = r.height));
|
|
@@ -1569,22 +1569,22 @@ function Us(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
|
|
1572
|
+
const qs = ["nodesep", "edgesep", "ranksep", "marginx", "marginy"], Ks = { ranksep: 50, edgesep: 20, nodesep: 50, rankdir: "tb" }, Js = ["acyclicer", "ranker", "rankdir", "align"], Qs = ["width", "height", "rank"], to = { width: 0, height: 0 }, er = ["minlen", "weight", "width", "height", "labeloffset"], tr = {
|
|
1573
1573
|
minlen: 1,
|
|
1574
1574
|
weight: 1,
|
|
1575
1575
|
width: 0,
|
|
1576
1576
|
height: 0,
|
|
1577
1577
|
labeloffset: 10,
|
|
1578
1578
|
labelpos: "r"
|
|
1579
|
-
},
|
|
1580
|
-
function
|
|
1579
|
+
}, or = ["labelpos", "arrowshape"];
|
|
1580
|
+
function nr(e) {
|
|
1581
1581
|
const t = rt(e.graph()), o = {
|
|
1582
|
-
...
|
|
1583
|
-
...st(t,
|
|
1584
|
-
...
|
|
1585
|
-
}, n = new
|
|
1582
|
+
...Ks,
|
|
1583
|
+
...st(t, qs),
|
|
1584
|
+
..._e(t, Js)
|
|
1585
|
+
}, n = new K({ multigraph: !0, compound: !0 });
|
|
1586
1586
|
return n.setGraph(o), e.nodes().forEach((s) => {
|
|
1587
|
-
const i = rt(e.node(s)), r = st(i,
|
|
1587
|
+
const i = rt(e.node(s)), r = st(i, Qs);
|
|
1588
1588
|
Object.keys(to).forEach((l) => {
|
|
1589
1589
|
r[l] === void 0 && (r[l] = to[l]);
|
|
1590
1590
|
}), n.setNode(s, r), n.setParent(s, e.parent(s));
|
|
@@ -1593,43 +1593,43 @@ function or(e) {
|
|
|
1593
1593
|
n.setEdge(
|
|
1594
1594
|
s,
|
|
1595
1595
|
{
|
|
1596
|
-
...
|
|
1597
|
-
...st(i,
|
|
1598
|
-
...
|
|
1596
|
+
...tr,
|
|
1597
|
+
...st(i, er),
|
|
1598
|
+
..._e(i, or)
|
|
1599
1599
|
}
|
|
1600
1600
|
);
|
|
1601
1601
|
}), n;
|
|
1602
1602
|
}
|
|
1603
|
-
function
|
|
1603
|
+
function sr(e) {
|
|
1604
1604
|
const t = e.graph();
|
|
1605
1605
|
t.ranksep /= 2, e.edges().forEach((o) => {
|
|
1606
1606
|
const n = e.edge(o);
|
|
1607
1607
|
n.minlen *= 2, n.labelpos.toLowerCase() !== "c" && (t.rankdir === "TB" || t.rankdir === "BT" ? n.width += n.labeloffset : n.height += n.labeloffset);
|
|
1608
1608
|
});
|
|
1609
1609
|
}
|
|
1610
|
-
function
|
|
1610
|
+
function rr(e) {
|
|
1611
1611
|
e.edges().forEach((t) => {
|
|
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
|
+
de(e, "edge-proxy", i, "_ep");
|
|
1616
1616
|
}
|
|
1617
1617
|
});
|
|
1618
1618
|
}
|
|
1619
|
-
function
|
|
1619
|
+
function ir(e) {
|
|
1620
1620
|
let t = 0;
|
|
1621
1621
|
e.nodes().forEach((o) => {
|
|
1622
1622
|
const n = e.node(o);
|
|
1623
1623
|
n.borderTop && (n.minRank = e.node(n.borderTop).rank, n.maxRank = e.node(n.borderBottom).rank, t = Math.max(t, n.maxRank));
|
|
1624
1624
|
}), e.graph().maxRank = t;
|
|
1625
1625
|
}
|
|
1626
|
-
function
|
|
1626
|
+
function lr(e) {
|
|
1627
1627
|
e.nodes().forEach((t) => {
|
|
1628
1628
|
const o = e.node(t);
|
|
1629
1629
|
o.dummy === "edge-proxy" && (e.edge(o.e).labelRank = o.rank, e.removeNode(t));
|
|
1630
1630
|
});
|
|
1631
1631
|
}
|
|
1632
|
-
function
|
|
1632
|
+
function ar(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, l = i.marginy || 0;
|
|
1635
1635
|
function a(c) {
|
|
@@ -1649,29 +1649,29 @@ function lr(e) {
|
|
|
1649
1649
|
}), Object.hasOwn(d, "x") && (d.x -= t), Object.hasOwn(d, "y") && (d.y -= n);
|
|
1650
1650
|
}), i.width = o - t + r, i.height = s - n + l;
|
|
1651
1651
|
}
|
|
1652
|
-
function
|
|
1653
|
-
|
|
1654
|
-
|
|
1655
|
-
|
|
1656
|
-
|
|
1657
|
-
|
|
1658
|
-
|
|
1659
|
-
|
|
1660
|
-
|
|
1661
|
-
|
|
1662
|
-
|
|
1663
|
-
};
|
|
1664
|
-
}
|
|
1665
|
-
e.edges().forEach((n) => {
|
|
1666
|
-
const s = e.edge(n), i = e.node(n.v), r = e.node(n.w);
|
|
1667
|
-
let l, a;
|
|
1668
|
-
!s.points || !s.points.length ? (s.points = [], l = r, a = i) : (l = s.points[0], a = s.points[s.points.length - 1]);
|
|
1669
|
-
const c = ct(i, l), d = ct(r, a), f = s.points.length ? s.points[0] : l, g = s.points.length ? s.points[s.points.length - 1] : a, b = s.arrowshape, N = b === "normal" || b === "vee", x = !!s.reversed;
|
|
1670
|
-
let T = c, I = d;
|
|
1671
|
-
N && (x ? T = o(c, f, 4) : I = o(d, g, 4)), s.points.unshift(T), s.points.push(I);
|
|
1672
|
-
});
|
|
1652
|
+
function oo(e, t, o) {
|
|
1653
|
+
if (!t)
|
|
1654
|
+
return e;
|
|
1655
|
+
const n = t.x - e.x, s = t.y - e.y, i = Math.sqrt(n * n + s * s);
|
|
1656
|
+
if (!i || i <= o)
|
|
1657
|
+
return e;
|
|
1658
|
+
const r = o / i;
|
|
1659
|
+
return {
|
|
1660
|
+
x: e.x + n * r,
|
|
1661
|
+
y: e.y + s * r
|
|
1662
|
+
};
|
|
1673
1663
|
}
|
|
1674
1664
|
function cr(e) {
|
|
1665
|
+
e.edges().forEach((o) => {
|
|
1666
|
+
const n = e.edge(o), s = e.node(o.v), i = e.node(o.w);
|
|
1667
|
+
let r, l;
|
|
1668
|
+
!n.points || !n.points.length ? (n.points = [], r = i, l = s) : (r = n.points[0], l = n.points[n.points.length - 1]);
|
|
1669
|
+
const a = ct(s, r), c = ct(i, l), d = n.points.length ? n.points[0] : r, f = n.points.length ? n.points[n.points.length - 1] : l, g = n.arrowshape, b = g === "normal" || g === "vee", N = !!n.reversed;
|
|
1670
|
+
let x = a, T = c;
|
|
1671
|
+
b && (N ? x = oo(a, d, 4) : T = oo(c, f, 4)), n.points.unshift(x), n.points.push(T);
|
|
1672
|
+
});
|
|
1673
|
+
}
|
|
1674
|
+
function ur(e) {
|
|
1675
1675
|
e.edges().forEach((t) => {
|
|
1676
1676
|
const o = e.edge(t);
|
|
1677
1677
|
if (Object.hasOwn(o, "x"))
|
|
@@ -1685,13 +1685,13 @@ function cr(e) {
|
|
|
1685
1685
|
}
|
|
1686
1686
|
});
|
|
1687
1687
|
}
|
|
1688
|
-
function
|
|
1688
|
+
function dr(e) {
|
|
1689
1689
|
e.edges().forEach((t) => {
|
|
1690
1690
|
const o = e.edge(t);
|
|
1691
1691
|
o.reversed && o.points.reverse();
|
|
1692
1692
|
});
|
|
1693
1693
|
}
|
|
1694
|
-
function
|
|
1694
|
+
function fr(e) {
|
|
1695
1695
|
e.nodes().forEach((t) => {
|
|
1696
1696
|
if (e.children(t).length) {
|
|
1697
1697
|
const o = e.node(t), n = e.node(o.borderTop), s = e.node(o.borderBottom), i = e.node(o.borderLeft[o.borderLeft.length - 1]), r = e.node(o.borderRight[o.borderRight.length - 1]);
|
|
@@ -1701,7 +1701,7 @@ function dr(e) {
|
|
|
1701
1701
|
e.node(t).dummy === "border" && e.removeNode(t);
|
|
1702
1702
|
});
|
|
1703
1703
|
}
|
|
1704
|
-
function
|
|
1704
|
+
function hr(e) {
|
|
1705
1705
|
e.edges().forEach((t) => {
|
|
1706
1706
|
if (t.v === t.w) {
|
|
1707
1707
|
const o = e.node(t.v);
|
|
@@ -1709,13 +1709,13 @@ function fr(e) {
|
|
|
1709
1709
|
}
|
|
1710
1710
|
});
|
|
1711
1711
|
}
|
|
1712
|
-
function
|
|
1713
|
-
|
|
1712
|
+
function mr(e) {
|
|
1713
|
+
Ne(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((l) => {
|
|
1718
|
-
|
|
1718
|
+
de(e, "selfedge", {
|
|
1719
1719
|
width: l.label.width,
|
|
1720
1720
|
height: l.label.height,
|
|
1721
1721
|
rank: r.rank,
|
|
@@ -1727,7 +1727,7 @@ function hr(e) {
|
|
|
1727
1727
|
});
|
|
1728
1728
|
});
|
|
1729
1729
|
}
|
|
1730
|
-
function
|
|
1730
|
+
function gr(e) {
|
|
1731
1731
|
e.nodes().forEach((t) => {
|
|
1732
1732
|
const o = e.node(t);
|
|
1733
1733
|
if (o.dummy === "selfedge") {
|
|
@@ -1743,7 +1743,7 @@ function mr(e) {
|
|
|
1743
1743
|
});
|
|
1744
1744
|
}
|
|
1745
1745
|
function st(e, t) {
|
|
1746
|
-
return
|
|
1746
|
+
return Ae(_e(e, t), Number);
|
|
1747
1747
|
}
|
|
1748
1748
|
function rt(e) {
|
|
1749
1749
|
const t = {};
|
|
@@ -1752,7 +1752,7 @@ function rt(e) {
|
|
|
1752
1752
|
typeof s == "string" && (s = s.toLowerCase()), t[s] = n;
|
|
1753
1753
|
}), t;
|
|
1754
1754
|
}
|
|
1755
|
-
const
|
|
1755
|
+
const vr = {
|
|
1756
1756
|
rankDirection: "TB",
|
|
1757
1757
|
// "TB", "BT", "LR", "RL"
|
|
1758
1758
|
nodeSeparation: 50,
|
|
@@ -1768,12 +1768,12 @@ const gr = {
|
|
|
1768
1768
|
arrowShape: "normal",
|
|
1769
1769
|
arrowSize: 10
|
|
1770
1770
|
};
|
|
1771
|
-
function
|
|
1771
|
+
function br(e) {
|
|
1772
1772
|
return e.length ? e.map(
|
|
1773
1773
|
(t, o) => `${o === 0 ? "M" : "L"} ${t.x} ${t.y}`
|
|
1774
1774
|
).join(" ") : "";
|
|
1775
1775
|
}
|
|
1776
|
-
function
|
|
1776
|
+
function pr(e) {
|
|
1777
1777
|
if (!e.length) return "";
|
|
1778
1778
|
if (e.length === 1) {
|
|
1779
1779
|
const s = e[0];
|
|
@@ -1791,14 +1791,14 @@ function br(e) {
|
|
|
1791
1791
|
const n = e[e.length - 1];
|
|
1792
1792
|
return o += ` L ${n.x} ${n.y}`, o;
|
|
1793
1793
|
}
|
|
1794
|
-
function
|
|
1794
|
+
function wr(e) {
|
|
1795
1795
|
const { nodes: t, edges: o, configuration: n } = e, s = k(null), i = k(null), r = `dag-arrow-${lt()}`;
|
|
1796
1796
|
function l(a, c, d) {
|
|
1797
1797
|
i.value = null, s.value = null;
|
|
1798
1798
|
const f = {
|
|
1799
|
-
...
|
|
1799
|
+
...vr,
|
|
1800
1800
|
...d
|
|
1801
|
-
}, g = new
|
|
1801
|
+
}, g = new K({ multigraph: !0, compound: !0 });
|
|
1802
1802
|
g.setGraph({
|
|
1803
1803
|
rankdir: f.rankDirection,
|
|
1804
1804
|
nodesep: f.nodeSeparation,
|
|
@@ -1817,33 +1817,33 @@ function pr(e) {
|
|
|
1817
1817
|
minlen: u.minLength ?? 1,
|
|
1818
1818
|
arrowShape: f.arrowShape ?? "normal"
|
|
1819
1819
|
});
|
|
1820
|
-
}),
|
|
1820
|
+
}), Zs(g);
|
|
1821
1821
|
const b = a.map((u) => {
|
|
1822
|
-
const
|
|
1822
|
+
const I = g.node(u.id);
|
|
1823
1823
|
return {
|
|
1824
1824
|
id: u.id,
|
|
1825
1825
|
label: u.label,
|
|
1826
|
-
x:
|
|
1827
|
-
y:
|
|
1828
|
-
width:
|
|
1829
|
-
height:
|
|
1826
|
+
x: I.x,
|
|
1827
|
+
y: I.y,
|
|
1828
|
+
width: I.width,
|
|
1829
|
+
height: I.height,
|
|
1830
1830
|
original: u
|
|
1831
1831
|
};
|
|
1832
1832
|
}), N = g.edges().map((u) => {
|
|
1833
|
-
const
|
|
1833
|
+
const I = g.edge(u), H = I.points || [];
|
|
1834
1834
|
if (!H.length)
|
|
1835
1835
|
return null;
|
|
1836
|
-
const
|
|
1836
|
+
const Se = f.curvedEdges ? pr(H) : br(H), Le = f.arrowShape !== "undirected" ? `url(#${r})` : null, Oe = c.find((me) => me?.from === u.v && me?.to === u.w);
|
|
1837
1837
|
return {
|
|
1838
1838
|
id: `${u.v}->${u.w}->${lt()}`,
|
|
1839
1839
|
from: u.v,
|
|
1840
1840
|
to: u.w,
|
|
1841
1841
|
points: H,
|
|
1842
|
-
pathData:
|
|
1843
|
-
markerEnd:
|
|
1842
|
+
pathData: Se,
|
|
1843
|
+
markerEnd: Le,
|
|
1844
1844
|
original: {
|
|
1845
|
-
...
|
|
1846
|
-
...
|
|
1845
|
+
...Oe,
|
|
1846
|
+
...I
|
|
1847
1847
|
}
|
|
1848
1848
|
};
|
|
1849
1849
|
}).filter(Boolean), x = f.padding;
|
|
@@ -1860,22 +1860,22 @@ function pr(e) {
|
|
|
1860
1860
|
const T = b.flatMap((u) => [
|
|
1861
1861
|
u.x - u.width / 2,
|
|
1862
1862
|
u.x + u.width / 2
|
|
1863
|
-
]),
|
|
1863
|
+
]), Y = b.flatMap((u) => [
|
|
1864
1864
|
u.y - u.height / 2,
|
|
1865
1865
|
u.y + u.height / 2
|
|
1866
|
-
]),
|
|
1866
|
+
]), he = Math.min(...T) - x, ne = Math.max(...T) + x, R = Math.min(...Y) - x, P = Math.max(...Y) + x;
|
|
1867
1867
|
s.value = {
|
|
1868
1868
|
nodes: b,
|
|
1869
1869
|
edges: N.map((u) => ({
|
|
1870
1870
|
...u,
|
|
1871
|
-
midpoint: u.pathData ?
|
|
1871
|
+
midpoint: u.pathData ? rn(u.pathData) : { x: 0, y: 0 }
|
|
1872
1872
|
})),
|
|
1873
|
-
viewBox: `${
|
|
1873
|
+
viewBox: `${he} ${R} ${ne - he} ${P - R}`,
|
|
1874
1874
|
arrowShape: f.arrowShape,
|
|
1875
1875
|
arrowSize: f.arrowSize
|
|
1876
1876
|
};
|
|
1877
1877
|
}
|
|
1878
|
-
return
|
|
1878
|
+
return Qo(() => {
|
|
1879
1879
|
try {
|
|
1880
1880
|
const a = v(t) || [], c = v(o) || [], d = v(n) || {};
|
|
1881
1881
|
l(a, c, d);
|
|
@@ -1892,40 +1892,40 @@ function pr(e) {
|
|
|
1892
1892
|
}
|
|
1893
1893
|
};
|
|
1894
1894
|
}
|
|
1895
|
-
const
|
|
1895
|
+
const Eo = { style: { chart: { backgroundColor: "#1A1A1A", color: "#CCCCCC", 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" } } } } }, Co = { style: { chart: { backgroundColor: "#FFF8E1", color: "#424242", 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" } } } } }, xo = { style: { chart: { backgroundColor: "#1E1E1E", color: "#BDBDBD", 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" } } } } }, _o = { style: { chart: { backgroundColor: "#1A1A1A", color: "#99AA99", 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" } } } } }, No = { style: { chart: { backgroundColor: "#fbfafa", color: "#8A9892", 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" } } } } }, Ao = { style: { chart: { backgroundColor: "#f6f6fb", color: "#50606C", 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" } } } } }, So = {
|
|
1896
1896
|
default: {},
|
|
1897
|
-
dark:
|
|
1898
|
-
celebration:
|
|
1899
|
-
celebrationNight:
|
|
1900
|
-
hack:
|
|
1901
|
-
zen:
|
|
1902
|
-
concrete:
|
|
1903
|
-
},
|
|
1897
|
+
dark: Eo,
|
|
1898
|
+
celebration: Co,
|
|
1899
|
+
celebrationNight: xo,
|
|
1900
|
+
hack: _o,
|
|
1901
|
+
zen: No,
|
|
1902
|
+
concrete: Ao
|
|
1903
|
+
}, ui = /* @__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: Co,
|
|
1906
|
+
celebrationNight: xo,
|
|
1907
|
+
concrete: Ao,
|
|
1908
|
+
dark: Eo,
|
|
1909
|
+
default: So,
|
|
1910
|
+
hack: _o,
|
|
1911
|
+
zen: No
|
|
1912
1912
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
1913
|
-
function
|
|
1914
|
-
const o =
|
|
1915
|
-
return rn(o, t);
|
|
1916
|
-
}
|
|
1917
|
-
function ui(e, t) {
|
|
1918
|
-
const o = Ce(e);
|
|
1913
|
+
function yr(e, t) {
|
|
1914
|
+
const o = xe(e);
|
|
1919
1915
|
return ln(o, t);
|
|
1920
1916
|
}
|
|
1921
1917
|
function di(e, t) {
|
|
1922
|
-
const o =
|
|
1918
|
+
const o = xe(e);
|
|
1923
1919
|
return an(o, t);
|
|
1924
1920
|
}
|
|
1925
|
-
function fi(
|
|
1926
|
-
|
|
1921
|
+
function fi(e, t) {
|
|
1922
|
+
const o = xe(e);
|
|
1923
|
+
return cn(o, t);
|
|
1924
|
+
}
|
|
1925
|
+
function hi({ defaultConfig: e, userConfig: t }) {
|
|
1926
|
+
return ro({ defaultConfig: e, userConfig: t });
|
|
1927
1927
|
}
|
|
1928
|
-
const
|
|
1928
|
+
const kr = {
|
|
1929
1929
|
__name: "BaseZoomControls",
|
|
1930
1930
|
props: {
|
|
1931
1931
|
config: {
|
|
@@ -1953,43 +1953,43 @@ const yr = {
|
|
|
1953
1953
|
return (n, s) => (y(), _("div", {
|
|
1954
1954
|
class: it({ "vue-data-ui-zoom-controls": !0, "vue-data-ui-zoom-controls-fullscreen": e.isFullscreen }),
|
|
1955
1955
|
"data-dom-to-png-ignore": "",
|
|
1956
|
-
style:
|
|
1956
|
+
style: q({
|
|
1957
1957
|
border: e.config.style.chart.controls.border,
|
|
1958
1958
|
backgroundColor: e.config.style.chart.controls.backgroundColor,
|
|
1959
1959
|
padding: e.config.style.chart.controls.padding,
|
|
1960
1960
|
borderRadius: e.config.style.chart.controls.borderRadius,
|
|
1961
1961
|
"--vue-data-ui-zoom-control-button-color": e.config.style.chart.controls.buttonColor,
|
|
1962
|
-
"--vue-data-ui-zoom-control-button-color-hover": v(
|
|
1962
|
+
"--vue-data-ui-zoom-control-button-color-hover": v(yr)(e.config.style.chart.controls.buttonColor, 0.2)
|
|
1963
1963
|
})
|
|
1964
1964
|
}, [
|
|
1965
|
-
|
|
1965
|
+
G("button", {
|
|
1966
1966
|
onClick: s[0] || (s[0] = (i) => o("zoomOut")),
|
|
1967
1967
|
class: "vue-data-ui-zoom-controls-button",
|
|
1968
1968
|
"data-cy-zoom-out": ""
|
|
1969
1969
|
}, [
|
|
1970
|
-
|
|
1970
|
+
ce(Qe, {
|
|
1971
1971
|
name: "zoomMinus",
|
|
1972
1972
|
stroke: e.config.style.chart.controls.color,
|
|
1973
1973
|
size: e.config.style.chart.controls.fontSize * 1.2
|
|
1974
1974
|
}, null, 8, ["stroke", "size"])
|
|
1975
1975
|
]),
|
|
1976
|
-
|
|
1976
|
+
G("button", {
|
|
1977
1977
|
class: "vue-data-ui-zoom-controls-button-zoom",
|
|
1978
1978
|
onClick: s[1] || (s[1] = (i) => o("resetZoom")),
|
|
1979
1979
|
"data-cy-zoom-reset": "",
|
|
1980
|
-
style:
|
|
1980
|
+
style: q({
|
|
1981
1981
|
color: e.config.style.chart.controls.color,
|
|
1982
1982
|
width: e.config.style.chart.controls.fontSize * 4 + "px",
|
|
1983
1983
|
borderRadius: e.config.style.chart.controls.borderRadius,
|
|
1984
1984
|
fontSize: e.config.style.chart.controls.fontSize + "px"
|
|
1985
1985
|
})
|
|
1986
|
-
},
|
|
1987
|
-
|
|
1986
|
+
}, ae(Math.round(e.scale * 100)) + "% ", 5),
|
|
1987
|
+
G("button", {
|
|
1988
1988
|
onClick: s[2] || (s[2] = (i) => o("zoomIn")),
|
|
1989
1989
|
class: "vue-data-ui-zoom-controls-button",
|
|
1990
1990
|
"data-cy-zoom-in": ""
|
|
1991
1991
|
}, [
|
|
1992
|
-
|
|
1992
|
+
ce(Qe, {
|
|
1993
1993
|
name: "zoomPlus",
|
|
1994
1994
|
stroke: e.config.style.chart.controls.color,
|
|
1995
1995
|
size: e.config.style.chart.controls.fontSize * 1.2
|
|
@@ -2000,7 +2000,7 @@ const yr = {
|
|
|
2000
2000
|
onClick: s[3] || (s[3] = (i) => o("switchDirection")),
|
|
2001
2001
|
class: "vue-data-ui-zoom-controls-button"
|
|
2002
2002
|
}, [
|
|
2003
|
-
|
|
2003
|
+
ce(Qe, {
|
|
2004
2004
|
name: "direction",
|
|
2005
2005
|
stroke: e.config.style.chart.controls.color,
|
|
2006
2006
|
size: e.config.style.chart.controls.fontSize * 1.2
|
|
@@ -2008,13 +2008,13 @@ const yr = {
|
|
|
2008
2008
|
])) : S("", !0)
|
|
2009
2009
|
], 6));
|
|
2010
2010
|
}
|
|
2011
|
-
},
|
|
2011
|
+
}, no = /* @__PURE__ */ io(kr, [["__scopeId", "data-v-e4479474"]]), Er = ["id"], Cr = {
|
|
2012
2012
|
key: 0,
|
|
2013
2013
|
class: "dag-chart-error"
|
|
2014
|
-
},
|
|
2014
|
+
}, xr = ["viewBox", "xmlns"], _r = { key: 0 }, Nr = ["id", "markerWidth", "markerHeight", "refX", "refY"], Ar = ["d", "fill", "stroke"], Sr = ["d", "fill", "stroke"], Lr = { class: "vue-ui-dag-edges" }, Or = ["d", "stroke", "stroke-width"], Tr = ["cx", "cy", "r", "fill", "stroke", "stroke-width", "onMouseenter"], Rr = { class: "vue-ui-dag-nodes" }, Mr = ["onClick", "onMouseenter"], $r = ["x", "y", "width", "height", "rx", "fill", "stroke", "stroke-width"], Dr = ["x", "y", "font-size", "fill", "font-weight"], Fr = ["x", "y", "font-size", "fill", "font-weight", "innerHTML"], Pr = { key: 1 }, zr = ["x", "y", "width", "height"], Br = { class: "vue-ui-dag-edges" }, Vr = ["d", "stroke-width", "marker-end"], Ir = {
|
|
2015
2015
|
key: 6,
|
|
2016
2016
|
class: "vue-data-ui-watermark"
|
|
2017
|
-
},
|
|
2017
|
+
}, Gr = ["data-position"], jr = { key: 0 }, Wr = ["data-position"], Yr = { key: 0 }, so = 1.5, Hr = {
|
|
2018
2018
|
__name: "vue-ui-dag",
|
|
2019
2019
|
props: {
|
|
2020
2020
|
dataset: {
|
|
@@ -2035,8 +2035,8 @@ const yr = {
|
|
|
2035
2035
|
},
|
|
2036
2036
|
emits: ["onNodeClick", "onMidpointEnter", "onMidpointLeave"],
|
|
2037
2037
|
setup(e, { expose: t, emit: o }) {
|
|
2038
|
-
const n = qe(() => import("./PenAndPaper-
|
|
2039
|
-
...
|
|
2038
|
+
const n = qe(() => import("./PenAndPaper-CFRubEEG.js")), s = qe(() => import("./UserOptions-M5A9w5GL.js")), i = qe(() => import("./PackageVersion-BuD3uLvK.js")), { vue_ui_dag: r } = vn(), { isThemeValid: l, warnInvalidTheme: a } = kn(), c = e, d = o, f = k(null), g = k(lt()), b = k(null), N = k(null), x = k(null), T = k(0), Y = k(0), he = k(!1), ne = k(!1), R = k(null), P = k(null), u = k(We()), I = k(u.value.style.chart.width), H = k(u.value.style.chart.height), Se = k({ x: 0, y: 0 }), z = k(null), Le = k(null), Oe = k({ left: "0px", top: "0px" }), me = k("top"), J = k(!1), ft = k({ x: 0, y: 0 }), ht = k({ x: 0, y: 0 }), ge = k(null), Ie = k(null), Ge = k({ left: "0px", top: "0px" }), mt = k("top"), Te = k(!1), ve = k(!1), { svgRef: Q } = Cn({ config: u.value.style.chart.title }), { userOptionsVisible: je, setUserOptionsVisibility: gt, keepUserOptionState: vt } = En({ config: u.value }), Z = k(u.value.style.chart.layout.rankDirection), { loading: be, FINAL_DATASET: bt, manualLoading: pt } = bn({
|
|
2039
|
+
...en(c),
|
|
2040
2040
|
FINAL_CONFIG: u,
|
|
2041
2041
|
prepareConfig: We,
|
|
2042
2042
|
skeletonDataset: {
|
|
@@ -2050,7 +2050,7 @@ const yr = {
|
|
|
2050
2050
|
{ from: "A", to: "C" }
|
|
2051
2051
|
]
|
|
2052
2052
|
},
|
|
2053
|
-
skeletonConfig:
|
|
2053
|
+
skeletonConfig: ro({
|
|
2054
2054
|
defaultConfig: u.value,
|
|
2055
2055
|
userConfig: {
|
|
2056
2056
|
userOptions: { show: !1 },
|
|
@@ -2082,7 +2082,7 @@ const yr = {
|
|
|
2082
2082
|
if (!l.value(m))
|
|
2083
2083
|
return a(m), m;
|
|
2084
2084
|
const h = Je({
|
|
2085
|
-
userConfig:
|
|
2085
|
+
userConfig: So[p] || c.config,
|
|
2086
2086
|
defaultConfig: m
|
|
2087
2087
|
});
|
|
2088
2088
|
return Je({
|
|
@@ -2090,45 +2090,45 @@ const yr = {
|
|
|
2090
2090
|
defaultConfig: h
|
|
2091
2091
|
});
|
|
2092
2092
|
}
|
|
2093
|
-
const wt =
|
|
2093
|
+
const wt = W(() => !!u.value.debug);
|
|
2094
2094
|
Vt(async () => {
|
|
2095
|
-
|
|
2095
|
+
un(c.dataset) && (jt({
|
|
2096
2096
|
componentName: "VueUiDag",
|
|
2097
2097
|
type: "dataset",
|
|
2098
2098
|
debug: wt.value
|
|
2099
|
-
}),
|
|
2099
|
+
}), ne.value = !1, pt.value = !0), c.dataset.nodes || (jt({
|
|
2100
2100
|
componentName: "VueUiDag",
|
|
2101
2101
|
type: "datasetAttributeEmpty",
|
|
2102
2102
|
property: "nodes",
|
|
2103
2103
|
index: 0,
|
|
2104
2104
|
debug: wt.value
|
|
2105
|
-
}),
|
|
2105
|
+
}), ne.value = !1, pt.value = !0), ne.value = !0, await De(), zt();
|
|
2106
2106
|
}), Fe(() => c.config, async (m) => {
|
|
2107
|
-
|
|
2107
|
+
be.value || (u.value = We()), je.value = !u.value.userOptions.showOnChartHover, T.value += 1, Z.value = u.value.style.chart.layout.rankDirection, I.value = u.value.style.chart.width, H.value = u.value.style.chart.height, se.value = u.value.style.chart.zoom.active, await De(), zt();
|
|
2108
2108
|
}, { deep: !0 });
|
|
2109
|
-
const { isPrinting: yt, isImaging: kt, generatePdf: Et, generateImage: Ct } =
|
|
2109
|
+
const { isPrinting: yt, isImaging: kt, generatePdf: Et, generateImage: Ct } = wn({
|
|
2110
2110
|
elementId: `dag_${g.value}`,
|
|
2111
2111
|
fileName: u.value.style.chart.title.text || "vue-ui-dag",
|
|
2112
2112
|
options: u.value.userOptions.print
|
|
2113
|
-
}),
|
|
2114
|
-
svg:
|
|
2115
|
-
title:
|
|
2113
|
+
}), Lo = W(() => u.value.style.chart.backgroundColor), Oo = W(() => u.value.style.chart.title), { exportSvg: To, getSvg: Ro } = yn({
|
|
2114
|
+
svg: Q,
|
|
2115
|
+
title: Oo,
|
|
2116
2116
|
legend: void 0,
|
|
2117
2117
|
legendItems: void 0,
|
|
2118
|
-
backgroundColor:
|
|
2118
|
+
backgroundColor: Lo
|
|
2119
2119
|
});
|
|
2120
2120
|
async function xt({ isCb: m }) {
|
|
2121
2121
|
if (m) {
|
|
2122
|
-
const { blob: p, url: h, text: w, dataUrl: O } = await
|
|
2122
|
+
const { blob: p, url: h, text: w, dataUrl: O } = await Ro();
|
|
2123
2123
|
u.value.userOptions.callbacks.svg({ blob: p, url: h, text: w, dataUrl: O });
|
|
2124
2124
|
} else
|
|
2125
|
-
|
|
2126
|
-
}
|
|
2127
|
-
function Ro() {
|
|
2128
|
-
fe.value = !0, gt(!0);
|
|
2125
|
+
To();
|
|
2129
2126
|
}
|
|
2130
2127
|
function Mo() {
|
|
2131
|
-
|
|
2128
|
+
he.value = !0, gt(!0);
|
|
2129
|
+
}
|
|
2130
|
+
function $o() {
|
|
2131
|
+
gt(!1), he.value = !1;
|
|
2132
2132
|
}
|
|
2133
2133
|
function _t({
|
|
2134
2134
|
tooltipRef: m,
|
|
@@ -2140,43 +2140,43 @@ const yr = {
|
|
|
2140
2140
|
margin: C = 24
|
|
2141
2141
|
}) {
|
|
2142
2142
|
return function() {
|
|
2143
|
-
const
|
|
2144
|
-
if (!
|
|
2145
|
-
const L =
|
|
2146
|
-
let F = Me - Bt - L.height - C,
|
|
2143
|
+
const te = m.value;
|
|
2144
|
+
if (!te || !p.value) return;
|
|
2145
|
+
const L = te.getBoundingClientRect(), D = window.innerWidth, we = window.innerHeight, ye = h.value.x, Me = h.value.y, $e = $?.value?.x ?? 0, Bt = $?.value?.y ?? 0;
|
|
2146
|
+
let F = Me - Bt - L.height - C, U = ye - L.width / 2, ke = "top";
|
|
2147
2147
|
if (F < C) {
|
|
2148
|
-
const
|
|
2149
|
-
|
|
2148
|
+
const ie = Me + Bt + C;
|
|
2149
|
+
ie + L.height <= we - C ? (F = ie, ke = "bottom") : (F = Me - L.height / 2, F < C && (F = C), F + L.height > we - C && (F = we - L.height - C), ke = "center");
|
|
2150
2150
|
}
|
|
2151
|
-
|
|
2152
|
-
const
|
|
2153
|
-
if ((
|
|
2154
|
-
let
|
|
2155
|
-
const
|
|
2156
|
-
D - (
|
|
2151
|
+
U < C && (U = C), U + L.width > D - C && (U = D - L.width - C);
|
|
2152
|
+
const qo = U <= C, Ko = U + L.width >= D - C;
|
|
2153
|
+
if ((qo || Ko) && ke !== "center") {
|
|
2154
|
+
let ie, Ee;
|
|
2155
|
+
const Jo = ye - $e - C;
|
|
2156
|
+
D - (ye + $e) - C >= Jo ? (ie = "right", Ee = ye + $e + C) : (ie = "left", Ee = ye - $e - C - L.width), Ee >= C && Ee + L.width <= D - C && (U = Ee, F = Me - L.height / 2, F < C && (F = C), F + L.height > we - C && (F = we - L.height - C), ke = ie);
|
|
2157
2157
|
}
|
|
2158
|
-
O.value =
|
|
2159
|
-
left: `${
|
|
2158
|
+
O.value = ke, w.value = {
|
|
2159
|
+
left: `${U}px`,
|
|
2160
2160
|
top: `${F}px`
|
|
2161
2161
|
};
|
|
2162
2162
|
};
|
|
2163
2163
|
}
|
|
2164
|
-
const
|
|
2164
|
+
const Do = W(() => bt.value.nodes.map((m) => ({
|
|
2165
2165
|
...m,
|
|
2166
|
-
backgroundColor: m.backgroundColor ?
|
|
2167
|
-
color: m.color ?
|
|
2168
|
-
}))),
|
|
2166
|
+
backgroundColor: m.backgroundColor ? xe(m.backgroundColor) : u.value.style.chart.nodes.backgroundColor,
|
|
2167
|
+
color: m.color ? xe(m.color) : u.value.style.chart.nodes.labels.color
|
|
2168
|
+
}))), Fo = W(() => bt.value.edges), Po = W(() => ({
|
|
2169
2169
|
...u.value.style.chart.layout,
|
|
2170
|
-
rankDirection:
|
|
2171
|
-
})), { layoutData: E, lastError: Nt, arrowMarkerIdentifier:
|
|
2172
|
-
nodes:
|
|
2173
|
-
edges:
|
|
2174
|
-
configuration:
|
|
2170
|
+
rankDirection: Z.value
|
|
2171
|
+
})), { layoutData: E, lastError: Nt, arrowMarkerIdentifier: zo } = wr({
|
|
2172
|
+
nodes: Do,
|
|
2173
|
+
edges: Fo,
|
|
2174
|
+
configuration: Po
|
|
2175
2175
|
});
|
|
2176
2176
|
function At(m) {
|
|
2177
2177
|
return E.value ? E.value.nodes.find((p) => p.id === m) : null;
|
|
2178
2178
|
}
|
|
2179
|
-
const
|
|
2179
|
+
const Bo = W(() => {
|
|
2180
2180
|
if (!E.value) return [];
|
|
2181
2181
|
const m = u.value.style.chart.edges.stroke, p = /* @__PURE__ */ new Set();
|
|
2182
2182
|
return E.value.edges.forEach((h) => {
|
|
@@ -2184,31 +2184,31 @@ const yr = {
|
|
|
2184
2184
|
}), Array.from(p);
|
|
2185
2185
|
});
|
|
2186
2186
|
function St(m) {
|
|
2187
|
-
return `${
|
|
2187
|
+
return `${zo}-${String(m).replace(/[^a-zA-Z0-9_-]/g, "_")}`;
|
|
2188
2188
|
}
|
|
2189
|
-
const Lt =
|
|
2190
|
-
const m =
|
|
2189
|
+
const Lt = W(() => {
|
|
2190
|
+
const m = I.value, p = H.value, h = Number(m), w = Number(p), O = Number.isFinite(h) && h > 0, $ = Number.isFinite(w) && w > 0;
|
|
2191
2191
|
return !O && !$ ? null : {
|
|
2192
2192
|
width: O ? h : null,
|
|
2193
2193
|
height: $ ? w : null
|
|
2194
2194
|
};
|
|
2195
|
-
}),
|
|
2195
|
+
}), pe = k(null), se = k(u.value.style.chart.zoom.active), {
|
|
2196
2196
|
viewBox: Ot,
|
|
2197
2197
|
resetZoom: Re,
|
|
2198
|
-
setInitialViewBox:
|
|
2198
|
+
setInitialViewBox: Vo,
|
|
2199
2199
|
scale: Tt,
|
|
2200
2200
|
zoomByFactor: Rt
|
|
2201
|
-
} =
|
|
2202
|
-
|
|
2201
|
+
} = gn(
|
|
2202
|
+
Q,
|
|
2203
2203
|
{ x: 0, y: 0, width: 100, height: 100 },
|
|
2204
2204
|
1,
|
|
2205
|
-
|
|
2205
|
+
se,
|
|
2206
2206
|
() => {
|
|
2207
|
-
|
|
2207
|
+
J.value = !1;
|
|
2208
2208
|
}
|
|
2209
2209
|
);
|
|
2210
|
-
function
|
|
2211
|
-
|
|
2210
|
+
function Io() {
|
|
2211
|
+
se.value = !se.value;
|
|
2212
2212
|
}
|
|
2213
2213
|
function Mt() {
|
|
2214
2214
|
const m = E.value && E.value.viewBox;
|
|
@@ -2218,10 +2218,10 @@ const yr = {
|
|
|
2218
2218
|
const [h, w, O, $] = p;
|
|
2219
2219
|
if (!Number.isFinite(h) || !Number.isFinite(w) || !Number.isFinite(O) || !Number.isFinite($))
|
|
2220
2220
|
return;
|
|
2221
|
-
let C = O,
|
|
2221
|
+
let C = O, re = $, te = h, L = w;
|
|
2222
2222
|
const D = Lt.value;
|
|
2223
|
-
D && (D.width !== null && (C = D.width), D.height !== null && (
|
|
2224
|
-
{ x:
|
|
2223
|
+
D && (D.width !== null && (C = D.width), D.height !== null && (re = D.height), te = h - (C - O) / 2, L = w - (re - $) / 2), Vo(
|
|
2224
|
+
{ x: te, y: L, width: C, height: re },
|
|
2225
2225
|
{ overwriteCurrentIfNotZoomed: !0 }
|
|
2226
2226
|
);
|
|
2227
2227
|
}
|
|
@@ -2236,94 +2236,94 @@ const yr = {
|
|
|
2236
2236
|
() => {
|
|
2237
2237
|
Mt();
|
|
2238
2238
|
}
|
|
2239
|
-
), Fe(() =>
|
|
2240
|
-
|
|
2239
|
+
), Fe(() => ve.value, (m) => {
|
|
2240
|
+
se.value = !m;
|
|
2241
2241
|
});
|
|
2242
|
-
const
|
|
2242
|
+
const Go = W(() => {
|
|
2243
2243
|
const m = Ot.value;
|
|
2244
2244
|
return m ? `${m.x} ${m.y} ${m.width} ${m.height}` : "0 0 0 0";
|
|
2245
|
-
}),
|
|
2245
|
+
}), ee = k(!1);
|
|
2246
2246
|
function $t(m) {
|
|
2247
|
-
|
|
2247
|
+
ee.value = m, Y.value += 1;
|
|
2248
2248
|
}
|
|
2249
2249
|
function Ye() {
|
|
2250
|
-
|
|
2250
|
+
ve.value = !ve.value;
|
|
2251
2251
|
}
|
|
2252
2252
|
function He() {
|
|
2253
|
-
Rt(
|
|
2253
|
+
Rt(so, !0);
|
|
2254
2254
|
}
|
|
2255
2255
|
function Ze() {
|
|
2256
|
-
Rt(1 /
|
|
2256
|
+
Rt(1 / so, !0);
|
|
2257
2257
|
}
|
|
2258
2258
|
const Ue = ["TB", "RL", "BT", "LR"];
|
|
2259
2259
|
function Xe() {
|
|
2260
|
-
|
|
2260
|
+
Z.value = Ue[(Ue.indexOf(Z.value) + 1) % Ue.length], Re();
|
|
2261
2261
|
}
|
|
2262
|
-
const
|
|
2263
|
-
tooltipRef:
|
|
2264
|
-
isVisibleRef:
|
|
2265
|
-
anchorRef:
|
|
2266
|
-
styleRef:
|
|
2267
|
-
placementRef:
|
|
2268
|
-
}),
|
|
2262
|
+
const jo = _t({
|
|
2263
|
+
tooltipRef: Le,
|
|
2264
|
+
isVisibleRef: Te,
|
|
2265
|
+
anchorRef: Se,
|
|
2266
|
+
styleRef: Oe,
|
|
2267
|
+
placementRef: me
|
|
2268
|
+
}), Wo = _t({
|
|
2269
2269
|
tooltipRef: Ie,
|
|
2270
|
-
isVisibleRef:
|
|
2270
|
+
isVisibleRef: J,
|
|
2271
2271
|
anchorRef: ft,
|
|
2272
2272
|
styleRef: Ge,
|
|
2273
2273
|
placementRef: mt,
|
|
2274
2274
|
offsetRef: ht
|
|
2275
2275
|
});
|
|
2276
|
-
async function
|
|
2276
|
+
async function Yo(m) {
|
|
2277
2277
|
d("onMidpointEnter", m);
|
|
2278
|
-
const p =
|
|
2278
|
+
const p = Q.value;
|
|
2279
2279
|
if (!p || !m?.midpoint) return;
|
|
2280
2280
|
const h = p.createSVGPoint();
|
|
2281
2281
|
h.x = m.midpoint.x, h.y = m.midpoint.y;
|
|
2282
2282
|
const w = p.getScreenCTM();
|
|
2283
2283
|
if (!w) return;
|
|
2284
2284
|
const O = h.matrixTransform(w);
|
|
2285
|
-
|
|
2285
|
+
Se.value = {
|
|
2286
2286
|
x: O.x,
|
|
2287
2287
|
y: O.y
|
|
2288
|
-
}, z.value = m,
|
|
2288
|
+
}, z.value = m, Te.value = !0, await De(), jo();
|
|
2289
2289
|
}
|
|
2290
|
-
function
|
|
2291
|
-
|
|
2290
|
+
function Ho() {
|
|
2291
|
+
Te.value = !1, z.value = null, d("onMidpointLeave");
|
|
2292
2292
|
}
|
|
2293
|
-
async function
|
|
2293
|
+
async function Zo(m) {
|
|
2294
2294
|
if (d("onNodeClick", m), !u.value.style.chart.nodes.tooltip.showOnClick) return;
|
|
2295
|
-
const p =
|
|
2295
|
+
const p = Q.value;
|
|
2296
2296
|
if (!p) return;
|
|
2297
2297
|
const h = p.createSVGPoint();
|
|
2298
2298
|
h.x = m.x, h.y = m.y;
|
|
2299
2299
|
const w = p.getScreenCTM();
|
|
2300
2300
|
if (!w) return;
|
|
2301
|
-
const O = h.matrixTransform(w), $ = u.value.style.chart.layout.nodeWidth, C = u.value.style.chart.layout.nodeHeight,
|
|
2301
|
+
const O = h.matrixTransform(w), $ = u.value.style.chart.layout.nodeWidth, C = u.value.style.chart.layout.nodeHeight, re = w.a, te = w.d, L = $ * re, D = C * te;
|
|
2302
2302
|
ht.value = {
|
|
2303
2303
|
x: L / 2,
|
|
2304
2304
|
y: D / 2
|
|
2305
2305
|
}, ft.value = {
|
|
2306
2306
|
x: O.x,
|
|
2307
2307
|
y: O.y
|
|
2308
|
-
},
|
|
2308
|
+
}, ge.value = m, J.value = !0, await De(), Wo();
|
|
2309
2309
|
}
|
|
2310
2310
|
function Dt() {
|
|
2311
|
-
|
|
2311
|
+
J.value = !1, ge.value = null;
|
|
2312
2312
|
}
|
|
2313
2313
|
function Ft(m) {
|
|
2314
|
-
if (!
|
|
2314
|
+
if (!J.value) return;
|
|
2315
2315
|
const p = Ie.value;
|
|
2316
2316
|
if (p && p.contains(m.target))
|
|
2317
2317
|
return;
|
|
2318
|
-
const h =
|
|
2318
|
+
const h = Q.value;
|
|
2319
2319
|
h && h.contains(m.target) && m.target.closest(".vue-ui-dag-node") || Dt();
|
|
2320
2320
|
}
|
|
2321
2321
|
function Pt(m) {
|
|
2322
|
-
m.key === "Escape" &&
|
|
2322
|
+
m.key === "Escape" && J.value && Dt();
|
|
2323
2323
|
}
|
|
2324
2324
|
Vt(() => {
|
|
2325
2325
|
document.addEventListener("mousedown", Ft), document.addEventListener("keydown", Pt);
|
|
2326
|
-
}),
|
|
2326
|
+
}), tn(() => {
|
|
2327
2327
|
document.removeEventListener("mousedown", Ft), document.removeEventListener("keydown", Pt), R.value && (P.value && R.value.unobserve(P.value), R.value.disconnect());
|
|
2328
2328
|
});
|
|
2329
2329
|
function zt() {
|
|
@@ -2331,23 +2331,23 @@ const yr = {
|
|
|
2331
2331
|
R.value && (P.value && R.value.unobserve(P.value), R.value.disconnect(), R.value = null, P.value = null);
|
|
2332
2332
|
return;
|
|
2333
2333
|
}
|
|
2334
|
-
const m =
|
|
2334
|
+
const m = hn(() => {
|
|
2335
2335
|
if (!f.value) return;
|
|
2336
|
-
const { width: p, height: h } =
|
|
2336
|
+
const { width: p, height: h } = mn({
|
|
2337
2337
|
chart: f.value,
|
|
2338
2338
|
title: u.value.style.chart.title.text ? b.value : null,
|
|
2339
2339
|
legend: u.value.style.chart.controls.show ? x.value?.$el : null,
|
|
2340
2340
|
source: N.value
|
|
2341
2341
|
});
|
|
2342
2342
|
requestAnimationFrame(() => {
|
|
2343
|
-
|
|
2343
|
+
I.value = Math.max(0.1, p), H.value = Math.max(0.1, h - 12);
|
|
2344
2344
|
});
|
|
2345
2345
|
});
|
|
2346
2346
|
R.value && (P.value && R.value.unobserve(P.value), R.value.disconnect()), R.value = new ResizeObserver(m), P.value = f.value ? f.value.parentNode : null, P.value && R.value.observe(P.value), m();
|
|
2347
2347
|
}
|
|
2348
|
-
async function
|
|
2348
|
+
async function Uo({ scale: m = 2 } = {}) {
|
|
2349
2349
|
if (!f.value) return;
|
|
2350
|
-
const { width: p, height: h } = f.value.getBoundingClientRect(), w = p / h, { imageUri: O, base64: $ } = await
|
|
2350
|
+
const { width: p, height: h } = f.value.getBoundingClientRect(), w = p / h, { imageUri: O, base64: $ } = await _n({ domElement: f.value, base64: !0, img: !0, scale: m });
|
|
2351
2351
|
return {
|
|
2352
2352
|
imageUri: O,
|
|
2353
2353
|
base64: $,
|
|
@@ -2357,12 +2357,12 @@ const yr = {
|
|
|
2357
2357
|
aspectRatio: w
|
|
2358
2358
|
};
|
|
2359
2359
|
}
|
|
2360
|
-
function
|
|
2360
|
+
function Xo() {
|
|
2361
2361
|
return E.value;
|
|
2362
2362
|
}
|
|
2363
2363
|
return t({
|
|
2364
|
-
getData:
|
|
2365
|
-
getImage:
|
|
2364
|
+
getData: Xo,
|
|
2365
|
+
getImage: Uo,
|
|
2366
2366
|
generatePdf: Et,
|
|
2367
2367
|
generateSvg: xt,
|
|
2368
2368
|
generateImage: Ct,
|
|
@@ -2373,25 +2373,25 @@ const yr = {
|
|
|
2373
2373
|
resetZoom: Re,
|
|
2374
2374
|
switchDirection: Xe
|
|
2375
2375
|
}), (m, p) => (y(), _("div", {
|
|
2376
|
-
class: it(`vue-data-ui-component vue-ui-dag ${
|
|
2376
|
+
class: it(`vue-data-ui-component vue-ui-dag ${ee.value ? "vue-data-ui-wrapper-fullscreen" : ""} ${u.value.responsive ? "vue-ui-dag-responsive" : ""}`),
|
|
2377
2377
|
id: `dag_${g.value}`,
|
|
2378
2378
|
ref_key: "dagChart",
|
|
2379
2379
|
ref: f,
|
|
2380
|
-
style:
|
|
2380
|
+
style: q({
|
|
2381
2381
|
fontFamily: u.value.style.fontFamily,
|
|
2382
2382
|
backgroundColor: u.value.style.chart.backgroundColor,
|
|
2383
2383
|
padding: "0.5rem"
|
|
2384
2384
|
}),
|
|
2385
|
-
onMouseenter:
|
|
2386
|
-
onMouseleave:
|
|
2385
|
+
onMouseenter: Mo,
|
|
2386
|
+
onMouseleave: $o
|
|
2387
2387
|
}, [
|
|
2388
|
-
v(Nt) ? (y(), _("div",
|
|
2389
|
-
u.value.userOptions.buttons.annotator ? (y(),
|
|
2388
|
+
v(Nt) ? (y(), _("div", Cr, ae(String(v(Nt))), 1)) : S("", !0),
|
|
2389
|
+
u.value.userOptions.buttons.annotator ? (y(), X(v(n), {
|
|
2390
2390
|
key: 1,
|
|
2391
|
-
svgRef: v(
|
|
2391
|
+
svgRef: v(Q),
|
|
2392
2392
|
backgroundColor: u.value.style.chart.backgroundColor,
|
|
2393
2393
|
color: u.value.style.chart.color,
|
|
2394
|
-
active:
|
|
2394
|
+
active: ve.value,
|
|
2395
2395
|
onClose: Ye
|
|
2396
2396
|
}, {
|
|
2397
2397
|
"annotator-action-close": M(() => [
|
|
@@ -2414,9 +2414,9 @@ const yr = {
|
|
|
2414
2414
|
]),
|
|
2415
2415
|
_: 3
|
|
2416
2416
|
}, 8, ["svgRef", "backgroundColor", "color", "active"])) : S("", !0),
|
|
2417
|
-
u.value.userOptions.show &&
|
|
2417
|
+
u.value.userOptions.show && ne.value && (v(vt) || v(je)) ? (y(), X(v(s), {
|
|
2418
2418
|
ref: "userOptionsRef",
|
|
2419
|
-
key: `user_option_${
|
|
2419
|
+
key: `user_option_${Y.value}`,
|
|
2420
2420
|
backgroundColor: u.value.style.chart.backgroundColor,
|
|
2421
2421
|
color: u.value.style.chart.color,
|
|
2422
2422
|
isPrinting: v(yt),
|
|
@@ -2430,26 +2430,26 @@ const yr = {
|
|
|
2430
2430
|
hasImg: u.value.userOptions.buttons.img,
|
|
2431
2431
|
hasSvg: u.value.userOptions.buttons.svg,
|
|
2432
2432
|
hasFullscreen: u.value.userOptions.buttons.fullscreen,
|
|
2433
|
-
isFullscreen:
|
|
2433
|
+
isFullscreen: ee.value,
|
|
2434
2434
|
chartElement: f.value,
|
|
2435
2435
|
position: u.value.userOptions.position,
|
|
2436
2436
|
titles: { ...u.value.userOptions.buttonTitles },
|
|
2437
2437
|
hasAnnotator: u.value.userOptions.buttons.annotator,
|
|
2438
|
-
isAnnotation:
|
|
2438
|
+
isAnnotation: ve.value,
|
|
2439
2439
|
callbacks: u.value.userOptions.callbacks,
|
|
2440
2440
|
printScale: u.value.userOptions.print.scale,
|
|
2441
2441
|
hasZoom: u.value.userOptions.buttons.zoom,
|
|
2442
|
-
isZoom:
|
|
2442
|
+
isZoom: se.value,
|
|
2443
2443
|
onToggleFullscreen: $t,
|
|
2444
2444
|
onGeneratePdf: v(Et),
|
|
2445
2445
|
onGenerateImage: v(Ct),
|
|
2446
2446
|
onGenerateSvg: xt,
|
|
2447
2447
|
onToggleAnnotator: Ye,
|
|
2448
|
-
onToggleZoom:
|
|
2449
|
-
style:
|
|
2448
|
+
onToggleZoom: Io,
|
|
2449
|
+
style: q({
|
|
2450
2450
|
visibility: v(vt) ? v(je) ? "visible" : "hidden" : "visible"
|
|
2451
2451
|
})
|
|
2452
|
-
},
|
|
2452
|
+
}, on({ _: 2 }, [
|
|
2453
2453
|
m.$slots.menuIcon ? {
|
|
2454
2454
|
name: "menuIcon",
|
|
2455
2455
|
fn: M(({ isOpen: h, color: w }) => [
|
|
@@ -2506,7 +2506,7 @@ const yr = {
|
|
|
2506
2506
|
ref: b,
|
|
2507
2507
|
style: "width:100%;background:transparent;"
|
|
2508
2508
|
}, [
|
|
2509
|
-
(y(),
|
|
2509
|
+
(y(), X(xn, {
|
|
2510
2510
|
key: `title_${T.value}`,
|
|
2511
2511
|
config: {
|
|
2512
2512
|
title: {
|
|
@@ -2520,13 +2520,13 @@ const yr = {
|
|
|
2520
2520
|
}
|
|
2521
2521
|
}, null, 8, ["config"]))
|
|
2522
2522
|
], 512)) : S("", !0),
|
|
2523
|
-
u.value.style.chart.controls.position === "top" && !v(
|
|
2523
|
+
u.value.style.chart.controls.position === "top" && !v(be) && u.value.style.chart.controls.show ? (y(), X(no, {
|
|
2524
2524
|
key: 4,
|
|
2525
2525
|
ref_key: "zoomControls",
|
|
2526
2526
|
ref: x,
|
|
2527
2527
|
config: u.value,
|
|
2528
2528
|
scale: v(Tt),
|
|
2529
|
-
isFullscreen:
|
|
2529
|
+
isFullscreen: ee.value,
|
|
2530
2530
|
withDirection: "",
|
|
2531
2531
|
onZoomIn: He,
|
|
2532
2532
|
onZoomOut: Ze,
|
|
@@ -2536,19 +2536,19 @@ const yr = {
|
|
|
2536
2536
|
v(E) ? (y(), _("svg", {
|
|
2537
2537
|
key: 5,
|
|
2538
2538
|
ref_key: "svgRef",
|
|
2539
|
-
ref:
|
|
2540
|
-
class: it({ "vue-ui-dag-svg": !0, "vue-data-ui-loading": v(
|
|
2541
|
-
viewBox:
|
|
2542
|
-
xmlns: v(
|
|
2543
|
-
style:
|
|
2539
|
+
ref: Q,
|
|
2540
|
+
class: it({ "vue-ui-dag-svg": !0, "vue-data-ui-loading": v(be) }),
|
|
2541
|
+
viewBox: Go.value,
|
|
2542
|
+
xmlns: v(dn),
|
|
2543
|
+
style: q({
|
|
2544
2544
|
backgroundColor: u.value.style.chart.backgroundColor,
|
|
2545
2545
|
height: "100%",
|
|
2546
2546
|
width: "100%"
|
|
2547
2547
|
})
|
|
2548
2548
|
}, [
|
|
2549
|
-
|
|
2550
|
-
v(E).arrowShape !== "undirected" ? (y(), _("defs",
|
|
2551
|
-
(y(!0), _(
|
|
2549
|
+
ce(v(i)),
|
|
2550
|
+
v(E).arrowShape !== "undirected" ? (y(), _("defs", _r, [
|
|
2551
|
+
(y(!0), _(le, null, Pe(Bo.value, (h) => (y(), _("marker", {
|
|
2552
2552
|
key: h,
|
|
2553
2553
|
id: St(h),
|
|
2554
2554
|
markerWidth: v(E).arrowSize,
|
|
@@ -2564,29 +2564,29 @@ const yr = {
|
|
|
2564
2564
|
fill: h,
|
|
2565
2565
|
stroke: h,
|
|
2566
2566
|
"stroke-width": "0"
|
|
2567
|
-
}, null, 8,
|
|
2567
|
+
}, null, 8, Ar)) : (y(), _("path", {
|
|
2568
2568
|
key: 1,
|
|
2569
2569
|
d: `M 0 0 L ${v(E).arrowSize} ${v(E).arrowSize / 2} L 0 ${v(E).arrowSize} L ${v(E).arrowSize / 3} ${v(E).arrowSize / 2} Z`,
|
|
2570
2570
|
fill: h,
|
|
2571
2571
|
stroke: h,
|
|
2572
2572
|
"stroke-width": "0"
|
|
2573
|
-
}, null, 8,
|
|
2574
|
-
], 8,
|
|
2573
|
+
}, null, 8, Sr))
|
|
2574
|
+
], 8, Nr))), 128))
|
|
2575
2575
|
])) : S("", !0),
|
|
2576
|
-
|
|
2577
|
-
(y(!0), _(
|
|
2576
|
+
G("g", Lr, [
|
|
2577
|
+
(y(!0), _(le, null, Pe(v(E).edges, (h) => (y(), _(le, {
|
|
2578
2578
|
key: h.id
|
|
2579
2579
|
}, [
|
|
2580
|
-
|
|
2580
|
+
G("path", {
|
|
2581
2581
|
"data-cy-edge": "",
|
|
2582
2582
|
d: h.pathData,
|
|
2583
2583
|
fill: "none",
|
|
2584
2584
|
stroke: h.original.color ?? u.value.style.chart.edges.stroke,
|
|
2585
|
-
"stroke-width": u.value.style.chart.edges.strokeWidth * (h.from ===
|
|
2585
|
+
"stroke-width": u.value.style.chart.edges.strokeWidth * (h.from === pe.value || h.id === z.value?.id ? 2 : 1),
|
|
2586
2586
|
"stroke-linecap": "round",
|
|
2587
2587
|
"stroke-linejoin": "round",
|
|
2588
2588
|
style: { "pointer-events": "none", transition: "stroke-width 0.2s ease-in-out" }
|
|
2589
|
-
}, null, 8,
|
|
2589
|
+
}, null, 8, Or),
|
|
2590
2590
|
u.value.style.chart.midpoints.show ? (y(), _("circle", {
|
|
2591
2591
|
key: 0,
|
|
2592
2592
|
"data-cy-midpoint": "",
|
|
@@ -2596,23 +2596,23 @@ const yr = {
|
|
|
2596
2596
|
r: u.value.style.chart.midpoints.radius,
|
|
2597
2597
|
fill: u.value.style.chart.midpoints.fill,
|
|
2598
2598
|
stroke: h.original.color ?? u.value.style.chart.midpoints.stroke,
|
|
2599
|
-
"stroke-width": u.value.style.chart.midpoints.strokeWidth * (h.from ===
|
|
2599
|
+
"stroke-width": u.value.style.chart.midpoints.strokeWidth * (h.from === pe.value || h.id === z.value?.id ? 2 : 1),
|
|
2600
2600
|
style: { transition: "stroke-width 0.2s ease-in-out" },
|
|
2601
|
-
onMouseenter: (w) =>
|
|
2602
|
-
onMouseleave:
|
|
2603
|
-
}, null, 40,
|
|
2601
|
+
onMouseenter: (w) => Yo(h),
|
|
2602
|
+
onMouseleave: Ho
|
|
2603
|
+
}, null, 40, Tr)) : S("", !0)
|
|
2604
2604
|
], 64))), 128))
|
|
2605
2605
|
]),
|
|
2606
|
-
|
|
2607
|
-
(y(!0), _(
|
|
2606
|
+
G("g", Rr, [
|
|
2607
|
+
(y(!0), _(le, null, Pe(v(E).nodes, (h) => (y(), _("g", {
|
|
2608
2608
|
key: h.id,
|
|
2609
2609
|
class: "vue-ui-dag-node",
|
|
2610
|
-
onClick:
|
|
2611
|
-
onMouseenter: (w) =>
|
|
2612
|
-
onMouseleave: p[1] || (p[1] = (w) =>
|
|
2610
|
+
onClick: nn((w) => u.value.style.chart.nodes.tooltip.showOnClick && Zo(h), ["stop"]),
|
|
2611
|
+
onMouseenter: (w) => pe.value = h.id,
|
|
2612
|
+
onMouseleave: p[1] || (p[1] = (w) => pe.value = null)
|
|
2613
2613
|
}, [
|
|
2614
|
-
m.$slots.node ? S("", !0) : (y(), _(
|
|
2615
|
-
|
|
2614
|
+
m.$slots.node ? S("", !0) : (y(), _(le, { key: 0 }, [
|
|
2615
|
+
G("rect", {
|
|
2616
2616
|
"data-cy-node": "",
|
|
2617
2617
|
x: h.x - h.width / 2,
|
|
2618
2618
|
y: h.y - h.height / 2,
|
|
@@ -2622,10 +2622,10 @@ const yr = {
|
|
|
2622
2622
|
fill: h.original.backgroundColor,
|
|
2623
2623
|
stroke: u.value.style.chart.nodes.stroke,
|
|
2624
2624
|
"stroke-width": u.value.style.chart.nodes.strokeWidth,
|
|
2625
|
-
style:
|
|
2625
|
+
style: q({
|
|
2626
2626
|
cursor: u.value.style.chart.nodes.tooltip.showOnClick ? "pointer" : "default"
|
|
2627
2627
|
})
|
|
2628
|
-
}, null, 12,
|
|
2628
|
+
}, null, 12, $r),
|
|
2629
2629
|
m.$slots["node-label"] ? (y(), _("text", {
|
|
2630
2630
|
key: 0,
|
|
2631
2631
|
x: h.x,
|
|
@@ -2635,10 +2635,10 @@ const yr = {
|
|
|
2635
2635
|
fill: h.original.color,
|
|
2636
2636
|
"font-weight": u.value.style.chart.nodes.labels.bold ? "bold" : "normal"
|
|
2637
2637
|
}, [
|
|
2638
|
-
A(m.$slots, "node-label", Ke({ ref_for: !0 }, { node: h }), () => [
|
|
2639
|
-
|
|
2638
|
+
A(m.$slots, "node-label", Ke({ ref_for: !0 }, { node: h, orientation: Z.value }), () => [
|
|
2639
|
+
sn(ae(h.label), 1)
|
|
2640
2640
|
], !0)
|
|
2641
|
-
], 8,
|
|
2641
|
+
], 8, Dr)) : m.$slots["free-node-label"] ? S("", !0) : (y(), _("text", {
|
|
2642
2642
|
key: 1,
|
|
2643
2643
|
"data-cy-node-label": "",
|
|
2644
2644
|
x: h.x,
|
|
@@ -2647,7 +2647,7 @@ const yr = {
|
|
|
2647
2647
|
"font-size": u.value.style.chart.nodes.labels.fontSize,
|
|
2648
2648
|
fill: h.original.color,
|
|
2649
2649
|
"font-weight": u.value.style.chart.nodes.labels.bold ? "bold" : "normal",
|
|
2650
|
-
innerHTML: v(
|
|
2650
|
+
innerHTML: v(fn)({
|
|
2651
2651
|
content: h.label,
|
|
2652
2652
|
fontSize: u.value.style.chart.nodes.labels.fontSize,
|
|
2653
2653
|
fontWeight: u.value.style.chart.nodes.labels.bold ? "bold" : "normal",
|
|
@@ -2656,84 +2656,85 @@ const yr = {
|
|
|
2656
2656
|
y: h.y,
|
|
2657
2657
|
autoOffset: !0
|
|
2658
2658
|
})
|
|
2659
|
-
}, null, 8,
|
|
2660
|
-
m.$slots["free-node-label"] ? (y(), _("g", Fr, [
|
|
2661
|
-
A(m.$slots, "free-node-label", Ke({ ref_for: !0 }, { node: h, layoutData: v(E) }), void 0, !0)
|
|
2662
|
-
])) : S("", !0)
|
|
2659
|
+
}, null, 8, Fr))
|
|
2663
2660
|
], 64)),
|
|
2661
|
+
m.$slots["free-node-label"] ? (y(), _("g", Pr, [
|
|
2662
|
+
A(m.$slots, "free-node-label", Ke({ ref_for: !0 }, { node: h, layoutData: v(E), orientation: Z.value }), void 0, !0)
|
|
2663
|
+
])) : S("", !0),
|
|
2664
2664
|
m.$slots.node ? (y(), _("foreignObject", {
|
|
2665
|
-
key:
|
|
2665
|
+
key: 2,
|
|
2666
2666
|
x: h.x - h.width / 2,
|
|
2667
2667
|
y: h.y - h.height / 2,
|
|
2668
2668
|
width: h.width,
|
|
2669
2669
|
height: h.height
|
|
2670
2670
|
}, [
|
|
2671
|
-
A(m.$slots, "node", Ke({ ref_for: !0 }, { node: h }), void 0, !0)
|
|
2672
|
-
], 8,
|
|
2673
|
-
], 40,
|
|
2671
|
+
A(m.$slots, "node", Ke({ ref_for: !0 }, { node: h, orientation: Z.value }), void 0, !0)
|
|
2672
|
+
], 8, zr)) : S("", !0)
|
|
2673
|
+
], 40, Mr))), 128))
|
|
2674
2674
|
]),
|
|
2675
|
-
|
|
2676
|
-
(y(!0), _(
|
|
2675
|
+
G("g", Br, [
|
|
2676
|
+
(y(!0), _(le, null, Pe(v(E).edges, (h) => (y(), _("path", {
|
|
2677
2677
|
key: h.id,
|
|
2678
2678
|
d: h.pathData,
|
|
2679
2679
|
fill: "none",
|
|
2680
2680
|
stroke: "transparent",
|
|
2681
|
-
"stroke-width": u.value.style.chart.edges.strokeWidth * (h.from ===
|
|
2681
|
+
"stroke-width": u.value.style.chart.edges.strokeWidth * (h.from === pe.value || h.id === z.value?.id ? 1.3 : 1),
|
|
2682
2682
|
"stroke-linecap": "round",
|
|
2683
2683
|
"stroke-linejoin": "round",
|
|
2684
2684
|
"marker-end": v(E).arrowShape === "undirected" ? null : `url(#${St(h.original?.color || u.value.style.chart.edges.stroke)})`,
|
|
2685
2685
|
style: { "pointer-events": "none", transition: "stroke-width 0.2s ease-in-out" }
|
|
2686
|
-
}, null, 8,
|
|
2686
|
+
}, null, 8, Vr))), 128))
|
|
2687
2687
|
]),
|
|
2688
2688
|
A(m.$slots, "svg", {
|
|
2689
2689
|
svg: {
|
|
2690
2690
|
drawingArea: v(Ot),
|
|
2691
|
-
data: v(E)
|
|
2691
|
+
data: v(E),
|
|
2692
|
+
orientation: Z.value
|
|
2692
2693
|
}
|
|
2693
2694
|
}, void 0, !0)
|
|
2694
|
-
], 14,
|
|
2695
|
-
m.$slots.watermark ? (y(), _("div",
|
|
2695
|
+
], 14, xr)) : S("", !0),
|
|
2696
|
+
m.$slots.watermark ? (y(), _("div", Ir, [
|
|
2696
2697
|
A(m.$slots, "watermark", B(V({ isPrinting: v(yt) || v(kt) })), void 0, !0)
|
|
2697
2698
|
])) : S("", !0),
|
|
2698
|
-
|
|
2699
|
+
ce(It, { name: "fade" }, {
|
|
2699
2700
|
default: M(() => [
|
|
2700
|
-
|
|
2701
|
+
Te.value ? (y(), X(Gt, {
|
|
2701
2702
|
key: 0,
|
|
2702
|
-
to:
|
|
2703
|
+
to: ee.value ? f.value : "body"
|
|
2703
2704
|
}, [
|
|
2704
|
-
|
|
2705
|
+
G("div", {
|
|
2705
2706
|
"data-cy-tooltip-midpoint": "",
|
|
2706
2707
|
ref_key: "tooltipRef",
|
|
2707
|
-
ref:
|
|
2708
|
+
ref: Le,
|
|
2708
2709
|
class: "vue-ui-dag-tooltip",
|
|
2709
|
-
style:
|
|
2710
|
-
...
|
|
2710
|
+
style: q({
|
|
2711
|
+
...Oe.value,
|
|
2711
2712
|
maxWidth: u.value.style.chart.midpoints.tooltip.maxWidth,
|
|
2712
2713
|
"--vue-data-ui-dag-tooltip-background": u.value.style.chart.midpoints.tooltip.backgroundColor,
|
|
2713
2714
|
"--vue-data-ui-dag-tooltip-color": u.value.style.chart.midpoints.tooltip.color
|
|
2714
2715
|
}),
|
|
2715
|
-
"data-position":
|
|
2716
|
+
"data-position": me.value
|
|
2716
2717
|
}, [
|
|
2717
2718
|
A(m.$slots, "tooltip-midpoint", B(V({ edge: z.value, layoutData: v(E) })), () => [
|
|
2718
|
-
z.value ? (y(), _("div",
|
|
2719
|
+
z.value ? (y(), _("div", jr, ae(At(z.value.from)?.label ?? z.value.from) + " → " + ae(At(z.value.to)?.label ?? z.value.to), 1)) : S("", !0)
|
|
2719
2720
|
], !0)
|
|
2720
|
-
], 12,
|
|
2721
|
+
], 12, Gr)
|
|
2721
2722
|
], 8, ["to"])) : S("", !0)
|
|
2722
2723
|
]),
|
|
2723
2724
|
_: 3
|
|
2724
2725
|
}),
|
|
2725
|
-
|
|
2726
|
+
ce(It, { name: "fade" }, {
|
|
2726
2727
|
default: M(() => [
|
|
2727
|
-
|
|
2728
|
+
J.value ? (y(), X(Gt, {
|
|
2728
2729
|
key: 0,
|
|
2729
|
-
to:
|
|
2730
|
+
to: ee.value ? f.value : "body"
|
|
2730
2731
|
}, [
|
|
2731
|
-
|
|
2732
|
+
G("div", {
|
|
2732
2733
|
"data-cy-tooltip-node": "",
|
|
2733
2734
|
ref_key: "nodeTooltipRef",
|
|
2734
2735
|
ref: Ie,
|
|
2735
2736
|
class: "vue-ui-dag-node-tooltip",
|
|
2736
|
-
style:
|
|
2737
|
+
style: q({
|
|
2737
2738
|
maxWidth: u.value.style.chart.nodes.tooltip.maxWidth,
|
|
2738
2739
|
left: Ge.value.left,
|
|
2739
2740
|
top: Ge.value.top,
|
|
@@ -2742,21 +2743,21 @@ const yr = {
|
|
|
2742
2743
|
}),
|
|
2743
2744
|
"data-position": mt.value
|
|
2744
2745
|
}, [
|
|
2745
|
-
A(m.$slots, "tooltip-node", B(V({ node:
|
|
2746
|
-
|
|
2746
|
+
A(m.$slots, "tooltip-node", B(V({ node: ge.value, layoutData: v(E) })), () => [
|
|
2747
|
+
ge.value ? (y(), _("div", Yr, ae(ge.value.label), 1)) : S("", !0)
|
|
2747
2748
|
], !0)
|
|
2748
|
-
], 12,
|
|
2749
|
+
], 12, Wr)
|
|
2749
2750
|
], 8, ["to"])) : S("", !0)
|
|
2750
2751
|
]),
|
|
2751
2752
|
_: 3
|
|
2752
2753
|
}),
|
|
2753
|
-
u.value.style.chart.controls.position === "bottom" && !v(
|
|
2754
|
+
u.value.style.chart.controls.position === "bottom" && !v(be) && u.value.style.chart.controls.show ? (y(), X(no, {
|
|
2754
2755
|
key: 7,
|
|
2755
2756
|
ref_key: "zoomControls",
|
|
2756
2757
|
ref: x,
|
|
2757
2758
|
config: u.value,
|
|
2758
2759
|
scale: v(Tt),
|
|
2759
|
-
isFullscreen:
|
|
2760
|
+
isFullscreen: ee.value,
|
|
2760
2761
|
withDirection: "",
|
|
2761
2762
|
onZoomIn: He,
|
|
2762
2763
|
onZoomOut: Ze,
|
|
@@ -2771,19 +2772,19 @@ const yr = {
|
|
|
2771
2772
|
}, [
|
|
2772
2773
|
A(m.$slots, "source", {}, void 0, !0)
|
|
2773
2774
|
], 512)) : S("", !0),
|
|
2774
|
-
v(
|
|
2775
|
-
], 46,
|
|
2775
|
+
v(be) ? (y(), X(pn, { key: 9 })) : S("", !0)
|
|
2776
|
+
], 46, Er));
|
|
2776
2777
|
}
|
|
2777
|
-
},
|
|
2778
|
+
}, Zr = /* @__PURE__ */ io(Hr, [["__scopeId", "data-v-93884fd9"]]), mi = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
2778
2779
|
__proto__: null,
|
|
2779
|
-
default:
|
|
2780
|
+
default: Zr
|
|
2780
2781
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
2781
2782
|
export {
|
|
2782
|
-
|
|
2783
|
-
|
|
2784
|
-
|
|
2785
|
-
|
|
2786
|
-
|
|
2787
|
-
|
|
2788
|
-
|
|
2783
|
+
ui as a,
|
|
2784
|
+
mi as b,
|
|
2785
|
+
di as d,
|
|
2786
|
+
yr as l,
|
|
2787
|
+
hi as m,
|
|
2788
|
+
fi as s,
|
|
2789
|
+
Zr as v
|
|
2789
2790
|
};
|