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