@zjlab-frontier/markdown 1.2.6 → 1.2.8

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 (93) hide show
  1. package/dist/_basePickBy-BKSBQzQ_.mjs +151 -0
  2. package/dist/_baseUniq-C5o5iO5w.mjs +614 -0
  3. package/dist/arc-CBfSUzPA.mjs +83 -0
  4. package/dist/architecture-U656AL7Q-BnMV_JKl.mjs +5 -0
  5. package/dist/architectureDiagram-VXUJARFQ-D2XPETMC.mjs +4661 -0
  6. package/dist/blockDiagram-VD42YOAC-DUECz_lY.mjs +2261 -0
  7. package/dist/{c4Diagram-c83219d4-DPiPzMng.mjs → c4Diagram-YG6GDRKO-CFmlTOHZ.mjs} +795 -794
  8. package/dist/{channel-DLtPd-ti.mjs → channel-Cn_QU-_B.mjs} +1 -1
  9. package/dist/chunk-4BX2VUAB-Ddlc-PTG.mjs +8 -0
  10. package/dist/chunk-55IACEB6-3bItwaWC.mjs +8 -0
  11. package/dist/chunk-B4BG7PRW-fzrbCD9m.mjs +1375 -0
  12. package/dist/chunk-DI55MBZ5-BsM6MitH.mjs +1370 -0
  13. package/dist/chunk-FMBD7UC4-D0L58RDY.mjs +19 -0
  14. package/dist/chunk-QN33PNHL-BRwIp2MO.mjs +19 -0
  15. package/dist/chunk-QZHKN3VN-3WK04u4j.mjs +15 -0
  16. package/dist/chunk-TZMSLE5B-QppC8KMb.mjs +64 -0
  17. package/dist/classDiagram-2ON5EDUG-DV1NEn5N.mjs +16 -0
  18. package/dist/classDiagram-v2-WZHVMYZB-DV1NEn5N.mjs +16 -0
  19. package/dist/{clone-Bekeo3TW.mjs → clone-BqweF2qi.mjs} +1 -1
  20. package/dist/cose-bilkent-S5V4N54A-v0swiza8.mjs +2608 -0
  21. package/dist/cytoscape.esm-MSgpKP8s.mjs +18721 -0
  22. package/dist/dagre-6UL2VRFP-BAviPdlZ.mjs +444 -0
  23. package/dist/defaultLocale-D7EN2tov.mjs +171 -0
  24. package/dist/diagram-PSM6KHXK-CfFtF0lE.mjs +531 -0
  25. package/dist/diagram-QEK2KX5R-CTU-B7VS.mjs +217 -0
  26. package/dist/diagram-S2PKOQOG-jCY9Tumq.mjs +142 -0
  27. package/dist/erDiagram-Q2GNP2WA-BcKQMz3F.mjs +841 -0
  28. package/dist/flowDiagram-NV44I4VS-udQXA0_8.mjs +1620 -0
  29. package/dist/ganttDiagram-JELNMOA3-Dk5PKr9Z.mjs +2670 -0
  30. package/dist/gitGraph-F6HP7TQM-DkwcvDhk.mjs +5 -0
  31. package/dist/gitGraphDiagram-NY62KEGX-DjJof2Hb.mjs +699 -0
  32. package/dist/graph-D-Tmz5vo.mjs +247 -0
  33. package/dist/{index-C3zgkbpi.mjs → index-CWsdn0Oh.mjs} +35928 -28717
  34. package/dist/index.es.js +4 -4
  35. package/dist/index.umd.js +1884 -1442
  36. package/dist/info-NVLQJR56-TpH_gM4H.mjs +5 -0
  37. package/dist/infoDiagram-WHAUD3N6-DrsD1lMt.mjs +24 -0
  38. package/dist/journeyDiagram-XKPGCS4Q-Cq5Y94aQ.mjs +834 -0
  39. package/dist/kanban-definition-3W4ZIXB7-BEiPA-13.mjs +719 -0
  40. package/dist/layout-QOTssOZa.mjs +1335 -0
  41. package/dist/linear-CCFzTlKw.mjs +259 -0
  42. package/dist/mermaid-parser.core-CSzOHvro.mjs +12966 -0
  43. package/dist/mindmap-definition-VGOIOE7T-ChH1RCzL.mjs +784 -0
  44. package/dist/packet-BFZMPI3H-RY9z3tXt.mjs +5 -0
  45. package/dist/pie-7BOR55EZ-DWSbWhsM.mjs +5 -0
  46. package/dist/pieDiagram-ADFJNKIX-CjvCGMnv.mjs +161 -0
  47. package/dist/quadrantDiagram-AYHSOK5B-yLMChKK1.mjs +1022 -0
  48. package/dist/radar-NHE76QYJ-DxZgeX1m.mjs +5 -0
  49. package/dist/requirementDiagram-UZGBJVZJ-D_Kv5PcV.mjs +850 -0
  50. package/dist/sankeyDiagram-TZEHDZUN-BT4gTtRH.mjs +810 -0
  51. package/dist/sequenceDiagram-WL72ISMW-CcZ0NGLk.mjs +2511 -0
  52. package/dist/stateDiagram-FKZM4ZOC-BpQhvfG2.mjs +263 -0
  53. package/dist/stateDiagram-v2-4FDKWEC3-X4ju2xD3.mjs +16 -0
  54. package/dist/timeline-definition-IT6M3QCI-mIpcHDXS.mjs +795 -0
  55. package/dist/treemap-KMMF4GRG-CTNebVlI.mjs +5 -0
  56. package/dist/{xychartDiagram-f5964ef8-fDv4mp1P.mjs → xychartDiagram-PRI3JC2R-DooouUUZ.mjs} +503 -445
  57. package/package.json +3 -3
  58. package/dist/Tableau10-D7jGxypv.mjs +0 -8
  59. package/dist/arc-DqrMsJeG.mjs +0 -84
  60. package/dist/array-CqVTtuYm.mjs +0 -6
  61. package/dist/blockDiagram-c4efeb88-B7Mcu3H_.mjs +0 -1221
  62. package/dist/classDiagram-beda092f-CRNvkLYf.mjs +0 -218
  63. package/dist/classDiagram-v2-2358418a-CUFy5DGQ.mjs +0 -200
  64. package/dist/createText-1719965b-BEXd6yNU.mjs +0 -2955
  65. package/dist/edges-96097737-CTds2HS2.mjs +0 -1088
  66. package/dist/erDiagram-0228fc6a-DdOqXYmJ.mjs +0 -929
  67. package/dist/flowDb-c6c81e3f-LkwBoeG_.mjs +0 -1126
  68. package/dist/flowDiagram-50d868cf-BlsvSXSO.mjs +0 -788
  69. package/dist/flowDiagram-v2-4f6560a1-KScjGHBx.mjs +0 -17
  70. package/dist/flowchart-elk-definition-6af322e1-mTna7kqR.mjs +0 -48146
  71. package/dist/ganttDiagram-a2739b55-B2o_UW9_.mjs +0 -2477
  72. package/dist/gitGraphDiagram-82fe8481-B6-VRPS0.mjs +0 -1264
  73. package/dist/graph-CSVeLFCJ.mjs +0 -847
  74. package/dist/index-5325376f-DsGv8AO4.mjs +0 -373
  75. package/dist/infoDiagram-8eee0895-Cx7V52QV.mjs +0 -319
  76. package/dist/journeyDiagram-c64418c1-C03IeVHa.mjs +0 -801
  77. package/dist/layout-DfnPfvJm.mjs +0 -1472
  78. package/dist/line-BwAWhs05.mjs +0 -33
  79. package/dist/linear-Ck_Qt8nI.mjs +0 -423
  80. package/dist/mindmap-definition-8da855dc-DdMLbjBy.mjs +0 -21922
  81. package/dist/path-DLwuMfdd.mjs +0 -84
  82. package/dist/pieDiagram-a8764435-BymSofHf.mjs +0 -500
  83. package/dist/quadrantDiagram-1e28029f-BXtW3eHp.mjs +0 -903
  84. package/dist/requirementDiagram-08caed73-DGBKyhE-.mjs +0 -767
  85. package/dist/sankeyDiagram-a04cb91d-BfUYRgG3.mjs +0 -802
  86. package/dist/sequenceDiagram-c5b8d532-Jj_1ttvV.mjs +0 -2234
  87. package/dist/stateDiagram-1ecb1508-CbSM9l6I.mjs +0 -266
  88. package/dist/stateDiagram-v2-c2b004d7-dS2KbqNc.mjs +0 -184
  89. package/dist/styles-b4e223ce-D01XEgS6.mjs +0 -1089
  90. package/dist/styles-ca3715f6-amZyw1GB.mjs +0 -960
  91. package/dist/styles-d45a18b0-GN33fYGn.mjs +0 -436
  92. package/dist/svgDrawCommon-b86b1483-BQvqkIEE.mjs +0 -64
  93. package/dist/timeline-definition-faaaa080-BjbyYT4p.mjs +0 -792
@@ -1,792 +0,0 @@
1
- import { ar as gt, as as ft, at as mt, g as xt, l as E, d as G, o as _t, au as bt, E as kt } from "./index-C3zgkbpi.mjs";
2
- import { a as D } from "./arc-DqrMsJeG.mjs";
3
- var K = (function() {
4
- var n = function(f, i, r, c) {
5
- for (r = r || {}, c = f.length; c--; r[f[c]] = i)
6
- ;
7
- return r;
8
- }, t = [6, 8, 10, 11, 12, 14, 16, 17, 20, 21], e = [1, 9], a = [1, 10], s = [1, 11], h = [1, 12], l = [1, 13], p = [1, 16], y = [1, 17], g = {
9
- trace: function() {
10
- },
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: function(i, r, c, d, u, o, $) {
16
- var x = o.length - 1;
17
- switch (u) {
18
- case 1:
19
- return o[x - 1];
20
- case 2:
21
- this.$ = [];
22
- break;
23
- case 3:
24
- o[x - 1].push(o[x]), this.$ = o[x - 1];
25
- break;
26
- case 4:
27
- case 5:
28
- this.$ = o[x];
29
- break;
30
- case 6:
31
- case 7:
32
- this.$ = [];
33
- break;
34
- case 8:
35
- d.getCommonDb().setDiagramTitle(o[x].substr(6)), this.$ = o[x].substr(6);
36
- break;
37
- case 9:
38
- this.$ = o[x].trim(), d.getCommonDb().setAccTitle(this.$);
39
- break;
40
- case 10:
41
- case 11:
42
- this.$ = o[x].trim(), d.getCommonDb().setAccDescription(this.$);
43
- break;
44
- case 12:
45
- d.addSection(o[x].substr(8)), this.$ = o[x].substr(8);
46
- break;
47
- case 15:
48
- d.addTask(o[x], 0, ""), this.$ = o[x];
49
- break;
50
- case 16:
51
- d.addEvent(o[x].substr(2)), this.$ = o[x];
52
- break;
53
- }
54
- },
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: a, 14: s, 16: h, 17: l, 18: 14, 19: 15, 20: p, 21: y }, n(t, [2, 7], { 1: [2, 1] }), n(t, [2, 3]), { 9: 18, 11: e, 12: a, 14: s, 16: h, 17: l, 18: 14, 19: 15, 20: p, 21: y }, 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: function(i, r) {
58
- if (r.recoverable)
59
- this.trace(i);
60
- else {
61
- var c = new Error(i);
62
- throw c.hash = r, c;
63
- }
64
- },
65
- parse: function(i) {
66
- var r = this, c = [0], d = [], u = [null], o = [], $ = this.table, x = "", T = 0, W = 0, C = 2, A = 1, B = o.slice.call(arguments, 1), k = Object.create(this.lexer), w = { yy: {} };
67
- for (var v in this.yy)
68
- Object.prototype.hasOwnProperty.call(this.yy, v) && (w.yy[v] = this.yy[v]);
69
- k.setInput(i, w.yy), w.yy.lexer = k, w.yy.parser = this, typeof k.yylloc > "u" && (k.yylloc = {});
70
- var I = k.yylloc;
71
- o.push(I);
72
- var H = k.options && k.options.ranges;
73
- typeof w.yy.parseError == "function" ? this.parseError = w.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
74
- function z() {
75
- var M;
76
- return M = d.pop() || k.lex() || A, typeof M != "number" && (M instanceof Array && (d = M, M = d.pop()), M = r.symbols_[M] || M), M;
77
- }
78
- for (var b, L, S, Z, R = {}, O, N, Y, j; ; ) {
79
- if (L = c[c.length - 1], this.defaultActions[L] ? S = this.defaultActions[L] : ((b === null || typeof b > "u") && (b = z()), S = $[L] && $[L][b]), typeof S > "u" || !S.length || !S[0]) {
80
- var J = "";
81
- j = [];
82
- for (O in $[L])
83
- this.terminals_[O] && O > C && j.push("'" + this.terminals_[O] + "'");
84
- k.showPosition ? J = "Parse error on line " + (T + 1) + `:
85
- ` + k.showPosition() + `
86
- Expecting ` + j.join(", ") + ", got '" + (this.terminals_[b] || b) + "'" : J = "Parse error on line " + (T + 1) + ": Unexpected " + (b == A ? "end of input" : "'" + (this.terminals_[b] || b) + "'"), this.parseError(J, {
87
- text: k.match,
88
- token: this.terminals_[b] || b,
89
- line: k.yylineno,
90
- loc: I,
91
- expected: j
92
- });
93
- }
94
- if (S[0] instanceof Array && S.length > 1)
95
- throw new Error("Parse Error: multiple actions possible at state: " + L + ", token: " + b);
96
- switch (S[0]) {
97
- case 1:
98
- c.push(b), u.push(k.yytext), o.push(k.yylloc), c.push(S[1]), b = null, W = k.yyleng, x = k.yytext, T = k.yylineno, I = k.yylloc;
99
- break;
100
- case 2:
101
- if (N = this.productions_[S[1]][1], R.$ = u[u.length - N], R._$ = {
102
- first_line: o[o.length - (N || 1)].first_line,
103
- last_line: o[o.length - 1].last_line,
104
- first_column: o[o.length - (N || 1)].first_column,
105
- last_column: o[o.length - 1].last_column
106
- }, H && (R._$.range = [
107
- o[o.length - (N || 1)].range[0],
108
- o[o.length - 1].range[1]
109
- ]), Z = this.performAction.apply(R, [
110
- x,
111
- W,
112
- T,
113
- w.yy,
114
- S[1],
115
- u,
116
- o
117
- ].concat(B)), typeof Z < "u")
118
- return Z;
119
- N && (c = c.slice(0, -1 * N * 2), u = u.slice(0, -1 * N), o = o.slice(0, -1 * N)), c.push(this.productions_[S[1]][0]), u.push(R.$), o.push(R._$), Y = $[c[c.length - 2]][c[c.length - 1]], c.push(Y);
120
- break;
121
- case 3:
122
- return !0;
123
- }
124
- }
125
- return !0;
126
- }
127
- }, _ = /* @__PURE__ */ (function() {
128
- var f = {
129
- EOF: 1,
130
- parseError: function(r, c) {
131
- if (this.yy.parser)
132
- this.yy.parser.parseError(r, c);
133
- else
134
- throw new Error(r);
135
- },
136
- // resets the lexer, sets new input
137
- setInput: function(i, r) {
138
- return this.yy = r || 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 = {
139
- first_line: 1,
140
- first_column: 0,
141
- last_line: 1,
142
- last_column: 0
143
- }, this.options.ranges && (this.yylloc.range = [0, 0]), this.offset = 0, this;
144
- },
145
- // consumes and returns one char from the input
146
- input: function() {
147
- var i = this._input[0];
148
- this.yytext += i, this.yyleng++, this.offset++, this.match += i, this.matched += i;
149
- var r = i.match(/(?:\r\n?|\n).*/g);
150
- return r ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++, this.options.ranges && this.yylloc.range[1]++, this._input = this._input.slice(1), i;
151
- },
152
- // unshifts one char (or a string) into the input
153
- unput: function(i) {
154
- var r = i.length, c = i.split(/(?:\r\n?|\n)/g);
155
- this._input = i + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - r), this.offset -= r;
156
- var d = this.match.split(/(?:\r\n?|\n)/g);
157
- this.match = this.match.substr(0, this.match.length - 1), this.matched = this.matched.substr(0, this.matched.length - 1), c.length - 1 && (this.yylineno -= c.length - 1);
158
- var u = this.yylloc.range;
159
- return this.yylloc = {
160
- first_line: this.yylloc.first_line,
161
- last_line: this.yylineno + 1,
162
- first_column: this.yylloc.first_column,
163
- last_column: c ? (c.length === d.length ? this.yylloc.first_column : 0) + d[d.length - c.length].length - c[0].length : this.yylloc.first_column - r
164
- }, this.options.ranges && (this.yylloc.range = [u[0], u[0] + this.yyleng - r]), this.yyleng = this.yytext.length, this;
165
- },
166
- // When called from action, caches matched text and appends it on next action
167
- more: function() {
168
- return this._more = !0, this;
169
- },
170
- // 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.
171
- reject: function() {
172
- if (this.options.backtrack_lexer)
173
- this._backtrack = !0;
174
- else
175
- 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).
176
- ` + this.showPosition(), {
177
- text: "",
178
- token: null,
179
- line: this.yylineno
180
- });
181
- return this;
182
- },
183
- // retain first n characters of the match
184
- less: function(i) {
185
- this.unput(this.match.slice(i));
186
- },
187
- // displays already matched input, i.e. for error messages
188
- pastInput: function() {
189
- var i = this.matched.substr(0, this.matched.length - this.match.length);
190
- return (i.length > 20 ? "..." : "") + i.substr(-20).replace(/\n/g, "");
191
- },
192
- // displays upcoming input, i.e. for error messages
193
- upcomingInput: function() {
194
- var i = this.match;
195
- return i.length < 20 && (i += this._input.substr(0, 20 - i.length)), (i.substr(0, 20) + (i.length > 20 ? "..." : "")).replace(/\n/g, "");
196
- },
197
- // displays the character position where the lexing error occurred, i.e. for error messages
198
- showPosition: function() {
199
- var i = this.pastInput(), r = new Array(i.length + 1).join("-");
200
- return i + this.upcomingInput() + `
201
- ` + r + "^";
202
- },
203
- // test the lexed token: return FALSE when not a match, otherwise return token
204
- test_match: function(i, r) {
205
- var c, d, u;
206
- if (this.options.backtrack_lexer && (u = {
207
- yylineno: this.yylineno,
208
- yylloc: {
209
- first_line: this.yylloc.first_line,
210
- last_line: this.last_line,
211
- first_column: this.yylloc.first_column,
212
- last_column: this.yylloc.last_column
213
- },
214
- yytext: this.yytext,
215
- match: this.match,
216
- matches: this.matches,
217
- matched: this.matched,
218
- yyleng: this.yyleng,
219
- offset: this.offset,
220
- _more: this._more,
221
- _input: this._input,
222
- yy: this.yy,
223
- conditionStack: this.conditionStack.slice(0),
224
- done: this.done
225
- }, this.options.ranges && (u.yylloc.range = this.yylloc.range.slice(0))), d = i[0].match(/(?:\r\n?|\n).*/g), d && (this.yylineno += d.length), this.yylloc = {
226
- first_line: this.yylloc.last_line,
227
- last_line: this.yylineno + 1,
228
- first_column: this.yylloc.last_column,
229
- last_column: d ? d[d.length - 1].length - d[d.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + i[0].length
230
- }, 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], c = this.performAction.call(this, this.yy, this, r, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), c)
231
- return c;
232
- if (this._backtrack) {
233
- for (var o in u)
234
- this[o] = u[o];
235
- return !1;
236
- }
237
- return !1;
238
- },
239
- // return next match in input
240
- next: function() {
241
- if (this.done)
242
- return this.EOF;
243
- this._input || (this.done = !0);
244
- var i, r, c, d;
245
- this._more || (this.yytext = "", this.match = "");
246
- for (var u = this._currentRules(), o = 0; o < u.length; o++)
247
- if (c = this._input.match(this.rules[u[o]]), c && (!r || c[0].length > r[0].length)) {
248
- if (r = c, d = o, this.options.backtrack_lexer) {
249
- if (i = this.test_match(c, u[o]), i !== !1)
250
- return i;
251
- if (this._backtrack) {
252
- r = !1;
253
- continue;
254
- } else
255
- return !1;
256
- } else if (!this.options.flex)
257
- break;
258
- }
259
- return r ? (i = this.test_match(r, u[d]), i !== !1 ? i : !1) : this._input === "" ? this.EOF : this.parseError("Lexical error on line " + (this.yylineno + 1) + `. Unrecognized text.
260
- ` + this.showPosition(), {
261
- text: "",
262
- token: null,
263
- line: this.yylineno
264
- });
265
- },
266
- // return next match that has a token
267
- lex: function() {
268
- var r = this.next();
269
- return r || this.lex();
270
- },
271
- // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)
272
- begin: function(r) {
273
- this.conditionStack.push(r);
274
- },
275
- // pop the previously active lexer condition state off the condition stack
276
- popState: function() {
277
- var r = this.conditionStack.length - 1;
278
- return r > 0 ? this.conditionStack.pop() : this.conditionStack[0];
279
- },
280
- // produce the lexer rule set which is active for the currently active lexer condition state
281
- _currentRules: function() {
282
- return this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1] ? this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules : this.conditions.INITIAL.rules;
283
- },
284
- // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available
285
- topState: function(r) {
286
- return r = this.conditionStack.length - 1 - Math.abs(r || 0), r >= 0 ? this.conditionStack[r] : "INITIAL";
287
- },
288
- // alias for begin(condition)
289
- pushState: function(r) {
290
- this.begin(r);
291
- },
292
- // return the number of states currently on the stack
293
- stateStackSize: function() {
294
- return this.conditionStack.length;
295
- },
296
- options: { "case-insensitive": !0 },
297
- performAction: function(r, c, d, u) {
298
- switch (d) {
299
- case 0:
300
- break;
301
- case 1:
302
- break;
303
- case 2:
304
- return 10;
305
- case 3:
306
- break;
307
- case 4:
308
- break;
309
- case 5:
310
- return 4;
311
- case 6:
312
- return 11;
313
- case 7:
314
- return this.begin("acc_title"), 12;
315
- case 8:
316
- return this.popState(), "acc_title_value";
317
- case 9:
318
- return this.begin("acc_descr"), 14;
319
- case 10:
320
- return this.popState(), "acc_descr_value";
321
- case 11:
322
- this.begin("acc_descr_multiline");
323
- break;
324
- case 12:
325
- this.popState();
326
- break;
327
- case 13:
328
- return "acc_descr_multiline_value";
329
- case 14:
330
- return 17;
331
- case 15:
332
- return 21;
333
- case 16:
334
- return 20;
335
- case 17:
336
- return 6;
337
- case 18:
338
- return "INVALID";
339
- }
340
- },
341
- 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],
342
- 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 } }
343
- };
344
- return f;
345
- })();
346
- g.lexer = _;
347
- function m() {
348
- this.yy = {};
349
- }
350
- return m.prototype = g, g.Parser = m, new m();
351
- })();
352
- K.parser = K;
353
- const vt = K;
354
- let F = "", st = 0;
355
- const Q = [], q = [], V = [], it = () => bt, rt = function() {
356
- Q.length = 0, q.length = 0, F = "", V.length = 0, kt();
357
- }, at = function(n) {
358
- F = n, Q.push(n);
359
- }, lt = function() {
360
- return Q;
361
- }, ot = function() {
362
- let n = tt();
363
- const t = 100;
364
- let e = 0;
365
- for (; !n && e < t; )
366
- n = tt(), e++;
367
- return q.push(...V), q;
368
- }, ct = function(n, t, e) {
369
- const a = {
370
- id: st++,
371
- section: F,
372
- type: F,
373
- task: n,
374
- score: t || 0,
375
- //if event is defined, then add it the events array
376
- events: e ? [e] : []
377
- };
378
- V.push(a);
379
- }, ht = function(n) {
380
- V.find((e) => e.id === st - 1).events.push(n);
381
- }, dt = function(n) {
382
- const t = {
383
- section: F,
384
- type: F,
385
- description: n,
386
- task: n,
387
- classes: []
388
- };
389
- q.push(t);
390
- }, tt = function() {
391
- const n = function(e) {
392
- return V[e].processed;
393
- };
394
- let t = !0;
395
- for (const [e, a] of V.entries())
396
- n(e), t = t && a.processed;
397
- return t;
398
- }, wt = {
399
- clear: rt,
400
- getCommonDb: it,
401
- addSection: at,
402
- getSections: lt,
403
- getTasks: ot,
404
- addTask: ct,
405
- addTaskOrg: dt,
406
- addEvent: ht
407
- }, St = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
408
- __proto__: null,
409
- addEvent: ht,
410
- addSection: at,
411
- addTask: ct,
412
- addTaskOrg: dt,
413
- clear: rt,
414
- default: wt,
415
- getCommonDb: it,
416
- getSections: lt,
417
- getTasks: ot
418
- }, Symbol.toStringTag, { value: "Module" })), Et = 12, U = function(n, t) {
419
- const e = n.append("rect");
420
- 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;
421
- }, Tt = function(n, t) {
422
- const a = n.append("circle").attr("cx", t.cx).attr("cy", t.cy).attr("class", "face").attr("r", 15).attr("stroke-width", 2).attr("overflow", "visible"), s = n.append("g");
423
- s.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"), s.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");
424
- function h(y) {
425
- const g = D().startAngle(Math.PI / 2).endAngle(3 * (Math.PI / 2)).innerRadius(7.5).outerRadius(6.8181818181818175);
426
- y.append("path").attr("class", "mouth").attr("d", g).attr("transform", "translate(" + t.cx + "," + (t.cy + 2) + ")");
427
- }
428
- function l(y) {
429
- const g = D().startAngle(3 * Math.PI / 2).endAngle(5 * (Math.PI / 2)).innerRadius(7.5).outerRadius(6.8181818181818175);
430
- y.append("path").attr("class", "mouth").attr("d", g).attr("transform", "translate(" + t.cx + "," + (t.cy + 7) + ")");
431
- }
432
- function p(y) {
433
- y.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");
434
- }
435
- return t.score > 3 ? h(s) : t.score < 3 ? l(s) : p(s), a;
436
- }, It = function(n, t) {
437
- const e = n.append("circle");
438
- 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;
439
- }, ut = function(n, t) {
440
- const e = t.text.replace(/<br\s*\/?>/gi, " "), a = n.append("text");
441
- a.attr("x", t.x), a.attr("y", t.y), a.attr("class", "legend"), a.style("text-anchor", t.anchor), t.class !== void 0 && a.attr("class", t.class);
442
- const s = a.append("tspan");
443
- return s.attr("x", t.x + t.textMargin * 2), s.text(e), a;
444
- }, $t = function(n, t) {
445
- function e(s, h, l, p, y) {
446
- return s + "," + h + " " + (s + l) + "," + h + " " + (s + l) + "," + (h + p - y) + " " + (s + l - y * 1.2) + "," + (h + p) + " " + s + "," + (h + p);
447
- }
448
- const a = n.append("polygon");
449
- a.attr("points", e(t.x, t.y, 50, 20, 7)), a.attr("class", "labelBox"), t.y = t.y + t.labelMargin, t.x = t.x + 0.5 * t.labelMargin, ut(n, t);
450
- }, Nt = function(n, t, e) {
451
- const a = n.append("g"), s = X();
452
- s.x = t.x, s.y = t.y, s.fill = t.fill, s.width = e.width, s.height = e.height, s.class = "journey-section section-type-" + t.num, s.rx = 3, s.ry = 3, U(a, s), pt(e)(
453
- t.text,
454
- a,
455
- s.x,
456
- s.y,
457
- s.width,
458
- s.height,
459
- { class: "journey-section section-type-" + t.num },
460
- e,
461
- t.colour
462
- );
463
- };
464
- let et = -1;
465
- const Mt = function(n, t, e) {
466
- const a = t.x + e.width / 2, s = n.append("g");
467
- et++, s.append("line").attr("id", "task" + et).attr("x1", a).attr("y1", t.y).attr("x2", a).attr("y2", 450).attr("class", "task-line").attr("stroke-width", "1px").attr("stroke-dasharray", "4 2").attr("stroke", "#666"), Tt(s, {
468
- cx: a,
469
- cy: 300 + (5 - t.score) * 30,
470
- score: t.score
471
- });
472
- const l = X();
473
- l.x = t.x, l.y = t.y, l.fill = t.fill, l.width = e.width, l.height = e.height, l.class = "task task-type-" + t.num, l.rx = 3, l.ry = 3, U(s, l), t.x + 14, pt(e)(
474
- t.task,
475
- s,
476
- l.x,
477
- l.y,
478
- l.width,
479
- l.height,
480
- { class: "task" },
481
- e,
482
- t.colour
483
- );
484
- }, Lt = function(n, t) {
485
- U(n, {
486
- x: t.startx,
487
- y: t.starty,
488
- width: t.stopx - t.startx,
489
- height: t.stopy - t.starty,
490
- fill: t.fill,
491
- class: "rect"
492
- }).lower();
493
- }, At = function() {
494
- return {
495
- x: 0,
496
- y: 0,
497
- fill: void 0,
498
- "text-anchor": "start",
499
- width: 100,
500
- height: 100,
501
- textMargin: 0,
502
- rx: 0,
503
- ry: 0
504
- };
505
- }, X = function() {
506
- return {
507
- x: 0,
508
- y: 0,
509
- width: 100,
510
- anchor: "start",
511
- height: 100,
512
- rx: 0,
513
- ry: 0
514
- };
515
- }, pt = /* @__PURE__ */ (function() {
516
- function n(s, h, l, p, y, g, _, m) {
517
- const f = h.append("text").attr("x", l + y / 2).attr("y", p + g / 2 + 5).style("font-color", m).style("text-anchor", "middle").text(s);
518
- a(f, _);
519
- }
520
- function t(s, h, l, p, y, g, _, m, f) {
521
- const { taskFontSize: i, taskFontFamily: r } = m, c = s.split(/<br\s*\/?>/gi);
522
- for (let d = 0; d < c.length; d++) {
523
- const u = d * i - i * (c.length - 1) / 2, o = h.append("text").attr("x", l + y / 2).attr("y", p).attr("fill", f).style("text-anchor", "middle").style("font-size", i).style("font-family", r);
524
- o.append("tspan").attr("x", l + y / 2).attr("dy", u).text(c[d]), o.attr("y", p + g / 2).attr("dominant-baseline", "central").attr("alignment-baseline", "central"), a(o, _);
525
- }
526
- }
527
- function e(s, h, l, p, y, g, _, m) {
528
- const f = h.append("switch"), r = f.append("foreignObject").attr("x", l).attr("y", p).attr("width", y).attr("height", g).attr("position", "fixed").append("xhtml:div").style("display", "table").style("height", "100%").style("width", "100%");
529
- r.append("div").attr("class", "label").style("display", "table-cell").style("text-align", "center").style("vertical-align", "middle").text(s), t(s, f, l, p, y, g, _, m), a(r, _);
530
- }
531
- function a(s, h) {
532
- for (const l in h)
533
- l in h && s.attr(l, h[l]);
534
- }
535
- return function(s) {
536
- return s.textPlacement === "fo" ? e : s.textPlacement === "old" ? n : t;
537
- };
538
- })(), Ht = function(n) {
539
- 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");
540
- };
541
- function yt(n, t) {
542
- n.each(function() {
543
- var e = G(this), a = e.text().split(/(\s+|<br>)/).reverse(), s, h = [], l = 1.1, p = e.attr("y"), y = parseFloat(e.attr("dy")), g = e.text(null).append("tspan").attr("x", 0).attr("y", p).attr("dy", y + "em");
544
- for (let _ = 0; _ < a.length; _++)
545
- s = a[a.length - 1 - _], h.push(s), g.text(h.join(" ").trim()), (g.node().getComputedTextLength() > t || s === "<br>") && (h.pop(), g.text(h.join(" ").trim()), s === "<br>" ? h = [""] : h = [s], g = e.append("tspan").attr("x", 0).attr("y", p).attr("dy", l + "em").text(s));
546
- });
547
- }
548
- const Pt = function(n, t, e, a) {
549
- const s = e % Et - 1, h = n.append("g");
550
- t.section = s, h.attr(
551
- "class",
552
- (t.class ? t.class + " " : "") + "timeline-node " + ("section-" + s)
553
- );
554
- const l = h.append("g"), p = h.append("g"), g = p.append("text").text(t.descr).attr("dy", "1em").attr("alignment-baseline", "middle").attr("dominant-baseline", "middle").attr("text-anchor", "middle").call(yt, t.width).node().getBBox(), _ = a.fontSize && a.fontSize.replace ? a.fontSize.replace("px", "") : a.fontSize;
555
- return t.height = g.height + _ * 1.1 * 0.5 + t.padding, t.height = Math.max(t.height, t.maxHeight), t.width = t.width + 2 * t.padding, p.attr("transform", "translate(" + t.width / 2 + ", " + t.padding / 2 + ")"), zt(l, t, s), t;
556
- }, Ct = function(n, t, e) {
557
- const a = n.append("g"), h = a.append("text").text(t.descr).attr("dy", "1em").attr("alignment-baseline", "middle").attr("dominant-baseline", "middle").attr("text-anchor", "middle").call(yt, t.width).node().getBBox(), l = e.fontSize && e.fontSize.replace ? e.fontSize.replace("px", "") : e.fontSize;
558
- return a.remove(), h.height + l * 1.1 * 0.5 + t.padding;
559
- }, zt = function(n, t, e) {
560
- n.append("path").attr("id", "node-" + t.id).attr("class", "node-bkg node-" + t.type).attr(
561
- "d",
562
- `M0 ${t.height - 5} v${-t.height + 10} q0,-5 5,-5 h${t.width - 10} q5,0 5,5 v${t.height - 5} H0 Z`
563
- ), n.append("line").attr("class", "node-line-" + e).attr("x1", 0).attr("y1", t.height).attr("x2", t.width).attr("y2", t.height);
564
- }, P = {
565
- drawRect: U,
566
- drawCircle: It,
567
- drawSection: Nt,
568
- drawText: ut,
569
- drawLabel: $t,
570
- drawTask: Mt,
571
- drawBackgroundRect: Lt,
572
- getTextObj: At,
573
- getNoteRect: X,
574
- initGraphics: Ht,
575
- drawNode: Pt,
576
- getVirtualNodeHeight: Ct
577
- }, Rt = function(n, t, e, a) {
578
- var s, h;
579
- const l = xt(), p = l.leftMargin ?? 50;
580
- E.debug("timeline", a.db);
581
- const y = l.securityLevel;
582
- let g;
583
- y === "sandbox" && (g = G("#i" + t));
584
- const m = (y === "sandbox" ? G(g.nodes()[0].contentDocument.body) : G("body")).select("#" + t);
585
- m.append("g");
586
- const f = a.db.getTasks(), i = a.db.getCommonDb().getDiagramTitle();
587
- E.debug("task", f), P.initGraphics(m);
588
- const r = a.db.getSections();
589
- E.debug("sections", r);
590
- let c = 0, d = 0, u = 0, o = 0, $ = 50 + p, x = 50;
591
- o = 50;
592
- let T = 0, W = !0;
593
- r.forEach(function(w) {
594
- const v = {
595
- number: T,
596
- descr: w,
597
- section: T,
598
- width: 150,
599
- padding: 20,
600
- maxHeight: c
601
- }, I = P.getVirtualNodeHeight(m, v, l);
602
- E.debug("sectionHeight before draw", I), c = Math.max(c, I + 20);
603
- });
604
- let C = 0, A = 0;
605
- E.debug("tasks.length", f.length);
606
- for (const [w, v] of f.entries()) {
607
- const I = {
608
- number: w,
609
- descr: v,
610
- section: v.section,
611
- width: 150,
612
- padding: 20,
613
- maxHeight: d
614
- }, H = P.getVirtualNodeHeight(m, I, l);
615
- E.debug("taskHeight before draw", H), d = Math.max(d, H + 20), C = Math.max(C, v.events.length);
616
- let z = 0;
617
- for (let b = 0; b < v.events.length; b++) {
618
- const S = {
619
- descr: v.events[b],
620
- section: v.section,
621
- number: v.section,
622
- width: 150,
623
- padding: 20,
624
- maxHeight: 50
625
- };
626
- z += P.getVirtualNodeHeight(m, S, l);
627
- }
628
- A = Math.max(A, z);
629
- }
630
- E.debug("maxSectionHeight before draw", c), E.debug("maxTaskHeight before draw", d), r && r.length > 0 ? r.forEach((w) => {
631
- const v = f.filter((b) => b.section === w), I = {
632
- number: T,
633
- descr: w,
634
- section: T,
635
- width: 200 * Math.max(v.length, 1) - 50,
636
- padding: 20,
637
- maxHeight: c
638
- };
639
- E.debug("sectionNode", I);
640
- const H = m.append("g"), z = P.drawNode(H, I, T, l);
641
- E.debug("sectionNode output", z), H.attr("transform", `translate(${$}, ${o})`), x += c + 50, v.length > 0 && nt(
642
- m,
643
- v,
644
- T,
645
- $,
646
- x,
647
- d,
648
- l,
649
- C,
650
- A,
651
- c,
652
- !1
653
- ), $ += 200 * Math.max(v.length, 1), x = o, T++;
654
- }) : (W = !1, nt(
655
- m,
656
- f,
657
- T,
658
- $,
659
- x,
660
- d,
661
- l,
662
- C,
663
- A,
664
- c,
665
- !0
666
- ));
667
- const B = m.node().getBBox();
668
- E.debug("bounds", B), i && m.append("text").text(i).attr("x", B.width / 2 - p).attr("font-size", "4ex").attr("font-weight", "bold").attr("y", 20), u = W ? c + d + 150 : d + 100, m.append("g").attr("class", "lineWrapper").append("line").attr("x1", p).attr("y1", u).attr("x2", B.width + 3 * p).attr("y2", u).attr("stroke-width", 4).attr("stroke", "black").attr("marker-end", "url(#arrowhead)"), _t(
669
- void 0,
670
- m,
671
- ((s = l.timeline) == null ? void 0 : s.padding) ?? 50,
672
- ((h = l.timeline) == null ? void 0 : h.useMaxWidth) ?? !1
673
- );
674
- }, nt = function(n, t, e, a, s, h, l, p, y, g, _) {
675
- var m;
676
- for (const f of t) {
677
- const i = {
678
- descr: f.task,
679
- section: e,
680
- number: e,
681
- width: 150,
682
- padding: 20,
683
- maxHeight: h
684
- };
685
- E.debug("taskNode", i);
686
- const r = n.append("g").attr("class", "taskWrapper"), d = P.drawNode(r, i, e, l).height;
687
- if (E.debug("taskHeight after draw", d), r.attr("transform", `translate(${a}, ${s})`), h = Math.max(h, d), f.events) {
688
- const u = n.append("g").attr("class", "lineWrapper");
689
- let o = h;
690
- s += 100, o = o + Ft(n, f.events, e, a, s, l), s -= 100, u.append("line").attr("x1", a + 190 / 2).attr("y1", s + h).attr("x2", a + 190 / 2).attr(
691
- "y2",
692
- s + h + (_ ? h : g) + y + 120
693
- ).attr("stroke-width", 2).attr("stroke", "black").attr("marker-end", "url(#arrowhead)").attr("stroke-dasharray", "5,5");
694
- }
695
- a = a + 200, _ && !((m = l.timeline) != null && m.disableMulticolor) && e++;
696
- }
697
- s = s - 10;
698
- }, Ft = function(n, t, e, a, s, h) {
699
- let l = 0;
700
- const p = s;
701
- s = s + 100;
702
- for (const y of t) {
703
- const g = {
704
- descr: y,
705
- section: e,
706
- number: e,
707
- width: 150,
708
- padding: 20,
709
- maxHeight: 50
710
- };
711
- E.debug("eventNode", g);
712
- const _ = n.append("g").attr("class", "eventWrapper"), f = P.drawNode(_, g, e, h).height;
713
- l = l + f, _.attr("transform", `translate(${a}, ${s})`), s = s + 10 + f;
714
- }
715
- return s = p, l;
716
- }, Vt = {
717
- setConf: () => {
718
- },
719
- draw: Rt
720
- }, Wt = (n) => {
721
- let t = "";
722
- for (let e = 0; e < n.THEME_COLOR_LIMIT; e++)
723
- n["lineColor" + e] = n["lineColor" + e] || n["cScaleInv" + e], gt(n["lineColor" + e]) ? n["lineColor" + e] = ft(n["lineColor" + e], 20) : n["lineColor" + e] = mt(n["lineColor" + e], 20);
724
- for (let e = 0; e < n.THEME_COLOR_LIMIT; e++) {
725
- const a = "" + (17 - 3 * e);
726
- t += `
727
- .section-${e - 1} rect, .section-${e - 1} path, .section-${e - 1} circle, .section-${e - 1} path {
728
- fill: ${n["cScale" + e]};
729
- }
730
- .section-${e - 1} text {
731
- fill: ${n["cScaleLabel" + e]};
732
- }
733
- .node-icon-${e - 1} {
734
- font-size: 40px;
735
- color: ${n["cScaleLabel" + e]};
736
- }
737
- .section-edge-${e - 1}{
738
- stroke: ${n["cScale" + e]};
739
- }
740
- .edge-depth-${e - 1}{
741
- stroke-width: ${a};
742
- }
743
- .section-${e - 1} line {
744
- stroke: ${n["cScaleInv" + e]} ;
745
- stroke-width: 3;
746
- }
747
-
748
- .lineWrapper line{
749
- stroke: ${n["cScaleLabel" + e]} ;
750
- }
751
-
752
- .disabled, .disabled circle, .disabled text {
753
- fill: lightgray;
754
- }
755
- .disabled text {
756
- fill: #efefef;
757
- }
758
- `;
759
- }
760
- return t;
761
- }, Bt = (n) => `
762
- .edge {
763
- stroke-width: 3;
764
- }
765
- ${Wt(n)}
766
- .section-root rect, .section-root path, .section-root circle {
767
- fill: ${n.git0};
768
- }
769
- .section-root text {
770
- fill: ${n.gitBranchLabel0};
771
- }
772
- .icon-container {
773
- height:100%;
774
- display: flex;
775
- justify-content: center;
776
- align-items: center;
777
- }
778
- .edge {
779
- fill: none;
780
- }
781
- .eventWrapper {
782
- filter: brightness(120%);
783
- }
784
- `, Ot = Bt, qt = {
785
- db: St,
786
- renderer: Vt,
787
- parser: vt,
788
- styles: Ot
789
- };
790
- export {
791
- qt as diagram
792
- };