@digipair/skill-web-chatbot 0.3.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 (100) hide show
  1. package/SAP-icons.cjs.js +2489 -0
  2. package/SAP-icons.cjs2.js +2489 -0
  3. package/SAP-icons.esm.js +2482 -0
  4. package/SAP-icons.esm2.js +2482 -0
  5. package/arc-da8fd8d8.cjs.js +88 -0
  6. package/arc-da8fd8d8.esm.js +86 -0
  7. package/array-2ff2c7a6.cjs.js +7 -0
  8. package/array-2ff2c7a6.esm.js +5 -0
  9. package/c4Diagram-1bdb45a8.cjs.js +4613 -0
  10. package/c4Diagram-1bdb45a8.esm.js +4611 -0
  11. package/classDiagram-185c1a10.cjs.js +96 -0
  12. package/classDiagram-185c1a10.esm.js +94 -0
  13. package/classDiagram-v2-6dc3b9c3.cjs.js +403 -0
  14. package/classDiagram-v2-6dc3b9c3.esm.js +401 -0
  15. package/constant-2fe7eae5.cjs.js +58 -0
  16. package/constant-2fe7eae5.esm.js +55 -0
  17. package/createText-94e3ebbf.cjs.js +2775 -0
  18. package/createText-94e3ebbf.esm.js +2773 -0
  19. package/debug.html +18 -0
  20. package/edges-558884ee.cjs.js +1450 -0
  21. package/edges-558884ee.esm.js +1436 -0
  22. package/erDiagram-97139f44.cjs.js +1949 -0
  23. package/erDiagram-97139f44.esm.js +1947 -0
  24. package/flowDb-a4faf166.cjs.js +6918 -0
  25. package/flowDb-a4faf166.esm.js +6914 -0
  26. package/flowDiagram-ccbbb58d.cjs.js +999 -0
  27. package/flowDiagram-ccbbb58d.esm.js +997 -0
  28. package/flowDiagram-v2-79ccd6da.cjs.js +29 -0
  29. package/flowDiagram-v2-79ccd6da.esm.js +27 -0
  30. package/flowchart-elk-definition-7863a61f.cjs.js +48577 -0
  31. package/flowchart-elk-definition-7863a61f.esm.js +48575 -0
  32. package/ganttDiagram-3eff0dd8.cjs.js +3855 -0
  33. package/ganttDiagram-3eff0dd8.esm.js +3853 -0
  34. package/gitGraphDiagram-c3fe571f.cjs.js +3863 -0
  35. package/gitGraphDiagram-c3fe571f.esm.js +3861 -0
  36. package/index-d0b453e2.cjs.js +609 -0
  37. package/index-d0b453e2.esm.js +607 -0
  38. package/index.cjs.d.ts +1 -0
  39. package/index.cjs.js +17 -0
  40. package/index.cjs2.js +43619 -0
  41. package/index.d.ts +1 -0
  42. package/index.esm.js +1 -0
  43. package/index.esm2.js +43493 -0
  44. package/infoDiagram-9c10eab1.cjs.js +467 -0
  45. package/infoDiagram-9c10eab1.esm.js +465 -0
  46. package/init-f9637058.cjs.js +17 -0
  47. package/init-f9637058.esm.js +15 -0
  48. package/journeyDiagram-b6904cec.cjs.js +1292 -0
  49. package/journeyDiagram-b6904cec.esm.js +1290 -0
  50. package/layout-c5a37d74.cjs.js +2808 -0
  51. package/layout-c5a37d74.esm.js +2795 -0
  52. package/libs/engine/src/index.d.ts +2 -0
  53. package/libs/engine/src/lib/engine.d.ts +27 -0
  54. package/libs/engine/src/lib/pins-settings.interface.d.ts +20 -0
  55. package/libs/skill-web-chatbot/src/index.d.ts +3 -0
  56. package/libs/skill-web-chatbot/src/lib/chat.element.d.ts +23 -0
  57. package/libs/skill-web-chatbot/src/lib/common.data.d.ts +1 -0
  58. package/libs/skill-web-chatbot/src/lib/config.d.ts +9 -0
  59. package/libs/skill-web-chatbot/src/lib/digipair-full.data.d.ts +1 -0
  60. package/libs/skill-web-chatbot/src/lib/digipair-full.element.d.ts +32 -0
  61. package/libs/skill-web-chatbot/src/lib/digipair.data.d.ts +1 -0
  62. package/libs/skill-web-chatbot/src/lib/digipair.element.d.ts +39 -0
  63. package/libs/skill-web-chatbot/src/lib/inputs.element.d.ts +9 -0
  64. package/libs/skill-web-chatbot/src/lib/pins/chatbot.actions.d.ts +5 -0
  65. package/libs/skill-web-chatbot/src/lib/tools/css-selector.d.ts +1 -0
  66. package/line-ce5d1152.cjs.js +34 -0
  67. package/line-ce5d1152.esm.js +32 -0
  68. package/linear-db016d0c.cjs.js +485 -0
  69. package/linear-db016d0c.esm.js +479 -0
  70. package/mindmap-definition-a9d0f378.cjs.js +20225 -0
  71. package/mindmap-definition-a9d0f378.esm.js +20223 -0
  72. package/ordinal-5695958c.cjs.js +331 -0
  73. package/ordinal-5695958c.esm.js +329 -0
  74. package/package.json +8 -0
  75. package/pieDiagram-fd367f1f.cjs.js +1157 -0
  76. package/pieDiagram-fd367f1f.esm.js +1155 -0
  77. package/quadrantDiagram-1763608a.cjs.js +2633 -0
  78. package/quadrantDiagram-1763608a.esm.js +2631 -0
  79. package/requirementDiagram-779d93b3.cjs.js +2451 -0
  80. package/requirementDiagram-779d93b3.esm.js +2449 -0
  81. package/sankeyDiagram-86a66bae.cjs.js +1850 -0
  82. package/sankeyDiagram-86a66bae.esm.js +1848 -0
  83. package/sequenceDiagram-169f11ec.cjs.js +4805 -0
  84. package/sequenceDiagram-169f11ec.esm.js +4803 -0
  85. package/stateDiagram-6f4bb19d.cjs.js +282 -0
  86. package/stateDiagram-6f4bb19d.esm.js +280 -0
  87. package/stateDiagram-v2-d72c79bd.cjs.js +377 -0
  88. package/stateDiagram-v2-d72c79bd.esm.js +375 -0
  89. package/styles-3814544c.cjs.js +534 -0
  90. package/styles-3814544c.esm.js +524 -0
  91. package/styles-3fb7b9cf.cjs.js +2377 -0
  92. package/styles-3fb7b9cf.esm.js +2368 -0
  93. package/styles-659d7242.cjs.js +3919 -0
  94. package/styles-659d7242.esm.js +3915 -0
  95. package/svgDraw-af99a425.cjs.js +144 -0
  96. package/svgDraw-af99a425.esm.js +141 -0
  97. package/svgDrawCommon-ebe6c236.cjs.js +70 -0
  98. package/svgDrawCommon-ebe6c236.esm.js +62 -0
  99. package/timeline-definition-65183566.cjs.js +1394 -0
  100. package/timeline-definition-65183566.esm.js +1392 -0
@@ -0,0 +1,1392 @@
1
+ import { aK as Jg, aL as $a, F as Fa, U as Ut$1, S, a as At$1, G as Gg, aM as si, aN as F, aO as A } from './index.esm2.js';
2
+ import { h as hn } from './arc-da8fd8d8.esm.js';
3
+ import './constant-2fe7eae5.esm.js';
4
+
5
+ function _array_like_to_array(arr, len) {
6
+ if (len == null || len > arr.length) len = arr.length;
7
+ for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
8
+ return arr2;
9
+ }
10
+ function _array_with_holes(arr) {
11
+ if (Array.isArray(arr)) return arr;
12
+ }
13
+ function _array_without_holes(arr) {
14
+ if (Array.isArray(arr)) return _array_like_to_array(arr);
15
+ }
16
+ function _instanceof(left, right) {
17
+ if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
18
+ return !!right[Symbol.hasInstance](left);
19
+ } else {
20
+ return left instanceof right;
21
+ }
22
+ }
23
+ function _iterable_to_array(iter) {
24
+ if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
25
+ }
26
+ function _iterable_to_array_limit(arr, i) {
27
+ var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
28
+ if (_i == null) return;
29
+ var _arr = [];
30
+ var _n = true;
31
+ var _d = false;
32
+ var _s, _e;
33
+ try {
34
+ for(_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true){
35
+ _arr.push(_s.value);
36
+ if (i && _arr.length === i) break;
37
+ }
38
+ } catch (err) {
39
+ _d = true;
40
+ _e = err;
41
+ } finally{
42
+ try {
43
+ if (!_n && _i["return"] != null) _i["return"]();
44
+ } finally{
45
+ if (_d) throw _e;
46
+ }
47
+ }
48
+ return _arr;
49
+ }
50
+ function _non_iterable_rest() {
51
+ throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
52
+ }
53
+ function _non_iterable_spread() {
54
+ throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
55
+ }
56
+ function _sliced_to_array(arr, i) {
57
+ return _array_with_holes(arr) || _iterable_to_array_limit(arr, i) || _unsupported_iterable_to_array(arr, i) || _non_iterable_rest();
58
+ }
59
+ function _to_consumable_array(arr) {
60
+ return _array_without_holes(arr) || _iterable_to_array(arr) || _unsupported_iterable_to_array(arr) || _non_iterable_spread();
61
+ }
62
+ function _type_of(obj) {
63
+ "@swc/helpers - typeof";
64
+ return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
65
+ }
66
+ function _unsupported_iterable_to_array(o, minLen) {
67
+ if (!o) return;
68
+ if (typeof o === "string") return _array_like_to_array(o, minLen);
69
+ var n = Object.prototype.toString.call(o).slice(8, -1);
70
+ if (n === "Object" && o.constructor) n = o.constructor.name;
71
+ if (n === "Map" || n === "Set") return Array.from(n);
72
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
73
+ }
74
+ var Y = function() {
75
+ var n = function n(k, r, a, h) {
76
+ for(a = a || {}, h = k.length; h--; a[k[h]] = r);
77
+ return a;
78
+ }, t = [
79
+ 1,
80
+ 2
81
+ ], e = [
82
+ 1,
83
+ 5
84
+ ], s = [
85
+ 6,
86
+ 9,
87
+ 11,
88
+ 17,
89
+ 18,
90
+ 20,
91
+ 22,
92
+ 23,
93
+ 26,
94
+ 27,
95
+ 28
96
+ ], i = [
97
+ 1,
98
+ 15
99
+ ], o = [
100
+ 1,
101
+ 16
102
+ ], l = [
103
+ 1,
104
+ 17
105
+ ], p = [
106
+ 1,
107
+ 18
108
+ ], g = [
109
+ 1,
110
+ 19
111
+ ], d = [
112
+ 1,
113
+ 23
114
+ ], f = [
115
+ 1,
116
+ 24
117
+ ], S = [
118
+ 1,
119
+ 27
120
+ ], _ = [
121
+ 4,
122
+ 6,
123
+ 9,
124
+ 11,
125
+ 17,
126
+ 18,
127
+ 20,
128
+ 22,
129
+ 23,
130
+ 26,
131
+ 27,
132
+ 28
133
+ ], b = {
134
+ trace: function trace() {},
135
+ yy: {},
136
+ symbols_: {
137
+ error: 2,
138
+ start: 3,
139
+ timeline: 4,
140
+ document: 5,
141
+ EOF: 6,
142
+ directive: 7,
143
+ line: 8,
144
+ SPACE: 9,
145
+ statement: 10,
146
+ NEWLINE: 11,
147
+ openDirective: 12,
148
+ typeDirective: 13,
149
+ closeDirective: 14,
150
+ ":": 15,
151
+ argDirective: 16,
152
+ title: 17,
153
+ acc_title: 18,
154
+ acc_title_value: 19,
155
+ acc_descr: 20,
156
+ acc_descr_value: 21,
157
+ acc_descr_multiline_value: 22,
158
+ section: 23,
159
+ period_statement: 24,
160
+ event_statement: 25,
161
+ period: 26,
162
+ event: 27,
163
+ open_directive: 28,
164
+ type_directive: 29,
165
+ arg_directive: 30,
166
+ close_directive: 31,
167
+ $accept: 0,
168
+ $end: 1
169
+ },
170
+ terminals_: {
171
+ 2: "error",
172
+ 4: "timeline",
173
+ 6: "EOF",
174
+ 9: "SPACE",
175
+ 11: "NEWLINE",
176
+ 15: ":",
177
+ 17: "title",
178
+ 18: "acc_title",
179
+ 19: "acc_title_value",
180
+ 20: "acc_descr",
181
+ 21: "acc_descr_value",
182
+ 22: "acc_descr_multiline_value",
183
+ 23: "section",
184
+ 26: "period",
185
+ 27: "event",
186
+ 28: "open_directive",
187
+ 29: "type_directive",
188
+ 30: "arg_directive",
189
+ 31: "close_directive"
190
+ },
191
+ productions_: [
192
+ 0,
193
+ [
194
+ 3,
195
+ 3
196
+ ],
197
+ [
198
+ 3,
199
+ 2
200
+ ],
201
+ [
202
+ 5,
203
+ 0
204
+ ],
205
+ [
206
+ 5,
207
+ 2
208
+ ],
209
+ [
210
+ 8,
211
+ 2
212
+ ],
213
+ [
214
+ 8,
215
+ 1
216
+ ],
217
+ [
218
+ 8,
219
+ 1
220
+ ],
221
+ [
222
+ 8,
223
+ 1
224
+ ],
225
+ [
226
+ 7,
227
+ 4
228
+ ],
229
+ [
230
+ 7,
231
+ 6
232
+ ],
233
+ [
234
+ 10,
235
+ 1
236
+ ],
237
+ [
238
+ 10,
239
+ 2
240
+ ],
241
+ [
242
+ 10,
243
+ 2
244
+ ],
245
+ [
246
+ 10,
247
+ 1
248
+ ],
249
+ [
250
+ 10,
251
+ 1
252
+ ],
253
+ [
254
+ 10,
255
+ 1
256
+ ],
257
+ [
258
+ 10,
259
+ 1
260
+ ],
261
+ [
262
+ 10,
263
+ 1
264
+ ],
265
+ [
266
+ 24,
267
+ 1
268
+ ],
269
+ [
270
+ 25,
271
+ 1
272
+ ],
273
+ [
274
+ 12,
275
+ 1
276
+ ],
277
+ [
278
+ 13,
279
+ 1
280
+ ],
281
+ [
282
+ 16,
283
+ 1
284
+ ],
285
+ [
286
+ 14,
287
+ 1
288
+ ]
289
+ ],
290
+ performAction: function performAction(r, a, h, u, y, c, L) {
291
+ var x = c.length - 1;
292
+ switch(y){
293
+ case 1:
294
+ return c[x - 1];
295
+ case 3:
296
+ this.$ = [];
297
+ break;
298
+ case 4:
299
+ c[x - 1].push(c[x]), this.$ = c[x - 1];
300
+ break;
301
+ case 5:
302
+ case 6:
303
+ this.$ = c[x];
304
+ break;
305
+ case 7:
306
+ case 8:
307
+ this.$ = [];
308
+ break;
309
+ case 11:
310
+ u.getCommonDb().setDiagramTitle(c[x].substr(6)), this.$ = c[x].substr(6);
311
+ break;
312
+ case 12:
313
+ this.$ = c[x].trim(), u.getCommonDb().setAccTitle(this.$);
314
+ break;
315
+ case 13:
316
+ case 14:
317
+ this.$ = c[x].trim(), u.getCommonDb().setAccDescription(this.$);
318
+ break;
319
+ case 15:
320
+ u.addSection(c[x].substr(8)), this.$ = c[x].substr(8);
321
+ break;
322
+ case 19:
323
+ u.addTask(c[x], 0, ""), this.$ = c[x];
324
+ break;
325
+ case 20:
326
+ u.addEvent(c[x].substr(2)), this.$ = c[x];
327
+ break;
328
+ case 21:
329
+ u.parseDirective("%%{", "open_directive");
330
+ break;
331
+ case 22:
332
+ u.parseDirective(c[x], "type_directive");
333
+ break;
334
+ case 23:
335
+ c[x] = c[x].trim().replace(/'/g, '"'), u.parseDirective(c[x], "arg_directive");
336
+ break;
337
+ case 24:
338
+ u.parseDirective("}%%", "close_directive", "timeline");
339
+ break;
340
+ }
341
+ },
342
+ table: [
343
+ {
344
+ 3: 1,
345
+ 4: t,
346
+ 7: 3,
347
+ 12: 4,
348
+ 28: e
349
+ },
350
+ {
351
+ 1: [
352
+ 3
353
+ ]
354
+ },
355
+ n(s, [
356
+ 2,
357
+ 3
358
+ ], {
359
+ 5: 6
360
+ }),
361
+ {
362
+ 3: 7,
363
+ 4: t,
364
+ 7: 3,
365
+ 12: 4,
366
+ 28: e
367
+ },
368
+ {
369
+ 13: 8,
370
+ 29: [
371
+ 1,
372
+ 9
373
+ ]
374
+ },
375
+ {
376
+ 29: [
377
+ 2,
378
+ 21
379
+ ]
380
+ },
381
+ {
382
+ 6: [
383
+ 1,
384
+ 10
385
+ ],
386
+ 7: 22,
387
+ 8: 11,
388
+ 9: [
389
+ 1,
390
+ 12
391
+ ],
392
+ 10: 13,
393
+ 11: [
394
+ 1,
395
+ 14
396
+ ],
397
+ 12: 4,
398
+ 17: i,
399
+ 18: o,
400
+ 20: l,
401
+ 22: p,
402
+ 23: g,
403
+ 24: 20,
404
+ 25: 21,
405
+ 26: d,
406
+ 27: f,
407
+ 28: e
408
+ },
409
+ {
410
+ 1: [
411
+ 2,
412
+ 2
413
+ ]
414
+ },
415
+ {
416
+ 14: 25,
417
+ 15: [
418
+ 1,
419
+ 26
420
+ ],
421
+ 31: S
422
+ },
423
+ n([
424
+ 15,
425
+ 31
426
+ ], [
427
+ 2,
428
+ 22
429
+ ]),
430
+ n(s, [
431
+ 2,
432
+ 8
433
+ ], {
434
+ 1: [
435
+ 2,
436
+ 1
437
+ ]
438
+ }),
439
+ n(s, [
440
+ 2,
441
+ 4
442
+ ]),
443
+ {
444
+ 7: 22,
445
+ 10: 28,
446
+ 12: 4,
447
+ 17: i,
448
+ 18: o,
449
+ 20: l,
450
+ 22: p,
451
+ 23: g,
452
+ 24: 20,
453
+ 25: 21,
454
+ 26: d,
455
+ 27: f,
456
+ 28: e
457
+ },
458
+ n(s, [
459
+ 2,
460
+ 6
461
+ ]),
462
+ n(s, [
463
+ 2,
464
+ 7
465
+ ]),
466
+ n(s, [
467
+ 2,
468
+ 11
469
+ ]),
470
+ {
471
+ 19: [
472
+ 1,
473
+ 29
474
+ ]
475
+ },
476
+ {
477
+ 21: [
478
+ 1,
479
+ 30
480
+ ]
481
+ },
482
+ n(s, [
483
+ 2,
484
+ 14
485
+ ]),
486
+ n(s, [
487
+ 2,
488
+ 15
489
+ ]),
490
+ n(s, [
491
+ 2,
492
+ 16
493
+ ]),
494
+ n(s, [
495
+ 2,
496
+ 17
497
+ ]),
498
+ n(s, [
499
+ 2,
500
+ 18
501
+ ]),
502
+ n(s, [
503
+ 2,
504
+ 19
505
+ ]),
506
+ n(s, [
507
+ 2,
508
+ 20
509
+ ]),
510
+ {
511
+ 11: [
512
+ 1,
513
+ 31
514
+ ]
515
+ },
516
+ {
517
+ 16: 32,
518
+ 30: [
519
+ 1,
520
+ 33
521
+ ]
522
+ },
523
+ {
524
+ 11: [
525
+ 2,
526
+ 24
527
+ ]
528
+ },
529
+ n(s, [
530
+ 2,
531
+ 5
532
+ ]),
533
+ n(s, [
534
+ 2,
535
+ 12
536
+ ]),
537
+ n(s, [
538
+ 2,
539
+ 13
540
+ ]),
541
+ n(_, [
542
+ 2,
543
+ 9
544
+ ]),
545
+ {
546
+ 14: 34,
547
+ 31: S
548
+ },
549
+ {
550
+ 31: [
551
+ 2,
552
+ 23
553
+ ]
554
+ },
555
+ {
556
+ 11: [
557
+ 1,
558
+ 35
559
+ ]
560
+ },
561
+ n(_, [
562
+ 2,
563
+ 10
564
+ ])
565
+ ],
566
+ defaultActions: {
567
+ 5: [
568
+ 2,
569
+ 21
570
+ ],
571
+ 7: [
572
+ 2,
573
+ 2
574
+ ],
575
+ 27: [
576
+ 2,
577
+ 24
578
+ ],
579
+ 33: [
580
+ 2,
581
+ 23
582
+ ]
583
+ },
584
+ parseError: function parseError(r, a) {
585
+ if (a.recoverable) this.trace(r);
586
+ else {
587
+ var h = new Error(r);
588
+ throw h.hash = a, h;
589
+ }
590
+ },
591
+ parse: function parse(r) {
592
+ var a = this, h = [
593
+ 0
594
+ ], u = [], y = [
595
+ null
596
+ ], c = [], L = this.table, x = "", z = 0, O = 0, C = 2, w = 1, $ = c.slice.call(arguments, 1), m = Object.create(this.lexer), N = {
597
+ yy: {}
598
+ };
599
+ for(var A in this.yy)Object.prototype.hasOwnProperty.call(this.yy, A) && (N.yy[A] = this.yy[A]);
600
+ m.setInput(r, N.yy), N.yy.lexer = m, N.yy.parser = this, _type_of(m.yylloc) > "u" && (m.yylloc = {});
601
+ var j = m.yylloc;
602
+ c.push(j);
603
+ var K = m.options && m.options.ranges;
604
+ typeof N.yy.parseError == "function" ? this.parseError = N.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
605
+ function _t() {
606
+ var H;
607
+ return H = u.pop() || m.lex() || w, typeof H != "number" && (_instanceof(H, Array) && (u = H, H = u.pop()), H = a.symbols_[H] || H), H;
608
+ }
609
+ for(var E, V, M, Q, F = {}, G, P, et, q;;){
610
+ if (V = h[h.length - 1], this.defaultActions[V] ? M = this.defaultActions[V] : ((E === null || (typeof E === "undefined" ? "undefined" : _type_of(E)) > "u") && (E = _t()), M = L[V] && L[V][E]), (typeof M === "undefined" ? "undefined" : _type_of(M)) > "u" || !M.length || !M[0]) {
611
+ var X = "";
612
+ q = [];
613
+ for(G in L[V])this.terminals_[G] && G > C && q.push("'" + this.terminals_[G] + "'");
614
+ m.showPosition ? X = "Parse error on line " + (z + 1) + ":\n" + m.showPosition() + "\nExpecting " + q.join(", ") + ", got '" + (this.terminals_[E] || E) + "'" : X = "Parse error on line " + (z + 1) + ": Unexpected " + (E == w ? "end of input" : "'" + (this.terminals_[E] || E) + "'"), this.parseError(X, {
615
+ text: m.match,
616
+ token: this.terminals_[E] || E,
617
+ line: m.yylineno,
618
+ loc: j,
619
+ expected: q
620
+ });
621
+ }
622
+ if (_instanceof(M[0], Array) && M.length > 1) throw new Error("Parse Error: multiple actions possible at state: " + V + ", token: " + E);
623
+ switch(M[0]){
624
+ case 1:
625
+ h.push(E), y.push(m.yytext), c.push(m.yylloc), h.push(M[1]), E = null, O = m.yyleng, x = m.yytext, z = m.yylineno, j = m.yylloc;
626
+ break;
627
+ case 2:
628
+ if (P = this.productions_[M[1]][1], F.$ = y[y.length - P], F._$ = {
629
+ first_line: c[c.length - (P || 1)].first_line,
630
+ last_line: c[c.length - 1].last_line,
631
+ first_column: c[c.length - (P || 1)].first_column,
632
+ last_column: c[c.length - 1].last_column
633
+ }, K && (F._$.range = [
634
+ c[c.length - (P || 1)].range[0],
635
+ c[c.length - 1].range[1]
636
+ ]), Q = this.performAction.apply(F, [
637
+ x,
638
+ O,
639
+ z,
640
+ N.yy,
641
+ M[1],
642
+ y,
643
+ c
644
+ ].concat($)), (typeof Q === "undefined" ? "undefined" : _type_of(Q)) < "u") return Q;
645
+ P && (h = h.slice(0, -1 * P * 2), y = y.slice(0, -1 * P), c = c.slice(0, -1 * P)), h.push(this.productions_[M[1]][0]), y.push(F.$), c.push(F._$), et = L[h[h.length - 2]][h[h.length - 1]], h.push(et);
646
+ break;
647
+ case 3:
648
+ return !0;
649
+ }
650
+ }
651
+ return !0;
652
+ }
653
+ }, v = function() {
654
+ var k = {
655
+ EOF: 1,
656
+ parseError: function parseError(a, h) {
657
+ if (this.yy.parser) this.yy.parser.parseError(a, h);
658
+ else throw new Error(a);
659
+ },
660
+ // resets the lexer, sets new input
661
+ setInput: function setInput(r, a) {
662
+ return this.yy = a || this.yy || {}, this._input = r, this._more = this._backtrack = this.done = !1, this.yylineno = this.yyleng = 0, this.yytext = this.matched = this.match = "", this.conditionStack = [
663
+ "INITIAL"
664
+ ], this.yylloc = {
665
+ first_line: 1,
666
+ first_column: 0,
667
+ last_line: 1,
668
+ last_column: 0
669
+ }, this.options.ranges && (this.yylloc.range = [
670
+ 0,
671
+ 0
672
+ ]), this.offset = 0, this;
673
+ },
674
+ // consumes and returns one char from the input
675
+ input: function input() {
676
+ var r = this._input[0];
677
+ this.yytext += r, this.yyleng++, this.offset++, this.match += r, this.matched += r;
678
+ var a = r.match(/(?:\r\n?|\n).*/g);
679
+ return a ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++, this.options.ranges && this.yylloc.range[1]++, this._input = this._input.slice(1), r;
680
+ },
681
+ // unshifts one char (or a string) into the input
682
+ unput: function unput(r) {
683
+ var a = r.length, h = r.split(/(?:\r\n?|\n)/g);
684
+ this._input = r + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - a), this.offset -= a;
685
+ var u = this.match.split(/(?:\r\n?|\n)/g);
686
+ 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);
687
+ var y = this.yylloc.range;
688
+ return this.yylloc = {
689
+ first_line: this.yylloc.first_line,
690
+ last_line: this.yylineno + 1,
691
+ first_column: this.yylloc.first_column,
692
+ last_column: h ? (h.length === u.length ? this.yylloc.first_column : 0) + u[u.length - h.length].length - h[0].length : this.yylloc.first_column - a
693
+ }, this.options.ranges && (this.yylloc.range = [
694
+ y[0],
695
+ y[0] + this.yyleng - a
696
+ ]), this.yyleng = this.yytext.length, this;
697
+ },
698
+ // When called from action, caches matched text and appends it on next action
699
+ more: function more() {
700
+ return this._more = !0, this;
701
+ },
702
+ // 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.
703
+ reject: function reject() {
704
+ if (this.options.backtrack_lexer) this._backtrack = !0;
705
+ 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(), {
706
+ text: "",
707
+ token: null,
708
+ line: this.yylineno
709
+ });
710
+ return this;
711
+ },
712
+ // retain first n characters of the match
713
+ less: function less(r) {
714
+ this.unput(this.match.slice(r));
715
+ },
716
+ // displays already matched input, i.e. for error messages
717
+ pastInput: function pastInput() {
718
+ var r = this.matched.substr(0, this.matched.length - this.match.length);
719
+ return (r.length > 20 ? "..." : "") + r.substr(-20).replace(/\n/g, "");
720
+ },
721
+ // displays upcoming input, i.e. for error messages
722
+ upcomingInput: function upcomingInput() {
723
+ var r = this.match;
724
+ return r.length < 20 && (r += this._input.substr(0, 20 - r.length)), (r.substr(0, 20) + (r.length > 20 ? "..." : "")).replace(/\n/g, "");
725
+ },
726
+ // displays the character position where the lexing error occurred, i.e. for error messages
727
+ showPosition: function showPosition() {
728
+ var r = this.pastInput(), a = new Array(r.length + 1).join("-");
729
+ return r + this.upcomingInput() + "\n" + a + "^";
730
+ },
731
+ // test the lexed token: return FALSE when not a match, otherwise return token
732
+ test_match: function test_match(r, a) {
733
+ var h, u, y;
734
+ if (this.options.backtrack_lexer && (y = {
735
+ yylineno: this.yylineno,
736
+ yylloc: {
737
+ first_line: this.yylloc.first_line,
738
+ last_line: this.last_line,
739
+ first_column: this.yylloc.first_column,
740
+ last_column: this.yylloc.last_column
741
+ },
742
+ yytext: this.yytext,
743
+ match: this.match,
744
+ matches: this.matches,
745
+ matched: this.matched,
746
+ yyleng: this.yyleng,
747
+ offset: this.offset,
748
+ _more: this._more,
749
+ _input: this._input,
750
+ yy: this.yy,
751
+ conditionStack: this.conditionStack.slice(0),
752
+ done: this.done
753
+ }, this.options.ranges && (y.yylloc.range = this.yylloc.range.slice(0))), u = r[0].match(/(?:\r\n?|\n).*/g), u && (this.yylineno += u.length), this.yylloc = {
754
+ first_line: this.yylloc.last_line,
755
+ last_line: this.yylineno + 1,
756
+ first_column: this.yylloc.last_column,
757
+ last_column: u ? u[u.length - 1].length - u[u.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + r[0].length
758
+ }, this.yytext += r[0], this.match += r[0], this.matches = r, this.yyleng = this.yytext.length, this.options.ranges && (this.yylloc.range = [
759
+ this.offset,
760
+ this.offset += this.yyleng
761
+ ]), this._more = !1, this._backtrack = !1, this._input = this._input.slice(r[0].length), this.matched += r[0], h = this.performAction.call(this, this.yy, this, a, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), h) return h;
762
+ if (this._backtrack) {
763
+ for(var c in y)this[c] = y[c];
764
+ return !1;
765
+ }
766
+ return !1;
767
+ },
768
+ // return next match in input
769
+ next: function next() {
770
+ if (this.done) return this.EOF;
771
+ this._input || (this.done = !0);
772
+ var r, a, h, u;
773
+ this._more || (this.yytext = "", this.match = "");
774
+ for(var y = this._currentRules(), c = 0; c < y.length; c++)if (h = this._input.match(this.rules[y[c]]), h && (!a || h[0].length > a[0].length)) {
775
+ if (a = h, u = c, this.options.backtrack_lexer) {
776
+ if (r = this.test_match(h, y[c]), r !== !1) return r;
777
+ if (this._backtrack) {
778
+ a = !1;
779
+ continue;
780
+ } else return !1;
781
+ } else if (!this.options.flex) break;
782
+ }
783
+ return a ? (r = this.test_match(a, y[u]), r !== !1 ? r : !1) : this._input === "" ? this.EOF : this.parseError("Lexical error on line " + (this.yylineno + 1) + ". Unrecognized text.\n" + this.showPosition(), {
784
+ text: "",
785
+ token: null,
786
+ line: this.yylineno
787
+ });
788
+ },
789
+ // return next match that has a token
790
+ lex: function lex() {
791
+ var a = this.next();
792
+ return a || this.lex();
793
+ },
794
+ // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)
795
+ begin: function begin(a) {
796
+ this.conditionStack.push(a);
797
+ },
798
+ // pop the previously active lexer condition state off the condition stack
799
+ popState: function popState() {
800
+ var a = this.conditionStack.length - 1;
801
+ return a > 0 ? this.conditionStack.pop() : this.conditionStack[0];
802
+ },
803
+ // produce the lexer rule set which is active for the currently active lexer condition state
804
+ _currentRules: function _currentRules() {
805
+ return this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1] ? this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules : this.conditions.INITIAL.rules;
806
+ },
807
+ // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available
808
+ topState: function topState(a) {
809
+ return a = this.conditionStack.length - 1 - Math.abs(a || 0), a >= 0 ? this.conditionStack[a] : "INITIAL";
810
+ },
811
+ // alias for begin(condition)
812
+ pushState: function pushState(a) {
813
+ this.begin(a);
814
+ },
815
+ // return the number of states currently on the stack
816
+ stateStackSize: function stateStackSize() {
817
+ return this.conditionStack.length;
818
+ },
819
+ options: {
820
+ "case-insensitive": !0
821
+ },
822
+ performAction: function performAction(a, h, u, y) {
823
+ switch(u){
824
+ case 0:
825
+ return this.begin("open_directive"), 28;
826
+ case 1:
827
+ return this.begin("type_directive"), 29;
828
+ case 2:
829
+ return this.popState(), this.begin("arg_directive"), 15;
830
+ case 3:
831
+ return this.popState(), this.popState(), 31;
832
+ case 4:
833
+ return 30;
834
+ case 5:
835
+ break;
836
+ case 6:
837
+ break;
838
+ case 7:
839
+ return 11;
840
+ case 8:
841
+ break;
842
+ case 9:
843
+ break;
844
+ case 10:
845
+ return 4;
846
+ case 11:
847
+ return 17;
848
+ case 12:
849
+ return this.begin("acc_title"), 18;
850
+ case 13:
851
+ return this.popState(), "acc_title_value";
852
+ case 14:
853
+ return this.begin("acc_descr"), 20;
854
+ case 15:
855
+ return this.popState(), "acc_descr_value";
856
+ case 16:
857
+ this.begin("acc_descr_multiline");
858
+ break;
859
+ case 17:
860
+ this.popState();
861
+ break;
862
+ case 18:
863
+ return "acc_descr_multiline_value";
864
+ case 19:
865
+ return 23;
866
+ case 20:
867
+ return 27;
868
+ case 21:
869
+ return 26;
870
+ case 22:
871
+ return 6;
872
+ case 23:
873
+ return "INVALID";
874
+ }
875
+ },
876
+ rules: [
877
+ /^(?:%%\{)/i,
878
+ /^(?:((?:(?!\}%%)[^:.])*))/i,
879
+ /^(?::)/i,
880
+ /^(?:\}%%)/i,
881
+ /^(?:((?:(?!\}%%).|\n)*))/i,
882
+ /^(?:%(?!\{)[^\n]*)/i,
883
+ /^(?:[^\}]%%[^\n]*)/i,
884
+ /^(?:[\n]+)/i,
885
+ /^(?:\s+)/i,
886
+ /^(?:#[^\n]*)/i,
887
+ /^(?:timeline\b)/i,
888
+ /^(?:title\s[^#\n;]+)/i,
889
+ /^(?:accTitle\s*:\s*)/i,
890
+ /^(?:(?!\n||)*[^\n]*)/i,
891
+ /^(?:accDescr\s*:\s*)/i,
892
+ /^(?:(?!\n||)*[^\n]*)/i,
893
+ /^(?:accDescr\s*\{\s*)/i,
894
+ /^(?:[\}])/i,
895
+ /^(?:[^\}]*)/i,
896
+ /^(?:section\s[^#:\n;]+)/i,
897
+ /^(?::\s[^#:\n;]+)/i,
898
+ /^(?:[^#:\n;]+)/i,
899
+ /^(?:$)/i,
900
+ /^(?:.)/i
901
+ ],
902
+ conditions: {
903
+ open_directive: {
904
+ rules: [
905
+ 1
906
+ ],
907
+ inclusive: !1
908
+ },
909
+ type_directive: {
910
+ rules: [
911
+ 2,
912
+ 3
913
+ ],
914
+ inclusive: !1
915
+ },
916
+ arg_directive: {
917
+ rules: [
918
+ 3,
919
+ 4
920
+ ],
921
+ inclusive: !1
922
+ },
923
+ acc_descr_multiline: {
924
+ rules: [
925
+ 17,
926
+ 18
927
+ ],
928
+ inclusive: !1
929
+ },
930
+ acc_descr: {
931
+ rules: [
932
+ 15
933
+ ],
934
+ inclusive: !1
935
+ },
936
+ acc_title: {
937
+ rules: [
938
+ 13
939
+ ],
940
+ inclusive: !1
941
+ },
942
+ INITIAL: {
943
+ rules: [
944
+ 0,
945
+ 5,
946
+ 6,
947
+ 7,
948
+ 8,
949
+ 9,
950
+ 10,
951
+ 11,
952
+ 12,
953
+ 14,
954
+ 16,
955
+ 19,
956
+ 20,
957
+ 21,
958
+ 22,
959
+ 23
960
+ ],
961
+ inclusive: !0
962
+ }
963
+ }
964
+ };
965
+ return k;
966
+ }();
967
+ b.lexer = v;
968
+ function I() {
969
+ this.yy = {};
970
+ }
971
+ return I.prototype = b, b.Parser = I, new I();
972
+ }();
973
+ Y.parser = Y;
974
+ var Nt = Y;
975
+ var W = "", at = 0;
976
+ var D = [], Z = [], B = [], ct = function() {
977
+ return Jg;
978
+ }, lt = function(n, t, e) {
979
+ $a(globalThis, n, t, e);
980
+ }, ot = function ot() {
981
+ D.length = 0, Z.length = 0, W = "", B.length = 0, Fa();
982
+ }, ht = function ht(n) {
983
+ W = n, D.push(n);
984
+ }, dt = function dt() {
985
+ return D;
986
+ }, ut = function ut() {
987
+ var _Z;
988
+ var n = it();
989
+ var t = 100;
990
+ var e = 0;
991
+ for(; !n && e < t;)n = it(), e++;
992
+ return (_Z = Z).push.apply(_Z, _to_consumable_array(B)), Z;
993
+ }, pt = function pt(n, t, e) {
994
+ var s = {
995
+ id: at++,
996
+ section: W,
997
+ type: W,
998
+ task: n,
999
+ score: t || 0,
1000
+ //if event is defined, then add it the events array
1001
+ events: e ? [
1002
+ e
1003
+ ] : []
1004
+ };
1005
+ B.push(s);
1006
+ }, yt = function yt(n) {
1007
+ B.find(function(e) {
1008
+ return e.id === at - 1;
1009
+ }).events.push(n);
1010
+ }, gt = function gt(n) {
1011
+ var t = {
1012
+ section: W,
1013
+ type: W,
1014
+ description: n,
1015
+ task: n,
1016
+ classes: []
1017
+ };
1018
+ Z.push(t);
1019
+ }, it = function it() {
1020
+ var n = function n(e) {
1021
+ return B[e].processed;
1022
+ };
1023
+ var t = !0;
1024
+ var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
1025
+ try {
1026
+ for(var _iterator = B.entries()[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
1027
+ var _step_value = _sliced_to_array(_step.value, 2), e = _step_value[0], s = _step_value[1];
1028
+ n(e), t = t && s.processed;
1029
+ }
1030
+ } catch (err) {
1031
+ _didIteratorError = true;
1032
+ _iteratorError = err;
1033
+ } finally{
1034
+ try {
1035
+ if (!_iteratorNormalCompletion && _iterator.return != null) {
1036
+ _iterator.return();
1037
+ }
1038
+ } finally{
1039
+ if (_didIteratorError) {
1040
+ throw _iteratorError;
1041
+ }
1042
+ }
1043
+ }
1044
+ return t;
1045
+ }, Mt = {
1046
+ clear: ot,
1047
+ getCommonDb: ct,
1048
+ addSection: ht,
1049
+ getSections: dt,
1050
+ getTasks: ut,
1051
+ addTask: pt,
1052
+ addTaskOrg: gt,
1053
+ addEvent: yt,
1054
+ parseDirective: lt
1055
+ }, Lt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1056
+ __proto__: null,
1057
+ addEvent: yt,
1058
+ addSection: ht,
1059
+ addTask: pt,
1060
+ addTaskOrg: gt,
1061
+ clear: ot,
1062
+ default: Mt,
1063
+ getCommonDb: ct,
1064
+ getSections: dt,
1065
+ getTasks: ut,
1066
+ parseDirective: lt
1067
+ }, Symbol.toStringTag, {
1068
+ value: "Module"
1069
+ })), $t = 12, J = function J(n, t) {
1070
+ var e = n.append("rect");
1071
+ return e.attr("x", t.x), e.attr("y", t.y), e.attr("fill", t.fill), e.attr("stroke", t.stroke), e.attr("width", t.width), e.attr("height", t.height), e.attr("rx", t.rx), e.attr("ry", t.ry), t.class !== void 0 && e.attr("class", t.class), e;
1072
+ }, At = function At(n, t) {
1073
+ var s = n.append("circle").attr("cx", t.cx).attr("cy", t.cy).attr("class", "face").attr("r", 15).attr("stroke-width", 2).attr("overflow", "visible"), i = n.append("g");
1074
+ i.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"), i.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");
1075
+ function o(g) {
1076
+ var d = hn().startAngle(Math.PI / 2).endAngle(3 * (Math.PI / 2)).innerRadius(7.5).outerRadius(6.8181818181818175);
1077
+ g.append("path").attr("class", "mouth").attr("d", d).attr("transform", "translate(" + t.cx + "," + (t.cy + 2) + ")");
1078
+ }
1079
+ function l(g) {
1080
+ var d = hn().startAngle(3 * Math.PI / 2).endAngle(5 * (Math.PI / 2)).innerRadius(7.5).outerRadius(6.8181818181818175);
1081
+ g.append("path").attr("class", "mouth").attr("d", d).attr("transform", "translate(" + t.cx + "," + (t.cy + 7) + ")");
1082
+ }
1083
+ function p(g) {
1084
+ g.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");
1085
+ }
1086
+ return t.score > 3 ? o(i) : t.score < 3 ? l(i) : p(i), s;
1087
+ }, Pt = function Pt(n, t) {
1088
+ var e = n.append("circle");
1089
+ return e.attr("cx", t.cx), e.attr("cy", t.cy), e.attr("class", "actor-" + t.pos), e.attr("fill", t.fill), e.attr("stroke", t.stroke), e.attr("r", t.r), e.class !== void 0 && e.attr("class", e.class), t.title !== void 0 && e.append("title").text(t.title), e;
1090
+ }, ft = function ft(n, t) {
1091
+ var e = t.text.replace(/<br\s*\/?>/gi, " "), s = n.append("text");
1092
+ s.attr("x", t.x), s.attr("y", t.y), s.attr("class", "legend"), s.style("text-anchor", t.anchor), t.class !== void 0 && s.attr("class", t.class);
1093
+ var i = s.append("tspan");
1094
+ return i.attr("x", t.x + t.textMargin * 2), i.text(e), s;
1095
+ }, Ht = function Ht(n, t) {
1096
+ function e(i, o, l, p, g) {
1097
+ return i + "," + o + " " + (i + l) + "," + o + " " + (i + l) + "," + (o + p - g) + " " + (i + l - g * 1.2) + "," + (o + p) + " " + i + "," + (o + p);
1098
+ }
1099
+ var s = n.append("polygon");
1100
+ s.attr("points", e(t.x, t.y, 50, 20, 7)), s.attr("class", "labelBox"), t.y = t.y + t.labelMargin, t.x = t.x + 0.5 * t.labelMargin, ft(n, t);
1101
+ }, Ct = function Ct(n, t, e) {
1102
+ var s = n.append("g"), i = tt();
1103
+ i.x = t.x, i.y = t.y, i.fill = t.fill, i.width = e.width, i.height = e.height, i.class = "journey-section section-type-" + t.num, i.rx = 3, i.ry = 3, J(s, i), mt(e)(t.text, s, i.x, i.y, i.width, i.height, {
1104
+ class: "journey-section section-type-" + t.num
1105
+ }, e, t.colour);
1106
+ };
1107
+ var st = -1;
1108
+ var zt = function zt(n, t, e) {
1109
+ var s = t.x + e.width / 2, i = n.append("g");
1110
+ st++;
1111
+ var o = 300 + 5 * 30;
1112
+ i.append("line").attr("id", "task" + st).attr("x1", s).attr("y1", t.y).attr("x2", s).attr("y2", o).attr("class", "task-line").attr("stroke-width", "1px").attr("stroke-dasharray", "4 2").attr("stroke", "#666"), At(i, {
1113
+ cx: s,
1114
+ cy: 300 + (5 - t.score) * 30,
1115
+ score: t.score
1116
+ });
1117
+ var l = tt();
1118
+ l.x = t.x, l.y = t.y, l.fill = t.fill, l.width = e.width, l.height = e.height, l.class = "task task-type-" + t.num, l.rx = 3, l.ry = 3, J(i, l), t.x + 14, mt(e)(t.task, i, l.x, l.y, l.width, l.height, {
1119
+ class: "task"
1120
+ }, e, t.colour);
1121
+ }, Vt = function Vt(n, t) {
1122
+ J(n, {
1123
+ x: t.startx,
1124
+ y: t.starty,
1125
+ width: t.stopx - t.startx,
1126
+ height: t.stopy - t.starty,
1127
+ fill: t.fill,
1128
+ class: "rect"
1129
+ }).lower();
1130
+ }, Rt = function Rt() {
1131
+ return {
1132
+ x: 0,
1133
+ y: 0,
1134
+ fill: void 0,
1135
+ "text-anchor": "start",
1136
+ width: 100,
1137
+ height: 100,
1138
+ textMargin: 0,
1139
+ rx: 0,
1140
+ ry: 0
1141
+ };
1142
+ }, tt = function tt() {
1143
+ return {
1144
+ x: 0,
1145
+ y: 0,
1146
+ width: 100,
1147
+ anchor: "start",
1148
+ height: 100,
1149
+ rx: 0,
1150
+ ry: 0
1151
+ };
1152
+ }, mt = function() {
1153
+ function n(i, o, l, p, g, d, f, S) {
1154
+ var _ = o.append("text").attr("x", l + g / 2).attr("y", p + d / 2 + 5).style("font-color", S).style("text-anchor", "middle").text(i);
1155
+ s(_, f);
1156
+ }
1157
+ function t(i, o, l, p, g, d, f, S, _) {
1158
+ var b = S.taskFontSize, v = S.taskFontFamily, I = i.split(/<br\s*\/?>/gi);
1159
+ for(var k = 0; k < I.length; k++){
1160
+ var r = k * b - b * (I.length - 1) / 2, a = o.append("text").attr("x", l + g / 2).attr("y", p).attr("fill", _).style("text-anchor", "middle").style("font-size", b).style("font-family", v);
1161
+ a.append("tspan").attr("x", l + g / 2).attr("dy", r).text(I[k]), a.attr("y", p + d / 2).attr("dominant-baseline", "central").attr("alignment-baseline", "central"), s(a, f);
1162
+ }
1163
+ }
1164
+ function e(i, o, l, p, g, d, f, S) {
1165
+ var _ = o.append("switch"), v = _.append("foreignObject").attr("x", l).attr("y", p).attr("width", g).attr("height", d).attr("position", "fixed").append("xhtml:div").style("display", "table").style("height", "100%").style("width", "100%");
1166
+ v.append("div").attr("class", "label").style("display", "table-cell").style("text-align", "center").style("vertical-align", "middle").text(i), t(i, _, l, p, g, d, f, S), s(v, f);
1167
+ }
1168
+ function s(i, o) {
1169
+ for(var l in o)l in o && i.attr(l, o[l]);
1170
+ }
1171
+ return function(i) {
1172
+ return i.textPlacement === "fo" ? e : i.textPlacement === "old" ? n : t;
1173
+ };
1174
+ }(), Ft = function Ft(n) {
1175
+ n.append("defs").append("marker").attr("id", "arrowhead").attr("refX", 5).attr("refY", 2).attr("markerWidth", 6).attr("markerHeight", 4).attr("orient", "auto").append("path").attr("d", "M 0,0 V 4 L6,2 Z");
1176
+ };
1177
+ function xt(n, t) {
1178
+ n.each(function() {
1179
+ var e = At$1(this), s = e.text().split(/(\s+|<br>)/).reverse(), i, o = [], l = 1.1, p = e.attr("y"), g = parseFloat(e.attr("dy")), d = e.text(null).append("tspan").attr("x", 0).attr("y", p).attr("dy", g + "em");
1180
+ for(var f = 0; f < s.length; f++)i = s[s.length - 1 - f], o.push(i), d.text(o.join(" ").trim()), (d.node().getComputedTextLength() > t || i === "<br>") && (o.pop(), d.text(o.join(" ").trim()), i === "<br>" ? o = [
1181
+ ""
1182
+ ] : o = [
1183
+ i
1184
+ ], d = e.append("tspan").attr("x", 0).attr("y", p).attr("dy", l + "em").text(i));
1185
+ });
1186
+ }
1187
+ var Wt = function Wt(n, t, e, s) {
1188
+ var i = e % $t - 1, o = n.append("g");
1189
+ t.section = i, o.attr("class", (t.class ? t.class + " " : "") + "timeline-node " + ("section-" + i));
1190
+ var l = o.append("g"), p = o.append("g"), d = p.append("text").text(t.descr).attr("dy", "1em").attr("alignment-baseline", "middle").attr("dominant-baseline", "middle").attr("text-anchor", "middle").call(xt, t.width).node().getBBox(), f = s.fontSize && s.fontSize.replace ? s.fontSize.replace("px", "") : s.fontSize;
1191
+ return t.height = d.height + f * 1.1 * 0.5 + t.padding, t.height = Math.max(t.height, t.maxHeight), t.width = t.width + 2 * t.padding, p.attr("transform", "translate(" + t.width / 2 + ", " + t.padding / 2 + ")"), Ot(l, t, i), t;
1192
+ }, Bt = function Bt(n, t, e) {
1193
+ var s = n.append("g"), o = s.append("text").text(t.descr).attr("dy", "1em").attr("alignment-baseline", "middle").attr("dominant-baseline", "middle").attr("text-anchor", "middle").call(xt, t.width).node().getBBox(), l = e.fontSize && e.fontSize.replace ? e.fontSize.replace("px", "") : e.fontSize;
1194
+ return s.remove(), o.height + l * 1.1 * 0.5 + t.padding;
1195
+ }, Ot = function Ot(n, t, e) {
1196
+ n.append("path").attr("id", "node-" + t.id).attr("class", "node-bkg node-" + t.type).attr("d", "M0 ".concat(t.height - 5, " v").concat(-t.height + 2 * 5, " q0,-5 5,-5 h").concat(t.width - 2 * 5, " q5,0 5,5 v").concat(t.height - 5, " H0 Z")), n.append("line").attr("class", "node-line-" + e).attr("x1", 0).attr("y1", t.height).attr("x2", t.width).attr("y2", t.height);
1197
+ }, R = {
1198
+ drawRect: J,
1199
+ drawCircle: Pt,
1200
+ drawSection: Ct,
1201
+ drawText: ft,
1202
+ drawLabel: Ht,
1203
+ drawTask: zt,
1204
+ drawBackgroundRect: Vt,
1205
+ getTextObj: Rt,
1206
+ getNoteRect: tt,
1207
+ initGraphics: Ft,
1208
+ drawNode: Wt,
1209
+ getVirtualNodeHeight: Bt
1210
+ }, jt = function jt(n, t, e, s) {
1211
+ var z, O;
1212
+ var _i_leftMargin;
1213
+ var i = Ut$1(), o = (_i_leftMargin = i.leftMargin) !== null && _i_leftMargin !== void 0 ? _i_leftMargin : 50;
1214
+ S.debug("timeline", s.db);
1215
+ var l = i.securityLevel;
1216
+ var p;
1217
+ l === "sandbox" && (p = At$1("#i" + t));
1218
+ var d = (l === "sandbox" ? At$1(p.nodes()[0].contentDocument.body) : At$1("body")).select("#" + t);
1219
+ d.append("g");
1220
+ var f = s.db.getTasks(), S$1 = s.db.getCommonDb().getDiagramTitle();
1221
+ S.debug("task", f), R.initGraphics(d);
1222
+ var _ = s.db.getSections();
1223
+ S.debug("sections", _);
1224
+ var b = 0, v = 0, I = 0, k = 0, r = 50 + o, a = 50;
1225
+ k = 50;
1226
+ var h = 0, u = !0;
1227
+ _.forEach(function(C) {
1228
+ var w = {
1229
+ number: h,
1230
+ descr: C,
1231
+ section: h,
1232
+ width: 150,
1233
+ padding: 20,
1234
+ maxHeight: b
1235
+ }, $ = R.getVirtualNodeHeight(d, w, i);
1236
+ S.debug("sectionHeight before draw", $), b = Math.max(b, $ + 20);
1237
+ });
1238
+ var y = 0, c = 0;
1239
+ S.debug("tasks.length", f.length);
1240
+ var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
1241
+ try {
1242
+ for(var _iterator = f.entries()[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
1243
+ var _step_value = _sliced_to_array(_step.value, 2), C = _step_value[0], w = _step_value[1];
1244
+ var $ = {
1245
+ number: C,
1246
+ descr: w,
1247
+ section: w.section,
1248
+ width: 150,
1249
+ padding: 20,
1250
+ maxHeight: v
1251
+ }, m = R.getVirtualNodeHeight(d, $, i);
1252
+ S.debug("taskHeight before draw", m), v = Math.max(v, m + 20), y = Math.max(y, w.events.length);
1253
+ var N = 0;
1254
+ for(var A = 0; A < w.events.length; A++){
1255
+ var K = {
1256
+ descr: w.events[A],
1257
+ section: w.section,
1258
+ number: w.section,
1259
+ width: 150,
1260
+ padding: 20,
1261
+ maxHeight: 50
1262
+ };
1263
+ N += R.getVirtualNodeHeight(d, K, i);
1264
+ }
1265
+ c = Math.max(c, N);
1266
+ }
1267
+ } catch (err) {
1268
+ _didIteratorError = true;
1269
+ _iteratorError = err;
1270
+ } finally{
1271
+ try {
1272
+ if (!_iteratorNormalCompletion && _iterator.return != null) {
1273
+ _iterator.return();
1274
+ }
1275
+ } finally{
1276
+ if (_didIteratorError) {
1277
+ throw _iteratorError;
1278
+ }
1279
+ }
1280
+ }
1281
+ S.debug("maxSectionHeight before draw", b), S.debug("maxTaskHeight before draw", v), _ && _.length > 0 ? _.forEach(function(C) {
1282
+ var w = f.filter(function(A) {
1283
+ return A.section === C;
1284
+ }), $ = {
1285
+ number: h,
1286
+ descr: C,
1287
+ section: h,
1288
+ width: 200 * Math.max(w.length, 1) - 50,
1289
+ padding: 20,
1290
+ maxHeight: b
1291
+ };
1292
+ S.debug("sectionNode", $);
1293
+ var m = d.append("g"), N = R.drawNode(m, $, h, i);
1294
+ S.debug("sectionNode output", N), m.attr("transform", "translate(".concat(r, ", ").concat(k, ")")), a += b + 50, w.length > 0 && rt(d, w, h, r, a, v, i, y, c, b, !1), r += 200 * Math.max(w.length, 1), a = k, h++;
1295
+ }) : (u = !1, rt(d, f, h, r, a, v, i, y, c, b, !0));
1296
+ var L = d.node().getBBox();
1297
+ var _ref, _ref1;
1298
+ S.debug("bounds", L), S$1 && d.append("text").text(S$1).attr("x", L.width / 2 - o).attr("font-size", "4ex").attr("font-weight", "bold").attr("y", 20), I = u ? b + v + 150 : v + 100, d.append("g").attr("class", "lineWrapper").append("line").attr("x1", o).attr("y1", I).attr("x2", L.width + 3 * o).attr("y2", I).attr("stroke-width", 4).attr("stroke", "black").attr("marker-end", "url(#arrowhead)"), Gg(void 0, d, (_ref = (z = i.timeline) == null ? void 0 : z.padding) !== null && _ref !== void 0 ? _ref : 50, (_ref1 = (O = i.timeline) == null ? void 0 : O.useMaxWidth) !== null && _ref1 !== void 0 ? _ref1 : !1);
1299
+ }, rt = function rt(n, t, e, s, i, o, l, p, g, d, f) {
1300
+ var S$1;
1301
+ var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
1302
+ try {
1303
+ for(var _iterator = t[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
1304
+ var _ = _step.value;
1305
+ var b = {
1306
+ descr: _.task,
1307
+ section: e,
1308
+ number: e,
1309
+ width: 150,
1310
+ padding: 20,
1311
+ maxHeight: o
1312
+ };
1313
+ S.debug("taskNode", b);
1314
+ var v = n.append("g").attr("class", "taskWrapper"), k = R.drawNode(v, b, e, l).height;
1315
+ if (S.debug("taskHeight after draw", k), v.attr("transform", "translate(".concat(s, ", ").concat(i, ")")), o = Math.max(o, k), _.events) {
1316
+ var r = n.append("g").attr("class", "lineWrapper");
1317
+ var a = o;
1318
+ i += 100, a = a + Gt(n, _.events, e, s, i, l), i -= 100, r.append("line").attr("x1", s + 190 / 2).attr("y1", i + o).attr("x2", s + 190 / 2).attr("y2", i + o + (f ? o : d) + g + 120).attr("stroke-width", 2).attr("stroke", "black").attr("marker-end", "url(#arrowhead)").attr("stroke-dasharray", "5,5");
1319
+ }
1320
+ s = s + 200, f && !((S$1 = l.timeline) != null && S$1.disableMulticolor) && e++;
1321
+ }
1322
+ } catch (err) {
1323
+ _didIteratorError = true;
1324
+ _iteratorError = err;
1325
+ } finally{
1326
+ try {
1327
+ if (!_iteratorNormalCompletion && _iterator.return != null) {
1328
+ _iterator.return();
1329
+ }
1330
+ } finally{
1331
+ if (_didIteratorError) {
1332
+ throw _iteratorError;
1333
+ }
1334
+ }
1335
+ }
1336
+ i = i - 10;
1337
+ }, Gt = function Gt(n, t, e, s, i, o) {
1338
+ var l = 0;
1339
+ var p = i;
1340
+ i = i + 100;
1341
+ var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
1342
+ try {
1343
+ for(var _iterator = t[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
1344
+ var g = _step.value;
1345
+ var d = {
1346
+ descr: g,
1347
+ section: e,
1348
+ number: e,
1349
+ width: 150,
1350
+ padding: 20,
1351
+ maxHeight: 50
1352
+ };
1353
+ S.debug("eventNode", d);
1354
+ var f = n.append("g").attr("class", "eventWrapper"), _ = R.drawNode(f, d, e, o).height;
1355
+ l = l + _, f.attr("transform", "translate(".concat(s, ", ").concat(i, ")")), i = i + 10 + _;
1356
+ }
1357
+ } catch (err) {
1358
+ _didIteratorError = true;
1359
+ _iteratorError = err;
1360
+ } finally{
1361
+ try {
1362
+ if (!_iteratorNormalCompletion && _iterator.return != null) {
1363
+ _iterator.return();
1364
+ }
1365
+ } finally{
1366
+ if (_didIteratorError) {
1367
+ throw _iteratorError;
1368
+ }
1369
+ }
1370
+ }
1371
+ return i = p, l;
1372
+ }, qt = {
1373
+ setConf: function() {},
1374
+ draw: jt
1375
+ }, Ut = function(n) {
1376
+ var t = "";
1377
+ for(var e = 0; e < n.THEME_COLOR_LIMIT; e++)n["lineColor" + e] = n["lineColor" + e] || n["cScaleInv" + e], si(n["lineColor" + e]) ? n["lineColor" + e] = F(n["lineColor" + e], 20) : n["lineColor" + e] = A(n["lineColor" + e], 20);
1378
+ for(var e1 = 0; e1 < n.THEME_COLOR_LIMIT; e1++){
1379
+ var s = "" + (17 - 3 * e1);
1380
+ t += "\n .section-".concat(e1 - 1, " rect, .section-").concat(e1 - 1, " path, .section-").concat(e1 - 1, " circle, .section-").concat(e1 - 1, " path {\n fill: ").concat(n["cScale" + e1], ";\n }\n .section-").concat(e1 - 1, " text {\n fill: ").concat(n["cScaleLabel" + e1], ";\n }\n .node-icon-").concat(e1 - 1, " {\n font-size: 40px;\n color: ").concat(n["cScaleLabel" + e1], ";\n }\n .section-edge-").concat(e1 - 1, "{\n stroke: ").concat(n["cScale" + e1], ";\n }\n .edge-depth-").concat(e1 - 1, "{\n stroke-width: ").concat(s, ";\n }\n .section-").concat(e1 - 1, " line {\n stroke: ").concat(n["cScaleInv" + e1], " ;\n stroke-width: 3;\n }\n\n .lineWrapper line{\n stroke: ").concat(n["cScaleLabel" + e1], " ;\n }\n\n .disabled, .disabled circle, .disabled text {\n fill: lightgray;\n }\n .disabled text {\n fill: #efefef;\n }\n ");
1381
+ }
1382
+ return t;
1383
+ }, Zt = function(n) {
1384
+ return "\n .edge {\n stroke-width: 3;\n }\n ".concat(Ut(n), "\n .section-root rect, .section-root path, .section-root circle {\n fill: ").concat(n.git0, ";\n }\n .section-root text {\n fill: ").concat(n.gitBranchLabel0, ";\n }\n .icon-container {\n height:100%;\n display: flex;\n justify-content: center;\n align-items: center;\n }\n .edge {\n fill: none;\n }\n .eventWrapper {\n filter: brightness(120%);\n }\n");
1385
+ }, Jt = Zt, Yt = {
1386
+ db: Lt,
1387
+ renderer: qt,
1388
+ parser: Nt,
1389
+ styles: Jt
1390
+ };
1391
+
1392
+ export { Yt as diagram };