@layers-app/editor 0.7.45 → 0.7.46

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 (248) hide show
  1. package/dist/index.cjs +2 -2
  2. package/dist/index.d.ts +5 -4
  3. package/dist/index.js +3 -3
  4. package/dist/{layers.dO_EcGnI.js → layers.B88sQYuh.js} +1 -1
  5. package/dist/layers.BgMykHnn.js +154 -0
  6. package/dist/{layers.BNRMPVpZ.js → layers.BtvuN20E.js} +8992 -9643
  7. package/dist/{layers.D7AwxDU3.js → layers.Cfvta__C.js} +1 -1
  8. package/dist/{layers.b9B2NY7n.js → layers.CsQlovyR.js} +2191 -1950
  9. package/dist/layers.Ct1ojjl3.js +1 -0
  10. package/dist/{layers.Cqs6IYG7.js → layers.Hq0pIRX3.js} +24 -24
  11. package/dist/layers.JT_kEFH5.js +129 -0
  12. package/dist/{layers.D10qGvZV.js → layers.NW1lST7i.js} +1 -1
  13. package/dist/layers.pwc3O6Es.js +261 -0
  14. package/package.json +2 -2
  15. package/dist/layers.-kgSm_ki.js +0 -1
  16. package/dist/layers.3H8YMnha.js +0 -960
  17. package/dist/layers.52famHy6.js +0 -1
  18. package/dist/layers.5E21elPk.js +0 -11
  19. package/dist/layers.5VXqgOA9.js +0 -1
  20. package/dist/layers.5VwU1GK1.js +0 -1268
  21. package/dist/layers.7JqFgE4-.js +0 -15
  22. package/dist/layers.7RI58uNS.js +0 -189
  23. package/dist/layers.7SpesQUg.js +0 -40
  24. package/dist/layers.7T_XLunz.js +0 -7
  25. package/dist/layers.8yVEuzdp.js +0 -2238
  26. package/dist/layers.9VxE_IU7.js +0 -6
  27. package/dist/layers.9pNaFvaX.js +0 -1
  28. package/dist/layers.AfB9ZNIL.js +0 -41
  29. package/dist/layers.AwYI6tm5.js +0 -39
  30. package/dist/layers.B-gjjpRn.js +0 -4
  31. package/dist/layers.B09AFCqn.js +0 -37
  32. package/dist/layers.B19hGmey.js +0 -1
  33. package/dist/layers.B1GZzJe5.js +0 -9
  34. package/dist/layers.B1MgjnS3.js +0 -129
  35. package/dist/layers.B3D4g2HH.js +0 -1
  36. package/dist/layers.B4--F20o.js +0 -10
  37. package/dist/layers.B47Vqw3v.js +0 -8
  38. package/dist/layers.B7K7JjK6.js +0 -1510
  39. package/dist/layers.B7Ogzw_9.js +0 -8
  40. package/dist/layers.B9DV1y8l.js +0 -437
  41. package/dist/layers.BAnldxOY.js +0 -61
  42. package/dist/layers.BAtv1CM7.js +0 -1
  43. package/dist/layers.BAuuzKLZ.js +0 -8
  44. package/dist/layers.BBkLpECL.js +0 -41
  45. package/dist/layers.BCFFwcHc.js +0 -8
  46. package/dist/layers.BElVFj7p.js +0 -10
  47. package/dist/layers.BHMGJS6y.js +0 -35
  48. package/dist/layers.BI0na45P.js +0 -39
  49. package/dist/layers.BIeVwYKL.js +0 -1
  50. package/dist/layers.BJDrjORS.js +0 -244
  51. package/dist/layers.BLVqWrAY.js +0 -10
  52. package/dist/layers.BLd2spTm.js +0 -1
  53. package/dist/layers.BMdx5wVt.js +0 -1126
  54. package/dist/layers.BPxT8M1-.js +0 -1619
  55. package/dist/layers.BQ47bUTF.js +0 -207
  56. package/dist/layers.BRQk8xaN.js +0 -52
  57. package/dist/layers.BSTBZrFn.js +0 -1
  58. package/dist/layers.BSd2L4Fm.js +0 -1
  59. package/dist/layers.BT4kTHz7.js +0 -51
  60. package/dist/layers.BaqpKN-R.js +0 -4
  61. package/dist/layers.BbCfEXyj.js +0 -55
  62. package/dist/layers.Bd6ZkqZ7.js +0 -40
  63. package/dist/layers.BdSYcWLH.js +0 -373
  64. package/dist/layers.Be33AcY-.js +0 -1
  65. package/dist/layers.BiIBffqS.js +0 -6
  66. package/dist/layers.BijSGz6X.js +0 -1
  67. package/dist/layers.BioO0hx9.js +0 -10
  68. package/dist/layers.BmE6NOAc.js +0 -41
  69. package/dist/layers.BoRU6N6t.js +0 -1225
  70. package/dist/layers.Boa1dqY1.js +0 -1
  71. package/dist/layers.BpilXLfW.js +0 -6
  72. package/dist/layers.BqYphIWO.js +0 -11
  73. package/dist/layers.Bs1NMWU2.js +0 -9
  74. package/dist/layers.BsKvPJTl.js +0 -10
  75. package/dist/layers.BsZCaVRX.js +0 -22
  76. package/dist/layers.BtKfezUO.js +0 -32
  77. package/dist/layers.BuVXf7W5.js +0 -42
  78. package/dist/layers.BwuvbB4R.js +0 -39
  79. package/dist/layers.BxiXm40L.js +0 -2
  80. package/dist/layers.By8sBqwN.js +0 -116
  81. package/dist/layers.BzGZoEEl.js +0 -10
  82. package/dist/layers.BzLeOHKa.js +0 -796
  83. package/dist/layers.Bz_dhG__.js +0 -39
  84. package/dist/layers.C1KqMlKg.js +0 -1
  85. package/dist/layers.C1i1mw5H.js +0 -39
  86. package/dist/layers.C2RYi1R4.js +0 -9
  87. package/dist/layers.C3J_d41Q.js +0 -1
  88. package/dist/layers.C4I8YhJZ.js +0 -5
  89. package/dist/layers.C5qL4bIV.js +0 -205
  90. package/dist/layers.C6aCloZA.js +0 -38
  91. package/dist/layers.C7u0t-7x.js +0 -1286
  92. package/dist/layers.C8_lu5UH.js +0 -23
  93. package/dist/layers.CAAFE7RU.js +0 -139
  94. package/dist/layers.CB2mPEGO.js +0 -1
  95. package/dist/layers.CBcgiYqo.js +0 -4
  96. package/dist/layers.CCDs3V-r.js +0 -8
  97. package/dist/layers.CDLOFVyh.js +0 -38
  98. package/dist/layers.CGbUBRpT.js +0 -271
  99. package/dist/layers.CHZsXQcr.js +0 -1
  100. package/dist/layers.CIugfnNi.js +0 -3
  101. package/dist/layers.CJjG7mfo.js +0 -122
  102. package/dist/layers.CJuRWDaP.js +0 -4
  103. package/dist/layers.CJx3dksh.js +0 -160
  104. package/dist/layers.CKG-SsM4.js +0 -11
  105. package/dist/layers.CKquYTab.js +0 -1
  106. package/dist/layers.CLVteXPI.js +0 -1
  107. package/dist/layers.CMSKPoUf.js +0 -1
  108. package/dist/layers.CMi59Dge.js +0 -10
  109. package/dist/layers.CPPXzJSG.js +0 -36
  110. package/dist/layers.CQZ1lodE.js +0 -7
  111. package/dist/layers.CQzsYN9o.js +0 -35
  112. package/dist/layers.CRHVKIv6.js +0 -6
  113. package/dist/layers.CSf6dhab.js +0 -6
  114. package/dist/layers.CWNyz0df.js +0 -772
  115. package/dist/layers.CZmZZ456.js +0 -1
  116. package/dist/layers.C_-XV7nk.js +0 -84
  117. package/dist/layers.C_IvrzZ3.js +0 -7
  118. package/dist/layers.Ca9pf4pJ.js +0 -76
  119. package/dist/layers.CbY0jZsb.js +0 -32
  120. package/dist/layers.Cc2rZkMQ.js +0 -1
  121. package/dist/layers.Cd9MRGMA.js +0 -7
  122. package/dist/layers.CexInYJw.js +0 -41
  123. package/dist/layers.CfUjnxzs.js +0 -36
  124. package/dist/layers.CfiPo1zZ.js +0 -10
  125. package/dist/layers.CftSz0vc.js +0 -1
  126. package/dist/layers.Cfv_lKzM.js +0 -10
  127. package/dist/layers.CgV5Zdgg.js +0 -41
  128. package/dist/layers.Cho0M3o5.js +0 -9
  129. package/dist/layers.CiGopRcm.js +0 -1
  130. package/dist/layers.Ck8FKMZm.js +0 -1
  131. package/dist/layers.ClN7_yK6.js +0 -5
  132. package/dist/layers.CmzeQrqF.js +0 -1
  133. package/dist/layers.Cnf9xVrU.js +0 -37
  134. package/dist/layers.Cq1FOBBz.js +0 -1089
  135. package/dist/layers.CqVTtuYm.js +0 -6
  136. package/dist/layers.CtVzpEDj.js +0 -6
  137. package/dist/layers.CvxLmsUR.js +0 -794
  138. package/dist/layers.Cx0MLYpT.js +0 -8
  139. package/dist/layers.CxBPsaPO.js +0 -39
  140. package/dist/layers.Cxm8b7tr.js +0 -39
  141. package/dist/layers.CyodKjZl.js +0 -8
  142. package/dist/layers.Cyzu9PKQ.js +0 -1
  143. package/dist/layers.Cz-fKIJ9.js +0 -36
  144. package/dist/layers.CzhydN8y.js +0 -1
  145. package/dist/layers.D-An1dnI.js +0 -14
  146. package/dist/layers.D-gA0YP7.js +0 -323
  147. package/dist/layers.D0q1Ima3.js +0 -8
  148. package/dist/layers.D0zn4_Mx.js +0 -1
  149. package/dist/layers.D2BUdbOP.js +0 -42
  150. package/dist/layers.D3R9NG6l.js +0 -36
  151. package/dist/layers.D4CL9IrO.js +0 -40
  152. package/dist/layers.D4T8fTcj.js +0 -1223
  153. package/dist/layers.D5rUZxAZ.js +0 -7
  154. package/dist/layers.D6_pquAg.js +0 -5
  155. package/dist/layers.D7jGxypv.js +0 -8
  156. package/dist/layers.D8mu5H7D.js +0 -40
  157. package/dist/layers.D9hwmTsT.js +0 -40
  158. package/dist/layers.DD85x_gL.js +0 -70
  159. package/dist/layers.DEafoGBP.js +0 -276
  160. package/dist/layers.DHntpDKc.js +0 -7
  161. package/dist/layers.DLMNg96A.js +0 -38
  162. package/dist/layers.DLofN-Lu.js +0 -8583
  163. package/dist/layers.DLwuMfdd.js +0 -84
  164. package/dist/layers.DMJTlnQs.js +0 -805
  165. package/dist/layers.DMkBISW1.js +0 -1
  166. package/dist/layers.DN9HoVxI.js +0 -18
  167. package/dist/layers.DN_7Oas1.js +0 -1034
  168. package/dist/layers.DO0LV8uH.js +0 -9
  169. package/dist/layers.DOGjj8Tb.js +0 -9
  170. package/dist/layers.DOU0CUz1.js +0 -9
  171. package/dist/layers.DOrgOHBr.js +0 -1
  172. package/dist/layers.DQ9XoPxf.js +0 -35
  173. package/dist/layers.DRJ1C2cQ.js +0 -907
  174. package/dist/layers.DW4YSj_5.js +0 -425
  175. package/dist/layers.DWZOB_8o.js +0 -48149
  176. package/dist/layers.DXraj6Ay.js +0 -806
  177. package/dist/layers.DZ1kwAKl.js +0 -41
  178. package/dist/layers.DZkyZJBC.js +0 -2966
  179. package/dist/layers.DasUia_A.js +0 -96
  180. package/dist/layers.DbLpb0GU.js +0 -5
  181. package/dist/layers.DbaKVP5e.js +0 -1
  182. package/dist/layers.Des3K8ZW.js +0 -257
  183. package/dist/layers.DfNV-1tq.js +0 -1
  184. package/dist/layers.Dg4R4jUk.js +0 -39
  185. package/dist/layers.DiMecbBf.js +0 -213
  186. package/dist/layers.DjUOC4st.js +0 -16
  187. package/dist/layers.Djrk43ut.js +0 -7
  188. package/dist/layers.DkU_CdUC.js +0 -1
  189. package/dist/layers.DmGGgMLi.js +0 -32
  190. package/dist/layers.DmWCogHY.js +0 -9
  191. package/dist/layers.DmrEOz9f.js +0 -40
  192. package/dist/layers.DoRJikzG.js +0 -33
  193. package/dist/layers.DoUFJmIZ.js +0 -2482
  194. package/dist/layers.DpOQ0SWe.js +0 -41
  195. package/dist/layers.DpTLOdAf.js +0 -2
  196. package/dist/layers.Dpx73nZ5.js +0 -37
  197. package/dist/layers.DrjRMlMd.js +0 -504
  198. package/dist/layers.DsfTLYHN.js +0 -295
  199. package/dist/layers.DtKC3G6H.js +0 -40
  200. package/dist/layers.DtOyZMno.js +0 -42
  201. package/dist/layers.Dv9gkxbE.js +0 -8
  202. package/dist/layers.DvK2O2ur.js +0 -21941
  203. package/dist/layers.DxA6ocdw.js +0 -70
  204. package/dist/layers.Dxw5Sd8s.js +0 -223
  205. package/dist/layers.Dy1naDTQ.js +0 -14
  206. package/dist/layers.Dy44TnYE.js +0 -32
  207. package/dist/layers.DyypgoWd.js +0 -39
  208. package/dist/layers.Dzcm8AcP.js +0 -1583
  209. package/dist/layers.F0RyUduP.js +0 -65
  210. package/dist/layers.F544mK7B.js +0 -41
  211. package/dist/layers.GAckqh_M.js +0 -40
  212. package/dist/layers.HUIM9HzL.js +0 -9
  213. package/dist/layers.HfEMdS1b.js +0 -10
  214. package/dist/layers.JWCLFILJ.js +0 -1
  215. package/dist/layers.MIHL5IVH.js +0 -7
  216. package/dist/layers.N0yl3_Na.js +0 -44
  217. package/dist/layers.NWhpAYeJ.js +0 -198
  218. package/dist/layers.Q2Aadwn9.js +0 -42
  219. package/dist/layers.R8mPlCA0.js +0 -261
  220. package/dist/layers.Vof2qGdM.js +0 -1088
  221. package/dist/layers.W_ErWU4y.js +0 -139
  222. package/dist/layers.WlID94Nt.js +0 -6
  223. package/dist/layers.YY1k0HSU.js +0 -1
  224. package/dist/layers.YjzlfOSN.js +0 -84
  225. package/dist/layers.ZX3I648e.js +0 -934
  226. package/dist/layers.b0h5ZBmD.js +0 -61
  227. package/dist/layers.bPp4y4tJ.js +0 -423
  228. package/dist/layers.bXo5QOKy.js +0 -5
  229. package/dist/layers.bkVgdJRL.js +0 -2
  230. package/dist/layers.d6r5nQuW.js +0 -11
  231. package/dist/layers.dl89lGbj.js +0 -33
  232. package/dist/layers.dswX3xs9.js +0 -1
  233. package/dist/layers.efcYaHoV.js +0 -32
  234. package/dist/layers.fLsBww_F.js +0 -1
  235. package/dist/layers.i1FJeF3y.js +0 -37
  236. package/dist/layers.jU6Z3i2q.js +0 -40
  237. package/dist/layers.k6Lqzy4i.js +0 -8
  238. package/dist/layers.lCpg7dOn.js +0 -21
  239. package/dist/layers.nVP4QDpX.js +0 -118
  240. package/dist/layers.obbaq0Iy.js +0 -42
  241. package/dist/layers.ooKeArD_.js +0 -34
  242. package/dist/layers.pXaWfCQn.js +0 -40
  243. package/dist/layers.pYlF8GU4.js +0 -32
  244. package/dist/layers.qhRg6f--.js +0 -11
  245. package/dist/layers.rNCWSOcA.js +0 -7
  246. package/dist/layers.t1lmm4vP.js +0 -13
  247. package/dist/layers.wEFFSFio.js +0 -21620
  248. package/dist/layers.zAXb9NBT.js +0 -9
@@ -1,796 +0,0 @@
1
- import { a2 as gt, a3 as ft, a4 as mt, g as xt, l as E, d as G, Y as _t, a5 as bt, q as kt } from "./layers.DLofN-Lu.js";
2
- import "./layers.wEFFSFio.js";
3
- import "lodash-es/memoize.js";
4
- import "lodash-es/merge.js";
5
- import "lodash-es/isEmpty.js";
6
- import { a as D } from "./layers.C_-XV7nk.js";
7
- var K = (function() {
8
- var n = function(f, i, r, c) {
9
- for (r = r || {}, c = f.length; c--; r[f[c]] = i)
10
- ;
11
- return r;
12
- }, t = [6, 8, 10, 11, 12, 14, 16, 17, 20, 21], e = [1, 9], a = [1, 10], s = [1, 11], h = [1, 12], o = [1, 13], p = [1, 16], y = [1, 17], g = {
13
- trace: function() {
14
- },
15
- yy: {},
16
- symbols_: { error: 2, start: 3, timeline: 4, document: 5, EOF: 6, line: 7, SPACE: 8, statement: 9, NEWLINE: 10, title: 11, acc_title: 12, acc_title_value: 13, acc_descr: 14, acc_descr_value: 15, acc_descr_multiline_value: 16, section: 17, period_statement: 18, event_statement: 19, period: 20, event: 21, $accept: 0, $end: 1 },
17
- terminals_: { 2: "error", 4: "timeline", 6: "EOF", 8: "SPACE", 10: "NEWLINE", 11: "title", 12: "acc_title", 13: "acc_title_value", 14: "acc_descr", 15: "acc_descr_value", 16: "acc_descr_multiline_value", 17: "section", 20: "period", 21: "event" },
18
- productions_: [0, [3, 3], [5, 0], [5, 2], [7, 2], [7, 1], [7, 1], [7, 1], [9, 1], [9, 2], [9, 2], [9, 1], [9, 1], [9, 1], [9, 1], [18, 1], [19, 1]],
19
- performAction: function(i, r, c, d, u, l, $) {
20
- var x = l.length - 1;
21
- switch (u) {
22
- case 1:
23
- return l[x - 1];
24
- case 2:
25
- this.$ = [];
26
- break;
27
- case 3:
28
- l[x - 1].push(l[x]), this.$ = l[x - 1];
29
- break;
30
- case 4:
31
- case 5:
32
- this.$ = l[x];
33
- break;
34
- case 6:
35
- case 7:
36
- this.$ = [];
37
- break;
38
- case 8:
39
- d.getCommonDb().setDiagramTitle(l[x].substr(6)), this.$ = l[x].substr(6);
40
- break;
41
- case 9:
42
- this.$ = l[x].trim(), d.getCommonDb().setAccTitle(this.$);
43
- break;
44
- case 10:
45
- case 11:
46
- this.$ = l[x].trim(), d.getCommonDb().setAccDescription(this.$);
47
- break;
48
- case 12:
49
- d.addSection(l[x].substr(8)), this.$ = l[x].substr(8);
50
- break;
51
- case 15:
52
- d.addTask(l[x], 0, ""), this.$ = l[x];
53
- break;
54
- case 16:
55
- d.addEvent(l[x].substr(2)), this.$ = l[x];
56
- break;
57
- }
58
- },
59
- table: [{ 3: 1, 4: [1, 2] }, { 1: [3] }, n(t, [2, 2], { 5: 3 }), { 6: [1, 4], 7: 5, 8: [1, 6], 9: 7, 10: [1, 8], 11: e, 12: a, 14: s, 16: h, 17: o, 18: 14, 19: 15, 20: p, 21: y }, n(t, [2, 7], { 1: [2, 1] }), n(t, [2, 3]), { 9: 18, 11: e, 12: a, 14: s, 16: h, 17: o, 18: 14, 19: 15, 20: p, 21: y }, n(t, [2, 5]), n(t, [2, 6]), n(t, [2, 8]), { 13: [1, 19] }, { 15: [1, 20] }, n(t, [2, 11]), n(t, [2, 12]), n(t, [2, 13]), n(t, [2, 14]), n(t, [2, 15]), n(t, [2, 16]), n(t, [2, 4]), n(t, [2, 9]), n(t, [2, 10])],
60
- defaultActions: {},
61
- parseError: function(i, r) {
62
- if (r.recoverable)
63
- this.trace(i);
64
- else {
65
- var c = new Error(i);
66
- throw c.hash = r, c;
67
- }
68
- },
69
- parse: function(i) {
70
- var r = this, c = [0], d = [], u = [null], l = [], $ = this.table, x = "", T = 0, W = 0, C = 2, A = 1, B = l.slice.call(arguments, 1), k = Object.create(this.lexer), w = { yy: {} };
71
- for (var v in this.yy)
72
- Object.prototype.hasOwnProperty.call(this.yy, v) && (w.yy[v] = this.yy[v]);
73
- k.setInput(i, w.yy), w.yy.lexer = k, w.yy.parser = this, typeof k.yylloc > "u" && (k.yylloc = {});
74
- var I = k.yylloc;
75
- l.push(I);
76
- var H = k.options && k.options.ranges;
77
- typeof w.yy.parseError == "function" ? this.parseError = w.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
78
- function z() {
79
- var M;
80
- return M = d.pop() || k.lex() || A, typeof M != "number" && (M instanceof Array && (d = M, M = d.pop()), M = r.symbols_[M] || M), M;
81
- }
82
- for (var b, L, S, Z, R = {}, O, N, Y, j; ; ) {
83
- if (L = c[c.length - 1], this.defaultActions[L] ? S = this.defaultActions[L] : ((b === null || typeof b > "u") && (b = z()), S = $[L] && $[L][b]), typeof S > "u" || !S.length || !S[0]) {
84
- var J = "";
85
- j = [];
86
- for (O in $[L])
87
- this.terminals_[O] && O > C && j.push("'" + this.terminals_[O] + "'");
88
- k.showPosition ? J = "Parse error on line " + (T + 1) + `:
89
- ` + k.showPosition() + `
90
- Expecting ` + j.join(", ") + ", got '" + (this.terminals_[b] || b) + "'" : J = "Parse error on line " + (T + 1) + ": Unexpected " + (b == A ? "end of input" : "'" + (this.terminals_[b] || b) + "'"), this.parseError(J, {
91
- text: k.match,
92
- token: this.terminals_[b] || b,
93
- line: k.yylineno,
94
- loc: I,
95
- expected: j
96
- });
97
- }
98
- if (S[0] instanceof Array && S.length > 1)
99
- throw new Error("Parse Error: multiple actions possible at state: " + L + ", token: " + b);
100
- switch (S[0]) {
101
- case 1:
102
- c.push(b), u.push(k.yytext), l.push(k.yylloc), c.push(S[1]), b = null, W = k.yyleng, x = k.yytext, T = k.yylineno, I = k.yylloc;
103
- break;
104
- case 2:
105
- if (N = this.productions_[S[1]][1], R.$ = u[u.length - N], R._$ = {
106
- first_line: l[l.length - (N || 1)].first_line,
107
- last_line: l[l.length - 1].last_line,
108
- first_column: l[l.length - (N || 1)].first_column,
109
- last_column: l[l.length - 1].last_column
110
- }, H && (R._$.range = [
111
- l[l.length - (N || 1)].range[0],
112
- l[l.length - 1].range[1]
113
- ]), Z = this.performAction.apply(R, [
114
- x,
115
- W,
116
- T,
117
- w.yy,
118
- S[1],
119
- u,
120
- l
121
- ].concat(B)), typeof Z < "u")
122
- return Z;
123
- N && (c = c.slice(0, -1 * N * 2), u = u.slice(0, -1 * N), l = l.slice(0, -1 * N)), c.push(this.productions_[S[1]][0]), u.push(R.$), l.push(R._$), Y = $[c[c.length - 2]][c[c.length - 1]], c.push(Y);
124
- break;
125
- case 3:
126
- return !0;
127
- }
128
- }
129
- return !0;
130
- }
131
- }, _ = /* @__PURE__ */ (function() {
132
- var f = {
133
- EOF: 1,
134
- parseError: function(r, c) {
135
- if (this.yy.parser)
136
- this.yy.parser.parseError(r, c);
137
- else
138
- throw new Error(r);
139
- },
140
- // resets the lexer, sets new input
141
- setInput: function(i, r) {
142
- return this.yy = r || this.yy || {}, this._input = i, this._more = this._backtrack = this.done = !1, this.yylineno = this.yyleng = 0, this.yytext = this.matched = this.match = "", this.conditionStack = ["INITIAL"], this.yylloc = {
143
- first_line: 1,
144
- first_column: 0,
145
- last_line: 1,
146
- last_column: 0
147
- }, this.options.ranges && (this.yylloc.range = [0, 0]), this.offset = 0, this;
148
- },
149
- // consumes and returns one char from the input
150
- input: function() {
151
- var i = this._input[0];
152
- this.yytext += i, this.yyleng++, this.offset++, this.match += i, this.matched += i;
153
- var r = i.match(/(?:\r\n?|\n).*/g);
154
- return r ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++, this.options.ranges && this.yylloc.range[1]++, this._input = this._input.slice(1), i;
155
- },
156
- // unshifts one char (or a string) into the input
157
- unput: function(i) {
158
- var r = i.length, c = i.split(/(?:\r\n?|\n)/g);
159
- this._input = i + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - r), this.offset -= r;
160
- var d = this.match.split(/(?:\r\n?|\n)/g);
161
- this.match = this.match.substr(0, this.match.length - 1), this.matched = this.matched.substr(0, this.matched.length - 1), c.length - 1 && (this.yylineno -= c.length - 1);
162
- var u = this.yylloc.range;
163
- return this.yylloc = {
164
- first_line: this.yylloc.first_line,
165
- last_line: this.yylineno + 1,
166
- first_column: this.yylloc.first_column,
167
- last_column: c ? (c.length === d.length ? this.yylloc.first_column : 0) + d[d.length - c.length].length - c[0].length : this.yylloc.first_column - r
168
- }, this.options.ranges && (this.yylloc.range = [u[0], u[0] + this.yyleng - r]), this.yyleng = this.yytext.length, this;
169
- },
170
- // When called from action, caches matched text and appends it on next action
171
- more: function() {
172
- return this._more = !0, this;
173
- },
174
- // 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.
175
- reject: function() {
176
- if (this.options.backtrack_lexer)
177
- this._backtrack = !0;
178
- else
179
- 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).
180
- ` + this.showPosition(), {
181
- text: "",
182
- token: null,
183
- line: this.yylineno
184
- });
185
- return this;
186
- },
187
- // retain first n characters of the match
188
- less: function(i) {
189
- this.unput(this.match.slice(i));
190
- },
191
- // displays already matched input, i.e. for error messages
192
- pastInput: function() {
193
- var i = this.matched.substr(0, this.matched.length - this.match.length);
194
- return (i.length > 20 ? "..." : "") + i.substr(-20).replace(/\n/g, "");
195
- },
196
- // displays upcoming input, i.e. for error messages
197
- upcomingInput: function() {
198
- var i = this.match;
199
- return i.length < 20 && (i += this._input.substr(0, 20 - i.length)), (i.substr(0, 20) + (i.length > 20 ? "..." : "")).replace(/\n/g, "");
200
- },
201
- // displays the character position where the lexing error occurred, i.e. for error messages
202
- showPosition: function() {
203
- var i = this.pastInput(), r = new Array(i.length + 1).join("-");
204
- return i + this.upcomingInput() + `
205
- ` + r + "^";
206
- },
207
- // test the lexed token: return FALSE when not a match, otherwise return token
208
- test_match: function(i, r) {
209
- var c, d, u;
210
- if (this.options.backtrack_lexer && (u = {
211
- yylineno: this.yylineno,
212
- yylloc: {
213
- first_line: this.yylloc.first_line,
214
- last_line: this.last_line,
215
- first_column: this.yylloc.first_column,
216
- last_column: this.yylloc.last_column
217
- },
218
- yytext: this.yytext,
219
- match: this.match,
220
- matches: this.matches,
221
- matched: this.matched,
222
- yyleng: this.yyleng,
223
- offset: this.offset,
224
- _more: this._more,
225
- _input: this._input,
226
- yy: this.yy,
227
- conditionStack: this.conditionStack.slice(0),
228
- done: this.done
229
- }, this.options.ranges && (u.yylloc.range = this.yylloc.range.slice(0))), d = i[0].match(/(?:\r\n?|\n).*/g), d && (this.yylineno += d.length), this.yylloc = {
230
- first_line: this.yylloc.last_line,
231
- last_line: this.yylineno + 1,
232
- first_column: this.yylloc.last_column,
233
- last_column: d ? d[d.length - 1].length - d[d.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + i[0].length
234
- }, this.yytext += i[0], this.match += i[0], this.matches = i, 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(i[0].length), this.matched += i[0], c = this.performAction.call(this, this.yy, this, r, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), c)
235
- return c;
236
- if (this._backtrack) {
237
- for (var l in u)
238
- this[l] = u[l];
239
- return !1;
240
- }
241
- return !1;
242
- },
243
- // return next match in input
244
- next: function() {
245
- if (this.done)
246
- return this.EOF;
247
- this._input || (this.done = !0);
248
- var i, r, c, d;
249
- this._more || (this.yytext = "", this.match = "");
250
- for (var u = this._currentRules(), l = 0; l < u.length; l++)
251
- if (c = this._input.match(this.rules[u[l]]), c && (!r || c[0].length > r[0].length)) {
252
- if (r = c, d = l, this.options.backtrack_lexer) {
253
- if (i = this.test_match(c, u[l]), i !== !1)
254
- return i;
255
- if (this._backtrack) {
256
- r = !1;
257
- continue;
258
- } else
259
- return !1;
260
- } else if (!this.options.flex)
261
- break;
262
- }
263
- return r ? (i = this.test_match(r, u[d]), i !== !1 ? i : !1) : this._input === "" ? this.EOF : this.parseError("Lexical error on line " + (this.yylineno + 1) + `. Unrecognized text.
264
- ` + this.showPosition(), {
265
- text: "",
266
- token: null,
267
- line: this.yylineno
268
- });
269
- },
270
- // return next match that has a token
271
- lex: function() {
272
- var r = this.next();
273
- return r || this.lex();
274
- },
275
- // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)
276
- begin: function(r) {
277
- this.conditionStack.push(r);
278
- },
279
- // pop the previously active lexer condition state off the condition stack
280
- popState: function() {
281
- var r = this.conditionStack.length - 1;
282
- return r > 0 ? this.conditionStack.pop() : this.conditionStack[0];
283
- },
284
- // produce the lexer rule set which is active for the currently active lexer condition state
285
- _currentRules: function() {
286
- return this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1] ? this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules : this.conditions.INITIAL.rules;
287
- },
288
- // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available
289
- topState: function(r) {
290
- return r = this.conditionStack.length - 1 - Math.abs(r || 0), r >= 0 ? this.conditionStack[r] : "INITIAL";
291
- },
292
- // alias for begin(condition)
293
- pushState: function(r) {
294
- this.begin(r);
295
- },
296
- // return the number of states currently on the stack
297
- stateStackSize: function() {
298
- return this.conditionStack.length;
299
- },
300
- options: { "case-insensitive": !0 },
301
- performAction: function(r, c, d, u) {
302
- switch (d) {
303
- case 0:
304
- break;
305
- case 1:
306
- break;
307
- case 2:
308
- return 10;
309
- case 3:
310
- break;
311
- case 4:
312
- break;
313
- case 5:
314
- return 4;
315
- case 6:
316
- return 11;
317
- case 7:
318
- return this.begin("acc_title"), 12;
319
- case 8:
320
- return this.popState(), "acc_title_value";
321
- case 9:
322
- return this.begin("acc_descr"), 14;
323
- case 10:
324
- return this.popState(), "acc_descr_value";
325
- case 11:
326
- this.begin("acc_descr_multiline");
327
- break;
328
- case 12:
329
- this.popState();
330
- break;
331
- case 13:
332
- return "acc_descr_multiline_value";
333
- case 14:
334
- return 17;
335
- case 15:
336
- return 21;
337
- case 16:
338
- return 20;
339
- case 17:
340
- return 6;
341
- case 18:
342
- return "INVALID";
343
- }
344
- },
345
- rules: [/^(?:%(?!\{)[^\n]*)/i, /^(?:[^\}]%%[^\n]*)/i, /^(?:[\n]+)/i, /^(?:\s+)/i, /^(?:#[^\n]*)/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;]+)/i, /^(?:[^#:\n;]+)/i, /^(?:$)/i, /^(?:.)/i],
346
- conditions: { acc_descr_multiline: { rules: [12, 13], inclusive: !1 }, acc_descr: { rules: [10], inclusive: !1 }, acc_title: { rules: [8], inclusive: !1 }, INITIAL: { rules: [0, 1, 2, 3, 4, 5, 6, 7, 9, 11, 14, 15, 16, 17, 18], inclusive: !0 } }
347
- };
348
- return f;
349
- })();
350
- g.lexer = _;
351
- function m() {
352
- this.yy = {};
353
- }
354
- return m.prototype = g, g.Parser = m, new m();
355
- })();
356
- K.parser = K;
357
- const vt = K;
358
- let F = "", st = 0;
359
- const Q = [], q = [], V = [], it = () => bt, rt = function() {
360
- Q.length = 0, q.length = 0, F = "", V.length = 0, kt();
361
- }, at = function(n) {
362
- F = n, Q.push(n);
363
- }, ot = function() {
364
- return Q;
365
- }, lt = function() {
366
- let n = tt();
367
- const t = 100;
368
- let e = 0;
369
- for (; !n && e < t; )
370
- n = tt(), e++;
371
- return q.push(...V), q;
372
- }, ct = function(n, t, e) {
373
- const a = {
374
- id: st++,
375
- section: F,
376
- type: F,
377
- task: n,
378
- score: t || 0,
379
- //if event is defined, then add it the events array
380
- events: e ? [e] : []
381
- };
382
- V.push(a);
383
- }, ht = function(n) {
384
- V.find((e) => e.id === st - 1).events.push(n);
385
- }, dt = function(n) {
386
- const t = {
387
- section: F,
388
- type: F,
389
- description: n,
390
- task: n,
391
- classes: []
392
- };
393
- q.push(t);
394
- }, tt = function() {
395
- const n = function(e) {
396
- return V[e].processed;
397
- };
398
- let t = !0;
399
- for (const [e, a] of V.entries())
400
- n(e), t = t && a.processed;
401
- return t;
402
- }, wt = {
403
- clear: rt,
404
- getCommonDb: it,
405
- addSection: at,
406
- getSections: ot,
407
- getTasks: lt,
408
- addTask: ct,
409
- addTaskOrg: dt,
410
- addEvent: ht
411
- }, St = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
412
- __proto__: null,
413
- addEvent: ht,
414
- addSection: at,
415
- addTask: ct,
416
- addTaskOrg: dt,
417
- clear: rt,
418
- default: wt,
419
- getCommonDb: it,
420
- getSections: ot,
421
- getTasks: lt
422
- }, Symbol.toStringTag, { value: "Module" })), Et = 12, U = function(n, t) {
423
- const e = n.append("rect");
424
- 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;
425
- }, Tt = function(n, t) {
426
- const a = n.append("circle").attr("cx", t.cx).attr("cy", t.cy).attr("class", "face").attr("r", 15).attr("stroke-width", 2).attr("overflow", "visible"), s = n.append("g");
427
- s.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"), s.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");
428
- function h(y) {
429
- const g = D().startAngle(Math.PI / 2).endAngle(3 * (Math.PI / 2)).innerRadius(7.5).outerRadius(6.8181818181818175);
430
- y.append("path").attr("class", "mouth").attr("d", g).attr("transform", "translate(" + t.cx + "," + (t.cy + 2) + ")");
431
- }
432
- function o(y) {
433
- const g = D().startAngle(3 * Math.PI / 2).endAngle(5 * (Math.PI / 2)).innerRadius(7.5).outerRadius(6.8181818181818175);
434
- y.append("path").attr("class", "mouth").attr("d", g).attr("transform", "translate(" + t.cx + "," + (t.cy + 7) + ")");
435
- }
436
- function p(y) {
437
- 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");
438
- }
439
- return t.score > 3 ? h(s) : t.score < 3 ? o(s) : p(s), a;
440
- }, It = function(n, t) {
441
- const e = n.append("circle");
442
- 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;
443
- }, ut = function(n, t) {
444
- const e = t.text.replace(/<br\s*\/?>/gi, " "), a = n.append("text");
445
- a.attr("x", t.x), a.attr("y", t.y), a.attr("class", "legend"), a.style("text-anchor", t.anchor), t.class !== void 0 && a.attr("class", t.class);
446
- const s = a.append("tspan");
447
- return s.attr("x", t.x + t.textMargin * 2), s.text(e), a;
448
- }, $t = function(n, t) {
449
- function e(s, h, o, p, y) {
450
- return s + "," + h + " " + (s + o) + "," + h + " " + (s + o) + "," + (h + p - y) + " " + (s + o - y * 1.2) + "," + (h + p) + " " + s + "," + (h + p);
451
- }
452
- const a = n.append("polygon");
453
- a.attr("points", e(t.x, t.y, 50, 20, 7)), a.attr("class", "labelBox"), t.y = t.y + t.labelMargin, t.x = t.x + 0.5 * t.labelMargin, ut(n, t);
454
- }, Nt = function(n, t, e) {
455
- const a = n.append("g"), s = X();
456
- s.x = t.x, s.y = t.y, s.fill = t.fill, s.width = e.width, s.height = e.height, s.class = "journey-section section-type-" + t.num, s.rx = 3, s.ry = 3, U(a, s), pt(e)(
457
- t.text,
458
- a,
459
- s.x,
460
- s.y,
461
- s.width,
462
- s.height,
463
- { class: "journey-section section-type-" + t.num },
464
- e,
465
- t.colour
466
- );
467
- };
468
- let et = -1;
469
- const Mt = function(n, t, e) {
470
- const a = t.x + e.width / 2, s = n.append("g");
471
- et++, s.append("line").attr("id", "task" + et).attr("x1", a).attr("y1", t.y).attr("x2", a).attr("y2", 450).attr("class", "task-line").attr("stroke-width", "1px").attr("stroke-dasharray", "4 2").attr("stroke", "#666"), Tt(s, {
472
- cx: a,
473
- cy: 300 + (5 - t.score) * 30,
474
- score: t.score
475
- });
476
- const o = X();
477
- o.x = t.x, o.y = t.y, o.fill = t.fill, o.width = e.width, o.height = e.height, o.class = "task task-type-" + t.num, o.rx = 3, o.ry = 3, U(s, o), t.x + 14, pt(e)(
478
- t.task,
479
- s,
480
- o.x,
481
- o.y,
482
- o.width,
483
- o.height,
484
- { class: "task" },
485
- e,
486
- t.colour
487
- );
488
- }, Lt = function(n, t) {
489
- U(n, {
490
- x: t.startx,
491
- y: t.starty,
492
- width: t.stopx - t.startx,
493
- height: t.stopy - t.starty,
494
- fill: t.fill,
495
- class: "rect"
496
- }).lower();
497
- }, At = function() {
498
- return {
499
- x: 0,
500
- y: 0,
501
- fill: void 0,
502
- "text-anchor": "start",
503
- width: 100,
504
- height: 100,
505
- textMargin: 0,
506
- rx: 0,
507
- ry: 0
508
- };
509
- }, X = function() {
510
- return {
511
- x: 0,
512
- y: 0,
513
- width: 100,
514
- anchor: "start",
515
- height: 100,
516
- rx: 0,
517
- ry: 0
518
- };
519
- }, pt = /* @__PURE__ */ (function() {
520
- function n(s, h, o, p, y, g, _, m) {
521
- const f = h.append("text").attr("x", o + y / 2).attr("y", p + g / 2 + 5).style("font-color", m).style("text-anchor", "middle").text(s);
522
- a(f, _);
523
- }
524
- function t(s, h, o, p, y, g, _, m, f) {
525
- const { taskFontSize: i, taskFontFamily: r } = m, c = s.split(/<br\s*\/?>/gi);
526
- for (let d = 0; d < c.length; d++) {
527
- const u = d * i - i * (c.length - 1) / 2, l = h.append("text").attr("x", o + y / 2).attr("y", p).attr("fill", f).style("text-anchor", "middle").style("font-size", i).style("font-family", r);
528
- l.append("tspan").attr("x", o + y / 2).attr("dy", u).text(c[d]), l.attr("y", p + g / 2).attr("dominant-baseline", "central").attr("alignment-baseline", "central"), a(l, _);
529
- }
530
- }
531
- function e(s, h, o, p, y, g, _, m) {
532
- const f = h.append("switch"), r = f.append("foreignObject").attr("x", o).attr("y", p).attr("width", y).attr("height", g).attr("position", "fixed").append("xhtml:div").style("display", "table").style("height", "100%").style("width", "100%");
533
- r.append("div").attr("class", "label").style("display", "table-cell").style("text-align", "center").style("vertical-align", "middle").text(s), t(s, f, o, p, y, g, _, m), a(r, _);
534
- }
535
- function a(s, h) {
536
- for (const o in h)
537
- o in h && s.attr(o, h[o]);
538
- }
539
- return function(s) {
540
- return s.textPlacement === "fo" ? e : s.textPlacement === "old" ? n : t;
541
- };
542
- })(), Ht = function(n) {
543
- 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");
544
- };
545
- function yt(n, t) {
546
- n.each(function() {
547
- var e = G(this), a = e.text().split(/(\s+|<br>)/).reverse(), s, h = [], o = 1.1, p = e.attr("y"), y = parseFloat(e.attr("dy")), g = e.text(null).append("tspan").attr("x", 0).attr("y", p).attr("dy", y + "em");
548
- for (let _ = 0; _ < a.length; _++)
549
- s = a[a.length - 1 - _], h.push(s), g.text(h.join(" ").trim()), (g.node().getComputedTextLength() > t || s === "<br>") && (h.pop(), g.text(h.join(" ").trim()), s === "<br>" ? h = [""] : h = [s], g = e.append("tspan").attr("x", 0).attr("y", p).attr("dy", o + "em").text(s));
550
- });
551
- }
552
- const Pt = function(n, t, e, a) {
553
- const s = e % Et - 1, h = n.append("g");
554
- t.section = s, h.attr(
555
- "class",
556
- (t.class ? t.class + " " : "") + "timeline-node " + ("section-" + s)
557
- );
558
- const o = h.append("g"), p = h.append("g"), g = p.append("text").text(t.descr).attr("dy", "1em").attr("alignment-baseline", "middle").attr("dominant-baseline", "middle").attr("text-anchor", "middle").call(yt, t.width).node().getBBox(), _ = a.fontSize && a.fontSize.replace ? a.fontSize.replace("px", "") : a.fontSize;
559
- return t.height = g.height + _ * 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 + ")"), zt(o, t, s), t;
560
- }, Ct = function(n, t, e) {
561
- const a = n.append("g"), h = a.append("text").text(t.descr).attr("dy", "1em").attr("alignment-baseline", "middle").attr("dominant-baseline", "middle").attr("text-anchor", "middle").call(yt, t.width).node().getBBox(), o = e.fontSize && e.fontSize.replace ? e.fontSize.replace("px", "") : e.fontSize;
562
- return a.remove(), h.height + o * 1.1 * 0.5 + t.padding;
563
- }, zt = function(n, t, e) {
564
- n.append("path").attr("id", "node-" + t.id).attr("class", "node-bkg node-" + t.type).attr(
565
- "d",
566
- `M0 ${t.height - 5} v${-t.height + 10} q0,-5 5,-5 h${t.width - 10} q5,0 5,5 v${t.height - 5} H0 Z`
567
- ), n.append("line").attr("class", "node-line-" + e).attr("x1", 0).attr("y1", t.height).attr("x2", t.width).attr("y2", t.height);
568
- }, P = {
569
- drawRect: U,
570
- drawCircle: It,
571
- drawSection: Nt,
572
- drawText: ut,
573
- drawLabel: $t,
574
- drawTask: Mt,
575
- drawBackgroundRect: Lt,
576
- getTextObj: At,
577
- getNoteRect: X,
578
- initGraphics: Ht,
579
- drawNode: Pt,
580
- getVirtualNodeHeight: Ct
581
- }, Rt = function(n, t, e, a) {
582
- var s, h;
583
- const o = xt(), p = o.leftMargin ?? 50;
584
- E.debug("timeline", a.db);
585
- const y = o.securityLevel;
586
- let g;
587
- y === "sandbox" && (g = G("#i" + t));
588
- const m = (y === "sandbox" ? G(g.nodes()[0].contentDocument.body) : G("body")).select("#" + t);
589
- m.append("g");
590
- const f = a.db.getTasks(), i = a.db.getCommonDb().getDiagramTitle();
591
- E.debug("task", f), P.initGraphics(m);
592
- const r = a.db.getSections();
593
- E.debug("sections", r);
594
- let c = 0, d = 0, u = 0, l = 0, $ = 50 + p, x = 50;
595
- l = 50;
596
- let T = 0, W = !0;
597
- r.forEach(function(w) {
598
- const v = {
599
- number: T,
600
- descr: w,
601
- section: T,
602
- width: 150,
603
- padding: 20,
604
- maxHeight: c
605
- }, I = P.getVirtualNodeHeight(m, v, o);
606
- E.debug("sectionHeight before draw", I), c = Math.max(c, I + 20);
607
- });
608
- let C = 0, A = 0;
609
- E.debug("tasks.length", f.length);
610
- for (const [w, v] of f.entries()) {
611
- const I = {
612
- number: w,
613
- descr: v,
614
- section: v.section,
615
- width: 150,
616
- padding: 20,
617
- maxHeight: d
618
- }, H = P.getVirtualNodeHeight(m, I, o);
619
- E.debug("taskHeight before draw", H), d = Math.max(d, H + 20), C = Math.max(C, v.events.length);
620
- let z = 0;
621
- for (let b = 0; b < v.events.length; b++) {
622
- const S = {
623
- descr: v.events[b],
624
- section: v.section,
625
- number: v.section,
626
- width: 150,
627
- padding: 20,
628
- maxHeight: 50
629
- };
630
- z += P.getVirtualNodeHeight(m, S, o);
631
- }
632
- A = Math.max(A, z);
633
- }
634
- E.debug("maxSectionHeight before draw", c), E.debug("maxTaskHeight before draw", d), r && r.length > 0 ? r.forEach((w) => {
635
- const v = f.filter((b) => b.section === w), I = {
636
- number: T,
637
- descr: w,
638
- section: T,
639
- width: 200 * Math.max(v.length, 1) - 50,
640
- padding: 20,
641
- maxHeight: c
642
- };
643
- E.debug("sectionNode", I);
644
- const H = m.append("g"), z = P.drawNode(H, I, T, o);
645
- E.debug("sectionNode output", z), H.attr("transform", `translate(${$}, ${l})`), x += c + 50, v.length > 0 && nt(
646
- m,
647
- v,
648
- T,
649
- $,
650
- x,
651
- d,
652
- o,
653
- C,
654
- A,
655
- c,
656
- !1
657
- ), $ += 200 * Math.max(v.length, 1), x = l, T++;
658
- }) : (W = !1, nt(
659
- m,
660
- f,
661
- T,
662
- $,
663
- x,
664
- d,
665
- o,
666
- C,
667
- A,
668
- c,
669
- !0
670
- ));
671
- const B = m.node().getBBox();
672
- E.debug("bounds", B), i && m.append("text").text(i).attr("x", B.width / 2 - p).attr("font-size", "4ex").attr("font-weight", "bold").attr("y", 20), u = W ? c + d + 150 : d + 100, m.append("g").attr("class", "lineWrapper").append("line").attr("x1", p).attr("y1", u).attr("x2", B.width + 3 * p).attr("y2", u).attr("stroke-width", 4).attr("stroke", "black").attr("marker-end", "url(#arrowhead)"), _t(
673
- void 0,
674
- m,
675
- ((s = o.timeline) == null ? void 0 : s.padding) ?? 50,
676
- ((h = o.timeline) == null ? void 0 : h.useMaxWidth) ?? !1
677
- );
678
- }, nt = function(n, t, e, a, s, h, o, p, y, g, _) {
679
- var m;
680
- for (const f of t) {
681
- const i = {
682
- descr: f.task,
683
- section: e,
684
- number: e,
685
- width: 150,
686
- padding: 20,
687
- maxHeight: h
688
- };
689
- E.debug("taskNode", i);
690
- const r = n.append("g").attr("class", "taskWrapper"), d = P.drawNode(r, i, e, o).height;
691
- if (E.debug("taskHeight after draw", d), r.attr("transform", `translate(${a}, ${s})`), h = Math.max(h, d), f.events) {
692
- const u = n.append("g").attr("class", "lineWrapper");
693
- let l = h;
694
- s += 100, l = l + Ft(n, f.events, e, a, s, o), s -= 100, u.append("line").attr("x1", a + 190 / 2).attr("y1", s + h).attr("x2", a + 190 / 2).attr(
695
- "y2",
696
- s + h + (_ ? h : g) + y + 120
697
- ).attr("stroke-width", 2).attr("stroke", "black").attr("marker-end", "url(#arrowhead)").attr("stroke-dasharray", "5,5");
698
- }
699
- a = a + 200, _ && !((m = o.timeline) != null && m.disableMulticolor) && e++;
700
- }
701
- s = s - 10;
702
- }, Ft = function(n, t, e, a, s, h) {
703
- let o = 0;
704
- const p = s;
705
- s = s + 100;
706
- for (const y of t) {
707
- const g = {
708
- descr: y,
709
- section: e,
710
- number: e,
711
- width: 150,
712
- padding: 20,
713
- maxHeight: 50
714
- };
715
- E.debug("eventNode", g);
716
- const _ = n.append("g").attr("class", "eventWrapper"), f = P.drawNode(_, g, e, h).height;
717
- o = o + f, _.attr("transform", `translate(${a}, ${s})`), s = s + 10 + f;
718
- }
719
- return s = p, o;
720
- }, Vt = {
721
- setConf: () => {
722
- },
723
- draw: Rt
724
- }, Wt = (n) => {
725
- let t = "";
726
- for (let e = 0; e < n.THEME_COLOR_LIMIT; e++)
727
- n["lineColor" + e] = n["lineColor" + e] || n["cScaleInv" + e], gt(n["lineColor" + e]) ? n["lineColor" + e] = ft(n["lineColor" + e], 20) : n["lineColor" + e] = mt(n["lineColor" + e], 20);
728
- for (let e = 0; e < n.THEME_COLOR_LIMIT; e++) {
729
- const a = "" + (17 - 3 * e);
730
- t += `
731
- .section-${e - 1} rect, .section-${e - 1} path, .section-${e - 1} circle, .section-${e - 1} path {
732
- fill: ${n["cScale" + e]};
733
- }
734
- .section-${e - 1} text {
735
- fill: ${n["cScaleLabel" + e]};
736
- }
737
- .node-icon-${e - 1} {
738
- font-size: 40px;
739
- color: ${n["cScaleLabel" + e]};
740
- }
741
- .section-edge-${e - 1}{
742
- stroke: ${n["cScale" + e]};
743
- }
744
- .edge-depth-${e - 1}{
745
- stroke-width: ${a};
746
- }
747
- .section-${e - 1} line {
748
- stroke: ${n["cScaleInv" + e]} ;
749
- stroke-width: 3;
750
- }
751
-
752
- .lineWrapper line{
753
- stroke: ${n["cScaleLabel" + e]} ;
754
- }
755
-
756
- .disabled, .disabled circle, .disabled text {
757
- fill: lightgray;
758
- }
759
- .disabled text {
760
- fill: #efefef;
761
- }
762
- `;
763
- }
764
- return t;
765
- }, Bt = (n) => `
766
- .edge {
767
- stroke-width: 3;
768
- }
769
- ${Wt(n)}
770
- .section-root rect, .section-root path, .section-root circle {
771
- fill: ${n.git0};
772
- }
773
- .section-root text {
774
- fill: ${n.gitBranchLabel0};
775
- }
776
- .icon-container {
777
- height:100%;
778
- display: flex;
779
- justify-content: center;
780
- align-items: center;
781
- }
782
- .edge {
783
- fill: none;
784
- }
785
- .eventWrapper {
786
- filter: brightness(120%);
787
- }
788
- `, Ot = Bt, Kt = {
789
- db: St,
790
- renderer: Vt,
791
- parser: vt,
792
- styles: Ot
793
- };
794
- export {
795
- Kt as diagram
796
- };