prettier 1.9.1 → 1.10.2
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/README.md +6 -4
- package/bin-prettier.js +40201 -0
- package/index.js +17486 -11446
- package/package.json +8 -8
- package/parser-babylon.js +1 -1
- package/parser-flow.js +1 -1
- package/parser-glimmer.js +1964 -0
- package/parser-graphql.js +1 -1
- package/parser-markdown.js +1 -1
- package/parser-parse5.js +1 -1
- package/parser-postcss.js +10 -0
- package/parser-typescript.js +1 -1
- package/parser-vue.js +1 -0
- package/third-party.js +193 -295
- package/bin/prettier.js +0 -21010
|
@@ -0,0 +1,1964 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
|
4
|
+
|
|
5
|
+
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
|
|
6
|
+
|
|
7
|
+
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
|
8
|
+
|
|
9
|
+
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
|
|
10
|
+
|
|
11
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
12
|
+
|
|
13
|
+
function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }
|
|
14
|
+
|
|
15
|
+
function _interopDefault(t) {
|
|
16
|
+
return t && "object" == (typeof t === "undefined" ? "undefined" : _typeof(t)) && "default" in t ? t.default : t;
|
|
17
|
+
}function createError(t, e) {
|
|
18
|
+
var r = new SyntaxError(t + " (" + e.start.line + ":" + e.start.column + ")");return r.loc = e, r;
|
|
19
|
+
}function isCall(t) {
|
|
20
|
+
return "SubExpression" === t.type || "MustacheStatement" === t.type && "PathExpression" === t.path.type;
|
|
21
|
+
}function isLiteral(t) {
|
|
22
|
+
return !("object" != (typeof t === "undefined" ? "undefined" : _typeof(t)) || !t.type.match(/Literal$/));
|
|
23
|
+
}function buildMustache(t, e, r, a, i) {
|
|
24
|
+
return isLiteral(t) || (t = buildPath(t)), { type: "MustacheStatement", path: t, params: e || [], hash: r || buildHash([]), escaped: !a, loc: buildLoc(i || null) };
|
|
25
|
+
}function buildBlock(t, e, r, a, i, n) {
|
|
26
|
+
return { type: "BlockStatement", path: buildPath(t), params: e || [], hash: r || buildHash([]), program: a || null, inverse: i || null, loc: buildLoc(n || null) };
|
|
27
|
+
}function buildElementModifier(t, e, r, a) {
|
|
28
|
+
return { type: "ElementModifierStatement", path: buildPath(t), params: e || [], hash: r || buildHash([]), loc: buildLoc(a || null) };
|
|
29
|
+
}function buildPartial(t, e, r, a, i) {
|
|
30
|
+
return { type: "PartialStatement", name: t, params: e || [], hash: r || buildHash([]), indent: a || "", strip: { open: !1, close: !1 }, loc: buildLoc(i || null) };
|
|
31
|
+
}function buildComment(t, e) {
|
|
32
|
+
return { type: "CommentStatement", value: t, loc: buildLoc(e || null) };
|
|
33
|
+
}function buildMustacheComment(t, e) {
|
|
34
|
+
return { type: "MustacheCommentStatement", value: t, loc: buildLoc(e || null) };
|
|
35
|
+
}function buildConcat(t, e) {
|
|
36
|
+
return { type: "ConcatStatement", parts: t || [], loc: buildLoc(e || null) };
|
|
37
|
+
}function buildElement(t, e, r, a, i, n) {
|
|
38
|
+
return Array.isArray(i) || (n = i, i = []), { type: "ElementNode", tag: t || "", attributes: e || [], blockParams: [], modifiers: r || [], comments: i || [], children: a || [], loc: buildLoc(n || null) };
|
|
39
|
+
}function buildAttr(t, e, r) {
|
|
40
|
+
return { type: "AttrNode", name: t, value: e, loc: buildLoc(r || null) };
|
|
41
|
+
}function buildText(t, e) {
|
|
42
|
+
return { type: "TextNode", chars: t || "", loc: buildLoc(e || null) };
|
|
43
|
+
}function buildSexpr(t, e, r, a) {
|
|
44
|
+
return { type: "SubExpression", path: buildPath(t), params: e || [], hash: r || buildHash([]), loc: buildLoc(a || null) };
|
|
45
|
+
}function buildPath(t, e) {
|
|
46
|
+
if ("string" != typeof t) return t;var r = t.split("."),
|
|
47
|
+
a = !1;return "this" === r[0] && (a = !0, r = r.slice(1)), { type: "PathExpression", original: t, this: a, parts: r, data: !1, loc: buildLoc(e || null) };
|
|
48
|
+
}function buildLiteral(t, e, r) {
|
|
49
|
+
return { type: t, value: e, original: e, loc: buildLoc(r || null) };
|
|
50
|
+
}function buildHash(t, e) {
|
|
51
|
+
return { type: "Hash", pairs: t || [], loc: buildLoc(e || null) };
|
|
52
|
+
}function buildPair(t, e, r) {
|
|
53
|
+
return { type: "HashPair", key: t, value: e, loc: buildLoc(r || null) };
|
|
54
|
+
}function buildProgram(t, e, r) {
|
|
55
|
+
return { type: "Program", body: t || [], blockParams: e || [], loc: buildLoc(r || null) };
|
|
56
|
+
}function buildSource(t) {
|
|
57
|
+
return t || null;
|
|
58
|
+
}function buildPosition(t, e) {
|
|
59
|
+
return { line: t, column: e };
|
|
60
|
+
}function buildLoc() {
|
|
61
|
+
for (var _len = arguments.length, t = Array(_len), _key = 0; _key < _len; _key++) {
|
|
62
|
+
t[_key] = arguments[_key];
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
if (1 === t.length) {
|
|
66
|
+
var e = t[0];return e && "object" == (typeof e === "undefined" ? "undefined" : _typeof(e)) ? { source: buildSource(e.source), start: buildPosition(e.start.line, e.start.column), end: buildPosition(e.end.line, e.end.column) } : SYNTHETIC;
|
|
67
|
+
}{
|
|
68
|
+
var _e = t[0],
|
|
69
|
+
r = t[1],
|
|
70
|
+
a = t[2],
|
|
71
|
+
i = t[3],
|
|
72
|
+
n = t[4];
|
|
73
|
+
return { source: buildSource(n), start: buildPosition(_e, r), end: buildPosition(a, i) };
|
|
74
|
+
}
|
|
75
|
+
}function literal(t) {
|
|
76
|
+
return function (e) {
|
|
77
|
+
return buildLiteral(t, e);
|
|
78
|
+
};
|
|
79
|
+
}function parseElementBlockParams(t) {
|
|
80
|
+
var e = parseBlockParams(t);e && (t.blockParams = e);
|
|
81
|
+
}function parseBlockParams(t) {
|
|
82
|
+
var e = t.attributes.length,
|
|
83
|
+
r = [];for (var _a = 0; _a < e; _a++) {
|
|
84
|
+
r.push(t.attributes[_a].name);
|
|
85
|
+
}var a = r.indexOf("as");if (-1 !== a && e > a && "|" === r[a + 1].charAt(0)) {
|
|
86
|
+
var i = r.slice(a).join(" ");if ("|" !== i.charAt(i.length - 1) || 2 !== i.match(/\|/g).length) throw new SyntaxError$1("Invalid block parameters syntax: '" + i + "'", t.loc);var n = [];for (var s = a + 1; s < e; s++) {
|
|
87
|
+
var _e2 = r[s].replace(/\|/g, "");if ("" !== _e2) {
|
|
88
|
+
if (ID_INVERSE_PATTERN.test(_e2)) throw new SyntaxError$1("Invalid identifier for block parameters: '" + _e2 + "' in '" + i + "'", t.loc);n.push(_e2);
|
|
89
|
+
}
|
|
90
|
+
}if (0 === n.length) throw new SyntaxError$1("Cannot use zero block parameters: '" + i + "'", t.loc);return t.attributes = t.attributes.slice(0, a), n;
|
|
91
|
+
}return null;
|
|
92
|
+
}function childrenFor(t) {
|
|
93
|
+
switch (t.type) {case "Program":
|
|
94
|
+
return t.body;case "ElementNode":
|
|
95
|
+
return t.children;}
|
|
96
|
+
}function appendChild(t, e) {
|
|
97
|
+
childrenFor(t).push(e);
|
|
98
|
+
}function isLiteral$1(t) {
|
|
99
|
+
return "StringLiteral" === t.type || "BooleanLiteral" === t.type || "NumberLiteral" === t.type || "NullLiteral" === t.type || "UndefinedLiteral" === t.type;
|
|
100
|
+
}function printLiteral(t) {
|
|
101
|
+
return "UndefinedLiteral" === t.type ? "undefined" : JSON.stringify(t.value);
|
|
102
|
+
}function isSpace(t) {
|
|
103
|
+
return WSP.test(t);
|
|
104
|
+
}function isAlpha(t) {
|
|
105
|
+
return ALPHA.test(t);
|
|
106
|
+
}function preprocessInput(t) {
|
|
107
|
+
return t.replace(CRLF, "\n");
|
|
108
|
+
}function unwrap(t, e) {
|
|
109
|
+
if (!t) throw new Error((e || "value") + " was null");return t;
|
|
110
|
+
}function debugAssert(t, e) {
|
|
111
|
+
if (!t) throw new Error(e || "assertion failure");
|
|
112
|
+
}function assign(t) {
|
|
113
|
+
for (var e = 1; e < arguments.length; e++) {
|
|
114
|
+
var r = arguments[e];if (null === r || "object" != (typeof r === "undefined" ? "undefined" : _typeof(r))) continue;var a = objKeys(r);for (var _e3 = 0; _e3 < a.length; _e3++) {
|
|
115
|
+
var i = a[_e3];t[i] = r[i];
|
|
116
|
+
}
|
|
117
|
+
}return t;
|
|
118
|
+
}function calculateRightStrippedOffsets(t, e) {
|
|
119
|
+
if ("" === e) return { lines: t.split("\n").length - 1, columns: 0 };var r = t.split(e)[0].split(/\n/),
|
|
120
|
+
a = r.length - 1;return { lines: a, columns: r[a].length };
|
|
121
|
+
}function updateTokenizerLocation(t, e) {
|
|
122
|
+
var r = e.loc.start.line,
|
|
123
|
+
a = e.loc.start.column,
|
|
124
|
+
i = calculateRightStrippedOffsets(e.original, e.value);r += i.lines, i.lines ? a = i.columns : a += i.columns, t.line = r, t.column = a;
|
|
125
|
+
}function acceptCallNodes(t, e) {
|
|
126
|
+
return { path: t.PathExpression(e.path), params: e.params ? e.params.map(function (e) {
|
|
127
|
+
return t.acceptNode(e);
|
|
128
|
+
}) : [], hash: e.hash ? t.Hash(e.hash) : b.hash() };
|
|
129
|
+
}function addElementModifier(t, e) {
|
|
130
|
+
var r = e.path,
|
|
131
|
+
a = e.params,
|
|
132
|
+
i = e.hash,
|
|
133
|
+
n = e.loc;
|
|
134
|
+
if (isLiteral$1(r)) {
|
|
135
|
+
var _a2 = "{{" + printLiteral(r) + "}}",
|
|
136
|
+
_i = "<" + t.name + " ... " + _a2 + " ...";throw new SyntaxError$1("In " + _i + ", " + _a2 + " is not a valid modifier: \"" + r.original + "\" on line " + (n && n.start.line) + ".", e.loc);
|
|
137
|
+
}var s = b.elementModifier(r, a, i, n);t.modifiers.push(s);
|
|
138
|
+
}function addInElementHash(t, e, r) {
|
|
139
|
+
var a = !1;e.pairs.forEach(function (t) {
|
|
140
|
+
if ("guid" === t.key) throw new SyntaxError$1("Cannot pass `guid` from user space", r);"nextSibling" === t.key && (a = !0);
|
|
141
|
+
});var i = b.literal("StringLiteral", t),
|
|
142
|
+
n = b.pair("guid", i);if (e.pairs.unshift(n), !a) {
|
|
143
|
+
var _t = b.literal("NullLiteral", null),
|
|
144
|
+
_r = b.pair("nextSibling", _t);e.pairs.push(_r);
|
|
145
|
+
}return e;
|
|
146
|
+
}function appendDynamicAttributeValuePart(t, e) {
|
|
147
|
+
t.isDynamic = !0, t.parts.push(e);
|
|
148
|
+
}function cannotRemoveNode(t, e, r) {
|
|
149
|
+
return new TraversalError("Cannot remove a node unless it is part of an array", t, e, r);
|
|
150
|
+
}function cannotReplaceNode(t, e, r) {
|
|
151
|
+
return new TraversalError("Cannot replace a node with multiple nodes unless it is part of an array", t, e, r);
|
|
152
|
+
}function cannotReplaceOrRemoveInKeyHandlerYet(t, e) {
|
|
153
|
+
return new TraversalError("Replacing and removing in key handlers is not yet supported.", t, null, e);
|
|
154
|
+
}function visitNode(t, e) {
|
|
155
|
+
var r = void 0,
|
|
156
|
+
a = t[e.type] || t.All || null;if (a && a.enter && (r = a.enter.call(null, e)), void 0 !== r && null !== r) {
|
|
157
|
+
if (JSON.stringify(e) !== JSON.stringify(r)) return Array.isArray(r) ? visitArray(t, r) || r : visitNode(t, r) || r;r = void 0;
|
|
158
|
+
}if (void 0 === r) {
|
|
159
|
+
var i = visitorKeys[e.type];for (var _r2 = 0; _r2 < i.length; _r2++) {
|
|
160
|
+
visitKey(t, a, e, i[_r2]);
|
|
161
|
+
}a && a.exit && (r = a.exit.call(null, e));
|
|
162
|
+
}return r;
|
|
163
|
+
}function visitKey(t, e, r, a) {
|
|
164
|
+
var i = r[a];if (!i) return;var n = void 0,
|
|
165
|
+
s = e && (e.keys[a] || e.keys.All);if (s && s.enter && void 0 !== (n = s.enter.call(null, r, a))) throw cannotReplaceOrRemoveInKeyHandlerYet(r, a);if (Array.isArray(i)) visitArray(t, i);else {
|
|
166
|
+
var _e4 = visitNode(t, i);void 0 !== _e4 && assignKey(r, a, _e4);
|
|
167
|
+
}if (s && s.exit && void 0 !== (n = s.exit.call(null, r, a))) throw cannotReplaceOrRemoveInKeyHandlerYet(r, a);
|
|
168
|
+
}function visitArray(t, e) {
|
|
169
|
+
for (var r = 0; r < e.length; r++) {
|
|
170
|
+
var a = visitNode(t, e[r]);void 0 !== a && (r += spliceArray(e, r, a) - 1);
|
|
171
|
+
}
|
|
172
|
+
}function assignKey(t, e, r) {
|
|
173
|
+
if (null === r) throw cannotRemoveNode(t[e], t, e);if (Array.isArray(r)) {
|
|
174
|
+
if (1 !== r.length) throw 0 === r.length ? cannotRemoveNode(t[e], t, e) : cannotReplaceNode(t[e], t, e);t[e] = r[0];
|
|
175
|
+
} else t[e] = r;
|
|
176
|
+
}function spliceArray(t, e, r) {
|
|
177
|
+
return null === r ? (t.splice(e, 1), 0) : Array.isArray(r) ? (t.splice.apply(t, [e, 1].concat(_toConsumableArray(r))), r.length) : (t.splice(e, 1, r), 1);
|
|
178
|
+
}function traverse(t, e) {
|
|
179
|
+
visitNode(normalizeVisitor(e), t);
|
|
180
|
+
}function normalizeVisitor(t) {
|
|
181
|
+
var e = {};for (var r in t) {
|
|
182
|
+
var a = t[r] || t.All,
|
|
183
|
+
i = {};if ("object" == (typeof a === "undefined" ? "undefined" : _typeof(a))) {
|
|
184
|
+
var _t2 = a.keys;if (_t2) for (var _e5 in _t2) {
|
|
185
|
+
var _r3 = _t2[_e5];"object" == (typeof _r3 === "undefined" ? "undefined" : _typeof(_r3)) ? i[_e5] = { enter: "function" == typeof _r3.enter ? _r3.enter : null, exit: "function" == typeof _r3.exit ? _r3.exit : null } : "function" == typeof _r3 && (i[_e5] = { enter: _r3, exit: null });
|
|
186
|
+
}e[r] = { enter: "function" == typeof a.enter ? a.enter : null, exit: "function" == typeof a.exit ? a.exit : null, keys: i };
|
|
187
|
+
} else "function" == typeof a && (e[r] = { enter: a, exit: null, keys: i });
|
|
188
|
+
}return e;
|
|
189
|
+
}function unreachable$1() {
|
|
190
|
+
throw new Error("unreachable");
|
|
191
|
+
}function build(t) {
|
|
192
|
+
if (!t) return "";var e = [];switch (t.type) {case "Program":
|
|
193
|
+
{
|
|
194
|
+
var _r4 = t.chained && t.body[0];_r4 && (_r4.chained = !0);var a = buildEach(t.body).join("");e.push(a);
|
|
195
|
+
}break;case "ElementNode":
|
|
196
|
+
e.push("<", t.tag), t.attributes.length && e.push(" ", buildEach(t.attributes).join(" ")), t.modifiers.length && e.push(" ", buildEach(t.modifiers).join(" ")), t.comments.length && e.push(" ", buildEach(t.comments).join(" ")), e.push(">"), e.push.apply(e, buildEach(t.children)), e.push("</", t.tag, ">");break;case "AttrNode":
|
|
197
|
+
e.push(t.name, "=");var r = build(t.value);"TextNode" === t.value.type ? e.push('"', r, '"') : e.push(r);break;case "ConcatStatement":
|
|
198
|
+
e.push('"'), t.parts.forEach(function (t) {
|
|
199
|
+
"StringLiteral" === t.type ? e.push(t.original) : e.push(build(t));
|
|
200
|
+
}), e.push('"');break;case "TextNode":
|
|
201
|
+
e.push(t.chars);break;case "MustacheStatement":
|
|
202
|
+
e.push(compactJoin(["{{", pathParams(t), "}}"]));break;case "MustacheCommentStatement":
|
|
203
|
+
e.push(compactJoin(["{{!--", t.value, "--}}"]));break;case "ElementModifierStatement":
|
|
204
|
+
e.push(compactJoin(["{{", pathParams(t), "}}"]));break;case "PathExpression":
|
|
205
|
+
e.push(t.original);break;case "SubExpression":
|
|
206
|
+
e.push("(", pathParams(t), ")");break;case "BooleanLiteral":
|
|
207
|
+
e.push(t.value ? "true" : "false");break;case "BlockStatement":
|
|
208
|
+
{
|
|
209
|
+
var _r5 = [];t.chained ? _r5.push(["{{else ", pathParams(t), "}}"].join("")) : _r5.push(openBlock(t)), _r5.push(build(t.program)), t.inverse && (t.inverse.chained || _r5.push("{{else}}"), _r5.push(build(t.inverse))), t.chained || _r5.push(closeBlock(t)), e.push(_r5.join(""));
|
|
210
|
+
}break;case "PartialStatement":
|
|
211
|
+
e.push(compactJoin(["{{>", pathParams(t), "}}"]));break;case "CommentStatement":
|
|
212
|
+
e.push(compactJoin(["\x3c!--", t.value, "--\x3e"]));break;case "StringLiteral":
|
|
213
|
+
e.push("\"" + t.value + "\"");break;case "NumberLiteral":
|
|
214
|
+
e.push(String(t.value));break;case "UndefinedLiteral":
|
|
215
|
+
e.push("undefined");break;case "NullLiteral":
|
|
216
|
+
e.push("null");break;case "Hash":
|
|
217
|
+
e.push(t.pairs.map(function (t) {
|
|
218
|
+
return build(t);
|
|
219
|
+
}).join(" "));break;case "HashPair":
|
|
220
|
+
e.push(t.key + "=" + build(t.value));}return e.join("");
|
|
221
|
+
}function compact(t) {
|
|
222
|
+
var e = [];return t.forEach(function (t) {
|
|
223
|
+
void 0 !== t && null !== t && "" !== t && e.push(t);
|
|
224
|
+
}), e;
|
|
225
|
+
}function buildEach(t) {
|
|
226
|
+
return t.map(build);
|
|
227
|
+
}function pathParams(t) {
|
|
228
|
+
var e = void 0;switch (t.type) {case "MustacheStatement":case "SubExpression":case "ElementModifierStatement":case "BlockStatement":
|
|
229
|
+
if (isLiteral(t.path)) return String(t.path.value);e = build(t.path);break;case "PartialStatement":
|
|
230
|
+
e = build(t.name);break;default:
|
|
231
|
+
return unreachable$1();}return compactJoin([e, buildEach(t.params).join(" "), build(t.hash)], " ");
|
|
232
|
+
}function compactJoin(t, e) {
|
|
233
|
+
return compact(t).join(e || "");
|
|
234
|
+
}function blockParams(t) {
|
|
235
|
+
var e = t.program.blockParams;return e.length ? " as |" + e.join(" ") + "|" : null;
|
|
236
|
+
}function openBlock(t) {
|
|
237
|
+
return ["{{#", pathParams(t), blockParams(t), "}}"].join("");
|
|
238
|
+
}function closeBlock(t) {
|
|
239
|
+
return ["{{/", build(t.path), "}}"].join("");
|
|
240
|
+
}function unwrapExports(t) {
|
|
241
|
+
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
242
|
+
}function createCommonjsModule(t, e) {
|
|
243
|
+
return e = { exports: {} }, t(e, e.exports), e.exports;
|
|
244
|
+
}function extension(t, e) {
|
|
245
|
+
var r = fs.readFileSync(e, "utf8");t.exports = handlebars.compile(r);
|
|
246
|
+
}function assembleAttributeValue(t, e, r, a) {
|
|
247
|
+
if (r) {
|
|
248
|
+
if (e) return assembleConcatenatedValue(t);if (1 === t.length || 2 === t.length && "TextNode" === t[1].type && "/" === t[1].chars) return t[0];throw new SyntaxError$1("An unquoted attribute value must be a string or a mustache, preceeded by whitespace or a '=' character, and " + ("followed by whitespace, a '>' character, or '/>' (on line " + a + ")"), b.loc(a, 0));
|
|
249
|
+
}return t.length > 0 ? t[0] : b.text("");
|
|
250
|
+
}function assembleConcatenatedValue(t) {
|
|
251
|
+
for (var e = 0; e < t.length; e++) {
|
|
252
|
+
var r = t[e];if ("MustacheStatement" !== r.type && "TextNode" !== r.type) throw new SyntaxError$1("Unsupported node in quoted attribute value: " + r.type, r.loc);
|
|
253
|
+
}return b.concat(t);
|
|
254
|
+
}function validateEndTag(t, e, r) {
|
|
255
|
+
var a = void 0;if (voidMap[t.name] && !r ? a = "Invalid end tag " + formatEndTagInfo(t) + " (void elements cannot have end tags)." : void 0 === e.tag ? a = "Closing tag " + formatEndTagInfo(t) + " without an open tag." : e.tag !== t.name && (a = "Closing tag " + formatEndTagInfo(t) + " did not match last open tag `" + e.tag + "` (on line " + e.loc.start.line + ")."), a) throw new SyntaxError$1(a, e.loc);
|
|
256
|
+
}function formatEndTagInfo(t) {
|
|
257
|
+
return "`" + t.name + "` (on line " + t.loc.end.line + ")";
|
|
258
|
+
}function preprocess(t, e) {
|
|
259
|
+
var r = "object" == (typeof t === "undefined" ? "undefined" : _typeof(t)) ? t : lib_1(t),
|
|
260
|
+
a = new TokenizerEventHandlers(t, e).acceptNode(r);if (e && e.plugins && e.plugins.ast) for (var _t3 = 0, _r6 = e.plugins.ast.length; _t3 < _r6; _t3++) {
|
|
261
|
+
traverse(a, (0, e.plugins.ast[_t3])(assign({}, e, { syntax: syntax }, { plugins: void 0 })).visitor);
|
|
262
|
+
}return a;
|
|
263
|
+
}function removeEmptyNodes(t) {
|
|
264
|
+
return "TextNode" !== t.type || "TextNode" === t.type && "" !== t.chars.replace(/^\s+/, "").replace(/\s+$/, "");
|
|
265
|
+
}function removeWhiteSpace() {
|
|
266
|
+
return { visitor: {
|
|
267
|
+
Program: function Program(t) {
|
|
268
|
+
t.body = t.body.filter(removeEmptyNodes);
|
|
269
|
+
},
|
|
270
|
+
ElementNode: function ElementNode(t) {
|
|
271
|
+
t.children = t.children.filter(removeEmptyNodes);
|
|
272
|
+
}
|
|
273
|
+
} };
|
|
274
|
+
}function parse(t) {
|
|
275
|
+
try {
|
|
276
|
+
return (0, es2017.preprocess)(t, { plugins: { ast: [removeWhiteSpace] } });
|
|
277
|
+
} catch (t) {
|
|
278
|
+
var e = t.message.match(/on line (\d+)/);throw e ? parserCreateError(t.message, { start: { line: +e[1], column: 0 }, end: { line: +e[1], column: 80 } }) : t;
|
|
279
|
+
}
|
|
280
|
+
}var fs = _interopDefault(require("fs")),
|
|
281
|
+
parserCreateError = createError,
|
|
282
|
+
nodes = Object.freeze({ isCall: isCall, isLiteral: isLiteral });var SYNTHETIC = { source: "(synthetic)", start: { line: 1, column: 0 }, end: { line: 1, column: 0 } };var b = { mustache: buildMustache, block: buildBlock, partial: buildPartial, comment: buildComment, mustacheComment: buildMustacheComment, element: buildElement, elementModifier: buildElementModifier, attr: buildAttr, text: buildText, sexpr: buildSexpr, path: buildPath, concat: buildConcat, hash: buildHash, pair: buildPair, literal: buildLiteral, program: buildProgram, loc: buildLoc, pos: buildPosition, string: literal("StringLiteral"), boolean: literal("BooleanLiteral"), number: literal("NumberLiteral"), undefined: function undefined() {
|
|
283
|
+
return buildLiteral("UndefinedLiteral", void 0);
|
|
284
|
+
}, null: function _null() {
|
|
285
|
+
return buildLiteral("NullLiteral", null);
|
|
286
|
+
} };var SyntaxError$1 = function () {
|
|
287
|
+
function t(t, e) {
|
|
288
|
+
var r = Error.call(this, t);this.message = t, this.stack = r.stack, this.location = e;
|
|
289
|
+
}return t.prototype = Object.create(Error.prototype), t.prototype.constructor = t, t;
|
|
290
|
+
}();var ID_INVERSE_PATTERN = /[!"#%-,\.\/;->@\[-\^`\{-~]/;var namedCharRefs = { 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: "&", And: "⩓", and: "∧", andand: "⩕", andd: "⩜", andslope: "⩘", andv: "⩚", ang: "∠", ange: "⦤", angle: "∠", angmsd: "∡", angmsdaa: "⦨", angmsdab: "⦩", angmsdac: "⦪", angmsdad: "⦫", angmsdae: "⦬", angmsdaf: "⦭", angmsdag: "⦮", angmsdah: "⦯", angrt: "∟", angrtvb: "⊾", angrtvbd: "⦝", angsph: "∢", angst: "Å", angzarr: "⍼", Aogon: "Ą", aogon: "ą", Aopf: "𝔸", aopf: "𝕒", ap: "≈", apacir: "⩯", 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: "⋍", bsol: "\\", bsolb: "⧅", bsolhsub: "⟈", bull: "•", bullet: "•", bump: "≎", bumpE: "⪮", bumpe: "≏", Bumpeq: "≎", bumpeq: "≏", Cacute: "Ć", cacute: "ć", Cap: "⋒", cap: "∩", capand: "⩄", capbrcup: "⩉", capcap: "⩋", 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: "χ", cir: "○", circ: "ˆ", circeq: "≗", circlearrowleft: "↺", circlearrowright: "↻", circledast: "⊛", circledcirc: "⊚", circleddash: "⊝", CircleDot: "⊙", circledR: "®", circledS: "Ⓢ", CircleMinus: "⊖", CirclePlus: "⊕", CircleTimes: "⊗", 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: "⤽", Cup: "⋓", cup: "∪", cupbrcap: "⩈", CupCap: "≍", cupcap: "⩆", 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: "д", DD: "ⅅ", dd: "ⅆ", ddagger: "‡", ddarr: "⇊", 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: "∥", DownArrow: "↓", Downarrow: "⇓", downarrow: "↓", DownArrowBar: "⤓", DownArrowUpArrow: "⇵", DownBreve: "̑", downdownarrows: "⇊", downharpoonleft: "⇃", downharpoonright: "⇂", DownLeftRightVector: "⥐", DownLeftTeeVector: "⥞", DownLeftVector: "↽", DownLeftVectorBar: "⥖", DownRightTeeVector: "⥟", DownRightVector: "⇁", DownRightVectorBar: "⥗", DownTee: "⊤", DownTeeArrow: "↧", drbkarow: "⤐", drcorn: "⌟", drcrop: "⌌", Dscr: "𝒟", dscr: "𝒹", DScy: "Ѕ", dscy: "ѕ", dsol: "⧶", Dstrok: "Đ", dstrok: "đ", dtdot: "⋱", dtri: "▿", dtrif: "▾", duarr: "⇵", duhar: "⥯", dwangle: "⦦", DZcy: "Џ", dzcy: "џ", dzigrarr: "⟿", Eacute: "É", eacute: "é", easter: "⩮", Ecaron: "Ě", ecaron: "ě", ecir: "≖", Ecirc: "Ê", ecirc: "ê", 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: "▫", emsp: " ", emsp13: " ", emsp14: " ", 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: "⩾", ges: "⩾", gescc: "⪩", gesdot: "⪀", gesdoto: "⪂", gesdotol: "⪄", gesl: "⋛︀", gesles: "⪔", Gfr: "𝔊", gfr: "𝔤", Gg: "⋙", gg: "≫", ggg: "⋙", gimel: "ℷ", GJcy: "Ѓ", gjcy: "ѓ", gl: "≷", gla: "⪥", glE: "⪒", glj: "⪤", gnap: "⪊", gnapprox: "⪊", gnE: "≩", gne: "⪈", gneq: "⪈", gneqq: "≩", gnsim: "⋧", Gopf: "𝔾", gopf: "𝕘", grave: "`", GreaterEqual: "≥", GreaterEqualLess: "⋛", GreaterFullEqual: "≧", GreaterGreater: "⪢", GreaterLess: "≷", GreaterSlantEqual: "⩾", GreaterTilde: "≳", Gscr: "𝒢", gscr: "ℊ", gsim: "≳", gsime: "⪎", gsiml: "⪐", GT: ">", Gt: "≫", gt: ">", gtcc: "⪧", gtcir: "⩺", gtdot: "⋗", gtlPar: "⦕", gtquest: "⩼", gtrapprox: "⪆", gtrarr: "⥸", gtrdot: "⋗", gtreqless: "⋛", gtreqqless: "⪌", gtrless: "≷", gtrsim: "≳", gvertneqq: "≩︀", gvnE: "≩︀", Hacek: "ˇ", hairsp: " ", half: "½", hamilt: "ℋ", HARDcy: "Ъ", hardcy: "ъ", hArr: "⇔", harr: "↔", harrcir: "⥈", 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", Im: "ℑ", Imacr: "Ī", imacr: "ī", image: "ℑ", ImaginaryI: "ⅈ", imagline: "ℐ", imagpart: "ℑ", imath: "ı", imof: "⊷", imped: "Ƶ", Implies: "⇒", in: "∈", incare: "℅", infin: "∞", infintie: "⧝", inodot: "ı", Int: "∬", int: "∫", intcal: "⊺", 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: "«", Larr: "↞", lArr: "⇐", larr: "←", larrb: "⇤", larrbfs: "⤟", larrfs: "⤝", larrhk: "↩", larrlp: "↫", larrpl: "⤹", larrsim: "⥳", larrtl: "↢", lat: "⪫", lAtail: "⤛", latail: "⤙", 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: "⟨", LeftArrow: "←", Leftarrow: "⇐", leftarrow: "←", LeftArrowBar: "⇤", LeftArrowRightArrow: "⇆", leftarrowtail: "↢", LeftCeiling: "⌈", LeftDoubleBracket: "⟦", LeftDownTeeVector: "⥡", LeftDownVector: "⇃", LeftDownVectorBar: "⥙", LeftFloor: "⌊", leftharpoondown: "↽", leftharpoonup: "↼", leftleftarrows: "⇇", LeftRightArrow: "↔", Leftrightarrow: "⇔", leftrightarrow: "↔", leftrightarrows: "⇆", leftrightharpoons: "⇋", leftrightsquigarrow: "↭", LeftRightVector: "⥎", LeftTee: "⊣", LeftTeeArrow: "↤", LeftTeeVector: "⥚", leftthreetimes: "⋋", LeftTriangle: "⊲", LeftTriangleBar: "⧏", LeftTriangleEqual: "⊴", LeftUpDownVector: "⥑", LeftUpTeeVector: "⥠", LeftUpVector: "↿", LeftUpVectorBar: "⥘", LeftVector: "↼", LeftVectorBar: "⥒", lEg: "⪋", leg: "⋚", leq: "≤", leqq: "≦", leqslant: "⩽", les: "⩽", lescc: "⪨", 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: "љ", Ll: "⋘", ll: "≪", llarr: "⇇", llcorner: "⌞", Lleftarrow: "⇚", llhard: "⥫", lltri: "◺", Lmidot: "Ŀ", lmidot: "ŀ", lmoust: "⎰", lmoustache: "⎰", 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: "ł", LT: "<", Lt: "≪", lt: "<", ltcc: "⪦", ltcir: "⩹", 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: "µ", mid: "∣", midast: "*", midcir: "⫰", middot: "·", minus: "−", minusb: "⊟", 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: "≉", natur: "♮", natural: "♮", naturals: "ℕ", nbsp: " ", nbump: "≎̸", nbumpe: "≏̸", ncap: "⩃", Ncaron: "Ň", ncaron: "ň", Ncedil: "Ņ", ncedil: "ņ", ncong: "≇", ncongdot: "⩭̸", ncup: "⩂", Ncy: "Н", ncy: "н", ndash: "–", ne: "≠", nearhk: "⤤", neArr: "⇗", nearr: "↗", nearrow: "↗", nedot: "≐̸", NegativeMediumSpace: "", NegativeThickSpace: "", NegativeThinSpace: "", NegativeVeryThinSpace: "", nequiv: "≢", nesear: "⤨", nesim: "≂̸", NestedGreaterGreater: "≫", NestedLessLess: "≪", NewLine: "\n", 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: "⋶", NotLeftTriangle: "⋪", NotLeftTriangleBar: "⧏̸", NotLeftTriangleEqual: "⋬", NotLess: "≮", NotLessEqual: "≰", NotLessGreater: "≸", NotLessLess: "≪̸", NotLessSlantEqual: "⩽̸", NotLessTilde: "≴", NotNestedGreaterGreater: "⪢̸", NotNestedLessLess: "⪡̸", notni: "∌", notniva: "∌", notnivb: "⋾", notnivc: "⋽", NotPrecedes: "⊀", NotPrecedesEqual: "⪯̸", NotPrecedesSlantEqual: "⋠", NotReverseElement: "∌", NotRightTriangle: "⋫", NotRightTriangleBar: "⧐̸", NotRightTriangleEqual: "⋭", NotSquareSubset: "⊏̸", NotSquareSubsetEqual: "⋢", NotSquareSuperset: "⊐̸", NotSquareSupersetEqual: "⋣", NotSubset: "⊂⃒", NotSubsetEqual: "⊈", NotSucceeds: "⊁", NotSucceedsEqual: "⪰̸", NotSucceedsSlantEqual: "⋡", NotSucceedsTilde: "≿̸", NotSuperset: "⊃⃒", NotSupersetEqual: "⊉", NotTilde: "≁", NotTildeEqual: "≄", NotTildeFullEqual: "≇", NotTildeTilde: "≉", NotVerticalBar: "∤", npar: "∦", nparallel: "∦", nparsl: "⫽⃥", npart: "∂̸", npolint: "⨔", npr: "⊀", nprcue: "⋠", npre: "⪯̸", nprec: "⊀", npreceq: "⪯̸", nrArr: "⇏", nrarr: "↛", nrarrc: "⤳̸", 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: "⊛", ocir: "⊚", Ocirc: "Ô", ocirc: "ô", 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: "⊕", Or: "⩔", or: "∨", orarr: "↻", ord: "⩝", order: "ℴ", orderof: "ℴ", ordf: "ª", ordm: "º", origof: "⊶", oror: "⩖", orslope: "⩗", orv: "⩛", oS: "Ⓢ", Oscr: "𝒪", oscr: "ℴ", Oslash: "Ø", oslash: "ø", osol: "⊘", Otilde: "Õ", otilde: "õ", Otimes: "⨷", otimes: "⊗", otimesas: "⨶", Ouml: "Ö", ouml: "ö", ovbar: "⌽", OverBar: "‾", OverBrace: "⏞", OverBracket: "⎴", OverParenthesis: "⏜", par: "∥", para: "¶", parallel: "∥", 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: "ℏ", plus: "+", plusacir: "⨣", plusb: "⊞", pluscir: "⨢", plusdo: "∔", plusdu: "⨥", pluse: "⩲", PlusMinus: "±", plusmn: "±", plussim: "⨦", plustwo: "⨧", pm: "±", Poincareplane: "ℌ", pointint: "⨕", Popf: "ℙ", popf: "𝕡", pound: "£", Pr: "⪻", pr: "≺", prap: "⪷", prcue: "≼", prE: "⪳", pre: "⪯", prec: "≺", precapprox: "⪷", preccurlyeq: "≼", Precedes: "≺", PrecedesEqual: "⪯", PrecedesSlantEqual: "≼", PrecedesTilde: "≾", preceq: "⪯", precnapprox: "⪹", precneqq: "⪵", precnsim: "⋨", precsim: "≾", Prime: "″", prime: "′", primes: "ℙ", prnap: "⪹", prnE: "⪵", prnsim: "⋨", prod: "∏", Product: "∏", profalar: "⌮", profline: "⌒", profsurf: "⌓", prop: "∝", Proportion: "∷", Proportional: "∝", 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: "»", Rarr: "↠", rArr: "⇒", rarr: "→", rarrap: "⥵", rarrb: "⇥", rarrbfs: "⤠", rarrc: "⤳", 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: "↳", Re: "ℜ", real: "ℜ", realine: "ℛ", realpart: "ℜ", reals: "ℝ", rect: "▭", REG: "®", reg: "®", ReverseElement: "∋", ReverseEquilibrium: "⇋", ReverseUpEquilibrium: "⥯", rfisht: "⥽", rfloor: "⌋", Rfr: "ℜ", rfr: "𝔯", rHar: "⥤", rhard: "⇁", rharu: "⇀", rharul: "⥬", Rho: "Ρ", rho: "ρ", rhov: "ϱ", RightAngleBracket: "⟩", RightArrow: "→", Rightarrow: "⇒", rightarrow: "→", RightArrowBar: "⇥", RightArrowLeftArrow: "⇄", rightarrowtail: "↣", RightCeiling: "⌉", RightDoubleBracket: "⟧", RightDownTeeVector: "⥝", RightDownVector: "⇂", RightDownVectorBar: "⥕", RightFloor: "⌋", rightharpoondown: "⇁", rightharpoonup: "⇀", rightleftarrows: "⇄", rightleftharpoons: "⇌", rightrightarrows: "⇉", rightsquigarrow: "↝", RightTee: "⊢", RightTeeArrow: "↦", RightTeeVector: "⥛", rightthreetimes: "⋌", RightTriangle: "⊳", RightTriangleBar: "⧐", RightTriangleEqual: "⊵", RightUpDownVector: "⥏", RightUpTeeVector: "⥜", RightUpVector: "↾", RightUpVectorBar: "⥔", RightVector: "⇀", RightVectorBar: "⥓", ring: "˚", risingdotseq: "≓", rlarr: "⇄", rlhar: "⇌", rlm: "", rmoust: "⎱", rmoustache: "⎱", 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: "‚", Sc: "⪼", sc: "≻", scap: "⪸", Scaron: "Š", scaron: "š", sccue: "≽", scE: "⪴", sce: "⪰", Scedil: "Ş", scedil: "ş", Scirc: "Ŝ", scirc: "ŝ", scnap: "⪺", scnE: "⪶", scnsim: "⋩", scpolint: "⨓", scsim: "≿", Scy: "С", scy: "с", sdot: "⋅", sdotb: "⊡", 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: "ь", sol: "/", solb: "⧄", solbar: "⌿", Sopf: "𝕊", sopf: "𝕤", spades: "♠", spadesuit: "♠", spar: "∥", sqcap: "⊓", sqcaps: "⊓︀", sqcup: "⊔", sqcups: "⊔︀", Sqrt: "√", sqsub: "⊏", sqsube: "⊑", sqsubset: "⊏", sqsubseteq: "⊑", sqsup: "⊐", sqsupe: "⊒", sqsupset: "⊐", sqsupseteq: "⊒", squ: "□", Square: "□", square: "□", SquareIntersection: "⊓", SquareSubset: "⊏", SquareSubsetEqual: "⊑", SquareSuperset: "⊐", SquareSupersetEqual: "⊒", SquareUnion: "⊔", squarf: "▪", 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: "⫓", succ: "≻", succapprox: "⪸", succcurlyeq: "≽", Succeeds: "≻", SucceedsEqual: "⪰", SucceedsSlantEqual: "≽", SucceedsTilde: "≿", succeq: "⪰", succnapprox: "⪺", succneqq: "⪶", succnsim: "⋩", succsim: "≿", SuchThat: "∋", Sum: "∑", sum: "∑", sung: "♪", Sup: "⋑", sup: "⊃", sup1: "¹", sup2: "²", sup3: "³", 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: "\t", target: "⌖", Tau: "Τ", tau: "τ", tbrk: "⎴", Tcaron: "Ť", tcaron: "ť", Tcedil: "Ţ", tcedil: "ţ", Tcy: "Т", tcy: "т", tdot: "⃛", telrec: "⌕", Tfr: "𝔗", tfr: "𝔱", there4: "∴", Therefore: "∴", therefore: "∴", Theta: "Θ", theta: "θ", thetasym: "ϑ", thetav: "ϑ", thickapprox: "≈", thicksim: "∼", ThickSpace: " ", thinsp: " ", ThinSpace: " ", thkap: "≈", thksim: "∼", THORN: "Þ", thorn: "þ", Tilde: "∼", tilde: "˜", TildeEqual: "≃", TildeFullEqual: "≅", TildeTilde: "≈", times: "×", timesb: "⊠", timesbar: "⨱", timesd: "⨰", tint: "∭", toea: "⤨", top: "⊤", topbot: "⌶", topcir: "⫱", 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: "𝕦", UpArrow: "↑", Uparrow: "⇑", uparrow: "↑", UpArrowBar: "⤒", UpArrowDownArrow: "⇅", UpDownArrow: "↕", Updownarrow: "⇕", updownarrow: "↕", UpEquilibrium: "⥮", upharpoonleft: "↿", upharpoonright: "↾", uplus: "⊎", UpperLeftArrow: "↖", UpperRightArrow: "↗", Upsi: "ϒ", upsi: "υ", upsih: "ϒ", Upsilon: "Υ", upsilon: "υ", UpTee: "⊥", UpTeeArrow: "↥", 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: "⫦", Vee: "⋁", vee: "∨", veebar: "⊻", 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: "" },
|
|
291
|
+
HEXCHARCODE = /^#[xX]([A-Fa-f0-9]+)$/,
|
|
292
|
+
CHARCODE = /^#([0-9]+)$/,
|
|
293
|
+
NAMED = /^([A-Za-z0-9]+)$/,
|
|
294
|
+
EntityParser = function () {
|
|
295
|
+
function t(t) {
|
|
296
|
+
this.named = t;
|
|
297
|
+
}return t.prototype.parse = function (t) {
|
|
298
|
+
if (t) {
|
|
299
|
+
var e = t.match(HEXCHARCODE);return e ? String.fromCharCode(parseInt(e[1], 16)) : (e = t.match(CHARCODE)) ? String.fromCharCode(parseInt(e[1], 10)) : (e = t.match(NAMED)) ? this.named[e[1]] : void 0;
|
|
300
|
+
}
|
|
301
|
+
}, t;
|
|
302
|
+
}(),
|
|
303
|
+
WSP = /[\t\n\f ]/,
|
|
304
|
+
ALPHA = /[A-Za-z]/,
|
|
305
|
+
CRLF = /\r\n?/g,
|
|
306
|
+
EventedTokenizer = function () {
|
|
307
|
+
function t(t, e) {
|
|
308
|
+
this.delegate = t, this.entityParser = e, this.state = null, this.input = null, this.index = -1, this.tagLine = -1, this.tagColumn = -1, this.line = -1, this.column = -1, this.states = { beforeData: function beforeData() {
|
|
309
|
+
"<" === this.peek() ? (this.state = "tagOpen", this.markTagStart(), this.consume()) : (this.state = "data", this.delegate.beginData());
|
|
310
|
+
}, data: function data() {
|
|
311
|
+
var t = this.peek();"<" === t ? (this.delegate.finishData(), this.state = "tagOpen", this.markTagStart(), this.consume()) : "&" === t ? (this.consume(), this.delegate.appendToData(this.consumeCharRef() || "&")) : (this.consume(), this.delegate.appendToData(t));
|
|
312
|
+
}, tagOpen: function tagOpen() {
|
|
313
|
+
var t = this.consume();"!" === t ? this.state = "markupDeclaration" : "/" === t ? this.state = "endTagOpen" : isAlpha(t) && (this.state = "tagName", this.delegate.beginStartTag(), this.delegate.appendToTagName(t.toLowerCase()));
|
|
314
|
+
}, markupDeclaration: function markupDeclaration() {
|
|
315
|
+
"-" === this.consume() && "-" === this.input.charAt(this.index) && (this.consume(), this.state = "commentStart", this.delegate.beginComment());
|
|
316
|
+
}, commentStart: function commentStart() {
|
|
317
|
+
var t = this.consume();"-" === t ? this.state = "commentStartDash" : ">" === t ? (this.delegate.finishComment(), this.state = "beforeData") : (this.delegate.appendToCommentData(t), this.state = "comment");
|
|
318
|
+
}, commentStartDash: function commentStartDash() {
|
|
319
|
+
var t = this.consume();"-" === t ? this.state = "commentEnd" : ">" === t ? (this.delegate.finishComment(), this.state = "beforeData") : (this.delegate.appendToCommentData("-"), this.state = "comment");
|
|
320
|
+
}, comment: function comment() {
|
|
321
|
+
var t = this.consume();"-" === t ? this.state = "commentEndDash" : this.delegate.appendToCommentData(t);
|
|
322
|
+
}, commentEndDash: function commentEndDash() {
|
|
323
|
+
var t = this.consume();"-" === t ? this.state = "commentEnd" : (this.delegate.appendToCommentData("-" + t), this.state = "comment");
|
|
324
|
+
}, commentEnd: function commentEnd() {
|
|
325
|
+
var t = this.consume();">" === t ? (this.delegate.finishComment(), this.state = "beforeData") : (this.delegate.appendToCommentData("--" + t), this.state = "comment");
|
|
326
|
+
}, tagName: function tagName() {
|
|
327
|
+
var t = this.consume();isSpace(t) ? this.state = "beforeAttributeName" : "/" === t ? this.state = "selfClosingStartTag" : ">" === t ? (this.delegate.finishTag(), this.state = "beforeData") : this.delegate.appendToTagName(t);
|
|
328
|
+
}, beforeAttributeName: function beforeAttributeName() {
|
|
329
|
+
var t = this.peek();isSpace(t) ? this.consume() : "/" === t ? (this.state = "selfClosingStartTag", this.consume()) : ">" === t ? (this.consume(), this.delegate.finishTag(), this.state = "beforeData") : "=" === t ? (this.delegate.reportSyntaxError("attribute name cannot start with equals sign"), this.state = "attributeName", this.delegate.beginAttribute(), this.consume(), this.delegate.appendToAttributeName(t)) : (this.state = "attributeName", this.delegate.beginAttribute());
|
|
330
|
+
}, attributeName: function attributeName() {
|
|
331
|
+
var t = this.peek();isSpace(t) ? (this.state = "afterAttributeName", this.consume()) : "/" === t ? (this.delegate.beginAttributeValue(!1), this.delegate.finishAttributeValue(), this.consume(), this.state = "selfClosingStartTag") : "=" === t ? (this.state = "beforeAttributeValue", this.consume()) : ">" === t ? (this.delegate.beginAttributeValue(!1), this.delegate.finishAttributeValue(), this.consume(), this.delegate.finishTag(), this.state = "beforeData") : '"' === t || "'" === t || "<" === t ? (this.delegate.reportSyntaxError(t + " is not a valid character within attribute names"), this.consume(), this.delegate.appendToAttributeName(t)) : (this.consume(), this.delegate.appendToAttributeName(t));
|
|
332
|
+
}, afterAttributeName: function afterAttributeName() {
|
|
333
|
+
var t = this.peek();isSpace(t) ? this.consume() : "/" === t ? (this.delegate.beginAttributeValue(!1), this.delegate.finishAttributeValue(), this.consume(), this.state = "selfClosingStartTag") : "=" === t ? (this.consume(), this.state = "beforeAttributeValue") : ">" === t ? (this.delegate.beginAttributeValue(!1), this.delegate.finishAttributeValue(), this.consume(), this.delegate.finishTag(), this.state = "beforeData") : (this.delegate.beginAttributeValue(!1), this.delegate.finishAttributeValue(), this.consume(), this.state = "attributeName", this.delegate.beginAttribute(), this.delegate.appendToAttributeName(t));
|
|
334
|
+
}, beforeAttributeValue: function beforeAttributeValue() {
|
|
335
|
+
var t = this.peek();isSpace(t) ? this.consume() : '"' === t ? (this.state = "attributeValueDoubleQuoted", this.delegate.beginAttributeValue(!0), this.consume()) : "'" === t ? (this.state = "attributeValueSingleQuoted", this.delegate.beginAttributeValue(!0), this.consume()) : ">" === t ? (this.delegate.beginAttributeValue(!1), this.delegate.finishAttributeValue(), this.consume(), this.delegate.finishTag(), this.state = "beforeData") : (this.state = "attributeValueUnquoted", this.delegate.beginAttributeValue(!1), this.consume(), this.delegate.appendToAttributeValue(t));
|
|
336
|
+
}, attributeValueDoubleQuoted: function attributeValueDoubleQuoted() {
|
|
337
|
+
var t = this.consume();'"' === t ? (this.delegate.finishAttributeValue(), this.state = "afterAttributeValueQuoted") : "&" === t ? this.delegate.appendToAttributeValue(this.consumeCharRef('"') || "&") : this.delegate.appendToAttributeValue(t);
|
|
338
|
+
}, attributeValueSingleQuoted: function attributeValueSingleQuoted() {
|
|
339
|
+
var t = this.consume();"'" === t ? (this.delegate.finishAttributeValue(), this.state = "afterAttributeValueQuoted") : "&" === t ? this.delegate.appendToAttributeValue(this.consumeCharRef("'") || "&") : this.delegate.appendToAttributeValue(t);
|
|
340
|
+
}, attributeValueUnquoted: function attributeValueUnquoted() {
|
|
341
|
+
var t = this.peek();isSpace(t) ? (this.delegate.finishAttributeValue(), this.consume(), this.state = "beforeAttributeName") : "&" === t ? (this.consume(), this.delegate.appendToAttributeValue(this.consumeCharRef(">") || "&")) : ">" === t ? (this.delegate.finishAttributeValue(), this.consume(), this.delegate.finishTag(), this.state = "beforeData") : (this.consume(), this.delegate.appendToAttributeValue(t));
|
|
342
|
+
}, afterAttributeValueQuoted: function afterAttributeValueQuoted() {
|
|
343
|
+
var t = this.peek();isSpace(t) ? (this.consume(), this.state = "beforeAttributeName") : "/" === t ? (this.consume(), this.state = "selfClosingStartTag") : ">" === t ? (this.consume(), this.delegate.finishTag(), this.state = "beforeData") : this.state = "beforeAttributeName";
|
|
344
|
+
}, selfClosingStartTag: function selfClosingStartTag() {
|
|
345
|
+
">" === this.peek() ? (this.consume(), this.delegate.markTagAsSelfClosing(), this.delegate.finishTag(), this.state = "beforeData") : this.state = "beforeAttributeName";
|
|
346
|
+
}, endTagOpen: function endTagOpen() {
|
|
347
|
+
var t = this.consume();isAlpha(t) && (this.state = "tagName", this.delegate.beginEndTag(), this.delegate.appendToTagName(t.toLowerCase()));
|
|
348
|
+
} }, this.reset();
|
|
349
|
+
}return t.prototype.reset = function () {
|
|
350
|
+
this.state = "beforeData", this.input = "", this.index = 0, this.line = 1, this.column = 0, this.tagLine = -1, this.tagColumn = -1, this.delegate.reset();
|
|
351
|
+
}, t.prototype.tokenize = function (t) {
|
|
352
|
+
this.reset(), this.tokenizePart(t), this.tokenizeEOF();
|
|
353
|
+
}, t.prototype.tokenizePart = function (t) {
|
|
354
|
+
for (this.input += preprocessInput(t); this.index < this.input.length;) {
|
|
355
|
+
this.states[this.state].call(this);
|
|
356
|
+
}
|
|
357
|
+
}, t.prototype.tokenizeEOF = function () {
|
|
358
|
+
this.flushData();
|
|
359
|
+
}, t.prototype.flushData = function () {
|
|
360
|
+
"data" === this.state && (this.delegate.finishData(), this.state = "beforeData");
|
|
361
|
+
}, t.prototype.peek = function () {
|
|
362
|
+
return this.input.charAt(this.index);
|
|
363
|
+
}, t.prototype.consume = function () {
|
|
364
|
+
var t = this.peek();return this.index++, "\n" === t ? (this.line++, this.column = 0) : this.column++, t;
|
|
365
|
+
}, t.prototype.consumeCharRef = function () {
|
|
366
|
+
var t = this.input.indexOf(";", this.index);if (-1 !== t) {
|
|
367
|
+
var e = this.input.slice(this.index, t),
|
|
368
|
+
r = this.entityParser.parse(e);if (r) {
|
|
369
|
+
for (var a = e.length; a;) {
|
|
370
|
+
this.consume(), a--;
|
|
371
|
+
}return this.consume(), r;
|
|
372
|
+
}
|
|
373
|
+
}
|
|
374
|
+
}, t.prototype.markTagStart = function () {
|
|
375
|
+
this.tagLine = this.line, this.tagColumn = this.column, this.delegate.tagOpen && this.delegate.tagOpen();
|
|
376
|
+
}, t;
|
|
377
|
+
}(),
|
|
378
|
+
Tokenizer = function () {
|
|
379
|
+
function t(t, e) {
|
|
380
|
+
void 0 === e && (e = {}), this.options = e, this._token = null, this.startLine = 1, this.startColumn = 0, this.tokens = [], this.currentAttribute = null, this.tokenizer = new EventedTokenizer(this, t);
|
|
381
|
+
}return Object.defineProperty(t.prototype, "token", { get: function get() {
|
|
382
|
+
return unwrap(this._token);
|
|
383
|
+
}, set: function set(t) {
|
|
384
|
+
this._token = t;
|
|
385
|
+
}, enumerable: !0, configurable: !0 }), t.prototype.tokenize = function (t) {
|
|
386
|
+
return this.tokens = [], this.tokenizer.tokenize(t), this.tokens;
|
|
387
|
+
}, t.prototype.tokenizePart = function (t) {
|
|
388
|
+
return this.tokens = [], this.tokenizer.tokenizePart(t), this.tokens;
|
|
389
|
+
}, t.prototype.tokenizeEOF = function () {
|
|
390
|
+
return this.tokens = [], this.tokenizer.tokenizeEOF(), this.tokens[0];
|
|
391
|
+
}, t.prototype.reset = function () {
|
|
392
|
+
this._token = null, this.startLine = 1, this.startColumn = 0;
|
|
393
|
+
}, t.prototype.addLocInfo = function () {
|
|
394
|
+
this.options.loc && (this.token.loc = { start: { line: this.startLine, column: this.startColumn }, end: { line: this.tokenizer.line, column: this.tokenizer.column } }), this.startLine = this.tokenizer.line, this.startColumn = this.tokenizer.column;
|
|
395
|
+
}, t.prototype.beginData = function () {
|
|
396
|
+
this.token = { type: "Chars", chars: "" }, this.tokens.push(this.token);
|
|
397
|
+
}, t.prototype.appendToData = function (t) {
|
|
398
|
+
this.token.chars += t;
|
|
399
|
+
}, t.prototype.finishData = function () {
|
|
400
|
+
this.addLocInfo();
|
|
401
|
+
}, t.prototype.beginComment = function () {
|
|
402
|
+
this.token = { type: "Comment", chars: "" }, this.tokens.push(this.token);
|
|
403
|
+
}, t.prototype.appendToCommentData = function (t) {
|
|
404
|
+
this.token.chars += t;
|
|
405
|
+
}, t.prototype.finishComment = function () {
|
|
406
|
+
this.addLocInfo();
|
|
407
|
+
}, t.prototype.beginStartTag = function () {
|
|
408
|
+
this.token = { type: "StartTag", tagName: "", attributes: [], selfClosing: !1 }, this.tokens.push(this.token);
|
|
409
|
+
}, t.prototype.beginEndTag = function () {
|
|
410
|
+
this.token = { type: "EndTag", tagName: "" }, this.tokens.push(this.token);
|
|
411
|
+
}, t.prototype.finishTag = function () {
|
|
412
|
+
this.addLocInfo();
|
|
413
|
+
}, t.prototype.markTagAsSelfClosing = function () {
|
|
414
|
+
this.token.selfClosing = !0;
|
|
415
|
+
}, t.prototype.appendToTagName = function (t) {
|
|
416
|
+
this.token.tagName += t;
|
|
417
|
+
}, t.prototype.beginAttribute = function () {
|
|
418
|
+
var t = unwrap(this.token.attributes, "current token's attributs");this.currentAttribute = ["", "", !1], t.push(this.currentAttribute);
|
|
419
|
+
}, t.prototype.appendToAttributeName = function (t) {
|
|
420
|
+
unwrap(this.currentAttribute)[0] += t;
|
|
421
|
+
}, t.prototype.beginAttributeValue = function (t) {
|
|
422
|
+
unwrap(this.currentAttribute)[2] = t;
|
|
423
|
+
}, t.prototype.appendToAttributeValue = function (t) {
|
|
424
|
+
var e = unwrap(this.currentAttribute);e[1] = e[1] || "", e[1] += t;
|
|
425
|
+
}, t.prototype.finishAttributeValue = function () {}, t.prototype.reportSyntaxError = function (t) {
|
|
426
|
+
this.token.syntaxError = t;
|
|
427
|
+
}, t;
|
|
428
|
+
}();var objKeys = Object.keys;
|
|
429
|
+
|
|
430
|
+
var ListSlice = function () {
|
|
431
|
+
function ListSlice(t, e) {
|
|
432
|
+
_classCallCheck(this, ListSlice);
|
|
433
|
+
|
|
434
|
+
this._head = t, this._tail = e;
|
|
435
|
+
}
|
|
436
|
+
|
|
437
|
+
_createClass(ListSlice, [{
|
|
438
|
+
key: "forEachNode",
|
|
439
|
+
value: function forEachNode(t) {
|
|
440
|
+
var e = this._head;for (; null !== e;) {
|
|
441
|
+
t(e), e = this.nextNode(e);
|
|
442
|
+
}
|
|
443
|
+
}
|
|
444
|
+
}, {
|
|
445
|
+
key: "head",
|
|
446
|
+
value: function head() {
|
|
447
|
+
return this._head;
|
|
448
|
+
}
|
|
449
|
+
}, {
|
|
450
|
+
key: "tail",
|
|
451
|
+
value: function tail() {
|
|
452
|
+
return this._tail;
|
|
453
|
+
}
|
|
454
|
+
}, {
|
|
455
|
+
key: "toArray",
|
|
456
|
+
value: function toArray() {
|
|
457
|
+
var t = [];return this.forEachNode(function (e) {
|
|
458
|
+
return t.push(e);
|
|
459
|
+
}), t;
|
|
460
|
+
}
|
|
461
|
+
}, {
|
|
462
|
+
key: "nextNode",
|
|
463
|
+
value: function nextNode(t) {
|
|
464
|
+
return t === this._tail ? null : t.next;
|
|
465
|
+
}
|
|
466
|
+
}]);
|
|
467
|
+
|
|
468
|
+
return ListSlice;
|
|
469
|
+
}();
|
|
470
|
+
|
|
471
|
+
var EMPTY_SLICE = new ListSlice(null, null),
|
|
472
|
+
EMPTY_ARRAY = Object.freeze([]),
|
|
473
|
+
entityParser = new EntityParser(namedCharRefs);
|
|
474
|
+
var Parser = function () {
|
|
475
|
+
function Parser(t) {
|
|
476
|
+
var e = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
477
|
+
|
|
478
|
+
_classCallCheck(this, Parser);
|
|
479
|
+
|
|
480
|
+
this.elementStack = [], this.currentAttribute = null, this.currentNode = null, this.tokenizer = new EventedTokenizer(this, entityParser), this.options = e, this.tokenizer.states.tagOpen = function () {
|
|
481
|
+
var t = this.consume();"!" === t ? this.state = "markupDeclaration" : "/" === t ? this.state = "endTagOpen" : /[A-Za-z]/.test(t) && (this.state = "tagName", this.delegate.beginStartTag(), this.delegate.appendToTagName(t));
|
|
482
|
+
}, this.tokenizer.states.endTagOpen = function () {
|
|
483
|
+
var t = this.consume();/[A-Za-z]/.test(t) && (this.state = "tagName", this.delegate.beginEndTag(), this.delegate.appendToTagName(t));
|
|
484
|
+
}, this.source = t.split(/(?:\r\n?|\n)/g);
|
|
485
|
+
}
|
|
486
|
+
|
|
487
|
+
_createClass(Parser, [{
|
|
488
|
+
key: "acceptNode",
|
|
489
|
+
value: function acceptNode(t) {
|
|
490
|
+
return this[t.type](t);
|
|
491
|
+
}
|
|
492
|
+
}, {
|
|
493
|
+
key: "currentElement",
|
|
494
|
+
value: function currentElement() {
|
|
495
|
+
return this.elementStack[this.elementStack.length - 1];
|
|
496
|
+
}
|
|
497
|
+
}, {
|
|
498
|
+
key: "sourceForNode",
|
|
499
|
+
value: function sourceForNode(t, e) {
|
|
500
|
+
var r = void 0,
|
|
501
|
+
a = void 0,
|
|
502
|
+
i = void 0,
|
|
503
|
+
n = t.loc.start.line - 1,
|
|
504
|
+
s = n - 1,
|
|
505
|
+
o = t.loc.start.column,
|
|
506
|
+
l = [];for (e ? (a = e.loc.end.line - 1, i = e.loc.end.column) : (a = t.loc.end.line - 1, i = t.loc.end.column); s < a;) {
|
|
507
|
+
s++, r = this.source[s], s === n ? n === a ? l.push(r.slice(o, i)) : l.push(r.slice(o)) : s === a ? l.push(r.slice(0, i)) : l.push(r);
|
|
508
|
+
}return l.join("\n");
|
|
509
|
+
}
|
|
510
|
+
}, {
|
|
511
|
+
key: "currentAttr",
|
|
512
|
+
get: function get() {
|
|
513
|
+
return this.currentAttribute;
|
|
514
|
+
}
|
|
515
|
+
}, {
|
|
516
|
+
key: "currentTag",
|
|
517
|
+
get: function get() {
|
|
518
|
+
var t = this.currentNode;return t;
|
|
519
|
+
}
|
|
520
|
+
}, {
|
|
521
|
+
key: "currentStartTag",
|
|
522
|
+
get: function get() {
|
|
523
|
+
var t = this.currentNode;return t;
|
|
524
|
+
}
|
|
525
|
+
}, {
|
|
526
|
+
key: "currentEndTag",
|
|
527
|
+
get: function get() {
|
|
528
|
+
var t = this.currentNode;return t;
|
|
529
|
+
}
|
|
530
|
+
}, {
|
|
531
|
+
key: "currentComment",
|
|
532
|
+
get: function get() {
|
|
533
|
+
var t = this.currentNode;return t;
|
|
534
|
+
}
|
|
535
|
+
}, {
|
|
536
|
+
key: "currentData",
|
|
537
|
+
get: function get() {
|
|
538
|
+
var t = this.currentNode;return t;
|
|
539
|
+
}
|
|
540
|
+
}]);
|
|
541
|
+
|
|
542
|
+
return Parser;
|
|
543
|
+
}();
|
|
544
|
+
|
|
545
|
+
var HandlebarsNodeVisitors = function (_Parser) {
|
|
546
|
+
_inherits(HandlebarsNodeVisitors, _Parser);
|
|
547
|
+
|
|
548
|
+
function HandlebarsNodeVisitors() {
|
|
549
|
+
var _this;
|
|
550
|
+
|
|
551
|
+
_classCallCheck(this, HandlebarsNodeVisitors);
|
|
552
|
+
|
|
553
|
+
(_this = _possibleConstructorReturn(this, (HandlebarsNodeVisitors.__proto__ || Object.getPrototypeOf(HandlebarsNodeVisitors)).apply(this, arguments)), _this), _this.cursorCount = 0;return _this;
|
|
554
|
+
}
|
|
555
|
+
|
|
556
|
+
_createClass(HandlebarsNodeVisitors, [{
|
|
557
|
+
key: "cursor",
|
|
558
|
+
value: function cursor() {
|
|
559
|
+
return "%cursor:" + this.cursorCount++ + "%";
|
|
560
|
+
}
|
|
561
|
+
}, {
|
|
562
|
+
key: "Program",
|
|
563
|
+
value: function Program(t) {
|
|
564
|
+
var e = [];this.cursorCount = 0;var r = void 0,
|
|
565
|
+
a = b.program(e, t.blockParams, t.loc),
|
|
566
|
+
i = t.body.length;if (this.elementStack.push(a), 0 === i) return this.elementStack.pop();for (r = 0; r < i; r++) {
|
|
567
|
+
this.acceptNode(t.body[r]);
|
|
568
|
+
}var n = this.elementStack.pop();if (n !== a) {
|
|
569
|
+
var _t4 = n;throw new SyntaxError$1("Unclosed element `" + _t4.tag + "` (on line " + _t4.loc.start.line + ").", _t4.loc);
|
|
570
|
+
}return a;
|
|
571
|
+
}
|
|
572
|
+
}, {
|
|
573
|
+
key: "BlockStatement",
|
|
574
|
+
value: function BlockStatement(t) {
|
|
575
|
+
if ("comment" === this.tokenizer.state) return void this.appendToCommentData(this.sourceForNode(t));if ("comment" !== this.tokenizer.state && "data" !== this.tokenizer.state && "beforeData" !== this.tokenizer.state) throw new SyntaxError$1("A block may only be used inside an HTML element or another block.", t.loc);
|
|
576
|
+
var _acceptCallNodes = acceptCallNodes(this, t),
|
|
577
|
+
e = _acceptCallNodes.path,
|
|
578
|
+
r = _acceptCallNodes.params,
|
|
579
|
+
a = _acceptCallNodes.hash,
|
|
580
|
+
i = this.Program(t.program),
|
|
581
|
+
n = t.inverse ? this.Program(t.inverse) : null;
|
|
582
|
+
|
|
583
|
+
"in-element" === e.original && (a = addInElementHash(this.cursor(), a, t.loc));var s = b.block(e, r, a, i, n, t.loc);appendChild(this.currentElement(), s);
|
|
584
|
+
}
|
|
585
|
+
}, {
|
|
586
|
+
key: "MustacheStatement",
|
|
587
|
+
value: function MustacheStatement(t) {
|
|
588
|
+
var e = this.tokenizer;
|
|
589
|
+
if ("comment" === e.state) return void this.appendToCommentData(this.sourceForNode(t));var r = void 0,
|
|
590
|
+
a = t.escaped,
|
|
591
|
+
i = t.loc;if (t.path.type.match(/Literal$/)) r = { type: "MustacheStatement", path: this.acceptNode(t.path), params: [], hash: b.hash(), escaped: a, loc: i };else {
|
|
592
|
+
var _acceptCallNodes2 = acceptCallNodes(this, t),
|
|
593
|
+
_e6 = _acceptCallNodes2.path,
|
|
594
|
+
n = _acceptCallNodes2.params,
|
|
595
|
+
s = _acceptCallNodes2.hash;
|
|
596
|
+
|
|
597
|
+
r = b.mustache(_e6, n, s, !a, i);
|
|
598
|
+
}switch (e.state) {case "tagName":
|
|
599
|
+
addElementModifier(this.currentStartTag, r), e.state = "beforeAttributeName";break;case "beforeAttributeName":
|
|
600
|
+
addElementModifier(this.currentStartTag, r);break;case "attributeName":case "afterAttributeName":
|
|
601
|
+
this.beginAttributeValue(!1), this.finishAttributeValue(), addElementModifier(this.currentStartTag, r), e.state = "beforeAttributeName";break;case "afterAttributeValueQuoted":
|
|
602
|
+
addElementModifier(this.currentStartTag, r), e.state = "beforeAttributeName";break;case "beforeAttributeValue":
|
|
603
|
+
this.beginAttributeValue(!1), appendDynamicAttributeValuePart(this.currentAttribute, r), e.state = "attributeValueUnquoted";break;case "attributeValueDoubleQuoted":case "attributeValueSingleQuoted":case "attributeValueUnquoted":
|
|
604
|
+
appendDynamicAttributeValuePart(this.currentAttribute, r);break;default:
|
|
605
|
+
appendChild(this.currentElement(), r);}return r;
|
|
606
|
+
}
|
|
607
|
+
}, {
|
|
608
|
+
key: "ContentStatement",
|
|
609
|
+
value: function ContentStatement(t) {
|
|
610
|
+
updateTokenizerLocation(this.tokenizer, t), this.tokenizer.tokenizePart(t.value), this.tokenizer.flushData();
|
|
611
|
+
}
|
|
612
|
+
}, {
|
|
613
|
+
key: "CommentStatement",
|
|
614
|
+
value: function CommentStatement(t) {
|
|
615
|
+
var e = this.tokenizer;
|
|
616
|
+
if ("comment" === e.state) return this.appendToCommentData(this.sourceForNode(t)), null;var r = t.value,
|
|
617
|
+
a = t.loc,
|
|
618
|
+
i = b.mustacheComment(r, a);
|
|
619
|
+
switch (e.state) {case "beforeAttributeName":
|
|
620
|
+
this.currentStartTag.comments.push(i);break;case "beforeData":case "data":
|
|
621
|
+
appendChild(this.currentElement(), i);break;default:
|
|
622
|
+
throw new SyntaxError$1("Using a Handlebars comment when in the `" + e.state + "` state is not supported: \"" + i.value + "\" on line " + a.start.line + ":" + a.start.column, t.loc);}return i;
|
|
623
|
+
}
|
|
624
|
+
}, {
|
|
625
|
+
key: "PartialStatement",
|
|
626
|
+
value: function PartialStatement(t) {
|
|
627
|
+
var e = t.loc;
|
|
628
|
+
throw new SyntaxError$1("Handlebars partials are not supported: \"" + this.sourceForNode(t, t.name) + "\" at L" + e.start.line + ":C" + e.start.column, t.loc);
|
|
629
|
+
}
|
|
630
|
+
}, {
|
|
631
|
+
key: "PartialBlockStatement",
|
|
632
|
+
value: function PartialBlockStatement(t) {
|
|
633
|
+
var e = t.loc;
|
|
634
|
+
throw new SyntaxError$1("Handlebars partial blocks are not supported: \"" + this.sourceForNode(t, t.name) + "\" at L" + e.start.line + ":C" + e.start.column, t.loc);
|
|
635
|
+
}
|
|
636
|
+
}, {
|
|
637
|
+
key: "Decorator",
|
|
638
|
+
value: function Decorator(t) {
|
|
639
|
+
var e = t.loc;
|
|
640
|
+
throw new SyntaxError$1("Handlebars decorators are not supported: \"" + this.sourceForNode(t, t.path) + "\" at L" + e.start.line + ":C" + e.start.column, t.loc);
|
|
641
|
+
}
|
|
642
|
+
}, {
|
|
643
|
+
key: "DecoratorBlock",
|
|
644
|
+
value: function DecoratorBlock(t) {
|
|
645
|
+
var e = t.loc;
|
|
646
|
+
throw new SyntaxError$1("Handlebars decorator blocks are not supported: \"" + this.sourceForNode(t, t.path) + "\" at L" + e.start.line + ":C" + e.start.column, t.loc);
|
|
647
|
+
}
|
|
648
|
+
}, {
|
|
649
|
+
key: "SubExpression",
|
|
650
|
+
value: function SubExpression(t) {
|
|
651
|
+
var _acceptCallNodes3 = acceptCallNodes(this, t),
|
|
652
|
+
e = _acceptCallNodes3.path,
|
|
653
|
+
r = _acceptCallNodes3.params,
|
|
654
|
+
a = _acceptCallNodes3.hash;
|
|
655
|
+
|
|
656
|
+
return b.sexpr(e, r, a, t.loc);
|
|
657
|
+
}
|
|
658
|
+
}, {
|
|
659
|
+
key: "PathExpression",
|
|
660
|
+
value: function PathExpression(t) {
|
|
661
|
+
var e = void 0,
|
|
662
|
+
r = t.original,
|
|
663
|
+
a = t.loc;if (-1 !== r.indexOf("/")) {
|
|
664
|
+
if ("./" === r.slice(0, 2)) throw new SyntaxError$1("Using \"./\" is not supported in Glimmer and unnecessary: \"" + t.original + "\" on line " + a.start.line + ".", t.loc);if ("../" === r.slice(0, 3)) throw new SyntaxError$1("Changing context using \"../\" is not supported in Glimmer: \"" + t.original + "\" on line " + a.start.line + ".", t.loc);if (-1 !== r.indexOf(".")) throw new SyntaxError$1("Mixing '.' and '/' in paths is not supported in Glimmer; use only '.' to separate property paths: \"" + t.original + "\" on line " + a.start.line + ".", t.loc);e = [t.parts.join("/")];
|
|
665
|
+
} else e = t.parts;var i = !1;return r.match(/^this(\..+)?$/) && (i = !0), { type: "PathExpression", original: t.original, this: i, parts: e, data: t.data, loc: t.loc };
|
|
666
|
+
}
|
|
667
|
+
}, {
|
|
668
|
+
key: "Hash",
|
|
669
|
+
value: function Hash(t) {
|
|
670
|
+
var e = [];for (var r = 0; r < t.pairs.length; r++) {
|
|
671
|
+
var a = t.pairs[r];e.push(b.pair(a.key, this.acceptNode(a.value), a.loc));
|
|
672
|
+
}return b.hash(e, t.loc);
|
|
673
|
+
}
|
|
674
|
+
}, {
|
|
675
|
+
key: "StringLiteral",
|
|
676
|
+
value: function StringLiteral(t) {
|
|
677
|
+
return b.literal("StringLiteral", t.value, t.loc);
|
|
678
|
+
}
|
|
679
|
+
}, {
|
|
680
|
+
key: "BooleanLiteral",
|
|
681
|
+
value: function BooleanLiteral(t) {
|
|
682
|
+
return b.literal("BooleanLiteral", t.value, t.loc);
|
|
683
|
+
}
|
|
684
|
+
}, {
|
|
685
|
+
key: "NumberLiteral",
|
|
686
|
+
value: function NumberLiteral(t) {
|
|
687
|
+
return b.literal("NumberLiteral", t.value, t.loc);
|
|
688
|
+
}
|
|
689
|
+
}, {
|
|
690
|
+
key: "UndefinedLiteral",
|
|
691
|
+
value: function UndefinedLiteral(t) {
|
|
692
|
+
return b.literal("UndefinedLiteral", void 0, t.loc);
|
|
693
|
+
}
|
|
694
|
+
}, {
|
|
695
|
+
key: "NullLiteral",
|
|
696
|
+
value: function NullLiteral(t) {
|
|
697
|
+
return b.literal("NullLiteral", null, t.loc);
|
|
698
|
+
}
|
|
699
|
+
}]);
|
|
700
|
+
|
|
701
|
+
return HandlebarsNodeVisitors;
|
|
702
|
+
}(Parser);
|
|
703
|
+
|
|
704
|
+
var visitorKeys = { Program: ["body"], MustacheStatement: ["path", "params", "hash"], BlockStatement: ["path", "params", "hash", "program", "inverse"], ElementModifierStatement: ["path", "params", "hash"], PartialStatement: ["name", "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"] };var TraversalError = function () {
|
|
705
|
+
function t(t, e, r, a) {
|
|
706
|
+
var i = Error.call(this, t);this.key = a, this.message = t, this.node = e, this.parent = r, this.stack = i.stack;
|
|
707
|
+
}return t.prototype = Object.create(Error.prototype), t.prototype.constructor = t, t;
|
|
708
|
+
}();
|
|
709
|
+
var Walker = function () {
|
|
710
|
+
function Walker(t) {
|
|
711
|
+
_classCallCheck(this, Walker);
|
|
712
|
+
|
|
713
|
+
this.order = t, this.stack = [];
|
|
714
|
+
}
|
|
715
|
+
|
|
716
|
+
_createClass(Walker, [{
|
|
717
|
+
key: "visit",
|
|
718
|
+
value: function visit(t, e) {
|
|
719
|
+
t && (this.stack.push(t), "post" === this.order ? (this.children(t, e), e(t, this)) : (e(t, this), this.children(t, e)), this.stack.pop());
|
|
720
|
+
}
|
|
721
|
+
}, {
|
|
722
|
+
key: "children",
|
|
723
|
+
value: function children(t, e) {
|
|
724
|
+
var r = visitors[t.type];r && r(this, t, e);
|
|
725
|
+
}
|
|
726
|
+
}]);
|
|
727
|
+
|
|
728
|
+
return Walker;
|
|
729
|
+
}();
|
|
730
|
+
|
|
731
|
+
var visitors = {
|
|
732
|
+
Program: function Program(t, e, r) {
|
|
733
|
+
for (var a = 0; a < e.body.length; a++) {
|
|
734
|
+
t.visit(e.body[a], r);
|
|
735
|
+
}
|
|
736
|
+
},
|
|
737
|
+
ElementNode: function ElementNode(t, e, r) {
|
|
738
|
+
for (var a = 0; a < e.children.length; a++) {
|
|
739
|
+
t.visit(e.children[a], r);
|
|
740
|
+
}
|
|
741
|
+
},
|
|
742
|
+
BlockStatement: function BlockStatement(t, e, r) {
|
|
743
|
+
t.visit(e.program, r), t.visit(e.inverse || null, r);
|
|
744
|
+
}
|
|
745
|
+
};var commonjsGlobal = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof self ? self : {},
|
|
746
|
+
utils = createCommonjsModule(function (t, e) {
|
|
747
|
+
function r(t) {
|
|
748
|
+
return i[t];
|
|
749
|
+
}function a(t) {
|
|
750
|
+
for (var e = 1; e < arguments.length; e++) {
|
|
751
|
+
for (var r in arguments[e]) {
|
|
752
|
+
Object.prototype.hasOwnProperty.call(arguments[e], r) && (t[r] = arguments[e][r]);
|
|
753
|
+
}
|
|
754
|
+
}return t;
|
|
755
|
+
}e.__esModule = !0, e.extend = a, e.indexOf = function (t, e) {
|
|
756
|
+
for (var r = 0, a = t.length; r < a; r++) {
|
|
757
|
+
if (t[r] === e) return r;
|
|
758
|
+
}return -1;
|
|
759
|
+
}, e.escapeExpression = function (t) {
|
|
760
|
+
if ("string" != typeof t) {
|
|
761
|
+
if (t && t.toHTML) return t.toHTML();if (null == t) return "";if (!t) return t + "";t = "" + t;
|
|
762
|
+
}return s.test(t) ? t.replace(n, r) : t;
|
|
763
|
+
}, e.isEmpty = function (t) {
|
|
764
|
+
return !t && 0 !== t || !(!c(t) || 0 !== t.length);
|
|
765
|
+
}, e.createFrame = function (t) {
|
|
766
|
+
var e = a({}, t);return e._parent = t, e;
|
|
767
|
+
}, e.blockParams = function (t, e) {
|
|
768
|
+
return t.path = e, t;
|
|
769
|
+
}, e.appendContextPath = function (t, e) {
|
|
770
|
+
return (t ? t + "." : "") + e;
|
|
771
|
+
};var i = { "&": "&", "<": "<", ">": ">", '"': """, "'": "'", "`": "`", "=": "=" },
|
|
772
|
+
n = /[&<>"'`=]/g,
|
|
773
|
+
s = /[&<>"'`=]/,
|
|
774
|
+
o = Object.prototype.toString;e.toString = o;var l = function l(t) {
|
|
775
|
+
return "function" == typeof t;
|
|
776
|
+
};l(/x/) && (e.isFunction = l = function l(t) {
|
|
777
|
+
return "function" == typeof t && "[object Function]" === o.call(t);
|
|
778
|
+
}), e.isFunction = l;var c = Array.isArray || function (t) {
|
|
779
|
+
return !(!t || "object" != (typeof t === "undefined" ? "undefined" : _typeof(t))) && "[object Array]" === o.call(t);
|
|
780
|
+
};e.isArray = c;
|
|
781
|
+
});unwrapExports(utils);var exception = createCommonjsModule(function (t, e) {
|
|
782
|
+
function r(t, e) {
|
|
783
|
+
var i = e && e.loc,
|
|
784
|
+
n = void 0,
|
|
785
|
+
s = void 0;i && (t += " - " + (n = i.start.line) + ":" + (s = i.start.column));for (var o = Error.prototype.constructor.call(this, t), l = 0; l < a.length; l++) {
|
|
786
|
+
this[a[l]] = o[a[l]];
|
|
787
|
+
}Error.captureStackTrace && Error.captureStackTrace(this, r);try {
|
|
788
|
+
i && (this.lineNumber = n, Object.defineProperty ? Object.defineProperty(this, "column", { value: s, enumerable: !0 }) : this.column = s);
|
|
789
|
+
} catch (t) {}
|
|
790
|
+
}e.__esModule = !0;var a = ["description", "fileName", "lineNumber", "message", "name", "number", "stack"];r.prototype = new Error(), e.default = r, t.exports = e.default;
|
|
791
|
+
});unwrapExports(exception);var blockHelperMissing = createCommonjsModule(function (t, e) {
|
|
792
|
+
e.__esModule = !0, e.default = function (t) {
|
|
793
|
+
t.registerHelper("blockHelperMissing", function (e, r) {
|
|
794
|
+
var a = r.inverse,
|
|
795
|
+
i = r.fn;if (!0 === e) return i(this);if (!1 === e || null == e) return a(this);if (utils.isArray(e)) return e.length > 0 ? (r.ids && (r.ids = [r.name]), t.helpers.each(e, r)) : a(this);if (r.data && r.ids) {
|
|
796
|
+
var n = utils.createFrame(r.data);n.contextPath = utils.appendContextPath(r.data.contextPath, r.name), r = { data: n };
|
|
797
|
+
}return i(e, r);
|
|
798
|
+
});
|
|
799
|
+
}, t.exports = e.default;
|
|
800
|
+
});unwrapExports(blockHelperMissing);var each = createCommonjsModule(function (t, e) {
|
|
801
|
+
e.__esModule = !0;var r = function (t) {
|
|
802
|
+
return t && t.__esModule ? t : { default: t };
|
|
803
|
+
}(exception);e.default = function (t) {
|
|
804
|
+
t.registerHelper("each", function (t, e) {
|
|
805
|
+
function a(e, r, a) {
|
|
806
|
+
l && (l.key = e, l.index = r, l.first = 0 === r, l.last = !!a, c && (l.contextPath = c + e)), o += i(t[e], { data: l, blockParams: utils.blockParams([t[e], e], [c + e, null]) });
|
|
807
|
+
}if (!e) throw new r.default("Must pass iterator to #each");var i = e.fn,
|
|
808
|
+
n = e.inverse,
|
|
809
|
+
s = 0,
|
|
810
|
+
o = "",
|
|
811
|
+
l = void 0,
|
|
812
|
+
c = void 0;if (e.data && e.ids && (c = utils.appendContextPath(e.data.contextPath, e.ids[0]) + "."), utils.isFunction(t) && (t = t.call(this)), e.data && (l = utils.createFrame(e.data)), t && "object" == (typeof t === "undefined" ? "undefined" : _typeof(t))) if (utils.isArray(t)) for (var u = t.length; s < u; s++) {
|
|
813
|
+
s in t && a(s, s, s === t.length - 1);
|
|
814
|
+
} else {
|
|
815
|
+
var p = void 0;for (var h in t) {
|
|
816
|
+
t.hasOwnProperty(h) && (void 0 !== p && a(p, s - 1), p = h, s++);
|
|
817
|
+
}void 0 !== p && a(p, s - 1, !0);
|
|
818
|
+
}return 0 === s && (o = n(this)), o;
|
|
819
|
+
});
|
|
820
|
+
}, t.exports = e.default;
|
|
821
|
+
});unwrapExports(each);var helperMissing = createCommonjsModule(function (t, e) {
|
|
822
|
+
e.__esModule = !0;var r = function (t) {
|
|
823
|
+
return t && t.__esModule ? t : { default: t };
|
|
824
|
+
}(exception);e.default = function (t) {
|
|
825
|
+
t.registerHelper("helperMissing", function () {
|
|
826
|
+
if (1 !== arguments.length) throw new r.default('Missing helper: "' + arguments[arguments.length - 1].name + '"');
|
|
827
|
+
});
|
|
828
|
+
}, t.exports = e.default;
|
|
829
|
+
});unwrapExports(helperMissing);var _if = createCommonjsModule(function (t, e) {
|
|
830
|
+
e.__esModule = !0, e.default = function (t) {
|
|
831
|
+
t.registerHelper("if", function (t, e) {
|
|
832
|
+
return utils.isFunction(t) && (t = t.call(this)), !e.hash.includeZero && !t || utils.isEmpty(t) ? e.inverse(this) : e.fn(this);
|
|
833
|
+
}), t.registerHelper("unless", function (e, r) {
|
|
834
|
+
return t.helpers.if.call(this, e, { fn: r.inverse, inverse: r.fn, hash: r.hash });
|
|
835
|
+
});
|
|
836
|
+
}, t.exports = e.default;
|
|
837
|
+
});unwrapExports(_if);var log = createCommonjsModule(function (t, e) {
|
|
838
|
+
e.__esModule = !0, e.default = function (t) {
|
|
839
|
+
t.registerHelper("log", function () {
|
|
840
|
+
for (var e = [void 0], r = arguments[arguments.length - 1], a = 0; a < arguments.length - 1; a++) {
|
|
841
|
+
e.push(arguments[a]);
|
|
842
|
+
}var i = 1;null != r.hash.level ? i = r.hash.level : r.data && null != r.data.level && (i = r.data.level), e[0] = i, t.log.apply(t, e);
|
|
843
|
+
});
|
|
844
|
+
}, t.exports = e.default;
|
|
845
|
+
});unwrapExports(log);var lookup = createCommonjsModule(function (t, e) {
|
|
846
|
+
e.__esModule = !0, e.default = function (t) {
|
|
847
|
+
t.registerHelper("lookup", function (t, e) {
|
|
848
|
+
return t && t[e];
|
|
849
|
+
});
|
|
850
|
+
}, t.exports = e.default;
|
|
851
|
+
});unwrapExports(lookup);var _with = createCommonjsModule(function (t, e) {
|
|
852
|
+
e.__esModule = !0, e.default = function (t) {
|
|
853
|
+
t.registerHelper("with", function (t, e) {
|
|
854
|
+
utils.isFunction(t) && (t = t.call(this));var r = e.fn;if (utils.isEmpty(t)) return e.inverse(this);var a = e.data;return e.data && e.ids && ((a = utils.createFrame(e.data)).contextPath = utils.appendContextPath(e.data.contextPath, e.ids[0])), r(t, { data: a, blockParams: utils.blockParams([t], [a && a.contextPath]) });
|
|
855
|
+
});
|
|
856
|
+
}, t.exports = e.default;
|
|
857
|
+
});unwrapExports(_with);var helpers = createCommonjsModule(function (t, e) {
|
|
858
|
+
function r(t) {
|
|
859
|
+
return t && t.__esModule ? t : { default: t };
|
|
860
|
+
}e.__esModule = !0, e.registerDefaultHelpers = function (t) {
|
|
861
|
+
a.default(t), i.default(t), n.default(t), s.default(t), o.default(t), l.default(t), c.default(t);
|
|
862
|
+
};var a = r(blockHelperMissing),
|
|
863
|
+
i = r(each),
|
|
864
|
+
n = r(helperMissing),
|
|
865
|
+
s = r(_if),
|
|
866
|
+
o = r(log),
|
|
867
|
+
l = r(lookup),
|
|
868
|
+
c = r(_with);
|
|
869
|
+
});unwrapExports(helpers);var inline = createCommonjsModule(function (t, e) {
|
|
870
|
+
e.__esModule = !0, e.default = function (t) {
|
|
871
|
+
t.registerDecorator("inline", function (t, e, r, a) {
|
|
872
|
+
var i = t;return e.partials || (e.partials = {}, i = function i(a, _i2) {
|
|
873
|
+
var n = r.partials;r.partials = utils.extend({}, n, e.partials);var s = t(a, _i2);return r.partials = n, s;
|
|
874
|
+
}), e.partials[a.args[0]] = a.fn, i;
|
|
875
|
+
});
|
|
876
|
+
}, t.exports = e.default;
|
|
877
|
+
});unwrapExports(inline);var decorators = createCommonjsModule(function (t, e) {
|
|
878
|
+
e.__esModule = !0, e.registerDefaultDecorators = function (t) {
|
|
879
|
+
r.default(t);
|
|
880
|
+
};var r = function (t) {
|
|
881
|
+
return t && t.__esModule ? t : { default: t };
|
|
882
|
+
}(inline);
|
|
883
|
+
});unwrapExports(decorators);var logger_1 = createCommonjsModule(function (t, e) {
|
|
884
|
+
e.__esModule = !0;var r = { methodMap: ["debug", "info", "warn", "error"], level: "info", lookupLevel: function lookupLevel(t) {
|
|
885
|
+
if ("string" == typeof t) {
|
|
886
|
+
var e = utils.indexOf(r.methodMap, t.toLowerCase());t = e >= 0 ? e : parseInt(t, 10);
|
|
887
|
+
}return t;
|
|
888
|
+
}, log: function log(t) {
|
|
889
|
+
if (t = r.lookupLevel(t), "undefined" != typeof console && r.lookupLevel(r.level) <= t) {
|
|
890
|
+
var e = r.methodMap[t];console[e] || (e = "log");for (var a = arguments.length, i = Array(a > 1 ? a - 1 : 0), n = 1; n < a; n++) {
|
|
891
|
+
i[n - 1] = arguments[n];
|
|
892
|
+
}console[e].apply(console, i);
|
|
893
|
+
}
|
|
894
|
+
} };e.default = r, t.exports = e.default;
|
|
895
|
+
});unwrapExports(logger_1);var base = createCommonjsModule(function (t, e) {
|
|
896
|
+
function r(t) {
|
|
897
|
+
return t && t.__esModule ? t : { default: t };
|
|
898
|
+
}function a(t, e, r) {
|
|
899
|
+
this.helpers = t || {}, this.partials = e || {}, this.decorators = r || {}, helpers.registerDefaultHelpers(this), decorators.registerDefaultDecorators(this);
|
|
900
|
+
}e.__esModule = !0, e.HandlebarsEnvironment = a;var i = r(exception),
|
|
901
|
+
n = r(logger_1);e.VERSION = "4.0.10";e.COMPILER_REVISION = 7;var s = { 1: "<= 1.0.rc.2", 2: "== 1.0.0-rc.3", 3: "== 1.0.0-rc.4", 4: "== 1.x.x", 5: "== 2.0.0-alpha.x", 6: ">= 2.0.0-beta.1", 7: ">= 4.0.0" };e.REVISION_CHANGES = s;a.prototype = { constructor: a, logger: n.default, log: n.default.log, registerHelper: function registerHelper(t, e) {
|
|
902
|
+
if ("[object Object]" === utils.toString.call(t)) {
|
|
903
|
+
if (e) throw new i.default("Arg not supported with multiple helpers");utils.extend(this.helpers, t);
|
|
904
|
+
} else this.helpers[t] = e;
|
|
905
|
+
}, unregisterHelper: function unregisterHelper(t) {
|
|
906
|
+
delete this.helpers[t];
|
|
907
|
+
}, registerPartial: function registerPartial(t, e) {
|
|
908
|
+
if ("[object Object]" === utils.toString.call(t)) utils.extend(this.partials, t);else {
|
|
909
|
+
if (void 0 === e) throw new i.default('Attempting to register a partial called "' + t + '" as undefined');this.partials[t] = e;
|
|
910
|
+
}
|
|
911
|
+
}, unregisterPartial: function unregisterPartial(t) {
|
|
912
|
+
delete this.partials[t];
|
|
913
|
+
}, registerDecorator: function registerDecorator(t, e) {
|
|
914
|
+
if ("[object Object]" === utils.toString.call(t)) {
|
|
915
|
+
if (e) throw new i.default("Arg not supported with multiple decorators");utils.extend(this.decorators, t);
|
|
916
|
+
} else this.decorators[t] = e;
|
|
917
|
+
}, unregisterDecorator: function unregisterDecorator(t) {
|
|
918
|
+
delete this.decorators[t];
|
|
919
|
+
} };var o = n.default.log;e.log = o, e.createFrame = utils.createFrame, e.logger = n.default;
|
|
920
|
+
});unwrapExports(base);var safeString = createCommonjsModule(function (t, e) {
|
|
921
|
+
function r(t) {
|
|
922
|
+
this.string = t;
|
|
923
|
+
}e.__esModule = !0, r.prototype.toString = r.prototype.toHTML = function () {
|
|
924
|
+
return "" + this.string;
|
|
925
|
+
}, e.default = r, t.exports = e.default;
|
|
926
|
+
});unwrapExports(safeString);var runtime = createCommonjsModule(function (t, e) {
|
|
927
|
+
function r(t, e, r, a, i, s, o) {
|
|
928
|
+
function l(e) {
|
|
929
|
+
var i = arguments.length <= 1 || void 0 === arguments[1] ? {} : arguments[1],
|
|
930
|
+
n = o;return !o || e == o[0] || e === t.nullContext && null === o[0] || (n = [e].concat(o)), r(t, e, t.helpers, t.partials, i.data || a, s && [i.blockParams].concat(s), n);
|
|
931
|
+
}return l = n(r, l, t, o, a, s), l.program = e, l.depth = o ? o.length : 0, l.blockParams = i || 0, l;
|
|
932
|
+
}function a() {
|
|
933
|
+
return "";
|
|
934
|
+
}function i(t, e) {
|
|
935
|
+
return e && "root" in e || ((e = e ? base.createFrame(e) : {}).root = t), e;
|
|
936
|
+
}function n(t, e, r, a, i, n) {
|
|
937
|
+
if (t.decorator) {
|
|
938
|
+
var o = {};e = t.decorator(e, o, r, a && a[0], i, n, a), s.extend(e, o);
|
|
939
|
+
}return e;
|
|
940
|
+
}e.__esModule = !0, e.checkRevision = function (t) {
|
|
941
|
+
var e = t && t[0] || 1,
|
|
942
|
+
r = base.COMPILER_REVISION;if (e !== r) {
|
|
943
|
+
if (e < r) {
|
|
944
|
+
var a = base.REVISION_CHANGES[r],
|
|
945
|
+
i = base.REVISION_CHANGES[e];throw new o.default("Template was precompiled with an older version of Handlebars than the current runtime. Please update your precompiler to a newer version (" + a + ") or downgrade your runtime to an older version (" + i + ").");
|
|
946
|
+
}throw new o.default("Template was precompiled with a newer version of Handlebars than the current runtime. Please update your runtime to a newer version (" + t[1] + ").");
|
|
947
|
+
}
|
|
948
|
+
}, e.template = function (t, e) {
|
|
949
|
+
function a(e) {
|
|
950
|
+
function r(e) {
|
|
951
|
+
return "" + t.main(l, e, l.helpers, l.partials, o, u, c);
|
|
952
|
+
}var s = arguments.length <= 1 || void 0 === arguments[1] ? {} : arguments[1],
|
|
953
|
+
o = s.data;a._setup(s), !s.partial && t.useData && (o = i(e, o));var c = void 0,
|
|
954
|
+
u = t.useBlockParams ? [] : void 0;return t.useDepths && (c = s.depths ? e != s.depths[0] ? [e].concat(s.depths) : s.depths : [e]), (r = n(t.main, r, l, s.depths || [], o, u))(e, s);
|
|
955
|
+
}if (!e) throw new o.default("No environment passed to template");if (!t || !t.main) throw new o.default("Unknown template object: " + (typeof t === "undefined" ? "undefined" : _typeof(t)));t.main.decorator = t.main_d, e.VM.checkRevision(t.compiler);var l = { strict: function strict(t, e) {
|
|
956
|
+
if (!(e in t)) throw new o.default('"' + e + '" not defined in ' + t);return t[e];
|
|
957
|
+
}, lookup: function lookup(t, e) {
|
|
958
|
+
for (var r = t.length, a = 0; a < r; a++) {
|
|
959
|
+
if (t[a] && null != t[a][e]) return t[a][e];
|
|
960
|
+
}
|
|
961
|
+
}, lambda: function lambda(t, e) {
|
|
962
|
+
return "function" == typeof t ? t.call(e) : t;
|
|
963
|
+
}, escapeExpression: s.escapeExpression, invokePartial: function invokePartial(r, a, i) {
|
|
964
|
+
i.hash && (a = s.extend({}, a, i.hash), i.ids && (i.ids[0] = !0)), r = e.VM.resolvePartial.call(this, r, a, i);var n = e.VM.invokePartial.call(this, r, a, i);if (null == n && e.compile && (i.partials[i.name] = e.compile(r, t.compilerOptions, e), n = i.partials[i.name](a, i)), null != n) {
|
|
965
|
+
if (i.indent) {
|
|
966
|
+
for (var l = n.split("\n"), c = 0, u = l.length; c < u && (l[c] || c + 1 !== u); c++) {
|
|
967
|
+
l[c] = i.indent + l[c];
|
|
968
|
+
}n = l.join("\n");
|
|
969
|
+
}return n;
|
|
970
|
+
}throw new o.default("The partial " + i.name + " could not be compiled when running in runtime-only mode");
|
|
971
|
+
}, fn: function fn(e) {
|
|
972
|
+
var r = t[e];return r.decorator = t[e + "_d"], r;
|
|
973
|
+
}, programs: [], program: function program(t, e, a, i, n) {
|
|
974
|
+
var s = this.programs[t],
|
|
975
|
+
o = this.fn(t);return e || n || i || a ? s = r(this, t, o, e, a, i, n) : s || (s = this.programs[t] = r(this, t, o)), s;
|
|
976
|
+
}, data: function data(t, e) {
|
|
977
|
+
for (; t && e--;) {
|
|
978
|
+
t = t._parent;
|
|
979
|
+
}return t;
|
|
980
|
+
}, merge: function merge(t, e) {
|
|
981
|
+
var r = t || e;return t && e && t !== e && (r = s.extend({}, e, t)), r;
|
|
982
|
+
}, nullContext: Object.seal({}), noop: e.VM.noop, compilerInfo: t.compiler };return a.isTop = !0, a._setup = function (r) {
|
|
983
|
+
r.partial ? (l.helpers = r.helpers, l.partials = r.partials, l.decorators = r.decorators) : (l.helpers = l.merge(r.helpers, e.helpers), t.usePartial && (l.partials = l.merge(r.partials, e.partials)), (t.usePartial || t.useDecorators) && (l.decorators = l.merge(r.decorators, e.decorators)));
|
|
984
|
+
}, a._child = function (e, a, i, n) {
|
|
985
|
+
if (t.useBlockParams && !i) throw new o.default("must pass block params");if (t.useDepths && !n) throw new o.default("must pass parent depths");return r(l, e, t[e], a, 0, i, n);
|
|
986
|
+
}, a;
|
|
987
|
+
}, e.wrapProgram = r, e.resolvePartial = function (t, e, r) {
|
|
988
|
+
return t ? t.call || r.name || (r.name = t, t = r.partials[t]) : t = "@partial-block" === r.name ? r.data["partial-block"] : r.partials[r.name], t;
|
|
989
|
+
}, e.invokePartial = function (t, e, r) {
|
|
990
|
+
var i = r.data && r.data["partial-block"];r.partial = !0, r.ids && (r.data.contextPath = r.ids[0] || r.data.contextPath);var n = void 0;if (r.fn && r.fn !== a && function () {
|
|
991
|
+
r.data = base.createFrame(r.data);var t = r.fn;n = r.data["partial-block"] = function (e) {
|
|
992
|
+
var r = arguments.length <= 1 || void 0 === arguments[1] ? {} : arguments[1];return r.data = base.createFrame(r.data), r.data["partial-block"] = i, t(e, r);
|
|
993
|
+
}, t.partials && (r.partials = s.extend({}, r.partials, t.partials));
|
|
994
|
+
}(), void 0 === t && n && (t = n), void 0 === t) throw new o.default("The partial " + r.name + " could not be found");if (t instanceof Function) return t(e, r);
|
|
995
|
+
}, e.noop = a;var s = function (t) {
|
|
996
|
+
if (t && t.__esModule) return t;var e = {};if (null != t) for (var r in t) {
|
|
997
|
+
Object.prototype.hasOwnProperty.call(t, r) && (e[r] = t[r]);
|
|
998
|
+
}return e.default = t, e;
|
|
999
|
+
}(utils),
|
|
1000
|
+
o = function (t) {
|
|
1001
|
+
return t && t.__esModule ? t : { default: t };
|
|
1002
|
+
}(exception);
|
|
1003
|
+
});unwrapExports(runtime);var noConflict = createCommonjsModule(function (t, e) {
|
|
1004
|
+
e.__esModule = !0, e.default = function (t) {
|
|
1005
|
+
var e = void 0 !== commonjsGlobal ? commonjsGlobal : window,
|
|
1006
|
+
r = e.Handlebars;t.noConflict = function () {
|
|
1007
|
+
return e.Handlebars === t && (e.Handlebars = r), t;
|
|
1008
|
+
};
|
|
1009
|
+
}, t.exports = e.default;
|
|
1010
|
+
});unwrapExports(noConflict);var handlebars_runtime = createCommonjsModule(function (t, e) {
|
|
1011
|
+
function r(t) {
|
|
1012
|
+
return t && t.__esModule ? t : { default: t };
|
|
1013
|
+
}function a(t) {
|
|
1014
|
+
if (t && t.__esModule) return t;var e = {};if (null != t) for (var r in t) {
|
|
1015
|
+
Object.prototype.hasOwnProperty.call(t, r) && (e[r] = t[r]);
|
|
1016
|
+
}return e.default = t, e;
|
|
1017
|
+
}function i() {
|
|
1018
|
+
var t = new n.HandlebarsEnvironment();return l.extend(t, n), t.SafeString = s.default, t.Exception = o.default, t.Utils = l, t.escapeExpression = l.escapeExpression, t.VM = c, t.template = function (e) {
|
|
1019
|
+
return c.template(e, t);
|
|
1020
|
+
}, t;
|
|
1021
|
+
}e.__esModule = !0;var n = a(base),
|
|
1022
|
+
s = r(safeString),
|
|
1023
|
+
o = r(exception),
|
|
1024
|
+
l = a(utils),
|
|
1025
|
+
c = a(runtime),
|
|
1026
|
+
u = r(noConflict),
|
|
1027
|
+
p = i();p.create = i, u.default(p), p.default = p, e.default = p, t.exports = e.default;
|
|
1028
|
+
});unwrapExports(handlebars_runtime);var ast = createCommonjsModule(function (t, e) {
|
|
1029
|
+
e.__esModule = !0;var r = { helpers: { helperExpression: function helperExpression(t) {
|
|
1030
|
+
return "SubExpression" === t.type || ("MustacheStatement" === t.type || "BlockStatement" === t.type) && !!(t.params && t.params.length || t.hash);
|
|
1031
|
+
}, scopedId: function scopedId(t) {
|
|
1032
|
+
return (/^\.|this\b/.test(t.original)
|
|
1033
|
+
);
|
|
1034
|
+
}, simpleId: function simpleId(t) {
|
|
1035
|
+
return 1 === t.parts.length && !r.helpers.scopedId(t) && !t.depth;
|
|
1036
|
+
} } };e.default = r, t.exports = e.default;
|
|
1037
|
+
});unwrapExports(ast);var parser = createCommonjsModule(function (t, e) {
|
|
1038
|
+
e.__esModule = !0;var r = function () {
|
|
1039
|
+
function t() {
|
|
1040
|
+
this.yy = {};
|
|
1041
|
+
}var e = { trace: function trace() {}, 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_repetition_plus0: 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, mustache_repetition0: 49, mustache_option0: 50, OPEN_UNESCAPED: 51, mustache_repetition1: 52, mustache_option1: 53, CLOSE_UNESCAPED: 54, OPEN_PARTIAL: 55, partialName: 56, partial_repetition0: 57, partial_option0: 58, openPartialBlock: 59, OPEN_PARTIAL_BLOCK: 60, openPartialBlock_repetition0: 61, openPartialBlock_option0: 62, param: 63, sexpr: 64, OPEN_SEXPR: 65, sexpr_repetition0: 66, sexpr_option0: 67, CLOSE_SEXPR: 68, hash: 69, hash_repetition_plus0: 70, hashSegment: 71, ID: 72, EQUALS: 73, blockParams: 74, OPEN_BLOCK_PARAMS: 75, blockParams_repetition_plus0: 76, CLOSE_BLOCK_PARAMS: 77, path: 78, dataName: 79, STRING: 80, NUMBER: 81, BOOLEAN: 82, UNDEFINED: 83, NULL: 84, DATA: 85, pathSegments: 86, SEP: 87, $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", 51: "OPEN_UNESCAPED", 54: "CLOSE_UNESCAPED", 55: "OPEN_PARTIAL", 60: "OPEN_PARTIAL_BLOCK", 65: "OPEN_SEXPR", 68: "CLOSE_SEXPR", 72: "ID", 73: "EQUALS", 75: "OPEN_BLOCK_PARAMS", 77: "CLOSE_BLOCK_PARAMS", 80: "STRING", 81: "NUMBER", 82: "BOOLEAN", 83: "UNDEFINED", 84: "NULL", 85: "DATA", 87: "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, 5], [8, 5], [11, 5], [12, 3], [59, 5], [63, 1], [63, 1], [64, 5], [69, 1], [71, 3], [74, 3], [20, 1], [20, 1], [20, 1], [20, 1], [20, 1], [20, 1], [20, 1], [56, 1], [56, 1], [79, 2], [78, 1], [86, 3], [86, 1], [6, 0], [6, 2], [17, 1], [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], [49, 0], [49, 2], [50, 0], [50, 1], [52, 0], [52, 2], [53, 0], [53, 1], [57, 0], [57, 2], [58, 0], [58, 1], [61, 0], [61, 2], [62, 0], [62, 1], [66, 0], [66, 2], [67, 0], [67, 1], [70, 1], [70, 2], [76, 1], [76, 2]], performAction: function performAction(t, e, r, a, i, n, s) {
|
|
1042
|
+
var o = n.length - 1;switch (i) {case 1:
|
|
1043
|
+
return n[o - 1];case 2:
|
|
1044
|
+
this.$ = a.prepareProgram(n[o]);break;case 3:case 4:case 5:case 6:case 7:case 8:
|
|
1045
|
+
this.$ = n[o];break;case 9:
|
|
1046
|
+
this.$ = { type: "CommentStatement", value: a.stripComment(n[o]), strip: a.stripFlags(n[o], n[o]), loc: a.locInfo(this._$) };break;case 10:
|
|
1047
|
+
this.$ = { type: "ContentStatement", original: n[o], value: n[o], loc: a.locInfo(this._$) };break;case 11:
|
|
1048
|
+
this.$ = a.prepareRawBlock(n[o - 2], n[o - 1], n[o], this._$);break;case 12:
|
|
1049
|
+
this.$ = { path: n[o - 3], params: n[o - 2], hash: n[o - 1] };break;case 13:
|
|
1050
|
+
this.$ = a.prepareBlock(n[o - 3], n[o - 2], n[o - 1], n[o], !1, this._$);break;case 14:
|
|
1051
|
+
this.$ = a.prepareBlock(n[o - 3], n[o - 2], n[o - 1], n[o], !0, this._$);break;case 15:
|
|
1052
|
+
this.$ = { open: n[o - 5], path: n[o - 4], params: n[o - 3], hash: n[o - 2], blockParams: n[o - 1], strip: a.stripFlags(n[o - 5], n[o]) };break;case 16:case 17:
|
|
1053
|
+
this.$ = { path: n[o - 4], params: n[o - 3], hash: n[o - 2], blockParams: n[o - 1], strip: a.stripFlags(n[o - 5], n[o]) };break;case 18:
|
|
1054
|
+
this.$ = { strip: a.stripFlags(n[o - 1], n[o - 1]), program: n[o] };break;case 19:
|
|
1055
|
+
var l = a.prepareBlock(n[o - 2], n[o - 1], n[o], n[o], !1, this._$),
|
|
1056
|
+
c = a.prepareProgram([l], n[o - 1].loc);c.chained = !0, this.$ = { strip: n[o - 2].strip, program: c, chain: !0 };break;case 20:
|
|
1057
|
+
this.$ = n[o];break;case 21:
|
|
1058
|
+
this.$ = { path: n[o - 1], strip: a.stripFlags(n[o - 2], n[o]) };break;case 22:case 23:
|
|
1059
|
+
this.$ = a.prepareMustache(n[o - 3], n[o - 2], n[o - 1], n[o - 4], a.stripFlags(n[o - 4], n[o]), this._$);break;case 24:
|
|
1060
|
+
this.$ = { type: "PartialStatement", name: n[o - 3], params: n[o - 2], hash: n[o - 1], indent: "", strip: a.stripFlags(n[o - 4], n[o]), loc: a.locInfo(this._$) };break;case 25:
|
|
1061
|
+
this.$ = a.preparePartialBlock(n[o - 2], n[o - 1], n[o], this._$);break;case 26:
|
|
1062
|
+
this.$ = { path: n[o - 3], params: n[o - 2], hash: n[o - 1], strip: a.stripFlags(n[o - 4], n[o]) };break;case 27:case 28:
|
|
1063
|
+
this.$ = n[o];break;case 29:
|
|
1064
|
+
this.$ = { type: "SubExpression", path: n[o - 3], params: n[o - 2], hash: n[o - 1], loc: a.locInfo(this._$) };break;case 30:
|
|
1065
|
+
this.$ = { type: "Hash", pairs: n[o], loc: a.locInfo(this._$) };break;case 31:
|
|
1066
|
+
this.$ = { type: "HashPair", key: a.id(n[o - 2]), value: n[o], loc: a.locInfo(this._$) };break;case 32:
|
|
1067
|
+
this.$ = a.id(n[o - 1]);break;case 33:case 34:
|
|
1068
|
+
this.$ = n[o];break;case 35:
|
|
1069
|
+
this.$ = { type: "StringLiteral", value: n[o], original: n[o], loc: a.locInfo(this._$) };break;case 36:
|
|
1070
|
+
this.$ = { type: "NumberLiteral", value: Number(n[o]), original: Number(n[o]), loc: a.locInfo(this._$) };break;case 37:
|
|
1071
|
+
this.$ = { type: "BooleanLiteral", value: "true" === n[o], original: "true" === n[o], loc: a.locInfo(this._$) };break;case 38:
|
|
1072
|
+
this.$ = { type: "UndefinedLiteral", original: void 0, value: void 0, loc: a.locInfo(this._$) };break;case 39:
|
|
1073
|
+
this.$ = { type: "NullLiteral", original: null, value: null, loc: a.locInfo(this._$) };break;case 40:case 41:
|
|
1074
|
+
this.$ = n[o];break;case 42:
|
|
1075
|
+
this.$ = a.preparePath(!0, n[o], this._$);break;case 43:
|
|
1076
|
+
this.$ = a.preparePath(!1, n[o], this._$);break;case 44:
|
|
1077
|
+
n[o - 2].push({ part: a.id(n[o]), original: n[o], separator: n[o - 1] }), this.$ = n[o - 2];break;case 45:
|
|
1078
|
+
this.$ = [{ part: a.id(n[o]), original: n[o] }];break;case 46:
|
|
1079
|
+
this.$ = [];break;case 47:
|
|
1080
|
+
n[o - 1].push(n[o]);break;case 48:
|
|
1081
|
+
this.$ = [n[o]];break;case 49:
|
|
1082
|
+
n[o - 1].push(n[o]);break;case 50:
|
|
1083
|
+
this.$ = [];break;case 51:
|
|
1084
|
+
n[o - 1].push(n[o]);break;case 58:
|
|
1085
|
+
this.$ = [];break;case 59:
|
|
1086
|
+
n[o - 1].push(n[o]);break;case 64:
|
|
1087
|
+
this.$ = [];break;case 65:
|
|
1088
|
+
n[o - 1].push(n[o]);break;case 70:
|
|
1089
|
+
this.$ = [];break;case 71:
|
|
1090
|
+
n[o - 1].push(n[o]);break;case 78:
|
|
1091
|
+
this.$ = [];break;case 79:
|
|
1092
|
+
n[o - 1].push(n[o]);break;case 82:
|
|
1093
|
+
this.$ = [];break;case 83:
|
|
1094
|
+
n[o - 1].push(n[o]);break;case 86:
|
|
1095
|
+
this.$ = [];break;case 87:
|
|
1096
|
+
n[o - 1].push(n[o]);break;case 90:
|
|
1097
|
+
this.$ = [];break;case 91:
|
|
1098
|
+
n[o - 1].push(n[o]);break;case 94:
|
|
1099
|
+
this.$ = [];break;case 95:
|
|
1100
|
+
n[o - 1].push(n[o]);break;case 98:
|
|
1101
|
+
this.$ = [n[o]];break;case 99:
|
|
1102
|
+
n[o - 1].push(n[o]);break;case 100:
|
|
1103
|
+
this.$ = [n[o]];break;case 101:
|
|
1104
|
+
n[o - 1].push(n[o]);}
|
|
1105
|
+
}, table: [{ 3: 1, 4: 2, 5: [2, 46], 6: 3, 14: [2, 46], 15: [2, 46], 19: [2, 46], 29: [2, 46], 34: [2, 46], 48: [2, 46], 51: [2, 46], 55: [2, 46], 60: [2, 46] }, { 1: [3] }, { 5: [1, 4] }, { 5: [2, 2], 7: 5, 8: 6, 9: 7, 10: 8, 11: 9, 12: 10, 13: 11, 14: [1, 12], 15: [1, 20], 16: 17, 19: [1, 23], 24: 15, 27: 16, 29: [1, 21], 34: [1, 22], 39: [2, 2], 44: [2, 2], 47: [2, 2], 48: [1, 13], 51: [1, 14], 55: [1, 18], 59: 19, 60: [1, 24] }, { 1: [2, 1] }, { 5: [2, 47], 14: [2, 47], 15: [2, 47], 19: [2, 47], 29: [2, 47], 34: [2, 47], 39: [2, 47], 44: [2, 47], 47: [2, 47], 48: [2, 47], 51: [2, 47], 55: [2, 47], 60: [2, 47] }, { 5: [2, 3], 14: [2, 3], 15: [2, 3], 19: [2, 3], 29: [2, 3], 34: [2, 3], 39: [2, 3], 44: [2, 3], 47: [2, 3], 48: [2, 3], 51: [2, 3], 55: [2, 3], 60: [2, 3] }, { 5: [2, 4], 14: [2, 4], 15: [2, 4], 19: [2, 4], 29: [2, 4], 34: [2, 4], 39: [2, 4], 44: [2, 4], 47: [2, 4], 48: [2, 4], 51: [2, 4], 55: [2, 4], 60: [2, 4] }, { 5: [2, 5], 14: [2, 5], 15: [2, 5], 19: [2, 5], 29: [2, 5], 34: [2, 5], 39: [2, 5], 44: [2, 5], 47: [2, 5], 48: [2, 5], 51: [2, 5], 55: [2, 5], 60: [2, 5] }, { 5: [2, 6], 14: [2, 6], 15: [2, 6], 19: [2, 6], 29: [2, 6], 34: [2, 6], 39: [2, 6], 44: [2, 6], 47: [2, 6], 48: [2, 6], 51: [2, 6], 55: [2, 6], 60: [2, 6] }, { 5: [2, 7], 14: [2, 7], 15: [2, 7], 19: [2, 7], 29: [2, 7], 34: [2, 7], 39: [2, 7], 44: [2, 7], 47: [2, 7], 48: [2, 7], 51: [2, 7], 55: [2, 7], 60: [2, 7] }, { 5: [2, 8], 14: [2, 8], 15: [2, 8], 19: [2, 8], 29: [2, 8], 34: [2, 8], 39: [2, 8], 44: [2, 8], 47: [2, 8], 48: [2, 8], 51: [2, 8], 55: [2, 8], 60: [2, 8] }, { 5: [2, 9], 14: [2, 9], 15: [2, 9], 19: [2, 9], 29: [2, 9], 34: [2, 9], 39: [2, 9], 44: [2, 9], 47: [2, 9], 48: [2, 9], 51: [2, 9], 55: [2, 9], 60: [2, 9] }, { 20: 25, 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 20: 36, 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 4: 37, 6: 3, 14: [2, 46], 15: [2, 46], 19: [2, 46], 29: [2, 46], 34: [2, 46], 39: [2, 46], 44: [2, 46], 47: [2, 46], 48: [2, 46], 51: [2, 46], 55: [2, 46], 60: [2, 46] }, { 4: 38, 6: 3, 14: [2, 46], 15: [2, 46], 19: [2, 46], 29: [2, 46], 34: [2, 46], 44: [2, 46], 47: [2, 46], 48: [2, 46], 51: [2, 46], 55: [2, 46], 60: [2, 46] }, { 13: 40, 15: [1, 20], 17: 39 }, { 20: 42, 56: 41, 64: 43, 65: [1, 44], 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 4: 45, 6: 3, 14: [2, 46], 15: [2, 46], 19: [2, 46], 29: [2, 46], 34: [2, 46], 47: [2, 46], 48: [2, 46], 51: [2, 46], 55: [2, 46], 60: [2, 46] }, { 5: [2, 10], 14: [2, 10], 15: [2, 10], 18: [2, 10], 19: [2, 10], 29: [2, 10], 34: [2, 10], 39: [2, 10], 44: [2, 10], 47: [2, 10], 48: [2, 10], 51: [2, 10], 55: [2, 10], 60: [2, 10] }, { 20: 46, 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 20: 47, 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 20: 48, 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 20: 42, 56: 49, 64: 43, 65: [1, 44], 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 33: [2, 78], 49: 50, 65: [2, 78], 72: [2, 78], 80: [2, 78], 81: [2, 78], 82: [2, 78], 83: [2, 78], 84: [2, 78], 85: [2, 78] }, { 23: [2, 33], 33: [2, 33], 54: [2, 33], 65: [2, 33], 68: [2, 33], 72: [2, 33], 75: [2, 33], 80: [2, 33], 81: [2, 33], 82: [2, 33], 83: [2, 33], 84: [2, 33], 85: [2, 33] }, { 23: [2, 34], 33: [2, 34], 54: [2, 34], 65: [2, 34], 68: [2, 34], 72: [2, 34], 75: [2, 34], 80: [2, 34], 81: [2, 34], 82: [2, 34], 83: [2, 34], 84: [2, 34], 85: [2, 34] }, { 23: [2, 35], 33: [2, 35], 54: [2, 35], 65: [2, 35], 68: [2, 35], 72: [2, 35], 75: [2, 35], 80: [2, 35], 81: [2, 35], 82: [2, 35], 83: [2, 35], 84: [2, 35], 85: [2, 35] }, { 23: [2, 36], 33: [2, 36], 54: [2, 36], 65: [2, 36], 68: [2, 36], 72: [2, 36], 75: [2, 36], 80: [2, 36], 81: [2, 36], 82: [2, 36], 83: [2, 36], 84: [2, 36], 85: [2, 36] }, { 23: [2, 37], 33: [2, 37], 54: [2, 37], 65: [2, 37], 68: [2, 37], 72: [2, 37], 75: [2, 37], 80: [2, 37], 81: [2, 37], 82: [2, 37], 83: [2, 37], 84: [2, 37], 85: [2, 37] }, { 23: [2, 38], 33: [2, 38], 54: [2, 38], 65: [2, 38], 68: [2, 38], 72: [2, 38], 75: [2, 38], 80: [2, 38], 81: [2, 38], 82: [2, 38], 83: [2, 38], 84: [2, 38], 85: [2, 38] }, { 23: [2, 39], 33: [2, 39], 54: [2, 39], 65: [2, 39], 68: [2, 39], 72: [2, 39], 75: [2, 39], 80: [2, 39], 81: [2, 39], 82: [2, 39], 83: [2, 39], 84: [2, 39], 85: [2, 39] }, { 23: [2, 43], 33: [2, 43], 54: [2, 43], 65: [2, 43], 68: [2, 43], 72: [2, 43], 75: [2, 43], 80: [2, 43], 81: [2, 43], 82: [2, 43], 83: [2, 43], 84: [2, 43], 85: [2, 43], 87: [1, 51] }, { 72: [1, 35], 86: 52 }, { 23: [2, 45], 33: [2, 45], 54: [2, 45], 65: [2, 45], 68: [2, 45], 72: [2, 45], 75: [2, 45], 80: [2, 45], 81: [2, 45], 82: [2, 45], 83: [2, 45], 84: [2, 45], 85: [2, 45], 87: [2, 45] }, { 52: 53, 54: [2, 82], 65: [2, 82], 72: [2, 82], 80: [2, 82], 81: [2, 82], 82: [2, 82], 83: [2, 82], 84: [2, 82], 85: [2, 82] }, { 25: 54, 38: 56, 39: [1, 58], 43: 57, 44: [1, 59], 45: 55, 47: [2, 54] }, { 28: 60, 43: 61, 44: [1, 59], 47: [2, 56] }, { 13: 63, 15: [1, 20], 18: [1, 62] }, { 15: [2, 48], 18: [2, 48] }, { 33: [2, 86], 57: 64, 65: [2, 86], 72: [2, 86], 80: [2, 86], 81: [2, 86], 82: [2, 86], 83: [2, 86], 84: [2, 86], 85: [2, 86] }, { 33: [2, 40], 65: [2, 40], 72: [2, 40], 80: [2, 40], 81: [2, 40], 82: [2, 40], 83: [2, 40], 84: [2, 40], 85: [2, 40] }, { 33: [2, 41], 65: [2, 41], 72: [2, 41], 80: [2, 41], 81: [2, 41], 82: [2, 41], 83: [2, 41], 84: [2, 41], 85: [2, 41] }, { 20: 65, 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 26: 66, 47: [1, 67] }, { 30: 68, 33: [2, 58], 65: [2, 58], 72: [2, 58], 75: [2, 58], 80: [2, 58], 81: [2, 58], 82: [2, 58], 83: [2, 58], 84: [2, 58], 85: [2, 58] }, { 33: [2, 64], 35: 69, 65: [2, 64], 72: [2, 64], 75: [2, 64], 80: [2, 64], 81: [2, 64], 82: [2, 64], 83: [2, 64], 84: [2, 64], 85: [2, 64] }, { 21: 70, 23: [2, 50], 65: [2, 50], 72: [2, 50], 80: [2, 50], 81: [2, 50], 82: [2, 50], 83: [2, 50], 84: [2, 50], 85: [2, 50] }, { 33: [2, 90], 61: 71, 65: [2, 90], 72: [2, 90], 80: [2, 90], 81: [2, 90], 82: [2, 90], 83: [2, 90], 84: [2, 90], 85: [2, 90] }, { 20: 75, 33: [2, 80], 50: 72, 63: 73, 64: 76, 65: [1, 44], 69: 74, 70: 77, 71: 78, 72: [1, 79], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 72: [1, 80] }, { 23: [2, 42], 33: [2, 42], 54: [2, 42], 65: [2, 42], 68: [2, 42], 72: [2, 42], 75: [2, 42], 80: [2, 42], 81: [2, 42], 82: [2, 42], 83: [2, 42], 84: [2, 42], 85: [2, 42], 87: [1, 51] }, { 20: 75, 53: 81, 54: [2, 84], 63: 82, 64: 76, 65: [1, 44], 69: 83, 70: 77, 71: 78, 72: [1, 79], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 26: 84, 47: [1, 67] }, { 47: [2, 55] }, { 4: 85, 6: 3, 14: [2, 46], 15: [2, 46], 19: [2, 46], 29: [2, 46], 34: [2, 46], 39: [2, 46], 44: [2, 46], 47: [2, 46], 48: [2, 46], 51: [2, 46], 55: [2, 46], 60: [2, 46] }, { 47: [2, 20] }, { 20: 86, 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 4: 87, 6: 3, 14: [2, 46], 15: [2, 46], 19: [2, 46], 29: [2, 46], 34: [2, 46], 47: [2, 46], 48: [2, 46], 51: [2, 46], 55: [2, 46], 60: [2, 46] }, { 26: 88, 47: [1, 67] }, { 47: [2, 57] }, { 5: [2, 11], 14: [2, 11], 15: [2, 11], 19: [2, 11], 29: [2, 11], 34: [2, 11], 39: [2, 11], 44: [2, 11], 47: [2, 11], 48: [2, 11], 51: [2, 11], 55: [2, 11], 60: [2, 11] }, { 15: [2, 49], 18: [2, 49] }, { 20: 75, 33: [2, 88], 58: 89, 63: 90, 64: 76, 65: [1, 44], 69: 91, 70: 77, 71: 78, 72: [1, 79], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 65: [2, 94], 66: 92, 68: [2, 94], 72: [2, 94], 80: [2, 94], 81: [2, 94], 82: [2, 94], 83: [2, 94], 84: [2, 94], 85: [2, 94] }, { 5: [2, 25], 14: [2, 25], 15: [2, 25], 19: [2, 25], 29: [2, 25], 34: [2, 25], 39: [2, 25], 44: [2, 25], 47: [2, 25], 48: [2, 25], 51: [2, 25], 55: [2, 25], 60: [2, 25] }, { 20: 93, 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 20: 75, 31: 94, 33: [2, 60], 63: 95, 64: 76, 65: [1, 44], 69: 96, 70: 77, 71: 78, 72: [1, 79], 75: [2, 60], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 20: 75, 33: [2, 66], 36: 97, 63: 98, 64: 76, 65: [1, 44], 69: 99, 70: 77, 71: 78, 72: [1, 79], 75: [2, 66], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 20: 75, 22: 100, 23: [2, 52], 63: 101, 64: 76, 65: [1, 44], 69: 102, 70: 77, 71: 78, 72: [1, 79], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 20: 75, 33: [2, 92], 62: 103, 63: 104, 64: 76, 65: [1, 44], 69: 105, 70: 77, 71: 78, 72: [1, 79], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 33: [1, 106] }, { 33: [2, 79], 65: [2, 79], 72: [2, 79], 80: [2, 79], 81: [2, 79], 82: [2, 79], 83: [2, 79], 84: [2, 79], 85: [2, 79] }, { 33: [2, 81] }, { 23: [2, 27], 33: [2, 27], 54: [2, 27], 65: [2, 27], 68: [2, 27], 72: [2, 27], 75: [2, 27], 80: [2, 27], 81: [2, 27], 82: [2, 27], 83: [2, 27], 84: [2, 27], 85: [2, 27] }, { 23: [2, 28], 33: [2, 28], 54: [2, 28], 65: [2, 28], 68: [2, 28], 72: [2, 28], 75: [2, 28], 80: [2, 28], 81: [2, 28], 82: [2, 28], 83: [2, 28], 84: [2, 28], 85: [2, 28] }, { 23: [2, 30], 33: [2, 30], 54: [2, 30], 68: [2, 30], 71: 107, 72: [1, 108], 75: [2, 30] }, { 23: [2, 98], 33: [2, 98], 54: [2, 98], 68: [2, 98], 72: [2, 98], 75: [2, 98] }, { 23: [2, 45], 33: [2, 45], 54: [2, 45], 65: [2, 45], 68: [2, 45], 72: [2, 45], 73: [1, 109], 75: [2, 45], 80: [2, 45], 81: [2, 45], 82: [2, 45], 83: [2, 45], 84: [2, 45], 85: [2, 45], 87: [2, 45] }, { 23: [2, 44], 33: [2, 44], 54: [2, 44], 65: [2, 44], 68: [2, 44], 72: [2, 44], 75: [2, 44], 80: [2, 44], 81: [2, 44], 82: [2, 44], 83: [2, 44], 84: [2, 44], 85: [2, 44], 87: [2, 44] }, { 54: [1, 110] }, { 54: [2, 83], 65: [2, 83], 72: [2, 83], 80: [2, 83], 81: [2, 83], 82: [2, 83], 83: [2, 83], 84: [2, 83], 85: [2, 83] }, { 54: [2, 85] }, { 5: [2, 13], 14: [2, 13], 15: [2, 13], 19: [2, 13], 29: [2, 13], 34: [2, 13], 39: [2, 13], 44: [2, 13], 47: [2, 13], 48: [2, 13], 51: [2, 13], 55: [2, 13], 60: [2, 13] }, { 38: 56, 39: [1, 58], 43: 57, 44: [1, 59], 45: 112, 46: 111, 47: [2, 76] }, { 33: [2, 70], 40: 113, 65: [2, 70], 72: [2, 70], 75: [2, 70], 80: [2, 70], 81: [2, 70], 82: [2, 70], 83: [2, 70], 84: [2, 70], 85: [2, 70] }, { 47: [2, 18] }, { 5: [2, 14], 14: [2, 14], 15: [2, 14], 19: [2, 14], 29: [2, 14], 34: [2, 14], 39: [2, 14], 44: [2, 14], 47: [2, 14], 48: [2, 14], 51: [2, 14], 55: [2, 14], 60: [2, 14] }, { 33: [1, 114] }, { 33: [2, 87], 65: [2, 87], 72: [2, 87], 80: [2, 87], 81: [2, 87], 82: [2, 87], 83: [2, 87], 84: [2, 87], 85: [2, 87] }, { 33: [2, 89] }, { 20: 75, 63: 116, 64: 76, 65: [1, 44], 67: 115, 68: [2, 96], 69: 117, 70: 77, 71: 78, 72: [1, 79], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 33: [1, 118] }, { 32: 119, 33: [2, 62], 74: 120, 75: [1, 121] }, { 33: [2, 59], 65: [2, 59], 72: [2, 59], 75: [2, 59], 80: [2, 59], 81: [2, 59], 82: [2, 59], 83: [2, 59], 84: [2, 59], 85: [2, 59] }, { 33: [2, 61], 75: [2, 61] }, { 33: [2, 68], 37: 122, 74: 123, 75: [1, 121] }, { 33: [2, 65], 65: [2, 65], 72: [2, 65], 75: [2, 65], 80: [2, 65], 81: [2, 65], 82: [2, 65], 83: [2, 65], 84: [2, 65], 85: [2, 65] }, { 33: [2, 67], 75: [2, 67] }, { 23: [1, 124] }, { 23: [2, 51], 65: [2, 51], 72: [2, 51], 80: [2, 51], 81: [2, 51], 82: [2, 51], 83: [2, 51], 84: [2, 51], 85: [2, 51] }, { 23: [2, 53] }, { 33: [1, 125] }, { 33: [2, 91], 65: [2, 91], 72: [2, 91], 80: [2, 91], 81: [2, 91], 82: [2, 91], 83: [2, 91], 84: [2, 91], 85: [2, 91] }, { 33: [2, 93] }, { 5: [2, 22], 14: [2, 22], 15: [2, 22], 19: [2, 22], 29: [2, 22], 34: [2, 22], 39: [2, 22], 44: [2, 22], 47: [2, 22], 48: [2, 22], 51: [2, 22], 55: [2, 22], 60: [2, 22] }, { 23: [2, 99], 33: [2, 99], 54: [2, 99], 68: [2, 99], 72: [2, 99], 75: [2, 99] }, { 73: [1, 109] }, { 20: 75, 63: 126, 64: 76, 65: [1, 44], 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 5: [2, 23], 14: [2, 23], 15: [2, 23], 19: [2, 23], 29: [2, 23], 34: [2, 23], 39: [2, 23], 44: [2, 23], 47: [2, 23], 48: [2, 23], 51: [2, 23], 55: [2, 23], 60: [2, 23] }, { 47: [2, 19] }, { 47: [2, 77] }, { 20: 75, 33: [2, 72], 41: 127, 63: 128, 64: 76, 65: [1, 44], 69: 129, 70: 77, 71: 78, 72: [1, 79], 75: [2, 72], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 5: [2, 24], 14: [2, 24], 15: [2, 24], 19: [2, 24], 29: [2, 24], 34: [2, 24], 39: [2, 24], 44: [2, 24], 47: [2, 24], 48: [2, 24], 51: [2, 24], 55: [2, 24], 60: [2, 24] }, { 68: [1, 130] }, { 65: [2, 95], 68: [2, 95], 72: [2, 95], 80: [2, 95], 81: [2, 95], 82: [2, 95], 83: [2, 95], 84: [2, 95], 85: [2, 95] }, { 68: [2, 97] }, { 5: [2, 21], 14: [2, 21], 15: [2, 21], 19: [2, 21], 29: [2, 21], 34: [2, 21], 39: [2, 21], 44: [2, 21], 47: [2, 21], 48: [2, 21], 51: [2, 21], 55: [2, 21], 60: [2, 21] }, { 33: [1, 131] }, { 33: [2, 63] }, { 72: [1, 133], 76: 132 }, { 33: [1, 134] }, { 33: [2, 69] }, { 15: [2, 12] }, { 14: [2, 26], 15: [2, 26], 19: [2, 26], 29: [2, 26], 34: [2, 26], 47: [2, 26], 48: [2, 26], 51: [2, 26], 55: [2, 26], 60: [2, 26] }, { 23: [2, 31], 33: [2, 31], 54: [2, 31], 68: [2, 31], 72: [2, 31], 75: [2, 31] }, { 33: [2, 74], 42: 135, 74: 136, 75: [1, 121] }, { 33: [2, 71], 65: [2, 71], 72: [2, 71], 75: [2, 71], 80: [2, 71], 81: [2, 71], 82: [2, 71], 83: [2, 71], 84: [2, 71], 85: [2, 71] }, { 33: [2, 73], 75: [2, 73] }, { 23: [2, 29], 33: [2, 29], 54: [2, 29], 65: [2, 29], 68: [2, 29], 72: [2, 29], 75: [2, 29], 80: [2, 29], 81: [2, 29], 82: [2, 29], 83: [2, 29], 84: [2, 29], 85: [2, 29] }, { 14: [2, 15], 15: [2, 15], 19: [2, 15], 29: [2, 15], 34: [2, 15], 39: [2, 15], 44: [2, 15], 47: [2, 15], 48: [2, 15], 51: [2, 15], 55: [2, 15], 60: [2, 15] }, { 72: [1, 138], 77: [1, 137] }, { 72: [2, 100], 77: [2, 100] }, { 14: [2, 16], 15: [2, 16], 19: [2, 16], 29: [2, 16], 34: [2, 16], 44: [2, 16], 47: [2, 16], 48: [2, 16], 51: [2, 16], 55: [2, 16], 60: [2, 16] }, { 33: [1, 139] }, { 33: [2, 75] }, { 33: [2, 32] }, { 72: [2, 101], 77: [2, 101] }, { 14: [2, 17], 15: [2, 17], 19: [2, 17], 29: [2, 17], 34: [2, 17], 39: [2, 17], 44: [2, 17], 47: [2, 17], 48: [2, 17], 51: [2, 17], 55: [2, 17], 60: [2, 17] }], defaultActions: { 4: [2, 1], 55: [2, 55], 57: [2, 20], 61: [2, 57], 74: [2, 81], 83: [2, 85], 87: [2, 18], 91: [2, 89], 102: [2, 53], 105: [2, 93], 111: [2, 19], 112: [2, 77], 117: [2, 97], 120: [2, 63], 123: [2, 69], 124: [2, 12], 136: [2, 75], 137: [2, 32] }, parseError: function parseError(t, e) {
|
|
1106
|
+
throw new Error(t);
|
|
1107
|
+
}, parse: function parse(t) {
|
|
1108
|
+
var e = this,
|
|
1109
|
+
r = [0],
|
|
1110
|
+
a = [null],
|
|
1111
|
+
i = [],
|
|
1112
|
+
n = this.table,
|
|
1113
|
+
s = "",
|
|
1114
|
+
o = 0,
|
|
1115
|
+
l = 0,
|
|
1116
|
+
c = 0;this.lexer.setInput(t), this.lexer.yy = this.yy, this.yy.lexer = this.lexer, this.yy.parser = this, void 0 === this.lexer.yylloc && (this.lexer.yylloc = {});var u = this.lexer.yylloc;i.push(u);var p = this.lexer.options && this.lexer.options.ranges;"function" == typeof this.yy.parseError && (this.parseError = this.yy.parseError);for (var h, d, m, f, g, b, v, y, k, S = {};;) {
|
|
1117
|
+
if (m = r[r.length - 1], this.defaultActions[m] ? f = this.defaultActions[m] : (null !== h && void 0 !== h || (h = function () {
|
|
1118
|
+
var t;return "number" != typeof (t = e.lexer.lex() || 1) && (t = e.symbols_[t] || t), t;
|
|
1119
|
+
}()), f = n[m] && n[m][h]), void 0 === f || !f.length || !f[0]) {
|
|
1120
|
+
var w = "";if (!c) {
|
|
1121
|
+
k = [];for (b in n[m]) {
|
|
1122
|
+
this.terminals_[b] && b > 2 && k.push("'" + this.terminals_[b] + "'");
|
|
1123
|
+
}w = this.lexer.showPosition ? "Parse error on line " + (o + 1) + ":\n" + this.lexer.showPosition() + "\nExpecting " + k.join(", ") + ", got '" + (this.terminals_[h] || h) + "'" : "Parse error on line " + (o + 1) + ": Unexpected " + (1 == h ? "end of input" : "'" + (this.terminals_[h] || h) + "'"), this.parseError(w, { text: this.lexer.match, token: this.terminals_[h] || h, line: this.lexer.yylineno, loc: u, expected: k });
|
|
1124
|
+
}
|
|
1125
|
+
}if (f[0] instanceof Array && f.length > 1) throw new Error("Parse Error: multiple actions possible at state: " + m + ", token: " + h);switch (f[0]) {case 1:
|
|
1126
|
+
r.push(h), a.push(this.lexer.yytext), i.push(this.lexer.yylloc), r.push(f[1]), h = null, d ? (h = d, d = null) : (l = this.lexer.yyleng, s = this.lexer.yytext, o = this.lexer.yylineno, u = this.lexer.yylloc, c > 0 && c--);break;case 2:
|
|
1127
|
+
if (v = this.productions_[f[1]][1], S.$ = a[a.length - v], S._$ = { first_line: i[i.length - (v || 1)].first_line, last_line: i[i.length - 1].last_line, first_column: i[i.length - (v || 1)].first_column, last_column: i[i.length - 1].last_column }, p && (S._$.range = [i[i.length - (v || 1)].range[0], i[i.length - 1].range[1]]), void 0 !== (g = this.performAction.call(S, s, l, o, this.yy, f[1], a, i))) return g;v && (r = r.slice(0, -1 * v * 2), a = a.slice(0, -1 * v), i = i.slice(0, -1 * v)), r.push(this.productions_[f[1]][0]), a.push(S.$), i.push(S._$), y = n[r[r.length - 2]][r[r.length - 1]], r.push(y);break;case 3:
|
|
1128
|
+
return !0;}
|
|
1129
|
+
}return !0;
|
|
1130
|
+
} },
|
|
1131
|
+
r = function () {
|
|
1132
|
+
var t = { EOF: 1, parseError: function parseError(t, e) {
|
|
1133
|
+
if (!this.yy.parser) throw new Error(t);this.yy.parser.parseError(t, e);
|
|
1134
|
+
}, setInput: function setInput(t) {
|
|
1135
|
+
return this._input = t, this._more = this._less = 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;
|
|
1136
|
+
}, input: function input() {
|
|
1137
|
+
var t = this._input[0];return this.yytext += t, this.yyleng++, this.offset++, this.match += t, this.matched += t, t.match(/(?:\r\n?|\n).*/g) ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++, this.options.ranges && this.yylloc.range[1]++, this._input = this._input.slice(1), t;
|
|
1138
|
+
}, unput: function unput(t) {
|
|
1139
|
+
var e = t.length,
|
|
1140
|
+
r = t.split(/(?:\r\n?|\n)/g);this._input = t + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - e - 1), this.offset -= e;var a = this.match.split(/(?:\r\n?|\n)/g);this.match = this.match.substr(0, this.match.length - 1), this.matched = this.matched.substr(0, this.matched.length - 1), r.length - 1 && (this.yylineno -= r.length - 1);var i = this.yylloc.range;return this.yylloc = { first_line: this.yylloc.first_line, last_line: this.yylineno + 1, first_column: this.yylloc.first_column, last_column: r ? (r.length === a.length ? this.yylloc.first_column : 0) + a[a.length - r.length].length - r[0].length : this.yylloc.first_column - e }, this.options.ranges && (this.yylloc.range = [i[0], i[0] + this.yyleng - e]), this;
|
|
1141
|
+
}, more: function more() {
|
|
1142
|
+
return this._more = !0, this;
|
|
1143
|
+
}, less: function less(t) {
|
|
1144
|
+
this.unput(this.match.slice(t));
|
|
1145
|
+
}, pastInput: function pastInput() {
|
|
1146
|
+
var t = this.matched.substr(0, this.matched.length - this.match.length);return (t.length > 20 ? "..." : "") + t.substr(-20).replace(/\n/g, "");
|
|
1147
|
+
}, upcomingInput: function upcomingInput() {
|
|
1148
|
+
var t = this.match;return t.length < 20 && (t += this._input.substr(0, 20 - t.length)), (t.substr(0, 20) + (t.length > 20 ? "..." : "")).replace(/\n/g, "");
|
|
1149
|
+
}, showPosition: function showPosition() {
|
|
1150
|
+
var t = this.pastInput(),
|
|
1151
|
+
e = new Array(t.length + 1).join("-");return t + this.upcomingInput() + "\n" + e + "^";
|
|
1152
|
+
}, next: function next() {
|
|
1153
|
+
if (this.done) return this.EOF;this._input || (this.done = !0);var t, e, r, a, i;this._more || (this.yytext = "", this.match = "");for (var n = this._currentRules(), s = 0; s < n.length && (!(r = this._input.match(this.rules[n[s]])) || e && !(r[0].length > e[0].length) || (e = r, a = s, this.options.flex)); s++) {}return e ? ((i = e[0].match(/(?:\r\n?|\n).*/g)) && (this.yylineno += i.length), this.yylloc = { first_line: this.yylloc.last_line, last_line: this.yylineno + 1, first_column: this.yylloc.last_column, last_column: i ? i[i.length - 1].length - i[i.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + e[0].length }, this.yytext += e[0], this.match += e[0], this.matches = e, this.yyleng = this.yytext.length, this.options.ranges && (this.yylloc.range = [this.offset, this.offset += this.yyleng]), this._more = !1, this._input = this._input.slice(e[0].length), this.matched += e[0], t = this.performAction.call(this, this.yy, this, n[a], this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), t || void 0) : "" === this._input ? this.EOF : this.parseError("Lexical error on line " + (this.yylineno + 1) + ". Unrecognized text.\n" + this.showPosition(), { text: "", token: null, line: this.yylineno });
|
|
1154
|
+
}, lex: function lex() {
|
|
1155
|
+
var t = this.next();return void 0 !== t ? t : this.lex();
|
|
1156
|
+
}, begin: function begin(t) {
|
|
1157
|
+
this.conditionStack.push(t);
|
|
1158
|
+
}, popState: function popState() {
|
|
1159
|
+
return this.conditionStack.pop();
|
|
1160
|
+
}, _currentRules: function _currentRules() {
|
|
1161
|
+
return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules;
|
|
1162
|
+
}, topState: function topState() {
|
|
1163
|
+
return this.conditionStack[this.conditionStack.length - 2];
|
|
1164
|
+
}, pushState: function pushState(t) {
|
|
1165
|
+
this.begin(t);
|
|
1166
|
+
} };return t.options = {}, t.performAction = function (t, e, r, a) {
|
|
1167
|
+
function i(t, r) {
|
|
1168
|
+
return e.yytext = e.yytext.substr(t, e.yyleng - r);
|
|
1169
|
+
}switch (r) {case 0:
|
|
1170
|
+
if ("\\\\" === e.yytext.slice(-2) ? (i(0, 1), this.begin("mu")) : "\\" === e.yytext.slice(-1) ? (i(0, 1), this.begin("emu")) : this.begin("mu"), e.yytext) return 15;break;case 1:
|
|
1171
|
+
return 15;case 2:
|
|
1172
|
+
return this.popState(), 15;case 3:
|
|
1173
|
+
return this.begin("raw"), 15;case 4:
|
|
1174
|
+
return this.popState(), "raw" === this.conditionStack[this.conditionStack.length - 1] ? 15 : (e.yytext = e.yytext.substr(5, e.yyleng - 9), "END_RAW_BLOCK");case 5:
|
|
1175
|
+
return 15;case 6:
|
|
1176
|
+
return this.popState(), 14;case 7:
|
|
1177
|
+
return 65;case 8:
|
|
1178
|
+
return 68;case 9:
|
|
1179
|
+
return 19;case 10:
|
|
1180
|
+
return this.popState(), this.begin("raw"), 23;case 11:
|
|
1181
|
+
return 55;case 12:
|
|
1182
|
+
return 60;case 13:
|
|
1183
|
+
return 29;case 14:
|
|
1184
|
+
return 47;case 15:case 16:
|
|
1185
|
+
return this.popState(), 44;case 17:
|
|
1186
|
+
return 34;case 18:
|
|
1187
|
+
return 39;case 19:
|
|
1188
|
+
return 51;case 20:
|
|
1189
|
+
return 48;case 21:
|
|
1190
|
+
this.unput(e.yytext), this.popState(), this.begin("com");break;case 22:
|
|
1191
|
+
return this.popState(), 14;case 23:
|
|
1192
|
+
return 48;case 24:
|
|
1193
|
+
return 73;case 25:case 26:
|
|
1194
|
+
return 72;case 27:
|
|
1195
|
+
return 87;case 28:
|
|
1196
|
+
break;case 29:
|
|
1197
|
+
return this.popState(), 54;case 30:
|
|
1198
|
+
return this.popState(), 33;case 31:
|
|
1199
|
+
return e.yytext = i(1, 2).replace(/\\"/g, '"'), 80;case 32:
|
|
1200
|
+
return e.yytext = i(1, 2).replace(/\\'/g, "'"), 80;case 33:
|
|
1201
|
+
return 85;case 34:case 35:
|
|
1202
|
+
return 82;case 36:
|
|
1203
|
+
return 83;case 37:
|
|
1204
|
+
return 84;case 38:
|
|
1205
|
+
return 81;case 39:
|
|
1206
|
+
return 75;case 40:
|
|
1207
|
+
return 77;case 41:
|
|
1208
|
+
return 72;case 42:
|
|
1209
|
+
return e.yytext = e.yytext.replace(/\\([\\\]])/g, "$1"), 72;case 43:
|
|
1210
|
+
return "INVALID";case 44:
|
|
1211
|
+
return 5;}
|
|
1212
|
+
}, t.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\/.)|]))))/, /^(?:\[(\\\]|[^\]])*\])/, /^(?:.)/, /^(?:$)/], t.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], inclusive: !1 }, emu: { rules: [2], inclusive: !1 }, com: { rules: [6], inclusive: !1 }, raw: { rules: [3, 4, 5], inclusive: !1 }, INITIAL: { rules: [0, 1, 44], inclusive: !0 } }, t;
|
|
1213
|
+
}();return e.lexer = r, t.prototype = e, e.Parser = t, new t();
|
|
1214
|
+
}();e.default = r, t.exports = e.default;
|
|
1215
|
+
});unwrapExports(parser);var visitor = createCommonjsModule(function (t, e) {
|
|
1216
|
+
function r() {
|
|
1217
|
+
this.parents = [];
|
|
1218
|
+
}function a(t) {
|
|
1219
|
+
this.acceptRequired(t, "path"), this.acceptArray(t.params), this.acceptKey(t, "hash");
|
|
1220
|
+
}function i(t) {
|
|
1221
|
+
a.call(this, t), this.acceptKey(t, "program"), this.acceptKey(t, "inverse");
|
|
1222
|
+
}function n(t) {
|
|
1223
|
+
this.acceptRequired(t, "name"), this.acceptArray(t.params), this.acceptKey(t, "hash");
|
|
1224
|
+
}e.__esModule = !0;var s = function (t) {
|
|
1225
|
+
return t && t.__esModule ? t : { default: t };
|
|
1226
|
+
}(exception);r.prototype = { constructor: r, mutating: !1, acceptKey: function acceptKey(t, e) {
|
|
1227
|
+
var a = this.accept(t[e]);if (this.mutating) {
|
|
1228
|
+
if (a && !r.prototype[a.type]) throw new s.default('Unexpected node type "' + a.type + '" found when accepting ' + e + " on " + t.type);t[e] = a;
|
|
1229
|
+
}
|
|
1230
|
+
}, acceptRequired: function acceptRequired(t, e) {
|
|
1231
|
+
if (this.acceptKey(t, e), !t[e]) throw new s.default(t.type + " requires " + e);
|
|
1232
|
+
}, acceptArray: function acceptArray(t) {
|
|
1233
|
+
for (var e = 0, r = t.length; e < r; e++) {
|
|
1234
|
+
this.acceptKey(t, e), t[e] || (t.splice(e, 1), e--, r--);
|
|
1235
|
+
}
|
|
1236
|
+
}, accept: function accept(t) {
|
|
1237
|
+
if (t) {
|
|
1238
|
+
if (!this[t.type]) throw new s.default("Unknown type: " + t.type, t);this.current && this.parents.unshift(this.current), this.current = t;var e = this[t.type](t);return this.current = this.parents.shift(), !this.mutating || e ? e : !1 !== e ? t : void 0;
|
|
1239
|
+
}
|
|
1240
|
+
}, Program: function Program(t) {
|
|
1241
|
+
this.acceptArray(t.body);
|
|
1242
|
+
}, MustacheStatement: a, Decorator: a, BlockStatement: i, DecoratorBlock: i, PartialStatement: n, PartialBlockStatement: function PartialBlockStatement(t) {
|
|
1243
|
+
n.call(this, t), this.acceptKey(t, "program");
|
|
1244
|
+
}, ContentStatement: function ContentStatement() {}, CommentStatement: function CommentStatement() {}, SubExpression: a, PathExpression: function PathExpression() {}, StringLiteral: function StringLiteral() {}, NumberLiteral: function NumberLiteral() {}, BooleanLiteral: function BooleanLiteral() {}, UndefinedLiteral: function UndefinedLiteral() {}, NullLiteral: function NullLiteral() {}, Hash: function Hash(t) {
|
|
1245
|
+
this.acceptArray(t.pairs);
|
|
1246
|
+
}, HashPair: function HashPair(t) {
|
|
1247
|
+
this.acceptRequired(t, "value");
|
|
1248
|
+
} }, e.default = r, t.exports = e.default;
|
|
1249
|
+
});unwrapExports(visitor);var whitespaceControl = createCommonjsModule(function (t, e) {
|
|
1250
|
+
function r() {
|
|
1251
|
+
var t = arguments.length <= 0 || void 0 === arguments[0] ? {} : arguments[0];this.options = t;
|
|
1252
|
+
}function a(t, e, r) {
|
|
1253
|
+
void 0 === e && (e = t.length);var a = t[e - 1],
|
|
1254
|
+
i = t[e - 2];return a ? "ContentStatement" === a.type ? (i || !r ? /\r?\n\s*?$/ : /(^|\r?\n)\s*?$/).test(a.original) : void 0 : r;
|
|
1255
|
+
}function i(t, e, r) {
|
|
1256
|
+
void 0 === e && (e = -1);var a = t[e + 1],
|
|
1257
|
+
i = t[e + 2];return a ? "ContentStatement" === a.type ? (i || !r ? /^\s*?\r?\n/ : /^\s*?(\r?\n|$)/).test(a.original) : void 0 : r;
|
|
1258
|
+
}function n(t, e, r) {
|
|
1259
|
+
var a = t[null == e ? 0 : e + 1];if (a && "ContentStatement" === a.type && (r || !a.rightStripped)) {
|
|
1260
|
+
var i = a.value;a.value = a.value.replace(r ? /^\s+/ : /^[ \t]*\r?\n?/, ""), a.rightStripped = a.value !== i;
|
|
1261
|
+
}
|
|
1262
|
+
}function s(t, e, r) {
|
|
1263
|
+
var a = t[null == e ? t.length - 1 : e - 1];if (a && "ContentStatement" === a.type && (r || !a.leftStripped)) {
|
|
1264
|
+
var i = a.value;return a.value = a.value.replace(r ? /\s+$/ : /[ \t]+$/, ""), a.leftStripped = a.value !== i, a.leftStripped;
|
|
1265
|
+
}
|
|
1266
|
+
}e.__esModule = !0;var o = function (t) {
|
|
1267
|
+
return t && t.__esModule ? t : { default: t };
|
|
1268
|
+
}(visitor);(r.prototype = new o.default()).Program = function (t) {
|
|
1269
|
+
var e = !this.options.ignoreStandalone,
|
|
1270
|
+
r = !this.isRootSeen;this.isRootSeen = !0;for (var o = t.body, l = 0, c = o.length; l < c; l++) {
|
|
1271
|
+
var u = o[l],
|
|
1272
|
+
p = this.accept(u);if (p) {
|
|
1273
|
+
var h = a(o, l, r),
|
|
1274
|
+
d = i(o, l, r),
|
|
1275
|
+
m = p.openStandalone && h,
|
|
1276
|
+
f = p.closeStandalone && d,
|
|
1277
|
+
g = p.inlineStandalone && h && d;p.close && n(o, l, !0), p.open && s(o, l, !0), e && g && (n(o, l), s(o, l) && "PartialStatement" === u.type && (u.indent = /([ \t]+$)/.exec(o[l - 1].original)[1])), e && m && (n((u.program || u.inverse).body), s(o, l)), e && f && (n(o, l), s((u.inverse || u.program).body));
|
|
1278
|
+
}
|
|
1279
|
+
}return t;
|
|
1280
|
+
}, r.prototype.BlockStatement = r.prototype.DecoratorBlock = r.prototype.PartialBlockStatement = function (t) {
|
|
1281
|
+
this.accept(t.program), this.accept(t.inverse);var e = t.program || t.inverse,
|
|
1282
|
+
r = t.program && t.inverse,
|
|
1283
|
+
o = r,
|
|
1284
|
+
l = r;if (r && r.chained) for (o = r.body[0].program; l.chained;) {
|
|
1285
|
+
l = l.body[l.body.length - 1].program;
|
|
1286
|
+
}var c = { open: t.openStrip.open, close: t.closeStrip.close, openStandalone: i(e.body), closeStandalone: a((o || e).body) };if (t.openStrip.close && n(e.body, null, !0), r) {
|
|
1287
|
+
var u = t.inverseStrip;u.open && s(e.body, null, !0), u.close && n(o.body, null, !0), t.closeStrip.open && s(l.body, null, !0), !this.options.ignoreStandalone && a(e.body) && i(o.body) && (s(e.body), n(o.body));
|
|
1288
|
+
} else t.closeStrip.open && s(e.body, null, !0);return c;
|
|
1289
|
+
}, r.prototype.Decorator = r.prototype.MustacheStatement = function (t) {
|
|
1290
|
+
return t.strip;
|
|
1291
|
+
}, r.prototype.PartialStatement = r.prototype.CommentStatement = function (t) {
|
|
1292
|
+
var e = t.strip || {};return { inlineStandalone: !0, open: e.open, close: e.close };
|
|
1293
|
+
}, e.default = r, t.exports = e.default;
|
|
1294
|
+
});unwrapExports(whitespaceControl);var helpers$2 = createCommonjsModule(function (t, e) {
|
|
1295
|
+
function r(t, e) {
|
|
1296
|
+
if (e = e.path ? e.path.original : e, t.path.original !== e) {
|
|
1297
|
+
var r = { loc: t.path.loc };throw new a.default(t.path.original + " doesn't match " + e, r);
|
|
1298
|
+
}
|
|
1299
|
+
}e.__esModule = !0, e.SourceLocation = function (t, e) {
|
|
1300
|
+
this.source = t, this.start = { line: e.first_line, column: e.first_column }, this.end = { line: e.last_line, column: e.last_column };
|
|
1301
|
+
}, e.id = function (t) {
|
|
1302
|
+
return (/^\[.*\]$/.test(t) ? t.substr(1, t.length - 2) : t
|
|
1303
|
+
);
|
|
1304
|
+
}, e.stripFlags = function (t, e) {
|
|
1305
|
+
return { open: "~" === t.charAt(2), close: "~" === e.charAt(e.length - 3) };
|
|
1306
|
+
}, e.stripComment = function (t) {
|
|
1307
|
+
return t.replace(/^\{\{~?\!-?-?/, "").replace(/-?-?~?\}\}$/, "");
|
|
1308
|
+
}, e.preparePath = function (t, e, r) {
|
|
1309
|
+
r = this.locInfo(r);for (var i = t ? "@" : "", n = [], s = 0, o = 0, l = e.length; o < l; o++) {
|
|
1310
|
+
var c = e[o].part,
|
|
1311
|
+
u = e[o].original !== c;if (i += (e[o].separator || "") + c, u || ".." !== c && "." !== c && "this" !== c) n.push(c);else {
|
|
1312
|
+
if (n.length > 0) throw new a.default("Invalid path: " + i, { loc: r });".." === c && s++;
|
|
1313
|
+
}
|
|
1314
|
+
}return { type: "PathExpression", data: t, depth: s, parts: n, original: i, loc: r };
|
|
1315
|
+
}, e.prepareMustache = function (t, e, r, a, i, n) {
|
|
1316
|
+
var s = a.charAt(3) || a.charAt(2),
|
|
1317
|
+
o = "{" !== s && "&" !== s;return { type: /\*/.test(a) ? "Decorator" : "MustacheStatement", path: t, params: e, hash: r, escaped: o, strip: i, loc: this.locInfo(n) };
|
|
1318
|
+
}, e.prepareRawBlock = function (t, e, a, i) {
|
|
1319
|
+
r(t, a);var n = { type: "Program", body: e, strip: {}, loc: i = this.locInfo(i) };return { type: "BlockStatement", path: t.path, params: t.params, hash: t.hash, program: n, openStrip: {}, inverseStrip: {}, closeStrip: {}, loc: i };
|
|
1320
|
+
}, e.prepareBlock = function (t, e, i, n, s, o) {
|
|
1321
|
+
n && n.path && r(t, n);var l = /\*/.test(t.open);e.blockParams = t.blockParams;var c = void 0,
|
|
1322
|
+
u = void 0;if (i) {
|
|
1323
|
+
if (l) throw new a.default("Unexpected inverse block on decorator", i);i.chain && (i.program.body[0].closeStrip = n.strip), u = i.strip, c = i.program;
|
|
1324
|
+
}return s && (s = c, c = e, e = s), { type: l ? "DecoratorBlock" : "BlockStatement", path: t.path, params: t.params, hash: t.hash, program: e, inverse: c, openStrip: t.strip, inverseStrip: u, closeStrip: n && n.strip, loc: this.locInfo(o) };
|
|
1325
|
+
}, e.prepareProgram = function (t, e) {
|
|
1326
|
+
if (!e && t.length) {
|
|
1327
|
+
var r = t[0].loc,
|
|
1328
|
+
a = t[t.length - 1].loc;r && a && (e = { source: r.source, start: { line: r.start.line, column: r.start.column }, end: { line: a.end.line, column: a.end.column } });
|
|
1329
|
+
}return { type: "Program", body: t, strip: {}, loc: e };
|
|
1330
|
+
}, e.preparePartialBlock = function (t, e, a, i) {
|
|
1331
|
+
return r(t, a), { type: "PartialBlockStatement", name: t.path, params: t.params, hash: t.hash, program: e, openStrip: t.strip, closeStrip: a && a.strip, loc: this.locInfo(i) };
|
|
1332
|
+
};var a = function (t) {
|
|
1333
|
+
return t && t.__esModule ? t : { default: t };
|
|
1334
|
+
}(exception);
|
|
1335
|
+
});unwrapExports(helpers$2);var base$2 = createCommonjsModule(function (t, e) {
|
|
1336
|
+
function r(t) {
|
|
1337
|
+
return t && t.__esModule ? t : { default: t };
|
|
1338
|
+
}e.__esModule = !0, e.parse = function (t, e) {
|
|
1339
|
+
return "Program" === t.type ? t : (a.default.yy = s, s.locInfo = function (t) {
|
|
1340
|
+
return new s.SourceLocation(e && e.srcName, t);
|
|
1341
|
+
}, new i.default(e).accept(a.default.parse(t)));
|
|
1342
|
+
};var a = r(parser),
|
|
1343
|
+
i = r(whitespaceControl),
|
|
1344
|
+
n = function (t) {
|
|
1345
|
+
if (t && t.__esModule) return t;var e = {};if (null != t) for (var r in t) {
|
|
1346
|
+
Object.prototype.hasOwnProperty.call(t, r) && (e[r] = t[r]);
|
|
1347
|
+
}return e.default = t, e;
|
|
1348
|
+
}(helpers$2);e.parser = a.default;var s = {};utils.extend(s, n);
|
|
1349
|
+
});unwrapExports(base$2);var compiler = createCommonjsModule(function (t, e) {
|
|
1350
|
+
function r(t) {
|
|
1351
|
+
return t && t.__esModule ? t : { default: t };
|
|
1352
|
+
}function a() {}function i(t, e) {
|
|
1353
|
+
if (t === e) return !0;if (utils.isArray(t) && utils.isArray(e) && t.length === e.length) {
|
|
1354
|
+
for (var r = 0; r < t.length; r++) {
|
|
1355
|
+
if (!i(t[r], e[r])) return !1;
|
|
1356
|
+
}return !0;
|
|
1357
|
+
}
|
|
1358
|
+
}function n(t) {
|
|
1359
|
+
if (!t.path.parts) {
|
|
1360
|
+
var e = t.path;t.path = { type: "PathExpression", data: !1, depth: 0, parts: [e.original + ""], original: e.original + "", loc: e.loc };
|
|
1361
|
+
}
|
|
1362
|
+
}e.__esModule = !0, e.Compiler = a, e.precompile = function (t, e, r) {
|
|
1363
|
+
if (null == t || "string" != typeof t && "Program" !== t.type) throw new s.default("You must pass a string or Handlebars AST to Handlebars.precompile. You passed " + t);"data" in (e = e || {}) || (e.data = !0), e.compat && (e.useDepths = !0);var a = r.parse(t, e),
|
|
1364
|
+
i = new r.Compiler().compile(a, e);return new r.JavaScriptCompiler().compile(i, e);
|
|
1365
|
+
}, e.compile = function (t, e, r) {
|
|
1366
|
+
function a() {
|
|
1367
|
+
var a = r.parse(t, e),
|
|
1368
|
+
i = new r.Compiler().compile(a, e),
|
|
1369
|
+
n = new r.JavaScriptCompiler().compile(i, e, void 0, !0);return r.template(n);
|
|
1370
|
+
}function i(t, e) {
|
|
1371
|
+
return n || (n = a()), n.call(this, t, e);
|
|
1372
|
+
}if (void 0 === e && (e = {}), null == t || "string" != typeof t && "Program" !== t.type) throw new s.default("You must pass a string or Handlebars AST to Handlebars.compile. You passed " + t);"data" in (e = utils.extend({}, e)) || (e.data = !0), e.compat && (e.useDepths = !0);var n = void 0;return i._setup = function (t) {
|
|
1373
|
+
return n || (n = a()), n._setup(t);
|
|
1374
|
+
}, i._child = function (t, e, r, i) {
|
|
1375
|
+
return n || (n = a()), n._child(t, e, r, i);
|
|
1376
|
+
}, i;
|
|
1377
|
+
};var s = r(exception),
|
|
1378
|
+
o = r(ast),
|
|
1379
|
+
l = [].slice;a.prototype = { compiler: a, equals: function equals(t) {
|
|
1380
|
+
var e = this.opcodes.length;if (t.opcodes.length !== e) return !1;for (n = 0; n < e; n++) {
|
|
1381
|
+
var r = this.opcodes[n],
|
|
1382
|
+
a = t.opcodes[n];if (r.opcode !== a.opcode || !i(r.args, a.args)) return !1;
|
|
1383
|
+
}e = this.children.length;for (var n = 0; n < e; n++) {
|
|
1384
|
+
if (!this.children[n].equals(t.children[n])) return !1;
|
|
1385
|
+
}return !0;
|
|
1386
|
+
}, guid: 0, compile: function compile(t, e) {
|
|
1387
|
+
this.sourceNode = [], this.opcodes = [], this.children = [], this.options = e, this.stringParams = e.stringParams, this.trackIds = e.trackIds, e.blockParams = e.blockParams || [];var r = e.knownHelpers;if (e.knownHelpers = { helperMissing: !0, blockHelperMissing: !0, each: !0, if: !0, unless: !0, with: !0, log: !0, lookup: !0 }, r) for (var a in r) {
|
|
1388
|
+
a in r && (this.options.knownHelpers[a] = r[a]);
|
|
1389
|
+
}return this.accept(t);
|
|
1390
|
+
}, compileProgram: function compileProgram(t) {
|
|
1391
|
+
var e = new this.compiler().compile(t, this.options),
|
|
1392
|
+
r = this.guid++;return this.usePartial = this.usePartial || e.usePartial, this.children[r] = e, this.useDepths = this.useDepths || e.useDepths, r;
|
|
1393
|
+
}, accept: function accept(t) {
|
|
1394
|
+
if (!this[t.type]) throw new s.default("Unknown type: " + t.type, t);this.sourceNode.unshift(t);var e = this[t.type](t);return this.sourceNode.shift(), e;
|
|
1395
|
+
}, Program: function Program(t) {
|
|
1396
|
+
this.options.blockParams.unshift(t.blockParams);for (var e = t.body, r = e.length, a = 0; a < r; a++) {
|
|
1397
|
+
this.accept(e[a]);
|
|
1398
|
+
}return this.options.blockParams.shift(), this.isSimple = 1 === r, this.blockParams = t.blockParams ? t.blockParams.length : 0, this;
|
|
1399
|
+
}, BlockStatement: function BlockStatement(t) {
|
|
1400
|
+
n(t);var e = t.program,
|
|
1401
|
+
r = t.inverse;e = e && this.compileProgram(e), r = r && this.compileProgram(r);var a = this.classifySexpr(t);"helper" === a ? this.helperSexpr(t, e, r) : "simple" === a ? (this.simpleSexpr(t), this.opcode("pushProgram", e), this.opcode("pushProgram", r), this.opcode("emptyHash"), this.opcode("blockValue", t.path.original)) : (this.ambiguousSexpr(t, e, r), this.opcode("pushProgram", e), this.opcode("pushProgram", r), this.opcode("emptyHash"), this.opcode("ambiguousBlockValue")), this.opcode("append");
|
|
1402
|
+
}, DecoratorBlock: function DecoratorBlock(t) {
|
|
1403
|
+
var e = t.program && this.compileProgram(t.program),
|
|
1404
|
+
r = this.setupFullMustacheParams(t, e, void 0),
|
|
1405
|
+
a = t.path;this.useDecorators = !0, this.opcode("registerDecorator", r.length, a.original);
|
|
1406
|
+
}, PartialStatement: function PartialStatement(t) {
|
|
1407
|
+
this.usePartial = !0;var e = t.program;e && (e = this.compileProgram(t.program));var r = t.params;if (r.length > 1) throw new s.default("Unsupported number of partial arguments: " + r.length, t);r.length || (this.options.explicitPartialContext ? this.opcode("pushLiteral", "undefined") : r.push({ type: "PathExpression", parts: [], depth: 0 }));var a = t.name.original,
|
|
1408
|
+
i = "SubExpression" === t.name.type;i && this.accept(t.name), this.setupFullMustacheParams(t, e, void 0, !0);var n = t.indent || "";this.options.preventIndent && n && (this.opcode("appendContent", n), n = ""), this.opcode("invokePartial", i, a, n), this.opcode("append");
|
|
1409
|
+
}, PartialBlockStatement: function PartialBlockStatement(t) {
|
|
1410
|
+
this.PartialStatement(t);
|
|
1411
|
+
}, MustacheStatement: function MustacheStatement(t) {
|
|
1412
|
+
this.SubExpression(t), t.escaped && !this.options.noEscape ? this.opcode("appendEscaped") : this.opcode("append");
|
|
1413
|
+
}, Decorator: function Decorator(t) {
|
|
1414
|
+
this.DecoratorBlock(t);
|
|
1415
|
+
}, ContentStatement: function ContentStatement(t) {
|
|
1416
|
+
t.value && this.opcode("appendContent", t.value);
|
|
1417
|
+
}, CommentStatement: function CommentStatement() {}, SubExpression: function SubExpression(t) {
|
|
1418
|
+
n(t);var e = this.classifySexpr(t);"simple" === e ? this.simpleSexpr(t) : "helper" === e ? this.helperSexpr(t) : this.ambiguousSexpr(t);
|
|
1419
|
+
}, ambiguousSexpr: function ambiguousSexpr(t, e, r) {
|
|
1420
|
+
var a = t.path,
|
|
1421
|
+
i = a.parts[0],
|
|
1422
|
+
n = null != e || null != r;this.opcode("getContext", a.depth), this.opcode("pushProgram", e), this.opcode("pushProgram", r), a.strict = !0, this.accept(a), this.opcode("invokeAmbiguous", i, n);
|
|
1423
|
+
}, simpleSexpr: function simpleSexpr(t) {
|
|
1424
|
+
var e = t.path;e.strict = !0, this.accept(e), this.opcode("resolvePossibleLambda");
|
|
1425
|
+
}, helperSexpr: function helperSexpr(t, e, r) {
|
|
1426
|
+
var a = this.setupFullMustacheParams(t, e, r),
|
|
1427
|
+
i = t.path,
|
|
1428
|
+
n = i.parts[0];if (this.options.knownHelpers[n]) this.opcode("invokeKnownHelper", a.length, n);else {
|
|
1429
|
+
if (this.options.knownHelpersOnly) throw new s.default("You specified knownHelpersOnly, but used the unknown helper " + n, t);i.strict = !0, i.falsy = !0, this.accept(i), this.opcode("invokeHelper", a.length, i.original, o.default.helpers.simpleId(i));
|
|
1430
|
+
}
|
|
1431
|
+
}, PathExpression: function PathExpression(t) {
|
|
1432
|
+
this.addDepth(t.depth), this.opcode("getContext", t.depth);var e = t.parts[0],
|
|
1433
|
+
r = o.default.helpers.scopedId(t),
|
|
1434
|
+
a = !t.depth && !r && this.blockParamIndex(e);a ? this.opcode("lookupBlockParam", a, t.parts) : e ? t.data ? (this.options.data = !0, this.opcode("lookupData", t.depth, t.parts, t.strict)) : this.opcode("lookupOnContext", t.parts, t.falsy, t.strict, r) : this.opcode("pushContext");
|
|
1435
|
+
}, StringLiteral: function StringLiteral(t) {
|
|
1436
|
+
this.opcode("pushString", t.value);
|
|
1437
|
+
}, NumberLiteral: function NumberLiteral(t) {
|
|
1438
|
+
this.opcode("pushLiteral", t.value);
|
|
1439
|
+
}, BooleanLiteral: function BooleanLiteral(t) {
|
|
1440
|
+
this.opcode("pushLiteral", t.value);
|
|
1441
|
+
}, UndefinedLiteral: function UndefinedLiteral() {
|
|
1442
|
+
this.opcode("pushLiteral", "undefined");
|
|
1443
|
+
}, NullLiteral: function NullLiteral() {
|
|
1444
|
+
this.opcode("pushLiteral", "null");
|
|
1445
|
+
}, Hash: function Hash(t) {
|
|
1446
|
+
var e = t.pairs,
|
|
1447
|
+
r = 0,
|
|
1448
|
+
a = e.length;for (this.opcode("pushHash"); r < a; r++) {
|
|
1449
|
+
this.pushParam(e[r].value);
|
|
1450
|
+
}for (; r--;) {
|
|
1451
|
+
this.opcode("assignToHash", e[r].key);
|
|
1452
|
+
}this.opcode("popHash");
|
|
1453
|
+
}, opcode: function opcode(t) {
|
|
1454
|
+
this.opcodes.push({ opcode: t, args: l.call(arguments, 1), loc: this.sourceNode[0].loc });
|
|
1455
|
+
}, addDepth: function addDepth(t) {
|
|
1456
|
+
t && (this.useDepths = !0);
|
|
1457
|
+
}, classifySexpr: function classifySexpr(t) {
|
|
1458
|
+
var e = o.default.helpers.simpleId(t.path),
|
|
1459
|
+
r = e && !!this.blockParamIndex(t.path.parts[0]),
|
|
1460
|
+
a = !r && o.default.helpers.helperExpression(t),
|
|
1461
|
+
i = !r && (a || e);if (i && !a) {
|
|
1462
|
+
var n = t.path.parts[0],
|
|
1463
|
+
s = this.options;s.knownHelpers[n] ? a = !0 : s.knownHelpersOnly && (i = !1);
|
|
1464
|
+
}return a ? "helper" : i ? "ambiguous" : "simple";
|
|
1465
|
+
}, pushParams: function pushParams(t) {
|
|
1466
|
+
for (var e = 0, r = t.length; e < r; e++) {
|
|
1467
|
+
this.pushParam(t[e]);
|
|
1468
|
+
}
|
|
1469
|
+
}, pushParam: function pushParam(t) {
|
|
1470
|
+
var e = null != t.value ? t.value : t.original || "";if (this.stringParams) e.replace && (e = e.replace(/^(\.?\.\/)*/g, "").replace(/\//g, ".")), t.depth && this.addDepth(t.depth), this.opcode("getContext", t.depth || 0), this.opcode("pushStringParam", e, t.type), "SubExpression" === t.type && this.accept(t);else {
|
|
1471
|
+
if (this.trackIds) {
|
|
1472
|
+
var r = void 0;if (!t.parts || o.default.helpers.scopedId(t) || t.depth || (r = this.blockParamIndex(t.parts[0])), r) {
|
|
1473
|
+
var a = t.parts.slice(1).join(".");this.opcode("pushId", "BlockParam", r, a);
|
|
1474
|
+
} else (e = t.original || e).replace && (e = e.replace(/^this(?:\.|$)/, "").replace(/^\.\//, "").replace(/^\.$/, "")), this.opcode("pushId", t.type, e);
|
|
1475
|
+
}this.accept(t);
|
|
1476
|
+
}
|
|
1477
|
+
}, setupFullMustacheParams: function setupFullMustacheParams(t, e, r, a) {
|
|
1478
|
+
var i = t.params;return this.pushParams(i), this.opcode("pushProgram", e), this.opcode("pushProgram", r), t.hash ? this.accept(t.hash) : this.opcode("emptyHash", a), i;
|
|
1479
|
+
}, blockParamIndex: function blockParamIndex(t) {
|
|
1480
|
+
for (var e = 0, r = this.options.blockParams.length; e < r; e++) {
|
|
1481
|
+
var a = this.options.blockParams[e],
|
|
1482
|
+
i = a && utils.indexOf(a, t);if (a && i >= 0) return [e, i];
|
|
1483
|
+
}
|
|
1484
|
+
} };
|
|
1485
|
+
});unwrapExports(compiler);var codeGen = createCommonjsModule(function (t, e) {
|
|
1486
|
+
function r(t, e, r) {
|
|
1487
|
+
if (utils.isArray(t)) {
|
|
1488
|
+
for (var a = [], i = 0, n = t.length; i < n; i++) {
|
|
1489
|
+
a.push(e.wrap(t[i], r));
|
|
1490
|
+
}return a;
|
|
1491
|
+
}return "boolean" == typeof t || "number" == typeof t ? t + "" : t;
|
|
1492
|
+
}function a(t) {
|
|
1493
|
+
this.srcFile = t, this.source = [];
|
|
1494
|
+
}e.__esModule = !0;var i = void 0;try {
|
|
1495
|
+
var n = require("source-map");i = n.SourceNode;
|
|
1496
|
+
} catch (t) {}i || ((i = function i(t, e, r, a) {
|
|
1497
|
+
this.src = "", a && this.add(a);
|
|
1498
|
+
}).prototype = { add: function add(t) {
|
|
1499
|
+
utils.isArray(t) && (t = t.join("")), this.src += t;
|
|
1500
|
+
}, prepend: function prepend(t) {
|
|
1501
|
+
utils.isArray(t) && (t = t.join("")), this.src = t + this.src;
|
|
1502
|
+
}, toStringWithSourceMap: function toStringWithSourceMap() {
|
|
1503
|
+
return { code: this.toString() };
|
|
1504
|
+
}, toString: function toString() {
|
|
1505
|
+
return this.src;
|
|
1506
|
+
} }), a.prototype = { isEmpty: function isEmpty() {
|
|
1507
|
+
return !this.source.length;
|
|
1508
|
+
}, prepend: function prepend(t, e) {
|
|
1509
|
+
this.source.unshift(this.wrap(t, e));
|
|
1510
|
+
}, push: function push(t, e) {
|
|
1511
|
+
this.source.push(this.wrap(t, e));
|
|
1512
|
+
}, merge: function merge() {
|
|
1513
|
+
var t = this.empty();return this.each(function (e) {
|
|
1514
|
+
t.add([" ", e, "\n"]);
|
|
1515
|
+
}), t;
|
|
1516
|
+
}, each: function each(t) {
|
|
1517
|
+
for (var e = 0, r = this.source.length; e < r; e++) {
|
|
1518
|
+
t(this.source[e]);
|
|
1519
|
+
}
|
|
1520
|
+
}, empty: function empty() {
|
|
1521
|
+
var t = this.currentLocation || { start: {} };return new i(t.start.line, t.start.column, this.srcFile);
|
|
1522
|
+
}, wrap: function wrap(t) {
|
|
1523
|
+
var e = arguments.length <= 1 || void 0 === arguments[1] ? this.currentLocation || { start: {} } : arguments[1];return t instanceof i ? t : (t = r(t, this, e), new i(e.start.line, e.start.column, this.srcFile, t));
|
|
1524
|
+
}, functionCall: function functionCall(t, e, r) {
|
|
1525
|
+
return r = this.generateList(r), this.wrap([t, e ? "." + e + "(" : "(", r, ")"]);
|
|
1526
|
+
}, quotedString: function quotedString(t) {
|
|
1527
|
+
return '"' + (t + "").replace(/\\/g, "\\\\").replace(/"/g, '\\"').replace(/\n/g, "\\n").replace(/\r/g, "\\r").replace(/\u2028/g, "\\u2028").replace(/\u2029/g, "\\u2029") + '"';
|
|
1528
|
+
}, objectLiteral: function objectLiteral(t) {
|
|
1529
|
+
var e = [];for (var a in t) {
|
|
1530
|
+
if (t.hasOwnProperty(a)) {
|
|
1531
|
+
var i = r(t[a], this);"undefined" !== i && e.push([this.quotedString(a), ":", i]);
|
|
1532
|
+
}
|
|
1533
|
+
}var n = this.generateList(e);return n.prepend("{"), n.add("}"), n;
|
|
1534
|
+
}, generateList: function generateList(t) {
|
|
1535
|
+
for (var e = this.empty(), a = 0, i = t.length; a < i; a++) {
|
|
1536
|
+
a && e.add(","), e.add(r(t[a], this));
|
|
1537
|
+
}return e;
|
|
1538
|
+
}, generateArray: function generateArray(t) {
|
|
1539
|
+
var e = this.generateList(t);return e.prepend("["), e.add("]"), e;
|
|
1540
|
+
} }, e.default = a, t.exports = e.default;
|
|
1541
|
+
});unwrapExports(codeGen);var javascriptCompiler = createCommonjsModule(function (t, e) {
|
|
1542
|
+
function r(t) {
|
|
1543
|
+
return t && t.__esModule ? t : { default: t };
|
|
1544
|
+
}function a(t) {
|
|
1545
|
+
this.value = t;
|
|
1546
|
+
}function i() {}function n(t, e, r, a) {
|
|
1547
|
+
var i = e.popStack(),
|
|
1548
|
+
n = 0,
|
|
1549
|
+
s = r.length;for (t && s--; n < s; n++) {
|
|
1550
|
+
i = e.nameLookup(i, r[n], a);
|
|
1551
|
+
}return t ? [e.aliasable("container.strict"), "(", i, ", ", e.quotedString(r[n]), ")"] : i;
|
|
1552
|
+
}e.__esModule = !0;var s = r(exception),
|
|
1553
|
+
o = r(codeGen);i.prototype = { nameLookup: function nameLookup(t, e) {
|
|
1554
|
+
return i.isValidJavaScriptVariableName(e) ? [t, ".", e] : [t, "[", JSON.stringify(e), "]"];
|
|
1555
|
+
}, depthedLookup: function depthedLookup(t) {
|
|
1556
|
+
return [this.aliasable("container.lookup"), '(depths, "', t, '")'];
|
|
1557
|
+
}, compilerInfo: function compilerInfo() {
|
|
1558
|
+
var t = base.COMPILER_REVISION;return [t, base.REVISION_CHANGES[t]];
|
|
1559
|
+
}, appendToBuffer: function appendToBuffer(t, e, r) {
|
|
1560
|
+
return utils.isArray(t) || (t = [t]), t = this.source.wrap(t, e), this.environment.isSimple ? ["return ", t, ";"] : r ? ["buffer += ", t, ";"] : (t.appendToBuffer = !0, t);
|
|
1561
|
+
}, initializeBuffer: function initializeBuffer() {
|
|
1562
|
+
return this.quotedString("");
|
|
1563
|
+
}, compile: function compile(t, e, r, a) {
|
|
1564
|
+
this.environment = t, this.options = e, this.stringParams = this.options.stringParams, this.trackIds = this.options.trackIds, this.precompile = !a, this.name = this.environment.name, this.isChild = !!r, this.context = r || { decorators: [], programs: [], environments: [] }, this.preamble(), this.stackSlot = 0, this.stackVars = [], this.aliases = {}, this.registers = { list: [] }, this.hashes = [], this.compileStack = [], this.inlineStack = [], this.blockParams = [], this.compileChildren(t, e), this.useDepths = this.useDepths || t.useDepths || t.useDecorators || this.options.compat, this.useBlockParams = this.useBlockParams || t.useBlockParams;var i = t.opcodes,
|
|
1565
|
+
n = void 0,
|
|
1566
|
+
o = void 0,
|
|
1567
|
+
l = void 0,
|
|
1568
|
+
c = void 0;for (l = 0, c = i.length; l < c; l++) {
|
|
1569
|
+
n = i[l], this.source.currentLocation = n.loc, o = o || n.loc, this[n.opcode].apply(this, n.args);
|
|
1570
|
+
}if (this.source.currentLocation = o, this.pushSource(""), this.stackSlot || this.inlineStack.length || this.compileStack.length) throw new s.default("Compile completed with content left on stack");this.decorators.isEmpty() ? this.decorators = void 0 : (this.useDecorators = !0, this.decorators.prepend("var decorators = container.decorators;\n"), this.decorators.push("return fn;"), a ? this.decorators = Function.apply(this, ["fn", "props", "container", "depth0", "data", "blockParams", "depths", this.decorators.merge()]) : (this.decorators.prepend("function(fn, props, container, depth0, data, blockParams, depths) {\n"), this.decorators.push("}\n"), this.decorators = this.decorators.merge()));var u = this.createFunctionContext(a);if (this.isChild) return u;var p = { compiler: this.compilerInfo(), main: u };this.decorators && (p.main_d = this.decorators, p.useDecorators = !0);var h = this.context,
|
|
1571
|
+
d = h.programs,
|
|
1572
|
+
m = h.decorators;for (l = 0, c = d.length; l < c; l++) {
|
|
1573
|
+
d[l] && (p[l] = d[l], m[l] && (p[l + "_d"] = m[l], p.useDecorators = !0));
|
|
1574
|
+
}return this.environment.usePartial && (p.usePartial = !0), this.options.data && (p.useData = !0), this.useDepths && (p.useDepths = !0), this.useBlockParams && (p.useBlockParams = !0), this.options.compat && (p.compat = !0), a ? p.compilerOptions = this.options : (p.compiler = JSON.stringify(p.compiler), this.source.currentLocation = { start: { line: 1, column: 0 } }, p = this.objectLiteral(p), e.srcName ? (p = p.toStringWithSourceMap({ file: e.destName })).map = p.map && p.map.toString() : p = p.toString()), p;
|
|
1575
|
+
}, preamble: function preamble() {
|
|
1576
|
+
this.lastContext = 0, this.source = new o.default(this.options.srcName), this.decorators = new o.default(this.options.srcName);
|
|
1577
|
+
}, createFunctionContext: function createFunctionContext(t) {
|
|
1578
|
+
var e = "",
|
|
1579
|
+
r = this.stackVars.concat(this.registers.list);r.length > 0 && (e += ", " + r.join(", "));var a = 0;for (var i in this.aliases) {
|
|
1580
|
+
var n = this.aliases[i];this.aliases.hasOwnProperty(i) && n.children && n.referenceCount > 1 && (e += ", alias" + ++a + "=" + i, n.children[0] = "alias" + a);
|
|
1581
|
+
}var s = ["container", "depth0", "helpers", "partials", "data"];(this.useBlockParams || this.useDepths) && s.push("blockParams"), this.useDepths && s.push("depths");var o = this.mergeSource(e);return t ? (s.push(o), Function.apply(this, s)) : this.source.wrap(["function(", s.join(","), ") {\n ", o, "}"]);
|
|
1582
|
+
}, mergeSource: function mergeSource(t) {
|
|
1583
|
+
var e = this.environment.isSimple,
|
|
1584
|
+
r = !this.forceBuffer,
|
|
1585
|
+
a = void 0,
|
|
1586
|
+
i = void 0,
|
|
1587
|
+
n = void 0,
|
|
1588
|
+
s = void 0;return this.source.each(function (t) {
|
|
1589
|
+
t.appendToBuffer ? (n ? t.prepend(" + ") : n = t, s = t) : (n && (i ? n.prepend("buffer += ") : a = !0, s.add(";"), n = s = void 0), i = !0, e || (r = !1));
|
|
1590
|
+
}), r ? n ? (n.prepend("return "), s.add(";")) : i || this.source.push('return "";') : (t += ", buffer = " + (a ? "" : this.initializeBuffer()), n ? (n.prepend("return buffer + "), s.add(";")) : this.source.push("return buffer;")), t && this.source.prepend("var " + t.substring(2) + (a ? "" : ";\n")), this.source.merge();
|
|
1591
|
+
}, blockValue: function blockValue(t) {
|
|
1592
|
+
var e = this.aliasable("helpers.blockHelperMissing"),
|
|
1593
|
+
r = [this.contextName(0)];this.setupHelperArgs(t, 0, r);var a = this.popStack();r.splice(1, 0, a), this.push(this.source.functionCall(e, "call", r));
|
|
1594
|
+
}, ambiguousBlockValue: function ambiguousBlockValue() {
|
|
1595
|
+
var t = this.aliasable("helpers.blockHelperMissing"),
|
|
1596
|
+
e = [this.contextName(0)];this.setupHelperArgs("", 0, e, !0), this.flushInline();var r = this.topStack();e.splice(1, 0, r), this.pushSource(["if (!", this.lastHelper, ") { ", r, " = ", this.source.functionCall(t, "call", e), "}"]);
|
|
1597
|
+
}, appendContent: function appendContent(t) {
|
|
1598
|
+
this.pendingContent ? t = this.pendingContent + t : this.pendingLocation = this.source.currentLocation, this.pendingContent = t;
|
|
1599
|
+
}, append: function append() {
|
|
1600
|
+
if (this.isInline()) this.replaceStack(function (t) {
|
|
1601
|
+
return [" != null ? ", t, ' : ""'];
|
|
1602
|
+
}), this.pushSource(this.appendToBuffer(this.popStack()));else {
|
|
1603
|
+
var t = this.popStack();this.pushSource(["if (", t, " != null) { ", this.appendToBuffer(t, void 0, !0), " }"]), this.environment.isSimple && this.pushSource(["else { ", this.appendToBuffer("''", void 0, !0), " }"]);
|
|
1604
|
+
}
|
|
1605
|
+
}, appendEscaped: function appendEscaped() {
|
|
1606
|
+
this.pushSource(this.appendToBuffer([this.aliasable("container.escapeExpression"), "(", this.popStack(), ")"]));
|
|
1607
|
+
}, getContext: function getContext(t) {
|
|
1608
|
+
this.lastContext = t;
|
|
1609
|
+
}, pushContext: function pushContext() {
|
|
1610
|
+
this.pushStackLiteral(this.contextName(this.lastContext));
|
|
1611
|
+
}, lookupOnContext: function lookupOnContext(t, e, r, a) {
|
|
1612
|
+
var i = 0;a || !this.options.compat || this.lastContext ? this.pushContext() : this.push(this.depthedLookup(t[i++])), this.resolvePath("context", t, i, e, r);
|
|
1613
|
+
}, lookupBlockParam: function lookupBlockParam(t, e) {
|
|
1614
|
+
this.useBlockParams = !0, this.push(["blockParams[", t[0], "][", t[1], "]"]), this.resolvePath("context", e, 1);
|
|
1615
|
+
}, lookupData: function lookupData(t, e, r) {
|
|
1616
|
+
t ? this.pushStackLiteral("container.data(data, " + t + ")") : this.pushStackLiteral("data"), this.resolvePath("data", e, 0, !0, r);
|
|
1617
|
+
}, resolvePath: function resolvePath(t, e, r, a, i) {
|
|
1618
|
+
var s = this;if (this.options.strict || this.options.assumeObjects) this.push(n(this.options.strict && i, this, e, t));else for (var o = e.length; r < o; r++) {
|
|
1619
|
+
this.replaceStack(function (i) {
|
|
1620
|
+
var n = s.nameLookup(i, e[r], t);return a ? [" && ", n] : [" != null ? ", n, " : ", i];
|
|
1621
|
+
});
|
|
1622
|
+
}
|
|
1623
|
+
}, resolvePossibleLambda: function resolvePossibleLambda() {
|
|
1624
|
+
this.push([this.aliasable("container.lambda"), "(", this.popStack(), ", ", this.contextName(0), ")"]);
|
|
1625
|
+
}, pushStringParam: function pushStringParam(t, e) {
|
|
1626
|
+
this.pushContext(), this.pushString(e), "SubExpression" !== e && ("string" == typeof t ? this.pushString(t) : this.pushStackLiteral(t));
|
|
1627
|
+
}, emptyHash: function emptyHash(t) {
|
|
1628
|
+
this.trackIds && this.push("{}"), this.stringParams && (this.push("{}"), this.push("{}")), this.pushStackLiteral(t ? "undefined" : "{}");
|
|
1629
|
+
}, pushHash: function pushHash() {
|
|
1630
|
+
this.hash && this.hashes.push(this.hash), this.hash = { values: [], types: [], contexts: [], ids: [] };
|
|
1631
|
+
}, popHash: function popHash() {
|
|
1632
|
+
var t = this.hash;this.hash = this.hashes.pop(), this.trackIds && this.push(this.objectLiteral(t.ids)), this.stringParams && (this.push(this.objectLiteral(t.contexts)), this.push(this.objectLiteral(t.types))), this.push(this.objectLiteral(t.values));
|
|
1633
|
+
}, pushString: function pushString(t) {
|
|
1634
|
+
this.pushStackLiteral(this.quotedString(t));
|
|
1635
|
+
}, pushLiteral: function pushLiteral(t) {
|
|
1636
|
+
this.pushStackLiteral(t);
|
|
1637
|
+
}, pushProgram: function pushProgram(t) {
|
|
1638
|
+
null != t ? this.pushStackLiteral(this.programExpression(t)) : this.pushStackLiteral(null);
|
|
1639
|
+
}, registerDecorator: function registerDecorator(t, e) {
|
|
1640
|
+
var r = this.nameLookup("decorators", e, "decorator"),
|
|
1641
|
+
a = this.setupHelperArgs(e, t);this.decorators.push(["fn = ", this.decorators.functionCall(r, "", ["fn", "props", "container", a]), " || fn;"]);
|
|
1642
|
+
}, invokeHelper: function invokeHelper(t, e, r) {
|
|
1643
|
+
var a = this.popStack(),
|
|
1644
|
+
i = this.setupHelper(t, e),
|
|
1645
|
+
n = r ? [i.name, " || "] : "",
|
|
1646
|
+
s = ["("].concat(n, a);this.options.strict || s.push(" || ", this.aliasable("helpers.helperMissing")), s.push(")"), this.push(this.source.functionCall(s, "call", i.callParams));
|
|
1647
|
+
}, invokeKnownHelper: function invokeKnownHelper(t, e) {
|
|
1648
|
+
var r = this.setupHelper(t, e);this.push(this.source.functionCall(r.name, "call", r.callParams));
|
|
1649
|
+
}, invokeAmbiguous: function invokeAmbiguous(t, e) {
|
|
1650
|
+
this.useRegister("helper");var r = this.popStack();this.emptyHash();var a = this.setupHelper(0, t, e),
|
|
1651
|
+
i = ["(", "(helper = ", this.lastHelper = this.nameLookup("helpers", t, "helper"), " || ", r, ")"];this.options.strict || (i[0] = "(helper = ", i.push(" != null ? helper : ", this.aliasable("helpers.helperMissing"))), this.push(["(", i, a.paramsInit ? ["),(", a.paramsInit] : [], "),", "(typeof helper === ", this.aliasable('"function"'), " ? ", this.source.functionCall("helper", "call", a.callParams), " : helper))"]);
|
|
1652
|
+
}, invokePartial: function invokePartial(t, e, r) {
|
|
1653
|
+
var a = [],
|
|
1654
|
+
i = this.setupParams(e, 1, a);t && (e = this.popStack(), delete i.name), r && (i.indent = JSON.stringify(r)), i.helpers = "helpers", i.partials = "partials", i.decorators = "container.decorators", t ? a.unshift(e) : a.unshift(this.nameLookup("partials", e, "partial")), this.options.compat && (i.depths = "depths"), i = this.objectLiteral(i), a.push(i), this.push(this.source.functionCall("container.invokePartial", "", a));
|
|
1655
|
+
}, assignToHash: function assignToHash(t) {
|
|
1656
|
+
var e = this.popStack(),
|
|
1657
|
+
r = void 0,
|
|
1658
|
+
a = void 0,
|
|
1659
|
+
i = void 0;this.trackIds && (i = this.popStack()), this.stringParams && (a = this.popStack(), r = this.popStack());var n = this.hash;r && (n.contexts[t] = r), a && (n.types[t] = a), i && (n.ids[t] = i), n.values[t] = e;
|
|
1660
|
+
}, pushId: function pushId(t, e, r) {
|
|
1661
|
+
"BlockParam" === t ? this.pushStackLiteral("blockParams[" + e[0] + "].path[" + e[1] + "]" + (r ? " + " + JSON.stringify("." + r) : "")) : "PathExpression" === t ? this.pushString(e) : "SubExpression" === t ? this.pushStackLiteral("true") : this.pushStackLiteral("null");
|
|
1662
|
+
}, compiler: i, compileChildren: function compileChildren(t, e) {
|
|
1663
|
+
for (var r = t.children, a = void 0, i = void 0, n = 0, s = r.length; n < s; n++) {
|
|
1664
|
+
a = r[n], i = new this.compiler();var o = this.matchExistingProgram(a);if (null == o) {
|
|
1665
|
+
this.context.programs.push("");var l = this.context.programs.length;a.index = l, a.name = "program" + l, this.context.programs[l] = i.compile(a, e, this.context, !this.precompile), this.context.decorators[l] = i.decorators, this.context.environments[l] = a, this.useDepths = this.useDepths || i.useDepths, this.useBlockParams = this.useBlockParams || i.useBlockParams, a.useDepths = this.useDepths, a.useBlockParams = this.useBlockParams;
|
|
1666
|
+
} else a.index = o.index, a.name = "program" + o.index, this.useDepths = this.useDepths || o.useDepths, this.useBlockParams = this.useBlockParams || o.useBlockParams;
|
|
1667
|
+
}
|
|
1668
|
+
}, matchExistingProgram: function matchExistingProgram(t) {
|
|
1669
|
+
for (var e = 0, r = this.context.environments.length; e < r; e++) {
|
|
1670
|
+
var a = this.context.environments[e];if (a && a.equals(t)) return a;
|
|
1671
|
+
}
|
|
1672
|
+
}, programExpression: function programExpression(t) {
|
|
1673
|
+
var e = this.environment.children[t],
|
|
1674
|
+
r = [e.index, "data", e.blockParams];return (this.useBlockParams || this.useDepths) && r.push("blockParams"), this.useDepths && r.push("depths"), "container.program(" + r.join(", ") + ")";
|
|
1675
|
+
}, useRegister: function useRegister(t) {
|
|
1676
|
+
this.registers[t] || (this.registers[t] = !0, this.registers.list.push(t));
|
|
1677
|
+
}, push: function push(t) {
|
|
1678
|
+
return t instanceof a || (t = this.source.wrap(t)), this.inlineStack.push(t), t;
|
|
1679
|
+
}, pushStackLiteral: function pushStackLiteral(t) {
|
|
1680
|
+
this.push(new a(t));
|
|
1681
|
+
}, pushSource: function pushSource(t) {
|
|
1682
|
+
this.pendingContent && (this.source.push(this.appendToBuffer(this.source.quotedString(this.pendingContent), this.pendingLocation)), this.pendingContent = void 0), t && this.source.push(t);
|
|
1683
|
+
}, replaceStack: function replaceStack(t) {
|
|
1684
|
+
var e = ["("],
|
|
1685
|
+
r = void 0,
|
|
1686
|
+
i = void 0,
|
|
1687
|
+
n = void 0;if (!this.isInline()) throw new s.default("replaceStack on non-inline");var o = this.popStack(!0);if (o instanceof a) e = ["(", r = [o.value]], n = !0;else {
|
|
1688
|
+
i = !0;var l = this.incrStack();e = ["((", this.push(l), " = ", o, ")"], r = this.topStack();
|
|
1689
|
+
}var c = t.call(this, r);n || this.popStack(), i && this.stackSlot--, this.push(e.concat(c, ")"));
|
|
1690
|
+
}, incrStack: function incrStack() {
|
|
1691
|
+
return ++this.stackSlot > this.stackVars.length && this.stackVars.push("stack" + this.stackSlot), this.topStackName();
|
|
1692
|
+
}, topStackName: function topStackName() {
|
|
1693
|
+
return "stack" + this.stackSlot;
|
|
1694
|
+
}, flushInline: function flushInline() {
|
|
1695
|
+
var t = this.inlineStack;this.inlineStack = [];for (var e = 0, r = t.length; e < r; e++) {
|
|
1696
|
+
var i = t[e];if (i instanceof a) this.compileStack.push(i);else {
|
|
1697
|
+
var n = this.incrStack();this.pushSource([n, " = ", i, ";"]), this.compileStack.push(n);
|
|
1698
|
+
}
|
|
1699
|
+
}
|
|
1700
|
+
}, isInline: function isInline() {
|
|
1701
|
+
return this.inlineStack.length;
|
|
1702
|
+
}, popStack: function popStack(t) {
|
|
1703
|
+
var e = this.isInline(),
|
|
1704
|
+
r = (e ? this.inlineStack : this.compileStack).pop();if (!t && r instanceof a) return r.value;if (!e) {
|
|
1705
|
+
if (!this.stackSlot) throw new s.default("Invalid stack pop");this.stackSlot--;
|
|
1706
|
+
}return r;
|
|
1707
|
+
}, topStack: function topStack() {
|
|
1708
|
+
var t = this.isInline() ? this.inlineStack : this.compileStack,
|
|
1709
|
+
e = t[t.length - 1];return e instanceof a ? e.value : e;
|
|
1710
|
+
}, contextName: function contextName(t) {
|
|
1711
|
+
return this.useDepths && t ? "depths[" + t + "]" : "depth" + t;
|
|
1712
|
+
}, quotedString: function quotedString(t) {
|
|
1713
|
+
return this.source.quotedString(t);
|
|
1714
|
+
}, objectLiteral: function objectLiteral(t) {
|
|
1715
|
+
return this.source.objectLiteral(t);
|
|
1716
|
+
}, aliasable: function aliasable(t) {
|
|
1717
|
+
var e = this.aliases[t];return e ? (e.referenceCount++, e) : (e = this.aliases[t] = this.source.wrap(t), e.aliasable = !0, e.referenceCount = 1, e);
|
|
1718
|
+
}, setupHelper: function setupHelper(t, e, r) {
|
|
1719
|
+
var a = [];return { params: a, paramsInit: this.setupHelperArgs(e, t, a, r), name: this.nameLookup("helpers", e, "helper"), callParams: [this.aliasable(this.contextName(0) + " != null ? " + this.contextName(0) + " : (container.nullContext || {})")].concat(a) };
|
|
1720
|
+
}, setupParams: function setupParams(t, e, r) {
|
|
1721
|
+
var a = {},
|
|
1722
|
+
i = [],
|
|
1723
|
+
n = [],
|
|
1724
|
+
s = [],
|
|
1725
|
+
o = !r,
|
|
1726
|
+
l = void 0;o && (r = []), a.name = this.quotedString(t), a.hash = this.popStack(), this.trackIds && (a.hashIds = this.popStack()), this.stringParams && (a.hashTypes = this.popStack(), a.hashContexts = this.popStack());var c = this.popStack(),
|
|
1727
|
+
u = this.popStack();(u || c) && (a.fn = u || "container.noop", a.inverse = c || "container.noop");for (var p = e; p--;) {
|
|
1728
|
+
l = this.popStack(), r[p] = l, this.trackIds && (s[p] = this.popStack()), this.stringParams && (n[p] = this.popStack(), i[p] = this.popStack());
|
|
1729
|
+
}return o && (a.args = this.source.generateArray(r)), this.trackIds && (a.ids = this.source.generateArray(s)), this.stringParams && (a.types = this.source.generateArray(n), a.contexts = this.source.generateArray(i)), this.options.data && (a.data = "data"), this.useBlockParams && (a.blockParams = "blockParams"), a;
|
|
1730
|
+
}, setupHelperArgs: function setupHelperArgs(t, e, r, a) {
|
|
1731
|
+
var i = this.setupParams(t, e, r);return i = this.objectLiteral(i), a ? (this.useRegister("options"), r.push("options"), ["options=", i]) : r ? (r.push(i), "") : i;
|
|
1732
|
+
} }, function () {
|
|
1733
|
+
for (var t = "break else new var case finally return void catch for switch while continue function this with default if throw delete in try do instanceof typeof abstract enum int short boolean export interface static byte extends long super char final native synchronized class float package throws const goto private transient debugger implements protected volatile double import public let yield await null true false".split(" "), e = i.RESERVED_WORDS = {}, r = 0, a = t.length; r < a; r++) {
|
|
1734
|
+
e[t[r]] = !0;
|
|
1735
|
+
}
|
|
1736
|
+
}(), i.isValidJavaScriptVariableName = function (t) {
|
|
1737
|
+
return !i.RESERVED_WORDS[t] && /^[a-zA-Z_$][0-9a-zA-Z_$]*$/.test(t);
|
|
1738
|
+
}, e.default = i, t.exports = e.default;
|
|
1739
|
+
});unwrapExports(javascriptCompiler);var handlebars$1 = createCommonjsModule(function (t, e) {
|
|
1740
|
+
function r(t) {
|
|
1741
|
+
return t && t.__esModule ? t : { default: t };
|
|
1742
|
+
}function a() {
|
|
1743
|
+
var t = c();return t.compile = function (e, r) {
|
|
1744
|
+
return compiler.compile(e, r, t);
|
|
1745
|
+
}, t.precompile = function (e, r) {
|
|
1746
|
+
return compiler.precompile(e, r, t);
|
|
1747
|
+
}, t.AST = n.default, t.Compiler = compiler.Compiler, t.JavaScriptCompiler = s.default, t.Parser = base$2.parser, t.parse = base$2.parse, t;
|
|
1748
|
+
}e.__esModule = !0;var i = r(handlebars_runtime),
|
|
1749
|
+
n = r(ast),
|
|
1750
|
+
s = r(javascriptCompiler),
|
|
1751
|
+
o = r(visitor),
|
|
1752
|
+
l = r(noConflict),
|
|
1753
|
+
c = i.default.create,
|
|
1754
|
+
u = a();u.create = a, l.default(u), u.Visitor = o.default, u.default = u, e.default = u, t.exports = e.default;
|
|
1755
|
+
});unwrapExports(handlebars$1);var printer = createCommonjsModule(function (t, e) {
|
|
1756
|
+
function r() {
|
|
1757
|
+
this.padding = 0;
|
|
1758
|
+
}e.__esModule = !0, e.print = function (t) {
|
|
1759
|
+
return new r().accept(t);
|
|
1760
|
+
}, e.PrintVisitor = r;var a = function (t) {
|
|
1761
|
+
return t && t.__esModule ? t : { default: t };
|
|
1762
|
+
}(visitor);(r.prototype = new a.default()).pad = function (t) {
|
|
1763
|
+
for (var e = "", r = 0, a = this.padding; r < a; r++) {
|
|
1764
|
+
e += " ";
|
|
1765
|
+
}return e += t + "\n";
|
|
1766
|
+
}, r.prototype.Program = function (t) {
|
|
1767
|
+
var e = "",
|
|
1768
|
+
r = t.body,
|
|
1769
|
+
a = void 0,
|
|
1770
|
+
i = void 0;if (t.blockParams) {
|
|
1771
|
+
var n = "BLOCK PARAMS: [";for (a = 0, i = t.blockParams.length; a < i; a++) {
|
|
1772
|
+
n += " " + t.blockParams[a];
|
|
1773
|
+
}n += " ]", e += this.pad(n);
|
|
1774
|
+
}for (a = 0, i = r.length; a < i; a++) {
|
|
1775
|
+
e += this.accept(r[a]);
|
|
1776
|
+
}return this.padding--, e;
|
|
1777
|
+
}, r.prototype.MustacheStatement = function (t) {
|
|
1778
|
+
return this.pad("{{ " + this.SubExpression(t) + " }}");
|
|
1779
|
+
}, r.prototype.Decorator = function (t) {
|
|
1780
|
+
return this.pad("{{ DIRECTIVE " + this.SubExpression(t) + " }}");
|
|
1781
|
+
}, r.prototype.BlockStatement = r.prototype.DecoratorBlock = function (t) {
|
|
1782
|
+
var e = "";return e += this.pad(("DecoratorBlock" === t.type ? "DIRECTIVE " : "") + "BLOCK:"), this.padding++, e += this.pad(this.SubExpression(t)), t.program && (e += this.pad("PROGRAM:"), this.padding++, e += this.accept(t.program), this.padding--), t.inverse && (t.program && this.padding++, e += this.pad("{{^}}"), this.padding++, e += this.accept(t.inverse), this.padding--, t.program && this.padding--), this.padding--, e;
|
|
1783
|
+
}, r.prototype.PartialStatement = function (t) {
|
|
1784
|
+
var e = "PARTIAL:" + t.name.original;return t.params[0] && (e += " " + this.accept(t.params[0])), t.hash && (e += " " + this.accept(t.hash)), this.pad("{{> " + e + " }}");
|
|
1785
|
+
}, r.prototype.PartialBlockStatement = function (t) {
|
|
1786
|
+
var e = "PARTIAL BLOCK:" + t.name.original;return t.params[0] && (e += " " + this.accept(t.params[0])), t.hash && (e += " " + this.accept(t.hash)), e += " " + this.pad("PROGRAM:"), this.padding++, e += this.accept(t.program), this.padding--, this.pad("{{> " + e + " }}");
|
|
1787
|
+
}, r.prototype.ContentStatement = function (t) {
|
|
1788
|
+
return this.pad("CONTENT[ '" + t.value + "' ]");
|
|
1789
|
+
}, r.prototype.CommentStatement = function (t) {
|
|
1790
|
+
return this.pad("{{! '" + t.value + "' }}");
|
|
1791
|
+
}, r.prototype.SubExpression = function (t) {
|
|
1792
|
+
for (var e = t.params, r = [], a = void 0, i = 0, n = e.length; i < n; i++) {
|
|
1793
|
+
r.push(this.accept(e[i]));
|
|
1794
|
+
}return e = "[" + r.join(", ") + "]", a = t.hash ? " " + this.accept(t.hash) : "", this.accept(t.path) + " " + e + a;
|
|
1795
|
+
}, r.prototype.PathExpression = function (t) {
|
|
1796
|
+
var e = t.parts.join("/");return (t.data ? "@" : "") + "PATH:" + e;
|
|
1797
|
+
}, r.prototype.StringLiteral = function (t) {
|
|
1798
|
+
return '"' + t.value + '"';
|
|
1799
|
+
}, r.prototype.NumberLiteral = function (t) {
|
|
1800
|
+
return "NUMBER{" + t.value + "}";
|
|
1801
|
+
}, r.prototype.BooleanLiteral = function (t) {
|
|
1802
|
+
return "BOOLEAN{" + t.value + "}";
|
|
1803
|
+
}, r.prototype.UndefinedLiteral = function () {
|
|
1804
|
+
return "UNDEFINED";
|
|
1805
|
+
}, r.prototype.NullLiteral = function () {
|
|
1806
|
+
return "NULL";
|
|
1807
|
+
}, r.prototype.Hash = function (t) {
|
|
1808
|
+
for (var e = t.pairs, r = [], a = 0, i = e.length; a < i; a++) {
|
|
1809
|
+
r.push(this.accept(e[a]));
|
|
1810
|
+
}return "HASH{" + r.join(", ") + "}";
|
|
1811
|
+
}, r.prototype.HashPair = function (t) {
|
|
1812
|
+
return t.key + "=" + this.accept(t.value);
|
|
1813
|
+
};
|
|
1814
|
+
});unwrapExports(printer);var handlebars = handlebars$1.default;handlebars.PrintVisitor = printer.PrintVisitor, handlebars.print = printer.print;var lib = handlebars;"undefined" != typeof require && require.extensions && (require.extensions[".handlebars"] = extension, require.extensions[".hbs"] = extension);var lib_1 = lib.parse;var voidMap = Object.create(null);var voidTagNames = "area base br col command embed hr img input keygen link meta param source track wbr";voidTagNames.split(" ").forEach(function (t) {
|
|
1815
|
+
voidMap[t] = !0;
|
|
1816
|
+
});
|
|
1817
|
+
var TokenizerEventHandlers = function (_HandlebarsNodeVisito) {
|
|
1818
|
+
_inherits(TokenizerEventHandlers, _HandlebarsNodeVisito);
|
|
1819
|
+
|
|
1820
|
+
function TokenizerEventHandlers() {
|
|
1821
|
+
var _this2;
|
|
1822
|
+
|
|
1823
|
+
_classCallCheck(this, TokenizerEventHandlers);
|
|
1824
|
+
|
|
1825
|
+
(_this2 = _possibleConstructorReturn(this, (TokenizerEventHandlers.__proto__ || Object.getPrototypeOf(TokenizerEventHandlers)).apply(this, arguments)), _this2), _this2.tagOpenLine = 0, _this2.tagOpenColumn = 0;return _this2;
|
|
1826
|
+
}
|
|
1827
|
+
|
|
1828
|
+
_createClass(TokenizerEventHandlers, [{
|
|
1829
|
+
key: "reset",
|
|
1830
|
+
value: function reset() {
|
|
1831
|
+
this.currentNode = null;
|
|
1832
|
+
}
|
|
1833
|
+
}, {
|
|
1834
|
+
key: "beginComment",
|
|
1835
|
+
value: function beginComment() {
|
|
1836
|
+
this.currentNode = b.comment(""), this.currentNode.loc = { source: null, start: b.pos(this.tagOpenLine, this.tagOpenColumn), end: null };
|
|
1837
|
+
}
|
|
1838
|
+
}, {
|
|
1839
|
+
key: "appendToCommentData",
|
|
1840
|
+
value: function appendToCommentData(t) {
|
|
1841
|
+
this.currentComment.value += t;
|
|
1842
|
+
}
|
|
1843
|
+
}, {
|
|
1844
|
+
key: "finishComment",
|
|
1845
|
+
value: function finishComment() {
|
|
1846
|
+
this.currentComment.loc.end = b.pos(this.tokenizer.line, this.tokenizer.column), appendChild(this.currentElement(), this.currentComment);
|
|
1847
|
+
}
|
|
1848
|
+
}, {
|
|
1849
|
+
key: "beginData",
|
|
1850
|
+
value: function beginData() {
|
|
1851
|
+
this.currentNode = b.text(), this.currentNode.loc = { source: null, start: b.pos(this.tokenizer.line, this.tokenizer.column), end: null };
|
|
1852
|
+
}
|
|
1853
|
+
}, {
|
|
1854
|
+
key: "appendToData",
|
|
1855
|
+
value: function appendToData(t) {
|
|
1856
|
+
this.currentData.chars += t;
|
|
1857
|
+
}
|
|
1858
|
+
}, {
|
|
1859
|
+
key: "finishData",
|
|
1860
|
+
value: function finishData() {
|
|
1861
|
+
this.currentData.loc.end = b.pos(this.tokenizer.line, this.tokenizer.column), appendChild(this.currentElement(), this.currentData);
|
|
1862
|
+
}
|
|
1863
|
+
}, {
|
|
1864
|
+
key: "tagOpen",
|
|
1865
|
+
value: function tagOpen() {
|
|
1866
|
+
this.tagOpenLine = this.tokenizer.line, this.tagOpenColumn = this.tokenizer.column;
|
|
1867
|
+
}
|
|
1868
|
+
}, {
|
|
1869
|
+
key: "beginStartTag",
|
|
1870
|
+
value: function beginStartTag() {
|
|
1871
|
+
this.currentNode = { type: "StartTag", name: "", attributes: [], modifiers: [], comments: [], selfClosing: !1, loc: SYNTHETIC };
|
|
1872
|
+
}
|
|
1873
|
+
}, {
|
|
1874
|
+
key: "beginEndTag",
|
|
1875
|
+
value: function beginEndTag() {
|
|
1876
|
+
this.currentNode = { type: "EndTag", name: "", attributes: [], modifiers: [], comments: [], selfClosing: !1, loc: SYNTHETIC };
|
|
1877
|
+
}
|
|
1878
|
+
}, {
|
|
1879
|
+
key: "finishTag",
|
|
1880
|
+
value: function finishTag() {
|
|
1881
|
+
var _tokenizer = this.tokenizer,
|
|
1882
|
+
t = _tokenizer.line,
|
|
1883
|
+
e = _tokenizer.column,
|
|
1884
|
+
r = this.currentTag;
|
|
1885
|
+
r.loc = b.loc(this.tagOpenLine, this.tagOpenColumn, t, e), "StartTag" === r.type ? (this.finishStartTag(), (voidMap[r.name] || r.selfClosing) && this.finishEndTag(!0)) : "EndTag" === r.type && this.finishEndTag(!1);
|
|
1886
|
+
}
|
|
1887
|
+
}, {
|
|
1888
|
+
key: "finishStartTag",
|
|
1889
|
+
value: function finishStartTag() {
|
|
1890
|
+
var _currentStartTag = this.currentStartTag,
|
|
1891
|
+
t = _currentStartTag.name,
|
|
1892
|
+
e = _currentStartTag.attributes,
|
|
1893
|
+
r = _currentStartTag.modifiers,
|
|
1894
|
+
a = _currentStartTag.comments,
|
|
1895
|
+
i = b.loc(this.tagOpenLine, this.tagOpenColumn),
|
|
1896
|
+
n = b.element(t, e, r, [], a, i);
|
|
1897
|
+
this.elementStack.push(n);
|
|
1898
|
+
}
|
|
1899
|
+
}, {
|
|
1900
|
+
key: "finishEndTag",
|
|
1901
|
+
value: function finishEndTag(t) {
|
|
1902
|
+
var e = this.currentTag,
|
|
1903
|
+
r = this.elementStack.pop(),
|
|
1904
|
+
a = this.currentElement();validateEndTag(e, r, t), r.loc.end.line = this.tokenizer.line, r.loc.end.column = this.tokenizer.column, parseElementBlockParams(r), appendChild(a, r);
|
|
1905
|
+
}
|
|
1906
|
+
}, {
|
|
1907
|
+
key: "markTagAsSelfClosing",
|
|
1908
|
+
value: function markTagAsSelfClosing() {
|
|
1909
|
+
this.currentTag.selfClosing = !0;
|
|
1910
|
+
}
|
|
1911
|
+
}, {
|
|
1912
|
+
key: "appendToTagName",
|
|
1913
|
+
value: function appendToTagName(t) {
|
|
1914
|
+
this.currentTag.name += t;
|
|
1915
|
+
}
|
|
1916
|
+
}, {
|
|
1917
|
+
key: "beginAttribute",
|
|
1918
|
+
value: function beginAttribute() {
|
|
1919
|
+
var t = this.currentTag;if ("EndTag" === t.type) throw new SyntaxError$1("Invalid end tag: closing tag must not have attributes, " + ("in `" + t.name + "` (on line " + this.tokenizer.line + ")."), t.loc);this.currentAttribute = { name: "", parts: [], isQuoted: !1, isDynamic: !1, start: b.pos(this.tokenizer.line, this.tokenizer.column), valueStartLine: 0, valueStartColumn: 0 };
|
|
1920
|
+
}
|
|
1921
|
+
}, {
|
|
1922
|
+
key: "appendToAttributeName",
|
|
1923
|
+
value: function appendToAttributeName(t) {
|
|
1924
|
+
this.currentAttr.name += t;
|
|
1925
|
+
}
|
|
1926
|
+
}, {
|
|
1927
|
+
key: "beginAttributeValue",
|
|
1928
|
+
value: function beginAttributeValue(t) {
|
|
1929
|
+
this.currentAttr.isQuoted = t, this.currentAttr.valueStartLine = this.tokenizer.line, this.currentAttr.valueStartColumn = this.tokenizer.column;
|
|
1930
|
+
}
|
|
1931
|
+
}, {
|
|
1932
|
+
key: "appendToAttributeValue",
|
|
1933
|
+
value: function appendToAttributeValue(t) {
|
|
1934
|
+
var e = this.currentAttr.parts,
|
|
1935
|
+
r = e[e.length - 1];if (r && "TextNode" === r.type) r.chars += t, r.loc.end.line = this.tokenizer.line, r.loc.end.column = this.tokenizer.column;else {
|
|
1936
|
+
var a = b.loc(this.tokenizer.line, this.tokenizer.column, this.tokenizer.line, this.tokenizer.column);"\n" === t && (a.start.line -= 1, a.start.column = r ? r.loc.end.column : this.currentAttr.valueStartColumn);var i = b.text(t, a);e.push(i);
|
|
1937
|
+
}
|
|
1938
|
+
}
|
|
1939
|
+
}, {
|
|
1940
|
+
key: "finishAttributeValue",
|
|
1941
|
+
value: function finishAttributeValue() {
|
|
1942
|
+
var _currentAttr = this.currentAttr,
|
|
1943
|
+
t = _currentAttr.name,
|
|
1944
|
+
e = _currentAttr.parts,
|
|
1945
|
+
r = _currentAttr.isQuoted,
|
|
1946
|
+
a = _currentAttr.isDynamic,
|
|
1947
|
+
i = _currentAttr.valueStartLine,
|
|
1948
|
+
n = _currentAttr.valueStartColumn,
|
|
1949
|
+
s = assembleAttributeValue(e, r, a, this.tokenizer.line);
|
|
1950
|
+
s.loc = b.loc(i, n, this.tokenizer.line, this.tokenizer.column);var o = b.loc(this.currentAttr.start.line, this.currentAttr.start.column, this.tokenizer.line, this.tokenizer.column),
|
|
1951
|
+
l = b.attr(t, s, o);this.currentStartTag.attributes.push(l);
|
|
1952
|
+
}
|
|
1953
|
+
}, {
|
|
1954
|
+
key: "reportSyntaxError",
|
|
1955
|
+
value: function reportSyntaxError(t) {
|
|
1956
|
+
throw new SyntaxError$1("Syntax error at line " + this.tokenizer.line + " col " + this.tokenizer.column + ": " + t, b.loc(this.tokenizer.line, this.tokenizer.column));
|
|
1957
|
+
}
|
|
1958
|
+
}]);
|
|
1959
|
+
|
|
1960
|
+
return TokenizerEventHandlers;
|
|
1961
|
+
}(HandlebarsNodeVisitors);
|
|
1962
|
+
|
|
1963
|
+
var syntax = { parse: preprocess, builders: b, print: build, traverse: traverse, Walker: Walker };var es2017 = Object.freeze({ AST: nodes, preprocess: preprocess, builders: b, TraversalError: TraversalError, cannotRemoveNode: cannotRemoveNode, cannotReplaceNode: cannotReplaceNode, cannotReplaceOrRemoveInKeyHandlerYet: cannotReplaceOrRemoveInKeyHandlerYet, traverse: traverse, Walker: Walker, print: build, SyntaxError: SyntaxError$1, isLiteral: isLiteral$1, printLiteral: printLiteral }),
|
|
1964
|
+
parserGlimmer = parse;module.exports = parserGlimmer;
|