hub-ui-x 0.0.1
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/README.md +5 -0
- package/dist/_basePickBy-C1WsytTM.js +151 -0
- package/dist/_baseUniq-CGQBVjq6.js +614 -0
- package/dist/arc-CfWEFjh8.js +84 -0
- package/dist/architecture-4AB2E3PP-DcT_AgQk.js +5 -0
- package/dist/architectureDiagram-IEHRJDOE-HOxolPJX.js +4635 -0
- package/dist/blockDiagram-JOT3LUYC-DOUpbN2x.js +2248 -0
- package/dist/c4Diagram-VJAJSXHY-BFAcC0i5.js +1582 -0
- package/dist/channel-Cu0z2gst.js +5 -0
- package/dist/chart-CJ_SRNKN.js +9241 -0
- package/dist/chunk-4BMEZGHF-BBaiA8MA.js +9 -0
- package/dist/chunk-A2AXSNBT-BWpKSYi4.js +1373 -0
- package/dist/chunk-AEK57VVT-doTsaHuQ.js +1415 -0
- package/dist/chunk-D6G4REZN-B6Iq6yid.js +64 -0
- package/dist/chunk-RZ5BOZE2-OspkSZtw.js +25 -0
- package/dist/chunk-XZIHB7SX-BTYIr8g5.js +15 -0
- package/dist/classDiagram-GIVACNV2-B_ES2mS7.js +17 -0
- package/dist/classDiagram-v2-COTLJTTW-B_ES2mS7.js +17 -0
- package/dist/clone-BZBtMp_G.js +8 -0
- package/dist/colors-BD7LS4qt.js +7 -0
- package/dist/cytoscape.esm-Swd9B-1A.js +18633 -0
- package/dist/dagre-OKDRZEBW-qXmKnSET.js +447 -0
- package/dist/diagram-SSKATNLV-D9zp03W0.js +221 -0
- package/dist/diagram-VNBRO52H-CBXg8AYQ.js +126 -0
- package/dist/download-B6Cbg_6N.js +39 -0
- package/dist/echarts-CvKQD1G1.js +44028 -0
- package/dist/erDiagram-Q7BY3M3F-BOJJGO7u.js +842 -0
- package/dist/flowDiagram-4HSFHLVR-jSArwKHg.js +1623 -0
- package/dist/ganttDiagram-APWFNJXF-DlkSU7D9.js +2472 -0
- package/dist/gitGraph-O2Q2CXLX-BKCeQqs8.js +5 -0
- package/dist/gitGraphDiagram-7IBYFJ6S-DUvZEq_S.js +713 -0
- package/dist/graph-zFu0gYaZ.js +247 -0
- package/dist/helper-C5NlRbA2.js +13 -0
- package/dist/hub-ui-x.css +1 -0
- package/dist/hub-ui-x.es.ts +5 -0
- package/dist/hub-ui-x.umd.ts +3258 -0
- package/dist/index-evjDGH2n.js +62533 -0
- package/dist/info-4N47QTOZ-BYDGL7Ae.js +5 -0
- package/dist/infoDiagram-PH2N3AL5-DJvDYk-t.js +22 -0
- package/dist/init-DjUOC4st.js +16 -0
- package/dist/journeyDiagram-U35MCT3I---dClVe4.js +810 -0
- package/dist/kanban-definition-NDS4AKOZ-DPL_aBPT.js +719 -0
- package/dist/katex-9tX9hjoM.js +11692 -0
- package/dist/layout-BqSq5ofg.js +1324 -0
- package/dist/linear-fJjgKrP9.js +423 -0
- package/dist/mermaid-CZvYCPmi.js +14243 -0
- package/dist/mermaid-parser.core-Bz7ADZ88.js +12835 -0
- package/dist/min-DLf0xQMm.js +28 -0
- package/dist/mindmap-definition-ALO5MXBD-CzxIzyQv.js +3222 -0
- package/dist/mindmap-r94UHoYv.js +21909 -0
- package/dist/ordinal-DfAQgscy.js +61 -0
- package/dist/packet-KVYON367-D4di2cz5.js +5 -0
- package/dist/pie-R6RNRRYF-CcxAsT3F.js +5 -0
- package/dist/pieDiagram-IB7DONF6-B5HBkGlO.js +162 -0
- package/dist/quadrantDiagram-7GDLP6J5-BS5bmqKW.js +1025 -0
- package/dist/radar-MK3ICKWK-CVYy5goT.js +5 -0
- package/dist/requirementDiagram-KVF5MWMF-Cr8GcN4Y.js +851 -0
- package/dist/sankeyDiagram-QLVOVGJD-Bhq9k8_q.js +806 -0
- package/dist/sequenceDiagram-X6HHIX6F-CCmFoYyv.js +2282 -0
- package/dist/stateDiagram-DGXRK772-JkIqKyGq.js +271 -0
- package/dist/stateDiagram-v2-YXO3MK2T-DMxAxUZ1.js +17 -0
- package/dist/timeline-definition-BDJGKUSR-Bi42udQn.js +805 -0
- package/dist/transform-Bsa6BTXX.js +1834 -0
- package/dist/xychartDiagram-VJFVF3MP-BI97ppBM.js +1305 -0
- package/package.json +55 -0
|
@@ -0,0 +1,805 @@
|
|
|
1
|
+
import { _ as s, c as xt, l as T, T as kt, U as vt, V as _t, W as bt, A as wt, X as St, x as Et } from "./mermaid-CZvYCPmi.js";
|
|
2
|
+
import { s as U } from "./transform-Bsa6BTXX.js";
|
|
3
|
+
import { d as nt } from "./arc-CfWEFjh8.js";
|
|
4
|
+
var X = function() {
|
|
5
|
+
var n = /* @__PURE__ */ s(function(f, i, a, d) {
|
|
6
|
+
for (a = a || {}, d = f.length; d--; a[f[d]] = i) ;
|
|
7
|
+
return a;
|
|
8
|
+
}, "o"), t = [6, 8, 10, 11, 12, 14, 16, 17, 20, 21], e = [1, 9], l = [1, 10], r = [1, 11], h = [1, 12], c = [1, 13], g = [1, 16], m = [1, 17], p = {
|
|
9
|
+
trace: /* @__PURE__ */ s(function() {
|
|
10
|
+
}, "trace"),
|
|
11
|
+
yy: {},
|
|
12
|
+
symbols_: { error: 2, start: 3, timeline: 4, document: 5, EOF: 6, line: 7, SPACE: 8, statement: 9, NEWLINE: 10, title: 11, acc_title: 12, acc_title_value: 13, acc_descr: 14, acc_descr_value: 15, acc_descr_multiline_value: 16, section: 17, period_statement: 18, event_statement: 19, period: 20, event: 21, $accept: 0, $end: 1 },
|
|
13
|
+
terminals_: { 2: "error", 4: "timeline", 6: "EOF", 8: "SPACE", 10: "NEWLINE", 11: "title", 12: "acc_title", 13: "acc_title_value", 14: "acc_descr", 15: "acc_descr_value", 16: "acc_descr_multiline_value", 17: "section", 20: "period", 21: "event" },
|
|
14
|
+
productions_: [0, [3, 3], [5, 0], [5, 2], [7, 2], [7, 1], [7, 1], [7, 1], [9, 1], [9, 2], [9, 2], [9, 1], [9, 1], [9, 1], [9, 1], [18, 1], [19, 1]],
|
|
15
|
+
performAction: /* @__PURE__ */ s(function(i, a, d, u, y, o, S) {
|
|
16
|
+
var k = o.length - 1;
|
|
17
|
+
switch (y) {
|
|
18
|
+
case 1:
|
|
19
|
+
return o[k - 1];
|
|
20
|
+
case 2:
|
|
21
|
+
this.$ = [];
|
|
22
|
+
break;
|
|
23
|
+
case 3:
|
|
24
|
+
o[k - 1].push(o[k]), this.$ = o[k - 1];
|
|
25
|
+
break;
|
|
26
|
+
case 4:
|
|
27
|
+
case 5:
|
|
28
|
+
this.$ = o[k];
|
|
29
|
+
break;
|
|
30
|
+
case 6:
|
|
31
|
+
case 7:
|
|
32
|
+
this.$ = [];
|
|
33
|
+
break;
|
|
34
|
+
case 8:
|
|
35
|
+
u.getCommonDb().setDiagramTitle(o[k].substr(6)), this.$ = o[k].substr(6);
|
|
36
|
+
break;
|
|
37
|
+
case 9:
|
|
38
|
+
this.$ = o[k].trim(), u.getCommonDb().setAccTitle(this.$);
|
|
39
|
+
break;
|
|
40
|
+
case 10:
|
|
41
|
+
case 11:
|
|
42
|
+
this.$ = o[k].trim(), u.getCommonDb().setAccDescription(this.$);
|
|
43
|
+
break;
|
|
44
|
+
case 12:
|
|
45
|
+
u.addSection(o[k].substr(8)), this.$ = o[k].substr(8);
|
|
46
|
+
break;
|
|
47
|
+
case 15:
|
|
48
|
+
u.addTask(o[k], 0, ""), this.$ = o[k];
|
|
49
|
+
break;
|
|
50
|
+
case 16:
|
|
51
|
+
u.addEvent(o[k].substr(2)), this.$ = o[k];
|
|
52
|
+
break;
|
|
53
|
+
}
|
|
54
|
+
}, "anonymous"),
|
|
55
|
+
table: [{ 3: 1, 4: [1, 2] }, { 1: [3] }, n(t, [2, 2], { 5: 3 }), { 6: [1, 4], 7: 5, 8: [1, 6], 9: 7, 10: [1, 8], 11: e, 12: l, 14: r, 16: h, 17: c, 18: 14, 19: 15, 20: g, 21: m }, n(t, [2, 7], { 1: [2, 1] }), n(t, [2, 3]), { 9: 18, 11: e, 12: l, 14: r, 16: h, 17: c, 18: 14, 19: 15, 20: g, 21: m }, n(t, [2, 5]), n(t, [2, 6]), n(t, [2, 8]), { 13: [1, 19] }, { 15: [1, 20] }, n(t, [2, 11]), n(t, [2, 12]), n(t, [2, 13]), n(t, [2, 14]), n(t, [2, 15]), n(t, [2, 16]), n(t, [2, 4]), n(t, [2, 9]), n(t, [2, 10])],
|
|
56
|
+
defaultActions: {},
|
|
57
|
+
parseError: /* @__PURE__ */ s(function(i, a) {
|
|
58
|
+
if (a.recoverable)
|
|
59
|
+
this.trace(i);
|
|
60
|
+
else {
|
|
61
|
+
var d = new Error(i);
|
|
62
|
+
throw d.hash = a, d;
|
|
63
|
+
}
|
|
64
|
+
}, "parseError"),
|
|
65
|
+
parse: /* @__PURE__ */ s(function(i) {
|
|
66
|
+
var a = this, d = [0], u = [], y = [null], o = [], S = this.table, k = "", M = 0, A = 0, B = 2, J = 1, O = o.slice.call(arguments, 1), v = Object.create(this.lexer), E = { yy: {} };
|
|
67
|
+
for (var b in this.yy)
|
|
68
|
+
Object.prototype.hasOwnProperty.call(this.yy, b) && (E.yy[b] = this.yy[b]);
|
|
69
|
+
v.setInput(i, E.yy), E.yy.lexer = v, E.yy.parser = this, typeof v.yylloc > "u" && (v.yylloc = {});
|
|
70
|
+
var L = v.yylloc;
|
|
71
|
+
o.push(L);
|
|
72
|
+
var P = v.options && v.options.ranges;
|
|
73
|
+
typeof E.yy.parseError == "function" ? this.parseError = E.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
|
|
74
|
+
function R(I) {
|
|
75
|
+
d.length = d.length - 2 * I, y.length = y.length - I, o.length = o.length - I;
|
|
76
|
+
}
|
|
77
|
+
s(R, "popStack");
|
|
78
|
+
function F() {
|
|
79
|
+
var I;
|
|
80
|
+
return I = u.pop() || v.lex() || J, typeof I != "number" && (I instanceof Array && (u = I, I = u.pop()), I = a.symbols_[I] || I), I;
|
|
81
|
+
}
|
|
82
|
+
s(F, "lex");
|
|
83
|
+
for (var w, C, N, K, V = {}, j, $, et, G; ; ) {
|
|
84
|
+
if (C = d[d.length - 1], this.defaultActions[C] ? N = this.defaultActions[C] : ((w === null || typeof w > "u") && (w = F()), N = S[C] && S[C][w]), typeof N > "u" || !N.length || !N[0]) {
|
|
85
|
+
var Q = "";
|
|
86
|
+
G = [];
|
|
87
|
+
for (j in S[C])
|
|
88
|
+
this.terminals_[j] && j > B && G.push("'" + this.terminals_[j] + "'");
|
|
89
|
+
v.showPosition ? Q = "Parse error on line " + (M + 1) + `:
|
|
90
|
+
` + v.showPosition() + `
|
|
91
|
+
Expecting ` + G.join(", ") + ", got '" + (this.terminals_[w] || w) + "'" : Q = "Parse error on line " + (M + 1) + ": Unexpected " + (w == J ? "end of input" : "'" + (this.terminals_[w] || w) + "'"), this.parseError(Q, {
|
|
92
|
+
text: v.match,
|
|
93
|
+
token: this.terminals_[w] || w,
|
|
94
|
+
line: v.yylineno,
|
|
95
|
+
loc: L,
|
|
96
|
+
expected: G
|
|
97
|
+
});
|
|
98
|
+
}
|
|
99
|
+
if (N[0] instanceof Array && N.length > 1)
|
|
100
|
+
throw new Error("Parse Error: multiple actions possible at state: " + C + ", token: " + w);
|
|
101
|
+
switch (N[0]) {
|
|
102
|
+
case 1:
|
|
103
|
+
d.push(w), y.push(v.yytext), o.push(v.yylloc), d.push(N[1]), w = null, A = v.yyleng, k = v.yytext, M = v.yylineno, L = v.yylloc;
|
|
104
|
+
break;
|
|
105
|
+
case 2:
|
|
106
|
+
if ($ = this.productions_[N[1]][1], V.$ = y[y.length - $], V._$ = {
|
|
107
|
+
first_line: o[o.length - ($ || 1)].first_line,
|
|
108
|
+
last_line: o[o.length - 1].last_line,
|
|
109
|
+
first_column: o[o.length - ($ || 1)].first_column,
|
|
110
|
+
last_column: o[o.length - 1].last_column
|
|
111
|
+
}, P && (V._$.range = [
|
|
112
|
+
o[o.length - ($ || 1)].range[0],
|
|
113
|
+
o[o.length - 1].range[1]
|
|
114
|
+
]), K = this.performAction.apply(V, [
|
|
115
|
+
k,
|
|
116
|
+
A,
|
|
117
|
+
M,
|
|
118
|
+
E.yy,
|
|
119
|
+
N[1],
|
|
120
|
+
y,
|
|
121
|
+
o
|
|
122
|
+
].concat(O)), typeof K < "u")
|
|
123
|
+
return K;
|
|
124
|
+
$ && (d = d.slice(0, -1 * $ * 2), y = y.slice(0, -1 * $), o = o.slice(0, -1 * $)), d.push(this.productions_[N[1]][0]), y.push(V.$), o.push(V._$), et = S[d[d.length - 2]][d[d.length - 1]], d.push(et);
|
|
125
|
+
break;
|
|
126
|
+
case 3:
|
|
127
|
+
return !0;
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
return !0;
|
|
131
|
+
}, "parse")
|
|
132
|
+
}, x = /* @__PURE__ */ function() {
|
|
133
|
+
var f = {
|
|
134
|
+
EOF: 1,
|
|
135
|
+
parseError: /* @__PURE__ */ s(function(a, d) {
|
|
136
|
+
if (this.yy.parser)
|
|
137
|
+
this.yy.parser.parseError(a, d);
|
|
138
|
+
else
|
|
139
|
+
throw new Error(a);
|
|
140
|
+
}, "parseError"),
|
|
141
|
+
// resets the lexer, sets new input
|
|
142
|
+
setInput: /* @__PURE__ */ s(function(i, a) {
|
|
143
|
+
return this.yy = a || this.yy || {}, this._input = i, this._more = this._backtrack = this.done = !1, this.yylineno = this.yyleng = 0, this.yytext = this.matched = this.match = "", this.conditionStack = ["INITIAL"], this.yylloc = {
|
|
144
|
+
first_line: 1,
|
|
145
|
+
first_column: 0,
|
|
146
|
+
last_line: 1,
|
|
147
|
+
last_column: 0
|
|
148
|
+
}, this.options.ranges && (this.yylloc.range = [0, 0]), this.offset = 0, this;
|
|
149
|
+
}, "setInput"),
|
|
150
|
+
// consumes and returns one char from the input
|
|
151
|
+
input: /* @__PURE__ */ s(function() {
|
|
152
|
+
var i = this._input[0];
|
|
153
|
+
this.yytext += i, this.yyleng++, this.offset++, this.match += i, this.matched += i;
|
|
154
|
+
var a = i.match(/(?:\r\n?|\n).*/g);
|
|
155
|
+
return a ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++, this.options.ranges && this.yylloc.range[1]++, this._input = this._input.slice(1), i;
|
|
156
|
+
}, "input"),
|
|
157
|
+
// unshifts one char (or a string) into the input
|
|
158
|
+
unput: /* @__PURE__ */ s(function(i) {
|
|
159
|
+
var a = i.length, d = i.split(/(?:\r\n?|\n)/g);
|
|
160
|
+
this._input = i + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - a), this.offset -= a;
|
|
161
|
+
var u = this.match.split(/(?:\r\n?|\n)/g);
|
|
162
|
+
this.match = this.match.substr(0, this.match.length - 1), this.matched = this.matched.substr(0, this.matched.length - 1), d.length - 1 && (this.yylineno -= d.length - 1);
|
|
163
|
+
var y = this.yylloc.range;
|
|
164
|
+
return this.yylloc = {
|
|
165
|
+
first_line: this.yylloc.first_line,
|
|
166
|
+
last_line: this.yylineno + 1,
|
|
167
|
+
first_column: this.yylloc.first_column,
|
|
168
|
+
last_column: d ? (d.length === u.length ? this.yylloc.first_column : 0) + u[u.length - d.length].length - d[0].length : this.yylloc.first_column - a
|
|
169
|
+
}, this.options.ranges && (this.yylloc.range = [y[0], y[0] + this.yyleng - a]), this.yyleng = this.yytext.length, this;
|
|
170
|
+
}, "unput"),
|
|
171
|
+
// When called from action, caches matched text and appends it on next action
|
|
172
|
+
more: /* @__PURE__ */ s(function() {
|
|
173
|
+
return this._more = !0, this;
|
|
174
|
+
}, "more"),
|
|
175
|
+
// When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead.
|
|
176
|
+
reject: /* @__PURE__ */ s(function() {
|
|
177
|
+
if (this.options.backtrack_lexer)
|
|
178
|
+
this._backtrack = !0;
|
|
179
|
+
else
|
|
180
|
+
return this.parseError("Lexical error on line " + (this.yylineno + 1) + `. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
|
181
|
+
` + this.showPosition(), {
|
|
182
|
+
text: "",
|
|
183
|
+
token: null,
|
|
184
|
+
line: this.yylineno
|
|
185
|
+
});
|
|
186
|
+
return this;
|
|
187
|
+
}, "reject"),
|
|
188
|
+
// retain first n characters of the match
|
|
189
|
+
less: /* @__PURE__ */ s(function(i) {
|
|
190
|
+
this.unput(this.match.slice(i));
|
|
191
|
+
}, "less"),
|
|
192
|
+
// displays already matched input, i.e. for error messages
|
|
193
|
+
pastInput: /* @__PURE__ */ s(function() {
|
|
194
|
+
var i = this.matched.substr(0, this.matched.length - this.match.length);
|
|
195
|
+
return (i.length > 20 ? "..." : "") + i.substr(-20).replace(/\n/g, "");
|
|
196
|
+
}, "pastInput"),
|
|
197
|
+
// displays upcoming input, i.e. for error messages
|
|
198
|
+
upcomingInput: /* @__PURE__ */ s(function() {
|
|
199
|
+
var i = this.match;
|
|
200
|
+
return i.length < 20 && (i += this._input.substr(0, 20 - i.length)), (i.substr(0, 20) + (i.length > 20 ? "..." : "")).replace(/\n/g, "");
|
|
201
|
+
}, "upcomingInput"),
|
|
202
|
+
// displays the character position where the lexing error occurred, i.e. for error messages
|
|
203
|
+
showPosition: /* @__PURE__ */ s(function() {
|
|
204
|
+
var i = this.pastInput(), a = new Array(i.length + 1).join("-");
|
|
205
|
+
return i + this.upcomingInput() + `
|
|
206
|
+
` + a + "^";
|
|
207
|
+
}, "showPosition"),
|
|
208
|
+
// test the lexed token: return FALSE when not a match, otherwise return token
|
|
209
|
+
test_match: /* @__PURE__ */ s(function(i, a) {
|
|
210
|
+
var d, u, y;
|
|
211
|
+
if (this.options.backtrack_lexer && (y = {
|
|
212
|
+
yylineno: this.yylineno,
|
|
213
|
+
yylloc: {
|
|
214
|
+
first_line: this.yylloc.first_line,
|
|
215
|
+
last_line: this.last_line,
|
|
216
|
+
first_column: this.yylloc.first_column,
|
|
217
|
+
last_column: this.yylloc.last_column
|
|
218
|
+
},
|
|
219
|
+
yytext: this.yytext,
|
|
220
|
+
match: this.match,
|
|
221
|
+
matches: this.matches,
|
|
222
|
+
matched: this.matched,
|
|
223
|
+
yyleng: this.yyleng,
|
|
224
|
+
offset: this.offset,
|
|
225
|
+
_more: this._more,
|
|
226
|
+
_input: this._input,
|
|
227
|
+
yy: this.yy,
|
|
228
|
+
conditionStack: this.conditionStack.slice(0),
|
|
229
|
+
done: this.done
|
|
230
|
+
}, this.options.ranges && (y.yylloc.range = this.yylloc.range.slice(0))), u = i[0].match(/(?:\r\n?|\n).*/g), u && (this.yylineno += u.length), this.yylloc = {
|
|
231
|
+
first_line: this.yylloc.last_line,
|
|
232
|
+
last_line: this.yylineno + 1,
|
|
233
|
+
first_column: this.yylloc.last_column,
|
|
234
|
+
last_column: u ? u[u.length - 1].length - u[u.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + i[0].length
|
|
235
|
+
}, this.yytext += i[0], this.match += i[0], this.matches = i, this.yyleng = this.yytext.length, this.options.ranges && (this.yylloc.range = [this.offset, this.offset += this.yyleng]), this._more = !1, this._backtrack = !1, this._input = this._input.slice(i[0].length), this.matched += i[0], d = this.performAction.call(this, this.yy, this, a, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), d)
|
|
236
|
+
return d;
|
|
237
|
+
if (this._backtrack) {
|
|
238
|
+
for (var o in y)
|
|
239
|
+
this[o] = y[o];
|
|
240
|
+
return !1;
|
|
241
|
+
}
|
|
242
|
+
return !1;
|
|
243
|
+
}, "test_match"),
|
|
244
|
+
// return next match in input
|
|
245
|
+
next: /* @__PURE__ */ s(function() {
|
|
246
|
+
if (this.done)
|
|
247
|
+
return this.EOF;
|
|
248
|
+
this._input || (this.done = !0);
|
|
249
|
+
var i, a, d, u;
|
|
250
|
+
this._more || (this.yytext = "", this.match = "");
|
|
251
|
+
for (var y = this._currentRules(), o = 0; o < y.length; o++)
|
|
252
|
+
if (d = this._input.match(this.rules[y[o]]), d && (!a || d[0].length > a[0].length)) {
|
|
253
|
+
if (a = d, u = o, this.options.backtrack_lexer) {
|
|
254
|
+
if (i = this.test_match(d, y[o]), i !== !1)
|
|
255
|
+
return i;
|
|
256
|
+
if (this._backtrack) {
|
|
257
|
+
a = !1;
|
|
258
|
+
continue;
|
|
259
|
+
} else
|
|
260
|
+
return !1;
|
|
261
|
+
} else if (!this.options.flex)
|
|
262
|
+
break;
|
|
263
|
+
}
|
|
264
|
+
return a ? (i = this.test_match(a, y[u]), i !== !1 ? i : !1) : this._input === "" ? this.EOF : this.parseError("Lexical error on line " + (this.yylineno + 1) + `. Unrecognized text.
|
|
265
|
+
` + this.showPosition(), {
|
|
266
|
+
text: "",
|
|
267
|
+
token: null,
|
|
268
|
+
line: this.yylineno
|
|
269
|
+
});
|
|
270
|
+
}, "next"),
|
|
271
|
+
// return next match that has a token
|
|
272
|
+
lex: /* @__PURE__ */ s(function() {
|
|
273
|
+
var a = this.next();
|
|
274
|
+
return a || this.lex();
|
|
275
|
+
}, "lex"),
|
|
276
|
+
// activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)
|
|
277
|
+
begin: /* @__PURE__ */ s(function(a) {
|
|
278
|
+
this.conditionStack.push(a);
|
|
279
|
+
}, "begin"),
|
|
280
|
+
// pop the previously active lexer condition state off the condition stack
|
|
281
|
+
popState: /* @__PURE__ */ s(function() {
|
|
282
|
+
var a = this.conditionStack.length - 1;
|
|
283
|
+
return a > 0 ? this.conditionStack.pop() : this.conditionStack[0];
|
|
284
|
+
}, "popState"),
|
|
285
|
+
// produce the lexer rule set which is active for the currently active lexer condition state
|
|
286
|
+
_currentRules: /* @__PURE__ */ s(function() {
|
|
287
|
+
return this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1] ? this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules : this.conditions.INITIAL.rules;
|
|
288
|
+
}, "_currentRules"),
|
|
289
|
+
// return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available
|
|
290
|
+
topState: /* @__PURE__ */ s(function(a) {
|
|
291
|
+
return a = this.conditionStack.length - 1 - Math.abs(a || 0), a >= 0 ? this.conditionStack[a] : "INITIAL";
|
|
292
|
+
}, "topState"),
|
|
293
|
+
// alias for begin(condition)
|
|
294
|
+
pushState: /* @__PURE__ */ s(function(a) {
|
|
295
|
+
this.begin(a);
|
|
296
|
+
}, "pushState"),
|
|
297
|
+
// return the number of states currently on the stack
|
|
298
|
+
stateStackSize: /* @__PURE__ */ s(function() {
|
|
299
|
+
return this.conditionStack.length;
|
|
300
|
+
}, "stateStackSize"),
|
|
301
|
+
options: { "case-insensitive": !0 },
|
|
302
|
+
performAction: /* @__PURE__ */ s(function(a, d, u, y) {
|
|
303
|
+
switch (u) {
|
|
304
|
+
case 0:
|
|
305
|
+
break;
|
|
306
|
+
case 1:
|
|
307
|
+
break;
|
|
308
|
+
case 2:
|
|
309
|
+
return 10;
|
|
310
|
+
case 3:
|
|
311
|
+
break;
|
|
312
|
+
case 4:
|
|
313
|
+
break;
|
|
314
|
+
case 5:
|
|
315
|
+
return 4;
|
|
316
|
+
case 6:
|
|
317
|
+
return 11;
|
|
318
|
+
case 7:
|
|
319
|
+
return this.begin("acc_title"), 12;
|
|
320
|
+
case 8:
|
|
321
|
+
return this.popState(), "acc_title_value";
|
|
322
|
+
case 9:
|
|
323
|
+
return this.begin("acc_descr"), 14;
|
|
324
|
+
case 10:
|
|
325
|
+
return this.popState(), "acc_descr_value";
|
|
326
|
+
case 11:
|
|
327
|
+
this.begin("acc_descr_multiline");
|
|
328
|
+
break;
|
|
329
|
+
case 12:
|
|
330
|
+
this.popState();
|
|
331
|
+
break;
|
|
332
|
+
case 13:
|
|
333
|
+
return "acc_descr_multiline_value";
|
|
334
|
+
case 14:
|
|
335
|
+
return 17;
|
|
336
|
+
case 15:
|
|
337
|
+
return 21;
|
|
338
|
+
case 16:
|
|
339
|
+
return 20;
|
|
340
|
+
case 17:
|
|
341
|
+
return 6;
|
|
342
|
+
case 18:
|
|
343
|
+
return "INVALID";
|
|
344
|
+
}
|
|
345
|
+
}, "anonymous"),
|
|
346
|
+
rules: [/^(?:%(?!\{)[^\n]*)/i, /^(?:[^\}]%%[^\n]*)/i, /^(?:[\n]+)/i, /^(?:\s+)/i, /^(?:#[^\n]*)/i, /^(?:timeline\b)/i, /^(?:title\s[^\n]+)/i, /^(?:accTitle\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*\{\s*)/i, /^(?:[\}])/i, /^(?:[^\}]*)/i, /^(?:section\s[^:\n]+)/i, /^(?::\s[^:\n]+)/i, /^(?:[^#:\n]+)/i, /^(?:$)/i, /^(?:.)/i],
|
|
347
|
+
conditions: { acc_descr_multiline: { rules: [12, 13], inclusive: !1 }, acc_descr: { rules: [10], inclusive: !1 }, acc_title: { rules: [8], inclusive: !1 }, INITIAL: { rules: [0, 1, 2, 3, 4, 5, 6, 7, 9, 11, 14, 15, 16, 17, 18], inclusive: !0 } }
|
|
348
|
+
};
|
|
349
|
+
return f;
|
|
350
|
+
}();
|
|
351
|
+
p.lexer = x;
|
|
352
|
+
function _() {
|
|
353
|
+
this.yy = {};
|
|
354
|
+
}
|
|
355
|
+
return s(_, "Parser"), _.prototype = p, p.Parser = _, new _();
|
|
356
|
+
}();
|
|
357
|
+
X.parser = X;
|
|
358
|
+
var Tt = X, at = {};
|
|
359
|
+
wt(at, {
|
|
360
|
+
addEvent: () => yt,
|
|
361
|
+
addSection: () => ht,
|
|
362
|
+
addTask: () => pt,
|
|
363
|
+
addTaskOrg: () => gt,
|
|
364
|
+
clear: () => ct,
|
|
365
|
+
default: () => It,
|
|
366
|
+
getCommonDb: () => ot,
|
|
367
|
+
getSections: () => dt,
|
|
368
|
+
getTasks: () => ut
|
|
369
|
+
});
|
|
370
|
+
var z = "", lt = 0, Y = [], q = [], W = [], ot = /* @__PURE__ */ s(() => St, "getCommonDb"), ct = /* @__PURE__ */ s(function() {
|
|
371
|
+
Y.length = 0, q.length = 0, z = "", W.length = 0, Et();
|
|
372
|
+
}, "clear"), ht = /* @__PURE__ */ s(function(n) {
|
|
373
|
+
z = n, Y.push(n);
|
|
374
|
+
}, "addSection"), dt = /* @__PURE__ */ s(function() {
|
|
375
|
+
return Y;
|
|
376
|
+
}, "getSections"), ut = /* @__PURE__ */ s(function() {
|
|
377
|
+
let n = rt();
|
|
378
|
+
const t = 100;
|
|
379
|
+
let e = 0;
|
|
380
|
+
for (; !n && e < t; )
|
|
381
|
+
n = rt(), e++;
|
|
382
|
+
return q.push(...W), q;
|
|
383
|
+
}, "getTasks"), pt = /* @__PURE__ */ s(function(n, t, e) {
|
|
384
|
+
const l = {
|
|
385
|
+
id: lt++,
|
|
386
|
+
section: z,
|
|
387
|
+
type: z,
|
|
388
|
+
task: n,
|
|
389
|
+
score: t || 0,
|
|
390
|
+
//if event is defined, then add it the events array
|
|
391
|
+
events: e ? [e] : []
|
|
392
|
+
};
|
|
393
|
+
W.push(l);
|
|
394
|
+
}, "addTask"), yt = /* @__PURE__ */ s(function(n) {
|
|
395
|
+
W.find((e) => e.id === lt - 1).events.push(n);
|
|
396
|
+
}, "addEvent"), gt = /* @__PURE__ */ s(function(n) {
|
|
397
|
+
const t = {
|
|
398
|
+
section: z,
|
|
399
|
+
type: z,
|
|
400
|
+
description: n,
|
|
401
|
+
task: n,
|
|
402
|
+
classes: []
|
|
403
|
+
};
|
|
404
|
+
q.push(t);
|
|
405
|
+
}, "addTaskOrg"), rt = /* @__PURE__ */ s(function() {
|
|
406
|
+
const n = /* @__PURE__ */ s(function(e) {
|
|
407
|
+
return W[e].processed;
|
|
408
|
+
}, "compileTask");
|
|
409
|
+
let t = !0;
|
|
410
|
+
for (const [e, l] of W.entries())
|
|
411
|
+
n(e), t = t && l.processed;
|
|
412
|
+
return t;
|
|
413
|
+
}, "compileTasks"), It = {
|
|
414
|
+
clear: ct,
|
|
415
|
+
getCommonDb: ot,
|
|
416
|
+
addSection: ht,
|
|
417
|
+
getSections: dt,
|
|
418
|
+
getTasks: ut,
|
|
419
|
+
addTask: pt,
|
|
420
|
+
addTaskOrg: gt,
|
|
421
|
+
addEvent: yt
|
|
422
|
+
}, Nt = 12, Z = /* @__PURE__ */ s(function(n, t) {
|
|
423
|
+
const e = n.append("rect");
|
|
424
|
+
return e.attr("x", t.x), e.attr("y", t.y), e.attr("fill", t.fill), e.attr("stroke", t.stroke), e.attr("width", t.width), e.attr("height", t.height), e.attr("rx", t.rx), e.attr("ry", t.ry), t.class !== void 0 && e.attr("class", t.class), e;
|
|
425
|
+
}, "drawRect"), Lt = /* @__PURE__ */ s(function(n, t) {
|
|
426
|
+
const l = n.append("circle").attr("cx", t.cx).attr("cy", t.cy).attr("class", "face").attr("r", 15).attr("stroke-width", 2).attr("overflow", "visible"), r = n.append("g");
|
|
427
|
+
r.append("circle").attr("cx", t.cx - 15 / 3).attr("cy", t.cy - 15 / 3).attr("r", 1.5).attr("stroke-width", 2).attr("fill", "#666").attr("stroke", "#666"), r.append("circle").attr("cx", t.cx + 15 / 3).attr("cy", t.cy - 15 / 3).attr("r", 1.5).attr("stroke-width", 2).attr("fill", "#666").attr("stroke", "#666");
|
|
428
|
+
function h(m) {
|
|
429
|
+
const p = nt().startAngle(Math.PI / 2).endAngle(3 * (Math.PI / 2)).innerRadius(7.5).outerRadius(6.8181818181818175);
|
|
430
|
+
m.append("path").attr("class", "mouth").attr("d", p).attr("transform", "translate(" + t.cx + "," + (t.cy + 2) + ")");
|
|
431
|
+
}
|
|
432
|
+
s(h, "smile");
|
|
433
|
+
function c(m) {
|
|
434
|
+
const p = nt().startAngle(3 * Math.PI / 2).endAngle(5 * (Math.PI / 2)).innerRadius(7.5).outerRadius(6.8181818181818175);
|
|
435
|
+
m.append("path").attr("class", "mouth").attr("d", p).attr("transform", "translate(" + t.cx + "," + (t.cy + 7) + ")");
|
|
436
|
+
}
|
|
437
|
+
s(c, "sad");
|
|
438
|
+
function g(m) {
|
|
439
|
+
m.append("line").attr("class", "mouth").attr("stroke", 2).attr("x1", t.cx - 5).attr("y1", t.cy + 7).attr("x2", t.cx + 5).attr("y2", t.cy + 7).attr("class", "mouth").attr("stroke-width", "1px").attr("stroke", "#666");
|
|
440
|
+
}
|
|
441
|
+
return s(g, "ambivalent"), t.score > 3 ? h(r) : t.score < 3 ? c(r) : g(r), l;
|
|
442
|
+
}, "drawFace"), Mt = /* @__PURE__ */ s(function(n, t) {
|
|
443
|
+
const e = n.append("circle");
|
|
444
|
+
return e.attr("cx", t.cx), e.attr("cy", t.cy), e.attr("class", "actor-" + t.pos), e.attr("fill", t.fill), e.attr("stroke", t.stroke), e.attr("r", t.r), e.class !== void 0 && e.attr("class", e.class), t.title !== void 0 && e.append("title").text(t.title), e;
|
|
445
|
+
}, "drawCircle"), ft = /* @__PURE__ */ s(function(n, t) {
|
|
446
|
+
const e = t.text.replace(/<br\s*\/?>/gi, " "), l = n.append("text");
|
|
447
|
+
l.attr("x", t.x), l.attr("y", t.y), l.attr("class", "legend"), l.style("text-anchor", t.anchor), t.class !== void 0 && l.attr("class", t.class);
|
|
448
|
+
const r = l.append("tspan");
|
|
449
|
+
return r.attr("x", t.x + t.textMargin * 2), r.text(e), l;
|
|
450
|
+
}, "drawText"), $t = /* @__PURE__ */ s(function(n, t) {
|
|
451
|
+
function e(r, h, c, g, m) {
|
|
452
|
+
return r + "," + h + " " + (r + c) + "," + h + " " + (r + c) + "," + (h + g - m) + " " + (r + c - m * 1.2) + "," + (h + g) + " " + r + "," + (h + g);
|
|
453
|
+
}
|
|
454
|
+
s(e, "genPoints");
|
|
455
|
+
const l = n.append("polygon");
|
|
456
|
+
l.attr("points", e(t.x, t.y, 50, 20, 7)), l.attr("class", "labelBox"), t.y = t.y + t.labelMargin, t.x = t.x + 0.5 * t.labelMargin, ft(n, t);
|
|
457
|
+
}, "drawLabel"), At = /* @__PURE__ */ s(function(n, t, e) {
|
|
458
|
+
const l = n.append("g"), r = D();
|
|
459
|
+
r.x = t.x, r.y = t.y, r.fill = t.fill, r.width = e.width, r.height = e.height, r.class = "journey-section section-type-" + t.num, r.rx = 3, r.ry = 3, Z(l, r), mt(e)(
|
|
460
|
+
t.text,
|
|
461
|
+
l,
|
|
462
|
+
r.x,
|
|
463
|
+
r.y,
|
|
464
|
+
r.width,
|
|
465
|
+
r.height,
|
|
466
|
+
{ class: "journey-section section-type-" + t.num },
|
|
467
|
+
e,
|
|
468
|
+
t.colour
|
|
469
|
+
);
|
|
470
|
+
}, "drawSection"), it = -1, Pt = /* @__PURE__ */ s(function(n, t, e) {
|
|
471
|
+
const l = t.x + e.width / 2, r = n.append("g");
|
|
472
|
+
it++;
|
|
473
|
+
const h = 300 + 5 * 30;
|
|
474
|
+
r.append("line").attr("id", "task" + it).attr("x1", l).attr("y1", t.y).attr("x2", l).attr("y2", h).attr("class", "task-line").attr("stroke-width", "1px").attr("stroke-dasharray", "4 2").attr("stroke", "#666"), Lt(r, {
|
|
475
|
+
cx: l,
|
|
476
|
+
cy: 300 + (5 - t.score) * 30,
|
|
477
|
+
score: t.score
|
|
478
|
+
});
|
|
479
|
+
const c = D();
|
|
480
|
+
c.x = t.x, c.y = t.y, c.fill = t.fill, c.width = e.width, c.height = e.height, c.class = "task task-type-" + t.num, c.rx = 3, c.ry = 3, Z(r, c), mt(e)(
|
|
481
|
+
t.task,
|
|
482
|
+
r,
|
|
483
|
+
c.x,
|
|
484
|
+
c.y,
|
|
485
|
+
c.width,
|
|
486
|
+
c.height,
|
|
487
|
+
{ class: "task" },
|
|
488
|
+
e,
|
|
489
|
+
t.colour
|
|
490
|
+
);
|
|
491
|
+
}, "drawTask"), Ct = /* @__PURE__ */ s(function(n, t) {
|
|
492
|
+
Z(n, {
|
|
493
|
+
x: t.startx,
|
|
494
|
+
y: t.starty,
|
|
495
|
+
width: t.stopx - t.startx,
|
|
496
|
+
height: t.stopy - t.starty,
|
|
497
|
+
fill: t.fill,
|
|
498
|
+
class: "rect"
|
|
499
|
+
}).lower();
|
|
500
|
+
}, "drawBackgroundRect"), Ht = /* @__PURE__ */ s(function() {
|
|
501
|
+
return {
|
|
502
|
+
x: 0,
|
|
503
|
+
y: 0,
|
|
504
|
+
fill: void 0,
|
|
505
|
+
"text-anchor": "start",
|
|
506
|
+
width: 100,
|
|
507
|
+
height: 100,
|
|
508
|
+
textMargin: 0,
|
|
509
|
+
rx: 0,
|
|
510
|
+
ry: 0
|
|
511
|
+
};
|
|
512
|
+
}, "getTextObj"), D = /* @__PURE__ */ s(function() {
|
|
513
|
+
return {
|
|
514
|
+
x: 0,
|
|
515
|
+
y: 0,
|
|
516
|
+
width: 100,
|
|
517
|
+
anchor: "start",
|
|
518
|
+
height: 100,
|
|
519
|
+
rx: 0,
|
|
520
|
+
ry: 0
|
|
521
|
+
};
|
|
522
|
+
}, "getNoteRect"), mt = /* @__PURE__ */ function() {
|
|
523
|
+
function n(r, h, c, g, m, p, x, _) {
|
|
524
|
+
const f = h.append("text").attr("x", c + m / 2).attr("y", g + p / 2 + 5).style("font-color", _).style("text-anchor", "middle").text(r);
|
|
525
|
+
l(f, x);
|
|
526
|
+
}
|
|
527
|
+
s(n, "byText");
|
|
528
|
+
function t(r, h, c, g, m, p, x, _, f) {
|
|
529
|
+
const { taskFontSize: i, taskFontFamily: a } = _, d = r.split(/<br\s*\/?>/gi);
|
|
530
|
+
for (let u = 0; u < d.length; u++) {
|
|
531
|
+
const y = u * i - i * (d.length - 1) / 2, o = h.append("text").attr("x", c + m / 2).attr("y", g).attr("fill", f).style("text-anchor", "middle").style("font-size", i).style("font-family", a);
|
|
532
|
+
o.append("tspan").attr("x", c + m / 2).attr("dy", y).text(d[u]), o.attr("y", g + p / 2).attr("dominant-baseline", "central").attr("alignment-baseline", "central"), l(o, x);
|
|
533
|
+
}
|
|
534
|
+
}
|
|
535
|
+
s(t, "byTspan");
|
|
536
|
+
function e(r, h, c, g, m, p, x, _) {
|
|
537
|
+
const f = h.append("switch"), a = f.append("foreignObject").attr("x", c).attr("y", g).attr("width", m).attr("height", p).attr("position", "fixed").append("xhtml:div").style("display", "table").style("height", "100%").style("width", "100%");
|
|
538
|
+
a.append("div").attr("class", "label").style("display", "table-cell").style("text-align", "center").style("vertical-align", "middle").text(r), t(r, f, c, g, m, p, x, _), l(a, x);
|
|
539
|
+
}
|
|
540
|
+
s(e, "byFo");
|
|
541
|
+
function l(r, h) {
|
|
542
|
+
for (const c in h)
|
|
543
|
+
c in h && r.attr(c, h[c]);
|
|
544
|
+
}
|
|
545
|
+
return s(l, "_setTextAttrs"), function(r) {
|
|
546
|
+
return r.textPlacement === "fo" ? e : r.textPlacement === "old" ? n : t;
|
|
547
|
+
};
|
|
548
|
+
}(), Rt = /* @__PURE__ */ s(function(n) {
|
|
549
|
+
n.append("defs").append("marker").attr("id", "arrowhead").attr("refX", 5).attr("refY", 2).attr("markerWidth", 6).attr("markerHeight", 4).attr("orient", "auto").append("path").attr("d", "M 0,0 V 4 L6,2 Z");
|
|
550
|
+
}, "initGraphics");
|
|
551
|
+
function tt(n, t) {
|
|
552
|
+
n.each(function() {
|
|
553
|
+
var e = U(this), l = e.text().split(/(\s+|<br>)/).reverse(), r, h = [], c = 1.1, g = e.attr("y"), m = parseFloat(e.attr("dy")), p = e.text(null).append("tspan").attr("x", 0).attr("y", g).attr("dy", m + "em");
|
|
554
|
+
for (let x = 0; x < l.length; x++)
|
|
555
|
+
r = l[l.length - 1 - x], h.push(r), p.text(h.join(" ").trim()), (p.node().getComputedTextLength() > t || r === "<br>") && (h.pop(), p.text(h.join(" ").trim()), r === "<br>" ? h = [""] : h = [r], p = e.append("tspan").attr("x", 0).attr("y", g).attr("dy", c + "em").text(r));
|
|
556
|
+
});
|
|
557
|
+
}
|
|
558
|
+
s(tt, "wrap");
|
|
559
|
+
var Ft = /* @__PURE__ */ s(function(n, t, e, l) {
|
|
560
|
+
var _;
|
|
561
|
+
const r = e % Nt - 1, h = n.append("g");
|
|
562
|
+
t.section = r, h.attr(
|
|
563
|
+
"class",
|
|
564
|
+
(t.class ? t.class + " " : "") + "timeline-node " + ("section-" + r)
|
|
565
|
+
);
|
|
566
|
+
const c = h.append("g"), g = h.append("g"), p = g.append("text").text(t.descr).attr("dy", "1em").attr("alignment-baseline", "middle").attr("dominant-baseline", "middle").attr("text-anchor", "middle").call(tt, t.width).node().getBBox(), x = (_ = l.fontSize) != null && _.replace ? l.fontSize.replace("px", "") : l.fontSize;
|
|
567
|
+
return t.height = p.height + x * 1.1 * 0.5 + t.padding, t.height = Math.max(t.height, t.maxHeight), t.width = t.width + 2 * t.padding, g.attr("transform", "translate(" + t.width / 2 + ", " + t.padding / 2 + ")"), zt(c, t, r, l), t;
|
|
568
|
+
}, "drawNode"), Vt = /* @__PURE__ */ s(function(n, t, e) {
|
|
569
|
+
var g;
|
|
570
|
+
const l = n.append("g"), h = l.append("text").text(t.descr).attr("dy", "1em").attr("alignment-baseline", "middle").attr("dominant-baseline", "middle").attr("text-anchor", "middle").call(tt, t.width).node().getBBox(), c = (g = e.fontSize) != null && g.replace ? e.fontSize.replace("px", "") : e.fontSize;
|
|
571
|
+
return l.remove(), h.height + c * 1.1 * 0.5 + t.padding;
|
|
572
|
+
}, "getVirtualNodeHeight"), zt = /* @__PURE__ */ s(function(n, t, e) {
|
|
573
|
+
n.append("path").attr("id", "node-" + t.id).attr("class", "node-bkg node-" + t.type).attr(
|
|
574
|
+
"d",
|
|
575
|
+
`M0 ${t.height - 5} v${-t.height + 2 * 5} q0,-5 5,-5 h${t.width - 2 * 5} q5,0 5,5 v${t.height - 5} H0 Z`
|
|
576
|
+
), n.append("line").attr("class", "node-line-" + e).attr("x1", 0).attr("y1", t.height).attr("x2", t.width).attr("y2", t.height);
|
|
577
|
+
}, "defaultBkg"), H = {
|
|
578
|
+
drawRect: Z,
|
|
579
|
+
drawCircle: Mt,
|
|
580
|
+
drawSection: At,
|
|
581
|
+
drawText: ft,
|
|
582
|
+
drawLabel: $t,
|
|
583
|
+
drawTask: Pt,
|
|
584
|
+
drawBackgroundRect: Ct,
|
|
585
|
+
getTextObj: Ht,
|
|
586
|
+
getNoteRect: D,
|
|
587
|
+
initGraphics: Rt,
|
|
588
|
+
drawNode: Ft,
|
|
589
|
+
getVirtualNodeHeight: Vt
|
|
590
|
+
}, Wt = /* @__PURE__ */ s(function(n, t, e, l) {
|
|
591
|
+
var O, v;
|
|
592
|
+
const r = xt(), h = r.leftMargin ?? 50;
|
|
593
|
+
T.debug("timeline", l.db);
|
|
594
|
+
const c = r.securityLevel;
|
|
595
|
+
let g;
|
|
596
|
+
c === "sandbox" && (g = U("#i" + t));
|
|
597
|
+
const p = (c === "sandbox" ? U(g.nodes()[0].contentDocument.body) : U("body")).select("#" + t);
|
|
598
|
+
p.append("g");
|
|
599
|
+
const x = l.db.getTasks(), _ = l.db.getCommonDb().getDiagramTitle();
|
|
600
|
+
T.debug("task", x), H.initGraphics(p);
|
|
601
|
+
const f = l.db.getSections();
|
|
602
|
+
T.debug("sections", f);
|
|
603
|
+
let i = 0, a = 0, d = 0, u = 0, y = 50 + h, o = 50;
|
|
604
|
+
u = 50;
|
|
605
|
+
let S = 0, k = !0;
|
|
606
|
+
f.forEach(function(E) {
|
|
607
|
+
const b = {
|
|
608
|
+
number: S,
|
|
609
|
+
descr: E,
|
|
610
|
+
section: S,
|
|
611
|
+
width: 150,
|
|
612
|
+
padding: 20,
|
|
613
|
+
maxHeight: i
|
|
614
|
+
}, L = H.getVirtualNodeHeight(p, b, r);
|
|
615
|
+
T.debug("sectionHeight before draw", L), i = Math.max(i, L + 20);
|
|
616
|
+
});
|
|
617
|
+
let M = 0, A = 0;
|
|
618
|
+
T.debug("tasks.length", x.length);
|
|
619
|
+
for (const [E, b] of x.entries()) {
|
|
620
|
+
const L = {
|
|
621
|
+
number: E,
|
|
622
|
+
descr: b,
|
|
623
|
+
section: b.section,
|
|
624
|
+
width: 150,
|
|
625
|
+
padding: 20,
|
|
626
|
+
maxHeight: a
|
|
627
|
+
}, P = H.getVirtualNodeHeight(p, L, r);
|
|
628
|
+
T.debug("taskHeight before draw", P), a = Math.max(a, P + 20), M = Math.max(M, b.events.length);
|
|
629
|
+
let R = 0;
|
|
630
|
+
for (const F of b.events) {
|
|
631
|
+
const w = {
|
|
632
|
+
descr: F,
|
|
633
|
+
section: b.section,
|
|
634
|
+
number: b.section,
|
|
635
|
+
width: 150,
|
|
636
|
+
padding: 20,
|
|
637
|
+
maxHeight: 50
|
|
638
|
+
};
|
|
639
|
+
R += H.getVirtualNodeHeight(p, w, r);
|
|
640
|
+
}
|
|
641
|
+
A = Math.max(A, R);
|
|
642
|
+
}
|
|
643
|
+
T.debug("maxSectionHeight before draw", i), T.debug("maxTaskHeight before draw", a), f && f.length > 0 ? f.forEach((E) => {
|
|
644
|
+
const b = x.filter((F) => F.section === E), L = {
|
|
645
|
+
number: S,
|
|
646
|
+
descr: E,
|
|
647
|
+
section: S,
|
|
648
|
+
width: 200 * Math.max(b.length, 1) - 50,
|
|
649
|
+
padding: 20,
|
|
650
|
+
maxHeight: i
|
|
651
|
+
};
|
|
652
|
+
T.debug("sectionNode", L);
|
|
653
|
+
const P = p.append("g"), R = H.drawNode(P, L, S, r);
|
|
654
|
+
T.debug("sectionNode output", R), P.attr("transform", `translate(${y}, ${u})`), o += i + 50, b.length > 0 && st(
|
|
655
|
+
p,
|
|
656
|
+
b,
|
|
657
|
+
S,
|
|
658
|
+
y,
|
|
659
|
+
o,
|
|
660
|
+
a,
|
|
661
|
+
r,
|
|
662
|
+
M,
|
|
663
|
+
A,
|
|
664
|
+
i,
|
|
665
|
+
!1
|
|
666
|
+
), y += 200 * Math.max(b.length, 1), o = u, S++;
|
|
667
|
+
}) : (k = !1, st(
|
|
668
|
+
p,
|
|
669
|
+
x,
|
|
670
|
+
S,
|
|
671
|
+
y,
|
|
672
|
+
o,
|
|
673
|
+
a,
|
|
674
|
+
r,
|
|
675
|
+
M,
|
|
676
|
+
A,
|
|
677
|
+
i,
|
|
678
|
+
!0
|
|
679
|
+
));
|
|
680
|
+
const B = p.node().getBBox();
|
|
681
|
+
T.debug("bounds", B), _ && p.append("text").text(_).attr("x", B.width / 2 - h).attr("font-size", "4ex").attr("font-weight", "bold").attr("y", 20), d = k ? i + a + 150 : a + 100, p.append("g").attr("class", "lineWrapper").append("line").attr("x1", h).attr("y1", d).attr("x2", B.width + 3 * h).attr("y2", d).attr("stroke-width", 4).attr("stroke", "black").attr("marker-end", "url(#arrowhead)"), kt(
|
|
682
|
+
void 0,
|
|
683
|
+
p,
|
|
684
|
+
((O = r.timeline) == null ? void 0 : O.padding) ?? 50,
|
|
685
|
+
((v = r.timeline) == null ? void 0 : v.useMaxWidth) ?? !1
|
|
686
|
+
);
|
|
687
|
+
}, "draw"), st = /* @__PURE__ */ s(function(n, t, e, l, r, h, c, g, m, p, x) {
|
|
688
|
+
var _;
|
|
689
|
+
for (const f of t) {
|
|
690
|
+
const i = {
|
|
691
|
+
descr: f.task,
|
|
692
|
+
section: e,
|
|
693
|
+
number: e,
|
|
694
|
+
width: 150,
|
|
695
|
+
padding: 20,
|
|
696
|
+
maxHeight: h
|
|
697
|
+
};
|
|
698
|
+
T.debug("taskNode", i);
|
|
699
|
+
const a = n.append("g").attr("class", "taskWrapper"), u = H.drawNode(a, i, e, c).height;
|
|
700
|
+
if (T.debug("taskHeight after draw", u), a.attr("transform", `translate(${l}, ${r})`), h = Math.max(h, u), f.events) {
|
|
701
|
+
const y = n.append("g").attr("class", "lineWrapper");
|
|
702
|
+
let o = h;
|
|
703
|
+
r += 100, o = o + Bt(n, f.events, e, l, r, c), r -= 100, y.append("line").attr("x1", l + 190 / 2).attr("y1", r + h).attr("x2", l + 190 / 2).attr(
|
|
704
|
+
"y2",
|
|
705
|
+
r + h + (x ? h : p) + m + 120
|
|
706
|
+
).attr("stroke-width", 2).attr("stroke", "black").attr("marker-end", "url(#arrowhead)").attr("stroke-dasharray", "5,5");
|
|
707
|
+
}
|
|
708
|
+
l = l + 200, x && !((_ = c.timeline) != null && _.disableMulticolor) && e++;
|
|
709
|
+
}
|
|
710
|
+
r = r - 10;
|
|
711
|
+
}, "drawTasks"), Bt = /* @__PURE__ */ s(function(n, t, e, l, r, h) {
|
|
712
|
+
let c = 0;
|
|
713
|
+
const g = r;
|
|
714
|
+
r = r + 100;
|
|
715
|
+
for (const m of t) {
|
|
716
|
+
const p = {
|
|
717
|
+
descr: m,
|
|
718
|
+
section: e,
|
|
719
|
+
number: e,
|
|
720
|
+
width: 150,
|
|
721
|
+
padding: 20,
|
|
722
|
+
maxHeight: 50
|
|
723
|
+
};
|
|
724
|
+
T.debug("eventNode", p);
|
|
725
|
+
const x = n.append("g").attr("class", "eventWrapper"), f = H.drawNode(x, p, e, h).height;
|
|
726
|
+
c = c + f, x.attr("transform", `translate(${l}, ${r})`), r = r + 10 + f;
|
|
727
|
+
}
|
|
728
|
+
return r = g, c;
|
|
729
|
+
}, "drawEvents"), Ot = {
|
|
730
|
+
setConf: /* @__PURE__ */ s(() => {
|
|
731
|
+
}, "setConf"),
|
|
732
|
+
draw: Wt
|
|
733
|
+
}, jt = /* @__PURE__ */ s((n) => {
|
|
734
|
+
let t = "";
|
|
735
|
+
for (let e = 0; e < n.THEME_COLOR_LIMIT; e++)
|
|
736
|
+
n["lineColor" + e] = n["lineColor" + e] || n["cScaleInv" + e], vt(n["lineColor" + e]) ? n["lineColor" + e] = _t(n["lineColor" + e], 20) : n["lineColor" + e] = bt(n["lineColor" + e], 20);
|
|
737
|
+
for (let e = 0; e < n.THEME_COLOR_LIMIT; e++) {
|
|
738
|
+
const l = "" + (17 - 3 * e);
|
|
739
|
+
t += `
|
|
740
|
+
.section-${e - 1} rect, .section-${e - 1} path, .section-${e - 1} circle, .section-${e - 1} path {
|
|
741
|
+
fill: ${n["cScale" + e]};
|
|
742
|
+
}
|
|
743
|
+
.section-${e - 1} text {
|
|
744
|
+
fill: ${n["cScaleLabel" + e]};
|
|
745
|
+
}
|
|
746
|
+
.node-icon-${e - 1} {
|
|
747
|
+
font-size: 40px;
|
|
748
|
+
color: ${n["cScaleLabel" + e]};
|
|
749
|
+
}
|
|
750
|
+
.section-edge-${e - 1}{
|
|
751
|
+
stroke: ${n["cScale" + e]};
|
|
752
|
+
}
|
|
753
|
+
.edge-depth-${e - 1}{
|
|
754
|
+
stroke-width: ${l};
|
|
755
|
+
}
|
|
756
|
+
.section-${e - 1} line {
|
|
757
|
+
stroke: ${n["cScaleInv" + e]} ;
|
|
758
|
+
stroke-width: 3;
|
|
759
|
+
}
|
|
760
|
+
|
|
761
|
+
.lineWrapper line{
|
|
762
|
+
stroke: ${n["cScaleLabel" + e]} ;
|
|
763
|
+
}
|
|
764
|
+
|
|
765
|
+
.disabled, .disabled circle, .disabled text {
|
|
766
|
+
fill: lightgray;
|
|
767
|
+
}
|
|
768
|
+
.disabled text {
|
|
769
|
+
fill: #efefef;
|
|
770
|
+
}
|
|
771
|
+
`;
|
|
772
|
+
}
|
|
773
|
+
return t;
|
|
774
|
+
}, "genSections"), Gt = /* @__PURE__ */ s((n) => `
|
|
775
|
+
.edge {
|
|
776
|
+
stroke-width: 3;
|
|
777
|
+
}
|
|
778
|
+
${jt(n)}
|
|
779
|
+
.section-root rect, .section-root path, .section-root circle {
|
|
780
|
+
fill: ${n.git0};
|
|
781
|
+
}
|
|
782
|
+
.section-root text {
|
|
783
|
+
fill: ${n.gitBranchLabel0};
|
|
784
|
+
}
|
|
785
|
+
.icon-container {
|
|
786
|
+
height:100%;
|
|
787
|
+
display: flex;
|
|
788
|
+
justify-content: center;
|
|
789
|
+
align-items: center;
|
|
790
|
+
}
|
|
791
|
+
.edge {
|
|
792
|
+
fill: none;
|
|
793
|
+
}
|
|
794
|
+
.eventWrapper {
|
|
795
|
+
filter: brightness(120%);
|
|
796
|
+
}
|
|
797
|
+
`, "getStyles"), Ut = Gt, Kt = {
|
|
798
|
+
db: at,
|
|
799
|
+
renderer: Ot,
|
|
800
|
+
parser: Tt,
|
|
801
|
+
styles: Ut
|
|
802
|
+
};
|
|
803
|
+
export {
|
|
804
|
+
Kt as diagram
|
|
805
|
+
};
|