@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,801 +0,0 @@
1
- import { a as yt, s as ft, b as dt, c as pt, C as gt, D as mt, g as C, d as H, e as xt, E as kt } from "./index-C3zgkbpi.mjs";
2
- import { a as _t, g as it, f as bt, d as vt } from "./svgDrawCommon-b86b1483-BQvqkIEE.mjs";
3
- import { a as Q } from "./arc-DqrMsJeG.mjs";
4
- var X = (function() {
5
- var t = function(p, s, r, a) {
6
- for (r = r || {}, a = p.length; a--; r[p[a]] = s)
7
- ;
8
- return r;
9
- }, e = [6, 8, 10, 11, 12, 14, 16, 17, 18], i = [1, 9], o = [1, 10], n = [1, 11], h = [1, 12], c = [1, 13], f = [1, 14], y = {
10
- trace: function() {
11
- },
12
- yy: {},
13
- symbols_: { error: 2, start: 3, journey: 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, taskName: 18, taskData: 19, $accept: 0, $end: 1 },
14
- terminals_: { 2: "error", 4: "journey", 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", 18: "taskName", 19: "taskData" },
15
- 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, 2]],
16
- performAction: function(s, r, a, u, d, l, w) {
17
- var k = l.length - 1;
18
- switch (d) {
19
- case 1:
20
- return l[k - 1];
21
- case 2:
22
- this.$ = [];
23
- break;
24
- case 3:
25
- l[k - 1].push(l[k]), this.$ = l[k - 1];
26
- break;
27
- case 4:
28
- case 5:
29
- this.$ = l[k];
30
- break;
31
- case 6:
32
- case 7:
33
- this.$ = [];
34
- break;
35
- case 8:
36
- u.setDiagramTitle(l[k].substr(6)), this.$ = l[k].substr(6);
37
- break;
38
- case 9:
39
- this.$ = l[k].trim(), u.setAccTitle(this.$);
40
- break;
41
- case 10:
42
- case 11:
43
- this.$ = l[k].trim(), u.setAccDescription(this.$);
44
- break;
45
- case 12:
46
- u.addSection(l[k].substr(8)), this.$ = l[k].substr(8);
47
- break;
48
- case 13:
49
- u.addTask(l[k - 1], l[k]), this.$ = "task";
50
- break;
51
- }
52
- },
53
- table: [{ 3: 1, 4: [1, 2] }, { 1: [3] }, t(e, [2, 2], { 5: 3 }), { 6: [1, 4], 7: 5, 8: [1, 6], 9: 7, 10: [1, 8], 11: i, 12: o, 14: n, 16: h, 17: c, 18: f }, t(e, [2, 7], { 1: [2, 1] }), t(e, [2, 3]), { 9: 15, 11: i, 12: o, 14: n, 16: h, 17: c, 18: f }, t(e, [2, 5]), t(e, [2, 6]), t(e, [2, 8]), { 13: [1, 16] }, { 15: [1, 17] }, t(e, [2, 11]), t(e, [2, 12]), { 19: [1, 18] }, t(e, [2, 4]), t(e, [2, 9]), t(e, [2, 10]), t(e, [2, 13])],
54
- defaultActions: {},
55
- parseError: function(s, r) {
56
- if (r.recoverable)
57
- this.trace(s);
58
- else {
59
- var a = new Error(s);
60
- throw a.hash = r, a;
61
- }
62
- },
63
- parse: function(s) {
64
- var r = this, a = [0], u = [], d = [null], l = [], w = this.table, k = "", R = 0, Z = 0, ot = 2, J = 1, ct = l.slice.call(arguments, 1), x = Object.create(this.lexer), S = { yy: {} };
65
- for (var z in this.yy)
66
- Object.prototype.hasOwnProperty.call(this.yy, z) && (S.yy[z] = this.yy[z]);
67
- x.setInput(s, S.yy), S.yy.lexer = x, S.yy.parser = this, typeof x.yylloc > "u" && (x.yylloc = {});
68
- var Y = x.yylloc;
69
- l.push(Y);
70
- var ht = x.options && x.options.ranges;
71
- typeof S.yy.parseError == "function" ? this.parseError = S.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
72
- function ut() {
73
- var T;
74
- return T = u.pop() || x.lex() || J, typeof T != "number" && (T instanceof Array && (u = T, T = u.pop()), T = r.symbols_[T] || T), T;
75
- }
76
- for (var _, E, b, O, I = {}, N, $, K, B; ; ) {
77
- if (E = a[a.length - 1], this.defaultActions[E] ? b = this.defaultActions[E] : ((_ === null || typeof _ > "u") && (_ = ut()), b = w[E] && w[E][_]), typeof b > "u" || !b.length || !b[0]) {
78
- var q = "";
79
- B = [];
80
- for (N in w[E])
81
- this.terminals_[N] && N > ot && B.push("'" + this.terminals_[N] + "'");
82
- x.showPosition ? q = "Parse error on line " + (R + 1) + `:
83
- ` + x.showPosition() + `
84
- Expecting ` + B.join(", ") + ", got '" + (this.terminals_[_] || _) + "'" : q = "Parse error on line " + (R + 1) + ": Unexpected " + (_ == J ? "end of input" : "'" + (this.terminals_[_] || _) + "'"), this.parseError(q, {
85
- text: x.match,
86
- token: this.terminals_[_] || _,
87
- line: x.yylineno,
88
- loc: Y,
89
- expected: B
90
- });
91
- }
92
- if (b[0] instanceof Array && b.length > 1)
93
- throw new Error("Parse Error: multiple actions possible at state: " + E + ", token: " + _);
94
- switch (b[0]) {
95
- case 1:
96
- a.push(_), d.push(x.yytext), l.push(x.yylloc), a.push(b[1]), _ = null, Z = x.yyleng, k = x.yytext, R = x.yylineno, Y = x.yylloc;
97
- break;
98
- case 2:
99
- if ($ = this.productions_[b[1]][1], I.$ = d[d.length - $], I._$ = {
100
- first_line: l[l.length - ($ || 1)].first_line,
101
- last_line: l[l.length - 1].last_line,
102
- first_column: l[l.length - ($ || 1)].first_column,
103
- last_column: l[l.length - 1].last_column
104
- }, ht && (I._$.range = [
105
- l[l.length - ($ || 1)].range[0],
106
- l[l.length - 1].range[1]
107
- ]), O = this.performAction.apply(I, [
108
- k,
109
- Z,
110
- R,
111
- S.yy,
112
- b[1],
113
- d,
114
- l
115
- ].concat(ct)), typeof O < "u")
116
- return O;
117
- $ && (a = a.slice(0, -1 * $ * 2), d = d.slice(0, -1 * $), l = l.slice(0, -1 * $)), a.push(this.productions_[b[1]][0]), d.push(I.$), l.push(I._$), K = w[a[a.length - 2]][a[a.length - 1]], a.push(K);
118
- break;
119
- case 3:
120
- return !0;
121
- }
122
- }
123
- return !0;
124
- }
125
- }, m = /* @__PURE__ */ (function() {
126
- var p = {
127
- EOF: 1,
128
- parseError: function(r, a) {
129
- if (this.yy.parser)
130
- this.yy.parser.parseError(r, a);
131
- else
132
- throw new Error(r);
133
- },
134
- // resets the lexer, sets new input
135
- setInput: function(s, r) {
136
- return this.yy = r || this.yy || {}, this._input = s, this._more = this._backtrack = this.done = !1, this.yylineno = this.yyleng = 0, this.yytext = this.matched = this.match = "", this.conditionStack = ["INITIAL"], this.yylloc = {
137
- first_line: 1,
138
- first_column: 0,
139
- last_line: 1,
140
- last_column: 0
141
- }, this.options.ranges && (this.yylloc.range = [0, 0]), this.offset = 0, this;
142
- },
143
- // consumes and returns one char from the input
144
- input: function() {
145
- var s = this._input[0];
146
- this.yytext += s, this.yyleng++, this.offset++, this.match += s, this.matched += s;
147
- var r = s.match(/(?:\r\n?|\n).*/g);
148
- 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), s;
149
- },
150
- // unshifts one char (or a string) into the input
151
- unput: function(s) {
152
- var r = s.length, a = s.split(/(?:\r\n?|\n)/g);
153
- this._input = s + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - r), this.offset -= r;
154
- var u = this.match.split(/(?:\r\n?|\n)/g);
155
- this.match = this.match.substr(0, this.match.length - 1), this.matched = this.matched.substr(0, this.matched.length - 1), a.length - 1 && (this.yylineno -= a.length - 1);
156
- var d = this.yylloc.range;
157
- return this.yylloc = {
158
- first_line: this.yylloc.first_line,
159
- last_line: this.yylineno + 1,
160
- first_column: this.yylloc.first_column,
161
- last_column: a ? (a.length === u.length ? this.yylloc.first_column : 0) + u[u.length - a.length].length - a[0].length : this.yylloc.first_column - r
162
- }, this.options.ranges && (this.yylloc.range = [d[0], d[0] + this.yyleng - r]), this.yyleng = this.yytext.length, this;
163
- },
164
- // When called from action, caches matched text and appends it on next action
165
- more: function() {
166
- return this._more = !0, this;
167
- },
168
- // 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.
169
- reject: function() {
170
- if (this.options.backtrack_lexer)
171
- this._backtrack = !0;
172
- else
173
- 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).
174
- ` + this.showPosition(), {
175
- text: "",
176
- token: null,
177
- line: this.yylineno
178
- });
179
- return this;
180
- },
181
- // retain first n characters of the match
182
- less: function(s) {
183
- this.unput(this.match.slice(s));
184
- },
185
- // displays already matched input, i.e. for error messages
186
- pastInput: function() {
187
- var s = this.matched.substr(0, this.matched.length - this.match.length);
188
- return (s.length > 20 ? "..." : "") + s.substr(-20).replace(/\n/g, "");
189
- },
190
- // displays upcoming input, i.e. for error messages
191
- upcomingInput: function() {
192
- var s = this.match;
193
- return s.length < 20 && (s += this._input.substr(0, 20 - s.length)), (s.substr(0, 20) + (s.length > 20 ? "..." : "")).replace(/\n/g, "");
194
- },
195
- // displays the character position where the lexing error occurred, i.e. for error messages
196
- showPosition: function() {
197
- var s = this.pastInput(), r = new Array(s.length + 1).join("-");
198
- return s + this.upcomingInput() + `
199
- ` + r + "^";
200
- },
201
- // test the lexed token: return FALSE when not a match, otherwise return token
202
- test_match: function(s, r) {
203
- var a, u, d;
204
- if (this.options.backtrack_lexer && (d = {
205
- yylineno: this.yylineno,
206
- yylloc: {
207
- first_line: this.yylloc.first_line,
208
- last_line: this.last_line,
209
- first_column: this.yylloc.first_column,
210
- last_column: this.yylloc.last_column
211
- },
212
- yytext: this.yytext,
213
- match: this.match,
214
- matches: this.matches,
215
- matched: this.matched,
216
- yyleng: this.yyleng,
217
- offset: this.offset,
218
- _more: this._more,
219
- _input: this._input,
220
- yy: this.yy,
221
- conditionStack: this.conditionStack.slice(0),
222
- done: this.done
223
- }, this.options.ranges && (d.yylloc.range = this.yylloc.range.slice(0))), u = s[0].match(/(?:\r\n?|\n).*/g), u && (this.yylineno += u.length), this.yylloc = {
224
- first_line: this.yylloc.last_line,
225
- last_line: this.yylineno + 1,
226
- first_column: this.yylloc.last_column,
227
- last_column: u ? u[u.length - 1].length - u[u.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + s[0].length
228
- }, this.yytext += s[0], this.match += s[0], this.matches = s, 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(s[0].length), this.matched += s[0], a = this.performAction.call(this, this.yy, this, r, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), a)
229
- return a;
230
- if (this._backtrack) {
231
- for (var l in d)
232
- this[l] = d[l];
233
- return !1;
234
- }
235
- return !1;
236
- },
237
- // return next match in input
238
- next: function() {
239
- if (this.done)
240
- return this.EOF;
241
- this._input || (this.done = !0);
242
- var s, r, a, u;
243
- this._more || (this.yytext = "", this.match = "");
244
- for (var d = this._currentRules(), l = 0; l < d.length; l++)
245
- if (a = this._input.match(this.rules[d[l]]), a && (!r || a[0].length > r[0].length)) {
246
- if (r = a, u = l, this.options.backtrack_lexer) {
247
- if (s = this.test_match(a, d[l]), s !== !1)
248
- return s;
249
- if (this._backtrack) {
250
- r = !1;
251
- continue;
252
- } else
253
- return !1;
254
- } else if (!this.options.flex)
255
- break;
256
- }
257
- return r ? (s = this.test_match(r, d[u]), s !== !1 ? s : !1) : this._input === "" ? this.EOF : this.parseError("Lexical error on line " + (this.yylineno + 1) + `. Unrecognized text.
258
- ` + this.showPosition(), {
259
- text: "",
260
- token: null,
261
- line: this.yylineno
262
- });
263
- },
264
- // return next match that has a token
265
- lex: function() {
266
- var r = this.next();
267
- return r || this.lex();
268
- },
269
- // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)
270
- begin: function(r) {
271
- this.conditionStack.push(r);
272
- },
273
- // pop the previously active lexer condition state off the condition stack
274
- popState: function() {
275
- var r = this.conditionStack.length - 1;
276
- return r > 0 ? this.conditionStack.pop() : this.conditionStack[0];
277
- },
278
- // produce the lexer rule set which is active for the currently active lexer condition state
279
- _currentRules: function() {
280
- return this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1] ? this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules : this.conditions.INITIAL.rules;
281
- },
282
- // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available
283
- topState: function(r) {
284
- return r = this.conditionStack.length - 1 - Math.abs(r || 0), r >= 0 ? this.conditionStack[r] : "INITIAL";
285
- },
286
- // alias for begin(condition)
287
- pushState: function(r) {
288
- this.begin(r);
289
- },
290
- // return the number of states currently on the stack
291
- stateStackSize: function() {
292
- return this.conditionStack.length;
293
- },
294
- options: { "case-insensitive": !0 },
295
- performAction: function(r, a, u, d) {
296
- switch (u) {
297
- case 0:
298
- break;
299
- case 1:
300
- break;
301
- case 2:
302
- return 10;
303
- case 3:
304
- break;
305
- case 4:
306
- break;
307
- case 5:
308
- return 4;
309
- case 6:
310
- return 11;
311
- case 7:
312
- return this.begin("acc_title"), 12;
313
- case 8:
314
- return this.popState(), "acc_title_value";
315
- case 9:
316
- return this.begin("acc_descr"), 14;
317
- case 10:
318
- return this.popState(), "acc_descr_value";
319
- case 11:
320
- this.begin("acc_descr_multiline");
321
- break;
322
- case 12:
323
- this.popState();
324
- break;
325
- case 13:
326
- return "acc_descr_multiline_value";
327
- case 14:
328
- return 17;
329
- case 15:
330
- return 18;
331
- case 16:
332
- return 19;
333
- case 17:
334
- return ":";
335
- case 18:
336
- return 6;
337
- case 19:
338
- return "INVALID";
339
- }
340
- },
341
- rules: [/^(?:%(?!\{)[^\n]*)/i, /^(?:[^\}]%%[^\n]*)/i, /^(?:[\n]+)/i, /^(?:\s+)/i, /^(?:#[^\n]*)/i, /^(?:journey\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, /^(?:[^#:\n;]+)/i, /^(?::[^#\n;]+)/i, /^(?::)/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, 19], inclusive: !0 } }
343
- };
344
- return p;
345
- })();
346
- y.lexer = m;
347
- function g() {
348
- this.yy = {};
349
- }
350
- return g.prototype = y, y.Parser = g, new g();
351
- })();
352
- X.parser = X;
353
- const wt = X;
354
- let A = "";
355
- const G = [], V = [], F = [], $t = function() {
356
- G.length = 0, V.length = 0, A = "", F.length = 0, kt();
357
- }, Tt = function(t) {
358
- A = t, G.push(t);
359
- }, Mt = function() {
360
- return G;
361
- }, St = function() {
362
- let t = D();
363
- const e = 100;
364
- let i = 0;
365
- for (; !t && i < e; )
366
- t = D(), i++;
367
- return V.push(...F), V;
368
- }, Et = function() {
369
- const t = [];
370
- return V.forEach((i) => {
371
- i.people && t.push(...i.people);
372
- }), [...new Set(t)].sort();
373
- }, Pt = function(t, e) {
374
- const i = e.substr(1).split(":");
375
- let o = 0, n = [];
376
- i.length === 1 ? (o = Number(i[0]), n = []) : (o = Number(i[0]), n = i[1].split(","));
377
- const h = n.map((f) => f.trim()), c = {
378
- section: A,
379
- type: A,
380
- people: h,
381
- task: t,
382
- score: o
383
- };
384
- F.push(c);
385
- }, Ct = function(t) {
386
- const e = {
387
- section: A,
388
- type: A,
389
- description: t,
390
- task: t,
391
- classes: []
392
- };
393
- V.push(e);
394
- }, D = function() {
395
- const t = function(i) {
396
- return F[i].processed;
397
- };
398
- let e = !0;
399
- for (const [i, o] of F.entries())
400
- t(i), e = e && o.processed;
401
- return e;
402
- }, It = function() {
403
- return Et();
404
- }, tt = {
405
- getConfig: () => C().journey,
406
- clear: $t,
407
- setDiagramTitle: mt,
408
- getDiagramTitle: gt,
409
- setAccTitle: pt,
410
- getAccTitle: dt,
411
- setAccDescription: ft,
412
- getAccDescription: yt,
413
- addSection: Tt,
414
- getSections: Mt,
415
- getTasks: St,
416
- addTask: Pt,
417
- addTaskOrg: Ct,
418
- getActors: It
419
- }, At = (t) => `.label {
420
- font-family: 'trebuchet ms', verdana, arial, sans-serif;
421
- font-family: var(--mermaid-font-family);
422
- color: ${t.textColor};
423
- }
424
- .mouth {
425
- stroke: #666;
426
- }
427
-
428
- line {
429
- stroke: ${t.textColor}
430
- }
431
-
432
- .legend {
433
- fill: ${t.textColor};
434
- }
435
-
436
- .label text {
437
- fill: #333;
438
- }
439
- .label {
440
- color: ${t.textColor}
441
- }
442
-
443
- .face {
444
- ${t.faceColor ? `fill: ${t.faceColor}` : "fill: #FFF8DC"};
445
- stroke: #999;
446
- }
447
-
448
- .node rect,
449
- .node circle,
450
- .node ellipse,
451
- .node polygon,
452
- .node path {
453
- fill: ${t.mainBkg};
454
- stroke: ${t.nodeBorder};
455
- stroke-width: 1px;
456
- }
457
-
458
- .node .label {
459
- text-align: center;
460
- }
461
- .node.clickable {
462
- cursor: pointer;
463
- }
464
-
465
- .arrowheadPath {
466
- fill: ${t.arrowheadColor};
467
- }
468
-
469
- .edgePath .path {
470
- stroke: ${t.lineColor};
471
- stroke-width: 1.5px;
472
- }
473
-
474
- .flowchart-link {
475
- stroke: ${t.lineColor};
476
- fill: none;
477
- }
478
-
479
- .edgeLabel {
480
- background-color: ${t.edgeLabelBackground};
481
- rect {
482
- opacity: 0.5;
483
- }
484
- text-align: center;
485
- }
486
-
487
- .cluster rect {
488
- }
489
-
490
- .cluster text {
491
- fill: ${t.titleColor};
492
- }
493
-
494
- div.mermaidTooltip {
495
- position: absolute;
496
- text-align: center;
497
- max-width: 200px;
498
- padding: 2px;
499
- font-family: 'trebuchet ms', verdana, arial, sans-serif;
500
- font-family: var(--mermaid-font-family);
501
- font-size: 12px;
502
- background: ${t.tertiaryColor};
503
- border: 1px solid ${t.border2};
504
- border-radius: 2px;
505
- pointer-events: none;
506
- z-index: 100;
507
- }
508
-
509
- .task-type-0, .section-type-0 {
510
- ${t.fillType0 ? `fill: ${t.fillType0}` : ""};
511
- }
512
- .task-type-1, .section-type-1 {
513
- ${t.fillType0 ? `fill: ${t.fillType1}` : ""};
514
- }
515
- .task-type-2, .section-type-2 {
516
- ${t.fillType0 ? `fill: ${t.fillType2}` : ""};
517
- }
518
- .task-type-3, .section-type-3 {
519
- ${t.fillType0 ? `fill: ${t.fillType3}` : ""};
520
- }
521
- .task-type-4, .section-type-4 {
522
- ${t.fillType0 ? `fill: ${t.fillType4}` : ""};
523
- }
524
- .task-type-5, .section-type-5 {
525
- ${t.fillType0 ? `fill: ${t.fillType5}` : ""};
526
- }
527
- .task-type-6, .section-type-6 {
528
- ${t.fillType0 ? `fill: ${t.fillType6}` : ""};
529
- }
530
- .task-type-7, .section-type-7 {
531
- ${t.fillType0 ? `fill: ${t.fillType7}` : ""};
532
- }
533
-
534
- .actor-0 {
535
- ${t.actor0 ? `fill: ${t.actor0}` : ""};
536
- }
537
- .actor-1 {
538
- ${t.actor1 ? `fill: ${t.actor1}` : ""};
539
- }
540
- .actor-2 {
541
- ${t.actor2 ? `fill: ${t.actor2}` : ""};
542
- }
543
- .actor-3 {
544
- ${t.actor3 ? `fill: ${t.actor3}` : ""};
545
- }
546
- .actor-4 {
547
- ${t.actor4 ? `fill: ${t.actor4}` : ""};
548
- }
549
- .actor-5 {
550
- ${t.actor5 ? `fill: ${t.actor5}` : ""};
551
- }
552
- `, Vt = At, U = function(t, e) {
553
- return vt(t, e);
554
- }, Ft = function(t, e) {
555
- const o = t.append("circle").attr("cx", e.cx).attr("cy", e.cy).attr("class", "face").attr("r", 15).attr("stroke-width", 2).attr("overflow", "visible"), n = t.append("g");
556
- n.append("circle").attr("cx", e.cx - 15 / 3).attr("cy", e.cy - 15 / 3).attr("r", 1.5).attr("stroke-width", 2).attr("fill", "#666").attr("stroke", "#666"), n.append("circle").attr("cx", e.cx + 15 / 3).attr("cy", e.cy - 15 / 3).attr("r", 1.5).attr("stroke-width", 2).attr("fill", "#666").attr("stroke", "#666");
557
- function h(y) {
558
- const m = Q().startAngle(Math.PI / 2).endAngle(3 * (Math.PI / 2)).innerRadius(7.5).outerRadius(6.8181818181818175);
559
- y.append("path").attr("class", "mouth").attr("d", m).attr("transform", "translate(" + e.cx + "," + (e.cy + 2) + ")");
560
- }
561
- function c(y) {
562
- const m = Q().startAngle(3 * Math.PI / 2).endAngle(5 * (Math.PI / 2)).innerRadius(7.5).outerRadius(6.8181818181818175);
563
- y.append("path").attr("class", "mouth").attr("d", m).attr("transform", "translate(" + e.cx + "," + (e.cy + 7) + ")");
564
- }
565
- function f(y) {
566
- y.append("line").attr("class", "mouth").attr("stroke", 2).attr("x1", e.cx - 5).attr("y1", e.cy + 7).attr("x2", e.cx + 5).attr("y2", e.cy + 7).attr("class", "mouth").attr("stroke-width", "1px").attr("stroke", "#666");
567
- }
568
- return e.score > 3 ? h(n) : e.score < 3 ? c(n) : f(n), o;
569
- }, rt = function(t, e) {
570
- const i = t.append("circle");
571
- return i.attr("cx", e.cx), i.attr("cy", e.cy), i.attr("class", "actor-" + e.pos), i.attr("fill", e.fill), i.attr("stroke", e.stroke), i.attr("r", e.r), i.class !== void 0 && i.attr("class", i.class), e.title !== void 0 && i.append("title").text(e.title), i;
572
- }, at = function(t, e) {
573
- return bt(t, e);
574
- }, Lt = function(t, e) {
575
- function i(n, h, c, f, y) {
576
- return n + "," + h + " " + (n + c) + "," + h + " " + (n + c) + "," + (h + f - y) + " " + (n + c - y * 1.2) + "," + (h + f) + " " + n + "," + (h + f);
577
- }
578
- const o = t.append("polygon");
579
- o.attr("points", i(e.x, e.y, 50, 20, 7)), o.attr("class", "labelBox"), e.y = e.y + e.labelMargin, e.x = e.x + 0.5 * e.labelMargin, at(t, e);
580
- }, Rt = function(t, e, i) {
581
- const o = t.append("g"), n = it();
582
- n.x = e.x, n.y = e.y, n.fill = e.fill, n.width = i.width * e.taskCount + // width of the tasks
583
- i.diagramMarginX * (e.taskCount - 1), n.height = i.height, n.class = "journey-section section-type-" + e.num, n.rx = 3, n.ry = 3, U(o, n), lt(i)(
584
- e.text,
585
- o,
586
- n.x,
587
- n.y,
588
- n.width,
589
- n.height,
590
- { class: "journey-section section-type-" + e.num },
591
- i,
592
- e.colour
593
- );
594
- };
595
- let et = -1;
596
- const Nt = function(t, e, i) {
597
- const o = e.x + i.width / 2, n = t.append("g");
598
- et++, n.append("line").attr("id", "task" + et).attr("x1", o).attr("y1", e.y).attr("x2", o).attr("y2", 450).attr("class", "task-line").attr("stroke-width", "1px").attr("stroke-dasharray", "4 2").attr("stroke", "#666"), Ft(n, {
599
- cx: o,
600
- cy: 300 + (5 - e.score) * 30,
601
- score: e.score
602
- });
603
- const c = it();
604
- c.x = e.x, c.y = e.y, c.fill = e.fill, c.width = i.width, c.height = i.height, c.class = "task task-type-" + e.num, c.rx = 3, c.ry = 3, U(n, c);
605
- let f = e.x + 14;
606
- e.people.forEach((y) => {
607
- const m = e.actors[y].color, g = {
608
- cx: f,
609
- cy: e.y,
610
- r: 7,
611
- fill: m,
612
- stroke: "#000",
613
- title: y,
614
- pos: e.actors[y].position
615
- };
616
- rt(n, g), f += 10;
617
- }), lt(i)(
618
- e.task,
619
- n,
620
- c.x,
621
- c.y,
622
- c.width,
623
- c.height,
624
- { class: "task" },
625
- i,
626
- e.colour
627
- );
628
- }, Bt = function(t, e) {
629
- _t(t, e);
630
- }, lt = /* @__PURE__ */ (function() {
631
- function t(n, h, c, f, y, m, g, p) {
632
- const s = h.append("text").attr("x", c + y / 2).attr("y", f + m / 2 + 5).style("font-color", p).style("text-anchor", "middle").text(n);
633
- o(s, g);
634
- }
635
- function e(n, h, c, f, y, m, g, p, s) {
636
- const { taskFontSize: r, taskFontFamily: a } = p, u = n.split(/<br\s*\/?>/gi);
637
- for (let d = 0; d < u.length; d++) {
638
- const l = d * r - r * (u.length - 1) / 2, w = h.append("text").attr("x", c + y / 2).attr("y", f).attr("fill", s).style("text-anchor", "middle").style("font-size", r).style("font-family", a);
639
- w.append("tspan").attr("x", c + y / 2).attr("dy", l).text(u[d]), w.attr("y", f + m / 2).attr("dominant-baseline", "central").attr("alignment-baseline", "central"), o(w, g);
640
- }
641
- }
642
- function i(n, h, c, f, y, m, g, p) {
643
- const s = h.append("switch"), a = s.append("foreignObject").attr("x", c).attr("y", f).attr("width", y).attr("height", m).attr("position", "fixed").append("xhtml:div").style("display", "table").style("height", "100%").style("width", "100%");
644
- a.append("div").attr("class", "label").style("display", "table-cell").style("text-align", "center").style("vertical-align", "middle").text(n), e(n, s, c, f, y, m, g, p), o(a, g);
645
- }
646
- function o(n, h) {
647
- for (const c in h)
648
- c in h && n.attr(c, h[c]);
649
- }
650
- return function(n) {
651
- return n.textPlacement === "fo" ? i : n.textPlacement === "old" ? t : e;
652
- };
653
- })(), jt = function(t) {
654
- t.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");
655
- }, L = {
656
- drawRect: U,
657
- drawCircle: rt,
658
- drawSection: Rt,
659
- drawText: at,
660
- drawLabel: Lt,
661
- drawTask: Nt,
662
- drawBackgroundRect: Bt,
663
- initGraphics: jt
664
- }, zt = function(t) {
665
- Object.keys(t).forEach(function(i) {
666
- j[i] = t[i];
667
- });
668
- }, M = {};
669
- function Yt(t) {
670
- const e = C().journey;
671
- let i = 60;
672
- Object.keys(M).forEach((o) => {
673
- const n = M[o].color, h = {
674
- cx: 20,
675
- cy: i,
676
- r: 7,
677
- fill: n,
678
- stroke: "#000",
679
- pos: M[o].position
680
- };
681
- L.drawCircle(t, h);
682
- const c = {
683
- x: 40,
684
- y: i + 7,
685
- fill: "#666",
686
- text: o,
687
- textMargin: e.boxTextMargin | 5
688
- };
689
- L.drawText(t, c), i += 20;
690
- });
691
- }
692
- const j = C().journey, P = j.leftMargin, Ot = function(t, e, i, o) {
693
- const n = C().journey, h = C().securityLevel;
694
- let c;
695
- h === "sandbox" && (c = H("#i" + e));
696
- const f = h === "sandbox" ? H(c.nodes()[0].contentDocument.body) : H("body");
697
- v.init();
698
- const y = f.select("#" + e);
699
- L.initGraphics(y);
700
- const m = o.db.getTasks(), g = o.db.getDiagramTitle(), p = o.db.getActors();
701
- for (const l in M)
702
- delete M[l];
703
- let s = 0;
704
- p.forEach((l) => {
705
- M[l] = {
706
- color: n.actorColours[s % n.actorColours.length],
707
- position: s
708
- }, s++;
709
- }), Yt(y), v.insert(0, 0, P, Object.keys(M).length * 50), qt(y, m, 0);
710
- const r = v.getBounds();
711
- g && y.append("text").text(g).attr("x", P).attr("font-size", "4ex").attr("font-weight", "bold").attr("y", 25);
712
- const a = r.stopy - r.starty + 2 * n.diagramMarginY, u = P + r.stopx + 2 * n.diagramMarginX;
713
- xt(y, a, u, n.useMaxWidth), y.append("line").attr("x1", P).attr("y1", n.height * 4).attr("x2", u - P - 4).attr("y2", n.height * 4).attr("stroke-width", 4).attr("stroke", "black").attr("marker-end", "url(#arrowhead)");
714
- const d = g ? 70 : 0;
715
- y.attr("viewBox", `${r.startx} -25 ${u} ${a + d}`), y.attr("preserveAspectRatio", "xMinYMin meet"), y.attr("height", a + d + 25);
716
- }, v = {
717
- data: {
718
- startx: void 0,
719
- stopx: void 0,
720
- starty: void 0,
721
- stopy: void 0
722
- },
723
- verticalPos: 0,
724
- sequenceItems: [],
725
- init: function() {
726
- this.sequenceItems = [], this.data = {
727
- startx: void 0,
728
- stopx: void 0,
729
- starty: void 0,
730
- stopy: void 0
731
- }, this.verticalPos = 0;
732
- },
733
- updateVal: function(t, e, i, o) {
734
- t[e] === void 0 ? t[e] = i : t[e] = o(i, t[e]);
735
- },
736
- updateBounds: function(t, e, i, o) {
737
- const n = C().journey, h = this;
738
- let c = 0;
739
- function f(y) {
740
- return function(g) {
741
- c++;
742
- const p = h.sequenceItems.length - c + 1;
743
- h.updateVal(g, "starty", e - p * n.boxMargin, Math.min), h.updateVal(g, "stopy", o + p * n.boxMargin, Math.max), h.updateVal(v.data, "startx", t - p * n.boxMargin, Math.min), h.updateVal(v.data, "stopx", i + p * n.boxMargin, Math.max), h.updateVal(g, "startx", t - p * n.boxMargin, Math.min), h.updateVal(g, "stopx", i + p * n.boxMargin, Math.max), h.updateVal(v.data, "starty", e - p * n.boxMargin, Math.min), h.updateVal(v.data, "stopy", o + p * n.boxMargin, Math.max);
744
- };
745
- }
746
- this.sequenceItems.forEach(f());
747
- },
748
- insert: function(t, e, i, o) {
749
- const n = Math.min(t, i), h = Math.max(t, i), c = Math.min(e, o), f = Math.max(e, o);
750
- this.updateVal(v.data, "startx", n, Math.min), this.updateVal(v.data, "starty", c, Math.min), this.updateVal(v.data, "stopx", h, Math.max), this.updateVal(v.data, "stopy", f, Math.max), this.updateBounds(n, c, h, f);
751
- },
752
- bumpVerticalPos: function(t) {
753
- this.verticalPos = this.verticalPos + t, this.data.stopy = this.verticalPos;
754
- },
755
- getVerticalPos: function() {
756
- return this.verticalPos;
757
- },
758
- getBounds: function() {
759
- return this.data;
760
- }
761
- }, W = j.sectionFills, st = j.sectionColours, qt = function(t, e, i) {
762
- const o = C().journey;
763
- let n = "";
764
- const h = o.height * 2 + o.diagramMarginY, c = i + h;
765
- let f = 0, y = "#CCC", m = "black", g = 0;
766
- for (const [p, s] of e.entries()) {
767
- if (n !== s.section) {
768
- y = W[f % W.length], g = f % W.length, m = st[f % st.length];
769
- let a = 0;
770
- const u = s.section;
771
- for (let l = p; l < e.length && e[l].section == u; l++)
772
- a = a + 1;
773
- const d = {
774
- x: p * o.taskMargin + p * o.width + P,
775
- y: 50,
776
- text: s.section,
777
- fill: y,
778
- num: g,
779
- colour: m,
780
- taskCount: a
781
- };
782
- L.drawSection(t, d, o), n = s.section, f++;
783
- }
784
- const r = s.people.reduce((a, u) => (M[u] && (a[u] = M[u]), a), {});
785
- s.x = p * o.taskMargin + p * o.width + P, s.y = c, s.width = o.diagramMarginX, s.height = o.diagramMarginY, s.colour = m, s.fill = y, s.num = g, s.actors = r, L.drawTask(t, s, o), v.insert(s.x, s.y, s.x + s.width + o.taskMargin, 450);
786
- }
787
- }, nt = {
788
- setConf: zt,
789
- draw: Ot
790
- }, Gt = {
791
- parser: wt,
792
- db: tt,
793
- renderer: nt,
794
- styles: Vt,
795
- init: (t) => {
796
- nt.setConf(t.journey), tt.clear();
797
- }
798
- };
799
- export {
800
- Gt as diagram
801
- };