@digipair/skill-web-chatbot 0.114.2 → 0.114.3
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/index.cjs.js +2118 -8
- package/dist/index.esm2.js +5 -5
- package/package.json +6 -2
- package/dist/SAP-icons.cjs.js +0 -2489
- package/dist/SAP-icons.cjs2.js +0 -2489
- package/dist/Tableau10-558cc280.cjs.js +0 -9
- package/dist/arc-d1f6357e.cjs.js +0 -88
- package/dist/array-2ff2c7a6.cjs.js +0 -11
- package/dist/blockDiagram-5dc23a45.cjs.js +0 -2916
- package/dist/c4Diagram-1e775db3.cjs.js +0 -4386
- package/dist/channel-ebbc4130.cjs.js +0 -9
- package/dist/classDiagram-f52caa06.cjs.js +0 -209
- package/dist/classDiagram-v2-640c694e.cjs.js +0 -401
- package/dist/clone-afc2f047.cjs.js +0 -10
- package/dist/createText-03b82060.cjs.js +0 -2940
- package/dist/edges-16357fde.cjs.js +0 -2002
- package/dist/erDiagram-c7ff1bec.cjs.js +0 -1807
- package/dist/flowDb-9a89ea33.cjs.js +0 -5542
- package/dist/flowDiagram-aadb13b0.cjs.js +0 -1351
- package/dist/flowDiagram-v2-f2119625.cjs.js +0 -31
- package/dist/flowchart-elk-definition-cf813a97.cjs.js +0 -50248
- package/dist/ganttDiagram-3c2fde2b.cjs.js +0 -3710
- package/dist/gitGraphDiagram-c3a0619c.cjs.js +0 -3815
- package/dist/graph-0ee63739.cjs.js +0 -954
- package/dist/index-bb6d8841.cjs.js +0 -648
- package/dist/index.cjs2.js +0 -76743
- package/dist/infoDiagram-2f5c50c0.cjs.js +0 -460
- package/dist/init-f9637058.cjs.js +0 -17
- package/dist/journeyDiagram-14fe341a.cjs.js +0 -1061
- package/dist/katex-d90b6d29.cjs.js +0 -25690
- package/dist/layout-fd473db2.cjs.js +0 -1613
- package/dist/line-24d93f1b.cjs.js +0 -34
- package/dist/linear-9bcf74c4.cjs.js +0 -537
- package/dist/mindmap-definition-9399c7e6.cjs.js +0 -20488
- package/dist/ordinal-5695958c.cjs.js +0 -330
- package/dist/path-428ebac9.cjs.js +0 -316
- package/dist/pieDiagram-828dae43.cjs.js +0 -949
- package/dist/quadrantDiagram-5fa00455.cjs.js +0 -2409
- package/dist/requirementDiagram-03163dc4.cjs.js +0 -2267
- package/dist/sankeyDiagram-52ec8976.cjs.js +0 -1848
- package/dist/sequenceDiagram-b517d154.cjs.js +0 -5948
- package/dist/stateDiagram-fca82b5b.cjs.js +0 -283
- package/dist/stateDiagram-v2-ed04200a.cjs.js +0 -373
- package/dist/styles-11e81fdd.cjs.js +0 -3943
- package/dist/styles-cacbff60.cjs.js +0 -2120
- package/dist/styles-e75131e4.cjs.js +0 -671
- package/dist/svgDrawCommon-ecc5f780.cjs.js +0 -68
- package/dist/timeline-definition-4ee9bff4.cjs.js +0 -1161
- package/dist/xychartDiagram-e5e6b652.cjs.js +0 -3150
|
@@ -1,283 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var stylesCacbff60 = require('./styles-cacbff60.cjs.js');
|
|
4
|
-
var index = require('./index.cjs2.js');
|
|
5
|
-
var graph0ee63739 = require('./graph-0ee63739.cjs.js');
|
|
6
|
-
var layoutFd473db2 = require('./layout-fd473db2.cjs.js');
|
|
7
|
-
var line24d93f1b = require('./line-24d93f1b.cjs.js');
|
|
8
|
-
require('./array-2ff2c7a6.cjs.js');
|
|
9
|
-
require('./path-428ebac9.cjs.js');
|
|
10
|
-
|
|
11
|
-
var j = function(e) {
|
|
12
|
-
return e.append("circle").attr("class", "start-state").attr("r", index.Vn().state.sizeUnit).attr("cx", index.Vn().state.padding + index.Vn().state.sizeUnit).attr("cy", index.Vn().state.padding + index.Vn().state.sizeUnit);
|
|
13
|
-
}, q = function(e) {
|
|
14
|
-
return e.append("line").style("stroke", "grey").style("stroke-dasharray", "3").attr("x1", index.Vn().state.textHeight).attr("class", "divider").attr("x2", index.Vn().state.textHeight * 2).attr("y1", 0).attr("y2", 0);
|
|
15
|
-
}, Z = function(e, i) {
|
|
16
|
-
var o = e.append("text").attr("x", 2 * index.Vn().state.padding).attr("y", index.Vn().state.textHeight + 2 * index.Vn().state.padding).attr("font-size", index.Vn().state.fontSize).attr("class", "state-title").text(i.id), d = o.node().getBBox();
|
|
17
|
-
return e.insert("rect", ":first-child").attr("x", index.Vn().state.padding).attr("y", index.Vn().state.padding).attr("width", d.width + 2 * index.Vn().state.padding).attr("height", d.height + 2 * index.Vn().state.padding).attr("rx", index.Vn().state.radius), o;
|
|
18
|
-
}, K = function(e, i) {
|
|
19
|
-
var o = function o(l, m, w) {
|
|
20
|
-
var k = l.append("tspan").attr("x", 2 * index.Vn().state.padding).text(m);
|
|
21
|
-
w || k.attr("dy", index.Vn().state.textHeight);
|
|
22
|
-
}, s = e.append("text").attr("x", 2 * index.Vn().state.padding).attr("y", index.Vn().state.textHeight + 1.3 * index.Vn().state.padding).attr("font-size", index.Vn().state.fontSize).attr("class", "state-title").text(i.descriptions[0]).node().getBBox(), g = s.height, p = e.append("text").attr("x", index.Vn().state.padding).attr("y", g + index.Vn().state.padding * 0.4 + index.Vn().state.dividerMargin + index.Vn().state.textHeight).attr("class", "state-description");
|
|
23
|
-
var a = true, r = true;
|
|
24
|
-
i.descriptions.forEach(function(l) {
|
|
25
|
-
a || (o(p, l, r), r = false), a = false;
|
|
26
|
-
});
|
|
27
|
-
var y = e.append("line").attr("x1", index.Vn().state.padding).attr("y1", index.Vn().state.padding + g + index.Vn().state.dividerMargin / 2).attr("y2", index.Vn().state.padding + g + index.Vn().state.dividerMargin / 2).attr("class", "descr-divider"), x = p.node().getBBox(), c = Math.max(x.width, s.width);
|
|
28
|
-
return y.attr("x2", c + 3 * index.Vn().state.padding), e.insert("rect", ":first-child").attr("x", index.Vn().state.padding).attr("y", index.Vn().state.padding).attr("width", c + 2 * index.Vn().state.padding).attr("height", x.height + g + 2 * index.Vn().state.padding).attr("rx", index.Vn().state.radius), e;
|
|
29
|
-
}, Q = function(e, i, o) {
|
|
30
|
-
var d = index.Vn().state.padding, s = 2 * index.Vn().state.padding, g = e.node().getBBox(), p = g.width, a = g.x, r = e.append("text").attr("x", 0).attr("y", index.Vn().state.titleShift).attr("font-size", index.Vn().state.fontSize).attr("class", "state-title").text(i.id), x = r.node().getBBox().width + s;
|
|
31
|
-
var c = Math.max(x, p);
|
|
32
|
-
c === p && (c = c + s);
|
|
33
|
-
var l;
|
|
34
|
-
var m = e.node().getBBox();
|
|
35
|
-
i.doc, l = a - d, x > p && (l = (p - c) / 2 + d), Math.abs(a - m.x) < d && x > p && (l = a - (x - p) / 2);
|
|
36
|
-
var w = 1 - index.Vn().state.textHeight;
|
|
37
|
-
return e.insert("rect", ":first-child").attr("x", l).attr("y", w).attr("class", o ? "alt-composit" : "composit").attr("width", c).attr("height", m.height + index.Vn().state.textHeight + index.Vn().state.titleShift + 1).attr("rx", "0"), r.attr("x", l + d), x <= p && r.attr("x", a + (c - s) / 2 - x / 2 + d), e.insert("rect", ":first-child").attr("x", l).attr("y", index.Vn().state.titleShift - index.Vn().state.textHeight - index.Vn().state.padding).attr("width", c).attr("height", index.Vn().state.textHeight * 3).attr("rx", index.Vn().state.radius), e.insert("rect", ":first-child").attr("x", l).attr("y", index.Vn().state.titleShift - index.Vn().state.textHeight - index.Vn().state.padding).attr("width", c).attr("height", m.height + 3 + 2 * index.Vn().state.textHeight).attr("rx", index.Vn().state.radius), e;
|
|
38
|
-
}, V = function(e) {
|
|
39
|
-
return e.append("circle").attr("class", "end-state-outer").attr("r", index.Vn().state.sizeUnit + index.Vn().state.miniPadding).attr("cx", index.Vn().state.padding + index.Vn().state.sizeUnit + index.Vn().state.miniPadding).attr("cy", index.Vn().state.padding + index.Vn().state.sizeUnit + index.Vn().state.miniPadding), e.append("circle").attr("class", "end-state-inner").attr("r", index.Vn().state.sizeUnit).attr("cx", index.Vn().state.padding + index.Vn().state.sizeUnit + 2).attr("cy", index.Vn().state.padding + index.Vn().state.sizeUnit + 2);
|
|
40
|
-
}, D = function(e, i) {
|
|
41
|
-
var o = index.Vn().state.forkWidth, d = index.Vn().state.forkHeight;
|
|
42
|
-
if (i.parentId) {
|
|
43
|
-
var s = o;
|
|
44
|
-
o = d, d = s;
|
|
45
|
-
}
|
|
46
|
-
return e.append("rect").style("stroke", "black").style("fill", "black").attr("width", o).attr("height", d).attr("x", index.Vn().state.padding).attr("y", index.Vn().state.padding);
|
|
47
|
-
}, tt = function(e, i, o, d) {
|
|
48
|
-
var s = 0;
|
|
49
|
-
var g = d.append("text");
|
|
50
|
-
g.style("text-anchor", "start"), g.attr("class", "noteText");
|
|
51
|
-
var p = e.replace(/\r\n/g, "<br/>");
|
|
52
|
-
p = p.replace(/\n/g, "<br/>");
|
|
53
|
-
var a = p.split(index.$n.lineBreakRegex);
|
|
54
|
-
var r = 1.25 * index.Vn().state.noteMargin;
|
|
55
|
-
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
|
|
56
|
-
try {
|
|
57
|
-
for(var _iterator = a[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
|
|
58
|
-
var y = _step.value;
|
|
59
|
-
var x = y.trim();
|
|
60
|
-
if (x.length > 0) {
|
|
61
|
-
var c = g.append("tspan");
|
|
62
|
-
if (c.text(x), r === 0) {
|
|
63
|
-
var l = c.node().getBBox();
|
|
64
|
-
r += l.height;
|
|
65
|
-
}
|
|
66
|
-
s += r, c.attr("x", i + index.Vn().state.noteMargin), c.attr("y", o + s + 1.25 * index.Vn().state.noteMargin);
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
} catch (err) {
|
|
70
|
-
_didIteratorError = true;
|
|
71
|
-
_iteratorError = err;
|
|
72
|
-
} finally{
|
|
73
|
-
try {
|
|
74
|
-
if (!_iteratorNormalCompletion && _iterator.return != null) {
|
|
75
|
-
_iterator.return();
|
|
76
|
-
}
|
|
77
|
-
} finally{
|
|
78
|
-
if (_didIteratorError) {
|
|
79
|
-
throw _iteratorError;
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
return {
|
|
84
|
-
textWidth: g.node().getBBox().width,
|
|
85
|
-
textHeight: s
|
|
86
|
-
};
|
|
87
|
-
}, et = function(e, i) {
|
|
88
|
-
i.attr("class", "state-note");
|
|
89
|
-
var o = i.append("rect").attr("x", 0).attr("y", index.Vn().state.padding), d = i.append("g"), _tt = tt(e, 0, 0, d), s = _tt.textWidth, g = _tt.textHeight;
|
|
90
|
-
return o.attr("height", g + 2 * index.Vn().state.noteMargin), o.attr("width", s + index.Vn().state.noteMargin * 2), o;
|
|
91
|
-
}, A = function A(e, i) {
|
|
92
|
-
var o = i.id, d = {
|
|
93
|
-
id: o,
|
|
94
|
-
label: i.id,
|
|
95
|
-
width: 0,
|
|
96
|
-
height: 0
|
|
97
|
-
}, s = e.append("g").attr("id", o).attr("class", "stateGroup");
|
|
98
|
-
i.type === "start" && j(s), i.type === "end" && V(s), (i.type === "fork" || i.type === "join") && D(s, i), i.type === "note" && et(i.note.text, s), i.type === "divider" && q(s), i.type === "default" && i.descriptions.length === 0 && Z(s, i), i.type === "default" && i.descriptions.length > 0 && K(s, i);
|
|
99
|
-
var g = s.node().getBBox();
|
|
100
|
-
return d.width = g.width + 2 * index.Vn().state.padding, d.height = g.height + 2 * index.Vn().state.padding, d;
|
|
101
|
-
};
|
|
102
|
-
var G = 0;
|
|
103
|
-
var at = function at(e, i, o) {
|
|
104
|
-
var d = function d(r) {
|
|
105
|
-
switch(r){
|
|
106
|
-
case stylesCacbff60.Ae.relationType.AGGREGATION:
|
|
107
|
-
return "aggregation";
|
|
108
|
-
case stylesCacbff60.Ae.relationType.EXTENSION:
|
|
109
|
-
return "extension";
|
|
110
|
-
case stylesCacbff60.Ae.relationType.COMPOSITION:
|
|
111
|
-
return "composition";
|
|
112
|
-
case stylesCacbff60.Ae.relationType.DEPENDENCY:
|
|
113
|
-
return "dependency";
|
|
114
|
-
}
|
|
115
|
-
};
|
|
116
|
-
i.points = i.points.filter(function(r) {
|
|
117
|
-
return !Number.isNaN(r.y);
|
|
118
|
-
});
|
|
119
|
-
var s = i.points, g = line24d93f1b.P().x(function(r) {
|
|
120
|
-
return r.x;
|
|
121
|
-
}).y(function(r) {
|
|
122
|
-
return r.y;
|
|
123
|
-
}).curve(index.Pf), p = e.append("path").attr("d", g(s)).attr("id", "edge" + G).attr("class", "transition");
|
|
124
|
-
var a = "";
|
|
125
|
-
if (index.Vn().state.arrowMarkerAbsolute && (a = window.location.protocol + "//" + window.location.host + window.location.pathname + window.location.search, a = a.replace(/\(/g, "\\("), a = a.replace(/\)/g, "\\)")), p.attr("marker-end", "url(" + a + "#" + d(stylesCacbff60.Ae.relationType.DEPENDENCY) + "End)"), o.title !== void 0) {
|
|
126
|
-
var r = e.append("g").attr("class", "stateLabel"), _F_calcLabelPosition = index.ei.calcLabelPosition(i.points), y = _F_calcLabelPosition.x, x = _F_calcLabelPosition.y, c = index.$n.getRows(o.title);
|
|
127
|
-
var l = 0;
|
|
128
|
-
var m = [];
|
|
129
|
-
var w = 0, k = 0;
|
|
130
|
-
for(var u = 0; u <= c.length; u++){
|
|
131
|
-
var h = r.append("text").attr("text-anchor", "middle").text(c[u]).attr("x", y).attr("y", x + l), f = h.node().getBBox();
|
|
132
|
-
w = Math.max(w, f.width), k = Math.min(k, f.x), index.L.info(f.x, y, x + l), l === 0 && (l = h.node().getBBox().height, index.L.info("Title height", l, x)), m.push(h);
|
|
133
|
-
}
|
|
134
|
-
var E = l * c.length;
|
|
135
|
-
if (c.length > 1) {
|
|
136
|
-
var u1 = (c.length - 1) * l * 0.5;
|
|
137
|
-
m.forEach(function(h, f) {
|
|
138
|
-
return h.attr("y", x + f * l - u1);
|
|
139
|
-
}), E = l * c.length;
|
|
140
|
-
}
|
|
141
|
-
var n = r.node().getBBox();
|
|
142
|
-
r.insert("rect", ":first-child").attr("class", "box").attr("x", y - w / 2 - index.Vn().state.padding / 2).attr("y", x - E / 2 - index.Vn().state.padding / 2 - 3.5).attr("width", w + index.Vn().state.padding).attr("height", E + index.Vn().state.padding), index.L.info(n);
|
|
143
|
-
}
|
|
144
|
-
G++;
|
|
145
|
-
};
|
|
146
|
-
var B;
|
|
147
|
-
var z = {}, it = function it() {}, nt = function nt(e) {
|
|
148
|
-
e.append("defs").append("marker").attr("id", "dependencyEnd").attr("refX", 19).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 19,7 L9,13 L14,7 L9,1 Z");
|
|
149
|
-
}, st = function st(e, i, o, d) {
|
|
150
|
-
B = index.Vn().state;
|
|
151
|
-
var s = index.Vn().securityLevel;
|
|
152
|
-
var g;
|
|
153
|
-
s === "sandbox" && (g = index.bt("#i" + i));
|
|
154
|
-
var p = s === "sandbox" ? index.bt(g.nodes()[0].contentDocument.body) : index.bt("body"), a = s === "sandbox" ? g.nodes()[0].contentDocument : document;
|
|
155
|
-
index.L.debug("Rendering diagram " + e);
|
|
156
|
-
var r = p.select("[id='".concat(i, "']"));
|
|
157
|
-
nt(r);
|
|
158
|
-
var y = d.db.getRootDoc();
|
|
159
|
-
W(y, r, void 0, false, p, a, d);
|
|
160
|
-
var x = B.padding, c = r.node().getBBox(), l = c.width + x * 2, m = c.height + x * 2, w = l * 1.75;
|
|
161
|
-
index.Ol(r, m, w, B.useMaxWidth), r.attr("viewBox", "".concat(c.x - B.padding, " ").concat(c.y - B.padding, " ") + l + " " + m);
|
|
162
|
-
}, rt = function(e) {
|
|
163
|
-
return e ? e.length * B.fontSizeFactor : 1;
|
|
164
|
-
}, W = function(e, i, o, d, s, g, p) {
|
|
165
|
-
var a = new graph0ee63739.Ze({
|
|
166
|
-
compound: true,
|
|
167
|
-
multigraph: true
|
|
168
|
-
});
|
|
169
|
-
var r, y = true;
|
|
170
|
-
for(r = 0; r < e.length; r++)if (e[r].stmt === "relation") {
|
|
171
|
-
y = false;
|
|
172
|
-
break;
|
|
173
|
-
}
|
|
174
|
-
o ? a.setGraph({
|
|
175
|
-
rankdir: "LR",
|
|
176
|
-
multigraph: true,
|
|
177
|
-
compound: true,
|
|
178
|
-
// acyclicer: 'greedy',
|
|
179
|
-
ranker: "tight-tree",
|
|
180
|
-
ranksep: y ? 1 : B.edgeLengthFactor,
|
|
181
|
-
nodeSep: y ? 1 : 50,
|
|
182
|
-
isMultiGraph: true
|
|
183
|
-
}) : a.setGraph({
|
|
184
|
-
rankdir: "TB",
|
|
185
|
-
multigraph: true,
|
|
186
|
-
compound: true,
|
|
187
|
-
// isCompound: true,
|
|
188
|
-
// acyclicer: 'greedy',
|
|
189
|
-
// ranker: 'longest-path'
|
|
190
|
-
ranksep: y ? 1 : B.edgeLengthFactor,
|
|
191
|
-
nodeSep: y ? 1 : 50,
|
|
192
|
-
ranker: "tight-tree",
|
|
193
|
-
// ranker: 'network-simplex'
|
|
194
|
-
isMultiGraph: true
|
|
195
|
-
}), a.setDefaultEdgeLabel(function() {
|
|
196
|
-
return {};
|
|
197
|
-
}), p.db.extract(e);
|
|
198
|
-
var x = p.db.getStates(), c = p.db.getRelations(), l = Object.keys(x);
|
|
199
|
-
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
|
|
200
|
-
try {
|
|
201
|
-
for(var _iterator = l[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
|
|
202
|
-
var n = _step.value;
|
|
203
|
-
var u = x[n];
|
|
204
|
-
o && (u.parentId = o);
|
|
205
|
-
var h = void 0;
|
|
206
|
-
if (u.doc) {
|
|
207
|
-
var f = i.append("g").attr("id", u.id).attr("class", "stateGroup");
|
|
208
|
-
h = W(u.doc, f, u.id, !d, s, g, p);
|
|
209
|
-
{
|
|
210
|
-
f = Q(f, u, d);
|
|
211
|
-
var S = f.node().getBBox();
|
|
212
|
-
h.width = S.width, h.height = S.height + B.padding / 2, z[u.id] = {
|
|
213
|
-
y: B.compositTitleSize
|
|
214
|
-
};
|
|
215
|
-
}
|
|
216
|
-
} else h = A(i, u);
|
|
217
|
-
if (u.note) {
|
|
218
|
-
var f1 = {
|
|
219
|
-
descriptions: [],
|
|
220
|
-
id: u.id + "-note",
|
|
221
|
-
note: u.note,
|
|
222
|
-
type: "note"
|
|
223
|
-
}, S1 = A(i, f1);
|
|
224
|
-
u.note.position === "left of" ? (a.setNode(h.id + "-note", S1), a.setNode(h.id, h)) : (a.setNode(h.id, h), a.setNode(h.id + "-note", S1)), a.setParent(h.id, h.id + "-group"), a.setParent(h.id + "-note", h.id + "-group");
|
|
225
|
-
} else a.setNode(h.id, h);
|
|
226
|
-
}
|
|
227
|
-
} catch (err) {
|
|
228
|
-
_didIteratorError = true;
|
|
229
|
-
_iteratorError = err;
|
|
230
|
-
} finally{
|
|
231
|
-
try {
|
|
232
|
-
if (!_iteratorNormalCompletion && _iterator.return != null) {
|
|
233
|
-
_iterator.return();
|
|
234
|
-
}
|
|
235
|
-
} finally{
|
|
236
|
-
if (_didIteratorError) {
|
|
237
|
-
throw _iteratorError;
|
|
238
|
-
}
|
|
239
|
-
}
|
|
240
|
-
}
|
|
241
|
-
index.L.debug("Count=", a.nodeCount(), a);
|
|
242
|
-
var m = 0;
|
|
243
|
-
c.forEach(function(n) {
|
|
244
|
-
m++, index.L.debug("Setting edge", n), a.setEdge(n.id1, n.id2, {
|
|
245
|
-
relation: n,
|
|
246
|
-
width: rt(n.title),
|
|
247
|
-
height: B.labelHeight * index.$n.getRows(n.title).length,
|
|
248
|
-
labelpos: "c"
|
|
249
|
-
}, "id" + m);
|
|
250
|
-
}), layoutFd473db2.Yt(a), index.L.debug("Graph after layout", a.nodes());
|
|
251
|
-
var w = i.node();
|
|
252
|
-
a.nodes().forEach(function(n) {
|
|
253
|
-
n !== void 0 && a.node(n) !== void 0 ? (index.L.warn("Node " + n + ": " + JSON.stringify(a.node(n))), s.select("#" + w.id + " #" + n).attr("transform", "translate(" + (a.node(n).x - a.node(n).width / 2) + "," + (a.node(n).y + (z[n] ? z[n].y : 0) - a.node(n).height / 2) + " )"), s.select("#" + w.id + " #" + n).attr("data-x-shift", a.node(n).x - a.node(n).width / 2), g.querySelectorAll("#" + w.id + " #" + n + " .divider").forEach(function(h) {
|
|
254
|
-
var f = h.parentElement;
|
|
255
|
-
var S = 0, M = 0;
|
|
256
|
-
f && (f.parentElement && (S = f.parentElement.getBBox().width), M = parseInt(f.getAttribute("data-x-shift"), 10), Number.isNaN(M) && (M = 0)), h.setAttribute("x1", 0 - M + 8), h.setAttribute("x2", S - M - 8);
|
|
257
|
-
})) : index.L.debug("No Node " + n + ": " + JSON.stringify(a.node(n)));
|
|
258
|
-
});
|
|
259
|
-
var k = w.getBBox();
|
|
260
|
-
a.edges().forEach(function(n) {
|
|
261
|
-
n !== void 0 && a.edge(n) !== void 0 && (index.L.debug("Edge " + n.v + " -> " + n.w + ": " + JSON.stringify(a.edge(n))), at(i, a.edge(n), a.edge(n).relation));
|
|
262
|
-
}), k = w.getBBox();
|
|
263
|
-
var E = {
|
|
264
|
-
id: o || "root",
|
|
265
|
-
label: o || "root",
|
|
266
|
-
width: 0,
|
|
267
|
-
height: 0
|
|
268
|
-
};
|
|
269
|
-
return E.width = k.width + 2 * B.padding, E.height = k.height + 2 * B.padding, index.L.debug("Doc rendered", E, a), E;
|
|
270
|
-
}, ot = {
|
|
271
|
-
setConf: it,
|
|
272
|
-
draw: st
|
|
273
|
-
}, ut = {
|
|
274
|
-
parser: stylesCacbff60.De,
|
|
275
|
-
db: stylesCacbff60.Ae,
|
|
276
|
-
renderer: ot,
|
|
277
|
-
styles: stylesCacbff60.Le,
|
|
278
|
-
init: function(e) {
|
|
279
|
-
e.state || (e.state = {}), e.state.arrowMarkerAbsolute = e.arrowMarkerAbsolute, stylesCacbff60.Ae.clear();
|
|
280
|
-
}
|
|
281
|
-
};
|
|
282
|
-
|
|
283
|
-
exports.diagram = ut;
|
|
@@ -1,373 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var stylesCacbff60 = require('./styles-cacbff60.cjs.js');
|
|
4
|
-
var graph0ee63739 = require('./graph-0ee63739.cjs.js');
|
|
5
|
-
var index = require('./index.cjs2.js');
|
|
6
|
-
var indexBb6d8841 = require('./index-bb6d8841.cjs.js');
|
|
7
|
-
require('./layout-fd473db2.cjs.js');
|
|
8
|
-
require('./clone-afc2f047.cjs.js');
|
|
9
|
-
require('./edges-16357fde.cjs.js');
|
|
10
|
-
require('./createText-03b82060.cjs.js');
|
|
11
|
-
require('./line-24d93f1b.cjs.js');
|
|
12
|
-
require('./array-2ff2c7a6.cjs.js');
|
|
13
|
-
require('./path-428ebac9.cjs.js');
|
|
14
|
-
|
|
15
|
-
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
|
|
16
|
-
try {
|
|
17
|
-
var info = gen[key](arg);
|
|
18
|
-
var value = info.value;
|
|
19
|
-
} catch (error) {
|
|
20
|
-
reject(error);
|
|
21
|
-
return;
|
|
22
|
-
}
|
|
23
|
-
if (info.done) {
|
|
24
|
-
resolve(value);
|
|
25
|
-
} else {
|
|
26
|
-
Promise.resolve(value).then(_next, _throw);
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
function _async_to_generator(fn) {
|
|
30
|
-
return function() {
|
|
31
|
-
var self = this, args = arguments;
|
|
32
|
-
return new Promise(function(resolve, reject) {
|
|
33
|
-
var gen = fn.apply(self, args);
|
|
34
|
-
function _next(value) {
|
|
35
|
-
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
|
|
36
|
-
}
|
|
37
|
-
function _throw(err) {
|
|
38
|
-
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
|
|
39
|
-
}
|
|
40
|
-
_next(undefined);
|
|
41
|
-
});
|
|
42
|
-
};
|
|
43
|
-
}
|
|
44
|
-
function _ts_generator(thisArg, body) {
|
|
45
|
-
var f, y, t, g, _ = {
|
|
46
|
-
label: 0,
|
|
47
|
-
sent: function() {
|
|
48
|
-
if (t[0] & 1) throw t[1];
|
|
49
|
-
return t[1];
|
|
50
|
-
},
|
|
51
|
-
trys: [],
|
|
52
|
-
ops: []
|
|
53
|
-
};
|
|
54
|
-
return g = {
|
|
55
|
-
next: verb(0),
|
|
56
|
-
"throw": verb(1),
|
|
57
|
-
"return": verb(2)
|
|
58
|
-
}, typeof Symbol === "function" && (g[Symbol.iterator] = function() {
|
|
59
|
-
return this;
|
|
60
|
-
}), g;
|
|
61
|
-
function verb(n) {
|
|
62
|
-
return function(v) {
|
|
63
|
-
return step([
|
|
64
|
-
n,
|
|
65
|
-
v
|
|
66
|
-
]);
|
|
67
|
-
};
|
|
68
|
-
}
|
|
69
|
-
function step(op) {
|
|
70
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
71
|
-
while(_)try {
|
|
72
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
73
|
-
if (y = 0, t) op = [
|
|
74
|
-
op[0] & 2,
|
|
75
|
-
t.value
|
|
76
|
-
];
|
|
77
|
-
switch(op[0]){
|
|
78
|
-
case 0:
|
|
79
|
-
case 1:
|
|
80
|
-
t = op;
|
|
81
|
-
break;
|
|
82
|
-
case 4:
|
|
83
|
-
_.label++;
|
|
84
|
-
return {
|
|
85
|
-
value: op[1],
|
|
86
|
-
done: false
|
|
87
|
-
};
|
|
88
|
-
case 5:
|
|
89
|
-
_.label++;
|
|
90
|
-
y = op[1];
|
|
91
|
-
op = [
|
|
92
|
-
0
|
|
93
|
-
];
|
|
94
|
-
continue;
|
|
95
|
-
case 7:
|
|
96
|
-
op = _.ops.pop();
|
|
97
|
-
_.trys.pop();
|
|
98
|
-
continue;
|
|
99
|
-
default:
|
|
100
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
|
|
101
|
-
_ = 0;
|
|
102
|
-
continue;
|
|
103
|
-
}
|
|
104
|
-
if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
|
|
105
|
-
_.label = op[1];
|
|
106
|
-
break;
|
|
107
|
-
}
|
|
108
|
-
if (op[0] === 6 && _.label < t[1]) {
|
|
109
|
-
_.label = t[1];
|
|
110
|
-
t = op;
|
|
111
|
-
break;
|
|
112
|
-
}
|
|
113
|
-
if (t && _.label < t[2]) {
|
|
114
|
-
_.label = t[2];
|
|
115
|
-
_.ops.push(op);
|
|
116
|
-
break;
|
|
117
|
-
}
|
|
118
|
-
if (t[2]) _.ops.pop();
|
|
119
|
-
_.trys.pop();
|
|
120
|
-
continue;
|
|
121
|
-
}
|
|
122
|
-
op = body.call(thisArg, _);
|
|
123
|
-
} catch (e) {
|
|
124
|
-
op = [
|
|
125
|
-
6,
|
|
126
|
-
e
|
|
127
|
-
];
|
|
128
|
-
y = 0;
|
|
129
|
-
} finally{
|
|
130
|
-
f = t = 0;
|
|
131
|
-
}
|
|
132
|
-
if (op[0] & 5) throw op[1];
|
|
133
|
-
return {
|
|
134
|
-
value: op[0] ? op[1] : void 0,
|
|
135
|
-
done: true
|
|
136
|
-
};
|
|
137
|
-
}
|
|
138
|
-
}
|
|
139
|
-
var h = "rect", C = "rectWithTitle", nt = "start", ct = "end", it = "divider", rt = "roundedWithTitle", lt = "note", at = "noteGroup", _ = "statediagram", dt = "state", Et = "".concat(_, "-").concat(dt), U = "transition", St = "note", Tt = "note-edge", pt = "".concat(U, " ").concat(Tt), _t = "".concat(_, "-").concat(St), ut = "cluster", ft = "".concat(_, "-").concat(ut), Dt = "cluster-alt", bt = "".concat(_, "-").concat(Dt), V = "parent", Y = "note", At = "state", N = "----", ht = "".concat(N).concat(Y), v = "".concat(N).concat(V), W = "fill:none", m = "fill: #333", z = "c", j = "text", q = "normal";
|
|
140
|
-
var y = {}, d = 0;
|
|
141
|
-
var yt = function yt(t) {
|
|
142
|
-
var n = Object.keys(t);
|
|
143
|
-
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
|
|
144
|
-
try {
|
|
145
|
-
for(var _iterator = n[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
|
|
146
|
-
var e = _step.value;
|
|
147
|
-
t[e];
|
|
148
|
-
}
|
|
149
|
-
} catch (err) {
|
|
150
|
-
_didIteratorError = true;
|
|
151
|
-
_iteratorError = err;
|
|
152
|
-
} finally{
|
|
153
|
-
try {
|
|
154
|
-
if (!_iteratorNormalCompletion && _iterator.return != null) {
|
|
155
|
-
_iterator.return();
|
|
156
|
-
}
|
|
157
|
-
} finally{
|
|
158
|
-
if (_didIteratorError) {
|
|
159
|
-
throw _iteratorError;
|
|
160
|
-
}
|
|
161
|
-
}
|
|
162
|
-
}
|
|
163
|
-
}, gt = function gt(t, n) {
|
|
164
|
-
return n.db.extract(n.db.getRootDocV2()), n.db.getClasses();
|
|
165
|
-
};
|
|
166
|
-
function xt(t) {
|
|
167
|
-
return t == null ? "" : t.classes ? t.classes.join(" ") : "";
|
|
168
|
-
}
|
|
169
|
-
function R() {
|
|
170
|
-
var t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "", n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0, e = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : "", c = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : N;
|
|
171
|
-
var i = e !== null && e.length > 0 ? "".concat(c).concat(e) : "";
|
|
172
|
-
return "".concat(At, "-").concat(t).concat(i, "-").concat(n);
|
|
173
|
-
}
|
|
174
|
-
var A = function(t, n, e, c, i, r) {
|
|
175
|
-
var o = e.id, u = xt(c[o]);
|
|
176
|
-
if (o !== "root") {
|
|
177
|
-
var T = h;
|
|
178
|
-
e.start === true && (T = nt), e.start === false && (T = ct), e.type !== stylesCacbff60.Et && (T = e.type), y[o] || (y[o] = {
|
|
179
|
-
id: o,
|
|
180
|
-
shape: T,
|
|
181
|
-
description: index.$n.sanitizeText(o, index.Vn()),
|
|
182
|
-
classes: "".concat(u, " ").concat(Et)
|
|
183
|
-
});
|
|
184
|
-
var s = y[o];
|
|
185
|
-
e.description && (Array.isArray(s.description) ? (s.shape = C, s.description.push(e.description)) : s.description.length > 0 ? (s.shape = C, s.description === o ? s.description = [
|
|
186
|
-
e.description
|
|
187
|
-
] : s.description = [
|
|
188
|
-
s.description,
|
|
189
|
-
e.description
|
|
190
|
-
]) : (s.shape = h, s.description = e.description), s.description = index.$n.sanitizeTextOrArray(s.description, index.Vn())), s.description.length === 1 && s.shape === C && (s.shape = h), !s.type && e.doc && (index.L.info("Setting cluster for ", o, G(e)), s.type = "group", s.dir = G(e), s.shape = e.type === stylesCacbff60.te ? it : rt, s.classes = s.classes + " " + ft + " " + (r ? bt : ""));
|
|
191
|
-
var p = {
|
|
192
|
-
labelStyle: "",
|
|
193
|
-
shape: s.shape,
|
|
194
|
-
labelText: s.description,
|
|
195
|
-
// typeof newNode.description === 'object'
|
|
196
|
-
// ? newNode.description[0]
|
|
197
|
-
// : newNode.description,
|
|
198
|
-
classes: s.classes,
|
|
199
|
-
style: "",
|
|
200
|
-
//styles.style,
|
|
201
|
-
id: o,
|
|
202
|
-
dir: s.dir,
|
|
203
|
-
domId: R(o, d),
|
|
204
|
-
type: s.type,
|
|
205
|
-
padding: 15
|
|
206
|
-
};
|
|
207
|
-
if (p.centerLabel = true, e.note) {
|
|
208
|
-
var l = {
|
|
209
|
-
labelStyle: "",
|
|
210
|
-
shape: lt,
|
|
211
|
-
labelText: e.note.text,
|
|
212
|
-
classes: _t,
|
|
213
|
-
// useHtmlLabels: false,
|
|
214
|
-
style: "",
|
|
215
|
-
// styles.style,
|
|
216
|
-
id: o + ht + "-" + d,
|
|
217
|
-
domId: R(o, d, Y),
|
|
218
|
-
type: s.type,
|
|
219
|
-
padding: 15
|
|
220
|
-
}, a = {
|
|
221
|
-
labelStyle: "",
|
|
222
|
-
shape: at,
|
|
223
|
-
labelText: e.note.text,
|
|
224
|
-
classes: s.classes,
|
|
225
|
-
style: "",
|
|
226
|
-
// styles.style,
|
|
227
|
-
id: o + v,
|
|
228
|
-
domId: R(o, d, V),
|
|
229
|
-
type: "group",
|
|
230
|
-
padding: 0
|
|
231
|
-
};
|
|
232
|
-
d++;
|
|
233
|
-
var f = o + v;
|
|
234
|
-
t.setNode(f, a), t.setNode(l.id, l), t.setNode(o, p), t.setParent(o, f), t.setParent(l.id, f);
|
|
235
|
-
var S = o, D = l.id;
|
|
236
|
-
e.note.position === "left of" && (S = l.id, D = o), t.setEdge(S, D, {
|
|
237
|
-
arrowhead: "none",
|
|
238
|
-
arrowType: "",
|
|
239
|
-
style: W,
|
|
240
|
-
labelStyle: "",
|
|
241
|
-
classes: pt,
|
|
242
|
-
arrowheadStyle: m,
|
|
243
|
-
labelpos: z,
|
|
244
|
-
labelType: j,
|
|
245
|
-
thickness: q
|
|
246
|
-
});
|
|
247
|
-
} else t.setNode(o, p);
|
|
248
|
-
}
|
|
249
|
-
n && n.id !== "root" && (index.L.trace("Setting node ", o, " to be child of its parent ", n.id), t.setParent(o, n.id)), e.doc && (index.L.trace("Adding nodes children "), $t(t, e, e.doc, c, i, !r));
|
|
250
|
-
}, $t = function(t, n, e, c, i, r) {
|
|
251
|
-
index.L.trace("items", e), e.forEach(function(o) {
|
|
252
|
-
switch(o.stmt){
|
|
253
|
-
case stylesCacbff60._t:
|
|
254
|
-
A(t, n, o, c, i, r);
|
|
255
|
-
break;
|
|
256
|
-
case stylesCacbff60.Et:
|
|
257
|
-
A(t, n, o, c, i, r);
|
|
258
|
-
break;
|
|
259
|
-
case stylesCacbff60.It:
|
|
260
|
-
{
|
|
261
|
-
A(t, n, o.state1, c, i, r), A(t, n, o.state2, c, i, r);
|
|
262
|
-
var u = {
|
|
263
|
-
id: "edge" + d,
|
|
264
|
-
arrowhead: "normal",
|
|
265
|
-
arrowTypeEnd: "arrow_barb",
|
|
266
|
-
style: W,
|
|
267
|
-
labelStyle: "",
|
|
268
|
-
label: index.$n.sanitizeText(o.description, index.Vn()),
|
|
269
|
-
arrowheadStyle: m,
|
|
270
|
-
labelpos: z,
|
|
271
|
-
labelType: j,
|
|
272
|
-
thickness: q,
|
|
273
|
-
classes: U
|
|
274
|
-
};
|
|
275
|
-
t.setEdge(o.state1.id, o.state2.id, u, d), d++;
|
|
276
|
-
}
|
|
277
|
-
break;
|
|
278
|
-
}
|
|
279
|
-
});
|
|
280
|
-
}, G = function(t) {
|
|
281
|
-
var n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : stylesCacbff60.Ce;
|
|
282
|
-
var e = n;
|
|
283
|
-
if (t.doc) for(var c = 0; c < t.doc.length; c++){
|
|
284
|
-
var i = t.doc[c];
|
|
285
|
-
i.stmt === "dir" && (e = i.value);
|
|
286
|
-
}
|
|
287
|
-
return e;
|
|
288
|
-
}, Ct = function() {
|
|
289
|
-
var _ref = _async_to_generator(function(t, n, e, c) {
|
|
290
|
-
var _g, i, r, o, u, T, s, p, l, a, f, S, D, L, P, O, k, K, _iteratorNormalCompletion, _didIteratorError, _iteratorError, _iterator, _step, x, B, b;
|
|
291
|
-
return _ts_generator(this, function(_state) {
|
|
292
|
-
switch(_state.label){
|
|
293
|
-
case 0:
|
|
294
|
-
index.L.info("Drawing state diagram (v2)", n), y = {}, c.db.getDirection();
|
|
295
|
-
_g = index.Vn(), i = _g.securityLevel, r = _g.state, o = r.nodeSpacing || 50, u = r.rankSpacing || 50;
|
|
296
|
-
index.L.info(c.db.getRootDocV2()), c.db.extract(c.db.getRootDocV2()), index.L.info(c.db.getRootDocV2());
|
|
297
|
-
T = c.db.getStates(), s = new graph0ee63739.Ze({
|
|
298
|
-
multigraph: true,
|
|
299
|
-
compound: true
|
|
300
|
-
}).setGraph({
|
|
301
|
-
rankdir: G(c.db.getRootDocV2()),
|
|
302
|
-
nodesep: o,
|
|
303
|
-
ranksep: u,
|
|
304
|
-
marginx: 8,
|
|
305
|
-
marginy: 8
|
|
306
|
-
}).setDefaultEdgeLabel(function() {
|
|
307
|
-
return {};
|
|
308
|
-
});
|
|
309
|
-
A(s, void 0, c.db.getRootDocV2(), T, c.db, true);
|
|
310
|
-
i === "sandbox" && (p = index.bt("#i" + n));
|
|
311
|
-
l = i === "sandbox" ? index.bt(p.nodes()[0].contentDocument.body) : index.bt("body"), a = l.select('[id="'.concat(n, '"]')), f = l.select("#" + n + " g");
|
|
312
|
-
return [
|
|
313
|
-
4,
|
|
314
|
-
indexBb6d8841.bt(f, s, [
|
|
315
|
-
"barb"
|
|
316
|
-
], _, n)
|
|
317
|
-
];
|
|
318
|
-
case 1:
|
|
319
|
-
_state.sent();
|
|
320
|
-
S = 8;
|
|
321
|
-
index.ei.insertTitle(a, "statediagramTitleText", r.titleTopMargin, c.db.getDiagramTitle());
|
|
322
|
-
D = a.node().getBBox(), L = D.width + S * 2, P = D.height + S * 2;
|
|
323
|
-
a.attr("class", _);
|
|
324
|
-
O = a.node().getBBox();
|
|
325
|
-
index.Ol(a, P, L, r.useMaxWidth);
|
|
326
|
-
k = "".concat(O.x - S, " ").concat(O.y - S, " ").concat(L, " ").concat(P);
|
|
327
|
-
index.L.debug("viewBox ".concat(k)), a.attr("viewBox", k);
|
|
328
|
-
K = document.querySelectorAll('[id="' + n + '"] .edgeLabel .label');
|
|
329
|
-
_iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
|
|
330
|
-
try {
|
|
331
|
-
for(_iterator = K[Symbol.iterator](); !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
|
|
332
|
-
x = _step.value;
|
|
333
|
-
B = x.getBBox(), b = document.createElementNS("http://www.w3.org/2000/svg", h);
|
|
334
|
-
b.setAttribute("rx", 0), b.setAttribute("ry", 0), b.setAttribute("width", B.width), b.setAttribute("height", B.height), x.insertBefore(b, x.firstChild);
|
|
335
|
-
}
|
|
336
|
-
} catch (err) {
|
|
337
|
-
_didIteratorError = true;
|
|
338
|
-
_iteratorError = err;
|
|
339
|
-
} finally{
|
|
340
|
-
try {
|
|
341
|
-
if (!_iteratorNormalCompletion && _iterator.return != null) {
|
|
342
|
-
_iterator.return();
|
|
343
|
-
}
|
|
344
|
-
} finally{
|
|
345
|
-
if (_didIteratorError) {
|
|
346
|
-
throw _iteratorError;
|
|
347
|
-
}
|
|
348
|
-
}
|
|
349
|
-
}
|
|
350
|
-
return [
|
|
351
|
-
2
|
|
352
|
-
];
|
|
353
|
-
}
|
|
354
|
-
});
|
|
355
|
-
});
|
|
356
|
-
return function Ct(t, n, e, c) {
|
|
357
|
-
return _ref.apply(this, arguments);
|
|
358
|
-
};
|
|
359
|
-
}(), Rt = {
|
|
360
|
-
setConf: yt,
|
|
361
|
-
getClasses: gt,
|
|
362
|
-
draw: Ct
|
|
363
|
-
}, Ut = {
|
|
364
|
-
parser: stylesCacbff60.De,
|
|
365
|
-
db: stylesCacbff60.Ae,
|
|
366
|
-
renderer: Rt,
|
|
367
|
-
styles: stylesCacbff60.Le,
|
|
368
|
-
init: function(t) {
|
|
369
|
-
t.state || (t.state = {}), t.state.arrowMarkerAbsolute = t.arrowMarkerAbsolute, stylesCacbff60.Ae.clear();
|
|
370
|
-
}
|
|
371
|
-
};
|
|
372
|
-
|
|
373
|
-
exports.diagram = Ut;
|