@kong-ui-public/documentation 0.4.13 → 0.4.15

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 (56) hide show
  1. package/dist/arc-COsOHw50-D7E-_XLT.js +86 -0
  2. package/dist/{astro-D4FIwVxr-CovDYZfT.js → astro-U6b0KI4d-Bfq8RcMV.js} +1 -1
  3. package/dist/{blockDiagram-6b2b5046-BabM1eIl-BiFw3WJ6.js → blockDiagram-91b80b7a-BKGTNNj9-DPDwkz4t.js} +24 -24
  4. package/dist/{c4Diagram-b947cdbb-BBGJ9ivn-BA4nSYfd.js → c4Diagram-b2a90758-BL_2KQjG-DaGASxNN.js} +133 -132
  5. package/dist/channel-ByAWxImn-f765KETj.js +5 -0
  6. package/dist/{classDiagram-35230388-CRYNduH8-CLsxllrW.js → classDiagram-30eddba6-k40qxgte-CyhC7xkz.js} +8 -7
  7. package/dist/{classDiagram-v2-412acd34-5HbyJrnL-DB1xO44x.js → classDiagram-v2-f2df5561-Bhszhjj1-C4F9RBij.js} +7 -7
  8. package/dist/{clone-BoeTe_OS-CQarmEZE.js → clone-B9jLUWz8-1hK-sDX-.js} +1 -1
  9. package/dist/{createText-423428c9-Q0HfccbL-Bwaom8lh.js → createText-6b48ae7d-CwDinsnJ-CAWP3GNM.js} +2 -1
  10. package/dist/documentation.es.js +5 -5
  11. package/dist/documentation.umd.js +991 -720
  12. package/dist/{edges-d417c7a0-DEJA2PwU-BX5bd8a1.js → edges-d32062c0-D81gGEnb-BSSWdCZc.js} +28 -27
  13. package/dist/{erDiagram-0ea73325-C3DQ6B1e-GwhT3lGQ.js → erDiagram-47591fe2-Ct0H1qRr-_AGdmUQQ.js} +38 -38
  14. package/dist/{flowDb-d35e309a-RvFFqjek-t_Dexseh.js → flowDb-4b19a42f-DUQIsrJ6-DCwHR8f-.js} +45 -45
  15. package/dist/{flowDiagram-d949d7c1-Boa20b_n-CJ3aILFD.js → flowDiagram-5540d9b9-lDK0hXfd-Bdkj8eFj.js} +317 -309
  16. package/dist/{flowDiagram-v2-49332944-BJtijxhz-Cgd4t08U.js → flowDiagram-v2-3b53844e-C-MZcHj1-D__kxFEB.js} +5 -5
  17. package/dist/{flowchart-elk-definition-27cc417a-BBD3LS9k-Bb9_HTfE.js → flowchart-elk-definition-5fe447d6-Cl1YzK8W-CId-TpNq.js} +10626 -10624
  18. package/dist/{ganttDiagram-5c869e3b-CRDFjzTp-lNK9bq-O.js → ganttDiagram-9a3bba1f-DgegevHg-DZ_QmRCe.js} +488 -477
  19. package/dist/{git-rebase-sR-yVH_J-D5M2oE9O.js → git-rebase-B7sc3yJp-BPxHM_r2.js} +1 -1
  20. package/dist/gitGraphDiagram-96e6b4ee-B544kZVD-qe2_EQ9q.js +1264 -0
  21. package/dist/{graph-BIq67vWs-Bc3nX8P0.js → graph-nSQNMZNt-mH_8BQHy.js} +64 -64
  22. package/dist/{haml-BT5dFrjs-CmYUmNQ_.js → haml-DsuMo-J7-DWhF2QrW.js} +1 -1
  23. package/dist/{http-DSIFYUfg-BZm1KGvb.js → http-ClrjZLFz-gNFfL9hE.js} +1 -1
  24. package/dist/{index-Bh6WVkCI.js → index-D5pPsg1E.js} +2826 -2744
  25. package/dist/{index-8fae9850-CaUboB89-B0nma_3r.js → index-fc10efb0-BQFKNTyl-JVOq35xY.js} +11 -11
  26. package/dist/{infoDiagram-db7b18fc-DKsewKnu-CWVarnHo.js → infoDiagram-bcd20f53-DA00HiLo-BGr4Dz2T.js} +12 -12
  27. package/dist/{journeyDiagram-d5636530-ClddNDmR-ywsNZNTr.js → journeyDiagram-4fe6b3dc-Dy2VexAM-NIeKHdta.js} +42 -42
  28. package/dist/katex-BQC_klMa-CaeA20wX.js +11636 -0
  29. package/dist/{latex-QX-FNvxY-DfqkUAVR.js → latex-9g43iAzl-B3VseW3K.js} +1 -1
  30. package/dist/{layout-Cz0dAJah-C3YaSszT.js → layout-CsrWmvDo-DTw5CAfp.js} +132 -132
  31. package/dist/{line-BCVITS7s-Du1xeoK-.js → line-_Hv2N8bu-DmtYY3xM.js} +1 -1
  32. package/dist/{linear-CLHAbj67-1tzRLAFO.js → linear-Bq62Qb31-CO-Jqi9k.js} +35 -35
  33. package/dist/{mindmap-definition-377f8f1f-BwEJ-DVg-DeBewnKQ.js → mindmap-definition-f354de21-6GdeE-da-DM2y_OOl.js} +6647 -6414
  34. package/dist/{pieDiagram-b0208e96-Cyz2Kcfu-B1Q8dscS.js → pieDiagram-79897490--sueuFsN-DtjjX42X.js} +68 -68
  35. package/dist/{quadrantDiagram-0332be45-CDMkEQj0-D0ioHd_P.js → quadrantDiagram-62f64e94-B45V10Ws-Ndfd04fG.js} +2 -2
  36. package/dist/{requirementDiagram-bf7890df-Jk3SQ-Q1-BB9UHuUh.js → requirementDiagram-05bf5f74-DKrzFj3--D6oca5bf.js} +30 -30
  37. package/dist/{rst-Bm1i8IkK-C9EaDq6g.js → rst-iTJmEY_6-AgWIzPqn.js} +2 -2
  38. package/dist/{ruby-CZZKXaz8-BxaDEkRP.js → ruby-3Bt2I2On--AixRnjJ.js} +1 -1
  39. package/dist/{sankeyDiagram-0acdec17-BJuIUJd_-Ce7q-NNk.js → sankeyDiagram-97764748-Cal39XvH-BOP-mysV.js} +22 -22
  40. package/dist/{sequenceDiagram-c18d009d-B4IxGCEM-DgvEmabG.js → sequenceDiagram-acc0e65c-C7SBKcFC-x6hQBmQa.js} +917 -884
  41. package/dist/shellscript-DQ1J75ow-DQ1J75ow.js +7 -0
  42. package/dist/{shellsession-BIPXtZci-D6avbCwN.js → shellsession-btSM7PAE-lMmUmCMx.js} +1 -1
  43. package/dist/{stateDiagram-43596fc0-0xEMkbt_-jFUk_xdU.js → stateDiagram-0ff1cf1a-CeTkJw-0-ClBBBO40.js} +5 -5
  44. package/dist/{stateDiagram-v2-2ead4f9c-DS4afpcC-jDCqPtGk.js → stateDiagram-v2-9a9d610d-B6v4YFRe-CKL2DHOu.js} +12 -12
  45. package/dist/{styles-7383a064-C7WyH3qz-B1ftH-y8.js → styles-3ed67cfa-BKhmbt4H-1C0K2oHO.js} +140 -137
  46. package/dist/{styles-6860f46c-ZdhsT5S9-Du_QdneE.js → styles-991ebdfc-D52vcIGN-z8Dw_NvD.js} +19 -19
  47. package/dist/{styles-b2c874b6-BFg-Nblp-B0z_umAE.js → styles-d20c7d72-0tQ-upPv-BfgJ1gvQ.js} +24 -24
  48. package/dist/{svgDrawCommon-0ee1b4e9-CpOZq9bS-BwyJFwu6.js → svgDrawCommon-5ccd53ef-CUtig_WQ-BXE0zXmR.js} +4 -4
  49. package/dist/{timeline-definition-d977decf-BqZwyTB6-qFhObMdA.js → timeline-definition-fea2a41d-DMC1sAGv-CgGK3eeA.js} +2 -2
  50. package/dist/{twig-B_Gr-ODl-Cl9Q0GWo.js → twig-Dcp9VbaI-FN48_KCA.js} +1 -1
  51. package/dist/{xychartDiagram-e50adddc-C1fuuOEQ-DHvZ99O1.js → xychartDiagram-ab372869-BsavOqc0-Cni7765l.js} +30 -30
  52. package/package.json +4 -4
  53. package/dist/arc-C2t0ExPw-DLpexKUK.js +0 -86
  54. package/dist/channel-DXyvEer2-Do9TwFFf.js +0 -5
  55. package/dist/gitGraphDiagram-b9d81de9-D1rNIGL0-DDkwKLsk.js +0 -1262
  56. package/dist/shellscript-CUUTQKn5-CUUTQKn5.js +0 -7
@@ -1,33 +1,33 @@
1
- import { X as mt, j as W } from "./flowDb-d35e309a-RvFFqjek-t_Dexseh.js";
2
- import { Z as kt, E as k, m as K } from "./graph-BIq67vWs-Bc3nX8P0.js";
3
- import { h as w, o as O, p as J, c as H, j as tt, l as U, q, r as R, t as St } from "./index-Bh6WVkCI.js";
4
- import { e as Lt, N as _t, V as At, A as It, L as C } from "./layout-Cz0dAJah-C3YaSszT.js";
5
- import { u as Tt, w as Et, O as et, Q as Mt, Z as T, d as rt, f as _, p as at, b as nt } from "./styles-7383a064-C7WyH3qz-B1ftH-y8.js";
6
- import { P as Nt } from "./line-BCVITS7s-Du1xeoK-.js";
7
- function Bt(r) {
1
+ import { X as kt, j as P } from "./flowDb-4b19a42f-DUQIsrJ6-DCwHR8f-.js";
2
+ import { Z as St, E as S, m as K } from "./graph-nSQNMZNt-mH_8BQHy.js";
3
+ import { h as v, o as z, p as J, c as R, r as tt, j as et, l as U, q, t as W, u as _t } from "./index-D5pPsg1E.js";
4
+ import { e as Lt, N as At, V as It, A as Tt, L as C } from "./layout-CsrWmvDo-DTw5CAfp.js";
5
+ import { w as Mt, h as Nt, t as rt, Z as Bt, e as T, p as at, u as A, b as nt, f as it } from "./styles-3ed67cfa-BKhmbt4H-1C0K2oHO.js";
6
+ import { P as Et } from "./line-_Hv2N8bu-DmtYY3xM.js";
7
+ function $t(r) {
8
8
  if (!r.ok)
9
9
  throw new Error(r.status + " " + r.statusText);
10
10
  return r.text();
11
11
  }
12
- function $t(r, e) {
13
- return fetch(r, e).then(Bt);
12
+ function Ct(r, e) {
13
+ return fetch(r, e).then($t);
14
14
  }
15
- function Ct(r) {
16
- return (e, t) => $t(e, t).then((a) => new DOMParser().parseFromString(a, r));
15
+ function Dt(r) {
16
+ return (e, t) => Ct(e, t).then((a) => new DOMParser().parseFromString(a, r));
17
17
  }
18
- var Dt = Ct("image/svg+xml"), P = {
19
- normal: Rt,
20
- vee: Wt,
18
+ var Ut = Dt("image/svg+xml"), V = {
19
+ normal: Wt,
20
+ vee: Pt,
21
21
  undirected: qt
22
22
  };
23
- function Ut(r) {
24
- P = r;
23
+ function Rt(r) {
24
+ V = r;
25
25
  }
26
- function Rt(r, e, t, a) {
26
+ function Wt(r, e, t, a) {
27
27
  var n = r.append("marker").attr("id", e).attr("viewBox", "0 0 10 10").attr("refX", 9).attr("refY", 5).attr("markerUnits", "strokeWidth").attr("markerWidth", 8).attr("markerHeight", 6).attr("orient", "auto"), i = n.append("path").attr("d", "M 0 0 L 10 5 L 0 10 z").style("stroke-width", 1).style("stroke-dasharray", "1,0");
28
28
  T(i, t[a + "Style"]), t[a + "Class"] && i.attr("class", t[a + "Class"]);
29
29
  }
30
- function Wt(r, e, t, a) {
30
+ function Pt(r, e, t, a) {
31
31
  var n = r.append("marker").attr("id", e).attr("viewBox", "0 0 10 10").attr("refX", 9).attr("refY", 5).attr("markerUnits", "strokeWidth").attr("markerWidth", 8).attr("markerHeight", 6).attr("orient", "auto"), i = n.append("path").attr("d", "M 0 0 L 10 5 L 0 10 L 4 5 z").style("stroke-width", 1).style("stroke-dasharray", "1,0");
32
32
  T(i, t[a + "Style"]), t[a + "Class"] && i.attr("class", t[a + "Class"]);
33
33
  }
@@ -35,17 +35,17 @@ function qt(r, e, t, a) {
35
35
  var n = r.append("marker").attr("id", e).attr("viewBox", "0 0 10 10").attr("refX", 9).attr("refY", 5).attr("markerUnits", "strokeWidth").attr("markerWidth", 8).attr("markerHeight", 6).attr("orient", "auto"), i = n.append("path").attr("d", "M 0 5 L 10 5").style("stroke-width", 1).style("stroke-dasharray", "1,0");
36
36
  T(i, t[a + "Style"]), t[a + "Class"] && i.attr("class", t[a + "Class"]);
37
37
  }
38
- function Ot(r, e) {
38
+ function zt(r, e) {
39
39
  var t = r;
40
40
  return t.node().appendChild(e.label), T(t, e.labelStyle), t;
41
41
  }
42
- function Pt(r, e) {
43
- for (var t = r.append("text"), a = zt(e.label).split(`
42
+ function Vt(r, e) {
43
+ for (var t = r.append("text"), a = Xt(e.label).split(`
44
44
  `), n = 0; n < a.length; n++)
45
45
  t.append("tspan").attr("xml:space", "preserve").attr("dy", "1em").attr("x", "1").text(a[n]);
46
46
  return T(t, e.labelStyle), t;
47
47
  }
48
- function zt(r) {
48
+ function Xt(r) {
49
49
  for (var e = "", t = !1, a, n = 0; n < r.length; ++n)
50
50
  if (a = r[n], t) {
51
51
  switch (a) {
@@ -63,7 +63,7 @@ function zt(r) {
63
63
  }
64
64
  function G(r, e, t) {
65
65
  var a = e.label, n = r.append("g");
66
- e.labelType === "svg" ? Ot(n, e) : typeof a != "string" || e.labelType === "html" ? et(n, e) : Pt(n, e);
66
+ e.labelType === "svg" ? zt(n, e) : typeof a != "string" || e.labelType === "html" ? rt(n, e) : Vt(n, e);
67
67
  var i = n.node().getBBox(), s;
68
68
  switch (t) {
69
69
  case "top":
@@ -77,152 +77,152 @@ function G(r, e, t) {
77
77
  }
78
78
  return n.attr("transform", "translate(" + -i.width / 2 + "," + s + ")"), n;
79
79
  }
80
- var z = function(r, e) {
80
+ var X = function(r, e) {
81
81
  var t = e.nodes().filter(function(i) {
82
- return rt(e, i);
82
+ return at(e, i);
83
83
  }), a = r.selectAll("g.cluster").data(t, function(i) {
84
84
  return i;
85
85
  });
86
- _(a.exit(), e).style("opacity", 0).remove();
86
+ A(a.exit(), e).style("opacity", 0).remove();
87
87
  var n = a.enter().append("g").attr("class", "cluster").attr("id", function(i) {
88
88
  var s = e.node(i);
89
89
  return s.id;
90
90
  }).style("opacity", 0).each(function(i) {
91
- var s = e.node(i), o = w(this);
92
- w(this).append("rect");
93
- var l = o.append("g").attr("class", "label");
94
- G(l, s, s.clusterLabelPos);
91
+ var s = e.node(i), o = v(this);
92
+ v(this).append("rect");
93
+ var d = o.append("g").attr("class", "label");
94
+ G(d, s, s.clusterLabelPos);
95
95
  });
96
- return a = a.merge(n), a = _(a, e).style("opacity", 1), a.selectAll("rect").each(function(i) {
97
- var s = e.node(i), o = w(this);
96
+ return a = a.merge(n), a = A(a, e).style("opacity", 1), a.selectAll("rect").each(function(i) {
97
+ var s = e.node(i), o = v(this);
98
98
  T(o, s.style);
99
99
  }), a;
100
100
  };
101
- function Vt(r) {
102
- z = r;
101
+ function jt(r) {
102
+ X = r;
103
103
  }
104
- let V = function(r, e) {
104
+ let j = function(r, e) {
105
105
  var t = r.selectAll("g.edgeLabel").data(e.edges(), function(n) {
106
- return at(n);
106
+ return nt(n);
107
107
  }).classed("update", !0);
108
108
  t.exit().remove(), t.enter().append("g").classed("edgeLabel", !0).style("opacity", 0), t = r.selectAll("g.edgeLabel"), t.each(function(n) {
109
- var i = w(this);
109
+ var i = v(this);
110
110
  i.select(".label").remove();
111
- var s = e.edge(n), o = G(i, e.edge(n), 0).classed("label", !0), l = o.node().getBBox();
112
- s.labelId && o.attr("id", s.labelId), k(s, "width") || (s.width = l.width), k(s, "height") || (s.height = l.height);
111
+ var s = e.edge(n), o = G(i, e.edge(n), 0).classed("label", !0), d = o.node().getBBox();
112
+ s.labelId && o.attr("id", s.labelId), S(s, "width") || (s.width = d.width), S(s, "height") || (s.height = d.height);
113
113
  });
114
114
  var a;
115
- return t.exit ? a = t.exit() : a = t.selectAll(null), _(a, e).style("opacity", 0).remove(), t;
115
+ return t.exit ? a = t.exit() : a = t.selectAll(null), A(a, e).style("opacity", 0).remove(), t;
116
116
  };
117
- function Xt(r) {
118
- V = r;
117
+ function Ot(r) {
118
+ j = r;
119
119
  }
120
- function Q(r, e) {
120
+ function Z(r, e) {
121
121
  return r.intersect(e);
122
122
  }
123
- var X = function(r, e, t) {
123
+ var O = function(r, e, t) {
124
124
  var a = r.selectAll("g.edgePath").data(e.edges(), function(s) {
125
- return at(s);
126
- }).classed("update", !0), n = Ft(a, e);
125
+ return nt(s);
126
+ }).classed("update", !0), n = Zt(a, e);
127
127
  Qt(a, e);
128
128
  var i = a.merge !== void 0 ? a.merge(n) : a;
129
- return _(i, e).style("opacity", 1), i.each(function(s) {
130
- var o = w(this), l = e.edge(s);
131
- l.elem = this, l.id && o.attr("id", l.id), nt(
129
+ return A(i, e).style("opacity", 1), i.each(function(s) {
130
+ var o = v(this), d = e.edge(s);
131
+ d.elem = this, d.id && o.attr("id", d.id), it(
132
132
  o,
133
- l.class,
133
+ d.class,
134
134
  (o.classed("update") ? "update " : "") + "edgePath"
135
135
  );
136
136
  }), i.selectAll("path.path").each(function(s) {
137
137
  var o = e.edge(s);
138
138
  o.arrowheadId = Lt("arrowhead");
139
- var l = w(this).attr("marker-end", function() {
139
+ var d = v(this).attr("marker-end", function() {
140
140
  return "url(" + Yt(location.href, o.arrowheadId) + ")";
141
141
  }).style("fill", "none");
142
- _(l, e).attr("d", function(c) {
143
- return Ht(e, c);
144
- }), T(l, o.style);
142
+ A(d, e).attr("d", function(u) {
143
+ return Gt(e, u);
144
+ }), T(d, o.style);
145
145
  }), i.selectAll("defs *").remove(), i.selectAll("defs").each(function(s) {
146
- var o = e.edge(s), l = t[o.arrowhead];
147
- l(w(this), o.arrowheadId, o, "arrowhead");
146
+ var o = e.edge(s), d = t[o.arrowhead];
147
+ d(v(this), o.arrowheadId, o, "arrowhead");
148
148
  }), i;
149
149
  };
150
- function jt(r) {
151
- X = r;
150
+ function Ht(r) {
151
+ O = r;
152
152
  }
153
153
  function Yt(r, e) {
154
154
  var t = r.split("#")[0];
155
155
  return t + "#" + e;
156
156
  }
157
- function Ht(r, e) {
157
+ function Gt(r, e) {
158
158
  var t = r.edge(e), a = r.node(e.v), n = r.node(e.w), i = t.points.slice(1, t.points.length - 1);
159
- return i.unshift(Q(a, i[0])), i.push(Q(n, i[i.length - 1])), it(t, i);
159
+ return i.unshift(Z(a, i[0])), i.push(Z(n, i[i.length - 1])), st(t, i);
160
160
  }
161
- function it(r, e) {
162
- var t = (Nt || Dt.line)().x(function(a) {
161
+ function st(r, e) {
162
+ var t = (Et || Ut.line)().x(function(a) {
163
163
  return a.x;
164
164
  }).y(function(a) {
165
165
  return a.y;
166
166
  });
167
167
  return (t.curve || t.interpolate)(r.curve), t(e);
168
168
  }
169
- function Gt(r) {
169
+ function Ft(r) {
170
170
  var e = r.getBBox(), t = r.ownerSVGElement.getScreenCTM().inverse().multiply(r.getScreenCTM()).translate(e.width / 2, e.height / 2);
171
171
  return { x: t.e, y: t.f };
172
172
  }
173
- function Ft(r, e) {
173
+ function Zt(r, e) {
174
174
  var t = r.enter().append("g").attr("class", "edgePath").style("opacity", 0);
175
175
  return t.append("path").attr("class", "path").attr("d", function(a) {
176
- var n = e.edge(a), i = e.node(a.v).elem, s = _t(n.points.length).map(function() {
177
- return Gt(i);
176
+ var n = e.edge(a), i = e.node(a.v).elem, s = At(n.points.length).map(function() {
177
+ return Ft(i);
178
178
  });
179
- return it(n, s);
179
+ return st(n, s);
180
180
  }), t.append("defs"), t;
181
181
  }
182
182
  function Qt(r, e) {
183
183
  var t = r.exit();
184
- _(t, e).style("opacity", 0).remove();
184
+ A(t, e).style("opacity", 0).remove();
185
185
  }
186
- var j = function(r, e, t) {
186
+ var H = function(r, e, t) {
187
187
  var a = e.nodes().filter(function(s) {
188
- return !rt(e, s);
188
+ return !at(e, s);
189
189
  }), n = r.selectAll("g.node").data(a, function(s) {
190
190
  return s;
191
191
  }).classed("update", !0);
192
192
  n.exit().remove(), n.enter().append("g").attr("class", "node").style("opacity", 0), n = r.selectAll("g.node"), n.each(function(s) {
193
- var o = e.node(s), l = w(this);
194
- nt(
195
- l,
193
+ var o = e.node(s), d = v(this);
194
+ it(
195
+ d,
196
196
  o.class,
197
- (l.classed("update") ? "update " : "") + "node"
198
- ), l.select("g.label").remove();
199
- var c = l.append("g").attr("class", "label"), d = G(c, o), g = t[o.shape], f = At(d.node().getBBox(), "width", "height");
200
- o.elem = this, o.id && l.attr("id", o.id), o.labelId && c.attr("id", o.labelId), k(o, "width") && (f.width = o.width), k(o, "height") && (f.height = o.height), f.width += o.paddingLeft + o.paddingRight, f.height += o.paddingTop + o.paddingBottom, c.attr(
197
+ (d.classed("update") ? "update " : "") + "node"
198
+ ), d.select("g.label").remove();
199
+ var u = d.append("g").attr("class", "label"), l = G(u, o), g = t[o.shape], c = It(l.node().getBBox(), "width", "height");
200
+ o.elem = this, o.id && d.attr("id", o.id), o.labelId && u.attr("id", o.labelId), S(o, "width") && (c.width = o.width), S(o, "height") && (c.height = o.height), c.width += o.paddingLeft + o.paddingRight, c.height += o.paddingTop + o.paddingBottom, u.attr(
201
201
  "transform",
202
202
  "translate(" + (o.paddingLeft - o.paddingRight) / 2 + "," + (o.paddingTop - o.paddingBottom) / 2 + ")"
203
203
  );
204
- var h = w(this);
204
+ var h = v(this);
205
205
  h.select(".label-container").remove();
206
- var p = g(h, f, o).classed("label-container", !0);
206
+ var p = g(h, c, o).classed("label-container", !0);
207
207
  T(p, o.style);
208
- var u = p.node().getBBox();
209
- o.width = u.width, o.height = u.height;
208
+ var w = p.node().getBBox();
209
+ o.width = w.width, o.height = w.height;
210
210
  });
211
211
  var i;
212
- return n.exit ? i = n.exit() : i = n.selectAll(null), _(i, e).style("opacity", 0).remove(), n;
212
+ return n.exit ? i = n.exit() : i = n.selectAll(null), A(i, e).style("opacity", 0).remove(), n;
213
213
  };
214
- function Zt(r) {
215
- j = r;
214
+ function Kt(r) {
215
+ H = r;
216
216
  }
217
- function Kt(r, e) {
217
+ function Jt(r, e) {
218
218
  var t = r.filter(function() {
219
- return !w(this).classed("update");
219
+ return !v(this).classed("update");
220
220
  });
221
221
  function a(n) {
222
222
  var i = e.node(n);
223
223
  return "translate(" + i.x + "," + i.y + ")";
224
224
  }
225
- t.attr("transform", a), _(r, e).style("opacity", 1).attr("transform", a), _(t.selectAll("rect"), e).attr("width", function(n) {
225
+ t.attr("transform", a), A(r, e).style("opacity", 1).attr("transform", a), A(t.selectAll("rect"), e).attr("width", function(n) {
226
226
  return e.node(n).width;
227
227
  }).attr("height", function(n) {
228
228
  return e.node(n).height;
@@ -234,41 +234,41 @@ function Kt(r, e) {
234
234
  return -i.height / 2;
235
235
  });
236
236
  }
237
- function Jt(r, e) {
237
+ function te(r, e) {
238
238
  var t = r.filter(function() {
239
- return !w(this).classed("update");
239
+ return !v(this).classed("update");
240
240
  });
241
241
  function a(n) {
242
242
  var i = e.edge(n);
243
- return k(i, "x") ? "translate(" + i.x + "," + i.y + ")" : "";
243
+ return S(i, "x") ? "translate(" + i.x + "," + i.y + ")" : "";
244
244
  }
245
- t.attr("transform", a), _(r, e).style("opacity", 1).attr("transform", a);
245
+ t.attr("transform", a), A(r, e).style("opacity", 1).attr("transform", a);
246
246
  }
247
- function te(r, e) {
247
+ function ee(r, e) {
248
248
  var t = r.filter(function() {
249
- return !w(this).classed("update");
249
+ return !v(this).classed("update");
250
250
  });
251
251
  function a(n) {
252
252
  var i = e.node(n);
253
253
  return "translate(" + i.x + "," + i.y + ")";
254
254
  }
255
- t.attr("transform", a), _(r, e).style("opacity", 1).attr("transform", a);
255
+ t.attr("transform", a), A(r, e).style("opacity", 1).attr("transform", a);
256
256
  }
257
- function st(r, e, t, a) {
258
- var n = r.x, i = r.y, s = n - a.x, o = i - a.y, l = Math.sqrt(e * e * o * o + t * t * s * s), c = Math.abs(e * t * s / l);
259
- a.x < n && (c = -c);
260
- var d = Math.abs(e * t * o / l);
261
- return a.y < i && (d = -d), { x: n + c, y: i + d };
257
+ function ot(r, e, t, a) {
258
+ var n = r.x, i = r.y, s = n - a.x, o = i - a.y, d = Math.sqrt(e * e * o * o + t * t * s * s), u = Math.abs(e * t * s / d);
259
+ a.x < n && (u = -u);
260
+ var l = Math.abs(e * t * o / d);
261
+ return a.y < i && (l = -l), { x: n + u, y: i + l };
262
262
  }
263
- function ee(r, e, t) {
264
- return st(r, e, e, t);
263
+ function re(r, e, t) {
264
+ return ot(r, e, e, t);
265
265
  }
266
- function re(r, e, t, a) {
267
- var n, i, s, o, l, c, d, g, f, h, p, u, x, v, S;
268
- if (n = e.y - r.y, s = r.x - e.x, l = e.x * r.y - r.x * e.y, f = n * t.x + s * t.y + l, h = n * a.x + s * a.y + l, !(f !== 0 && h !== 0 && Z(f, h)) && (i = a.y - t.y, o = t.x - a.x, c = a.x * t.y - t.x * a.y, d = i * r.x + o * r.y + c, g = i * e.x + o * e.y + c, !(d !== 0 && g !== 0 && Z(d, g)) && (p = n * o - i * s, p !== 0)))
269
- return u = Math.abs(p / 2), x = s * c - o * l, v = x < 0 ? (x - u) / p : (x + u) / p, x = i * l - n * c, S = x < 0 ? (x - u) / p : (x + u) / p, { x: v, y: S };
266
+ function ae(r, e, t, a) {
267
+ var n, i, s, o, d, u, l, g, c, h, p, w, f, x, k;
268
+ if (n = e.y - r.y, s = r.x - e.x, d = e.x * r.y - r.x * e.y, c = n * t.x + s * t.y + d, h = n * a.x + s * a.y + d, !(c !== 0 && h !== 0 && Q(c, h)) && (i = a.y - t.y, o = t.x - a.x, u = a.x * t.y - t.x * a.y, l = i * r.x + o * r.y + u, g = i * e.x + o * e.y + u, !(l !== 0 && g !== 0 && Q(l, g)) && (p = n * o - i * s, p !== 0)))
269
+ return w = Math.abs(p / 2), f = s * u - o * d, x = f < 0 ? (f - w) / p : (f + w) / p, f = i * d - n * u, k = f < 0 ? (f - w) / p : (f + w) / p, { x, y: k };
270
270
  }
271
- function Z(r, e) {
271
+ function Q(r, e) {
272
272
  return r * e > 0;
273
273
  }
274
274
  function I(r, e, t) {
@@ -276,52 +276,52 @@ function I(r, e, t) {
276
276
  e.forEach(function(p) {
277
277
  s = Math.min(s, p.x), o = Math.min(o, p.y);
278
278
  });
279
- for (var l = a - r.width / 2 - s, c = n - r.height / 2 - o, d = 0; d < e.length; d++) {
280
- var g = e[d], f = e[d < e.length - 1 ? d + 1 : 0], h = re(
279
+ for (var d = a - r.width / 2 - s, u = n - r.height / 2 - o, l = 0; l < e.length; l++) {
280
+ var g = e[l], c = e[l < e.length - 1 ? l + 1 : 0], h = ae(
281
281
  r,
282
282
  t,
283
- { x: l + g.x, y: c + g.y },
284
- { x: l + f.x, y: c + f.y }
283
+ { x: d + g.x, y: u + g.y },
284
+ { x: d + c.x, y: u + c.y }
285
285
  );
286
286
  h && i.push(h);
287
287
  }
288
- return i.length ? (i.length > 1 && i.sort(function(p, u) {
289
- var x = p.x - t.x, v = p.y - t.y, S = Math.sqrt(x * x + v * v), A = u.x - t.x, B = u.y - t.y, y = Math.sqrt(A * A + B * B);
290
- return S < y ? -1 : S === y ? 0 : 1;
288
+ return i.length ? (i.length > 1 && i.sort(function(p, w) {
289
+ var f = p.x - t.x, x = p.y - t.y, k = Math.sqrt(f * f + x * x), N = w.x - t.x, _ = w.y - t.y, y = Math.sqrt(N * N + _ * _);
290
+ return k < y ? -1 : k === y ? 0 : 1;
291
291
  }), i[0]) : (console.log("NO INTERSECTION FOUND, RETURN NODE CENTER", r), r);
292
292
  }
293
293
  function F(r, e) {
294
- var t = r.x, a = r.y, n = e.x - t, i = e.y - a, s = r.width / 2, o = r.height / 2, l, c;
295
- return Math.abs(i) * s > Math.abs(n) * o ? (i < 0 && (o = -o), l = i === 0 ? 0 : o * n / i, c = o) : (n < 0 && (s = -s), l = s, c = n === 0 ? 0 : s * i / n), { x: t + l, y: a + c };
294
+ var t = r.x, a = r.y, n = e.x - t, i = e.y - a, s = r.width / 2, o = r.height / 2, d, u;
295
+ return Math.abs(i) * s > Math.abs(n) * o ? (i < 0 && (o = -o), d = i === 0 ? 0 : o * n / i, u = o) : (n < 0 && (s = -s), d = s, u = n === 0 ? 0 : s * i / n), { x: t + d, y: a + u };
296
296
  }
297
297
  var Y = {
298
- rect: ne,
299
- ellipse: ie,
300
- circle: se,
301
- diamond: oe
298
+ rect: ie,
299
+ ellipse: se,
300
+ circle: oe,
301
+ diamond: le
302
302
  };
303
- function ae(r) {
303
+ function ne(r) {
304
304
  Y = r;
305
305
  }
306
- function ne(r, e, t) {
306
+ function ie(r, e, t) {
307
307
  var a = r.insert("rect", ":first-child").attr("rx", t.rx).attr("ry", t.ry).attr("x", -e.width / 2).attr("y", -e.height / 2).attr("width", e.width).attr("height", e.height);
308
308
  return t.intersect = function(n) {
309
309
  return F(t, n);
310
310
  }, a;
311
311
  }
312
- function ie(r, e, t) {
312
+ function se(r, e, t) {
313
313
  var a = e.width / 2, n = e.height / 2, i = r.insert("ellipse", ":first-child").attr("x", -e.width / 2).attr("y", -e.height / 2).attr("rx", a).attr("ry", n);
314
314
  return t.intersect = function(s) {
315
- return st(t, a, n, s);
315
+ return ot(t, a, n, s);
316
316
  }, i;
317
317
  }
318
- function se(r, e, t) {
318
+ function oe(r, e, t) {
319
319
  var a = Math.max(e.width, e.height) / 2, n = r.insert("circle", ":first-child").attr("x", -e.width / 2).attr("y", -e.height / 2).attr("r", a);
320
320
  return t.intersect = function(i) {
321
- return ee(t, a, i);
321
+ return re(t, a, i);
322
322
  }, n;
323
323
  }
324
- function oe(r, e, t) {
324
+ function le(r, e, t) {
325
325
  var a = e.width * Math.SQRT2 / 2, n = e.height * Math.SQRT2 / 2, i = [
326
326
  { x: 0, y: -n },
327
327
  { x: -a, y: 0 },
@@ -337,29 +337,29 @@ function oe(r, e, t) {
337
337
  return I(t, i, o);
338
338
  }, s;
339
339
  }
340
- function le() {
340
+ function de() {
341
341
  var r = function(e, t) {
342
- he(t);
343
- var a = D(e, "output"), n = D(a, "clusters"), i = D(a, "edgePaths"), s = V(D(a, "edgeLabels"), t), o = j(D(a, "nodes"), t, Y);
344
- It(t), te(o, t), Jt(s, t), X(i, t, P);
345
- var l = z(n, t);
346
- Kt(l, t), ue(t);
342
+ ue(t);
343
+ var a = D(e, "output"), n = D(a, "clusters"), i = D(a, "edgePaths"), s = j(D(a, "edgeLabels"), t), o = H(D(a, "nodes"), t, Y);
344
+ Tt(t), ee(o, t), te(s, t), O(i, t, V);
345
+ var d = X(n, t);
346
+ Jt(d, t), fe(t);
347
347
  };
348
348
  return r.createNodes = function(e) {
349
- return arguments.length ? (Zt(e), r) : j;
349
+ return arguments.length ? (Kt(e), r) : H;
350
350
  }, r.createClusters = function(e) {
351
- return arguments.length ? (Vt(e), r) : z;
351
+ return arguments.length ? (jt(e), r) : X;
352
352
  }, r.createEdgeLabels = function(e) {
353
- return arguments.length ? (Xt(e), r) : V;
353
+ return arguments.length ? (Ot(e), r) : j;
354
354
  }, r.createEdgePaths = function(e) {
355
- return arguments.length ? (jt(e), r) : X;
355
+ return arguments.length ? (Ht(e), r) : O;
356
356
  }, r.shapes = function(e) {
357
- return arguments.length ? (ae(e), r) : Y;
357
+ return arguments.length ? (ne(e), r) : Y;
358
358
  }, r.arrows = function(e) {
359
- return arguments.length ? (Ut(e), r) : P;
359
+ return arguments.length ? (Rt(e), r) : V;
360
360
  }, r;
361
361
  }
362
- var de = {
362
+ var ce = {
363
363
  paddingLeft: 10,
364
364
  paddingRight: 10,
365
365
  paddingTop: 10,
@@ -367,54 +367,54 @@ var de = {
367
367
  rx: 0,
368
368
  ry: 0,
369
369
  shape: "rect"
370
- }, ce = {
370
+ }, he = {
371
371
  arrowhead: "normal",
372
- curve: R
372
+ curve: W
373
373
  };
374
- function he(r) {
374
+ function ue(r) {
375
375
  r.nodes().forEach(function(e) {
376
376
  var t = r.node(e);
377
- !k(t, "label") && !r.children(e).length && (t.label = e), k(t, "paddingX") && C(t, {
377
+ !S(t, "label") && !r.children(e).length && (t.label = e), S(t, "paddingX") && C(t, {
378
378
  paddingLeft: t.paddingX,
379
379
  paddingRight: t.paddingX
380
- }), k(t, "paddingY") && C(t, {
380
+ }), S(t, "paddingY") && C(t, {
381
381
  paddingTop: t.paddingY,
382
382
  paddingBottom: t.paddingY
383
- }), k(t, "padding") && C(t, {
383
+ }), S(t, "padding") && C(t, {
384
384
  paddingLeft: t.padding,
385
385
  paddingRight: t.padding,
386
386
  paddingTop: t.padding,
387
387
  paddingBottom: t.padding
388
- }), C(t, de), K(["paddingLeft", "paddingRight", "paddingTop", "paddingBottom"], function(a) {
388
+ }), C(t, ce), K(["paddingLeft", "paddingRight", "paddingTop", "paddingBottom"], function(a) {
389
389
  t[a] = Number(t[a]);
390
- }), k(t, "width") && (t._prevWidth = t.width), k(t, "height") && (t._prevHeight = t.height);
390
+ }), S(t, "width") && (t._prevWidth = t.width), S(t, "height") && (t._prevHeight = t.height);
391
391
  }), r.edges().forEach(function(e) {
392
392
  var t = r.edge(e);
393
- k(t, "label") || (t.label = ""), C(t, ce);
393
+ S(t, "label") || (t.label = ""), C(t, he);
394
394
  });
395
395
  }
396
- function ue(r) {
396
+ function fe(r) {
397
397
  K(r.nodes(), function(e) {
398
398
  var t = r.node(e);
399
- k(t, "_prevWidth") ? t.width = t._prevWidth : delete t.width, k(t, "_prevHeight") ? t.height = t._prevHeight : delete t.height, delete t._prevWidth, delete t._prevHeight;
399
+ S(t, "_prevWidth") ? t.width = t._prevWidth : delete t.width, S(t, "_prevHeight") ? t.height = t._prevHeight : delete t.height, delete t._prevWidth, delete t._prevHeight;
400
400
  });
401
401
  }
402
402
  function D(r, e) {
403
403
  var t = r.select("g." + e);
404
404
  return t.empty() && (t = r.append("g").attr("class", e)), t;
405
405
  }
406
- function ot(r, e, t) {
406
+ function lt(r, e, t) {
407
407
  const a = e.width, n = e.height, i = (a + n) * 0.9, s = [
408
408
  { x: i / 2, y: 0 },
409
409
  { x: i, y: -i / 2 },
410
410
  { x: i / 2, y: -i },
411
411
  { x: 0, y: -i / 2 }
412
- ], o = E(r, i, i, s);
413
- return t.intersect = function(l) {
414
- return I(t, s, l);
412
+ ], o = M(r, i, i, s);
413
+ return t.intersect = function(d) {
414
+ return I(t, s, d);
415
415
  }, o;
416
416
  }
417
- function lt(r, e, t) {
417
+ function dt(r, e, t) {
418
418
  const a = e.height, n = a / 4, i = e.width + 2 * n, s = [
419
419
  { x: n, y: 0 },
420
420
  { x: i - n, y: 0 },
@@ -422,86 +422,86 @@ function lt(r, e, t) {
422
422
  { x: i - n, y: -a },
423
423
  { x: n, y: -a },
424
424
  { x: 0, y: -a / 2 }
425
- ], o = E(r, i, a, s);
426
- return t.intersect = function(l) {
427
- return I(t, s, l);
425
+ ], o = M(r, i, a, s);
426
+ return t.intersect = function(d) {
427
+ return I(t, s, d);
428
428
  }, o;
429
429
  }
430
- function dt(r, e, t) {
430
+ function ct(r, e, t) {
431
431
  const a = e.width, n = e.height, i = [
432
432
  { x: -n / 2, y: 0 },
433
433
  { x: a, y: 0 },
434
434
  { x: a, y: -n },
435
435
  { x: -n / 2, y: -n },
436
436
  { x: 0, y: -n / 2 }
437
- ], s = E(r, a, n, i);
437
+ ], s = M(r, a, n, i);
438
438
  return t.intersect = function(o) {
439
439
  return I(t, i, o);
440
440
  }, s;
441
441
  }
442
- function ct(r, e, t) {
442
+ function ht(r, e, t) {
443
443
  const a = e.width, n = e.height, i = [
444
444
  { x: -2 * n / 6, y: 0 },
445
445
  { x: a - n / 6, y: 0 },
446
446
  { x: a + 2 * n / 6, y: -n },
447
447
  { x: n / 6, y: -n }
448
- ], s = E(r, a, n, i);
448
+ ], s = M(r, a, n, i);
449
449
  return t.intersect = function(o) {
450
450
  return I(t, i, o);
451
451
  }, s;
452
452
  }
453
- function ht(r, e, t) {
453
+ function ut(r, e, t) {
454
454
  const a = e.width, n = e.height, i = [
455
455
  { x: 2 * n / 6, y: 0 },
456
456
  { x: a + n / 6, y: 0 },
457
457
  { x: a - 2 * n / 6, y: -n },
458
458
  { x: -n / 6, y: -n }
459
- ], s = E(r, a, n, i);
459
+ ], s = M(r, a, n, i);
460
460
  return t.intersect = function(o) {
461
461
  return I(t, i, o);
462
462
  }, s;
463
463
  }
464
- function ut(r, e, t) {
464
+ function ft(r, e, t) {
465
465
  const a = e.width, n = e.height, i = [
466
466
  { x: -2 * n / 6, y: 0 },
467
467
  { x: a + 2 * n / 6, y: 0 },
468
468
  { x: a - n / 6, y: -n },
469
469
  { x: n / 6, y: -n }
470
- ], s = E(r, a, n, i);
470
+ ], s = M(r, a, n, i);
471
471
  return t.intersect = function(o) {
472
472
  return I(t, i, o);
473
473
  }, s;
474
474
  }
475
- function ft(r, e, t) {
475
+ function pt(r, e, t) {
476
476
  const a = e.width, n = e.height, i = [
477
477
  { x: n / 6, y: 0 },
478
478
  { x: a - n / 6, y: 0 },
479
479
  { x: a + 2 * n / 6, y: -n },
480
480
  { x: -2 * n / 6, y: -n }
481
- ], s = E(r, a, n, i);
481
+ ], s = M(r, a, n, i);
482
482
  return t.intersect = function(o) {
483
483
  return I(t, i, o);
484
484
  }, s;
485
485
  }
486
- function pt(r, e, t) {
486
+ function gt(r, e, t) {
487
487
  const a = e.width, n = e.height, i = [
488
488
  { x: 0, y: 0 },
489
489
  { x: a + n / 2, y: 0 },
490
490
  { x: a, y: -n / 2 },
491
491
  { x: a + n / 2, y: -n },
492
492
  { x: 0, y: -n }
493
- ], s = E(r, a, n, i);
493
+ ], s = M(r, a, n, i);
494
494
  return t.intersect = function(o) {
495
495
  return I(t, i, o);
496
496
  }, s;
497
497
  }
498
- function gt(r, e, t) {
498
+ function yt(r, e, t) {
499
499
  const a = e.height, n = e.width + a / 4, i = r.insert("rect", ":first-child").attr("rx", a / 2).attr("ry", a / 2).attr("x", -n / 2).attr("y", -a / 2).attr("width", n).attr("height", a);
500
500
  return t.intersect = function(s) {
501
501
  return F(t, s);
502
502
  }, i;
503
503
  }
504
- function yt(r, e, t) {
504
+ function xt(r, e, t) {
505
505
  const a = e.width, n = e.height, i = [
506
506
  { x: 0, y: 0 },
507
507
  { x: a, y: 0 },
@@ -513,29 +513,29 @@ function yt(r, e, t) {
513
513
  { x: a + 8, y: -n },
514
514
  { x: -8, y: -n },
515
515
  { x: -8, y: 0 }
516
- ], s = E(r, a, n, i);
516
+ ], s = M(r, a, n, i);
517
517
  return t.intersect = function(o) {
518
518
  return I(t, i, o);
519
519
  }, s;
520
520
  }
521
- function xt(r, e, t) {
522
- const a = e.width, n = a / 2, i = n / (2.5 + a / 50), s = e.height + i, o = "M 0," + i + " a " + n + "," + i + " 0,0,0 " + a + " 0 a " + n + "," + i + " 0,0,0 " + -a + " 0 l 0," + s + " a " + n + "," + i + " 0,0,0 " + a + " 0 l 0," + -s, l = r.attr("label-offset-y", i).insert("path", ":first-child").attr("d", o).attr("transform", "translate(" + -a / 2 + "," + -(s / 2 + i) + ")");
523
- return t.intersect = function(c) {
524
- const d = F(t, c), g = d.x - t.x;
525
- if (n != 0 && (Math.abs(g) < t.width / 2 || Math.abs(g) == t.width / 2 && Math.abs(d.y - t.y) > t.height / 2 - i)) {
526
- let f = i * i * (1 - g * g / (n * n));
527
- f != 0 && (f = Math.sqrt(f)), f = i - f, c.y - t.y > 0 && (f = -f), d.y += f;
521
+ function wt(r, e, t) {
522
+ const a = e.width, n = a / 2, i = n / (2.5 + a / 50), s = e.height + i, o = "M 0," + i + " a " + n + "," + i + " 0,0,0 " + a + " 0 a " + n + "," + i + " 0,0,0 " + -a + " 0 l 0," + s + " a " + n + "," + i + " 0,0,0 " + a + " 0 l 0," + -s, d = r.attr("label-offset-y", i).insert("path", ":first-child").attr("d", o).attr("transform", "translate(" + -a / 2 + "," + -(s / 2 + i) + ")");
523
+ return t.intersect = function(u) {
524
+ const l = F(t, u), g = l.x - t.x;
525
+ if (n != 0 && (Math.abs(g) < t.width / 2 || Math.abs(g) == t.width / 2 && Math.abs(l.y - t.y) > t.height / 2 - i)) {
526
+ let c = i * i * (1 - g * g / (n * n));
527
+ c != 0 && (c = Math.sqrt(c)), c = i - c, u.y - t.y > 0 && (c = -c), l.y += c;
528
528
  }
529
- return d;
530
- }, l;
531
- }
532
- function fe(r) {
533
- r.shapes().question = ot, r.shapes().hexagon = lt, r.shapes().stadium = gt, r.shapes().subroutine = yt, r.shapes().cylinder = xt, r.shapes().rect_left_inv_arrow = dt, r.shapes().lean_right = ct, r.shapes().lean_left = ht, r.shapes().trapezoid = ut, r.shapes().inv_trapezoid = ft, r.shapes().rect_right_inv_arrow = pt;
529
+ return l;
530
+ }, d;
534
531
  }
535
532
  function pe(r) {
536
- r({ question: ot }), r({ hexagon: lt }), r({ stadium: gt }), r({ subroutine: yt }), r({ cylinder: xt }), r({ rect_left_inv_arrow: dt }), r({ lean_right: ct }), r({ lean_left: ht }), r({ trapezoid: ut }), r({ inv_trapezoid: ft }), r({ rect_right_inv_arrow: pt });
533
+ r.shapes().question = lt, r.shapes().hexagon = dt, r.shapes().stadium = yt, r.shapes().subroutine = xt, r.shapes().cylinder = wt, r.shapes().rect_left_inv_arrow = ct, r.shapes().lean_right = ht, r.shapes().lean_left = ut, r.shapes().trapezoid = ft, r.shapes().inv_trapezoid = pt, r.shapes().rect_right_inv_arrow = gt;
537
534
  }
538
- function E(r, e, t, a) {
535
+ function ge(r) {
536
+ r({ question: lt }), r({ hexagon: dt }), r({ stadium: yt }), r({ subroutine: xt }), r({ cylinder: wt }), r({ rect_left_inv_arrow: ct }), r({ lean_right: ht }), r({ lean_left: ut }), r({ trapezoid: ft }), r({ inv_trapezoid: pt }), r({ rect_right_inv_arrow: gt });
537
+ }
538
+ function M(r, e, t, a) {
539
539
  return r.insert("polygon", ":first-child").attr(
540
540
  "points",
541
541
  a.map(function(n) {
@@ -543,122 +543,126 @@ function E(r, e, t, a) {
543
543
  }).join(" ")
544
544
  ).attr("transform", "translate(" + -e / 2 + "," + t / 2 + ")");
545
545
  }
546
- const ge = {
547
- addToRender: fe,
548
- addToRenderV2: pe
549
- }, vt = {}, ye = function(r) {
546
+ const ye = {
547
+ addToRender: pe,
548
+ addToRenderV2: ge
549
+ }, vt = {}, xe = function(r) {
550
550
  const e = Object.keys(r);
551
551
  for (const t of e)
552
552
  vt[t] = r[t];
553
- }, wt = function(r, e, t, a, n, i) {
554
- const s = a ? a.select(`[id="${t}"]`) : w(`[id="${t}"]`), o = n || document;
555
- Object.keys(r).forEach(function(l) {
556
- const c = r[l];
557
- let d = "default";
558
- c.classes.length > 0 && (d = c.classes.join(" "));
559
- const g = O(c.styles);
560
- let f = c.text !== void 0 ? c.text : c.id, h;
561
- if (J(H().flowchart.htmlLabels)) {
553
+ }, bt = async function(r, e, t, a, n, i) {
554
+ const s = a ? a.select(`[id="${t}"]`) : v(`[id="${t}"]`), o = n || document, d = Object.keys(r);
555
+ for (const u of d) {
556
+ const l = r[u];
557
+ let g = "default";
558
+ l.classes.length > 0 && (g = l.classes.join(" "));
559
+ const c = z(l.styles);
560
+ let h = l.text !== void 0 ? l.text : l.id, p;
561
+ if (J(R().flowchart.htmlLabels)) {
562
562
  const x = {
563
- label: f.replace(
564
- /fa[blrs]?:fa-[\w-]+/g,
565
- (v) => `<i class='${v.replace(":", " ")}'></i>`
563
+ label: await tt(
564
+ h.replace(
565
+ /fa[blrs]?:fa-[\w-]+/g,
566
+ // cspell:disable-line
567
+ (k) => `<i class='${k.replace(":", " ")}'></i>`
568
+ ),
569
+ R()
566
570
  )
567
571
  };
568
- h = et(s, x).node(), h.parentNode.removeChild(h);
572
+ p = rt(s, x).node(), p.parentNode.removeChild(p);
569
573
  } else {
570
574
  const x = o.createElementNS("http://www.w3.org/2000/svg", "text");
571
- x.setAttribute("style", g.labelStyle.replace("color:", "fill:"));
572
- const v = f.split(tt.lineBreakRegex);
573
- for (const S of v) {
574
- const A = o.createElementNS("http://www.w3.org/2000/svg", "tspan");
575
- A.setAttributeNS("http://www.w3.org/XML/1998/namespace", "xml:space", "preserve"), A.setAttribute("dy", "1em"), A.setAttribute("x", "1"), A.textContent = S, x.appendChild(A);
575
+ x.setAttribute("style", c.labelStyle.replace("color:", "fill:"));
576
+ const k = h.split(et.lineBreakRegex);
577
+ for (const N of k) {
578
+ const _ = o.createElementNS("http://www.w3.org/2000/svg", "tspan");
579
+ _.setAttributeNS("http://www.w3.org/XML/1998/namespace", "xml:space", "preserve"), _.setAttribute("dy", "1em"), _.setAttribute("x", "1"), _.textContent = N, x.appendChild(_);
576
580
  }
577
- h = x;
581
+ p = x;
578
582
  }
579
- let p = 0, u = "";
580
- switch (c.type) {
583
+ let w = 0, f = "";
584
+ switch (l.type) {
581
585
  case "round":
582
- p = 5, u = "rect";
586
+ w = 5, f = "rect";
583
587
  break;
584
588
  case "square":
585
- u = "rect";
589
+ f = "rect";
586
590
  break;
587
591
  case "diamond":
588
- u = "question";
592
+ f = "question";
589
593
  break;
590
594
  case "hexagon":
591
- u = "hexagon";
595
+ f = "hexagon";
592
596
  break;
593
597
  case "odd":
594
- u = "rect_left_inv_arrow";
598
+ f = "rect_left_inv_arrow";
595
599
  break;
596
600
  case "lean_right":
597
- u = "lean_right";
601
+ f = "lean_right";
598
602
  break;
599
603
  case "lean_left":
600
- u = "lean_left";
604
+ f = "lean_left";
601
605
  break;
602
606
  case "trapezoid":
603
- u = "trapezoid";
607
+ f = "trapezoid";
604
608
  break;
605
609
  case "inv_trapezoid":
606
- u = "inv_trapezoid";
610
+ f = "inv_trapezoid";
607
611
  break;
608
612
  case "odd_right":
609
- u = "rect_left_inv_arrow";
613
+ f = "rect_left_inv_arrow";
610
614
  break;
611
615
  case "circle":
612
- u = "circle";
616
+ f = "circle";
613
617
  break;
614
618
  case "ellipse":
615
- u = "ellipse";
619
+ f = "ellipse";
616
620
  break;
617
621
  case "stadium":
618
- u = "stadium";
622
+ f = "stadium";
619
623
  break;
620
624
  case "subroutine":
621
- u = "subroutine";
625
+ f = "subroutine";
622
626
  break;
623
627
  case "cylinder":
624
- u = "cylinder";
628
+ f = "cylinder";
625
629
  break;
626
630
  case "group":
627
- u = "rect";
631
+ f = "rect";
628
632
  break;
629
633
  default:
630
- u = "rect";
634
+ f = "rect";
631
635
  }
632
- U.warn("Adding node", c.id, c.domId), e.setNode(i.db.lookUpDomId(c.id), {
636
+ U.warn("Adding node", l.id, l.domId), e.setNode(i.db.lookUpDomId(l.id), {
633
637
  labelType: "svg",
634
- labelStyle: g.labelStyle,
635
- shape: u,
636
- label: h,
637
- rx: p,
638
- ry: p,
639
- class: d,
640
- style: g.style,
641
- id: i.db.lookUpDomId(c.id)
638
+ labelStyle: c.labelStyle,
639
+ shape: f,
640
+ label: p,
641
+ rx: w,
642
+ ry: w,
643
+ class: g,
644
+ style: c.style,
645
+ id: i.db.lookUpDomId(l.id)
642
646
  });
643
- });
644
- }, bt = function(r, e, t) {
647
+ }
648
+ }, mt = async function(r, e, t) {
645
649
  let a = 0, n, i;
646
650
  if (r.defaultStyle !== void 0) {
647
- const s = O(r.defaultStyle);
651
+ const s = z(r.defaultStyle);
648
652
  n = s.style, i = s.labelStyle;
649
653
  }
650
- r.forEach(function(s) {
654
+ for (const s of r) {
651
655
  a++;
652
- const o = "L-" + s.start + "-" + s.end, l = "LS-" + s.start, c = "LE-" + s.end, d = {};
653
- s.type === "arrow_open" ? d.arrowhead = "none" : d.arrowhead = "normal";
654
- let g = "", f = "";
656
+ const o = "L-" + s.start + "-" + s.end, d = "LS-" + s.start, u = "LE-" + s.end, l = {};
657
+ s.type === "arrow_open" ? l.arrowhead = "none" : l.arrowhead = "normal";
658
+ let g = "", c = "";
655
659
  if (s.style !== void 0) {
656
- const h = O(s.style);
657
- g = h.style, f = h.labelStyle;
660
+ const h = z(s.style);
661
+ g = h.style, c = h.labelStyle;
658
662
  } else
659
663
  switch (s.stroke) {
660
664
  case "normal":
661
- g = "fill:none", n !== void 0 && (g = n), i !== void 0 && (f = i);
665
+ g = "fill:none", n !== void 0 && (g = n), i !== void 0 && (c = i);
662
666
  break;
663
667
  case "dotted":
664
668
  g = "fill:none;stroke-width:2px;stroke-dasharray:3;";
@@ -667,28 +671,32 @@ const ge = {
667
671
  g = " stroke-width: 3.5px;fill:none";
668
672
  break;
669
673
  }
670
- d.style = g, d.labelStyle = f, s.interpolate !== void 0 ? d.curve = q(s.interpolate, R) : r.defaultInterpolate !== void 0 ? d.curve = q(r.defaultInterpolate, R) : d.curve = q(vt.curve, R), s.text === void 0 ? s.style !== void 0 && (d.arrowheadStyle = "fill: #333") : (d.arrowheadStyle = "fill: #333", d.labelpos = "c", J(H().flowchart.htmlLabels) ? (d.labelType = "html", d.label = `<span id="L-${o}" class="edgeLabel L-${l}' L-${c}" style="${d.labelStyle}">${s.text.replace(
671
- /fa[blrs]?:fa-[\w-]+/g,
672
- (h) => `<i class='${h.replace(":", " ")}'></i>`
673
- )}</span>`) : (d.labelType = "text", d.label = s.text.replace(tt.lineBreakRegex, `
674
- `), s.style === void 0 && (d.style = d.style || "stroke: #333; stroke-width: 1.5px;fill:none"), d.labelStyle = d.labelStyle.replace("color:", "fill:"))), d.id = o, d.class = l + " " + c, d.minlen = s.length || 1, e.setEdge(t.db.lookUpDomId(s.start), t.db.lookUpDomId(s.end), d, a);
675
- });
676
- }, xe = function(r, e) {
674
+ l.style = g, l.labelStyle = c, s.interpolate !== void 0 ? l.curve = q(s.interpolate, W) : r.defaultInterpolate !== void 0 ? l.curve = q(r.defaultInterpolate, W) : l.curve = q(vt.curve, W), s.text === void 0 ? s.style !== void 0 && (l.arrowheadStyle = "fill: #333") : (l.arrowheadStyle = "fill: #333", l.labelpos = "c", J(R().flowchart.htmlLabels) ? (l.labelType = "html", l.label = `<span id="L-${o}" class="edgeLabel L-${d}' L-${u}" style="${l.labelStyle}">${await tt(
675
+ s.text.replace(
676
+ /fa[blrs]?:fa-[\w-]+/g,
677
+ // cspell:disable-line
678
+ (h) => `<i class='${h.replace(":", " ")}'></i>`
679
+ ),
680
+ R()
681
+ )}</span>`) : (l.labelType = "text", l.label = s.text.replace(et.lineBreakRegex, `
682
+ `), s.style === void 0 && (l.style = l.style || "stroke: #333; stroke-width: 1.5px;fill:none"), l.labelStyle = l.labelStyle.replace("color:", "fill:"))), l.id = o, l.class = d + " " + u, l.minlen = s.length || 1, e.setEdge(t.db.lookUpDomId(s.start), t.db.lookUpDomId(s.end), l, a);
683
+ }
684
+ }, we = function(r, e) {
677
685
  return U.info("Extracting classes"), e.db.getClasses();
678
- }, ve = function(r, e, t, a) {
686
+ }, ve = async function(r, e, t, a) {
679
687
  U.info("Drawing flowchart");
680
- const { securityLevel: n, flowchart: i } = H();
688
+ const { securityLevel: n, flowchart: i } = R();
681
689
  let s;
682
- n === "sandbox" && (s = w("#i" + e));
683
- const o = n === "sandbox" ? w(s.nodes()[0].contentDocument.body) : w("body"), l = n === "sandbox" ? s.nodes()[0].contentDocument : document;
684
- let c = a.db.getDirection();
685
- c === void 0 && (c = "TD");
686
- const d = i.nodeSpacing || 50, g = i.rankSpacing || 50, f = new kt({
690
+ n === "sandbox" && (s = v("#i" + e));
691
+ const o = n === "sandbox" ? v(s.nodes()[0].contentDocument.body) : v("body"), d = n === "sandbox" ? s.nodes()[0].contentDocument : document;
692
+ let u = a.db.getDirection();
693
+ u === void 0 && (u = "TD");
694
+ const l = i.nodeSpacing || 50, g = i.rankSpacing || 50, c = new St({
687
695
  multigraph: !0,
688
696
  compound: !0
689
697
  }).setGraph({
690
- rankdir: c,
691
- nodesep: d,
698
+ rankdir: u,
699
+ nodesep: l,
692
700
  ranksep: g,
693
701
  marginx: 8,
694
702
  marginy: 8
@@ -699,84 +707,84 @@ const ge = {
699
707
  const p = a.db.getSubGraphs();
700
708
  for (let y = p.length - 1; y >= 0; y--)
701
709
  h = p[y], a.db.addVertex(h.id, h.title, "group", void 0, h.classes);
702
- const u = a.db.getVertices();
703
- U.warn("Get vertices", u);
704
- const x = a.db.getEdges();
705
- let v = 0;
706
- for (v = p.length - 1; v >= 0; v--) {
707
- h = p[v], Mt("cluster").append("text");
710
+ const w = a.db.getVertices();
711
+ U.warn("Get vertices", w);
712
+ const f = a.db.getEdges();
713
+ let x = 0;
714
+ for (x = p.length - 1; x >= 0; x--) {
715
+ h = p[x], Bt("cluster").append("text");
708
716
  for (let y = 0; y < h.nodes.length; y++)
709
717
  U.warn(
710
718
  "Setting subgraph",
711
719
  h.nodes[y],
712
720
  a.db.lookUpDomId(h.nodes[y]),
713
721
  a.db.lookUpDomId(h.id)
714
- ), f.setParent(a.db.lookUpDomId(h.nodes[y]), a.db.lookUpDomId(h.id));
722
+ ), c.setParent(a.db.lookUpDomId(h.nodes[y]), a.db.lookUpDomId(h.id));
715
723
  }
716
- wt(u, f, e, o, l, a), bt(x, f, a);
717
- const S = new le();
718
- ge.addToRender(S), S.arrows().none = function(y, b, L, m) {
719
- const M = y.append("marker").attr("id", b).attr("viewBox", "0 0 10 10").attr("refX", 9).attr("refY", 5).attr("markerUnits", "strokeWidth").attr("markerWidth", 8).attr("markerHeight", 6).attr("orient", "auto").append("path").attr("d", "M 0 0 L 0 0 L 0 0 z");
720
- T(M, L[m + "Style"]);
721
- }, S.arrows().normal = function(y, b) {
724
+ await bt(w, c, e, o, d, a), await mt(f, c, a);
725
+ const k = new de();
726
+ ye.addToRender(k), k.arrows().none = function(y, b, L, m) {
727
+ const B = y.append("marker").attr("id", b).attr("viewBox", "0 0 10 10").attr("refX", 9).attr("refY", 5).attr("markerUnits", "strokeWidth").attr("markerWidth", 8).attr("markerHeight", 6).attr("orient", "auto").append("path").attr("d", "M 0 0 L 0 0 L 0 0 z");
728
+ T(B, L[m + "Style"]);
729
+ }, k.arrows().normal = function(y, b) {
722
730
  y.append("marker").attr("id", b).attr("viewBox", "0 0 10 10").attr("refX", 9).attr("refY", 5).attr("markerUnits", "strokeWidth").attr("markerWidth", 8).attr("markerHeight", 6).attr("orient", "auto").append("path").attr("d", "M 0 0 L 10 5 L 0 10 z").attr("class", "arrowheadPath").style("stroke-width", 1).style("stroke-dasharray", "1,0");
723
731
  };
724
- const A = o.select(`[id="${e}"]`), B = o.select("#" + e + " g");
725
- for (S(B, f), B.selectAll("g.node").attr("title", function() {
732
+ const N = o.select(`[id="${e}"]`), _ = o.select("#" + e + " g");
733
+ for (k(_, c), _.selectAll("g.node").attr("title", function() {
726
734
  return a.db.getTooltip(this.id);
727
- }), a.db.indexNodes("subGraph" + v), v = 0; v < p.length; v++)
728
- if (h = p[v], h.title !== "undefined") {
729
- const y = l.querySelectorAll(
735
+ }), a.db.indexNodes("subGraph" + x), x = 0; x < p.length; x++)
736
+ if (h = p[x], h.title !== "undefined") {
737
+ const y = d.querySelectorAll(
730
738
  "#" + e + ' [id="' + a.db.lookUpDomId(h.id) + '"] rect'
731
- ), b = l.querySelectorAll(
739
+ ), b = d.querySelectorAll(
732
740
  "#" + e + ' [id="' + a.db.lookUpDomId(h.id) + '"]'
733
- ), L = y[0].x.baseVal.value, m = y[0].y.baseVal.value, M = y[0].width.baseVal.value, $ = w(b[0]).select(".label");
734
- $.attr("transform", `translate(${L + M / 2}, ${m + 14})`), $.attr("id", e + "Text");
735
- for (let N = 0; N < h.classes.length; N++)
736
- b[0].classList.add(h.classes[N]);
741
+ ), L = y[0].x.baseVal.value, m = y[0].y.baseVal.value, B = y[0].width.baseVal.value, $ = v(b[0]).select(".label");
742
+ $.attr("transform", `translate(${L + B / 2}, ${m + 14})`), $.attr("id", e + "Text");
743
+ for (let E = 0; E < h.classes.length; E++)
744
+ b[0].classList.add(h.classes[E]);
737
745
  }
738
746
  if (!i.htmlLabels) {
739
- const y = l.querySelectorAll('[id="' + e + '"] .edgeLabel .label');
747
+ const y = d.querySelectorAll('[id="' + e + '"] .edgeLabel .label');
740
748
  for (const b of y) {
741
- const L = b.getBBox(), m = l.createElementNS("http://www.w3.org/2000/svg", "rect");
749
+ const L = b.getBBox(), m = d.createElementNS("http://www.w3.org/2000/svg", "rect");
742
750
  m.setAttribute("rx", 0), m.setAttribute("ry", 0), m.setAttribute("width", L.width), m.setAttribute("height", L.height), b.insertBefore(m, b.firstChild);
743
751
  }
744
752
  }
745
- St(f, A, i.diagramPadding, i.useMaxWidth), Object.keys(u).forEach(function(y) {
746
- const b = u[y];
753
+ _t(c, N, i.diagramPadding, i.useMaxWidth), Object.keys(w).forEach(function(y) {
754
+ const b = w[y];
747
755
  if (b.link) {
748
756
  const L = o.select("#" + e + ' [id="' + a.db.lookUpDomId(y) + '"]');
749
757
  if (L) {
750
- const m = l.createElementNS("http://www.w3.org/2000/svg", "a");
758
+ const m = d.createElementNS("http://www.w3.org/2000/svg", "a");
751
759
  m.setAttributeNS("http://www.w3.org/2000/svg", "class", b.classes.join(" ")), m.setAttributeNS("http://www.w3.org/2000/svg", "href", b.link), m.setAttributeNS("http://www.w3.org/2000/svg", "rel", "noopener"), n === "sandbox" ? m.setAttributeNS("http://www.w3.org/2000/svg", "target", "_top") : b.linkTarget && m.setAttributeNS("http://www.w3.org/2000/svg", "target", b.linkTarget);
752
- const M = L.insert(function() {
760
+ const B = L.insert(function() {
753
761
  return m;
754
762
  }, ":first-child"), $ = L.select(".label-container");
755
- $ && M.append(function() {
763
+ $ && B.append(function() {
756
764
  return $.node();
757
765
  });
758
- const N = L.select(".label");
759
- N && M.append(function() {
760
- return N.node();
766
+ const E = L.select(".label");
767
+ E && B.append(function() {
768
+ return E.node();
761
769
  });
762
770
  }
763
771
  }
764
772
  });
765
- }, we = {
766
- setConf: ye,
767
- addVertices: wt,
768
- addEdges: bt,
769
- getClasses: xe,
773
+ }, be = {
774
+ setConf: xe,
775
+ addVertices: bt,
776
+ addEdges: mt,
777
+ getClasses: we,
770
778
  draw: ve
771
- }, Ae = {
772
- parser: mt,
773
- db: W,
774
- renderer: Tt,
775
- styles: Et,
779
+ }, Ie = {
780
+ parser: kt,
781
+ db: P,
782
+ renderer: Mt,
783
+ styles: Nt,
776
784
  init: (r) => {
777
- r.flowchart || (r.flowchart = {}), r.flowchart.arrowMarkerAbsolute = r.arrowMarkerAbsolute, we.setConf(r.flowchart), W.clear(), W.setGen("gen-1");
785
+ r.flowchart || (r.flowchart = {}), r.flowchart.arrowMarkerAbsolute = r.arrowMarkerAbsolute, be.setConf(r.flowchart), P.clear(), P.setGen("gen-1");
778
786
  }
779
787
  };
780
788
  export {
781
- Ae as diagram
789
+ Ie as diagram
782
790
  };