@layers-app/editor 0.7.18 → 0.7.21

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 (249) hide show
  1. package/dist/index.cjs +2 -2
  2. package/dist/index.d.ts +77 -1
  3. package/dist/index.js +15 -9
  4. package/dist/layers.-s__T3tP.js +1 -0
  5. package/dist/layers.04i4fkj7.js +6 -0
  6. package/dist/layers.1SzEqGRR.js +41 -0
  7. package/dist/layers.2dTBEhuc.js +2 -0
  8. package/dist/layers.52famHy6.js +1 -0
  9. package/dist/layers.58bCw_aL.js +4 -0
  10. package/dist/layers.5RtCiK8q.js +9 -0
  11. package/dist/layers.69cwQogW.js +40 -0
  12. package/dist/layers.6QD9G4kN.js +3 -0
  13. package/dist/layers.7JqFgE4-.js +15 -0
  14. package/dist/layers.86s2RIyn.js +8 -0
  15. package/dist/layers.8Sq63dkZ.js +27040 -0
  16. package/dist/layers.9j1NNMqz.js +22 -0
  17. package/dist/layers.9pNaFvaX.js +1 -0
  18. package/dist/layers.AYn1Jxgj.js +8 -0
  19. package/dist/layers.B-Fl_3EP.js +32 -0
  20. package/dist/layers.B0Xg4d5i.js +7 -0
  21. package/dist/layers.B0lSXbHP.js +10 -0
  22. package/dist/layers.B19hGmey.js +1 -0
  23. package/dist/layers.B3-xvp4C.js +39 -0
  24. package/dist/layers.B3D4g2HH.js +1 -0
  25. package/dist/layers.B3JU7UM6.js +2 -0
  26. package/dist/layers.B3gbBlxh.js +84 -0
  27. package/dist/layers.B4y9a-82.js +1 -0
  28. package/dist/layers.B5HBOY_H.js +37 -0
  29. package/dist/layers.B5gZXeOB.js +960 -0
  30. package/dist/layers.B7K7JjK6.js +1510 -0
  31. package/dist/layers.B7OVZYzM.js +1 -0
  32. package/dist/layers.B7a0NihO.js +32 -0
  33. package/dist/layers.B9bIdW-1.js +8 -0
  34. package/dist/layers.BAbr267F.js +8 -0
  35. package/dist/layers.BAtv1CM7.js +1 -0
  36. package/dist/layers.BE3zY9BD.js +7 -0
  37. package/dist/layers.BENQ0QOR.js +37 -0
  38. package/dist/layers.BEsv0Vnh.js +10 -0
  39. package/dist/layers.BGVB62eh.js +10 -0
  40. package/dist/layers.BHbCCtHz.js +41 -0
  41. package/dist/layers.BHnnpXsE.js +794 -0
  42. package/dist/layers.BIeVwYKL.js +1 -0
  43. package/dist/layers.BJDrjORS.js +244 -0
  44. package/dist/layers.BKP1mQ8Z.js +11 -0
  45. package/dist/layers.BLUIfQT4.js +11 -0
  46. package/dist/layers.BLd2spTm.js +1 -0
  47. package/dist/layers.BLwsSbt1.js +5 -0
  48. package/dist/layers.BPo1StNd.js +10 -0
  49. package/dist/layers.BQOvCWpV.js +2966 -0
  50. package/dist/layers.BRj7WXSC.js +1268 -0
  51. package/dist/layers.BSOcI_W1.js +271 -0
  52. package/dist/layers.BSTBZrFn.js +1 -0
  53. package/dist/layers.BU7Z5I9s.js +38 -0
  54. package/dist/layers.BVP5J-o1.js +257 -0
  55. package/dist/layers.BW2tS16y.js +9 -0
  56. package/dist/layers.BWg0ESYB.js +10 -0
  57. package/dist/layers.BXK1dt1S.js +38 -0
  58. package/dist/layers.BXTk_2Zm.js +118 -0
  59. package/dist/layers.BXe_WrOI.js +223 -0
  60. package/dist/layers.BXqUT1rh.js +1 -0
  61. package/dist/layers.Ba2h-Mfy.js +8 -0
  62. package/dist/layers.BbCfEXyj.js +55 -0
  63. package/dist/layers.Bc0qQQCc.js +1089 -0
  64. package/dist/layers.Bci9vDR2.js +6 -0
  65. package/dist/layers.Bcv8luEU.js +40 -0
  66. package/dist/layers.BearaZFa.js +1 -0
  67. package/dist/layers.Bfe4gpo5.js +41 -0
  68. package/dist/layers.BjO63vzU.js +4 -0
  69. package/dist/layers.Bl2p9wCy.js +10 -0
  70. package/dist/layers.BoVXqWbw.js +7 -0
  71. package/dist/layers.BpilXLfW.js +6 -0
  72. package/dist/layers.BqD_vPBO.js +32 -0
  73. package/dist/layers.BqG-mFfW.js +129 -0
  74. package/dist/layers.BrEfKAWB.js +8 -0
  75. package/dist/layers.BtA2IPBg.js +2482 -0
  76. package/dist/layers.BuCZq_Yw.js +1088 -0
  77. package/dist/layers.BuidC-N0.js +7 -0
  78. package/dist/layers.BwCq95j_.js +323 -0
  79. package/dist/layers.BxlM82Ik.js +42 -0
  80. package/dist/layers.BzuIw3LZ.js +1 -0
  81. package/dist/layers.C14GGmi8.js +1034 -0
  82. package/dist/layers.C2-FVR7k.js +40 -0
  83. package/dist/layers.C7dDGsdF.js +42 -0
  84. package/dist/layers.C8_lu5UH.js +23 -0
  85. package/dist/layers.C8bZft3d.js +1 -0
  86. package/dist/layers.CAGUssIj.js +39 -0
  87. package/dist/layers.CBhcfmKp.js +5 -0
  88. package/dist/layers.CBpxlm8J.js +1 -0
  89. package/dist/layers.CCi4tZEO.js +40 -0
  90. package/dist/layers.CCoKyGC6.js +423 -0
  91. package/dist/layers.CCyL2a0C.js +32 -0
  92. package/dist/layers.CHPa6_hS.js +1 -0
  93. package/dist/layers.CHZsXQcr.js +1 -0
  94. package/dist/layers.CLe82baP.js +38 -0
  95. package/dist/layers.CPMeVdt2.js +41 -0
  96. package/dist/layers.CQu2Kko1.js +139 -0
  97. package/dist/layers.CU-OGZof.js +41 -0
  98. package/dist/layers.CUP8yh26.js +9 -0
  99. package/dist/layers.CW0o_41a.js +36 -0
  100. package/dist/layers.CXxqYC1P.js +32 -0
  101. package/dist/layers.CYc8mNrI.js +8 -0
  102. package/dist/layers.CYotqhj5.js +1 -0
  103. package/dist/layers.C_IvrzZ3.js +7 -0
  104. package/dist/layers.C_nzdIcU.js +796 -0
  105. package/dist/layers.CaZtZB64.js +52 -0
  106. package/dist/layers.Ca_1CfOY.js +37 -0
  107. package/dist/layers.CanwFigF.js +11 -0
  108. package/dist/layers.Cb3j9TFj.js +198 -0
  109. package/dist/layers.CcPt099-.js +2238 -0
  110. package/dist/layers.CcbyELpn.js +39 -0
  111. package/dist/layers.Cd4iO7WE.js +437 -0
  112. package/dist/layers.Ce-Nta51.js +122 -0
  113. package/dist/layers.Cf67WsyM.js +116 -0
  114. package/dist/layers.CfwLs1b3.js +37 -0
  115. package/dist/layers.CgY2NiOs.js +76 -0
  116. package/dist/layers.Cgh_u2i4.js +96 -0
  117. package/dist/layers.CguGzf0B.js +48149 -0
  118. package/dist/layers.CjQa4sdf.js +1 -0
  119. package/dist/layers.Cl5Z_Igi.js +1 -0
  120. package/dist/layers.Cl6FTJOT.js +61 -0
  121. package/dist/layers.ClqPdhw8.js +10 -0
  122. package/dist/layers.CltSFkYd.js +9 -0
  123. package/dist/{layers.D99OBX9u.js → layers.CmSzOG_o.js} +88 -86
  124. package/dist/layers.CmknWZiw.js +41 -0
  125. package/dist/layers.CnEOgwwC.js +39 -0
  126. package/dist/layers.CoGQvGYd.js +1 -0
  127. package/dist/layers.CpUEfi8o.js +36 -0
  128. package/dist/layers.CqVTtuYm.js +6 -0
  129. package/dist/layers.CusQc89U.js +4 -0
  130. package/dist/layers.Cv99Mgzq.js +11 -0
  131. package/dist/layers.CvsQlQrZ.js +295 -0
  132. package/dist/layers.Cxwmnhaz.js +13 -0
  133. package/dist/layers.Cyzu9PKQ.js +1 -0
  134. package/dist/layers.D-0SV7pN.js +39 -0
  135. package/dist/layers.D-Igy3Ua.js +40 -0
  136. package/dist/layers.D0zn4_Mx.js +1 -0
  137. package/dist/layers.D1LcBaAa.js +8 -0
  138. package/dist/layers.D1uJtsEg.js +41 -0
  139. package/dist/layers.D2zC70FX.js +2 -0
  140. package/dist/layers.D3bZoMx9.js +160 -0
  141. package/dist/layers.D4MKjja_.js +14 -0
  142. package/dist/layers.D4T8fTcj.js +1223 -0
  143. package/dist/layers.D6RxNPR2.js +1 -0
  144. package/dist/layers.D7jGxypv.js +8 -0
  145. package/dist/layers.D7kC0dCu.js +40 -0
  146. package/dist/layers.DCXvGSyA.js +271 -0
  147. package/dist/layers.DFQczRzZ.js +1286 -0
  148. package/dist/layers.DFQlsoOR.js +934 -0
  149. package/dist/layers.DHLN2SKV.js +213 -0
  150. package/dist/layers.DI1Px4LZ.js +1583 -0
  151. package/dist/layers.DIBXDI6n.js +11 -0
  152. package/dist/layers.DIZ_l0f6.js +1619 -0
  153. package/dist/layers.DIv8Ha88.js +6 -0
  154. package/dist/layers.DJ4l6yZ3.js +1 -0
  155. package/dist/layers.DJBIRB9P.js +40 -0
  156. package/dist/layers.DJO_9mJR.js +4 -0
  157. package/dist/layers.DJPr9JJL.js +806 -0
  158. package/dist/layers.DLa3syby.js +10 -0
  159. package/dist/layers.DLwuMfdd.js +84 -0
  160. package/dist/layers.DMkBISW1.js +1 -0
  161. package/dist/layers.DN-DRFO4.js +33 -0
  162. package/dist/layers.DN9HoVxI.js +18 -0
  163. package/dist/layers.DOIO1344.js +42 -0
  164. package/dist/layers.DOrgOHBr.js +1 -0
  165. package/dist/layers.DR0_dy2n.js +772 -0
  166. package/dist/layers.DS-UxTef.js +205 -0
  167. package/dist/layers.DSKXf25Y.js +51 -0
  168. package/dist/layers.DSnFA-e0.js +36 -0
  169. package/dist/layers.DV8OLPia.js +35 -0
  170. package/dist/layers.DV9x_QzT.js +42 -0
  171. package/dist/layers.DXSbtNid.js +84 -0
  172. package/dist/layers.DYYItiu_.js +7 -0
  173. package/dist/layers.DYhtNvuX.js +65 -0
  174. package/dist/layers.DYiXaBMd.js +5 -0
  175. package/dist/layers.D_dfc6vG.js +139 -0
  176. package/dist/layers.D_zh-C-v.js +44 -0
  177. package/dist/layers.DbaKVP5e.js +1 -0
  178. package/dist/layers.Dfi_IB-0.js +1 -0
  179. package/dist/layers.Dj5SqV0K.js +1126 -0
  180. package/dist/layers.DjUOC4st.js +16 -0
  181. package/dist/layers.Dl7SEeb9.js +373 -0
  182. package/dist/layers.DlaGxCQI.js +6 -0
  183. package/dist/layers.DlseyPwp.js +9 -0
  184. package/dist/layers.DmxpB0Ld.js +39 -0
  185. package/dist/layers.Dn9sJSEy.js +1 -0
  186. package/dist/layers.DoTYGKth.js +9 -0
  187. package/dist/layers.Dof3PZvm.js +1 -0
  188. package/dist/layers.Doi5KI9F.js +1 -0
  189. package/dist/layers.Dq4zYIfC.js +7 -0
  190. package/dist/layers.DqHBlOg-.js +21941 -0
  191. package/dist/layers.DqpUYYTt.js +6 -0
  192. package/dist/layers.DrXdyG3Q.js +805 -0
  193. package/dist/layers.DrY_iQOk.js +70 -0
  194. package/dist/layers.Dtfu1_0i.js +35 -0
  195. package/dist/layers.DudnxBYL.js +8583 -0
  196. package/dist/layers.Dur5__LU.js +5 -0
  197. package/dist/layers.DwbZ0BBM.js +8 -0
  198. package/dist/layers.DxA6ocdw.js +70 -0
  199. package/dist/layers.Dy1naDTQ.js +14 -0
  200. package/dist/layers.DyswrxrZ.js +41 -0
  201. package/dist/layers.FxMjbkmf.js +34 -0
  202. package/dist/layers.HxXfnDxz.js +21336 -0
  203. package/dist/layers.JWCLFILJ.js +1 -0
  204. package/dist/layers.JdaN319C.js +1 -0
  205. package/dist/layers.JfY-At5A.js +7 -0
  206. package/dist/layers.MKp36N_b.js +36 -0
  207. package/dist/layers.OGmEyOFd.js +9 -0
  208. package/dist/layers.P0VXEM5n.js +9 -0
  209. package/dist/layers.PY5vr5EY.js +1 -0
  210. package/dist/layers.QfqvN0di.js +33 -0
  211. package/dist/layers.R8mPlCA0.js +261 -0
  212. package/dist/layers.Tp_UAZiz.js +5 -0
  213. package/dist/layers.UmFryx8m.js +1 -0
  214. package/dist/layers.VIA8sOZr.js +207 -0
  215. package/dist/layers.W54fHbsH.js +9 -0
  216. package/dist/layers.XQKBFj8F.js +40 -0
  217. package/dist/layers.Xuid21m7.js +10 -0
  218. package/dist/layers.YTXUQK8S.js +39 -0
  219. package/dist/layers.b0h5ZBmD.js +61 -0
  220. package/dist/layers.b9B2NY7n.js +11690 -0
  221. package/dist/layers.bgNJ7rmI.js +7 -0
  222. package/dist/layers.cxMp5Xa0.js +40 -0
  223. package/dist/layers.fV5OYtz9.js +32 -0
  224. package/dist/layers.goR33Dn9.js +907 -0
  225. package/dist/layers.hHZAR7op.js +10 -0
  226. package/dist/layers.iD1IDlF-.js +8 -0
  227. package/dist/layers.icLvHK2o.js +504 -0
  228. package/dist/layers.jk1Y4Qup.js +6 -0
  229. package/dist/layers.lCpg7dOn.js +21 -0
  230. package/dist/layers.lW1mE-6u.js +1 -0
  231. package/dist/layers.lgiOeULL.js +39 -0
  232. package/dist/layers.mzdQbLys.js +40 -0
  233. package/dist/layers.nVLjsNoD.js +425 -0
  234. package/dist/layers.nf66LION.js +39 -0
  235. package/dist/layers.qLka9pGz.js +189 -0
  236. package/dist/layers.sP6EpGSd.js +1 -0
  237. package/dist/layers.uXNouSNW.js +1 -0
  238. package/dist/layers.uiGbxBln.js +42 -0
  239. package/dist/layers.wYs3Gn-e.js +9 -0
  240. package/dist/layers.ysXw42a5.js +35 -0
  241. package/dist/layers.z25N8Ql-.js +1225 -0
  242. package/package.json +2 -2
  243. package/dist/layers.94hwidA2.js +0 -198
  244. package/dist/layers.B4l6ta1Q.js +0 -1
  245. package/dist/layers.BMrOAD_P.js +0 -1
  246. package/dist/layers.DOzLBYZr.js +0 -304
  247. package/dist/layers.YRyXopy_.js +0 -151
  248. package/dist/layers.usKC_Id5.js +0 -1
  249. package/dist/layers.zu-IYGYU.js +0 -47463
@@ -0,0 +1,1268 @@
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.DudnxBYL.js";
2
+ import "./layers.HxXfnDxz.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
+ };