vue-data-ui 3.22.13 → 3.23.0
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/LICENSE +1 -1
- package/README.md +13 -1
- package/dist/{Arrow-DKx74WtM.js → Arrow-o2qHNvrC.js} +1 -1
- package/dist/{BaseDraggableDialog-3n8udWmh.js → BaseDraggableDialog-qTnfhLBz.js} +2 -2
- package/dist/{BaseIcon-CP5RWnqt.js → BaseIcon-91MZoczJ.js} +4 -3
- package/dist/{BaseLegendToggle-DsWphmIb.js → BaseLegendToggle-CtAPwzr2.js} +1 -1
- package/dist/{BaseZoomControls-C9_ygNN4.js → BaseZoomControls-rdzlicuz.js} +2 -2
- package/dist/{ColorPicker-3N_HVgXs.js → ColorPicker-CIAkdPrj.js} +2 -2
- package/dist/{DataTable-DzPEVvSo.js → DataTable-D4tM9s5Y.js} +2 -2
- package/dist/HillActions-BWhxHlrj.js +187 -0
- package/dist/{Legend-C0xAnJdO.js → Legend-CQTRlzK-.js} +2 -2
- package/dist/{NonSvgPenAndPaper-B_mE5UbR.js → NonSvgPenAndPaper-Cawacw1W.js} +19 -19
- package/dist/{PackageVersion-B6Hokxw9.js → PackageVersion--QCMh5k_.js} +1 -1
- package/dist/{PenAndPaper-CSMVXpg2.js → PenAndPaper-cE4J8-rA.js} +11 -11
- package/dist/{Shape-BfnXr1nJ.js → Shape-BPMV94Ij.js} +3 -3
- package/dist/{Slicer-C6qNUmZ4.js → Slicer-5yIrdoJv.js} +15 -15
- package/dist/SlicerPreview-DvjLV2TW.js +1689 -0
- package/dist/{SparkTooltip-uoUiL_P8.js → SparkTooltip-BaYtEKS6.js} +6 -6
- package/dist/Title-BODtwViI.js +87 -0
- package/dist/{Tooltip-CA1rtSyl.js → Tooltip-CMTGxeYO.js} +1 -1
- package/dist/{UserOptions-DzAFK9cY.js → UserOptions-3ujTo3LD.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-bump.js +1 -1
- package/dist/components/vue-ui-candlestick.js +1 -1
- package/dist/components/vue-ui-carousel-table.js +1 -1
- package/dist/components/vue-ui-chestnut.js +1 -1
- package/dist/components/vue-ui-chord.js +1 -1
- package/dist/components/vue-ui-circle-pack.js +1 -1
- package/dist/components/vue-ui-cursor.js +1 -1
- package/dist/components/vue-ui-dag.js +1 -1
- package/dist/components/vue-ui-dashboard.js +1 -1
- package/dist/components/vue-ui-digits.js +1 -1
- package/dist/components/vue-ui-donut-evolution.js +1 -1
- package/dist/components/vue-ui-donut.js +1 -1
- package/dist/components/vue-ui-dumbbell.js +1 -1
- package/dist/components/vue-ui-flow.js +1 -1
- package/dist/components/vue-ui-funnel.js +1 -1
- package/dist/components/vue-ui-galaxy.js +1 -1
- package/dist/components/vue-ui-gauge.js +1 -1
- package/dist/components/vue-ui-geo.js +1 -1
- package/dist/components/vue-ui-gizmo.js +1 -1
- package/dist/components/vue-ui-heatmap.js +1 -1
- package/dist/components/vue-ui-hill.js +2 -0
- 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-BdAFKZQg.js → dom-to-png-4tdMNGPX.js} +1 -1
- package/dist/exposedLib-DWLRqRhv.js +25 -0
- package/dist/{img-Bikk1dGb.js → img-DIQG5q8T.js} +1 -1
- package/dist/{labelUtils-BUhssos9.js → labelUtils-C5lnc_xc.js} +1 -1
- package/dist/{lib-CFm_J26b.js → lib-BuMGJ_a0.js} +216 -173
- package/dist/{package-DmDydylu.js → package-BMc_ZieJ.js} +1 -1
- package/dist/{pdf-zmz3l2uy.js → pdf-Cnz4NKM9.js} +1 -1
- package/dist/{render-common-BIG8JYGK.js → render-common-Ktg2LZFG.js} +21 -21
- package/dist/ssr/vue-ui-donut.js +1 -1
- package/dist/ssr/vue-ui-xy.js +1 -1
- package/dist/ssr.js +2 -2
- package/dist/style.css +1 -1
- package/dist/types/vue-data-ui.d.ts +493 -0
- package/dist/types/vue-ui-hill.d.ts +90 -0
- package/dist/useAutoSizeLabelsInsideViewbox-DvDwcwi_.js +122 -0
- package/dist/{useConfig-C0V0eG7L.js → useConfig-BilxnBNr.js} +767 -476
- package/dist/useHints-Dq_w2E8B.js +66 -0
- package/dist/{useNestedProp-BY6DNN3i.js → useNestedProp--NSEmhOH.js} +1 -1
- package/dist/{useObjectBindings-Djwpii4d.js → useObjectBindings-Cwq7NcQz.js} +3 -2
- package/dist/{usePrinter-BH-xle1O.js → usePrinter-BFvi4jVy.js} +2 -2
- package/dist/useTransitions-g_zBREk2.js +39 -0
- package/dist/utils.js +14 -14
- package/dist/{vue-data-ui-rkzh6EkO.js → vue-data-ui-EsawKe_W.js} +85 -81
- package/dist/vue-data-ui.js +77 -76
- package/dist/vue-ui-3d-bar-RSUS2xpL.js +1849 -0
- package/dist/{vue-ui-accordion-UA88lv4d.js → vue-ui-accordion-61MlW-Ge.js} +4 -4
- package/dist/vue-ui-age-pyramid-CgnPWA93.js +1263 -0
- package/dist/vue-ui-annotator-DBRT85HG.js +2913 -0
- package/dist/vue-ui-bullet-Bc3-WaN1.js +724 -0
- package/dist/{vue-ui-bump-BS7RCf0Z.js → vue-ui-bump-Dvv3iSKr.js} +332 -295
- package/dist/{vue-ui-candlestick-BZSGDKrM.js → vue-ui-candlestick-DvvsrIdp.js} +464 -440
- package/dist/vue-ui-carousel-table-DtsNVim8.js +463 -0
- package/dist/vue-ui-chestnut-ArloORzP.js +2068 -0
- package/dist/{vue-ui-chord-D6G7ceE-.js → vue-ui-chord-xX5gWZy8.js} +430 -424
- package/dist/vue-ui-circle-pack-D8wykmqg.js +1638 -0
- package/dist/{vue-ui-cursor-BpN5MsXM.js → vue-ui-cursor-CxgE6Phh.js} +61 -61
- package/dist/{vue-ui-dag-BzgOgXzU.js → vue-ui-dag-C9Sf9vH7.js} +924 -916
- package/dist/vue-ui-dashboard-bGmaglAj.js +520 -0
- package/dist/{vue-ui-digits-OMPrn8fb.js → vue-ui-digits-DgDE-_Fn.js} +58 -50
- package/dist/vue-ui-donut-B_n6wF6B.js +2440 -0
- package/dist/{vue-ui-donut-Cp5NbZ1r.js → vue-ui-donut-Bmo149AR.js} +113 -113
- package/dist/{vue-ui-donut-evolution-DHVi5rOn.js → vue-ui-donut-evolution-D6vH_hfx.js} +528 -447
- package/dist/vue-ui-dumbbell-BX4Ao_wR.js +1582 -0
- package/dist/{vue-ui-flow-BusUK3H0.js → vue-ui-flow-Bshw8pT_.js} +415 -407
- package/dist/vue-ui-funnel-CjYosIik.js +797 -0
- package/dist/vue-ui-galaxy-CvXgy-dy.js +1111 -0
- package/dist/vue-ui-gauge-CByT0_vF.js +953 -0
- package/dist/{vue-ui-geo-CyFgFKlh.js → vue-ui-geo-C-gSZL2q.js} +378 -363
- package/dist/{vue-ui-gizmo-DdeXwCQp.js → vue-ui-gizmo-CJdxyPID.js} +57 -49
- package/dist/{vue-ui-heatmap-D8-qJ7fg.js → vue-ui-heatmap-DEEKv8ip.js} +498 -490
- package/dist/vue-ui-hill-D7LYAgAL.js +1768 -0
- package/dist/{vue-ui-history-plot-C2Aqk2ON.js → vue-ui-history-plot-BhcU94Pt.js} +553 -556
- package/dist/vue-ui-horizontal-bar-CfFye5tL.js +1733 -0
- package/dist/vue-ui-kpi-DCBnNfTb.js +104 -0
- package/dist/vue-ui-mini-loader-CtWpqnLW.js +133 -0
- package/dist/vue-ui-molecule-D3igGyOy.js +958 -0
- package/dist/{vue-ui-mood-radar-BiOjxFEN.js → vue-ui-mood-radar-sl6DMxqR.js} +349 -341
- package/dist/{vue-ui-nested-donuts-Cl1HVvDp.js → vue-ui-nested-donuts-aS4YzaB3.js} +449 -413
- package/dist/vue-ui-onion-EhPTZpW_.js +1258 -0
- package/dist/vue-ui-parallel-coordinate-plot-DE9wTmQQ.js +1455 -0
- package/dist/{vue-ui-quadrant-B21LkUc8.js → vue-ui-quadrant-SaY_RPSE.js} +625 -617
- package/dist/vue-ui-quick-chart-CJ9rejnj.js +2389 -0
- package/dist/{vue-ui-radar-CyzAyVos.js → vue-ui-radar-CaNen5Fj.js} +356 -310
- package/dist/vue-ui-rating--K7rX2an.js +360 -0
- package/dist/vue-ui-relation-circle-FLs8vOxQ.js +925 -0
- package/dist/vue-ui-ridgeline-Beg5hshN.js +1663 -0
- package/dist/{vue-ui-rings-FtcdX8xl.js → vue-ui-rings-BevKD8P-.js} +449 -423
- package/dist/{vue-ui-scatter-Cp_-2ahf.js → vue-ui-scatter-CNA7jF-o.js} +721 -702
- package/dist/{vue-ui-skeleton-COytVrfN.js → vue-ui-skeleton-B9ZP1w-i.js} +395 -387
- package/dist/{vue-ui-smiley-Da2jgkb7.js → vue-ui-smiley-DYnqqk6u.js} +128 -120
- package/dist/{vue-ui-spark-trend-DC2KUlEY.js → vue-ui-spark-trend-R0ebpg-G.js} +132 -117
- package/dist/{vue-ui-sparkbar-DdxQOFIF.js → vue-ui-sparkbar-DYC3By0v.js} +119 -111
- package/dist/{vue-ui-sparkgauge-DTA-fORH.js → vue-ui-sparkgauge-Bw6no-In.js} +76 -68
- package/dist/vue-ui-sparkhistogram-DvRKy8rq.js +590 -0
- package/dist/{vue-ui-sparkline-DcR_N-zT.js → vue-ui-sparkline-Dz1uzBos.js} +389 -364
- package/dist/vue-ui-sparkstackbar-DlnPdZih.js +692 -0
- package/dist/vue-ui-stackbar-B-THcavY.js +2350 -0
- package/dist/vue-ui-stackline-3dBPoI0h.js +2464 -0
- package/dist/{vue-ui-strip-plot-NLCwYvyw.js → vue-ui-strip-plot-ACeYOoHj.js} +505 -484
- package/dist/vue-ui-table-heatmap-DVwMqzje.js +364 -0
- package/dist/{vue-ui-table-AM9brdwU.js → vue-ui-table-rFy16bp0.js} +512 -504
- package/dist/{vue-ui-table-sparkline-BE6DAvur.js → vue-ui-table-sparkline-CABJzK8p.js} +207 -181
- package/dist/vue-ui-thermometer-CVQ-H69Q.js +777 -0
- package/dist/{vue-ui-timer-BZM5ITG9.js → vue-ui-timer-Bm8LpsnI.js} +66 -58
- package/dist/{vue-ui-tiremarks-BCncDpHX.js → vue-ui-tiremarks-DB3f5qiz.js} +127 -119
- package/dist/vue-ui-treemap-DP0Sx8Y8.js +1760 -0
- package/dist/vue-ui-waffle-iPpdk1Bm.js +1412 -0
- package/dist/vue-ui-wheel-BJkEYfLj.js +892 -0
- package/dist/{vue-ui-word-cloud-D7R7nhk1.js → vue-ui-word-cloud-B2sxtel9.js} +440 -432
- package/dist/{vue-ui-world-DZBt-07p.js → vue-ui-world-BBQZLnzm.js} +343 -335
- package/dist/vue-ui-xy-ChZg7AtI.js +1364 -0
- package/dist/{vue-ui-xy-CluEZ7lS.js → vue-ui-xy-DZj5DT-q.js} +1633 -1587
- package/dist/{vue-ui-xy-canvas-7YSYRdwr.js → vue-ui-xy-canvas-BN2u0bOJ.js} +456 -430
- package/dist/vue_ui_hill-dnltu0L-.js +368 -0
- package/package.json +2 -2
- package/dist/SlicerPreview-Cw6WMVhG.js +0 -1689
- package/dist/Title-BuPs74IB.js +0 -87
- package/dist/exposedLib-Ciw6TGtP.js +0 -25
- package/dist/useAutoSizeLabelsInsideViewbox-C9RNjsGv.js +0 -50
- package/dist/useMountedDelay-BAjrhRJb.js +0 -14
- package/dist/vue-ui-3d-bar-D5xHEWr1.js +0 -1824
- package/dist/vue-ui-age-pyramid-CAJg01c7.js +0 -1246
- package/dist/vue-ui-annotator-q3ZKx6ua.js +0 -2905
- package/dist/vue-ui-bullet-ByeaWGfI.js +0 -709
- package/dist/vue-ui-carousel-table-DO5NRXvX.js +0 -455
- package/dist/vue-ui-chestnut-BfeSPeEh.js +0 -2042
- package/dist/vue-ui-circle-pack-Cqmlw7AV.js +0 -1610
- package/dist/vue-ui-dashboard-DLvGJXJY.js +0 -512
- package/dist/vue-ui-donut-ZIRebAWc.js +0 -2418
- package/dist/vue-ui-dumbbell-gDYjU2oF.js +0 -1564
- package/dist/vue-ui-funnel-BtaYaU0r.js +0 -781
- package/dist/vue-ui-galaxy-BMp-HzDh.js +0 -1076
- package/dist/vue-ui-gauge-CBou0cFE.js +0 -925
- package/dist/vue-ui-horizontal-bar-BuwxI7d1.js +0 -1689
- package/dist/vue-ui-kpi-ByxoO01r.js +0 -96
- package/dist/vue-ui-mini-loader-D9pprk2c.js +0 -125
- package/dist/vue-ui-molecule-BqJJq49_.js +0 -932
- package/dist/vue-ui-onion-CRQOxurS.js +0 -1199
- package/dist/vue-ui-parallel-coordinate-plot-Dhn18RtR.js +0 -1412
- package/dist/vue-ui-quick-chart-DAhSXYnp.js +0 -2443
- package/dist/vue-ui-rating-DbxK-ftN.js +0 -352
- package/dist/vue-ui-relation-circle-Cb33DMZo.js +0 -917
- package/dist/vue-ui-ridgeline-D7aArzQk.js +0 -1627
- package/dist/vue-ui-sparkhistogram-D1oFTrvt.js +0 -575
- package/dist/vue-ui-sparkstackbar-BlFio0lP.js +0 -674
- package/dist/vue-ui-stackbar-Cu13EdVa.js +0 -2322
- package/dist/vue-ui-stackline-DKL0o_-3.js +0 -2427
- package/dist/vue-ui-table-heatmap-CSI482KG.js +0 -338
- package/dist/vue-ui-thermometer-D6Czx7Fb.js +0 -769
- package/dist/vue-ui-treemap-BOEYCOdk.js +0 -1727
- package/dist/vue-ui-waffle-BrM8IHdG.js +0 -1367
- package/dist/vue-ui-wheel-BNsajigQ.js +0 -884
- package/dist/vue-ui-xy-Dt_1bSBT.js +0 -1364
|
@@ -1,24 +1,25 @@
|
|
|
1
1
|
import { t as e } from "./rolldown-runtime-Dy4uBu1J.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { t as
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import { t as
|
|
8
|
-
import { t as
|
|
9
|
-
import { t as
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import { t as
|
|
15
|
-
import { t as
|
|
16
|
-
import { t as
|
|
17
|
-
import { t as
|
|
18
|
-
import { t as
|
|
19
|
-
import {
|
|
2
|
+
import { Jt as t, K as n, S as r, gt as i, jt as a, q as o, t as s, tt as c } from "./lib-BuMGJ_a0.js";
|
|
3
|
+
import { n as l, t as u } from "./useHints-Dq_w2E8B.js";
|
|
4
|
+
import { t as d } from "./useConfig-BilxnBNr.js";
|
|
5
|
+
import { t as f } from "./usePrinter-BFvi4jVy.js";
|
|
6
|
+
import { n as p, t as m } from "./BaseScanner-DZvpgOjM.js";
|
|
7
|
+
import { t as h } from "./useSvgExport-Ba9qBr9M.js";
|
|
8
|
+
import { t as g } from "./useNestedProp--NSEmhOH.js";
|
|
9
|
+
import { t as ee } from "./useThemeCheck-C43Tcqmk.js";
|
|
10
|
+
import { t as te } from "./img-DIQG5q8T.js";
|
|
11
|
+
import { n as ne } from "./Title-BODtwViI.js";
|
|
12
|
+
import { t as re } from "./_plugin-vue_export-helper-B3ysoDQm.js";
|
|
13
|
+
import { l as ie, t as ae } from "./useResponsive-ZtArZtUf.js";
|
|
14
|
+
import { t as oe } from "./A11yDataTable-DdRsVULz.js";
|
|
15
|
+
import { t as se } from "./useUserOptionState-DK-_1ddE.js";
|
|
16
|
+
import { t as ce } from "./useChartAccessibility-DYqac8yF.js";
|
|
17
|
+
import { t as le } from "./usePanZoom-CYU3B4T3.js";
|
|
18
|
+
import { t as ue } from "./BaseZoomControls-rdzlicuz.js";
|
|
19
|
+
import { t as de } from "./vue_ui_dag-TsJ_azQq.js";
|
|
20
|
+
import { Fragment as fe, Teleport as pe, Transition as me, computed as _, createBlock as he, createCommentVNode as v, createElementBlock as y, createElementVNode as b, createSlots as ge, createTextVNode as _e, createVNode as ve, defineAsyncComponent as ye, guardReactiveProps as x, mergeProps as be, nextTick as xe, normalizeClass as Se, normalizeProps as S, normalizeStyle as Ce, onBeforeUnmount as we, onMounted as Te, openBlock as C, ref as w, renderList as Ee, renderSlot as T, toDisplayString as De, toRefs as Oe, unref as E, watch as ke, watchEffect as Ae, withCtx as D, withModifiers as je } from "vue";
|
|
20
21
|
//#region src/DAG/graph.js
|
|
21
|
-
var
|
|
22
|
+
var Me = "\0", Ne = "\0", Pe = "", O = class {
|
|
22
23
|
_isDirected = !0;
|
|
23
24
|
_isMultigraph = !1;
|
|
24
25
|
_isCompound = !1;
|
|
@@ -37,7 +38,7 @@ var ke = "\0", Ae = "\0", je = "", k = class {
|
|
|
37
38
|
_parent;
|
|
38
39
|
_children;
|
|
39
40
|
constructor(e) {
|
|
40
|
-
e && (this._isDirected = !Object.hasOwn(e, "directed") || e.directed, this._isMultigraph = Object.hasOwn(e, "multigraph") ? e.multigraph : !1, this._isCompound = Object.hasOwn(e, "compound") ? e.compound : !1), this._isCompound && (this._parent = {}, this._children = {}, this._children[
|
|
41
|
+
e && (this._isDirected = !Object.hasOwn(e, "directed") || e.directed, this._isMultigraph = Object.hasOwn(e, "multigraph") ? e.multigraph : !1, this._isCompound = Object.hasOwn(e, "compound") ? e.compound : !1), this._isCompound && (this._parent = {}, this._children = {}, this._children[Ne] = {});
|
|
41
42
|
}
|
|
42
43
|
isDirected() {
|
|
43
44
|
return this._isDirected;
|
|
@@ -78,7 +79,7 @@ var ke = "\0", Ae = "\0", je = "", k = class {
|
|
|
78
79
|
}), this;
|
|
79
80
|
}
|
|
80
81
|
setNode(e, t) {
|
|
81
|
-
return Object.hasOwn(this._nodes, e) ? (arguments.length > 1 && (this._nodes[e] = t), this) : (this._nodes[e] = arguments.length > 1 ? t : this._defaultNodeLabelFn(e), this._isCompound && (this._parent[e] =
|
|
82
|
+
return Object.hasOwn(this._nodes, e) ? (arguments.length > 1 && (this._nodes[e] = t), this) : (this._nodes[e] = arguments.length > 1 ? t : this._defaultNodeLabelFn(e), this._isCompound && (this._parent[e] = Ne, this._children[e] = {}, this._children[Ne][e] = !0), this._in[e] = {}, this._preds[e] = {}, this._out[e] = {}, this._sucs[e] = {}, ++this._nodeCount, this);
|
|
82
83
|
}
|
|
83
84
|
node(e) {
|
|
84
85
|
return this._nodes[e];
|
|
@@ -98,7 +99,7 @@ var ke = "\0", Ae = "\0", je = "", k = class {
|
|
|
98
99
|
}
|
|
99
100
|
setParent(e, t) {
|
|
100
101
|
if (!this._isCompound) throw Error("Cannot set parent in a non-compound graph");
|
|
101
|
-
if (t === void 0) t =
|
|
102
|
+
if (t === void 0) t = Ne;
|
|
102
103
|
else {
|
|
103
104
|
t += "";
|
|
104
105
|
for (let n = t; n !== void 0; n = this.parent(n)) if (n === e) throw Error("Setting " + t + " as parent of " + e + " would create a cycle");
|
|
@@ -112,14 +113,14 @@ var ke = "\0", Ae = "\0", je = "", k = class {
|
|
|
112
113
|
parent(e) {
|
|
113
114
|
if (this._isCompound) {
|
|
114
115
|
let t = this._parent[e];
|
|
115
|
-
if (t !==
|
|
116
|
+
if (t !== Ne) return t;
|
|
116
117
|
}
|
|
117
118
|
}
|
|
118
|
-
children(e =
|
|
119
|
+
children(e = Ne) {
|
|
119
120
|
if (this._isCompound) {
|
|
120
121
|
let t = this._children[e];
|
|
121
122
|
if (t) return Object.keys(t);
|
|
122
|
-
} else if (e ===
|
|
123
|
+
} else if (e === Ne) return this.nodes();
|
|
123
124
|
else if (this.hasNode(e)) return [];
|
|
124
125
|
}
|
|
125
126
|
predecessors(e) {
|
|
@@ -178,15 +179,15 @@ var ke = "\0", Ae = "\0", je = "", k = class {
|
|
|
178
179
|
setEdge() {
|
|
179
180
|
let e, t, n, r, i = !1, a = arguments[0];
|
|
180
181
|
typeof a == "object" && a && "v" in a ? (e = a.v, t = a.w, n = a.name, arguments.length === 2 && (r = arguments[1], i = !0)) : (e = a, t = arguments[1], n = arguments[3], arguments.length > 2 && (r = arguments[2], i = !0)), e = "" + e, t = "" + t, n !== void 0 && (n = "" + n);
|
|
181
|
-
let o =
|
|
182
|
+
let o = A(this._isDirected, e, t, n);
|
|
182
183
|
if (Object.hasOwn(this._edgeLabels, o)) return i && (this._edgeLabels[o] = r), this;
|
|
183
184
|
if (n !== void 0 && !this._isMultigraph) throw Error("Cannot set a named edge when isMultigraph = false");
|
|
184
185
|
this.setNode(e), this.setNode(t), this._edgeLabels[o] = i ? r : this._defaultEdgeLabelFn(e, t, n);
|
|
185
|
-
let s =
|
|
186
|
-
return e = s.v, t = s.w, Object.freeze(s), this._edgeObjs[o] = s,
|
|
186
|
+
let s = j(this._isDirected, e, t, n);
|
|
187
|
+
return e = s.v, t = s.w, Object.freeze(s), this._edgeObjs[o] = s, Fe(this._preds[t], e), Fe(this._sucs[e], t), this._in[t][o] = s, this._out[e][o] = s, this._edgeCount++, this;
|
|
187
188
|
}
|
|
188
189
|
edge(e, t, n) {
|
|
189
|
-
let r = arguments.length === 1 ?
|
|
190
|
+
let r = arguments.length === 1 ? M(this._isDirected, arguments[0]) : A(this._isDirected, e, t, n);
|
|
190
191
|
return this._edgeLabels[r];
|
|
191
192
|
}
|
|
192
193
|
edgeAsObj() {
|
|
@@ -194,12 +195,12 @@ var ke = "\0", Ae = "\0", je = "", k = class {
|
|
|
194
195
|
return typeof e == "object" ? e : { label: e };
|
|
195
196
|
}
|
|
196
197
|
hasEdge(e, t, n) {
|
|
197
|
-
let r = arguments.length === 1 ?
|
|
198
|
+
let r = arguments.length === 1 ? M(this._isDirected, arguments[0]) : A(this._isDirected, e, t, n);
|
|
198
199
|
return Object.hasOwn(this._edgeLabels, r);
|
|
199
200
|
}
|
|
200
201
|
removeEdge(e, t, n) {
|
|
201
|
-
let r = arguments.length === 1 ?
|
|
202
|
-
return i && (e = i.v, t = i.w, delete this._edgeLabels[r], delete this._edgeObjs[r],
|
|
202
|
+
let r = arguments.length === 1 ? M(this._isDirected, arguments[0]) : A(this._isDirected, e, t, n), i = this._edgeObjs[r];
|
|
203
|
+
return i && (e = i.v, t = i.w, delete this._edgeLabels[r], delete this._edgeObjs[r], k(this._preds[t], e), k(this._sucs[e], t), delete this._in[t][r], delete this._out[e][r], this._edgeCount--), this;
|
|
203
204
|
}
|
|
204
205
|
inEdges(e, t) {
|
|
205
206
|
let n = this._in[e];
|
|
@@ -220,21 +221,21 @@ var ke = "\0", Ae = "\0", je = "", k = class {
|
|
|
220
221
|
if (n) return n.concat(this.outEdges(e, t));
|
|
221
222
|
}
|
|
222
223
|
};
|
|
223
|
-
function
|
|
224
|
+
function Fe(e, t) {
|
|
224
225
|
e[t] ? e[t]++ : e[t] = 1;
|
|
225
226
|
}
|
|
226
|
-
function
|
|
227
|
+
function k(e, t) {
|
|
227
228
|
--e[t] || delete e[t];
|
|
228
229
|
}
|
|
229
|
-
function
|
|
230
|
+
function A(e, t, n, r) {
|
|
230
231
|
let i = "" + t, a = "" + n;
|
|
231
232
|
if (!e && i > a) {
|
|
232
233
|
let e = i;
|
|
233
234
|
i = a, a = e;
|
|
234
235
|
}
|
|
235
|
-
return i +
|
|
236
|
+
return i + Pe + a + Pe + (r === void 0 ? Me : r);
|
|
236
237
|
}
|
|
237
|
-
function
|
|
238
|
+
function j(e, t, n, r) {
|
|
238
239
|
let i = "" + t, a = "" + n;
|
|
239
240
|
if (!e && i > a) {
|
|
240
241
|
let e = i;
|
|
@@ -246,73 +247,73 @@ function M(e, t, n, r) {
|
|
|
246
247
|
};
|
|
247
248
|
return r && (o.name = r), o;
|
|
248
249
|
}
|
|
249
|
-
function
|
|
250
|
-
return
|
|
250
|
+
function M(e, t) {
|
|
251
|
+
return A(e, t.v, t.w, t.name);
|
|
251
252
|
}
|
|
252
253
|
//#endregion
|
|
253
254
|
//#region src/DAG/data/list.js
|
|
254
|
-
var
|
|
255
|
+
var Ie = class {
|
|
255
256
|
constructor() {
|
|
256
257
|
let e = {};
|
|
257
258
|
e._next = e._prev = e, this._sentinel = e;
|
|
258
259
|
}
|
|
259
260
|
dequeue() {
|
|
260
261
|
let e = this._sentinel, t = e._prev;
|
|
261
|
-
if (t !== e) return
|
|
262
|
+
if (t !== e) return Le(t), t;
|
|
262
263
|
}
|
|
263
264
|
enqueue(e) {
|
|
264
265
|
let t = this._sentinel;
|
|
265
|
-
e._prev && e._next &&
|
|
266
|
+
e._prev && e._next && Le(e), e._next = t._next, t._next._prev = e, t._next = e, e._prev = t;
|
|
266
267
|
}
|
|
267
268
|
toString() {
|
|
268
269
|
let e = [], t = this._sentinel, n = t._prev;
|
|
269
|
-
for (; n !== t;) e.push(JSON.stringify(n,
|
|
270
|
+
for (; n !== t;) e.push(JSON.stringify(n, Re)), n = n._prev;
|
|
270
271
|
return "[" + e.join(", ") + "]";
|
|
271
272
|
}
|
|
272
273
|
};
|
|
273
|
-
function
|
|
274
|
+
function Le(e) {
|
|
274
275
|
e._prev._next = e._next, e._next._prev = e._prev, delete e._next, delete e._prev;
|
|
275
276
|
}
|
|
276
|
-
function
|
|
277
|
+
function Re(e, t) {
|
|
277
278
|
if (e !== "_next" && e !== "_prev") return t;
|
|
278
279
|
}
|
|
279
280
|
//#endregion
|
|
280
281
|
//#region src/DAG/greedy-fas.js
|
|
281
|
-
var
|
|
282
|
-
function
|
|
282
|
+
var ze = () => 1;
|
|
283
|
+
function Be(e, t) {
|
|
283
284
|
if (e.nodeCount() <= 1) return [];
|
|
284
|
-
let n =
|
|
285
|
-
return
|
|
285
|
+
let n = Ue(e, t || ze);
|
|
286
|
+
return Ve(n.graph, n.buckets, n.zeroIndex).flatMap((t) => e.outEdges(t.v, t.w));
|
|
286
287
|
}
|
|
287
|
-
function
|
|
288
|
+
function Ve(e, t, n) {
|
|
288
289
|
let r = [], i = t[t.length - 1], a = t[0], o;
|
|
289
290
|
for (; e.nodeCount();) {
|
|
290
|
-
for (; o = a.dequeue();)
|
|
291
|
-
for (; o = i.dequeue();)
|
|
291
|
+
for (; o = a.dequeue();) He(e, t, n, o);
|
|
292
|
+
for (; o = i.dequeue();) He(e, t, n, o);
|
|
292
293
|
if (e.nodeCount()) {
|
|
293
294
|
for (let i = t.length - 2; i > 0; --i) if (o = t[i].dequeue(), o) {
|
|
294
|
-
r = r.concat(
|
|
295
|
+
r = r.concat(He(e, t, n, o, !0));
|
|
295
296
|
break;
|
|
296
297
|
}
|
|
297
298
|
}
|
|
298
299
|
}
|
|
299
300
|
return r;
|
|
300
301
|
}
|
|
301
|
-
function
|
|
302
|
+
function He(e, t, n, r, i) {
|
|
302
303
|
let a = i ? [] : void 0;
|
|
303
304
|
return e.inEdges(r.v).forEach((r) => {
|
|
304
305
|
let o = e.edge(r), s = e.node(r.v);
|
|
305
306
|
i && a.push({
|
|
306
307
|
v: r.v,
|
|
307
308
|
w: r.w
|
|
308
|
-
}), s.out -= o,
|
|
309
|
+
}), s.out -= o, We(t, n, s);
|
|
309
310
|
}), e.outEdges(r.v).forEach((r) => {
|
|
310
311
|
let i = e.edge(r), a = e.node(r.w);
|
|
311
|
-
a.in -= i,
|
|
312
|
+
a.in -= i, We(t, n, a);
|
|
312
313
|
}), e.removeNode(r.v), a;
|
|
313
314
|
}
|
|
314
|
-
function
|
|
315
|
-
let n = new
|
|
315
|
+
function Ue(e, t) {
|
|
316
|
+
let n = new O(), r = 0, i = 0;
|
|
316
317
|
e.nodes().forEach((e) => {
|
|
317
318
|
n.setNode(e, {
|
|
318
319
|
v: e,
|
|
@@ -323,32 +324,32 @@ function Be(e, t) {
|
|
|
323
324
|
let a = n.edge(e.v, e.w) || 0, o = t(e), s = a + o;
|
|
324
325
|
n.setEdge(e.v, e.w, s), i = Math.max(i, n.node(e.v).out += o), r = Math.max(r, n.node(e.w).in += o);
|
|
325
326
|
});
|
|
326
|
-
let a =
|
|
327
|
+
let a = N(i + r + 3).map(() => new Ie()), o = r + 1;
|
|
327
328
|
return n.nodes().forEach((e) => {
|
|
328
|
-
|
|
329
|
+
We(a, o, n.node(e));
|
|
329
330
|
}), {
|
|
330
331
|
graph: n,
|
|
331
332
|
buckets: a,
|
|
332
333
|
zeroIndex: o
|
|
333
334
|
};
|
|
334
335
|
}
|
|
335
|
-
function
|
|
336
|
+
function We(e, t, n) {
|
|
336
337
|
n.out ? n.in ? e[n.out - n.in + t].enqueue(n) : e[e.length - 1].enqueue(n) : e[0].enqueue(n);
|
|
337
338
|
}
|
|
338
|
-
function
|
|
339
|
+
function N(e) {
|
|
339
340
|
let t = [];
|
|
340
341
|
for (let n = 0; n < e; n++) t.push(n);
|
|
341
342
|
return t;
|
|
342
343
|
}
|
|
343
344
|
//#endregion
|
|
344
345
|
//#region src/DAG/util.js
|
|
345
|
-
function
|
|
346
|
+
function P(e, t, n, r) {
|
|
346
347
|
let i = r;
|
|
347
|
-
for (; e.hasNode(i);) i =
|
|
348
|
+
for (; e.hasNode(i);) i = V(r);
|
|
348
349
|
return n.dummy = t, e.setNode(i, n), i;
|
|
349
350
|
}
|
|
350
|
-
function
|
|
351
|
-
let t = new
|
|
351
|
+
function F(e) {
|
|
352
|
+
let t = new O().setGraph(e.graph());
|
|
352
353
|
return e.nodes().forEach((n) => {
|
|
353
354
|
t.setNode(n, e.node(n));
|
|
354
355
|
}), e.edges().forEach((n) => {
|
|
@@ -362,33 +363,33 @@ function I(e) {
|
|
|
362
363
|
});
|
|
363
364
|
}), t;
|
|
364
365
|
}
|
|
365
|
-
function
|
|
366
|
-
let t = new
|
|
366
|
+
function I(e) {
|
|
367
|
+
let t = new O({ multigraph: e.isMultigraph() }).setGraph(e.graph());
|
|
367
368
|
return e.nodes().forEach((n) => {
|
|
368
369
|
e.children(n).length || t.setNode(n, e.node(n));
|
|
369
370
|
}), e.edges().forEach((n) => {
|
|
370
371
|
t.setEdge(n, e.edge(n));
|
|
371
372
|
}), t;
|
|
372
373
|
}
|
|
373
|
-
function
|
|
374
|
+
function Ge(e) {
|
|
374
375
|
let t = e.nodes().map((t) => {
|
|
375
376
|
let n = {};
|
|
376
377
|
return e.outEdges(t).forEach((t) => {
|
|
377
378
|
n[t.w] = (n[t.w] || 0) + e.edge(t).weight;
|
|
378
379
|
}), n;
|
|
379
380
|
});
|
|
380
|
-
return
|
|
381
|
+
return U(e.nodes(), t);
|
|
381
382
|
}
|
|
382
|
-
function
|
|
383
|
+
function Ke(e) {
|
|
383
384
|
let t = e.nodes().map((t) => {
|
|
384
385
|
let n = {};
|
|
385
386
|
return e.inEdges(t).forEach((t) => {
|
|
386
387
|
n[t.v] = (n[t.v] || 0) + e.edge(t).weight;
|
|
387
388
|
}), n;
|
|
388
389
|
});
|
|
389
|
-
return
|
|
390
|
+
return U(e.nodes(), t);
|
|
390
391
|
}
|
|
391
|
-
function
|
|
392
|
+
function qe(e, t) {
|
|
392
393
|
let n = e.x, r = e.y, i = t.x - n, a = t.y - r, o = e.width / 2, s = e.height / 2;
|
|
393
394
|
if (!i && !a) throw Error("Not possible to find intersection inside of the rectangle");
|
|
394
395
|
let c, l;
|
|
@@ -397,25 +398,25 @@ function We(e, t) {
|
|
|
397
398
|
y: r + l
|
|
398
399
|
};
|
|
399
400
|
}
|
|
400
|
-
function
|
|
401
|
-
let t =
|
|
401
|
+
function L(e) {
|
|
402
|
+
let t = H(Qe(e) + 1).map(() => []);
|
|
402
403
|
return e.nodes().forEach((n) => {
|
|
403
404
|
let r = e.node(n), i = r.rank;
|
|
404
405
|
i !== void 0 && (t[i][r.order] = n);
|
|
405
406
|
}), t;
|
|
406
407
|
}
|
|
407
|
-
function
|
|
408
|
+
function Je(e) {
|
|
408
409
|
let t = e.nodes().map((t) => {
|
|
409
410
|
let n = e.node(t).rank;
|
|
410
411
|
return n === void 0 ? Number.MAX_VALUE : n;
|
|
411
|
-
}), n =
|
|
412
|
+
}), n = z(Math.min, t);
|
|
412
413
|
e.nodes().forEach((t) => {
|
|
413
414
|
let r = e.node(t);
|
|
414
415
|
Object.hasOwn(r, "rank") && (r.rank -= n);
|
|
415
416
|
});
|
|
416
417
|
}
|
|
417
|
-
function
|
|
418
|
-
let t = e.nodes().map((t) => e.node(t).rank).filter((e) => e !== void 0), n =
|
|
418
|
+
function Ye(e) {
|
|
419
|
+
let t = e.nodes().map((t) => e.node(t).rank).filter((e) => e !== void 0), n = z(Math.min, t), r = [];
|
|
419
420
|
e.nodes().forEach((t) => {
|
|
420
421
|
let i = e.node(t).rank - n;
|
|
421
422
|
r[i] || (r[i] = []), r[i].push(t);
|
|
@@ -427,15 +428,15 @@ function Ke(e) {
|
|
|
427
428
|
});
|
|
428
429
|
});
|
|
429
430
|
}
|
|
430
|
-
function
|
|
431
|
+
function Xe(e, t, n, r) {
|
|
431
432
|
let i = {
|
|
432
433
|
width: 0,
|
|
433
434
|
height: 0
|
|
434
435
|
};
|
|
435
|
-
return arguments.length >= 4 && (i.rank = n, i.order = r),
|
|
436
|
+
return arguments.length >= 4 && (i.rank = n, i.order = r), P(e, "border", i, t);
|
|
436
437
|
}
|
|
437
|
-
var
|
|
438
|
-
function
|
|
438
|
+
var Ze = 65535;
|
|
439
|
+
function R(e, t = Ze) {
|
|
439
440
|
let n = [];
|
|
440
441
|
for (let r = 0; r < e.length; r += t) {
|
|
441
442
|
let i = e.slice(r, r + t);
|
|
@@ -443,20 +444,20 @@ function z(e, t = Je) {
|
|
|
443
444
|
}
|
|
444
445
|
return n;
|
|
445
446
|
}
|
|
446
|
-
function
|
|
447
|
-
if (t.length >
|
|
448
|
-
let n =
|
|
447
|
+
function z(e, t) {
|
|
448
|
+
if (t.length > Ze) {
|
|
449
|
+
let n = R(t);
|
|
449
450
|
return e.apply(null, n.map((t) => e.apply(null, t)));
|
|
450
451
|
} else return e.apply(null, t);
|
|
451
452
|
}
|
|
452
|
-
function
|
|
453
|
+
function Qe(e) {
|
|
453
454
|
let t = e.nodes().map((t) => {
|
|
454
455
|
let n = e.node(t).rank;
|
|
455
456
|
return n === void 0 ? Number.MIN_VALUE : n;
|
|
456
457
|
});
|
|
457
|
-
return
|
|
458
|
+
return z(Math.max, t);
|
|
458
459
|
}
|
|
459
|
-
function
|
|
460
|
+
function $e(e, t) {
|
|
460
461
|
let n = {
|
|
461
462
|
lhs: [],
|
|
462
463
|
rhs: []
|
|
@@ -465,7 +466,7 @@ function Xe(e, t) {
|
|
|
465
466
|
t(e) ? n.lhs.push(e) : n.rhs.push(e);
|
|
466
467
|
}), n;
|
|
467
468
|
}
|
|
468
|
-
function
|
|
469
|
+
function B(e, t) {
|
|
469
470
|
let n = Date.now();
|
|
470
471
|
try {
|
|
471
472
|
return t();
|
|
@@ -473,15 +474,15 @@ function V(e, t) {
|
|
|
473
474
|
console.log(e + " time: " + (Date.now() - n) + "ms");
|
|
474
475
|
}
|
|
475
476
|
}
|
|
476
|
-
function
|
|
477
|
+
function et(e, t) {
|
|
477
478
|
return t();
|
|
478
479
|
}
|
|
479
|
-
var
|
|
480
|
-
function
|
|
481
|
-
let t = ++
|
|
480
|
+
var tt = 0;
|
|
481
|
+
function V(e) {
|
|
482
|
+
let t = ++tt;
|
|
482
483
|
return e + String(t);
|
|
483
484
|
}
|
|
484
|
-
function
|
|
485
|
+
function H(e, t, n = 1) {
|
|
485
486
|
t ?? (t = e, e = 0);
|
|
486
487
|
let r = (e) => e < t;
|
|
487
488
|
n < 0 && (r = (e) => t < e);
|
|
@@ -489,12 +490,12 @@ function U(e, t, n = 1) {
|
|
|
489
490
|
for (let t = e; r(t); t += n) i.push(t);
|
|
490
491
|
return i;
|
|
491
492
|
}
|
|
492
|
-
function
|
|
493
|
+
function nt(e, t) {
|
|
493
494
|
let n = {};
|
|
494
495
|
for (let r of t) e[r] !== void 0 && (n[r] = e[r]);
|
|
495
496
|
return n;
|
|
496
497
|
}
|
|
497
|
-
function
|
|
498
|
+
function rt(e, t) {
|
|
498
499
|
let n = t;
|
|
499
500
|
if (typeof t == "string") {
|
|
500
501
|
let e = t;
|
|
@@ -502,43 +503,43 @@ function et(e, t) {
|
|
|
502
503
|
}
|
|
503
504
|
return Object.entries(e).reduce((e, [t, r]) => (e[t] = n(r, t), e), {});
|
|
504
505
|
}
|
|
505
|
-
function
|
|
506
|
+
function U(e, t) {
|
|
506
507
|
return e.reduce((e, n, r) => (e[n] = t[r], e), {});
|
|
507
508
|
}
|
|
508
|
-
var
|
|
509
|
-
addBorderNode:
|
|
510
|
-
addDummyNode:
|
|
511
|
-
applyWithChunking:
|
|
512
|
-
asNonCompoundGraph:
|
|
513
|
-
buildLayerMatrix:
|
|
514
|
-
intersectRect:
|
|
515
|
-
mapValues:
|
|
516
|
-
maxRank:
|
|
517
|
-
normalizeRanks:
|
|
518
|
-
notime:
|
|
519
|
-
partition:
|
|
520
|
-
pick:
|
|
521
|
-
predecessorWeights:
|
|
522
|
-
range:
|
|
523
|
-
removeEmptyRanks:
|
|
524
|
-
simplify:
|
|
525
|
-
successorWeights:
|
|
526
|
-
time:
|
|
527
|
-
uniqueId:
|
|
528
|
-
zipObject:
|
|
509
|
+
var W = {
|
|
510
|
+
addBorderNode: Xe,
|
|
511
|
+
addDummyNode: P,
|
|
512
|
+
applyWithChunking: z,
|
|
513
|
+
asNonCompoundGraph: I,
|
|
514
|
+
buildLayerMatrix: L,
|
|
515
|
+
intersectRect: qe,
|
|
516
|
+
mapValues: rt,
|
|
517
|
+
maxRank: Qe,
|
|
518
|
+
normalizeRanks: Je,
|
|
519
|
+
notime: et,
|
|
520
|
+
partition: $e,
|
|
521
|
+
pick: nt,
|
|
522
|
+
predecessorWeights: Ke,
|
|
523
|
+
range: H,
|
|
524
|
+
removeEmptyRanks: Ye,
|
|
525
|
+
simplify: F,
|
|
526
|
+
successorWeights: Ge,
|
|
527
|
+
time: B,
|
|
528
|
+
uniqueId: V,
|
|
529
|
+
zipObject: U
|
|
529
530
|
};
|
|
530
531
|
//#endregion
|
|
531
532
|
//#region src/DAG/acyclic.js
|
|
532
|
-
function
|
|
533
|
-
(e.graph().acyclicer === "greedy" ?
|
|
533
|
+
function G(e) {
|
|
534
|
+
(e.graph().acyclicer === "greedy" ? Be(e, t(e)) : at(e)).forEach((t) => {
|
|
534
535
|
let n = e.edge(t);
|
|
535
|
-
e.removeEdge(t), n.forwardName = t.name, n.reversed = !0, e.setEdge(t.w, t.v, n,
|
|
536
|
+
e.removeEdge(t), n.forwardName = t.name, n.reversed = !0, e.setEdge(t.w, t.v, n, V("rev"));
|
|
536
537
|
});
|
|
537
538
|
function t(e) {
|
|
538
539
|
return (t) => e.edge(t).weight;
|
|
539
540
|
}
|
|
540
541
|
}
|
|
541
|
-
function
|
|
542
|
+
function it(e) {
|
|
542
543
|
e.edges().forEach((t) => {
|
|
543
544
|
let n = e.edge(t);
|
|
544
545
|
if (n.reversed) {
|
|
@@ -548,7 +549,7 @@ function tt(e) {
|
|
|
548
549
|
}
|
|
549
550
|
});
|
|
550
551
|
}
|
|
551
|
-
function
|
|
552
|
+
function at(e) {
|
|
552
553
|
let t = [], n = {}, r = {};
|
|
553
554
|
function i(a) {
|
|
554
555
|
Object.hasOwn(r, a) || (r[a] = !0, n[a] = !0, e.outEdges(a).forEach((e) => {
|
|
@@ -559,10 +560,10 @@ function nt(e) {
|
|
|
559
560
|
}
|
|
560
561
|
//#endregion
|
|
561
562
|
//#region src/DAG/normalize.js
|
|
562
|
-
function
|
|
563
|
-
e.graph().dummyChains = [], e.edges().forEach((t) =>
|
|
563
|
+
function ot(e) {
|
|
564
|
+
e.graph().dummyChains = [], e.edges().forEach((t) => K(e, t));
|
|
564
565
|
}
|
|
565
|
-
function
|
|
566
|
+
function K(e, t) {
|
|
566
567
|
let n = t.v, r = e.node(n).rank, i = t.w, a = e.node(i).rank, o = t.name, s = e.edge(t), c = s.labelRank;
|
|
567
568
|
if (a === r + 1) return;
|
|
568
569
|
e.removeEdge(t);
|
|
@@ -573,10 +574,10 @@ function q(e, t) {
|
|
|
573
574
|
edgeLabel: s,
|
|
574
575
|
edgeObj: t,
|
|
575
576
|
rank: r
|
|
576
|
-
}, l =
|
|
577
|
+
}, l = P(e, "edge", u, "_d"), r === c && (u.width = s.width, u.height = s.height, u.dummy = "edge-label", u.labelpos = s.labelpos), e.setEdge(n, l, { weight: s.weight }, o), d === 0 && e.graph().dummyChains.push(l), n = l;
|
|
577
578
|
e.setEdge(n, i, { weight: s.weight }, o);
|
|
578
579
|
}
|
|
579
|
-
function
|
|
580
|
+
function st(e) {
|
|
580
581
|
e.graph().dummyChains.forEach((t) => {
|
|
581
582
|
let n = e.node(t), r = n.edgeLabel;
|
|
582
583
|
e.setEdge(n.edgeObj, r);
|
|
@@ -589,25 +590,25 @@ function it(e) {
|
|
|
589
590
|
}
|
|
590
591
|
//#endregion
|
|
591
592
|
//#region src/DAG/rank/util.js
|
|
592
|
-
function
|
|
593
|
+
function ct(e) {
|
|
593
594
|
function t(n) {
|
|
594
595
|
let r = e.node(n);
|
|
595
596
|
if (r && Object.prototype.hasOwnProperty.call(r, "rank")) return r.rank;
|
|
596
597
|
let i = e.outEdges(n) || [];
|
|
597
598
|
if (!i.length) return r && (r.rank = 0), 0;
|
|
598
|
-
let a = i.map((n) => e.node(n.w) ? t(n.w) - e.edge(n).minlen : Infinity), o =
|
|
599
|
+
let a = i.map((n) => e.node(n.w) ? t(n.w) - e.edge(n).minlen : Infinity), o = z(Math.min, a);
|
|
599
600
|
return o === Infinity && (o = 0), r && (r.rank = o), o;
|
|
600
601
|
}
|
|
601
602
|
(e.sources() || []).forEach(t);
|
|
602
603
|
}
|
|
603
|
-
function
|
|
604
|
+
function lt(e, t) {
|
|
604
605
|
return e.node(t.w).rank - e.node(t.v).rank - e.edge(t).minlen;
|
|
605
606
|
}
|
|
606
607
|
//#endregion
|
|
607
608
|
//#region src/DAG/rank/feasible-tree.js
|
|
608
|
-
function
|
|
609
|
-
|
|
610
|
-
let t = new
|
|
609
|
+
function ut(e) {
|
|
610
|
+
dt(e);
|
|
611
|
+
let t = new O();
|
|
611
612
|
e.nodes().forEach((e) => {
|
|
612
613
|
t.setNode(e, {});
|
|
613
614
|
});
|
|
@@ -615,29 +616,29 @@ function st(e) {
|
|
|
615
616
|
if (!n.length) return t;
|
|
616
617
|
let r = n[0], i = /* @__PURE__ */ new Set([r]);
|
|
617
618
|
for (; i.size < n.length;) {
|
|
618
|
-
let r =
|
|
619
|
+
let r = ft(e, i);
|
|
619
620
|
if (!r) {
|
|
620
621
|
let e = n.find((e) => !i.has(e));
|
|
621
622
|
i.add(e), t.setNode(e, {});
|
|
622
623
|
continue;
|
|
623
624
|
}
|
|
624
625
|
let { edgeObject: a, delta: o, attachFrom: s, attachTo: c } = r;
|
|
625
|
-
|
|
626
|
+
pt(e, i, s, o), t.setEdge(a.v, a.w, {}), i.add(c);
|
|
626
627
|
}
|
|
627
628
|
return t;
|
|
628
629
|
}
|
|
629
|
-
function
|
|
630
|
+
function dt(e) {
|
|
630
631
|
e.nodes().forEach((t) => {
|
|
631
632
|
let n = e.node(t) || {};
|
|
632
633
|
Object.prototype.hasOwnProperty.call(n, "rank") || (n.rank = 0, e.setNode(t, n));
|
|
633
634
|
});
|
|
634
635
|
}
|
|
635
|
-
function
|
|
636
|
+
function ft(e, t) {
|
|
636
637
|
let n = null;
|
|
637
638
|
return e.edges().forEach((r) => {
|
|
638
639
|
let i = t.has(r.v);
|
|
639
640
|
if (i === t.has(r.w)) return;
|
|
640
|
-
let a =
|
|
641
|
+
let a = lt(e, r), o = Math.abs(a);
|
|
641
642
|
if (!n || o < n.absoluteSlack) {
|
|
642
643
|
let e = i ? r.v : r.w, t = i ? r.w : r.v;
|
|
643
644
|
n = {
|
|
@@ -650,7 +651,7 @@ function lt(e, t) {
|
|
|
650
651
|
}
|
|
651
652
|
}), n;
|
|
652
653
|
}
|
|
653
|
-
function
|
|
654
|
+
function pt(e, t, n, r) {
|
|
654
655
|
r && e.nodes().forEach((n) => {
|
|
655
656
|
if (!t.has(n)) {
|
|
656
657
|
let t = e.node(n);
|
|
@@ -660,58 +661,58 @@ function ut(e, t, n, r) {
|
|
|
660
661
|
}
|
|
661
662
|
//#endregion
|
|
662
663
|
//#region src/DAG/rank/network-simplex.js
|
|
663
|
-
function
|
|
664
|
-
let t =
|
|
665
|
-
return
|
|
664
|
+
function q(e) {
|
|
665
|
+
let t = F(e);
|
|
666
|
+
return ct(t), t.nodes().forEach((n) => {
|
|
666
667
|
let r = t.node(n), i = e.node(n) || {};
|
|
667
668
|
i.rank = r.rank, e.setNode(n, i);
|
|
668
669
|
}), e;
|
|
669
670
|
}
|
|
670
|
-
function
|
|
671
|
-
function
|
|
672
|
-
function
|
|
671
|
+
function mt(e, t) {}
|
|
672
|
+
function ht(e, t) {}
|
|
673
|
+
function gt(e, t, n) {
|
|
673
674
|
return 0;
|
|
674
675
|
}
|
|
675
|
-
function
|
|
676
|
+
function _t(e) {
|
|
676
677
|
return null;
|
|
677
678
|
}
|
|
678
|
-
function
|
|
679
|
+
function vt(e, t) {
|
|
679
680
|
return null;
|
|
680
681
|
}
|
|
681
|
-
|
|
682
|
+
q.initLowLimValues = mt, q.initCutValues = ht, q.calcCutValue = gt, q.leaveEdge = _t, q.enterEdge = vt;
|
|
682
683
|
//#endregion
|
|
683
684
|
//#region src/DAG/rank/index.js
|
|
684
|
-
var
|
|
685
|
-
function
|
|
685
|
+
var yt = ct;
|
|
686
|
+
function bt(e) {
|
|
686
687
|
let t = e.graph().ranker;
|
|
687
688
|
if (t instanceof Function) return t(e);
|
|
688
689
|
switch (e.graph().ranker) {
|
|
689
690
|
case "network-simplex":
|
|
690
|
-
|
|
691
|
+
J(e);
|
|
691
692
|
break;
|
|
692
693
|
case "tight-tree":
|
|
693
|
-
|
|
694
|
+
St(e);
|
|
694
695
|
break;
|
|
695
696
|
case "longest-path":
|
|
696
|
-
|
|
697
|
+
xt(e);
|
|
697
698
|
break;
|
|
698
699
|
case "none": break;
|
|
699
|
-
default:
|
|
700
|
+
default: J(e);
|
|
700
701
|
}
|
|
701
702
|
}
|
|
702
|
-
var
|
|
703
|
-
function
|
|
704
|
-
|
|
703
|
+
var xt = yt;
|
|
704
|
+
function St(e) {
|
|
705
|
+
yt(e), ut(e);
|
|
705
706
|
}
|
|
706
|
-
function
|
|
707
|
-
|
|
707
|
+
function J(e) {
|
|
708
|
+
q(e);
|
|
708
709
|
}
|
|
709
710
|
//#endregion
|
|
710
711
|
//#region src/DAG/parent-dummy-chains.js
|
|
711
|
-
function
|
|
712
|
-
let t =
|
|
712
|
+
function Ct(e) {
|
|
713
|
+
let t = Y(e);
|
|
713
714
|
e.graph().dummyChains.forEach((n) => {
|
|
714
|
-
let r = e.node(n), i = r.edgeObj, a =
|
|
715
|
+
let r = e.node(n), i = r.edgeObj, a = wt(e, t, i.v, i.w), o = a.path, s = a.lca, c = 0, l = o[c], u = !0, d = n;
|
|
715
716
|
for (; d !== i.w;) {
|
|
716
717
|
if (r = e.node(d), u) {
|
|
717
718
|
for (; (l = o[c]) !== s && e.node(l).maxRank < r.rank;) c++;
|
|
@@ -725,7 +726,7 @@ function bt(e) {
|
|
|
725
726
|
}
|
|
726
727
|
});
|
|
727
728
|
}
|
|
728
|
-
function
|
|
729
|
+
function wt(e, t, n, r) {
|
|
729
730
|
let i = [], a = [], o = Math.min(t[n].low, t[r].low), s = Math.max(t[n].lim, t[r].lim), c, l;
|
|
730
731
|
c = n;
|
|
731
732
|
do
|
|
@@ -737,7 +738,7 @@ function xt(e, t, n, r) {
|
|
|
737
738
|
lca: l
|
|
738
739
|
};
|
|
739
740
|
}
|
|
740
|
-
function
|
|
741
|
+
function Y(e) {
|
|
741
742
|
let t = {}, n = 0;
|
|
742
743
|
function r(i) {
|
|
743
744
|
let a = n;
|
|
@@ -750,17 +751,17 @@ function X(e) {
|
|
|
750
751
|
}
|
|
751
752
|
//#endregion
|
|
752
753
|
//#region src/DAG/nested-graph.js
|
|
753
|
-
function
|
|
754
|
-
let t =
|
|
754
|
+
function Tt(e) {
|
|
755
|
+
let t = W.addDummyNode(e, "root", {}, "_root"), n = Dt(e), r = Object.values(n), i = W.applyWithChunking(Math.max, r) - 1, a = 2 * i + 1;
|
|
755
756
|
e.graph().nestingRoot = t, e.edges().forEach((t) => {
|
|
756
757
|
e.edge(t).minlen *= a;
|
|
757
758
|
});
|
|
758
|
-
let o =
|
|
759
|
+
let o = Ot(e) + 1;
|
|
759
760
|
e.children().forEach((r) => {
|
|
760
|
-
|
|
761
|
+
Et(e, t, a, o, i, n, r);
|
|
761
762
|
}), e.graph().nodeRankFactor = a;
|
|
762
763
|
}
|
|
763
|
-
function
|
|
764
|
+
function Et(e, t, n, r, i, a, o) {
|
|
764
765
|
let s = e.children(o);
|
|
765
766
|
if (!s.length) {
|
|
766
767
|
o !== t && e.setEdge(t, o, {
|
|
@@ -769,9 +770,9 @@ function Ct(e, t, n, r, i, a, o) {
|
|
|
769
770
|
});
|
|
770
771
|
return;
|
|
771
772
|
}
|
|
772
|
-
let c =
|
|
773
|
+
let c = W.addBorderNode(e, "_bt"), l = W.addBorderNode(e, "_bb"), u = e.node(o);
|
|
773
774
|
e.setParent(c, o), u.borderTop = c, e.setParent(l, o), u.borderBottom = l, s.forEach((s) => {
|
|
774
|
-
|
|
775
|
+
Et(e, t, n, r, i, a, s);
|
|
775
776
|
let u = e.node(s), d = u.borderTop ? u.borderTop : s, f = u.borderBottom ? u.borderBottom : s, p = u.borderTop ? r : 2 * r, m = d === f ? i - a[o] + 1 : 1;
|
|
776
777
|
e.setEdge(c, d, {
|
|
777
778
|
weight: p,
|
|
@@ -787,7 +788,7 @@ function Ct(e, t, n, r, i, a, o) {
|
|
|
787
788
|
minlen: i + a[o]
|
|
788
789
|
});
|
|
789
790
|
}
|
|
790
|
-
function
|
|
791
|
+
function Dt(e) {
|
|
791
792
|
let t = {};
|
|
792
793
|
function n(r, i) {
|
|
793
794
|
let a = e.children(r);
|
|
@@ -795,10 +796,10 @@ function wt(e) {
|
|
|
795
796
|
}
|
|
796
797
|
return e.children().forEach((e) => n(e, 1)), t;
|
|
797
798
|
}
|
|
798
|
-
function
|
|
799
|
+
function Ot(e) {
|
|
799
800
|
return e.edges().reduce((t, n) => t + e.edge(n).weight, 0);
|
|
800
801
|
}
|
|
801
|
-
function
|
|
802
|
+
function kt(e) {
|
|
802
803
|
let t = e.graph();
|
|
803
804
|
e.removeNode(t.nestingRoot), delete t.nestingRoot, e.edges().forEach((t) => {
|
|
804
805
|
e.edge(t).nestingEdge && e.removeEdge(t);
|
|
@@ -806,77 +807,77 @@ function Et(e) {
|
|
|
806
807
|
}
|
|
807
808
|
//#endregion
|
|
808
809
|
//#region src/DAG/add-border-segments.js
|
|
809
|
-
function
|
|
810
|
+
function At(e) {
|
|
810
811
|
function t(n) {
|
|
811
812
|
let r = e.children(n), i = e.node(n);
|
|
812
813
|
if (r.length && r.forEach(t), Object.hasOwn(i, "minRank")) {
|
|
813
814
|
i.borderLeft = [], i.borderRight = [];
|
|
814
|
-
for (let t = i.minRank, r = i.maxRank + 1; t < r; ++t)
|
|
815
|
+
for (let t = i.minRank, r = i.maxRank + 1; t < r; ++t) jt(e, "borderLeft", "_bl", n, i, t), jt(e, "borderRight", "_br", n, i, t);
|
|
815
816
|
}
|
|
816
817
|
}
|
|
817
818
|
e.children().forEach(t);
|
|
818
819
|
}
|
|
819
|
-
function
|
|
820
|
+
function jt(e, t, n, r, i, a) {
|
|
820
821
|
let o = {
|
|
821
822
|
width: 0,
|
|
822
823
|
height: 0,
|
|
823
824
|
rank: a,
|
|
824
825
|
borderType: t
|
|
825
|
-
}, s = i[t][a - 1], c =
|
|
826
|
+
}, s = i[t][a - 1], c = P(e, "border", o, n);
|
|
826
827
|
i[t][a] = c, e.setParent(c, r), s && e.setEdge(s, c, { weight: 1 });
|
|
827
828
|
}
|
|
828
829
|
//#endregion
|
|
829
830
|
//#region src/DAG/coordinate-system.js
|
|
830
|
-
function
|
|
831
|
+
function Mt(e) {
|
|
831
832
|
let t = e.graph().rankdir.toLowerCase();
|
|
832
|
-
(t === "lr" || t === "rl") &&
|
|
833
|
+
(t === "lr" || t === "rl") && Pt(e);
|
|
833
834
|
}
|
|
834
|
-
function
|
|
835
|
+
function Nt(e) {
|
|
835
836
|
let t = e.graph().rankdir.toLowerCase();
|
|
836
|
-
(t === "bt" || t === "rl") &&
|
|
837
|
+
(t === "bt" || t === "rl") && Ft(e), (t === "lr" || t === "rl") && (Lt(e), Pt(e));
|
|
837
838
|
}
|
|
838
|
-
function
|
|
839
|
+
function Pt(e) {
|
|
839
840
|
e.nodes().forEach((t) => {
|
|
840
|
-
|
|
841
|
+
X(e.node(t));
|
|
841
842
|
}), e.edges().forEach((t) => {
|
|
842
|
-
|
|
843
|
+
X(e.edge(t));
|
|
843
844
|
});
|
|
844
845
|
}
|
|
845
|
-
function
|
|
846
|
+
function X(e) {
|
|
846
847
|
let t = e.width;
|
|
847
848
|
e.width = e.height, e.height = t;
|
|
848
849
|
}
|
|
849
|
-
function
|
|
850
|
+
function Ft(e) {
|
|
850
851
|
e.nodes().forEach((t) => {
|
|
851
|
-
|
|
852
|
+
It(e.node(t));
|
|
852
853
|
}), e.edges().forEach((t) => {
|
|
853
854
|
let n = e.edge(t);
|
|
854
|
-
n.points.forEach(
|
|
855
|
+
n.points.forEach(It), Object.hasOwn(n, "y") && It(n);
|
|
855
856
|
});
|
|
856
857
|
}
|
|
857
|
-
function
|
|
858
|
+
function It(e) {
|
|
858
859
|
e.y = -e.y;
|
|
859
860
|
}
|
|
860
|
-
function
|
|
861
|
+
function Lt(e) {
|
|
861
862
|
e.nodes().forEach((t) => {
|
|
862
|
-
|
|
863
|
+
Rt(e.node(t));
|
|
863
864
|
}), e.edges().forEach((t) => {
|
|
864
865
|
let n = e.edge(t);
|
|
865
|
-
n.points.forEach(
|
|
866
|
+
n.points.forEach(Rt), Object.hasOwn(n, "x") && Rt(n);
|
|
866
867
|
});
|
|
867
868
|
}
|
|
868
|
-
function
|
|
869
|
+
function Rt(e) {
|
|
869
870
|
let t = e.x;
|
|
870
871
|
e.x = e.y, e.y = t;
|
|
871
872
|
}
|
|
872
|
-
var
|
|
873
|
-
adjust:
|
|
874
|
-
undo:
|
|
873
|
+
var zt = {
|
|
874
|
+
adjust: Mt,
|
|
875
|
+
undo: Nt
|
|
875
876
|
};
|
|
876
877
|
//#endregion
|
|
877
878
|
//#region src/DAG/order/init-order.js
|
|
878
|
-
function
|
|
879
|
-
let t = {}, n = e.nodes().filter((t) => e.children(t).length === 0), r = n.map((t) => e.node(t).rank), i =
|
|
879
|
+
function Bt(e) {
|
|
880
|
+
let t = {}, n = e.nodes().filter((t) => e.children(t).length === 0), r = n.map((t) => e.node(t).rank), i = H(z(Math.max, r) + 1).map(() => []);
|
|
880
881
|
function a(n) {
|
|
881
882
|
if (t[n]) return;
|
|
882
883
|
t[n] = !0;
|
|
@@ -887,13 +888,13 @@ function Lt(e) {
|
|
|
887
888
|
}
|
|
888
889
|
//#endregion
|
|
889
890
|
//#region src/DAG/order/cross-count.js
|
|
890
|
-
function
|
|
891
|
+
function Vt(e, t) {
|
|
891
892
|
let n = 0;
|
|
892
|
-
for (let r = 1; r < t.length; ++r) n +=
|
|
893
|
+
for (let r = 1; r < t.length; ++r) n += Ht(e, t[r - 1], t[r]);
|
|
893
894
|
return n;
|
|
894
895
|
}
|
|
895
|
-
function
|
|
896
|
-
let r =
|
|
896
|
+
function Ht(e, t, n) {
|
|
897
|
+
let r = U(n, n.map((e, t) => t)), i = t.flatMap((t) => e.outEdges(t).map((t) => ({
|
|
897
898
|
pos: r[t.w],
|
|
898
899
|
weight: e.edge(t).weight
|
|
899
900
|
})).sort((e, t) => e.pos - t.pos)), a = 1;
|
|
@@ -911,7 +912,7 @@ function zt(e, t, n) {
|
|
|
911
912
|
}
|
|
912
913
|
//#endregion
|
|
913
914
|
//#region src/DAG/order/barycenter.js
|
|
914
|
-
function
|
|
915
|
+
function Z(e, t = []) {
|
|
915
916
|
return t.map((t) => {
|
|
916
917
|
let n = e.inEdges(t);
|
|
917
918
|
if (!n.length) return { v: t };
|
|
@@ -934,7 +935,7 @@ function Q(e, t = []) {
|
|
|
934
935
|
}
|
|
935
936
|
//#endregion
|
|
936
937
|
//#region src/DAG/order/resolve-conflicts.js
|
|
937
|
-
function
|
|
938
|
+
function Ut(e, t) {
|
|
938
939
|
let n = {};
|
|
939
940
|
return e.forEach((e, t) => {
|
|
940
941
|
let r = n[e.v] = {
|
|
@@ -948,13 +949,13 @@ function Bt(e, t) {
|
|
|
948
949
|
}), t.edges().forEach((e) => {
|
|
949
950
|
let t = n[e.v], r = n[e.w];
|
|
950
951
|
t !== void 0 && r !== void 0 && (r.indegree++, t.out.push(r));
|
|
951
|
-
}),
|
|
952
|
+
}), Q(Object.values(n).filter((e) => !e.indegree));
|
|
952
953
|
}
|
|
953
|
-
function
|
|
954
|
+
function Q(e) {
|
|
954
955
|
let t = [];
|
|
955
956
|
function n(e) {
|
|
956
957
|
return (t) => {
|
|
957
|
-
t.merged || (t.barycenter === void 0 || e.barycenter === void 0 || t.barycenter >= e.barycenter) &&
|
|
958
|
+
t.merged || (t.barycenter === void 0 || e.barycenter === void 0 || t.barycenter >= e.barycenter) && Wt(e, t);
|
|
958
959
|
};
|
|
959
960
|
}
|
|
960
961
|
function r(t) {
|
|
@@ -966,50 +967,50 @@ function Vt(e) {
|
|
|
966
967
|
let i = e.pop();
|
|
967
968
|
t.push(i), i.in.reverse().forEach(n(i)), i.out.forEach(r(i));
|
|
968
969
|
}
|
|
969
|
-
return t.filter((e) => !e.merged).map((e) =>
|
|
970
|
+
return t.filter((e) => !e.merged).map((e) => nt(e, [
|
|
970
971
|
"vs",
|
|
971
972
|
"i",
|
|
972
973
|
"barycenter",
|
|
973
974
|
"weight"
|
|
974
975
|
]));
|
|
975
976
|
}
|
|
976
|
-
function
|
|
977
|
+
function Wt(e, t) {
|
|
977
978
|
let n = 0, r = 0;
|
|
978
979
|
e.weight && (n += e.barycenter * e.weight, r += e.weight), t.weight && (n += t.barycenter * t.weight, r += t.weight), e.vs = t.vs.concat(e.vs), e.barycenter = n / r, e.weight = r, e.i = Math.min(t.i, e.i), t.merged = !0;
|
|
979
980
|
}
|
|
980
981
|
//#endregion
|
|
981
982
|
//#region src/DAG/order/sort.js
|
|
982
|
-
function
|
|
983
|
-
let n =
|
|
984
|
-
r.sort(
|
|
985
|
-
c += e.vs.length, a.push(e.vs), o += e.barycenter * e.weight, s += e.weight, c =
|
|
983
|
+
function Gt(e, t) {
|
|
984
|
+
let n = $e(e, (e) => Object.hasOwn(e, "barycenter")), r = n.lhs, i = n.rhs.sort((e, t) => t.i - e.i), a = [], o = 0, s = 0, c = 0;
|
|
985
|
+
r.sort(qt(!!t)), c = Kt(a, i, c), r.forEach((e) => {
|
|
986
|
+
c += e.vs.length, a.push(e.vs), o += e.barycenter * e.weight, s += e.weight, c = Kt(a, i, c);
|
|
986
987
|
});
|
|
987
988
|
let l = { vs: a.flat(!0) };
|
|
988
989
|
return s && (l.barycenter = o / s, l.weight = s), l;
|
|
989
990
|
}
|
|
990
|
-
function
|
|
991
|
+
function Kt(e, t, n) {
|
|
991
992
|
let r;
|
|
992
993
|
for (; t.length && (r = t[t.length - 1]).i <= n;) t.pop(), e.push(r.vs), n++;
|
|
993
994
|
return n;
|
|
994
995
|
}
|
|
995
|
-
function
|
|
996
|
+
function qt(e) {
|
|
996
997
|
return (t, n) => t.barycenter < n.barycenter ? -1 : t.barycenter > n.barycenter ? 1 : e ? n.i - t.i : t.i - n.i;
|
|
997
998
|
}
|
|
998
999
|
//#endregion
|
|
999
1000
|
//#region src/DAG/order/sort-subgraph.js
|
|
1000
|
-
function
|
|
1001
|
+
function Jt(e, t, n, r) {
|
|
1001
1002
|
let i = e.children(t), a = e.node(t), o = a ? a.borderLeft : void 0, s = a ? a.borderRight : void 0, c = {};
|
|
1002
1003
|
o && (i = i.filter((e) => e !== o && e !== s));
|
|
1003
|
-
let l =
|
|
1004
|
+
let l = Z(e, i);
|
|
1004
1005
|
l.forEach((t) => {
|
|
1005
1006
|
if (e.children(t.v).length) {
|
|
1006
|
-
let i =
|
|
1007
|
-
c[t.v] = i, Object.hasOwn(i, "barycenter") &&
|
|
1007
|
+
let i = Jt(e, t.v, n, r);
|
|
1008
|
+
c[t.v] = i, Object.hasOwn(i, "barycenter") && Xt(t, i);
|
|
1008
1009
|
}
|
|
1009
1010
|
});
|
|
1010
|
-
let u =
|
|
1011
|
-
|
|
1012
|
-
let d =
|
|
1011
|
+
let u = Ut(l, n);
|
|
1012
|
+
Yt(u, c);
|
|
1013
|
+
let d = Gt(u, r);
|
|
1013
1014
|
if (o && (d.vs = [
|
|
1014
1015
|
o,
|
|
1015
1016
|
d.vs,
|
|
@@ -1020,19 +1021,19 @@ function Kt(e, t, n, r) {
|
|
|
1020
1021
|
}
|
|
1021
1022
|
return d;
|
|
1022
1023
|
}
|
|
1023
|
-
function
|
|
1024
|
+
function Yt(e, t) {
|
|
1024
1025
|
e.forEach((e) => {
|
|
1025
1026
|
e.vs = e.vs.flatMap((e) => t[e] ? t[e].vs : e);
|
|
1026
1027
|
});
|
|
1027
1028
|
}
|
|
1028
|
-
function
|
|
1029
|
+
function Xt(e, t) {
|
|
1029
1030
|
e.barycenter === void 0 ? (e.barycenter = t.barycenter, e.weight = t.weight) : (e.barycenter = (e.barycenter * e.weight + t.barycenter * t.weight) / (e.weight + t.weight), e.weight += t.weight);
|
|
1030
1031
|
}
|
|
1031
1032
|
//#endregion
|
|
1032
1033
|
//#region src/DAG/order/build-layer-graph.js
|
|
1033
|
-
function
|
|
1034
|
+
function Zt(e, t, n, r) {
|
|
1034
1035
|
r ||= e.nodes();
|
|
1035
|
-
let i =
|
|
1036
|
+
let i = Qt(e), a = new O({ compound: !0 }).setGraph({ root: i }).setDefaultNodeLabel((t) => e.node(t));
|
|
1036
1037
|
return r.forEach((r) => {
|
|
1037
1038
|
let o = e.node(r), s = e.parent(r);
|
|
1038
1039
|
(o.rank === t || o.minRank <= t && t <= o.maxRank) && (a.setNode(r), a.setParent(r, s || i), e[n](r).forEach((t) => {
|
|
@@ -1044,14 +1045,14 @@ function Yt(e, t, n, r) {
|
|
|
1044
1045
|
}));
|
|
1045
1046
|
}), a;
|
|
1046
1047
|
}
|
|
1047
|
-
function
|
|
1048
|
+
function Qt(e) {
|
|
1048
1049
|
let t;
|
|
1049
|
-
for (; e.hasNode(t =
|
|
1050
|
+
for (; e.hasNode(t = V("_root")););
|
|
1050
1051
|
return t;
|
|
1051
1052
|
}
|
|
1052
1053
|
//#endregion
|
|
1053
1054
|
//#region src/DAG/order/add-subgraph-constraints.js
|
|
1054
|
-
function
|
|
1055
|
+
function $t(e, t, n) {
|
|
1055
1056
|
let r = {}, i;
|
|
1056
1057
|
n.forEach((n) => {
|
|
1057
1058
|
let a = e.parent(n), o, s;
|
|
@@ -1066,22 +1067,22 @@ function Zt(e, t, n) {
|
|
|
1066
1067
|
}
|
|
1067
1068
|
//#endregion
|
|
1068
1069
|
//#region src/DAG/order/index.js
|
|
1069
|
-
function
|
|
1070
|
+
function en(e, t = {}) {
|
|
1070
1071
|
if (typeof t.customOrder == "function") {
|
|
1071
|
-
t.customOrder(e,
|
|
1072
|
+
t.customOrder(e, en);
|
|
1072
1073
|
return;
|
|
1073
1074
|
}
|
|
1074
|
-
let n =
|
|
1075
|
-
if (
|
|
1075
|
+
let n = Qe(e), r = tn(e, H(1, n + 1), "inEdges"), i = tn(e, H(n - 1, -1, -1), "outEdges"), a = Bt(e);
|
|
1076
|
+
if (rn(e, a), t.disableOptimalOrderHeuristic) return;
|
|
1076
1077
|
let o = Infinity, s, c = t.constraints || [];
|
|
1077
1078
|
for (let t = 0, n = 0; n < 4; ++t, ++n) {
|
|
1078
|
-
|
|
1079
|
-
let l =
|
|
1079
|
+
nn(t % 2 == 0 ? r : i, t % 4 >= 2, c), a = L(e);
|
|
1080
|
+
let l = Vt(e, a);
|
|
1080
1081
|
l < o ? (o = l, n = 0, s = structuredClone(a)) : l === o && (s = structuredClone(a));
|
|
1081
1082
|
}
|
|
1082
|
-
|
|
1083
|
+
rn(e, s);
|
|
1083
1084
|
}
|
|
1084
|
-
function
|
|
1085
|
+
function tn(e, t, n) {
|
|
1085
1086
|
let r = /* @__PURE__ */ new Map();
|
|
1086
1087
|
function i(e, t) {
|
|
1087
1088
|
r.has(e) || r.set(e, []), r.get(e).push(t);
|
|
@@ -1090,19 +1091,19 @@ function $t(e, t, n) {
|
|
|
1090
1091
|
let n = e.node(t);
|
|
1091
1092
|
if (typeof n.rank == "number" && i(n.rank, t), typeof n.minRank == "number" && typeof n.maxRank == "number") for (let e = n.minRank; e <= n.maxRank; e++) e !== n.rank && i(e, t);
|
|
1092
1093
|
}
|
|
1093
|
-
return t.map((t) =>
|
|
1094
|
+
return t.map((t) => Zt(e, t, n, r.get(t) || []));
|
|
1094
1095
|
}
|
|
1095
|
-
function
|
|
1096
|
-
let r = new
|
|
1096
|
+
function nn(e, t, n) {
|
|
1097
|
+
let r = new O();
|
|
1097
1098
|
e.forEach((e) => {
|
|
1098
1099
|
n.forEach((e) => r.setEdge(e.left, e.right));
|
|
1099
|
-
let i = e.graph().root, a =
|
|
1100
|
+
let i = e.graph().root, a = Jt(e, i, r, t);
|
|
1100
1101
|
a.vs.forEach((t, n) => {
|
|
1101
1102
|
e.node(t).order = n;
|
|
1102
|
-
}),
|
|
1103
|
+
}), $t(e, r, a.vs);
|
|
1103
1104
|
});
|
|
1104
1105
|
}
|
|
1105
|
-
function
|
|
1106
|
+
function rn(e, t) {
|
|
1106
1107
|
Object.values(t).forEach((t) => {
|
|
1107
1108
|
t.forEach((t, n) => {
|
|
1108
1109
|
e.node(t).order = n;
|
|
@@ -1116,25 +1117,25 @@ function $(e, t) {
|
|
|
1116
1117
|
function r(t, r) {
|
|
1117
1118
|
let i = 0, a = 0, o = t.length, s = r[r.length - 1];
|
|
1118
1119
|
return r.forEach((t, c) => {
|
|
1119
|
-
let l =
|
|
1120
|
+
let l = on(e, t), u = l ? e.node(l).order : o;
|
|
1120
1121
|
(l || t === s) && (r.slice(a, c + 1).forEach((t) => {
|
|
1121
1122
|
e.predecessors(t).forEach((r) => {
|
|
1122
1123
|
let a = e.node(r), o = a.order;
|
|
1123
|
-
(o < i || u < o) && !(a.dummy && e.node(t).dummy) &&
|
|
1124
|
+
(o < i || u < o) && !(a.dummy && e.node(t).dummy) && sn(n, r, t);
|
|
1124
1125
|
});
|
|
1125
1126
|
}), a = c + 1, i = u);
|
|
1126
1127
|
}), r;
|
|
1127
1128
|
}
|
|
1128
1129
|
return t.length && t.reduce(r), n;
|
|
1129
1130
|
}
|
|
1130
|
-
function
|
|
1131
|
+
function an(e, t) {
|
|
1131
1132
|
let n = {};
|
|
1132
1133
|
function r(t, r, i, a, o) {
|
|
1133
1134
|
let s;
|
|
1134
|
-
|
|
1135
|
+
H(r, i).forEach((r) => {
|
|
1135
1136
|
s = t[r], e.node(s).dummy && e.predecessors(s).forEach((t) => {
|
|
1136
1137
|
let r = e.node(t);
|
|
1137
|
-
r.dummy && (r.order < a || r.order > o) &&
|
|
1138
|
+
r.dummy && (r.order < a || r.order > o) && sn(n, t, s);
|
|
1138
1139
|
});
|
|
1139
1140
|
});
|
|
1140
1141
|
}
|
|
@@ -1150,10 +1151,10 @@ function nn(e, t) {
|
|
|
1150
1151
|
}
|
|
1151
1152
|
return t.length && t.reduce(i), n;
|
|
1152
1153
|
}
|
|
1153
|
-
function
|
|
1154
|
+
function on(e, t) {
|
|
1154
1155
|
if (e.node(t).dummy) return e.predecessors(t).find((t) => e.node(t).dummy);
|
|
1155
1156
|
}
|
|
1156
|
-
function
|
|
1157
|
+
function sn(e, t, n) {
|
|
1157
1158
|
if (t > n) {
|
|
1158
1159
|
let e = t;
|
|
1159
1160
|
t = n, n = e;
|
|
@@ -1161,14 +1162,14 @@ function an(e, t, n) {
|
|
|
1161
1162
|
let r = e[t];
|
|
1162
1163
|
r || (e[t] = r = {}), r[n] = !0;
|
|
1163
1164
|
}
|
|
1164
|
-
function
|
|
1165
|
+
function cn(e, t, n) {
|
|
1165
1166
|
if (t > n) {
|
|
1166
1167
|
let e = t;
|
|
1167
1168
|
t = n, n = e;
|
|
1168
1169
|
}
|
|
1169
1170
|
return !!e[t] && Object.hasOwn(e[t], n);
|
|
1170
1171
|
}
|
|
1171
|
-
function
|
|
1172
|
+
function ln(e, t, n, r) {
|
|
1172
1173
|
let i = {}, a = {}, o = {};
|
|
1173
1174
|
return t.forEach((e) => {
|
|
1174
1175
|
e.forEach((e, t) => {
|
|
@@ -1183,7 +1184,7 @@ function sn(e, t, n, r) {
|
|
|
1183
1184
|
let r = (s.length - 1) / 2;
|
|
1184
1185
|
for (let c = Math.floor(r), l = Math.ceil(r); c <= l; ++c) {
|
|
1185
1186
|
let r = s[c];
|
|
1186
|
-
a[e] === e && t < o[r] && !
|
|
1187
|
+
a[e] === e && t < o[r] && !cn(n, e, r) && (a[r] = e, a[e] = i[e] = i[r], t = o[r]);
|
|
1187
1188
|
}
|
|
1188
1189
|
}
|
|
1189
1190
|
});
|
|
@@ -1192,8 +1193,8 @@ function sn(e, t, n, r) {
|
|
|
1192
1193
|
align: a
|
|
1193
1194
|
};
|
|
1194
1195
|
}
|
|
1195
|
-
function
|
|
1196
|
-
let a = {}, o =
|
|
1196
|
+
function un(e, t, n, r, i) {
|
|
1197
|
+
let a = {}, o = dn(e, t, n, i), s = i ? "borderLeft" : "borderRight";
|
|
1197
1198
|
function c(e, t) {
|
|
1198
1199
|
let n = o.nodes().slice(), r = {}, i = n.pop();
|
|
1199
1200
|
for (; i;) {
|
|
@@ -1216,8 +1217,8 @@ function cn(e, t, n, r, i) {
|
|
|
1216
1217
|
a[e] = a[n[e]];
|
|
1217
1218
|
}), a;
|
|
1218
1219
|
}
|
|
1219
|
-
function
|
|
1220
|
-
let i = new e.constructor(), a = e.graph(), o =
|
|
1220
|
+
function dn(e, t, n, r) {
|
|
1221
|
+
let i = new e.constructor(), a = e.graph(), o = gn(a.nodesep, a.edgesep, r);
|
|
1221
1222
|
return t.forEach((t) => {
|
|
1222
1223
|
let r;
|
|
1223
1224
|
t.forEach((t) => {
|
|
@@ -1230,47 +1231,47 @@ function ln(e, t, n, r) {
|
|
|
1230
1231
|
});
|
|
1231
1232
|
}), i;
|
|
1232
1233
|
}
|
|
1233
|
-
function
|
|
1234
|
+
function fn(e, t) {
|
|
1234
1235
|
return Object.values(t).reduce((t, n) => {
|
|
1235
1236
|
let r = -Infinity, i = Infinity;
|
|
1236
1237
|
Object.entries(n).forEach(([t, n]) => {
|
|
1237
|
-
let a =
|
|
1238
|
+
let a = _n(e, t) / 2;
|
|
1238
1239
|
r = Math.max(n + a, r), i = Math.min(n - a, i);
|
|
1239
1240
|
});
|
|
1240
1241
|
let a = r - i;
|
|
1241
1242
|
return a < t[0] && (t = [a, n]), t;
|
|
1242
1243
|
}, [Infinity, null])[1];
|
|
1243
1244
|
}
|
|
1244
|
-
function
|
|
1245
|
-
let n = Object.values(t), r =
|
|
1245
|
+
function pn(e, t) {
|
|
1246
|
+
let n = Object.values(t), r = z(Math.min, n), i = z(Math.max, n);
|
|
1246
1247
|
["u", "d"].forEach((n) => {
|
|
1247
1248
|
["l", "r"].forEach((a) => {
|
|
1248
1249
|
let o = n + a, s = e[o];
|
|
1249
1250
|
if (s === t) return;
|
|
1250
|
-
let c = Object.values(s), l = r -
|
|
1251
|
-
a !== "l" && (l = i -
|
|
1251
|
+
let c = Object.values(s), l = r - z(Math.min, c);
|
|
1252
|
+
a !== "l" && (l = i - z(Math.max, c)), l && (s = rt(s, (e) => e + l), e[o] = s);
|
|
1252
1253
|
});
|
|
1253
1254
|
});
|
|
1254
1255
|
}
|
|
1255
|
-
function
|
|
1256
|
-
return
|
|
1256
|
+
function mn(e, t) {
|
|
1257
|
+
return rt(e.ul, (n, r) => {
|
|
1257
1258
|
if (t) return e[t.toLowerCase()][r];
|
|
1258
1259
|
let i = Object.values(e).map((e) => e[r]).sort((e, t) => e - t);
|
|
1259
1260
|
return (i[1] + i[2]) / 2;
|
|
1260
1261
|
});
|
|
1261
1262
|
}
|
|
1262
|
-
function
|
|
1263
|
-
let t =
|
|
1263
|
+
function hn(e) {
|
|
1264
|
+
let t = L(e), n = Object.assign($(e, t), an(e, t)), r = {}, i;
|
|
1264
1265
|
return ["u", "d"].forEach((a) => {
|
|
1265
1266
|
i = a === "u" ? t : Object.values(t).reverse(), ["l", "r"].forEach((t) => {
|
|
1266
1267
|
let o = i;
|
|
1267
1268
|
t === "r" && (o = o.map((e) => Object.values(e).reverse()));
|
|
1268
|
-
let s = (a === "u" ? e.predecessors : e.successors).bind(e), c =
|
|
1269
|
-
t === "r" && (l =
|
|
1269
|
+
let s = (a === "u" ? e.predecessors : e.successors).bind(e), c = ln(e, o, n, s), l = un(e, o, c.root, c.align, t === "r");
|
|
1270
|
+
t === "r" && (l = rt(l, (e) => -e)), r[a + t] = l;
|
|
1270
1271
|
});
|
|
1271
|
-
}),
|
|
1272
|
+
}), pn(r, fn(e, r)), mn(r, e.graph().align);
|
|
1272
1273
|
}
|
|
1273
|
-
function
|
|
1274
|
+
function gn(e, t, n) {
|
|
1274
1275
|
return (r, i, a) => {
|
|
1275
1276
|
let o = r.node(i), s = r.node(a), c = 0, l;
|
|
1276
1277
|
if (c += o.width / 2, Object.hasOwn(o, "labelpos")) switch (o.labelpos.toLowerCase()) {
|
|
@@ -1292,21 +1293,21 @@ function mn(e, t, n) {
|
|
|
1292
1293
|
return l && (c += n ? l : -l), l = 0, c;
|
|
1293
1294
|
};
|
|
1294
1295
|
}
|
|
1295
|
-
function
|
|
1296
|
+
function _n(e, t) {
|
|
1296
1297
|
return e.node(t).width;
|
|
1297
1298
|
}
|
|
1298
1299
|
//#endregion
|
|
1299
1300
|
//#region src/DAG/position/index.js
|
|
1300
|
-
function
|
|
1301
|
-
let t =
|
|
1302
|
-
|
|
1303
|
-
let n =
|
|
1301
|
+
function vn(e) {
|
|
1302
|
+
let t = I(e);
|
|
1303
|
+
yn(t);
|
|
1304
|
+
let n = hn(t);
|
|
1304
1305
|
Object.entries(n).forEach(([t, n]) => {
|
|
1305
1306
|
e.node(t).x = n;
|
|
1306
1307
|
});
|
|
1307
1308
|
}
|
|
1308
|
-
function
|
|
1309
|
-
let t =
|
|
1309
|
+
function yn(e) {
|
|
1310
|
+
let t = L(e), n = e.graph().ranksep, r = 0;
|
|
1310
1311
|
t.forEach((t) => {
|
|
1311
1312
|
let i = t.reduce((t, n) => {
|
|
1312
1313
|
let r = e.node(n).height;
|
|
@@ -1319,17 +1320,17 @@ function _n(e) {
|
|
|
1319
1320
|
}
|
|
1320
1321
|
//#endregion
|
|
1321
1322
|
//#region src/DAG/layout.js
|
|
1322
|
-
function
|
|
1323
|
-
let n = t.debugTiming ?
|
|
1323
|
+
function bn(e, t = {}) {
|
|
1324
|
+
let n = t.debugTiming ? B : et;
|
|
1324
1325
|
return n("layout", () => {
|
|
1325
|
-
let r = n(" buildLayoutGraph", () =>
|
|
1326
|
-
return n(" runLayout", () =>
|
|
1326
|
+
let r = n(" buildLayoutGraph", () => jn(e));
|
|
1327
|
+
return n(" runLayout", () => xn(r, n, t)), n(" updateInputGraph", () => Sn(e, r)), r;
|
|
1327
1328
|
});
|
|
1328
1329
|
}
|
|
1329
|
-
function
|
|
1330
|
-
t(" makeSpaceForEdgeLabels", () =>
|
|
1330
|
+
function xn(e, t, n) {
|
|
1331
|
+
t(" makeSpaceForEdgeLabels", () => Mn(e)), t(" removeSelfEdges", () => Hn(e)), t(" acyclic", () => G(e)), t(" nestingGraph.run", () => Tt(e)), t(" rank", () => bt(I(e))), t(" injectEdgeLabelProxies", () => Nn(e)), t(" removeEmptyRanks", () => Ye(e)), t(" nestingGraph.cleanup", () => kt(e)), t(" normalizeRanks", () => Je(e)), t(" assignRankMinMax", () => Pn(e)), t(" removeEdgeLabelProxies", () => Fn(e)), t(" normalize.run", () => ot(e)), t(" parentDummyChains", () => Ct(e)), t(" addBorderSegments", () => At(e)), t(" order", () => en(e, n)), t(" insertSelfEdges", () => Un(e)), t(" adjustCoordinateSystem", () => zt.adjust(e)), t(" position", () => vn(e)), t(" positionSelfEdges", () => Wn(e)), t(" removeBorderNodes", () => Vn(e)), t(" normalize.undo", () => st(e)), t(" fixupEdgeLabelCoords", () => zn(e)), t(" undoCoordinateSystem", () => zt.undo(e)), t(" translateGraph", () => In(e)), t(" assignNodeIntersects", () => Rn(e)), t(" reversePoints", () => Bn(e)), t(" acyclic.undo", () => it(e));
|
|
1331
1332
|
}
|
|
1332
|
-
function
|
|
1333
|
+
function Sn(e, t) {
|
|
1333
1334
|
e.nodes().forEach((n) => {
|
|
1334
1335
|
let r = e.node(n), i = t.node(n);
|
|
1335
1336
|
r && (r.x = i.x, r.y = i.y, r.order = i.order, r.rank = i.rank, t.children(n).length && (r.width = i.width, r.height = i.height));
|
|
@@ -1340,99 +1341,99 @@ function bn(e, t) {
|
|
|
1340
1341
|
let n = t.graph(), r = e.graph();
|
|
1341
1342
|
r.width = n.width, r.height = n.height;
|
|
1342
1343
|
}
|
|
1343
|
-
var
|
|
1344
|
+
var Cn = [
|
|
1344
1345
|
"nodesep",
|
|
1345
1346
|
"edgesep",
|
|
1346
1347
|
"ranksep",
|
|
1347
1348
|
"marginx",
|
|
1348
1349
|
"marginy"
|
|
1349
|
-
],
|
|
1350
|
+
], wn = {
|
|
1350
1351
|
ranksep: 50,
|
|
1351
1352
|
edgesep: 20,
|
|
1352
1353
|
nodesep: 50,
|
|
1353
1354
|
rankdir: "tb"
|
|
1354
|
-
},
|
|
1355
|
+
}, Tn = [
|
|
1355
1356
|
"acyclicer",
|
|
1356
1357
|
"ranker",
|
|
1357
1358
|
"rankdir",
|
|
1358
1359
|
"align"
|
|
1359
|
-
],
|
|
1360
|
+
], En = [
|
|
1360
1361
|
"width",
|
|
1361
1362
|
"height",
|
|
1362
1363
|
"rank"
|
|
1363
|
-
],
|
|
1364
|
+
], Dn = {
|
|
1364
1365
|
width: 0,
|
|
1365
1366
|
height: 0
|
|
1366
|
-
},
|
|
1367
|
+
}, On = [
|
|
1367
1368
|
"minlen",
|
|
1368
1369
|
"weight",
|
|
1369
1370
|
"width",
|
|
1370
1371
|
"height",
|
|
1371
1372
|
"labeloffset"
|
|
1372
|
-
],
|
|
1373
|
+
], kn = {
|
|
1373
1374
|
minlen: 1,
|
|
1374
1375
|
weight: 1,
|
|
1375
1376
|
width: 0,
|
|
1376
1377
|
height: 0,
|
|
1377
1378
|
labeloffset: 10,
|
|
1378
1379
|
labelpos: "r"
|
|
1379
|
-
},
|
|
1380
|
-
function
|
|
1381
|
-
let t =
|
|
1382
|
-
...
|
|
1383
|
-
...
|
|
1384
|
-
|
|
1385
|
-
}, r = new
|
|
1380
|
+
}, An = ["labelpos", "arrowshape"];
|
|
1381
|
+
function jn(e) {
|
|
1382
|
+
let t = Kn(e.graph()), n = {
|
|
1383
|
+
...wn,
|
|
1384
|
+
...Gn(t, Cn),
|
|
1385
|
+
...nt(t, Tn)
|
|
1386
|
+
}, r = new O({
|
|
1386
1387
|
multigraph: !0,
|
|
1387
1388
|
compound: !0
|
|
1388
1389
|
});
|
|
1389
1390
|
return r.setGraph(n), e.nodes().forEach((t) => {
|
|
1390
|
-
let n =
|
|
1391
|
-
Object.keys(
|
|
1392
|
-
n[e] === void 0 && (n[e] =
|
|
1391
|
+
let n = Gn(Kn(e.node(t)), En);
|
|
1392
|
+
Object.keys(Dn).forEach((e) => {
|
|
1393
|
+
n[e] === void 0 && (n[e] = Dn[e]);
|
|
1393
1394
|
}), r.setNode(t, n), r.setParent(t, e.parent(t));
|
|
1394
1395
|
}), e.edges().forEach((t) => {
|
|
1395
|
-
let n =
|
|
1396
|
+
let n = Kn(e.edge(t));
|
|
1396
1397
|
r.setEdge(t, {
|
|
1397
|
-
...
|
|
1398
|
-
...
|
|
1399
|
-
|
|
1398
|
+
...kn,
|
|
1399
|
+
...Gn(n, On),
|
|
1400
|
+
...nt(n, An)
|
|
1400
1401
|
});
|
|
1401
1402
|
}), r;
|
|
1402
1403
|
}
|
|
1403
|
-
function
|
|
1404
|
+
function Mn(e) {
|
|
1404
1405
|
let t = e.graph();
|
|
1405
1406
|
t.ranksep /= 2, e.edges().forEach((n) => {
|
|
1406
1407
|
let r = e.edge(n);
|
|
1407
1408
|
r.minlen *= 2, r.labelpos.toLowerCase() !== "c" && (t.rankdir === "TB" || t.rankdir === "BT" ? r.width += r.labeloffset : r.height += r.labeloffset);
|
|
1408
1409
|
});
|
|
1409
1410
|
}
|
|
1410
|
-
function
|
|
1411
|
+
function Nn(e) {
|
|
1411
1412
|
e.edges().forEach((t) => {
|
|
1412
1413
|
let n = e.edge(t);
|
|
1413
1414
|
if (n.width && n.height) {
|
|
1414
1415
|
let n = e.node(t.v);
|
|
1415
|
-
|
|
1416
|
+
P(e, "edge-proxy", {
|
|
1416
1417
|
rank: (e.node(t.w).rank - n.rank) / 2 + n.rank,
|
|
1417
1418
|
e: t
|
|
1418
1419
|
}, "_ep");
|
|
1419
1420
|
}
|
|
1420
1421
|
});
|
|
1421
1422
|
}
|
|
1422
|
-
function
|
|
1423
|
+
function Pn(e) {
|
|
1423
1424
|
let t = 0;
|
|
1424
1425
|
e.nodes().forEach((n) => {
|
|
1425
1426
|
let r = e.node(n);
|
|
1426
1427
|
r.borderTop && (r.minRank = e.node(r.borderTop).rank, r.maxRank = e.node(r.borderBottom).rank, t = Math.max(t, r.maxRank));
|
|
1427
1428
|
}), e.graph().maxRank = t;
|
|
1428
1429
|
}
|
|
1429
|
-
function
|
|
1430
|
+
function Fn(e) {
|
|
1430
1431
|
e.nodes().forEach((t) => {
|
|
1431
1432
|
let n = e.node(t);
|
|
1432
1433
|
n.dummy === "edge-proxy" && (e.edge(n.e).labelRank = n.rank, e.removeNode(t));
|
|
1433
1434
|
});
|
|
1434
1435
|
}
|
|
1435
|
-
function
|
|
1436
|
+
function In(e) {
|
|
1436
1437
|
let t = Infinity, n = 0, r = Infinity, i = 0, a = e.graph(), o = a.marginx || 0, s = a.marginy || 0;
|
|
1437
1438
|
function c(e) {
|
|
1438
1439
|
let a = e.x, o = e.y, s = e.width, c = e.height;
|
|
@@ -1451,7 +1452,7 @@ function Pn(e) {
|
|
|
1451
1452
|
}), Object.hasOwn(i, "x") && (i.x -= t), Object.hasOwn(i, "y") && (i.y -= r);
|
|
1452
1453
|
}), a.width = n - t + o, a.height = i - r + s;
|
|
1453
1454
|
}
|
|
1454
|
-
function
|
|
1455
|
+
function Ln(e, t, n) {
|
|
1455
1456
|
if (!n || !t) return e;
|
|
1456
1457
|
let r = t.x - e.x, i = t.y - e.y, a = Math.sqrt(r * r + i * i);
|
|
1457
1458
|
if (!a || a <= n) return e;
|
|
@@ -1461,15 +1462,15 @@ function Fn(e, t, n) {
|
|
|
1461
1462
|
y: e.y + i * o
|
|
1462
1463
|
};
|
|
1463
1464
|
}
|
|
1464
|
-
function
|
|
1465
|
+
function Rn(e) {
|
|
1465
1466
|
e.edges().forEach((t) => {
|
|
1466
1467
|
let n = e.edge(t), r = e.node(t.v), i = e.node(t.w), a, o;
|
|
1467
1468
|
!n.points || !n.points.length ? (n.points = [], a = i, o = r) : (a = n.points[0], o = n.points[n.points.length - 1]);
|
|
1468
|
-
let s =
|
|
1469
|
-
f && (p ? m =
|
|
1469
|
+
let s = qe(r, a), c = qe(i, o), l = n.points.length ? n.points[0] : a, u = n.points.length ? n.points[n.points.length - 1] : o, d = n.arrowshape, f = d === "normal" || d === "vee", p = !!n.reversed, m = s, h = c;
|
|
1470
|
+
f && (p ? m = Ln(s, l, 4) : h = Ln(c, u, 4)), n.points.unshift(m), n.points.push(h);
|
|
1470
1471
|
});
|
|
1471
1472
|
}
|
|
1472
|
-
function
|
|
1473
|
+
function zn(e) {
|
|
1473
1474
|
e.edges().forEach((t) => {
|
|
1474
1475
|
let n = e.edge(t);
|
|
1475
1476
|
if (Object.hasOwn(n, "x")) switch ((n.labelpos === "l" || n.labelpos === "r") && (n.width -= n.labeloffset), n.labelpos) {
|
|
@@ -1482,13 +1483,13 @@ function Ln(e) {
|
|
|
1482
1483
|
}
|
|
1483
1484
|
});
|
|
1484
1485
|
}
|
|
1485
|
-
function
|
|
1486
|
+
function Bn(e) {
|
|
1486
1487
|
e.edges().forEach((t) => {
|
|
1487
1488
|
let n = e.edge(t);
|
|
1488
1489
|
n.reversed && n.points.reverse();
|
|
1489
1490
|
});
|
|
1490
1491
|
}
|
|
1491
|
-
function
|
|
1492
|
+
function Vn(e) {
|
|
1492
1493
|
e.nodes().forEach((t) => {
|
|
1493
1494
|
if (e.children(t).length) {
|
|
1494
1495
|
let n = e.node(t), r = e.node(n.borderTop), i = e.node(n.borderBottom), a = e.node(n.borderLeft[n.borderLeft.length - 1]), o = e.node(n.borderRight[n.borderRight.length - 1]);
|
|
@@ -1498,7 +1499,7 @@ function zn(e) {
|
|
|
1498
1499
|
e.node(t).dummy === "border" && e.removeNode(t);
|
|
1499
1500
|
});
|
|
1500
1501
|
}
|
|
1501
|
-
function
|
|
1502
|
+
function Hn(e) {
|
|
1502
1503
|
e.edges().forEach((t) => {
|
|
1503
1504
|
if (t.v === t.w) {
|
|
1504
1505
|
let n = e.node(t.v);
|
|
@@ -1509,13 +1510,13 @@ function Bn(e) {
|
|
|
1509
1510
|
}
|
|
1510
1511
|
});
|
|
1511
1512
|
}
|
|
1512
|
-
function
|
|
1513
|
-
|
|
1513
|
+
function Un(e) {
|
|
1514
|
+
L(e).forEach((t) => {
|
|
1514
1515
|
let n = 0;
|
|
1515
1516
|
t.forEach((t, r) => {
|
|
1516
1517
|
let i = e.node(t);
|
|
1517
1518
|
i.order = r + n, (i.selfEdges || []).forEach((t) => {
|
|
1518
|
-
|
|
1519
|
+
P(e, "selfedge", {
|
|
1519
1520
|
width: t.label.width,
|
|
1520
1521
|
height: t.label.height,
|
|
1521
1522
|
rank: i.rank,
|
|
@@ -1527,7 +1528,7 @@ function Vn(e) {
|
|
|
1527
1528
|
});
|
|
1528
1529
|
});
|
|
1529
1530
|
}
|
|
1530
|
-
function
|
|
1531
|
+
function Wn(e) {
|
|
1531
1532
|
e.nodes().forEach((t) => {
|
|
1532
1533
|
let n = e.node(t);
|
|
1533
1534
|
if (n.dummy === "selfedge") {
|
|
@@ -1557,10 +1558,10 @@ function Hn(e) {
|
|
|
1557
1558
|
}
|
|
1558
1559
|
});
|
|
1559
1560
|
}
|
|
1560
|
-
function
|
|
1561
|
-
return
|
|
1561
|
+
function Gn(e, t) {
|
|
1562
|
+
return rt(nt(e, t), Number);
|
|
1562
1563
|
}
|
|
1563
|
-
function
|
|
1564
|
+
function Kn(e) {
|
|
1564
1565
|
let t = {};
|
|
1565
1566
|
return e && Object.entries(e).forEach(([e, n]) => {
|
|
1566
1567
|
let r = e;
|
|
@@ -1569,7 +1570,7 @@ function Wn(e) {
|
|
|
1569
1570
|
}
|
|
1570
1571
|
//#endregion
|
|
1571
1572
|
//#region src/useDag.js
|
|
1572
|
-
var
|
|
1573
|
+
var qn = {
|
|
1573
1574
|
rankDirection: "TB",
|
|
1574
1575
|
nodeSeparation: 50,
|
|
1575
1576
|
rankSeparation: 50,
|
|
@@ -1582,10 +1583,10 @@ var Gn = {
|
|
|
1582
1583
|
arrowShape: "normal",
|
|
1583
1584
|
arrowSize: 10
|
|
1584
1585
|
};
|
|
1585
|
-
function
|
|
1586
|
+
function Jn(e) {
|
|
1586
1587
|
return e.length ? e.map((e, t) => `${t === 0 ? "M" : "L"} ${e.x} ${e.y}`).join(" ") : "";
|
|
1587
1588
|
}
|
|
1588
|
-
function
|
|
1589
|
+
function Yn(e) {
|
|
1589
1590
|
if (!e.length) return "";
|
|
1590
1591
|
if (e.length === 1) {
|
|
1591
1592
|
let t = e[0];
|
|
@@ -1601,36 +1602,36 @@ function qn(e) {
|
|
|
1601
1602
|
let r = e[e.length - 1];
|
|
1602
1603
|
return n += ` L ${r.x} ${r.y}`, n;
|
|
1603
1604
|
}
|
|
1604
|
-
function
|
|
1605
|
-
let { nodes: t, edges: n, configuration:
|
|
1605
|
+
function Xn(e) {
|
|
1606
|
+
let { nodes: t, edges: n, configuration: r } = e, a = w(null), s = w(null), c = `dag-arrow-${o()}`;
|
|
1606
1607
|
function l(e, t, n) {
|
|
1607
|
-
s.value = null,
|
|
1608
|
-
let
|
|
1609
|
-
...
|
|
1608
|
+
s.value = null, a.value = null;
|
|
1609
|
+
let r = {
|
|
1610
|
+
...qn,
|
|
1610
1611
|
...n
|
|
1611
|
-
}, l = new
|
|
1612
|
+
}, l = new O({
|
|
1612
1613
|
multigraph: !0,
|
|
1613
1614
|
compound: !0
|
|
1614
1615
|
});
|
|
1615
1616
|
l.setGraph({
|
|
1616
|
-
rankdir:
|
|
1617
|
-
nodesep:
|
|
1618
|
-
ranksep:
|
|
1619
|
-
edgesep:
|
|
1620
|
-
align:
|
|
1617
|
+
rankdir: r.rankDirection,
|
|
1618
|
+
nodesep: r.nodeSeparation,
|
|
1619
|
+
ranksep: r.rankSeparation,
|
|
1620
|
+
edgesep: r.edgeSeparation,
|
|
1621
|
+
align: r.align
|
|
1621
1622
|
}), e.forEach((e) => {
|
|
1622
1623
|
l.setNode(e.id, {
|
|
1623
1624
|
label: e.label,
|
|
1624
|
-
width: e.width ??
|
|
1625
|
-
height: e.height ??
|
|
1625
|
+
width: e.width ?? r.nodeWidth,
|
|
1626
|
+
height: e.height ?? r.nodeHeight
|
|
1626
1627
|
});
|
|
1627
1628
|
}), t.forEach((e) => {
|
|
1628
1629
|
l.setEdge(e.from, e.to, {
|
|
1629
1630
|
weight: e.weight ?? 1,
|
|
1630
1631
|
minlen: e.minLength ?? 1,
|
|
1631
|
-
arrowShape:
|
|
1632
|
+
arrowShape: r.arrowShape ?? "normal"
|
|
1632
1633
|
});
|
|
1633
|
-
}),
|
|
1634
|
+
}), bn(l);
|
|
1634
1635
|
let u = e.map((e) => {
|
|
1635
1636
|
let t = l.node(e.id);
|
|
1636
1637
|
return {
|
|
@@ -1643,135 +1644,135 @@ function Jn(e) {
|
|
|
1643
1644
|
original: e
|
|
1644
1645
|
};
|
|
1645
1646
|
}), d = l.edges().map((e) => {
|
|
1646
|
-
let n = l.edge(e),
|
|
1647
|
-
if (!
|
|
1648
|
-
let
|
|
1647
|
+
let n = l.edge(e), i = n.points || [];
|
|
1648
|
+
if (!i.length) return null;
|
|
1649
|
+
let a = r.curvedEdges ? Yn(i) : Jn(i), s = r.arrowShape === "undirected" ? null : `url(#${c})`, u = t.find((t) => t?.from === e.v && t?.to === e.w);
|
|
1649
1650
|
return {
|
|
1650
|
-
id: `${e.v}->${e.w}->${
|
|
1651
|
+
id: `${e.v}->${e.w}->${o()}`,
|
|
1651
1652
|
from: e.v,
|
|
1652
1653
|
to: e.w,
|
|
1653
|
-
points:
|
|
1654
|
-
pathData:
|
|
1654
|
+
points: i,
|
|
1655
|
+
pathData: a,
|
|
1655
1656
|
markerEnd: s,
|
|
1656
1657
|
original: {
|
|
1657
1658
|
...u,
|
|
1658
1659
|
...n
|
|
1659
1660
|
}
|
|
1660
1661
|
};
|
|
1661
|
-
}).filter(Boolean), f =
|
|
1662
|
+
}).filter(Boolean), f = r.padding;
|
|
1662
1663
|
if (!u.length) {
|
|
1663
|
-
|
|
1664
|
+
a.value = {
|
|
1664
1665
|
nodes: [],
|
|
1665
1666
|
edges: d,
|
|
1666
1667
|
viewBox: "0 0 0 0",
|
|
1667
|
-
arrowShape:
|
|
1668
|
-
arrowSize:
|
|
1668
|
+
arrowShape: r.arrowShape,
|
|
1669
|
+
arrowSize: r.arrowSize
|
|
1669
1670
|
};
|
|
1670
1671
|
return;
|
|
1671
1672
|
}
|
|
1672
1673
|
let p = u.flatMap((e) => [e.x - e.width / 2, e.x + e.width / 2]), m = u.flatMap((e) => [e.y - e.height / 2, e.y + e.height / 2]), h = Math.min(...p) - f, g = Math.max(...p) + f, ee = Math.min(...m) - f, te = Math.max(...m) + f;
|
|
1673
|
-
|
|
1674
|
+
a.value = {
|
|
1674
1675
|
nodes: u,
|
|
1675
1676
|
edges: d.map((e) => ({
|
|
1676
1677
|
...e,
|
|
1677
|
-
midpoint: e.pathData ?
|
|
1678
|
+
midpoint: e.pathData ? i(e.pathData) : {
|
|
1678
1679
|
x: 0,
|
|
1679
1680
|
y: 0
|
|
1680
1681
|
}
|
|
1681
1682
|
})),
|
|
1682
1683
|
viewBox: `${h} ${ee} ${g - h} ${te - ee}`,
|
|
1683
|
-
arrowShape:
|
|
1684
|
-
arrowSize:
|
|
1684
|
+
arrowShape: r.arrowShape,
|
|
1685
|
+
arrowSize: r.arrowSize
|
|
1685
1686
|
};
|
|
1686
1687
|
}
|
|
1687
|
-
return
|
|
1688
|
+
return Ae(() => {
|
|
1688
1689
|
try {
|
|
1689
|
-
l(
|
|
1690
|
+
l(E(t) || [], E(n) || [], E(r) || {});
|
|
1690
1691
|
} catch (e) {
|
|
1691
|
-
console.error("[useDag] layout error:", e), s.value = e,
|
|
1692
|
+
console.error("[useDag] layout error:", e), s.value = e, a.value = null;
|
|
1692
1693
|
}
|
|
1693
1694
|
}), {
|
|
1694
|
-
layoutData:
|
|
1695
|
+
layoutData: a,
|
|
1695
1696
|
lastError: s,
|
|
1696
1697
|
arrowMarkerIdentifier: c,
|
|
1697
1698
|
recomputeLayout: () => {
|
|
1698
|
-
l(
|
|
1699
|
+
l(E(t) || [], E(n) || [], E(r) || {});
|
|
1699
1700
|
}
|
|
1700
1701
|
};
|
|
1701
1702
|
}
|
|
1702
1703
|
//#endregion
|
|
1703
1704
|
//#region src/components/vue-ui-dag.vue
|
|
1704
|
-
var
|
|
1705
|
+
var Zn = /* @__PURE__ */ e({ default: () => jr }), Qn = ["id"], $n = ["id"], er = {
|
|
1705
1706
|
key: 1,
|
|
1706
1707
|
class: "dag-chart-error"
|
|
1707
|
-
},
|
|
1708
|
+
}, tr = { style: { position: "relative" } }, nr = [
|
|
1708
1709
|
"viewBox",
|
|
1709
1710
|
"xmlns",
|
|
1710
1711
|
"aria-describedby"
|
|
1711
|
-
],
|
|
1712
|
+
], rr = { key: 0 }, ir = [
|
|
1712
1713
|
"id",
|
|
1713
1714
|
"width",
|
|
1714
1715
|
"height"
|
|
1715
|
-
],
|
|
1716
|
+
], ar = [
|
|
1716
1717
|
"cx",
|
|
1717
1718
|
"cy",
|
|
1718
1719
|
"r",
|
|
1719
1720
|
"fill"
|
|
1720
|
-
],
|
|
1721
|
+
], or = [
|
|
1721
1722
|
"x",
|
|
1722
1723
|
"y",
|
|
1723
1724
|
"width",
|
|
1724
1725
|
"height",
|
|
1725
1726
|
"fill"
|
|
1726
|
-
],
|
|
1727
|
+
], sr = { key: 2 }, cr = [
|
|
1727
1728
|
"id",
|
|
1728
1729
|
"markerWidth",
|
|
1729
1730
|
"markerHeight",
|
|
1730
1731
|
"refX",
|
|
1731
1732
|
"refY"
|
|
1732
|
-
],
|
|
1733
|
+
], lr = [
|
|
1733
1734
|
"d",
|
|
1734
1735
|
"fill",
|
|
1735
1736
|
"stroke"
|
|
1736
|
-
],
|
|
1737
|
+
], ur = [
|
|
1737
1738
|
"d",
|
|
1738
1739
|
"fill",
|
|
1739
1740
|
"stroke"
|
|
1740
|
-
],
|
|
1741
|
+
], dr = { class: "vue-ui-dag-edges" }, fr = [
|
|
1741
1742
|
"data-a11y-midpoint-id",
|
|
1742
1743
|
"aria-label",
|
|
1743
1744
|
"onMouseenter"
|
|
1744
|
-
],
|
|
1745
|
+
], pr = { class: "vue-ui-dag-nodes" }, mr = [
|
|
1745
1746
|
"onClick",
|
|
1746
1747
|
"onMouseenter",
|
|
1747
1748
|
"onMouseleave"
|
|
1748
|
-
],
|
|
1749
|
+
], hr = ["data-a11y-node-id", "aria-label"], gr = [
|
|
1749
1750
|
"x",
|
|
1750
1751
|
"y",
|
|
1751
1752
|
"width",
|
|
1752
1753
|
"height"
|
|
1753
|
-
],
|
|
1754
|
+
], _r = { class: "vue-ui-dag-edges" }, vr = [
|
|
1754
1755
|
"d",
|
|
1755
1756
|
"stroke-width",
|
|
1756
1757
|
"marker-end"
|
|
1757
|
-
],
|
|
1758
|
+
], yr = { class: "vue-ui-dag-node-labels" }, br = [
|
|
1758
1759
|
"onClick",
|
|
1759
1760
|
"onMouseenter",
|
|
1760
1761
|
"onMouseleave"
|
|
1761
|
-
],
|
|
1762
|
+
], xr = [
|
|
1762
1763
|
"x",
|
|
1763
1764
|
"y",
|
|
1764
1765
|
"font-size",
|
|
1765
1766
|
"fill",
|
|
1766
1767
|
"font-weight"
|
|
1767
|
-
],
|
|
1768
|
+
], Sr = [
|
|
1768
1769
|
"x",
|
|
1769
1770
|
"y",
|
|
1770
1771
|
"font-size",
|
|
1771
1772
|
"fill",
|
|
1772
1773
|
"font-weight",
|
|
1773
1774
|
"innerHTML"
|
|
1774
|
-
],
|
|
1775
|
+
], Cr = { key: 1 }, wr = {
|
|
1775
1776
|
key: 1,
|
|
1776
1777
|
style: {
|
|
1777
1778
|
position: "absolute",
|
|
@@ -1781,10 +1782,10 @@ var Yn = /* @__PURE__ */ e({ default: () => kr }), Xn = ["id"], Zn = ["id"], Qn
|
|
|
1781
1782
|
},
|
|
1782
1783
|
"data-dom-to-png-ignore": "",
|
|
1783
1784
|
"aria-hidden": "true"
|
|
1784
|
-
},
|
|
1785
|
+
}, Tr = {
|
|
1785
1786
|
key: 6,
|
|
1786
1787
|
class: "vue-data-ui-watermark"
|
|
1787
|
-
},
|
|
1788
|
+
}, Er = ["data-position"], Dr = { key: 0 }, Or = ["data-position"], kr = { key: 0 }, Ar = 1.5, jr = /*#__PURE__*/ re({
|
|
1788
1789
|
__name: "vue-ui-dag",
|
|
1789
1790
|
props: {
|
|
1790
1791
|
dataset: {
|
|
@@ -1810,23 +1811,30 @@ var Yn = /* @__PURE__ */ e({ default: () => kr }), Xn = ["id"], Zn = ["id"], Qn
|
|
|
1810
1811
|
"copyAlt",
|
|
1811
1812
|
"rotate"
|
|
1812
1813
|
],
|
|
1813
|
-
setup(e, { expose:
|
|
1814
|
-
let
|
|
1814
|
+
setup(e, { expose: i, emit: re }) {
|
|
1815
|
+
let Ae = ye(() => import("./PenAndPaper-cE4J8-rA.js").then((e) => e.t)), Me = ye(() => import("./UserOptions-3ujTo3LD.js").then((e) => e.n)), Ne = ye(() => import("./PackageVersion--QCMh5k_.js").then((e) => e.t)), { vue_ui_dag: Pe } = d(), { isThemeValid: O, warnInvalidTheme: Fe } = ee(), k = e, A = re, j = w(null), M = w(o()), Ie = w(null), Le = w(null), Re = w(null), ze = w(0), Be = w(0), Ve = w(!1), He = w(!1), Ue = w(!1), We = w(!1), N = w(null), P = w(null), F = w(null), I = w(null), Ge = w(null), Ke = w("pointer"), qe = w(!1), L = w(dt());
|
|
1816
|
+
l({
|
|
1817
|
+
config: () => L.value,
|
|
1818
|
+
dataset: () => k.dataset,
|
|
1819
|
+
component: "VueUiDag",
|
|
1820
|
+
rules: [u.noHint]
|
|
1821
|
+
});
|
|
1822
|
+
let Je = _(() => L.value.userOptions.useCursorPointer), Ye = w(L.value.style.chart.width), Xe = w(L.value.style.chart.height), Ze = w({
|
|
1815
1823
|
x: 0,
|
|
1816
1824
|
y: 0
|
|
1817
|
-
}),
|
|
1825
|
+
}), R = w(null), z = w(null), Qe = w({
|
|
1818
1826
|
left: "0px",
|
|
1819
1827
|
top: "0px"
|
|
1820
|
-
}),
|
|
1828
|
+
}), $e = w("top"), B = w(!1), et = w({
|
|
1821
1829
|
x: 0,
|
|
1822
1830
|
y: 0
|
|
1823
|
-
}),
|
|
1831
|
+
}), tt = w({
|
|
1824
1832
|
x: 0,
|
|
1825
1833
|
y: 0
|
|
1826
|
-
}),
|
|
1834
|
+
}), V = w(null), H = w(null), nt = w({
|
|
1827
1835
|
left: "0px",
|
|
1828
1836
|
top: "0px"
|
|
1829
|
-
}),
|
|
1837
|
+
}), rt = w("top"), U = w(!1), W = w(!1), { svgRef: G } = ce({ config: L.value.style.chart.title }), { userOptionsVisible: it, setUserOptionsVisibility: at, keepUserOptionState: ot } = se({ config: L.value }), K = w(L.value.style.chart.layout.rankDirection), st = _(() => t({
|
|
1830
1838
|
defaultConfig: {
|
|
1831
1839
|
userOptions: { show: !1 },
|
|
1832
1840
|
style: { chart: {
|
|
@@ -1842,12 +1850,12 @@ var Yn = /* @__PURE__ */ e({ default: () => kr }), Xn = ["id"], Zn = ["id"], Qn
|
|
|
1842
1850
|
}
|
|
1843
1851
|
} }
|
|
1844
1852
|
},
|
|
1845
|
-
userConfig:
|
|
1846
|
-
})), { loading:
|
|
1847
|
-
...
|
|
1848
|
-
FINAL_CONFIG:
|
|
1849
|
-
prepareConfig:
|
|
1850
|
-
skeletonDataset:
|
|
1853
|
+
userConfig: L.value.skeletonConfig ?? {}
|
|
1854
|
+
})), { loading: ct, FINAL_DATASET: lt, manualLoading: ut } = p({
|
|
1855
|
+
...Oe(k),
|
|
1856
|
+
FINAL_CONFIG: L,
|
|
1857
|
+
prepareConfig: dt,
|
|
1858
|
+
skeletonDataset: k.config?.skeletonDataset ?? {
|
|
1851
1859
|
nodes: [
|
|
1852
1860
|
{
|
|
1853
1861
|
id: "A",
|
|
@@ -1870,77 +1878,77 @@ var Yn = /* @__PURE__ */ e({ default: () => kr }), Xn = ["id"], Zn = ["id"], Qn
|
|
|
1870
1878
|
to: "C"
|
|
1871
1879
|
}]
|
|
1872
1880
|
},
|
|
1873
|
-
skeletonConfig:
|
|
1874
|
-
defaultConfig:
|
|
1875
|
-
userConfig:
|
|
1881
|
+
skeletonConfig: t({
|
|
1882
|
+
defaultConfig: L.value,
|
|
1883
|
+
userConfig: st.value
|
|
1876
1884
|
})
|
|
1877
1885
|
});
|
|
1878
|
-
function
|
|
1879
|
-
let e =
|
|
1880
|
-
userConfig:
|
|
1881
|
-
defaultConfig:
|
|
1886
|
+
function dt() {
|
|
1887
|
+
let e = g({
|
|
1888
|
+
userConfig: k.config,
|
|
1889
|
+
defaultConfig: Pe
|
|
1882
1890
|
}), t = e.theme;
|
|
1883
1891
|
if (!t) return e;
|
|
1884
|
-
if (!
|
|
1885
|
-
let n =
|
|
1886
|
-
userConfig:
|
|
1892
|
+
if (!O.value(e)) return Fe(e), e;
|
|
1893
|
+
let n = g({
|
|
1894
|
+
userConfig: de[t] || k.config,
|
|
1887
1895
|
defaultConfig: e
|
|
1888
1896
|
});
|
|
1889
|
-
return
|
|
1890
|
-
userConfig:
|
|
1897
|
+
return g({
|
|
1898
|
+
userConfig: k.config,
|
|
1891
1899
|
defaultConfig: n
|
|
1892
1900
|
});
|
|
1893
1901
|
}
|
|
1894
|
-
let
|
|
1895
|
-
|
|
1896
|
-
|
|
1902
|
+
let ft = _(() => !!L.value.debug);
|
|
1903
|
+
Te(async () => {
|
|
1904
|
+
a(k.dataset) && (c({
|
|
1897
1905
|
componentName: "VueUiDag",
|
|
1898
1906
|
type: "dataset",
|
|
1899
|
-
debug:
|
|
1900
|
-
}),
|
|
1907
|
+
debug: ft.value
|
|
1908
|
+
}), He.value = !1, ut.value = !0), k.dataset.nodes || (c({
|
|
1901
1909
|
componentName: "VueUiDag",
|
|
1902
1910
|
type: "datasetAttributeEmpty",
|
|
1903
1911
|
property: "nodes",
|
|
1904
1912
|
index: 0,
|
|
1905
|
-
debug:
|
|
1906
|
-
}),
|
|
1907
|
-
}),
|
|
1908
|
-
|
|
1913
|
+
debug: ft.value
|
|
1914
|
+
}), He.value = !1, ut.value = !0), He.value = !0, await xe(), Jt();
|
|
1915
|
+
}), ke(() => k.config, async (e) => {
|
|
1916
|
+
ct.value || (L.value = dt()), it.value = !L.value.userOptions.showOnChartHover, ze.value += 1, K.value = L.value.style.chart.layout.rankDirection, Ye.value = L.value.style.chart.width, Xe.value = L.value.style.chart.height, Et.value = L.value.style.chart.zoom.active, await xe(), Jt();
|
|
1909
1917
|
}, { deep: !0 });
|
|
1910
|
-
let { isPrinting:
|
|
1911
|
-
elementId: `dag_${
|
|
1912
|
-
fileName:
|
|
1913
|
-
options:
|
|
1914
|
-
}),
|
|
1915
|
-
svg:
|
|
1916
|
-
title: _(() =>
|
|
1918
|
+
let { isPrinting: pt, isImaging: q, generatePdf: mt, generateImage: ht } = f({
|
|
1919
|
+
elementId: `dag_${M.value}`,
|
|
1920
|
+
fileName: L.value.style.chart.title.text || "vue-ui-dag",
|
|
1921
|
+
options: L.value.userOptions.print
|
|
1922
|
+
}), gt = _(() => L.value.style.chart.backgroundColor), { exportSvg: _t, getSvg: vt } = h({
|
|
1923
|
+
svg: G,
|
|
1924
|
+
title: _(() => L.value.style.chart.title),
|
|
1917
1925
|
legend: void 0,
|
|
1918
1926
|
legendItems: void 0,
|
|
1919
|
-
backgroundColor:
|
|
1927
|
+
backgroundColor: gt
|
|
1920
1928
|
});
|
|
1921
|
-
async function
|
|
1922
|
-
|
|
1929
|
+
async function yt({ isCb: e }) {
|
|
1930
|
+
We.value = !0, await xe();
|
|
1923
1931
|
try {
|
|
1924
1932
|
if (e) {
|
|
1925
|
-
let { blob: e, url: t, text: n, dataUrl: r } = await
|
|
1926
|
-
await Promise.resolve(
|
|
1933
|
+
let { blob: e, url: t, text: n, dataUrl: r } = await vt();
|
|
1934
|
+
await Promise.resolve(L.value.userOptions.callbacks.svg({
|
|
1927
1935
|
blob: e,
|
|
1928
1936
|
url: t,
|
|
1929
1937
|
text: n,
|
|
1930
1938
|
dataUrl: r
|
|
1931
1939
|
}));
|
|
1932
|
-
} else await Promise.resolve(
|
|
1940
|
+
} else await Promise.resolve(_t());
|
|
1933
1941
|
} finally {
|
|
1934
|
-
|
|
1942
|
+
We.value = !1;
|
|
1935
1943
|
}
|
|
1936
1944
|
}
|
|
1937
|
-
function
|
|
1938
|
-
|
|
1945
|
+
function bt() {
|
|
1946
|
+
Ve.value = !0, at(!0);
|
|
1939
1947
|
}
|
|
1940
|
-
function
|
|
1941
|
-
|
|
1948
|
+
function xt() {
|
|
1949
|
+
at(!1), Ve.value = !1;
|
|
1942
1950
|
}
|
|
1943
|
-
function
|
|
1951
|
+
function St({ tooltipRef: e, isVisibleRef: t, anchorRef: n, styleRef: r, placementRef: i, offsetRef: a, margin: o = 24 }) {
|
|
1944
1952
|
return function() {
|
|
1945
1953
|
let s = e.value;
|
|
1946
1954
|
if (!s || !t.value) return;
|
|
@@ -1961,25 +1969,25 @@ var Yn = /* @__PURE__ */ e({ default: () => kr }), Xn = ["id"], Zn = ["id"], Qn
|
|
|
1961
1969
|
};
|
|
1962
1970
|
};
|
|
1963
1971
|
}
|
|
1964
|
-
let { layoutData:
|
|
1965
|
-
nodes: _(() =>
|
|
1972
|
+
let { layoutData: J, lastError: Ct, arrowMarkerIdentifier: wt } = Xn({
|
|
1973
|
+
nodes: _(() => lt.value.nodes.map((e) => ({
|
|
1966
1974
|
...e,
|
|
1967
|
-
backgroundColor: e.backgroundColor ?
|
|
1968
|
-
color: e.color ?
|
|
1975
|
+
backgroundColor: e.backgroundColor ? r(e.backgroundColor) : L.value.style.chart.nodes.backgroundColor,
|
|
1976
|
+
color: e.color ? r(e.color) : L.value.style.chart.nodes.labels.color
|
|
1969
1977
|
}))),
|
|
1970
|
-
edges: _(() =>
|
|
1978
|
+
edges: _(() => lt.value.edges),
|
|
1971
1979
|
configuration: _(() => ({
|
|
1972
|
-
...
|
|
1973
|
-
rankDirection:
|
|
1980
|
+
...L.value.style.chart.layout,
|
|
1981
|
+
rankDirection: K.value
|
|
1974
1982
|
}))
|
|
1975
1983
|
});
|
|
1976
|
-
function
|
|
1977
|
-
return
|
|
1984
|
+
function Y(e) {
|
|
1985
|
+
return J.value ? J.value.nodes.find((t) => t.id === e) : null;
|
|
1978
1986
|
}
|
|
1979
1987
|
_(() => {
|
|
1980
|
-
if (!
|
|
1981
|
-
let e =
|
|
1982
|
-
return
|
|
1988
|
+
if (!J.value) return [];
|
|
1989
|
+
let e = L.value.style.chart.edges.stroke, t = /* @__PURE__ */ new Set();
|
|
1990
|
+
return J.value.edges.forEach((n) => {
|
|
1983
1991
|
t.add({
|
|
1984
1992
|
id: n.id,
|
|
1985
1993
|
from: n.from,
|
|
@@ -1988,165 +1996,165 @@ var Yn = /* @__PURE__ */ e({ default: () => kr }), Xn = ["id"], Zn = ["id"], Qn
|
|
|
1988
1996
|
});
|
|
1989
1997
|
}), Array.from(t);
|
|
1990
1998
|
});
|
|
1991
|
-
let
|
|
1992
|
-
let e =
|
|
1999
|
+
let Tt = _(() => {
|
|
2000
|
+
let e = Ye.value, t = Xe.value, n = Number(e), r = Number(t), i = Number.isFinite(n) && n > 0, a = Number.isFinite(r) && r > 0;
|
|
1993
2001
|
return !i && !a ? null : {
|
|
1994
2002
|
width: i ? n : null,
|
|
1995
2003
|
height: a ? r : null
|
|
1996
2004
|
};
|
|
1997
|
-
}),
|
|
2005
|
+
}), Et = w(L.value.style.chart.zoom.active), { viewBox: Dt, resetZoom: Ot, setInitialViewBox: kt, scale: At, zoomByFactor: jt } = le(G, {
|
|
1998
2006
|
x: 0,
|
|
1999
2007
|
y: 0,
|
|
2000
2008
|
width: 100,
|
|
2001
2009
|
height: 100
|
|
2002
|
-
}, 1,
|
|
2003
|
-
|
|
2010
|
+
}, 1, Et, () => {
|
|
2011
|
+
B.value = !1;
|
|
2004
2012
|
});
|
|
2005
|
-
function
|
|
2006
|
-
|
|
2013
|
+
function Mt() {
|
|
2014
|
+
Et.value = !Et.value;
|
|
2007
2015
|
}
|
|
2008
|
-
function
|
|
2009
|
-
let e =
|
|
2016
|
+
function Nt() {
|
|
2017
|
+
let e = J.value && J.value.viewBox;
|
|
2010
2018
|
if (!e) return;
|
|
2011
2019
|
let t = String(e).split(" ").map(Number);
|
|
2012
2020
|
if (t.length !== 4) return;
|
|
2013
2021
|
let [n, r, i, a] = t;
|
|
2014
2022
|
if (!Number.isFinite(n) || !Number.isFinite(r) || !Number.isFinite(i) || !Number.isFinite(a)) return;
|
|
2015
|
-
let o = i, s = a, c = n, l = r, u =
|
|
2016
|
-
u && (u.width !== null && (o = u.width), u.height !== null && (s = u.height), c = n - (o - i) / 2, l = r - (s - a) / 2),
|
|
2023
|
+
let o = i, s = a, c = n, l = r, u = Tt.value;
|
|
2024
|
+
u && (u.width !== null && (o = u.width), u.height !== null && (s = u.height), c = n - (o - i) / 2, l = r - (s - a) / 2), kt({
|
|
2017
2025
|
x: c,
|
|
2018
2026
|
y: l,
|
|
2019
2027
|
width: o,
|
|
2020
2028
|
height: s
|
|
2021
2029
|
}, { overwriteCurrentIfNotZoomed: !0 });
|
|
2022
2030
|
}
|
|
2023
|
-
|
|
2024
|
-
|
|
2025
|
-
}, { immediate: !0 }),
|
|
2026
|
-
|
|
2027
|
-
}),
|
|
2028
|
-
|
|
2031
|
+
ke(() => J.value && J.value.viewBox, () => {
|
|
2032
|
+
Nt();
|
|
2033
|
+
}, { immediate: !0 }), ke(() => Tt.value, () => {
|
|
2034
|
+
Nt();
|
|
2035
|
+
}), ke(() => W.value, (e) => {
|
|
2036
|
+
Et.value = !e;
|
|
2029
2037
|
});
|
|
2030
|
-
let
|
|
2031
|
-
let e =
|
|
2038
|
+
let Pt = _(() => {
|
|
2039
|
+
let e = Dt.value;
|
|
2032
2040
|
return e ? `${e.x} ${e.y} ${e.width} ${e.height}` : "0 0 0 0";
|
|
2033
|
-
}),
|
|
2034
|
-
function
|
|
2035
|
-
|
|
2041
|
+
}), X = w(!1);
|
|
2042
|
+
function Ft(e) {
|
|
2043
|
+
X.value = e, Be.value += 1;
|
|
2036
2044
|
}
|
|
2037
|
-
function
|
|
2038
|
-
|
|
2045
|
+
function It() {
|
|
2046
|
+
W.value = !W.value;
|
|
2039
2047
|
}
|
|
2040
|
-
function
|
|
2041
|
-
|
|
2048
|
+
function Lt() {
|
|
2049
|
+
jt(Ar, !0);
|
|
2042
2050
|
}
|
|
2043
|
-
function
|
|
2044
|
-
|
|
2051
|
+
function Rt() {
|
|
2052
|
+
jt(1 / Ar, !0);
|
|
2045
2053
|
}
|
|
2046
|
-
let
|
|
2054
|
+
let zt = [
|
|
2047
2055
|
"TB",
|
|
2048
2056
|
"RL",
|
|
2049
2057
|
"BT",
|
|
2050
2058
|
"LR"
|
|
2051
2059
|
];
|
|
2052
|
-
function
|
|
2053
|
-
|
|
2054
|
-
}
|
|
2055
|
-
let
|
|
2056
|
-
tooltipRef:
|
|
2057
|
-
isVisibleRef:
|
|
2058
|
-
anchorRef: Je,
|
|
2059
|
-
styleRef: Ye,
|
|
2060
|
-
placementRef: Xe,
|
|
2061
|
-
isNode: !1
|
|
2062
|
-
}), zt = yt({
|
|
2063
|
-
tooltipRef: U,
|
|
2064
|
-
isVisibleRef: V,
|
|
2060
|
+
function Bt() {
|
|
2061
|
+
K.value = zt[(zt.indexOf(K.value) + 1) % zt.length], Ot(), A("rotate", K.value);
|
|
2062
|
+
}
|
|
2063
|
+
let Vt = St({
|
|
2064
|
+
tooltipRef: z,
|
|
2065
|
+
isVisibleRef: U,
|
|
2065
2066
|
anchorRef: Ze,
|
|
2066
|
-
styleRef:
|
|
2067
|
-
placementRef:
|
|
2068
|
-
|
|
2069
|
-
}),
|
|
2070
|
-
|
|
2071
|
-
|
|
2072
|
-
|
|
2067
|
+
styleRef: Qe,
|
|
2068
|
+
placementRef: $e,
|
|
2069
|
+
isNode: !1
|
|
2070
|
+
}), Ht = St({
|
|
2071
|
+
tooltipRef: H,
|
|
2072
|
+
isVisibleRef: B,
|
|
2073
|
+
anchorRef: et,
|
|
2074
|
+
styleRef: nt,
|
|
2075
|
+
placementRef: rt,
|
|
2076
|
+
offsetRef: tt
|
|
2077
|
+
}), Z = w(null);
|
|
2078
|
+
async function Ut(e) {
|
|
2079
|
+
A("onMidpointEnter", e);
|
|
2080
|
+
let t = G.value;
|
|
2073
2081
|
if (!t || !e?.midpoint) return;
|
|
2074
2082
|
let n = t.createSVGPoint();
|
|
2075
2083
|
n.x = e.midpoint.x, n.y = e.midpoint.y;
|
|
2076
2084
|
let r = t.getScreenCTM();
|
|
2077
2085
|
if (!r) return;
|
|
2078
2086
|
let i = n.matrixTransform(r);
|
|
2079
|
-
|
|
2087
|
+
Ze.value = {
|
|
2080
2088
|
x: i.x,
|
|
2081
2089
|
y: i.y
|
|
2082
|
-
},
|
|
2090
|
+
}, R.value = e, U.value = !0, L.value.style.chart.midpoints.selectedEdge.animated === !0 && (Z.value = e.id, en()), await xe(), Vt();
|
|
2083
2091
|
}
|
|
2084
|
-
function
|
|
2085
|
-
|
|
2092
|
+
function Q() {
|
|
2093
|
+
U.value = !1, R.value = null, A("onMidpointLeave"), L.value.style.chart.midpoints.selectedEdge.animated === !0 && (Z.value = null, en());
|
|
2086
2094
|
}
|
|
2087
|
-
async function
|
|
2088
|
-
if (
|
|
2089
|
-
let t =
|
|
2095
|
+
async function Wt(e) {
|
|
2096
|
+
if (A("onNodeClick", e), !L.value.style.chart.nodes.tooltip.showOnClick) return;
|
|
2097
|
+
let t = G.value;
|
|
2090
2098
|
if (!t) return;
|
|
2091
2099
|
let n = t.createSVGPoint();
|
|
2092
2100
|
n.x = e.x, n.y = e.y;
|
|
2093
2101
|
let r = t.getScreenCTM();
|
|
2094
2102
|
if (!r) return;
|
|
2095
|
-
let i = n.matrixTransform(r), a =
|
|
2096
|
-
|
|
2103
|
+
let i = n.matrixTransform(r), a = L.value.style.chart.layout.nodeWidth, o = L.value.style.chart.layout.nodeHeight, s = r.a, c = r.d, l = a * s, u = o * c;
|
|
2104
|
+
tt.value = {
|
|
2097
2105
|
x: l / 2,
|
|
2098
2106
|
y: u / 2
|
|
2099
|
-
},
|
|
2107
|
+
}, et.value = {
|
|
2100
2108
|
x: i.x,
|
|
2101
2109
|
y: i.y
|
|
2102
|
-
},
|
|
2110
|
+
}, V.value = e, B.value = !0, await xe(), Ht();
|
|
2103
2111
|
}
|
|
2104
|
-
function
|
|
2105
|
-
|
|
2112
|
+
function Gt() {
|
|
2113
|
+
B.value = !1, V.value = null;
|
|
2106
2114
|
}
|
|
2107
|
-
function
|
|
2108
|
-
if (!(
|
|
2109
|
-
let t =
|
|
2115
|
+
function Kt(e) {
|
|
2116
|
+
if (!(B.value || U.value)) return;
|
|
2117
|
+
let t = H.value;
|
|
2110
2118
|
if (t && t.contains(e.target)) return;
|
|
2111
|
-
let n =
|
|
2119
|
+
let n = z.value;
|
|
2112
2120
|
if (n && n.contains(e.target)) return;
|
|
2113
|
-
let r =
|
|
2121
|
+
let r = G.value;
|
|
2114
2122
|
if (r && r.contains(e.target)) {
|
|
2115
2123
|
let t = e.target.closest(".vue-ui-dag-node"), n = e.target.closest(".vue-ui-dag-edge-midpoint");
|
|
2116
2124
|
if (t || n) return;
|
|
2117
2125
|
}
|
|
2118
|
-
|
|
2126
|
+
Gt(), Q(), qe.value || kn();
|
|
2119
2127
|
}
|
|
2120
|
-
function
|
|
2121
|
-
e.key === "Escape" && (
|
|
2128
|
+
function qt(e) {
|
|
2129
|
+
e.key === "Escape" && (B.value && Gt(), U.value && Q());
|
|
2122
2130
|
}
|
|
2123
|
-
|
|
2124
|
-
document.addEventListener("mousedown",
|
|
2125
|
-
}),
|
|
2126
|
-
document.removeEventListener("mousedown",
|
|
2131
|
+
Te(() => {
|
|
2132
|
+
document.addEventListener("mousedown", Kt), document.addEventListener("keydown", qt);
|
|
2133
|
+
}), we(() => {
|
|
2134
|
+
document.removeEventListener("mousedown", Kt), document.removeEventListener("keydown", qt), N.value && (P.value && N.value.unobserve(P.value), N.value.disconnect());
|
|
2127
2135
|
});
|
|
2128
|
-
function
|
|
2129
|
-
if (!
|
|
2130
|
-
|
|
2136
|
+
function Jt() {
|
|
2137
|
+
if (!L.value.responsive) {
|
|
2138
|
+
N.value && (P.value && N.value.unobserve(P.value), N.value.disconnect(), N.value = null, P.value = null);
|
|
2131
2139
|
return;
|
|
2132
2140
|
}
|
|
2133
|
-
let e =
|
|
2134
|
-
if (!
|
|
2135
|
-
let { width: e, height: t } =
|
|
2136
|
-
chart:
|
|
2137
|
-
title:
|
|
2138
|
-
legend:
|
|
2139
|
-
source:
|
|
2141
|
+
let e = ie(() => {
|
|
2142
|
+
if (!j.value) return;
|
|
2143
|
+
let { width: e, height: t } = ae({
|
|
2144
|
+
chart: j.value,
|
|
2145
|
+
title: L.value.style.chart.title.text ? Ie.value : null,
|
|
2146
|
+
legend: L.value.style.chart.controls.show ? Re.value?.$el : null,
|
|
2147
|
+
source: Le.value
|
|
2140
2148
|
});
|
|
2141
2149
|
requestAnimationFrame(() => {
|
|
2142
|
-
|
|
2150
|
+
Ye.value = Math.max(.1, e), Xe.value = Math.max(.1, t - 12);
|
|
2143
2151
|
});
|
|
2144
2152
|
});
|
|
2145
|
-
|
|
2153
|
+
N.value && (P.value && N.value.unobserve(P.value), N.value.disconnect()), N.value = new ResizeObserver(e), P.value = j.value ? j.value.parentNode : null, P.value && N.value.observe(P.value), e();
|
|
2146
2154
|
}
|
|
2147
|
-
function
|
|
2155
|
+
function Yt(e, t = {}) {
|
|
2148
2156
|
let { direction: n = -1, mode: r = "oneLapNearest", dasharray: i = null } = t;
|
|
2149
|
-
if (!e || typeof e.getTotalLength != "function") return
|
|
2157
|
+
if (!e || typeof e.getTotalLength != "function") return ft.value && console.warn("VueUiDag @getIdealDashoffsetDelta: invalid path element", e), 0;
|
|
2150
2158
|
let a = e.getTotalLength(), o = d(i ?? e.getAttribute("stroke-dasharray") ?? (typeof getComputedStyle == "function" ? getComputedStyle(e).strokeDasharray : ""));
|
|
2151
2159
|
if (!Number.isFinite(o) || o <= 0) return n * a;
|
|
2152
2160
|
let s = Math.max(1, Math.round(a / o)), c = Math.max(1, Math.ceil(a / o)), l = Math.max(1, Math.floor(a / o)), u;
|
|
@@ -2159,26 +2167,26 @@ var Yn = /* @__PURE__ */ e({ default: () => kr }), Xn = ["id"], Zn = ["id"], Qn
|
|
|
2159
2167
|
return t.length % 2 == 1 ? n * 2 : n;
|
|
2160
2168
|
}
|
|
2161
2169
|
}
|
|
2162
|
-
let
|
|
2163
|
-
function
|
|
2170
|
+
let Xt = w(/* @__PURE__ */ new Map()), Zt = w(/* @__PURE__ */ new Map());
|
|
2171
|
+
function Qt(e) {
|
|
2164
2172
|
return function(t) {
|
|
2165
|
-
t ?
|
|
2173
|
+
t ? Xt.value.set(e, t) : Xt.value.delete(e);
|
|
2166
2174
|
};
|
|
2167
2175
|
}
|
|
2168
|
-
function
|
|
2169
|
-
|
|
2176
|
+
function $t() {
|
|
2177
|
+
Zt.value.forEach((e) => {
|
|
2170
2178
|
try {
|
|
2171
2179
|
e.cancel();
|
|
2172
2180
|
} catch {}
|
|
2173
|
-
}),
|
|
2181
|
+
}), Zt.value.clear();
|
|
2174
2182
|
}
|
|
2175
|
-
function
|
|
2176
|
-
|
|
2177
|
-
let e =
|
|
2183
|
+
function en() {
|
|
2184
|
+
$t();
|
|
2185
|
+
let e = J.value?.edges ?? [];
|
|
2178
2186
|
if (!e.length) return;
|
|
2179
|
-
let t =
|
|
2187
|
+
let t = L.value.style.chart.edges.animations, n = Number(t.referenceDistance) > 0 ? Number(t.referenceDistance) : 24;
|
|
2180
2188
|
e.forEach((e) => {
|
|
2181
|
-
let r =
|
|
2189
|
+
let r = L.value.style.chart.midpoints.selectedEdge.animated === !0 && Z.value != null && e.id === Z.value, i = !!e?.original?.animated || !!e?.animated || r, a = Xt.value.get(e.id);
|
|
2182
2190
|
if (!a) return;
|
|
2183
2191
|
if (!i) {
|
|
2184
2192
|
a.style.strokeDasharray = "0", a.style.strokeDashoffset = "0";
|
|
@@ -2186,7 +2194,7 @@ var Yn = /* @__PURE__ */ e({ default: () => kr }), Xn = ["id"], Zn = ["id"], Qn
|
|
|
2186
2194
|
}
|
|
2187
2195
|
let o = e?.original?.dasharray ?? t.dasharray;
|
|
2188
2196
|
a.style.strokeDasharray = String(o), a.style.strokeDashoffset = "0";
|
|
2189
|
-
let s = ![void 0, null].includes(e?.original?.animationDirection), c = ![void 0, null].includes(t.animationDirection), l =
|
|
2197
|
+
let s = ![void 0, null].includes(e?.original?.animationDirection), c = ![void 0, null].includes(t.animationDirection), l = Yt(a, {
|
|
2190
2198
|
direction: s ? Number(e.original.animationDirection) : c ? Number(t.animationDirection) : -1,
|
|
2191
2199
|
mode: "oneLapNearest",
|
|
2192
2200
|
dasharray: String(o)
|
|
@@ -2195,21 +2203,21 @@ var Yn = /* @__PURE__ */ e({ default: () => kr }), Xn = ["id"], Zn = ["id"], Qn
|
|
|
2195
2203
|
iterations: Infinity,
|
|
2196
2204
|
easing: "linear"
|
|
2197
2205
|
});
|
|
2198
|
-
|
|
2206
|
+
Zt.value.set(e.id, m);
|
|
2199
2207
|
});
|
|
2200
2208
|
}
|
|
2201
|
-
|
|
2202
|
-
await
|
|
2209
|
+
ke(() => J.value && J.value.edges, async () => {
|
|
2210
|
+
await xe(), en();
|
|
2203
2211
|
}, {
|
|
2204
2212
|
deep: !0,
|
|
2205
2213
|
immediate: !0
|
|
2206
|
-
}),
|
|
2207
|
-
|
|
2214
|
+
}), we(() => {
|
|
2215
|
+
$t();
|
|
2208
2216
|
});
|
|
2209
|
-
async function
|
|
2210
|
-
if (!
|
|
2211
|
-
let { width: t, height: n } =
|
|
2212
|
-
domElement:
|
|
2217
|
+
async function tn({ scale: e = 2 } = {}) {
|
|
2218
|
+
if (!j.value) return;
|
|
2219
|
+
let { width: t, height: n } = j.value.getBoundingClientRect(), r = t / n, { imageUri: i, base64: a } = await te({
|
|
2220
|
+
domElement: j.value,
|
|
2213
2221
|
base64: !0,
|
|
2214
2222
|
img: !0,
|
|
2215
2223
|
scale: e
|
|
@@ -2217,132 +2225,132 @@ var Yn = /* @__PURE__ */ e({ default: () => kr }), Xn = ["id"], Zn = ["id"], Qn
|
|
|
2217
2225
|
return {
|
|
2218
2226
|
imageUri: i,
|
|
2219
2227
|
base64: a,
|
|
2220
|
-
title:
|
|
2228
|
+
title: L.value.style.chart.title.text ?? "vue-ui-dag",
|
|
2221
2229
|
width: t,
|
|
2222
2230
|
height: n,
|
|
2223
2231
|
aspectRatio: r
|
|
2224
2232
|
};
|
|
2225
2233
|
}
|
|
2226
|
-
let
|
|
2227
|
-
let e = Number(
|
|
2228
|
-
return Number.isFinite(e) && e > 0 ? e /
|
|
2229
|
-
}),
|
|
2230
|
-
function
|
|
2231
|
-
|
|
2234
|
+
let nn = _(() => {
|
|
2235
|
+
let e = Number(L.value.style.chart.layout.nodeHeight);
|
|
2236
|
+
return Number.isFinite(e) && e > 0 ? e / L.value.style.chart.backgroundPattern.spacingRatio : 12;
|
|
2237
|
+
}), rn = _(() => nn.value * (L.value.style.chart.backgroundPattern.dotRadiusRatio / 100)), $ = w(null), an = null, on = 0;
|
|
2238
|
+
function sn(e) {
|
|
2239
|
+
an &&= (clearTimeout(an), null), $.value !== e && ($.value = e, (L.value.style.chart.nodes.selected.downstreamEdges.animated === !0 || L.value.style.chart.nodes.selected.upstreamEdges.animated === !0) && en());
|
|
2232
2240
|
}
|
|
2233
|
-
function
|
|
2234
|
-
|
|
2241
|
+
function cn(e) {
|
|
2242
|
+
Ke.value = "pointer", Z.value = null, sn(e);
|
|
2235
2243
|
}
|
|
2236
|
-
async function
|
|
2237
|
-
|
|
2244
|
+
async function ln(e) {
|
|
2245
|
+
Ke.value = "pointer", $.value = null, await Ut(e);
|
|
2238
2246
|
}
|
|
2239
|
-
function
|
|
2240
|
-
let t = ++
|
|
2241
|
-
|
|
2242
|
-
t ===
|
|
2247
|
+
function un(e) {
|
|
2248
|
+
let t = ++on;
|
|
2249
|
+
an && clearTimeout(an), an = setTimeout(() => {
|
|
2250
|
+
t === on && $.value === e && ($.value = null, (L.value.style.chart.nodes.selected.downstreamEdges.animated === !0 || L.value.style.chart.nodes.selected.upstreamEdges.animated === !0) && en());
|
|
2243
2251
|
}, 20);
|
|
2244
2252
|
}
|
|
2245
|
-
function
|
|
2246
|
-
let t = e.from === $.value, n = e.to === $.value, r =
|
|
2247
|
-
return i &&
|
|
2253
|
+
function dn(e) {
|
|
2254
|
+
let t = e.from === $.value, n = e.to === $.value, r = I.value === "midpoint" && F.value === e.id, i = Z.value === e.id || R.value?.id === e.id || r, a = e.original.color ?? L.value.style.chart.edges.stroke;
|
|
2255
|
+
return i && L.value.style.chart.midpoints.selectedEdge.stroke != null ? a = L.value.style.chart.midpoints.selectedEdge.stroke : t && L.value.style.chart.nodes.selected.downstreamEdges.stroke != null ? a = L.value.style.chart.nodes.selected.downstreamEdges.stroke : n && L.value.style.chart.nodes.selected.upstreamEdges.stroke != null && (a = L.value.style.chart.nodes.selected.upstreamEdges.stroke), t && L.value.style.chart.nodes.selected.downstreamEdges.animated === !0 || n && L.value.style.chart.nodes.selected.upstreamEdges.animated === !0 || r && L.value.style.chart.midpoints.selectedEdge.animated === !0 ? e.animated = !0 : e.animated = (J.value?.edges.find((t) => t.id === e.id))?.original?.animated ?? !1, {
|
|
2248
2256
|
d: e.pathData,
|
|
2249
2257
|
fill: "none",
|
|
2250
2258
|
stroke: a,
|
|
2251
|
-
"stroke-width":
|
|
2259
|
+
"stroke-width": L.value.style.chart.edges.strokeWidth * (i || e.from === $.value ? 2 : 1),
|
|
2252
2260
|
"stroke-linecap": "round",
|
|
2253
2261
|
"stroke-linejoin": "round"
|
|
2254
2262
|
};
|
|
2255
2263
|
}
|
|
2256
|
-
function
|
|
2257
|
-
return
|
|
2264
|
+
function fn(e) {
|
|
2265
|
+
return I.value === "node" && F.value === e;
|
|
2258
2266
|
}
|
|
2259
|
-
function
|
|
2260
|
-
let t = $.value === e.id, n =
|
|
2267
|
+
function pn(e) {
|
|
2268
|
+
let t = $.value === e.id, n = I.value === "node" && F.value === e.id, r = t || n, i = r && L.value.style.chart.nodes.selected.backgroundColor != null ? L.value.style.chart.nodes.selected.backgroundColor : e.original.backgroundColor, a = r && L.value.style.chart.nodes.selected.stroke != null ? L.value.style.chart.nodes.selected.stroke : L.value.style.chart.nodes.stroke, o = r && L.value.style.chart.nodes.selected.strokeWidth != null ? L.value.style.chart.nodes.selected.strokeWidth : L.value.style.chart.nodes.strokeWidth;
|
|
2261
2269
|
return {
|
|
2262
2270
|
x: e.x - e.width / 2,
|
|
2263
2271
|
y: e.y - e.height / 2,
|
|
2264
2272
|
width: e.width,
|
|
2265
2273
|
height: e.height,
|
|
2266
|
-
rx:
|
|
2274
|
+
rx: L.value.style.chart.nodes.borderRadius,
|
|
2267
2275
|
fill: i,
|
|
2268
2276
|
stroke: a,
|
|
2269
2277
|
"stroke-width": o
|
|
2270
2278
|
};
|
|
2271
2279
|
}
|
|
2272
|
-
function
|
|
2273
|
-
let t = e.from === $.value, n = e.to === $.value, r =
|
|
2274
|
-
return i &&
|
|
2280
|
+
function mn(e) {
|
|
2281
|
+
let t = e.from === $.value, n = e.to === $.value, r = I.value === "midpoint" && F.value === e.id, i = Z.value === e.id || R.value?.id === e.id || r, a = e.original.color ?? L.value.style.chart.edges.stroke;
|
|
2282
|
+
return i && L.value.style.chart.midpoints.selectedEdge.stroke != null ? a = L.value.style.chart.midpoints.selectedEdge.stroke : t && L.value.style.chart.nodes.selected.downstreamEdges.stroke != null ? a = L.value.style.chart.nodes.selected.downstreamEdges.stroke : n && L.value.style.chart.nodes.selected.upstreamEdges.stroke != null && (a = L.value.style.chart.nodes.selected.upstreamEdges.stroke), {
|
|
2275
2283
|
cx: e.midpoint.x,
|
|
2276
2284
|
cy: e.midpoint.y,
|
|
2277
|
-
r:
|
|
2278
|
-
fill: r ?
|
|
2285
|
+
r: L.value.style.chart.midpoints.radius,
|
|
2286
|
+
fill: r ? L.value.style.chart.midpoints.selectedEdge.stroke ?? L.value.style.chart.midpoints.fill : L.value.style.chart.midpoints.fill,
|
|
2279
2287
|
stroke: a,
|
|
2280
|
-
"stroke-width":
|
|
2288
|
+
"stroke-width": L.value.style.chart.edges.strokeWidth * (i || e.from === $.value ? 2 : 1)
|
|
2281
2289
|
};
|
|
2282
2290
|
}
|
|
2283
|
-
function
|
|
2284
|
-
let t = e.from === $.value, n = e.to === $.value, r =
|
|
2285
|
-
return i &&
|
|
2291
|
+
function hn(e) {
|
|
2292
|
+
let t = e.from === $.value, n = e.to === $.value, r = I.value === "midpoint" && F.value === e.id, i = Z.value === e.id || R.value?.id === e.id || r, a = e.color ?? e.original?.color ?? L.value.style.chart.edges.stroke;
|
|
2293
|
+
return i && L.value.style.chart.midpoints.selectedEdge.stroke != null ? a = L.value.style.chart.midpoints.selectedEdge.stroke : t && L.value.style.chart.nodes.selected.downstreamEdges.stroke != null ? a = L.value.style.chart.nodes.selected.downstreamEdges.stroke : n && L.value.style.chart.nodes.selected.upstreamEdges.stroke != null && (a = L.value.style.chart.nodes.selected.upstreamEdges.stroke), a;
|
|
2286
2294
|
}
|
|
2287
|
-
function
|
|
2288
|
-
return `${
|
|
2295
|
+
function gn(e) {
|
|
2296
|
+
return `${wt}-${String(e).replace(/[^a-zA-Z0-9_-]/g, "_")}`;
|
|
2289
2297
|
}
|
|
2290
|
-
function
|
|
2291
|
-
return
|
|
2298
|
+
function _n() {
|
|
2299
|
+
return J.value;
|
|
2292
2300
|
}
|
|
2293
|
-
function
|
|
2301
|
+
function vn(e) {
|
|
2294
2302
|
if (e?.stage === "start") {
|
|
2295
|
-
|
|
2303
|
+
Ue.value = !0;
|
|
2296
2304
|
return;
|
|
2297
2305
|
}
|
|
2298
2306
|
if (e?.stage === "end") {
|
|
2299
|
-
|
|
2307
|
+
Ue.value = !1;
|
|
2300
2308
|
return;
|
|
2301
2309
|
}
|
|
2302
|
-
|
|
2310
|
+
ht();
|
|
2303
2311
|
}
|
|
2304
|
-
async function
|
|
2305
|
-
if (
|
|
2306
|
-
config:
|
|
2307
|
-
dataset:
|
|
2308
|
-
}), !
|
|
2312
|
+
async function yn() {
|
|
2313
|
+
if (A("copyAlt", {
|
|
2314
|
+
config: L.value,
|
|
2315
|
+
dataset: lt.value
|
|
2316
|
+
}), !L.value.userOptions.callbacks.altCopy) {
|
|
2309
2317
|
console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.");
|
|
2310
2318
|
return;
|
|
2311
2319
|
}
|
|
2312
|
-
await Promise.resolve(
|
|
2313
|
-
config:
|
|
2314
|
-
dataset:
|
|
2320
|
+
await Promise.resolve(L.value.userOptions.callbacks.altCopy({
|
|
2321
|
+
config: L.value,
|
|
2322
|
+
dataset: lt.value
|
|
2315
2323
|
}));
|
|
2316
2324
|
}
|
|
2317
|
-
let
|
|
2325
|
+
let bn = _(() => (J.value?.nodes ?? []).map((e) => ({
|
|
2318
2326
|
id: e.id,
|
|
2319
2327
|
type: "node",
|
|
2320
2328
|
x: e.x,
|
|
2321
2329
|
y: e.y,
|
|
2322
2330
|
label: e.label ?? e.id,
|
|
2323
2331
|
raw: e
|
|
2324
|
-
}))),
|
|
2332
|
+
}))), xn = _(() => L.value.style.chart.midpoints.show ? (J.value?.edges ?? []).filter((e) => e?.midpoint).map((e) => ({
|
|
2325
2333
|
id: e.id,
|
|
2326
2334
|
type: "midpoint",
|
|
2327
2335
|
x: e.midpoint.x,
|
|
2328
2336
|
y: e.midpoint.y,
|
|
2329
|
-
label: `${
|
|
2337
|
+
label: `${Y(e.from)?.label ?? e.from} → ${Y(e.to)?.label ?? e.to}`,
|
|
2330
2338
|
raw: e
|
|
2331
|
-
})) : []),
|
|
2339
|
+
})) : []), Sn = _(() => [...bn.value, ...xn.value].sort((e, t) => e.x === t.x ? e.y - t.y : e.x - t.x)), Cn = _(() => {
|
|
2332
2340
|
let e = /* @__PURE__ */ new Map();
|
|
2333
|
-
return
|
|
2341
|
+
return Sn.value.forEach((t, n) => {
|
|
2334
2342
|
e.set(`${t.type}:${t.id}`, n);
|
|
2335
2343
|
}), e;
|
|
2336
|
-
}),
|
|
2337
|
-
let e =
|
|
2344
|
+
}), wn = _(() => {
|
|
2345
|
+
let e = J.value?.nodes ?? [], t = J.value?.edges ?? [];
|
|
2338
2346
|
return {
|
|
2339
2347
|
headers: [
|
|
2340
|
-
|
|
2341
|
-
|
|
2342
|
-
|
|
2348
|
+
L.value.a11y?.translations?.node ?? "Node",
|
|
2349
|
+
L.value.a11y?.translations?.parents ?? "Parents",
|
|
2350
|
+
L.value.a11y?.translations?.children ?? "Children"
|
|
2343
2351
|
],
|
|
2344
2352
|
rows: e.map((e) => {
|
|
2345
|
-
let n = t.filter((t) => t.to === e.id).map((e) =>
|
|
2353
|
+
let n = t.filter((t) => t.to === e.id).map((e) => Y(e.from)?.label ?? e.from).join(", "), r = t.filter((t) => t.from === e.id).map((e) => Y(e.to)?.label ?? e.to).join(", ");
|
|
2346
2354
|
return [
|
|
2347
2355
|
e.label ?? e.id,
|
|
2348
2356
|
n || "—",
|
|
@@ -2351,138 +2359,138 @@ var Yn = /* @__PURE__ */ e({ default: () => kr }), Xn = ["id"], Zn = ["id"], Qn
|
|
|
2351
2359
|
})
|
|
2352
2360
|
};
|
|
2353
2361
|
});
|
|
2354
|
-
function
|
|
2362
|
+
function Tn(e) {
|
|
2355
2363
|
return `${e.type}:${e.id}`;
|
|
2356
2364
|
}
|
|
2357
|
-
function
|
|
2358
|
-
return
|
|
2365
|
+
function En() {
|
|
2366
|
+
return F.value == null || I.value == null ? null : Sn.value.find((e) => e.id === F.value && e.type === I.value) ?? null;
|
|
2359
2367
|
}
|
|
2360
|
-
async function
|
|
2368
|
+
async function Dn(e) {
|
|
2361
2369
|
if (e) {
|
|
2362
2370
|
if (e.type === "node") {
|
|
2363
|
-
|
|
2371
|
+
Q();
|
|
2364
2372
|
return;
|
|
2365
2373
|
}
|
|
2366
|
-
e.type === "midpoint" && (
|
|
2374
|
+
e.type === "midpoint" && (Gt(), await Ut(e.raw));
|
|
2367
2375
|
}
|
|
2368
2376
|
}
|
|
2369
|
-
function
|
|
2377
|
+
function On(e) {
|
|
2370
2378
|
if (e) {
|
|
2371
|
-
if (
|
|
2372
|
-
|
|
2379
|
+
if (F.value = e.id, I.value = e.type, Ge.value = Cn.value.get(Tn(e)) ?? null, e.type === "node") {
|
|
2380
|
+
sn(e.id), Z.value = null;
|
|
2373
2381
|
return;
|
|
2374
2382
|
}
|
|
2375
|
-
e.type === "midpoint" && ($.value = null,
|
|
2383
|
+
e.type === "midpoint" && ($.value = null, Z.value = e.id, L.value.style.chart.midpoints.selectedEdge.animated === !0 && en());
|
|
2376
2384
|
}
|
|
2377
2385
|
}
|
|
2378
|
-
function
|
|
2379
|
-
|
|
2386
|
+
function kn() {
|
|
2387
|
+
F.value = null, I.value = null, Ge.value = null, B.value || ($.value = null), U.value || (Z.value = null, L.value.style.chart.midpoints.selectedEdge.animated === !0 && en());
|
|
2380
2388
|
}
|
|
2381
|
-
function
|
|
2382
|
-
|
|
2389
|
+
function An() {
|
|
2390
|
+
qe.value = !0, kn();
|
|
2383
2391
|
}
|
|
2384
|
-
function
|
|
2385
|
-
|
|
2392
|
+
function jn() {
|
|
2393
|
+
qe.value = !1, Gt(), Q(), kn();
|
|
2386
2394
|
}
|
|
2387
|
-
function
|
|
2395
|
+
function Mn(e, t, n) {
|
|
2388
2396
|
let r = t.x - e.x, i = t.y - e.y;
|
|
2389
2397
|
return n === "right" && r <= 0 || n === "left" && r >= 0 || n === "down" && i <= 0 || n === "up" && i >= 0 ? Infinity : n === "right" || n === "left" ? Math.abs(r) * 1e3 + Math.abs(i) : Math.abs(i) * 1e3 + Math.abs(r);
|
|
2390
2398
|
}
|
|
2391
|
-
function
|
|
2392
|
-
let n =
|
|
2399
|
+
function Nn(e, t) {
|
|
2400
|
+
let n = Sn.value.filter((t) => Tn(t) !== Tn(e));
|
|
2393
2401
|
if (!n.length) return null;
|
|
2394
2402
|
let r = null, i = Infinity;
|
|
2395
2403
|
return n.forEach((n) => {
|
|
2396
|
-
let a =
|
|
2404
|
+
let a = Mn(e, n, t);
|
|
2397
2405
|
a < i && (i = a, r = n);
|
|
2398
|
-
}), r || (t === "right" || t === "down" ?
|
|
2406
|
+
}), r || (t === "right" || t === "down" ? Sn.value[0] ?? null : Sn.value[Sn.value.length - 1] ?? null);
|
|
2399
2407
|
}
|
|
2400
|
-
async function
|
|
2401
|
-
e && (
|
|
2408
|
+
async function Pn(e) {
|
|
2409
|
+
e && (Ke.value = "keyboard", e.type === "node" && (Q(), await Wt(e.raw)));
|
|
2402
2410
|
}
|
|
2403
|
-
async function
|
|
2404
|
-
if (!
|
|
2411
|
+
async function Fn(e) {
|
|
2412
|
+
if (!G.value || W.value || document.activeElement !== G.value || !Sn.value.length) return;
|
|
2405
2413
|
let t = e.key === "ArrowLeft", n = e.key === "ArrowRight", r = e.key === "ArrowUp", i = e.key === "ArrowDown", a = e.key === "Enter" || e.key === " ", o = e.key === "Escape";
|
|
2406
2414
|
if (!t && !n && !r && !i && !a && !o) return;
|
|
2407
2415
|
if (e.preventDefault(), e.stopPropagation(), o) {
|
|
2408
|
-
|
|
2416
|
+
Gt(), Q(), kn();
|
|
2409
2417
|
return;
|
|
2410
2418
|
}
|
|
2411
|
-
let s =
|
|
2419
|
+
let s = En();
|
|
2412
2420
|
if (a) {
|
|
2413
2421
|
if (!s) return;
|
|
2414
|
-
s.type === "node" && await
|
|
2422
|
+
s.type === "node" && await Pn(s);
|
|
2415
2423
|
return;
|
|
2416
2424
|
}
|
|
2417
2425
|
if (!s) {
|
|
2418
|
-
let e =
|
|
2426
|
+
let e = Sn.value[0];
|
|
2419
2427
|
if (!e) return;
|
|
2420
|
-
|
|
2428
|
+
On(e), await Dn(e);
|
|
2421
2429
|
return;
|
|
2422
2430
|
}
|
|
2423
2431
|
let c = null;
|
|
2424
|
-
n ? c =
|
|
2425
|
-
}
|
|
2426
|
-
return
|
|
2427
|
-
getData:
|
|
2428
|
-
getImage:
|
|
2429
|
-
generatePdf:
|
|
2430
|
-
generateSvg:
|
|
2431
|
-
generateImage:
|
|
2432
|
-
toggleAnnotator:
|
|
2433
|
-
toggleFullscreen:
|
|
2434
|
-
zoomIn:
|
|
2435
|
-
zoomOut:
|
|
2436
|
-
resetZoom:
|
|
2437
|
-
switchDirection:
|
|
2438
|
-
copyAlt:
|
|
2439
|
-
}), (e, t) => (
|
|
2440
|
-
class:
|
|
2441
|
-
id: `dag_${
|
|
2432
|
+
n ? c = Nn(s, "right") : t ? c = Nn(s, "left") : i ? c = Nn(s, "down") : r && (c = Nn(s, "up")), c && (Gt(), Q(), On(c), await Dn(c));
|
|
2433
|
+
}
|
|
2434
|
+
return i({
|
|
2435
|
+
getData: _n,
|
|
2436
|
+
getImage: tn,
|
|
2437
|
+
generatePdf: mt,
|
|
2438
|
+
generateSvg: yt,
|
|
2439
|
+
generateImage: ht,
|
|
2440
|
+
toggleAnnotator: It,
|
|
2441
|
+
toggleFullscreen: Ft,
|
|
2442
|
+
zoomIn: Lt,
|
|
2443
|
+
zoomOut: Rt,
|
|
2444
|
+
resetZoom: Ot,
|
|
2445
|
+
switchDirection: Bt,
|
|
2446
|
+
copyAlt: yn
|
|
2447
|
+
}), (e, t) => (C(), y("div", {
|
|
2448
|
+
class: Se(`vue-data-ui-component vue-ui-dag ${X.value ? "vue-data-ui-wrapper-fullscreen" : ""} ${L.value.responsive ? "vue-ui-dag-responsive" : ""}`),
|
|
2449
|
+
id: `dag_${M.value}`,
|
|
2442
2450
|
ref_key: "dagChart",
|
|
2443
|
-
ref:
|
|
2444
|
-
style:
|
|
2445
|
-
fontFamily:
|
|
2446
|
-
backgroundColor:
|
|
2451
|
+
ref: j,
|
|
2452
|
+
style: Ce({
|
|
2453
|
+
fontFamily: L.value.style.fontFamily,
|
|
2454
|
+
backgroundColor: L.value.style.chart.backgroundColor,
|
|
2447
2455
|
padding: "0.5rem"
|
|
2448
2456
|
}),
|
|
2449
|
-
onMouseenter:
|
|
2450
|
-
onMouseleave:
|
|
2457
|
+
onMouseenter: bt,
|
|
2458
|
+
onMouseleave: xt
|
|
2451
2459
|
}, [
|
|
2452
|
-
|
|
2453
|
-
id: `chart-instructions-${
|
|
2460
|
+
b("div", {
|
|
2461
|
+
id: `chart-instructions-${M.value}`,
|
|
2454
2462
|
class: "sr-only"
|
|
2455
|
-
}, [
|
|
2456
|
-
|
|
2463
|
+
}, [b("p", null, De(L.value.a11y.translations.keyboardNavigation), 1)], 8, $n),
|
|
2464
|
+
wn.value?.rows?.length ? (C(), he(oe, {
|
|
2457
2465
|
key: 0,
|
|
2458
|
-
uid:
|
|
2459
|
-
head:
|
|
2460
|
-
body:
|
|
2461
|
-
notice:
|
|
2462
|
-
caption:
|
|
2466
|
+
uid: M.value,
|
|
2467
|
+
head: wn.value.headers,
|
|
2468
|
+
body: wn.value.rows,
|
|
2469
|
+
notice: L.value.a11y.translations.tableAvailable,
|
|
2470
|
+
caption: L.value.a11y.translations.tableCaption
|
|
2463
2471
|
}, null, 8, [
|
|
2464
2472
|
"uid",
|
|
2465
2473
|
"head",
|
|
2466
2474
|
"body",
|
|
2467
2475
|
"notice",
|
|
2468
2476
|
"caption"
|
|
2469
|
-
])) :
|
|
2470
|
-
|
|
2471
|
-
|
|
2477
|
+
])) : v("", !0),
|
|
2478
|
+
E(Ct) ? (C(), y("div", er, De(String(E(Ct))), 1)) : v("", !0),
|
|
2479
|
+
L.value.userOptions.buttons.annotator ? (C(), he(E(Ae), {
|
|
2472
2480
|
key: 2,
|
|
2473
|
-
svgRef:
|
|
2474
|
-
backgroundColor:
|
|
2475
|
-
color:
|
|
2476
|
-
active:
|
|
2477
|
-
isCursorPointer:
|
|
2478
|
-
onClose:
|
|
2481
|
+
svgRef: E(G),
|
|
2482
|
+
backgroundColor: L.value.style.chart.backgroundColor,
|
|
2483
|
+
color: L.value.style.chart.color,
|
|
2484
|
+
active: W.value,
|
|
2485
|
+
isCursorPointer: Je.value,
|
|
2486
|
+
onClose: It
|
|
2479
2487
|
}, {
|
|
2480
|
-
"annotator-action-close":
|
|
2481
|
-
"annotator-action-color":
|
|
2482
|
-
"annotator-action-draw":
|
|
2483
|
-
"annotator-action-undo":
|
|
2484
|
-
"annotator-action-redo":
|
|
2485
|
-
"annotator-action-delete":
|
|
2488
|
+
"annotator-action-close": D(() => [T(e.$slots, "annotator-action-close", {}, void 0, !0)]),
|
|
2489
|
+
"annotator-action-color": D(({ color: t }) => [T(e.$slots, "annotator-action-color", S(x({ color: t })), void 0, !0)]),
|
|
2490
|
+
"annotator-action-draw": D(({ mode: t }) => [T(e.$slots, "annotator-action-draw", S(x({ mode: t })), void 0, !0)]),
|
|
2491
|
+
"annotator-action-undo": D(({ disabled: t }) => [T(e.$slots, "annotator-action-undo", S(x({ disabled: t })), void 0, !0)]),
|
|
2492
|
+
"annotator-action-redo": D(({ disabled: t }) => [T(e.$slots, "annotator-action-redo", S(x({ disabled: t })), void 0, !0)]),
|
|
2493
|
+
"annotator-action-delete": D(({ disabled: t }) => [T(e.$slots, "annotator-action-delete", S(x({ disabled: t })), void 0, !0)]),
|
|
2486
2494
|
_: 3
|
|
2487
2495
|
}, 8, [
|
|
2488
2496
|
"svgRef",
|
|
@@ -2490,47 +2498,47 @@ var Yn = /* @__PURE__ */ e({ default: () => kr }), Xn = ["id"], Zn = ["id"], Qn
|
|
|
2490
2498
|
"color",
|
|
2491
2499
|
"active",
|
|
2492
2500
|
"isCursorPointer"
|
|
2493
|
-
])) :
|
|
2494
|
-
|
|
2501
|
+
])) : v("", !0),
|
|
2502
|
+
L.value.userOptions.show && He.value && (E(ot) || E(it)) ? (C(), he(E(Me), {
|
|
2495
2503
|
ref: "userOptionsRef",
|
|
2496
|
-
key: `user_option_${
|
|
2497
|
-
backgroundColor:
|
|
2498
|
-
color:
|
|
2499
|
-
isPrinting:
|
|
2500
|
-
isImaging:
|
|
2501
|
-
uid:
|
|
2504
|
+
key: `user_option_${Be.value}`,
|
|
2505
|
+
backgroundColor: L.value.style.chart.backgroundColor,
|
|
2506
|
+
color: L.value.style.chart.color,
|
|
2507
|
+
isPrinting: E(pt),
|
|
2508
|
+
isImaging: E(q),
|
|
2509
|
+
uid: M.value,
|
|
2502
2510
|
hasTooltip: !1,
|
|
2503
2511
|
hasTable: !1,
|
|
2504
2512
|
hasXls: !1,
|
|
2505
2513
|
hasLabel: !1,
|
|
2506
|
-
hasPdf:
|
|
2507
|
-
hasImg:
|
|
2508
|
-
hasSvg:
|
|
2509
|
-
hasFullscreen:
|
|
2510
|
-
hasAltCopy:
|
|
2511
|
-
isFullscreen:
|
|
2512
|
-
chartElement:
|
|
2513
|
-
position:
|
|
2514
|
-
titles: { ...
|
|
2515
|
-
hasAnnotator:
|
|
2516
|
-
isAnnotation:
|
|
2517
|
-
callbacks:
|
|
2518
|
-
printScale:
|
|
2519
|
-
hasZoom:
|
|
2520
|
-
isZoom:
|
|
2521
|
-
isCursorPointer:
|
|
2522
|
-
onToggleFullscreen:
|
|
2523
|
-
onGeneratePdf:
|
|
2524
|
-
onGenerateImage:
|
|
2525
|
-
onGenerateSvg:
|
|
2526
|
-
onToggleAnnotator:
|
|
2527
|
-
onToggleZoom:
|
|
2528
|
-
onCopyAlt:
|
|
2529
|
-
style:
|
|
2530
|
-
},
|
|
2514
|
+
hasPdf: L.value.userOptions.buttons.pdf,
|
|
2515
|
+
hasImg: L.value.userOptions.buttons.img,
|
|
2516
|
+
hasSvg: L.value.userOptions.buttons.svg,
|
|
2517
|
+
hasFullscreen: L.value.userOptions.buttons.fullscreen,
|
|
2518
|
+
hasAltCopy: L.value.userOptions.buttons.altCopy,
|
|
2519
|
+
isFullscreen: X.value,
|
|
2520
|
+
chartElement: j.value,
|
|
2521
|
+
position: L.value.userOptions.position,
|
|
2522
|
+
titles: { ...L.value.userOptions.buttonTitles },
|
|
2523
|
+
hasAnnotator: L.value.userOptions.buttons.annotator,
|
|
2524
|
+
isAnnotation: W.value,
|
|
2525
|
+
callbacks: L.value.userOptions.callbacks,
|
|
2526
|
+
printScale: L.value.userOptions.print.scale,
|
|
2527
|
+
hasZoom: L.value.userOptions.buttons.zoom,
|
|
2528
|
+
isZoom: Et.value,
|
|
2529
|
+
isCursorPointer: Je.value,
|
|
2530
|
+
onToggleFullscreen: Ft,
|
|
2531
|
+
onGeneratePdf: E(mt),
|
|
2532
|
+
onGenerateImage: vn,
|
|
2533
|
+
onGenerateSvg: yt,
|
|
2534
|
+
onToggleAnnotator: It,
|
|
2535
|
+
onToggleZoom: Mt,
|
|
2536
|
+
onCopyAlt: yn,
|
|
2537
|
+
style: Ce({ visibility: E(ot) ? E(it) ? "visible" : "hidden" : "visible" })
|
|
2538
|
+
}, ge({ _: 2 }, [
|
|
2531
2539
|
e.$slots.menuIcon ? {
|
|
2532
2540
|
name: "menuIcon",
|
|
2533
|
-
fn:
|
|
2541
|
+
fn: D(({ isOpen: t, color: n }) => [T(e.$slots, "menuIcon", S(x({
|
|
2534
2542
|
isOpen: t,
|
|
2535
2543
|
color: n
|
|
2536
2544
|
})), void 0, !0)]),
|
|
@@ -2538,22 +2546,22 @@ var Yn = /* @__PURE__ */ e({ default: () => kr }), Xn = ["id"], Zn = ["id"], Qn
|
|
|
2538
2546
|
} : void 0,
|
|
2539
2547
|
e.$slots.optionPdf ? {
|
|
2540
2548
|
name: "optionPdf",
|
|
2541
|
-
fn:
|
|
2549
|
+
fn: D(() => [T(e.$slots, "optionPdf", {}, void 0, !0)]),
|
|
2542
2550
|
key: "1"
|
|
2543
2551
|
} : void 0,
|
|
2544
2552
|
e.$slots.optionImg ? {
|
|
2545
2553
|
name: "optionImg",
|
|
2546
|
-
fn:
|
|
2554
|
+
fn: D(() => [T(e.$slots, "optionImg", {}, void 0, !0)]),
|
|
2547
2555
|
key: "2"
|
|
2548
2556
|
} : void 0,
|
|
2549
2557
|
e.$slots.optionSvg ? {
|
|
2550
2558
|
name: "optionSvg",
|
|
2551
|
-
fn:
|
|
2559
|
+
fn: D(() => [T(e.$slots, "optionSvg", {}, void 0, !0)]),
|
|
2552
2560
|
key: "3"
|
|
2553
2561
|
} : void 0,
|
|
2554
2562
|
e.$slots.optionFullscreen ? {
|
|
2555
2563
|
name: "optionFullscreen",
|
|
2556
|
-
fn:
|
|
2564
|
+
fn: D(({ toggleFullscreen: t, isFullscreen: n }) => [T(e.$slots, "optionFullscreen", S(x({
|
|
2557
2565
|
toggleFullscreen: t,
|
|
2558
2566
|
isFullscreen: n
|
|
2559
2567
|
})), void 0, !0)]),
|
|
@@ -2561,7 +2569,7 @@ var Yn = /* @__PURE__ */ e({ default: () => kr }), Xn = ["id"], Zn = ["id"], Qn
|
|
|
2561
2569
|
} : void 0,
|
|
2562
2570
|
e.$slots.optionAnnotator ? {
|
|
2563
2571
|
name: "optionAnnotator",
|
|
2564
|
-
fn:
|
|
2572
|
+
fn: D(({ toggleAnnotator: t, isAnnotator: n }) => [T(e.$slots, "optionAnnotator", S(x({
|
|
2565
2573
|
toggleAnnotator: t,
|
|
2566
2574
|
isAnnotator: n
|
|
2567
2575
|
})), void 0, !0)]),
|
|
@@ -2569,7 +2577,7 @@ var Yn = /* @__PURE__ */ e({ default: () => kr }), Xn = ["id"], Zn = ["id"], Qn
|
|
|
2569
2577
|
} : void 0,
|
|
2570
2578
|
e.$slots.optionZoom ? {
|
|
2571
2579
|
name: "optionZoom",
|
|
2572
|
-
fn:
|
|
2580
|
+
fn: D(({ toggleZoom: t, isZoomLocked: n }) => [T(e.$slots, "optionZoom", S(x({
|
|
2573
2581
|
toggleZoom: t,
|
|
2574
2582
|
isZoomLocked: n
|
|
2575
2583
|
})), void 0, !0)]),
|
|
@@ -2577,17 +2585,17 @@ var Yn = /* @__PURE__ */ e({ default: () => kr }), Xn = ["id"], Zn = ["id"], Qn
|
|
|
2577
2585
|
} : void 0,
|
|
2578
2586
|
e.$slots.optionAltCopy ? {
|
|
2579
2587
|
name: "optionAltCopy",
|
|
2580
|
-
fn:
|
|
2588
|
+
fn: D(({ altCopy: t }) => [T(e.$slots, "optionAltCopy", S(x({ altCopy: t })), void 0, !0)]),
|
|
2581
2589
|
key: "7"
|
|
2582
2590
|
} : void 0,
|
|
2583
2591
|
e.$slots["custom-menu-before"] ? {
|
|
2584
2592
|
name: "custom-menu-before",
|
|
2585
|
-
fn:
|
|
2593
|
+
fn: D(() => [T(e.$slots, "custom-menu-before", {}, void 0, !0)]),
|
|
2586
2594
|
key: "8"
|
|
2587
2595
|
} : void 0,
|
|
2588
2596
|
e.$slots["custom-menu-after"] ? {
|
|
2589
2597
|
name: "custom-menu-after",
|
|
2590
|
-
fn:
|
|
2598
|
+
fn: D(() => [T(e.$slots, "custom-menu-after", {}, void 0, !0)]),
|
|
2591
2599
|
key: "9"
|
|
2592
2600
|
} : void 0
|
|
2593
2601
|
]), 1032, [
|
|
@@ -2614,298 +2622,298 @@ var Yn = /* @__PURE__ */ e({ default: () => kr }), Xn = ["id"], Zn = ["id"], Qn
|
|
|
2614
2622
|
"isCursorPointer",
|
|
2615
2623
|
"onGeneratePdf",
|
|
2616
2624
|
"style"
|
|
2617
|
-
])) :
|
|
2618
|
-
|
|
2625
|
+
])) : v("", !0),
|
|
2626
|
+
L.value.style.chart.title.text ? (C(), y("div", {
|
|
2619
2627
|
key: 4,
|
|
2620
2628
|
ref_key: "chartTitle",
|
|
2621
|
-
ref:
|
|
2629
|
+
ref: Ie,
|
|
2622
2630
|
style: "width:100%;background:transparent;"
|
|
2623
|
-
}, [(
|
|
2624
|
-
key: `title_${
|
|
2631
|
+
}, [(C(), he(ne, {
|
|
2632
|
+
key: `title_${ze.value}`,
|
|
2625
2633
|
config: {
|
|
2626
2634
|
title: {
|
|
2627
2635
|
cy: "dag-title",
|
|
2628
|
-
...
|
|
2636
|
+
...L.value.style.chart.title
|
|
2629
2637
|
},
|
|
2630
2638
|
subtitle: {
|
|
2631
2639
|
cy: "dag-subtitle",
|
|
2632
|
-
...
|
|
2640
|
+
...L.value.style.chart.title.subtitle
|
|
2633
2641
|
}
|
|
2634
2642
|
}
|
|
2635
|
-
}, null, 8, ["config"]))], 512)) :
|
|
2636
|
-
|
|
2643
|
+
}, null, 8, ["config"]))], 512)) : v("", !0),
|
|
2644
|
+
L.value.style.chart.controls.position === "top" && !E(ct) && L.value.style.chart.controls.show ? (C(), he(ue, {
|
|
2637
2645
|
key: 5,
|
|
2638
2646
|
ref_key: "zoomControls",
|
|
2639
|
-
ref:
|
|
2640
|
-
config:
|
|
2641
|
-
scale:
|
|
2642
|
-
isFullscreen:
|
|
2647
|
+
ref: Re,
|
|
2648
|
+
config: L.value,
|
|
2649
|
+
scale: E(At),
|
|
2650
|
+
isFullscreen: X.value,
|
|
2643
2651
|
withDirection: "",
|
|
2644
|
-
onZoomIn:
|
|
2645
|
-
onZoomOut:
|
|
2646
|
-
onResetZoom: t[0] ||= () =>
|
|
2647
|
-
onSwitchDirection:
|
|
2652
|
+
onZoomIn: Lt,
|
|
2653
|
+
onZoomOut: Rt,
|
|
2654
|
+
onResetZoom: t[0] ||= () => E(Ot)(!0),
|
|
2655
|
+
onSwitchDirection: Bt
|
|
2648
2656
|
}, null, 8, [
|
|
2649
2657
|
"config",
|
|
2650
2658
|
"scale",
|
|
2651
2659
|
"isFullscreen"
|
|
2652
|
-
])) :
|
|
2653
|
-
|
|
2660
|
+
])) : v("", !0),
|
|
2661
|
+
b("div", tr, [E(J) ? (C(), y("svg", {
|
|
2654
2662
|
key: 0,
|
|
2655
2663
|
ref_key: "svgRef",
|
|
2656
|
-
ref:
|
|
2657
|
-
class:
|
|
2664
|
+
ref: G,
|
|
2665
|
+
class: Se({
|
|
2658
2666
|
"vue-ui-dag-svg": !0,
|
|
2659
|
-
"vue-data-ui-loading":
|
|
2667
|
+
"vue-data-ui-loading": E(ct)
|
|
2660
2668
|
}),
|
|
2661
|
-
viewBox:
|
|
2662
|
-
xmlns:
|
|
2663
|
-
style:
|
|
2664
|
-
backgroundColor:
|
|
2669
|
+
viewBox: Pt.value,
|
|
2670
|
+
xmlns: E(s),
|
|
2671
|
+
style: Ce({
|
|
2672
|
+
backgroundColor: L.value.style.chart.backgroundColor,
|
|
2665
2673
|
height: "100%",
|
|
2666
2674
|
width: "100%"
|
|
2667
2675
|
}),
|
|
2668
2676
|
tabindex: "0",
|
|
2669
|
-
"aria-describedby": `chart-instructions-${
|
|
2670
|
-
onFocus:
|
|
2671
|
-
onBlur:
|
|
2672
|
-
onKeydown:
|
|
2677
|
+
"aria-describedby": `chart-instructions-${M.value}`,
|
|
2678
|
+
onFocus: An,
|
|
2679
|
+
onBlur: jn,
|
|
2680
|
+
onKeydown: Fn
|
|
2673
2681
|
}, [
|
|
2674
|
-
|
|
2675
|
-
|
|
2676
|
-
id: `dag_bg_pattern_${
|
|
2682
|
+
ve(E(Ne)),
|
|
2683
|
+
L.value.style.chart.backgroundPattern.show ? (C(), y("defs", rr, [b("pattern", {
|
|
2684
|
+
id: `dag_bg_pattern_${M.value}`,
|
|
2677
2685
|
patternUnits: "userSpaceOnUse",
|
|
2678
|
-
width:
|
|
2679
|
-
height:
|
|
2680
|
-
}, [
|
|
2681
|
-
x:
|
|
2682
|
-
y:
|
|
2683
|
-
color:
|
|
2684
|
-
})), () => [
|
|
2685
|
-
cx:
|
|
2686
|
-
cy:
|
|
2687
|
-
r:
|
|
2688
|
-
fill:
|
|
2689
|
-
}, null, 8,
|
|
2690
|
-
|
|
2686
|
+
width: nn.value,
|
|
2687
|
+
height: nn.value
|
|
2688
|
+
}, [T(e.$slots, "background-pattern", S(x({
|
|
2689
|
+
x: nn.value / 2,
|
|
2690
|
+
y: nn.value / 2,
|
|
2691
|
+
color: L.value.style.chart.backgroundPattern.dotColor
|
|
2692
|
+
})), () => [b("circle", {
|
|
2693
|
+
cx: nn.value / 2,
|
|
2694
|
+
cy: nn.value / 2,
|
|
2695
|
+
r: rn.value,
|
|
2696
|
+
fill: L.value.style.chart.backgroundPattern.dotColor
|
|
2697
|
+
}, null, 8, ar)], !0)], 8, ir)])) : v("", !0),
|
|
2698
|
+
L.value.style.chart.backgroundPattern.show ? (C(), y("rect", {
|
|
2691
2699
|
key: 1,
|
|
2692
|
-
x:
|
|
2693
|
-
y:
|
|
2694
|
-
width:
|
|
2695
|
-
height:
|
|
2696
|
-
fill: `url(#dag_bg_pattern_${
|
|
2697
|
-
style:
|
|
2700
|
+
x: E(Dt)?.x ?? 0,
|
|
2701
|
+
y: E(Dt)?.y ?? 0,
|
|
2702
|
+
width: E(Dt)?.width ?? 0,
|
|
2703
|
+
height: E(Dt)?.height ?? 0,
|
|
2704
|
+
fill: `url(#dag_bg_pattern_${M.value})`,
|
|
2705
|
+
style: Ce({
|
|
2698
2706
|
pointerEvents: "none",
|
|
2699
|
-
opacity:
|
|
2707
|
+
opacity: L.value.style.chart.backgroundPattern.opacity
|
|
2700
2708
|
})
|
|
2701
|
-
}, null, 12,
|
|
2702
|
-
|
|
2709
|
+
}, null, 12, or)) : v("", !0),
|
|
2710
|
+
E(J).arrowShape === "undirected" ? v("", !0) : (C(), y("defs", sr, [(C(!0), y(fe, null, Ee(E(J).edges, (e) => (C(), y("marker", {
|
|
2703
2711
|
key: `marker_${e.id}`,
|
|
2704
|
-
id:
|
|
2705
|
-
markerWidth:
|
|
2706
|
-
markerHeight:
|
|
2707
|
-
refX:
|
|
2708
|
-
refY:
|
|
2712
|
+
id: gn(e.id),
|
|
2713
|
+
markerWidth: E(J).arrowSize,
|
|
2714
|
+
markerHeight: E(J).arrowSize,
|
|
2715
|
+
refX: E(J).arrowSize - 3,
|
|
2716
|
+
refY: E(J).arrowSize / 2,
|
|
2709
2717
|
orient: "auto",
|
|
2710
2718
|
markerUnits: "strokeWidth"
|
|
2711
|
-
}, [
|
|
2719
|
+
}, [E(J).arrowShape === "normal" ? (C(), y("path", {
|
|
2712
2720
|
key: 0,
|
|
2713
|
-
d: `M 0 0 L ${
|
|
2714
|
-
fill:
|
|
2715
|
-
stroke:
|
|
2721
|
+
d: `M 0 0 L ${E(J).arrowSize} ${E(J).arrowSize / 2} L 0 ${E(J).arrowSize} Z`,
|
|
2722
|
+
fill: hn(e),
|
|
2723
|
+
stroke: hn(e),
|
|
2716
2724
|
"stroke-width": "0",
|
|
2717
2725
|
style: { transition: "stroke 0.2s ease-in-out,\n fill 0.2s ease-in-out,\n stroke-width 0.2s ease-in-out" }
|
|
2718
|
-
}, null, 8,
|
|
2726
|
+
}, null, 8, lr)) : (C(), y("path", {
|
|
2719
2727
|
key: 1,
|
|
2720
|
-
d: `M 0 0 L ${
|
|
2721
|
-
fill:
|
|
2722
|
-
stroke:
|
|
2728
|
+
d: `M 0 0 L ${E(J).arrowSize} ${E(J).arrowSize / 2} L 0 ${E(J).arrowSize} L ${E(J).arrowSize / 3} ${E(J).arrowSize / 2} Z`,
|
|
2729
|
+
fill: hn(e),
|
|
2730
|
+
stroke: hn(e),
|
|
2723
2731
|
"stroke-width": "0",
|
|
2724
2732
|
style: { transition: "stroke 0.2s ease-in-out,\n fill 0.2s ease-in-out,\n stroke-width 0.2s ease-in-out" }
|
|
2725
|
-
}, null, 8,
|
|
2726
|
-
|
|
2733
|
+
}, null, 8, ur))], 8, cr))), 128))])),
|
|
2734
|
+
b("g", dr, [(C(!0), y(fe, null, Ee(E(J).edges, (e) => (C(), y(fe, { key: e.id }, [b("path", be({
|
|
2727
2735
|
"data-cy-edge": "",
|
|
2728
2736
|
ref_for: !0,
|
|
2729
|
-
ref:
|
|
2730
|
-
}, { ref_for: !0 },
|
|
2737
|
+
ref: Qt(e.id)
|
|
2738
|
+
}, { ref_for: !0 }, dn(e), { style: {
|
|
2731
2739
|
"pointer-events": "none",
|
|
2732
2740
|
transition: "stroke-width 0.2s ease-in-out,\n stroke 0.2s ease-in-out"
|
|
2733
|
-
} }), null, 16),
|
|
2741
|
+
} }), null, 16), L.value.style.chart.midpoints.show ? (C(), y("circle", be({
|
|
2734
2742
|
key: 0,
|
|
2735
2743
|
"data-cy-midpoint": "",
|
|
2736
2744
|
class: "vue-ui-dag-edge-midpoint",
|
|
2737
2745
|
"data-a11y-midpoint-id": e.id
|
|
2738
|
-
}, { ref_for: !0 },
|
|
2739
|
-
"aria-label": `${
|
|
2746
|
+
}, { ref_for: !0 }, mn(e), {
|
|
2747
|
+
"aria-label": `${Y(e.from)?.label ?? e.from} to ${Y(e.to)?.label ?? e.to}`,
|
|
2740
2748
|
style: { transition: "stroke-width 0.2s ease-in-out,\n stroke 0.2s ease-in-out,\n fill 0.2s ease-in-out" },
|
|
2741
|
-
onMouseenter: (t) =>
|
|
2742
|
-
onMouseleave:
|
|
2743
|
-
}), null, 16,
|
|
2744
|
-
|
|
2749
|
+
onMouseenter: (t) => ln(e),
|
|
2750
|
+
onMouseleave: Q
|
|
2751
|
+
}), null, 16, fr)) : v("", !0)], 64))), 128))]),
|
|
2752
|
+
b("g", pr, [(C(!0), y(fe, null, Ee(E(J).nodes, (t) => (C(), y("g", {
|
|
2745
2753
|
key: t.id,
|
|
2746
2754
|
class: "vue-ui-dag-node",
|
|
2747
|
-
onClick:
|
|
2748
|
-
onMouseenter: (e) =>
|
|
2749
|
-
onMouseleave: (e) =>
|
|
2750
|
-
}, [e.$slots.node ?
|
|
2755
|
+
onClick: je((e) => L.value.style.chart.nodes.tooltip.showOnClick && Wt(t), ["stop"]),
|
|
2756
|
+
onMouseenter: (e) => cn(t.id),
|
|
2757
|
+
onMouseleave: (e) => un(t.id)
|
|
2758
|
+
}, [e.$slots.node ? v("", !0) : (C(), y("rect", be({
|
|
2751
2759
|
key: 0,
|
|
2752
2760
|
"data-cy-node": ""
|
|
2753
|
-
}, { ref_for: !0 },
|
|
2761
|
+
}, { ref_for: !0 }, pn(t), {
|
|
2754
2762
|
"data-a11y-node-id": t.id,
|
|
2755
2763
|
"aria-label": `${t.label ?? t.id}`,
|
|
2756
2764
|
style: {
|
|
2757
|
-
cursor:
|
|
2765
|
+
cursor: L.value.style.chart.nodes.tooltip.showOnClick && Je.value ? "pointer" : "default",
|
|
2758
2766
|
transition: "stroke 0.2s ease-in-out, stroke-width 0.2s ease-in-out, fill 0.2s ease-in-out"
|
|
2759
2767
|
}
|
|
2760
|
-
}), null, 16,
|
|
2768
|
+
}), null, 16, hr)), e.$slots.node ? (C(), y("foreignObject", {
|
|
2761
2769
|
key: 1,
|
|
2762
2770
|
x: t.x - t.width / 2,
|
|
2763
2771
|
y: t.y - t.height / 2,
|
|
2764
2772
|
width: t.width,
|
|
2765
2773
|
height: t.height,
|
|
2766
2774
|
style: { overflow: "visible" }
|
|
2767
|
-
}, [
|
|
2775
|
+
}, [T(e.$slots, "node", be({ ref_for: !0 }, {
|
|
2768
2776
|
node: t,
|
|
2769
|
-
orientation:
|
|
2770
|
-
}), void 0, !0)], 8,
|
|
2771
|
-
|
|
2777
|
+
orientation: K.value
|
|
2778
|
+
}), void 0, !0)], 8, gr)) : v("", !0)], 40, mr))), 128))]),
|
|
2779
|
+
b("g", _r, [(C(!0), y(fe, null, Ee(E(J).edges, (e) => (C(), y("path", {
|
|
2772
2780
|
key: e.id,
|
|
2773
2781
|
d: e.pathData,
|
|
2774
2782
|
fill: "none",
|
|
2775
2783
|
stroke: "transparent",
|
|
2776
|
-
"stroke-width":
|
|
2784
|
+
"stroke-width": L.value.style.chart.edges.strokeWidth * (e.from === $.value || e.id === R.value?.id ? 1.3 : 1),
|
|
2777
2785
|
"stroke-linecap": "round",
|
|
2778
2786
|
"stroke-linejoin": "round",
|
|
2779
|
-
"marker-end":
|
|
2787
|
+
"marker-end": E(J).arrowShape === "undirected" ? null : `url(#${gn(e.id)})`,
|
|
2780
2788
|
style: {
|
|
2781
2789
|
"pointer-events": "none",
|
|
2782
2790
|
transition: "stroke-width 0.2s ease-in-out,\n stroke 0.2s ease-in-out"
|
|
2783
2791
|
}
|
|
2784
|
-
}, null, 8,
|
|
2785
|
-
|
|
2792
|
+
}, null, 8, vr))), 128))]),
|
|
2793
|
+
b("g", yr, [(C(!0), y(fe, null, Ee(E(J).nodes, (t) => (C(), y("g", {
|
|
2786
2794
|
key: t.id,
|
|
2787
|
-
onClick:
|
|
2788
|
-
onMouseenter: (e) =>
|
|
2789
|
-
onMouseleave: (e) =>
|
|
2790
|
-
}, [e.$slots["free-node-label"] ?
|
|
2795
|
+
onClick: je((e) => L.value.style.chart.nodes.tooltip.showOnClick && Wt(t), ["stop"]),
|
|
2796
|
+
onMouseenter: (e) => sn(t.id),
|
|
2797
|
+
onMouseleave: (e) => un(t.id)
|
|
2798
|
+
}, [e.$slots["free-node-label"] ? v("", !0) : (C(), y(fe, { key: 0 }, [e.$slots["node-label"] ? (C(), y("text", {
|
|
2791
2799
|
key: 0,
|
|
2792
2800
|
x: t.x,
|
|
2793
|
-
y: t.y +
|
|
2801
|
+
y: t.y + L.value.style.chart.nodes.labels.fontSize / 3,
|
|
2794
2802
|
"text-anchor": "middle",
|
|
2795
|
-
"font-size":
|
|
2796
|
-
fill: $.value === t.id &&
|
|
2797
|
-
"font-weight":
|
|
2803
|
+
"font-size": L.value.style.chart.nodes.labels.fontSize,
|
|
2804
|
+
fill: $.value === t.id && L.value.style.chart.nodes.selected.labelColor != null ? L.value.style.chart.nodes.selected.labelColor : t.original.color,
|
|
2805
|
+
"font-weight": L.value.style.chart.nodes.labels.bold ? "bold" : "normal",
|
|
2798
2806
|
style: { transition: "fill 0.2s ease-in-out" }
|
|
2799
|
-
}, [
|
|
2807
|
+
}, [T(e.$slots, "node-label", be({ ref_for: !0 }, {
|
|
2800
2808
|
node: t,
|
|
2801
|
-
orientation:
|
|
2802
|
-
}), () => [
|
|
2809
|
+
orientation: K.value
|
|
2810
|
+
}), () => [_e(De(t.label), 1)], !0)], 8, xr)) : !e.$slots["free-node-label"] && !e.$slots.node ? (C(), y("text", {
|
|
2803
2811
|
key: 1,
|
|
2804
2812
|
"data-cy-node-label": "",
|
|
2805
2813
|
x: t.x,
|
|
2806
|
-
y: t.y +
|
|
2814
|
+
y: t.y + L.value.style.chart.nodes.labels.fontSize / 3,
|
|
2807
2815
|
"text-anchor": "middle",
|
|
2808
|
-
"font-size":
|
|
2809
|
-
fill: ($.value === t.id ||
|
|
2810
|
-
"font-weight":
|
|
2816
|
+
"font-size": L.value.style.chart.nodes.labels.fontSize,
|
|
2817
|
+
fill: ($.value === t.id || fn(t.id)) && L.value.style.chart.nodes.selected.labelColor != null ? L.value.style.chart.nodes.selected.labelColor : t.original.color,
|
|
2818
|
+
"font-weight": L.value.style.chart.nodes.labels.bold ? "bold" : "normal",
|
|
2811
2819
|
style: { transition: "fill 0.2s ease-in-out" },
|
|
2812
|
-
innerHTML:
|
|
2820
|
+
innerHTML: E(n)({
|
|
2813
2821
|
content: t.label,
|
|
2814
|
-
fontSize:
|
|
2815
|
-
fontWeight:
|
|
2816
|
-
fill: ($.value === t.id ||
|
|
2822
|
+
fontSize: L.value.style.chart.nodes.labels.fontSize,
|
|
2823
|
+
fontWeight: L.value.style.chart.nodes.labels.bold ? "bold" : "normal",
|
|
2824
|
+
fill: ($.value === t.id || fn(t.id)) && L.value.style.chart.nodes.selected.labelColor != null ? L.value.style.chart.nodes.selected.labelColor : t.original.color,
|
|
2817
2825
|
x: t.x,
|
|
2818
2826
|
y: t.y,
|
|
2819
2827
|
autoOffset: !0
|
|
2820
2828
|
})
|
|
2821
|
-
}, null, 8,
|
|
2829
|
+
}, null, 8, Sr)) : v("", !0)], 64)), e.$slots["free-node-label"] ? (C(), y("g", Cr, [T(e.$slots, "free-node-label", be({ ref_for: !0 }, {
|
|
2822
2830
|
node: t,
|
|
2823
|
-
layoutData:
|
|
2824
|
-
orientation:
|
|
2825
|
-
}), void 0, !0)])) :
|
|
2826
|
-
|
|
2827
|
-
drawingArea:
|
|
2828
|
-
data:
|
|
2829
|
-
orientation:
|
|
2830
|
-
isPrintingImg:
|
|
2831
|
-
isPrintingSvg:
|
|
2831
|
+
layoutData: E(J),
|
|
2832
|
+
orientation: K.value
|
|
2833
|
+
}), void 0, !0)])) : v("", !0)], 40, br))), 128))]),
|
|
2834
|
+
T(e.$slots, "svg", { svg: {
|
|
2835
|
+
drawingArea: E(Dt),
|
|
2836
|
+
data: E(J),
|
|
2837
|
+
orientation: K.value,
|
|
2838
|
+
isPrintingImg: E(pt) || E(q) || Ue.value,
|
|
2839
|
+
isPrintingSvg: We.value
|
|
2832
2840
|
} }, void 0, !0)
|
|
2833
|
-
], 46,
|
|
2834
|
-
hint:
|
|
2835
|
-
isVisible:
|
|
2836
|
-
})), void 0, !0)])) :
|
|
2837
|
-
e.$slots.watermark ? (
|
|
2838
|
-
|
|
2839
|
-
default:
|
|
2841
|
+
], 46, nr)) : v("", !0), e.$slots.hint ? (C(), y("div", wr, [T(e.$slots, "hint", S(x({
|
|
2842
|
+
hint: L.value.a11y.translations.keyboardNavigation,
|
|
2843
|
+
isVisible: qe.value
|
|
2844
|
+
})), void 0, !0)])) : v("", !0)]),
|
|
2845
|
+
e.$slots.watermark ? (C(), y("div", Tr, [T(e.$slots, "watermark", S(x({ isPrinting: E(pt) || E(q) || Ue.value || We.value })), void 0, !0)])) : v("", !0),
|
|
2846
|
+
ve(me, { name: "fade" }, {
|
|
2847
|
+
default: D(() => [U.value ? (C(), he(pe, {
|
|
2840
2848
|
key: 0,
|
|
2841
|
-
to:
|
|
2842
|
-
}, [
|
|
2849
|
+
to: X.value ? j.value : "body"
|
|
2850
|
+
}, [b("div", {
|
|
2843
2851
|
"data-cy-tooltip-midpoint": "",
|
|
2844
2852
|
ref_key: "tooltipRef",
|
|
2845
|
-
ref:
|
|
2853
|
+
ref: z,
|
|
2846
2854
|
class: "vue-ui-dag-tooltip",
|
|
2847
|
-
style:
|
|
2848
|
-
...
|
|
2849
|
-
maxWidth:
|
|
2850
|
-
"--vue-data-ui-dag-tooltip-background":
|
|
2851
|
-
"--vue-data-ui-dag-tooltip-color":
|
|
2855
|
+
style: Ce({
|
|
2856
|
+
...Qe.value,
|
|
2857
|
+
maxWidth: L.value.style.chart.midpoints.tooltip.maxWidth,
|
|
2858
|
+
"--vue-data-ui-dag-tooltip-background": L.value.style.chart.midpoints.tooltip.backgroundColor,
|
|
2859
|
+
"--vue-data-ui-dag-tooltip-color": L.value.style.chart.midpoints.tooltip.color
|
|
2852
2860
|
}),
|
|
2853
|
-
"data-position":
|
|
2854
|
-
}, [
|
|
2855
|
-
edge:
|
|
2856
|
-
layoutData:
|
|
2857
|
-
})), () => [
|
|
2861
|
+
"data-position": $e.value
|
|
2862
|
+
}, [T(e.$slots, "tooltip-midpoint", S(x({
|
|
2863
|
+
edge: R.value,
|
|
2864
|
+
layoutData: E(J)
|
|
2865
|
+
})), () => [R.value ? (C(), y("div", Dr, De(Y(R.value.from)?.label ?? R.value.from) + " → " + De(Y(R.value.to)?.label ?? R.value.to), 1)) : v("", !0)], !0)], 12, Er)], 8, ["to"])) : v("", !0)]),
|
|
2858
2866
|
_: 3
|
|
2859
2867
|
}),
|
|
2860
|
-
|
|
2861
|
-
default:
|
|
2868
|
+
ve(me, { name: "fade" }, {
|
|
2869
|
+
default: D(() => [B.value ? (C(), he(pe, {
|
|
2862
2870
|
key: 0,
|
|
2863
|
-
to:
|
|
2864
|
-
}, [
|
|
2871
|
+
to: X.value ? j.value : "body"
|
|
2872
|
+
}, [b("div", {
|
|
2865
2873
|
"data-cy-tooltip-node": "",
|
|
2866
2874
|
ref_key: "nodeTooltipRef",
|
|
2867
|
-
ref:
|
|
2875
|
+
ref: H,
|
|
2868
2876
|
class: "vue-ui-dag-node-tooltip",
|
|
2869
|
-
style:
|
|
2870
|
-
maxWidth:
|
|
2871
|
-
left:
|
|
2872
|
-
top:
|
|
2873
|
-
"--vue-data-ui-dag-node-tooltip-background":
|
|
2874
|
-
"--vue-data-ui-dag-node-tooltip-color":
|
|
2877
|
+
style: Ce({
|
|
2878
|
+
maxWidth: L.value.style.chart.nodes.tooltip.maxWidth,
|
|
2879
|
+
left: nt.value.left,
|
|
2880
|
+
top: nt.value.top,
|
|
2881
|
+
"--vue-data-ui-dag-node-tooltip-background": L.value.style.chart.nodes.tooltip.backgroundColor,
|
|
2882
|
+
"--vue-data-ui-dag-node-tooltip-color": L.value.style.chart.nodes.tooltip.color
|
|
2875
2883
|
}),
|
|
2876
|
-
"data-position":
|
|
2877
|
-
}, [
|
|
2878
|
-
node:
|
|
2879
|
-
layoutData:
|
|
2880
|
-
})), () => [
|
|
2884
|
+
"data-position": rt.value
|
|
2885
|
+
}, [T(e.$slots, "tooltip-node", S(x({
|
|
2886
|
+
node: V.value,
|
|
2887
|
+
layoutData: E(J)
|
|
2888
|
+
})), () => [V.value ? (C(), y("div", kr, De(V.value.label), 1)) : v("", !0)], !0)], 12, Or)], 8, ["to"])) : v("", !0)]),
|
|
2881
2889
|
_: 3
|
|
2882
2890
|
}),
|
|
2883
|
-
|
|
2891
|
+
L.value.style.chart.controls.position === "bottom" && !E(ct) && L.value.style.chart.controls.show ? (C(), he(ue, {
|
|
2884
2892
|
key: 7,
|
|
2885
2893
|
ref_key: "zoomControls",
|
|
2886
|
-
ref:
|
|
2887
|
-
config:
|
|
2888
|
-
scale:
|
|
2889
|
-
isFullscreen:
|
|
2894
|
+
ref: Re,
|
|
2895
|
+
config: L.value,
|
|
2896
|
+
scale: E(At),
|
|
2897
|
+
isFullscreen: X.value,
|
|
2890
2898
|
withDirection: "",
|
|
2891
|
-
onZoomIn:
|
|
2892
|
-
onZoomOut:
|
|
2893
|
-
onResetZoom: t[1] ||= () =>
|
|
2894
|
-
onSwitchDirection:
|
|
2899
|
+
onZoomIn: Lt,
|
|
2900
|
+
onZoomOut: Rt,
|
|
2901
|
+
onResetZoom: t[1] ||= () => E(Ot)(!0),
|
|
2902
|
+
onSwitchDirection: Bt
|
|
2895
2903
|
}, null, 8, [
|
|
2896
2904
|
"config",
|
|
2897
2905
|
"scale",
|
|
2898
2906
|
"isFullscreen"
|
|
2899
|
-
])) :
|
|
2900
|
-
e.$slots.source ? (
|
|
2907
|
+
])) : v("", !0),
|
|
2908
|
+
e.$slots.source ? (C(), y("div", {
|
|
2901
2909
|
key: 8,
|
|
2902
2910
|
ref_key: "source",
|
|
2903
|
-
ref:
|
|
2911
|
+
ref: Le,
|
|
2904
2912
|
dir: "auto"
|
|
2905
|
-
}, [
|
|
2906
|
-
|
|
2907
|
-
], 46,
|
|
2913
|
+
}, [T(e.$slots, "source", {}, void 0, !0)], 512)) : v("", !0),
|
|
2914
|
+
T(e.$slots, "skeleton", {}, () => [E(ct) ? (C(), he(m, { key: 0 })) : v("", !0)], !0)
|
|
2915
|
+
], 46, Qn));
|
|
2908
2916
|
}
|
|
2909
|
-
}, [["__scopeId", "data-v-
|
|
2917
|
+
}, [["__scopeId", "data-v-cceceb15"]]);
|
|
2910
2918
|
//#endregion
|
|
2911
|
-
export {
|
|
2919
|
+
export { Zn as n, jr as t };
|