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