@wandox/sdk 0.1.0

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 (114) hide show
  1. package/README.md +59 -0
  2. package/dist/arc-BJMRTG9S.cjs +1 -0
  3. package/dist/arc-Vdco0qfw.js +83 -0
  4. package/dist/architectureDiagram-3BPJPVTR-BjEqcvey.js +4695 -0
  5. package/dist/architectureDiagram-3BPJPVTR-BvjJfAkh.cjs +36 -0
  6. package/dist/blockDiagram-GPEHLZMM-B1xf7RE9.js +2427 -0
  7. package/dist/blockDiagram-GPEHLZMM-B5VqovGY.cjs +132 -0
  8. package/dist/c4Diagram-AAUBKEIU-C4kjMRea.js +1578 -0
  9. package/dist/c4Diagram-AAUBKEIU-Ck5uEnJI.cjs +10 -0
  10. package/dist/channel-DlRtLuYv.js +5 -0
  11. package/dist/channel-Dm_yrRYJ.cjs +1 -0
  12. package/dist/chunk-2J33WTMH-CG2n_n4y.cjs +1 -0
  13. package/dist/chunk-2J33WTMH-CWvmGb4H.js +20 -0
  14. package/dist/chunk-4BX2VUAB-Bq3GzsD8.js +9 -0
  15. package/dist/chunk-4BX2VUAB-CdMctZeT.cjs +1 -0
  16. package/dist/chunk-55IACEB6-BdJhzL0d.js +8 -0
  17. package/dist/chunk-55IACEB6-sHyHtvg8.cjs +1 -0
  18. package/dist/chunk-727SXJPM-D-Vmam30.cjs +206 -0
  19. package/dist/chunk-727SXJPM-DmruCqjM.js +1529 -0
  20. package/dist/chunk-AQP2D5EJ-CWhKjcV3.cjs +231 -0
  21. package/dist/chunk-AQP2D5EJ-Ca0ak6w7.js +1399 -0
  22. package/dist/chunk-FMBD7UC4-CqV0NWQQ.js +19 -0
  23. package/dist/chunk-FMBD7UC4-DOxtd0OO.cjs +15 -0
  24. package/dist/chunk-ND2GUHAM-6EMX5Mu8.js +68 -0
  25. package/dist/chunk-ND2GUHAM-BXeDBtSC.cjs +1 -0
  26. package/dist/chunk-QZHKN3VN-B7FSI55w.js +15 -0
  27. package/dist/chunk-QZHKN3VN-CbbdNKnD.cjs +1 -0
  28. package/dist/classDiagram-4FO5ZUOK-0Kaf7WfA.js +16 -0
  29. package/dist/classDiagram-4FO5ZUOK-C4it2xBI.cjs +1 -0
  30. package/dist/classDiagram-v2-Q7XG4LA2-Byom5adL.js +16 -0
  31. package/dist/classDiagram-v2-Q7XG4LA2-C4it2xBI.cjs +1 -0
  32. package/dist/cose-bilkent-S5V4N54A-CuUv9oIm.js +2606 -0
  33. package/dist/cose-bilkent-S5V4N54A-Dh6nTopA.cjs +1 -0
  34. package/dist/cytoscape.esm-Cp8cXbK2.js +18729 -0
  35. package/dist/cytoscape.esm-fcqEUasK.cjs +331 -0
  36. package/dist/dagre-BM42HDAG-CwxJjZ2n.cjs +4 -0
  37. package/dist/dagre-BM42HDAG-DMBidMxP.js +448 -0
  38. package/dist/defaultLocale-BDVPUiG2.js +171 -0
  39. package/dist/defaultLocale-k2G_58r6.cjs +1 -0
  40. package/dist/diagram-2AECGRRQ-B2a4nXgJ.js +221 -0
  41. package/dist/diagram-2AECGRRQ-r7De7taS.cjs +43 -0
  42. package/dist/diagram-5GNKFQAL-CDiO79WC.cjs +10 -0
  43. package/dist/diagram-5GNKFQAL-DrHBNZzF.js +123 -0
  44. package/dist/diagram-KO2AKTUF-BcjWCXZr.js +466 -0
  45. package/dist/diagram-KO2AKTUF-CDlJCxVO.cjs +3 -0
  46. package/dist/diagram-LMA3HP47-BXFSAyNV.cjs +24 -0
  47. package/dist/diagram-LMA3HP47-DJxmyqn0.js +143 -0
  48. package/dist/diagram-OG6HWLK6-ATK__ca8.js +531 -0
  49. package/dist/diagram-OG6HWLK6-CgIyEO8_.cjs +24 -0
  50. package/dist/erDiagram-TEJ5UH35-D4baWNzQ.js +900 -0
  51. package/dist/erDiagram-TEJ5UH35-Dyuc5EB6.cjs +85 -0
  52. package/dist/flowDiagram-I6XJVG4X-BMZOncyU.js +1635 -0
  53. package/dist/flowDiagram-I6XJVG4X-C45fICr4.cjs +162 -0
  54. package/dist/ganttDiagram-6RSMTGT7-CiYZmmke.js +2526 -0
  55. package/dist/ganttDiagram-6RSMTGT7-Cxoj6IK8.cjs +292 -0
  56. package/dist/gitGraphDiagram-PVQCEYII-CQ9bNuwN.js +828 -0
  57. package/dist/gitGraphDiagram-PVQCEYII-rlaY9dfj.cjs +106 -0
  58. package/dist/graph-CBizzZ7K.js +1545 -0
  59. package/dist/graph-V5BNIbHU.cjs +1 -0
  60. package/dist/index-jBRold1l.js +173159 -0
  61. package/dist/index-sFrjovbM.cjs +804 -0
  62. package/dist/index.d.ts +54 -0
  63. package/dist/infoDiagram-5YYISTIA-CAzYIvUX.js +24 -0
  64. package/dist/infoDiagram-5YYISTIA-zX5rQglQ.cjs +2 -0
  65. package/dist/init-CHZsXQcr.cjs +1 -0
  66. package/dist/init-DjUOC4st.js +16 -0
  67. package/dist/ishikawaDiagram-YF4QCWOH-09prKBsn.cjs +70 -0
  68. package/dist/ishikawaDiagram-YF4QCWOH-Co8BnN24.js +622 -0
  69. package/dist/journeyDiagram-JHISSGLW-DkdWRF_-.cjs +139 -0
  70. package/dist/journeyDiagram-JHISSGLW-riCLiMCC.js +836 -0
  71. package/dist/kanban-definition-UN3LZRKU-DWipOCsx.cjs +89 -0
  72. package/dist/kanban-definition-UN3LZRKU-SRyCSn2H.js +725 -0
  73. package/dist/katex-Cf_UVKIT.cjs +257 -0
  74. package/dist/katex-RNjvZ8pg.js +11681 -0
  75. package/dist/layout-CbksXFOD.js +1728 -0
  76. package/dist/layout-Dh52gsIJ.cjs +1 -0
  77. package/dist/linear-C3xSMJV8.cjs +1 -0
  78. package/dist/linear-CmUCzX9U.js +259 -0
  79. package/dist/mermaid.core-BzNKr-OJ.cjs +308 -0
  80. package/dist/mermaid.core-CdBIz6FY.js +15475 -0
  81. package/dist/mindmap-definition-RKZ34NQL-Cs63oyIX.cjs +96 -0
  82. package/dist/mindmap-definition-RKZ34NQL-Gcma5iTd.js +830 -0
  83. package/dist/ordinal-CagbB1m8.cjs +1 -0
  84. package/dist/ordinal-DfAQgscy.js +61 -0
  85. package/dist/pieDiagram-4H26LBE5-CBGkD8dp.cjs +30 -0
  86. package/dist/pieDiagram-4H26LBE5-DSL8cVK1.js +164 -0
  87. package/dist/quadrantDiagram-W4KKPZXB-D3nCWRjF.cjs +7 -0
  88. package/dist/quadrantDiagram-W4KKPZXB-uod6bhUy.js +1026 -0
  89. package/dist/requirementDiagram-4Y6WPE33-Bc_6y7SM.js +884 -0
  90. package/dist/requirementDiagram-4Y6WPE33-D2mHlh5i.cjs +84 -0
  91. package/dist/sankeyDiagram-5OEKKPKP-DL_kXejW.cjs +40 -0
  92. package/dist/sankeyDiagram-5OEKKPKP-DMsjY4G4.js +847 -0
  93. package/dist/sequenceDiagram-3UESZ5HK-CBGalGOV.cjs +162 -0
  94. package/dist/sequenceDiagram-3UESZ5HK-CH2Z-Pis.js +2901 -0
  95. package/dist/stateDiagram-AJRCARHV-gEqlAI6t.js +263 -0
  96. package/dist/stateDiagram-AJRCARHV-rNMrAI-A.cjs +1 -0
  97. package/dist/stateDiagram-v2-BHNVJYJU-CDj7L1wi.js +16 -0
  98. package/dist/stateDiagram-v2-BHNVJYJU-LLlFJ1GM.cjs +1 -0
  99. package/dist/timeline-definition-PNZ67QCA-Bbuv3uu-.cjs +120 -0
  100. package/dist/timeline-definition-PNZ67QCA-DrGFbQdC.js +1068 -0
  101. package/dist/types.d.ts +295 -0
  102. package/dist/vennDiagram-CIIHVFJN-CGcAwVxU.js +1564 -0
  103. package/dist/vennDiagram-CIIHVFJN-DsSjXluJ.cjs +34 -0
  104. package/dist/wandox.cjs +1 -0
  105. package/dist/wandox.css +1 -0
  106. package/dist/wandox.js +6 -0
  107. package/dist/wandox.umd.js +4172 -0
  108. package/dist/wardley-L42UT6IY-DUnkyH_z.js +22539 -0
  109. package/dist/wardley-L42UT6IY-tDp0NbFW.cjs +165 -0
  110. package/dist/wardleyDiagram-YWT4CUSO-CB_Qa4lR.js +684 -0
  111. package/dist/wardleyDiagram-YWT4CUSO-D0BUmvVW.cjs +78 -0
  112. package/dist/xychartDiagram-2RQKCTM6-Bcq-ACuw.js +1342 -0
  113. package/dist/xychartDiagram-2RQKCTM6-BjeAPKLo.cjs +7 -0
  114. package/package.json +42 -0
@@ -0,0 +1,1068 @@
1
+ import { b as l, a1 as pt, as as Wt, ax as Pt, L as Bt, a2 as gt, aB as S, a_ as Vt, aK as Ft, b5 as ft, aZ as J, _ as zt, y as Gt, t as Ot } from "./mermaid.core-CdBIz6FY.js";
2
+ import { d as ot } from "./arc-Vdco0qfw.js";
3
+ var tt = function() {
4
+ var e = /* @__PURE__ */ l(function(k, s, d, h) {
5
+ for (d = d || {}, h = k.length; h--; d[k[h]] = 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], c = [1, 15], a = [1, 16], o = [1, 19], p = [1, 20], y = {
8
+ trace: /* @__PURE__ */ l(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__ */ l(function(s, d, h, g, m, u, w) {
15
+ var v = u.length - 1;
16
+ switch (m) {
17
+ case 1:
18
+ return u[v - 1];
19
+ case 3:
20
+ g.setDirection("LR");
21
+ break;
22
+ case 4:
23
+ g.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
+ g.getCommonDb().setDiagramTitle(u[v].substr(6)), this.$ = u[v].substr(6);
41
+ break;
42
+ case 12:
43
+ this.$ = u[v].trim(), g.getCommonDb().setAccTitle(this.$);
44
+ break;
45
+ case 13:
46
+ case 14:
47
+ this.$ = u[v].trim(), g.getCommonDb().setAccDescription(this.$);
48
+ break;
49
+ case 15:
50
+ g.addSection(u[v].substr(8)), this.$ = u[v].substr(8);
51
+ break;
52
+ case 18:
53
+ g.addTask(u[v], 0, ""), this.$ = u[v];
54
+ break;
55
+ case 19:
56
+ g.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: c, 20: a, 21: 17, 22: 18, 23: o, 24: p }, e(t, [2, 10], { 1: [2, 1] }), e(t, [2, 6]), { 12: 21, 14: n, 15: i, 17: r, 19: c, 20: a, 21: 17, 22: 18, 23: o, 24: p }, 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__ */ l(function(s, d) {
63
+ if (d.recoverable)
64
+ this.trace(s);
65
+ else {
66
+ var h = new Error(s);
67
+ throw h.hash = d, h;
68
+ }
69
+ }, "parseError"),
70
+ parse: /* @__PURE__ */ l(function(s) {
71
+ var d = this, h = [0], g = [], m = [null], u = [], w = this.table, v = "", M = 0, C = 0, P = 2, V = 1, L = u.slice.call(arguments, 1), _ = Object.create(this.lexer), R = { yy: {} };
72
+ for (var F in this.yy)
73
+ Object.prototype.hasOwnProperty.call(this.yy, F) && (R.yy[F] = this.yy[F]);
74
+ _.setInput(s, R.yy), R.yy.lexer = _, R.yy.parser = this, typeof _.yylloc > "u" && (_.yylloc = {});
75
+ var z = _.yylloc;
76
+ u.push(z);
77
+ var q = _.options && _.options.ranges;
78
+ typeof R.yy.parseError == "function" ? this.parseError = R.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
79
+ function K(A) {
80
+ h.length = h.length - 2 * A, m.length = m.length - A, u.length = u.length - A;
81
+ }
82
+ l(K, "popStack");
83
+ function O() {
84
+ var A;
85
+ return A = g.pop() || _.lex() || V, typeof A != "number" && (A instanceof Array && (g = A, A = g.pop()), A = d.symbols_[A] || A), A;
86
+ }
87
+ l(O, "lex");
88
+ for (var $, N, b, T, E = {}, H, I, B, D; ; ) {
89
+ if (N = h[h.length - 1], this.defaultActions[N] ? b = this.defaultActions[N] : (($ === null || typeof $ > "u") && ($ = O()), b = w[N] && w[N][$]), typeof b > "u" || !b.length || !b[0]) {
90
+ var Z = "";
91
+ D = [];
92
+ for (H in w[N])
93
+ this.terminals_[H] && H > P && D.push("'" + this.terminals_[H] + "'");
94
+ _.showPosition ? Z = "Parse error on line " + (M + 1) + `:
95
+ ` + _.showPosition() + `
96
+ Expecting ` + D.join(", ") + ", got '" + (this.terminals_[$] || $) + "'" : Z = "Parse error on line " + (M + 1) + ": Unexpected " + ($ == V ? "end of input" : "'" + (this.terminals_[$] || $) + "'"), this.parseError(Z, {
97
+ text: _.match,
98
+ token: this.terminals_[$] || $,
99
+ line: _.yylineno,
100
+ loc: z,
101
+ expected: D
102
+ });
103
+ }
104
+ if (b[0] instanceof Array && b.length > 1)
105
+ throw new Error("Parse Error: multiple actions possible at state: " + N + ", token: " + $);
106
+ switch (b[0]) {
107
+ case 1:
108
+ h.push($), m.push(_.yytext), u.push(_.yylloc), h.push(b[1]), $ = null, C = _.yyleng, v = _.yytext, M = _.yylineno, z = _.yylloc;
109
+ break;
110
+ case 2:
111
+ if (I = this.productions_[b[1]][1], E.$ = m[m.length - I], E._$ = {
112
+ first_line: u[u.length - (I || 1)].first_line,
113
+ last_line: u[u.length - 1].last_line,
114
+ first_column: u[u.length - (I || 1)].first_column,
115
+ last_column: u[u.length - 1].last_column
116
+ }, q && (E._$.range = [
117
+ u[u.length - (I || 1)].range[0],
118
+ u[u.length - 1].range[1]
119
+ ]), T = this.performAction.apply(E, [
120
+ v,
121
+ C,
122
+ M,
123
+ R.yy,
124
+ b[1],
125
+ m,
126
+ u
127
+ ].concat(L)), typeof T < "u")
128
+ return T;
129
+ I && (h = h.slice(0, -1 * I * 2), m = m.slice(0, -1 * I), u = u.slice(0, -1 * I)), h.push(this.productions_[b[1]][0]), m.push(E.$), u.push(E._$), B = w[h[h.length - 2]][h[h.length - 1]], h.push(B);
130
+ break;
131
+ case 3:
132
+ return !0;
133
+ }
134
+ }
135
+ return !0;
136
+ }, "parse")
137
+ }, x = /* @__PURE__ */ function() {
138
+ var k = {
139
+ EOF: 1,
140
+ parseError: /* @__PURE__ */ l(function(d, h) {
141
+ if (this.yy.parser)
142
+ this.yy.parser.parseError(d, h);
143
+ else
144
+ throw new Error(d);
145
+ }, "parseError"),
146
+ // resets the lexer, sets new input
147
+ setInput: /* @__PURE__ */ l(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__ */ l(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__ */ l(function(s) {
164
+ var d = s.length, h = 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 g = 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), h.length - 1 && (this.yylineno -= h.length - 1);
168
+ var m = 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: h ? (h.length === g.length ? this.yylloc.first_column : 0) + g[g.length - h.length].length - h[0].length : this.yylloc.first_column - d
174
+ }, this.options.ranges && (this.yylloc.range = [m[0], m[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__ */ l(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__ */ l(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__ */ l(function(s) {
195
+ this.unput(this.match.slice(s));
196
+ }, "less"),
197
+ // displays already matched input, i.e. for error messages
198
+ pastInput: /* @__PURE__ */ l(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__ */ l(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__ */ l(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__ */ l(function(s, d) {
215
+ var h, g, m;
216
+ if (this.options.backtrack_lexer && (m = {
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 && (m.yylloc.range = this.yylloc.range.slice(0))), g = s[0].match(/(?:\r\n?|\n).*/g), g && (this.yylineno += g.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: g ? g[g.length - 1].length - g[g.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], h = this.performAction.call(this, this.yy, this, d, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), h)
241
+ return h;
242
+ if (this._backtrack) {
243
+ for (var u in m)
244
+ this[u] = m[u];
245
+ return !1;
246
+ }
247
+ return !1;
248
+ }, "test_match"),
249
+ // return next match in input
250
+ next: /* @__PURE__ */ l(function() {
251
+ if (this.done)
252
+ return this.EOF;
253
+ this._input || (this.done = !0);
254
+ var s, d, h, g;
255
+ this._more || (this.yytext = "", this.match = "");
256
+ for (var m = this._currentRules(), u = 0; u < m.length; u++)
257
+ if (h = this._input.match(this.rules[m[u]]), h && (!d || h[0].length > d[0].length)) {
258
+ if (d = h, g = u, this.options.backtrack_lexer) {
259
+ if (s = this.test_match(h, m[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, m[g]), 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__ */ l(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__ */ l(function(d) {
283
+ this.conditionStack.push(d);
284
+ }, "begin"),
285
+ // pop the previously active lexer condition state off the condition stack
286
+ popState: /* @__PURE__ */ l(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__ */ l(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__ */ l(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__ */ l(function(d) {
300
+ this.begin(d);
301
+ }, "pushState"),
302
+ // return the number of states currently on the stack
303
+ stateStackSize: /* @__PURE__ */ l(function() {
304
+ return this.conditionStack.length;
305
+ }, "stateStackSize"),
306
+ options: { "case-insensitive": !0 },
307
+ performAction: /* @__PURE__ */ l(function(d, h, g, m) {
308
+ switch (g) {
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
+ y.lexer = x;
361
+ function f() {
362
+ this.yy = {};
363
+ }
364
+ return l(f, "Parser"), f.prototype = y, y.Parser = f, new f();
365
+ }();
366
+ tt.parser = tt;
367
+ var Dt = tt, yt = {};
368
+ zt(yt, {
369
+ addEvent: () => Tt,
370
+ addSection: () => _t,
371
+ addTask: () => Et,
372
+ addTaskOrg: () => $t,
373
+ clear: () => kt,
374
+ default: () => Kt,
375
+ getCommonDb: () => xt,
376
+ getDirection: () => bt,
377
+ getSections: () => wt,
378
+ getTasks: () => St,
379
+ setDirection: () => vt
380
+ });
381
+ var U = "", mt = 0, nt = "LR", rt = [], Q = [], X = [], xt = /* @__PURE__ */ l(() => Gt, "getCommonDb"), kt = /* @__PURE__ */ l(function() {
382
+ rt.length = 0, Q.length = 0, U = "", X.length = 0, nt = "LR", Ot();
383
+ }, "clear"), vt = /* @__PURE__ */ l(function(e) {
384
+ nt = e;
385
+ }, "setDirection"), bt = /* @__PURE__ */ l(function() {
386
+ return nt;
387
+ }, "getDirection"), _t = /* @__PURE__ */ l(function(e) {
388
+ U = e, rt.push(e);
389
+ }, "addSection"), wt = /* @__PURE__ */ l(function() {
390
+ return rt;
391
+ }, "getSections"), St = /* @__PURE__ */ l(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(...X), Q;
398
+ }, "getTasks"), Et = /* @__PURE__ */ l(function(e, t, n) {
399
+ const i = {
400
+ id: mt++,
401
+ section: U,
402
+ type: U,
403
+ task: e,
404
+ score: t || 0,
405
+ //if event is defined, then add it the events array
406
+ events: n ? [n] : []
407
+ };
408
+ X.push(i);
409
+ }, "addTask"), Tt = /* @__PURE__ */ l(function(e) {
410
+ X.find((n) => n.id === mt - 1).events.push(e);
411
+ }, "addEvent"), $t = /* @__PURE__ */ l(function(e) {
412
+ const t = {
413
+ section: U,
414
+ type: U,
415
+ description: e,
416
+ task: e,
417
+ classes: []
418
+ };
419
+ Q.push(t);
420
+ }, "addTaskOrg"), ct = /* @__PURE__ */ l(function() {
421
+ const e = /* @__PURE__ */ l(function(n) {
422
+ return X[n].processed;
423
+ }, "compileTask");
424
+ let t = !0;
425
+ for (const [n, i] of X.entries())
426
+ e(n), t = t && i.processed;
427
+ return t;
428
+ }, "compileTasks"), Kt = {
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__ */ l(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"), Zt = /* @__PURE__ */ l(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 c(p) {
446
+ const y = ot().startAngle(Math.PI / 2).endAngle(3 * (Math.PI / 2)).innerRadius(7.5).outerRadius(6.8181818181818175);
447
+ p.append("path").attr("class", "mouth").attr("d", y).attr("transform", "translate(" + t.cx + "," + (t.cy + 2) + ")");
448
+ }
449
+ l(c, "smile");
450
+ function a(p) {
451
+ const y = ot().startAngle(3 * Math.PI / 2).endAngle(5 * (Math.PI / 2)).innerRadius(7.5).outerRadius(6.8181818181818175);
452
+ p.append("path").attr("class", "mouth").attr("d", y).attr("transform", "translate(" + t.cx + "," + (t.cy + 7) + ")");
453
+ }
454
+ l(a, "sad");
455
+ function o(p) {
456
+ p.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 l(o, "ambivalent"), t.score > 3 ? c(r) : t.score < 3 ? a(r) : o(r), i;
459
+ }, "drawFace"), Ut = /* @__PURE__ */ l(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__ */ l(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"), Xt = /* @__PURE__ */ l(function(e, t) {
468
+ function n(r, c, a, o, p) {
469
+ return r + "," + c + " " + (r + a) + "," + c + " " + (r + a) + "," + (c + o - p) + " " + (r + a - p * 1.2) + "," + (c + o) + " " + r + "," + (c + o);
470
+ }
471
+ l(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"), qt = /* @__PURE__ */ l(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, Jt = /* @__PURE__ */ l(function(e, t, n, i) {
488
+ const r = t.x + n.width / 2, c = e.append("g");
489
+ et++;
490
+ const a = 300 + 5 * 30;
491
+ c.append("line").attr("id", i + "-task" + et).attr("x1", r).attr("y1", t.y).attr("x2", r).attr("y2", a).attr("class", "task-line").attr("stroke-width", "1px").attr("stroke-dasharray", "4 2").attr("stroke", "#666"), Zt(c, {
492
+ cx: r,
493
+ cy: 300 + (5 - t.score) * 30,
494
+ score: t.score
495
+ });
496
+ const o = st();
497
+ o.x = t.x, o.y = t.y, o.fill = t.fill, o.width = n.width, o.height = n.height, o.class = "task task-type-" + t.num, o.rx = 3, o.ry = 3, j(c, o), Ht(n)(
498
+ t.task,
499
+ c,
500
+ o.x,
501
+ o.y,
502
+ o.width,
503
+ o.height,
504
+ { class: "task" },
505
+ n,
506
+ t.colour
507
+ );
508
+ }, "drawTask"), Qt = /* @__PURE__ */ l(function(e, t) {
509
+ j(e, {
510
+ x: t.startx,
511
+ y: t.starty,
512
+ width: t.stopx - t.startx,
513
+ height: t.stopy - t.starty,
514
+ fill: t.fill,
515
+ class: "rect"
516
+ }).lower();
517
+ }, "drawBackgroundRect"), jt = /* @__PURE__ */ l(function() {
518
+ return {
519
+ x: 0,
520
+ y: 0,
521
+ fill: void 0,
522
+ "text-anchor": "start",
523
+ width: 100,
524
+ height: 100,
525
+ textMargin: 0,
526
+ rx: 0,
527
+ ry: 0
528
+ };
529
+ }, "getTextObj"), st = /* @__PURE__ */ l(function() {
530
+ return {
531
+ x: 0,
532
+ y: 0,
533
+ width: 100,
534
+ anchor: "start",
535
+ height: 100,
536
+ rx: 0,
537
+ ry: 0
538
+ };
539
+ }, "getNoteRect"), Ht = /* @__PURE__ */ function() {
540
+ function e(r, c, a, o, p, y, x, f) {
541
+ const k = c.append("text").attr("x", a + p / 2).attr("y", o + y / 2 + 5).style("font-color", f).style("text-anchor", "middle").text(r);
542
+ i(k, x);
543
+ }
544
+ l(e, "byText");
545
+ function t(r, c, a, o, p, y, x, f, k) {
546
+ const { taskFontSize: s, taskFontFamily: d } = f, h = r.split(/<br\s*\/?>/gi);
547
+ for (let g = 0; g < h.length; g++) {
548
+ const m = g * s - s * (h.length - 1) / 2, u = c.append("text").attr("x", a + p / 2).attr("y", o).attr("fill", k).style("text-anchor", "middle").style("font-size", s).style("font-family", d);
549
+ u.append("tspan").attr("x", a + p / 2).attr("dy", m).text(h[g]), u.attr("y", o + y / 2).attr("dominant-baseline", "central").attr("alignment-baseline", "central"), i(u, x);
550
+ }
551
+ }
552
+ l(t, "byTspan");
553
+ function n(r, c, a, o, p, y, x, f) {
554
+ const k = c.append("switch"), d = k.append("foreignObject").attr("x", a).attr("y", o).attr("width", p).attr("height", y).attr("position", "fixed").append("xhtml:div").style("display", "table").style("height", "100%").style("width", "100%");
555
+ d.append("div").attr("class", "label").style("display", "table-cell").style("text-align", "center").style("vertical-align", "middle").text(r), t(r, k, a, o, p, y, x, f), i(d, x);
556
+ }
557
+ l(n, "byFo");
558
+ function i(r, c) {
559
+ for (const a in c)
560
+ a in c && r.attr(a, c[a]);
561
+ }
562
+ return l(i, "_setTextAttrs"), function(r) {
563
+ return r.textPlacement === "fo" ? n : r.textPlacement === "old" ? e : t;
564
+ };
565
+ }(), Yt = /* @__PURE__ */ l(function(e, t) {
566
+ 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");
567
+ }, "initGraphics");
568
+ function it(e, t) {
569
+ e.each(function() {
570
+ var n = J(this), i = n.text().split(/(\s+|<br>)/).reverse(), r, c = [], a = 1.1, o = n.attr("y"), p = parseFloat(n.attr("dy")), y = n.text(null).append("tspan").attr("x", 0).attr("y", o).attr("dy", p + "em");
571
+ for (let x = 0; x < i.length; x++)
572
+ r = i[i.length - 1 - x], c.push(r), y.text(c.join(" ").trim()), (y.node().getComputedTextLength() > t || r === "<br>") && (c.pop(), y.text(c.join(" ").trim()), r === "<br>" ? c = [""] : c = [r], y = n.append("tspan").attr("x", 0).attr("y", o).attr("dy", a + "em").text(r));
573
+ });
574
+ }
575
+ l(it, "wrap");
576
+ var te = /* @__PURE__ */ l(function(e, t, n, i, r, c = !1) {
577
+ var m, u, w;
578
+ const { theme: a, look: o } = i, p = a == null ? void 0 : a.includes("redux"), y = ((m = i == null ? void 0 : i.themeVariables) == null ? void 0 : m.THEME_COLOR_LIMIT) ?? 12, x = n % y - 1, f = e.append("g");
579
+ t.section = x, f.attr(
580
+ "class",
581
+ (t.class ? t.class + " " : "") + "timeline-node " + ("section-" + x)
582
+ );
583
+ const k = f.append("g"), s = f.append("g"), h = 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(), g = (u = i.fontSize) != null && u.replace ? i.fontSize.replace("px", "") : i.fontSize;
584
+ if (t.height = h.height + g * 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 + ")"), p && s.attr(
585
+ "transform",
586
+ `translate(${t.width / 2}, ${c ? t.padding / 2 + 3 : t.padding})`
587
+ ), ne(k, t, x, r, i), o === "neo" && (f.attr("data-look", "neo"), p)) {
588
+ const v = a.includes("dark"), M = ((w = e.node()) == null ? void 0 : w.ownerSVGElement) ?? e.node(), C = J(M), P = C.attr("id") ?? "", V = P ? `${P}-drop-shadow` : "drop-shadow";
589
+ if (C.select(`#${V}`).empty()) {
590
+ const L = C.select("defs");
591
+ (L.empty() ? C.append("defs") : L).append("filter").attr("id", V).attr("height", "130%").attr("width", "130%").append("feDropShadow").attr("dx", "4").attr("dy", "4").attr("stdDeviation", 0).attr("flood-opacity", v ? "0.2" : "0.06").attr("flood-color", v ? "#FFFFFF" : "#000000");
592
+ }
593
+ }
594
+ return t;
595
+ }, "drawNode"), ee = /* @__PURE__ */ l(function(e, t, n) {
596
+ var o;
597
+ const i = e.append("g"), c = 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(), a = (o = n.fontSize) != null && o.replace ? n.fontSize.replace("px", "") : n.fontSize;
598
+ return i.remove(), c.height + a * 1.1 * 0.5 + t.padding;
599
+ }, "getVirtualNodeHeight"), ne = /* @__PURE__ */ l(function(e, t, n, i, r) {
600
+ const { theme: c } = r, a = c != null && c.includes("redux") ? 0 : 5, o = 5, p = a > 0 ? `M0 ${t.height - o} v${-t.height + 2 * o} q0,-${a},${a},-${a} h${t.width - 2 * o} q${a},0,${a},${a} v${t.height - o} H0 Z` : `M0 ${t.height - o} v${-(t.height - o)} h${t.width} v${t.height} H0 Z`;
601
+ e.append("path").attr("id", i + "-node-" + Nt++).attr("class", "node-bkg node-" + t.type).attr("d", p), c != null && c.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);
602
+ }, "defaultBkg"), W = {
603
+ drawRect: j,
604
+ drawCircle: Ut,
605
+ drawSection: qt,
606
+ drawText: It,
607
+ drawLabel: Xt,
608
+ drawTask: Jt,
609
+ drawBackgroundRect: Qt,
610
+ getTextObj: jt,
611
+ getNoteRect: st,
612
+ initGraphics: Yt,
613
+ drawNode: te,
614
+ getVirtualNodeHeight: ee
615
+ }, re = /* @__PURE__ */ l(function(e, t, n, i) {
616
+ var K, O, $;
617
+ const r = gt(), { look: c, theme: a, themeVariables: o } = r, { useGradient: p, gradientStart: y, gradientStop: x } = o, f = ((K = r.timeline) == null ? void 0 : K.leftMargin) ?? 50;
618
+ S.debug("timeline", i.db);
619
+ const k = r.securityLevel;
620
+ let s;
621
+ k === "sandbox" && (s = J("#i" + t));
622
+ const h = (k === "sandbox" ? J(s.nodes()[0].contentDocument.body) : J("body")).select("#" + t);
623
+ h.append("g");
624
+ const g = i.db.getTasks(), m = i.db.getCommonDb().getDiagramTitle();
625
+ S.debug("task", g), W.initGraphics(h, t);
626
+ const u = i.db.getSections();
627
+ S.debug("sections", u);
628
+ let w = 0, v = 0, M = 0, C = 0, P = 50 + f, V = 50;
629
+ C = 50;
630
+ let L = 0, _ = !0;
631
+ u.forEach(function(N) {
632
+ const b = {
633
+ number: L,
634
+ descr: N,
635
+ section: L,
636
+ width: 150,
637
+ padding: 20,
638
+ maxHeight: w
639
+ }, T = W.getVirtualNodeHeight(h, b, r);
640
+ S.debug("sectionHeight before draw", T), w = Math.max(w, T + 20);
641
+ });
642
+ let R = 0, F = 0;
643
+ S.debug("tasks.length", g.length);
644
+ for (const [N, b] of g.entries()) {
645
+ const T = {
646
+ number: N,
647
+ descr: b,
648
+ section: b.section,
649
+ width: 150,
650
+ padding: 20,
651
+ maxHeight: v
652
+ }, E = W.getVirtualNodeHeight(h, T, r);
653
+ S.debug("taskHeight before draw", E), v = Math.max(v, E + 20), R = Math.max(R, b.events.length);
654
+ let H = 0;
655
+ for (const I of b.events) {
656
+ const B = {
657
+ descr: I,
658
+ section: b.section,
659
+ number: b.section,
660
+ width: 150,
661
+ padding: 20,
662
+ maxHeight: 50
663
+ };
664
+ H += W.getVirtualNodeHeight(h, B, r);
665
+ }
666
+ b.events.length > 0 && (H += (b.events.length - 1) * 10), F = Math.max(F, H);
667
+ }
668
+ S.debug("maxSectionHeight before draw", w), S.debug("maxTaskHeight before draw", v), u && u.length > 0 ? u.forEach((N) => {
669
+ const b = g.filter((I) => I.section === N), T = {
670
+ number: L,
671
+ descr: N,
672
+ section: L,
673
+ width: 200 * Math.max(b.length, 1) - 50,
674
+ padding: 20,
675
+ maxHeight: w
676
+ };
677
+ S.debug("sectionNode", T);
678
+ const E = h.append("g"), H = W.drawNode(E, T, L, r, t);
679
+ S.debug("sectionNode output", H), E.attr("transform", `translate(${P}, ${C})`), V += w + 50, b.length > 0 && lt(
680
+ h,
681
+ b,
682
+ L,
683
+ P,
684
+ V,
685
+ v,
686
+ r,
687
+ R,
688
+ F,
689
+ w,
690
+ !1,
691
+ t
692
+ ), P += 200 * Math.max(b.length, 1), V = C, L++;
693
+ }) : (_ = !1, lt(
694
+ h,
695
+ g,
696
+ L,
697
+ P,
698
+ V,
699
+ v,
700
+ r,
701
+ R,
702
+ F,
703
+ w,
704
+ !0,
705
+ t
706
+ ));
707
+ const z = h.node().getBBox();
708
+ if (S.debug("bounds", z), m && h.append("text").text(m).attr("x", c === "neo" ? z.x * 2 + f : z.width / 2 - f).attr("font-size", "4ex").attr("font-weight", "bold").attr("y", 20), M = _ ? w + v + 150 : v + 100, h.append("g").attr("class", "lineWrapper").append("line").attr("x1", f).attr("y1", M).attr("x2", z.width + 3 * f).attr("y2", M).attr("stroke-width", 4).attr("stroke", "black").attr("marker-end", `url(#${t}-arrowhead)`), c === "neo" && p && a !== "neutral") {
709
+ const N = h.select("defs"), T = (N.empty() ? h.append("defs") : N).append("linearGradient").attr("id", h.attr("id") + "-gradient").attr("gradientUnits", "objectBoundingBox").attr("x1", "0%").attr("y1", "0%").attr("x2", "100%").attr("y2", "0%");
710
+ T.append("stop").attr("offset", "0%").attr("stop-color", y).attr("stop-opacity", 1), T.append("stop").attr("offset", "100%").attr("stop-color", x).attr("stop-opacity", 1);
711
+ }
712
+ ft(
713
+ void 0,
714
+ h,
715
+ ((O = r.timeline) == null ? void 0 : O.padding) ?? 50,
716
+ (($ = r.timeline) == null ? void 0 : $.useMaxWidth) ?? !1
717
+ );
718
+ }, "draw"), lt = /* @__PURE__ */ l(function(e, t, n, i, r, c, a, o, p, y, x, f) {
719
+ var k;
720
+ for (const s of t) {
721
+ const d = {
722
+ descr: s.task,
723
+ section: n,
724
+ number: n,
725
+ width: 150,
726
+ padding: 20,
727
+ maxHeight: c
728
+ };
729
+ S.debug("taskNode", d);
730
+ const h = e.append("g").attr("class", "taskWrapper"), m = W.drawNode(h, d, n, a, f).height;
731
+ if (S.debug("taskHeight after draw", m), h.attr("transform", `translate(${i}, ${r})`), c = Math.max(c, m), s.events) {
732
+ const u = e.append("g").attr("class", "lineWrapper");
733
+ let w = c;
734
+ r += 100, w = w + se(e, s.events, n, i, r, a, f), r -= 100, u.append("line").attr("x1", i + 190 / 2).attr("y1", r + c).attr("x2", i + 190 / 2).attr("y2", r + c + 100 + p + 100).attr("stroke-width", 2).attr("stroke", "black").attr("marker-end", `url(#${f}-arrowhead)`).attr("stroke-dasharray", "5,5");
735
+ }
736
+ i = i + 200, x && !((k = a.timeline) != null && k.disableMulticolor) && n++;
737
+ }
738
+ r = r - 10;
739
+ }, "drawTasks"), se = /* @__PURE__ */ l(function(e, t, n, i, r, c, a) {
740
+ let o = 0;
741
+ const p = r;
742
+ r = r + 100;
743
+ for (const y of t) {
744
+ const x = {
745
+ descr: y,
746
+ section: n,
747
+ number: n,
748
+ width: 150,
749
+ padding: 20,
750
+ maxHeight: 50
751
+ };
752
+ S.debug("eventNode", x);
753
+ const f = e.append("g").attr("class", "eventWrapper"), s = W.drawNode(f, x, n, c, a, !0).height;
754
+ o = o + s, f.attr("transform", `translate(${i}, ${r})`), r = r + 10 + s;
755
+ }
756
+ return r = p, o;
757
+ }, "drawEvents"), ie = {
758
+ setConf: /* @__PURE__ */ l(() => {
759
+ }, "setConf"),
760
+ draw: re
761
+ }, Y = 200, G = 5, ae = Y + G * 2, at = Y + 100, oe = at + G * 2, Lt = 10, ce = 0, ht = 20, Mt = 20, dt = 30, At = 50, le = /* @__PURE__ */ l(function(e, t, n, i) {
762
+ var K, O, $, N, b;
763
+ const r = gt(), c = ((K = r.timeline) == null ? void 0 : K.leftMargin) ?? 50;
764
+ S.debug("timeline", i.db);
765
+ const a = Vt(t);
766
+ a.append("g");
767
+ const o = i.db.getTasks(), p = i.db.getCommonDb().getDiagramTitle();
768
+ S.debug("task", o), W.initGraphics(a);
769
+ const y = i.db.getSections();
770
+ S.debug("sections", y);
771
+ let x = 0, f = 0;
772
+ const k = 50 + c;
773
+ let s = 50;
774
+ const d = s, h = k, g = ae + Mt, m = oe + At, u = h + g;
775
+ let w = 0;
776
+ const v = y && y.length > 0, M = v ? u : k + g, C = Math.max(50, g + m - G * 2);
777
+ y.forEach(function(T) {
778
+ const E = {
779
+ number: w,
780
+ descr: T,
781
+ section: w,
782
+ width: C,
783
+ padding: G,
784
+ maxHeight: x
785
+ }, H = W.getVirtualNodeHeight(a, E, r);
786
+ S.debug("sectionHeight before draw", H), x = Math.max(x, H);
787
+ });
788
+ let P = 0;
789
+ S.debug("tasks.length", o.length);
790
+ for (const [T, E] of o.entries()) {
791
+ const H = {
792
+ number: T,
793
+ descr: E,
794
+ section: E.section,
795
+ width: Y,
796
+ padding: G,
797
+ maxHeight: f
798
+ }, I = W.getVirtualNodeHeight(a, H, r);
799
+ S.debug("taskHeight before draw", I), f = Math.max(f, I);
800
+ let B = 0;
801
+ for (const D of E.events) {
802
+ const Z = {
803
+ descr: D,
804
+ section: E.section,
805
+ number: E.section,
806
+ width: at,
807
+ padding: G,
808
+ maxHeight: 50
809
+ };
810
+ B += W.getVirtualNodeHeight(a, Z, r);
811
+ }
812
+ E.events.length > 0 && (B += (E.events.length - 1) * Lt), P = Math.max(P, B) + ce;
813
+ }
814
+ S.debug("maxSectionHeight before draw", x), S.debug("maxTaskHeight before draw", f);
815
+ const L = Math.max(f, P) + dt;
816
+ v ? y.forEach((T) => {
817
+ const E = o.filter((Ct) => Ct.section === T), H = {
818
+ number: w,
819
+ descr: T,
820
+ section: w,
821
+ width: C,
822
+ padding: G,
823
+ maxHeight: x
824
+ };
825
+ S.debug("sectionNode", H);
826
+ const I = a.append("g"), B = W.drawNode(I, H, w, r);
827
+ S.debug("sectionNode output", B);
828
+ const D = M - g;
829
+ I.attr("transform", `translate(${D}, ${s})`);
830
+ const Z = s + B.height + ht;
831
+ E.length > 0 && ut(
832
+ a,
833
+ E,
834
+ w,
835
+ M,
836
+ Z,
837
+ f,
838
+ r,
839
+ L,
840
+ !1
841
+ );
842
+ const A = E.length, Rt = B.height + ht + L * Math.max(A, 1) - (A > 0 ? dt * 2 : 0);
843
+ s += Rt, w++;
844
+ }) : ut(
845
+ a,
846
+ o,
847
+ w,
848
+ M,
849
+ s,
850
+ f,
851
+ r,
852
+ L,
853
+ !0
854
+ );
855
+ let _ = (O = a.node()) == null ? void 0 : O.getBBox();
856
+ if (!_)
857
+ throw new Error("bbox not found");
858
+ if (S.debug("bounds", _), p) {
859
+ if (a.append("text").text(p).attr("x", _.width / 2 - c).attr("font-size", "4ex").attr("font-weight", "bold").attr("y", 20), _ = ($ = a.node()) == null ? void 0 : $.getBBox(), !_)
860
+ throw new Error("bbox not found");
861
+ S.debug("bounds after title", _);
862
+ }
863
+ const [R] = Ft(r.fontSize), F = (R ?? 16) * 2, z = (R ?? 16) * 0.5 + 20, q = a.append("g").attr("class", "lineWrapper");
864
+ q.append("line").attr("x1", M).attr("y1", d - F).attr("x2", M).attr("y2", _.y + _.height + z).attr("stroke-width", 4).attr("stroke", "black").attr("marker-end", "url(#arrowhead)"), q.lower(), ft(
865
+ void 0,
866
+ a,
867
+ ((N = r.timeline) == null ? void 0 : N.padding) ?? 50,
868
+ ((b = r.timeline) == null ? void 0 : b.useMaxWidth) ?? !1
869
+ );
870
+ }, "draw"), ut = /* @__PURE__ */ l(function(e, t, n, i, r, c, a, o, p) {
871
+ var y;
872
+ for (const x of t) {
873
+ const f = {
874
+ descr: x.task,
875
+ section: n,
876
+ number: n,
877
+ width: Y,
878
+ padding: G,
879
+ maxHeight: c
880
+ };
881
+ S.debug("taskNode", f);
882
+ const k = e.append("g").attr("class", "taskWrapper"), s = W.drawNode(k, f, n, a), d = s.height;
883
+ S.debug("taskHeight after draw", d);
884
+ const h = i - Mt - s.width;
885
+ if (k.attr("transform", `translate(${h}, ${r})`), c = Math.max(c, d), x.events && x.events.length > 0) {
886
+ const g = r, m = i + At;
887
+ he(e, x.events, n, i, m, g, a);
888
+ }
889
+ r = r + o, p && !((y = a.timeline) != null && y.disableMulticolor) && n++;
890
+ }
891
+ }, "drawTasks"), he = /* @__PURE__ */ l(function(e, t, n, i, r, c, a) {
892
+ let o = c;
893
+ for (const p of t) {
894
+ const y = {
895
+ descr: p,
896
+ section: n,
897
+ number: n,
898
+ width: at,
899
+ padding: G,
900
+ maxHeight: 0
901
+ };
902
+ S.debug("eventNode", y);
903
+ const x = e.append("g").attr("class", "eventWrapper"), k = W.drawNode(x, y, n, a).height;
904
+ x.attr("transform", `translate(${r}, ${o})`);
905
+ const s = e.append("g").attr("class", "lineWrapper"), d = o + k / 2;
906
+ 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"), o = o + k + Lt;
907
+ }
908
+ return o - c;
909
+ }, "drawEvents"), de = {
910
+ setConf: /* @__PURE__ */ l(() => {
911
+ }, "setConf"),
912
+ draw: le
913
+ }, ue = /* @__PURE__ */ l((e) => {
914
+ var o;
915
+ const { theme: t } = pt(), n = t == null ? void 0 : t.includes("dark"), i = t == null ? void 0 : t.includes("color"), r = ((o = e.svgId) == null ? void 0 : o.replace(/^#/, "")) ?? "", c = r ? `url(#${r}-drop-shadow)` : e.dropShadow ?? "none";
916
+ let a = "";
917
+ for (let p = 0; p < e.THEME_COLOR_LIMIT; p++) {
918
+ const y = `${17 - 3 * p}`, x = i ? e.borderColorArray[p] : e.mainBkg, f = i ? e.borderColorArray[p] : e.nodeBorder;
919
+ a += `
920
+ .section-${p - 1} rect,
921
+ .section-${p - 1} path,
922
+ .section-${p - 1} circle {
923
+ fill: ${n && i ? e.mainBkg : x};
924
+ stroke: ${f};
925
+ stroke-width: ${e.strokeWidth};
926
+ filter: ${c};
927
+ }
928
+
929
+ .section-${p - 1} text {
930
+ fill: ${e.nodeBorder};
931
+ font-weight: ${e.fontWeight}
932
+ }
933
+
934
+ .node-icon-${p - 1} {
935
+ font-size: 40px;
936
+ color: ${e["cScaleLabel" + p]};
937
+ }
938
+
939
+ .section-edge-${p - 1} {
940
+ stroke: ${e["cScale" + p]};
941
+ }
942
+
943
+ .edge-depth-${p - 1} {
944
+ stroke-width: ${y};
945
+ }
946
+
947
+ .section-${p - 1} line {
948
+ stroke: ${e["cScaleInv" + p]};
949
+ stroke-width: 3;
950
+ }
951
+
952
+ .lineWrapper line {
953
+ stroke: ${e.nodeBorder};
954
+ stroke-width:${e.strokeWidth}
955
+ }
956
+
957
+ .disabled,
958
+ .disabled circle,
959
+ .disabled text {
960
+ fill: ${e.tertiaryColor ?? "lightgray"};
961
+ }
962
+
963
+ .disabled text {
964
+ fill: ${e.clusterBorder ?? "#efefef"};
965
+ }
966
+ `;
967
+ }
968
+ return a;
969
+ }, "genReduxSections"), pe = /* @__PURE__ */ l((e) => {
970
+ let t = "";
971
+ for (let n = 0; n < e.THEME_COLOR_LIMIT; n++)
972
+ e["lineColor" + n] = e["lineColor" + n] || e["cScaleInv" + n], Wt(e["lineColor" + n]) ? e["lineColor" + n] = Pt(e["lineColor" + n], 20) : e["lineColor" + n] = Bt(e["lineColor" + n], 20);
973
+ for (let n = 0; n < e.THEME_COLOR_LIMIT; n++) {
974
+ const i = "" + (17 - 3 * n);
975
+ t += `
976
+ .section-${n - 1} rect, .section-${n - 1} path, .section-${n - 1} circle, .section-${n - 1} path {
977
+ fill: ${e["cScale" + n]};
978
+ }
979
+ .section-${n - 1} text {
980
+ fill: ${e["cScaleLabel" + n]};
981
+ }
982
+ .node-icon-${n - 1} {
983
+ font-size: 40px;
984
+ color: ${e["cScaleLabel" + n]};
985
+ }
986
+ .section-edge-${n - 1}{
987
+ stroke: ${e["cScale" + n]};
988
+ }
989
+ .edge-depth-${n - 1}{
990
+ stroke-width: ${i};
991
+ }
992
+ .section-${n - 1} line {
993
+ stroke: ${e["cScaleInv" + n]} ;
994
+ stroke-width: 3;
995
+ }
996
+
997
+ .lineWrapper line{
998
+ stroke: ${e["cScaleLabel" + n]} ;
999
+ }
1000
+
1001
+ .disabled, .disabled circle, .disabled text {
1002
+ fill: ${e.tertiaryColor ?? "lightgray"};
1003
+ }
1004
+ .disabled text {
1005
+ fill: ${e.clusterBorder ?? "#efefef"};
1006
+ }
1007
+ `;
1008
+ }
1009
+ return t;
1010
+ }, "genSections"), ge = /* @__PURE__ */ l((e) => {
1011
+ var a;
1012
+ const { theme: t } = pt(), n = t == null ? void 0 : t.includes("redux"), i = t === "neutral", r = ((a = e.svgId) == null ? void 0 : a.replace(/^#/, "")) ?? "";
1013
+ let c = "";
1014
+ if (e.useGradient && r && e.THEME_COLOR_LIMIT && !i)
1015
+ for (let o = 0; o < e.THEME_COLOR_LIMIT; o++)
1016
+ c += `
1017
+ .section-${o - 1}[data-look="neo"] rect,
1018
+ .section-${o - 1}[data-look="neo"] path,
1019
+ .section-${o - 1}[data-look="neo"] circle {
1020
+ fill: ${e.mainBkg};
1021
+ stroke: url(#${r}-gradient);
1022
+ stroke-width: 2;
1023
+ }
1024
+ .section-${o - 1}[data-look="neo"] line {
1025
+ stroke: url(#${r}-gradient);
1026
+ stroke-width: 2;
1027
+ }`;
1028
+ return `
1029
+ .edge {
1030
+ stroke-width: 3;
1031
+ }
1032
+ ${n ? ue(e) : pe(e)}
1033
+ ${c}
1034
+ .section-root rect, .section-root path, .section-root circle {
1035
+ fill: ${e.git0};
1036
+ }
1037
+ .section-root text {
1038
+ fill: ${e.gitBranchLabel0};
1039
+ }
1040
+ .icon-container {
1041
+ height:100%;
1042
+ display: flex;
1043
+ justify-content: center;
1044
+ align-items: center;
1045
+ }
1046
+ .edge {
1047
+ fill: none;
1048
+ }
1049
+ .eventWrapper {
1050
+ filter: brightness(120%);
1051
+ }
1052
+ `;
1053
+ }, "getStyles"), fe = ge, ye = {
1054
+ setConf: /* @__PURE__ */ l(() => {
1055
+ }, "setConf"),
1056
+ draw: /* @__PURE__ */ l((e, t, n, i) => {
1057
+ var c, a;
1058
+ return (((a = (c = i == null ? void 0 : i.db) == null ? void 0 : c.getDirection) == null ? void 0 : a.call(c)) ?? "LR") === "TD" ? de.draw(e, t, n, i) : ie.draw(e, t, n, i);
1059
+ }, "draw")
1060
+ }, ke = {
1061
+ db: yt,
1062
+ renderer: ye,
1063
+ parser: Dt,
1064
+ styles: fe
1065
+ };
1066
+ export {
1067
+ ke as diagram
1068
+ };