hexagon-editor 0.1.5 → 0.1.6

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 (117) hide show
  1. package/README.md +24 -11
  2. package/dist/MarkdownEditor.vue.d.ts +28 -26
  3. package/dist/MarkdownEditor.vue.d.ts.map +1 -1
  4. package/dist/{MarkdownEditorLinkForm-C7CGgA83.js → MarkdownEditorLinkForm-B9dEX3WT.js} +1 -1
  5. package/dist/{base-Bnv2-Te4.js → base-BPdMUtQo.js} +141 -137
  6. package/dist/components/MarkdownEditorToolbar.vue.d.ts +4 -3
  7. package/dist/components/MarkdownEditorToolbar.vue.d.ts.map +1 -1
  8. package/dist/configure.d.ts +0 -2
  9. package/dist/configure.d.ts.map +1 -1
  10. package/dist/configure.js +11 -12
  11. package/dist/core/basic-editor-markdown.d.ts.map +1 -1
  12. package/dist/core/basic-editor-renderers.d.ts +6 -4
  13. package/dist/core/basic-editor-renderers.d.ts.map +1 -1
  14. package/dist/core/basic-editor-types.d.ts +2 -0
  15. package/dist/core/basic-editor-types.d.ts.map +1 -1
  16. package/dist/core/basic-editor.d.ts +1 -1
  17. package/dist/core/basic-editor.d.ts.map +1 -1
  18. package/dist/core/index.d.ts +0 -2
  19. package/dist/core/index.d.ts.map +1 -1
  20. package/dist/core.js +28 -31
  21. package/dist/extensions.js +1 -1
  22. package/dist/forms/MarkdownEditorImageForm.vue.d.ts +2 -2
  23. package/dist/forms/MarkdownEditorImageForm.vue.d.ts.map +1 -1
  24. package/dist/forms/MarkdownEditorLinkForm.vue.d.ts +2 -2
  25. package/dist/forms/MarkdownEditorTextInput.vue.d.ts +2 -2
  26. package/dist/forms/MarkdownEditorTextInput.vue.d.ts.map +1 -1
  27. package/dist/forms.js +1 -1
  28. package/dist/{full-C-o2lPBX.js → full-Da8esvj2.js} +1 -1
  29. package/dist/{full-specs-Cl-ODShc.js → full-specs-hXKoMF-0.js} +1 -1
  30. package/dist/index-D_CMntQU.js +3173 -0
  31. package/dist/index.css +1 -1
  32. package/dist/index.d.ts +1 -1
  33. package/dist/index.d.ts.map +1 -1
  34. package/dist/index.js +3611 -1283
  35. package/dist/{markup-commands-B2NMfYHE.js → markup-commands-BYsx8ADT.js} +1989 -1963
  36. package/dist/presets.js +2 -2
  37. package/dist/public-types.d.ts +22 -0
  38. package/dist/public-types.d.ts.map +1 -1
  39. package/dist/renderer/MarkdownRenderer.vue.d.ts +2 -0
  40. package/dist/renderer/MarkdownRenderer.vue.d.ts.map +1 -1
  41. package/dist/renderer/markdown.d.ts +2 -1
  42. package/dist/renderer/markdown.d.ts.map +1 -1
  43. package/dist/renderer.css +1 -1
  44. package/dist/renderer.js +142 -146
  45. package/package.json +106 -108
  46. package/dist/MarkdownEditorLinkForm.css +0 -1
  47. package/dist/abnfDiagram-N423BO3Z-DCf6sPky.js +0 -87
  48. package/dist/arc-y6UeoJpJ.js +0 -83
  49. package/dist/architectureDiagram-T3A2C74G-Cc3_3-cI.js +0 -4778
  50. package/dist/base.css +0 -1
  51. package/dist/blockDiagram-VBNYF7ZC-DWVLZwXY.js +0 -2419
  52. package/dist/c4Diagram-5PPSVZJV-CaIN7qay.js +0 -1577
  53. package/dist/channel-BwXGcavV.js +0 -5
  54. package/dist/chunk-2GRJ4B5K-O75udjPr.js +0 -68
  55. package/dist/chunk-2Q5K7J3B-CySL0lOA.js +0 -15
  56. package/dist/chunk-5RXB4S5H-BKPnLCOJ.js +0 -1408
  57. package/dist/chunk-5VM5RSS4--it1VJIv.js +0 -19
  58. package/dist/chunk-6Q2QTUOP-DNiML-50.js +0 -664
  59. package/dist/chunk-GF5L2VYU-z7A-k0-V.js +0 -1533
  60. package/dist/chunk-JWPE2WC7-DAjx3Kjr.js +0 -8
  61. package/dist/chunk-KBJHAD2P-D4R1VW0r.js +0 -19
  62. package/dist/chunk-RYQCIY6F-DmJAYxq8.js +0 -313
  63. package/dist/chunk-XXDRQBXY-CK913N-t.js +0 -8
  64. package/dist/classDiagram-JCYQIIEL-Djipq_HJ.js +0 -16
  65. package/dist/classDiagram-v2-OCEON4UE-Djipq_HJ.js +0 -16
  66. package/dist/core/optional-renderers.d.ts +0 -9
  67. package/dist/core/optional-renderers.d.ts.map +0 -1
  68. package/dist/cose-bilkent-JH36ORCC-CXuKFbXy.js +0 -2608
  69. package/dist/cynefin-VYW2F7L2-Bkk-F_Js.js +0 -23766
  70. package/dist/cynefinDiagram-MW4NZA55-DwOK40hm.js +0 -299
  71. package/dist/cytoscape.esm-3W4EOjxC.js +0 -18756
  72. package/dist/dagre-VZM6K2ZE-0VsGm8Ag.js +0 -340
  73. package/dist/defaultLocale-BgPVtth8.js +0 -171
  74. package/dist/diagram-7IWD3JNH-BrApu1hz.js +0 -350
  75. package/dist/diagram-B4RE2ZJO-CVXoBg2r.js +0 -461
  76. package/dist/diagram-LBJQPF4R-Dp0eSz2L.js +0 -142
  77. package/dist/diagram-Q27KOJAE-DWIltqIH.js +0 -528
  78. package/dist/diagram-UB23O5K3-B7z2Lj3K.js +0 -219
  79. package/dist/ebnfDiagram-BXEA7PRR-CYgE6z_2.js +0 -109
  80. package/dist/erDiagram-JOGREHBK-D3QWrPo-.js +0 -910
  81. package/dist/flowDiagram-UKHOOZJN-CfjPcHNW.js +0 -1638
  82. package/dist/ganttDiagram-PKOTCBZU-ECmaWI-9.js +0 -2711
  83. package/dist/gitGraphDiagram-DS77QQ5N-DgG1RGJ8.js +0 -815
  84. package/dist/graph-DAHC4kPm.js +0 -1545
  85. package/dist/infoDiagram-6WML65LV-B1Yl3nZV.js +0 -24
  86. package/dist/init-DjUOC4st.js +0 -16
  87. package/dist/ishikawaDiagram-WSZJBQD7-4sngaB5o.js +0 -621
  88. package/dist/journeyDiagram-NVQOT4AX-B_6AmR_j.js +0 -834
  89. package/dist/kanban-definition-27J2QSJJ-B8BO9o8J.js +0 -724
  90. package/dist/katex-ByXcxnHy.js +0 -14436
  91. package/dist/katex-DoRnZ_sp.js +0 -11682
  92. package/dist/layout-DBbo_M5I.js +0 -1519
  93. package/dist/linear-BEdRfKba.js +0 -259
  94. package/dist/map-DRdzG8Ho.js +0 -224
  95. package/dist/markup-commands.css +0 -1
  96. package/dist/mermaid.core-CR0bA2Wa.js +0 -16496
  97. package/dist/mindmap-definition-FAOFIHXS-DnPz807N.js +0 -827
  98. package/dist/optional-renderers-BalvqqvY.js +0 -11
  99. package/dist/ordinal-B6-f3MAq.js +0 -61
  100. package/dist/pegDiagram-VL7TDLO6-csGWlzs8.js +0 -95
  101. package/dist/pieDiagram-7S7Q4E2Y-Bqs8j5FX.js +0 -207
  102. package/dist/quadrantDiagram-CIZ2JOQS-jzP4lRrY.js +0 -1023
  103. package/dist/railroadDiagram-AXF67PYL-BSCyR24u.js +0 -77
  104. package/dist/renderer/mermaid-runtime.d.ts +0 -4
  105. package/dist/renderer/mermaid-runtime.d.ts.map +0 -1
  106. package/dist/requirementDiagram-LRYGKXZP-DmEkLYqX.js +0 -882
  107. package/dist/sankeyDiagram-W5VNT64P-CYvRYMTh.js +0 -847
  108. package/dist/sequenceDiagram-SI44F4Z6-CyWbDtPA.js +0 -2888
  109. package/dist/sizeCapture-X5ZJPWSS-xKhYCY84.js +0 -46
  110. package/dist/stateDiagram-OKZ733FA-DP44R2Dd.js +0 -263
  111. package/dist/stateDiagram-v2-UEYNNEHI-BvlOisND.js +0 -16
  112. package/dist/swimlanes-SLNWSIFB-BKFp8twH.js +0 -5332
  113. package/dist/swimlanesDiagram-ULZ7WXOC-CTvIFuHq.js +0 -13
  114. package/dist/timeline-definition-Z64GVDOM-B4137uIl.js +0 -1055
  115. package/dist/vennDiagram-T6HMQDX7-CPs8gXjx.js +0 -1578
  116. package/dist/wardleyDiagram-T6FBY63Y-BYp13hbI.js +0 -675
  117. package/dist/xychartDiagram-ELKLHX3M-DTT37K2u.js +0 -1388
@@ -1,1055 +0,0 @@
1
- import { _ as o, y as pt, T as Rt, U as Ct, V as Wt, c as gt, l as E, D as Pt, K as Bt, W as ft, d as X, t as Vt, X as Ft, p as zt } from "./mermaid.core-CR0bA2Wa.js";
2
- import { d as ot } from "./arc-y6UeoJpJ.js";
3
- var tt = (function() {
4
- var e = /* @__PURE__ */ o(function(k, s, d, l) {
5
- for (d = d || {}, l = k.length; l--; d[k[l]] = s) ;
6
- return d;
7
- }, "o"), t = [6, 11, 13, 14, 15, 17, 19, 20, 23, 24], n = [1, 12], i = [1, 13], r = [1, 14], h = [1, 15], c = [1, 16], a = [1, 19], f = [1, 20], g = {
8
- trace: /* @__PURE__ */ o(function() {
9
- }, "trace"),
10
- yy: {},
11
- symbols_: { error: 2, start: 3, timeline_header: 4, document: 5, EOF: 6, timeline: 7, timeline_lr: 8, timeline_td: 9, line: 10, SPACE: 11, statement: 12, NEWLINE: 13, title: 14, acc_title: 15, acc_title_value: 16, acc_descr: 17, acc_descr_value: 18, acc_descr_multiline_value: 19, section: 20, period_statement: 21, event_statement: 22, period: 23, event: 24, $accept: 0, $end: 1 },
12
- terminals_: { 2: "error", 6: "EOF", 7: "timeline", 8: "timeline_lr", 9: "timeline_td", 11: "SPACE", 13: "NEWLINE", 14: "title", 15: "acc_title", 16: "acc_title_value", 17: "acc_descr", 18: "acc_descr_value", 19: "acc_descr_multiline_value", 20: "section", 23: "period", 24: "event" },
13
- productions_: [0, [3, 3], [4, 1], [4, 1], [4, 1], [5, 0], [5, 2], [10, 2], [10, 1], [10, 1], [10, 1], [12, 1], [12, 2], [12, 2], [12, 1], [12, 1], [12, 1], [12, 1], [21, 1], [22, 1]],
14
- performAction: /* @__PURE__ */ o(function(s, d, l, p, x, u, S) {
15
- var v = u.length - 1;
16
- switch (x) {
17
- case 1:
18
- return u[v - 1];
19
- case 3:
20
- p.setDirection("LR");
21
- break;
22
- case 4:
23
- p.setDirection("TD");
24
- break;
25
- case 5:
26
- this.$ = [];
27
- break;
28
- case 6:
29
- u[v - 1].push(u[v]), this.$ = u[v - 1];
30
- break;
31
- case 7:
32
- case 8:
33
- this.$ = u[v];
34
- break;
35
- case 9:
36
- case 10:
37
- this.$ = [];
38
- break;
39
- case 11:
40
- p.getCommonDb().setDiagramTitle(u[v].substr(6)), this.$ = u[v].substr(6);
41
- break;
42
- case 12:
43
- this.$ = u[v].trim(), p.getCommonDb().setAccTitle(this.$);
44
- break;
45
- case 13:
46
- case 14:
47
- this.$ = u[v].trim(), p.getCommonDb().setAccDescription(this.$);
48
- break;
49
- case 15:
50
- p.addSection(u[v].substr(8)), this.$ = u[v].substr(8);
51
- break;
52
- case 18:
53
- p.addTask(u[v], 0, ""), this.$ = u[v];
54
- break;
55
- case 19:
56
- p.addEvent(u[v].substr(2)), this.$ = u[v];
57
- break;
58
- }
59
- }, "anonymous"),
60
- table: [{ 3: 1, 4: 2, 7: [1, 3], 8: [1, 4], 9: [1, 5] }, { 1: [3] }, e(t, [2, 5], { 5: 6 }), e(t, [2, 2]), e(t, [2, 3]), e(t, [2, 4]), { 6: [1, 7], 10: 8, 11: [1, 9], 12: 10, 13: [1, 11], 14: n, 15: i, 17: r, 19: h, 20: c, 21: 17, 22: 18, 23: a, 24: f }, e(t, [2, 10], { 1: [2, 1] }), e(t, [2, 6]), { 12: 21, 14: n, 15: i, 17: r, 19: h, 20: c, 21: 17, 22: 18, 23: a, 24: f }, e(t, [2, 8]), e(t, [2, 9]), e(t, [2, 11]), { 16: [1, 22] }, { 18: [1, 23] }, e(t, [2, 14]), e(t, [2, 15]), e(t, [2, 16]), e(t, [2, 17]), e(t, [2, 18]), e(t, [2, 19]), e(t, [2, 7]), e(t, [2, 12]), e(t, [2, 13])],
61
- defaultActions: {},
62
- parseError: /* @__PURE__ */ o(function(s, d) {
63
- if (d.recoverable)
64
- this.trace(s);
65
- else {
66
- var l = new Error(s);
67
- throw l.hash = d, l;
68
- }
69
- }, "parseError"),
70
- parse: /* @__PURE__ */ o(function(s) {
71
- var d = this, l = [0], p = [], x = [null], u = [], S = this.table, v = "", I = 0, R = 0, W = 2, O = 1, L = u.slice.call(arguments, 1), w = Object.create(this.lexer), H = { yy: {} };
72
- for (var V in this.yy)
73
- Object.prototype.hasOwnProperty.call(this.yy, V) && (H.yy[V] = this.yy[V]);
74
- w.setInput(s, H.yy), H.yy.lexer = w, H.yy.parser = this, typeof w.yylloc > "u" && (w.yylloc = {});
75
- var F = w.yylloc;
76
- u.push(F);
77
- var U = w.options && w.options.ranges;
78
- typeof H.yy.parseError == "function" ? this.parseError = H.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
79
- function N(A) {
80
- l.length = l.length - 2 * A, x.length = x.length - A, u.length = u.length - A;
81
- }
82
- o(N, "popStack");
83
- function b() {
84
- var A;
85
- return A = p.pop() || w.lex() || O, typeof A != "number" && (A instanceof Array && (p = A, A = p.pop()), A = d.symbols_[A] || A), A;
86
- }
87
- o(b, "lex");
88
- for (var _, $, T, P, C = {}, G, B, Z, j; ; ) {
89
- if ($ = l[l.length - 1], this.defaultActions[$] ? T = this.defaultActions[$] : ((_ === null || typeof _ > "u") && (_ = b()), T = S[$] && S[$][_]), typeof T > "u" || !T.length || !T[0]) {
90
- var Y = "";
91
- j = [];
92
- for (G in S[$])
93
- this.terminals_[G] && G > W && j.push("'" + this.terminals_[G] + "'");
94
- w.showPosition ? Y = "Parse error on line " + (I + 1) + `:
95
- ` + w.showPosition() + `
96
- Expecting ` + j.join(", ") + ", got '" + (this.terminals_[_] || _) + "'" : Y = "Parse error on line " + (I + 1) + ": Unexpected " + (_ == O ? "end of input" : "'" + (this.terminals_[_] || _) + "'"), this.parseError(Y, {
97
- text: w.match,
98
- token: this.terminals_[_] || _,
99
- line: w.yylineno,
100
- loc: F,
101
- expected: j
102
- });
103
- }
104
- if (T[0] instanceof Array && T.length > 1)
105
- throw new Error("Parse Error: multiple actions possible at state: " + $ + ", token: " + _);
106
- switch (T[0]) {
107
- case 1:
108
- l.push(_), x.push(w.yytext), u.push(w.yylloc), l.push(T[1]), _ = null, R = w.yyleng, v = w.yytext, I = w.yylineno, F = w.yylloc;
109
- break;
110
- case 2:
111
- if (B = this.productions_[T[1]][1], C.$ = x[x.length - B], C._$ = {
112
- first_line: u[u.length - (B || 1)].first_line,
113
- last_line: u[u.length - 1].last_line,
114
- first_column: u[u.length - (B || 1)].first_column,
115
- last_column: u[u.length - 1].last_column
116
- }, U && (C._$.range = [
117
- u[u.length - (B || 1)].range[0],
118
- u[u.length - 1].range[1]
119
- ]), P = this.performAction.apply(C, [
120
- v,
121
- R,
122
- I,
123
- H.yy,
124
- T[1],
125
- x,
126
- u
127
- ].concat(L)), typeof P < "u")
128
- return P;
129
- B && (l = l.slice(0, -1 * B * 2), x = x.slice(0, -1 * B), u = u.slice(0, -1 * B)), l.push(this.productions_[T[1]][0]), x.push(C.$), u.push(C._$), Z = S[l[l.length - 2]][l[l.length - 1]], l.push(Z);
130
- break;
131
- case 3:
132
- return !0;
133
- }
134
- }
135
- return !0;
136
- }, "parse")
137
- }, m = /* @__PURE__ */ (function() {
138
- var k = {
139
- EOF: 1,
140
- parseError: /* @__PURE__ */ o(function(d, l) {
141
- if (this.yy.parser)
142
- this.yy.parser.parseError(d, l);
143
- else
144
- throw new Error(d);
145
- }, "parseError"),
146
- // resets the lexer, sets new input
147
- setInput: /* @__PURE__ */ o(function(s, d) {
148
- return this.yy = d || 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 = {
149
- first_line: 1,
150
- first_column: 0,
151
- last_line: 1,
152
- last_column: 0
153
- }, this.options.ranges && (this.yylloc.range = [0, 0]), this.offset = 0, this;
154
- }, "setInput"),
155
- // consumes and returns one char from the input
156
- input: /* @__PURE__ */ o(function() {
157
- var s = this._input[0];
158
- this.yytext += s, this.yyleng++, this.offset++, this.match += s, this.matched += s;
159
- var d = s.match(/(?:\r\n?|\n).*/g);
160
- return d ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++, this.options.ranges && this.yylloc.range[1]++, this._input = this._input.slice(1), s;
161
- }, "input"),
162
- // unshifts one char (or a string) into the input
163
- unput: /* @__PURE__ */ o(function(s) {
164
- var d = s.length, l = s.split(/(?:\r\n?|\n)/g);
165
- this._input = s + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - d), this.offset -= d;
166
- var p = this.match.split(/(?:\r\n?|\n)/g);
167
- this.match = this.match.substr(0, this.match.length - 1), this.matched = this.matched.substr(0, this.matched.length - 1), l.length - 1 && (this.yylineno -= l.length - 1);
168
- var x = this.yylloc.range;
169
- return this.yylloc = {
170
- first_line: this.yylloc.first_line,
171
- last_line: this.yylineno + 1,
172
- first_column: this.yylloc.first_column,
173
- last_column: l ? (l.length === p.length ? this.yylloc.first_column : 0) + p[p.length - l.length].length - l[0].length : this.yylloc.first_column - d
174
- }, this.options.ranges && (this.yylloc.range = [x[0], x[0] + this.yyleng - d]), this.yyleng = this.yytext.length, this;
175
- }, "unput"),
176
- // When called from action, caches matched text and appends it on next action
177
- more: /* @__PURE__ */ o(function() {
178
- return this._more = !0, this;
179
- }, "more"),
180
- // 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.
181
- reject: /* @__PURE__ */ o(function() {
182
- if (this.options.backtrack_lexer)
183
- this._backtrack = !0;
184
- else
185
- 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).
186
- ` + this.showPosition(), {
187
- text: "",
188
- token: null,
189
- line: this.yylineno
190
- });
191
- return this;
192
- }, "reject"),
193
- // retain first n characters of the match
194
- less: /* @__PURE__ */ o(function(s) {
195
- this.unput(this.match.slice(s));
196
- }, "less"),
197
- // displays already matched input, i.e. for error messages
198
- pastInput: /* @__PURE__ */ o(function() {
199
- var s = this.matched.substr(0, this.matched.length - this.match.length);
200
- return (s.length > 20 ? "..." : "") + s.substr(-20).replace(/\n/g, "");
201
- }, "pastInput"),
202
- // displays upcoming input, i.e. for error messages
203
- upcomingInput: /* @__PURE__ */ o(function() {
204
- var s = this.match;
205
- return s.length < 20 && (s += this._input.substr(0, 20 - s.length)), (s.substr(0, 20) + (s.length > 20 ? "..." : "")).replace(/\n/g, "");
206
- }, "upcomingInput"),
207
- // displays the character position where the lexing error occurred, i.e. for error messages
208
- showPosition: /* @__PURE__ */ o(function() {
209
- var s = this.pastInput(), d = new Array(s.length + 1).join("-");
210
- return s + this.upcomingInput() + `
211
- ` + d + "^";
212
- }, "showPosition"),
213
- // test the lexed token: return FALSE when not a match, otherwise return token
214
- test_match: /* @__PURE__ */ o(function(s, d) {
215
- var l, p, x;
216
- if (this.options.backtrack_lexer && (x = {
217
- yylineno: this.yylineno,
218
- yylloc: {
219
- first_line: this.yylloc.first_line,
220
- last_line: this.last_line,
221
- first_column: this.yylloc.first_column,
222
- last_column: this.yylloc.last_column
223
- },
224
- yytext: this.yytext,
225
- match: this.match,
226
- matches: this.matches,
227
- matched: this.matched,
228
- yyleng: this.yyleng,
229
- offset: this.offset,
230
- _more: this._more,
231
- _input: this._input,
232
- yy: this.yy,
233
- conditionStack: this.conditionStack.slice(0),
234
- done: this.done
235
- }, this.options.ranges && (x.yylloc.range = this.yylloc.range.slice(0))), p = s[0].match(/(?:\r\n?|\n).*/g), p && (this.yylineno += p.length), this.yylloc = {
236
- first_line: this.yylloc.last_line,
237
- last_line: this.yylineno + 1,
238
- first_column: this.yylloc.last_column,
239
- last_column: p ? p[p.length - 1].length - p[p.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + s[0].length
240
- }, 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], l = this.performAction.call(this, this.yy, this, d, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), l)
241
- return l;
242
- if (this._backtrack) {
243
- for (var u in x)
244
- this[u] = x[u];
245
- return !1;
246
- }
247
- return !1;
248
- }, "test_match"),
249
- // return next match in input
250
- next: /* @__PURE__ */ o(function() {
251
- if (this.done)
252
- return this.EOF;
253
- this._input || (this.done = !0);
254
- var s, d, l, p;
255
- this._more || (this.yytext = "", this.match = "");
256
- for (var x = this._currentRules(), u = 0; u < x.length; u++)
257
- if (l = this._input.match(this.rules[x[u]]), l && (!d || l[0].length > d[0].length)) {
258
- if (d = l, p = u, this.options.backtrack_lexer) {
259
- if (s = this.test_match(l, x[u]), s !== !1)
260
- return s;
261
- if (this._backtrack) {
262
- d = !1;
263
- continue;
264
- } else
265
- return !1;
266
- } else if (!this.options.flex)
267
- break;
268
- }
269
- return d ? (s = this.test_match(d, x[p]), s !== !1 ? s : !1) : this._input === "" ? this.EOF : this.parseError("Lexical error on line " + (this.yylineno + 1) + `. Unrecognized text.
270
- ` + this.showPosition(), {
271
- text: "",
272
- token: null,
273
- line: this.yylineno
274
- });
275
- }, "next"),
276
- // return next match that has a token
277
- lex: /* @__PURE__ */ o(function() {
278
- var d = this.next();
279
- return d || this.lex();
280
- }, "lex"),
281
- // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)
282
- begin: /* @__PURE__ */ o(function(d) {
283
- this.conditionStack.push(d);
284
- }, "begin"),
285
- // pop the previously active lexer condition state off the condition stack
286
- popState: /* @__PURE__ */ o(function() {
287
- var d = this.conditionStack.length - 1;
288
- return d > 0 ? this.conditionStack.pop() : this.conditionStack[0];
289
- }, "popState"),
290
- // produce the lexer rule set which is active for the currently active lexer condition state
291
- _currentRules: /* @__PURE__ */ o(function() {
292
- return this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1] ? this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules : this.conditions.INITIAL.rules;
293
- }, "_currentRules"),
294
- // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available
295
- topState: /* @__PURE__ */ o(function(d) {
296
- return d = this.conditionStack.length - 1 - Math.abs(d || 0), d >= 0 ? this.conditionStack[d] : "INITIAL";
297
- }, "topState"),
298
- // alias for begin(condition)
299
- pushState: /* @__PURE__ */ o(function(d) {
300
- this.begin(d);
301
- }, "pushState"),
302
- // return the number of states currently on the stack
303
- stateStackSize: /* @__PURE__ */ o(function() {
304
- return this.conditionStack.length;
305
- }, "stateStackSize"),
306
- options: { "case-insensitive": !0 },
307
- performAction: /* @__PURE__ */ o(function(d, l, p, x) {
308
- switch (p) {
309
- case 0:
310
- break;
311
- case 1:
312
- break;
313
- case 2:
314
- return 13;
315
- case 3:
316
- break;
317
- case 4:
318
- break;
319
- case 5:
320
- return 8;
321
- case 6:
322
- return 9;
323
- case 7:
324
- return 7;
325
- case 8:
326
- return 14;
327
- case 9:
328
- return this.begin("acc_title"), 15;
329
- case 10:
330
- return this.popState(), "acc_title_value";
331
- case 11:
332
- return this.begin("acc_descr"), 17;
333
- case 12:
334
- return this.popState(), "acc_descr_value";
335
- case 13:
336
- this.begin("acc_descr_multiline");
337
- break;
338
- case 14:
339
- this.popState();
340
- break;
341
- case 15:
342
- return "acc_descr_multiline_value";
343
- case 16:
344
- return 20;
345
- case 17:
346
- return 24;
347
- case 18:
348
- return 23;
349
- case 19:
350
- return 6;
351
- case 20:
352
- return "INVALID";
353
- }
354
- }, "anonymous"),
355
- rules: [/^(?:%(?!\{)[^\n]*)/i, /^(?:[^\}]%%[^\n]*)/i, /^(?:[\n]+)/i, /^(?:\s+)/i, /^(?:#[^\n]*)/i, /^(?:timeline[ \t]+LR\b)/i, /^(?:timeline[ \t]+TD\b)/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]|:(?!\s))+)/i, /^(?:[^#:\n]+)/i, /^(?:$)/i, /^(?:.)/i],
356
- conditions: { acc_descr_multiline: { rules: [14, 15], inclusive: !1 }, acc_descr: { rules: [12], inclusive: !1 }, acc_title: { rules: [10], inclusive: !1 }, INITIAL: { rules: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 13, 16, 17, 18, 19, 20], inclusive: !0 } }
357
- };
358
- return k;
359
- })();
360
- g.lexer = m;
361
- function y() {
362
- this.yy = {};
363
- }
364
- return o(y, "Parser"), y.prototype = g, g.Parser = y, new y();
365
- })();
366
- tt.parser = tt;
367
- var Ot = tt, yt = {};
368
- Vt(yt, {
369
- addEvent: () => Tt,
370
- addSection: () => _t,
371
- addTask: () => Et,
372
- addTaskOrg: () => $t,
373
- clear: () => kt,
374
- default: () => Gt,
375
- getCommonDb: () => xt,
376
- getDirection: () => bt,
377
- getSections: () => wt,
378
- getTasks: () => St,
379
- setDirection: () => vt
380
- });
381
- var D = "", mt = 0, nt = "LR", rt = [], q = [], K = [], xt = /* @__PURE__ */ o(() => Ft, "getCommonDb"), kt = /* @__PURE__ */ o(function() {
382
- rt.length = 0, q.length = 0, D = "", K.length = 0, nt = "LR", zt();
383
- }, "clear"), vt = /* @__PURE__ */ o(function(e) {
384
- nt = e;
385
- }, "setDirection"), bt = /* @__PURE__ */ o(function() {
386
- return nt;
387
- }, "getDirection"), _t = /* @__PURE__ */ o(function(e) {
388
- D = e, rt.push(e);
389
- }, "addSection"), wt = /* @__PURE__ */ o(function() {
390
- return rt;
391
- }, "getSections"), St = /* @__PURE__ */ o(function() {
392
- let e = ct();
393
- const t = 100;
394
- let n = 0;
395
- for (; !e && n < t; )
396
- e = ct(), n++;
397
- return q.push(...K), q;
398
- }, "getTasks"), Et = /* @__PURE__ */ o(function(e, t, n) {
399
- const i = {
400
- id: mt++,
401
- section: D,
402
- type: D,
403
- task: e,
404
- score: t || 0,
405
- //if event is defined, then add it the events array
406
- events: n ? [n] : []
407
- };
408
- K.push(i);
409
- }, "addTask"), Tt = /* @__PURE__ */ o(function(e) {
410
- K.find((n) => n.id === mt - 1).events.push(e);
411
- }, "addEvent"), $t = /* @__PURE__ */ o(function(e) {
412
- const t = {
413
- section: D,
414
- type: D,
415
- description: e,
416
- task: e,
417
- classes: []
418
- };
419
- q.push(t);
420
- }, "addTaskOrg"), ct = /* @__PURE__ */ o(function() {
421
- const e = /* @__PURE__ */ o(function(n) {
422
- return K[n].processed;
423
- }, "compileTask");
424
- let t = !0;
425
- for (const [n, i] of K.entries())
426
- e(n), t = t && i.processed;
427
- return t;
428
- }, "compileTasks"), Gt = {
429
- clear: kt,
430
- getCommonDb: xt,
431
- getDirection: bt,
432
- setDirection: vt,
433
- addSection: _t,
434
- getSections: wt,
435
- getTasks: St,
436
- addTask: Et,
437
- addTaskOrg: $t,
438
- addEvent: Tt
439
- }, Nt = 0, J = /* @__PURE__ */ o(function(e, t) {
440
- const n = e.append("rect");
441
- return n.attr("x", t.x), n.attr("y", t.y), n.attr("fill", t.fill), n.attr("stroke", t.stroke), n.attr("width", t.width), n.attr("height", t.height), n.attr("rx", t.rx), n.attr("ry", t.ry), t.class !== void 0 && n.attr("class", t.class), n;
442
- }, "drawRect"), Dt = /* @__PURE__ */ o(function(e, t) {
443
- const i = e.append("circle").attr("cx", t.cx).attr("cy", t.cy).attr("class", "face").attr("r", 15).attr("stroke-width", 2).attr("overflow", "visible"), r = e.append("g");
444
- 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");
445
- function h(f) {
446
- const g = ot().startAngle(Math.PI / 2).endAngle(3 * (Math.PI / 2)).innerRadius(7.5).outerRadius(6.8181818181818175);
447
- f.append("path").attr("class", "mouth").attr("d", g).attr("transform", "translate(" + t.cx + "," + (t.cy + 2) + ")");
448
- }
449
- o(h, "smile");
450
- function c(f) {
451
- const g = ot().startAngle(3 * Math.PI / 2).endAngle(5 * (Math.PI / 2)).innerRadius(7.5).outerRadius(6.8181818181818175);
452
- f.append("path").attr("class", "mouth").attr("d", g).attr("transform", "translate(" + t.cx + "," + (t.cy + 7) + ")");
453
- }
454
- o(c, "sad");
455
- function a(f) {
456
- f.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");
457
- }
458
- return o(a, "ambivalent"), t.score > 3 ? h(r) : t.score < 3 ? c(r) : a(r), i;
459
- }, "drawFace"), Kt = /* @__PURE__ */ o(function(e, t) {
460
- const n = e.append("circle");
461
- return n.attr("cx", t.cx), n.attr("cy", t.cy), n.attr("class", "actor-" + t.pos), n.attr("fill", t.fill), n.attr("stroke", t.stroke), n.attr("r", t.r), n.class !== void 0 && n.attr("class", n.class), t.title !== void 0 && n.append("title").text(t.title), n;
462
- }, "drawCircle"), It = /* @__PURE__ */ o(function(e, t) {
463
- const n = t.text.replace(/<br\s*\/?>/gi, " "), i = e.append("text");
464
- i.attr("x", t.x), i.attr("y", t.y), i.attr("class", "legend"), i.style("text-anchor", t.anchor), t.class !== void 0 && i.attr("class", t.class);
465
- const r = i.append("tspan");
466
- return r.attr("x", t.x + t.textMargin * 2), r.text(n), i;
467
- }, "drawText"), Ut = /* @__PURE__ */ o(function(e, t) {
468
- function n(r, h, c, a, f) {
469
- return r + "," + h + " " + (r + c) + "," + h + " " + (r + c) + "," + (h + a - f) + " " + (r + c - f * 1.2) + "," + (h + a) + " " + r + "," + (h + a);
470
- }
471
- o(n, "genPoints");
472
- const i = e.append("polygon");
473
- i.attr("points", n(t.x, t.y, 50, 20, 7)), i.attr("class", "labelBox"), t.y = t.y + t.labelMargin, t.x = t.x + 0.5 * t.labelMargin, It(e, t);
474
- }, "drawLabel"), Xt = /* @__PURE__ */ o(function(e, t, n) {
475
- const i = e.append("g"), r = st();
476
- r.x = t.x, r.y = t.y, r.fill = t.fill, r.width = n.width, r.height = n.height, r.class = "journey-section section-type-" + t.num, r.rx = 3, r.ry = 3, J(i, r), Ht(n)(
477
- t.text,
478
- i,
479
- r.x,
480
- r.y,
481
- r.width,
482
- r.height,
483
- { class: "journey-section section-type-" + t.num },
484
- n,
485
- t.colour
486
- );
487
- }, "drawSection"), et = -1, Zt = /* @__PURE__ */ o(function(e, t, n, i) {
488
- const r = t.x + n.width / 2, h = e.append("g");
489
- et++, h.append("line").attr("id", i + "-task" + et).attr("x1", r).attr("y1", t.y).attr("x2", r).attr("y2", 450).attr("class", "task-line").attr("stroke-width", "1px").attr("stroke-dasharray", "4 2").attr("stroke", "#666"), Dt(h, {
490
- cx: r,
491
- cy: 300 + (5 - t.score) * 30,
492
- score: t.score
493
- });
494
- const a = st();
495
- a.x = t.x, a.y = t.y, a.fill = t.fill, a.width = n.width, a.height = n.height, a.class = "task task-type-" + t.num, a.rx = 3, a.ry = 3, J(h, a), Ht(n)(
496
- t.task,
497
- h,
498
- a.x,
499
- a.y,
500
- a.width,
501
- a.height,
502
- { class: "task" },
503
- n,
504
- t.colour
505
- );
506
- }, "drawTask"), jt = /* @__PURE__ */ o(function(e, t) {
507
- J(e, {
508
- x: t.startx,
509
- y: t.starty,
510
- width: t.stopx - t.startx,
511
- height: t.stopy - t.starty,
512
- fill: t.fill,
513
- class: "rect"
514
- }).lower();
515
- }, "drawBackgroundRect"), qt = /* @__PURE__ */ o(function() {
516
- return {
517
- x: 0,
518
- y: 0,
519
- fill: void 0,
520
- "text-anchor": "start",
521
- width: 100,
522
- height: 100,
523
- textMargin: 0,
524
- rx: 0,
525
- ry: 0
526
- };
527
- }, "getTextObj"), st = /* @__PURE__ */ o(function() {
528
- return {
529
- x: 0,
530
- y: 0,
531
- width: 100,
532
- anchor: "start",
533
- height: 100,
534
- rx: 0,
535
- ry: 0
536
- };
537
- }, "getNoteRect"), Ht = /* @__PURE__ */ (function() {
538
- function e(r, h, c, a, f, g, m, y) {
539
- const k = h.append("text").attr("x", c + f / 2).attr("y", a + g / 2 + 5).style("font-color", y).style("text-anchor", "middle").text(r);
540
- i(k, m);
541
- }
542
- o(e, "byText");
543
- function t(r, h, c, a, f, g, m, y, k) {
544
- const { taskFontSize: s, taskFontFamily: d } = y, l = r.split(/<br\s*\/?>/gi);
545
- for (let p = 0; p < l.length; p++) {
546
- const x = p * s - s * (l.length - 1) / 2, u = h.append("text").attr("x", c + f / 2).attr("y", a).attr("fill", k).style("text-anchor", "middle").style("font-size", s).style("font-family", d);
547
- u.append("tspan").attr("x", c + f / 2).attr("dy", x).text(l[p]), u.attr("y", a + g / 2).attr("dominant-baseline", "central").attr("alignment-baseline", "central"), i(u, m);
548
- }
549
- }
550
- o(t, "byTspan");
551
- function n(r, h, c, a, f, g, m, y) {
552
- const k = h.append("switch"), d = k.append("foreignObject").attr("x", c).attr("y", a).attr("width", f).attr("height", g).attr("position", "fixed").append("xhtml:div").style("display", "table").style("height", "100%").style("width", "100%");
553
- d.append("div").attr("class", "label").style("display", "table-cell").style("text-align", "center").style("vertical-align", "middle").text(r), t(r, k, c, a, f, g, m, y), i(d, m);
554
- }
555
- o(n, "byFo");
556
- function i(r, h) {
557
- for (const c in h)
558
- c in h && r.attr(c, h[c]);
559
- }
560
- return o(i, "_setTextAttrs"), function(r) {
561
- return r.textPlacement === "fo" ? n : r.textPlacement === "old" ? e : t;
562
- };
563
- })(), Jt = /* @__PURE__ */ o(function(e, t) {
564
- Nt = 0, et = -1, e.append("defs").append("marker").attr("id", t + "-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");
565
- }, "initGraphics");
566
- function it(e, t) {
567
- e.each(function() {
568
- var n = X(this), i = n.text().split(/(\s+|<br>)/).reverse(), r, h = [], c = 1.1, a = n.attr("y"), f = parseFloat(n.attr("dy")), g = n.text(null).append("tspan").attr("x", 0).attr("y", a).attr("dy", f + "em");
569
- for (let m = 0; m < i.length; m++)
570
- r = i[i.length - 1 - m], h.push(r), g.text(h.join(" ").trim()), (g.node().getComputedTextLength() > t || r === "<br>") && (h.pop(), g.text(h.join(" ").trim()), r === "<br>" ? h = [""] : h = [r], g = n.append("tspan").attr("x", 0).attr("y", a).attr("dy", c + "em").text(r));
571
- });
572
- }
573
- o(it, "wrap");
574
- var Qt = /* @__PURE__ */ o(function(e, t, n, i, r, h = !1) {
575
- const { theme: c, look: a } = i, f = c?.includes("redux"), g = i?.themeVariables?.THEME_COLOR_LIMIT ?? 12, m = n % g - 1, y = e.append("g");
576
- t.section = m, y.attr(
577
- "class",
578
- (t.class ? t.class + " " : "") + "timeline-node " + ("section-" + m)
579
- );
580
- const k = y.append("g"), s = y.append("g"), l = s.append("text").text(t.descr).attr("dy", "1em").attr("alignment-baseline", "middle").attr("dominant-baseline", "middle").attr("text-anchor", "middle").call(it, t.width).node().getBBox(), p = i.fontSize?.replace ? i.fontSize.replace("px", "") : i.fontSize;
581
- if (t.height = l.height + p * 1.1 * 0.5 + t.padding, t.height = Math.max(t.height, t.maxHeight), t.width = t.width + 2 * t.padding, s.attr("transform", "translate(" + t.width / 2 + ", " + t.padding / 2 + ")"), f && s.attr(
582
- "transform",
583
- `translate(${t.width / 2}, ${h ? t.padding / 2 + 3 : t.padding})`
584
- ), te(k, t, m, r, i), a === "neo" && (y.attr("data-look", "neo"), f)) {
585
- const x = c.includes("dark"), u = e.node()?.ownerSVGElement ?? e.node(), S = X(u), v = S.attr("id") ?? "", I = v ? `${v}-drop-shadow` : "drop-shadow";
586
- if (S.select(`#${I}`).empty()) {
587
- const R = S.select("defs");
588
- (R.empty() ? S.append("defs") : R).append("filter").attr("id", I).attr("height", "130%").attr("width", "130%").append("feDropShadow").attr("dx", "4").attr("dy", "4").attr("stdDeviation", 0).attr("flood-opacity", x ? "0.2" : "0.06").attr("flood-color", x ? "#FFFFFF" : "#000000");
589
- }
590
- }
591
- return t;
592
- }, "drawNode"), Yt = /* @__PURE__ */ o(function(e, t, n) {
593
- const i = e.append("g"), h = i.append("text").text(t.descr).attr("dy", "1em").attr("alignment-baseline", "middle").attr("dominant-baseline", "middle").attr("text-anchor", "middle").call(it, t.width).node().getBBox(), c = n.fontSize?.replace ? n.fontSize.replace("px", "") : n.fontSize;
594
- return i.remove(), h.height + c * 1.1 * 0.5 + t.padding;
595
- }, "getVirtualNodeHeight"), te = /* @__PURE__ */ o(function(e, t, n, i, r) {
596
- const { theme: h } = r, c = h?.includes("redux") ? 0 : 5, a = 5, f = c > 0 ? `M0 ${t.height - a} v${-t.height + 2 * a} q0,-${c},${c},-${c} h${t.width - 2 * a} q${c},0,${c},${c} v${t.height - a} H0 Z` : `M0 ${t.height - a} v${-(t.height - a)} h${t.width} v${t.height} H0 Z`;
597
- e.append("path").attr("id", i + "-node-" + Nt++).attr("class", "node-bkg node-" + t.type).attr("d", f), h?.includes("redux") || e.append("line").attr("class", "node-line-" + n).attr("x1", 0).attr("y1", t.height).attr("x2", t.width).attr("y2", t.height);
598
- }, "defaultBkg"), M = {
599
- drawRect: J,
600
- drawCircle: Kt,
601
- drawSection: Xt,
602
- drawText: It,
603
- drawLabel: Ut,
604
- drawTask: Zt,
605
- drawBackgroundRect: jt,
606
- getTextObj: qt,
607
- getNoteRect: st,
608
- initGraphics: Jt,
609
- drawNode: Qt,
610
- getVirtualNodeHeight: Yt
611
- }, ee = /* @__PURE__ */ o(function(e, t, n, i) {
612
- const r = gt(), { look: h, theme: c, themeVariables: a } = r, { useGradient: f, gradientStart: g, gradientStop: m } = a, y = r.timeline?.leftMargin ?? 50;
613
- E.debug("timeline", i.db);
614
- const k = r.securityLevel;
615
- let s;
616
- k === "sandbox" && (s = X("#i" + t));
617
- const l = (k === "sandbox" ? X(s.nodes()[0].contentDocument.body) : X("body")).select("#" + t);
618
- l.append("g");
619
- const p = i.db.getTasks(), x = i.db.getCommonDb().getDiagramTitle();
620
- E.debug("task", p), M.initGraphics(l, t);
621
- const u = i.db.getSections();
622
- E.debug("sections", u);
623
- let S = 0, v = 0, I = 0, R = 0, W = 50 + y, O = 50;
624
- R = 50;
625
- let L = 0, w = !0;
626
- u.forEach(function(N) {
627
- const b = {
628
- number: L,
629
- descr: N,
630
- section: L,
631
- width: 150,
632
- padding: 20,
633
- maxHeight: S
634
- }, _ = M.getVirtualNodeHeight(l, b, r);
635
- E.debug("sectionHeight before draw", _), S = Math.max(S, _ + 20);
636
- });
637
- let H = 0, V = 0;
638
- E.debug("tasks.length", p.length);
639
- for (const [N, b] of p.entries()) {
640
- const _ = {
641
- number: N,
642
- descr: b,
643
- section: b.section,
644
- width: 150,
645
- padding: 20,
646
- maxHeight: v
647
- }, $ = M.getVirtualNodeHeight(l, _, r);
648
- E.debug("taskHeight before draw", $), v = Math.max(v, $ + 20), H = Math.max(H, b.events.length);
649
- let T = 0;
650
- for (const P of b.events) {
651
- const C = {
652
- descr: P,
653
- section: b.section,
654
- number: b.section,
655
- width: 150,
656
- padding: 20,
657
- maxHeight: 50
658
- };
659
- T += M.getVirtualNodeHeight(l, C, r);
660
- }
661
- b.events.length > 0 && (T += (b.events.length - 1) * 10), V = Math.max(V, T);
662
- }
663
- E.debug("maxSectionHeight before draw", S), E.debug("maxTaskHeight before draw", v), u && u.length > 0 ? u.forEach((N) => {
664
- const b = p.filter((P) => P.section === N), _ = {
665
- number: L,
666
- descr: N,
667
- section: L,
668
- width: 200 * Math.max(b.length, 1) - 50,
669
- padding: 20,
670
- maxHeight: S
671
- };
672
- E.debug("sectionNode", _);
673
- const $ = l.append("g"), T = M.drawNode($, _, L, r, t);
674
- E.debug("sectionNode output", T), $.attr("transform", `translate(${W}, ${R})`), O += S + 50, b.length > 0 && lt(
675
- l,
676
- b,
677
- L,
678
- W,
679
- O,
680
- v,
681
- r,
682
- H,
683
- V,
684
- S,
685
- !1,
686
- t
687
- ), W += 200 * Math.max(b.length, 1), O = R, L++;
688
- }) : (w = !1, lt(
689
- l,
690
- p,
691
- L,
692
- W,
693
- O,
694
- v,
695
- r,
696
- H,
697
- V,
698
- S,
699
- !0,
700
- t
701
- ));
702
- const F = l.node().getBBox();
703
- if (E.debug("bounds", F), x && l.append("text").text(x).attr("x", h === "neo" ? F.x * 2 + y : F.width / 2 - y).attr("font-size", "4ex").attr("font-weight", "bold").attr("y", 20), I = w ? S + v + 150 : v + 100, l.append("g").attr("class", "lineWrapper").append("line").attr("x1", y).attr("y1", I).attr("x2", F.width + 3 * y).attr("y2", I).attr("stroke-width", 4).attr("stroke", "black").attr("marker-end", `url(#${t}-arrowhead)`), h === "neo" && f && c !== "neutral") {
704
- const N = l.select("defs"), _ = (N.empty() ? l.append("defs") : N).append("linearGradient").attr("id", l.attr("id") + "-gradient").attr("gradientUnits", "objectBoundingBox").attr("x1", "0%").attr("y1", "0%").attr("x2", "100%").attr("y2", "0%");
705
- _.append("stop").attr("offset", "0%").attr("stop-color", g).attr("stop-opacity", 1), _.append("stop").attr("offset", "100%").attr("stop-color", m).attr("stop-opacity", 1);
706
- }
707
- ft(
708
- void 0,
709
- l,
710
- r.timeline?.padding ?? 50,
711
- r.timeline?.useMaxWidth ?? !1
712
- );
713
- }, "draw"), lt = /* @__PURE__ */ o(function(e, t, n, i, r, h, c, a, f, g, m, y) {
714
- for (const k of t) {
715
- const s = {
716
- descr: k.task,
717
- section: n,
718
- number: n,
719
- width: 150,
720
- padding: 20,
721
- maxHeight: h
722
- };
723
- E.debug("taskNode", s);
724
- const d = e.append("g").attr("class", "taskWrapper"), p = M.drawNode(d, s, n, c, y).height;
725
- if (E.debug("taskHeight after draw", p), d.attr("transform", `translate(${i}, ${r})`), h = Math.max(h, p), k.events) {
726
- const x = e.append("g").attr("class", "lineWrapper");
727
- let u = h;
728
- r += 100, u = u + ne(e, k.events, n, i, r, c, y), r -= 100, x.append("line").attr("x1", i + 190 / 2).attr("y1", r + h).attr("x2", i + 190 / 2).attr("y2", r + h + 100 + f + 100).attr("stroke-width", 2).attr("stroke", "black").attr("marker-end", `url(#${y}-arrowhead)`).attr("stroke-dasharray", "5,5");
729
- }
730
- i = i + 200, m && !c.timeline?.disableMulticolor && n++;
731
- }
732
- r = r - 10;
733
- }, "drawTasks"), ne = /* @__PURE__ */ o(function(e, t, n, i, r, h, c) {
734
- let a = 0;
735
- const f = r;
736
- r = r + 100;
737
- for (const g of t) {
738
- const m = {
739
- descr: g,
740
- section: n,
741
- number: n,
742
- width: 150,
743
- padding: 20,
744
- maxHeight: 50
745
- };
746
- E.debug("eventNode", m);
747
- const y = e.append("g").attr("class", "eventWrapper"), s = M.drawNode(y, m, n, h, c, !0).height;
748
- a = a + s, y.attr("transform", `translate(${i}, ${r})`), r = r + 10 + s;
749
- }
750
- return r = f, a;
751
- }, "drawEvents"), re = {
752
- setConf: /* @__PURE__ */ o(() => {
753
- }, "setConf"),
754
- draw: ee
755
- }, Q = 200, z = 5, se = Q + z * 2, at = Q + 100, ie = at + z * 2, Lt = 10, ae = 0, ht = 20, Mt = 20, dt = 30, At = 50, oe = /* @__PURE__ */ o(function(e, t, n, i) {
756
- const r = gt(), h = r.timeline?.leftMargin ?? 50;
757
- E.debug("timeline", i.db);
758
- const c = Pt(t);
759
- c.append("g");
760
- const a = i.db.getTasks(), f = i.db.getCommonDb().getDiagramTitle();
761
- E.debug("task", a), M.initGraphics(c);
762
- const g = i.db.getSections();
763
- E.debug("sections", g);
764
- let m = 0, y = 0;
765
- const k = 50 + h;
766
- let s = 50;
767
- const d = s, l = k, p = se + Mt, x = ie + At, u = l + p;
768
- let S = 0;
769
- const v = g && g.length > 0, I = v ? u : k + p, R = Math.max(50, p + x - z * 2);
770
- g.forEach(function(N) {
771
- const b = {
772
- number: S,
773
- descr: N,
774
- section: S,
775
- width: R,
776
- padding: z,
777
- maxHeight: m
778
- }, _ = M.getVirtualNodeHeight(c, b, r);
779
- E.debug("sectionHeight before draw", _), m = Math.max(m, _);
780
- });
781
- let W = 0;
782
- E.debug("tasks.length", a.length);
783
- for (const [N, b] of a.entries()) {
784
- const _ = {
785
- number: N,
786
- descr: b,
787
- section: b.section,
788
- width: Q,
789
- padding: z,
790
- maxHeight: y
791
- }, $ = M.getVirtualNodeHeight(c, _, r);
792
- E.debug("taskHeight before draw", $), y = Math.max(y, $);
793
- let T = 0;
794
- for (const P of b.events) {
795
- const C = {
796
- descr: P,
797
- section: b.section,
798
- number: b.section,
799
- width: at,
800
- padding: z,
801
- maxHeight: 50
802
- };
803
- T += M.getVirtualNodeHeight(c, C, r);
804
- }
805
- b.events.length > 0 && (T += (b.events.length - 1) * Lt), W = Math.max(W, T) + ae;
806
- }
807
- E.debug("maxSectionHeight before draw", m), E.debug("maxTaskHeight before draw", y);
808
- const L = Math.max(y, W) + dt;
809
- v ? g.forEach((N) => {
810
- const b = a.filter((Z) => Z.section === N), _ = {
811
- number: S,
812
- descr: N,
813
- section: S,
814
- width: R,
815
- padding: z,
816
- maxHeight: m
817
- };
818
- E.debug("sectionNode", _);
819
- const $ = c.append("g"), T = M.drawNode($, _, S, r);
820
- E.debug("sectionNode output", T);
821
- const P = I - p;
822
- $.attr("transform", `translate(${P}, ${s})`);
823
- const C = s + T.height + ht;
824
- b.length > 0 && ut(
825
- c,
826
- b,
827
- S,
828
- I,
829
- C,
830
- y,
831
- r,
832
- L,
833
- !1
834
- );
835
- const G = b.length, B = T.height + ht + L * Math.max(G, 1) - (G > 0 ? dt * 2 : 0);
836
- s += B, S++;
837
- }) : ut(
838
- c,
839
- a,
840
- S,
841
- I,
842
- s,
843
- y,
844
- r,
845
- L,
846
- !0
847
- );
848
- let w = c.node()?.getBBox();
849
- if (!w)
850
- throw new Error("bbox not found");
851
- if (E.debug("bounds", w), f) {
852
- if (c.append("text").text(f).attr("x", w.width / 2 - h).attr("font-size", "4ex").attr("font-weight", "bold").attr("y", 20), w = c.node()?.getBBox(), !w)
853
- throw new Error("bbox not found");
854
- E.debug("bounds after title", w);
855
- }
856
- const [H] = Bt(r.fontSize), V = (H ?? 16) * 2, F = (H ?? 16) * 0.5 + 20, U = c.append("g").attr("class", "lineWrapper");
857
- U.append("line").attr("x1", I).attr("y1", d - V).attr("x2", I).attr("y2", w.y + w.height + F).attr("stroke-width", 4).attr("stroke", "black").attr("marker-end", "url(#arrowhead)"), U.lower(), ft(
858
- void 0,
859
- c,
860
- r.timeline?.padding ?? 50,
861
- r.timeline?.useMaxWidth ?? !1
862
- );
863
- }, "draw"), ut = /* @__PURE__ */ o(function(e, t, n, i, r, h, c, a, f) {
864
- for (const g of t) {
865
- const m = {
866
- descr: g.task,
867
- section: n,
868
- number: n,
869
- width: Q,
870
- padding: z,
871
- maxHeight: h
872
- };
873
- E.debug("taskNode", m);
874
- const y = e.append("g").attr("class", "taskWrapper"), k = M.drawNode(y, m, n, c), s = k.height;
875
- E.debug("taskHeight after draw", s);
876
- const d = i - Mt - k.width;
877
- if (y.attr("transform", `translate(${d}, ${r})`), h = Math.max(h, s), g.events && g.events.length > 0) {
878
- const l = r, p = i + At;
879
- ce(e, g.events, n, i, p, l, c);
880
- }
881
- r = r + a, f && !c.timeline?.disableMulticolor && n++;
882
- }
883
- }, "drawTasks"), ce = /* @__PURE__ */ o(function(e, t, n, i, r, h, c) {
884
- let a = h;
885
- for (const f of t) {
886
- const g = {
887
- descr: f,
888
- section: n,
889
- number: n,
890
- width: at,
891
- padding: z,
892
- maxHeight: 0
893
- };
894
- E.debug("eventNode", g);
895
- const m = e.append("g").attr("class", "eventWrapper"), k = M.drawNode(m, g, n, c).height;
896
- m.attr("transform", `translate(${r}, ${a})`);
897
- const s = e.append("g").attr("class", "lineWrapper"), d = a + k / 2;
898
- s.append("line").attr("x1", i).attr("y1", d).attr("x2", r).attr("y2", d).attr("stroke-width", 2).attr("stroke", "black").attr("marker-end", "url(#arrowhead)").attr("stroke-dasharray", "5,5"), a = a + k + Lt;
899
- }
900
- return a - h;
901
- }, "drawEvents"), le = {
902
- setConf: /* @__PURE__ */ o(() => {
903
- }, "setConf"),
904
- draw: oe
905
- }, he = /* @__PURE__ */ o((e) => {
906
- const { theme: t } = pt(), n = t?.includes("dark"), i = t?.includes("color"), r = e.svgId?.replace(/^#/, "") ?? "", h = r ? `url(#${r}-drop-shadow)` : e.dropShadow ?? "none";
907
- let c = "";
908
- for (let a = 0; a < e.THEME_COLOR_LIMIT; a++) {
909
- const f = `${17 - 3 * a}`, g = i ? e.borderColorArray[a] : e.mainBkg, m = i ? e.borderColorArray[a] : e.nodeBorder;
910
- c += `
911
- .section-${a - 1} rect,
912
- .section-${a - 1} path,
913
- .section-${a - 1} circle {
914
- fill: ${n && i ? e.mainBkg : g};
915
- stroke: ${m};
916
- stroke-width: ${e.strokeWidth};
917
- filter: ${h};
918
- }
919
-
920
- .section-${a - 1} text {
921
- fill: ${e.nodeBorder};
922
- font-weight: ${e.fontWeight}
923
- }
924
-
925
- .node-icon-${a - 1} {
926
- font-size: 40px;
927
- color: ${e["cScaleLabel" + a]};
928
- }
929
-
930
- .section-edge-${a - 1} {
931
- stroke: ${e["cScale" + a]};
932
- }
933
-
934
- .edge-depth-${a - 1} {
935
- stroke-width: ${f};
936
- }
937
-
938
- .section-${a - 1} line {
939
- stroke: ${e["cScaleInv" + a]};
940
- stroke-width: 3;
941
- }
942
-
943
- .lineWrapper line {
944
- stroke: ${e.nodeBorder};
945
- stroke-width:${e.strokeWidth}
946
- }
947
-
948
- .disabled,
949
- .disabled circle,
950
- .disabled text {
951
- fill: ${e.tertiaryColor ?? "lightgray"};
952
- }
953
-
954
- .disabled text {
955
- fill: ${e.clusterBorder ?? "#efefef"};
956
- }
957
- `;
958
- }
959
- return c;
960
- }, "genReduxSections"), de = /* @__PURE__ */ o((e) => {
961
- let t = "";
962
- for (let n = 0; n < e.THEME_COLOR_LIMIT; n++)
963
- e["lineColor" + n] = e["lineColor" + n] || e["cScaleInv" + n], Rt(e["lineColor" + n]) ? e["lineColor" + n] = Ct(e["lineColor" + n], 20) : e["lineColor" + n] = Wt(e["lineColor" + n], 20);
964
- for (let n = 0; n < e.THEME_COLOR_LIMIT; n++) {
965
- const i = "" + (17 - 3 * n);
966
- t += `
967
- .section-${n - 1} rect, .section-${n - 1} path, .section-${n - 1} circle, .section-${n - 1} path {
968
- fill: ${e["cScale" + n]};
969
- }
970
- .section-${n - 1} text {
971
- fill: ${e["cScaleLabel" + n]};
972
- }
973
- .node-icon-${n - 1} {
974
- font-size: 40px;
975
- color: ${e["cScaleLabel" + n]};
976
- }
977
- .section-edge-${n - 1}{
978
- stroke: ${e["cScale" + n]};
979
- }
980
- .edge-depth-${n - 1}{
981
- stroke-width: ${i};
982
- }
983
- .section-${n - 1} line {
984
- stroke: ${e["cScaleInv" + n]} ;
985
- stroke-width: 3;
986
- }
987
-
988
- .lineWrapper line{
989
- stroke: ${e["cScaleLabel" + n]} ;
990
- }
991
-
992
- .disabled, .disabled circle, .disabled text {
993
- fill: ${e.tertiaryColor ?? "lightgray"};
994
- }
995
- .disabled text {
996
- fill: ${e.clusterBorder ?? "#efefef"};
997
- }
998
- `;
999
- }
1000
- return t;
1001
- }, "genSections"), ue = /* @__PURE__ */ o((e) => {
1002
- const { theme: t } = pt(), n = t?.includes("redux"), i = t === "neutral", r = e.svgId?.replace(/^#/, "") ?? "";
1003
- let h = "";
1004
- if (e.useGradient && r && e.THEME_COLOR_LIMIT && !i)
1005
- for (let c = 0; c < e.THEME_COLOR_LIMIT; c++)
1006
- h += `
1007
- .section-${c - 1}[data-look="neo"] rect,
1008
- .section-${c - 1}[data-look="neo"] path,
1009
- .section-${c - 1}[data-look="neo"] circle {
1010
- fill: ${e.mainBkg};
1011
- stroke: url(#${r}-gradient);
1012
- stroke-width: 2;
1013
- }
1014
- .section-${c - 1}[data-look="neo"] line {
1015
- stroke: url(#${r}-gradient);
1016
- stroke-width: 2;
1017
- }`;
1018
- return `
1019
- .edge {
1020
- stroke-width: 3;
1021
- }
1022
- ${n ? he(e) : de(e)}
1023
- ${h}
1024
- .section-root rect, .section-root path, .section-root circle {
1025
- fill: ${e.git0};
1026
- }
1027
- .section-root text {
1028
- fill: ${e.gitBranchLabel0};
1029
- }
1030
- .icon-container {
1031
- height:100%;
1032
- display: flex;
1033
- justify-content: center;
1034
- align-items: center;
1035
- }
1036
- .edge {
1037
- fill: none;
1038
- }
1039
- .eventWrapper {
1040
- filter: brightness(120%);
1041
- }
1042
- `;
1043
- }, "getStyles"), pe = ue, ge = {
1044
- setConf: /* @__PURE__ */ o(() => {
1045
- }, "setConf"),
1046
- draw: /* @__PURE__ */ o((e, t, n, i) => (i?.db?.getDirection?.() ?? "LR") === "TD" ? le.draw(e, t, n, i) : re.draw(e, t, n, i), "draw")
1047
- }, me = {
1048
- db: yt,
1049
- renderer: ge,
1050
- parser: Ot,
1051
- styles: pe
1052
- };
1053
- export {
1054
- me as diagram
1055
- };