@sme.up/ketchup2 2.0.0-SNAPSHOT-20250908152453 → 2.0.0-SNAPSHOT-20250909094906
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{_basePickBy-Bq-OHVlJ.js → _basePickBy-Do84EYM_.js} +23 -23
- package/dist/{_basePickBy-DNewzgl9.cjs → _basePickBy-jbGD0zVt.cjs} +1 -1
- package/dist/{_baseUniq-DUO9awf7.js → _baseUniq-ChWtQCAg.js} +40 -40
- package/dist/{_baseUniq-CQ7AOjch.cjs → _baseUniq-QOx9ZFk8.cjs} +1 -1
- package/dist/{arc-H_1C-9yW.cjs → arc-BIKBJW81.cjs} +1 -1
- package/dist/{arc-BC6Mnh_l.js → arc-ChfU56Id.js} +1 -1
- package/dist/{architecture-O4VJ6CD3-Bfi1Y3W3.cjs → architecture-O4VJ6CD3-3YFJqJ0Z.cjs} +1 -1
- package/dist/{architecture-O4VJ6CD3-B2_zBkXA.js → architecture-O4VJ6CD3-BUnL0V-N.js} +1 -1
- package/dist/{architectureDiagram-KFL7JDKH-Dzqraep6.js → architectureDiagram-W76B3OCA-CBK4zgfT.js} +132 -132
- package/dist/{architectureDiagram-KFL7JDKH-DOaG_WZV.cjs → architectureDiagram-W76B3OCA-CZqalw5r.cjs} +1 -1
- package/dist/{blockDiagram-ZYB65J3Q-BF5gB3wI.js → blockDiagram-QIGZ2CNN-D-oSz2sZ.js} +5 -5
- package/dist/{blockDiagram-ZYB65J3Q-0TfXbzbL.cjs → blockDiagram-QIGZ2CNN-GTeJnx7A.cjs} +4 -4
- package/dist/{c4Diagram-AAMF2YG6-CZutQWdQ.js → c4Diagram-FPNF74CW-ARWMN1wL.js} +2 -2
- package/dist/{c4Diagram-AAMF2YG6-BUdDUCAg.cjs → c4Diagram-FPNF74CW-CTzfs_2H.cjs} +4 -4
- package/dist/channel-B4Pxd4YX.cjs +1 -0
- package/dist/channel-DioWzi4t.js +5 -0
- package/dist/{chunk-ANTBXLJU-BdaEgFx7.js → chunk-4BX2VUAB-B3NOuiDi.js} +1 -1
- package/dist/{chunk-ANTBXLJU-DqW7nBC-.cjs → chunk-4BX2VUAB-CseI-Vvw.cjs} +1 -1
- package/dist/{chunk-WVR4S24B-Chw9GJ4r.cjs → chunk-55IACEB6-DWsrLxcl.cjs} +1 -1
- package/dist/{chunk-WVR4S24B-DkA4uS4H.js → chunk-55IACEB6-J1JahOGA.js} +1 -1
- package/dist/{chunk-GLLZNHP4-BA8r1pFP.cjs → chunk-FMBD7UC4-CM5L8bW6.cjs} +1 -1
- package/dist/{chunk-GLLZNHP4-DiiaqYXe.js → chunk-FMBD7UC4-CZgAaUUx.js} +1 -1
- package/dist/{chunk-JBRWN2VN-BaREAv8H.js → chunk-K7UQS3LO-BT7hVqcS.js} +176 -176
- package/dist/chunk-K7UQS3LO-CtzkJjTw.cjs +165 -0
- package/dist/{chunk-NRVI72HA-DLE8wk3-.js → chunk-QN33PNHL-DfPMtcCm.js} +1 -1
- package/dist/{chunk-NRVI72HA-DRmCDH9L.cjs → chunk-QN33PNHL-Djjr-gFo.cjs} +1 -1
- package/dist/{chunk-FHKO5MBM-DXqhRcMm.cjs → chunk-QZHKN3VN-D80R1Bnw.cjs} +1 -1
- package/dist/{chunk-FHKO5MBM-CzQq96F_.js → chunk-QZHKN3VN-DiLRWGZ4.js} +1 -1
- package/dist/{chunk-LXBSTHXV-DFifdLZK.js → chunk-TVAH2DTR-BUlQxrvQ.js} +3 -3
- package/dist/{chunk-LXBSTHXV-B0scQvN2.cjs → chunk-TVAH2DTR-OscPged-.cjs} +3 -3
- package/dist/{chunk-OMD6QJNC-BYvyUH2d.js → chunk-TZMSLE5B-BFDfGKmV.js} +1 -1
- package/dist/{chunk-OMD6QJNC-RjSGzdd8.cjs → chunk-TZMSLE5B-C4Bupww9.cjs} +1 -1
- package/dist/{classDiagram-v2-QTMF73CY-CAtFVXFw.js → classDiagram-KNZD7YFC-D2lEcWc2.js} +2 -2
- package/dist/{classDiagram-3BZAVTQC-BOmQDPcS.cjs → classDiagram-KNZD7YFC-DU5lVeNU.cjs} +1 -1
- package/dist/{classDiagram-3BZAVTQC-CAtFVXFw.js → classDiagram-v2-RKCZMP56-D2lEcWc2.js} +2 -2
- package/dist/{classDiagram-v2-QTMF73CY-BOmQDPcS.cjs → classDiagram-v2-RKCZMP56-DU5lVeNU.cjs} +1 -1
- package/dist/{clone-B-bAOLls.js → clone-BIRPLFeu.js} +1 -1
- package/dist/clone-Yz3NuvEr.cjs +1 -0
- package/dist/cose-bilkent-S5V4N54A-BWGKRiDx.js +2608 -0
- package/dist/cose-bilkent-S5V4N54A-DL456FIj.cjs +1 -0
- package/dist/{dagre-2BBEFEWP-BCS301Dq.cjs → dagre-5GWH7T2D-N31ttJV3.cjs} +1 -1
- package/dist/{dagre-2BBEFEWP-CLTO8d-K.js → dagre-5GWH7T2D-gZxGoa1q.js} +108 -108
- package/dist/{diagram-4IRLE6MV-Cz4wPwXi.js → diagram-N5W7TBWH-BdTxNJib.js} +23 -23
- package/dist/{diagram-4IRLE6MV-_WYVJBfL.cjs → diagram-N5W7TBWH-Drncbwhp.cjs} +2 -2
- package/dist/{diagram-RP2FKANI-C_dWK3j7.cjs → diagram-QEK2KX5R-RjWKQ2ED.cjs} +4 -4
- package/dist/{diagram-RP2FKANI-CXmRNmBu.js → diagram-QEK2KX5R-WZI40S3K.js} +15 -15
- package/dist/{diagram-GUPCWM2R-CH-4x3WD.js → diagram-S2PKOQOG-B9JzzA2t.js} +10 -10
- package/dist/{diagram-GUPCWM2R-O4fOIHyx.cjs → diagram-S2PKOQOG-BNCnAE-c.cjs} +1 -1
- package/dist/{erDiagram-HZWUO2LU-uRisj4mV.cjs → erDiagram-AWTI2OKA-CC7O9cWw.cjs} +4 -4
- package/dist/{erDiagram-HZWUO2LU-Dqt1BE2C.js → erDiagram-AWTI2OKA-CHFxr-_a.js} +4 -4
- package/dist/{flowDiagram-THRYKUMA-C-r5MZds.js → flowDiagram-PVAE7QVJ-BqSE3m5u.js} +5 -5
- package/dist/{flowDiagram-THRYKUMA-bRWo210y.cjs → flowDiagram-PVAE7QVJ-HeYvgtJE.cjs} +7 -7
- package/dist/{ganttDiagram-WV7ZQ7D5-BVe9Yi12.js → ganttDiagram-OWAHRB6G-BP1W4LwQ.js} +57 -57
- package/dist/{ganttDiagram-WV7ZQ7D5-Dh9UR52T.cjs → ganttDiagram-OWAHRB6G-Cd3cccSw.cjs} +1 -1
- package/dist/{gitGraph-ZV4HHKMB-Bwp8pNLp.js → gitGraph-ZV4HHKMB-C3MJKIFJ.js} +1 -1
- package/dist/{gitGraph-ZV4HHKMB-rHh_4sTF.cjs → gitGraph-ZV4HHKMB-jdm9JJYB.cjs} +1 -1
- package/dist/{gitGraphDiagram-OJR772UL-BNm74Q9n.js → gitGraphDiagram-NY62KEGX-CAuDLddf.js} +4 -4
- package/dist/{gitGraphDiagram-OJR772UL-Bq60AaCq.cjs → gitGraphDiagram-NY62KEGX-MeKzzURg.cjs} +4 -4
- package/dist/{graph-BrGj_Gfv.cjs → graph-D6Um4HxB.cjs} +1 -1
- package/dist/{graph-CMnK4YO3.js → graph-Vhpd_PNV.js} +4 -4
- package/dist/index-DizklrOW.cjs +301 -0
- package/dist/{index-VJw3klPt.js → index-JAUwzcHq.js} +10075 -9464
- package/dist/info-63CPKGFF-BADmngvb.js +5 -0
- package/dist/{info-63CPKGFF-0H7FGkBP.cjs → info-63CPKGFF-CVwGg7sm.cjs} +1 -1
- package/dist/{infoDiagram-DDUCL6P7-Cf77NdxY.js → infoDiagram-STP46IZ2-BCtb4AJp.js} +2 -2
- package/dist/{infoDiagram-DDUCL6P7-DjqD8eRi.cjs → infoDiagram-STP46IZ2-TvwZFY0I.cjs} +1 -1
- package/dist/{journeyDiagram-FFXJYRFH-DtxrMVYZ.cjs → journeyDiagram-BIP6EPQ6-BpcOCeFx.cjs} +4 -4
- package/dist/{journeyDiagram-FFXJYRFH-C7_bJR3c.js → journeyDiagram-BIP6EPQ6-CyCYA5CK.js} +4 -4
- package/dist/{kanban-definition-KOZQBZVT-Bo9dRDl_.js → kanban-definition-6OIFK2YF-4YIBsMQL.js} +24 -24
- package/dist/{kanban-definition-KOZQBZVT-Bel-f3_i.cjs → kanban-definition-6OIFK2YF-__0ex79Z.cjs} +5 -5
- package/dist/ketchup2.cjs.js +1 -1
- package/dist/ketchup2.es.js +9 -9
- package/dist/{layout-Bt4IJcSa.cjs → layout-4fomnJM7.cjs} +1 -1
- package/dist/{layout-kUC11kUc.js → layout-DtdTzvka.js} +32 -32
- package/dist/{linear-BDcEY_LY.js → linear-BFBJjwEz.js} +12 -12
- package/dist/{linear-50cMYwZQ.cjs → linear-DqF6L3Zm.cjs} +1 -1
- package/dist/{mermaid-parser.core-Bxkmx2-5.cjs → mermaid-parser.core-CySFdxC3.cjs} +2 -2
- package/dist/{mermaid-parser.core-BnvQOoyE.js → mermaid-parser.core-DX0wl6-K.js} +11 -11
- package/dist/mindmap-definition-Q6HEUPPD-DS17jgrc.cjs +68 -0
- package/dist/mindmap-definition-Q6HEUPPD-xX1MDaCF.js +755 -0
- package/dist/{packet-HUATNLJX-DaHhWwAU.js → packet-HUATNLJX-BYVUpbG6.js} +1 -1
- package/dist/{packet-HUATNLJX-6TXP1bqK.cjs → packet-HUATNLJX-Cg3sBc6j.cjs} +1 -1
- package/dist/pie-WTHONI2E-8_e9e1PJ.js +5 -0
- package/dist/{pie-WTHONI2E-AzeewyiY.cjs → pie-WTHONI2E-aHt6d3si.cjs} +1 -1
- package/dist/{pieDiagram-DBDJKBY4-DBzbWAu9.js → pieDiagram-ADFJNKIX-B8i8yWnV.js} +25 -25
- package/dist/{pieDiagram-DBDJKBY4-W8GACAWO.cjs → pieDiagram-ADFJNKIX-DT0Ws9pS.cjs} +3 -3
- package/dist/{quadrantDiagram-YPSRARAO-mnX6YljL.js → quadrantDiagram-LMRXKWRM-BhJb9RD_.js} +2 -2
- package/dist/{quadrantDiagram-YPSRARAO-BjYPzvUJ.cjs → quadrantDiagram-LMRXKWRM-DtGKIjme.cjs} +1 -1
- package/dist/{radar-NJJJXTRR-BocemfZ8.cjs → radar-NJJJXTRR-BAYIFlfJ.cjs} +1 -1
- package/dist/radar-NJJJXTRR-zWC19E7g.js +5 -0
- package/dist/{requirementDiagram-EGVEC5DT-Bimu3sL7.cjs → requirementDiagram-4UW4RH46-CVZ_dXqx.cjs} +4 -4
- package/dist/{requirementDiagram-EGVEC5DT-B9Bwf2ay.js → requirementDiagram-4UW4RH46-DAI3Uiz3.js} +3 -3
- package/dist/{sankeyDiagram-HRAUVNP4-DzXnX0Ga.js → sankeyDiagram-GR3RE2ED-BXuYlJUa.js} +1 -1
- package/dist/{sankeyDiagram-HRAUVNP4-DJiyVYTm.cjs → sankeyDiagram-GR3RE2ED-DKDgKlXn.cjs} +1 -1
- package/dist/sequenceDiagram-C3RYC4MD-CIIj5p5i.cjs +145 -0
- package/dist/sequenceDiagram-C3RYC4MD-DW6rFBHn.js +2511 -0
- package/dist/{stateDiagram-UUKSUZ4H-DNsbUQC8.cjs → stateDiagram-KXAO66HF-DHLO3kOk.cjs} +1 -1
- package/dist/{stateDiagram-UUKSUZ4H-BfB7OKY5.js → stateDiagram-KXAO66HF-ZTmYAzzc.js} +4 -4
- package/dist/{stateDiagram-v2-EYPG3UTE-k2P5SO6h.cjs → stateDiagram-v2-UMBNRL4Z-1TzBIAjq.cjs} +1 -1
- package/dist/{stateDiagram-v2-EYPG3UTE-CrbgZXhp.js → stateDiagram-v2-UMBNRL4Z-8NUwdmML.js} +2 -2
- package/dist/{timeline-definition-3HZDQTIS-CJz-ObCi.cjs → timeline-definition-XQNQX7LJ-CtFKMZOO.cjs} +1 -1
- package/dist/{timeline-definition-3HZDQTIS-TVmN8Z80.js → timeline-definition-XQNQX7LJ-D4fALhvp.js} +2 -2
- package/dist/{treemap-75Q7IDZK-MVFNLG-W.cjs → treemap-75Q7IDZK-DH4yrCnW.cjs} +1 -1
- package/dist/{treemap-75Q7IDZK-CbpJhl6F.js → treemap-75Q7IDZK-tSdwGttm.js} +1 -1
- package/dist/{xychartDiagram-FDP5SA34-QzZvVH2o.js → xychartDiagram-6GGTOJPD-CRUaY0o_.js} +2 -2
- package/dist/{xychartDiagram-FDP5SA34-kb-QmiwQ.cjs → xychartDiagram-6GGTOJPD-vmeOyvTD.cjs} +1 -1
- package/package.json +13 -13
- package/dist/channel-D7-lFnTD.js +0 -5
- package/dist/channel-DveM5GOL.cjs +0 -1
- package/dist/chunk-JBRWN2VN-4oDxplqY.cjs +0 -165
- package/dist/clone-C0dQSPFZ.cjs +0 -1
- package/dist/index-BA07EijG.cjs +0 -266
- package/dist/info-63CPKGFF-CV7HrEKO.js +0 -5
- package/dist/mindmap-definition-LNHGMQRG-CVh0vQd5.js +0 -3230
- package/dist/mindmap-definition-LNHGMQRG-qQmqPKl8.cjs +0 -95
- package/dist/pie-WTHONI2E-Cq9zrqsG.js +0 -5
- package/dist/radar-NJJJXTRR-Yz9jsEDT.js +0 -5
- package/dist/sequenceDiagram-4MX5Z3NR-DHUCnBgG.cjs +0 -122
- package/dist/sequenceDiagram-4MX5Z3NR-DuaMVfG7.js +0 -2281
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { _ as w,
|
|
2
|
-
import { G as B } from "./graph-
|
|
3
|
-
import { l as I } from "./layout-
|
|
4
|
-
import { i as b } from "./_baseUniq-
|
|
5
|
-
import { c as L } from "./clone-
|
|
6
|
-
import { m as A } from "./_basePickBy-
|
|
1
|
+
import { _ as w, at as F, au as Y, av as _, aw as H, l as i, c as V, ax as z, ay as U, ai as $, an as q, aj as P, ah as K, az as Q, aA as W, aB as Z } from "./index-JAUwzcHq.js";
|
|
2
|
+
import { G as B } from "./graph-Vhpd_PNV.js";
|
|
3
|
+
import { l as I } from "./layout-DtdTzvka.js";
|
|
4
|
+
import { i as b } from "./_baseUniq-ChWtQCAg.js";
|
|
5
|
+
import { c as L } from "./clone-BIRPLFeu.js";
|
|
6
|
+
import { m as A } from "./_basePickBy-Do84EYM_.js";
|
|
7
7
|
function h(e) {
|
|
8
8
|
var t = {
|
|
9
9
|
options: {
|
|
@@ -18,8 +18,8 @@ function h(e) {
|
|
|
18
18
|
}
|
|
19
19
|
function ee(e) {
|
|
20
20
|
return A(e.nodes(), function(t) {
|
|
21
|
-
var n = e.node(t), a = e.parent(t),
|
|
22
|
-
return b(n) || (
|
|
21
|
+
var n = e.node(t), a = e.parent(t), r = { v: t };
|
|
22
|
+
return b(n) || (r.value = n), b(a) || (r.parent = a), r;
|
|
23
23
|
});
|
|
24
24
|
}
|
|
25
25
|
function ne(e) {
|
|
@@ -32,12 +32,12 @@ var d = /* @__PURE__ */ new Map(), y = /* @__PURE__ */ new Map(), J = /* @__PURE
|
|
|
32
32
|
y.clear(), J.clear(), d.clear();
|
|
33
33
|
}, "clear"), D = /* @__PURE__ */ w((e, t) => {
|
|
34
34
|
const n = y.get(t) || [];
|
|
35
|
-
return
|
|
35
|
+
return i.trace("In isDescendant", t, " ", e, " = ", n.includes(e)), n.includes(e);
|
|
36
36
|
}, "isDescendant"), se = /* @__PURE__ */ w((e, t) => {
|
|
37
37
|
const n = y.get(t) || [];
|
|
38
|
-
return
|
|
38
|
+
return i.info("Descendants of ", t, " is ", n), i.info("Edge is ", e), e.v === t || e.w === t ? !1 : n ? n.includes(e.v) || D(e.v, t) || D(e.w, t) || n.includes(e.w) : (i.debug("Tilt, ", t, ",not in descendants"), !1);
|
|
39
39
|
}, "edgeInCluster"), G = /* @__PURE__ */ w((e, t, n, a) => {
|
|
40
|
-
|
|
40
|
+
i.warn(
|
|
41
41
|
"Copying children of ",
|
|
42
42
|
e,
|
|
43
43
|
"root",
|
|
@@ -46,13 +46,13 @@ var d = /* @__PURE__ */ new Map(), y = /* @__PURE__ */ new Map(), J = /* @__PURE
|
|
|
46
46
|
t.node(e),
|
|
47
47
|
a
|
|
48
48
|
);
|
|
49
|
-
const
|
|
50
|
-
e !== a &&
|
|
49
|
+
const r = t.children(e) || [];
|
|
50
|
+
e !== a && r.push(e), i.warn("Copying (nodes) clusterId", e, "nodes", r), r.forEach((o) => {
|
|
51
51
|
if (t.children(o).length > 0)
|
|
52
52
|
G(o, t, n, a);
|
|
53
53
|
else {
|
|
54
54
|
const l = t.node(o);
|
|
55
|
-
|
|
55
|
+
i.info("cp ", o, " to ", a, " with parent ", e), n.setNode(o, l), a !== t.parent(o) && (i.warn("Setting parent", o, t.parent(o)), n.setParent(o, t.parent(o))), e !== a && o !== e ? (i.debug("Setting parent", o, e), n.setParent(o, e)) : (i.info("In copy ", e, "root", a, "data", t.node(e), a), i.debug(
|
|
56
56
|
"Not Setting parent for node=",
|
|
57
57
|
o,
|
|
58
58
|
"cluster!==rootId",
|
|
@@ -61,12 +61,12 @@ var d = /* @__PURE__ */ new Map(), y = /* @__PURE__ */ new Map(), J = /* @__PURE
|
|
|
61
61
|
o !== e
|
|
62
62
|
));
|
|
63
63
|
const u = t.edges(o);
|
|
64
|
-
|
|
65
|
-
|
|
64
|
+
i.debug("Copying Edges", u), u.forEach((c) => {
|
|
65
|
+
i.info("Edge", c);
|
|
66
66
|
const m = t.edge(c.v, c.w, c.name);
|
|
67
|
-
|
|
67
|
+
i.info("Edge data", m, a);
|
|
68
68
|
try {
|
|
69
|
-
se(c, a) ? (
|
|
69
|
+
se(c, a) ? (i.info("Copying as ", c.v, c.w, m, c.name), n.setEdge(c.v, c.w, m, c.name), i.info("newGraph edges ", n.edges(), n.edge(n.edges()[0]))) : i.info(
|
|
70
70
|
"Skipping copy of edge ",
|
|
71
71
|
c.v,
|
|
72
72
|
"-->",
|
|
@@ -77,64 +77,64 @@ var d = /* @__PURE__ */ new Map(), y = /* @__PURE__ */ new Map(), J = /* @__PURE
|
|
|
77
77
|
e
|
|
78
78
|
);
|
|
79
79
|
} catch (v) {
|
|
80
|
-
|
|
80
|
+
i.error(v);
|
|
81
81
|
}
|
|
82
82
|
});
|
|
83
83
|
}
|
|
84
|
-
|
|
84
|
+
i.debug("Removing node", o), t.removeNode(o);
|
|
85
85
|
});
|
|
86
86
|
}, "copy"), R = /* @__PURE__ */ w((e, t) => {
|
|
87
87
|
const n = t.children(e);
|
|
88
88
|
let a = [...n];
|
|
89
|
-
for (const
|
|
90
|
-
J.set(
|
|
89
|
+
for (const r of n)
|
|
90
|
+
J.set(r, e), a = [...a, ...R(r, t)];
|
|
91
91
|
return a;
|
|
92
|
-
}, "extractDescendants"),
|
|
93
|
-
const a = e.edges().filter((c) => c.v === t || c.w === t),
|
|
92
|
+
}, "extractDescendants"), ie = /* @__PURE__ */ w((e, t, n) => {
|
|
93
|
+
const a = e.edges().filter((c) => c.v === t || c.w === t), r = e.edges().filter((c) => c.v === n || c.w === n), o = a.map((c) => ({ v: c.v === t ? n : c.v, w: c.w === t ? t : c.w })), l = r.map((c) => ({ v: c.v, w: c.w }));
|
|
94
94
|
return o.filter((c) => l.some((m) => c.v === m.v && c.w === m.w));
|
|
95
95
|
}, "findCommonEdges"), C = /* @__PURE__ */ w((e, t, n) => {
|
|
96
96
|
const a = t.children(e);
|
|
97
|
-
if (
|
|
97
|
+
if (i.trace("Searching children of id ", e, a), a.length < 1)
|
|
98
98
|
return e;
|
|
99
|
-
let
|
|
99
|
+
let r;
|
|
100
100
|
for (const o of a) {
|
|
101
|
-
const l = C(o, t, n), u =
|
|
101
|
+
const l = C(o, t, n), u = ie(t, n, l);
|
|
102
102
|
if (l)
|
|
103
103
|
if (u.length > 0)
|
|
104
|
-
|
|
104
|
+
r = l;
|
|
105
105
|
else
|
|
106
106
|
return l;
|
|
107
107
|
}
|
|
108
|
-
return
|
|
109
|
-
}, "findNonClusterChild"), k = /* @__PURE__ */ w((e) => !d.has(e) || !d.get(e).externalConnections ? e : d.has(e) ? d.get(e).id : e, "getAnchorId"),
|
|
108
|
+
return r;
|
|
109
|
+
}, "findNonClusterChild"), k = /* @__PURE__ */ w((e) => !d.has(e) || !d.get(e).externalConnections ? e : d.has(e) ? d.get(e).id : e, "getAnchorId"), re = /* @__PURE__ */ w((e, t) => {
|
|
110
110
|
if (!e || t > 10) {
|
|
111
|
-
|
|
111
|
+
i.debug("Opting out, no graph ");
|
|
112
112
|
return;
|
|
113
113
|
} else
|
|
114
|
-
|
|
114
|
+
i.debug("Opting in, graph ");
|
|
115
115
|
e.nodes().forEach(function(n) {
|
|
116
|
-
e.children(n).length > 0 && (
|
|
116
|
+
e.children(n).length > 0 && (i.warn(
|
|
117
117
|
"Cluster identified",
|
|
118
118
|
n,
|
|
119
119
|
" Replacement id in edges: ",
|
|
120
120
|
C(n, e, n)
|
|
121
121
|
), y.set(n, R(n, e)), d.set(n, { id: C(n, e, n), clusterData: e.node(n) }));
|
|
122
122
|
}), e.nodes().forEach(function(n) {
|
|
123
|
-
const a = e.children(n),
|
|
124
|
-
a.length > 0 ? (
|
|
123
|
+
const a = e.children(n), r = e.edges();
|
|
124
|
+
a.length > 0 ? (i.debug("Cluster identified", n, y), r.forEach((o) => {
|
|
125
125
|
const l = D(o.v, n), u = D(o.w, n);
|
|
126
|
-
l ^ u && (
|
|
127
|
-
})) :
|
|
126
|
+
l ^ u && (i.warn("Edge: ", o, " leaves cluster ", n), i.warn("Descendants of XXX ", n, ": ", y.get(n)), d.get(n).externalConnections = !0);
|
|
127
|
+
})) : i.debug("Not a cluster ", n, y);
|
|
128
128
|
});
|
|
129
129
|
for (let n of d.keys()) {
|
|
130
|
-
const a = d.get(n).id,
|
|
131
|
-
|
|
130
|
+
const a = d.get(n).id, r = e.parent(a);
|
|
131
|
+
r !== n && d.has(r) && !d.get(r).externalConnections && (d.get(n).id = r);
|
|
132
132
|
}
|
|
133
133
|
e.edges().forEach(function(n) {
|
|
134
134
|
const a = e.edge(n);
|
|
135
|
-
|
|
136
|
-
let
|
|
137
|
-
if (
|
|
135
|
+
i.warn("Edge " + n.v + " -> " + n.w + ": " + JSON.stringify(n)), i.warn("Edge " + n.v + " -> " + n.w + ": " + JSON.stringify(e.edge(n)));
|
|
136
|
+
let r = n.v, o = n.w;
|
|
137
|
+
if (i.warn(
|
|
138
138
|
"Fix XXX",
|
|
139
139
|
d,
|
|
140
140
|
"ids:",
|
|
@@ -145,53 +145,53 @@ var d = /* @__PURE__ */ new Map(), y = /* @__PURE__ */ new Map(), J = /* @__PURE
|
|
|
145
145
|
" --- ",
|
|
146
146
|
d.get(n.w)
|
|
147
147
|
), d.get(n.v) || d.get(n.w)) {
|
|
148
|
-
if (
|
|
149
|
-
const l = e.parent(
|
|
148
|
+
if (i.warn("Fixing and trying - removing XXX", n.v, n.w, n.name), r = k(n.v), o = k(n.w), e.removeEdge(n.v, n.w, n.name), r !== n.v) {
|
|
149
|
+
const l = e.parent(r);
|
|
150
150
|
d.get(l).externalConnections = !0, a.fromCluster = n.v;
|
|
151
151
|
}
|
|
152
152
|
if (o !== n.w) {
|
|
153
153
|
const l = e.parent(o);
|
|
154
154
|
d.get(l).externalConnections = !0, a.toCluster = n.w;
|
|
155
155
|
}
|
|
156
|
-
|
|
156
|
+
i.warn("Fix Replacing with XXX", r, o, n.name), e.setEdge(r, o, a, n.name);
|
|
157
157
|
}
|
|
158
|
-
}),
|
|
158
|
+
}), i.warn("Adjusted Graph", h(e)), T(e, 0), i.trace(d);
|
|
159
159
|
}, "adjustClustersAndEdges"), T = /* @__PURE__ */ w((e, t) => {
|
|
160
|
-
if (
|
|
161
|
-
|
|
160
|
+
if (i.warn("extractor - ", t, h(e), e.children("D")), t > 10) {
|
|
161
|
+
i.error("Bailing out");
|
|
162
162
|
return;
|
|
163
163
|
}
|
|
164
164
|
let n = e.nodes(), a = !1;
|
|
165
|
-
for (const
|
|
166
|
-
const o = e.children(
|
|
165
|
+
for (const r of n) {
|
|
166
|
+
const o = e.children(r);
|
|
167
167
|
a = a || o.length > 0;
|
|
168
168
|
}
|
|
169
169
|
if (!a) {
|
|
170
|
-
|
|
170
|
+
i.debug("Done, no node has children", e.nodes());
|
|
171
171
|
return;
|
|
172
172
|
}
|
|
173
|
-
|
|
174
|
-
for (const
|
|
175
|
-
if (
|
|
173
|
+
i.debug("Nodes = ", n, t);
|
|
174
|
+
for (const r of n)
|
|
175
|
+
if (i.debug(
|
|
176
176
|
"Extracting node",
|
|
177
|
-
|
|
177
|
+
r,
|
|
178
178
|
d,
|
|
179
|
-
d.has(
|
|
180
|
-
!e.parent(
|
|
181
|
-
e.node(
|
|
179
|
+
d.has(r) && !d.get(r).externalConnections,
|
|
180
|
+
!e.parent(r),
|
|
181
|
+
e.node(r),
|
|
182
182
|
e.children("D"),
|
|
183
183
|
" Depth ",
|
|
184
184
|
t
|
|
185
|
-
), !d.has(
|
|
186
|
-
|
|
187
|
-
else if (!d.get(
|
|
188
|
-
|
|
185
|
+
), !d.has(r))
|
|
186
|
+
i.debug("Not a cluster", r, t);
|
|
187
|
+
else if (!d.get(r).externalConnections && e.children(r) && e.children(r).length > 0) {
|
|
188
|
+
i.warn(
|
|
189
189
|
"Cluster without external connections, without a parent and with children",
|
|
190
|
-
|
|
190
|
+
r,
|
|
191
191
|
t
|
|
192
192
|
);
|
|
193
193
|
let l = e.graph().rankdir === "TB" ? "LR" : "TB";
|
|
194
|
-
d.get(
|
|
194
|
+
d.get(r)?.clusterData?.dir && (l = d.get(r).clusterData.dir, i.warn("Fixing dir", d.get(r).clusterData.dir, l));
|
|
195
195
|
const u = new B({
|
|
196
196
|
multigraph: !0,
|
|
197
197
|
compound: !0
|
|
@@ -204,52 +204,52 @@ var d = /* @__PURE__ */ new Map(), y = /* @__PURE__ */ new Map(), J = /* @__PURE
|
|
|
204
204
|
}).setDefaultEdgeLabel(function() {
|
|
205
205
|
return {};
|
|
206
206
|
});
|
|
207
|
-
|
|
207
|
+
i.warn("Old graph before copy", h(e)), G(r, e, u, r), e.setNode(r, {
|
|
208
208
|
clusterNode: !0,
|
|
209
|
-
id:
|
|
210
|
-
clusterData: d.get(
|
|
211
|
-
label: d.get(
|
|
209
|
+
id: r,
|
|
210
|
+
clusterData: d.get(r).clusterData,
|
|
211
|
+
label: d.get(r).label,
|
|
212
212
|
graph: u
|
|
213
|
-
}),
|
|
213
|
+
}), i.warn("New graph after copy node: (", r, ")", h(u)), i.debug("Old graph after copy", h(e));
|
|
214
214
|
} else
|
|
215
|
-
|
|
215
|
+
i.warn(
|
|
216
216
|
"Cluster ** ",
|
|
217
|
-
|
|
217
|
+
r,
|
|
218
218
|
" **not meeting the criteria !externalConnections:",
|
|
219
|
-
!d.get(
|
|
219
|
+
!d.get(r).externalConnections,
|
|
220
220
|
" no parent: ",
|
|
221
|
-
!e.parent(
|
|
221
|
+
!e.parent(r),
|
|
222
222
|
" children ",
|
|
223
|
-
e.children(
|
|
223
|
+
e.children(r) && e.children(r).length > 0,
|
|
224
224
|
e.children("D"),
|
|
225
225
|
t
|
|
226
|
-
),
|
|
227
|
-
n = e.nodes(),
|
|
228
|
-
for (const
|
|
229
|
-
const o = e.node(
|
|
230
|
-
|
|
226
|
+
), i.debug(d);
|
|
227
|
+
n = e.nodes(), i.warn("New list of nodes", n);
|
|
228
|
+
for (const r of n) {
|
|
229
|
+
const o = e.node(r);
|
|
230
|
+
i.warn(" Now next level", r, o), o?.clusterNode && T(o.graph, t + 1);
|
|
231
231
|
}
|
|
232
232
|
}, "extractor"), M = /* @__PURE__ */ w((e, t) => {
|
|
233
233
|
if (t.length === 0)
|
|
234
234
|
return [];
|
|
235
235
|
let n = Object.assign([], t);
|
|
236
236
|
return t.forEach((a) => {
|
|
237
|
-
const
|
|
237
|
+
const r = e.children(a), o = M(e, r);
|
|
238
238
|
n = [...n, ...o];
|
|
239
239
|
}), n;
|
|
240
|
-
}, "sorter"), oe = /* @__PURE__ */ w((e) => M(e, e.children()), "sortNodesByHierarchy"), j = /* @__PURE__ */ w(async (e, t, n, a,
|
|
241
|
-
|
|
240
|
+
}, "sorter"), oe = /* @__PURE__ */ w((e) => M(e, e.children()), "sortNodesByHierarchy"), j = /* @__PURE__ */ w(async (e, t, n, a, r, o) => {
|
|
241
|
+
i.warn("Graph in recursive render:XAX", h(t), r);
|
|
242
242
|
const l = t.graph().rankdir;
|
|
243
|
-
|
|
243
|
+
i.trace("Dir in recursive render - dir:", l);
|
|
244
244
|
const u = e.insert("g").attr("class", "root");
|
|
245
|
-
t.nodes() ?
|
|
245
|
+
t.nodes() ? i.info("Recursive render XXX", t.nodes()) : i.info("No nodes found for", t), t.edges().length > 0 && i.info("Recursive edges", t.edge(t.edges()[0]));
|
|
246
246
|
const c = u.insert("g").attr("class", "clusters"), m = u.insert("g").attr("class", "edgePaths"), v = u.insert("g").attr("class", "edgeLabels"), X = u.insert("g").attr("class", "nodes");
|
|
247
247
|
await Promise.all(
|
|
248
248
|
t.nodes().map(async function(f) {
|
|
249
249
|
const s = t.node(f);
|
|
250
|
-
if (
|
|
251
|
-
const g = JSON.parse(JSON.stringify(
|
|
252
|
-
|
|
250
|
+
if (r !== void 0) {
|
|
251
|
+
const g = JSON.parse(JSON.stringify(r.clusterData));
|
|
252
|
+
i.trace(
|
|
253
253
|
`Setting data for parent cluster XXX
|
|
254
254
|
Node.id = `,
|
|
255
255
|
f,
|
|
@@ -258,11 +258,11 @@ var d = /* @__PURE__ */ new Map(), y = /* @__PURE__ */ new Map(), J = /* @__PURE
|
|
|
258
258
|
g.height,
|
|
259
259
|
`
|
|
260
260
|
Parent cluster`,
|
|
261
|
-
|
|
262
|
-
), t.setNode(
|
|
261
|
+
r.height
|
|
262
|
+
), t.setNode(r.id, g), t.parent(f) || (i.trace("Setting parent", f, r.id), t.setParent(f, r.id, g));
|
|
263
263
|
}
|
|
264
|
-
if (
|
|
265
|
-
|
|
264
|
+
if (i.info("(Insert) Node XXX" + f + ": " + JSON.stringify(t.node(f))), s?.clusterNode) {
|
|
265
|
+
i.info("Cluster identified XBX", f, s.width, t.node(f));
|
|
266
266
|
const { ranksep: g, nodesep: E } = t.graph();
|
|
267
267
|
s.graph.setGraph({
|
|
268
268
|
...s.graph.graph(),
|
|
@@ -277,7 +277,7 @@ Parent cluster`,
|
|
|
277
277
|
t.node(f),
|
|
278
278
|
o
|
|
279
279
|
), x = N.elem;
|
|
280
|
-
z(s, x), s.diff = N.diff || 0,
|
|
280
|
+
z(s, x), s.diff = N.diff || 0, i.info(
|
|
281
281
|
"New compound node after recursive render XAX",
|
|
282
282
|
f,
|
|
283
283
|
"width",
|
|
@@ -289,7 +289,7 @@ Parent cluster`,
|
|
|
289
289
|
// node.y
|
|
290
290
|
), U(x, s);
|
|
291
291
|
} else
|
|
292
|
-
t.children(f).length > 0 ? (
|
|
292
|
+
t.children(f).length > 0 ? (i.trace(
|
|
293
293
|
"Cluster - the non recursive path XBX",
|
|
294
294
|
f,
|
|
295
295
|
s.id,
|
|
@@ -297,12 +297,12 @@ Parent cluster`,
|
|
|
297
297
|
s.width,
|
|
298
298
|
"Graph:",
|
|
299
299
|
t
|
|
300
|
-
),
|
|
300
|
+
), i.trace(C(s.id, t)), d.set(s.id, { id: C(s.id, t), node: s })) : (i.trace("Node - the non recursive path XAX", f, X, t.node(f), l), await $(X, t.node(f), { config: o, dir: l }));
|
|
301
301
|
})
|
|
302
302
|
), await (/* @__PURE__ */ w(async () => {
|
|
303
303
|
const f = t.edges().map(async function(s) {
|
|
304
304
|
const g = t.edge(s.v, s.w, s.name);
|
|
305
|
-
|
|
305
|
+
i.info("Edge " + s.v + " -> " + s.w + ": " + JSON.stringify(s)), i.info("Edge " + s.v + " -> " + s.w + ": ", s, " ", JSON.stringify(t.edge(s))), i.info(
|
|
306
306
|
"Fix",
|
|
307
307
|
d,
|
|
308
308
|
"ids:",
|
|
@@ -314,12 +314,12 @@ Parent cluster`,
|
|
|
314
314
|
), await Z(v, g);
|
|
315
315
|
});
|
|
316
316
|
await Promise.all(f);
|
|
317
|
-
}, "processEdges"))(),
|
|
317
|
+
}, "processEdges"))(), i.info("Graph before layout:", JSON.stringify(h(t))), i.info("############################################# XXX"), i.info("### Layout ### XXX"), i.info("############################################# XXX"), I(t), i.info("Graph after layout:", JSON.stringify(h(t)));
|
|
318
318
|
let O = 0, { subGraphTitleTotalMargin: S } = q(o);
|
|
319
319
|
return await Promise.all(
|
|
320
320
|
oe(t).map(async function(f) {
|
|
321
321
|
const s = t.node(f);
|
|
322
|
-
if (
|
|
322
|
+
if (i.info(
|
|
323
323
|
"Position XBX => " + f + ": (" + s.x,
|
|
324
324
|
"," + s.y,
|
|
325
325
|
") width: ",
|
|
@@ -327,7 +327,7 @@ Parent cluster`,
|
|
|
327
327
|
" height: ",
|
|
328
328
|
s.height
|
|
329
329
|
), s?.clusterNode)
|
|
330
|
-
s.y += S,
|
|
330
|
+
s.y += S, i.info(
|
|
331
331
|
"A tainted cluster node XBX1",
|
|
332
332
|
f,
|
|
333
333
|
s.id,
|
|
@@ -338,7 +338,7 @@ Parent cluster`,
|
|
|
338
338
|
t.parent(f)
|
|
339
339
|
), d.get(s.id).node = s, P(s);
|
|
340
340
|
else if (t.children(f).length > 0) {
|
|
341
|
-
|
|
341
|
+
i.info(
|
|
342
342
|
"A pure cluster node XBX1",
|
|
343
343
|
f,
|
|
344
344
|
s.id,
|
|
@@ -349,10 +349,10 @@ Parent cluster`,
|
|
|
349
349
|
t.parent(f)
|
|
350
350
|
), s.height += S, t.node(s.parentId);
|
|
351
351
|
const g = s?.padding / 2 || 0, E = s?.labelBBox?.height || 0, N = E - g || 0;
|
|
352
|
-
|
|
352
|
+
i.debug("OffsetY", N, "labelHeight", E, "halfPadding", g), await K(c, s), d.get(s.id).node = s;
|
|
353
353
|
} else {
|
|
354
354
|
const g = t.node(s.parentId);
|
|
355
|
-
s.y += S / 2,
|
|
355
|
+
s.y += S / 2, i.info(
|
|
356
356
|
"A regular node XBX1 - using the padding",
|
|
357
357
|
s.id,
|
|
358
358
|
"parent",
|
|
@@ -372,15 +372,15 @@ Parent cluster`,
|
|
|
372
372
|
})
|
|
373
373
|
), t.edges().forEach(function(f) {
|
|
374
374
|
const s = t.edge(f);
|
|
375
|
-
|
|
375
|
+
i.info("Edge " + f.v + " -> " + f.w + ": " + JSON.stringify(s), s), s.points.forEach((x) => x.y += S / 2);
|
|
376
376
|
const g = t.node(f.v);
|
|
377
377
|
var E = t.node(f.w);
|
|
378
378
|
const N = Q(m, s, d, n, g, E, a);
|
|
379
379
|
W(s, N);
|
|
380
380
|
}), t.nodes().forEach(function(f) {
|
|
381
381
|
const s = t.node(f);
|
|
382
|
-
|
|
383
|
-
}),
|
|
382
|
+
i.info(f, s.type, s.diff), s.isGroup && (O = s.diff);
|
|
383
|
+
}), i.warn("Returning from recursive render XAX", u, O), { elem: u, diff: O };
|
|
384
384
|
}, "recursiveRender"), ge = /* @__PURE__ */ w(async (e, t) => {
|
|
385
385
|
const n = new B({
|
|
386
386
|
multigraph: !0,
|
|
@@ -396,7 +396,7 @@ Parent cluster`,
|
|
|
396
396
|
}), a = t.select("g");
|
|
397
397
|
F(a, e.markers, e.type, e.diagramId), Y(), _(), H(), te(), e.nodes.forEach((o) => {
|
|
398
398
|
n.setNode(o.id, { ...o }), o.parentId && n.setParent(o.id, o.parentId);
|
|
399
|
-
}),
|
|
399
|
+
}), i.debug("Edges:", e.edges), e.edges.forEach((o) => {
|
|
400
400
|
if (o.start === o.end) {
|
|
401
401
|
const l = o.start, u = l + "---" + l + "---1", c = l + "---" + l + "---2", m = n.node(l);
|
|
402
402
|
n.setNode(u, {
|
|
@@ -428,15 +428,15 @@ Parent cluster`,
|
|
|
428
428
|
v.label = "", v.arrowTypeEnd = "none", v.id = l + "-cyclic-special-1", X.arrowTypeStart = "none", X.arrowTypeEnd = "none", X.id = l + "-cyclic-special-mid", p.label = "", m.isGroup && (v.fromCluster = l, p.toCluster = l), p.id = l + "-cyclic-special-2", p.arrowTypeStart = "none", n.setEdge(l, u, v, l + "-cyclic-special-0"), n.setEdge(u, c, X, l + "-cyclic-special-1"), n.setEdge(c, l, p, l + "-cyc<lic-special-2");
|
|
429
429
|
} else
|
|
430
430
|
n.setEdge(o.start, o.end, { ...o }, o.id);
|
|
431
|
-
}),
|
|
432
|
-
const
|
|
431
|
+
}), i.warn("Graph at first:", JSON.stringify(h(n))), re(n), i.warn("Graph after XAX:", JSON.stringify(h(n)));
|
|
432
|
+
const r = V();
|
|
433
433
|
await j(
|
|
434
434
|
a,
|
|
435
435
|
n,
|
|
436
436
|
e.type,
|
|
437
437
|
e.diagramId,
|
|
438
438
|
void 0,
|
|
439
|
-
|
|
439
|
+
r
|
|
440
440
|
);
|
|
441
441
|
}, "render");
|
|
442
442
|
export {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { p as Ce } from "./chunk-
|
|
4
|
-
import { p as Te } from "./mermaid-parser.core-
|
|
1
|
+
import { _ as w, D as te, E as ae, H as he, e as ue, l as K, a$ as P, d as Y, b as pe, a as fe, p as ge, q as me, g as ye, s as Se, F as ve, b0 as xe, y as be } from "./index-JAUwzcHq.js";
|
|
2
|
+
import { s as we } from "./chunk-QN33PNHL-DfPMtcCm.js";
|
|
3
|
+
import { p as Ce } from "./chunk-4BX2VUAB-B3NOuiDi.js";
|
|
4
|
+
import { p as Te } from "./mermaid-parser.core-DX0wl6-K.js";
|
|
5
5
|
import { b as O } from "./defaultLocale-D7EN2tov.js";
|
|
6
6
|
import { o as J } from "./ordinal-DfAQgscy.js";
|
|
7
7
|
function Le(t) {
|
|
@@ -97,10 +97,10 @@ function* Re() {
|
|
|
97
97
|
}
|
|
98
98
|
function Q(t, a) {
|
|
99
99
|
t instanceof Map ? (t = [void 0, t], a === void 0 && (a = Ie)) : a === void 0 && (a = He);
|
|
100
|
-
for (var l = new
|
|
100
|
+
for (var l = new U(t), n, o = [l], s, d, h, g; n = o.pop(); )
|
|
101
101
|
if ((d = a(n.data)) && (g = (d = Array.from(d)).length))
|
|
102
102
|
for (n.children = d, h = g - 1; h >= 0; --h)
|
|
103
|
-
o.push(s = d[h] = new
|
|
103
|
+
o.push(s = d[h] = new U(d[h])), s.parent = n, s.depth = n.depth + 1;
|
|
104
104
|
return l.eachBefore(qe);
|
|
105
105
|
}
|
|
106
106
|
function We() {
|
|
@@ -121,11 +121,11 @@ function qe(t) {
|
|
|
121
121
|
t.height = a;
|
|
122
122
|
while ((t = t.parent) && t.height < ++a);
|
|
123
123
|
}
|
|
124
|
-
function
|
|
124
|
+
function U(t) {
|
|
125
125
|
this.data = t, this.depth = this.height = 0, this.parent = null;
|
|
126
126
|
}
|
|
127
|
-
|
|
128
|
-
constructor:
|
|
127
|
+
U.prototype = Q.prototype = {
|
|
128
|
+
constructor: U,
|
|
129
129
|
count: $e,
|
|
130
130
|
each: Ae,
|
|
131
131
|
eachAfter: ke,
|
|
@@ -164,8 +164,8 @@ function Ye(t, a, l, n, o) {
|
|
|
164
164
|
for (var s = t.children, d, h = -1, g = s.length, c = t.value && (o - l) / t.value; ++h < g; )
|
|
165
165
|
d = s[h], d.x0 = a, d.x1 = n, d.y0 = l, d.y1 = l += d.value * c;
|
|
166
166
|
}
|
|
167
|
-
var
|
|
168
|
-
function
|
|
167
|
+
var Ue = (1 + Math.sqrt(5)) / 2;
|
|
168
|
+
function Ze(t, a, l, n, o, s) {
|
|
169
169
|
for (var d = [], h = a.children, g, c, u = 0, b = 0, r = h.length, x, S, v = a.value, p, m, N, k, V, R, M; u < r; ) {
|
|
170
170
|
x = o - l, S = s - n;
|
|
171
171
|
do
|
|
@@ -184,12 +184,12 @@ function Ue(t, a, l, n, o, s) {
|
|
|
184
184
|
}
|
|
185
185
|
const Je = function t(a) {
|
|
186
186
|
function l(n, o, s, d, h) {
|
|
187
|
-
|
|
187
|
+
Ze(a, n, o, s, d, h);
|
|
188
188
|
}
|
|
189
189
|
return l.ratio = function(n) {
|
|
190
190
|
return t((n = +n) > 1 ? n : 1);
|
|
191
191
|
}, l;
|
|
192
|
-
}(
|
|
192
|
+
}(Ue);
|
|
193
193
|
function Ke() {
|
|
194
194
|
var t = Je, a = !1, l = 1, n = 1, o = [0], s = q, d = q, h = q, g = q, c = q;
|
|
195
195
|
function u(r) {
|
|
@@ -223,13 +223,13 @@ function Ke() {
|
|
|
223
223
|
}
|
|
224
224
|
var E, ne = (E = class {
|
|
225
225
|
constructor() {
|
|
226
|
-
this.nodes = [], this.levels = /* @__PURE__ */ new Map(), this.outerNodes = [], this.classes = /* @__PURE__ */ new Map(), this.setAccTitle =
|
|
226
|
+
this.nodes = [], this.levels = /* @__PURE__ */ new Map(), this.outerNodes = [], this.classes = /* @__PURE__ */ new Map(), this.setAccTitle = pe, this.getAccTitle = fe, this.setDiagramTitle = ge, this.getDiagramTitle = me, this.getAccDescription = ye, this.setAccDescription = Se;
|
|
227
227
|
}
|
|
228
228
|
getNodes() {
|
|
229
229
|
return this.nodes;
|
|
230
230
|
}
|
|
231
231
|
getConfig() {
|
|
232
|
-
const a =
|
|
232
|
+
const a = ve, l = ae();
|
|
233
233
|
return te({
|
|
234
234
|
...a.treemap,
|
|
235
235
|
...l.treemap ?? {}
|
|
@@ -244,7 +244,7 @@ var E, ne = (E = class {
|
|
|
244
244
|
addClass(a, l) {
|
|
245
245
|
const n = this.classes.get(a) ?? { id: a, styles: [], textStyles: [] }, o = l.replace(/\\,/g, "§§§").replace(/,/g, ";").replace(/§§§/g, ",").split(";");
|
|
246
246
|
o && o.forEach((s) => {
|
|
247
|
-
|
|
247
|
+
xe(s) && (n?.textStyles ? n.textStyles.push(s) : n.textStyles = [s]), n?.styles ? n.styles.push(s) : n.styles = [s];
|
|
248
248
|
}), this.classes.set(a, n);
|
|
249
249
|
}
|
|
250
250
|
getClasses() {
|
|
@@ -254,7 +254,7 @@ var E, ne = (E = class {
|
|
|
254
254
|
return this.classes.get(a)?.styles ?? [];
|
|
255
255
|
}
|
|
256
256
|
clear() {
|
|
257
|
-
|
|
257
|
+
be(), this.nodes = [], this.levels = /* @__PURE__ */ new Map(), this.outerNodes = [], this.classes = /* @__PURE__ */ new Map(), this.root = void 0;
|
|
258
258
|
}
|
|
259
259
|
}, w(E, "TreeMapDB"), E);
|
|
260
260
|
function le(t) {
|
|
@@ -323,8 +323,8 @@ var Qe = /* @__PURE__ */ w((t, a) => {
|
|
|
323
323
|
const o = n.db, s = o.getConfig(), d = s.padding ?? tt, h = o.getDiagramTitle(), g = o.getRoot(), { themeVariables: c } = ae();
|
|
324
324
|
if (!g)
|
|
325
325
|
return;
|
|
326
|
-
const u = h ? 30 : 0, b =
|
|
327
|
-
b.attr("viewBox", `0 0 ${S} ${v}`),
|
|
326
|
+
const u = h ? 30 : 0, b = he(a), r = s.nodeWidth ? s.nodeWidth * B : 960, x = s.nodeHeight ? s.nodeHeight * B : 500, S = r, v = x + u;
|
|
327
|
+
b.attr("viewBox", `0 0 ${S} ${v}`), ue(b, v, S, s.useMaxWidth);
|
|
328
328
|
let p;
|
|
329
329
|
try {
|
|
330
330
|
const e = s.valueFormat || ",";
|
|
@@ -441,12 +441,12 @@ var Qe = /* @__PURE__ */ w((t, a) => {
|
|
|
441
441
|
let I = Math.max(
|
|
442
442
|
z,
|
|
443
443
|
Math.min(T, Math.round(y * L))
|
|
444
|
-
),
|
|
445
|
-
for (;
|
|
444
|
+
), Z = y + H + I;
|
|
445
|
+
for (; Z > F && y > _ && (y--, I = Math.max(
|
|
446
446
|
z,
|
|
447
447
|
Math.min(T, Math.round(y * L))
|
|
448
448
|
), !(I < z && y === _)); )
|
|
449
|
-
i.style("font-size", `${y}px`),
|
|
449
|
+
i.style("font-size", `${y}px`), Z = y + H + I;
|
|
450
450
|
i.style("font-size", `${y}px`), ($.getComputedTextLength() > D || y < _ || F < y) && i.style("display", "none");
|
|
451
451
|
}), s.showValues !== !1 && j.append("text").attr("class", "treemapValue").attr("x", (i) => (i.x1 - i.x0) / 2).attr("y", function(i) {
|
|
452
452
|
return (i.y1 - i.y0) / 2;
|
|
@@ -475,7 +475,7 @@ var Qe = /* @__PURE__ */ w((t, a) => {
|
|
|
475
475
|
f.node().getComputedTextLength() > de || z + T > ce || T < y ? f.style("display", "none") : f.style("display", null);
|
|
476
476
|
});
|
|
477
477
|
const oe = s.diagramPadding ?? 8;
|
|
478
|
-
|
|
478
|
+
we(b, oe, "flowchart", s?.useMaxWidth || !1);
|
|
479
479
|
}, "draw"), nt = /* @__PURE__ */ w(function(t, a) {
|
|
480
480
|
return a.db.getClasses();
|
|
481
481
|
}, "getClasses"), lt = { draw: at, getClasses: nt }, rt = {
|