@layers-app/editor 0.3.10 → 0.3.11

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