@omg-dev/app 0.5.1 → 0.6.2

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.
Files changed (114) hide show
  1. package/dist-lib/{ChangelogPage-BzsTWlhq.js → ChangelogPage-CirRyMnC.js} +54 -1
  2. package/dist-lib/{File-B-qYa2zY.js → File-DQRr5F_e.js} +1761 -1826
  3. package/dist-lib/FileEditor-BrI3dfcp.js +6895 -0
  4. package/dist-lib/FileTreePane-J8P-OiHb.js +8413 -0
  5. package/dist-lib/{FileViewer-Clmf04v1.js → FileViewer-DRrfus7c.js} +1 -1
  6. package/dist-lib/{SessionFilesPanel-K4lGGdJ4.js → SessionFilesPanel-W4QKB0HL.js} +64 -64
  7. package/dist-lib/{TermView-CWr-zJmM.js → TermView-CoD-VkHs.js} +495 -520
  8. package/dist-lib/{abnfDiagram-VRR7QNED-Chn1Z_p9.js → abnfDiagram-VRR7QNED-CiXfOnAu.js} +4 -4
  9. package/dist-lib/{arc-B652oHQ-.js → arc-QOMNKQA5.js} +1 -1
  10. package/dist-lib/{architectureDiagram-ZJ3FMSHR-CMatArpz.js → architectureDiagram-ZJ3FMSHR-BcFBTmfD.js} +2059 -2064
  11. package/dist-lib/{blockDiagram-677ZJIJ3-CEOPfI9A.js → blockDiagram-677ZJIJ3-Qj8-RIV3.js} +920 -925
  12. package/dist-lib/{c4Diagram-LMCZKHZV-DcUHrESL.js → c4Diagram-LMCZKHZV-BpinEmj4.js} +598 -593
  13. package/dist-lib/{channel-B5lJFbed.js → channel-D6YHMmF7.js} +1 -1
  14. package/dist-lib/{chat-engine-P0yDhFOX.js → chat-engine-CRzDKNTH.js} +1173 -1218
  15. package/dist-lib/chunk-2Q5K7J3B-CFSi414U.js +18 -0
  16. package/dist-lib/{chunk-32BRIVSS-IYmNSvH8.js → chunk-32BRIVSS-DvywQiCk.js} +1 -1
  17. package/dist-lib/{chunk-5VM5RSS4-DO2g-xIj.js → chunk-5VM5RSS4-xd6XuI9Q.js} +1 -1
  18. package/dist-lib/{chunk-BO2N2NFS-kYiI5SD9.js → chunk-BO2N2NFS-BbJdm-59.js} +4892 -4903
  19. package/dist-lib/{chunk-EX3LRPZG-N96wfks9.js → chunk-EX3LRPZG-BLDKx-Yg.js} +507 -514
  20. package/dist-lib/chunk-JWPE2WC7-DnwG7Xzp.js +8 -0
  21. package/dist-lib/chunk-MOJQB5TN-BrENeFT5.js +670 -0
  22. package/dist-lib/chunk-RYQCIY6F-I-J4fVFd.js +313 -0
  23. package/dist-lib/{chunk-V7JOEXUC-DQwf2vkP.js → chunk-V7JOEXUC-Bkakcs1-.js} +458 -453
  24. package/dist-lib/chunk-VR4S4FIN-BDq3jZ0m.js +19 -0
  25. package/dist-lib/{chunk-XXDRQBXY-Ccv4aRcn.js → chunk-XXDRQBXY-DRKeYnrF.js} +1 -1
  26. package/dist-lib/{classDiagram-v2-EOCWNBFH-DOn-rhuL.js → classDiagram-OUVF2IWQ-DISUfvR5.js} +2 -2
  27. package/dist-lib/{classDiagram-OUVF2IWQ-DOn-rhuL.js → classDiagram-v2-EOCWNBFH-DISUfvR5.js} +2 -2
  28. package/dist-lib/{coding-agents-page-DCafIpWL.js → coding-agents-page-OER8HHRF.js} +152 -131
  29. package/dist-lib/computer-page-D9cSNLa9.js +8990 -0
  30. package/dist-lib/{cose-bilkent-JH36ORCC-C-tACTrT.js → cose-bilkent-JH36ORCC-DCfmoChv.js} +281 -281
  31. package/dist-lib/{create-BrnHvSDE.js → create-CBk9uwJH.js} +2 -2
  32. package/dist-lib/cynefin-VYW2F7L2-XAY3mHv8.js +24430 -0
  33. package/dist-lib/{cynefinDiagram-TSTJHNR4-Be7CamD2.js → cynefinDiagram-TSTJHNR4-CrgvPEr1.js} +3 -3
  34. package/dist-lib/{cytoscape.esm-B0ledd6M.js → cytoscape.esm-BB6Ga9He.js} +3 -3
  35. package/dist-lib/dagre-VKFMJZFB-CE5k06mJ.js +343 -0
  36. package/dist-lib/{diagram-FQU43EPY-Jg12ow4Z.js → diagram-FQU43EPY-gOcCiJEN.js} +136 -139
  37. package/dist-lib/diagram-G47NLZAW-BVJLfRsd.js +531 -0
  38. package/dist-lib/diagram-NH7WQ7WH-u6QnHasL.js +145 -0
  39. package/dist-lib/diagram-OA4YK3LP-D4Kcl3uM.js +350 -0
  40. package/dist-lib/{diagram-WEI45ONY-D1kKPOc_.js → diagram-WEI45ONY-6a__oIb0.js} +38 -42
  41. package/dist-lib/{ebnfDiagram-CCIWWBDH-BhQWrGMc.js → ebnfDiagram-CCIWWBDH-PXSrB6lG.js} +4 -4
  42. package/dist-lib/{embedded-CLYU5z7h.js → embedded-DqTPdMCh.js} +10561 -10581
  43. package/dist-lib/{engine-compile-BeDRSL6Y.js → engine-compile-D_stzVMa.js} +2939 -2991
  44. package/dist-lib/{erDiagram-Q63AITRT-D2q6Nmwa.js → erDiagram-Q63AITRT-BbsttUCs.js} +286 -284
  45. package/dist-lib/flowDiagram-23GEKE2U-CX5x3zVA.js +1641 -0
  46. package/dist-lib/{ganttDiagram-NO4QXBWP-C_Lj-cJB.js → ganttDiagram-NO4QXBWP-Bq0aSPs8.js} +2 -2
  47. package/dist-lib/gitGraphDiagram-IHSO6WYX-BjAezjIv.js +815 -0
  48. package/dist-lib/{graph-B68L3K2T.js → graph-DAHC4kPm.js} +2 -2
  49. package/dist-lib/{highlighted-body-OFNGDK62-C2DGVKV8.js → highlighted-body-OFNGDK62-DWhG_ijx.js} +1 -1
  50. package/dist-lib/index-B0neMIbR.js +16520 -0
  51. package/dist-lib/index-BBC0E3Qg.js +4994 -0
  52. package/dist-lib/{index-Dtkd4mEk.js → index-CE7H8LiZ.js} +2 -2
  53. package/dist-lib/{index-DWkBvb-9.js → index-FgVvPpIY.js} +2 -2
  54. package/dist-lib/index.js +1 -1
  55. package/dist-lib/{infoDiagram-FWYZ7A6U-BbUkT0KS.js → infoDiagram-FWYZ7A6U-Bo_FNR91.js} +2 -2
  56. package/dist-lib/ishikawaDiagram-FXEZZL3T-C5bGD-Eb.js +624 -0
  57. package/dist-lib/{journeyDiagram-5HDEW3XC-CgykmVSC.js → journeyDiagram-5HDEW3XC-C8qM7SxF.js} +4 -4
  58. package/dist-lib/kanban-definition-HUTT4EX6-C-EK5Puz.js +724 -0
  59. package/dist-lib/{katex-jHfnQmlp.js → katex-DoRnZ_sp.js} +1 -1
  60. package/dist-lib/keyboard-Yfa1ETse.js +21 -0
  61. package/dist-lib/{layout-BGrtsiRL.js → layout-DBbo_M5I.js} +2 -2
  62. package/dist-lib/{linear-B5ZSwawJ.js → linear-zGzX0-I0.js} +1 -1
  63. package/dist-lib/{map-hbfFlSln.js → map-DRdzG8Ho.js} +1 -1
  64. package/dist-lib/mermaid-GHXKKRXX-hOE9C3qW.js +4 -0
  65. package/dist-lib/{mindmap-definition-LN4V7U3C-CfhfeEht.js → mindmap-definition-LN4V7U3C-DlVCRx6k.js} +310 -311
  66. package/dist-lib/{pegDiagram-2B236MQR-CYDAJHPF.js → pegDiagram-2B236MQR-DrKNikeG.js} +4 -4
  67. package/dist-lib/{pieDiagram-ENE6RG2P-udKxQm4p.js → pieDiagram-ENE6RG2P-Fm_jc0HL.js} +83 -84
  68. package/dist-lib/quadrantDiagram-ABIIQ3AL-zDRY0VtB.js +1029 -0
  69. package/dist-lib/{railroadDiagram-RFXS5EU6-q0Svkmuy.js → railroadDiagram-RFXS5EU6-BQuFX39y.js} +4 -4
  70. package/dist-lib/{requirementDiagram-TGXJPOKE-tNxRI1gc.js → requirementDiagram-TGXJPOKE-BWwBQZXn.js} +269 -268
  71. package/dist-lib/{resume-session-sheet-CHwpwguS.js → resume-session-sheet-bjDJmwq6.js} +2 -3
  72. package/dist-lib/sankeyDiagram-HTMAVEWB-BjRyuB6L.js +859 -0
  73. package/dist-lib/{sequenceDiagram-DBY2YBRQ-Dvl2_CXL.js → sequenceDiagram-DBY2YBRQ-69pcw_2M.js} +892 -899
  74. package/dist-lib/{session-token-usage-BUz6b-IB.js → session-token-usage-D2zDt9P7.js} +82 -83
  75. package/dist-lib/{shadow-text-size-CBCTdbYU.js → shadow-text-size-smWA4wIU.js} +1 -2
  76. package/dist-lib/{shipped-page-CXy85bsL.js → shipped-page-Cr7dCCc2.js} +232 -235
  77. package/dist-lib/sizeCapture-X5ZJPWSS-DqkV8s1N.js +46 -0
  78. package/dist-lib/{stateDiagram-2N3HPSRC-CnWB7HvU.js → stateDiagram-2N3HPSRC-0vE3REl_.js} +4 -4
  79. package/dist-lib/{stateDiagram-v2-6OUMAXLB-DnZ0UI2p.js → stateDiagram-v2-6OUMAXLB-u_56Obsh.js} +2 -2
  80. package/dist-lib/{streamdown-response-CUB9sK6V.js → streamdown-response-Qq9_RgFv.js} +290 -297
  81. package/dist-lib/styles.css +1 -1
  82. package/dist-lib/swimlanes-5IMT3BWC-H0raIBd1.js +5332 -0
  83. package/dist-lib/{swimlanesDiagram-G3AALYLV-CKyOeqF_.js → swimlanesDiagram-G3AALYLV-By52HaDu.js} +2 -2
  84. package/dist-lib/timeline-definition-FHXFAJF6-h1LLYUQk.js +1055 -0
  85. package/dist-lib/vennDiagram-L72KCM5P-B4wDw_Kh.js +1578 -0
  86. package/dist-lib/wardleyDiagram-EHGQE667-DLMBGiwD.js +678 -0
  87. package/dist-lib/{xychartDiagram-FW5EYKEG-m3s7caPv.js → xychartDiagram-FW5EYKEG-BHvf5Noj.js} +526 -496
  88. package/package.json +4 -3
  89. package/dist-lib/FileEditor-BIz0qCyW.js +0 -6892
  90. package/dist-lib/FileTreePane-BG2k7gTc.js +0 -8422
  91. package/dist-lib/chunk-2Q5K7J3B-Ex8Ly28R.js +0 -15
  92. package/dist-lib/chunk-JWPE2WC7-DFPBClX_.js +0 -9
  93. package/dist-lib/chunk-MOJQB5TN-dusfI9ob.js +0 -664
  94. package/dist-lib/chunk-RYQCIY6F-fkeERzIG.js +0 -315
  95. package/dist-lib/chunk-VR4S4FIN-hOZG7eF3.js +0 -20
  96. package/dist-lib/cynefin-VYW2F7L2-DQXPWaog.js +0 -23853
  97. package/dist-lib/dagre-VKFMJZFB-BhCjK7XQ.js +0 -346
  98. package/dist-lib/diagram-G47NLZAW-C3_z2t6T.js +0 -530
  99. package/dist-lib/diagram-NH7WQ7WH-DUdK08IT.js +0 -143
  100. package/dist-lib/diagram-OA4YK3LP-TUUyRYY3.js +0 -353
  101. package/dist-lib/flowDiagram-23GEKE2U-DU3S3biU.js +0 -1645
  102. package/dist-lib/gitGraphDiagram-IHSO6WYX-CvGu0XAR.js +0 -828
  103. package/dist-lib/index-DcwavxA1.js +0 -5062
  104. package/dist-lib/index-JkCQXUYs.js +0 -16566
  105. package/dist-lib/ishikawaDiagram-FXEZZL3T-D_Y6Tuyb.js +0 -622
  106. package/dist-lib/kanban-definition-HUTT4EX6-CPFLTskY.js +0 -726
  107. package/dist-lib/mermaid-GHXKKRXX-Ox_2d3uB.js +0 -4
  108. package/dist-lib/quadrantDiagram-ABIIQ3AL-BmDmLczk.js +0 -1025
  109. package/dist-lib/sankeyDiagram-HTMAVEWB-B9Bl7f2P.js +0 -847
  110. package/dist-lib/sizeCapture-X5ZJPWSS-B1EeO3N9.js +0 -47
  111. package/dist-lib/swimlanes-5IMT3BWC-CvqDJcS9.js +0 -5353
  112. package/dist-lib/timeline-definition-FHXFAJF6-b15X0Oru.js +0 -1066
  113. package/dist-lib/vennDiagram-L72KCM5P-C4lh5m77.js +0 -1585
  114. package/dist-lib/wardleyDiagram-EHGQE667-Cev6fT_D.js +0 -684
@@ -0,0 +1,313 @@
1
+ import { _ as u, l as i } from "./index-B0neMIbR.js";
2
+ import { i as m, G as y } from "./graph-DAHC4kPm.js";
3
+ import { b as _, m as X } from "./map-DRdzG8Ho.js";
4
+ var j = 4;
5
+ function p(e) {
6
+ return _(e, j);
7
+ }
8
+ function C(e) {
9
+ var r = {
10
+ options: {
11
+ directed: e.isDirected(),
12
+ multigraph: e.isMultigraph(),
13
+ compound: e.isCompound()
14
+ },
15
+ nodes: F(e),
16
+ edges: M(e)
17
+ };
18
+ return m(e.graph()) || (r.value = p(e.graph())), r;
19
+ }
20
+ function F(e) {
21
+ return X(e.nodes(), function(r) {
22
+ var n = e.node(r), s = e.parent(r), t = { v: r };
23
+ return m(n) || (t.value = n), m(s) || (t.parent = s), t;
24
+ });
25
+ }
26
+ function M(e) {
27
+ return X(e.edges(), function(r) {
28
+ var n = e.edge(r), s = { v: r.v, w: r.w };
29
+ return m(r.name) || (s.name = r.name), m(n) || (s.value = n), s;
30
+ });
31
+ }
32
+ var c = /* @__PURE__ */ new Map(), w = /* @__PURE__ */ new Map(), A = /* @__PURE__ */ new Map(), J = /* @__PURE__ */ u(() => {
33
+ w.clear(), A.clear(), c.clear();
34
+ }, "clear"), v = /* @__PURE__ */ u((e, r) => {
35
+ const n = w.get(r) || [];
36
+ return i.trace("In isDescendant", r, " ", e, " = ", n.includes(e)), n.includes(e);
37
+ }, "isDescendant"), R = /* @__PURE__ */ u((e, r) => {
38
+ const n = w.get(r) || [];
39
+ return i.info("Descendants of ", r, " is ", n), i.info("Edge is ", e), e.v === r || e.w === r ? !1 : n ? n.includes(e.v) || v(e.v, r) || v(e.w, r) || n.includes(e.w) : (i.debug("Tilt, ", r, ",not in descendants"), !1);
40
+ }, "edgeInCluster"), b = /* @__PURE__ */ u((e, r, n, s) => {
41
+ i.warn(
42
+ "Copying children of ",
43
+ e,
44
+ "root",
45
+ s,
46
+ "data",
47
+ r.node(e),
48
+ s
49
+ );
50
+ const t = r.children(e) || [];
51
+ e !== s && t.push(e), i.warn("Copying (nodes) clusterId", e, "nodes", t), t.forEach((o) => {
52
+ if (r.children(o).length > 0)
53
+ b(o, r, n, s);
54
+ else {
55
+ const l = r.node(o);
56
+ i.info("cp ", o, " to ", s, " with parent ", e), n.setNode(o, l), s !== r.parent(o) && (i.warn("Setting parent", o, r.parent(o)), n.setParent(o, r.parent(o))), e !== s && o !== e ? (i.debug("Setting parent", o, e), n.setParent(o, e)) : (i.info("In copy ", e, "root", s, "data", r.node(e), s), i.debug(
57
+ "Not Setting parent for node=",
58
+ o,
59
+ "cluster!==rootId",
60
+ e !== s,
61
+ "node!==clusterId",
62
+ o !== e
63
+ ));
64
+ const f = r.edges(o);
65
+ i.debug("Copying Edges", f), f.forEach((a) => {
66
+ i.info("Edge", a);
67
+ const d = r.edge(a.v, a.w, a.name);
68
+ i.info("Edge data", d, s);
69
+ try {
70
+ if (R(a, s)) {
71
+ const g = w.get(s) || [], E = g.includes(a.v) || v(a.v, s) || a.v === s, x = g.includes(a.w) || v(a.w, s) || a.w === s;
72
+ if (E && x)
73
+ i.info("Copying as ", a.v, a.w, d, a.name), n.setEdge(a.v, a.w, d, a.name), i.info("newGraph edges ", n.edges(), n.edge(n.edges()[0]));
74
+ else {
75
+ const N = E ? s : a.v, h = x ? s : a.w;
76
+ i.info("Rebinding cross-boundary edge as ", N, h, d, a.name), r.setEdge(N, h, d, a.name);
77
+ }
78
+ } else
79
+ i.info(
80
+ "Skipping copy of edge ",
81
+ a.v,
82
+ "-->",
83
+ a.w,
84
+ " rootId: ",
85
+ s,
86
+ " clusterId:",
87
+ e
88
+ );
89
+ } catch (g) {
90
+ i.error(g);
91
+ }
92
+ });
93
+ }
94
+ i.debug("Removing node", o), r.removeNode(o);
95
+ });
96
+ }, "copy"), O = /* @__PURE__ */ u((e, r) => {
97
+ const n = r.children(e);
98
+ let s = [...n];
99
+ for (const t of n)
100
+ A.set(t, e), s = [...s, ...O(t, r)];
101
+ return s;
102
+ }, "extractDescendants"), P = /* @__PURE__ */ u((e, r, n) => {
103
+ const s = e.edges().filter((a) => a.v === r || a.w === r), t = e.edges().filter((a) => a.v === n || a.w === n), o = s.map((a) => ({ v: a.v === r ? n : a.v, w: a.w === r ? r : a.w })), l = t.map((a) => ({ v: a.v, w: a.w }));
104
+ return o.filter((a) => l.some((d) => a.v === d.v && a.w === d.w));
105
+ }, "findCommonEdges"), D = /* @__PURE__ */ u((e, r, n) => {
106
+ const s = r.children(e);
107
+ if (i.trace("Searching children of id ", e, s), s.length < 1)
108
+ return e;
109
+ let t;
110
+ for (const o of s) {
111
+ const l = D(o, r, n), f = P(r, n, l);
112
+ if (l)
113
+ if (f.length > 0)
114
+ t = l;
115
+ else
116
+ return l;
117
+ }
118
+ return t;
119
+ }, "findNonClusterChild"), S = /* @__PURE__ */ u((e) => !c.has(e) || !c.get(e).externalConnections ? e : c.has(e) ? c.get(e).id : e, "getAnchorId"), U = /* @__PURE__ */ u((e, r) => {
120
+ if (!e || r > 10) {
121
+ i.debug("Opting out, no graph ");
122
+ return;
123
+ } else
124
+ i.debug("Opting in, graph ");
125
+ e.nodes().forEach(function(n) {
126
+ e.children(n).length > 0 && (i.warn(
127
+ "Cluster identified",
128
+ n,
129
+ " Replacement id in edges: ",
130
+ D(n, e, n)
131
+ ), w.set(n, O(n, e)), c.set(n, { id: D(n, e, n), clusterData: e.node(n) }));
132
+ }), e.nodes().forEach(function(n) {
133
+ const s = e.children(n), t = e.edges();
134
+ s.length > 0 ? (i.debug("Cluster identified", n, w), t.forEach((o) => {
135
+ const l = v(o.v, n), f = v(o.w, n);
136
+ l ^ f && (i.warn("Edge: ", o, " leaves cluster ", n), i.warn("Descendants of XXX ", n, ": ", w.get(n)), c.get(n).externalConnections = !0);
137
+ })) : i.debug("Not a cluster ", n, w);
138
+ });
139
+ for (let n of c.keys()) {
140
+ const s = c.get(n).id, t = e.parent(s);
141
+ t !== n && c.has(t) && !c.get(t).externalConnections && (c.get(n).id = t);
142
+ const o = e.edges().some((l) => l.v === n);
143
+ if (s && c.get(n)?.externalConnections && o && L(e, s, n)) {
144
+ const l = T(e, n, e.parent(s));
145
+ l && (c.get(n).id = l);
146
+ }
147
+ }
148
+ e.edges().forEach(function(n) {
149
+ const s = e.edge(n);
150
+ i.warn("Edge " + n.v + " -> " + n.w + ": " + JSON.stringify(n)), i.warn("Edge " + n.v + " -> " + n.w + ": " + JSON.stringify(e.edge(n)));
151
+ let t = n.v, o = n.w;
152
+ if (i.warn(
153
+ "Fix XXX",
154
+ c,
155
+ "ids:",
156
+ n.v,
157
+ n.w,
158
+ "Translating: ",
159
+ c.get(n.v),
160
+ " --- ",
161
+ c.get(n.w)
162
+ ), c.get(n.v) || c.get(n.w)) {
163
+ if (i.warn("Fixing and trying - removing XXX", n.v, n.w, n.name), t = S(n.v), o = S(n.w), e.removeEdge(n.v, n.w, n.name), t !== n.v) {
164
+ const l = e.parent(t);
165
+ c.get(l).externalConnections = !0, s.fromCluster = n.v;
166
+ }
167
+ if (o !== n.w) {
168
+ const l = e.parent(o);
169
+ c.get(l).externalConnections = !0, s.toCluster = n.w;
170
+ }
171
+ i.warn("Fix Replacing with XXX", t, o, n.name), e.setEdge(t, o, s, n.name);
172
+ }
173
+ }), i.warn("Adjusted Graph", C(e)), k(e, 0), i.trace(c);
174
+ }, "adjustClustersAndEdges"), k = /* @__PURE__ */ u((e, r) => {
175
+ if (i.warn("extractor - ", r, C(e), e.children("D")), r > 10) {
176
+ i.error("Bailing out");
177
+ return;
178
+ }
179
+ let n = e.nodes(), s = !1;
180
+ for (const t of n) {
181
+ const o = e.children(t);
182
+ s = s || o.length > 0;
183
+ }
184
+ if (!s) {
185
+ i.debug("Done, no node has children", e.nodes());
186
+ return;
187
+ }
188
+ i.debug("Nodes = ", n, r);
189
+ for (const t of n)
190
+ if (i.debug(
191
+ "Extracting node",
192
+ t,
193
+ c,
194
+ c.has(t) && !c.get(t).externalConnections,
195
+ !e.parent(t),
196
+ e.node(t),
197
+ e.children("D"),
198
+ " Depth ",
199
+ r
200
+ ), !c.has(t))
201
+ i.debug("Not a cluster", t, r);
202
+ else if (c.get(t)?.clusterData?.explicitDir && e.children(t) && e.children(t).length > 0) {
203
+ i.warn("Cluster with explicit dir, creating subgraph for children", t, r);
204
+ const o = c.get(t).clusterData.dir, l = new y({
205
+ multigraph: !0,
206
+ compound: !0
207
+ }).setGraph({
208
+ rankdir: o,
209
+ nodesep: 50,
210
+ ranksep: 50,
211
+ marginx: 8,
212
+ marginy: 8
213
+ }).setDefaultEdgeLabel(function() {
214
+ return {};
215
+ });
216
+ b(t, e, l, t);
217
+ const f = e.node(t) || {};
218
+ e.setNode(t, {
219
+ ...f,
220
+ clusterNode: !0,
221
+ id: t,
222
+ clusterData: c.get(t).clusterData,
223
+ label: c.get(t).label,
224
+ graph: l
225
+ }), i.warn(
226
+ "Subgraph for cluster with explicit dir created:",
227
+ t,
228
+ C(l)
229
+ );
230
+ } else if (!c.get(t).externalConnections && e.children(t) && e.children(t).length > 0) {
231
+ i.warn(
232
+ "Cluster without external connections, without a parent and with children",
233
+ t,
234
+ r
235
+ );
236
+ let l = e.graph().rankdir === "TB" ? "LR" : "TB";
237
+ c.get(t)?.clusterData?.dir && (l = c.get(t).clusterData.dir, i.warn("Fixing dir", c.get(t).clusterData.dir, l));
238
+ const f = new y({
239
+ multigraph: !0,
240
+ compound: !0
241
+ }).setGraph({
242
+ rankdir: l,
243
+ nodesep: 50,
244
+ ranksep: 50,
245
+ marginx: 8,
246
+ marginy: 8
247
+ }).setDefaultEdgeLabel(function() {
248
+ return {};
249
+ });
250
+ b(t, e, f, t);
251
+ const a = e.node(t) || {};
252
+ e.setNode(t, {
253
+ ...a,
254
+ clusterNode: !0,
255
+ id: t,
256
+ clusterData: c.get(t).clusterData,
257
+ label: c.get(t).label,
258
+ graph: f
259
+ }), i.debug("Old graph after copy", C(e));
260
+ } else
261
+ i.warn(
262
+ "Cluster ** ",
263
+ t,
264
+ " **not meeting the criteria !externalConnections:",
265
+ !c.get(t).externalConnections,
266
+ " no parent: ",
267
+ !e.parent(t),
268
+ " children ",
269
+ e.children(t) && e.children(t).length > 0,
270
+ e.children("D"),
271
+ r
272
+ ), i.debug(c);
273
+ n = e.nodes(), i.warn("New list of nodes", n);
274
+ for (const t of n) {
275
+ const o = e.node(t);
276
+ i.warn(" Now next level", t, o), o?.clusterNode && k(o.graph, r + 1);
277
+ }
278
+ }, "extractor"), B = /* @__PURE__ */ u((e, r) => {
279
+ if (r.length === 0)
280
+ return [];
281
+ let n = Object.assign([], r);
282
+ return r.forEach((s) => {
283
+ const t = e.children(s), o = B(e, t);
284
+ n = [...n, ...o];
285
+ }), n;
286
+ }, "sorter"), W = /* @__PURE__ */ u((e) => B(e, e.children()), "sortNodesByHierarchy"), L = /* @__PURE__ */ u((e, r, n) => {
287
+ let s = e.parent(r);
288
+ for (; s && s !== n; ) {
289
+ const t = c.get(s);
290
+ if (t && !t.externalConnections)
291
+ return !0;
292
+ s = e.parent(s);
293
+ }
294
+ return !1;
295
+ }, "isNodeInExtractableCluster"), T = /* @__PURE__ */ u((e, r, n) => {
296
+ const s = e.children(r) ?? [];
297
+ for (const t of s) {
298
+ if (t === n || v(t, n))
299
+ continue;
300
+ const o = D(t, e, r);
301
+ if (o && !L(e, o, r))
302
+ return o;
303
+ }
304
+ return null;
305
+ }, "findSafeAnchorNode");
306
+ export {
307
+ U as a,
308
+ c as b,
309
+ J as c,
310
+ D as f,
311
+ W as s,
312
+ C as w
313
+ };