@blueking/ai-blueking 2.1.4-beta.7 → 2.1.4-beta.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (105) hide show
  1. package/dist/standalone/_baseFor-DZ1vnh4H.js +393 -0
  2. package/dist/standalone/arc-WNacHY26.js +80 -0
  3. package/dist/standalone/architecture-YZFGNWBL-pIa_tKdA.js +3 -0
  4. package/dist/standalone/architectureDiagram-Q4EWVU46-Bfam8Fg3.js +4057 -0
  5. package/dist/standalone/array-CWNufkl9.js +6 -0
  6. package/dist/standalone/blockDiagram-DXYQGD6D-vAb9uyF5.js +3033 -0
  7. package/dist/standalone/c4Diagram-AHTNJAMY-BWACU0ER.js +2961 -0
  8. package/dist/standalone/channel-Br5ChI8U.js +5 -0
  9. package/dist/standalone/chunk-2KRD3SAO-Deh6AASy.js +23 -0
  10. package/dist/standalone/chunk-336JU56O-CFKWNcxR.js +49 -0
  11. package/dist/standalone/chunk-426QAEUC-D_wKNd3w.js +9 -0
  12. package/dist/standalone/chunk-4BX2VUAB-DKC_OBWg.js +8 -0
  13. package/dist/standalone/chunk-4TB4RGXK-HiVG7T1A.js +3254 -0
  14. package/dist/standalone/chunk-55IACEB6-DBivnNb2.js +8 -0
  15. package/dist/standalone/chunk-5FUZZQ4R-tiEjqlP4.js +3638 -0
  16. package/dist/standalone/chunk-5PVQY5BW-BCjrVrWB.js +1299 -0
  17. package/dist/standalone/chunk-67CJDMHE-BX09W6oy.js +23 -0
  18. package/dist/standalone/chunk-7N4EOEYR-G144j5Vc.js +35 -0
  19. package/dist/standalone/chunk-AA7GKIK3-Dx9YCoJ-.js +30 -0
  20. package/dist/standalone/chunk-BSJP7CBP-DE8WR0MI.js +82 -0
  21. package/dist/standalone/chunk-CIAEETIT-Bv86XVLB.js +23 -0
  22. package/dist/standalone/chunk-EDXVE4YY-DE9KzYM-.js +25 -0
  23. package/dist/standalone/chunk-ENJZ2VHE-DlxIC-A3.js +560 -0
  24. package/dist/standalone/chunk-FMBD7UC4-DCkBrKFO.js +5 -0
  25. package/dist/standalone/chunk-FOC6F5B3-C7hwrEZJ.js +23 -0
  26. package/dist/standalone/chunk-ICPOFSXX-B9JXAgJU.js +2772 -0
  27. package/dist/standalone/chunk-K5T4RW27-T6hJxJM0.js +16070 -0
  28. package/dist/standalone/chunk-KGLVRYIC-C0JPhrjn.js +23 -0
  29. package/dist/standalone/chunk-LIHQZDEY-CiavnvWh.js +64 -0
  30. package/dist/standalone/chunk-ORNJ4GCN-BtJ79bik.js +31 -0
  31. package/dist/standalone/chunk-OYMX7WX6-D2UHnmfD.js +2014 -0
  32. package/dist/standalone/chunk-QZHKN3VN-DhzThSvb.js +15 -0
  33. package/dist/standalone/chunk-U2HBQHQK-75Isf1R4.js +1896 -0
  34. package/dist/standalone/chunk-WQLz0Won.js +20 -0
  35. package/dist/standalone/chunk-X2U36JSP-DSzducJI.js +67 -0
  36. package/dist/standalone/chunk-XPW4576I-BFhmu0d4.js +1146 -0
  37. package/dist/standalone/chunk-YZCP3GAM-90EaSO-2.js +60 -0
  38. package/dist/standalone/chunk-ZZ45TVLE-DUagTZ9d.js +32 -0
  39. package/dist/standalone/classDiagram-6PBFFD2Q-Bwt78q4N.js +29 -0
  40. package/dist/standalone/classDiagram-v2-HSJHXN6E-B2qI9-xf.js +29 -0
  41. package/dist/standalone/clone-CBw-BHXl.js +8 -0
  42. package/dist/standalone/cose-bilkent-S5V4N54A-DFJ1nlog.js +2250 -0
  43. package/dist/standalone/cytoscape.esm-DdhenceR.js +18103 -0
  44. package/dist/standalone/dagre-KV5264BT-CXTBtAae.js +293 -0
  45. package/dist/standalone/dagre-kfvGmNUa.js +1606 -0
  46. package/dist/standalone/defaultLocale-bckJcYh1.js +201 -0
  47. package/dist/standalone/diagram-5BDNPKRD--gLHDKg-.js +101 -0
  48. package/dist/standalone/diagram-G4DWMVQ6-BwLE9Hsf.js +524 -0
  49. package/dist/standalone/diagram-MMDJMWI5-CoilYxa0.js +213 -0
  50. package/dist/standalone/diagram-TYMM5635-BupwRdr6.js +133 -0
  51. package/dist/standalone/dist-Dlj1jr8W.js +59 -0
  52. package/dist/standalone/erDiagram-SMLLAGMA-tIdn6ZCM.js +1700 -0
  53. package/dist/standalone/flatten-CXxC4cn2.js +40 -0
  54. package/dist/standalone/flowDiagram-DWJPFMVM-C86bLTAY.js +4146 -0
  55. package/dist/standalone/ganttDiagram-T4ZO3ILL-BT23lv_X.js +3077 -0
  56. package/dist/standalone/gitGraph-7Q5UKJZL-C-7nG8PF.js +3 -0
  57. package/dist/standalone/gitGraphDiagram-UUTBAWPF-DT1BGQsP.js +728 -0
  58. package/dist/standalone/graphlib-DrXiQBFg.js +373 -0
  59. package/dist/standalone/index.es.min.js +59705 -0
  60. package/dist/standalone/index.iife.min.js +3502 -0
  61. package/dist/standalone/index.umd.min.js +3502 -0
  62. package/dist/standalone/info-OMHHGYJF-BOS7mrON.js +3 -0
  63. package/dist/standalone/infoDiagram-42DDH7IO-Dx7LFK0B.js +19 -0
  64. package/dist/standalone/init-B75p2clj.js +15 -0
  65. package/dist/standalone/isEmpty-CVG4Bj-P.js +35 -0
  66. package/dist/standalone/ishikawaDiagram-UXIWVN3A-CX4cX3qb.js +718 -0
  67. package/dist/standalone/journeyDiagram-VCZTEJTY-BCvxmmFn.js +883 -0
  68. package/dist/standalone/kanban-definition-6JOO6SKY-SVINWaiM.js +973 -0
  69. package/dist/standalone/katex-CKrw0rbA.js +22016 -0
  70. package/dist/standalone/line-BF1XS-Ng.js +34 -0
  71. package/dist/standalone/linear-DGQDIL28.js +289 -0
  72. package/dist/standalone/mermaid-parser.core-Blz-Qy2h.js +69 -0
  73. package/dist/standalone/mermaid.core-CHTh1JGx.js +944 -0
  74. package/dist/standalone/mindmap-definition-QFDTVHPH-1Trzro3y.js +1009 -0
  75. package/dist/standalone/ordinal-F3U6aXtP.js +65 -0
  76. package/dist/standalone/packet-4T2RLAQJ-ai5Omp1h.js +3 -0
  77. package/dist/standalone/path-Dm3C8WEs.js +85 -0
  78. package/dist/standalone/pie-ZZUOXDRM-Df1rG6QC.js +3 -0
  79. package/dist/standalone/pieDiagram-DEJITSTG-D5Omb898.js +165 -0
  80. package/dist/standalone/purify.es-CZ_RvYUu.js +549 -0
  81. package/dist/standalone/quadrantDiagram-34T5L4WZ-Ct4g9T4o.js +1974 -0
  82. package/dist/standalone/radar-PYXPWWZC-B2t6k6Fg.js +3 -0
  83. package/dist/standalone/reduce-DbMsJ4nx.js +532 -0
  84. package/dist/standalone/requirementDiagram-MS252O5E-CP0BUgnz.js +2221 -0
  85. package/dist/standalone/rough.esm-UCEI3PYn.js +1352 -0
  86. package/dist/standalone/sankeyDiagram-XADWPNL6-D6C7yZ3k.js +920 -0
  87. package/dist/standalone/sequenceDiagram-FGHM5R23-KeodespT.js +4157 -0
  88. package/dist/standalone/src-CFVe5TPD.js +2146 -0
  89. package/dist/standalone/stateDiagram-FHFEXIEX-DAupoS9U.js +217 -0
  90. package/dist/standalone/stateDiagram-v2-QKLJ7IA2-C1Lw_i_z.js +27 -0
  91. package/dist/standalone/style.css +1 -0
  92. package/dist/standalone/timeline-definition-GMOUNBTQ-Cwhj84lX.js +1068 -0
  93. package/dist/standalone/treeView-SZITEDCU-BnoMeJSb.js +3 -0
  94. package/dist/standalone/treemap-W4RFUUIX-B38XFBZF.js +3 -0
  95. package/dist/standalone/vennDiagram-DHZGUBPP-_1PHloeO.js +1858 -0
  96. package/dist/standalone/wardley-RL74JXVD-bB8BBy_Y.js +3 -0
  97. package/dist/standalone/wardleyDiagram-NUSXRM2D-DRLCx-qh.js +578 -0
  98. package/dist/standalone/xychartDiagram-5P7HB3ND-Bz2-4Ufi.js +2044 -0
  99. package/dist/standalone-mount-core.d.ts +34 -0
  100. package/dist/standalone-mount-core.d.ts.map +1 -0
  101. package/dist/standalone-mount.d.ts +14 -0
  102. package/dist/standalone-mount.d.ts.map +1 -0
  103. package/dist/standalone.d.ts +8 -0
  104. package/dist/standalone.d.ts.map +1 -0
  105. package/package.json +12 -3
@@ -0,0 +1,883 @@
1
+ import { h as e, p as t } from "./src-CFVe5TPD.js";
2
+ import { B as n, C as r, V as i, W as a, _ as o, a as s, b as c, c as l, v as u } from "./chunk-ICPOFSXX-B9JXAgJU.js";
3
+ import { t as d } from "./arc-WNacHY26.js";
4
+ import { t as f } from "./chunk-FMBD7UC4-DCkBrKFO.js";
5
+ import { a as p, n as m, o as h, s as g } from "./chunk-YZCP3GAM-90EaSO-2.js";
6
+ //#region ../../node_modules/.pnpm/mermaid@11.14.0/node_modules/mermaid/dist/chunks/mermaid.core/journeyDiagram-VCZTEJTY.mjs
7
+ var _ = (function() {
8
+ var t = /* @__PURE__ */ e(function(e, t, n, r) {
9
+ for (n ||= {}, r = e.length; r--; n[e[r]] = t);
10
+ return n;
11
+ }, "o"), n = [
12
+ 6,
13
+ 8,
14
+ 10,
15
+ 11,
16
+ 12,
17
+ 14,
18
+ 16,
19
+ 17,
20
+ 18
21
+ ], r = [1, 9], i = [1, 10], a = [1, 11], o = [1, 12], s = [1, 13], c = [1, 14], l = {
22
+ trace: /* @__PURE__ */ e(function() {}, "trace"),
23
+ yy: {},
24
+ symbols_: {
25
+ error: 2,
26
+ start: 3,
27
+ journey: 4,
28
+ document: 5,
29
+ EOF: 6,
30
+ line: 7,
31
+ SPACE: 8,
32
+ statement: 9,
33
+ NEWLINE: 10,
34
+ title: 11,
35
+ acc_title: 12,
36
+ acc_title_value: 13,
37
+ acc_descr: 14,
38
+ acc_descr_value: 15,
39
+ acc_descr_multiline_value: 16,
40
+ section: 17,
41
+ taskName: 18,
42
+ taskData: 19,
43
+ $accept: 0,
44
+ $end: 1
45
+ },
46
+ terminals_: {
47
+ 2: "error",
48
+ 4: "journey",
49
+ 6: "EOF",
50
+ 8: "SPACE",
51
+ 10: "NEWLINE",
52
+ 11: "title",
53
+ 12: "acc_title",
54
+ 13: "acc_title_value",
55
+ 14: "acc_descr",
56
+ 15: "acc_descr_value",
57
+ 16: "acc_descr_multiline_value",
58
+ 17: "section",
59
+ 18: "taskName",
60
+ 19: "taskData"
61
+ },
62
+ productions_: [
63
+ 0,
64
+ [3, 3],
65
+ [5, 0],
66
+ [5, 2],
67
+ [7, 2],
68
+ [7, 1],
69
+ [7, 1],
70
+ [7, 1],
71
+ [9, 1],
72
+ [9, 2],
73
+ [9, 2],
74
+ [9, 1],
75
+ [9, 1],
76
+ [9, 2]
77
+ ],
78
+ performAction: /* @__PURE__ */ e(function(e, t, n, r, i, a, o) {
79
+ var s = a.length - 1;
80
+ switch (i) {
81
+ case 1: return a[s - 1];
82
+ case 2:
83
+ this.$ = [];
84
+ break;
85
+ case 3:
86
+ a[s - 1].push(a[s]), this.$ = a[s - 1];
87
+ break;
88
+ case 4:
89
+ case 5:
90
+ this.$ = a[s];
91
+ break;
92
+ case 6:
93
+ case 7:
94
+ this.$ = [];
95
+ break;
96
+ case 8:
97
+ r.setDiagramTitle(a[s].substr(6)), this.$ = a[s].substr(6);
98
+ break;
99
+ case 9:
100
+ this.$ = a[s].trim(), r.setAccTitle(this.$);
101
+ break;
102
+ case 10:
103
+ case 11:
104
+ this.$ = a[s].trim(), r.setAccDescription(this.$);
105
+ break;
106
+ case 12:
107
+ r.addSection(a[s].substr(8)), this.$ = a[s].substr(8);
108
+ break;
109
+ case 13:
110
+ r.addTask(a[s - 1], a[s]), this.$ = "task";
111
+ break;
112
+ }
113
+ }, "anonymous"),
114
+ table: [
115
+ {
116
+ 3: 1,
117
+ 4: [1, 2]
118
+ },
119
+ { 1: [3] },
120
+ t(n, [2, 2], { 5: 3 }),
121
+ {
122
+ 6: [1, 4],
123
+ 7: 5,
124
+ 8: [1, 6],
125
+ 9: 7,
126
+ 10: [1, 8],
127
+ 11: r,
128
+ 12: i,
129
+ 14: a,
130
+ 16: o,
131
+ 17: s,
132
+ 18: c
133
+ },
134
+ t(n, [2, 7], { 1: [2, 1] }),
135
+ t(n, [2, 3]),
136
+ {
137
+ 9: 15,
138
+ 11: r,
139
+ 12: i,
140
+ 14: a,
141
+ 16: o,
142
+ 17: s,
143
+ 18: c
144
+ },
145
+ t(n, [2, 5]),
146
+ t(n, [2, 6]),
147
+ t(n, [2, 8]),
148
+ { 13: [1, 16] },
149
+ { 15: [1, 17] },
150
+ t(n, [2, 11]),
151
+ t(n, [2, 12]),
152
+ { 19: [1, 18] },
153
+ t(n, [2, 4]),
154
+ t(n, [2, 9]),
155
+ t(n, [2, 10]),
156
+ t(n, [2, 13])
157
+ ],
158
+ defaultActions: {},
159
+ parseError: /* @__PURE__ */ e(function(e, t) {
160
+ if (t.recoverable) this.trace(e);
161
+ else {
162
+ var n = Error(e);
163
+ throw n.hash = t, n;
164
+ }
165
+ }, "parseError"),
166
+ parse: /* @__PURE__ */ e(function(t) {
167
+ var n = this, r = [0], i = [], a = [null], o = [], s = this.table, c = "", l = 0, u = 0, d = 0, f = 2, p = 1, m = o.slice.call(arguments, 1), h = Object.create(this.lexer), g = { yy: {} };
168
+ for (var _ in this.yy) Object.prototype.hasOwnProperty.call(this.yy, _) && (g.yy[_] = this.yy[_]);
169
+ h.setInput(t, g.yy), g.yy.lexer = h, g.yy.parser = this, h.yylloc === void 0 && (h.yylloc = {});
170
+ var v = h.yylloc;
171
+ o.push(v);
172
+ var y = h.options && h.options.ranges;
173
+ typeof g.yy.parseError == "function" ? this.parseError = g.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
174
+ function b(e) {
175
+ r.length -= 2 * e, a.length -= e, o.length -= e;
176
+ }
177
+ e(b, "popStack");
178
+ function x() {
179
+ var e = i.pop() || h.lex() || p;
180
+ return typeof e != "number" && (e instanceof Array && (i = e, e = i.pop()), e = n.symbols_[e] || e), e;
181
+ }
182
+ e(x, "lex");
183
+ for (var S, C, w, T, E, D = {}, O, k, A, j;;) {
184
+ if (w = r[r.length - 1], this.defaultActions[w] ? T = this.defaultActions[w] : (S ??= x(), T = s[w] && s[w][S]), T === void 0 || !T.length || !T[0]) {
185
+ var M = "";
186
+ for (O in j = [], s[w]) this.terminals_[O] && O > f && j.push("'" + this.terminals_[O] + "'");
187
+ M = h.showPosition ? "Parse error on line " + (l + 1) + ":\n" + h.showPosition() + "\nExpecting " + j.join(", ") + ", got '" + (this.terminals_[S] || S) + "'" : "Parse error on line " + (l + 1) + ": Unexpected " + (S == p ? "end of input" : "'" + (this.terminals_[S] || S) + "'"), this.parseError(M, {
188
+ text: h.match,
189
+ token: this.terminals_[S] || S,
190
+ line: h.yylineno,
191
+ loc: v,
192
+ expected: j
193
+ });
194
+ }
195
+ if (T[0] instanceof Array && T.length > 1) throw Error("Parse Error: multiple actions possible at state: " + w + ", token: " + S);
196
+ switch (T[0]) {
197
+ case 1:
198
+ r.push(S), a.push(h.yytext), o.push(h.yylloc), r.push(T[1]), S = null, C ? (S = C, C = null) : (u = h.yyleng, c = h.yytext, l = h.yylineno, v = h.yylloc, d > 0 && d--);
199
+ break;
200
+ case 2:
201
+ if (k = this.productions_[T[1]][1], D.$ = a[a.length - k], D._$ = {
202
+ first_line: o[o.length - (k || 1)].first_line,
203
+ last_line: o[o.length - 1].last_line,
204
+ first_column: o[o.length - (k || 1)].first_column,
205
+ last_column: o[o.length - 1].last_column
206
+ }, y && (D._$.range = [o[o.length - (k || 1)].range[0], o[o.length - 1].range[1]]), E = this.performAction.apply(D, [
207
+ c,
208
+ u,
209
+ l,
210
+ g.yy,
211
+ T[1],
212
+ a,
213
+ o
214
+ ].concat(m)), E !== void 0) return E;
215
+ k && (r = r.slice(0, -1 * k * 2), a = a.slice(0, -1 * k), o = o.slice(0, -1 * k)), r.push(this.productions_[T[1]][0]), a.push(D.$), o.push(D._$), A = s[r[r.length - 2]][r[r.length - 1]], r.push(A);
216
+ break;
217
+ case 3: return !0;
218
+ }
219
+ }
220
+ return !0;
221
+ }, "parse")
222
+ };
223
+ l.lexer = /* @__PURE__ */ (function() {
224
+ return {
225
+ EOF: 1,
226
+ parseError: /* @__PURE__ */ e(function(e, t) {
227
+ if (this.yy.parser) this.yy.parser.parseError(e, t);
228
+ else throw Error(e);
229
+ }, "parseError"),
230
+ setInput: /* @__PURE__ */ e(function(e, t) {
231
+ return this.yy = t || this.yy || {}, this._input = e, this._more = this._backtrack = this.done = !1, this.yylineno = this.yyleng = 0, this.yytext = this.matched = this.match = "", this.conditionStack = ["INITIAL"], this.yylloc = {
232
+ first_line: 1,
233
+ first_column: 0,
234
+ last_line: 1,
235
+ last_column: 0
236
+ }, this.options.ranges && (this.yylloc.range = [0, 0]), this.offset = 0, this;
237
+ }, "setInput"),
238
+ input: /* @__PURE__ */ e(function() {
239
+ var e = this._input[0];
240
+ return this.yytext += e, this.yyleng++, this.offset++, this.match += e, this.matched += e, e.match(/(?:\r\n?|\n).*/g) ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++, this.options.ranges && this.yylloc.range[1]++, this._input = this._input.slice(1), e;
241
+ }, "input"),
242
+ unput: /* @__PURE__ */ e(function(e) {
243
+ var t = e.length, n = e.split(/(?:\r\n?|\n)/g);
244
+ this._input = e + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - t), this.offset -= t;
245
+ var r = this.match.split(/(?:\r\n?|\n)/g);
246
+ this.match = this.match.substr(0, this.match.length - 1), this.matched = this.matched.substr(0, this.matched.length - 1), n.length - 1 && (this.yylineno -= n.length - 1);
247
+ var i = this.yylloc.range;
248
+ return this.yylloc = {
249
+ first_line: this.yylloc.first_line,
250
+ last_line: this.yylineno + 1,
251
+ first_column: this.yylloc.first_column,
252
+ last_column: n ? (n.length === r.length ? this.yylloc.first_column : 0) + r[r.length - n.length].length - n[0].length : this.yylloc.first_column - t
253
+ }, this.options.ranges && (this.yylloc.range = [i[0], i[0] + this.yyleng - t]), this.yyleng = this.yytext.length, this;
254
+ }, "unput"),
255
+ more: /* @__PURE__ */ e(function() {
256
+ return this._more = !0, this;
257
+ }, "more"),
258
+ reject: /* @__PURE__ */ e(function() {
259
+ if (this.options.backtrack_lexer) this._backtrack = !0;
260
+ else 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).\n" + this.showPosition(), {
261
+ text: "",
262
+ token: null,
263
+ line: this.yylineno
264
+ });
265
+ return this;
266
+ }, "reject"),
267
+ less: /* @__PURE__ */ e(function(e) {
268
+ this.unput(this.match.slice(e));
269
+ }, "less"),
270
+ pastInput: /* @__PURE__ */ e(function() {
271
+ var e = this.matched.substr(0, this.matched.length - this.match.length);
272
+ return (e.length > 20 ? "..." : "") + e.substr(-20).replace(/\n/g, "");
273
+ }, "pastInput"),
274
+ upcomingInput: /* @__PURE__ */ e(function() {
275
+ var e = this.match;
276
+ return e.length < 20 && (e += this._input.substr(0, 20 - e.length)), (e.substr(0, 20) + (e.length > 20 ? "..." : "")).replace(/\n/g, "");
277
+ }, "upcomingInput"),
278
+ showPosition: /* @__PURE__ */ e(function() {
279
+ var e = this.pastInput(), t = Array(e.length + 1).join("-");
280
+ return e + this.upcomingInput() + "\n" + t + "^";
281
+ }, "showPosition"),
282
+ test_match: /* @__PURE__ */ e(function(e, t) {
283
+ var n, r, i;
284
+ if (this.options.backtrack_lexer && (i = {
285
+ yylineno: this.yylineno,
286
+ yylloc: {
287
+ first_line: this.yylloc.first_line,
288
+ last_line: this.last_line,
289
+ first_column: this.yylloc.first_column,
290
+ last_column: this.yylloc.last_column
291
+ },
292
+ yytext: this.yytext,
293
+ match: this.match,
294
+ matches: this.matches,
295
+ matched: this.matched,
296
+ yyleng: this.yyleng,
297
+ offset: this.offset,
298
+ _more: this._more,
299
+ _input: this._input,
300
+ yy: this.yy,
301
+ conditionStack: this.conditionStack.slice(0),
302
+ done: this.done
303
+ }, this.options.ranges && (i.yylloc.range = this.yylloc.range.slice(0))), r = e[0].match(/(?:\r\n?|\n).*/g), r && (this.yylineno += r.length), this.yylloc = {
304
+ first_line: this.yylloc.last_line,
305
+ last_line: this.yylineno + 1,
306
+ first_column: this.yylloc.last_column,
307
+ last_column: r ? r[r.length - 1].length - r[r.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + e[0].length
308
+ }, this.yytext += e[0], this.match += e[0], this.matches = e, 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(e[0].length), this.matched += e[0], n = this.performAction.call(this, this.yy, this, t, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), n) return n;
309
+ if (this._backtrack) {
310
+ for (var a in i) this[a] = i[a];
311
+ return !1;
312
+ }
313
+ return !1;
314
+ }, "test_match"),
315
+ next: /* @__PURE__ */ e(function() {
316
+ if (this.done) return this.EOF;
317
+ this._input || (this.done = !0);
318
+ var e, t, n, r;
319
+ this._more || (this.yytext = "", this.match = "");
320
+ for (var i = this._currentRules(), a = 0; a < i.length; a++) if (n = this._input.match(this.rules[i[a]]), n && (!t || n[0].length > t[0].length)) {
321
+ if (t = n, r = a, this.options.backtrack_lexer) {
322
+ if (e = this.test_match(n, i[a]), e !== !1) return e;
323
+ if (this._backtrack) {
324
+ t = !1;
325
+ continue;
326
+ } else return !1;
327
+ } else if (!this.options.flex) break;
328
+ }
329
+ return t ? (e = this.test_match(t, i[r]), e === !1 ? !1 : e) : this._input === "" ? this.EOF : this.parseError("Lexical error on line " + (this.yylineno + 1) + ". Unrecognized text.\n" + this.showPosition(), {
330
+ text: "",
331
+ token: null,
332
+ line: this.yylineno
333
+ });
334
+ }, "next"),
335
+ lex: /* @__PURE__ */ e(function() {
336
+ return this.next() || this.lex();
337
+ }, "lex"),
338
+ begin: /* @__PURE__ */ e(function(e) {
339
+ this.conditionStack.push(e);
340
+ }, "begin"),
341
+ popState: /* @__PURE__ */ e(function() {
342
+ return this.conditionStack.length - 1 > 0 ? this.conditionStack.pop() : this.conditionStack[0];
343
+ }, "popState"),
344
+ _currentRules: /* @__PURE__ */ e(function() {
345
+ return this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1] ? this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules : this.conditions.INITIAL.rules;
346
+ }, "_currentRules"),
347
+ topState: /* @__PURE__ */ e(function(e) {
348
+ return e = this.conditionStack.length - 1 - Math.abs(e || 0), e >= 0 ? this.conditionStack[e] : "INITIAL";
349
+ }, "topState"),
350
+ pushState: /* @__PURE__ */ e(function(e) {
351
+ this.begin(e);
352
+ }, "pushState"),
353
+ stateStackSize: /* @__PURE__ */ e(function() {
354
+ return this.conditionStack.length;
355
+ }, "stateStackSize"),
356
+ options: { "case-insensitive": !0 },
357
+ performAction: /* @__PURE__ */ e(function(e, t, n, r) {
358
+ switch (n) {
359
+ case 0: break;
360
+ case 1: break;
361
+ case 2: return 10;
362
+ case 3: break;
363
+ case 4: break;
364
+ case 5: return 4;
365
+ case 6: return 11;
366
+ case 7: return this.begin("acc_title"), 12;
367
+ case 8: return this.popState(), "acc_title_value";
368
+ case 9: return this.begin("acc_descr"), 14;
369
+ case 10: return this.popState(), "acc_descr_value";
370
+ case 11:
371
+ this.begin("acc_descr_multiline");
372
+ break;
373
+ case 12:
374
+ this.popState();
375
+ break;
376
+ case 13: return "acc_descr_multiline_value";
377
+ case 14: return 17;
378
+ case 15: return 18;
379
+ case 16: return 19;
380
+ case 17: return ":";
381
+ case 18: return 6;
382
+ case 19: return "INVALID";
383
+ }
384
+ }, "anonymous"),
385
+ rules: [
386
+ /^(?:%(?!\{)[^\n]*)/i,
387
+ /^(?:[^\}]%%[^\n]*)/i,
388
+ /^(?:[\n]+)/i,
389
+ /^(?:\s+)/i,
390
+ /^(?:#[^\n]*)/i,
391
+ /^(?:journey\b)/i,
392
+ /^(?:title\s[^#\n;]+)/i,
393
+ /^(?:accTitle\s*:\s*)/i,
394
+ /^(?:(?!\n||)*[^\n]*)/i,
395
+ /^(?:accDescr\s*:\s*)/i,
396
+ /^(?:(?!\n||)*[^\n]*)/i,
397
+ /^(?:accDescr\s*\{\s*)/i,
398
+ /^(?:[\}])/i,
399
+ /^(?:[^\}]*)/i,
400
+ /^(?:section\s[^#:\n;]+)/i,
401
+ /^(?:[^#:\n;]+)/i,
402
+ /^(?::[^#\n;]+)/i,
403
+ /^(?::)/i,
404
+ /^(?:$)/i,
405
+ /^(?:.)/i
406
+ ],
407
+ conditions: {
408
+ acc_descr_multiline: {
409
+ rules: [12, 13],
410
+ inclusive: !1
411
+ },
412
+ acc_descr: {
413
+ rules: [10],
414
+ inclusive: !1
415
+ },
416
+ acc_title: {
417
+ rules: [8],
418
+ inclusive: !1
419
+ },
420
+ INITIAL: {
421
+ rules: [
422
+ 0,
423
+ 1,
424
+ 2,
425
+ 3,
426
+ 4,
427
+ 5,
428
+ 6,
429
+ 7,
430
+ 9,
431
+ 11,
432
+ 14,
433
+ 15,
434
+ 16,
435
+ 17,
436
+ 18,
437
+ 19
438
+ ],
439
+ inclusive: !0
440
+ }
441
+ }
442
+ };
443
+ })();
444
+ function u() {
445
+ this.yy = {};
446
+ }
447
+ return e(u, "Parser"), u.prototype = l, l.Parser = u, new u();
448
+ })();
449
+ _.parser = _;
450
+ var v = _, y = "", b = [], x = [], S = [], C = /* @__PURE__ */ e(function() {
451
+ b.length = 0, x.length = 0, y = "", S.length = 0, s();
452
+ }, "clear"), w = /* @__PURE__ */ e(function(e) {
453
+ y = e, b.push(e);
454
+ }, "addSection"), T = /* @__PURE__ */ e(function() {
455
+ return b;
456
+ }, "getSections"), E = /* @__PURE__ */ e(function() {
457
+ let e = A(), t = 0;
458
+ for (; !e && t < 100;) e = A(), t++;
459
+ return x.push(...S), x;
460
+ }, "getTasks"), D = /* @__PURE__ */ e(function() {
461
+ let e = [];
462
+ return x.forEach((t) => {
463
+ t.people && e.push(...t.people);
464
+ }), [...new Set(e)].sort();
465
+ }, "updateActors"), O = /* @__PURE__ */ e(function(e, t) {
466
+ let n = t.substr(1).split(":"), r = 0, i = [];
467
+ n.length === 1 ? (r = Number(n[0]), i = []) : (r = Number(n[0]), i = n[1].split(","));
468
+ let a = i.map((e) => e.trim()), o = {
469
+ section: y,
470
+ type: y,
471
+ people: a,
472
+ task: e,
473
+ score: r
474
+ };
475
+ S.push(o);
476
+ }, "addTask"), k = /* @__PURE__ */ e(function(e) {
477
+ let t = {
478
+ section: y,
479
+ type: y,
480
+ description: e,
481
+ task: e,
482
+ classes: []
483
+ };
484
+ x.push(t);
485
+ }, "addTaskOrg"), A = /* @__PURE__ */ e(function() {
486
+ let t = /* @__PURE__ */ e(function(e) {
487
+ return S[e].processed;
488
+ }, "compileTask"), n = !0;
489
+ for (let [e, r] of S.entries()) t(e), n &&= r.processed;
490
+ return n;
491
+ }, "compileTasks"), j = {
492
+ getConfig: /* @__PURE__ */ e(() => c().journey, "getConfig"),
493
+ clear: C,
494
+ setDiagramTitle: a,
495
+ getDiagramTitle: r,
496
+ setAccTitle: i,
497
+ getAccTitle: u,
498
+ setAccDescription: n,
499
+ getAccDescription: o,
500
+ addSection: w,
501
+ getSections: T,
502
+ getTasks: E,
503
+ addTask: O,
504
+ addTaskOrg: k,
505
+ getActors: /* @__PURE__ */ e(function() {
506
+ return D();
507
+ }, "getActors")
508
+ }, M = /* @__PURE__ */ e((e) => `.label {
509
+ font-family: ${e.fontFamily};
510
+ color: ${e.textColor};
511
+ }
512
+ .mouth {
513
+ stroke: #666;
514
+ }
515
+
516
+ line {
517
+ stroke: ${e.textColor}
518
+ }
519
+
520
+ .legend {
521
+ fill: ${e.textColor};
522
+ font-family: ${e.fontFamily};
523
+ }
524
+
525
+ .label text {
526
+ fill: #333;
527
+ }
528
+ .label {
529
+ color: ${e.textColor}
530
+ }
531
+
532
+ .face {
533
+ ${e.faceColor ? `fill: ${e.faceColor}` : "fill: #FFF8DC"};
534
+ stroke: #999;
535
+ }
536
+
537
+ .node rect,
538
+ .node circle,
539
+ .node ellipse,
540
+ .node polygon,
541
+ .node path {
542
+ fill: ${e.mainBkg};
543
+ stroke: ${e.nodeBorder};
544
+ stroke-width: 1px;
545
+ }
546
+
547
+ .node .label {
548
+ text-align: center;
549
+ }
550
+ .node.clickable {
551
+ cursor: pointer;
552
+ }
553
+
554
+ .arrowheadPath {
555
+ fill: ${e.arrowheadColor};
556
+ }
557
+
558
+ .edgePath .path {
559
+ stroke: ${e.lineColor};
560
+ stroke-width: 1.5px;
561
+ }
562
+
563
+ .flowchart-link {
564
+ stroke: ${e.lineColor};
565
+ fill: none;
566
+ }
567
+
568
+ .edgeLabel {
569
+ background-color: ${e.edgeLabelBackground};
570
+ rect {
571
+ opacity: 0.5;
572
+ }
573
+ text-align: center;
574
+ }
575
+
576
+ .cluster rect {
577
+ }
578
+
579
+ .cluster text {
580
+ fill: ${e.titleColor};
581
+ }
582
+
583
+ div.mermaidTooltip {
584
+ position: absolute;
585
+ text-align: center;
586
+ max-width: 200px;
587
+ padding: 2px;
588
+ font-family: ${e.fontFamily};
589
+ font-size: 12px;
590
+ background: ${e.tertiaryColor};
591
+ border: 1px solid ${e.border2};
592
+ border-radius: 2px;
593
+ pointer-events: none;
594
+ z-index: 100;
595
+ }
596
+
597
+ .task-type-0, .section-type-0 {
598
+ ${e.fillType0 ? `fill: ${e.fillType0}` : ""};
599
+ }
600
+ .task-type-1, .section-type-1 {
601
+ ${e.fillType0 ? `fill: ${e.fillType1}` : ""};
602
+ }
603
+ .task-type-2, .section-type-2 {
604
+ ${e.fillType0 ? `fill: ${e.fillType2}` : ""};
605
+ }
606
+ .task-type-3, .section-type-3 {
607
+ ${e.fillType0 ? `fill: ${e.fillType3}` : ""};
608
+ }
609
+ .task-type-4, .section-type-4 {
610
+ ${e.fillType0 ? `fill: ${e.fillType4}` : ""};
611
+ }
612
+ .task-type-5, .section-type-5 {
613
+ ${e.fillType0 ? `fill: ${e.fillType5}` : ""};
614
+ }
615
+ .task-type-6, .section-type-6 {
616
+ ${e.fillType0 ? `fill: ${e.fillType6}` : ""};
617
+ }
618
+ .task-type-7, .section-type-7 {
619
+ ${e.fillType0 ? `fill: ${e.fillType7}` : ""};
620
+ }
621
+
622
+ .actor-0 {
623
+ ${e.actor0 ? `fill: ${e.actor0}` : ""};
624
+ }
625
+ .actor-1 {
626
+ ${e.actor1 ? `fill: ${e.actor1}` : ""};
627
+ }
628
+ .actor-2 {
629
+ ${e.actor2 ? `fill: ${e.actor2}` : ""};
630
+ }
631
+ .actor-3 {
632
+ ${e.actor3 ? `fill: ${e.actor3}` : ""};
633
+ }
634
+ .actor-4 {
635
+ ${e.actor4 ? `fill: ${e.actor4}` : ""};
636
+ }
637
+ .actor-5 {
638
+ ${e.actor5 ? `fill: ${e.actor5}` : ""};
639
+ }
640
+ ${f()}
641
+ `, "getStyles"), N = /* @__PURE__ */ e(function(e, t) {
642
+ return p(e, t);
643
+ }, "drawRect"), P = /* @__PURE__ */ e(function(t, n) {
644
+ let r = t.append("circle").attr("cx", n.cx).attr("cy", n.cy).attr("class", "face").attr("r", 15).attr("stroke-width", 2).attr("overflow", "visible"), i = t.append("g");
645
+ i.append("circle").attr("cx", n.cx - 15 / 3).attr("cy", n.cy - 15 / 3).attr("r", 1.5).attr("stroke-width", 2).attr("fill", "#666").attr("stroke", "#666"), i.append("circle").attr("cx", n.cx + 15 / 3).attr("cy", n.cy - 15 / 3).attr("r", 1.5).attr("stroke-width", 2).attr("fill", "#666").attr("stroke", "#666");
646
+ function a(e) {
647
+ let t = d().startAngle(Math.PI / 2).endAngle(Math.PI / 2 * 3).innerRadius(15 / 2).outerRadius(15 / 2.2);
648
+ e.append("path").attr("class", "mouth").attr("d", t).attr("transform", "translate(" + n.cx + "," + (n.cy + 2) + ")");
649
+ }
650
+ e(a, "smile");
651
+ function o(e) {
652
+ let t = d().startAngle(3 * Math.PI / 2).endAngle(Math.PI / 2 * 5).innerRadius(15 / 2).outerRadius(15 / 2.2);
653
+ e.append("path").attr("class", "mouth").attr("d", t).attr("transform", "translate(" + n.cx + "," + (n.cy + 7) + ")");
654
+ }
655
+ e(o, "sad");
656
+ function s(e) {
657
+ e.append("line").attr("class", "mouth").attr("stroke", 2).attr("x1", n.cx - 5).attr("y1", n.cy + 7).attr("x2", n.cx + 5).attr("y2", n.cy + 7).attr("class", "mouth").attr("stroke-width", "1px").attr("stroke", "#666");
658
+ }
659
+ return e(s, "ambivalent"), n.score > 3 ? a(i) : n.score < 3 ? o(i) : s(i), r;
660
+ }, "drawFace"), F = /* @__PURE__ */ e(function(e, t) {
661
+ let n = e.append("circle");
662
+ 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;
663
+ }, "drawCircle"), I = /* @__PURE__ */ e(function(e, t) {
664
+ return h(e, t);
665
+ }, "drawText"), L = /* @__PURE__ */ e(function(t, n) {
666
+ function r(e, t, n, r, i) {
667
+ return e + "," + t + " " + (e + n) + "," + t + " " + (e + n) + "," + (t + r - i) + " " + (e + n - i * 1.2) + "," + (t + r) + " " + e + "," + (t + r);
668
+ }
669
+ e(r, "genPoints");
670
+ let i = t.append("polygon");
671
+ i.attr("points", r(n.x, n.y, 50, 20, 7)), i.attr("class", "labelBox"), n.y += n.labelMargin, n.x += .5 * n.labelMargin, I(t, n);
672
+ }, "drawLabel"), R = /* @__PURE__ */ e(function(e, t, n) {
673
+ let r = e.append("g"), i = g();
674
+ i.x = t.x, i.y = t.y, i.fill = t.fill, i.width = n.width * t.taskCount + n.diagramMarginX * (t.taskCount - 1), i.height = n.height, i.class = "journey-section section-type-" + t.num, i.rx = 3, i.ry = 3, N(r, i), H(n)(t.text, r, i.x, i.y, i.width, i.height, { class: "journey-section section-type-" + t.num }, n, t.colour);
675
+ }, "drawSection"), z = -1, B = /* @__PURE__ */ e(function(e, t, n, r) {
676
+ let i = t.x + n.width / 2, a = e.append("g");
677
+ z++, a.append("line").attr("id", r + "-task" + z).attr("x1", i).attr("y1", t.y).attr("x2", i).attr("y2", 450).attr("class", "task-line").attr("stroke-width", "1px").attr("stroke-dasharray", "4 2").attr("stroke", "#666"), P(a, {
678
+ cx: i,
679
+ cy: 300 + (5 - t.score) * 30,
680
+ score: t.score
681
+ });
682
+ let o = g();
683
+ 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, N(a, o);
684
+ let s = t.x + 14;
685
+ t.people.forEach((e) => {
686
+ let n = t.actors[e].color;
687
+ F(a, {
688
+ cx: s,
689
+ cy: t.y,
690
+ r: 7,
691
+ fill: n,
692
+ stroke: "#000",
693
+ title: e,
694
+ pos: t.actors[e].position
695
+ }), s += 10;
696
+ }), H(n)(t.task, a, o.x, o.y, o.width, o.height, { class: "task" }, n, t.colour);
697
+ }, "drawTask"), V = /* @__PURE__ */ e(function(e, t) {
698
+ m(e, t);
699
+ }, "drawBackgroundRect"), H = /* @__PURE__ */ (function() {
700
+ function t(e, t, n, r, a, o, s, c) {
701
+ i(t.append("text").attr("x", n + a / 2).attr("y", r + o / 2 + 5).style("font-color", c).style("text-anchor", "middle").text(e), s);
702
+ }
703
+ e(t, "byText");
704
+ function n(e, t, n, r, a, o, s, c, l) {
705
+ let { taskFontSize: u, taskFontFamily: d } = c, f = e.split(/<br\s*\/?>/gi);
706
+ for (let e = 0; e < f.length; e++) {
707
+ let c = e * u - u * (f.length - 1) / 2, p = t.append("text").attr("x", n + a / 2).attr("y", r).attr("fill", l).style("text-anchor", "middle").style("font-size", u).style("font-family", d);
708
+ p.append("tspan").attr("x", n + a / 2).attr("dy", c).text(f[e]), p.attr("y", r + o / 2).attr("dominant-baseline", "central").attr("alignment-baseline", "central"), i(p, s);
709
+ }
710
+ }
711
+ e(n, "byTspan");
712
+ function r(e, t, r, a, o, s, c, l) {
713
+ let u = t.append("switch"), d = u.append("foreignObject").attr("x", r).attr("y", a).attr("width", o).attr("height", s).attr("position", "fixed").append("xhtml:div").style("display", "table").style("height", "100%").style("width", "100%");
714
+ d.append("div").attr("class", "label").style("display", "table-cell").style("text-align", "center").style("vertical-align", "middle").text(e), n(e, u, r, a, o, s, c, l), i(d, c);
715
+ }
716
+ e(r, "byFo");
717
+ function i(e, t) {
718
+ for (let n in t) n in t && e.attr(n, t[n]);
719
+ }
720
+ return e(i, "_setTextAttrs"), function(e) {
721
+ return e.textPlacement === "fo" ? r : e.textPlacement === "old" ? t : n;
722
+ };
723
+ })(), U = {
724
+ drawRect: N,
725
+ drawCircle: F,
726
+ drawSection: R,
727
+ drawText: I,
728
+ drawLabel: L,
729
+ drawTask: B,
730
+ drawBackgroundRect: V,
731
+ initGraphics: /* @__PURE__ */ e(function(e, t) {
732
+ z = -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");
733
+ }, "initGraphics")
734
+ }, W = /* @__PURE__ */ e(function(e) {
735
+ Object.keys(e).forEach(function(t) {
736
+ J[t] = e[t];
737
+ });
738
+ }, "setConf"), G = {}, K = 0;
739
+ function q(e) {
740
+ let t = c().journey, n = t.maxLabelWidth;
741
+ K = 0;
742
+ let r = 60;
743
+ Object.keys(G).forEach((i) => {
744
+ let a = G[i].color, o = {
745
+ cx: 20,
746
+ cy: r,
747
+ r: 7,
748
+ fill: a,
749
+ stroke: "#000",
750
+ pos: G[i].position
751
+ };
752
+ U.drawCircle(e, o);
753
+ let s = e.append("text").attr("visibility", "hidden").text(i), c = s.node().getBoundingClientRect().width;
754
+ s.remove();
755
+ let l = [];
756
+ if (c <= n) l = [i];
757
+ else {
758
+ let t = i.split(" "), r = "";
759
+ s = e.append("text").attr("visibility", "hidden"), t.forEach((e) => {
760
+ let t = r ? `${r} ${e}` : e;
761
+ if (s.text(t), s.node().getBoundingClientRect().width > n) {
762
+ if (r && l.push(r), r = e, s.text(e), s.node().getBoundingClientRect().width > n) {
763
+ let t = "";
764
+ for (let r of e) t += r, s.text(t + "-"), s.node().getBoundingClientRect().width > n && (l.push(t.slice(0, -1) + "-"), t = r);
765
+ r = t;
766
+ }
767
+ } else r = t;
768
+ }), r && l.push(r), s.remove();
769
+ }
770
+ l.forEach((n, i) => {
771
+ let a = {
772
+ x: 40,
773
+ y: r + 7 + i * 20,
774
+ fill: "#666",
775
+ text: n,
776
+ textMargin: t.boxTextMargin ?? 5
777
+ }, o = U.drawText(e, a).node().getBoundingClientRect().width;
778
+ o > K && o > t.leftMargin - o && (K = o);
779
+ }), r += Math.max(20, l.length * 20);
780
+ });
781
+ }
782
+ e(q, "drawActorLegend");
783
+ var J = c().journey, Y = 0, ee = /* @__PURE__ */ e(function(e, n, r, i) {
784
+ let a = c(), o = a.journey.titleColor, s = a.journey.titleFontSize, u = a.journey.titleFontFamily, d = a.securityLevel, f;
785
+ d === "sandbox" && (f = t("#i" + n));
786
+ let p = t(d === "sandbox" ? f.nodes()[0].contentDocument.body : "body");
787
+ X.init();
788
+ let m = p.select("#" + n);
789
+ U.initGraphics(m, n);
790
+ let h = i.db.getTasks(), g = i.db.getDiagramTitle(), _ = i.db.getActors();
791
+ for (let e in G) delete G[e];
792
+ let v = 0;
793
+ _.forEach((e) => {
794
+ G[e] = {
795
+ color: J.actorColours[v % J.actorColours.length],
796
+ position: v
797
+ }, v++;
798
+ }), q(m), Y = J.leftMargin + K, X.insert(0, 0, Y, Object.keys(G).length * 50), te(m, h, 0, n);
799
+ let y = X.getBounds();
800
+ g && m.append("text").text(g).attr("x", Y).attr("font-size", s).attr("font-weight", "bold").attr("y", 25).attr("fill", o).attr("font-family", u);
801
+ let b = y.stopy - y.starty + 2 * J.diagramMarginY, x = Y + y.stopx + 2 * J.diagramMarginX;
802
+ l(m, b, x, J.useMaxWidth), m.append("line").attr("x1", Y).attr("y1", J.height * 4).attr("x2", x - Y - 4).attr("y2", J.height * 4).attr("stroke-width", 4).attr("stroke", "black").attr("marker-end", "url(#" + n + "-arrowhead)");
803
+ let S = g ? 70 : 0;
804
+ m.attr("viewBox", `${y.startx} -25 ${x} ${b + S}`), m.attr("preserveAspectRatio", "xMinYMin meet"), m.attr("height", b + S + 25);
805
+ }, "draw"), X = {
806
+ data: {
807
+ startx: void 0,
808
+ stopx: void 0,
809
+ starty: void 0,
810
+ stopy: void 0
811
+ },
812
+ verticalPos: 0,
813
+ sequenceItems: [],
814
+ init: /* @__PURE__ */ e(function() {
815
+ this.sequenceItems = [], this.data = {
816
+ startx: void 0,
817
+ stopx: void 0,
818
+ starty: void 0,
819
+ stopy: void 0
820
+ }, this.verticalPos = 0;
821
+ }, "init"),
822
+ updateVal: /* @__PURE__ */ e(function(e, t, n, r) {
823
+ e[t] === void 0 ? e[t] = n : e[t] = r(n, e[t]);
824
+ }, "updateVal"),
825
+ updateBounds: /* @__PURE__ */ e(function(t, n, r, i) {
826
+ let a = c().journey, o = this, s = 0;
827
+ function l(c) {
828
+ return /* @__PURE__ */ e(function(e) {
829
+ s++;
830
+ let l = o.sequenceItems.length - s + 1;
831
+ o.updateVal(e, "starty", n - l * a.boxMargin, Math.min), o.updateVal(e, "stopy", i + l * a.boxMargin, Math.max), o.updateVal(X.data, "startx", t - l * a.boxMargin, Math.min), o.updateVal(X.data, "stopx", r + l * a.boxMargin, Math.max), c !== "activation" && (o.updateVal(e, "startx", t - l * a.boxMargin, Math.min), o.updateVal(e, "stopx", r + l * a.boxMargin, Math.max), o.updateVal(X.data, "starty", n - l * a.boxMargin, Math.min), o.updateVal(X.data, "stopy", i + l * a.boxMargin, Math.max));
832
+ }, "updateItemBounds");
833
+ }
834
+ e(l, "updateFn"), this.sequenceItems.forEach(l());
835
+ }, "updateBounds"),
836
+ insert: /* @__PURE__ */ e(function(e, t, n, r) {
837
+ let i = Math.min(e, n), a = Math.max(e, n), o = Math.min(t, r), s = Math.max(t, r);
838
+ this.updateVal(X.data, "startx", i, Math.min), this.updateVal(X.data, "starty", o, Math.min), this.updateVal(X.data, "stopx", a, Math.max), this.updateVal(X.data, "stopy", s, Math.max), this.updateBounds(i, o, a, s);
839
+ }, "insert"),
840
+ bumpVerticalPos: /* @__PURE__ */ e(function(e) {
841
+ this.verticalPos += e, this.data.stopy = this.verticalPos;
842
+ }, "bumpVerticalPos"),
843
+ getVerticalPos: /* @__PURE__ */ e(function() {
844
+ return this.verticalPos;
845
+ }, "getVerticalPos"),
846
+ getBounds: /* @__PURE__ */ e(function() {
847
+ return this.data;
848
+ }, "getBounds")
849
+ }, Z = J.sectionFills, Q = J.sectionColours, te = /* @__PURE__ */ e(function(e, t, n, r) {
850
+ let i = c().journey, a = "", o = n + (i.height * 2 + i.diagramMarginY), s = 0, l = "#CCC", u = "black", d = 0;
851
+ for (let [n, c] of t.entries()) {
852
+ if (a !== c.section) {
853
+ l = Z[s % Z.length], d = s % Z.length, u = Q[s % Q.length];
854
+ let r = 0, o = c.section;
855
+ for (let e = n; e < t.length && t[e].section == o; e++) r += 1;
856
+ let f = {
857
+ x: n * i.taskMargin + n * i.width + Y,
858
+ y: 50,
859
+ text: c.section,
860
+ fill: l,
861
+ num: d,
862
+ colour: u,
863
+ taskCount: r
864
+ };
865
+ U.drawSection(e, f, i), a = c.section, s++;
866
+ }
867
+ let f = c.people.reduce((e, t) => (G[t] && (e[t] = G[t]), e), {});
868
+ c.x = n * i.taskMargin + n * i.width + Y, c.y = o, c.width = i.diagramMarginX, c.height = i.diagramMarginY, c.colour = u, c.fill = l, c.num = d, c.actors = f, U.drawTask(e, c, i, r), X.insert(c.x, c.y, c.x + c.width + i.taskMargin, 450);
869
+ }
870
+ }, "drawTasks"), $ = {
871
+ setConf: W,
872
+ draw: ee
873
+ }, ne = {
874
+ parser: v,
875
+ db: j,
876
+ renderer: $,
877
+ styles: M,
878
+ init: /* @__PURE__ */ e((e) => {
879
+ $.setConf(e.journey), j.clear();
880
+ }, "init")
881
+ };
882
+ //#endregion
883
+ export { ne as diagram };