@openbkn/workshop 0.2.2-rc.5 → 0.2.2

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 (158) hide show
  1. package/README.md +83 -13
  2. package/component.d.ts +10 -0
  3. package/dist/ActionConfirm-DJ91X3ml.js +236 -0
  4. package/dist/ActionFailure-ZgPt_3B-.js +37 -0
  5. package/dist/AgentChat-CRYai8ge.js +1062 -0
  6. package/dist/AppFormModal-D73ucaHK.js +4282 -0
  7. package/dist/AppListPage-D87piiOw.js +1364 -0
  8. package/dist/AskDrawer-BUMYsRnt.js +38 -0
  9. package/dist/ComputedView-CgYrDbx1.js +3221 -0
  10. package/dist/ConclusionApply-sjGfoEBY.js +153 -0
  11. package/dist/CypherEditor-lus6FA5L.js +485 -0
  12. package/dist/LandingList-6JI6864C.js +230 -0
  13. package/dist/MenuUnfoldOutlined-Cdg24l2h.js +27 -0
  14. package/dist/ModelTrial-ClHFGTpQ.js +359 -0
  15. package/dist/PageRenderer-DBd_g6mN.js +85480 -0
  16. package/dist/README-DjRyTQSR.js +76 -0
  17. package/dist/ScenarioApply-DtW_hh47.js +590 -0
  18. package/dist/SimulateForm-C-i08Jjd.js +153 -0
  19. package/dist/Subgraph-CnrkH9AN.js +32586 -0
  20. package/dist/WorkshopLabPage-DiVXQL9e.js +11364 -0
  21. package/dist/WorkshopRunPage-6hjRUf64.js +253 -0
  22. package/dist/abnfDiagram-WEYOIA3C-beRNhN3c.js +87 -0
  23. package/dist/action-type-tool.service-B2B74fKC.js +1060 -0
  24. package/dist/actionButton-DA5CNEzx.js +94 -0
  25. package/dist/actionButton.en-US-qjeqA7hs.js +94 -0
  26. package/dist/agentChat-EoDznd58.js +116 -0
  27. package/dist/agentChat.en-US-B6-pFd9Y.js +116 -0
  28. package/dist/alertList-DqditwM8.js +84 -0
  29. package/dist/alertList.en-US-BAXAgltP.js +84 -0
  30. package/dist/architectureDiagram-ZHVYKT53-DY2l1qxx.js +4779 -0
  31. package/dist/asOfSlider-QPvHWUMV.js +83 -0
  32. package/dist/asOfSlider.en-US-BI4jVfSn.js +83 -0
  33. package/dist/bkn-agent-execution.service-DVh-SHyl.js +205 -0
  34. package/dist/blockDiagram-RJAE7QA3-DR0mjN2h.js +1435 -0
  35. package/dist/c4Diagram-XDPPPE54-DH5zsGug.js +1518 -0
  36. package/dist/channel-B034hcOF.js +5 -0
  37. package/dist/china-C6m7zXIv.js +9 -0
  38. package/dist/chunk-2E7WHVMD-Ba3svxgx.js +664 -0
  39. package/dist/chunk-2Q5K7J3B-rT4eU6_y.js +15 -0
  40. package/dist/chunk-4EMNKR2T-C1kQZYHK.js +262 -0
  41. package/dist/chunk-55XCU76K-dcpLOktb.js +68 -0
  42. package/dist/chunk-5VM5RSS4-BdpQuzmO.js +19 -0
  43. package/dist/chunk-JWPE2WC7-CDBrSjU7.js +8 -0
  44. package/dist/chunk-VQ5W62QI-BiVKc40w.js +19 -0
  45. package/dist/chunk-XXDRQBXY-CPYrcdVW.js +8 -0
  46. package/dist/chunk-ZCHMQSOR-BG8OLpvb.js +451 -0
  47. package/dist/classDiagram-v2-4MYWR3UA-DqbpQpwI.js +1564 -0
  48. package/dist/component.d-DFoMKuUv.js +179 -0
  49. package/dist/cose-bilkent-JH36ORCC-CdXk4sPf.js +2609 -0
  50. package/dist/customComponents-DasaZ6pq.js +4 -0
  51. package/dist/customComponents.en-US-CkabuCXg.js +79 -0
  52. package/dist/customParseFormat-C0uLEpdq.js +182 -0
  53. package/dist/cynefin-EF2NZ3EQ-D7MVnMHu.js +21746 -0
  54. package/dist/cynefinDiagram-WF24UDRP-BYT_KpDL.js +299 -0
  55. package/dist/cytoscape.esm-BCV9V6aO.js +18760 -0
  56. package/dist/d3-scale-DA8IHmf0.js +1841 -0
  57. package/dist/dagre-NK4GIZVX-l-ghPdM8.js +2154 -0
  58. package/dist/dateRange-BbkLMg8L.js +79 -0
  59. package/dist/dateRange.en-US-CV12Q02G.js +79 -0
  60. package/dist/dayjs.min-DZ-YV8Mv.js +284 -0
  61. package/dist/diagram-CBK3MWTC-Bt3HiwvA.js +542 -0
  62. package/dist/diagram-I5XIIV2D-DcbqfBjx.js +150 -0
  63. package/dist/diagram-ODIL2UCW-9PC1n3n5.js +346 -0
  64. package/dist/diagram-PFBEJUXE-DGhr2kc7.js +478 -0
  65. package/dist/diagram-RJA3I4VV-DwzpOjZ_.js +219 -0
  66. package/dist/diagram-TYUNFSNR-B3Bd3TDU.js +2583 -0
  67. package/dist/dropdownFilter-DOi_8-ZT.js +76 -0
  68. package/dist/dropdownFilter.en-US-BiXpvXtF.js +76 -0
  69. package/dist/ebnfDiagram-V4P3TTPT-E5NN2oKc.js +109 -0
  70. package/dist/elk-QONTBCTQ-dFjcujl_.js +49170 -0
  71. package/dist/erDiagram-KYQIGQAA-BMrasBzB.js +1061 -0
  72. package/dist/eventList-CnsAwfDS.js +115 -0
  73. package/dist/eventList.en-US-Cof3rCLq.js +115 -0
  74. package/dist/eventReport-XS-HegnH.js +76 -0
  75. package/dist/eventReport.en-US-DTx4vzWT.js +76 -0
  76. package/dist/flowDiagram-IUGLLWBU-BGIBH0q0.js +1769 -0
  77. package/dist/ganttChart-DEeSvTJA.js +77 -0
  78. package/dist/ganttChart.en-US-SwRKrnoD.js +77 -0
  79. package/dist/ganttDiagram-R7GPNTJY-C0tb1Lpp.js +1741 -0
  80. package/dist/generateCypher-Ch9_lQa6.js +399 -0
  81. package/dist/gitGraphDiagram-PDYL7XHY-DBqcOa-c.js +815 -0
  82. package/dist/graph-CKJmgLki.js +1541 -0
  83. package/dist/index-BA-GzCXt.js +441 -0
  84. package/dist/infoDiagram-MVDRKAX5-Bwuki4JA.js +24 -0
  85. package/dist/ishikawaDiagram-HPEHV2GE-Dz4d6ygx.js +622 -0
  86. package/dist/journeyDiagram-BOSHW7O7-C99m34Bb.js +834 -0
  87. package/dist/kanban-definition-FNSA4HC5-mdqjODsT.js +724 -0
  88. package/dist/katex-BsrBVQKd.js +11314 -0
  89. package/dist/manifest-BjV1PJ6u.js +41 -0
  90. package/dist/mermaid.core-yQghUlIz.js +17642 -0
  91. package/dist/metricCards-CSb-_cT2.js +104 -0
  92. package/dist/metricCards.en-US-BLLhRsQU.js +104 -0
  93. package/dist/mindmap-definition-6OY57UG3-BZhO2wX4.js +834 -0
  94. package/dist/modelTrial-Bvb-RhGt.js +137 -0
  95. package/dist/modelTrial.en-US-DYcuor-G.js +137 -0
  96. package/dist/models-DekiCOuZ.js +6 -0
  97. package/dist/object-metric-numeric-vs3BeDkH.js +42 -0
  98. package/dist/object-metric.service-flZgBMRX.js +233 -0
  99. package/dist/objectDetail-SQUbp4Py.js +117 -0
  100. package/dist/objectDetail.en-US-DW3mlONM.js +117 -0
  101. package/dist/objectList-D99wPtJH.js +97 -0
  102. package/dist/objectList.en-US-PBBNyVLW.js +97 -0
  103. package/dist/objectTable-0jsFFMN3.js +127 -0
  104. package/dist/objectTable.en-US-yWEs8qc_.js +127 -0
  105. package/dist/pegDiagram-ECIUJNBX-BDa5RfZt.js +95 -0
  106. package/dist/pieDiagram-GNMPY74T-DNVtzXPv.js +165 -0
  107. package/dist/pivotTable-CHmQw18-.js +102 -0
  108. package/dist/pivotTable.en-US-B4uv4P08.js +102 -0
  109. package/dist/prompt-DYrjlEFr.js +373 -0
  110. package/dist/quadrantDiagram-D57K4MC3-vK0f2OvQ.js +1023 -0
  111. package/dist/railroadDiagram-Y72NRBL7-j6ZrTmRp.js +77 -0
  112. package/dist/regionMap-Cme-JyV_.js +128 -0
  113. package/dist/regionMap.en-US-Bwr2_p32.js +128 -0
  114. package/dist/requirementDiagram-EQYSW5RA-DgfEyljA.js +886 -0
  115. package/dist/sankeyDiagram-SY24JHO5-CImx-IX0.js +1160 -0
  116. package/dist/scenarioBar-BV43p7n-.js +122 -0
  117. package/dist/scenarioBar.en-US-5KqMQ2Bg.js +122 -0
  118. package/dist/scheduleGantt-CTYO-zYP.js +180 -0
  119. package/dist/scheduleGantt.en-US-hE7mvVUW.js +180 -0
  120. package/dist/searchBox-Ca7w0f_6.js +67 -0
  121. package/dist/searchBox.en-US-ArS_XBvB.js +67 -0
  122. package/dist/segmentedFilter-MhjVcWo0.js +80 -0
  123. package/dist/segmentedFilter.en-US-BxNrQO5T.js +80 -0
  124. package/dist/sequenceDiagram-BLEHNHQU-nWmjd1ci.js +2969 -0
  125. package/dist/sizeCapture-INFHLROL-D3jlbt7h.js +46 -0
  126. package/dist/stageChain-BxBafwjD.js +74 -0
  127. package/dist/stageChain.en-US-CP0G27n8.js +74 -0
  128. package/dist/stateDiagram-v2-A6IESKWZ-DG1ZetEu.js +1514 -0
  129. package/dist/subgraph-7n4SwliR.js +71 -0
  130. package/dist/subgraph.en-US-BNvY18IW.js +71 -0
  131. package/dist/swimlanes-B3ENRKFQ-cCmJE8AU.js +4991 -0
  132. package/dist/swimlanesDiagram-AYQRV4AK-CtuhyguU.js +14 -0
  133. package/dist/taskInbox-DGWYeI2b.js +118 -0
  134. package/dist/taskInbox.en-US-B-OzDmVl.js +118 -0
  135. package/dist/text-BqSVQKS6.js +78 -0
  136. package/dist/text.en-US-BhAxy_LE.js +78 -0
  137. package/dist/timeline-definition-JXYKGLGB-Cc-INsOv.js +1057 -0
  138. package/dist/trendChart-BjEeRS5_.js +135 -0
  139. package/dist/trendChart.en-US-BBGqWUKM.js +135 -0
  140. package/dist/useLabData-Df-jEHKs.js +20470 -0
  141. package/dist/usecaseDiagram-WPOLBNNX-r8wVjopm.js +7920 -0
  142. package/dist/vennDiagram-Q3Y3IDCW-BZiOcgrj.js +1579 -0
  143. package/dist/wardleyDiagram-IVAIDKWA-16jd07C_.js +675 -0
  144. package/dist/workshop-app-DnHNjBqy.js +86038 -0
  145. package/dist/workshop-app.css +1 -0
  146. package/dist/workshop-app.js +4 -0
  147. package/dist/world-Djau1JyJ.js +9 -0
  148. package/dist/xychartDiagram-4URNHDU4-C8DwWQNh.js +1460 -0
  149. package/dist-cli/workshop.js +341 -218
  150. package/example/host.js +109 -0
  151. package/example/index.html +93 -0
  152. package/example/server.mjs +237 -0
  153. package/index.d.ts +48 -0
  154. package/lib/validate.js +47 -1
  155. package/package.json +17 -5
  156. package/runtime/frame-runtime.js +13 -1
  157. package/workshop-component.js +32 -12
  158. package/workshop.js +2 -0
@@ -0,0 +1,1057 @@
1
+ import { _ as o, O as pt, I as nt, F as Rt, a7 as Wt, a8 as Pt, a9 as Bt, c as ft, l as E, T as Vt, V as Ft, aa as yt, k as X, W as ct, N as zt, ab as Ot, D as Gt } from "./mermaid.core-yQghUlIz.js";
2
+ var tt = (function() {
3
+ var e = /* @__PURE__ */ o(function(k, a, d, l) {
4
+ for (d = d || {}, l = k.length; l--; d[k[l]] = a) ;
5
+ return d;
6
+ }, "o"), t = [6, 11, 13, 14, 15, 17, 19, 20, 23, 24], s = [1, 12], r = [1, 13], n = [1, 14], h = [1, 15], c = [1, 16], i = [1, 19], y = [1, 20], p = {
7
+ trace: /* @__PURE__ */ o(function() {
8
+ }, "trace"),
9
+ yy: {},
10
+ 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 },
11
+ 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" },
12
+ 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]],
13
+ performAction: /* @__PURE__ */ o(function(a, d, l, g, x, u, S) {
14
+ var v = u.length - 1;
15
+ switch (x) {
16
+ case 1:
17
+ return u[v - 1];
18
+ case 3:
19
+ g.setDirection("LR");
20
+ break;
21
+ case 4:
22
+ g.setDirection("TD");
23
+ break;
24
+ case 5:
25
+ this.$ = [];
26
+ break;
27
+ case 6:
28
+ u[v - 1].push(u[v]), this.$ = u[v - 1];
29
+ break;
30
+ case 7:
31
+ case 8:
32
+ this.$ = u[v];
33
+ break;
34
+ case 9:
35
+ case 10:
36
+ this.$ = [];
37
+ break;
38
+ case 11:
39
+ g.getCommonDb().setDiagramTitle(u[v].substr(6)), this.$ = u[v].substr(6);
40
+ break;
41
+ case 12:
42
+ this.$ = u[v].trim(), g.getCommonDb().setAccTitle(this.$);
43
+ break;
44
+ case 13:
45
+ case 14:
46
+ this.$ = u[v].trim(), g.getCommonDb().setAccDescription(this.$);
47
+ break;
48
+ case 15:
49
+ g.addSection(u[v].substr(8)), this.$ = u[v].substr(8);
50
+ break;
51
+ case 18:
52
+ g.addTask(u[v], 0, ""), this.$ = u[v];
53
+ break;
54
+ case 19:
55
+ g.addEvent(u[v].substr(2)), this.$ = u[v];
56
+ break;
57
+ }
58
+ }, "anonymous"),
59
+ 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: s, 15: r, 17: n, 19: h, 20: c, 21: 17, 22: 18, 23: i, 24: y }, e(t, [2, 10], { 1: [2, 1] }), e(t, [2, 6]), { 12: 21, 14: s, 15: r, 17: n, 19: h, 20: c, 21: 17, 22: 18, 23: i, 24: y }, 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])],
60
+ defaultActions: {},
61
+ parseError: /* @__PURE__ */ o(function(a, d) {
62
+ if (d.recoverable)
63
+ this.trace(a);
64
+ else {
65
+ var l = new Error(a);
66
+ throw l.hash = d, l;
67
+ }
68
+ }, "parseError"),
69
+ parse: /* @__PURE__ */ o(function(a) {
70
+ var d = this, l = [0], g = [], x = [null], u = [], S = this.table, v = "", I = 0, C = 0, W = 2, O = 1, L = u.slice.call(arguments, 1), w = Object.create(this.lexer), H = { yy: {} };
71
+ for (var V in this.yy)
72
+ Object.prototype.hasOwnProperty.call(this.yy, V) && (H.yy[V] = this.yy[V]);
73
+ w.setInput(a, H.yy), H.yy.lexer = w, H.yy.parser = this, typeof w.yylloc > "u" && (w.yylloc = {});
74
+ var F = w.yylloc;
75
+ u.push(F);
76
+ var U = w.options && w.options.ranges;
77
+ typeof H.yy.parseError == "function" ? this.parseError = H.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
78
+ function N(A) {
79
+ l.length = l.length - 2 * A, x.length = x.length - A, u.length = u.length - A;
80
+ }
81
+ o(N, "popStack");
82
+ function b() {
83
+ var A;
84
+ return A = g.pop() || w.lex() || O, typeof A != "number" && (A instanceof Array && (g = A, A = g.pop()), A = d.symbols_[A] || A), A;
85
+ }
86
+ o(b, "lex");
87
+ for (var _, $, T, P, R = {}, G, B, Z, j; ; ) {
88
+ if ($ = l[l.length - 1], this.defaultActions[$] ? T = this.defaultActions[$] : ((_ === null || typeof _ > "u") && (_ = b()), T = S[$] && S[$][_]), typeof T > "u" || !T.length || !T[0]) {
89
+ var Y = "";
90
+ j = [];
91
+ for (G in S[$])
92
+ this.terminals_[G] && G > W && j.push("'" + this.terminals_[G] + "'");
93
+ w.showPosition ? Y = "Parse error on line " + (I + 1) + `:
94
+ ` + w.showPosition() + `
95
+ Expecting ` + j.join(", ") + ", got '" + (this.terminals_[_] || _) + "'" : Y = "Parse error on line " + (I + 1) + ": Unexpected " + (_ == O ? "end of input" : "'" + (this.terminals_[_] || _) + "'"), this.parseError(Y, {
96
+ text: w.match,
97
+ token: this.terminals_[_] || _,
98
+ line: w.yylineno,
99
+ loc: F,
100
+ expected: j
101
+ });
102
+ }
103
+ if (T[0] instanceof Array && T.length > 1)
104
+ throw new Error("Parse Error: multiple actions possible at state: " + $ + ", token: " + _);
105
+ switch (T[0]) {
106
+ case 1:
107
+ l.push(_), x.push(w.yytext), u.push(w.yylloc), l.push(T[1]), _ = null, C = w.yyleng, v = w.yytext, I = w.yylineno, F = w.yylloc;
108
+ break;
109
+ case 2:
110
+ if (B = this.productions_[T[1]][1], R.$ = x[x.length - B], R._$ = {
111
+ first_line: u[u.length - (B || 1)].first_line,
112
+ last_line: u[u.length - 1].last_line,
113
+ first_column: u[u.length - (B || 1)].first_column,
114
+ last_column: u[u.length - 1].last_column
115
+ }, U && (R._$.range = [
116
+ u[u.length - (B || 1)].range[0],
117
+ u[u.length - 1].range[1]
118
+ ]), P = this.performAction.apply(R, [
119
+ v,
120
+ C,
121
+ I,
122
+ H.yy,
123
+ T[1],
124
+ x,
125
+ u
126
+ ].concat(L)), typeof P < "u")
127
+ return P;
128
+ B && (l = l.slice(0, -1 * B * 2), x = x.slice(0, -1 * B), u = u.slice(0, -1 * B)), l.push(this.productions_[T[1]][0]), x.push(R.$), u.push(R._$), Z = S[l[l.length - 2]][l[l.length - 1]], l.push(Z);
129
+ break;
130
+ case 3:
131
+ return !0;
132
+ }
133
+ }
134
+ return !0;
135
+ }, "parse")
136
+ }, m = /* @__PURE__ */ (function() {
137
+ var k = {
138
+ EOF: 1,
139
+ parseError: /* @__PURE__ */ o(function(d, l) {
140
+ if (this.yy.parser)
141
+ this.yy.parser.parseError(d, l);
142
+ else
143
+ throw new Error(d);
144
+ }, "parseError"),
145
+ // resets the lexer, sets new input
146
+ setInput: /* @__PURE__ */ o(function(a, d) {
147
+ return this.yy = d || this.yy || {}, this._input = a, this._more = this._backtrack = this.done = !1, this.yylineno = this.yyleng = 0, this.yytext = this.matched = this.match = "", this.conditionStack = ["INITIAL"], this.yylloc = {
148
+ first_line: 1,
149
+ first_column: 0,
150
+ last_line: 1,
151
+ last_column: 0
152
+ }, this.options.ranges && (this.yylloc.range = [0, 0]), this.offset = 0, this;
153
+ }, "setInput"),
154
+ // consumes and returns one char from the input
155
+ input: /* @__PURE__ */ o(function() {
156
+ var a = this._input[0];
157
+ this.yytext += a, this.yyleng++, this.offset++, this.match += a, this.matched += a;
158
+ var d = a.match(/(?:\r\n?|\n).*/g);
159
+ 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), a;
160
+ }, "input"),
161
+ // unshifts one char (or a string) into the input
162
+ unput: /* @__PURE__ */ o(function(a) {
163
+ var d = a.length, l = a.split(/(?:\r\n?|\n)/g);
164
+ this._input = a + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - d), this.offset -= d;
165
+ var g = this.match.split(/(?:\r\n?|\n)/g);
166
+ this.match = this.match.substr(0, this.match.length - 1), this.matched = this.matched.substr(0, this.matched.length - 1), l.length - 1 && (this.yylineno -= l.length - 1);
167
+ var x = this.yylloc.range;
168
+ return this.yylloc = {
169
+ first_line: this.yylloc.first_line,
170
+ last_line: this.yylineno + 1,
171
+ first_column: this.yylloc.first_column,
172
+ last_column: l ? (l.length === g.length ? this.yylloc.first_column : 0) + g[g.length - l.length].length - l[0].length : this.yylloc.first_column - d
173
+ }, this.options.ranges && (this.yylloc.range = [x[0], x[0] + this.yyleng - d]), this.yyleng = this.yytext.length, this;
174
+ }, "unput"),
175
+ // When called from action, caches matched text and appends it on next action
176
+ more: /* @__PURE__ */ o(function() {
177
+ return this._more = !0, this;
178
+ }, "more"),
179
+ // 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.
180
+ reject: /* @__PURE__ */ o(function() {
181
+ if (this.options.backtrack_lexer)
182
+ this._backtrack = !0;
183
+ else
184
+ 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).
185
+ ` + this.showPosition(), {
186
+ text: "",
187
+ token: null,
188
+ line: this.yylineno
189
+ });
190
+ return this;
191
+ }, "reject"),
192
+ // retain first n characters of the match
193
+ less: /* @__PURE__ */ o(function(a) {
194
+ this.unput(this.match.slice(a));
195
+ }, "less"),
196
+ // displays already matched input, i.e. for error messages
197
+ pastInput: /* @__PURE__ */ o(function() {
198
+ var a = this.matched.substr(0, this.matched.length - this.match.length);
199
+ return (a.length > 20 ? "..." : "") + a.substr(-20).replace(/\n/g, "");
200
+ }, "pastInput"),
201
+ // displays upcoming input, i.e. for error messages
202
+ upcomingInput: /* @__PURE__ */ o(function() {
203
+ var a = this.match;
204
+ return a.length < 20 && (a += this._input.substr(0, 20 - a.length)), (a.substr(0, 20) + (a.length > 20 ? "..." : "")).replace(/\n/g, "");
205
+ }, "upcomingInput"),
206
+ // displays the character position where the lexing error occurred, i.e. for error messages
207
+ showPosition: /* @__PURE__ */ o(function() {
208
+ var a = this.pastInput(), d = new Array(a.length + 1).join("-");
209
+ return a + this.upcomingInput() + `
210
+ ` + d + "^";
211
+ }, "showPosition"),
212
+ // test the lexed token: return FALSE when not a match, otherwise return token
213
+ test_match: /* @__PURE__ */ o(function(a, d) {
214
+ var l, g, x;
215
+ if (this.options.backtrack_lexer && (x = {
216
+ yylineno: this.yylineno,
217
+ yylloc: {
218
+ first_line: this.yylloc.first_line,
219
+ last_line: this.last_line,
220
+ first_column: this.yylloc.first_column,
221
+ last_column: this.yylloc.last_column
222
+ },
223
+ yytext: this.yytext,
224
+ match: this.match,
225
+ matches: this.matches,
226
+ matched: this.matched,
227
+ yyleng: this.yyleng,
228
+ offset: this.offset,
229
+ _more: this._more,
230
+ _input: this._input,
231
+ yy: this.yy,
232
+ conditionStack: this.conditionStack.slice(0),
233
+ done: this.done
234
+ }, this.options.ranges && (x.yylloc.range = this.yylloc.range.slice(0))), g = a[0].match(/(?:\r\n?|\n).*/g), g && (this.yylineno += g.length), this.yylloc = {
235
+ first_line: this.yylloc.last_line,
236
+ last_line: this.yylineno + 1,
237
+ first_column: this.yylloc.last_column,
238
+ last_column: g ? g[g.length - 1].length - g[g.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + a[0].length
239
+ }, this.yytext += a[0], this.match += a[0], this.matches = a, 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(a[0].length), this.matched += a[0], l = this.performAction.call(this, this.yy, this, d, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), l)
240
+ return l;
241
+ if (this._backtrack) {
242
+ for (var u in x)
243
+ this[u] = x[u];
244
+ return !1;
245
+ }
246
+ return !1;
247
+ }, "test_match"),
248
+ // return next match in input
249
+ next: /* @__PURE__ */ o(function() {
250
+ if (this.done)
251
+ return this.EOF;
252
+ this._input || (this.done = !0);
253
+ var a, d, l, g;
254
+ this._more || (this.yytext = "", this.match = "");
255
+ for (var x = this._currentRules(), u = 0; u < x.length; u++)
256
+ if (l = this._input.match(this.rules[x[u]]), l && (!d || l[0].length > d[0].length)) {
257
+ if (d = l, g = u, this.options.backtrack_lexer) {
258
+ if (a = this.test_match(l, x[u]), a !== !1)
259
+ return a;
260
+ if (this._backtrack) {
261
+ d = !1;
262
+ continue;
263
+ } else
264
+ return !1;
265
+ } else if (!this.options.flex)
266
+ break;
267
+ }
268
+ return d ? (a = this.test_match(d, x[g]), a !== !1 ? a : !1) : this._input === "" ? this.EOF : this.parseError("Lexical error on line " + (this.yylineno + 1) + `. Unrecognized text.
269
+ ` + this.showPosition(), {
270
+ text: "",
271
+ token: null,
272
+ line: this.yylineno
273
+ });
274
+ }, "next"),
275
+ // return next match that has a token
276
+ lex: /* @__PURE__ */ o(function() {
277
+ var d = this.next();
278
+ return d || this.lex();
279
+ }, "lex"),
280
+ // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)
281
+ begin: /* @__PURE__ */ o(function(d) {
282
+ this.conditionStack.push(d);
283
+ }, "begin"),
284
+ // pop the previously active lexer condition state off the condition stack
285
+ popState: /* @__PURE__ */ o(function() {
286
+ var d = this.conditionStack.length - 1;
287
+ return d > 0 ? this.conditionStack.pop() : this.conditionStack[0];
288
+ }, "popState"),
289
+ // produce the lexer rule set which is active for the currently active lexer condition state
290
+ _currentRules: /* @__PURE__ */ o(function() {
291
+ return this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1] ? this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules : this.conditions.INITIAL.rules;
292
+ }, "_currentRules"),
293
+ // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available
294
+ topState: /* @__PURE__ */ o(function(d) {
295
+ return d = this.conditionStack.length - 1 - Math.abs(d || 0), d >= 0 ? this.conditionStack[d] : "INITIAL";
296
+ }, "topState"),
297
+ // alias for begin(condition)
298
+ pushState: /* @__PURE__ */ o(function(d) {
299
+ this.begin(d);
300
+ }, "pushState"),
301
+ // return the number of states currently on the stack
302
+ stateStackSize: /* @__PURE__ */ o(function() {
303
+ return this.conditionStack.length;
304
+ }, "stateStackSize"),
305
+ options: { "case-insensitive": !0 },
306
+ performAction: /* @__PURE__ */ o(function(d, l, g, x) {
307
+ switch (g) {
308
+ case 0:
309
+ break;
310
+ case 1:
311
+ break;
312
+ case 2:
313
+ return 13;
314
+ case 3:
315
+ break;
316
+ case 4:
317
+ break;
318
+ case 5:
319
+ return 8;
320
+ case 6:
321
+ return 9;
322
+ case 7:
323
+ return 7;
324
+ case 8:
325
+ return 14;
326
+ case 9:
327
+ return this.begin("acc_title"), 15;
328
+ case 10:
329
+ return this.popState(), "acc_title_value";
330
+ case 11:
331
+ return this.begin("acc_descr"), 17;
332
+ case 12:
333
+ return this.popState(), "acc_descr_value";
334
+ case 13:
335
+ this.begin("acc_descr_multiline");
336
+ break;
337
+ case 14:
338
+ this.popState();
339
+ break;
340
+ case 15:
341
+ return "acc_descr_multiline_value";
342
+ case 16:
343
+ return 20;
344
+ case 17:
345
+ return 24;
346
+ case 18:
347
+ return 23;
348
+ case 19:
349
+ return 6;
350
+ case 20:
351
+ return "INVALID";
352
+ }
353
+ }, "anonymous"),
354
+ 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],
355
+ 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 } }
356
+ };
357
+ return k;
358
+ })();
359
+ p.lexer = m;
360
+ function f() {
361
+ this.yy = {};
362
+ }
363
+ return o(f, "Parser"), f.prototype = p, p.Parser = f, new f();
364
+ })();
365
+ tt.parser = tt;
366
+ var Dt = tt, mt = {};
367
+ zt(mt, {
368
+ addEvent: () => $t,
369
+ addSection: () => wt,
370
+ addTask: () => Tt,
371
+ addTaskOrg: () => Nt,
372
+ clear: () => vt,
373
+ default: () => Kt,
374
+ getCommonDb: () => kt,
375
+ getDirection: () => _t,
376
+ getSections: () => St,
377
+ getTasks: () => Et,
378
+ setDirection: () => bt
379
+ });
380
+ var D = "", xt = 0, rt = "LR", st = [], q = [], K = [], kt = /* @__PURE__ */ o(() => Ot, "getCommonDb"), vt = /* @__PURE__ */ o(function() {
381
+ st.length = 0, q.length = 0, D = "", K.length = 0, rt = "LR", Gt();
382
+ }, "clear"), bt = /* @__PURE__ */ o(function(e) {
383
+ rt = e;
384
+ }, "setDirection"), _t = /* @__PURE__ */ o(function() {
385
+ return rt;
386
+ }, "getDirection"), wt = /* @__PURE__ */ o(function(e) {
387
+ D = e, st.push(e);
388
+ }, "addSection"), St = /* @__PURE__ */ o(function() {
389
+ return st;
390
+ }, "getSections"), Et = /* @__PURE__ */ o(function() {
391
+ let e = lt();
392
+ const t = 100;
393
+ let s = 0;
394
+ for (; !e && s < t; )
395
+ e = lt(), s++;
396
+ return q.push(...K), q;
397
+ }, "getTasks"), Tt = /* @__PURE__ */ o(function(e, t, s) {
398
+ const r = {
399
+ id: xt++,
400
+ section: D,
401
+ type: D,
402
+ task: e,
403
+ score: t || 0,
404
+ //if event is defined, then add it the events array
405
+ events: s ? [s] : []
406
+ };
407
+ K.push(r);
408
+ }, "addTask"), $t = /* @__PURE__ */ o(function(e) {
409
+ K.find((s) => s.id === xt - 1).events.push(e);
410
+ }, "addEvent"), Nt = /* @__PURE__ */ o(function(e) {
411
+ const t = {
412
+ section: D,
413
+ type: D,
414
+ description: e,
415
+ task: e,
416
+ classes: []
417
+ };
418
+ q.push(t);
419
+ }, "addTaskOrg"), lt = /* @__PURE__ */ o(function() {
420
+ const e = /* @__PURE__ */ o(function(s) {
421
+ return K[s].processed;
422
+ }, "compileTask");
423
+ let t = !0;
424
+ for (const [s, r] of K.entries())
425
+ e(s), t = t && r.processed;
426
+ return t;
427
+ }, "compileTasks"), Kt = {
428
+ clear: vt,
429
+ getCommonDb: kt,
430
+ getDirection: _t,
431
+ setDirection: bt,
432
+ addSection: wt,
433
+ getSections: St,
434
+ getTasks: Et,
435
+ addTask: Tt,
436
+ addTaskOrg: Nt,
437
+ addEvent: $t
438
+ }, It = 0, J = /* @__PURE__ */ o(function(e, t) {
439
+ const s = e.append("rect");
440
+ return s.attr("x", t.x), s.attr("y", t.y), s.attr("fill", t.fill), s.attr("stroke", t.stroke), s.attr("width", t.width), s.attr("height", t.height), s.attr("rx", t.rx), s.attr("ry", t.ry), t.class !== void 0 && s.attr("class", t.class), s;
441
+ }, "drawRect"), Ut = /* @__PURE__ */ o(function(e, t) {
442
+ const r = e.append("circle").attr("cx", t.cx).attr("cy", t.cy).attr("class", "face").attr("r", 15).attr("stroke-width", 2).attr("overflow", "visible"), n = e.append("g");
443
+ n.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"), n.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");
444
+ function h(y) {
445
+ const p = ct().startAngle(Math.PI / 2).endAngle(3 * (Math.PI / 2)).innerRadius(7.5).outerRadius(6.8181818181818175);
446
+ y.append("path").attr("class", "mouth").attr("d", p).attr("transform", "translate(" + t.cx + "," + (t.cy + 2) + ")");
447
+ }
448
+ o(h, "smile");
449
+ function c(y) {
450
+ const p = ct().startAngle(3 * Math.PI / 2).endAngle(5 * (Math.PI / 2)).innerRadius(7.5).outerRadius(6.8181818181818175);
451
+ y.append("path").attr("class", "mouth").attr("d", p).attr("transform", "translate(" + t.cx + "," + (t.cy + 7) + ")");
452
+ }
453
+ o(c, "sad");
454
+ function i(y) {
455
+ y.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");
456
+ }
457
+ return o(i, "ambivalent"), t.score > 3 ? h(n) : t.score < 3 ? c(n) : i(n), r;
458
+ }, "drawFace"), Xt = /* @__PURE__ */ o(function(e, t) {
459
+ const s = e.append("circle");
460
+ return s.attr("cx", t.cx), s.attr("cy", t.cy), s.attr("class", "actor-" + t.pos), s.attr("fill", t.fill), s.attr("stroke", t.stroke), s.attr("r", t.r), s.class !== void 0 && s.attr("class", s.class), t.title !== void 0 && s.append("title").text(t.title), s;
461
+ }, "drawCircle"), Ht = /* @__PURE__ */ o(function(e, t) {
462
+ const s = t.text.replace(/<br\s*\/?>/gi, " "), r = e.append("text");
463
+ r.attr("x", t.x), r.attr("y", t.y), r.attr("class", "legend"), r.style("text-anchor", t.anchor), t.class !== void 0 && r.attr("class", t.class);
464
+ const n = r.append("tspan");
465
+ return n.attr("x", t.x + t.textMargin * 2), n.text(s), r;
466
+ }, "drawText"), Zt = /* @__PURE__ */ o(function(e, t) {
467
+ function s(n, h, c, i, y) {
468
+ return n + "," + h + " " + (n + c) + "," + h + " " + (n + c) + "," + (h + i - y) + " " + (n + c - y * 1.2) + "," + (h + i) + " " + n + "," + (h + i);
469
+ }
470
+ o(s, "genPoints");
471
+ const r = e.append("polygon");
472
+ r.attr("points", s(t.x, t.y, 50, 20, 7)), r.attr("class", "labelBox"), t.y = t.y + t.labelMargin, t.x = t.x + 0.5 * t.labelMargin, Ht(e, t);
473
+ }, "drawLabel"), jt = /* @__PURE__ */ o(function(e, t, s) {
474
+ const r = e.append("g"), n = it();
475
+ n.x = t.x, n.y = t.y, n.fill = t.fill, n.width = s.width, n.height = s.height, n.class = "journey-section section-type-" + t.num, n.rx = 3, n.ry = 3, J(r, n), Lt(s)(
476
+ t.text,
477
+ r,
478
+ n.x,
479
+ n.y,
480
+ n.width,
481
+ n.height,
482
+ { class: "journey-section section-type-" + t.num },
483
+ s,
484
+ t.colour
485
+ );
486
+ }, "drawSection"), et = -1, qt = /* @__PURE__ */ o(function(e, t, s, r) {
487
+ const n = t.x + s.width / 2, h = e.append("g");
488
+ et++, h.append("line").attr("id", r + "-task" + et).attr("x1", n).attr("y1", t.y).attr("x2", n).attr("y2", 450).attr("class", "task-line").attr("stroke-width", "1px").attr("stroke-dasharray", "4 2").attr("stroke", "#666"), Ut(h, {
489
+ cx: n,
490
+ cy: 300 + (5 - t.score) * 30,
491
+ score: t.score
492
+ });
493
+ const i = it();
494
+ i.x = t.x, i.y = t.y, i.fill = t.fill, i.width = s.width, i.height = s.height, i.class = "task task-type-" + t.num, i.rx = 3, i.ry = 3, J(h, i), Lt(s)(
495
+ t.task,
496
+ h,
497
+ i.x,
498
+ i.y,
499
+ i.width,
500
+ i.height,
501
+ { class: "task" },
502
+ s,
503
+ t.colour
504
+ );
505
+ }, "drawTask"), Jt = /* @__PURE__ */ o(function(e, t) {
506
+ J(e, {
507
+ x: t.startx,
508
+ y: t.starty,
509
+ width: t.stopx - t.startx,
510
+ height: t.stopy - t.starty,
511
+ fill: t.fill,
512
+ class: "rect"
513
+ }).lower();
514
+ }, "drawBackgroundRect"), Qt = /* @__PURE__ */ o(function() {
515
+ return {
516
+ x: 0,
517
+ y: 0,
518
+ fill: void 0,
519
+ "text-anchor": "start",
520
+ width: 100,
521
+ height: 100,
522
+ textMargin: 0,
523
+ rx: 0,
524
+ ry: 0
525
+ };
526
+ }, "getTextObj"), it = /* @__PURE__ */ o(function() {
527
+ return {
528
+ x: 0,
529
+ y: 0,
530
+ width: 100,
531
+ anchor: "start",
532
+ height: 100,
533
+ rx: 0,
534
+ ry: 0
535
+ };
536
+ }, "getNoteRect"), Lt = /* @__PURE__ */ (function() {
537
+ function e(n, h, c, i, y, p, m, f) {
538
+ const k = h.append("text").attr("x", c + y / 2).attr("y", i + p / 2 + 5).style("font-color", f).style("text-anchor", "middle").text(n);
539
+ r(k, m);
540
+ }
541
+ o(e, "byText");
542
+ function t(n, h, c, i, y, p, m, f, k) {
543
+ const { taskFontSize: a, taskFontFamily: d } = f, l = n.split(/<br\s*\/?>/gi);
544
+ for (let g = 0; g < l.length; g++) {
545
+ const x = g * a - a * (l.length - 1) / 2, u = h.append("text").attr("x", c + y / 2).attr("y", i).attr("fill", k).style("text-anchor", "middle").style("font-size", a).style("font-family", d);
546
+ u.append("tspan").attr("x", c + y / 2).attr("dy", x).text(l[g]), u.attr("y", i + p / 2).attr("dominant-baseline", "central").attr("alignment-baseline", "central"), r(u, m);
547
+ }
548
+ }
549
+ o(t, "byTspan");
550
+ function s(n, h, c, i, y, p, m, f) {
551
+ const k = h.append("switch"), d = k.append("foreignObject").attr("x", c).attr("y", i).attr("width", y).attr("height", p).attr("position", "fixed").append("xhtml:div").style("display", "table").style("height", "100%").style("width", "100%");
552
+ d.append("div").attr("class", "label").style("display", "table-cell").style("text-align", "center").style("vertical-align", "middle").text(n), t(n, k, c, i, y, p, m, f), r(d, m);
553
+ }
554
+ o(s, "byFo");
555
+ function r(n, h) {
556
+ for (const c in h)
557
+ c in h && n.attr(c, h[c]);
558
+ }
559
+ return o(r, "_setTextAttrs"), function(n) {
560
+ return n.textPlacement === "fo" ? s : n.textPlacement === "old" ? e : t;
561
+ };
562
+ })(), Yt = /* @__PURE__ */ o(function(e, t) {
563
+ It = 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");
564
+ }, "initGraphics");
565
+ function at(e, t) {
566
+ e.each(function() {
567
+ var s = X(this), r = s.text().split(/(\s+|<br>)/).reverse(), n, h = [], c = 1.1, i = s.attr("y"), y = parseFloat(s.attr("dy")), p = s.text(null).append("tspan").attr("x", 0).attr("y", i).attr("dy", y + "em");
568
+ for (let m = 0; m < r.length; m++)
569
+ n = r[r.length - 1 - m], h.push(n), p.text(h.join(" ").trim()), (p.node().getComputedTextLength() > t || n === "<br>") && (h.pop(), p.text(h.join(" ").trim()), n === "<br>" ? h = [""] : h = [n], p = s.append("tspan").attr("x", 0).attr("y", i).attr("dy", c + "em").text(n));
570
+ });
571
+ }
572
+ o(at, "wrap");
573
+ var te = /* @__PURE__ */ o(function(e, t, s, r, n, h = !1) {
574
+ const { theme: c, look: i } = r, y = c?.includes("redux"), p = r?.themeVariables?.THEME_COLOR_LIMIT ?? 12, m = s % p - 1, f = e.append("g");
575
+ t.section = m, f.attr(
576
+ "class",
577
+ (t.class ? t.class + " " : "") + "timeline-node " + ("section-" + m)
578
+ );
579
+ const k = f.append("g"), a = f.append("g"), l = a.append("text").text(t.descr).attr("dy", "1em").attr("alignment-baseline", "middle").attr("dominant-baseline", "middle").attr("text-anchor", "middle").call(at, t.width).node().getBBox(), g = r.fontSize?.replace ? r.fontSize.replace("px", "") : r.fontSize;
580
+ if (t.height = l.height + g * 1.1 * 0.5 + t.padding, t.height = Math.max(t.height, t.maxHeight), t.width = t.width + 2 * t.padding, a.attr("transform", "translate(" + t.width / 2 + ", " + t.padding / 2 + ")"), y && a.attr(
581
+ "transform",
582
+ `translate(${t.width / 2}, ${h ? t.padding / 2 + 3 : t.padding})`
583
+ ), ne(k, t, m, n, r), i === "neo" && (f.attr("data-look", "neo"), y)) {
584
+ const x = c.includes("dark"), u = e.node()?.ownerSVGElement ?? e.node(), S = X(u), v = S.attr("id") ?? "", I = v ? `${v}-drop-shadow` : "drop-shadow";
585
+ if (S.select(`#${I}`).empty()) {
586
+ const C = S.select("defs");
587
+ (C.empty() ? S.append("defs") : C).append("filter").attr("id", I).attr("height", "130%").attr("width", "130%").append("feDropShadow").attr("dx", "4").attr("dy", "4").attr("stdDeviation", 0).attr("flood-opacity", x ? "0.2" : "0.06").attr("flood-color", x ? "#FFFFFF" : "#000000");
588
+ }
589
+ }
590
+ return t;
591
+ }, "drawNode"), ee = /* @__PURE__ */ o(function(e, t, s) {
592
+ const r = e.append("g"), h = r.append("text").text(t.descr).attr("dy", "1em").attr("alignment-baseline", "middle").attr("dominant-baseline", "middle").attr("text-anchor", "middle").call(at, t.width).node().getBBox(), c = s.fontSize?.replace ? s.fontSize.replace("px", "") : s.fontSize;
593
+ return r.remove(), h.height + c * 1.1 * 0.5 + t.padding;
594
+ }, "getVirtualNodeHeight"), ne = /* @__PURE__ */ o(function(e, t, s, r, n) {
595
+ const { theme: h } = n, c = h?.includes("redux") ? 0 : 5, i = 5, y = c > 0 ? `M0 ${t.height - i} v${-t.height + 2 * i} q0,-${c},${c},-${c} h${t.width - 2 * i} q${c},0,${c},${c} v${t.height - i} H0 Z` : `M0 ${t.height - i} v${-(t.height - i)} h${t.width} v${t.height} H0 Z`;
596
+ e.append("path").attr("id", r + "-node-" + It++).attr("class", "node-bkg node-" + t.type).attr("d", y), h?.includes("redux") || e.append("line").attr("class", "node-line-" + s).attr("x1", 0).attr("y1", t.height).attr("x2", t.width).attr("y2", t.height);
597
+ }, "defaultBkg"), M = {
598
+ drawRect: J,
599
+ drawCircle: Xt,
600
+ drawSection: jt,
601
+ drawText: Ht,
602
+ drawLabel: Zt,
603
+ drawTask: qt,
604
+ drawBackgroundRect: Jt,
605
+ getTextObj: Qt,
606
+ getNoteRect: it,
607
+ initGraphics: Yt,
608
+ drawNode: te,
609
+ getVirtualNodeHeight: ee
610
+ }, re = /* @__PURE__ */ o(function(e, t, s, r) {
611
+ const n = ft(), { look: h, theme: c, themeVariables: i } = n, { useGradient: y, gradientStart: p, gradientStop: m } = i, f = n.timeline?.leftMargin ?? 50;
612
+ E.debug("timeline", r.db);
613
+ const k = n.securityLevel;
614
+ let a;
615
+ k === "sandbox" && (a = X("#i" + t));
616
+ const l = (k === "sandbox" ? X(a.nodes()[0].contentDocument.body) : X("body")).select("#" + t);
617
+ l.append("g");
618
+ const g = r.db.getTasks(), x = r.db.getCommonDb().getDiagramTitle();
619
+ E.debug("task", g), M.initGraphics(l, t);
620
+ const u = r.db.getSections();
621
+ E.debug("sections", u);
622
+ let S = 0, v = 0, I = 0, C = 0, W = 50 + f, O = 50;
623
+ C = 50;
624
+ let L = 0, w = !0;
625
+ u.forEach(function(N) {
626
+ const b = {
627
+ number: L,
628
+ descr: N,
629
+ section: L,
630
+ width: 150,
631
+ padding: 20,
632
+ maxHeight: S
633
+ }, _ = M.getVirtualNodeHeight(l, b, n);
634
+ E.debug("sectionHeight before draw", _), S = Math.max(S, _ + 20);
635
+ });
636
+ let H = 0, V = 0;
637
+ E.debug("tasks.length", g.length);
638
+ for (const [N, b] of g.entries()) {
639
+ const _ = {
640
+ number: N,
641
+ descr: b,
642
+ section: b.section,
643
+ width: 150,
644
+ padding: 20,
645
+ maxHeight: v
646
+ }, $ = M.getVirtualNodeHeight(l, _, n);
647
+ E.debug("taskHeight before draw", $), v = Math.max(v, $ + 20), H = Math.max(H, b.events.length);
648
+ let T = 0;
649
+ for (const P of b.events) {
650
+ const R = {
651
+ descr: P,
652
+ section: b.section,
653
+ number: b.section,
654
+ width: 150,
655
+ padding: 20,
656
+ maxHeight: 50
657
+ };
658
+ T += M.getVirtualNodeHeight(l, R, n);
659
+ }
660
+ b.events.length > 0 && (T += (b.events.length - 1) * 10), V = Math.max(V, T);
661
+ }
662
+ E.debug("maxSectionHeight before draw", S), E.debug("maxTaskHeight before draw", v), u && u.length > 0 ? u.forEach((N) => {
663
+ const b = g.filter((P) => P.section === N), _ = {
664
+ number: L,
665
+ descr: N,
666
+ section: L,
667
+ width: 200 * Math.max(b.length, 1) - 50,
668
+ padding: 20,
669
+ maxHeight: S
670
+ };
671
+ E.debug("sectionNode", _);
672
+ const $ = l.append("g"), T = M.drawNode($, _, L, n, t);
673
+ E.debug("sectionNode output", T), $.attr("transform", `translate(${W}, ${C})`), O += S + 50, b.length > 0 && ht(
674
+ l,
675
+ b,
676
+ L,
677
+ W,
678
+ O,
679
+ v,
680
+ n,
681
+ H,
682
+ V,
683
+ S,
684
+ !1,
685
+ t
686
+ ), W += 200 * Math.max(b.length, 1), O = C, L++;
687
+ }) : (w = !1, ht(
688
+ l,
689
+ g,
690
+ L,
691
+ W,
692
+ O,
693
+ v,
694
+ n,
695
+ H,
696
+ V,
697
+ S,
698
+ !0,
699
+ t
700
+ ));
701
+ const F = l.node().getBBox();
702
+ if (E.debug("bounds", F), x && l.append("text").text(x).attr("x", h === "neo" ? F.x * 2 + f : F.width / 2 - f).attr("font-size", "4ex").attr("font-weight", "bold").attr("y", 20), I = w ? S + v + 150 : v + 100, l.append("g").attr("class", "lineWrapper").append("line").attr("x1", f).attr("y1", I).attr("x2", F.width + 3 * f).attr("y2", I).attr("stroke-width", 4).attr("stroke", "black").attr("marker-end", `url(#${t}-arrowhead)`), h === "neo" && y && c !== "neutral") {
703
+ const N = l.select("defs"), _ = (N.empty() ? l.append("defs") : N).append("linearGradient").attr("id", l.attr("id") + "-gradient").attr("gradientUnits", "objectBoundingBox").attr("x1", "0%").attr("y1", "0%").attr("x2", "100%").attr("y2", "0%");
704
+ _.append("stop").attr("offset", "0%").attr("stop-color", p).attr("stop-opacity", 1), _.append("stop").attr("offset", "100%").attr("stop-color", m).attr("stop-opacity", 1);
705
+ }
706
+ yt(
707
+ void 0,
708
+ l,
709
+ n.timeline?.padding ?? 50,
710
+ n.timeline?.useMaxWidth ?? !1
711
+ );
712
+ }, "draw"), ht = /* @__PURE__ */ o(function(e, t, s, r, n, h, c, i, y, p, m, f) {
713
+ for (const k of t) {
714
+ const a = {
715
+ descr: k.task,
716
+ section: s,
717
+ number: s,
718
+ width: 150,
719
+ padding: 20,
720
+ maxHeight: h
721
+ };
722
+ E.debug("taskNode", a);
723
+ const d = e.append("g").attr("class", "taskWrapper"), g = M.drawNode(d, a, s, c, f).height;
724
+ if (E.debug("taskHeight after draw", g), d.attr("transform", `translate(${r}, ${n})`), h = Math.max(h, g), k.events) {
725
+ const x = e.append("g").attr("class", "lineWrapper");
726
+ let u = h;
727
+ n += 100, u = u + se(e, k.events, s, r, n, c, f), n -= 100, x.append("line").attr("x1", r + 190 / 2).attr("y1", n + h).attr("x2", r + 190 / 2).attr("y2", n + h + 100 + y + 100).attr("stroke-width", 2).attr("stroke", "black").attr("marker-end", `url(#${f}-arrowhead)`).attr("stroke-dasharray", "5,5");
728
+ }
729
+ r = r + 200, m && !c.timeline?.disableMulticolor && s++;
730
+ }
731
+ n = n - 10;
732
+ }, "drawTasks"), se = /* @__PURE__ */ o(function(e, t, s, r, n, h, c) {
733
+ let i = 0;
734
+ const y = n;
735
+ n = n + 100;
736
+ for (const p of t) {
737
+ const m = {
738
+ descr: p,
739
+ section: s,
740
+ number: s,
741
+ width: 150,
742
+ padding: 20,
743
+ maxHeight: 50
744
+ };
745
+ E.debug("eventNode", m);
746
+ const f = e.append("g").attr("class", "eventWrapper"), a = M.drawNode(f, m, s, h, c, !0).height;
747
+ i = i + a, f.attr("transform", `translate(${r}, ${n})`), n = n + 10 + a;
748
+ }
749
+ return n = y, i;
750
+ }, "drawEvents"), ie = {
751
+ setConf: /* @__PURE__ */ o(() => {
752
+ }, "setConf"),
753
+ draw: re
754
+ }, Q = 200, z = 5, ae = Q + z * 2, ot = Q + 100, oe = ot + z * 2, Mt = 10, ce = 0, dt = 20, At = 20, ut = 30, Ct = 50, le = /* @__PURE__ */ o(function(e, t, s, r) {
755
+ const n = ft(), h = n.timeline?.leftMargin ?? 50;
756
+ E.debug("timeline", r.db);
757
+ const c = Vt(t);
758
+ c.append("g");
759
+ const i = r.db.getTasks(), y = r.db.getCommonDb().getDiagramTitle();
760
+ E.debug("task", i), M.initGraphics(c);
761
+ const p = r.db.getSections();
762
+ E.debug("sections", p);
763
+ let m = 0, f = 0;
764
+ const k = 50 + h;
765
+ let a = 50;
766
+ const d = a, l = k, g = ae + At, x = oe + Ct, u = l + g;
767
+ let S = 0;
768
+ const v = p && p.length > 0, I = v ? u : k + g, C = Math.max(50, g + x - z * 2);
769
+ p.forEach(function(N) {
770
+ const b = {
771
+ number: S,
772
+ descr: N,
773
+ section: S,
774
+ width: C,
775
+ padding: z,
776
+ maxHeight: m
777
+ }, _ = M.getVirtualNodeHeight(c, b, n);
778
+ E.debug("sectionHeight before draw", _), m = Math.max(m, _);
779
+ });
780
+ let W = 0;
781
+ E.debug("tasks.length", i.length);
782
+ for (const [N, b] of i.entries()) {
783
+ const _ = {
784
+ number: N,
785
+ descr: b,
786
+ section: b.section,
787
+ width: Q,
788
+ padding: z,
789
+ maxHeight: f
790
+ }, $ = M.getVirtualNodeHeight(c, _, n);
791
+ E.debug("taskHeight before draw", $), f = Math.max(f, $);
792
+ let T = 0;
793
+ for (const P of b.events) {
794
+ const R = {
795
+ descr: P,
796
+ section: b.section,
797
+ number: b.section,
798
+ width: ot,
799
+ padding: z,
800
+ maxHeight: 50
801
+ };
802
+ T += M.getVirtualNodeHeight(c, R, n);
803
+ }
804
+ b.events.length > 0 && (T += (b.events.length - 1) * Mt), W = Math.max(W, T) + ce;
805
+ }
806
+ E.debug("maxSectionHeight before draw", m), E.debug("maxTaskHeight before draw", f);
807
+ const L = Math.max(f, W) + ut;
808
+ v ? p.forEach((N) => {
809
+ const b = i.filter((Z) => Z.section === N), _ = {
810
+ number: S,
811
+ descr: N,
812
+ section: S,
813
+ width: C,
814
+ padding: z,
815
+ maxHeight: m
816
+ };
817
+ E.debug("sectionNode", _);
818
+ const $ = c.append("g"), T = M.drawNode($, _, S, n);
819
+ E.debug("sectionNode output", T);
820
+ const P = I - g;
821
+ $.attr("transform", `translate(${P}, ${a})`);
822
+ const R = a + T.height + dt;
823
+ b.length > 0 && gt(
824
+ c,
825
+ b,
826
+ S,
827
+ I,
828
+ R,
829
+ f,
830
+ n,
831
+ L,
832
+ !1
833
+ );
834
+ const G = b.length, B = T.height + dt + L * Math.max(G, 1) - (G > 0 ? ut * 2 : 0);
835
+ a += B, S++;
836
+ }) : gt(
837
+ c,
838
+ i,
839
+ S,
840
+ I,
841
+ a,
842
+ f,
843
+ n,
844
+ L,
845
+ !0
846
+ );
847
+ let w = c.node()?.getBBox();
848
+ if (!w)
849
+ throw new Error("bbox not found");
850
+ if (E.debug("bounds", w), y) {
851
+ if (c.append("text").text(y).attr("x", w.width / 2 - h).attr("font-size", "4ex").attr("font-weight", "bold").attr("y", 20), w = c.node()?.getBBox(), !w)
852
+ throw new Error("bbox not found");
853
+ E.debug("bounds after title", w);
854
+ }
855
+ const [H] = Ft(n.fontSize), V = (H ?? 16) * 2, F = (H ?? 16) * 0.5 + 20, U = c.append("g").attr("class", "lineWrapper");
856
+ U.append("line").attr("x1", I).attr("y1", d - V).attr("x2", I).attr("y2", w.y + w.height + F).attr("stroke-width", 4).attr("stroke", "black").attr("marker-end", "url(#arrowhead)"), U.lower(), yt(
857
+ void 0,
858
+ c,
859
+ n.timeline?.padding ?? 50,
860
+ n.timeline?.useMaxWidth ?? !1
861
+ );
862
+ }, "draw"), gt = /* @__PURE__ */ o(function(e, t, s, r, n, h, c, i, y) {
863
+ for (const p of t) {
864
+ const m = {
865
+ descr: p.task,
866
+ section: s,
867
+ number: s,
868
+ width: Q,
869
+ padding: z,
870
+ maxHeight: h
871
+ };
872
+ E.debug("taskNode", m);
873
+ const f = e.append("g").attr("class", "taskWrapper"), k = M.drawNode(f, m, s, c), a = k.height;
874
+ E.debug("taskHeight after draw", a);
875
+ const d = r - At - k.width;
876
+ if (f.attr("transform", `translate(${d}, ${n})`), h = Math.max(h, a), p.events && p.events.length > 0) {
877
+ const l = n, g = r + Ct;
878
+ he(e, p.events, s, r, g, l, c);
879
+ }
880
+ n = n + i, y && !c.timeline?.disableMulticolor && s++;
881
+ }
882
+ }, "drawTasks"), he = /* @__PURE__ */ o(function(e, t, s, r, n, h, c) {
883
+ let i = h;
884
+ for (const y of t) {
885
+ const p = {
886
+ descr: y,
887
+ section: s,
888
+ number: s,
889
+ width: ot,
890
+ padding: z,
891
+ maxHeight: 0
892
+ };
893
+ E.debug("eventNode", p);
894
+ const m = e.append("g").attr("class", "eventWrapper"), k = M.drawNode(m, p, s, c).height;
895
+ m.attr("transform", `translate(${n}, ${i})`);
896
+ const a = e.append("g").attr("class", "lineWrapper"), d = i + k / 2;
897
+ a.append("line").attr("x1", r).attr("y1", d).attr("x2", n).attr("y2", d).attr("stroke-width", 2).attr("stroke", "black").attr("marker-end", "url(#arrowhead)").attr("stroke-dasharray", "5,5"), i = i + k + Mt;
898
+ }
899
+ return i - h;
900
+ }, "drawEvents"), de = {
901
+ setConf: /* @__PURE__ */ o(() => {
902
+ }, "setConf"),
903
+ draw: le
904
+ }, ue = /* @__PURE__ */ o((e) => {
905
+ const { theme: t } = pt(), s = t?.includes("dark"), r = Rt(t, e.borderColorArray), n = e.svgId?.replace(/^#/, "") ?? "", h = n ? `url(#${n}-drop-shadow)` : e.dropShadow ?? "none";
906
+ let c = "";
907
+ for (let i = 0; i < nt(e.THEME_COLOR_LIMIT); i++) {
908
+ const y = `${17 - 3 * i}`, p = r ? e.borderColorArray[i % e.borderColorArray.length] : void 0, m = p ?? e.mainBkg, f = p ?? e.nodeBorder;
909
+ c += `
910
+ .section-${i - 1} rect,
911
+ .section-${i - 1} path,
912
+ .section-${i - 1} circle {
913
+ fill: ${s && r ? e.mainBkg : m};
914
+ stroke: ${f};
915
+ stroke-width: ${e.strokeWidth};
916
+ filter: ${h};
917
+ }
918
+
919
+ .section-${i - 1} text {
920
+ fill: ${e.nodeBorder};
921
+ font-weight: ${e.fontWeight}
922
+ }
923
+
924
+ .node-icon-${i - 1} {
925
+ font-size: 40px;
926
+ color: ${e["cScaleLabel" + i]};
927
+ }
928
+
929
+ .section-edge-${i - 1} {
930
+ stroke: ${e["cScale" + i]};
931
+ }
932
+
933
+ .edge-depth-${i - 1} {
934
+ stroke-width: ${y};
935
+ }
936
+
937
+ .section-${i - 1} line {
938
+ stroke: ${e["cScaleInv" + i]};
939
+ stroke-width: 3;
940
+ }
941
+
942
+ .lineWrapper line {
943
+ stroke: ${e.nodeBorder};
944
+ stroke-width:${e.strokeWidth}
945
+ }
946
+
947
+ .disabled,
948
+ .disabled circle,
949
+ .disabled text {
950
+ fill: ${e.tertiaryColor ?? "lightgray"};
951
+ }
952
+
953
+ .disabled text {
954
+ fill: ${e.clusterBorder ?? "#efefef"};
955
+ }
956
+ `;
957
+ }
958
+ return c;
959
+ }, "genReduxSections"), ge = /* @__PURE__ */ o((e) => {
960
+ let t = "";
961
+ const s = nt(e.THEME_COLOR_LIMIT);
962
+ for (let r = 0; r < s; r++)
963
+ e["lineColor" + r] = e["lineColor" + r] ?? e["cScaleInv" + r], Wt(e["lineColor" + r]) ? e["lineColor" + r] = Pt(e["lineColor" + r], 20) : e["lineColor" + r] = Bt(e["lineColor" + r], 20);
964
+ for (let r = 0; r < s; r++) {
965
+ const n = "" + (17 - 3 * r);
966
+ t += `
967
+ .section-${r - 1} rect, .section-${r - 1} path, .section-${r - 1} circle, .section-${r - 1} path {
968
+ fill: ${e["cScale" + r]};
969
+ }
970
+ .section-${r - 1} text {
971
+ fill: ${e["cScaleLabel" + r]};
972
+ }
973
+ .node-icon-${r - 1} {
974
+ font-size: 40px;
975
+ color: ${e["cScaleLabel" + r]};
976
+ }
977
+ .section-edge-${r - 1}{
978
+ stroke: ${e["cScale" + r]};
979
+ }
980
+ .edge-depth-${r - 1}{
981
+ stroke-width: ${n};
982
+ }
983
+ .section-${r - 1} line {
984
+ stroke: ${e["cScaleInv" + r]} ;
985
+ stroke-width: 3;
986
+ }
987
+
988
+ .lineWrapper line{
989
+ stroke: ${e["cScaleLabel" + r]} ;
990
+ }
991
+
992
+ .disabled, .disabled circle, .disabled text {
993
+ fill: ${e.tertiaryColor ?? "lightgray"};
994
+ }
995
+ .disabled text {
996
+ fill: ${e.clusterBorder ?? "#efefef"};
997
+ }
998
+ `;
999
+ }
1000
+ return t;
1001
+ }, "genSections"), pe = /* @__PURE__ */ o((e) => {
1002
+ const { theme: t } = pt(), s = t?.includes("redux"), r = t === "neutral", n = e.svgId?.replace(/^#/, "") ?? "";
1003
+ let h = "";
1004
+ if (e.useGradient && n && e.THEME_COLOR_LIMIT && !r) {
1005
+ const c = nt(e.THEME_COLOR_LIMIT);
1006
+ for (let i = 0; i < c; i++)
1007
+ h += `
1008
+ .section-${i - 1}[data-look="neo"] rect,
1009
+ .section-${i - 1}[data-look="neo"] path,
1010
+ .section-${i - 1}[data-look="neo"] circle {
1011
+ fill: ${e.mainBkg};
1012
+ stroke: url(#${n}-gradient);
1013
+ stroke-width: 2;
1014
+ }
1015
+ .section-${i - 1}[data-look="neo"] line {
1016
+ stroke: url(#${n}-gradient);
1017
+ stroke-width: 2;
1018
+ }`;
1019
+ }
1020
+ return `
1021
+ .edge {
1022
+ stroke-width: 3;
1023
+ }
1024
+ ${s ? ue(e) : ge(e)}
1025
+ ${h}
1026
+ .section-root rect, .section-root path, .section-root circle {
1027
+ fill: ${e.git0};
1028
+ }
1029
+ .section-root text {
1030
+ fill: ${e.gitBranchLabel0};
1031
+ }
1032
+ .icon-container {
1033
+ height:100%;
1034
+ display: flex;
1035
+ justify-content: center;
1036
+ align-items: center;
1037
+ }
1038
+ .edge {
1039
+ fill: none;
1040
+ }
1041
+ .eventWrapper {
1042
+ filter: brightness(120%);
1043
+ }
1044
+ `;
1045
+ }, "getStyles"), fe = pe, ye = {
1046
+ setConf: /* @__PURE__ */ o(() => {
1047
+ }, "setConf"),
1048
+ draw: /* @__PURE__ */ o((e, t, s, r) => (r?.db?.getDirection?.() ?? "LR") === "TD" ? de.draw(e, t, s, r) : ie.draw(e, t, s, r), "draw")
1049
+ }, xe = {
1050
+ db: mt,
1051
+ renderer: ye,
1052
+ parser: Dt,
1053
+ styles: fe
1054
+ };
1055
+ export {
1056
+ xe as diagram
1057
+ };