odm-client 0.0.1 → 0.0.3
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/dist/client/mongodb-client.d.ts +9 -7
- package/dist/client/mongodb-index.d.ts +2 -2
- package/dist/cloudbase-index.cjs +1 -1
- package/dist/cloudbase-index.js +66 -56
- package/dist/decorators/index.d.ts +7 -0
- package/dist/deps/_commonjsHelpers-KaVRbhAgd4-5pgl5rkso.js +28 -0
- package/dist/deps/_commonjsHelpers-KaVRbhAgd4-r4alsdeis.js +1 -0
- package/dist/deps/acorn-DYjaOAP8Gz-29lcn4w0b.js +16 -0
- package/dist/deps/acorn-DYjaOAP8Gz-gyct7wut5.js +3005 -0
- package/dist/deps/angular-1bp1uAROl4-bz9b1prej.js +2533 -0
- package/dist/deps/angular-1bp1uAROl4-z3xa5q2km.js +3 -0
- package/dist/deps/babel-_P9jsDBVVy-ipfz7c01i.js +7217 -0
- package/dist/deps/babel-_P9jsDBVVy-kjb76ly0t.js +15 -0
- package/dist/deps/estree-Q-oFBmJEml-u09jq3zep.js +44 -0
- package/dist/deps/estree-Q-oFBmJEml-w9z7zljkf.js +4528 -0
- package/dist/deps/flow-j77MFvzLrn-kf5rv1yl1.js +20 -0
- package/dist/deps/flow-j77MFvzLrn-l8rtylmcl.js +27411 -0
- package/dist/deps/glimmer-ewQPb5nTUl-5p9240228.js +37 -0
- package/dist/deps/glimmer-ewQPb5nTUl-xsdp5ejns.js +2703 -0
- package/dist/deps/graphql-8EXR1_taGG-a4my17998.js +28 -0
- package/dist/deps/graphql-8EXR1_taGG-iqqy1396h.js +1221 -0
- package/dist/deps/html-dGbiW_CFWL-inuu6eaf1.js +25 -0
- package/dist/deps/html-dGbiW_CFWL-mq1pmq7je.js +2791 -0
- package/dist/deps/markdown-vAYIRClyWZ-el25zjeip.js +62 -0
- package/dist/deps/markdown-vAYIRClyWZ-f8svm8az3.js +3190 -0
- package/dist/deps/meriyah-d5_qqf88x--ntk7vora9.js +5 -0
- package/dist/deps/meriyah-d5_qqf88x--tbqv1nv9b.js +2645 -0
- package/dist/deps/postcss-Vz5bDQ3hJO-if8y8k5xi.js +4739 -0
- package/dist/deps/postcss-Vz5bDQ3hJO-rmv75nb4j.js +61 -0
- package/dist/deps/typescript-2hCq12HCbJ-n0w7fscoa.js +21 -0
- package/dist/deps/typescript-2hCq12HCbJ-yusfiayfb.js +12947 -0
- package/dist/deps/yaml-I5o0CrcX7J-ibk1yd293.js +4079 -0
- package/dist/deps/yaml-I5o0CrcX7J-xyc4o9p22.js +159 -0
- package/dist/generator/cloudbase-init-generator.d.ts +8 -0
- package/dist/generator/enum-generator.d.ts +3 -0
- package/dist/generator/index.d.ts +6 -0
- package/dist/generator/mongodb-init-generator.d.ts +9 -0
- package/dist/generator/parser.d.ts +21 -0
- package/dist/generator/table-generator.d.ts +3 -0
- package/dist/generator/type-generator.d.ts +6 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +6 -29
- package/dist/index2.cjs +42770 -0
- package/dist/index2.js +242204 -0
- package/dist/mongodb-index.cjs +11 -11
- package/dist/mongodb-index.js +2103 -2106
- package/dist/types/index.d.ts +14 -0
- package/package.json +3 -1
- /package/dist/deps/{query-builder-h6B2D2BCoQ-4ajykqs3m.js → query-builder-h6B2D2BCoQ-f5zcr506g.js} +0 -0
- /package/dist/deps/{query-builder-h6B2D2BCoQ-wqso6i87o.js → query-builder-h6B2D2BCoQ-iw94q0kiz.js} +0 -0
|
@@ -0,0 +1,2703 @@
|
|
|
1
|
+
var gn = Object.defineProperty;
|
|
2
|
+
var tr = (t) => {
|
|
3
|
+
throw TypeError(t);
|
|
4
|
+
};
|
|
5
|
+
var yn = (t, e, r) => e in t ? gn(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r;
|
|
6
|
+
var ge = (t, e, r) => yn(t, typeof e != "symbol" ? e + "" : e, r), ye = (t, e, r) => e.has(t) || tr("Cannot " + r);
|
|
7
|
+
var I = (t, e, r) => (ye(t, e, "read from private field"), r ? r.call(t) : e.get(t)), Dt = (t, e, r) => e.has(t) ? tr("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, r), K = (t, e, r, n) => (ye(t, e, "write to private field"), n ? n.call(t, r) : e.set(t, r), r), er = (t, e, r) => (ye(t, e, "access private method"), r);
|
|
8
|
+
var bn = Object.defineProperty, qe = (t, e) => {
|
|
9
|
+
for (var r in e) bn(t, r, { get: e[r], enumerable: !0 });
|
|
10
|
+
}, An = {};
|
|
11
|
+
qe(An, { languages: () => Es, parsers: () => cn, printers: () => Is });
|
|
12
|
+
var xr = (t, e) => (r, n, ...a) => r | 1 && n == null ? void 0 : (e.call(n) ?? n[t]).apply(n, a), Dn = String.prototype.replaceAll ?? function(t, e) {
|
|
13
|
+
return t.global ? this.replace(t, e) : this.split(t).join(e);
|
|
14
|
+
}, En = xr("replaceAll", function() {
|
|
15
|
+
if (typeof this == "string") return Dn;
|
|
16
|
+
}), Zt = En;
|
|
17
|
+
function vn(t) {
|
|
18
|
+
return this[t < 0 ? this.length + t : t];
|
|
19
|
+
}
|
|
20
|
+
var Cn = xr("at", function() {
|
|
21
|
+
if (Array.isArray(this) || typeof this == "string") return vn;
|
|
22
|
+
}), nt = Cn, Sn = () => {
|
|
23
|
+
}, wn = Sn, Tr = "string", Nr = "array", Pr = "cursor", _e = "indent", Ie = "align", Fr = "trim", Oe = "group", Re = "fill", Ve = "if-break", Lr = "indent-if-break", qr = "line-suffix", _r = "line-suffix-boundary", xt = "line", Ir = "label", $e = "break-parent", Or = /* @__PURE__ */ new Set([Pr, _e, Ie, Fr, Oe, Re, Ve, Lr, qr, _r, xt, Ir, $e]);
|
|
24
|
+
function Bn(t) {
|
|
25
|
+
if (typeof t == "string") return Tr;
|
|
26
|
+
if (Array.isArray(t)) return Nr;
|
|
27
|
+
if (!t) return;
|
|
28
|
+
let { type: e } = t;
|
|
29
|
+
if (Or.has(e)) return e;
|
|
30
|
+
}
|
|
31
|
+
var Rr = Bn, kn = (t) => new Intl.ListFormat("en-US", { type: "disjunction" }).format(t);
|
|
32
|
+
function xn(t) {
|
|
33
|
+
let e = t === null ? "null" : typeof t;
|
|
34
|
+
if (e !== "string" && e !== "object") return `Unexpected doc '${e}',
|
|
35
|
+
Expected it to be 'string' or 'object'.`;
|
|
36
|
+
if (Rr(t)) throw new Error("doc is valid.");
|
|
37
|
+
let r = Object.prototype.toString.call(t);
|
|
38
|
+
if (r !== "[object Object]") return `Unexpected doc '${r}'.`;
|
|
39
|
+
let n = kn([...Or].map((a) => `'${a}'`));
|
|
40
|
+
return `Unexpected doc.type '${t.type}'.
|
|
41
|
+
Expected it to be ${n}.`;
|
|
42
|
+
}
|
|
43
|
+
var Tn = class extends Error {
|
|
44
|
+
constructor(e) {
|
|
45
|
+
super(xn(e));
|
|
46
|
+
ge(this, "name", "InvalidDocError");
|
|
47
|
+
this.doc = e;
|
|
48
|
+
}
|
|
49
|
+
}, Nn = Tn;
|
|
50
|
+
function Pn(t, e) {
|
|
51
|
+
if (typeof t == "string") return e(t);
|
|
52
|
+
let r = /* @__PURE__ */ new Map();
|
|
53
|
+
return n(t);
|
|
54
|
+
function n(s) {
|
|
55
|
+
if (r.has(s)) return r.get(s);
|
|
56
|
+
let u = a(s);
|
|
57
|
+
return r.set(s, u), u;
|
|
58
|
+
}
|
|
59
|
+
function a(s) {
|
|
60
|
+
switch (Rr(s)) {
|
|
61
|
+
case Nr:
|
|
62
|
+
return e(s.map(n));
|
|
63
|
+
case Re:
|
|
64
|
+
return e({ ...s, parts: s.parts.map(n) });
|
|
65
|
+
case Ve:
|
|
66
|
+
return e({ ...s, breakContents: n(s.breakContents), flatContents: n(s.flatContents) });
|
|
67
|
+
case Oe: {
|
|
68
|
+
let { expandedStates: u, contents: i } = s;
|
|
69
|
+
return u ? (u = u.map(n), i = u[0]) : i = n(i), e({ ...s, contents: i, expandedStates: u });
|
|
70
|
+
}
|
|
71
|
+
case Ie:
|
|
72
|
+
case _e:
|
|
73
|
+
case Lr:
|
|
74
|
+
case Ir:
|
|
75
|
+
case qr:
|
|
76
|
+
return e({ ...s, contents: n(s.contents) });
|
|
77
|
+
case Tr:
|
|
78
|
+
case Pr:
|
|
79
|
+
case Fr:
|
|
80
|
+
case _r:
|
|
81
|
+
case xt:
|
|
82
|
+
case $e:
|
|
83
|
+
return e(s);
|
|
84
|
+
default:
|
|
85
|
+
throw new Nn(s);
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
function be(t, e = In) {
|
|
90
|
+
return Pn(t, (r) => typeof r == "string" ? Rt(e, r.split(`
|
|
91
|
+
`)) : r);
|
|
92
|
+
}
|
|
93
|
+
var Fn = wn;
|
|
94
|
+
function G(t) {
|
|
95
|
+
return { type: _e, contents: t };
|
|
96
|
+
}
|
|
97
|
+
function Ln(t, e) {
|
|
98
|
+
return { type: Ie, contents: e, n: t };
|
|
99
|
+
}
|
|
100
|
+
function rr(t) {
|
|
101
|
+
return Ln(-1, t);
|
|
102
|
+
}
|
|
103
|
+
var Vr = { type: $e };
|
|
104
|
+
function nr(t) {
|
|
105
|
+
return { type: Re, parts: t };
|
|
106
|
+
}
|
|
107
|
+
function O(t, e = {}) {
|
|
108
|
+
return Fn(e.expandedStates), { type: Oe, id: e.id, contents: t, break: !!e.shouldBreak, expandedStates: e.expandedStates };
|
|
109
|
+
}
|
|
110
|
+
function ar(t, e = "", r = {}) {
|
|
111
|
+
return { type: Ve, breakContents: t, flatContents: e, groupId: r.groupId };
|
|
112
|
+
}
|
|
113
|
+
function Rt(t, e) {
|
|
114
|
+
let r = [];
|
|
115
|
+
for (let n = 0; n < e.length; n++) n !== 0 && r.push(t), r.push(e[n]);
|
|
116
|
+
return r;
|
|
117
|
+
}
|
|
118
|
+
var N = { type: xt }, j = { type: xt, soft: !0 }, qn = { type: xt, hard: !0 }, Tt = [qn, Vr], _n = { type: xt, hard: !0, literal: !0 }, In = [_n, Vr], $r = Object.freeze({ character: "'", codePoint: 39 }), Ur = Object.freeze({ character: '"', codePoint: 34 }), On = Object.freeze({ preferred: $r, alternate: Ur }), Rn = Object.freeze({ preferred: Ur, alternate: $r });
|
|
119
|
+
function Vn(t, e) {
|
|
120
|
+
let { preferred: r, alternate: n } = e === !0 || e === "'" ? On : Rn, { length: a } = t, s = 0, u = 0;
|
|
121
|
+
for (let i = 0; i < a; i++) {
|
|
122
|
+
let l = t.charCodeAt(i);
|
|
123
|
+
l === r.codePoint ? s++ : l === n.codePoint && u++;
|
|
124
|
+
}
|
|
125
|
+
return (s > u ? n : r).character;
|
|
126
|
+
}
|
|
127
|
+
var we = Vn;
|
|
128
|
+
function $n(t) {
|
|
129
|
+
if (typeof t != "string") throw new TypeError("Expected a string");
|
|
130
|
+
return t.replace(/[|\\{}()[\]^$+*?.]/g, "\\$&").replace(/-/g, "\\x2d");
|
|
131
|
+
}
|
|
132
|
+
var U, ee, Hr, wr, Un = (wr = class {
|
|
133
|
+
constructor(t) {
|
|
134
|
+
Dt(this, ee);
|
|
135
|
+
Dt(this, U);
|
|
136
|
+
K(this, U, new Set(t));
|
|
137
|
+
}
|
|
138
|
+
getLeadingWhitespaceCount(t) {
|
|
139
|
+
let e = I(this, U), r = 0;
|
|
140
|
+
for (let n = 0; n < t.length && e.has(t.charAt(n)); n++) r++;
|
|
141
|
+
return r;
|
|
142
|
+
}
|
|
143
|
+
getTrailingWhitespaceCount(t) {
|
|
144
|
+
let e = I(this, U), r = 0;
|
|
145
|
+
for (let n = t.length - 1; n >= 0 && e.has(t.charAt(n)); n--) r++;
|
|
146
|
+
return r;
|
|
147
|
+
}
|
|
148
|
+
getLeadingWhitespace(t) {
|
|
149
|
+
let e = this.getLeadingWhitespaceCount(t);
|
|
150
|
+
return t.slice(0, e);
|
|
151
|
+
}
|
|
152
|
+
getTrailingWhitespace(t) {
|
|
153
|
+
let e = this.getTrailingWhitespaceCount(t);
|
|
154
|
+
return t.slice(t.length - e);
|
|
155
|
+
}
|
|
156
|
+
hasLeadingWhitespace(t) {
|
|
157
|
+
return I(this, U).has(t.charAt(0));
|
|
158
|
+
}
|
|
159
|
+
hasTrailingWhitespace(t) {
|
|
160
|
+
return I(this, U).has(nt(0, t, -1));
|
|
161
|
+
}
|
|
162
|
+
trimStart(t) {
|
|
163
|
+
let e = this.getLeadingWhitespaceCount(t);
|
|
164
|
+
return t.slice(e);
|
|
165
|
+
}
|
|
166
|
+
trimEnd(t) {
|
|
167
|
+
let e = this.getTrailingWhitespaceCount(t);
|
|
168
|
+
return t.slice(0, t.length - e);
|
|
169
|
+
}
|
|
170
|
+
trim(t) {
|
|
171
|
+
return this.trimEnd(this.trimStart(t));
|
|
172
|
+
}
|
|
173
|
+
split(t, e = !1) {
|
|
174
|
+
let r = `[${$n([...I(this, U)].join(""))}]+`, n = new RegExp(e ? `(${r})` : r, "u");
|
|
175
|
+
return t.split(n);
|
|
176
|
+
}
|
|
177
|
+
hasWhitespaceCharacter(t) {
|
|
178
|
+
let e = I(this, U);
|
|
179
|
+
return Array.prototype.some.call(t, (r) => e.has(r));
|
|
180
|
+
}
|
|
181
|
+
hasNonWhitespaceCharacter(t) {
|
|
182
|
+
let e = I(this, U);
|
|
183
|
+
return Array.prototype.some.call(t, (r) => !e.has(r));
|
|
184
|
+
}
|
|
185
|
+
isWhitespaceOnly(t) {
|
|
186
|
+
let e = I(this, U);
|
|
187
|
+
return Array.prototype.every.call(t, (r) => e.has(r));
|
|
188
|
+
}
|
|
189
|
+
dedentString(t) {
|
|
190
|
+
let e = er(this, ee, Hr).call(this, t);
|
|
191
|
+
return e === 0 ? t : t.split(`
|
|
192
|
+
`).map((r) => r.slice(e)).join(`
|
|
193
|
+
`);
|
|
194
|
+
}
|
|
195
|
+
}, U = new WeakMap(), ee = new WeakSet(), Hr = function(t) {
|
|
196
|
+
let e = Number.POSITIVE_INFINITY;
|
|
197
|
+
for (let r of t.split(`
|
|
198
|
+
`)) {
|
|
199
|
+
if (r.length === 0) continue;
|
|
200
|
+
let n = this.getLeadingWhitespaceCount(r);
|
|
201
|
+
if (n === 0) return 0;
|
|
202
|
+
r.length !== n && n < e && (e = n);
|
|
203
|
+
}
|
|
204
|
+
return e === Number.POSITIVE_INFINITY ? 0 : e;
|
|
205
|
+
}, wr), Hn = Un, zn = [" ", `
|
|
206
|
+
`, "\f", "\r", " "], Mn = new Hn(zn), M = Mn;
|
|
207
|
+
function jn(t) {
|
|
208
|
+
return Array.isArray(t) && t.length > 0;
|
|
209
|
+
}
|
|
210
|
+
var Xt = jn, Gn = class extends Error {
|
|
211
|
+
constructor(e, r, n = "type") {
|
|
212
|
+
super(`Unexpected ${r} node ${n}: ${JSON.stringify(e[n])}.`);
|
|
213
|
+
ge(this, "name", "UnexpectedNodeError");
|
|
214
|
+
this.node = e;
|
|
215
|
+
}
|
|
216
|
+
}, Wn = Gn;
|
|
217
|
+
function zr(t, e, r) {
|
|
218
|
+
if (t.type === "TextNode") {
|
|
219
|
+
let n = t.chars.trim();
|
|
220
|
+
if (!n) return null;
|
|
221
|
+
r.tag === "style" && r.children.length === 1 && r.children[0] === t ? e.chars = "" : e.chars = M.split(n).join(" ");
|
|
222
|
+
}
|
|
223
|
+
t.type === "ElementNode" && (delete e.startTag, delete e.openTag, delete e.parts, delete e.endTag, delete e.closeTag, delete e.nameNode, delete e.body, delete e.blockParamNodes, delete e.params, delete e.path), t.type === "Block" && (delete e.blockParamNodes, delete e.params), t.type === "AttrNode" && t.name.toLowerCase() === "class" && delete e.value, t.type === "PathExpression" && (e.head = t.head.original);
|
|
224
|
+
}
|
|
225
|
+
zr.ignoredProperties = /* @__PURE__ */ new Set(["loc", "selfClosing"]);
|
|
226
|
+
var Kn = zr;
|
|
227
|
+
function Jn(t) {
|
|
228
|
+
let { node: e } = t;
|
|
229
|
+
if (e.type !== "TextNode") return;
|
|
230
|
+
let { parent: r } = t;
|
|
231
|
+
if (!(r.type === "ElementNode" && r.tag === "style" && r.children.length === 1 && r.children[0] === e)) return;
|
|
232
|
+
let n = r.attributes.find((a) => a.type === "AttrNode" && a.name === "lang");
|
|
233
|
+
if (!(n && !(n.value.type === "TextNode" && (n.value.chars === "" || n.value.chars === "css")))) return async (a) => {
|
|
234
|
+
let s = e.chars;
|
|
235
|
+
return s.trim() ? await a(s, { parser: "css" }) : "";
|
|
236
|
+
};
|
|
237
|
+
}
|
|
238
|
+
var Qn = Jn, Nt = null;
|
|
239
|
+
function qt(t) {
|
|
240
|
+
if (Nt !== null && typeof Nt.property) {
|
|
241
|
+
let e = Nt;
|
|
242
|
+
return Nt = qt.prototype = null, e;
|
|
243
|
+
}
|
|
244
|
+
return Nt = qt.prototype = t ?? /* @__PURE__ */ Object.create(null), new qt();
|
|
245
|
+
}
|
|
246
|
+
var Yn = 10;
|
|
247
|
+
for (let t = 0; t <= Yn; t++) qt();
|
|
248
|
+
function Zn(t) {
|
|
249
|
+
return qt(t);
|
|
250
|
+
}
|
|
251
|
+
function Xn(t, e = "type") {
|
|
252
|
+
Zn(t);
|
|
253
|
+
function r(n) {
|
|
254
|
+
let a = n[e], s = t[a];
|
|
255
|
+
if (!Array.isArray(s)) throw Object.assign(new Error(`Missing visitor keys for '${a}'.`), { node: n });
|
|
256
|
+
return s;
|
|
257
|
+
}
|
|
258
|
+
return r;
|
|
259
|
+
}
|
|
260
|
+
var ta = Xn, Mr = Object.assign, sr = console;
|
|
261
|
+
function ea(t, e = "unexpected unreachable branch") {
|
|
262
|
+
throw sr.log("unreachable", t), sr.log(`${e} :: ${JSON.stringify(t)} (${t})`), new Error("code reached unreachable");
|
|
263
|
+
}
|
|
264
|
+
var ra = function() {
|
|
265
|
+
var t = function(W, g, b, p) {
|
|
266
|
+
for (b = b || {}, p = W.length; p--; b[W[p]] = g) ;
|
|
267
|
+
return b;
|
|
268
|
+
}, e = [2, 52], r = [1, 20], n = [5, 14, 15, 19, 29, 34, 39, 44, 47, 48, 53, 57, 61], a = [1, 44], s = [1, 40], u = [1, 43], i = [1, 33], l = [1, 34], h = [1, 35], f = [1, 36], m = [1, 37], A = [1, 42], d = [1, 46], v = [14, 15, 19, 29, 34, 39, 44, 47, 48, 53, 57, 61], w = [14, 15, 19, 29, 34, 44, 47, 48, 53, 57, 61], S = [15, 18], B = [14, 15, 19, 29, 34, 47, 48, 53, 57, 61], x = [33, 67, 73, 75, 84, 85, 86, 87, 88, 89], P = [23, 33, 56, 67, 68, 73, 75, 77, 79, 84, 85, 86, 87, 88, 89], R = [1, 62], V = [1, 63], ot = [23, 33, 56, 68, 73, 79], H = [23, 33, 56, 67, 68, 73, 75, 77, 79, 84, 85, 86, 87, 88, 89, 92, 93], tt = [2, 51], lt = [1, 64], Y = [67, 73, 75, 77, 84, 85, 86, 87, 88, 89], mt = [56, 67, 73, 75, 84, 85, 86, 87, 88, 89], gt = [1, 75], Z = [1, 76], _ = [1, 83], z = [33, 67, 73, 75, 79, 84, 85, 86, 87, 88, 89], $t = [23, 67, 73, 75, 84, 85, 86, 87, 88, 89], Qe = [67, 68, 73, 75, 84, 85, 86, 87, 88, 89], yt = [33, 79], oe = [1, 134], Ye = [73, 81], le = { trace: function() {
|
|
269
|
+
}, yy: {}, symbols_: { error: 2, root: 3, program: 4, EOF: 5, program_repetition0: 6, statement: 7, mustache: 8, block: 9, rawBlock: 10, partial: 11, partialBlock: 12, content: 13, COMMENT: 14, CONTENT: 15, openRawBlock: 16, rawBlock_repetition0: 17, END_RAW_BLOCK: 18, OPEN_RAW_BLOCK: 19, helperName: 20, openRawBlock_repetition0: 21, openRawBlock_option0: 22, CLOSE_RAW_BLOCK: 23, openBlock: 24, block_option0: 25, closeBlock: 26, openInverse: 27, block_option1: 28, OPEN_BLOCK: 29, openBlock_repetition0: 30, openBlock_option0: 31, openBlock_option1: 32, CLOSE: 33, OPEN_INVERSE: 34, openInverse_repetition0: 35, openInverse_option0: 36, openInverse_option1: 37, openInverseChain: 38, OPEN_INVERSE_CHAIN: 39, openInverseChain_repetition0: 40, openInverseChain_option0: 41, openInverseChain_option1: 42, inverseAndProgram: 43, INVERSE: 44, inverseChain: 45, inverseChain_option0: 46, OPEN_ENDBLOCK: 47, OPEN: 48, hash: 49, expr: 50, mustache_repetition0: 51, mustache_option0: 52, OPEN_UNESCAPED: 53, mustache_repetition1: 54, mustache_option1: 55, CLOSE_UNESCAPED: 56, OPEN_PARTIAL: 57, partial_repetition0: 58, partial_option0: 59, openPartialBlock: 60, OPEN_PARTIAL_BLOCK: 61, openPartialBlock_repetition0: 62, openPartialBlock_option0: 63, exprHead: 64, arrayLiteral: 65, sexpr: 66, OPEN_SEXPR: 67, CLOSE_SEXPR: 68, sexpr_repetition0: 69, sexpr_option0: 70, hash_repetition_plus0: 71, hashSegment: 72, ID: 73, EQUALS: 74, OPEN_ARRAY: 75, arrayLiteral_repetition0: 76, CLOSE_ARRAY: 77, blockParams: 78, OPEN_BLOCK_PARAMS: 79, blockParams_repetition_plus0: 80, CLOSE_BLOCK_PARAMS: 81, path: 82, dataName: 83, STRING: 84, NUMBER: 85, BOOLEAN: 86, UNDEFINED: 87, NULL: 88, DATA: 89, pathSegments: 90, sep: 91, SEP: 92, PRIVATE_SEP: 93, $accept: 0, $end: 1 }, terminals_: { 2: "error", 5: "EOF", 14: "COMMENT", 15: "CONTENT", 18: "END_RAW_BLOCK", 19: "OPEN_RAW_BLOCK", 23: "CLOSE_RAW_BLOCK", 29: "OPEN_BLOCK", 33: "CLOSE", 34: "OPEN_INVERSE", 39: "OPEN_INVERSE_CHAIN", 44: "INVERSE", 47: "OPEN_ENDBLOCK", 48: "OPEN", 53: "OPEN_UNESCAPED", 56: "CLOSE_UNESCAPED", 57: "OPEN_PARTIAL", 61: "OPEN_PARTIAL_BLOCK", 67: "OPEN_SEXPR", 68: "CLOSE_SEXPR", 73: "ID", 74: "EQUALS", 75: "OPEN_ARRAY", 77: "CLOSE_ARRAY", 79: "OPEN_BLOCK_PARAMS", 81: "CLOSE_BLOCK_PARAMS", 84: "STRING", 85: "NUMBER", 86: "BOOLEAN", 87: "UNDEFINED", 88: "NULL", 89: "DATA", 92: "SEP", 93: "PRIVATE_SEP" }, productions_: [0, [3, 2], [4, 1], [7, 1], [7, 1], [7, 1], [7, 1], [7, 1], [7, 1], [7, 1], [13, 1], [10, 3], [16, 5], [9, 4], [9, 4], [24, 6], [27, 6], [38, 6], [43, 2], [45, 3], [45, 1], [26, 3], [8, 3], [8, 5], [8, 5], [11, 5], [12, 3], [60, 5], [50, 1], [50, 1], [64, 1], [64, 1], [66, 3], [66, 5], [49, 1], [72, 3], [65, 3], [78, 3], [20, 1], [20, 1], [20, 1], [20, 1], [20, 1], [20, 1], [20, 1], [83, 2], [91, 1], [91, 1], [82, 3], [82, 1], [90, 3], [90, 1], [6, 0], [6, 2], [17, 0], [17, 2], [21, 0], [21, 2], [22, 0], [22, 1], [25, 0], [25, 1], [28, 0], [28, 1], [30, 0], [30, 2], [31, 0], [31, 1], [32, 0], [32, 1], [35, 0], [35, 2], [36, 0], [36, 1], [37, 0], [37, 1], [40, 0], [40, 2], [41, 0], [41, 1], [42, 0], [42, 1], [46, 0], [46, 1], [51, 0], [51, 2], [52, 0], [52, 1], [54, 0], [54, 2], [55, 0], [55, 1], [58, 0], [58, 2], [59, 0], [59, 1], [62, 0], [62, 2], [63, 0], [63, 1], [69, 0], [69, 2], [70, 0], [70, 1], [71, 1], [71, 2], [76, 0], [76, 2], [80, 1], [80, 2]], performAction: function(W, g, b, p, D, o, F) {
|
|
270
|
+
var c = o.length - 1;
|
|
271
|
+
switch (D) {
|
|
272
|
+
case 1:
|
|
273
|
+
return o[c - 1];
|
|
274
|
+
case 2:
|
|
275
|
+
this.$ = p.prepareProgram(o[c]);
|
|
276
|
+
break;
|
|
277
|
+
case 3:
|
|
278
|
+
case 4:
|
|
279
|
+
case 5:
|
|
280
|
+
case 6:
|
|
281
|
+
case 7:
|
|
282
|
+
case 8:
|
|
283
|
+
case 20:
|
|
284
|
+
case 28:
|
|
285
|
+
case 29:
|
|
286
|
+
case 30:
|
|
287
|
+
case 31:
|
|
288
|
+
case 38:
|
|
289
|
+
case 39:
|
|
290
|
+
case 46:
|
|
291
|
+
case 47:
|
|
292
|
+
this.$ = o[c];
|
|
293
|
+
break;
|
|
294
|
+
case 9:
|
|
295
|
+
this.$ = { type: "CommentStatement", value: p.stripComment(o[c]), strip: p.stripFlags(o[c], o[c]), loc: p.locInfo(this._$) };
|
|
296
|
+
break;
|
|
297
|
+
case 10:
|
|
298
|
+
this.$ = { type: "ContentStatement", original: o[c], value: o[c], loc: p.locInfo(this._$) };
|
|
299
|
+
break;
|
|
300
|
+
case 11:
|
|
301
|
+
this.$ = p.prepareRawBlock(o[c - 2], o[c - 1], o[c], this._$);
|
|
302
|
+
break;
|
|
303
|
+
case 12:
|
|
304
|
+
this.$ = { path: o[c - 3], params: o[c - 2], hash: o[c - 1] };
|
|
305
|
+
break;
|
|
306
|
+
case 13:
|
|
307
|
+
this.$ = p.prepareBlock(o[c - 3], o[c - 2], o[c - 1], o[c], !1, this._$);
|
|
308
|
+
break;
|
|
309
|
+
case 14:
|
|
310
|
+
this.$ = p.prepareBlock(o[c - 3], o[c - 2], o[c - 1], o[c], !0, this._$);
|
|
311
|
+
break;
|
|
312
|
+
case 15:
|
|
313
|
+
this.$ = { open: o[c - 5], path: o[c - 4], params: o[c - 3], hash: o[c - 2], blockParams: o[c - 1], strip: p.stripFlags(o[c - 5], o[c]) };
|
|
314
|
+
break;
|
|
315
|
+
case 16:
|
|
316
|
+
case 17:
|
|
317
|
+
this.$ = { path: o[c - 4], params: o[c - 3], hash: o[c - 2], blockParams: o[c - 1], strip: p.stripFlags(o[c - 5], o[c]) };
|
|
318
|
+
break;
|
|
319
|
+
case 18:
|
|
320
|
+
this.$ = { strip: p.stripFlags(o[c - 1], o[c - 1]), program: o[c] };
|
|
321
|
+
break;
|
|
322
|
+
case 19:
|
|
323
|
+
var Ut = p.prepareBlock(o[c - 2], o[c - 1], o[c], o[c], !1, this._$), Ht = p.prepareProgram([Ut], o[c - 1].loc);
|
|
324
|
+
Ht.chained = !0, this.$ = { strip: o[c - 2].strip, program: Ht, chain: !0 };
|
|
325
|
+
break;
|
|
326
|
+
case 21:
|
|
327
|
+
this.$ = { path: o[c - 1], strip: p.stripFlags(o[c - 2], o[c]) };
|
|
328
|
+
break;
|
|
329
|
+
case 22:
|
|
330
|
+
this.$ = p.prepareMustache(p.syntax.hash(o[c - 1], p.locInfo(this._$), { yy: p, syntax: "expr" }), [], void 0, o[c - 2], p.stripFlags(o[c - 2], o[c]), this._$);
|
|
331
|
+
break;
|
|
332
|
+
case 23:
|
|
333
|
+
case 24:
|
|
334
|
+
this.$ = p.prepareMustache(o[c - 3], o[c - 2], o[c - 1], o[c - 4], p.stripFlags(o[c - 4], o[c]), this._$);
|
|
335
|
+
break;
|
|
336
|
+
case 25:
|
|
337
|
+
this.$ = { type: "PartialStatement", name: o[c - 3], params: o[c - 2], hash: o[c - 1], indent: "", strip: p.stripFlags(o[c - 4], o[c]), loc: p.locInfo(this._$) };
|
|
338
|
+
break;
|
|
339
|
+
case 26:
|
|
340
|
+
this.$ = p.preparePartialBlock(o[c - 2], o[c - 1], o[c], this._$);
|
|
341
|
+
break;
|
|
342
|
+
case 27:
|
|
343
|
+
this.$ = { path: o[c - 3], params: o[c - 2], hash: o[c - 1], strip: p.stripFlags(o[c - 4], o[c]) };
|
|
344
|
+
break;
|
|
345
|
+
case 32:
|
|
346
|
+
this.$ = p.syntax.hash(o[c - 1], p.locInfo(this._$), { yy: p, syntax: "expr" });
|
|
347
|
+
break;
|
|
348
|
+
case 33:
|
|
349
|
+
this.$ = { type: "SubExpression", path: o[c - 3], params: o[c - 2], hash: o[c - 1], loc: p.locInfo(this._$) };
|
|
350
|
+
break;
|
|
351
|
+
case 34:
|
|
352
|
+
this.$ = { type: "Hash", pairs: o[c], loc: p.locInfo(this._$) };
|
|
353
|
+
break;
|
|
354
|
+
case 35:
|
|
355
|
+
this.$ = { type: "HashPair", key: p.id(o[c - 2]), value: o[c], loc: p.locInfo(this._$) };
|
|
356
|
+
break;
|
|
357
|
+
case 36:
|
|
358
|
+
this.$ = p.syntax.square(o[c - 1], p.locInfo(this._$), { yy: p, syntax: "expr" });
|
|
359
|
+
break;
|
|
360
|
+
case 37:
|
|
361
|
+
this.$ = p.id(o[c - 1]);
|
|
362
|
+
break;
|
|
363
|
+
case 40:
|
|
364
|
+
this.$ = { type: "StringLiteral", value: o[c], original: o[c], loc: p.locInfo(this._$) };
|
|
365
|
+
break;
|
|
366
|
+
case 41:
|
|
367
|
+
this.$ = { type: "NumberLiteral", value: Number(o[c]), original: Number(o[c]), loc: p.locInfo(this._$) };
|
|
368
|
+
break;
|
|
369
|
+
case 42:
|
|
370
|
+
this.$ = { type: "BooleanLiteral", value: o[c] === "true", original: o[c] === "true", loc: p.locInfo(this._$) };
|
|
371
|
+
break;
|
|
372
|
+
case 43:
|
|
373
|
+
this.$ = { type: "UndefinedLiteral", original: void 0, value: void 0, loc: p.locInfo(this._$) };
|
|
374
|
+
break;
|
|
375
|
+
case 44:
|
|
376
|
+
this.$ = { type: "NullLiteral", original: null, value: null, loc: p.locInfo(this._$) };
|
|
377
|
+
break;
|
|
378
|
+
case 45:
|
|
379
|
+
this.$ = p.preparePath(!0, !1, o[c], this._$);
|
|
380
|
+
break;
|
|
381
|
+
case 48:
|
|
382
|
+
this.$ = p.preparePath(!1, o[c - 2], o[c], this._$);
|
|
383
|
+
break;
|
|
384
|
+
case 49:
|
|
385
|
+
this.$ = p.preparePath(!1, !1, o[c], this._$);
|
|
386
|
+
break;
|
|
387
|
+
case 50:
|
|
388
|
+
o[c - 2].push({ part: p.id(o[c]), original: o[c], separator: o[c - 1] }), this.$ = o[c - 2];
|
|
389
|
+
break;
|
|
390
|
+
case 51:
|
|
391
|
+
this.$ = [{ part: p.id(o[c]), original: o[c] }];
|
|
392
|
+
break;
|
|
393
|
+
case 52:
|
|
394
|
+
case 54:
|
|
395
|
+
case 56:
|
|
396
|
+
case 64:
|
|
397
|
+
case 70:
|
|
398
|
+
case 76:
|
|
399
|
+
case 84:
|
|
400
|
+
case 88:
|
|
401
|
+
case 92:
|
|
402
|
+
case 96:
|
|
403
|
+
case 100:
|
|
404
|
+
case 106:
|
|
405
|
+
this.$ = [];
|
|
406
|
+
break;
|
|
407
|
+
case 53:
|
|
408
|
+
case 55:
|
|
409
|
+
case 57:
|
|
410
|
+
case 65:
|
|
411
|
+
case 71:
|
|
412
|
+
case 77:
|
|
413
|
+
case 85:
|
|
414
|
+
case 89:
|
|
415
|
+
case 93:
|
|
416
|
+
case 97:
|
|
417
|
+
case 101:
|
|
418
|
+
case 105:
|
|
419
|
+
case 107:
|
|
420
|
+
case 109:
|
|
421
|
+
o[c - 1].push(o[c]);
|
|
422
|
+
break;
|
|
423
|
+
case 104:
|
|
424
|
+
case 108:
|
|
425
|
+
this.$ = [o[c]];
|
|
426
|
+
break;
|
|
427
|
+
}
|
|
428
|
+
}, table: [t([5, 14, 15, 19, 29, 34, 48, 53, 57, 61], e, { 3: 1, 4: 2, 6: 3 }), { 1: [3] }, { 5: [1, 4] }, t([5, 39, 44, 47], [2, 2], { 7: 5, 8: 6, 9: 7, 10: 8, 11: 9, 12: 10, 13: 11, 24: 15, 27: 16, 16: 17, 60: 19, 14: [1, 12], 15: r, 19: [1, 23], 29: [1, 21], 34: [1, 22], 48: [1, 13], 53: [1, 14], 57: [1, 18], 61: [1, 24] }), { 1: [2, 1] }, t(n, [2, 53]), t(n, [2, 3]), t(n, [2, 4]), t(n, [2, 5]), t(n, [2, 6]), t(n, [2, 7]), t(n, [2, 8]), t(n, [2, 9]), { 20: 28, 49: 25, 50: 26, 64: 29, 65: 38, 66: 39, 67: a, 71: 27, 72: 30, 73: s, 75: u, 82: 31, 83: 32, 84: i, 85: l, 86: h, 87: f, 88: m, 89: A, 90: 41 }, { 20: 28, 50: 45, 64: 29, 65: 38, 66: 39, 67: a, 73: d, 75: u, 82: 31, 83: 32, 84: i, 85: l, 86: h, 87: f, 88: m, 89: A, 90: 41 }, t(v, e, { 6: 3, 4: 47 }), t(w, e, { 6: 3, 4: 48 }), t(S, [2, 54], { 17: 49 }), { 20: 28, 50: 50, 64: 29, 65: 38, 66: 39, 67: a, 73: d, 75: u, 82: 31, 83: 32, 84: i, 85: l, 86: h, 87: f, 88: m, 89: A, 90: 41 }, t(B, e, { 6: 3, 4: 51 }), t([5, 14, 15, 18, 19, 29, 34, 39, 44, 47, 48, 53, 57, 61], [2, 10]), { 20: 52, 64: 53, 65: 38, 66: 39, 67: a, 73: d, 75: u, 82: 31, 83: 32, 84: i, 85: l, 86: h, 87: f, 88: m, 89: A, 90: 41 }, { 20: 54, 64: 53, 65: 38, 66: 39, 67: a, 73: d, 75: u, 82: 31, 83: 32, 84: i, 85: l, 86: h, 87: f, 88: m, 89: A, 90: 41 }, { 20: 55, 64: 53, 65: 38, 66: 39, 67: a, 73: d, 75: u, 82: 31, 83: 32, 84: i, 85: l, 86: h, 87: f, 88: m, 89: A, 90: 41 }, { 20: 28, 50: 56, 64: 29, 65: 38, 66: 39, 67: a, 73: d, 75: u, 82: 31, 83: 32, 84: i, 85: l, 86: h, 87: f, 88: m, 89: A, 90: 41 }, { 33: [1, 57] }, t(x, [2, 84], { 51: 58 }), t([23, 33, 56, 68, 79], [2, 34], { 72: 59, 73: [1, 60] }), t(P, [2, 28]), t(P, [2, 29], { 91: 61, 92: R, 93: V }), t(ot, [2, 104]), t(P, [2, 38]), t(P, [2, 39]), t(P, [2, 40]), t(P, [2, 41]), t(P, [2, 42]), t(P, [2, 43]), t(P, [2, 44]), t(H, [2, 30]), t(H, [2, 31]), t([23, 33, 56, 67, 68, 73, 75, 79, 84, 85, 86, 87, 88, 89, 92, 93], tt, { 74: lt }), t(P, [2, 49], { 91: 65, 92: R, 93: V }), { 73: d, 90: 66 }, t(Y, [2, 106], { 76: 67 }), { 20: 28, 49: 68, 50: 69, 64: 29, 65: 38, 66: 39, 67: a, 71: 27, 72: 30, 73: s, 75: u, 82: 31, 83: 32, 84: i, 85: l, 86: h, 87: f, 88: m, 89: A, 90: 41 }, t(mt, [2, 88], { 54: 70 }), t(H, tt), { 25: 71, 38: 73, 39: gt, 43: 74, 44: Z, 45: 72, 47: [2, 60] }, { 28: 77, 43: 78, 44: Z, 47: [2, 62] }, { 13: 80, 15: r, 18: [1, 79] }, t(x, [2, 92], { 58: 81 }), { 26: 82, 47: _ }, t(z, [2, 64], { 30: 84 }), { 91: 61, 92: R, 93: V }, t(z, [2, 70], { 35: 85 }), t($t, [2, 56], { 21: 86 }), t(x, [2, 96], { 62: 87 }), t(n, [2, 22]), { 20: 28, 33: [2, 86], 49: 90, 50: 89, 52: 88, 64: 29, 65: 38, 66: 39, 67: a, 71: 27, 72: 30, 73: s, 75: u, 82: 31, 83: 32, 84: i, 85: l, 86: h, 87: f, 88: m, 89: A, 90: 41 }, t(ot, [2, 105]), { 74: lt }, { 73: d, 90: 91 }, { 73: [2, 46] }, { 73: [2, 47] }, { 20: 28, 50: 92, 64: 29, 65: 38, 66: 39, 67: a, 73: d, 75: u, 82: 31, 83: 32, 84: i, 85: l, 86: h, 87: f, 88: m, 89: A, 90: 41 }, { 73: [1, 93] }, t(P, [2, 45], { 91: 65, 92: R, 93: V }), { 20: 28, 50: 95, 64: 29, 65: 38, 66: 39, 67: a, 73: d, 75: u, 77: [1, 94], 82: 31, 83: 32, 84: i, 85: l, 86: h, 87: f, 88: m, 89: A, 90: 41 }, { 68: [1, 96] }, t(Qe, [2, 100], { 69: 97 }), { 20: 28, 49: 100, 50: 99, 55: 98, 56: [2, 90], 64: 29, 65: 38, 66: 39, 67: a, 71: 27, 72: 30, 73: s, 75: u, 82: 31, 83: 32, 84: i, 85: l, 86: h, 87: f, 88: m, 89: A, 90: 41 }, { 26: 101, 47: _ }, { 47: [2, 61] }, t(v, e, { 6: 3, 4: 102 }), { 47: [2, 20] }, { 20: 103, 64: 53, 65: 38, 66: 39, 67: a, 73: d, 75: u, 82: 31, 83: 32, 84: i, 85: l, 86: h, 87: f, 88: m, 89: A, 90: 41 }, t(B, e, { 6: 3, 4: 104 }), { 26: 105, 47: _ }, { 47: [2, 63] }, t(n, [2, 11]), t(S, [2, 55]), { 20: 28, 33: [2, 94], 49: 108, 50: 107, 59: 106, 64: 29, 65: 38, 66: 39, 67: a, 71: 27, 72: 30, 73: s, 75: u, 82: 31, 83: 32, 84: i, 85: l, 86: h, 87: f, 88: m, 89: A, 90: 41 }, t(n, [2, 26]), { 20: 109, 64: 53, 65: 38, 66: 39, 67: a, 73: d, 75: u, 82: 31, 83: 32, 84: i, 85: l, 86: h, 87: f, 88: m, 89: A, 90: 41 }, t(yt, [2, 66], { 71: 27, 20: 28, 64: 29, 72: 30, 82: 31, 83: 32, 65: 38, 66: 39, 90: 41, 31: 110, 50: 111, 49: 112, 67: a, 73: s, 75: u, 84: i, 85: l, 86: h, 87: f, 88: m, 89: A }), t(yt, [2, 72], { 71: 27, 20: 28, 64: 29, 72: 30, 82: 31, 83: 32, 65: 38, 66: 39, 90: 41, 36: 113, 50: 114, 49: 115, 67: a, 73: s, 75: u, 84: i, 85: l, 86: h, 87: f, 88: m, 89: A }), { 20: 28, 22: 116, 23: [2, 58], 49: 118, 50: 117, 64: 29, 65: 38, 66: 39, 67: a, 71: 27, 72: 30, 73: s, 75: u, 82: 31, 83: 32, 84: i, 85: l, 86: h, 87: f, 88: m, 89: A, 90: 41 }, { 20: 28, 33: [2, 98], 49: 121, 50: 120, 63: 119, 64: 29, 65: 38, 66: 39, 67: a, 71: 27, 72: 30, 73: s, 75: u, 82: 31, 83: 32, 84: i, 85: l, 86: h, 87: f, 88: m, 89: A, 90: 41 }, { 33: [1, 122] }, t(x, [2, 85]), { 33: [2, 87] }, t(P, [2, 48], { 91: 65, 92: R, 93: V }), t(ot, [2, 35]), t(H, [2, 50]), t(H, [2, 36]), t(Y, [2, 107]), t(H, [2, 32]), { 20: 28, 49: 125, 50: 124, 64: 29, 65: 38, 66: 39, 67: a, 68: [2, 102], 70: 123, 71: 27, 72: 30, 73: s, 75: u, 82: 31, 83: 32, 84: i, 85: l, 86: h, 87: f, 88: m, 89: A, 90: 41 }, { 56: [1, 126] }, t(mt, [2, 89]), { 56: [2, 91] }, t(n, [2, 13]), { 38: 73, 39: gt, 43: 74, 44: Z, 45: 128, 46: 127, 47: [2, 82] }, t(z, [2, 76], { 40: 129 }), { 47: [2, 18] }, t(n, [2, 14]), { 33: [1, 130] }, t(x, [2, 93]), { 33: [2, 95] }, { 33: [1, 131] }, { 32: 132, 33: [2, 68], 78: 133, 79: oe }, t(z, [2, 65]), t(yt, [2, 67]), { 33: [2, 74], 37: 135, 78: 136, 79: oe }, t(z, [2, 71]), t(yt, [2, 73]), { 23: [1, 137] }, t($t, [2, 57]), { 23: [2, 59] }, { 33: [1, 138] }, t(x, [2, 97]), { 33: [2, 99] }, t(n, [2, 23]), { 68: [1, 139] }, t(Qe, [2, 101]), { 68: [2, 103] }, t(n, [2, 24]), { 47: [2, 19] }, { 47: [2, 83] }, t(yt, [2, 78], { 71: 27, 20: 28, 64: 29, 72: 30, 82: 31, 83: 32, 65: 38, 66: 39, 90: 41, 41: 140, 50: 141, 49: 142, 67: a, 73: s, 75: u, 84: i, 85: l, 86: h, 87: f, 88: m, 89: A }), t(n, [2, 25]), t(n, [2, 21]), { 33: [1, 143] }, { 33: [2, 69] }, { 73: [1, 145], 80: 144 }, { 33: [1, 146] }, { 33: [2, 75] }, t(S, [2, 12]), t(B, [2, 27]), t(H, [2, 33]), { 33: [2, 80], 42: 147, 78: 148, 79: oe }, t(z, [2, 77]), t(yt, [2, 79]), t(v, [2, 15]), { 73: [1, 150], 81: [1, 149] }, t(Ye, [2, 108]), t(w, [2, 16]), { 33: [1, 151] }, { 33: [2, 81] }, { 33: [2, 37] }, t(Ye, [2, 109]), t(v, [2, 17])], defaultActions: { 4: [2, 1], 62: [2, 46], 63: [2, 47], 72: [2, 61], 74: [2, 20], 78: [2, 63], 90: [2, 87], 100: [2, 91], 104: [2, 18], 108: [2, 95], 118: [2, 59], 121: [2, 99], 125: [2, 103], 127: [2, 19], 128: [2, 83], 133: [2, 69], 136: [2, 75], 148: [2, 81], 149: [2, 37] }, parseError: function(W, g) {
|
|
429
|
+
if (g.recoverable) this.trace(W);
|
|
430
|
+
else {
|
|
431
|
+
var b = new Error(W);
|
|
432
|
+
throw b.hash = g, b;
|
|
433
|
+
}
|
|
434
|
+
}, parse: function(W) {
|
|
435
|
+
var g = this, b = [0], p = [null], D = [], o = this.table, F = "", c = 0, Ut = 0, Ht = 0, pn = 2, Ze = 1, dn = D.slice.call(arguments, 1), k = Object.create(this.lexer), ct = { yy: {} };
|
|
436
|
+
for (var he in this.yy) Object.prototype.hasOwnProperty.call(this.yy, he) && (ct.yy[he] = this.yy[he]);
|
|
437
|
+
k.setInput(W, ct.yy), ct.yy.lexer = k, ct.yy.parser = this, typeof k.yylloc > "u" && (k.yylloc = {});
|
|
438
|
+
var pe = k.yylloc;
|
|
439
|
+
D.push(pe);
|
|
440
|
+
var fn = k.options && k.options.ranges;
|
|
441
|
+
typeof ct.yy.parseError == "function" ? this.parseError = ct.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
|
|
442
|
+
for (var mn = function() {
|
|
443
|
+
var At;
|
|
444
|
+
return At = k.lex() || Ze, typeof At != "number" && (At = g.symbols_[At] || At), At;
|
|
445
|
+
}, L, de, ht, $, Os, fe, bt = {}, zt, X, Xe, Mt; ; ) {
|
|
446
|
+
if (ht = b[b.length - 1], this.defaultActions[ht] ? $ = this.defaultActions[ht] : ((L === null || typeof L > "u") && (L = mn()), $ = o[ht] && o[ht][L]), typeof $ > "u" || !$.length || !$[0]) {
|
|
447
|
+
var me = "";
|
|
448
|
+
Mt = [];
|
|
449
|
+
for (zt in o[ht]) this.terminals_[zt] && zt > pn && Mt.push("'" + this.terminals_[zt] + "'");
|
|
450
|
+
k.showPosition ? me = "Parse error on line " + (c + 1) + `:
|
|
451
|
+
` + k.showPosition() + `
|
|
452
|
+
Expecting ` + Mt.join(", ") + ", got '" + (this.terminals_[L] || L) + "'" : me = "Parse error on line " + (c + 1) + ": Unexpected " + (L == Ze ? "end of input" : "'" + (this.terminals_[L] || L) + "'"), this.parseError(me, { text: k.match, token: this.terminals_[L] || L, line: k.yylineno, loc: pe, expected: Mt });
|
|
453
|
+
}
|
|
454
|
+
if ($[0] instanceof Array && $.length > 1) throw new Error("Parse Error: multiple actions possible at state: " + ht + ", token: " + L);
|
|
455
|
+
switch ($[0]) {
|
|
456
|
+
case 1:
|
|
457
|
+
b.push(L), p.push(k.yytext), D.push(k.yylloc), b.push($[1]), L = null, de ? (L = de, de = null) : (Ut = k.yyleng, F = k.yytext, c = k.yylineno, pe = k.yylloc, Ht > 0);
|
|
458
|
+
break;
|
|
459
|
+
case 2:
|
|
460
|
+
if (X = this.productions_[$[1]][1], bt.$ = p[p.length - X], bt._$ = { first_line: D[D.length - (X || 1)].first_line, last_line: D[D.length - 1].last_line, first_column: D[D.length - (X || 1)].first_column, last_column: D[D.length - 1].last_column }, fn && (bt._$.range = [D[D.length - (X || 1)].range[0], D[D.length - 1].range[1]]), fe = this.performAction.apply(bt, [F, Ut, c, ct.yy, $[1], p, D].concat(dn)), typeof fe < "u") return fe;
|
|
461
|
+
X && (b = b.slice(0, -1 * X * 2), p = p.slice(0, -1 * X), D = D.slice(0, -1 * X)), b.push(this.productions_[$[1]][0]), p.push(bt.$), D.push(bt._$), Xe = o[b[b.length - 2]][b[b.length - 1]], b.push(Xe);
|
|
462
|
+
break;
|
|
463
|
+
case 3:
|
|
464
|
+
return !0;
|
|
465
|
+
}
|
|
466
|
+
}
|
|
467
|
+
return !0;
|
|
468
|
+
} }, hn = /* @__PURE__ */ function() {
|
|
469
|
+
var W = { EOF: 1, parseError: function(g, b) {
|
|
470
|
+
if (this.yy.parser) this.yy.parser.parseError(g, b);
|
|
471
|
+
else throw new Error(g);
|
|
472
|
+
}, setInput: function(g, b) {
|
|
473
|
+
return this.yy = b || this.yy || {}, this._input = g, this._more = this._backtrack = this.done = !1, this.yylineno = this.yyleng = 0, this.yytext = this.matched = this.match = "", this.conditionStack = ["INITIAL"], this.yylloc = { first_line: 1, first_column: 0, last_line: 1, last_column: 0 }, this.options.ranges && (this.yylloc.range = [0, 0]), this.offset = 0, this;
|
|
474
|
+
}, input: function() {
|
|
475
|
+
var g = this._input[0];
|
|
476
|
+
this.yytext += g, this.yyleng++, this.offset++, this.match += g, this.matched += g;
|
|
477
|
+
var b = g.match(/(?:\r\n?|\n).*/g);
|
|
478
|
+
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), g;
|
|
479
|
+
}, unput: function(g) {
|
|
480
|
+
var b = g.length, p = g.split(/(?:\r\n?|\n)/g);
|
|
481
|
+
this._input = g + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - b), this.offset -= b;
|
|
482
|
+
var D = this.match.split(/(?:\r\n?|\n)/g);
|
|
483
|
+
this.match = this.match.substr(0, this.match.length - 1), this.matched = this.matched.substr(0, this.matched.length - 1), p.length - 1 && (this.yylineno -= p.length - 1);
|
|
484
|
+
var o = this.yylloc.range;
|
|
485
|
+
return this.yylloc = { first_line: this.yylloc.first_line, last_line: this.yylineno + 1, first_column: this.yylloc.first_column, last_column: p ? (p.length === D.length ? this.yylloc.first_column : 0) + D[D.length - p.length].length - p[0].length : this.yylloc.first_column - b }, this.options.ranges && (this.yylloc.range = [o[0], o[0] + this.yyleng - b]), this.yyleng = this.yytext.length, this;
|
|
486
|
+
}, more: function() {
|
|
487
|
+
return this._more = !0, this;
|
|
488
|
+
}, reject: function() {
|
|
489
|
+
if (this.options.backtrack_lexer) this._backtrack = !0;
|
|
490
|
+
else 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).
|
|
491
|
+
` + this.showPosition(), { text: "", token: null, line: this.yylineno });
|
|
492
|
+
return this;
|
|
493
|
+
}, less: function(g) {
|
|
494
|
+
this.unput(this.match.slice(g));
|
|
495
|
+
}, pastInput: function() {
|
|
496
|
+
var g = this.matched.substr(0, this.matched.length - this.match.length);
|
|
497
|
+
return (g.length > 20 ? "..." : "") + g.substr(-20).replace(/\n/g, "");
|
|
498
|
+
}, upcomingInput: function() {
|
|
499
|
+
var g = this.match;
|
|
500
|
+
return g.length < 20 && (g += this._input.substr(0, 20 - g.length)), (g.substr(0, 20) + (g.length > 20 ? "..." : "")).replace(/\n/g, "");
|
|
501
|
+
}, showPosition: function() {
|
|
502
|
+
var g = this.pastInput(), b = new Array(g.length + 1).join("-");
|
|
503
|
+
return g + this.upcomingInput() + `
|
|
504
|
+
` + b + "^";
|
|
505
|
+
}, test_match: function(g, b) {
|
|
506
|
+
var p, D, o;
|
|
507
|
+
if (this.options.backtrack_lexer && (o = { yylineno: this.yylineno, yylloc: { first_line: this.yylloc.first_line, last_line: this.last_line, first_column: this.yylloc.first_column, last_column: this.yylloc.last_column }, yytext: this.yytext, match: this.match, matches: this.matches, matched: this.matched, yyleng: this.yyleng, offset: this.offset, _more: this._more, _input: this._input, yy: this.yy, conditionStack: this.conditionStack.slice(0), done: this.done }, this.options.ranges && (o.yylloc.range = this.yylloc.range.slice(0))), D = g[0].match(/(?:\r\n?|\n).*/g), D && (this.yylineno += D.length), this.yylloc = { first_line: this.yylloc.last_line, last_line: this.yylineno + 1, first_column: this.yylloc.last_column, last_column: D ? D[D.length - 1].length - D[D.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + g[0].length }, this.yytext += g[0], this.match += g[0], this.matches = g, 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(g[0].length), this.matched += g[0], p = this.performAction.call(this, this.yy, this, b, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), p) return p;
|
|
508
|
+
if (this._backtrack) {
|
|
509
|
+
for (var F in o) this[F] = o[F];
|
|
510
|
+
return !1;
|
|
511
|
+
}
|
|
512
|
+
return !1;
|
|
513
|
+
}, next: function() {
|
|
514
|
+
if (this.done) return this.EOF;
|
|
515
|
+
this._input || (this.done = !0);
|
|
516
|
+
var g, b, p, D;
|
|
517
|
+
this._more || (this.yytext = "", this.match = "");
|
|
518
|
+
for (var o = this._currentRules(), F = 0; F < o.length; F++) if (p = this._input.match(this.rules[o[F]]), p && (!b || p[0].length > b[0].length)) {
|
|
519
|
+
if (b = p, D = F, this.options.backtrack_lexer) {
|
|
520
|
+
if (g = this.test_match(p, o[F]), g !== !1) return g;
|
|
521
|
+
if (this._backtrack) {
|
|
522
|
+
b = !1;
|
|
523
|
+
continue;
|
|
524
|
+
} else return !1;
|
|
525
|
+
} else if (!this.options.flex) break;
|
|
526
|
+
}
|
|
527
|
+
return b ? (g = this.test_match(b, o[D]), g !== !1 ? g : !1) : this._input === "" ? this.EOF : this.parseError("Lexical error on line " + (this.yylineno + 1) + `. Unrecognized text.
|
|
528
|
+
` + this.showPosition(), { text: "", token: null, line: this.yylineno });
|
|
529
|
+
}, lex: function() {
|
|
530
|
+
var g = this.next();
|
|
531
|
+
return g || this.lex();
|
|
532
|
+
}, begin: function(g) {
|
|
533
|
+
this.conditionStack.push(g);
|
|
534
|
+
}, popState: function() {
|
|
535
|
+
var g = this.conditionStack.length - 1;
|
|
536
|
+
return g > 0 ? this.conditionStack.pop() : this.conditionStack[0];
|
|
537
|
+
}, _currentRules: function() {
|
|
538
|
+
return this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1] ? this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules : this.conditions.INITIAL.rules;
|
|
539
|
+
}, topState: function(g) {
|
|
540
|
+
return g = this.conditionStack.length - 1 - Math.abs(g || 0), g >= 0 ? this.conditionStack[g] : "INITIAL";
|
|
541
|
+
}, pushState: function(g) {
|
|
542
|
+
this.begin(g);
|
|
543
|
+
}, stateStackSize: function() {
|
|
544
|
+
return this.conditionStack.length;
|
|
545
|
+
}, options: {}, performAction: function(g, b, p, D) {
|
|
546
|
+
function o(F, c) {
|
|
547
|
+
return b.yytext = b.yytext.substring(F, b.yyleng - c + F);
|
|
548
|
+
}
|
|
549
|
+
switch (p) {
|
|
550
|
+
case 0:
|
|
551
|
+
if (b.yytext.slice(-2) === "\\\\" ? (o(0, 1), this.begin("mu")) : b.yytext.slice(-1) === "\\" ? (o(0, 1), this.begin("emu")) : this.begin("mu"), b.yytext) return 15;
|
|
552
|
+
break;
|
|
553
|
+
case 1:
|
|
554
|
+
return 15;
|
|
555
|
+
case 2:
|
|
556
|
+
return this.popState(), 15;
|
|
557
|
+
case 3:
|
|
558
|
+
return this.begin("raw"), 15;
|
|
559
|
+
case 4:
|
|
560
|
+
return this.popState(), this.conditionStack[this.conditionStack.length - 1] === "raw" ? 15 : (o(5, 9), 18);
|
|
561
|
+
case 5:
|
|
562
|
+
return 15;
|
|
563
|
+
case 6:
|
|
564
|
+
return this.popState(), 14;
|
|
565
|
+
case 7:
|
|
566
|
+
return 67;
|
|
567
|
+
case 8:
|
|
568
|
+
return 68;
|
|
569
|
+
case 9:
|
|
570
|
+
if (g.syntax.square === "string") this.unput(b.yytext), this.begin("escl");
|
|
571
|
+
else return 75;
|
|
572
|
+
break;
|
|
573
|
+
case 10:
|
|
574
|
+
return 77;
|
|
575
|
+
case 11:
|
|
576
|
+
return 19;
|
|
577
|
+
case 12:
|
|
578
|
+
return this.popState(), this.begin("raw"), 23;
|
|
579
|
+
case 13:
|
|
580
|
+
return 57;
|
|
581
|
+
case 14:
|
|
582
|
+
return 61;
|
|
583
|
+
case 15:
|
|
584
|
+
return 29;
|
|
585
|
+
case 16:
|
|
586
|
+
return 47;
|
|
587
|
+
case 17:
|
|
588
|
+
return this.popState(), 44;
|
|
589
|
+
case 18:
|
|
590
|
+
return this.popState(), 44;
|
|
591
|
+
case 19:
|
|
592
|
+
return 34;
|
|
593
|
+
case 20:
|
|
594
|
+
return 39;
|
|
595
|
+
case 21:
|
|
596
|
+
return 53;
|
|
597
|
+
case 22:
|
|
598
|
+
return 48;
|
|
599
|
+
case 23:
|
|
600
|
+
this.unput(b.yytext), this.popState(), this.begin("com");
|
|
601
|
+
break;
|
|
602
|
+
case 24:
|
|
603
|
+
return this.popState(), 14;
|
|
604
|
+
case 25:
|
|
605
|
+
return 48;
|
|
606
|
+
case 26:
|
|
607
|
+
return 74;
|
|
608
|
+
case 27:
|
|
609
|
+
return 73;
|
|
610
|
+
case 28:
|
|
611
|
+
return 73;
|
|
612
|
+
case 29:
|
|
613
|
+
return 93;
|
|
614
|
+
case 30:
|
|
615
|
+
return 92;
|
|
616
|
+
case 31:
|
|
617
|
+
break;
|
|
618
|
+
case 32:
|
|
619
|
+
return this.popState(), 56;
|
|
620
|
+
case 33:
|
|
621
|
+
return this.popState(), 33;
|
|
622
|
+
case 34:
|
|
623
|
+
return b.yytext = o(1, 2).replace(/\\"/g, '"'), 84;
|
|
624
|
+
case 35:
|
|
625
|
+
return b.yytext = o(1, 2).replace(/\\'/g, "'"), 84;
|
|
626
|
+
case 36:
|
|
627
|
+
return 89;
|
|
628
|
+
case 37:
|
|
629
|
+
return 86;
|
|
630
|
+
case 38:
|
|
631
|
+
return 86;
|
|
632
|
+
case 39:
|
|
633
|
+
return 87;
|
|
634
|
+
case 40:
|
|
635
|
+
return 88;
|
|
636
|
+
case 41:
|
|
637
|
+
return 85;
|
|
638
|
+
case 42:
|
|
639
|
+
return 79;
|
|
640
|
+
case 43:
|
|
641
|
+
return 81;
|
|
642
|
+
case 44:
|
|
643
|
+
return 73;
|
|
644
|
+
case 45:
|
|
645
|
+
return b.yytext = b.yytext.replace(/\\([\\\]])/g, "$1"), this.popState(), 73;
|
|
646
|
+
case 46:
|
|
647
|
+
return "INVALID";
|
|
648
|
+
case 47:
|
|
649
|
+
return 5;
|
|
650
|
+
}
|
|
651
|
+
}, rules: [/^(?:[^\x00]*?(?=(\{\{)))/, /^(?:[^\x00]+)/, /^(?:[^\x00]{2,}?(?=(\{\{|\\\{\{|\\\\\{\{|$)))/, /^(?:\{\{\{\{(?=[^/]))/, /^(?:\{\{\{\{\/[^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=[=}\s\/.])\}\}\}\})/, /^(?:[^\x00]+?(?=(\{\{\{\{)))/, /^(?:[\s\S]*?--(~)?\}\})/, /^(?:\()/, /^(?:\))/, /^(?:\[)/, /^(?:\])/, /^(?:\{\{\{\{)/, /^(?:\}\}\}\})/, /^(?:\{\{(~)?>)/, /^(?:\{\{(~)?#>)/, /^(?:\{\{(~)?#\*?)/, /^(?:\{\{(~)?\/)/, /^(?:\{\{(~)?\^\s*(~)?\}\})/, /^(?:\{\{(~)?\s*else\s*(~)?\}\})/, /^(?:\{\{(~)?\^)/, /^(?:\{\{(~)?\s*else\b)/, /^(?:\{\{(~)?\{)/, /^(?:\{\{(~)?&)/, /^(?:\{\{(~)?!--)/, /^(?:\{\{(~)?![\s\S]*?\}\})/, /^(?:\{\{(~)?\*?)/, /^(?:=)/, /^(?:\.\.)/, /^(?:\.(?=([=~}\s\/.)\]|])))/, /^(?:\.#)/, /^(?:[\/.])/, /^(?:\s+)/, /^(?:\}(~)?\}\})/, /^(?:(~)?\}\})/, /^(?:"(\\["]|[^"])*")/, /^(?:'(\\[']|[^'])*')/, /^(?:@)/, /^(?:true(?=([~}\s)\]])))/, /^(?:false(?=([~}\s)\]])))/, /^(?:undefined(?=([~}\s)\]])))/, /^(?:null(?=([~}\s)\]])))/, /^(?:-?[0-9]+(?:\.[0-9]+)?(?=([~}\s)\]])))/, /^(?:as\s+\|)/, /^(?:\|)/, /^(?:([^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=([=~}\s\/.)\]|]))))/, /^(?:\[(\\\]|[^\]])*\])/, /^(?:.)/, /^(?:$)/], conditions: { mu: { rules: [7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 46, 47], inclusive: !1 }, emu: { rules: [2], inclusive: !1 }, com: { rules: [6], inclusive: !1 }, raw: { rules: [3, 4, 5], inclusive: !1 }, escl: { rules: [45], inclusive: !1 }, INITIAL: { rules: [0, 1, 47], inclusive: !0 } } };
|
|
652
|
+
return W;
|
|
653
|
+
}();
|
|
654
|
+
le.lexer = hn;
|
|
655
|
+
function ce() {
|
|
656
|
+
this.yy = {};
|
|
657
|
+
}
|
|
658
|
+
return ce.prototype = le, le.Parser = ce, new ce();
|
|
659
|
+
}(), jt = ra, Ae = ["description", "fileName", "lineNumber", "endLineNumber", "message", "name", "number", "stack"];
|
|
660
|
+
function Ue(t, e) {
|
|
661
|
+
var r = e && e.loc, n, a, s, u;
|
|
662
|
+
r && (n = r.start.line, a = r.end.line, s = r.start.column, u = r.end.column, t += " - " + n + ":" + s);
|
|
663
|
+
for (var i = Error.prototype.constructor.call(this, t), l = 0; l < Ae.length; l++) this[Ae[l]] = i[Ae[l]];
|
|
664
|
+
Error.captureStackTrace && Error.captureStackTrace(this, Ue);
|
|
665
|
+
try {
|
|
666
|
+
r && (this.lineNumber = n, this.endLineNumber = a, Object.defineProperty ? (Object.defineProperty(this, "column", { value: s, enumerable: !0 }), Object.defineProperty(this, "endColumn", { value: u, enumerable: !0 })) : (this.column = s, this.endColumn = u));
|
|
667
|
+
} catch {
|
|
668
|
+
}
|
|
669
|
+
}
|
|
670
|
+
Ue.prototype = new Error();
|
|
671
|
+
var St = Ue;
|
|
672
|
+
function Kt() {
|
|
673
|
+
this.parents = [];
|
|
674
|
+
}
|
|
675
|
+
Kt.prototype = { constructor: Kt, mutating: !1, acceptKey: function(t, e) {
|
|
676
|
+
var r = this.accept(t[e]);
|
|
677
|
+
if (this.mutating) {
|
|
678
|
+
if (r && !Kt.prototype[r.type]) throw new St('Unexpected node type "' + r.type + '" found when accepting ' + e + " on " + t.type);
|
|
679
|
+
t[e] = r;
|
|
680
|
+
}
|
|
681
|
+
}, acceptRequired: function(t, e) {
|
|
682
|
+
if (this.acceptKey(t, e), !t[e]) throw new St(t.type + " requires " + e);
|
|
683
|
+
}, acceptArray: function(t) {
|
|
684
|
+
for (var e = 0, r = t.length; e < r; e++) this.acceptKey(t, e), t[e] || (t.splice(e, 1), e--, r--);
|
|
685
|
+
}, accept: function(t) {
|
|
686
|
+
if (t) {
|
|
687
|
+
if (!this[t.type]) throw new St("Unknown type: " + t.type, t);
|
|
688
|
+
this.current && this.parents.unshift(this.current), this.current = t;
|
|
689
|
+
var e = this[t.type](t);
|
|
690
|
+
if (this.current = this.parents.shift(), !this.mutating || e) return e;
|
|
691
|
+
if (e !== !1) return t;
|
|
692
|
+
}
|
|
693
|
+
}, Program: function(t) {
|
|
694
|
+
this.acceptArray(t.body);
|
|
695
|
+
}, MustacheStatement: Jt, Decorator: Jt, BlockStatement: ur, DecoratorBlock: ur, PartialStatement: ir, PartialBlockStatement: function(t) {
|
|
696
|
+
ir.call(this, t), this.acceptKey(t, "program");
|
|
697
|
+
}, ContentStatement: function() {
|
|
698
|
+
}, CommentStatement: function() {
|
|
699
|
+
}, SubExpression: Jt, PathExpression: function() {
|
|
700
|
+
}, StringLiteral: function() {
|
|
701
|
+
}, NumberLiteral: function() {
|
|
702
|
+
}, BooleanLiteral: function() {
|
|
703
|
+
}, UndefinedLiteral: function() {
|
|
704
|
+
}, NullLiteral: function() {
|
|
705
|
+
}, Hash: function(t) {
|
|
706
|
+
this.acceptArray(t.pairs);
|
|
707
|
+
}, HashPair: function(t) {
|
|
708
|
+
this.acceptRequired(t, "value");
|
|
709
|
+
} };
|
|
710
|
+
function Jt(t) {
|
|
711
|
+
this.acceptRequired(t, "path"), this.acceptArray(t.params), this.acceptKey(t, "hash");
|
|
712
|
+
}
|
|
713
|
+
function ur(t) {
|
|
714
|
+
Jt.call(this, t), this.acceptKey(t, "program"), this.acceptKey(t, "inverse");
|
|
715
|
+
}
|
|
716
|
+
function ir(t) {
|
|
717
|
+
this.acceptRequired(t, "name"), this.acceptArray(t.params), this.acceptKey(t, "hash");
|
|
718
|
+
}
|
|
719
|
+
var na = Kt;
|
|
720
|
+
function Q(t) {
|
|
721
|
+
t === void 0 && (t = {}), this.options = t;
|
|
722
|
+
}
|
|
723
|
+
Q.prototype = new na();
|
|
724
|
+
Q.prototype.Program = function(t) {
|
|
725
|
+
var e = !this.options.ignoreStandalone, r = !this.isRootSeen;
|
|
726
|
+
this.isRootSeen = !0;
|
|
727
|
+
for (var n = t.body, a = 0, s = n.length; a < s; a++) {
|
|
728
|
+
var u = n[a], i = this.accept(u);
|
|
729
|
+
if (i) {
|
|
730
|
+
var l = Be(n, a, r), h = ke(n, a, r), f = i.openStandalone && l, m = i.closeStandalone && h, A = i.inlineStandalone && l && h;
|
|
731
|
+
i.close && pt(n, a, !0), i.open && at(n, a, !0), e && A && (pt(n, a), at(n, a) && u.type === "PartialStatement" && (u.indent = /([ \t]+$)/.exec(n[a - 1].original)[1])), e && f && (pt((u.program || u.inverse).body), at(n, a)), e && m && (pt(n, a), at((u.inverse || u.program).body));
|
|
732
|
+
}
|
|
733
|
+
}
|
|
734
|
+
return t;
|
|
735
|
+
};
|
|
736
|
+
Q.prototype.BlockStatement = Q.prototype.DecoratorBlock = Q.prototype.PartialBlockStatement = function(t) {
|
|
737
|
+
this.accept(t.program), this.accept(t.inverse);
|
|
738
|
+
var e = t.program || t.inverse, r = t.program && t.inverse, n = r, a = r;
|
|
739
|
+
if (r && r.chained) for (n = r.body[0].program; a.chained; ) a = a.body[a.body.length - 1].program;
|
|
740
|
+
var s = { open: t.openStrip.open, close: t.closeStrip.close, openStandalone: ke(e.body), closeStandalone: Be((n || e).body) };
|
|
741
|
+
if (t.openStrip.close && pt(e.body, null, !0), r) {
|
|
742
|
+
var u = t.inverseStrip;
|
|
743
|
+
u.open && at(e.body, null, !0), u.close && pt(n.body, null, !0), t.closeStrip.open && at(a.body, null, !0), !this.options.ignoreStandalone && Be(e.body) && ke(n.body) && (at(e.body), pt(n.body));
|
|
744
|
+
} else t.closeStrip.open && at(e.body, null, !0);
|
|
745
|
+
return s;
|
|
746
|
+
};
|
|
747
|
+
Q.prototype.Decorator = Q.prototype.MustacheStatement = function(t) {
|
|
748
|
+
return t.strip;
|
|
749
|
+
};
|
|
750
|
+
Q.prototype.PartialStatement = Q.prototype.CommentStatement = function(t) {
|
|
751
|
+
var e = t.strip || {};
|
|
752
|
+
return { inlineStandalone: !0, open: e.open, close: e.close };
|
|
753
|
+
};
|
|
754
|
+
function Be(t, e, r) {
|
|
755
|
+
e === void 0 && (e = t.length);
|
|
756
|
+
var n = t[e - 1], a = t[e - 2];
|
|
757
|
+
if (!n) return r;
|
|
758
|
+
if (n.type === "ContentStatement") return (a || !r ? /\r?\n\s*?$/ : /(^|\r?\n)\s*?$/).test(n.original);
|
|
759
|
+
}
|
|
760
|
+
function ke(t, e, r) {
|
|
761
|
+
e === void 0 && (e = -1);
|
|
762
|
+
var n = t[e + 1], a = t[e + 2];
|
|
763
|
+
if (!n) return r;
|
|
764
|
+
if (n.type === "ContentStatement") return (a || !r ? /^\s*?\r?\n/ : /^\s*?(\r?\n|$)/).test(n.original);
|
|
765
|
+
}
|
|
766
|
+
function pt(t, e, r) {
|
|
767
|
+
var n = t[e == null ? 0 : e + 1];
|
|
768
|
+
if (!(!n || n.type !== "ContentStatement" || !r && n.rightStripped)) {
|
|
769
|
+
var a = n.value;
|
|
770
|
+
n.value = n.value.replace(r ? /^\s+/ : /^[ \t]*\r?\n?/, ""), n.rightStripped = n.value !== a;
|
|
771
|
+
}
|
|
772
|
+
}
|
|
773
|
+
function at(t, e, r) {
|
|
774
|
+
var n = t[e == null ? t.length - 1 : e - 1];
|
|
775
|
+
if (!(!n || n.type !== "ContentStatement" || !r && n.leftStripped)) {
|
|
776
|
+
var a = n.value;
|
|
777
|
+
return n.value = n.value.replace(r ? /\s+$/ : /[ \t]+$/, ""), n.leftStripped = n.value !== a, n.leftStripped;
|
|
778
|
+
}
|
|
779
|
+
}
|
|
780
|
+
var aa = Q, Qt = {};
|
|
781
|
+
qe(Qt, { SourceLocation: () => jr, id: () => ua, prepareBlock: () => pa, prepareMustache: () => ca, preparePartialBlock: () => fa, preparePath: () => la, prepareProgram: () => da, prepareRawBlock: () => ha, stripComment: () => oa, stripFlags: () => ia });
|
|
782
|
+
var sa = function(t, e, r) {
|
|
783
|
+
for (var n = 0, a = e.length, s; n < a; n++) (s || !(n in e)) && (s || (s = Array.prototype.slice.call(e, 0, n)), s[n] = e[n]);
|
|
784
|
+
return t.concat(s || Array.prototype.slice.call(e));
|
|
785
|
+
};
|
|
786
|
+
function He(t, e) {
|
|
787
|
+
if (e = e.path ? e.path.original : e, t.path.original !== e) {
|
|
788
|
+
var r = { loc: t.path.loc };
|
|
789
|
+
throw new St(t.path.original + " doesn't match " + e, r);
|
|
790
|
+
}
|
|
791
|
+
}
|
|
792
|
+
function jr(t, e) {
|
|
793
|
+
this.source = t, this.start = { line: e.first_line, column: e.first_column }, this.end = { line: e.last_line, column: e.last_column };
|
|
794
|
+
}
|
|
795
|
+
function ua(t) {
|
|
796
|
+
return /^\[.*\]$/.test(t) ? t.substring(1, t.length - 1) : t;
|
|
797
|
+
}
|
|
798
|
+
function ia(t, e) {
|
|
799
|
+
return { open: t.charAt(2) === "~", close: e.charAt(e.length - 3) === "~" };
|
|
800
|
+
}
|
|
801
|
+
function oa(t) {
|
|
802
|
+
return t.replace(/^\{\{~?!-?-?/, "").replace(/-?-?~?\}\}$/, "");
|
|
803
|
+
}
|
|
804
|
+
function la(t, e, r, n) {
|
|
805
|
+
n = this.locInfo(n);
|
|
806
|
+
var a;
|
|
807
|
+
t ? a = "@" : e ? a = e.original + "." : a = "";
|
|
808
|
+
for (var s = [], u = 0, i = 0, l = r.length; i < l; i++) {
|
|
809
|
+
var h = r[i].part, f = r[i].original !== h, m = r[i].separator, A = m === ".#" ? "#" : "";
|
|
810
|
+
if (a += (m || "") + h, !f && (h === ".." || h === "." || h === "this")) {
|
|
811
|
+
if (s.length > 0) throw new St("Invalid path: " + a, { loc: n });
|
|
812
|
+
h === ".." && u++;
|
|
813
|
+
} else s.push("".concat(A).concat(h));
|
|
814
|
+
}
|
|
815
|
+
var d = e || s.shift();
|
|
816
|
+
return { type: "PathExpression", this: a.startsWith("this."), data: t, depth: u, head: d, tail: s, parts: d ? sa([d], s) : s, original: a, loc: n };
|
|
817
|
+
}
|
|
818
|
+
function ca(t, e, r, n, a, s) {
|
|
819
|
+
var u = n.charAt(3) || n.charAt(2), i = u !== "{" && u !== "&", l = /\*/.test(n);
|
|
820
|
+
return { type: l ? "Decorator" : "MustacheStatement", path: t, params: e, hash: r, escaped: i, strip: a, loc: this.locInfo(s) };
|
|
821
|
+
}
|
|
822
|
+
function ha(t, e, r, n) {
|
|
823
|
+
He(t, r), n = this.locInfo(n);
|
|
824
|
+
var a = { type: "Program", body: e, strip: {}, loc: n };
|
|
825
|
+
return { type: "BlockStatement", path: t.path, params: t.params, hash: t.hash, program: a, openStrip: {}, inverseStrip: {}, closeStrip: {}, loc: n };
|
|
826
|
+
}
|
|
827
|
+
function pa(t, e, r, n, a, s) {
|
|
828
|
+
n && n.path && He(t, n);
|
|
829
|
+
var u = /\*/.test(t.open);
|
|
830
|
+
e.blockParams = t.blockParams;
|
|
831
|
+
var i, l;
|
|
832
|
+
if (r) {
|
|
833
|
+
if (u) throw new St("Unexpected inverse block on decorator", r);
|
|
834
|
+
r.chain && (r.program.body[0].closeStrip = n.strip), l = r.strip, i = r.program;
|
|
835
|
+
}
|
|
836
|
+
return a && (a = i, i = e, e = a), { type: u ? "DecoratorBlock" : "BlockStatement", path: t.path, params: t.params, hash: t.hash, program: e, inverse: i, openStrip: t.strip, inverseStrip: l, closeStrip: n && n.strip, loc: this.locInfo(s) };
|
|
837
|
+
}
|
|
838
|
+
function da(t, e) {
|
|
839
|
+
if (!e && t.length) {
|
|
840
|
+
var r = t[0].loc, n = t[t.length - 1].loc;
|
|
841
|
+
r && n && (e = { source: r.source, start: { line: r.start.line, column: r.start.column }, end: { line: n.end.line, column: n.end.column } });
|
|
842
|
+
}
|
|
843
|
+
return { type: "Program", body: t, strip: {}, loc: e };
|
|
844
|
+
}
|
|
845
|
+
function fa(t, e, r, n) {
|
|
846
|
+
return He(t, r), { type: "PartialBlockStatement", name: t.path, params: t.params, hash: t.hash, program: e, openStrip: t.strip, closeStrip: r && r.strip, loc: this.locInfo(n) };
|
|
847
|
+
}
|
|
848
|
+
var Gr = {};
|
|
849
|
+
for (Gt in Qt) Object.prototype.hasOwnProperty.call(Qt, Gt) && (Gr[Gt] = Qt[Gt]);
|
|
850
|
+
var Gt;
|
|
851
|
+
function xe(t, e) {
|
|
852
|
+
var r, n, a;
|
|
853
|
+
if (t.type === "Program") return t;
|
|
854
|
+
jt.yy = Gr, jt.yy.locInfo = function(i) {
|
|
855
|
+
return new jr(e && e.srcName, i);
|
|
856
|
+
};
|
|
857
|
+
var s;
|
|
858
|
+
typeof ((r = e == null ? void 0 : e.syntax) === null || r === void 0 ? void 0 : r.square) == "function" ? s = e.syntax.square : ((n = e == null ? void 0 : e.syntax) === null || n === void 0 ? void 0 : n.square) === "node" ? s = ma : s = "string";
|
|
859
|
+
var u;
|
|
860
|
+
return typeof ((a = e == null ? void 0 : e.syntax) === null || a === void 0 ? void 0 : a.hash) == "function" ? u = e.syntax.hash : u = ga, jt.yy.syntax = { square: s, hash: u }, jt.parse(t);
|
|
861
|
+
}
|
|
862
|
+
function ma(t, e) {
|
|
863
|
+
return { type: "ArrayLiteral", items: t, loc: e };
|
|
864
|
+
}
|
|
865
|
+
function ga(t, e) {
|
|
866
|
+
return { type: "HashLiteral", pairs: t.pairs, loc: e };
|
|
867
|
+
}
|
|
868
|
+
function or(t, e) {
|
|
869
|
+
var r = xe(t, e), n = new aa(e);
|
|
870
|
+
return n.accept(r);
|
|
871
|
+
}
|
|
872
|
+
var ya = { Aacute: "Á", aacute: "á", Abreve: "Ă", abreve: "ă", ac: "∾", acd: "∿", acE: "∾̳", Acirc: "Â", acirc: "â", acute: "´", Acy: "А", acy: "а", AElig: "Æ", aelig: "æ", af: "", Afr: "𝔄", afr: "𝔞", Agrave: "À", agrave: "à", alefsym: "ℵ", aleph: "ℵ", Alpha: "Α", alpha: "α", Amacr: "Ā", amacr: "ā", amalg: "⨿", amp: "&", AMP: "&", andand: "⩕", And: "⩓", and: "∧", andd: "⩜", andslope: "⩘", andv: "⩚", ang: "∠", ange: "⦤", angle: "∠", angmsdaa: "⦨", angmsdab: "⦩", angmsdac: "⦪", angmsdad: "⦫", angmsdae: "⦬", angmsdaf: "⦭", angmsdag: "⦮", angmsdah: "⦯", angmsd: "∡", angrt: "∟", angrtvb: "⊾", angrtvbd: "⦝", angsph: "∢", angst: "Å", angzarr: "⍼", Aogon: "Ą", aogon: "ą", Aopf: "𝔸", aopf: "𝕒", apacir: "⩯", ap: "≈", apE: "⩰", ape: "≊", apid: "≋", apos: "'", ApplyFunction: "", approx: "≈", approxeq: "≊", Aring: "Å", aring: "å", Ascr: "𝒜", ascr: "𝒶", Assign: "≔", ast: "*", asymp: "≈", asympeq: "≍", Atilde: "Ã", atilde: "ã", Auml: "Ä", auml: "ä", awconint: "∳", awint: "⨑", backcong: "≌", backepsilon: "϶", backprime: "‵", backsim: "∽", backsimeq: "⋍", Backslash: "∖", Barv: "⫧", barvee: "⊽", barwed: "⌅", Barwed: "⌆", barwedge: "⌅", bbrk: "⎵", bbrktbrk: "⎶", bcong: "≌", Bcy: "Б", bcy: "б", bdquo: "„", becaus: "∵", because: "∵", Because: "∵", bemptyv: "⦰", bepsi: "϶", bernou: "ℬ", Bernoullis: "ℬ", Beta: "Β", beta: "β", beth: "ℶ", between: "≬", Bfr: "𝔅", bfr: "𝔟", bigcap: "⋂", bigcirc: "◯", bigcup: "⋃", bigodot: "⨀", bigoplus: "⨁", bigotimes: "⨂", bigsqcup: "⨆", bigstar: "★", bigtriangledown: "▽", bigtriangleup: "△", biguplus: "⨄", bigvee: "⋁", bigwedge: "⋀", bkarow: "⤍", blacklozenge: "⧫", blacksquare: "▪", blacktriangle: "▴", blacktriangledown: "▾", blacktriangleleft: "◂", blacktriangleright: "▸", blank: "␣", blk12: "▒", blk14: "░", blk34: "▓", block: "█", bne: "=⃥", bnequiv: "≡⃥", bNot: "⫭", bnot: "⌐", Bopf: "𝔹", bopf: "𝕓", bot: "⊥", bottom: "⊥", bowtie: "⋈", boxbox: "⧉", boxdl: "┐", boxdL: "╕", boxDl: "╖", boxDL: "╗", boxdr: "┌", boxdR: "╒", boxDr: "╓", boxDR: "╔", boxh: "─", boxH: "═", boxhd: "┬", boxHd: "╤", boxhD: "╥", boxHD: "╦", boxhu: "┴", boxHu: "╧", boxhU: "╨", boxHU: "╩", boxminus: "⊟", boxplus: "⊞", boxtimes: "⊠", boxul: "┘", boxuL: "╛", boxUl: "╜", boxUL: "╝", boxur: "└", boxuR: "╘", boxUr: "╙", boxUR: "╚", boxv: "│", boxV: "║", boxvh: "┼", boxvH: "╪", boxVh: "╫", boxVH: "╬", boxvl: "┤", boxvL: "╡", boxVl: "╢", boxVL: "╣", boxvr: "├", boxvR: "╞", boxVr: "╟", boxVR: "╠", bprime: "‵", breve: "˘", Breve: "˘", brvbar: "¦", bscr: "𝒷", Bscr: "ℬ", bsemi: "⁏", bsim: "∽", bsime: "⋍", bsolb: "⧅", bsol: "\\", bsolhsub: "⟈", bull: "•", bullet: "•", bump: "≎", bumpE: "⪮", bumpe: "≏", Bumpeq: "≎", bumpeq: "≏", Cacute: "Ć", cacute: "ć", capand: "⩄", capbrcup: "⩉", capcap: "⩋", cap: "∩", Cap: "⋒", capcup: "⩇", capdot: "⩀", CapitalDifferentialD: "ⅅ", caps: "∩︀", caret: "⁁", caron: "ˇ", Cayleys: "ℭ", ccaps: "⩍", Ccaron: "Č", ccaron: "č", Ccedil: "Ç", ccedil: "ç", Ccirc: "Ĉ", ccirc: "ĉ", Cconint: "∰", ccups: "⩌", ccupssm: "⩐", Cdot: "Ċ", cdot: "ċ", cedil: "¸", Cedilla: "¸", cemptyv: "⦲", cent: "¢", centerdot: "·", CenterDot: "·", cfr: "𝔠", Cfr: "ℭ", CHcy: "Ч", chcy: "ч", check: "✓", checkmark: "✓", Chi: "Χ", chi: "χ", circ: "ˆ", circeq: "≗", circlearrowleft: "↺", circlearrowright: "↻", circledast: "⊛", circledcirc: "⊚", circleddash: "⊝", CircleDot: "⊙", circledR: "®", circledS: "Ⓢ", CircleMinus: "⊖", CirclePlus: "⊕", CircleTimes: "⊗", cir: "○", cirE: "⧃", cire: "≗", cirfnint: "⨐", cirmid: "⫯", cirscir: "⧂", ClockwiseContourIntegral: "∲", CloseCurlyDoubleQuote: "”", CloseCurlyQuote: "’", clubs: "♣", clubsuit: "♣", colon: ":", Colon: "∷", Colone: "⩴", colone: "≔", coloneq: "≔", comma: ",", commat: "@", comp: "∁", compfn: "∘", complement: "∁", complexes: "ℂ", cong: "≅", congdot: "⩭", Congruent: "≡", conint: "∮", Conint: "∯", ContourIntegral: "∮", copf: "𝕔", Copf: "ℂ", coprod: "∐", Coproduct: "∐", copy: "©", COPY: "©", copysr: "℗", CounterClockwiseContourIntegral: "∳", crarr: "↵", cross: "✗", Cross: "⨯", Cscr: "𝒞", cscr: "𝒸", csub: "⫏", csube: "⫑", csup: "⫐", csupe: "⫒", ctdot: "⋯", cudarrl: "⤸", cudarrr: "⤵", cuepr: "⋞", cuesc: "⋟", cularr: "↶", cularrp: "⤽", cupbrcap: "⩈", cupcap: "⩆", CupCap: "≍", cup: "∪", Cup: "⋓", cupcup: "⩊", cupdot: "⊍", cupor: "⩅", cups: "∪︀", curarr: "↷", curarrm: "⤼", curlyeqprec: "⋞", curlyeqsucc: "⋟", curlyvee: "⋎", curlywedge: "⋏", curren: "¤", curvearrowleft: "↶", curvearrowright: "↷", cuvee: "⋎", cuwed: "⋏", cwconint: "∲", cwint: "∱", cylcty: "⌭", dagger: "†", Dagger: "‡", daleth: "ℸ", darr: "↓", Darr: "↡", dArr: "⇓", dash: "‐", Dashv: "⫤", dashv: "⊣", dbkarow: "⤏", dblac: "˝", Dcaron: "Ď", dcaron: "ď", Dcy: "Д", dcy: "д", ddagger: "‡", ddarr: "⇊", DD: "ⅅ", dd: "ⅆ", DDotrahd: "⤑", ddotseq: "⩷", deg: "°", Del: "∇", Delta: "Δ", delta: "δ", demptyv: "⦱", dfisht: "⥿", Dfr: "𝔇", dfr: "𝔡", dHar: "⥥", dharl: "⇃", dharr: "⇂", DiacriticalAcute: "´", DiacriticalDot: "˙", DiacriticalDoubleAcute: "˝", DiacriticalGrave: "`", DiacriticalTilde: "˜", diam: "⋄", diamond: "⋄", Diamond: "⋄", diamondsuit: "♦", diams: "♦", die: "¨", DifferentialD: "ⅆ", digamma: "ϝ", disin: "⋲", div: "÷", divide: "÷", divideontimes: "⋇", divonx: "⋇", DJcy: "Ђ", djcy: "ђ", dlcorn: "⌞", dlcrop: "⌍", dollar: "$", Dopf: "𝔻", dopf: "𝕕", Dot: "¨", dot: "˙", DotDot: "⃜", doteq: "≐", doteqdot: "≑", DotEqual: "≐", dotminus: "∸", dotplus: "∔", dotsquare: "⊡", doublebarwedge: "⌆", DoubleContourIntegral: "∯", DoubleDot: "¨", DoubleDownArrow: "⇓", DoubleLeftArrow: "⇐", DoubleLeftRightArrow: "⇔", DoubleLeftTee: "⫤", DoubleLongLeftArrow: "⟸", DoubleLongLeftRightArrow: "⟺", DoubleLongRightArrow: "⟹", DoubleRightArrow: "⇒", DoubleRightTee: "⊨", DoubleUpArrow: "⇑", DoubleUpDownArrow: "⇕", DoubleVerticalBar: "∥", DownArrowBar: "⤓", downarrow: "↓", DownArrow: "↓", Downarrow: "⇓", DownArrowUpArrow: "⇵", DownBreve: "̑", downdownarrows: "⇊", downharpoonleft: "⇃", downharpoonright: "⇂", DownLeftRightVector: "⥐", DownLeftTeeVector: "⥞", DownLeftVectorBar: "⥖", DownLeftVector: "↽", DownRightTeeVector: "⥟", DownRightVectorBar: "⥗", DownRightVector: "⇁", DownTeeArrow: "↧", DownTee: "⊤", drbkarow: "⤐", drcorn: "⌟", drcrop: "⌌", Dscr: "𝒟", dscr: "𝒹", DScy: "Ѕ", dscy: "ѕ", dsol: "⧶", Dstrok: "Đ", dstrok: "đ", dtdot: "⋱", dtri: "▿", dtrif: "▾", duarr: "⇵", duhar: "⥯", dwangle: "⦦", DZcy: "Џ", dzcy: "џ", dzigrarr: "⟿", Eacute: "É", eacute: "é", easter: "⩮", Ecaron: "Ě", ecaron: "ě", Ecirc: "Ê", ecirc: "ê", ecir: "≖", ecolon: "≕", Ecy: "Э", ecy: "э", eDDot: "⩷", Edot: "Ė", edot: "ė", eDot: "≑", ee: "ⅇ", efDot: "≒", Efr: "𝔈", efr: "𝔢", eg: "⪚", Egrave: "È", egrave: "è", egs: "⪖", egsdot: "⪘", el: "⪙", Element: "∈", elinters: "⏧", ell: "ℓ", els: "⪕", elsdot: "⪗", Emacr: "Ē", emacr: "ē", empty: "∅", emptyset: "∅", EmptySmallSquare: "◻", emptyv: "∅", EmptyVerySmallSquare: "▫", emsp13: " ", emsp14: " ", emsp: " ", ENG: "Ŋ", eng: "ŋ", ensp: " ", Eogon: "Ę", eogon: "ę", Eopf: "𝔼", eopf: "𝕖", epar: "⋕", eparsl: "⧣", eplus: "⩱", epsi: "ε", Epsilon: "Ε", epsilon: "ε", epsiv: "ϵ", eqcirc: "≖", eqcolon: "≕", eqsim: "≂", eqslantgtr: "⪖", eqslantless: "⪕", Equal: "⩵", equals: "=", EqualTilde: "≂", equest: "≟", Equilibrium: "⇌", equiv: "≡", equivDD: "⩸", eqvparsl: "⧥", erarr: "⥱", erDot: "≓", escr: "ℯ", Escr: "ℰ", esdot: "≐", Esim: "⩳", esim: "≂", Eta: "Η", eta: "η", ETH: "Ð", eth: "ð", Euml: "Ë", euml: "ë", euro: "€", excl: "!", exist: "∃", Exists: "∃", expectation: "ℰ", exponentiale: "ⅇ", ExponentialE: "ⅇ", fallingdotseq: "≒", Fcy: "Ф", fcy: "ф", female: "♀", ffilig: "ffi", fflig: "ff", ffllig: "ffl", Ffr: "𝔉", ffr: "𝔣", filig: "fi", FilledSmallSquare: "◼", FilledVerySmallSquare: "▪", fjlig: "fj", flat: "♭", fllig: "fl", fltns: "▱", fnof: "ƒ", Fopf: "𝔽", fopf: "𝕗", forall: "∀", ForAll: "∀", fork: "⋔", forkv: "⫙", Fouriertrf: "ℱ", fpartint: "⨍", frac12: "½", frac13: "⅓", frac14: "¼", frac15: "⅕", frac16: "⅙", frac18: "⅛", frac23: "⅔", frac25: "⅖", frac34: "¾", frac35: "⅗", frac38: "⅜", frac45: "⅘", frac56: "⅚", frac58: "⅝", frac78: "⅞", frasl: "⁄", frown: "⌢", fscr: "𝒻", Fscr: "ℱ", gacute: "ǵ", Gamma: "Γ", gamma: "γ", Gammad: "Ϝ", gammad: "ϝ", gap: "⪆", Gbreve: "Ğ", gbreve: "ğ", Gcedil: "Ģ", Gcirc: "Ĝ", gcirc: "ĝ", Gcy: "Г", gcy: "г", Gdot: "Ġ", gdot: "ġ", ge: "≥", gE: "≧", gEl: "⪌", gel: "⋛", geq: "≥", geqq: "≧", geqslant: "⩾", gescc: "⪩", ges: "⩾", gesdot: "⪀", gesdoto: "⪂", gesdotol: "⪄", gesl: "⋛︀", gesles: "⪔", Gfr: "𝔊", gfr: "𝔤", gg: "≫", Gg: "⋙", ggg: "⋙", gimel: "ℷ", GJcy: "Ѓ", gjcy: "ѓ", gla: "⪥", gl: "≷", glE: "⪒", glj: "⪤", gnap: "⪊", gnapprox: "⪊", gne: "⪈", gnE: "≩", gneq: "⪈", gneqq: "≩", gnsim: "⋧", Gopf: "𝔾", gopf: "𝕘", grave: "`", GreaterEqual: "≥", GreaterEqualLess: "⋛", GreaterFullEqual: "≧", GreaterGreater: "⪢", GreaterLess: "≷", GreaterSlantEqual: "⩾", GreaterTilde: "≳", Gscr: "𝒢", gscr: "ℊ", gsim: "≳", gsime: "⪎", gsiml: "⪐", gtcc: "⪧", gtcir: "⩺", gt: ">", GT: ">", Gt: "≫", gtdot: "⋗", gtlPar: "⦕", gtquest: "⩼", gtrapprox: "⪆", gtrarr: "⥸", gtrdot: "⋗", gtreqless: "⋛", gtreqqless: "⪌", gtrless: "≷", gtrsim: "≳", gvertneqq: "≩︀", gvnE: "≩︀", Hacek: "ˇ", hairsp: " ", half: "½", hamilt: "ℋ", HARDcy: "Ъ", hardcy: "ъ", harrcir: "⥈", harr: "↔", hArr: "⇔", harrw: "↭", Hat: "^", hbar: "ℏ", Hcirc: "Ĥ", hcirc: "ĥ", hearts: "♥", heartsuit: "♥", hellip: "…", hercon: "⊹", hfr: "𝔥", Hfr: "ℌ", HilbertSpace: "ℋ", hksearow: "⤥", hkswarow: "⤦", hoarr: "⇿", homtht: "∻", hookleftarrow: "↩", hookrightarrow: "↪", hopf: "𝕙", Hopf: "ℍ", horbar: "―", HorizontalLine: "─", hscr: "𝒽", Hscr: "ℋ", hslash: "ℏ", Hstrok: "Ħ", hstrok: "ħ", HumpDownHump: "≎", HumpEqual: "≏", hybull: "⁃", hyphen: "‐", Iacute: "Í", iacute: "í", ic: "", Icirc: "Î", icirc: "î", Icy: "И", icy: "и", Idot: "İ", IEcy: "Е", iecy: "е", iexcl: "¡", iff: "⇔", ifr: "𝔦", Ifr: "ℑ", Igrave: "Ì", igrave: "ì", ii: "ⅈ", iiiint: "⨌", iiint: "∭", iinfin: "⧜", iiota: "℩", IJlig: "IJ", ijlig: "ij", Imacr: "Ī", imacr: "ī", image: "ℑ", ImaginaryI: "ⅈ", imagline: "ℐ", imagpart: "ℑ", imath: "ı", Im: "ℑ", imof: "⊷", imped: "Ƶ", Implies: "⇒", incare: "℅", in: "∈", infin: "∞", infintie: "⧝", inodot: "ı", intcal: "⊺", int: "∫", Int: "∬", integers: "ℤ", Integral: "∫", intercal: "⊺", Intersection: "⋂", intlarhk: "⨗", intprod: "⨼", InvisibleComma: "", InvisibleTimes: "", IOcy: "Ё", iocy: "ё", Iogon: "Į", iogon: "į", Iopf: "𝕀", iopf: "𝕚", Iota: "Ι", iota: "ι", iprod: "⨼", iquest: "¿", iscr: "𝒾", Iscr: "ℐ", isin: "∈", isindot: "⋵", isinE: "⋹", isins: "⋴", isinsv: "⋳", isinv: "∈", it: "", Itilde: "Ĩ", itilde: "ĩ", Iukcy: "І", iukcy: "і", Iuml: "Ï", iuml: "ï", Jcirc: "Ĵ", jcirc: "ĵ", Jcy: "Й", jcy: "й", Jfr: "𝔍", jfr: "𝔧", jmath: "ȷ", Jopf: "𝕁", jopf: "𝕛", Jscr: "𝒥", jscr: "𝒿", Jsercy: "Ј", jsercy: "ј", Jukcy: "Є", jukcy: "є", Kappa: "Κ", kappa: "κ", kappav: "ϰ", Kcedil: "Ķ", kcedil: "ķ", Kcy: "К", kcy: "к", Kfr: "𝔎", kfr: "𝔨", kgreen: "ĸ", KHcy: "Х", khcy: "х", KJcy: "Ќ", kjcy: "ќ", Kopf: "𝕂", kopf: "𝕜", Kscr: "𝒦", kscr: "𝓀", lAarr: "⇚", Lacute: "Ĺ", lacute: "ĺ", laemptyv: "⦴", lagran: "ℒ", Lambda: "Λ", lambda: "λ", lang: "⟨", Lang: "⟪", langd: "⦑", langle: "⟨", lap: "⪅", Laplacetrf: "ℒ", laquo: "«", larrb: "⇤", larrbfs: "⤟", larr: "←", Larr: "↞", lArr: "⇐", larrfs: "⤝", larrhk: "↩", larrlp: "↫", larrpl: "⤹", larrsim: "⥳", larrtl: "↢", latail: "⤙", lAtail: "⤛", lat: "⪫", late: "⪭", lates: "⪭︀", lbarr: "⤌", lBarr: "⤎", lbbrk: "❲", lbrace: "{", lbrack: "[", lbrke: "⦋", lbrksld: "⦏", lbrkslu: "⦍", Lcaron: "Ľ", lcaron: "ľ", Lcedil: "Ļ", lcedil: "ļ", lceil: "⌈", lcub: "{", Lcy: "Л", lcy: "л", ldca: "⤶", ldquo: "“", ldquor: "„", ldrdhar: "⥧", ldrushar: "⥋", ldsh: "↲", le: "≤", lE: "≦", LeftAngleBracket: "⟨", LeftArrowBar: "⇤", leftarrow: "←", LeftArrow: "←", Leftarrow: "⇐", LeftArrowRightArrow: "⇆", leftarrowtail: "↢", LeftCeiling: "⌈", LeftDoubleBracket: "⟦", LeftDownTeeVector: "⥡", LeftDownVectorBar: "⥙", LeftDownVector: "⇃", LeftFloor: "⌊", leftharpoondown: "↽", leftharpoonup: "↼", leftleftarrows: "⇇", leftrightarrow: "↔", LeftRightArrow: "↔", Leftrightarrow: "⇔", leftrightarrows: "⇆", leftrightharpoons: "⇋", leftrightsquigarrow: "↭", LeftRightVector: "⥎", LeftTeeArrow: "↤", LeftTee: "⊣", LeftTeeVector: "⥚", leftthreetimes: "⋋", LeftTriangleBar: "⧏", LeftTriangle: "⊲", LeftTriangleEqual: "⊴", LeftUpDownVector: "⥑", LeftUpTeeVector: "⥠", LeftUpVectorBar: "⥘", LeftUpVector: "↿", LeftVectorBar: "⥒", LeftVector: "↼", lEg: "⪋", leg: "⋚", leq: "≤", leqq: "≦", leqslant: "⩽", lescc: "⪨", les: "⩽", lesdot: "⩿", lesdoto: "⪁", lesdotor: "⪃", lesg: "⋚︀", lesges: "⪓", lessapprox: "⪅", lessdot: "⋖", lesseqgtr: "⋚", lesseqqgtr: "⪋", LessEqualGreater: "⋚", LessFullEqual: "≦", LessGreater: "≶", lessgtr: "≶", LessLess: "⪡", lesssim: "≲", LessSlantEqual: "⩽", LessTilde: "≲", lfisht: "⥼", lfloor: "⌊", Lfr: "𝔏", lfr: "𝔩", lg: "≶", lgE: "⪑", lHar: "⥢", lhard: "↽", lharu: "↼", lharul: "⥪", lhblk: "▄", LJcy: "Љ", ljcy: "љ", llarr: "⇇", ll: "≪", Ll: "⋘", llcorner: "⌞", Lleftarrow: "⇚", llhard: "⥫", lltri: "◺", Lmidot: "Ŀ", lmidot: "ŀ", lmoustache: "⎰", lmoust: "⎰", lnap: "⪉", lnapprox: "⪉", lne: "⪇", lnE: "≨", lneq: "⪇", lneqq: "≨", lnsim: "⋦", loang: "⟬", loarr: "⇽", lobrk: "⟦", longleftarrow: "⟵", LongLeftArrow: "⟵", Longleftarrow: "⟸", longleftrightarrow: "⟷", LongLeftRightArrow: "⟷", Longleftrightarrow: "⟺", longmapsto: "⟼", longrightarrow: "⟶", LongRightArrow: "⟶", Longrightarrow: "⟹", looparrowleft: "↫", looparrowright: "↬", lopar: "⦅", Lopf: "𝕃", lopf: "𝕝", loplus: "⨭", lotimes: "⨴", lowast: "∗", lowbar: "_", LowerLeftArrow: "↙", LowerRightArrow: "↘", loz: "◊", lozenge: "◊", lozf: "⧫", lpar: "(", lparlt: "⦓", lrarr: "⇆", lrcorner: "⌟", lrhar: "⇋", lrhard: "⥭", lrm: "", lrtri: "⊿", lsaquo: "‹", lscr: "𝓁", Lscr: "ℒ", lsh: "↰", Lsh: "↰", lsim: "≲", lsime: "⪍", lsimg: "⪏", lsqb: "[", lsquo: "‘", lsquor: "‚", Lstrok: "Ł", lstrok: "ł", ltcc: "⪦", ltcir: "⩹", lt: "<", LT: "<", Lt: "≪", ltdot: "⋖", lthree: "⋋", ltimes: "⋉", ltlarr: "⥶", ltquest: "⩻", ltri: "◃", ltrie: "⊴", ltrif: "◂", ltrPar: "⦖", lurdshar: "⥊", luruhar: "⥦", lvertneqq: "≨︀", lvnE: "≨︀", macr: "¯", male: "♂", malt: "✠", maltese: "✠", Map: "⤅", map: "↦", mapsto: "↦", mapstodown: "↧", mapstoleft: "↤", mapstoup: "↥", marker: "▮", mcomma: "⨩", Mcy: "М", mcy: "м", mdash: "—", mDDot: "∺", measuredangle: "∡", MediumSpace: " ", Mellintrf: "ℳ", Mfr: "𝔐", mfr: "𝔪", mho: "℧", micro: "µ", midast: "*", midcir: "⫰", mid: "∣", middot: "·", minusb: "⊟", minus: "−", minusd: "∸", minusdu: "⨪", MinusPlus: "∓", mlcp: "⫛", mldr: "…", mnplus: "∓", models: "⊧", Mopf: "𝕄", mopf: "𝕞", mp: "∓", mscr: "𝓂", Mscr: "ℳ", mstpos: "∾", Mu: "Μ", mu: "μ", multimap: "⊸", mumap: "⊸", nabla: "∇", Nacute: "Ń", nacute: "ń", nang: "∠⃒", nap: "≉", napE: "⩰̸", napid: "≋̸", napos: "ʼn", napprox: "≉", natural: "♮", naturals: "ℕ", natur: "♮", nbsp: " ", nbump: "≎̸", nbumpe: "≏̸", ncap: "⩃", Ncaron: "Ň", ncaron: "ň", Ncedil: "Ņ", ncedil: "ņ", ncong: "≇", ncongdot: "⩭̸", ncup: "⩂", Ncy: "Н", ncy: "н", ndash: "–", nearhk: "⤤", nearr: "↗", neArr: "⇗", nearrow: "↗", ne: "≠", nedot: "≐̸", NegativeMediumSpace: "", NegativeThickSpace: "", NegativeThinSpace: "", NegativeVeryThinSpace: "", nequiv: "≢", nesear: "⤨", nesim: "≂̸", NestedGreaterGreater: "≫", NestedLessLess: "≪", NewLine: `
|
|
873
|
+
`, nexist: "∄", nexists: "∄", Nfr: "𝔑", nfr: "𝔫", ngE: "≧̸", nge: "≱", ngeq: "≱", ngeqq: "≧̸", ngeqslant: "⩾̸", nges: "⩾̸", nGg: "⋙̸", ngsim: "≵", nGt: "≫⃒", ngt: "≯", ngtr: "≯", nGtv: "≫̸", nharr: "↮", nhArr: "⇎", nhpar: "⫲", ni: "∋", nis: "⋼", nisd: "⋺", niv: "∋", NJcy: "Њ", njcy: "њ", nlarr: "↚", nlArr: "⇍", nldr: "‥", nlE: "≦̸", nle: "≰", nleftarrow: "↚", nLeftarrow: "⇍", nleftrightarrow: "↮", nLeftrightarrow: "⇎", nleq: "≰", nleqq: "≦̸", nleqslant: "⩽̸", nles: "⩽̸", nless: "≮", nLl: "⋘̸", nlsim: "≴", nLt: "≪⃒", nlt: "≮", nltri: "⋪", nltrie: "⋬", nLtv: "≪̸", nmid: "∤", NoBreak: "", NonBreakingSpace: " ", nopf: "𝕟", Nopf: "ℕ", Not: "⫬", not: "¬", NotCongruent: "≢", NotCupCap: "≭", NotDoubleVerticalBar: "∦", NotElement: "∉", NotEqual: "≠", NotEqualTilde: "≂̸", NotExists: "∄", NotGreater: "≯", NotGreaterEqual: "≱", NotGreaterFullEqual: "≧̸", NotGreaterGreater: "≫̸", NotGreaterLess: "≹", NotGreaterSlantEqual: "⩾̸", NotGreaterTilde: "≵", NotHumpDownHump: "≎̸", NotHumpEqual: "≏̸", notin: "∉", notindot: "⋵̸", notinE: "⋹̸", notinva: "∉", notinvb: "⋷", notinvc: "⋶", NotLeftTriangleBar: "⧏̸", NotLeftTriangle: "⋪", NotLeftTriangleEqual: "⋬", NotLess: "≮", NotLessEqual: "≰", NotLessGreater: "≸", NotLessLess: "≪̸", NotLessSlantEqual: "⩽̸", NotLessTilde: "≴", NotNestedGreaterGreater: "⪢̸", NotNestedLessLess: "⪡̸", notni: "∌", notniva: "∌", notnivb: "⋾", notnivc: "⋽", NotPrecedes: "⊀", NotPrecedesEqual: "⪯̸", NotPrecedesSlantEqual: "⋠", NotReverseElement: "∌", NotRightTriangleBar: "⧐̸", NotRightTriangle: "⋫", NotRightTriangleEqual: "⋭", NotSquareSubset: "⊏̸", NotSquareSubsetEqual: "⋢", NotSquareSuperset: "⊐̸", NotSquareSupersetEqual: "⋣", NotSubset: "⊂⃒", NotSubsetEqual: "⊈", NotSucceeds: "⊁", NotSucceedsEqual: "⪰̸", NotSucceedsSlantEqual: "⋡", NotSucceedsTilde: "≿̸", NotSuperset: "⊃⃒", NotSupersetEqual: "⊉", NotTilde: "≁", NotTildeEqual: "≄", NotTildeFullEqual: "≇", NotTildeTilde: "≉", NotVerticalBar: "∤", nparallel: "∦", npar: "∦", nparsl: "⫽⃥", npart: "∂̸", npolint: "⨔", npr: "⊀", nprcue: "⋠", nprec: "⊀", npreceq: "⪯̸", npre: "⪯̸", nrarrc: "⤳̸", nrarr: "↛", nrArr: "⇏", nrarrw: "↝̸", nrightarrow: "↛", nRightarrow: "⇏", nrtri: "⋫", nrtrie: "⋭", nsc: "⊁", nsccue: "⋡", nsce: "⪰̸", Nscr: "𝒩", nscr: "𝓃", nshortmid: "∤", nshortparallel: "∦", nsim: "≁", nsime: "≄", nsimeq: "≄", nsmid: "∤", nspar: "∦", nsqsube: "⋢", nsqsupe: "⋣", nsub: "⊄", nsubE: "⫅̸", nsube: "⊈", nsubset: "⊂⃒", nsubseteq: "⊈", nsubseteqq: "⫅̸", nsucc: "⊁", nsucceq: "⪰̸", nsup: "⊅", nsupE: "⫆̸", nsupe: "⊉", nsupset: "⊃⃒", nsupseteq: "⊉", nsupseteqq: "⫆̸", ntgl: "≹", Ntilde: "Ñ", ntilde: "ñ", ntlg: "≸", ntriangleleft: "⋪", ntrianglelefteq: "⋬", ntriangleright: "⋫", ntrianglerighteq: "⋭", Nu: "Ν", nu: "ν", num: "#", numero: "№", numsp: " ", nvap: "≍⃒", nvdash: "⊬", nvDash: "⊭", nVdash: "⊮", nVDash: "⊯", nvge: "≥⃒", nvgt: ">⃒", nvHarr: "⤄", nvinfin: "⧞", nvlArr: "⤂", nvle: "≤⃒", nvlt: "<⃒", nvltrie: "⊴⃒", nvrArr: "⤃", nvrtrie: "⊵⃒", nvsim: "∼⃒", nwarhk: "⤣", nwarr: "↖", nwArr: "⇖", nwarrow: "↖", nwnear: "⤧", Oacute: "Ó", oacute: "ó", oast: "⊛", Ocirc: "Ô", ocirc: "ô", ocir: "⊚", Ocy: "О", ocy: "о", odash: "⊝", Odblac: "Ő", odblac: "ő", odiv: "⨸", odot: "⊙", odsold: "⦼", OElig: "Œ", oelig: "œ", ofcir: "⦿", Ofr: "𝔒", ofr: "𝔬", ogon: "˛", Ograve: "Ò", ograve: "ò", ogt: "⧁", ohbar: "⦵", ohm: "Ω", oint: "∮", olarr: "↺", olcir: "⦾", olcross: "⦻", oline: "‾", olt: "⧀", Omacr: "Ō", omacr: "ō", Omega: "Ω", omega: "ω", Omicron: "Ο", omicron: "ο", omid: "⦶", ominus: "⊖", Oopf: "𝕆", oopf: "𝕠", opar: "⦷", OpenCurlyDoubleQuote: "“", OpenCurlyQuote: "‘", operp: "⦹", oplus: "⊕", orarr: "↻", Or: "⩔", or: "∨", ord: "⩝", order: "ℴ", orderof: "ℴ", ordf: "ª", ordm: "º", origof: "⊶", oror: "⩖", orslope: "⩗", orv: "⩛", oS: "Ⓢ", Oscr: "𝒪", oscr: "ℴ", Oslash: "Ø", oslash: "ø", osol: "⊘", Otilde: "Õ", otilde: "õ", otimesas: "⨶", Otimes: "⨷", otimes: "⊗", Ouml: "Ö", ouml: "ö", ovbar: "⌽", OverBar: "‾", OverBrace: "⏞", OverBracket: "⎴", OverParenthesis: "⏜", para: "¶", parallel: "∥", par: "∥", parsim: "⫳", parsl: "⫽", part: "∂", PartialD: "∂", Pcy: "П", pcy: "п", percnt: "%", period: ".", permil: "‰", perp: "⊥", pertenk: "‱", Pfr: "𝔓", pfr: "𝔭", Phi: "Φ", phi: "φ", phiv: "ϕ", phmmat: "ℳ", phone: "☎", Pi: "Π", pi: "π", pitchfork: "⋔", piv: "ϖ", planck: "ℏ", planckh: "ℎ", plankv: "ℏ", plusacir: "⨣", plusb: "⊞", pluscir: "⨢", plus: "+", plusdo: "∔", plusdu: "⨥", pluse: "⩲", PlusMinus: "±", plusmn: "±", plussim: "⨦", plustwo: "⨧", pm: "±", Poincareplane: "ℌ", pointint: "⨕", popf: "𝕡", Popf: "ℙ", pound: "£", prap: "⪷", Pr: "⪻", pr: "≺", prcue: "≼", precapprox: "⪷", prec: "≺", preccurlyeq: "≼", Precedes: "≺", PrecedesEqual: "⪯", PrecedesSlantEqual: "≼", PrecedesTilde: "≾", preceq: "⪯", precnapprox: "⪹", precneqq: "⪵", precnsim: "⋨", pre: "⪯", prE: "⪳", precsim: "≾", prime: "′", Prime: "″", primes: "ℙ", prnap: "⪹", prnE: "⪵", prnsim: "⋨", prod: "∏", Product: "∏", profalar: "⌮", profline: "⌒", profsurf: "⌓", prop: "∝", Proportional: "∝", Proportion: "∷", propto: "∝", prsim: "≾", prurel: "⊰", Pscr: "𝒫", pscr: "𝓅", Psi: "Ψ", psi: "ψ", puncsp: " ", Qfr: "𝔔", qfr: "𝔮", qint: "⨌", qopf: "𝕢", Qopf: "ℚ", qprime: "⁗", Qscr: "𝒬", qscr: "𝓆", quaternions: "ℍ", quatint: "⨖", quest: "?", questeq: "≟", quot: '"', QUOT: '"', rAarr: "⇛", race: "∽̱", Racute: "Ŕ", racute: "ŕ", radic: "√", raemptyv: "⦳", rang: "⟩", Rang: "⟫", rangd: "⦒", range: "⦥", rangle: "⟩", raquo: "»", rarrap: "⥵", rarrb: "⇥", rarrbfs: "⤠", rarrc: "⤳", rarr: "→", Rarr: "↠", rArr: "⇒", rarrfs: "⤞", rarrhk: "↪", rarrlp: "↬", rarrpl: "⥅", rarrsim: "⥴", Rarrtl: "⤖", rarrtl: "↣", rarrw: "↝", ratail: "⤚", rAtail: "⤜", ratio: "∶", rationals: "ℚ", rbarr: "⤍", rBarr: "⤏", RBarr: "⤐", rbbrk: "❳", rbrace: "}", rbrack: "]", rbrke: "⦌", rbrksld: "⦎", rbrkslu: "⦐", Rcaron: "Ř", rcaron: "ř", Rcedil: "Ŗ", rcedil: "ŗ", rceil: "⌉", rcub: "}", Rcy: "Р", rcy: "р", rdca: "⤷", rdldhar: "⥩", rdquo: "”", rdquor: "”", rdsh: "↳", real: "ℜ", realine: "ℛ", realpart: "ℜ", reals: "ℝ", Re: "ℜ", rect: "▭", reg: "®", REG: "®", ReverseElement: "∋", ReverseEquilibrium: "⇋", ReverseUpEquilibrium: "⥯", rfisht: "⥽", rfloor: "⌋", rfr: "𝔯", Rfr: "ℜ", rHar: "⥤", rhard: "⇁", rharu: "⇀", rharul: "⥬", Rho: "Ρ", rho: "ρ", rhov: "ϱ", RightAngleBracket: "⟩", RightArrowBar: "⇥", rightarrow: "→", RightArrow: "→", Rightarrow: "⇒", RightArrowLeftArrow: "⇄", rightarrowtail: "↣", RightCeiling: "⌉", RightDoubleBracket: "⟧", RightDownTeeVector: "⥝", RightDownVectorBar: "⥕", RightDownVector: "⇂", RightFloor: "⌋", rightharpoondown: "⇁", rightharpoonup: "⇀", rightleftarrows: "⇄", rightleftharpoons: "⇌", rightrightarrows: "⇉", rightsquigarrow: "↝", RightTeeArrow: "↦", RightTee: "⊢", RightTeeVector: "⥛", rightthreetimes: "⋌", RightTriangleBar: "⧐", RightTriangle: "⊳", RightTriangleEqual: "⊵", RightUpDownVector: "⥏", RightUpTeeVector: "⥜", RightUpVectorBar: "⥔", RightUpVector: "↾", RightVectorBar: "⥓", RightVector: "⇀", ring: "˚", risingdotseq: "≓", rlarr: "⇄", rlhar: "⇌", rlm: "", rmoustache: "⎱", rmoust: "⎱", rnmid: "⫮", roang: "⟭", roarr: "⇾", robrk: "⟧", ropar: "⦆", ropf: "𝕣", Ropf: "ℝ", roplus: "⨮", rotimes: "⨵", RoundImplies: "⥰", rpar: ")", rpargt: "⦔", rppolint: "⨒", rrarr: "⇉", Rrightarrow: "⇛", rsaquo: "›", rscr: "𝓇", Rscr: "ℛ", rsh: "↱", Rsh: "↱", rsqb: "]", rsquo: "’", rsquor: "’", rthree: "⋌", rtimes: "⋊", rtri: "▹", rtrie: "⊵", rtrif: "▸", rtriltri: "⧎", RuleDelayed: "⧴", ruluhar: "⥨", rx: "℞", Sacute: "Ś", sacute: "ś", sbquo: "‚", scap: "⪸", Scaron: "Š", scaron: "š", Sc: "⪼", sc: "≻", sccue: "≽", sce: "⪰", scE: "⪴", Scedil: "Ş", scedil: "ş", Scirc: "Ŝ", scirc: "ŝ", scnap: "⪺", scnE: "⪶", scnsim: "⋩", scpolint: "⨓", scsim: "≿", Scy: "С", scy: "с", sdotb: "⊡", sdot: "⋅", sdote: "⩦", searhk: "⤥", searr: "↘", seArr: "⇘", searrow: "↘", sect: "§", semi: ";", seswar: "⤩", setminus: "∖", setmn: "∖", sext: "✶", Sfr: "𝔖", sfr: "𝔰", sfrown: "⌢", sharp: "♯", SHCHcy: "Щ", shchcy: "щ", SHcy: "Ш", shcy: "ш", ShortDownArrow: "↓", ShortLeftArrow: "←", shortmid: "∣", shortparallel: "∥", ShortRightArrow: "→", ShortUpArrow: "↑", shy: "", Sigma: "Σ", sigma: "σ", sigmaf: "ς", sigmav: "ς", sim: "∼", simdot: "⩪", sime: "≃", simeq: "≃", simg: "⪞", simgE: "⪠", siml: "⪝", simlE: "⪟", simne: "≆", simplus: "⨤", simrarr: "⥲", slarr: "←", SmallCircle: "∘", smallsetminus: "∖", smashp: "⨳", smeparsl: "⧤", smid: "∣", smile: "⌣", smt: "⪪", smte: "⪬", smtes: "⪬︀", SOFTcy: "Ь", softcy: "ь", solbar: "⌿", solb: "⧄", sol: "/", Sopf: "𝕊", sopf: "𝕤", spades: "♠", spadesuit: "♠", spar: "∥", sqcap: "⊓", sqcaps: "⊓︀", sqcup: "⊔", sqcups: "⊔︀", Sqrt: "√", sqsub: "⊏", sqsube: "⊑", sqsubset: "⊏", sqsubseteq: "⊑", sqsup: "⊐", sqsupe: "⊒", sqsupset: "⊐", sqsupseteq: "⊒", square: "□", Square: "□", SquareIntersection: "⊓", SquareSubset: "⊏", SquareSubsetEqual: "⊑", SquareSuperset: "⊐", SquareSupersetEqual: "⊒", SquareUnion: "⊔", squarf: "▪", squ: "□", squf: "▪", srarr: "→", Sscr: "𝒮", sscr: "𝓈", ssetmn: "∖", ssmile: "⌣", sstarf: "⋆", Star: "⋆", star: "☆", starf: "★", straightepsilon: "ϵ", straightphi: "ϕ", strns: "¯", sub: "⊂", Sub: "⋐", subdot: "⪽", subE: "⫅", sube: "⊆", subedot: "⫃", submult: "⫁", subnE: "⫋", subne: "⊊", subplus: "⪿", subrarr: "⥹", subset: "⊂", Subset: "⋐", subseteq: "⊆", subseteqq: "⫅", SubsetEqual: "⊆", subsetneq: "⊊", subsetneqq: "⫋", subsim: "⫇", subsub: "⫕", subsup: "⫓", succapprox: "⪸", succ: "≻", succcurlyeq: "≽", Succeeds: "≻", SucceedsEqual: "⪰", SucceedsSlantEqual: "≽", SucceedsTilde: "≿", succeq: "⪰", succnapprox: "⪺", succneqq: "⪶", succnsim: "⋩", succsim: "≿", SuchThat: "∋", sum: "∑", Sum: "∑", sung: "♪", sup1: "¹", sup2: "²", sup3: "³", sup: "⊃", Sup: "⋑", supdot: "⪾", supdsub: "⫘", supE: "⫆", supe: "⊇", supedot: "⫄", Superset: "⊃", SupersetEqual: "⊇", suphsol: "⟉", suphsub: "⫗", suplarr: "⥻", supmult: "⫂", supnE: "⫌", supne: "⊋", supplus: "⫀", supset: "⊃", Supset: "⋑", supseteq: "⊇", supseteqq: "⫆", supsetneq: "⊋", supsetneqq: "⫌", supsim: "⫈", supsub: "⫔", supsup: "⫖", swarhk: "⤦", swarr: "↙", swArr: "⇙", swarrow: "↙", swnwar: "⤪", szlig: "ß", Tab: " ", target: "⌖", Tau: "Τ", tau: "τ", tbrk: "⎴", Tcaron: "Ť", tcaron: "ť", Tcedil: "Ţ", tcedil: "ţ", Tcy: "Т", tcy: "т", tdot: "⃛", telrec: "⌕", Tfr: "𝔗", tfr: "𝔱", there4: "∴", therefore: "∴", Therefore: "∴", Theta: "Θ", theta: "θ", thetasym: "ϑ", thetav: "ϑ", thickapprox: "≈", thicksim: "∼", ThickSpace: " ", ThinSpace: " ", thinsp: " ", thkap: "≈", thksim: "∼", THORN: "Þ", thorn: "þ", tilde: "˜", Tilde: "∼", TildeEqual: "≃", TildeFullEqual: "≅", TildeTilde: "≈", timesbar: "⨱", timesb: "⊠", times: "×", timesd: "⨰", tint: "∭", toea: "⤨", topbot: "⌶", topcir: "⫱", top: "⊤", Topf: "𝕋", topf: "𝕥", topfork: "⫚", tosa: "⤩", tprime: "‴", trade: "™", TRADE: "™", triangle: "▵", triangledown: "▿", triangleleft: "◃", trianglelefteq: "⊴", triangleq: "≜", triangleright: "▹", trianglerighteq: "⊵", tridot: "◬", trie: "≜", triminus: "⨺", TripleDot: "⃛", triplus: "⨹", trisb: "⧍", tritime: "⨻", trpezium: "⏢", Tscr: "𝒯", tscr: "𝓉", TScy: "Ц", tscy: "ц", TSHcy: "Ћ", tshcy: "ћ", Tstrok: "Ŧ", tstrok: "ŧ", twixt: "≬", twoheadleftarrow: "↞", twoheadrightarrow: "↠", Uacute: "Ú", uacute: "ú", uarr: "↑", Uarr: "↟", uArr: "⇑", Uarrocir: "⥉", Ubrcy: "Ў", ubrcy: "ў", Ubreve: "Ŭ", ubreve: "ŭ", Ucirc: "Û", ucirc: "û", Ucy: "У", ucy: "у", udarr: "⇅", Udblac: "Ű", udblac: "ű", udhar: "⥮", ufisht: "⥾", Ufr: "𝔘", ufr: "𝔲", Ugrave: "Ù", ugrave: "ù", uHar: "⥣", uharl: "↿", uharr: "↾", uhblk: "▀", ulcorn: "⌜", ulcorner: "⌜", ulcrop: "⌏", ultri: "◸", Umacr: "Ū", umacr: "ū", uml: "¨", UnderBar: "_", UnderBrace: "⏟", UnderBracket: "⎵", UnderParenthesis: "⏝", Union: "⋃", UnionPlus: "⊎", Uogon: "Ų", uogon: "ų", Uopf: "𝕌", uopf: "𝕦", UpArrowBar: "⤒", uparrow: "↑", UpArrow: "↑", Uparrow: "⇑", UpArrowDownArrow: "⇅", updownarrow: "↕", UpDownArrow: "↕", Updownarrow: "⇕", UpEquilibrium: "⥮", upharpoonleft: "↿", upharpoonright: "↾", uplus: "⊎", UpperLeftArrow: "↖", UpperRightArrow: "↗", upsi: "υ", Upsi: "ϒ", upsih: "ϒ", Upsilon: "Υ", upsilon: "υ", UpTeeArrow: "↥", UpTee: "⊥", upuparrows: "⇈", urcorn: "⌝", urcorner: "⌝", urcrop: "⌎", Uring: "Ů", uring: "ů", urtri: "◹", Uscr: "𝒰", uscr: "𝓊", utdot: "⋰", Utilde: "Ũ", utilde: "ũ", utri: "▵", utrif: "▴", uuarr: "⇈", Uuml: "Ü", uuml: "ü", uwangle: "⦧", vangrt: "⦜", varepsilon: "ϵ", varkappa: "ϰ", varnothing: "∅", varphi: "ϕ", varpi: "ϖ", varpropto: "∝", varr: "↕", vArr: "⇕", varrho: "ϱ", varsigma: "ς", varsubsetneq: "⊊︀", varsubsetneqq: "⫋︀", varsupsetneq: "⊋︀", varsupsetneqq: "⫌︀", vartheta: "ϑ", vartriangleleft: "⊲", vartriangleright: "⊳", vBar: "⫨", Vbar: "⫫", vBarv: "⫩", Vcy: "В", vcy: "в", vdash: "⊢", vDash: "⊨", Vdash: "⊩", VDash: "⊫", Vdashl: "⫦", veebar: "⊻", vee: "∨", Vee: "⋁", veeeq: "≚", vellip: "⋮", verbar: "|", Verbar: "‖", vert: "|", Vert: "‖", VerticalBar: "∣", VerticalLine: "|", VerticalSeparator: "❘", VerticalTilde: "≀", VeryThinSpace: " ", Vfr: "𝔙", vfr: "𝔳", vltri: "⊲", vnsub: "⊂⃒", vnsup: "⊃⃒", Vopf: "𝕍", vopf: "𝕧", vprop: "∝", vrtri: "⊳", Vscr: "𝒱", vscr: "𝓋", vsubnE: "⫋︀", vsubne: "⊊︀", vsupnE: "⫌︀", vsupne: "⊋︀", Vvdash: "⊪", vzigzag: "⦚", Wcirc: "Ŵ", wcirc: "ŵ", wedbar: "⩟", wedge: "∧", Wedge: "⋀", wedgeq: "≙", weierp: "℘", Wfr: "𝔚", wfr: "𝔴", Wopf: "𝕎", wopf: "𝕨", wp: "℘", wr: "≀", wreath: "≀", Wscr: "𝒲", wscr: "𝓌", xcap: "⋂", xcirc: "◯", xcup: "⋃", xdtri: "▽", Xfr: "𝔛", xfr: "𝔵", xharr: "⟷", xhArr: "⟺", Xi: "Ξ", xi: "ξ", xlarr: "⟵", xlArr: "⟸", xmap: "⟼", xnis: "⋻", xodot: "⨀", Xopf: "𝕏", xopf: "𝕩", xoplus: "⨁", xotime: "⨂", xrarr: "⟶", xrArr: "⟹", Xscr: "𝒳", xscr: "𝓍", xsqcup: "⨆", xuplus: "⨄", xutri: "△", xvee: "⋁", xwedge: "⋀", Yacute: "Ý", yacute: "ý", YAcy: "Я", yacy: "я", Ycirc: "Ŷ", ycirc: "ŷ", Ycy: "Ы", ycy: "ы", yen: "¥", Yfr: "𝔜", yfr: "𝔶", YIcy: "Ї", yicy: "ї", Yopf: "𝕐", yopf: "𝕪", Yscr: "𝒴", yscr: "𝓎", YUcy: "Ю", yucy: "ю", yuml: "ÿ", Yuml: "Ÿ", Zacute: "Ź", zacute: "ź", Zcaron: "Ž", zcaron: "ž", Zcy: "З", zcy: "з", Zdot: "Ż", zdot: "ż", zeetrf: "ℨ", ZeroWidthSpace: "", Zeta: "Ζ", zeta: "ζ", zfr: "𝔷", Zfr: "ℨ", ZHcy: "Ж", zhcy: "ж", zigrarr: "⇝", zopf: "𝕫", Zopf: "ℤ", Zscr: "𝒵", zscr: "𝓏", zwj: "", zwnj: "" }, ba = /^#[xX]([A-Fa-f0-9]+)$/, Aa = /^#([0-9]+)$/, Da = /^([A-Za-z0-9]+)$/, Wr = function() {
|
|
874
|
+
function t(e) {
|
|
875
|
+
this.named = e;
|
|
876
|
+
}
|
|
877
|
+
return t.prototype.parse = function(e) {
|
|
878
|
+
if (e) {
|
|
879
|
+
var r = e.match(ba);
|
|
880
|
+
if (r) return String.fromCharCode(parseInt(r[1], 16));
|
|
881
|
+
if (r = e.match(Aa), r) return String.fromCharCode(parseInt(r[1], 10));
|
|
882
|
+
if (r = e.match(Da), r) return this.named[r[1]];
|
|
883
|
+
}
|
|
884
|
+
}, t;
|
|
885
|
+
}(), Ea = /[\t\n\f ]/, va = /[A-Za-z]/, Ca = /\r\n?/g;
|
|
886
|
+
function T(t) {
|
|
887
|
+
return Ea.test(t);
|
|
888
|
+
}
|
|
889
|
+
function lr(t) {
|
|
890
|
+
return va.test(t);
|
|
891
|
+
}
|
|
892
|
+
function Sa(t) {
|
|
893
|
+
return t.replace(Ca, `
|
|
894
|
+
`);
|
|
895
|
+
}
|
|
896
|
+
var wa = function() {
|
|
897
|
+
function t(e, r, n) {
|
|
898
|
+
n === void 0 && (n = "precompile"), this.delegate = e, this.entityParser = r, this.mode = n, this.state = "beforeData", this.line = -1, this.column = -1, this.input = "", this.index = -1, this.tagNameBuffer = "", this.states = { beforeData: function() {
|
|
899
|
+
var a = this.peek();
|
|
900
|
+
if (a === "<" && !this.isIgnoredEndTag()) this.transitionTo("tagOpen"), this.markTagStart(), this.consume();
|
|
901
|
+
else {
|
|
902
|
+
if (this.mode === "precompile" && a === `
|
|
903
|
+
`) {
|
|
904
|
+
var s = this.tagNameBuffer.toLowerCase();
|
|
905
|
+
(s === "pre" || s === "textarea") && this.consume();
|
|
906
|
+
}
|
|
907
|
+
this.transitionTo("data"), this.delegate.beginData();
|
|
908
|
+
}
|
|
909
|
+
}, data: function() {
|
|
910
|
+
var a = this.peek(), s = this.tagNameBuffer;
|
|
911
|
+
a === "<" && !this.isIgnoredEndTag() ? (this.delegate.finishData(), this.transitionTo("tagOpen"), this.markTagStart(), this.consume()) : a === "&" && s !== "script" && s !== "style" ? (this.consume(), this.delegate.appendToData(this.consumeCharRef() || "&")) : (this.consume(), this.delegate.appendToData(a));
|
|
912
|
+
}, tagOpen: function() {
|
|
913
|
+
var a = this.consume();
|
|
914
|
+
a === "!" ? this.transitionTo("markupDeclarationOpen") : a === "/" ? this.transitionTo("endTagOpen") : (a === "@" || a === ":" || lr(a)) && (this.transitionTo("tagName"), this.tagNameBuffer = "", this.delegate.beginStartTag(), this.appendToTagName(a));
|
|
915
|
+
}, markupDeclarationOpen: function() {
|
|
916
|
+
var a = this.consume();
|
|
917
|
+
if (a === "-" && this.peek() === "-") this.consume(), this.transitionTo("commentStart"), this.delegate.beginComment();
|
|
918
|
+
else {
|
|
919
|
+
var s = a.toUpperCase() + this.input.substring(this.index, this.index + 6).toUpperCase();
|
|
920
|
+
s === "DOCTYPE" && (this.consume(), this.consume(), this.consume(), this.consume(), this.consume(), this.consume(), this.transitionTo("doctype"), this.delegate.beginDoctype && this.delegate.beginDoctype());
|
|
921
|
+
}
|
|
922
|
+
}, doctype: function() {
|
|
923
|
+
var a = this.consume();
|
|
924
|
+
T(a) && this.transitionTo("beforeDoctypeName");
|
|
925
|
+
}, beforeDoctypeName: function() {
|
|
926
|
+
var a = this.consume();
|
|
927
|
+
T(a) || (this.transitionTo("doctypeName"), this.delegate.appendToDoctypeName && this.delegate.appendToDoctypeName(a.toLowerCase()));
|
|
928
|
+
}, doctypeName: function() {
|
|
929
|
+
var a = this.consume();
|
|
930
|
+
T(a) ? this.transitionTo("afterDoctypeName") : a === ">" ? (this.delegate.endDoctype && this.delegate.endDoctype(), this.transitionTo("beforeData")) : this.delegate.appendToDoctypeName && this.delegate.appendToDoctypeName(a.toLowerCase());
|
|
931
|
+
}, afterDoctypeName: function() {
|
|
932
|
+
var a = this.consume();
|
|
933
|
+
if (!T(a)) if (a === ">") this.delegate.endDoctype && this.delegate.endDoctype(), this.transitionTo("beforeData");
|
|
934
|
+
else {
|
|
935
|
+
var s = a.toUpperCase() + this.input.substring(this.index, this.index + 5).toUpperCase(), u = s.toUpperCase() === "PUBLIC", i = s.toUpperCase() === "SYSTEM";
|
|
936
|
+
(u || i) && (this.consume(), this.consume(), this.consume(), this.consume(), this.consume(), this.consume()), u ? this.transitionTo("afterDoctypePublicKeyword") : i && this.transitionTo("afterDoctypeSystemKeyword");
|
|
937
|
+
}
|
|
938
|
+
}, afterDoctypePublicKeyword: function() {
|
|
939
|
+
var a = this.peek();
|
|
940
|
+
T(a) ? (this.transitionTo("beforeDoctypePublicIdentifier"), this.consume()) : a === '"' ? (this.transitionTo("doctypePublicIdentifierDoubleQuoted"), this.consume()) : a === "'" ? (this.transitionTo("doctypePublicIdentifierSingleQuoted"), this.consume()) : a === ">" && (this.consume(), this.delegate.endDoctype && this.delegate.endDoctype(), this.transitionTo("beforeData"));
|
|
941
|
+
}, doctypePublicIdentifierDoubleQuoted: function() {
|
|
942
|
+
var a = this.consume();
|
|
943
|
+
a === '"' ? this.transitionTo("afterDoctypePublicIdentifier") : a === ">" ? (this.delegate.endDoctype && this.delegate.endDoctype(), this.transitionTo("beforeData")) : this.delegate.appendToDoctypePublicIdentifier && this.delegate.appendToDoctypePublicIdentifier(a);
|
|
944
|
+
}, doctypePublicIdentifierSingleQuoted: function() {
|
|
945
|
+
var a = this.consume();
|
|
946
|
+
a === "'" ? this.transitionTo("afterDoctypePublicIdentifier") : a === ">" ? (this.delegate.endDoctype && this.delegate.endDoctype(), this.transitionTo("beforeData")) : this.delegate.appendToDoctypePublicIdentifier && this.delegate.appendToDoctypePublicIdentifier(a);
|
|
947
|
+
}, afterDoctypePublicIdentifier: function() {
|
|
948
|
+
var a = this.consume();
|
|
949
|
+
T(a) ? this.transitionTo("betweenDoctypePublicAndSystemIdentifiers") : a === ">" ? (this.delegate.endDoctype && this.delegate.endDoctype(), this.transitionTo("beforeData")) : a === '"' ? this.transitionTo("doctypeSystemIdentifierDoubleQuoted") : a === "'" && this.transitionTo("doctypeSystemIdentifierSingleQuoted");
|
|
950
|
+
}, betweenDoctypePublicAndSystemIdentifiers: function() {
|
|
951
|
+
var a = this.consume();
|
|
952
|
+
T(a) || (a === ">" ? (this.delegate.endDoctype && this.delegate.endDoctype(), this.transitionTo("beforeData")) : a === '"' ? this.transitionTo("doctypeSystemIdentifierDoubleQuoted") : a === "'" && this.transitionTo("doctypeSystemIdentifierSingleQuoted"));
|
|
953
|
+
}, doctypeSystemIdentifierDoubleQuoted: function() {
|
|
954
|
+
var a = this.consume();
|
|
955
|
+
a === '"' ? this.transitionTo("afterDoctypeSystemIdentifier") : a === ">" ? (this.delegate.endDoctype && this.delegate.endDoctype(), this.transitionTo("beforeData")) : this.delegate.appendToDoctypeSystemIdentifier && this.delegate.appendToDoctypeSystemIdentifier(a);
|
|
956
|
+
}, doctypeSystemIdentifierSingleQuoted: function() {
|
|
957
|
+
var a = this.consume();
|
|
958
|
+
a === "'" ? this.transitionTo("afterDoctypeSystemIdentifier") : a === ">" ? (this.delegate.endDoctype && this.delegate.endDoctype(), this.transitionTo("beforeData")) : this.delegate.appendToDoctypeSystemIdentifier && this.delegate.appendToDoctypeSystemIdentifier(a);
|
|
959
|
+
}, afterDoctypeSystemIdentifier: function() {
|
|
960
|
+
var a = this.consume();
|
|
961
|
+
T(a) || a === ">" && (this.delegate.endDoctype && this.delegate.endDoctype(), this.transitionTo("beforeData"));
|
|
962
|
+
}, commentStart: function() {
|
|
963
|
+
var a = this.consume();
|
|
964
|
+
a === "-" ? this.transitionTo("commentStartDash") : a === ">" ? (this.delegate.finishComment(), this.transitionTo("beforeData")) : (this.delegate.appendToCommentData(a), this.transitionTo("comment"));
|
|
965
|
+
}, commentStartDash: function() {
|
|
966
|
+
var a = this.consume();
|
|
967
|
+
a === "-" ? this.transitionTo("commentEnd") : a === ">" ? (this.delegate.finishComment(), this.transitionTo("beforeData")) : (this.delegate.appendToCommentData("-"), this.transitionTo("comment"));
|
|
968
|
+
}, comment: function() {
|
|
969
|
+
var a = this.consume();
|
|
970
|
+
a === "-" ? this.transitionTo("commentEndDash") : this.delegate.appendToCommentData(a);
|
|
971
|
+
}, commentEndDash: function() {
|
|
972
|
+
var a = this.consume();
|
|
973
|
+
a === "-" ? this.transitionTo("commentEnd") : (this.delegate.appendToCommentData("-" + a), this.transitionTo("comment"));
|
|
974
|
+
}, commentEnd: function() {
|
|
975
|
+
var a = this.consume();
|
|
976
|
+
a === ">" ? (this.delegate.finishComment(), this.transitionTo("beforeData")) : (this.delegate.appendToCommentData("--" + a), this.transitionTo("comment"));
|
|
977
|
+
}, tagName: function() {
|
|
978
|
+
var a = this.consume();
|
|
979
|
+
T(a) ? this.transitionTo("beforeAttributeName") : a === "/" ? this.transitionTo("selfClosingStartTag") : a === ">" ? (this.delegate.finishTag(), this.transitionTo("beforeData")) : this.appendToTagName(a);
|
|
980
|
+
}, endTagName: function() {
|
|
981
|
+
var a = this.consume();
|
|
982
|
+
T(a) ? (this.transitionTo("beforeAttributeName"), this.tagNameBuffer = "") : a === "/" ? (this.transitionTo("selfClosingStartTag"), this.tagNameBuffer = "") : a === ">" ? (this.delegate.finishTag(), this.transitionTo("beforeData"), this.tagNameBuffer = "") : this.appendToTagName(a);
|
|
983
|
+
}, beforeAttributeName: function() {
|
|
984
|
+
var a = this.peek();
|
|
985
|
+
if (T(a)) {
|
|
986
|
+
this.consume();
|
|
987
|
+
return;
|
|
988
|
+
} else a === "/" ? (this.transitionTo("selfClosingStartTag"), this.consume()) : a === ">" ? (this.consume(), this.delegate.finishTag(), this.transitionTo("beforeData")) : a === "=" ? (this.delegate.reportSyntaxError("attribute name cannot start with equals sign"), this.transitionTo("attributeName"), this.delegate.beginAttribute(), this.consume(), this.delegate.appendToAttributeName(a)) : (this.transitionTo("attributeName"), this.delegate.beginAttribute());
|
|
989
|
+
}, attributeName: function() {
|
|
990
|
+
var a = this.peek();
|
|
991
|
+
T(a) ? (this.transitionTo("afterAttributeName"), this.consume()) : a === "/" ? (this.delegate.beginAttributeValue(!1), this.delegate.finishAttributeValue(), this.consume(), this.transitionTo("selfClosingStartTag")) : a === "=" ? (this.transitionTo("beforeAttributeValue"), this.consume()) : a === ">" ? (this.delegate.beginAttributeValue(!1), this.delegate.finishAttributeValue(), this.consume(), this.delegate.finishTag(), this.transitionTo("beforeData")) : a === '"' || a === "'" || a === "<" ? (this.delegate.reportSyntaxError(a + " is not a valid character within attribute names"), this.consume(), this.delegate.appendToAttributeName(a)) : (this.consume(), this.delegate.appendToAttributeName(a));
|
|
992
|
+
}, afterAttributeName: function() {
|
|
993
|
+
var a = this.peek();
|
|
994
|
+
if (T(a)) {
|
|
995
|
+
this.consume();
|
|
996
|
+
return;
|
|
997
|
+
} else a === "/" ? (this.delegate.beginAttributeValue(!1), this.delegate.finishAttributeValue(), this.consume(), this.transitionTo("selfClosingStartTag")) : a === "=" ? (this.consume(), this.transitionTo("beforeAttributeValue")) : a === ">" ? (this.delegate.beginAttributeValue(!1), this.delegate.finishAttributeValue(), this.consume(), this.delegate.finishTag(), this.transitionTo("beforeData")) : (this.delegate.beginAttributeValue(!1), this.delegate.finishAttributeValue(), this.transitionTo("attributeName"), this.delegate.beginAttribute(), this.consume(), this.delegate.appendToAttributeName(a));
|
|
998
|
+
}, beforeAttributeValue: function() {
|
|
999
|
+
var a = this.peek();
|
|
1000
|
+
T(a) ? this.consume() : a === '"' ? (this.transitionTo("attributeValueDoubleQuoted"), this.delegate.beginAttributeValue(!0), this.consume()) : a === "'" ? (this.transitionTo("attributeValueSingleQuoted"), this.delegate.beginAttributeValue(!0), this.consume()) : a === ">" ? (this.delegate.beginAttributeValue(!1), this.delegate.finishAttributeValue(), this.consume(), this.delegate.finishTag(), this.transitionTo("beforeData")) : (this.transitionTo("attributeValueUnquoted"), this.delegate.beginAttributeValue(!1), this.consume(), this.delegate.appendToAttributeValue(a));
|
|
1001
|
+
}, attributeValueDoubleQuoted: function() {
|
|
1002
|
+
var a = this.consume();
|
|
1003
|
+
a === '"' ? (this.delegate.finishAttributeValue(), this.transitionTo("afterAttributeValueQuoted")) : a === "&" ? this.delegate.appendToAttributeValue(this.consumeCharRef() || "&") : this.delegate.appendToAttributeValue(a);
|
|
1004
|
+
}, attributeValueSingleQuoted: function() {
|
|
1005
|
+
var a = this.consume();
|
|
1006
|
+
a === "'" ? (this.delegate.finishAttributeValue(), this.transitionTo("afterAttributeValueQuoted")) : a === "&" ? this.delegate.appendToAttributeValue(this.consumeCharRef() || "&") : this.delegate.appendToAttributeValue(a);
|
|
1007
|
+
}, attributeValueUnquoted: function() {
|
|
1008
|
+
var a = this.peek();
|
|
1009
|
+
T(a) ? (this.delegate.finishAttributeValue(), this.consume(), this.transitionTo("beforeAttributeName")) : a === "/" ? (this.delegate.finishAttributeValue(), this.consume(), this.transitionTo("selfClosingStartTag")) : a === "&" ? (this.consume(), this.delegate.appendToAttributeValue(this.consumeCharRef() || "&")) : a === ">" ? (this.delegate.finishAttributeValue(), this.consume(), this.delegate.finishTag(), this.transitionTo("beforeData")) : (this.consume(), this.delegate.appendToAttributeValue(a));
|
|
1010
|
+
}, afterAttributeValueQuoted: function() {
|
|
1011
|
+
var a = this.peek();
|
|
1012
|
+
T(a) ? (this.consume(), this.transitionTo("beforeAttributeName")) : a === "/" ? (this.consume(), this.transitionTo("selfClosingStartTag")) : a === ">" ? (this.consume(), this.delegate.finishTag(), this.transitionTo("beforeData")) : this.transitionTo("beforeAttributeName");
|
|
1013
|
+
}, selfClosingStartTag: function() {
|
|
1014
|
+
var a = this.peek();
|
|
1015
|
+
a === ">" ? (this.consume(), this.delegate.markTagAsSelfClosing(), this.delegate.finishTag(), this.transitionTo("beforeData")) : this.transitionTo("beforeAttributeName");
|
|
1016
|
+
}, endTagOpen: function() {
|
|
1017
|
+
var a = this.consume();
|
|
1018
|
+
(a === "@" || a === ":" || lr(a)) && (this.transitionTo("endTagName"), this.tagNameBuffer = "", this.delegate.beginEndTag(), this.appendToTagName(a));
|
|
1019
|
+
} }, this.reset();
|
|
1020
|
+
}
|
|
1021
|
+
return t.prototype.reset = function() {
|
|
1022
|
+
this.transitionTo("beforeData"), this.input = "", this.tagNameBuffer = "", this.index = 0, this.line = 1, this.column = 0, this.delegate.reset();
|
|
1023
|
+
}, t.prototype.transitionTo = function(e) {
|
|
1024
|
+
this.state = e;
|
|
1025
|
+
}, t.prototype.tokenize = function(e) {
|
|
1026
|
+
this.reset(), this.tokenizePart(e), this.tokenizeEOF();
|
|
1027
|
+
}, t.prototype.tokenizePart = function(e) {
|
|
1028
|
+
for (this.input += Sa(e); this.index < this.input.length; ) {
|
|
1029
|
+
var r = this.states[this.state];
|
|
1030
|
+
if (r !== void 0) r.call(this);
|
|
1031
|
+
else throw new Error("unhandled state " + this.state);
|
|
1032
|
+
}
|
|
1033
|
+
}, t.prototype.tokenizeEOF = function() {
|
|
1034
|
+
this.flushData();
|
|
1035
|
+
}, t.prototype.flushData = function() {
|
|
1036
|
+
this.state === "data" && (this.delegate.finishData(), this.transitionTo("beforeData"));
|
|
1037
|
+
}, t.prototype.peek = function() {
|
|
1038
|
+
return this.input.charAt(this.index);
|
|
1039
|
+
}, t.prototype.consume = function() {
|
|
1040
|
+
var e = this.peek();
|
|
1041
|
+
return this.index++, e === `
|
|
1042
|
+
` ? (this.line++, this.column = 0) : this.column++, e;
|
|
1043
|
+
}, t.prototype.consumeCharRef = function() {
|
|
1044
|
+
var e = this.input.indexOf(";", this.index);
|
|
1045
|
+
if (e !== -1) {
|
|
1046
|
+
var r = this.input.slice(this.index, e), n = this.entityParser.parse(r);
|
|
1047
|
+
if (n) {
|
|
1048
|
+
for (var a = r.length; a; ) this.consume(), a--;
|
|
1049
|
+
return this.consume(), n;
|
|
1050
|
+
}
|
|
1051
|
+
}
|
|
1052
|
+
}, t.prototype.markTagStart = function() {
|
|
1053
|
+
this.delegate.tagOpen();
|
|
1054
|
+
}, t.prototype.appendToTagName = function(e) {
|
|
1055
|
+
this.tagNameBuffer += e, this.delegate.appendToTagName(e);
|
|
1056
|
+
}, t.prototype.isIgnoredEndTag = function() {
|
|
1057
|
+
var e = this.tagNameBuffer;
|
|
1058
|
+
return e === "title" && this.input.substring(this.index, this.index + 8) !== "</title>" || e === "style" && this.input.substring(this.index, this.index + 8) !== "</style>" || e === "script" && this.input.substring(this.index, this.index + 9) !== "<\/script>";
|
|
1059
|
+
}, t;
|
|
1060
|
+
}(), te = /* @__PURE__ */ new Set(["area", "base", "br", "col", "command", "embed", "hr", "img", "input", "keygen", "link", "meta", "param", "source", "track", "wbr"]);
|
|
1061
|
+
function Ba() {
|
|
1062
|
+
return [...te];
|
|
1063
|
+
}
|
|
1064
|
+
function ka(t) {
|
|
1065
|
+
var e;
|
|
1066
|
+
return te.has(t.toLowerCase()) && ((e = t[0]) == null ? void 0 : e.toLowerCase()) === t[0];
|
|
1067
|
+
}
|
|
1068
|
+
function Vt(t) {
|
|
1069
|
+
return !!t && t.length > 0;
|
|
1070
|
+
}
|
|
1071
|
+
function ze(t) {
|
|
1072
|
+
return t.length === 0 ? void 0 : t[t.length - 1];
|
|
1073
|
+
}
|
|
1074
|
+
function xa(t) {
|
|
1075
|
+
return t.length === 0 ? void 0 : t[0];
|
|
1076
|
+
}
|
|
1077
|
+
var ut = Object.freeze({ line: 1, column: 0 }), Ta = Object.freeze({ source: "(synthetic)", start: ut, end: ut }), Te = Object.freeze({ source: "(nonexistent)", start: ut, end: ut }), st = Object.freeze({ source: "(broken)", start: ut, end: ut }), Na = class {
|
|
1078
|
+
constructor(t) {
|
|
1079
|
+
this._whens = t;
|
|
1080
|
+
}
|
|
1081
|
+
first(t) {
|
|
1082
|
+
for (let e of this._whens) {
|
|
1083
|
+
let r = e.match(t);
|
|
1084
|
+
if (Vt(r)) return r[0];
|
|
1085
|
+
}
|
|
1086
|
+
return null;
|
|
1087
|
+
}
|
|
1088
|
+
}, cr = class {
|
|
1089
|
+
get(t, e) {
|
|
1090
|
+
let r = this._map.get(t);
|
|
1091
|
+
return r || (r = e(), this._map.set(t, r), r);
|
|
1092
|
+
}
|
|
1093
|
+
add(t, e) {
|
|
1094
|
+
this._map.set(t, e);
|
|
1095
|
+
}
|
|
1096
|
+
match(t) {
|
|
1097
|
+
let e = function(s) {
|
|
1098
|
+
switch (s) {
|
|
1099
|
+
case "Broken":
|
|
1100
|
+
case "InternalsSynthetic":
|
|
1101
|
+
case "NonExistent":
|
|
1102
|
+
return "IS_INVISIBLE";
|
|
1103
|
+
default:
|
|
1104
|
+
return s;
|
|
1105
|
+
}
|
|
1106
|
+
}(t), r = [], n = this._map.get(e), a = this._map.get("MATCH_ANY");
|
|
1107
|
+
return n && r.push(n), a && r.push(a), r;
|
|
1108
|
+
}
|
|
1109
|
+
constructor() {
|
|
1110
|
+
this._map = /* @__PURE__ */ new Map();
|
|
1111
|
+
}
|
|
1112
|
+
};
|
|
1113
|
+
function Kr(t) {
|
|
1114
|
+
return t(new Pa()).validate();
|
|
1115
|
+
}
|
|
1116
|
+
var Pa = class {
|
|
1117
|
+
validate() {
|
|
1118
|
+
return (t, e) => this.matchFor(t.kind, e.kind)(t, e);
|
|
1119
|
+
}
|
|
1120
|
+
matchFor(t, e) {
|
|
1121
|
+
let r = this._whens.match(t);
|
|
1122
|
+
return Vt(r), new Na(r).first(e);
|
|
1123
|
+
}
|
|
1124
|
+
when(t, e, r) {
|
|
1125
|
+
return this._whens.get(t, () => new cr()).add(e, r), this;
|
|
1126
|
+
}
|
|
1127
|
+
constructor() {
|
|
1128
|
+
this._whens = new cr();
|
|
1129
|
+
}
|
|
1130
|
+
}, Fa = class Ne {
|
|
1131
|
+
static synthetic(e) {
|
|
1132
|
+
let r = q.synthetic(e);
|
|
1133
|
+
return new Ne({ loc: r, chars: e });
|
|
1134
|
+
}
|
|
1135
|
+
static load(e, r) {
|
|
1136
|
+
return new Ne({ loc: q.load(e, r[1]), chars: r[0] });
|
|
1137
|
+
}
|
|
1138
|
+
constructor(e) {
|
|
1139
|
+
this.loc = e.loc, this.chars = e.chars;
|
|
1140
|
+
}
|
|
1141
|
+
getString() {
|
|
1142
|
+
return this.chars;
|
|
1143
|
+
}
|
|
1144
|
+
serialize() {
|
|
1145
|
+
return [this.chars, this.loc.serialize()];
|
|
1146
|
+
}
|
|
1147
|
+
}, q = class vt {
|
|
1148
|
+
static get NON_EXISTENT() {
|
|
1149
|
+
return new dt("NonExistent", Te).wrap();
|
|
1150
|
+
}
|
|
1151
|
+
static load(e, r) {
|
|
1152
|
+
return typeof r == "number" ? vt.forCharPositions(e, r, r) : typeof r == "string" ? vt.synthetic(r) : Array.isArray(r) ? vt.forCharPositions(e, r[0], r[1]) : r === "NonExistent" ? vt.NON_EXISTENT : r === "Broken" ? vt.broken(st) : void ea(r);
|
|
1153
|
+
}
|
|
1154
|
+
static forHbsLoc(e, r) {
|
|
1155
|
+
let n = new kt(e, r.start), a = new kt(e, r.end);
|
|
1156
|
+
return new je(e, { start: n, end: a }, r).wrap();
|
|
1157
|
+
}
|
|
1158
|
+
static forCharPositions(e, r, n) {
|
|
1159
|
+
let a = new It(e, r), s = new It(e, n);
|
|
1160
|
+
return new Me(e, { start: a, end: s }).wrap();
|
|
1161
|
+
}
|
|
1162
|
+
static synthetic(e) {
|
|
1163
|
+
return new dt("InternalsSynthetic", Te, e).wrap();
|
|
1164
|
+
}
|
|
1165
|
+
static broken(e = st) {
|
|
1166
|
+
return new dt("Broken", e).wrap();
|
|
1167
|
+
}
|
|
1168
|
+
constructor(e) {
|
|
1169
|
+
var r;
|
|
1170
|
+
this.data = e, this.isInvisible = (r = e.kind) !== "CharPosition" && r !== "HbsPosition";
|
|
1171
|
+
}
|
|
1172
|
+
getStart() {
|
|
1173
|
+
return this.data.getStart().wrap();
|
|
1174
|
+
}
|
|
1175
|
+
getEnd() {
|
|
1176
|
+
return this.data.getEnd().wrap();
|
|
1177
|
+
}
|
|
1178
|
+
get loc() {
|
|
1179
|
+
let e = this.data.toHbsSpan();
|
|
1180
|
+
return e === null ? st : e.toHbsLoc();
|
|
1181
|
+
}
|
|
1182
|
+
get module() {
|
|
1183
|
+
return this.data.getModule();
|
|
1184
|
+
}
|
|
1185
|
+
get startPosition() {
|
|
1186
|
+
return this.loc.start;
|
|
1187
|
+
}
|
|
1188
|
+
get endPosition() {
|
|
1189
|
+
return this.loc.end;
|
|
1190
|
+
}
|
|
1191
|
+
toJSON() {
|
|
1192
|
+
return this.loc;
|
|
1193
|
+
}
|
|
1194
|
+
withStart(e) {
|
|
1195
|
+
return J(e.data, this.data.getEnd());
|
|
1196
|
+
}
|
|
1197
|
+
withEnd(e) {
|
|
1198
|
+
return J(this.data.getStart(), e.data);
|
|
1199
|
+
}
|
|
1200
|
+
asString() {
|
|
1201
|
+
return this.data.asString();
|
|
1202
|
+
}
|
|
1203
|
+
toSlice(e) {
|
|
1204
|
+
let r = this.data.asString();
|
|
1205
|
+
return JSON.stringify(r), JSON.stringify(e), new Fa({ loc: this, chars: e || r });
|
|
1206
|
+
}
|
|
1207
|
+
get start() {
|
|
1208
|
+
return this.loc.start;
|
|
1209
|
+
}
|
|
1210
|
+
set start(e) {
|
|
1211
|
+
this.data.locDidUpdate({ start: e });
|
|
1212
|
+
}
|
|
1213
|
+
get end() {
|
|
1214
|
+
return this.loc.end;
|
|
1215
|
+
}
|
|
1216
|
+
set end(e) {
|
|
1217
|
+
this.data.locDidUpdate({ end: e });
|
|
1218
|
+
}
|
|
1219
|
+
get source() {
|
|
1220
|
+
return this.module;
|
|
1221
|
+
}
|
|
1222
|
+
collapse(e) {
|
|
1223
|
+
switch (e) {
|
|
1224
|
+
case "start":
|
|
1225
|
+
return this.getStart().collapsed();
|
|
1226
|
+
case "end":
|
|
1227
|
+
return this.getEnd().collapsed();
|
|
1228
|
+
}
|
|
1229
|
+
}
|
|
1230
|
+
extend(e) {
|
|
1231
|
+
return J(this.data.getStart(), e.data.getEnd());
|
|
1232
|
+
}
|
|
1233
|
+
serialize() {
|
|
1234
|
+
return this.data.serialize();
|
|
1235
|
+
}
|
|
1236
|
+
slice({ skipStart: e = 0, skipEnd: r = 0 }) {
|
|
1237
|
+
return J(this.getStart().move(e).data, this.getEnd().move(-r).data);
|
|
1238
|
+
}
|
|
1239
|
+
sliceStartChars({ skipStart: e = 0, chars: r }) {
|
|
1240
|
+
return J(this.getStart().move(e).data, this.getStart().move(e + r).data);
|
|
1241
|
+
}
|
|
1242
|
+
sliceEndChars({ skipEnd: e = 0, chars: r }) {
|
|
1243
|
+
return J(this.getEnd().move(e - r).data, this.getStart().move(-e).data);
|
|
1244
|
+
}
|
|
1245
|
+
}, Bt, Br, Me = (Br = class {
|
|
1246
|
+
constructor(t, e) {
|
|
1247
|
+
Dt(this, Bt);
|
|
1248
|
+
this.source = t, this.charPositions = e, this.kind = "CharPosition", K(this, Bt, null);
|
|
1249
|
+
}
|
|
1250
|
+
wrap() {
|
|
1251
|
+
return new q(this);
|
|
1252
|
+
}
|
|
1253
|
+
asString() {
|
|
1254
|
+
return this.source.slice(this.charPositions.start.charPos, this.charPositions.end.charPos);
|
|
1255
|
+
}
|
|
1256
|
+
getModule() {
|
|
1257
|
+
return this.source.module;
|
|
1258
|
+
}
|
|
1259
|
+
getStart() {
|
|
1260
|
+
return this.charPositions.start;
|
|
1261
|
+
}
|
|
1262
|
+
getEnd() {
|
|
1263
|
+
return this.charPositions.end;
|
|
1264
|
+
}
|
|
1265
|
+
locDidUpdate() {
|
|
1266
|
+
}
|
|
1267
|
+
toHbsSpan() {
|
|
1268
|
+
let t = I(this, Bt);
|
|
1269
|
+
if (t === null) {
|
|
1270
|
+
let e = this.charPositions.start.toHbsPos(), r = this.charPositions.end.toHbsPos();
|
|
1271
|
+
t = K(this, Bt, e === null || r === null ? it : new je(this.source, { start: e, end: r }));
|
|
1272
|
+
}
|
|
1273
|
+
return t === it ? null : t;
|
|
1274
|
+
}
|
|
1275
|
+
serialize() {
|
|
1276
|
+
let { start: { charPos: t }, end: { charPos: e } } = this.charPositions;
|
|
1277
|
+
return t === e ? t : [t, e];
|
|
1278
|
+
}
|
|
1279
|
+
toCharPosSpan() {
|
|
1280
|
+
return this;
|
|
1281
|
+
}
|
|
1282
|
+
}, Bt = new WeakMap(), Br), rt, ft, kr, je = (kr = class {
|
|
1283
|
+
constructor(t, e, r = null) {
|
|
1284
|
+
Dt(this, rt);
|
|
1285
|
+
Dt(this, ft);
|
|
1286
|
+
this.source = t, this.hbsPositions = e, this.kind = "HbsPosition", K(this, rt, null), K(this, ft, r);
|
|
1287
|
+
}
|
|
1288
|
+
serialize() {
|
|
1289
|
+
let t = this.toCharPosSpan();
|
|
1290
|
+
return t === null ? "Broken" : t.wrap().serialize();
|
|
1291
|
+
}
|
|
1292
|
+
wrap() {
|
|
1293
|
+
return new q(this);
|
|
1294
|
+
}
|
|
1295
|
+
updateProvided(t, e) {
|
|
1296
|
+
I(this, ft) && (I(this, ft)[e] = t), K(this, rt, null), K(this, ft, { start: t, end: t });
|
|
1297
|
+
}
|
|
1298
|
+
locDidUpdate({ start: t, end: e }) {
|
|
1299
|
+
t !== void 0 && (this.updateProvided(t, "start"), this.hbsPositions.start = new kt(this.source, t, null)), e !== void 0 && (this.updateProvided(e, "end"), this.hbsPositions.end = new kt(this.source, e, null));
|
|
1300
|
+
}
|
|
1301
|
+
asString() {
|
|
1302
|
+
let t = this.toCharPosSpan();
|
|
1303
|
+
return t === null ? "" : t.asString();
|
|
1304
|
+
}
|
|
1305
|
+
getModule() {
|
|
1306
|
+
return this.source.module;
|
|
1307
|
+
}
|
|
1308
|
+
getStart() {
|
|
1309
|
+
return this.hbsPositions.start;
|
|
1310
|
+
}
|
|
1311
|
+
getEnd() {
|
|
1312
|
+
return this.hbsPositions.end;
|
|
1313
|
+
}
|
|
1314
|
+
toHbsLoc() {
|
|
1315
|
+
return { start: this.hbsPositions.start.hbsPos, end: this.hbsPositions.end.hbsPos };
|
|
1316
|
+
}
|
|
1317
|
+
toHbsSpan() {
|
|
1318
|
+
return this;
|
|
1319
|
+
}
|
|
1320
|
+
toCharPosSpan() {
|
|
1321
|
+
let t = I(this, rt);
|
|
1322
|
+
if (t === null) {
|
|
1323
|
+
let e = this.hbsPositions.start.toCharPos(), r = this.hbsPositions.end.toCharPos();
|
|
1324
|
+
if (!e || !r) return t = K(this, rt, it), null;
|
|
1325
|
+
t = K(this, rt, new Me(this.source, { start: e, end: r }));
|
|
1326
|
+
}
|
|
1327
|
+
return t === it ? null : t;
|
|
1328
|
+
}
|
|
1329
|
+
}, rt = new WeakMap(), ft = new WeakMap(), kr), dt = class {
|
|
1330
|
+
constructor(t, e, r = null) {
|
|
1331
|
+
this.kind = t, this.loc = e, this.string = r;
|
|
1332
|
+
}
|
|
1333
|
+
serialize() {
|
|
1334
|
+
switch (this.kind) {
|
|
1335
|
+
case "Broken":
|
|
1336
|
+
case "NonExistent":
|
|
1337
|
+
return this.kind;
|
|
1338
|
+
case "InternalsSynthetic":
|
|
1339
|
+
return this.string || "";
|
|
1340
|
+
}
|
|
1341
|
+
}
|
|
1342
|
+
wrap() {
|
|
1343
|
+
return new q(this);
|
|
1344
|
+
}
|
|
1345
|
+
asString() {
|
|
1346
|
+
return this.string || "";
|
|
1347
|
+
}
|
|
1348
|
+
locDidUpdate({ start: t, end: e }) {
|
|
1349
|
+
t !== void 0 && (this.loc.start = t), e !== void 0 && (this.loc.end = e);
|
|
1350
|
+
}
|
|
1351
|
+
getModule() {
|
|
1352
|
+
return "an unknown module";
|
|
1353
|
+
}
|
|
1354
|
+
getStart() {
|
|
1355
|
+
return new Fe(this.kind, this.loc.start);
|
|
1356
|
+
}
|
|
1357
|
+
getEnd() {
|
|
1358
|
+
return new Fe(this.kind, this.loc.end);
|
|
1359
|
+
}
|
|
1360
|
+
toCharPosSpan() {
|
|
1361
|
+
return this;
|
|
1362
|
+
}
|
|
1363
|
+
toHbsSpan() {
|
|
1364
|
+
return null;
|
|
1365
|
+
}
|
|
1366
|
+
toHbsLoc() {
|
|
1367
|
+
return st;
|
|
1368
|
+
}
|
|
1369
|
+
}, J = Kr((t) => t.when("HbsPosition", "HbsPosition", (e, r) => new je(e.source, { start: e, end: r }).wrap()).when("CharPosition", "CharPosition", (e, r) => new Me(e.source, { start: e, end: r }).wrap()).when("CharPosition", "HbsPosition", (e, r) => {
|
|
1370
|
+
let n = r.toCharPos();
|
|
1371
|
+
return n === null ? new dt("Broken", st).wrap() : J(e, n);
|
|
1372
|
+
}).when("HbsPosition", "CharPosition", (e, r) => {
|
|
1373
|
+
let n = e.toCharPos();
|
|
1374
|
+
return n === null ? new dt("Broken", st).wrap() : J(n, r);
|
|
1375
|
+
}).when("IS_INVISIBLE", "MATCH_ANY", (e) => new dt(e.kind, st).wrap()).when("MATCH_ANY", "IS_INVISIBLE", (e, r) => new dt(r.kind, st).wrap())), it = "BROKEN", re = class Pe {
|
|
1376
|
+
static forHbsPos(e, r) {
|
|
1377
|
+
return new kt(e, r, null).wrap();
|
|
1378
|
+
}
|
|
1379
|
+
static broken(e = ut) {
|
|
1380
|
+
return new Fe("Broken", e).wrap();
|
|
1381
|
+
}
|
|
1382
|
+
constructor(e) {
|
|
1383
|
+
this.data = e;
|
|
1384
|
+
}
|
|
1385
|
+
get offset() {
|
|
1386
|
+
let e = this.data.toCharPos();
|
|
1387
|
+
return e === null ? null : e.offset;
|
|
1388
|
+
}
|
|
1389
|
+
eql(e) {
|
|
1390
|
+
return La(this.data, e.data);
|
|
1391
|
+
}
|
|
1392
|
+
until(e) {
|
|
1393
|
+
return J(this.data, e.data);
|
|
1394
|
+
}
|
|
1395
|
+
move(e) {
|
|
1396
|
+
let r = this.data.toCharPos();
|
|
1397
|
+
if (r === null) return Pe.broken();
|
|
1398
|
+
{
|
|
1399
|
+
let n = r.offset + e;
|
|
1400
|
+
return r.source.validate(n) ? new It(r.source, n).wrap() : Pe.broken();
|
|
1401
|
+
}
|
|
1402
|
+
}
|
|
1403
|
+
collapsed() {
|
|
1404
|
+
return J(this.data, this.data);
|
|
1405
|
+
}
|
|
1406
|
+
toJSON() {
|
|
1407
|
+
return this.data.toJSON();
|
|
1408
|
+
}
|
|
1409
|
+
}, It = class {
|
|
1410
|
+
constructor(t, e) {
|
|
1411
|
+
this.source = t, this.charPos = e, this.kind = "CharPosition", this._locPos = null;
|
|
1412
|
+
}
|
|
1413
|
+
toCharPos() {
|
|
1414
|
+
return this;
|
|
1415
|
+
}
|
|
1416
|
+
toJSON() {
|
|
1417
|
+
let t = this.toHbsPos();
|
|
1418
|
+
return t === null ? ut : t.toJSON();
|
|
1419
|
+
}
|
|
1420
|
+
wrap() {
|
|
1421
|
+
return new re(this);
|
|
1422
|
+
}
|
|
1423
|
+
get offset() {
|
|
1424
|
+
return this.charPos;
|
|
1425
|
+
}
|
|
1426
|
+
toHbsPos() {
|
|
1427
|
+
let t = this._locPos;
|
|
1428
|
+
if (t === null) {
|
|
1429
|
+
let e = this.source.hbsPosFor(this.charPos);
|
|
1430
|
+
this._locPos = t = e === null ? it : new kt(this.source, e, this.charPos);
|
|
1431
|
+
}
|
|
1432
|
+
return t === it ? null : t;
|
|
1433
|
+
}
|
|
1434
|
+
}, kt = class {
|
|
1435
|
+
constructor(t, e, r = null) {
|
|
1436
|
+
this.source = t, this.hbsPos = e, this.kind = "HbsPosition", this._charPos = r === null ? null : new It(t, r);
|
|
1437
|
+
}
|
|
1438
|
+
toCharPos() {
|
|
1439
|
+
let t = this._charPos;
|
|
1440
|
+
if (t === null) {
|
|
1441
|
+
let e = this.source.charPosFor(this.hbsPos);
|
|
1442
|
+
this._charPos = t = e === null ? it : new It(this.source, e);
|
|
1443
|
+
}
|
|
1444
|
+
return t === it ? null : t;
|
|
1445
|
+
}
|
|
1446
|
+
toJSON() {
|
|
1447
|
+
return this.hbsPos;
|
|
1448
|
+
}
|
|
1449
|
+
wrap() {
|
|
1450
|
+
return new re(this);
|
|
1451
|
+
}
|
|
1452
|
+
toHbsPos() {
|
|
1453
|
+
return this;
|
|
1454
|
+
}
|
|
1455
|
+
}, Fe = class {
|
|
1456
|
+
constructor(t, e) {
|
|
1457
|
+
this.kind = t, this.pos = e;
|
|
1458
|
+
}
|
|
1459
|
+
toCharPos() {
|
|
1460
|
+
return null;
|
|
1461
|
+
}
|
|
1462
|
+
toJSON() {
|
|
1463
|
+
return this.pos;
|
|
1464
|
+
}
|
|
1465
|
+
wrap() {
|
|
1466
|
+
return new re(this);
|
|
1467
|
+
}
|
|
1468
|
+
get offset() {
|
|
1469
|
+
return null;
|
|
1470
|
+
}
|
|
1471
|
+
}, La = Kr((t) => t.when("HbsPosition", "HbsPosition", ({ hbsPos: e }, { hbsPos: r }) => e.column === r.column && e.line === r.line).when("CharPosition", "CharPosition", ({ charPos: e }, { charPos: r }) => e === r).when("CharPosition", "HbsPosition", ({ offset: e }, r) => {
|
|
1472
|
+
var n;
|
|
1473
|
+
return e === ((n = r.toCharPos()) == null ? void 0 : n.offset);
|
|
1474
|
+
}).when("HbsPosition", "CharPosition", (e, { offset: r }) => {
|
|
1475
|
+
var n;
|
|
1476
|
+
return ((n = e.toCharPos()) == null ? void 0 : n.offset) === r;
|
|
1477
|
+
}).when("MATCH_ANY", "MATCH_ANY", () => !1)), _t = class Jr {
|
|
1478
|
+
static from(e, r = {}) {
|
|
1479
|
+
var n;
|
|
1480
|
+
return new Jr(e, (n = r.meta) == null ? void 0 : n.moduleName);
|
|
1481
|
+
}
|
|
1482
|
+
constructor(e, r = "an unknown module") {
|
|
1483
|
+
this.source = e, this.module = r;
|
|
1484
|
+
}
|
|
1485
|
+
validate(e) {
|
|
1486
|
+
return e >= 0 && e <= this.source.length;
|
|
1487
|
+
}
|
|
1488
|
+
slice(e, r) {
|
|
1489
|
+
return this.source.slice(e, r);
|
|
1490
|
+
}
|
|
1491
|
+
offsetFor(e, r) {
|
|
1492
|
+
return re.forHbsPos(this, { line: e, column: r });
|
|
1493
|
+
}
|
|
1494
|
+
spanFor({ start: e, end: r }) {
|
|
1495
|
+
return q.forHbsLoc(this, { start: { line: e.line, column: e.column }, end: { line: r.line, column: r.column } });
|
|
1496
|
+
}
|
|
1497
|
+
hbsPosFor(e) {
|
|
1498
|
+
let r = 0, n = 0;
|
|
1499
|
+
if (e > this.source.length) return null;
|
|
1500
|
+
for (; ; ) {
|
|
1501
|
+
let a = this.source.indexOf(`
|
|
1502
|
+
`, n);
|
|
1503
|
+
if (e <= a || a === -1) return { line: r + 1, column: e - n };
|
|
1504
|
+
r += 1, n = a + 1;
|
|
1505
|
+
}
|
|
1506
|
+
}
|
|
1507
|
+
charPosFor(e) {
|
|
1508
|
+
let { line: r, column: n } = e, a = this.source.length, s = 0, u = 0;
|
|
1509
|
+
for (; u < a; ) {
|
|
1510
|
+
let i = this.source.indexOf(`
|
|
1511
|
+
`, u);
|
|
1512
|
+
if (i === -1 && (i = this.source.length), s === r - 1)
|
|
1513
|
+
return u + n > i ? i : u + n;
|
|
1514
|
+
if (i === -1) return 0;
|
|
1515
|
+
s += 1, u = i + 1;
|
|
1516
|
+
}
|
|
1517
|
+
return a;
|
|
1518
|
+
}
|
|
1519
|
+
};
|
|
1520
|
+
function E(t, e) {
|
|
1521
|
+
let { module: r, loc: n } = e, { line: a, column: s } = n.start, u = e.asString(), i = u ? `
|
|
1522
|
+
|
|
1523
|
+
|
|
|
1524
|
+
| ${u.split(`
|
|
1525
|
+
`).join(`
|
|
1526
|
+
| `)}
|
|
1527
|
+
|
|
|
1528
|
+
|
|
1529
|
+
` : "", l = new Error(`${t}: ${i}(error occurred in '${r}' @ line ${a} : column ${s})`);
|
|
1530
|
+
return l.name = "SyntaxError", l.location = e, l.code = u, l;
|
|
1531
|
+
}
|
|
1532
|
+
var Qr = { Template: ["body"], Block: ["body"], MustacheStatement: ["path", "params", "hash"], BlockStatement: ["path", "params", "hash", "program", "inverse"], ElementModifierStatement: ["path", "params", "hash"], CommentStatement: [], MustacheCommentStatement: [], ElementNode: ["attributes", "modifiers", "children", "comments"], AttrNode: ["value"], TextNode: [], ConcatStatement: ["parts"], SubExpression: ["path", "params", "hash"], PathExpression: [], StringLiteral: [], BooleanLiteral: [], NumberLiteral: [], NullLiteral: [], UndefinedLiteral: [], Hash: ["pairs"], HashPair: ["value"] }, Ge = function() {
|
|
1533
|
+
function t(e, r, n, a) {
|
|
1534
|
+
let s = Error.call(this, e);
|
|
1535
|
+
this.key = a, this.message = e, this.node = r, this.parent = n, s.stack && (this.stack = s.stack);
|
|
1536
|
+
}
|
|
1537
|
+
return t.prototype = Object.create(Error.prototype), t.prototype.constructor = t, t;
|
|
1538
|
+
}();
|
|
1539
|
+
function hr(t, e, r) {
|
|
1540
|
+
return new Ge("Cannot remove a node unless it is part of an array", t, e, r);
|
|
1541
|
+
}
|
|
1542
|
+
function qa(t, e, r) {
|
|
1543
|
+
return new Ge("Cannot replace a node with multiple nodes unless it is part of an array", t, e, r);
|
|
1544
|
+
}
|
|
1545
|
+
function pr(t, e) {
|
|
1546
|
+
return new Ge("Replacing and removing in key handlers is not yet supported.", t, null, e);
|
|
1547
|
+
}
|
|
1548
|
+
var ne = class {
|
|
1549
|
+
constructor(t, e = null, r = null) {
|
|
1550
|
+
this.node = t, this.parent = e, this.parentKey = r;
|
|
1551
|
+
}
|
|
1552
|
+
get parentNode() {
|
|
1553
|
+
return this.parent ? this.parent.node : null;
|
|
1554
|
+
}
|
|
1555
|
+
parents() {
|
|
1556
|
+
return { [Symbol.iterator]: () => new _a(this) };
|
|
1557
|
+
}
|
|
1558
|
+
}, _a = class {
|
|
1559
|
+
constructor(t) {
|
|
1560
|
+
this.path = t;
|
|
1561
|
+
}
|
|
1562
|
+
next() {
|
|
1563
|
+
return this.path.parent ? (this.path = this.path.parent, { done: !1, value: this.path }) : { done: !0, value: null };
|
|
1564
|
+
}
|
|
1565
|
+
};
|
|
1566
|
+
function Yr(t) {
|
|
1567
|
+
return typeof t == "function" ? t : t.enter;
|
|
1568
|
+
}
|
|
1569
|
+
function Zr(t) {
|
|
1570
|
+
return typeof t == "function" ? void 0 : t.exit;
|
|
1571
|
+
}
|
|
1572
|
+
function ae(t, e) {
|
|
1573
|
+
let r, n, a, { node: s, parent: u, parentKey: i } = e, l = function(h, f) {
|
|
1574
|
+
if (h.Program && (f === "Template" && !h.Template || f === "Block" && !h.Block)) return h.Program;
|
|
1575
|
+
let m = h[f];
|
|
1576
|
+
return m !== void 0 ? m : h.All;
|
|
1577
|
+
}(t, s.type);
|
|
1578
|
+
if (l !== void 0 && (r = Yr(l), n = Zr(l)), r !== void 0 && (a = r(s, e)), a != null) {
|
|
1579
|
+
if (JSON.stringify(s) !== JSON.stringify(a)) return Array.isArray(a) ? (Xr(t, a, u, i), a) : ae(t, new ne(a, u, i)) || a;
|
|
1580
|
+
a = void 0;
|
|
1581
|
+
}
|
|
1582
|
+
if (a === void 0) {
|
|
1583
|
+
let h = Qr[s.type];
|
|
1584
|
+
for (let f = 0; f < h.length; f++) Ia(t, l, e, h[f]);
|
|
1585
|
+
n !== void 0 && (a = n(s, e));
|
|
1586
|
+
}
|
|
1587
|
+
return a;
|
|
1588
|
+
}
|
|
1589
|
+
function dr(t, e, r) {
|
|
1590
|
+
t[e] = r;
|
|
1591
|
+
}
|
|
1592
|
+
function Ia(t, e, r, n) {
|
|
1593
|
+
let a, s, { node: u } = r, i = function(l, h) {
|
|
1594
|
+
return l[h];
|
|
1595
|
+
}(u, n);
|
|
1596
|
+
if (i) {
|
|
1597
|
+
if (e !== void 0) {
|
|
1598
|
+
let l = function(h, f) {
|
|
1599
|
+
let m = typeof h != "function" ? h.keys : void 0;
|
|
1600
|
+
if (m === void 0) return;
|
|
1601
|
+
let A = m[f];
|
|
1602
|
+
return A !== void 0 ? A : m.All;
|
|
1603
|
+
}(e, n);
|
|
1604
|
+
l !== void 0 && (a = Yr(l), s = Zr(l));
|
|
1605
|
+
}
|
|
1606
|
+
if (a !== void 0 && a(u, n) !== void 0) throw pr(u, n);
|
|
1607
|
+
if (Array.isArray(i)) Xr(t, i, r, n);
|
|
1608
|
+
else {
|
|
1609
|
+
let l = ae(t, new ne(i, r, n));
|
|
1610
|
+
l !== void 0 && function(h, f, m, A) {
|
|
1611
|
+
if (A === null) throw hr(m, h, f);
|
|
1612
|
+
if (Array.isArray(A)) {
|
|
1613
|
+
if (A.length !== 1) throw A.length === 0 ? hr(m, h, f) : qa(m, h, f);
|
|
1614
|
+
dr(h, f, A[0]);
|
|
1615
|
+
} else dr(h, f, A);
|
|
1616
|
+
}(u, n, i, l);
|
|
1617
|
+
}
|
|
1618
|
+
if (s !== void 0 && s(u, n) !== void 0) throw pr(u, n);
|
|
1619
|
+
}
|
|
1620
|
+
}
|
|
1621
|
+
function Xr(t, e, r, n) {
|
|
1622
|
+
for (let a = 0; a < e.length; a++) {
|
|
1623
|
+
let s = e[a], u = ae(t, new ne(s, r, n));
|
|
1624
|
+
u !== void 0 && (a += Oa(e, a, u) - 1);
|
|
1625
|
+
}
|
|
1626
|
+
}
|
|
1627
|
+
function Oa(t, e, r) {
|
|
1628
|
+
return r === null ? (t.splice(e, 1), 0) : Array.isArray(r) ? (t.splice(e, 1, ...r), r.length) : (t.splice(e, 1, r), 1);
|
|
1629
|
+
}
|
|
1630
|
+
function Ra(t, e) {
|
|
1631
|
+
ae(e, new ne(t));
|
|
1632
|
+
}
|
|
1633
|
+
function wt(t, e) {
|
|
1634
|
+
(function(r) {
|
|
1635
|
+
switch (r.type) {
|
|
1636
|
+
case "Block":
|
|
1637
|
+
case "Template":
|
|
1638
|
+
return r.body;
|
|
1639
|
+
case "ElementNode":
|
|
1640
|
+
return r.children;
|
|
1641
|
+
}
|
|
1642
|
+
})(t).push(e);
|
|
1643
|
+
}
|
|
1644
|
+
function tn(t) {
|
|
1645
|
+
return t.type === "StringLiteral" || t.type === "BooleanLiteral" || t.type === "NumberLiteral" || t.type === "NullLiteral" || t.type === "UndefinedLiteral";
|
|
1646
|
+
}
|
|
1647
|
+
var De;
|
|
1648
|
+
function Ee() {
|
|
1649
|
+
return De || (De = new _t("", "(synthetic)")), De;
|
|
1650
|
+
}
|
|
1651
|
+
function fr(t, e) {
|
|
1652
|
+
return y.var({ name: t, loc: C(e || null) });
|
|
1653
|
+
}
|
|
1654
|
+
function et(t, e) {
|
|
1655
|
+
let r = C(e || null);
|
|
1656
|
+
if (typeof t != "string") {
|
|
1657
|
+
if ("type" in t) return t;
|
|
1658
|
+
{
|
|
1659
|
+
t.head.indexOf(".");
|
|
1660
|
+
let { head: s, tail: u } = t;
|
|
1661
|
+
return y.path({ head: y.head({ original: s, loc: r.sliceStartChars({ chars: s.length }) }), tail: u, loc: C(e || null) });
|
|
1662
|
+
}
|
|
1663
|
+
}
|
|
1664
|
+
let { head: n, tail: a } = function(s, u) {
|
|
1665
|
+
let [i, ...l] = s.split("."), h = y.head({ original: i, loc: C(u || null) });
|
|
1666
|
+
return y.path({ head: h, tail: l, loc: C(u || null) });
|
|
1667
|
+
}(t, r);
|
|
1668
|
+
return y.path({ head: n, tail: a, loc: r });
|
|
1669
|
+
}
|
|
1670
|
+
function Yt(t, e, r) {
|
|
1671
|
+
return y.literal({ type: t, value: e, loc: C(r || null) });
|
|
1672
|
+
}
|
|
1673
|
+
function Pt(t = [], e) {
|
|
1674
|
+
return y.hash({ pairs: t, loc: C(e || null) });
|
|
1675
|
+
}
|
|
1676
|
+
function en(t) {
|
|
1677
|
+
return t.map((e) => typeof e == "string" ? y.var({ name: e, loc: q.synthetic(e) }) : e);
|
|
1678
|
+
}
|
|
1679
|
+
function mr(t = [], e = [], r = !1, n) {
|
|
1680
|
+
return y.blockItself({ body: t, params: en(e), chained: r, loc: C(n || null) });
|
|
1681
|
+
}
|
|
1682
|
+
function gr(t = [], e = [], r) {
|
|
1683
|
+
return y.template({ body: t, blockParams: e, loc: C(r || null) });
|
|
1684
|
+
}
|
|
1685
|
+
function C(...t) {
|
|
1686
|
+
if (t.length === 1) {
|
|
1687
|
+
let e = t[0];
|
|
1688
|
+
return e && typeof e == "object" ? q.forHbsLoc(Ee(), e) : q.forHbsLoc(Ee(), Ta);
|
|
1689
|
+
}
|
|
1690
|
+
{
|
|
1691
|
+
let [e, r, n, a, s] = t, u = s ? new _t("", s) : Ee();
|
|
1692
|
+
return q.forHbsLoc(u, { start: { line: e, column: r }, end: { line: n || e, column: a || r } });
|
|
1693
|
+
}
|
|
1694
|
+
}
|
|
1695
|
+
var Va = { mustache: function(t, e = [], r = Pt([]), n = !1, a, s) {
|
|
1696
|
+
return y.mustache({ path: et(t), params: e, hash: r, trusting: n, strip: s, loc: C(a || null) });
|
|
1697
|
+
}, block: function(t, e, r, n, a = null, s, u, i, l) {
|
|
1698
|
+
let h, f = null;
|
|
1699
|
+
return h = n.type === "Template" ? y.blockItself({ params: en(n.blockParams), body: n.body, loc: n.loc }) : n, (a == null ? void 0 : a.type) === "Template" ? (a.blockParams.length, f = y.blockItself({ params: [], body: a.body, loc: a.loc })) : f = a, y.block({ path: et(t), params: e || [], hash: r || Pt([]), defaultBlock: h, elseBlock: f, loc: C(s || null), openStrip: u, inverseStrip: i, closeStrip: l });
|
|
1700
|
+
}, comment: function(t, e) {
|
|
1701
|
+
return y.comment({ value: t, loc: C(e || null) });
|
|
1702
|
+
}, mustacheComment: function(t, e) {
|
|
1703
|
+
return y.mustacheComment({ value: t, loc: C(e || null) });
|
|
1704
|
+
}, element: function(t, e = {}) {
|
|
1705
|
+
let r, n, { attrs: a, blockParams: s, modifiers: u, comments: i, children: l, openTag: h, closeTag: f, loc: m } = e;
|
|
1706
|
+
typeof t == "string" ? t.endsWith("/") ? (r = et(t.slice(0, -1)), n = !0) : r = et(t) : "type" in t ? (t.type, t.type, r = t) : "path" in t ? (t.path.type, t.path.type, r = t.path, n = t.selfClosing) : (r = et(t.name), n = t.selfClosing);
|
|
1707
|
+
let A = s == null ? void 0 : s.map((v) => typeof v == "string" ? fr(v) : v), d = null;
|
|
1708
|
+
return f ? d = C(f) : f === void 0 && (d = n || ka(r.original) ? null : C(null)), y.element({ path: r, selfClosing: n || !1, attributes: a || [], params: A || [], modifiers: u || [], comments: i || [], children: l || [], openTag: C(h || null), closeTag: d, loc: C(m || null) });
|
|
1709
|
+
}, elementModifier: function(t, e, r, n) {
|
|
1710
|
+
return y.elementModifier({ path: et(t), params: e || [], hash: r || Pt([]), loc: C(n || null) });
|
|
1711
|
+
}, attr: function(t, e, r) {
|
|
1712
|
+
return y.attr({ name: t, value: e, loc: C(r || null) });
|
|
1713
|
+
}, text: function(t = "", e) {
|
|
1714
|
+
return y.text({ chars: t, loc: C(e || null) });
|
|
1715
|
+
}, sexpr: function(t, e = [], r = Pt([]), n) {
|
|
1716
|
+
return y.sexpr({ path: et(t), params: e, hash: r, loc: C(n || null) });
|
|
1717
|
+
}, concat: function(t, e) {
|
|
1718
|
+
if (!Vt(t)) throw new Error("b.concat requires at least one part");
|
|
1719
|
+
return y.concat({ parts: t, loc: C(e || null) });
|
|
1720
|
+
}, hash: Pt, pair: function(t, e, r) {
|
|
1721
|
+
return y.pair({ key: t, value: e, loc: C(r || null) });
|
|
1722
|
+
}, literal: Yt, program: function(t, e, r) {
|
|
1723
|
+
return e && e.length ? mr(t, e, !1, r) : gr(t, [], r);
|
|
1724
|
+
}, blockItself: mr, template: gr, loc: C, pos: function(t, e) {
|
|
1725
|
+
return y.pos({ line: t, column: e });
|
|
1726
|
+
}, path: et, fullPath: function(t, e = [], r) {
|
|
1727
|
+
return y.path({ head: t, tail: e, loc: C(r || null) });
|
|
1728
|
+
}, head: function(t, e) {
|
|
1729
|
+
return y.head({ original: t, loc: C(e || null) });
|
|
1730
|
+
}, at: function(t, e) {
|
|
1731
|
+
return y.atName({ name: t, loc: C(e || null) });
|
|
1732
|
+
}, var: fr, this: function(t) {
|
|
1733
|
+
return y.this({ loc: C(t || null) });
|
|
1734
|
+
}, string: ve("StringLiteral"), boolean: ve("BooleanLiteral"), number: ve("NumberLiteral"), undefined: () => Yt("UndefinedLiteral", void 0), null: () => Yt("NullLiteral", null) };
|
|
1735
|
+
function ve(t) {
|
|
1736
|
+
return function(e, r) {
|
|
1737
|
+
return Yt(t, e, r);
|
|
1738
|
+
};
|
|
1739
|
+
}
|
|
1740
|
+
var Wt = { close: !1, open: !1 }, y = new class {
|
|
1741
|
+
pos({ line: t, column: e }) {
|
|
1742
|
+
return { line: t, column: e };
|
|
1743
|
+
}
|
|
1744
|
+
blockItself({ body: t, params: e, chained: r = !1, loc: n }) {
|
|
1745
|
+
return { type: "Block", body: t, params: e, get blockParams() {
|
|
1746
|
+
return this.params.map((a) => a.name);
|
|
1747
|
+
}, set blockParams(a) {
|
|
1748
|
+
this.params = a.map((s) => y.var({ name: s, loc: q.synthetic(s) }));
|
|
1749
|
+
}, chained: r, loc: n };
|
|
1750
|
+
}
|
|
1751
|
+
template({ body: t, blockParams: e, loc: r }) {
|
|
1752
|
+
return { type: "Template", body: t, blockParams: e, loc: r };
|
|
1753
|
+
}
|
|
1754
|
+
mustache({ path: t, params: e, hash: r, trusting: n, loc: a, strip: s = Wt }) {
|
|
1755
|
+
return function({ path: u, params: i, hash: l, trusting: h, strip: f, loc: m }) {
|
|
1756
|
+
let A = { type: "MustacheStatement", path: u, params: i, hash: l, trusting: h, strip: f, loc: m };
|
|
1757
|
+
return Object.defineProperty(A, "escaped", { enumerable: !1, get() {
|
|
1758
|
+
return !this.trusting;
|
|
1759
|
+
}, set(d) {
|
|
1760
|
+
this.trusting = !d;
|
|
1761
|
+
} }), A;
|
|
1762
|
+
}({ path: t, params: e, hash: r, trusting: n, strip: s, loc: a });
|
|
1763
|
+
}
|
|
1764
|
+
block({ path: t, params: e, hash: r, defaultBlock: n, elseBlock: a = null, loc: s, openStrip: u = Wt, inverseStrip: i = Wt, closeStrip: l = Wt }) {
|
|
1765
|
+
return { type: "BlockStatement", path: t, params: e, hash: r, program: n, inverse: a, loc: s, openStrip: u, inverseStrip: i, closeStrip: l };
|
|
1766
|
+
}
|
|
1767
|
+
comment({ value: t, loc: e }) {
|
|
1768
|
+
return { type: "CommentStatement", value: t, loc: e };
|
|
1769
|
+
}
|
|
1770
|
+
mustacheComment({ value: t, loc: e }) {
|
|
1771
|
+
return { type: "MustacheCommentStatement", value: t, loc: e };
|
|
1772
|
+
}
|
|
1773
|
+
concat({ parts: t, loc: e }) {
|
|
1774
|
+
return { type: "ConcatStatement", parts: t, loc: e };
|
|
1775
|
+
}
|
|
1776
|
+
element({ path: t, selfClosing: e, attributes: r, modifiers: n, params: a, comments: s, children: u, openTag: i, closeTag: l, loc: h }) {
|
|
1777
|
+
let f = e;
|
|
1778
|
+
return { type: "ElementNode", path: t, attributes: r, modifiers: n, params: a, comments: s, children: u, openTag: i, closeTag: l, loc: h, get tag() {
|
|
1779
|
+
return this.path.original;
|
|
1780
|
+
}, set tag(m) {
|
|
1781
|
+
this.path.original = m;
|
|
1782
|
+
}, get blockParams() {
|
|
1783
|
+
return this.params.map((m) => m.name);
|
|
1784
|
+
}, set blockParams(m) {
|
|
1785
|
+
this.params = m.map((A) => y.var({ name: A, loc: q.synthetic(A) }));
|
|
1786
|
+
}, get selfClosing() {
|
|
1787
|
+
return f;
|
|
1788
|
+
}, set selfClosing(m) {
|
|
1789
|
+
f = m, this.closeTag = m ? null : q.synthetic(`</${this.tag}>`);
|
|
1790
|
+
} };
|
|
1791
|
+
}
|
|
1792
|
+
elementModifier({ path: t, params: e, hash: r, loc: n }) {
|
|
1793
|
+
return { type: "ElementModifierStatement", path: t, params: e, hash: r, loc: n };
|
|
1794
|
+
}
|
|
1795
|
+
attr({ name: t, value: e, loc: r }) {
|
|
1796
|
+
return { type: "AttrNode", name: t, value: e, loc: r };
|
|
1797
|
+
}
|
|
1798
|
+
text({ chars: t, loc: e }) {
|
|
1799
|
+
return { type: "TextNode", chars: t, loc: e };
|
|
1800
|
+
}
|
|
1801
|
+
sexpr({ path: t, params: e, hash: r, loc: n }) {
|
|
1802
|
+
return { type: "SubExpression", path: t, params: e, hash: r, loc: n };
|
|
1803
|
+
}
|
|
1804
|
+
path({ head: t, tail: e, loc: r }) {
|
|
1805
|
+
return function({ head: n, tail: a, loc: s }) {
|
|
1806
|
+
let u = { type: "PathExpression", head: n, tail: a, get original() {
|
|
1807
|
+
return [this.head.original, ...this.tail].join(".");
|
|
1808
|
+
}, set original(i) {
|
|
1809
|
+
let [l, ...h] = i.split(".");
|
|
1810
|
+
this.head = Va.head(l, this.head.loc), this.tail = h;
|
|
1811
|
+
}, loc: s };
|
|
1812
|
+
return Object.defineProperty(u, "parts", { enumerable: !1, get() {
|
|
1813
|
+
let i = this.original.split(".");
|
|
1814
|
+
return i[0] === "this" ? i.shift() : i[0].startsWith("@") && (i[0] = i[0].slice(1)), Object.freeze(i);
|
|
1815
|
+
}, set(i) {
|
|
1816
|
+
var h;
|
|
1817
|
+
let l = [...i];
|
|
1818
|
+
l[0] === "this" || (h = l[0]) != null && h.startsWith("@") || (this.head.type === "ThisHead" ? l.unshift("this") : this.head.type === "AtHead" && (l[0] = `@${l[0]}`)), this.original = l.join(".");
|
|
1819
|
+
} }), Object.defineProperty(u, "this", { enumerable: !1, get() {
|
|
1820
|
+
return this.head.type === "ThisHead";
|
|
1821
|
+
} }), Object.defineProperty(u, "data", { enumerable: !1, get() {
|
|
1822
|
+
return this.head.type === "AtHead";
|
|
1823
|
+
} }), u;
|
|
1824
|
+
}({ head: t, tail: e, loc: r });
|
|
1825
|
+
}
|
|
1826
|
+
head({ original: t, loc: e }) {
|
|
1827
|
+
return t === "this" ? this.this({ loc: e }) : t[0] === "@" ? this.atName({ name: t, loc: e }) : this.var({ name: t, loc: e });
|
|
1828
|
+
}
|
|
1829
|
+
this({ loc: t }) {
|
|
1830
|
+
return { type: "ThisHead", get original() {
|
|
1831
|
+
return "this";
|
|
1832
|
+
}, loc: t };
|
|
1833
|
+
}
|
|
1834
|
+
atName({ name: t, loc: e }) {
|
|
1835
|
+
let r = "", n = { type: "AtHead", get name() {
|
|
1836
|
+
return r;
|
|
1837
|
+
}, set name(a) {
|
|
1838
|
+
a[0], a.indexOf("."), r = a;
|
|
1839
|
+
}, get original() {
|
|
1840
|
+
return this.name;
|
|
1841
|
+
}, set original(a) {
|
|
1842
|
+
this.name = a;
|
|
1843
|
+
}, loc: e };
|
|
1844
|
+
return n.name = t, n;
|
|
1845
|
+
}
|
|
1846
|
+
var({ name: t, loc: e }) {
|
|
1847
|
+
let r = "", n = { type: "VarHead", get name() {
|
|
1848
|
+
return r;
|
|
1849
|
+
}, set name(a) {
|
|
1850
|
+
a[0], a.indexOf("."), r = a;
|
|
1851
|
+
}, get original() {
|
|
1852
|
+
return this.name;
|
|
1853
|
+
}, set original(a) {
|
|
1854
|
+
this.name = a;
|
|
1855
|
+
}, loc: e };
|
|
1856
|
+
return n.name = t, n;
|
|
1857
|
+
}
|
|
1858
|
+
hash({ pairs: t, loc: e }) {
|
|
1859
|
+
return { type: "Hash", pairs: t, loc: e };
|
|
1860
|
+
}
|
|
1861
|
+
pair({ key: t, value: e, loc: r }) {
|
|
1862
|
+
return { type: "HashPair", key: t, value: e, loc: r };
|
|
1863
|
+
}
|
|
1864
|
+
literal({ type: t, value: e, loc: r }) {
|
|
1865
|
+
return function({ type: n, value: a, loc: s }) {
|
|
1866
|
+
let u = { type: n, value: a, loc: s };
|
|
1867
|
+
return Object.defineProperty(u, "original", { enumerable: !1, get() {
|
|
1868
|
+
return this.value;
|
|
1869
|
+
}, set(i) {
|
|
1870
|
+
this.value = i;
|
|
1871
|
+
} }), u;
|
|
1872
|
+
}({ type: t, value: e, loc: r });
|
|
1873
|
+
}
|
|
1874
|
+
}(), $a = class {
|
|
1875
|
+
constructor(t, e = new Wr(ya), r = "precompile") {
|
|
1876
|
+
this.elementStack = [], this.currentAttribute = null, this.currentNode = null, this.source = t, this.lines = t.source.split(/\r\n?|\n/u), this.tokenizer = new wa(this, e, r);
|
|
1877
|
+
}
|
|
1878
|
+
offset() {
|
|
1879
|
+
let { line: t, column: e } = this.tokenizer;
|
|
1880
|
+
return this.source.offsetFor(t, e);
|
|
1881
|
+
}
|
|
1882
|
+
pos({ line: t, column: e }) {
|
|
1883
|
+
return this.source.offsetFor(t, e);
|
|
1884
|
+
}
|
|
1885
|
+
finish(t) {
|
|
1886
|
+
return Mr({}, t, { loc: t.start.until(this.offset()) });
|
|
1887
|
+
}
|
|
1888
|
+
get currentAttr() {
|
|
1889
|
+
return this.currentAttribute;
|
|
1890
|
+
}
|
|
1891
|
+
get currentTag() {
|
|
1892
|
+
let t = this.currentNode;
|
|
1893
|
+
return t && (t.type === "StartTag" || t.type), t;
|
|
1894
|
+
}
|
|
1895
|
+
get currentStartTag() {
|
|
1896
|
+
let t = this.currentNode;
|
|
1897
|
+
return t && t.type, t;
|
|
1898
|
+
}
|
|
1899
|
+
get currentEndTag() {
|
|
1900
|
+
let t = this.currentNode;
|
|
1901
|
+
return t && t.type, t;
|
|
1902
|
+
}
|
|
1903
|
+
get currentComment() {
|
|
1904
|
+
let t = this.currentNode;
|
|
1905
|
+
return t && t.type, t;
|
|
1906
|
+
}
|
|
1907
|
+
get currentData() {
|
|
1908
|
+
let t = this.currentNode;
|
|
1909
|
+
return t && t.type, t;
|
|
1910
|
+
}
|
|
1911
|
+
acceptNode(t) {
|
|
1912
|
+
return this[t.type](t);
|
|
1913
|
+
}
|
|
1914
|
+
currentElement() {
|
|
1915
|
+
return ze(this.elementStack);
|
|
1916
|
+
}
|
|
1917
|
+
sourceForNode(t, e) {
|
|
1918
|
+
let r, n, a, s = t.loc.start.line - 1, u = s - 1, i = t.loc.start.column, l = [];
|
|
1919
|
+
for (e ? (n = e.loc.end.line - 1, a = e.loc.end.column) : (n = t.loc.end.line - 1, a = t.loc.end.column); u < n; ) u++, r = this.lines[u], u === s ? s === n ? l.push(r.slice(i, a)) : l.push(r.slice(i)) : u === n ? l.push(r.slice(0, a)) : l.push(r);
|
|
1920
|
+
return l.join(`
|
|
1921
|
+
`);
|
|
1922
|
+
}
|
|
1923
|
+
}, Ua = class extends $a {
|
|
1924
|
+
parse(t, e) {
|
|
1925
|
+
var a;
|
|
1926
|
+
t.loc;
|
|
1927
|
+
let r = y.template({ body: [], blockParams: e, loc: this.source.spanFor(t.loc) }), n = this.parseProgram(r, t);
|
|
1928
|
+
return (a = this.pendingError) == null || a.eof(n.loc.getEnd()), n;
|
|
1929
|
+
}
|
|
1930
|
+
Program(t, e) {
|
|
1931
|
+
t.loc;
|
|
1932
|
+
let r = y.blockItself({ body: [], params: e, chained: t.chained, loc: this.source.spanFor(t.loc) });
|
|
1933
|
+
return this.parseProgram(r, t);
|
|
1934
|
+
}
|
|
1935
|
+
parseProgram(t, e) {
|
|
1936
|
+
if (e.body.length === 0) return t;
|
|
1937
|
+
let r;
|
|
1938
|
+
try {
|
|
1939
|
+
this.elementStack.push(t);
|
|
1940
|
+
for (let n of e.body) this.acceptNode(n);
|
|
1941
|
+
} finally {
|
|
1942
|
+
r = this.elementStack.pop();
|
|
1943
|
+
}
|
|
1944
|
+
if (t !== r) {
|
|
1945
|
+
if ((r == null ? void 0 : r.type) === "ElementNode") throw E(`Unclosed element \`${r.tag}\``, r.loc);
|
|
1946
|
+
t.type;
|
|
1947
|
+
}
|
|
1948
|
+
return t;
|
|
1949
|
+
}
|
|
1950
|
+
BlockStatement(t) {
|
|
1951
|
+
var f;
|
|
1952
|
+
if (this.tokenizer.state === "comment") return t.loc, void this.appendToCommentData(this.sourceForNode(t));
|
|
1953
|
+
if (this.tokenizer.state !== "data" && this.tokenizer.state !== "beforeData") throw E("A block may only be used inside an HTML element or another block.", this.source.spanFor(t.loc));
|
|
1954
|
+
let { path: e, params: r, hash: n } = Ce(this, t), a = this.source.spanFor(t.loc), s, u = [];
|
|
1955
|
+
if ((f = t.program.blockParams) != null && f.length) {
|
|
1956
|
+
let m = n.loc.collapse("end");
|
|
1957
|
+
m = t.program.loc ? m.withEnd(this.source.spanFor(t.program.loc).getStart()) : t.program.body[0] ? m.withEnd(this.source.spanFor(t.program.body[0].loc).getStart()) : m.withEnd(a.getEnd()), s = yr(this.source, t, m);
|
|
1958
|
+
let A = m.asString(), d = A.indexOf("|") + 1, v = A.indexOf("|", d);
|
|
1959
|
+
for (let w of t.program.blockParams) {
|
|
1960
|
+
let S, B;
|
|
1961
|
+
S = d >= v ? -1 : A.indexOf(w, d), S === -1 || S + w.length > v ? (d = v, B = this.source.spanFor(Te)) : (d = S, B = m.sliceStartChars({ skipStart: d, chars: w.length }), d += w.length), u.push(y.var({ name: w, loc: B }));
|
|
1962
|
+
}
|
|
1963
|
+
} else s = yr(this.source, t, a);
|
|
1964
|
+
let i = this.Program(s.program, u), l = s.inverse ? this.Program(s.inverse, []) : null, h = y.block({ path: e, params: r, hash: n, defaultBlock: i, elseBlock: l, loc: this.source.spanFor(t.loc), openStrip: t.openStrip, inverseStrip: t.inverseStrip, closeStrip: t.closeStrip });
|
|
1965
|
+
wt(this.currentElement(), h);
|
|
1966
|
+
}
|
|
1967
|
+
MustacheStatement(t) {
|
|
1968
|
+
var u;
|
|
1969
|
+
(u = this.pendingError) == null || u.mustache(this.source.spanFor(t.loc));
|
|
1970
|
+
let { tokenizer: e } = this;
|
|
1971
|
+
if (e.state === "comment") return void this.appendToCommentData(this.sourceForNode(t));
|
|
1972
|
+
let r, { escaped: n, loc: a, strip: s } = t;
|
|
1973
|
+
if ("original" in t.path && t.path.original === "...attributes") throw E("Illegal use of ...attributes", this.source.spanFor(t.loc));
|
|
1974
|
+
if (tn(t.path)) r = y.mustache({ path: this.acceptNode(t.path), params: [], hash: y.hash({ pairs: [], loc: this.source.spanFor(t.path.loc).collapse("end") }), trusting: !n, loc: this.source.spanFor(a), strip: s });
|
|
1975
|
+
else {
|
|
1976
|
+
let { path: i, params: l, hash: h } = Ce(this, t);
|
|
1977
|
+
r = y.mustache({ path: i, params: l, hash: h, trusting: !n, loc: this.source.spanFor(a), strip: s });
|
|
1978
|
+
}
|
|
1979
|
+
switch (e.state) {
|
|
1980
|
+
case "tagOpen":
|
|
1981
|
+
case "tagName":
|
|
1982
|
+
throw E("Cannot use mustaches in an elements tagname", r.loc);
|
|
1983
|
+
case "beforeAttributeName":
|
|
1984
|
+
Se(this.currentStartTag, r);
|
|
1985
|
+
break;
|
|
1986
|
+
case "attributeName":
|
|
1987
|
+
case "afterAttributeName":
|
|
1988
|
+
this.beginAttributeValue(!1), this.finishAttributeValue(), Se(this.currentStartTag, r), e.transitionTo("beforeAttributeName");
|
|
1989
|
+
break;
|
|
1990
|
+
case "afterAttributeValueQuoted":
|
|
1991
|
+
Se(this.currentStartTag, r), e.transitionTo("beforeAttributeName");
|
|
1992
|
+
break;
|
|
1993
|
+
case "beforeAttributeValue":
|
|
1994
|
+
this.beginAttributeValue(!1), this.appendDynamicAttributeValuePart(r), e.transitionTo("attributeValueUnquoted");
|
|
1995
|
+
break;
|
|
1996
|
+
case "attributeValueDoubleQuoted":
|
|
1997
|
+
case "attributeValueSingleQuoted":
|
|
1998
|
+
case "attributeValueUnquoted":
|
|
1999
|
+
this.appendDynamicAttributeValuePart(r);
|
|
2000
|
+
break;
|
|
2001
|
+
default:
|
|
2002
|
+
wt(this.currentElement(), r);
|
|
2003
|
+
}
|
|
2004
|
+
return r;
|
|
2005
|
+
}
|
|
2006
|
+
appendDynamicAttributeValuePart(t) {
|
|
2007
|
+
this.finalizeTextPart();
|
|
2008
|
+
let e = this.currentAttr;
|
|
2009
|
+
e.isDynamic = !0, e.parts.push(t);
|
|
2010
|
+
}
|
|
2011
|
+
finalizeTextPart() {
|
|
2012
|
+
let t = this.currentAttr.currentPart;
|
|
2013
|
+
t !== null && (this.currentAttr.parts.push(t), this.startTextPart());
|
|
2014
|
+
}
|
|
2015
|
+
startTextPart() {
|
|
2016
|
+
this.currentAttr.currentPart = null;
|
|
2017
|
+
}
|
|
2018
|
+
ContentStatement(t) {
|
|
2019
|
+
(function(e, r) {
|
|
2020
|
+
let n = r.loc.start.line, a = r.loc.start.column, s = function(u, i) {
|
|
2021
|
+
if (i === "") return { lines: u.split(`
|
|
2022
|
+
`).length - 1, columns: 0 };
|
|
2023
|
+
let [l] = u.split(i), h = l.split(/\n/u), f = h.length - 1;
|
|
2024
|
+
return { lines: f, columns: h[f].length };
|
|
2025
|
+
}(r.original, r.value);
|
|
2026
|
+
n += s.lines, s.lines ? a = s.columns : a += s.columns, e.line = n, e.column = a;
|
|
2027
|
+
})(this.tokenizer, t), this.tokenizer.tokenizePart(t.value), this.tokenizer.flushData();
|
|
2028
|
+
}
|
|
2029
|
+
CommentStatement(t) {
|
|
2030
|
+
let { tokenizer: e } = this;
|
|
2031
|
+
if (e.state === "comment") return this.appendToCommentData(this.sourceForNode(t)), null;
|
|
2032
|
+
let { value: r, loc: n } = t, a = y.mustacheComment({ value: r, loc: this.source.spanFor(n) });
|
|
2033
|
+
switch (e.state) {
|
|
2034
|
+
case "beforeAttributeName":
|
|
2035
|
+
case "afterAttributeName":
|
|
2036
|
+
this.currentStartTag.comments.push(a);
|
|
2037
|
+
break;
|
|
2038
|
+
case "beforeData":
|
|
2039
|
+
case "data":
|
|
2040
|
+
wt(this.currentElement(), a);
|
|
2041
|
+
break;
|
|
2042
|
+
default:
|
|
2043
|
+
throw E(`Using a Handlebars comment when in the \`${e.state}\` state is not supported`, this.source.spanFor(t.loc));
|
|
2044
|
+
}
|
|
2045
|
+
return a;
|
|
2046
|
+
}
|
|
2047
|
+
PartialStatement(t) {
|
|
2048
|
+
throw E("Handlebars partials are not supported", this.source.spanFor(t.loc));
|
|
2049
|
+
}
|
|
2050
|
+
PartialBlockStatement(t) {
|
|
2051
|
+
throw E("Handlebars partial blocks are not supported", this.source.spanFor(t.loc));
|
|
2052
|
+
}
|
|
2053
|
+
Decorator(t) {
|
|
2054
|
+
throw E("Handlebars decorators are not supported", this.source.spanFor(t.loc));
|
|
2055
|
+
}
|
|
2056
|
+
DecoratorBlock(t) {
|
|
2057
|
+
throw E("Handlebars decorator blocks are not supported", this.source.spanFor(t.loc));
|
|
2058
|
+
}
|
|
2059
|
+
SubExpression(t) {
|
|
2060
|
+
let { path: e, params: r, hash: n } = Ce(this, t);
|
|
2061
|
+
return y.sexpr({ path: e, params: r, hash: n, loc: this.source.spanFor(t.loc) });
|
|
2062
|
+
}
|
|
2063
|
+
PathExpression(t) {
|
|
2064
|
+
let { original: e } = t, r;
|
|
2065
|
+
if (e.indexOf("/") !== -1) {
|
|
2066
|
+
if (e.slice(0, 2) === "./") throw E('Using "./" is not supported in Glimmer and unnecessary', this.source.spanFor(t.loc));
|
|
2067
|
+
if (e.slice(0, 3) === "../") throw E('Changing context using "../" is not supported in Glimmer', this.source.spanFor(t.loc));
|
|
2068
|
+
if (e.indexOf(".") !== -1) throw E("Mixing '.' and '/' in paths is not supported in Glimmer; use only '.' to separate property paths", this.source.spanFor(t.loc));
|
|
2069
|
+
r = [t.parts.join("/")];
|
|
2070
|
+
} else {
|
|
2071
|
+
if (e === ".") throw E("'.' is not a supported path in Glimmer; check for a path with a trailing '.'", this.source.spanFor(t.loc));
|
|
2072
|
+
r = t.parts;
|
|
2073
|
+
}
|
|
2074
|
+
let n, a = !1;
|
|
2075
|
+
if (/^this(?:\..+)?$/u.test(e) && (a = !0), a) n = y.this({ loc: this.source.spanFor({ start: t.loc.start, end: { line: t.loc.start.line, column: t.loc.start.column + 4 } }) });
|
|
2076
|
+
else if (t.data) {
|
|
2077
|
+
let s = r.shift();
|
|
2078
|
+
if (s === void 0) throw E("Attempted to parse a path expression, but it was not valid. Paths beginning with @ must start with a-z.", this.source.spanFor(t.loc));
|
|
2079
|
+
n = y.atName({ name: `@${s}`, loc: this.source.spanFor({ start: t.loc.start, end: { line: t.loc.start.line, column: t.loc.start.column + s.length + 1 } }) });
|
|
2080
|
+
} else {
|
|
2081
|
+
let s = r.shift();
|
|
2082
|
+
if (s === void 0) throw E("Attempted to parse a path expression, but it was not valid. Paths must start with a-z or A-Z.", this.source.spanFor(t.loc));
|
|
2083
|
+
n = y.var({ name: s, loc: this.source.spanFor({ start: t.loc.start, end: { line: t.loc.start.line, column: t.loc.start.column + s.length } }) });
|
|
2084
|
+
}
|
|
2085
|
+
return y.path({ head: n, tail: r, loc: this.source.spanFor(t.loc) });
|
|
2086
|
+
}
|
|
2087
|
+
Hash(t) {
|
|
2088
|
+
let e = t.pairs.map((r) => y.pair({ key: r.key, value: this.acceptNode(r.value), loc: this.source.spanFor(r.loc) }));
|
|
2089
|
+
return y.hash({ pairs: e, loc: this.source.spanFor(t.loc) });
|
|
2090
|
+
}
|
|
2091
|
+
StringLiteral(t) {
|
|
2092
|
+
return y.literal({ type: "StringLiteral", value: t.value, loc: this.source.spanFor(t.loc) });
|
|
2093
|
+
}
|
|
2094
|
+
BooleanLiteral(t) {
|
|
2095
|
+
return y.literal({ type: "BooleanLiteral", value: t.value, loc: this.source.spanFor(t.loc) });
|
|
2096
|
+
}
|
|
2097
|
+
NumberLiteral(t) {
|
|
2098
|
+
return y.literal({ type: "NumberLiteral", value: t.value, loc: this.source.spanFor(t.loc) });
|
|
2099
|
+
}
|
|
2100
|
+
UndefinedLiteral(t) {
|
|
2101
|
+
return y.literal({ type: "UndefinedLiteral", value: void 0, loc: this.source.spanFor(t.loc) });
|
|
2102
|
+
}
|
|
2103
|
+
NullLiteral(t) {
|
|
2104
|
+
return y.literal({ type: "NullLiteral", value: null, loc: this.source.spanFor(t.loc) });
|
|
2105
|
+
}
|
|
2106
|
+
constructor(...t) {
|
|
2107
|
+
super(...t), this.pendingError = null;
|
|
2108
|
+
}
|
|
2109
|
+
};
|
|
2110
|
+
function Ce(t, e) {
|
|
2111
|
+
let r;
|
|
2112
|
+
switch (e.path.type) {
|
|
2113
|
+
case "PathExpression":
|
|
2114
|
+
r = t.PathExpression(e.path);
|
|
2115
|
+
break;
|
|
2116
|
+
case "SubExpression":
|
|
2117
|
+
r = t.SubExpression(e.path);
|
|
2118
|
+
break;
|
|
2119
|
+
case "StringLiteral":
|
|
2120
|
+
case "UndefinedLiteral":
|
|
2121
|
+
case "NullLiteral":
|
|
2122
|
+
case "NumberLiteral":
|
|
2123
|
+
case "BooleanLiteral": {
|
|
2124
|
+
let s;
|
|
2125
|
+
throw s = e.path.type === "BooleanLiteral" ? e.path.original.toString() : e.path.type === "StringLiteral" ? `"${e.path.original}"` : e.path.type === "NullLiteral" ? "null" : e.path.type === "NumberLiteral" ? e.path.value.toString() : "undefined", E(`${e.path.type} "${e.path.type === "StringLiteral" ? e.path.original : s}" cannot be called as a sub-expression, replace (${s}) with ${s}`, t.source.spanFor(e.path.loc));
|
|
2126
|
+
}
|
|
2127
|
+
}
|
|
2128
|
+
let n = e.params.map((s) => t.acceptNode(s)), a = Vt(n) ? ze(n).loc : r.loc;
|
|
2129
|
+
return { path: r, params: n, hash: e.hash ? t.Hash(e.hash) : y.hash({ pairs: [], loc: t.source.spanFor(a).collapse("end") }) };
|
|
2130
|
+
}
|
|
2131
|
+
function Se(t, e) {
|
|
2132
|
+
let { path: r, params: n, hash: a, loc: s } = e;
|
|
2133
|
+
if (tn(r)) {
|
|
2134
|
+
let i = `{{${function(l) {
|
|
2135
|
+
return l.type === "UndefinedLiteral" ? "undefined" : JSON.stringify(l.value);
|
|
2136
|
+
}(r)}}}`;
|
|
2137
|
+
throw E(`In <${t.name} ... ${i} ..., ${i} is not a valid modifier`, e.loc);
|
|
2138
|
+
}
|
|
2139
|
+
let u = y.elementModifier({ path: r, params: n, hash: a, loc: s });
|
|
2140
|
+
t.modifiers.push(u);
|
|
2141
|
+
}
|
|
2142
|
+
function yr(t, e, r) {
|
|
2143
|
+
if (!e.program.loc) {
|
|
2144
|
+
let a = nt(0, e.program.body, 0), s = nt(0, e.program.body, -1);
|
|
2145
|
+
if (a && s) e.program.loc = { ...a.loc, end: s.loc.end };
|
|
2146
|
+
else {
|
|
2147
|
+
let u = t.spanFor(e.loc);
|
|
2148
|
+
e.program.loc = r.withEnd(u.getEnd());
|
|
2149
|
+
}
|
|
2150
|
+
}
|
|
2151
|
+
let n = t.spanFor(e.program.loc).getEnd();
|
|
2152
|
+
return e.inverse && !e.inverse.loc && (e.inverse.loc = n.collapsed()), e;
|
|
2153
|
+
}
|
|
2154
|
+
function Et(t) {
|
|
2155
|
+
return /[\t\n\f ]/u.test(t);
|
|
2156
|
+
}
|
|
2157
|
+
var Ha = class extends Ua {
|
|
2158
|
+
reset() {
|
|
2159
|
+
this.currentNode = null;
|
|
2160
|
+
}
|
|
2161
|
+
beginComment() {
|
|
2162
|
+
this.currentNode = { type: "CommentStatement", value: "", start: this.source.offsetFor(this.tagOpenLine, this.tagOpenColumn) };
|
|
2163
|
+
}
|
|
2164
|
+
appendToCommentData(t) {
|
|
2165
|
+
this.currentComment.value += t;
|
|
2166
|
+
}
|
|
2167
|
+
finishComment() {
|
|
2168
|
+
wt(this.currentElement(), y.comment(this.finish(this.currentComment)));
|
|
2169
|
+
}
|
|
2170
|
+
beginData() {
|
|
2171
|
+
this.currentNode = { type: "TextNode", chars: "", start: this.offset() };
|
|
2172
|
+
}
|
|
2173
|
+
appendToData(t) {
|
|
2174
|
+
this.currentData.chars += t;
|
|
2175
|
+
}
|
|
2176
|
+
finishData() {
|
|
2177
|
+
wt(this.currentElement(), y.text(this.finish(this.currentData)));
|
|
2178
|
+
}
|
|
2179
|
+
tagOpen() {
|
|
2180
|
+
this.tagOpenLine = this.tokenizer.line, this.tagOpenColumn = this.tokenizer.column;
|
|
2181
|
+
}
|
|
2182
|
+
beginStartTag() {
|
|
2183
|
+
this.currentNode = { type: "StartTag", name: "", nameStart: null, nameEnd: null, attributes: [], modifiers: [], comments: [], params: [], selfClosing: !1, start: this.source.offsetFor(this.tagOpenLine, this.tagOpenColumn) };
|
|
2184
|
+
}
|
|
2185
|
+
beginEndTag() {
|
|
2186
|
+
this.currentNode = { type: "EndTag", name: "", start: this.source.offsetFor(this.tagOpenLine, this.tagOpenColumn) };
|
|
2187
|
+
}
|
|
2188
|
+
finishTag() {
|
|
2189
|
+
let t = this.finish(this.currentTag);
|
|
2190
|
+
if (t.type === "StartTag") {
|
|
2191
|
+
if (this.finishStartTag(), t.name === ":") throw E("Invalid named block named detected, you may have created a named block without a name, or you may have began your name with a number. Named blocks must have names that are at least one character long, and begin with a lower case letter", this.source.spanFor({ start: this.currentTag.start.toJSON(), end: this.offset().toJSON() }));
|
|
2192
|
+
(te.has(t.name) || t.selfClosing) && this.finishEndTag(!0);
|
|
2193
|
+
} else t.type, t.type, this.finishEndTag(!1);
|
|
2194
|
+
}
|
|
2195
|
+
finishStartTag() {
|
|
2196
|
+
let { name: t, nameStart: e, nameEnd: r } = this.currentStartTag, n = e.until(r), [a, ...s] = t.split("."), u = y.path({ head: y.head({ original: a, loc: n.sliceStartChars({ chars: a.length }) }), tail: s, loc: n }), { attributes: i, modifiers: l, comments: h, params: f, selfClosing: m, loc: A } = this.finish(this.currentStartTag), d = y.element({ path: u, selfClosing: m, attributes: i, modifiers: l, comments: h, params: f, children: [], openTag: A, closeTag: m ? null : q.broken(), loc: A });
|
|
2197
|
+
this.elementStack.push(d);
|
|
2198
|
+
}
|
|
2199
|
+
finishEndTag(t) {
|
|
2200
|
+
let { start: e } = this.currentTag, r = this.finish(this.currentTag), n = this.elementStack.pop();
|
|
2201
|
+
this.validateEndTag(r, n, t);
|
|
2202
|
+
let a = this.currentElement();
|
|
2203
|
+
t ? n.closeTag = null : n.selfClosing ? n.closeTag : n.closeTag = e.until(this.offset()), n.loc = n.loc.withEnd(this.offset()), wt(a, y.element(n));
|
|
2204
|
+
}
|
|
2205
|
+
markTagAsSelfClosing() {
|
|
2206
|
+
let t = this.currentTag;
|
|
2207
|
+
if (t.type !== "StartTag") throw E("Invalid end tag: closing tag must not be self-closing", this.source.spanFor({ start: t.start.toJSON(), end: this.offset().toJSON() }));
|
|
2208
|
+
t.selfClosing = !0;
|
|
2209
|
+
}
|
|
2210
|
+
appendToTagName(t) {
|
|
2211
|
+
let e = this.currentTag;
|
|
2212
|
+
if (e.name += t, e.type === "StartTag") {
|
|
2213
|
+
let r = this.offset();
|
|
2214
|
+
e.nameStart === null && (e.nameEnd, e.nameStart = r.move(-1)), e.nameEnd = r;
|
|
2215
|
+
}
|
|
2216
|
+
}
|
|
2217
|
+
beginAttribute() {
|
|
2218
|
+
let t = this.offset();
|
|
2219
|
+
this.currentAttribute = { name: "", parts: [], currentPart: null, isQuoted: !1, isDynamic: !1, start: t, valueSpan: t.collapsed() };
|
|
2220
|
+
}
|
|
2221
|
+
appendToAttributeName(t) {
|
|
2222
|
+
this.currentAttr.name += t, this.currentAttr.name === "as" && this.parsePossibleBlockParams();
|
|
2223
|
+
}
|
|
2224
|
+
beginAttributeValue(t) {
|
|
2225
|
+
this.currentAttr.isQuoted = t, this.startTextPart(), this.currentAttr.valueSpan = this.offset().collapsed();
|
|
2226
|
+
}
|
|
2227
|
+
appendToAttributeValue(t) {
|
|
2228
|
+
let e = this.currentAttr.parts, r = e[e.length - 1], n = this.currentAttr.currentPart;
|
|
2229
|
+
if (n) n.chars += t, n.loc = n.loc.withEnd(this.offset());
|
|
2230
|
+
else {
|
|
2231
|
+
let a = this.offset();
|
|
2232
|
+
a = t === `
|
|
2233
|
+
` ? r ? r.loc.getEnd() : this.currentAttr.valueSpan.getStart() : a.move(-1), this.currentAttr.currentPart = y.text({ chars: t, loc: a.collapsed() });
|
|
2234
|
+
}
|
|
2235
|
+
}
|
|
2236
|
+
finishAttributeValue() {
|
|
2237
|
+
this.finalizeTextPart();
|
|
2238
|
+
let t = this.currentTag, e = this.offset();
|
|
2239
|
+
if (t.type === "EndTag") throw E("Invalid end tag: closing tag must not have attributes", this.source.spanFor({ start: t.start.toJSON(), end: e.toJSON() }));
|
|
2240
|
+
let { name: r, parts: n, start: a, isQuoted: s, isDynamic: u, valueSpan: i } = this.currentAttr;
|
|
2241
|
+
if (r.startsWith("|") && n.length === 0 && !s && !u) throw E("Invalid block parameters syntax: block parameters must be preceded by the `as` keyword", a.until(a.move(r.length)));
|
|
2242
|
+
let l = this.assembleAttributeValue(n, s, u, a.until(e));
|
|
2243
|
+
l.loc = i.withEnd(e);
|
|
2244
|
+
let h = y.attr({ name: r, value: l, loc: a.until(e) });
|
|
2245
|
+
this.currentStartTag.attributes.push(h);
|
|
2246
|
+
}
|
|
2247
|
+
parsePossibleBlockParams() {
|
|
2248
|
+
let t = /[!"#%&'()*+./;<=>@[\\\]^`{|}~]/u;
|
|
2249
|
+
this.tokenizer.state;
|
|
2250
|
+
let e = this.currentStartTag, r = this.currentAttr, n = { state: "PossibleAs" }, a = { PossibleAs: (u) => {
|
|
2251
|
+
if (n.state, Et(u)) n = { state: "BeforeStartPipe" }, this.tokenizer.transitionTo("afterAttributeName"), this.tokenizer.consume();
|
|
2252
|
+
else {
|
|
2253
|
+
if (u === "|") throw E('Invalid block parameters syntax: expecting at least one space character between "as" and "|"', r.start.until(this.offset().move(1)));
|
|
2254
|
+
n = { state: "Done" };
|
|
2255
|
+
}
|
|
2256
|
+
}, BeforeStartPipe: (u) => {
|
|
2257
|
+
n.state, Et(u) ? this.tokenizer.consume() : u === "|" ? (n = { state: "BeforeBlockParamName" }, this.tokenizer.transitionTo("beforeAttributeName"), this.tokenizer.consume()) : n = { state: "Done" };
|
|
2258
|
+
}, BeforeBlockParamName: (u) => {
|
|
2259
|
+
if (n.state, Et(u)) this.tokenizer.consume();
|
|
2260
|
+
else if (u === "") n = { state: "Done" }, this.pendingError = { mustache(i) {
|
|
2261
|
+
throw E("Invalid block parameters syntax: mustaches cannot be used inside parameters list", i);
|
|
2262
|
+
}, eof(i) {
|
|
2263
|
+
throw E('Invalid block parameters syntax: expecting the tag to be closed with ">" or "/>" after parameters list', r.start.until(i));
|
|
2264
|
+
} };
|
|
2265
|
+
else if (u === "|") {
|
|
2266
|
+
if (e.params.length === 0) throw E("Invalid block parameters syntax: empty parameters list, expecting at least one identifier", r.start.until(this.offset().move(1)));
|
|
2267
|
+
n = { state: "AfterEndPipe" }, this.tokenizer.consume();
|
|
2268
|
+
} else {
|
|
2269
|
+
if (u === ">" || u === "/") throw E('Invalid block parameters syntax: incomplete parameters list, expecting "|" but the tag was closed prematurely', r.start.until(this.offset().move(1)));
|
|
2270
|
+
n = { state: "BlockParamName", name: u, start: this.offset() }, this.tokenizer.consume();
|
|
2271
|
+
}
|
|
2272
|
+
}, BlockParamName: (u) => {
|
|
2273
|
+
if (n.state, u === "") n = { state: "Done" }, this.pendingError = { mustache(i) {
|
|
2274
|
+
throw E("Invalid block parameters syntax: mustaches cannot be used inside parameters list", i);
|
|
2275
|
+
}, eof(i) {
|
|
2276
|
+
throw E('Invalid block parameters syntax: expecting the tag to be closed with ">" or "/>" after parameters list', r.start.until(i));
|
|
2277
|
+
} };
|
|
2278
|
+
else if (u === "|" || Et(u)) {
|
|
2279
|
+
let i = n.start.until(this.offset());
|
|
2280
|
+
if (n.name === "this" || t.test(n.name)) throw E(`Invalid block parameters syntax: invalid identifier name \`${n.name}\``, i);
|
|
2281
|
+
e.params.push(y.var({ name: n.name, loc: i })), n = u === "|" ? { state: "AfterEndPipe" } : { state: "BeforeBlockParamName" }, this.tokenizer.consume();
|
|
2282
|
+
} else {
|
|
2283
|
+
if (u === ">" || u === "/") throw E('Invalid block parameters syntax: expecting "|" but the tag was closed prematurely', r.start.until(this.offset().move(1)));
|
|
2284
|
+
n.name += u, this.tokenizer.consume();
|
|
2285
|
+
}
|
|
2286
|
+
}, AfterEndPipe: (u) => {
|
|
2287
|
+
n.state, Et(u) ? this.tokenizer.consume() : u === "" ? (n = { state: "Done" }, this.pendingError = { mustache(i) {
|
|
2288
|
+
throw E("Invalid block parameters syntax: modifiers cannot follow parameters list", i);
|
|
2289
|
+
}, eof(i) {
|
|
2290
|
+
throw E('Invalid block parameters syntax: expecting the tag to be closed with ">" or "/>" after parameters list', r.start.until(i));
|
|
2291
|
+
} }) : u === ">" || u === "/" ? n = { state: "Done" } : (n = { state: "Error", message: 'Invalid block parameters syntax: expecting the tag to be closed with ">" or "/>" after parameters list', start: this.offset() }, this.tokenizer.consume());
|
|
2292
|
+
}, Error: (u) => {
|
|
2293
|
+
if (n.state, u === "" || u === "/" || u === ">" || Et(u)) throw E(n.message, n.start.until(this.offset()));
|
|
2294
|
+
this.tokenizer.consume();
|
|
2295
|
+
}, Done: () => {
|
|
2296
|
+
} }, s;
|
|
2297
|
+
do
|
|
2298
|
+
s = this.tokenizer.peek(), a[n.state](s);
|
|
2299
|
+
while (n.state !== "Done" && s !== "");
|
|
2300
|
+
n.state;
|
|
2301
|
+
}
|
|
2302
|
+
reportSyntaxError(t) {
|
|
2303
|
+
throw E(t, this.offset().collapsed());
|
|
2304
|
+
}
|
|
2305
|
+
assembleConcatenatedValue(t) {
|
|
2306
|
+
let e = xa(t), r = ze(t);
|
|
2307
|
+
return y.concat({ parts: t, loc: this.source.spanFor(e.loc).extend(this.source.spanFor(r.loc)) });
|
|
2308
|
+
}
|
|
2309
|
+
validateEndTag(t, e, r) {
|
|
2310
|
+
if (te.has(t.name) && !r) throw E(`<${t.name}> elements do not need end tags. You should remove it`, t.loc);
|
|
2311
|
+
if (e.type !== "ElementNode") throw E(`Closing tag </${t.name}> without an open tag`, t.loc);
|
|
2312
|
+
if (e.tag !== t.name) throw E(`Closing tag </${t.name}> did not match last open tag <${e.tag}> (on line ${e.loc.startPosition.line})`, t.loc);
|
|
2313
|
+
}
|
|
2314
|
+
assembleAttributeValue(t, e, r, n) {
|
|
2315
|
+
if (r) {
|
|
2316
|
+
if (e) return this.assembleConcatenatedValue(t);
|
|
2317
|
+
{
|
|
2318
|
+
let [a, s] = t;
|
|
2319
|
+
if (s === void 0 || s.type === "TextNode" && s.chars === "/") return a;
|
|
2320
|
+
throw E("An unquoted attribute value must be a string or a mustache, preceded by whitespace or a '=' character, and followed by whitespace, a '>' character, or '/>'", n);
|
|
2321
|
+
}
|
|
2322
|
+
}
|
|
2323
|
+
return Vt(t) ? t[0] : y.text({ chars: "", loc: n });
|
|
2324
|
+
}
|
|
2325
|
+
constructor(...t) {
|
|
2326
|
+
super(...t), this.tagOpenLine = 0, this.tagOpenColumn = 0;
|
|
2327
|
+
}
|
|
2328
|
+
}, za = {}, Ma = class extends Wr {
|
|
2329
|
+
constructor() {
|
|
2330
|
+
super({});
|
|
2331
|
+
}
|
|
2332
|
+
parse() {
|
|
2333
|
+
}
|
|
2334
|
+
};
|
|
2335
|
+
function ja(t, e = {}) {
|
|
2336
|
+
var l, h, f;
|
|
2337
|
+
let r, n, a, s = e.mode || "precompile";
|
|
2338
|
+
typeof t == "string" ? (r = new _t(t, (l = e.meta) == null ? void 0 : l.moduleName), n = s === "codemod" ? xe(t, e.parseOptions) : or(t, e.parseOptions)) : t instanceof _t ? (r = t, n = s === "codemod" ? xe(t.source, e.parseOptions) : or(t.source, e.parseOptions)) : (r = new _t("", (h = e.meta) == null ? void 0 : h.moduleName), n = t), s === "codemod" && (a = new Ma());
|
|
2339
|
+
let u = q.forCharPositions(r, 0, r.source.length);
|
|
2340
|
+
n.loc = { source: "(program)", start: u.startPosition, end: u.endPosition };
|
|
2341
|
+
let i = new Ha(r, a, s).parse(n, e.locals ?? []);
|
|
2342
|
+
if ((f = e.plugins) != null && f.ast) for (let m of e.plugins.ast) Ra(i, m(Mr({}, e, { syntax: za }, { plugins: void 0 })).visitor);
|
|
2343
|
+
return i;
|
|
2344
|
+
}
|
|
2345
|
+
var Ga = ta(Qr), Wa = Ga, Ot = (t) => t.loc.start.offset, Le = (t) => t.loc.end.offset, Ka = new Set(Ba());
|
|
2346
|
+
function rn(t) {
|
|
2347
|
+
return t.toUpperCase() === t;
|
|
2348
|
+
}
|
|
2349
|
+
function Ja(t) {
|
|
2350
|
+
return t.type === "ElementNode" && typeof t.tag == "string" && !t.tag.startsWith(":") && (rn(t.tag[0]) || t.tag.includes("."));
|
|
2351
|
+
}
|
|
2352
|
+
function Qa(t) {
|
|
2353
|
+
return Ka.has(t.toLowerCase()) && !rn(t[0]);
|
|
2354
|
+
}
|
|
2355
|
+
function nn(t) {
|
|
2356
|
+
return t.selfClosing === !0 || Qa(t.tag) || Ja(t) && t.children.every((e) => We(e));
|
|
2357
|
+
}
|
|
2358
|
+
function We(t) {
|
|
2359
|
+
return t.type === "TextNode" && !/\S/u.test(t.chars);
|
|
2360
|
+
}
|
|
2361
|
+
function br(t) {
|
|
2362
|
+
return (t == null ? void 0 : t.type) === "MustacheCommentStatement" && typeof t.value == "string" && t.value.trim() === "prettier-ignore";
|
|
2363
|
+
}
|
|
2364
|
+
function Ya(t) {
|
|
2365
|
+
return br(t.node) || t.isInArray && (t.key === "children" || t.key === "body" || t.key === "parts") && br(t.siblings[t.index - 2]);
|
|
2366
|
+
}
|
|
2367
|
+
var an = 2;
|
|
2368
|
+
function Za(t, e, r) {
|
|
2369
|
+
var a, s, u, i, l, h, f, m, A;
|
|
2370
|
+
let { node: n } = t;
|
|
2371
|
+
switch (n.type) {
|
|
2372
|
+
case "Block":
|
|
2373
|
+
case "Program":
|
|
2374
|
+
case "Template":
|
|
2375
|
+
return O(t.map(r, "body"));
|
|
2376
|
+
case "ElementNode": {
|
|
2377
|
+
let d = e.htmlWhitespaceSensitivity !== "ignore", v = [!d && ((a = t.previous) == null ? void 0 : a.type) === "ElementNode" ? j : "", O([ts(t, r)])];
|
|
2378
|
+
if (nn(n)) return [v];
|
|
2379
|
+
let w = ["</", n.tag, ">"], S = n.tag === "style";
|
|
2380
|
+
if (n.children.length === 0 || (!d || S) && n.children.every((x) => We(x))) return [v, w];
|
|
2381
|
+
let B = t.map(r, "children");
|
|
2382
|
+
return S || !d ? [v, G([j, ...B]), j, w] : [v, G(O(B)), w];
|
|
2383
|
+
}
|
|
2384
|
+
case "BlockStatement":
|
|
2385
|
+
return on(t) ? [is(t, r), Er(t, e, r), vr(t, e, r)] : [as(t, r), O([Er(t, e, r), vr(t, e, r), os(t, e, r)])];
|
|
2386
|
+
case "ElementModifierStatement":
|
|
2387
|
+
return O(["{{", Sr(t, r), "}}"]);
|
|
2388
|
+
case "MustacheStatement":
|
|
2389
|
+
return O([se(n), Sr(t, r), ue(n)]);
|
|
2390
|
+
case "SubExpression":
|
|
2391
|
+
return O(["(", fs(t, r), j, ")"]);
|
|
2392
|
+
case "AttrNode": {
|
|
2393
|
+
let { name: d, value: v } = n, w = v.type === "TextNode";
|
|
2394
|
+
if (w && v.chars === "" && Ot(v) === Le(v)) return d;
|
|
2395
|
+
let S = w ? we(v.chars, e.singleQuote) : v.type === "ConcatStatement" ? we(v.parts.map((x) => x.type === "TextNode" ? x.chars : "").join(""), e.singleQuote) : "", B = r("value");
|
|
2396
|
+
return [d, "=", S, d === "class" && S ? O(G(B)) : B, S];
|
|
2397
|
+
}
|
|
2398
|
+
case "ConcatStatement":
|
|
2399
|
+
return t.map(r, "parts");
|
|
2400
|
+
case "Hash":
|
|
2401
|
+
return Rt(N, t.map(r, "pairs"));
|
|
2402
|
+
case "HashPair":
|
|
2403
|
+
return [n.key, "=", r("value")];
|
|
2404
|
+
case "TextNode": {
|
|
2405
|
+
let d = n.chars, { parent: v } = t;
|
|
2406
|
+
if (v.type === "ElementNode") {
|
|
2407
|
+
if (v.tag === "pre") return be(d);
|
|
2408
|
+
if (v.tag === "style") return d = Zt(0, d, /^\n+/gu, ""), d = M.trimEnd(d), d = M.dedentString(d), be(d, Tt);
|
|
2409
|
+
}
|
|
2410
|
+
d = Zt(0, d, "{{", "\\{{");
|
|
2411
|
+
let w = ls(t);
|
|
2412
|
+
if (w) {
|
|
2413
|
+
if (w === "class") {
|
|
2414
|
+
let tt = d.trim().split(/\s+/u).join(" "), lt = !1, Y = !1;
|
|
2415
|
+
return t.parent.type === "ConcatStatement" && (((s = t.previous) == null ? void 0 : s.type) === "MustacheStatement" && /^\s/u.test(d) && (lt = !0), ((u = t.next) == null ? void 0 : u.type) === "MustacheStatement" && /\s$/u.test(d) && tt !== "" && (Y = !0)), [lt ? N : "", tt, Y ? N : ""];
|
|
2416
|
+
}
|
|
2417
|
+
return be(d);
|
|
2418
|
+
}
|
|
2419
|
+
let S = M.isWhitespaceOnly(d), { isFirst: B, isLast: x } = t;
|
|
2420
|
+
if (e.htmlWhitespaceSensitivity !== "ignore") {
|
|
2421
|
+
let tt = x && t.parent.type === "Template", lt = B && t.parent.type === "Template";
|
|
2422
|
+
if (S) {
|
|
2423
|
+
if (lt || tt) return "";
|
|
2424
|
+
let _ = [N], z = Ct(d);
|
|
2425
|
+
return z && (_ = Ft(z)), x && (_ = _.map(($t) => rr($t))), _;
|
|
2426
|
+
}
|
|
2427
|
+
let Y = M.getLeadingWhitespace(d), mt = [];
|
|
2428
|
+
if (Y) {
|
|
2429
|
+
mt = [N];
|
|
2430
|
+
let _ = Ct(Y);
|
|
2431
|
+
_ && (mt = Ft(_)), d = d.slice(Y.length);
|
|
2432
|
+
}
|
|
2433
|
+
let gt = M.getTrailingWhitespace(d), Z = [];
|
|
2434
|
+
if (gt) {
|
|
2435
|
+
if (!tt) {
|
|
2436
|
+
Z = [N];
|
|
2437
|
+
let _ = Ct(gt);
|
|
2438
|
+
_ && (Z = Ft(_)), x && (Z = Z.map((z) => rr(z)));
|
|
2439
|
+
}
|
|
2440
|
+
d = d.slice(0, -gt.length);
|
|
2441
|
+
}
|
|
2442
|
+
return [...mt, nr(Cr(d)), ...Z];
|
|
2443
|
+
}
|
|
2444
|
+
let P = Ct(d), R = cs(d), V = hs(d);
|
|
2445
|
+
if ((B || x) && S && (t.parent.type === "Block" || t.parent.type === "ElementNode" || t.parent.type === "Template")) return "";
|
|
2446
|
+
S && P ? (R = Math.min(P, an), V = 0) : ((((i = t.next) == null ? void 0 : i.type) === "BlockStatement" || ((l = t.next) == null ? void 0 : l.type) === "ElementNode") && (V = Math.max(V, 1)), (((h = t.previous) == null ? void 0 : h.type) === "BlockStatement" || ((f = t.previous) == null ? void 0 : f.type) === "ElementNode") && (R = Math.max(R, 1)));
|
|
2447
|
+
let ot = "", H = "";
|
|
2448
|
+
return V === 0 && ((m = t.next) == null ? void 0 : m.type) === "MustacheStatement" && (H = " "), R === 0 && ((A = t.previous) == null ? void 0 : A.type) === "MustacheStatement" && (ot = " "), B && (R = 0, ot = ""), x && (V = 0, H = ""), M.hasLeadingWhitespace(d) && (d = ot + M.trimStart(d)), M.hasTrailingWhitespace(d) && (d = M.trimEnd(d) + H), [...Ft(R), nr(Cr(d)), ...Ft(V)];
|
|
2449
|
+
}
|
|
2450
|
+
case "MustacheCommentStatement": {
|
|
2451
|
+
let d = Ot(n), v = Le(n), w = e.originalText.charAt(d + 2) === "~", S = e.originalText.charAt(v - 3) === "~", B = n.value.includes("}}") ? "--" : "";
|
|
2452
|
+
return ["{{", w ? "~" : "", "!", B, n.value, B, S ? "~" : "", "}}"];
|
|
2453
|
+
}
|
|
2454
|
+
case "PathExpression":
|
|
2455
|
+
return bs(n);
|
|
2456
|
+
case "BooleanLiteral":
|
|
2457
|
+
return String(n.value);
|
|
2458
|
+
case "CommentStatement":
|
|
2459
|
+
return ["<!--", n.value, "-->"];
|
|
2460
|
+
case "StringLiteral":
|
|
2461
|
+
return ps(t, e);
|
|
2462
|
+
case "NumberLiteral":
|
|
2463
|
+
return String(n.value);
|
|
2464
|
+
case "UndefinedLiteral":
|
|
2465
|
+
return "undefined";
|
|
2466
|
+
case "NullLiteral":
|
|
2467
|
+
return "null";
|
|
2468
|
+
case "FrontMatter":
|
|
2469
|
+
case "AtHead":
|
|
2470
|
+
case "VarHead":
|
|
2471
|
+
case "ThisHead":
|
|
2472
|
+
default:
|
|
2473
|
+
throw new Wn(n, "Handlebars");
|
|
2474
|
+
}
|
|
2475
|
+
}
|
|
2476
|
+
function Xa(t, e) {
|
|
2477
|
+
return Ot(t) - Ot(e);
|
|
2478
|
+
}
|
|
2479
|
+
function ts(t, e) {
|
|
2480
|
+
let { node: r } = t, n = ["attributes", "modifiers", "comments"].filter((s) => Xt(r[s])), a = n.flatMap((s) => r[s]).sort(Xa);
|
|
2481
|
+
for (let s of n) t.each(({ node: u }) => {
|
|
2482
|
+
let i = a.indexOf(u);
|
|
2483
|
+
a.splice(i, 1, [N, e()]);
|
|
2484
|
+
}, s);
|
|
2485
|
+
return Xt(r.blockParams) && a.push(N, Je(r)), ["<", r.tag, G(a), es(r)];
|
|
2486
|
+
}
|
|
2487
|
+
function es(t) {
|
|
2488
|
+
return nn(t) ? ar([j, "/>"], [" />", j]) : ar([j, ">"], ">");
|
|
2489
|
+
}
|
|
2490
|
+
function se(t) {
|
|
2491
|
+
var n;
|
|
2492
|
+
let e = t.trusting ? "{{{" : "{{", r = (n = t.strip) != null && n.open ? "~" : "";
|
|
2493
|
+
return [e, r];
|
|
2494
|
+
}
|
|
2495
|
+
function ue(t) {
|
|
2496
|
+
var r;
|
|
2497
|
+
let e = t.trusting ? "}}}" : "}}";
|
|
2498
|
+
return [(r = t.strip) != null && r.close ? "~" : "", e];
|
|
2499
|
+
}
|
|
2500
|
+
function rs(t) {
|
|
2501
|
+
let e = se(t), r = t.openStrip.open ? "~" : "";
|
|
2502
|
+
return [e, r, "#"];
|
|
2503
|
+
}
|
|
2504
|
+
function ns(t) {
|
|
2505
|
+
let e = ue(t);
|
|
2506
|
+
return [t.openStrip.close ? "~" : "", e];
|
|
2507
|
+
}
|
|
2508
|
+
function Ar(t) {
|
|
2509
|
+
let e = se(t), r = t.closeStrip.open ? "~" : "";
|
|
2510
|
+
return [e, r, "/"];
|
|
2511
|
+
}
|
|
2512
|
+
function Dr(t) {
|
|
2513
|
+
let e = ue(t);
|
|
2514
|
+
return [t.closeStrip.close ? "~" : "", e];
|
|
2515
|
+
}
|
|
2516
|
+
function sn(t) {
|
|
2517
|
+
let e = se(t), r = t.inverseStrip.open ? "~" : "";
|
|
2518
|
+
return [e, r];
|
|
2519
|
+
}
|
|
2520
|
+
function un(t) {
|
|
2521
|
+
let e = ue(t);
|
|
2522
|
+
return [t.inverseStrip.close ? "~" : "", e];
|
|
2523
|
+
}
|
|
2524
|
+
function as(t, e) {
|
|
2525
|
+
let { node: r } = t, n = [], a = ie(t, e);
|
|
2526
|
+
return a && n.push(O(a)), Xt(r.program.blockParams) && n.push(Je(r.program)), O([rs(r), Ke(t, e), n.length > 0 ? G([N, Rt(N, n)]) : "", j, ns(r)]);
|
|
2527
|
+
}
|
|
2528
|
+
function ss(t, e) {
|
|
2529
|
+
return [e.htmlWhitespaceSensitivity === "ignore" ? Tt : "", sn(t), "else", un(t)];
|
|
2530
|
+
}
|
|
2531
|
+
var us = ({ path: t }, { path: e }) => [t, e].every((r) => r.type === "PathExpression" && r.head.type === "VarHead") && t.head.name === e.head.name;
|
|
2532
|
+
function on(t) {
|
|
2533
|
+
if (!t.match((r) => r.type === "BlockStatement", (r, n) => n === "body" && r.type === "Block" && r.body.length === 1, (r, n) => n === "inverse" && r.type === "BlockStatement")) return !1;
|
|
2534
|
+
let { node: e } = t;
|
|
2535
|
+
return e.path.type === "PathExpression" && e.path.head.type === "VarHead" && e.path.head.name === "if" || us(e, t.grandparent);
|
|
2536
|
+
}
|
|
2537
|
+
function is(t, e) {
|
|
2538
|
+
let { node: r, grandparent: n } = t;
|
|
2539
|
+
return O([sn(n), ["else", " ", n.inverse.body[0].path.head.name], G([N, O(ie(t, e)), ...Xt(r.program.blockParams) ? [N, Je(r.program)] : []]), j, un(n)]);
|
|
2540
|
+
}
|
|
2541
|
+
function os(t, e, r) {
|
|
2542
|
+
let { node: n } = t;
|
|
2543
|
+
return e.htmlWhitespaceSensitivity === "ignore" ? [ln(n) ? j : Tt, Ar(n), r("path"), Dr(n)] : [Ar(n), r("path"), Dr(n)];
|
|
2544
|
+
}
|
|
2545
|
+
function ln(t) {
|
|
2546
|
+
return t.type === "BlockStatement" && t.program.body.every((e) => We(e));
|
|
2547
|
+
}
|
|
2548
|
+
function Er(t, e, r) {
|
|
2549
|
+
let { node: n } = t;
|
|
2550
|
+
if (ln(n)) return "";
|
|
2551
|
+
let a = r("program");
|
|
2552
|
+
return e.htmlWhitespaceSensitivity === "ignore" ? G([Tt, a]) : G(a);
|
|
2553
|
+
}
|
|
2554
|
+
function vr(t, e, r) {
|
|
2555
|
+
let { node: n } = t;
|
|
2556
|
+
if (!n.inverse) return "";
|
|
2557
|
+
let a = r("inverse"), s = e.htmlWhitespaceSensitivity === "ignore" ? [Tt, a] : a;
|
|
2558
|
+
return t.call(on, "inverse", "body", 0) ? s : [ss(n, e), G(s)];
|
|
2559
|
+
}
|
|
2560
|
+
function Cr(t) {
|
|
2561
|
+
return Rt(N, M.split(t));
|
|
2562
|
+
}
|
|
2563
|
+
function ls(t) {
|
|
2564
|
+
for (let e = 0; e < 2; e++) {
|
|
2565
|
+
let r = t.getParentNode(e);
|
|
2566
|
+
if ((r == null ? void 0 : r.type) === "AttrNode") return r.name.toLowerCase();
|
|
2567
|
+
}
|
|
2568
|
+
}
|
|
2569
|
+
function Ct(t) {
|
|
2570
|
+
return t = typeof t == "string" ? t : "", t.split(`
|
|
2571
|
+
`).length - 1;
|
|
2572
|
+
}
|
|
2573
|
+
function cs(t) {
|
|
2574
|
+
t = typeof t == "string" ? t : "";
|
|
2575
|
+
let e = (t.match(/^([^\S\n\r]*[\n\r])+/gu) || [])[0] || "";
|
|
2576
|
+
return Ct(e);
|
|
2577
|
+
}
|
|
2578
|
+
function hs(t) {
|
|
2579
|
+
t = typeof t == "string" ? t : "";
|
|
2580
|
+
let e = (t.match(/([\n\r][^\S\n\r]*)+$/gu) || [])[0] || "";
|
|
2581
|
+
return Ct(e);
|
|
2582
|
+
}
|
|
2583
|
+
function Ft(t = 0) {
|
|
2584
|
+
return Array.from({ length: Math.min(t, an) }).fill(Tt);
|
|
2585
|
+
}
|
|
2586
|
+
function ps(t, e) {
|
|
2587
|
+
let { node: { value: r } } = t, n = we(r, ds(t) ? !e.singleQuote : e.singleQuote);
|
|
2588
|
+
return [n, Zt(0, r, n, `\\${n}`), n];
|
|
2589
|
+
}
|
|
2590
|
+
function ds(t) {
|
|
2591
|
+
let { ancestors: e } = t, r = e.findIndex((n) => n.type !== "SubExpression");
|
|
2592
|
+
return r !== -1 && e[r + 1].type === "ConcatStatement" && e[r + 2].type === "AttrNode";
|
|
2593
|
+
}
|
|
2594
|
+
function fs(t, e) {
|
|
2595
|
+
let r = Ke(t, e), n = ie(t, e);
|
|
2596
|
+
return n ? G([r, N, O(n)]) : r;
|
|
2597
|
+
}
|
|
2598
|
+
function Sr(t, e) {
|
|
2599
|
+
let r = Ke(t, e), n = ie(t, e);
|
|
2600
|
+
return n ? [G([r, N, n]), j] : r;
|
|
2601
|
+
}
|
|
2602
|
+
function Ke(t, e) {
|
|
2603
|
+
return e("path");
|
|
2604
|
+
}
|
|
2605
|
+
function ie(t, e) {
|
|
2606
|
+
var a;
|
|
2607
|
+
let { node: r } = t, n = [];
|
|
2608
|
+
return r.params.length > 0 && n.push(...t.map(e, "params")), ((a = r.hash) == null ? void 0 : a.pairs.length) > 0 && n.push(e("hash")), n.length === 0 ? "" : Rt(N, n);
|
|
2609
|
+
}
|
|
2610
|
+
function Je(t) {
|
|
2611
|
+
return ["as |", t.blockParams.join(" "), "|"];
|
|
2612
|
+
}
|
|
2613
|
+
var ms = new Set("!\"#%&'()*+,./;<=>@[\\]^`{|}~"), gs = /* @__PURE__ */ new Set(["true", "false", "null", "undefined"]), ys = (t, e) => e === 0 && t.startsWith("@") ? !1 : e !== 0 && gs.has(t) || /\s/u.test(t) || /^\d/u.test(t) || Array.prototype.some.call(t, (r) => ms.has(r));
|
|
2614
|
+
function bs(t) {
|
|
2615
|
+
return t.tail.length === 0 && t.original.includes("/") ? t.original : [t.head.original, ...t.tail].map((e, r) => ys(e, r) ? `[${e}]` : e).join(".");
|
|
2616
|
+
}
|
|
2617
|
+
var As = { features: { experimental_frontMatterSupport: { massageAstNode: !0, embed: !0, print: !0 } }, print: Za, massageAstNode: Kn, hasPrettierIgnore: Ya, getVisitorKeys: Wa, embed: Qn }, Ds = As, Es = [{ name: "Handlebars", type: "markup", aceMode: "handlebars", extensions: [".handlebars", ".hbs"], tmScope: "text.html.handlebars", aliases: ["hbs", "htmlbars"], parsers: ["glimmer"], vscodeLanguageIds: ["handlebars"], linguistLanguageId: 155 }], cn = {};
|
|
2618
|
+
qe(cn, { glimmer: () => _s });
|
|
2619
|
+
function vs(t, e) {
|
|
2620
|
+
let r = new SyntaxError(t + " (" + e.loc.start.line + ":" + e.loc.start.column + ")");
|
|
2621
|
+
return Object.assign(r, e);
|
|
2622
|
+
}
|
|
2623
|
+
var Cs = vs, Ss = Symbol.for("PRETTIER_IS_FRONT_MATTER"), Lt = 3;
|
|
2624
|
+
function ws(t) {
|
|
2625
|
+
let e = t.slice(0, Lt);
|
|
2626
|
+
if (e !== "---" && e !== "+++") return;
|
|
2627
|
+
let r = t.indexOf(`
|
|
2628
|
+
`, Lt);
|
|
2629
|
+
if (r === -1) return;
|
|
2630
|
+
let n = t.slice(Lt, r).trim(), a = t.indexOf(`
|
|
2631
|
+
${e}`, r), s = n;
|
|
2632
|
+
if (s || (s = e === "+++" ? "toml" : "yaml"), a === -1 && e === "---" && s === "yaml" && (a = t.indexOf(`
|
|
2633
|
+
...`, r)), a === -1) return;
|
|
2634
|
+
let u = a + 1 + Lt, i = t.charAt(u + 1);
|
|
2635
|
+
if (!/\s?/u.test(i)) return;
|
|
2636
|
+
let l = t.slice(0, u), h;
|
|
2637
|
+
return { language: s, explicitLanguage: n || null, value: t.slice(r + 1, a), startDelimiter: e, endDelimiter: l.slice(-Lt), raw: l, start: { line: 1, column: 0, index: 0 }, end: { index: l.length, get line() {
|
|
2638
|
+
return h ?? (h = l.split(`
|
|
2639
|
+
`)), h.length;
|
|
2640
|
+
}, get column() {
|
|
2641
|
+
return h ?? (h = l.split(`
|
|
2642
|
+
`)), nt(0, h, -1).length;
|
|
2643
|
+
} }, [Ss]: !0 };
|
|
2644
|
+
}
|
|
2645
|
+
function Bs(t) {
|
|
2646
|
+
let e = ws(t);
|
|
2647
|
+
return e ? { frontMatter: e, get content() {
|
|
2648
|
+
let { raw: r } = e;
|
|
2649
|
+
return Zt(0, r, /[^\n]/gu, " ") + t.slice(r.length);
|
|
2650
|
+
} } : { content: t };
|
|
2651
|
+
}
|
|
2652
|
+
var ks = Bs;
|
|
2653
|
+
function xs(t) {
|
|
2654
|
+
let e = t.children ?? t.body;
|
|
2655
|
+
if (e) for (let r = 0; r < e.length - 1; r++) e[r].type === "TextNode" && e[r + 1].type === "MustacheStatement" && (e[r].chars = e[r].chars.replace(/\\$/u, "\\\\"));
|
|
2656
|
+
}
|
|
2657
|
+
var Ts = (t) => {
|
|
2658
|
+
let { start: e, end: r } = t.loc;
|
|
2659
|
+
e.offset = t.loc.getStart().offset, r.offset = t.loc.getEnd().offset;
|
|
2660
|
+
}, Ns = () => ({ name: "glimmerPrettierParsePlugin", visitor: { All(t) {
|
|
2661
|
+
Ts(t), xs(t);
|
|
2662
|
+
} } }), Ps = { mode: "codemod", plugins: { ast: [Ns] } };
|
|
2663
|
+
function Fs(t) {
|
|
2664
|
+
let { frontMatter: e, content: r } = ks(t), n;
|
|
2665
|
+
try {
|
|
2666
|
+
n = ja(r, Ps);
|
|
2667
|
+
} catch (a) {
|
|
2668
|
+
let s = qs(a);
|
|
2669
|
+
if (s) {
|
|
2670
|
+
let u = Ls(a);
|
|
2671
|
+
throw Cs(u, { loc: s, cause: a });
|
|
2672
|
+
}
|
|
2673
|
+
throw a;
|
|
2674
|
+
}
|
|
2675
|
+
if (e) {
|
|
2676
|
+
let a = { ...e, type: "FrontMatter", loc: { start: { ...e.start, offset: e.start.index }, end: { ...e.end, offset: e.end.index } } };
|
|
2677
|
+
n.body.unshift(a);
|
|
2678
|
+
}
|
|
2679
|
+
return n;
|
|
2680
|
+
}
|
|
2681
|
+
function Ls(t) {
|
|
2682
|
+
let { message: e } = t, r = e.split(`
|
|
2683
|
+
`);
|
|
2684
|
+
return r.length >= 4 && /^Parse error on line \d+:$/u.test(r[0]) && /^-*\^$/u.test(nt(0, r, -2)) ? nt(0, r, -1) : r.length >= 4 && /:\s?$/u.test(r[0]) && /^\(error occurred in '.*?' @ line \d+ : column \d+\)$/u.test(nt(0, r, -1)) && r[1] === "" && nt(0, r, -2) === "" && r.slice(2, -2).every((n) => n.startsWith("|")) ? r[0].trim().slice(0, -1) : e;
|
|
2685
|
+
}
|
|
2686
|
+
function qs(t) {
|
|
2687
|
+
let { location: e, hash: r } = t;
|
|
2688
|
+
if (e) {
|
|
2689
|
+
let { start: n, end: a } = e;
|
|
2690
|
+
return typeof a.line != "number" ? { start: n } : e;
|
|
2691
|
+
}
|
|
2692
|
+
if (r) {
|
|
2693
|
+
let { loc: { last_line: n, last_column: a } } = r;
|
|
2694
|
+
return { start: { line: n, column: a + 1 } };
|
|
2695
|
+
}
|
|
2696
|
+
}
|
|
2697
|
+
var _s = { parse: Fs, astFormat: "glimmer", locStart: Ot, locEnd: Le }, Is = { glimmer: Ds };
|
|
2698
|
+
export {
|
|
2699
|
+
An as default,
|
|
2700
|
+
Es as languages,
|
|
2701
|
+
cn as parsers,
|
|
2702
|
+
Is as printers
|
|
2703
|
+
};
|