@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,1268 +0,0 @@
1
- import { n as vt, o as Ct, s as Ot, a as Pt, b as Gt, c as St, g as C, l as B, d as At, u as It, y as Nt, q as Ht, j as D, z as Bt } 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
- var mt = (function() {
7
- var r = function(S, o, u, d) {
8
- for (u = u || {}, d = S.length; d--; u[S[d]] = o)
9
- ;
10
- return u;
11
- }, n = [1, 3], l = [1, 6], h = [1, 4], i = [1, 5], c = [2, 5], p = [1, 12], m = [5, 7, 13, 19, 21, 23, 24, 26, 28, 31, 37, 40, 47], x = [7, 13, 19, 21, 23, 24, 26, 28, 31, 37, 40], y = [7, 12, 13, 19, 21, 23, 24, 26, 28, 31, 37, 40], a = [7, 13, 47], R = [1, 42], _ = [1, 41], b = [7, 13, 29, 32, 35, 38, 47], f = [1, 55], k = [1, 56], g = [1, 57], E = [7, 13, 32, 35, 42, 47], z = {
12
- trace: function() {
13
- },
14
- yy: {},
15
- symbols_: { error: 2, start: 3, eol: 4, GG: 5, document: 6, EOF: 7, ":": 8, DIR: 9, options: 10, body: 11, OPT: 12, NL: 13, line: 14, statement: 15, commitStatement: 16, mergeStatement: 17, cherryPickStatement: 18, acc_title: 19, acc_title_value: 20, acc_descr: 21, acc_descr_value: 22, acc_descr_multiline_value: 23, section: 24, branchStatement: 25, CHECKOUT: 26, ref: 27, BRANCH: 28, ORDER: 29, NUM: 30, CHERRY_PICK: 31, COMMIT_ID: 32, STR: 33, PARENT_COMMIT: 34, COMMIT_TAG: 35, EMPTYSTR: 36, MERGE: 37, COMMIT_TYPE: 38, commitType: 39, COMMIT: 40, commit_arg: 41, COMMIT_MSG: 42, NORMAL: 43, REVERSE: 44, HIGHLIGHT: 45, ID: 46, ";": 47, $accept: 0, $end: 1 },
16
- terminals_: { 2: "error", 5: "GG", 7: "EOF", 8: ":", 9: "DIR", 12: "OPT", 13: "NL", 19: "acc_title", 20: "acc_title_value", 21: "acc_descr", 22: "acc_descr_value", 23: "acc_descr_multiline_value", 24: "section", 26: "CHECKOUT", 28: "BRANCH", 29: "ORDER", 30: "NUM", 31: "CHERRY_PICK", 32: "COMMIT_ID", 33: "STR", 34: "PARENT_COMMIT", 35: "COMMIT_TAG", 36: "EMPTYSTR", 37: "MERGE", 38: "COMMIT_TYPE", 40: "COMMIT", 42: "COMMIT_MSG", 43: "NORMAL", 44: "REVERSE", 45: "HIGHLIGHT", 46: "ID", 47: ";" },
17
- productions_: [0, [3, 2], [3, 3], [3, 4], [3, 5], [6, 0], [6, 2], [10, 2], [10, 1], [11, 0], [11, 2], [14, 2], [14, 1], [15, 1], [15, 1], [15, 1], [15, 2], [15, 2], [15, 1], [15, 1], [15, 1], [15, 2], [25, 2], [25, 4], [18, 3], [18, 5], [18, 5], [18, 7], [18, 7], [18, 5], [18, 5], [18, 5], [18, 7], [18, 7], [18, 7], [18, 7], [17, 2], [17, 4], [17, 4], [17, 4], [17, 6], [17, 6], [17, 6], [17, 6], [17, 6], [17, 6], [17, 8], [17, 8], [17, 8], [17, 8], [17, 8], [17, 8], [16, 2], [16, 3], [16, 3], [16, 5], [16, 5], [16, 3], [16, 5], [16, 5], [16, 5], [16, 5], [16, 7], [16, 7], [16, 7], [16, 7], [16, 7], [16, 7], [16, 3], [16, 5], [16, 5], [16, 5], [16, 5], [16, 5], [16, 5], [16, 7], [16, 7], [16, 7], [16, 7], [16, 7], [16, 7], [16, 7], [16, 7], [16, 7], [16, 7], [16, 7], [16, 7], [16, 7], [16, 7], [16, 7], [16, 7], [16, 7], [16, 7], [16, 9], [16, 9], [16, 9], [16, 9], [16, 9], [16, 9], [16, 9], [16, 9], [16, 9], [16, 9], [16, 9], [16, 9], [16, 9], [16, 9], [16, 9], [16, 9], [16, 9], [16, 9], [16, 9], [16, 9], [16, 9], [16, 9], [16, 9], [16, 9], [41, 0], [41, 1], [39, 1], [39, 1], [39, 1], [27, 1], [27, 1], [4, 1], [4, 1], [4, 1]],
18
- performAction: function(o, u, d, s, T, t, X) {
19
- var e = t.length - 1;
20
- switch (T) {
21
- case 2:
22
- return t[e];
23
- case 3:
24
- return t[e - 1];
25
- case 4:
26
- return s.setDirection(t[e - 3]), t[e - 1];
27
- case 6:
28
- s.setOptions(t[e - 1]), this.$ = t[e];
29
- break;
30
- case 7:
31
- t[e - 1] += t[e], this.$ = t[e - 1];
32
- break;
33
- case 9:
34
- this.$ = [];
35
- break;
36
- case 10:
37
- t[e - 1].push(t[e]), this.$ = t[e - 1];
38
- break;
39
- case 11:
40
- this.$ = t[e - 1];
41
- break;
42
- case 16:
43
- this.$ = t[e].trim(), s.setAccTitle(this.$);
44
- break;
45
- case 17:
46
- case 18:
47
- this.$ = t[e].trim(), s.setAccDescription(this.$);
48
- break;
49
- case 19:
50
- s.addSection(t[e].substr(8)), this.$ = t[e].substr(8);
51
- break;
52
- case 21:
53
- s.checkout(t[e]);
54
- break;
55
- case 22:
56
- s.branch(t[e]);
57
- break;
58
- case 23:
59
- s.branch(t[e - 2], t[e]);
60
- break;
61
- case 24:
62
- s.cherryPick(t[e], "", void 0);
63
- break;
64
- case 25:
65
- s.cherryPick(t[e - 2], "", void 0, t[e]);
66
- break;
67
- case 26:
68
- s.cherryPick(t[e - 2], "", t[e]);
69
- break;
70
- case 27:
71
- s.cherryPick(t[e - 4], "", t[e], t[e - 2]);
72
- break;
73
- case 28:
74
- s.cherryPick(t[e - 4], "", t[e - 2], t[e]);
75
- break;
76
- case 29:
77
- s.cherryPick(t[e], "", t[e - 2]);
78
- break;
79
- case 30:
80
- s.cherryPick(t[e], "", "");
81
- break;
82
- case 31:
83
- s.cherryPick(t[e - 2], "", "");
84
- break;
85
- case 32:
86
- s.cherryPick(t[e - 4], "", "", t[e - 2]);
87
- break;
88
- case 33:
89
- s.cherryPick(t[e - 4], "", "", t[e]);
90
- break;
91
- case 34:
92
- s.cherryPick(t[e - 2], "", t[e - 4], t[e]);
93
- break;
94
- case 35:
95
- s.cherryPick(t[e - 2], "", "", t[e]);
96
- break;
97
- case 36:
98
- s.merge(t[e], "", "", "");
99
- break;
100
- case 37:
101
- s.merge(t[e - 2], t[e], "", "");
102
- break;
103
- case 38:
104
- s.merge(t[e - 2], "", t[e], "");
105
- break;
106
- case 39:
107
- s.merge(t[e - 2], "", "", t[e]);
108
- break;
109
- case 40:
110
- s.merge(t[e - 4], t[e], "", t[e - 2]);
111
- break;
112
- case 41:
113
- s.merge(t[e - 4], "", t[e], t[e - 2]);
114
- break;
115
- case 42:
116
- s.merge(t[e - 4], "", t[e - 2], t[e]);
117
- break;
118
- case 43:
119
- s.merge(t[e - 4], t[e - 2], t[e], "");
120
- break;
121
- case 44:
122
- s.merge(t[e - 4], t[e - 2], "", t[e]);
123
- break;
124
- case 45:
125
- s.merge(t[e - 4], t[e], t[e - 2], "");
126
- break;
127
- case 46:
128
- s.merge(t[e - 6], t[e - 4], t[e - 2], t[e]);
129
- break;
130
- case 47:
131
- s.merge(t[e - 6], t[e], t[e - 4], t[e - 2]);
132
- break;
133
- case 48:
134
- s.merge(t[e - 6], t[e - 4], t[e], t[e - 2]);
135
- break;
136
- case 49:
137
- s.merge(t[e - 6], t[e - 2], t[e - 4], t[e]);
138
- break;
139
- case 50:
140
- s.merge(t[e - 6], t[e], t[e - 2], t[e - 4]);
141
- break;
142
- case 51:
143
- s.merge(t[e - 6], t[e - 2], t[e], t[e - 4]);
144
- break;
145
- case 52:
146
- s.commit(t[e]);
147
- break;
148
- case 53:
149
- s.commit("", "", s.commitType.NORMAL, t[e]);
150
- break;
151
- case 54:
152
- s.commit("", "", t[e], "");
153
- break;
154
- case 55:
155
- s.commit("", "", t[e], t[e - 2]);
156
- break;
157
- case 56:
158
- s.commit("", "", t[e - 2], t[e]);
159
- break;
160
- case 57:
161
- s.commit("", t[e], s.commitType.NORMAL, "");
162
- break;
163
- case 58:
164
- s.commit("", t[e - 2], s.commitType.NORMAL, t[e]);
165
- break;
166
- case 59:
167
- s.commit("", t[e], s.commitType.NORMAL, t[e - 2]);
168
- break;
169
- case 60:
170
- s.commit("", t[e - 2], t[e], "");
171
- break;
172
- case 61:
173
- s.commit("", t[e], t[e - 2], "");
174
- break;
175
- case 62:
176
- s.commit("", t[e - 4], t[e - 2], t[e]);
177
- break;
178
- case 63:
179
- s.commit("", t[e - 4], t[e], t[e - 2]);
180
- break;
181
- case 64:
182
- s.commit("", t[e - 2], t[e - 4], t[e]);
183
- break;
184
- case 65:
185
- s.commit("", t[e], t[e - 4], t[e - 2]);
186
- break;
187
- case 66:
188
- s.commit("", t[e], t[e - 2], t[e - 4]);
189
- break;
190
- case 67:
191
- s.commit("", t[e - 2], t[e], t[e - 4]);
192
- break;
193
- case 68:
194
- s.commit(t[e], "", s.commitType.NORMAL, "");
195
- break;
196
- case 69:
197
- s.commit(t[e], "", s.commitType.NORMAL, t[e - 2]);
198
- break;
199
- case 70:
200
- s.commit(t[e - 2], "", s.commitType.NORMAL, t[e]);
201
- break;
202
- case 71:
203
- s.commit(t[e - 2], "", t[e], "");
204
- break;
205
- case 72:
206
- s.commit(t[e], "", t[e - 2], "");
207
- break;
208
- case 73:
209
- s.commit(t[e], t[e - 2], s.commitType.NORMAL, "");
210
- break;
211
- case 74:
212
- s.commit(t[e - 2], t[e], s.commitType.NORMAL, "");
213
- break;
214
- case 75:
215
- s.commit(t[e - 4], "", t[e - 2], t[e]);
216
- break;
217
- case 76:
218
- s.commit(t[e - 4], "", t[e], t[e - 2]);
219
- break;
220
- case 77:
221
- s.commit(t[e - 2], "", t[e - 4], t[e]);
222
- break;
223
- case 78:
224
- s.commit(t[e], "", t[e - 4], t[e - 2]);
225
- break;
226
- case 79:
227
- s.commit(t[e], "", t[e - 2], t[e - 4]);
228
- break;
229
- case 80:
230
- s.commit(t[e - 2], "", t[e], t[e - 4]);
231
- break;
232
- case 81:
233
- s.commit(t[e - 4], t[e], t[e - 2], "");
234
- break;
235
- case 82:
236
- s.commit(t[e - 4], t[e - 2], t[e], "");
237
- break;
238
- case 83:
239
- s.commit(t[e - 2], t[e], t[e - 4], "");
240
- break;
241
- case 84:
242
- s.commit(t[e], t[e - 2], t[e - 4], "");
243
- break;
244
- case 85:
245
- s.commit(t[e], t[e - 4], t[e - 2], "");
246
- break;
247
- case 86:
248
- s.commit(t[e - 2], t[e - 4], t[e], "");
249
- break;
250
- case 87:
251
- s.commit(t[e - 4], t[e], s.commitType.NORMAL, t[e - 2]);
252
- break;
253
- case 88:
254
- s.commit(t[e - 4], t[e - 2], s.commitType.NORMAL, t[e]);
255
- break;
256
- case 89:
257
- s.commit(t[e - 2], t[e], s.commitType.NORMAL, t[e - 4]);
258
- break;
259
- case 90:
260
- s.commit(t[e], t[e - 2], s.commitType.NORMAL, t[e - 4]);
261
- break;
262
- case 91:
263
- s.commit(t[e], t[e - 4], s.commitType.NORMAL, t[e - 2]);
264
- break;
265
- case 92:
266
- s.commit(t[e - 2], t[e - 4], s.commitType.NORMAL, t[e]);
267
- break;
268
- case 93:
269
- s.commit(t[e - 6], t[e - 4], t[e - 2], t[e]);
270
- break;
271
- case 94:
272
- s.commit(t[e - 6], t[e - 4], t[e], t[e - 2]);
273
- break;
274
- case 95:
275
- s.commit(t[e - 6], t[e - 2], t[e - 4], t[e]);
276
- break;
277
- case 96:
278
- s.commit(t[e - 6], t[e], t[e - 4], t[e - 2]);
279
- break;
280
- case 97:
281
- s.commit(t[e - 6], t[e - 2], t[e], t[e - 4]);
282
- break;
283
- case 98:
284
- s.commit(t[e - 6], t[e], t[e - 2], t[e - 4]);
285
- break;
286
- case 99:
287
- s.commit(t[e - 4], t[e - 6], t[e - 2], t[e]);
288
- break;
289
- case 100:
290
- s.commit(t[e - 4], t[e - 6], t[e], t[e - 2]);
291
- break;
292
- case 101:
293
- s.commit(t[e - 2], t[e - 6], t[e - 4], t[e]);
294
- break;
295
- case 102:
296
- s.commit(t[e], t[e - 6], t[e - 4], t[e - 2]);
297
- break;
298
- case 103:
299
- s.commit(t[e - 2], t[e - 6], t[e], t[e - 4]);
300
- break;
301
- case 104:
302
- s.commit(t[e], t[e - 6], t[e - 2], t[e - 4]);
303
- break;
304
- case 105:
305
- s.commit(t[e], t[e - 4], t[e - 2], t[e - 6]);
306
- break;
307
- case 106:
308
- s.commit(t[e - 2], t[e - 4], t[e], t[e - 6]);
309
- break;
310
- case 107:
311
- s.commit(t[e], t[e - 2], t[e - 4], t[e - 6]);
312
- break;
313
- case 108:
314
- s.commit(t[e - 2], t[e], t[e - 4], t[e - 6]);
315
- break;
316
- case 109:
317
- s.commit(t[e - 4], t[e - 2], t[e], t[e - 6]);
318
- break;
319
- case 110:
320
- s.commit(t[e - 4], t[e], t[e - 2], t[e - 6]);
321
- break;
322
- case 111:
323
- s.commit(t[e - 2], t[e - 4], t[e - 6], t[e]);
324
- break;
325
- case 112:
326
- s.commit(t[e], t[e - 4], t[e - 6], t[e - 2]);
327
- break;
328
- case 113:
329
- s.commit(t[e - 2], t[e], t[e - 6], t[e - 4]);
330
- break;
331
- case 114:
332
- s.commit(t[e], t[e - 2], t[e - 6], t[e - 4]);
333
- break;
334
- case 115:
335
- s.commit(t[e - 4], t[e - 2], t[e - 6], t[e]);
336
- break;
337
- case 116:
338
- s.commit(t[e - 4], t[e], t[e - 6], t[e - 2]);
339
- break;
340
- case 117:
341
- this.$ = "";
342
- break;
343
- case 118:
344
- this.$ = t[e];
345
- break;
346
- case 119:
347
- this.$ = s.commitType.NORMAL;
348
- break;
349
- case 120:
350
- this.$ = s.commitType.REVERSE;
351
- break;
352
- case 121:
353
- this.$ = s.commitType.HIGHLIGHT;
354
- break;
355
- }
356
- },
357
- table: [{ 3: 1, 4: 2, 5: n, 7: l, 13: h, 47: i }, { 1: [3] }, { 3: 7, 4: 2, 5: n, 7: l, 13: h, 47: i }, { 6: 8, 7: c, 8: [1, 9], 9: [1, 10], 10: 11, 13: p }, r(m, [2, 124]), r(m, [2, 125]), r(m, [2, 126]), { 1: [2, 1] }, { 7: [1, 13] }, { 6: 14, 7: c, 10: 11, 13: p }, { 8: [1, 15] }, r(x, [2, 9], { 11: 16, 12: [1, 17] }), r(y, [2, 8]), { 1: [2, 2] }, { 7: [1, 18] }, { 6: 19, 7: c, 10: 11, 13: p }, { 7: [2, 6], 13: [1, 22], 14: 20, 15: 21, 16: 23, 17: 24, 18: 25, 19: [1, 26], 21: [1, 27], 23: [1, 28], 24: [1, 29], 25: 30, 26: [1, 31], 28: [1, 35], 31: [1, 34], 37: [1, 33], 40: [1, 32] }, r(y, [2, 7]), { 1: [2, 3] }, { 7: [1, 36] }, r(x, [2, 10]), { 4: 37, 7: l, 13: h, 47: i }, r(x, [2, 12]), r(a, [2, 13]), r(a, [2, 14]), r(a, [2, 15]), { 20: [1, 38] }, { 22: [1, 39] }, r(a, [2, 18]), r(a, [2, 19]), r(a, [2, 20]), { 27: 40, 33: R, 46: _ }, r(a, [2, 117], { 41: 43, 32: [1, 46], 33: [1, 48], 35: [1, 44], 38: [1, 45], 42: [1, 47] }), { 27: 49, 33: R, 46: _ }, { 32: [1, 50], 35: [1, 51] }, { 27: 52, 33: R, 46: _ }, { 1: [2, 4] }, r(x, [2, 11]), r(a, [2, 16]), r(a, [2, 17]), r(a, [2, 21]), r(b, [2, 122]), r(b, [2, 123]), r(a, [2, 52]), { 33: [1, 53] }, { 39: 54, 43: f, 44: k, 45: g }, { 33: [1, 58] }, { 33: [1, 59] }, r(a, [2, 118]), r(a, [2, 36], { 32: [1, 60], 35: [1, 62], 38: [1, 61] }), { 33: [1, 63] }, { 33: [1, 64], 36: [1, 65] }, r(a, [2, 22], { 29: [1, 66] }), r(a, [2, 53], { 32: [1, 68], 38: [1, 67], 42: [1, 69] }), r(a, [2, 54], { 32: [1, 71], 35: [1, 70], 42: [1, 72] }), r(E, [2, 119]), r(E, [2, 120]), r(E, [2, 121]), r(a, [2, 57], { 35: [1, 73], 38: [1, 74], 42: [1, 75] }), r(a, [2, 68], { 32: [1, 78], 35: [1, 76], 38: [1, 77] }), { 33: [1, 79] }, { 39: 80, 43: f, 44: k, 45: g }, { 33: [1, 81] }, r(a, [2, 24], { 34: [1, 82], 35: [1, 83] }), { 32: [1, 84] }, { 32: [1, 85] }, { 30: [1, 86] }, { 39: 87, 43: f, 44: k, 45: g }, { 33: [1, 88] }, { 33: [1, 89] }, { 33: [1, 90] }, { 33: [1, 91] }, { 33: [1, 92] }, { 33: [1, 93] }, { 39: 94, 43: f, 44: k, 45: g }, { 33: [1, 95] }, { 33: [1, 96] }, { 39: 97, 43: f, 44: k, 45: g }, { 33: [1, 98] }, r(a, [2, 37], { 35: [1, 100], 38: [1, 99] }), r(a, [2, 38], { 32: [1, 102], 35: [1, 101] }), r(a, [2, 39], { 32: [1, 103], 38: [1, 104] }), { 33: [1, 105] }, { 33: [1, 106], 36: [1, 107] }, { 33: [1, 108] }, { 33: [1, 109] }, r(a, [2, 23]), r(a, [2, 55], { 32: [1, 110], 42: [1, 111] }), r(a, [2, 59], { 38: [1, 112], 42: [1, 113] }), r(a, [2, 69], { 32: [1, 115], 38: [1, 114] }), r(a, [2, 56], { 32: [1, 116], 42: [1, 117] }), r(a, [2, 61], { 35: [1, 118], 42: [1, 119] }), r(a, [2, 72], { 32: [1, 121], 35: [1, 120] }), r(a, [2, 58], { 38: [1, 122], 42: [1, 123] }), r(a, [2, 60], { 35: [1, 124], 42: [1, 125] }), r(a, [2, 73], { 35: [1, 127], 38: [1, 126] }), r(a, [2, 70], { 32: [1, 129], 38: [1, 128] }), r(a, [2, 71], { 32: [1, 131], 35: [1, 130] }), r(a, [2, 74], { 35: [1, 133], 38: [1, 132] }), { 39: 134, 43: f, 44: k, 45: g }, { 33: [1, 135] }, { 33: [1, 136] }, { 33: [1, 137] }, { 33: [1, 138] }, { 39: 139, 43: f, 44: k, 45: g }, r(a, [2, 25], { 35: [1, 140] }), r(a, [2, 26], { 34: [1, 141] }), r(a, [2, 31], { 34: [1, 142] }), r(a, [2, 29], { 34: [1, 143] }), r(a, [2, 30], { 34: [1, 144] }), { 33: [1, 145] }, { 33: [1, 146] }, { 39: 147, 43: f, 44: k, 45: g }, { 33: [1, 148] }, { 39: 149, 43: f, 44: k, 45: g }, { 33: [1, 150] }, { 33: [1, 151] }, { 33: [1, 152] }, { 33: [1, 153] }, { 33: [1, 154] }, { 33: [1, 155] }, { 33: [1, 156] }, { 39: 157, 43: f, 44: k, 45: g }, { 33: [1, 158] }, { 33: [1, 159] }, { 33: [1, 160] }, { 39: 161, 43: f, 44: k, 45: g }, { 33: [1, 162] }, { 39: 163, 43: f, 44: k, 45: g }, { 33: [1, 164] }, { 33: [1, 165] }, { 33: [1, 166] }, { 39: 167, 43: f, 44: k, 45: g }, { 33: [1, 168] }, r(a, [2, 43], { 35: [1, 169] }), r(a, [2, 44], { 38: [1, 170] }), r(a, [2, 42], { 32: [1, 171] }), r(a, [2, 45], { 35: [1, 172] }), r(a, [2, 40], { 38: [1, 173] }), r(a, [2, 41], { 32: [1, 174] }), { 33: [1, 175], 36: [1, 176] }, { 33: [1, 177] }, { 33: [1, 178] }, { 33: [1, 179] }, { 33: [1, 180] }, r(a, [2, 66], { 42: [1, 181] }), r(a, [2, 79], { 32: [1, 182] }), r(a, [2, 67], { 42: [1, 183] }), r(a, [2, 90], { 38: [1, 184] }), r(a, [2, 80], { 32: [1, 185] }), r(a, [2, 89], { 38: [1, 186] }), r(a, [2, 65], { 42: [1, 187] }), r(a, [2, 78], { 32: [1, 188] }), r(a, [2, 64], { 42: [1, 189] }), r(a, [2, 84], { 35: [1, 190] }), r(a, [2, 77], { 32: [1, 191] }), r(a, [2, 83], { 35: [1, 192] }), r(a, [2, 63], { 42: [1, 193] }), r(a, [2, 91], { 38: [1, 194] }), r(a, [2, 62], { 42: [1, 195] }), r(a, [2, 85], { 35: [1, 196] }), r(a, [2, 86], { 35: [1, 197] }), r(a, [2, 92], { 38: [1, 198] }), r(a, [2, 76], { 32: [1, 199] }), r(a, [2, 87], { 38: [1, 200] }), r(a, [2, 75], { 32: [1, 201] }), r(a, [2, 81], { 35: [1, 202] }), r(a, [2, 82], { 35: [1, 203] }), r(a, [2, 88], { 38: [1, 204] }), { 33: [1, 205] }, { 39: 206, 43: f, 44: k, 45: g }, { 33: [1, 207] }, { 33: [1, 208] }, { 39: 209, 43: f, 44: k, 45: g }, { 33: [1, 210] }, r(a, [2, 27]), r(a, [2, 32]), r(a, [2, 28]), r(a, [2, 33]), r(a, [2, 34]), r(a, [2, 35]), { 33: [1, 211] }, { 33: [1, 212] }, { 33: [1, 213] }, { 39: 214, 43: f, 44: k, 45: g }, { 33: [1, 215] }, { 39: 216, 43: f, 44: k, 45: g }, { 33: [1, 217] }, { 33: [1, 218] }, { 33: [1, 219] }, { 33: [1, 220] }, { 33: [1, 221] }, { 33: [1, 222] }, { 33: [1, 223] }, { 39: 224, 43: f, 44: k, 45: g }, { 33: [1, 225] }, { 33: [1, 226] }, { 33: [1, 227] }, { 39: 228, 43: f, 44: k, 45: g }, { 33: [1, 229] }, { 39: 230, 43: f, 44: k, 45: g }, { 33: [1, 231] }, { 33: [1, 232] }, { 33: [1, 233] }, { 39: 234, 43: f, 44: k, 45: g }, r(a, [2, 46]), r(a, [2, 48]), r(a, [2, 47]), r(a, [2, 49]), r(a, [2, 51]), r(a, [2, 50]), r(a, [2, 107]), r(a, [2, 108]), r(a, [2, 105]), r(a, [2, 106]), r(a, [2, 110]), r(a, [2, 109]), r(a, [2, 114]), r(a, [2, 113]), r(a, [2, 112]), r(a, [2, 111]), r(a, [2, 116]), r(a, [2, 115]), r(a, [2, 104]), r(a, [2, 103]), r(a, [2, 102]), r(a, [2, 101]), r(a, [2, 99]), r(a, [2, 100]), r(a, [2, 98]), r(a, [2, 97]), r(a, [2, 96]), r(a, [2, 95]), r(a, [2, 93]), r(a, [2, 94])],
358
- defaultActions: { 7: [2, 1], 13: [2, 2], 18: [2, 3], 36: [2, 4] },
359
- parseError: function(o, u) {
360
- if (u.recoverable)
361
- this.trace(o);
362
- else {
363
- var d = new Error(o);
364
- throw d.hash = u, d;
365
- }
366
- },
367
- parse: function(o) {
368
- var u = this, d = [0], s = [], T = [null], t = [], X = this.table, e = "", rt = 0, ft = 0, wt = 2, pt = 1, Lt = t.slice.call(arguments, 1), O = Object.create(this.lexer), F = { yy: {} };
369
- for (var ct in this.yy)
370
- Object.prototype.hasOwnProperty.call(this.yy, ct) && (F.yy[ct] = this.yy[ct]);
371
- O.setInput(o, F.yy), F.yy.lexer = O, F.yy.parser = this, typeof O.yylloc > "u" && (O.yylloc = {});
372
- var ot = O.yylloc;
373
- t.push(ot);
374
- var Rt = O.options && O.options.ranges;
375
- typeof F.yy.parseError == "function" ? this.parseError = F.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
376
- function Mt() {
377
- var j;
378
- return j = s.pop() || O.lex() || pt, typeof j != "number" && (j instanceof Array && (s = j, j = s.pop()), j = u.symbols_[j] || j), j;
379
- }
380
- for (var N, K, V, lt, J = {}, it, q, bt, st; ; ) {
381
- if (K = d[d.length - 1], this.defaultActions[K] ? V = this.defaultActions[K] : ((N === null || typeof N > "u") && (N = Mt()), V = X[K] && X[K][N]), typeof V > "u" || !V.length || !V[0]) {
382
- var ht = "";
383
- st = [];
384
- for (it in X[K])
385
- this.terminals_[it] && it > wt && st.push("'" + this.terminals_[it] + "'");
386
- O.showPosition ? ht = "Parse error on line " + (rt + 1) + `:
387
- ` + O.showPosition() + `
388
- Expecting ` + st.join(", ") + ", got '" + (this.terminals_[N] || N) + "'" : ht = "Parse error on line " + (rt + 1) + ": Unexpected " + (N == pt ? "end of input" : "'" + (this.terminals_[N] || N) + "'"), this.parseError(ht, {
389
- text: O.match,
390
- token: this.terminals_[N] || N,
391
- line: O.yylineno,
392
- loc: ot,
393
- expected: st
394
- });
395
- }
396
- if (V[0] instanceof Array && V.length > 1)
397
- throw new Error("Parse Error: multiple actions possible at state: " + K + ", token: " + N);
398
- switch (V[0]) {
399
- case 1:
400
- d.push(N), T.push(O.yytext), t.push(O.yylloc), d.push(V[1]), N = null, ft = O.yyleng, e = O.yytext, rt = O.yylineno, ot = O.yylloc;
401
- break;
402
- case 2:
403
- if (q = this.productions_[V[1]][1], J.$ = T[T.length - q], J._$ = {
404
- first_line: t[t.length - (q || 1)].first_line,
405
- last_line: t[t.length - 1].last_line,
406
- first_column: t[t.length - (q || 1)].first_column,
407
- last_column: t[t.length - 1].last_column
408
- }, Rt && (J._$.range = [
409
- t[t.length - (q || 1)].range[0],
410
- t[t.length - 1].range[1]
411
- ]), lt = this.performAction.apply(J, [
412
- e,
413
- ft,
414
- rt,
415
- F.yy,
416
- V[1],
417
- T,
418
- t
419
- ].concat(Lt)), typeof lt < "u")
420
- return lt;
421
- q && (d = d.slice(0, -1 * q * 2), T = T.slice(0, -1 * q), t = t.slice(0, -1 * q)), d.push(this.productions_[V[1]][0]), T.push(J.$), t.push(J._$), bt = X[d[d.length - 2]][d[d.length - 1]], d.push(bt);
422
- break;
423
- case 3:
424
- return !0;
425
- }
426
- }
427
- return !0;
428
- }
429
- }, M = /* @__PURE__ */ (function() {
430
- var S = {
431
- EOF: 1,
432
- parseError: function(u, d) {
433
- if (this.yy.parser)
434
- this.yy.parser.parseError(u, d);
435
- else
436
- throw new Error(u);
437
- },
438
- // resets the lexer, sets new input
439
- setInput: function(o, u) {
440
- return this.yy = u || this.yy || {}, this._input = o, this._more = this._backtrack = this.done = !1, this.yylineno = this.yyleng = 0, this.yytext = this.matched = this.match = "", this.conditionStack = ["INITIAL"], this.yylloc = {
441
- first_line: 1,
442
- first_column: 0,
443
- last_line: 1,
444
- last_column: 0
445
- }, this.options.ranges && (this.yylloc.range = [0, 0]), this.offset = 0, this;
446
- },
447
- // consumes and returns one char from the input
448
- input: function() {
449
- var o = this._input[0];
450
- this.yytext += o, this.yyleng++, this.offset++, this.match += o, this.matched += o;
451
- var u = o.match(/(?:\r\n?|\n).*/g);
452
- return u ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++, this.options.ranges && this.yylloc.range[1]++, this._input = this._input.slice(1), o;
453
- },
454
- // unshifts one char (or a string) into the input
455
- unput: function(o) {
456
- var u = o.length, d = o.split(/(?:\r\n?|\n)/g);
457
- this._input = o + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - u), this.offset -= u;
458
- var s = this.match.split(/(?:\r\n?|\n)/g);
459
- this.match = this.match.substr(0, this.match.length - 1), this.matched = this.matched.substr(0, this.matched.length - 1), d.length - 1 && (this.yylineno -= d.length - 1);
460
- var T = this.yylloc.range;
461
- return this.yylloc = {
462
- first_line: this.yylloc.first_line,
463
- last_line: this.yylineno + 1,
464
- first_column: this.yylloc.first_column,
465
- last_column: d ? (d.length === s.length ? this.yylloc.first_column : 0) + s[s.length - d.length].length - d[0].length : this.yylloc.first_column - u
466
- }, this.options.ranges && (this.yylloc.range = [T[0], T[0] + this.yyleng - u]), this.yyleng = this.yytext.length, this;
467
- },
468
- // When called from action, caches matched text and appends it on next action
469
- more: function() {
470
- return this._more = !0, this;
471
- },
472
- // 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.
473
- reject: function() {
474
- if (this.options.backtrack_lexer)
475
- this._backtrack = !0;
476
- else
477
- 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).
478
- ` + this.showPosition(), {
479
- text: "",
480
- token: null,
481
- line: this.yylineno
482
- });
483
- return this;
484
- },
485
- // retain first n characters of the match
486
- less: function(o) {
487
- this.unput(this.match.slice(o));
488
- },
489
- // displays already matched input, i.e. for error messages
490
- pastInput: function() {
491
- var o = this.matched.substr(0, this.matched.length - this.match.length);
492
- return (o.length > 20 ? "..." : "") + o.substr(-20).replace(/\n/g, "");
493
- },
494
- // displays upcoming input, i.e. for error messages
495
- upcomingInput: function() {
496
- var o = this.match;
497
- return o.length < 20 && (o += this._input.substr(0, 20 - o.length)), (o.substr(0, 20) + (o.length > 20 ? "..." : "")).replace(/\n/g, "");
498
- },
499
- // displays the character position where the lexing error occurred, i.e. for error messages
500
- showPosition: function() {
501
- var o = this.pastInput(), u = new Array(o.length + 1).join("-");
502
- return o + this.upcomingInput() + `
503
- ` + u + "^";
504
- },
505
- // test the lexed token: return FALSE when not a match, otherwise return token
506
- test_match: function(o, u) {
507
- var d, s, T;
508
- if (this.options.backtrack_lexer && (T = {
509
- yylineno: this.yylineno,
510
- yylloc: {
511
- first_line: this.yylloc.first_line,
512
- last_line: this.last_line,
513
- first_column: this.yylloc.first_column,
514
- last_column: this.yylloc.last_column
515
- },
516
- yytext: this.yytext,
517
- match: this.match,
518
- matches: this.matches,
519
- matched: this.matched,
520
- yyleng: this.yyleng,
521
- offset: this.offset,
522
- _more: this._more,
523
- _input: this._input,
524
- yy: this.yy,
525
- conditionStack: this.conditionStack.slice(0),
526
- done: this.done
527
- }, this.options.ranges && (T.yylloc.range = this.yylloc.range.slice(0))), s = o[0].match(/(?:\r\n?|\n).*/g), s && (this.yylineno += s.length), this.yylloc = {
528
- first_line: this.yylloc.last_line,
529
- last_line: this.yylineno + 1,
530
- first_column: this.yylloc.last_column,
531
- last_column: s ? s[s.length - 1].length - s[s.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + o[0].length
532
- }, this.yytext += o[0], this.match += o[0], this.matches = o, 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(o[0].length), this.matched += o[0], d = this.performAction.call(this, this.yy, this, u, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), d)
533
- return d;
534
- if (this._backtrack) {
535
- for (var t in T)
536
- this[t] = T[t];
537
- return !1;
538
- }
539
- return !1;
540
- },
541
- // return next match in input
542
- next: function() {
543
- if (this.done)
544
- return this.EOF;
545
- this._input || (this.done = !0);
546
- var o, u, d, s;
547
- this._more || (this.yytext = "", this.match = "");
548
- for (var T = this._currentRules(), t = 0; t < T.length; t++)
549
- if (d = this._input.match(this.rules[T[t]]), d && (!u || d[0].length > u[0].length)) {
550
- if (u = d, s = t, this.options.backtrack_lexer) {
551
- if (o = this.test_match(d, T[t]), o !== !1)
552
- return o;
553
- if (this._backtrack) {
554
- u = !1;
555
- continue;
556
- } else
557
- return !1;
558
- } else if (!this.options.flex)
559
- break;
560
- }
561
- return u ? (o = this.test_match(u, T[s]), o !== !1 ? o : !1) : this._input === "" ? this.EOF : this.parseError("Lexical error on line " + (this.yylineno + 1) + `. Unrecognized text.
562
- ` + this.showPosition(), {
563
- text: "",
564
- token: null,
565
- line: this.yylineno
566
- });
567
- },
568
- // return next match that has a token
569
- lex: function() {
570
- var u = this.next();
571
- return u || this.lex();
572
- },
573
- // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)
574
- begin: function(u) {
575
- this.conditionStack.push(u);
576
- },
577
- // pop the previously active lexer condition state off the condition stack
578
- popState: function() {
579
- var u = this.conditionStack.length - 1;
580
- return u > 0 ? this.conditionStack.pop() : this.conditionStack[0];
581
- },
582
- // produce the lexer rule set which is active for the currently active lexer condition state
583
- _currentRules: function() {
584
- return this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1] ? this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules : this.conditions.INITIAL.rules;
585
- },
586
- // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available
587
- topState: function(u) {
588
- return u = this.conditionStack.length - 1 - Math.abs(u || 0), u >= 0 ? this.conditionStack[u] : "INITIAL";
589
- },
590
- // alias for begin(condition)
591
- pushState: function(u) {
592
- this.begin(u);
593
- },
594
- // return the number of states currently on the stack
595
- stateStackSize: function() {
596
- return this.conditionStack.length;
597
- },
598
- options: { "case-insensitive": !0 },
599
- performAction: function(u, d, s, T) {
600
- switch (s) {
601
- case 0:
602
- return this.begin("acc_title"), 19;
603
- case 1:
604
- return this.popState(), "acc_title_value";
605
- case 2:
606
- return this.begin("acc_descr"), 21;
607
- case 3:
608
- return this.popState(), "acc_descr_value";
609
- case 4:
610
- this.begin("acc_descr_multiline");
611
- break;
612
- case 5:
613
- this.popState();
614
- break;
615
- case 6:
616
- return "acc_descr_multiline_value";
617
- case 7:
618
- return 13;
619
- case 8:
620
- break;
621
- case 9:
622
- break;
623
- case 10:
624
- return 5;
625
- case 11:
626
- return 40;
627
- case 12:
628
- return 32;
629
- case 13:
630
- return 38;
631
- case 14:
632
- return 42;
633
- case 15:
634
- return 43;
635
- case 16:
636
- return 44;
637
- case 17:
638
- return 45;
639
- case 18:
640
- return 35;
641
- case 19:
642
- return 28;
643
- case 20:
644
- return 29;
645
- case 21:
646
- return 37;
647
- case 22:
648
- return 31;
649
- case 23:
650
- return 34;
651
- case 24:
652
- return 26;
653
- case 25:
654
- return 9;
655
- case 26:
656
- return 9;
657
- case 27:
658
- return 8;
659
- case 28:
660
- return "CARET";
661
- case 29:
662
- this.begin("options");
663
- break;
664
- case 30:
665
- this.popState();
666
- break;
667
- case 31:
668
- return 12;
669
- case 32:
670
- return 36;
671
- case 33:
672
- this.begin("string");
673
- break;
674
- case 34:
675
- this.popState();
676
- break;
677
- case 35:
678
- return 33;
679
- case 36:
680
- return 30;
681
- case 37:
682
- return 46;
683
- case 38:
684
- return 7;
685
- }
686
- },
687
- rules: [/^(?:accTitle\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*\{\s*)/i, /^(?:[\}])/i, /^(?:[^\}]*)/i, /^(?:(\r?\n)+)/i, /^(?:#[^\n]*)/i, /^(?:%[^\n]*)/i, /^(?:gitGraph\b)/i, /^(?:commit(?=\s|$))/i, /^(?:id:)/i, /^(?:type:)/i, /^(?:msg:)/i, /^(?:NORMAL\b)/i, /^(?:REVERSE\b)/i, /^(?:HIGHLIGHT\b)/i, /^(?:tag:)/i, /^(?:branch(?=\s|$))/i, /^(?:order:)/i, /^(?:merge(?=\s|$))/i, /^(?:cherry-pick(?=\s|$))/i, /^(?:parent:)/i, /^(?:checkout(?=\s|$))/i, /^(?:LR\b)/i, /^(?:TB\b)/i, /^(?::)/i, /^(?:\^)/i, /^(?:options\r?\n)/i, /^(?:[ \r\n\t]+end\b)/i, /^(?:[\s\S]+(?=[ \r\n\t]+end))/i, /^(?:["]["])/i, /^(?:["])/i, /^(?:["])/i, /^(?:[^"]*)/i, /^(?:[0-9]+(?=\s|$))/i, /^(?:\w([-\./\w]*[-\w])?)/i, /^(?:$)/i, /^(?:\s+)/i],
688
- conditions: { acc_descr_multiline: { rules: [5, 6], inclusive: !1 }, acc_descr: { rules: [3], inclusive: !1 }, acc_title: { rules: [1], inclusive: !1 }, options: { rules: [30, 31], inclusive: !1 }, string: { rules: [34, 35], inclusive: !1 }, INITIAL: { rules: [0, 2, 4, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 32, 33, 36, 37, 38, 39], inclusive: !0 } }
689
- };
690
- return S;
691
- })();
692
- z.lexer = M;
693
- function A() {
694
- this.yy = {};
695
- }
696
- return A.prototype = z, z.Parser = A, new A();
697
- })();
698
- mt.parser = mt;
699
- const Vt = mt;
700
- let at = C().gitGraph.mainBranchName, Dt = C().gitGraph.mainBranchOrder, v = {}, I = null, tt = {};
701
- tt[at] = { name: at, order: Dt };
702
- let L = {};
703
- L[at] = I;
704
- let G = at, kt = "LR", W = 0;
705
- function ut() {
706
- return Bt({ length: 7 });
707
- }
708
- function zt(r, n) {
709
- const l = /* @__PURE__ */ Object.create(null);
710
- return r.reduce((h, i) => {
711
- const c = n(i);
712
- return l[c] || (l[c] = !0, h.push(i)), h;
713
- }, []);
714
- }
715
- const qt = function(r) {
716
- kt = r;
717
- };
718
- let xt = {};
719
- const jt = function(r) {
720
- B.debug("options str", r), r = r && r.trim(), r = r || "{}";
721
- try {
722
- xt = JSON.parse(r);
723
- } catch (n) {
724
- B.error("error while parsing gitGraph options", n.message);
725
- }
726
- }, Yt = function() {
727
- return xt;
728
- }, Ft = function(r, n, l, h) {
729
- B.debug("Entering commit:", r, n, l, h), n = D.sanitizeText(n, C()), r = D.sanitizeText(r, C()), h = D.sanitizeText(h, C());
730
- const i = {
731
- id: n || W + "-" + ut(),
732
- message: r,
733
- seq: W++,
734
- type: l || Q.NORMAL,
735
- tag: h || "",
736
- parents: I == null ? [] : [I.id],
737
- branch: G
738
- };
739
- I = i, v[i.id] = i, L[G] = i.id, B.debug("in pushCommit " + i.id);
740
- }, Kt = function(r, n) {
741
- if (r = D.sanitizeText(r, C()), L[r] === void 0)
742
- L[r] = I != null ? I.id : null, tt[r] = { name: r, order: n ? parseInt(n, 10) : null }, yt(r), B.debug("in createBranch");
743
- else {
744
- let l = new Error(
745
- 'Trying to create an existing branch. (Help: Either use a new name if you want create a new branch or try using "checkout ' + r + '")'
746
- );
747
- throw l.hash = {
748
- text: "branch " + r,
749
- token: "branch " + r,
750
- line: "1",
751
- loc: { first_line: 1, last_line: 1, first_column: 1, last_column: 1 },
752
- expected: ['"checkout ' + r + '"']
753
- }, l;
754
- }
755
- }, Ut = function(r, n, l, h) {
756
- r = D.sanitizeText(r, C()), n = D.sanitizeText(n, C());
757
- const i = v[L[G]], c = v[L[r]];
758
- if (G === r) {
759
- let m = new Error('Incorrect usage of "merge". Cannot merge a branch to itself');
760
- throw m.hash = {
761
- text: "merge " + r,
762
- token: "merge " + r,
763
- line: "1",
764
- loc: { first_line: 1, last_line: 1, first_column: 1, last_column: 1 },
765
- expected: ["branch abc"]
766
- }, m;
767
- } else if (i === void 0 || !i) {
768
- let m = new Error(
769
- 'Incorrect usage of "merge". Current branch (' + G + ")has no commits"
770
- );
771
- throw m.hash = {
772
- text: "merge " + r,
773
- token: "merge " + r,
774
- line: "1",
775
- loc: { first_line: 1, last_line: 1, first_column: 1, last_column: 1 },
776
- expected: ["commit"]
777
- }, m;
778
- } else if (L[r] === void 0) {
779
- let m = new Error(
780
- 'Incorrect usage of "merge". Branch to be merged (' + r + ") does not exist"
781
- );
782
- throw m.hash = {
783
- text: "merge " + r,
784
- token: "merge " + r,
785
- line: "1",
786
- loc: { first_line: 1, last_line: 1, first_column: 1, last_column: 1 },
787
- expected: ["branch " + r]
788
- }, m;
789
- } else if (c === void 0 || !c) {
790
- let m = new Error(
791
- 'Incorrect usage of "merge". Branch to be merged (' + r + ") has no commits"
792
- );
793
- throw m.hash = {
794
- text: "merge " + r,
795
- token: "merge " + r,
796
- line: "1",
797
- loc: { first_line: 1, last_line: 1, first_column: 1, last_column: 1 },
798
- expected: ['"commit"']
799
- }, m;
800
- } else if (i === c) {
801
- let m = new Error('Incorrect usage of "merge". Both branches have same head');
802
- throw m.hash = {
803
- text: "merge " + r,
804
- token: "merge " + r,
805
- line: "1",
806
- loc: { first_line: 1, last_line: 1, first_column: 1, last_column: 1 },
807
- expected: ["branch abc"]
808
- }, m;
809
- } else if (n && v[n] !== void 0) {
810
- let m = new Error(
811
- 'Incorrect usage of "merge". Commit with id:' + n + " already exists, use different custom Id"
812
- );
813
- throw m.hash = {
814
- text: "merge " + r + n + l + h,
815
- token: "merge " + r + n + l + h,
816
- line: "1",
817
- loc: { first_line: 1, last_line: 1, first_column: 1, last_column: 1 },
818
- expected: [
819
- "merge " + r + " " + n + "_UNIQUE " + l + " " + h
820
- ]
821
- }, m;
822
- }
823
- const p = {
824
- id: n || W + "-" + ut(),
825
- message: "merged branch " + r + " into " + G,
826
- seq: W++,
827
- parents: [I == null ? null : I.id, L[r]],
828
- branch: G,
829
- type: Q.MERGE,
830
- customType: l,
831
- customId: !!n,
832
- tag: h || ""
833
- };
834
- I = p, v[p.id] = p, L[G] = p.id, B.debug(L), B.debug("in mergeBranch");
835
- }, Wt = function(r, n, l, h) {
836
- if (B.debug("Entering cherryPick:", r, n, l), r = D.sanitizeText(r, C()), n = D.sanitizeText(n, C()), l = D.sanitizeText(l, C()), h = D.sanitizeText(h, C()), !r || v[r] === void 0) {
837
- let p = new Error(
838
- 'Incorrect usage of "cherryPick". Source commit id should exist and provided'
839
- );
840
- throw p.hash = {
841
- text: "cherryPick " + r + " " + n,
842
- token: "cherryPick " + r + " " + n,
843
- line: "1",
844
- loc: { first_line: 1, last_line: 1, first_column: 1, last_column: 1 },
845
- expected: ["cherry-pick abc"]
846
- }, p;
847
- }
848
- let i = v[r], c = i.branch;
849
- if (h && !(Array.isArray(i.parents) && i.parents.includes(h)))
850
- throw new Error(
851
- "Invalid operation: The specified parent commit is not an immediate parent of the cherry-picked commit."
852
- );
853
- if (i.type === Q.MERGE && !h)
854
- throw new Error(
855
- "Incorrect usage of cherry-pick: If the source commit is a merge commit, an immediate parent commit must be specified."
856
- );
857
- if (!n || v[n] === void 0) {
858
- if (c === G) {
859
- let x = new Error(
860
- 'Incorrect usage of "cherryPick". Source commit is already on current branch'
861
- );
862
- throw x.hash = {
863
- text: "cherryPick " + r + " " + n,
864
- token: "cherryPick " + r + " " + n,
865
- line: "1",
866
- loc: { first_line: 1, last_line: 1, first_column: 1, last_column: 1 },
867
- expected: ["cherry-pick abc"]
868
- }, x;
869
- }
870
- const p = v[L[G]];
871
- if (p === void 0 || !p) {
872
- let x = new Error(
873
- 'Incorrect usage of "cherry-pick". Current branch (' + G + ")has no commits"
874
- );
875
- throw x.hash = {
876
- text: "cherryPick " + r + " " + n,
877
- token: "cherryPick " + r + " " + n,
878
- line: "1",
879
- loc: { first_line: 1, last_line: 1, first_column: 1, last_column: 1 },
880
- expected: ["cherry-pick abc"]
881
- }, x;
882
- }
883
- const m = {
884
- id: W + "-" + ut(),
885
- message: "cherry-picked " + i + " into " + G,
886
- seq: W++,
887
- parents: [I == null ? null : I.id, i.id],
888
- branch: G,
889
- type: Q.CHERRY_PICK,
890
- tag: l ?? `cherry-pick:${i.id}${i.type === Q.MERGE ? `|parent:${h}` : ""}`
891
- };
892
- I = m, v[m.id] = m, L[G] = m.id, B.debug(L), B.debug("in cherryPick");
893
- }
894
- }, yt = function(r) {
895
- if (r = D.sanitizeText(r, C()), L[r] === void 0) {
896
- let n = new Error(
897
- 'Trying to checkout branch which is not yet created. (Help try using "branch ' + r + '")'
898
- );
899
- throw n.hash = {
900
- text: "checkout " + r,
901
- token: "checkout " + r,
902
- line: "1",
903
- loc: { first_line: 1, last_line: 1, first_column: 1, last_column: 1 },
904
- expected: ['"branch ' + r + '"']
905
- }, n;
906
- } else {
907
- G = r;
908
- const n = L[G];
909
- I = v[n];
910
- }
911
- };
912
- function gt(r, n, l) {
913
- const h = r.indexOf(n);
914
- h === -1 ? r.push(l) : r.splice(h, 1, l);
915
- }
916
- function _t(r) {
917
- const n = r.reduce((i, c) => i.seq > c.seq ? i : c, r[0]);
918
- let l = "";
919
- r.forEach(function(i) {
920
- i === n ? l += " *" : l += " |";
921
- });
922
- const h = [l, n.id, n.seq];
923
- for (let i in L)
924
- L[i] === n.id && h.push(i);
925
- if (B.debug(h.join(" ")), n.parents && n.parents.length == 2) {
926
- const i = v[n.parents[0]];
927
- gt(r, n, i), r.push(v[n.parents[1]]);
928
- } else {
929
- if (n.parents.length == 0)
930
- return;
931
- {
932
- const i = v[n.parents];
933
- gt(r, n, i);
934
- }
935
- }
936
- r = zt(r, (i) => i.id), _t(r);
937
- }
938
- const Jt = function() {
939
- B.debug(v);
940
- const r = Et()[0];
941
- _t([r]);
942
- }, Qt = function() {
943
- v = {}, I = null;
944
- let r = C().gitGraph.mainBranchName, n = C().gitGraph.mainBranchOrder;
945
- L = {}, L[r] = null, tt = {}, tt[r] = { name: r, order: n }, G = r, W = 0, Ht();
946
- }, Xt = function() {
947
- return Object.values(tt).map((n, l) => n.order !== null ? n : {
948
- ...n,
949
- order: parseFloat(`0.${l}`, 10)
950
- }).sort((n, l) => n.order - l.order).map(({ name: n }) => ({ name: n }));
951
- }, Zt = function() {
952
- return L;
953
- }, $t = function() {
954
- return v;
955
- }, Et = function() {
956
- const r = Object.keys(v).map(function(n) {
957
- return v[n];
958
- });
959
- return r.forEach(function(n) {
960
- B.debug(n.id);
961
- }), r.sort((n, l) => n.seq - l.seq), r;
962
- }, te = function() {
963
- return G;
964
- }, ee = function() {
965
- return kt;
966
- }, re = function() {
967
- return I;
968
- }, Q = {
969
- NORMAL: 0,
970
- REVERSE: 1,
971
- HIGHLIGHT: 2,
972
- MERGE: 3,
973
- CHERRY_PICK: 4
974
- }, ie = {
975
- getConfig: () => C().gitGraph,
976
- setDirection: qt,
977
- setOptions: jt,
978
- getOptions: Yt,
979
- commit: Ft,
980
- branch: Kt,
981
- merge: Ut,
982
- cherryPick: Wt,
983
- checkout: yt,
984
- //reset,
985
- prettyPrint: Jt,
986
- clear: Qt,
987
- getBranchesAsObjArray: Xt,
988
- getBranches: Zt,
989
- getCommits: $t,
990
- getCommitsArray: Et,
991
- getCurrentBranch: te,
992
- getDirection: ee,
993
- getHead: re,
994
- setAccTitle: St,
995
- getAccTitle: Gt,
996
- getAccDescription: Pt,
997
- setAccDescription: Ot,
998
- setDiagramTitle: Ct,
999
- getDiagramTitle: vt,
1000
- commitType: Q
1001
- };
1002
- let Z = {};
1003
- const P = {
1004
- NORMAL: 0,
1005
- REVERSE: 1,
1006
- HIGHLIGHT: 2,
1007
- MERGE: 3,
1008
- CHERRY_PICK: 4
1009
- }, U = 8;
1010
- let H = {}, Y = {}, nt = [], et = 0, w = "LR";
1011
- const se = () => {
1012
- H = {}, Y = {}, Z = {}, et = 0, nt = [], w = "LR";
1013
- }, Tt = (r) => {
1014
- const n = document.createElementNS("http://www.w3.org/2000/svg", "text");
1015
- let l = [];
1016
- typeof r == "string" ? l = r.split(/\\n|\n|<br\s*\/?>/gi) : Array.isArray(r) ? l = r : l = [];
1017
- for (const h of l) {
1018
- const i = document.createElementNS("http://www.w3.org/2000/svg", "tspan");
1019
- i.setAttributeNS("http://www.w3.org/XML/1998/namespace", "xml:space", "preserve"), i.setAttribute("dy", "1em"), i.setAttribute("x", "0"), i.setAttribute("class", "row"), i.textContent = h.trim(), n.appendChild(i);
1020
- }
1021
- return n;
1022
- }, ae = (r) => {
1023
- let n = "", l = 0;
1024
- return r.forEach((h) => {
1025
- const i = w === "TB" ? Y[h].y : Y[h].x;
1026
- i >= l && (n = h, l = i);
1027
- }), n || void 0;
1028
- }, dt = (r, n, l) => {
1029
- const h = C().gitGraph, i = r.append("g").attr("class", "commit-bullets"), c = r.append("g").attr("class", "commit-labels");
1030
- let p = 0;
1031
- w === "TB" && (p = 30);
1032
- const x = Object.keys(n).sort((_, b) => n[_].seq - n[b].seq), y = h.parallelCommits, a = 10, R = 40;
1033
- x.forEach((_) => {
1034
- const b = n[_];
1035
- if (y)
1036
- if (b.parents.length) {
1037
- const E = ae(b.parents);
1038
- p = w === "TB" ? Y[E].y + R : Y[E].x + R;
1039
- } else
1040
- p = 0, w === "TB" && (p = 30);
1041
- const f = p + a, k = w === "TB" ? f : H[b.branch].pos, g = w === "TB" ? H[b.branch].pos : f;
1042
- if (l) {
1043
- let E, z = b.customType !== void 0 && b.customType !== "" ? b.customType : b.type;
1044
- switch (z) {
1045
- case P.NORMAL:
1046
- E = "commit-normal";
1047
- break;
1048
- case P.REVERSE:
1049
- E = "commit-reverse";
1050
- break;
1051
- case P.HIGHLIGHT:
1052
- E = "commit-highlight";
1053
- break;
1054
- case P.MERGE:
1055
- E = "commit-merge";
1056
- break;
1057
- case P.CHERRY_PICK:
1058
- E = "commit-cherry-pick";
1059
- break;
1060
- default:
1061
- E = "commit-normal";
1062
- }
1063
- if (z === P.HIGHLIGHT) {
1064
- const M = i.append("rect");
1065
- M.attr("x", g - 10), M.attr("y", k - 10), M.attr("height", 20), M.attr("width", 20), M.attr(
1066
- "class",
1067
- `commit ${b.id} commit-highlight${H[b.branch].index % U} ${E}-outer`
1068
- ), i.append("rect").attr("x", g - 6).attr("y", k - 6).attr("height", 12).attr("width", 12).attr(
1069
- "class",
1070
- `commit ${b.id} commit${H[b.branch].index % U} ${E}-inner`
1071
- );
1072
- } else if (z === P.CHERRY_PICK)
1073
- i.append("circle").attr("cx", g).attr("cy", k).attr("r", 10).attr("class", `commit ${b.id} ${E}`), i.append("circle").attr("cx", g - 3).attr("cy", k + 2).attr("r", 2.75).attr("fill", "#fff").attr("class", `commit ${b.id} ${E}`), i.append("circle").attr("cx", g + 3).attr("cy", k + 2).attr("r", 2.75).attr("fill", "#fff").attr("class", `commit ${b.id} ${E}`), i.append("line").attr("x1", g + 3).attr("y1", k + 1).attr("x2", g).attr("y2", k - 5).attr("stroke", "#fff").attr("class", `commit ${b.id} ${E}`), i.append("line").attr("x1", g - 3).attr("y1", k + 1).attr("x2", g).attr("y2", k - 5).attr("stroke", "#fff").attr("class", `commit ${b.id} ${E}`);
1074
- else {
1075
- const M = i.append("circle");
1076
- if (M.attr("cx", g), M.attr("cy", k), M.attr("r", b.type === P.MERGE ? 9 : 10), M.attr(
1077
- "class",
1078
- `commit ${b.id} commit${H[b.branch].index % U}`
1079
- ), z === P.MERGE) {
1080
- const A = i.append("circle");
1081
- A.attr("cx", g), A.attr("cy", k), A.attr("r", 6), A.attr(
1082
- "class",
1083
- `commit ${E} ${b.id} commit${H[b.branch].index % U}`
1084
- );
1085
- }
1086
- z === P.REVERSE && i.append("path").attr("d", `M ${g - 5},${k - 5}L${g + 5},${k + 5}M${g - 5},${k + 5}L${g + 5},${k - 5}`).attr(
1087
- "class",
1088
- `commit ${E} ${b.id} commit${H[b.branch].index % U}`
1089
- );
1090
- }
1091
- }
1092
- if (w === "TB" ? Y[b.id] = { x: g, y: f } : Y[b.id] = { x: f, y: k }, l) {
1093
- if (b.type !== P.CHERRY_PICK && (b.customId && b.type === P.MERGE || b.type !== P.MERGE) && h.showCommitLabel) {
1094
- const M = c.append("g"), A = M.insert("rect").attr("class", "commit-label-bkg"), S = M.append("text").attr("x", p).attr("y", k + 25).attr("class", "commit-label").text(b.id);
1095
- let o = S.node().getBBox();
1096
- if (A.attr("x", f - o.width / 2 - 2).attr("y", k + 13.5).attr("width", o.width + 4).attr("height", o.height + 4), w === "TB" && (A.attr("x", g - (o.width + 16 + 5)).attr("y", k - 12), S.attr("x", g - (o.width + 16)).attr("y", k + o.height - 12)), w !== "TB" && S.attr("x", f - o.width / 2), h.rotateCommitLabel)
1097
- if (w === "TB")
1098
- S.attr("transform", "rotate(-45, " + g + ", " + k + ")"), A.attr("transform", "rotate(-45, " + g + ", " + k + ")");
1099
- else {
1100
- let u = -7.5 - (o.width + 10) / 25 * 9.5, d = 10 + o.width / 25 * 8.5;
1101
- M.attr(
1102
- "transform",
1103
- "translate(" + u + ", " + d + ") rotate(-45, " + p + ", " + k + ")"
1104
- );
1105
- }
1106
- }
1107
- if (b.tag) {
1108
- const M = c.insert("polygon"), A = c.append("circle"), S = c.append("text").attr("y", k - 16).attr("class", "tag-label").text(b.tag);
1109
- let o = S.node().getBBox();
1110
- S.attr("x", f - o.width / 2);
1111
- const u = o.height / 2, d = k - 19.2;
1112
- M.attr("class", "tag-label-bkg").attr(
1113
- "points",
1114
- `
1115
- ${p - o.width / 2 - 4 / 2},${d + 2}
1116
- ${p - o.width / 2 - 4 / 2},${d - 2}
1117
- ${f - o.width / 2 - 4},${d - u - 2}
1118
- ${f + o.width / 2 + 4},${d - u - 2}
1119
- ${f + o.width / 2 + 4},${d + u + 2}
1120
- ${f - o.width / 2 - 4},${d + u + 2}`
1121
- ), A.attr("cx", p - o.width / 2 + 4 / 2).attr("cy", d).attr("r", 1.5).attr("class", "tag-hole"), w === "TB" && (M.attr("class", "tag-label-bkg").attr(
1122
- "points",
1123
- `
1124
- ${g},${p + 2}
1125
- ${g},${p - 2}
1126
- ${g + a},${p - u - 2}
1127
- ${g + a + o.width + 4},${p - u - 2}
1128
- ${g + a + o.width + 4},${p + u + 2}
1129
- ${g + a},${p + u + 2}`
1130
- ).attr("transform", "translate(12,12) rotate(45, " + g + "," + p + ")"), A.attr("cx", g + 4 / 2).attr("cy", p).attr("transform", "translate(12,12) rotate(45, " + g + "," + p + ")"), S.attr("x", g + 5).attr("y", p + 3).attr("transform", "translate(14,14) rotate(45, " + g + "," + p + ")"));
1131
- }
1132
- }
1133
- p += R + a, p > et && (et = p);
1134
- });
1135
- }, ne = (r, n, l, h, i) => {
1136
- const p = (w === "TB" ? l.x < h.x : l.y < h.y) ? n.branch : r.branch, m = (y) => y.branch === p, x = (y) => y.seq > r.seq && y.seq < n.seq;
1137
- return Object.values(i).some((y) => x(y) && m(y));
1138
- }, $ = (r, n, l = 0) => {
1139
- const h = r + Math.abs(r - n) / 2;
1140
- if (l > 5)
1141
- return h;
1142
- if (nt.every((p) => Math.abs(p - h) >= 10))
1143
- return nt.push(h), h;
1144
- const c = Math.abs(r - n);
1145
- return $(r, n - c / 5, l + 1);
1146
- }, ce = (r, n, l, h) => {
1147
- const i = Y[n.id], c = Y[l.id], p = ne(n, l, i, c, h);
1148
- let m = "", x = "", y = 0, a = 0, R = H[l.branch].index;
1149
- l.type === P.MERGE && n.id !== l.parents[0] && (R = H[n.branch].index);
1150
- let _;
1151
- if (p) {
1152
- m = "A 10 10, 0, 0, 0,", x = "A 10 10, 0, 0, 1,", y = 10, a = 10;
1153
- const b = i.y < c.y ? $(i.y, c.y) : $(c.y, i.y), f = i.x < c.x ? $(i.x, c.x) : $(c.x, i.x);
1154
- w === "TB" ? i.x < c.x ? _ = `M ${i.x} ${i.y} L ${f - y} ${i.y} ${x} ${f} ${i.y + a} L ${f} ${c.y - y} ${m} ${f + a} ${c.y} L ${c.x} ${c.y}` : (R = H[n.branch].index, _ = `M ${i.x} ${i.y} L ${f + y} ${i.y} ${m} ${f} ${i.y + a} L ${f} ${c.y - y} ${x} ${f - a} ${c.y} L ${c.x} ${c.y}`) : i.y < c.y ? _ = `M ${i.x} ${i.y} L ${i.x} ${b - y} ${m} ${i.x + a} ${b} L ${c.x - y} ${b} ${x} ${c.x} ${b + a} L ${c.x} ${c.y}` : (R = H[n.branch].index, _ = `M ${i.x} ${i.y} L ${i.x} ${b + y} ${x} ${i.x + a} ${b} L ${c.x - y} ${b} ${m} ${c.x} ${b - a} L ${c.x} ${c.y}`);
1155
- } else
1156
- m = "A 20 20, 0, 0, 0,", x = "A 20 20, 0, 0, 1,", y = 20, a = 20, w === "TB" ? (i.x < c.x && (l.type === P.MERGE && n.id !== l.parents[0] ? _ = `M ${i.x} ${i.y} L ${i.x} ${c.y - y} ${m} ${i.x + a} ${c.y} L ${c.x} ${c.y}` : _ = `M ${i.x} ${i.y} L ${c.x - y} ${i.y} ${x} ${c.x} ${i.y + a} L ${c.x} ${c.y}`), i.x > c.x && (m = "A 20 20, 0, 0, 0,", x = "A 20 20, 0, 0, 1,", y = 20, a = 20, l.type === P.MERGE && n.id !== l.parents[0] ? _ = `M ${i.x} ${i.y} L ${i.x} ${c.y - y} ${x} ${i.x - a} ${c.y} L ${c.x} ${c.y}` : _ = `M ${i.x} ${i.y} L ${c.x + y} ${i.y} ${m} ${c.x} ${i.y + a} L ${c.x} ${c.y}`), i.x === c.x && (_ = `M ${i.x} ${i.y} L ${c.x} ${c.y}`)) : (i.y < c.y && (l.type === P.MERGE && n.id !== l.parents[0] ? _ = `M ${i.x} ${i.y} L ${c.x - y} ${i.y} ${x} ${c.x} ${i.y + a} L ${c.x} ${c.y}` : _ = `M ${i.x} ${i.y} L ${i.x} ${c.y - y} ${m} ${i.x + a} ${c.y} L ${c.x} ${c.y}`), i.y > c.y && (l.type === P.MERGE && n.id !== l.parents[0] ? _ = `M ${i.x} ${i.y} L ${c.x - y} ${i.y} ${m} ${c.x} ${i.y - a} L ${c.x} ${c.y}` : _ = `M ${i.x} ${i.y} L ${i.x} ${c.y + y} ${x} ${i.x + a} ${c.y} L ${c.x} ${c.y}`), i.y === c.y && (_ = `M ${i.x} ${i.y} L ${c.x} ${c.y}`));
1157
- r.append("path").attr("d", _).attr("class", "arrow arrow" + R % U);
1158
- }, oe = (r, n) => {
1159
- const l = r.append("g").attr("class", "commit-arrows");
1160
- Object.keys(n).forEach((h) => {
1161
- const i = n[h];
1162
- i.parents && i.parents.length > 0 && i.parents.forEach((c) => {
1163
- ce(l, n[c], i, n);
1164
- });
1165
- });
1166
- }, le = (r, n) => {
1167
- const l = C().gitGraph, h = r.append("g");
1168
- n.forEach((i, c) => {
1169
- const p = c % U, m = H[i.name].pos, x = h.append("line");
1170
- x.attr("x1", 0), x.attr("y1", m), x.attr("x2", et), x.attr("y2", m), x.attr("class", "branch branch" + p), w === "TB" && (x.attr("y1", 30), x.attr("x1", m), x.attr("y2", et), x.attr("x2", m)), nt.push(m);
1171
- let y = i.name;
1172
- const a = Tt(y), R = h.insert("rect"), b = h.insert("g").attr("class", "branchLabel").insert("g").attr("class", "label branch-label" + p);
1173
- b.node().appendChild(a);
1174
- let f = a.getBBox();
1175
- R.attr("class", "branchLabelBkg label" + p).attr("rx", 4).attr("ry", 4).attr("x", -f.width - 4 - (l.rotateCommitLabel === !0 ? 30 : 0)).attr("y", -f.height / 2 + 8).attr("width", f.width + 18).attr("height", f.height + 4), b.attr(
1176
- "transform",
1177
- "translate(" + (-f.width - 14 - (l.rotateCommitLabel === !0 ? 30 : 0)) + ", " + (m - f.height / 2 - 1) + ")"
1178
- ), w === "TB" && (R.attr("x", m - f.width / 2 - 10).attr("y", 0), b.attr("transform", "translate(" + (m - f.width / 2 - 5) + ", 0)")), w !== "TB" && R.attr("transform", "translate(-19, " + (m - f.height / 2) + ")");
1179
- });
1180
- }, he = function(r, n, l, h) {
1181
- se();
1182
- const i = C(), c = i.gitGraph;
1183
- B.debug("in gitgraph renderer", r + `
1184
- `, "id:", n, l), Z = h.db.getCommits();
1185
- const p = h.db.getBranchesAsObjArray();
1186
- w = h.db.getDirection();
1187
- const m = At(`[id="${n}"]`);
1188
- let x = 0;
1189
- p.forEach((y, a) => {
1190
- const R = Tt(y.name), _ = m.append("g"), b = _.insert("g").attr("class", "branchLabel"), f = b.insert("g").attr("class", "label branch-label");
1191
- f.node().appendChild(R);
1192
- let k = R.getBBox();
1193
- H[y.name] = { pos: x, index: a }, x += 50 + (c.rotateCommitLabel ? 40 : 0) + (w === "TB" ? k.width / 2 : 0), f.remove(), b.remove(), _.remove();
1194
- }), dt(m, Z, !1), c.showBranches && le(m, p), oe(m, Z), dt(m, Z, !0), It.insertTitle(
1195
- m,
1196
- "gitTitleText",
1197
- c.titleTopMargin,
1198
- h.db.getDiagramTitle()
1199
- ), Nt(
1200
- void 0,
1201
- m,
1202
- c.diagramPadding,
1203
- c.useMaxWidth ?? i.useMaxWidth
1204
- );
1205
- }, me = {
1206
- draw: he
1207
- }, ue = (r) => `
1208
- .commit-id,
1209
- .commit-msg,
1210
- .branch-label {
1211
- fill: lightgrey;
1212
- color: lightgrey;
1213
- font-family: 'trebuchet ms', verdana, arial, sans-serif;
1214
- font-family: var(--mermaid-font-family);
1215
- }
1216
- ${[0, 1, 2, 3, 4, 5, 6, 7].map(
1217
- (n) => `
1218
- .branch-label${n} { fill: ${r["gitBranchLabel" + n]}; }
1219
- .commit${n} { stroke: ${r["git" + n]}; fill: ${r["git" + n]}; }
1220
- .commit-highlight${n} { stroke: ${r["gitInv" + n]}; fill: ${r["gitInv" + n]}; }
1221
- .label${n} { fill: ${r["git" + n]}; }
1222
- .arrow${n} { stroke: ${r["git" + n]}; }
1223
- `
1224
- ).join(`
1225
- `)}
1226
-
1227
- .branch {
1228
- stroke-width: 1;
1229
- stroke: ${r.lineColor};
1230
- stroke-dasharray: 2;
1231
- }
1232
- .commit-label { font-size: ${r.commitLabelFontSize}; fill: ${r.commitLabelColor};}
1233
- .commit-label-bkg { font-size: ${r.commitLabelFontSize}; fill: ${r.commitLabelBackground}; opacity: 0.5; }
1234
- .tag-label { font-size: ${r.tagLabelFontSize}; fill: ${r.tagLabelColor};}
1235
- .tag-label-bkg { fill: ${r.tagLabelBackground}; stroke: ${r.tagLabelBorder}; }
1236
- .tag-hole { fill: ${r.textColor}; }
1237
-
1238
- .commit-merge {
1239
- stroke: ${r.primaryColor};
1240
- fill: ${r.primaryColor};
1241
- }
1242
- .commit-reverse {
1243
- stroke: ${r.primaryColor};
1244
- fill: ${r.primaryColor};
1245
- stroke-width: 3;
1246
- }
1247
- .commit-highlight-outer {
1248
- }
1249
- .commit-highlight-inner {
1250
- stroke: ${r.primaryColor};
1251
- fill: ${r.primaryColor};
1252
- }
1253
-
1254
- .arrow { stroke-width: 8; stroke-linecap: round; fill: none}
1255
- .gitTitleText {
1256
- text-anchor: middle;
1257
- font-size: 18px;
1258
- fill: ${r.textColor};
1259
- }
1260
- `, fe = ue, xe = {
1261
- parser: Vt,
1262
- db: ie,
1263
- renderer: me,
1264
- styles: fe
1265
- };
1266
- export {
1267
- xe as diagram
1268
- };