@superblocksteam/library-shared 1.99.99-next.2 → 2.0.0-SNAPSHOT.04704c19f32b3902

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (179) hide show
  1. package/dist/computed.d.ts +4 -2
  2. package/dist/computed.d.ts.map +1 -1
  3. package/dist/computed.js +1 -1
  4. package/dist/computed.js.map +1 -1
  5. package/dist/default-structure.d.ts +12 -0
  6. package/dist/default-structure.d.ts.map +1 -0
  7. package/dist/default-structure.js +36 -0
  8. package/dist/default-structure.js.map +1 -0
  9. package/dist/event-trigger-constants.d.ts +2 -0
  10. package/dist/event-trigger-constants.d.ts.map +1 -0
  11. package/dist/event-trigger-constants.js +2 -0
  12. package/dist/event-trigger-constants.js.map +1 -0
  13. package/dist/index.d.ts +18 -8
  14. package/dist/index.d.ts.map +1 -1
  15. package/dist/index.js +17 -8
  16. package/dist/index.js.map +1 -1
  17. package/dist/layout.d.ts +12 -1
  18. package/dist/layout.d.ts.map +1 -1
  19. package/dist/layout.js +11 -4
  20. package/dist/layout.js.map +1 -1
  21. package/dist/mobx-sync/apply-patch.d.ts.map +1 -1
  22. package/dist/mobx-sync/apply-patch.js +23 -4
  23. package/dist/mobx-sync/apply-patch.js.map +1 -1
  24. package/dist/mobx-sync/to-patch.d.ts.map +1 -1
  25. package/dist/mobx-sync/to-patch.js.map +1 -1
  26. package/dist/pages.d.ts +76 -6
  27. package/dist/pages.d.ts.map +1 -1
  28. package/dist/pages.js +54 -2
  29. package/dist/pages.js.map +1 -1
  30. package/dist/pegs/find-string-interpolation.d.ts +12 -0
  31. package/dist/pegs/find-string-interpolation.d.ts.map +1 -0
  32. package/dist/pegs/find-string-interpolation.js +1265 -0
  33. package/dist/pegs/find-string-interpolation.js.map +1 -0
  34. package/dist/props/helpers.d.ts +1 -1
  35. package/dist/props/helpers.d.ts.map +1 -1
  36. package/dist/props/helpers.js +13 -5
  37. package/dist/props/helpers.js.map +1 -1
  38. package/dist/props/prop-types.d.ts +24 -13
  39. package/dist/props/prop-types.d.ts.map +1 -1
  40. package/dist/props/prop-types.js.map +1 -1
  41. package/dist/props/properties-panel.d.ts +61 -26
  42. package/dist/props/properties-panel.d.ts.map +1 -1
  43. package/dist/props/properties-panel.js +2 -5
  44. package/dist/props/properties-panel.js.map +1 -1
  45. package/dist/props/tailwind-property-keys.d.ts +5 -0
  46. package/dist/props/tailwind-property-keys.d.ts.map +1 -0
  47. package/dist/props/tailwind-property-keys.js +234 -0
  48. package/dist/props/tailwind-property-keys.js.map +1 -0
  49. package/dist/restart-contract.d.ts +35 -0
  50. package/dist/restart-contract.d.ts.map +1 -0
  51. package/dist/restart-contract.js +49 -0
  52. package/dist/restart-contract.js.map +1 -0
  53. package/dist/scope.d.ts +2 -0
  54. package/dist/scope.d.ts.map +1 -1
  55. package/dist/scope.js +3 -0
  56. package/dist/scope.js.map +1 -1
  57. package/dist/types/ai.d.ts +1721 -0
  58. package/dist/types/ai.d.ts.map +1 -0
  59. package/dist/types/ai.js +432 -0
  60. package/dist/types/ai.js.map +1 -0
  61. package/dist/types/apis.d.ts +44 -1
  62. package/dist/types/apis.d.ts.map +1 -1
  63. package/dist/types/base-entity-manager.d.ts +15 -0
  64. package/dist/types/base-entity-manager.d.ts.map +1 -0
  65. package/dist/types/base-entity-manager.js +2 -0
  66. package/dist/types/base-entity-manager.js.map +1 -0
  67. package/dist/types/binding-identifiers.d.ts +13 -0
  68. package/dist/types/binding-identifiers.d.ts.map +1 -0
  69. package/dist/types/binding-identifiers.js +6 -0
  70. package/dist/types/binding-identifiers.js.map +1 -0
  71. package/dist/types/common.d.ts +2 -1
  72. package/dist/types/common.d.ts.map +1 -1
  73. package/dist/types/edit-operations.d.ts +26 -23
  74. package/dist/types/edit-operations.d.ts.map +1 -1
  75. package/dist/types/edit-operations.js +2 -0
  76. package/dist/types/edit-operations.js.map +1 -1
  77. package/dist/types/entities.d.ts +10 -29
  78. package/dist/types/entities.d.ts.map +1 -1
  79. package/dist/types/entities.js +0 -5
  80. package/dist/types/entities.js.map +1 -1
  81. package/dist/types/errors.d.ts +82 -1
  82. package/dist/types/errors.d.ts.map +1 -1
  83. package/dist/types/errors.js +15 -1
  84. package/dist/types/errors.js.map +1 -1
  85. package/dist/types/events.d.ts +219 -26
  86. package/dist/types/events.d.ts.map +1 -1
  87. package/dist/types/events.js +33 -5
  88. package/dist/types/events.js.map +1 -1
  89. package/dist/types/index.d.ts +19 -6
  90. package/dist/types/index.d.ts.map +1 -1
  91. package/dist/types/index.js +19 -6
  92. package/dist/types/index.js.map +1 -1
  93. package/dist/types/migration.d.ts +240 -0
  94. package/dist/types/migration.d.ts.map +1 -0
  95. package/dist/types/migration.js +50 -0
  96. package/dist/types/migration.js.map +1 -0
  97. package/dist/types/mobx-shared-state.d.ts +27 -1
  98. package/dist/types/mobx-shared-state.d.ts.map +1 -1
  99. package/dist/types/parent-messages.d.ts +16 -7
  100. package/dist/types/parent-messages.d.ts.map +1 -1
  101. package/dist/types/persisted-chat-message.d.ts +55 -0
  102. package/dist/types/persisted-chat-message.d.ts.map +1 -0
  103. package/dist/types/persisted-chat-message.js +752 -0
  104. package/dist/types/persisted-chat-message.js.map +1 -0
  105. package/dist/types/protected-packages.d.ts +54 -0
  106. package/dist/types/protected-packages.d.ts.map +1 -0
  107. package/dist/types/protected-packages.js +91 -0
  108. package/dist/types/protected-packages.js.map +1 -0
  109. package/dist/types/register-component.d.ts +128 -0
  110. package/dist/types/register-component.d.ts.map +1 -0
  111. package/dist/types/register-component.js +45 -0
  112. package/dist/types/register-component.js.map +1 -0
  113. package/dist/types/routing.d.ts +68 -0
  114. package/dist/types/routing.d.ts.map +1 -0
  115. package/dist/types/routing.js +2 -0
  116. package/dist/types/routing.js.map +1 -0
  117. package/dist/types/runtime-sync.d.ts +32 -0
  118. package/dist/types/runtime-sync.d.ts.map +1 -0
  119. package/dist/types/runtime-sync.js +2 -0
  120. package/dist/types/runtime-sync.js.map +1 -0
  121. package/dist/types/scope.d.ts +8 -6
  122. package/dist/types/scope.d.ts.map +1 -1
  123. package/dist/types/snapshot.d.ts +53 -0
  124. package/dist/types/snapshot.d.ts.map +1 -0
  125. package/dist/types/snapshot.js +2 -0
  126. package/dist/types/snapshot.js.map +1 -0
  127. package/dist/types/socket.d.ts +668 -48
  128. package/dist/types/socket.d.ts.map +1 -1
  129. package/dist/types/theme.d.ts +8 -7
  130. package/dist/types/theme.d.ts.map +1 -1
  131. package/dist/types/theme.js +5 -6
  132. package/dist/types/theme.js.map +1 -1
  133. package/dist/types/tool-permission-response.d.ts +5 -0
  134. package/dist/types/tool-permission-response.d.ts.map +1 -0
  135. package/dist/types/tool-permission-response.js +26 -0
  136. package/dist/types/tool-permission-response.js.map +1 -0
  137. package/dist/types/vite.d.ts +29 -0
  138. package/dist/types/vite.d.ts.map +1 -0
  139. package/dist/types/vite.js +6 -0
  140. package/dist/types/vite.js.map +1 -0
  141. package/dist/urls.d.ts +7 -0
  142. package/dist/urls.d.ts.map +1 -0
  143. package/dist/urls.js +6 -0
  144. package/dist/urls.js.map +1 -0
  145. package/dist/utils/binding-identifier.d.ts +5 -0
  146. package/dist/utils/binding-identifier.d.ts.map +1 -0
  147. package/dist/utils/binding-identifier.js +14 -0
  148. package/dist/utils/binding-identifier.js.map +1 -0
  149. package/dist/utils/blocks.d.ts +3 -0
  150. package/dist/utils/blocks.d.ts.map +1 -0
  151. package/dist/utils/blocks.js +70 -0
  152. package/dist/utils/blocks.js.map +1 -0
  153. package/dist/utils/computed-args.d.ts +11 -0
  154. package/dist/utils/computed-args.d.ts.map +1 -0
  155. package/dist/utils/computed-args.js +13 -0
  156. package/dist/utils/computed-args.js.map +1 -0
  157. package/dist/utils/dev-server-authorization.d.ts +4 -0
  158. package/dist/utils/dev-server-authorization.d.ts.map +1 -0
  159. package/dist/utils/dev-server-authorization.js +56 -0
  160. package/dist/utils/dev-server-authorization.js.map +1 -0
  161. package/dist/utils/dotted-paths.js +1 -1
  162. package/dist/utils/dotted-paths.js.map +1 -1
  163. package/dist/utils/properties.d.ts +12 -9
  164. package/dist/utils/properties.d.ts.map +1 -1
  165. package/dist/utils/properties.js +14 -6
  166. package/dist/utils/properties.js.map +1 -1
  167. package/dist/utils/routing.d.ts +5 -0
  168. package/dist/utils/routing.d.ts.map +1 -0
  169. package/dist/utils/routing.js +16 -0
  170. package/dist/utils/routing.js.map +1 -0
  171. package/dist/utils/strings.d.ts +12 -0
  172. package/dist/utils/strings.d.ts.map +1 -1
  173. package/dist/utils/strings.js +40 -1
  174. package/dist/utils/strings.js.map +1 -1
  175. package/package.json +41 -25
  176. package/dist/apis.d.ts +0 -2
  177. package/dist/apis.d.ts.map +0 -1
  178. package/dist/apis.js +0 -4
  179. package/dist/apis.js.map +0 -1
@@ -0,0 +1,1265 @@
1
+ // @generated by Peggy 5.0.6.
2
+ //
3
+ // https://peggyjs.org/
4
+ class peg$SyntaxError extends SyntaxError {
5
+ constructor(message, expected, found, location) {
6
+ super(message);
7
+ this.expected = expected;
8
+ this.found = found;
9
+ this.location = location;
10
+ this.name = "SyntaxError";
11
+ }
12
+ format(sources) {
13
+ let str = "Error: " + this.message;
14
+ if (this.location) {
15
+ let src = null;
16
+ const st = sources.find(s => s.source === this.location.source);
17
+ if (st) {
18
+ src = st.text.split(/\r\n|\n|\r/g);
19
+ }
20
+ const s = this.location.start;
21
+ const offset_s = (this.location.source && (typeof this.location.source.offset === "function"))
22
+ ? this.location.source.offset(s)
23
+ : s;
24
+ const loc = this.location.source + ":" + offset_s.line + ":" + offset_s.column;
25
+ if (src) {
26
+ const e = this.location.end;
27
+ const filler = "".padEnd(offset_s.line.toString().length, " ");
28
+ const line = src[s.line - 1];
29
+ const last = s.line === e.line ? e.column : line.length + 1;
30
+ const hatLen = (last - s.column) || 1;
31
+ str += "\n --> " + loc + "\n"
32
+ + filler + " |\n"
33
+ + offset_s.line + " | " + line + "\n"
34
+ + filler + " | " + "".padEnd(s.column - 1, " ")
35
+ + "".padEnd(hatLen, "^");
36
+ }
37
+ else {
38
+ str += "\n at " + loc;
39
+ }
40
+ }
41
+ return str;
42
+ }
43
+ static buildMessage(expected, found) {
44
+ function hex(ch) {
45
+ return ch.codePointAt(0).toString(16).toUpperCase();
46
+ }
47
+ const nonPrintable = Object.prototype.hasOwnProperty.call(RegExp.prototype, "unicode")
48
+ ? new RegExp("[\\p{C}\\p{Mn}\\p{Mc}]", "gu")
49
+ : null;
50
+ function unicodeEscape(s) {
51
+ if (nonPrintable) {
52
+ return s.replace(nonPrintable, ch => "\\u{" + hex(ch) + "}");
53
+ }
54
+ return s;
55
+ }
56
+ function literalEscape(s) {
57
+ return unicodeEscape(s
58
+ .replace(/\\/g, "\\\\")
59
+ .replace(/"/g, "\\\"")
60
+ .replace(/\0/g, "\\0")
61
+ .replace(/\t/g, "\\t")
62
+ .replace(/\n/g, "\\n")
63
+ .replace(/\r/g, "\\r")
64
+ .replace(/[\x00-\x0F]/g, ch => "\\x0" + hex(ch))
65
+ .replace(/[\x10-\x1F\x7F-\x9F]/g, ch => "\\x" + hex(ch)));
66
+ }
67
+ function classEscape(s) {
68
+ return unicodeEscape(s
69
+ .replace(/\\/g, "\\\\")
70
+ .replace(/\]/g, "\\]")
71
+ .replace(/\^/g, "\\^")
72
+ .replace(/-/g, "\\-")
73
+ .replace(/\0/g, "\\0")
74
+ .replace(/\t/g, "\\t")
75
+ .replace(/\n/g, "\\n")
76
+ .replace(/\r/g, "\\r")
77
+ .replace(/[\x00-\x0F]/g, ch => "\\x0" + hex(ch))
78
+ .replace(/[\x10-\x1F\x7F-\x9F]/g, ch => "\\x" + hex(ch)));
79
+ }
80
+ const DESCRIBE_EXPECTATION_FNS = {
81
+ literal(expectation) {
82
+ return "\"" + literalEscape(expectation.text) + "\"";
83
+ },
84
+ class(expectation) {
85
+ const escapedParts = expectation.parts.map(part => (Array.isArray(part)
86
+ ? classEscape(part[0]) + "-" + classEscape(part[1])
87
+ : classEscape(part)));
88
+ return "[" + (expectation.inverted ? "^" : "") + escapedParts.join("") + "]" + (expectation.unicode ? "u" : "");
89
+ },
90
+ any() {
91
+ return "any character";
92
+ },
93
+ end() {
94
+ return "end of input";
95
+ },
96
+ other(expectation) {
97
+ return expectation.description;
98
+ },
99
+ };
100
+ function describeExpectation(expectation) {
101
+ return DESCRIBE_EXPECTATION_FNS[expectation.type](expectation);
102
+ }
103
+ function describeExpected(expected) {
104
+ const descriptions = expected.map(describeExpectation);
105
+ descriptions.sort();
106
+ if (descriptions.length > 0) {
107
+ let j = 1;
108
+ for (let i = 1; i < descriptions.length; i++) {
109
+ if (descriptions[i - 1] !== descriptions[i]) {
110
+ descriptions[j] = descriptions[i];
111
+ j++;
112
+ }
113
+ }
114
+ descriptions.length = j;
115
+ }
116
+ switch (descriptions.length) {
117
+ case 1:
118
+ return descriptions[0];
119
+ case 2:
120
+ return descriptions[0] + " or " + descriptions[1];
121
+ default:
122
+ return descriptions.slice(0, -1).join(", ")
123
+ + ", or "
124
+ + descriptions[descriptions.length - 1];
125
+ }
126
+ }
127
+ function describeFound(found) {
128
+ return found ? "\"" + literalEscape(found) + "\"" : "end of input";
129
+ }
130
+ return "Expected " + describeExpected(expected) + " but " + describeFound(found) + " found.";
131
+ }
132
+ }
133
+ function peg$parse(input, options) {
134
+ options = options !== undefined ? options : {};
135
+ const peg$FAILED = {};
136
+ const peg$source = options.grammarSource;
137
+ const peg$startRuleFunctions = {
138
+ start: peg$parsestart,
139
+ };
140
+ let peg$startRuleFunction = peg$parsestart;
141
+ const peg$c0 = "\"";
142
+ const peg$c1 = "'";
143
+ const peg$c2 = "\\";
144
+ const peg$c3 = "`";
145
+ const peg$c4 = "${";
146
+ const peg$c5 = "}";
147
+ const peg$r0 = /^["]/;
148
+ const peg$r1 = /^[']/;
149
+ const peg$r2 = /^[`]/;
150
+ const peg$e0 = peg$literalExpectation("\"", false);
151
+ const peg$e1 = peg$classExpectation(["\""], false, false, false);
152
+ const peg$e2 = peg$anyExpectation();
153
+ const peg$e3 = peg$literalExpectation("'", false);
154
+ const peg$e4 = peg$classExpectation(["'"], false, false, false);
155
+ const peg$e5 = peg$literalExpectation("\\", false);
156
+ const peg$e6 = peg$literalExpectation("`", false);
157
+ const peg$e7 = peg$classExpectation(["`"], false, false, false);
158
+ const peg$e8 = peg$literalExpectation("${", false);
159
+ const peg$e9 = peg$literalExpectation("}", false);
160
+ function peg$f0() {
161
+ const fullText = text();
162
+ const r = range();
163
+ return {
164
+ type: "text",
165
+ value: fullText,
166
+ range: {
167
+ start: r.start,
168
+ end: r.end
169
+ }
170
+ };
171
+ }
172
+ function peg$f1(content) {
173
+ const fullText = "`" + content + "`";
174
+ const r = range();
175
+ return {
176
+ type: "wrapped-template",
177
+ value: fullText,
178
+ range: {
179
+ start: r.start,
180
+ end: r.end
181
+ }
182
+ };
183
+ }
184
+ function peg$f2(body) {
185
+ const r = range();
186
+ return {
187
+ type: "bare-template",
188
+ value: "${" + body.content + "}",
189
+ range: {
190
+ start: r.start,
191
+ end: r.end
192
+ }
193
+ };
194
+ }
195
+ function peg$f3(content) {
196
+ return {
197
+ content: content
198
+ };
199
+ }
200
+ function peg$f4() {
201
+ const r = range();
202
+ return {
203
+ type: "text",
204
+ value: text(),
205
+ range: {
206
+ start: r.start,
207
+ end: r.end
208
+ }
209
+ };
210
+ }
211
+ let peg$currPos = options.peg$currPos | 0;
212
+ let peg$savedPos = peg$currPos;
213
+ const peg$posDetailsCache = [{ line: 1, column: 1 }];
214
+ let peg$maxFailPos = peg$currPos;
215
+ let peg$maxFailExpected = options.peg$maxFailExpected || [];
216
+ let peg$silentFails = options.peg$silentFails | 0;
217
+ let peg$result;
218
+ if (options.startRule) {
219
+ if (!(options.startRule in peg$startRuleFunctions)) {
220
+ throw new Error("Can't start parsing from rule \"" + options.startRule + "\".");
221
+ }
222
+ peg$startRuleFunction = peg$startRuleFunctions[options.startRule];
223
+ }
224
+ function text() {
225
+ return input.substring(peg$savedPos, peg$currPos);
226
+ }
227
+ function offset() {
228
+ return peg$savedPos;
229
+ }
230
+ function range() {
231
+ return {
232
+ source: peg$source,
233
+ start: peg$savedPos,
234
+ end: peg$currPos,
235
+ };
236
+ }
237
+ function location() {
238
+ return peg$computeLocation(peg$savedPos, peg$currPos);
239
+ }
240
+ function expected(description, location) {
241
+ location = location !== undefined
242
+ ? location
243
+ : peg$computeLocation(peg$savedPos, peg$currPos);
244
+ throw peg$buildStructuredError([peg$otherExpectation(description)], input.substring(peg$savedPos, peg$currPos), location);
245
+ }
246
+ function error(message, location) {
247
+ location = location !== undefined
248
+ ? location
249
+ : peg$computeLocation(peg$savedPos, peg$currPos);
250
+ throw peg$buildSimpleError(message, location);
251
+ }
252
+ function peg$getUnicode(pos = peg$currPos) {
253
+ const cp = input.codePointAt(pos);
254
+ if (cp === undefined) {
255
+ return "";
256
+ }
257
+ return String.fromCodePoint(cp);
258
+ }
259
+ function peg$literalExpectation(text, ignoreCase) {
260
+ return { type: "literal", text, ignoreCase };
261
+ }
262
+ function peg$classExpectation(parts, inverted, ignoreCase, unicode) {
263
+ return { type: "class", parts, inverted, ignoreCase, unicode };
264
+ }
265
+ function peg$anyExpectation() {
266
+ return { type: "any" };
267
+ }
268
+ function peg$endExpectation() {
269
+ return { type: "end" };
270
+ }
271
+ function peg$otherExpectation(description) {
272
+ return { type: "other", description };
273
+ }
274
+ function peg$computePosDetails(pos) {
275
+ let details = peg$posDetailsCache[pos];
276
+ let p;
277
+ if (details) {
278
+ return details;
279
+ }
280
+ else {
281
+ if (pos >= peg$posDetailsCache.length) {
282
+ p = peg$posDetailsCache.length - 1;
283
+ }
284
+ else {
285
+ p = pos;
286
+ while (!peg$posDetailsCache[--p]) { }
287
+ }
288
+ details = peg$posDetailsCache[p];
289
+ details = {
290
+ line: details.line,
291
+ column: details.column,
292
+ };
293
+ while (p < pos) {
294
+ if (input.charCodeAt(p) === 10) {
295
+ details.line++;
296
+ details.column = 1;
297
+ }
298
+ else {
299
+ details.column++;
300
+ }
301
+ p++;
302
+ }
303
+ peg$posDetailsCache[pos] = details;
304
+ return details;
305
+ }
306
+ }
307
+ function peg$computeLocation(startPos, endPos, offset) {
308
+ const startPosDetails = peg$computePosDetails(startPos);
309
+ const endPosDetails = peg$computePosDetails(endPos);
310
+ const res = {
311
+ source: peg$source,
312
+ start: {
313
+ offset: startPos,
314
+ line: startPosDetails.line,
315
+ column: startPosDetails.column,
316
+ },
317
+ end: {
318
+ offset: endPos,
319
+ line: endPosDetails.line,
320
+ column: endPosDetails.column,
321
+ },
322
+ };
323
+ if (offset && peg$source && (typeof peg$source.offset === "function")) {
324
+ res.start = peg$source.offset(res.start);
325
+ res.end = peg$source.offset(res.end);
326
+ }
327
+ return res;
328
+ }
329
+ function peg$fail(expected) {
330
+ if (peg$currPos < peg$maxFailPos) {
331
+ return;
332
+ }
333
+ if (peg$currPos > peg$maxFailPos) {
334
+ peg$maxFailPos = peg$currPos;
335
+ peg$maxFailExpected = [];
336
+ }
337
+ peg$maxFailExpected.push(expected);
338
+ }
339
+ function peg$buildSimpleError(message, location) {
340
+ return new peg$SyntaxError(message, null, null, location);
341
+ }
342
+ function peg$buildStructuredError(expected, found, location) {
343
+ return new peg$SyntaxError(peg$SyntaxError.buildMessage(expected, found), expected, found, location);
344
+ }
345
+ function peg$parsestart() {
346
+ let s0, s1;
347
+ s0 = [];
348
+ s1 = peg$parsequoted_string();
349
+ if (s1 === peg$FAILED) {
350
+ s1 = peg$parsewrapped_template();
351
+ if (s1 === peg$FAILED) {
352
+ s1 = peg$parsebare_template();
353
+ if (s1 === peg$FAILED) {
354
+ s1 = peg$parsetext();
355
+ }
356
+ }
357
+ }
358
+ while (s1 !== peg$FAILED) {
359
+ s0.push(s1);
360
+ s1 = peg$parsequoted_string();
361
+ if (s1 === peg$FAILED) {
362
+ s1 = peg$parsewrapped_template();
363
+ if (s1 === peg$FAILED) {
364
+ s1 = peg$parsebare_template();
365
+ if (s1 === peg$FAILED) {
366
+ s1 = peg$parsetext();
367
+ }
368
+ }
369
+ }
370
+ }
371
+ return s0;
372
+ }
373
+ function peg$parsequoted_string() {
374
+ let s0, s1, s2, s3, s4, s5, s6, s7;
375
+ s0 = peg$currPos;
376
+ s1 = peg$currPos;
377
+ if (input.charCodeAt(peg$currPos) === 34) {
378
+ s2 = peg$c0;
379
+ peg$currPos++;
380
+ }
381
+ else {
382
+ s2 = peg$FAILED;
383
+ if (peg$silentFails === 0) {
384
+ peg$fail(peg$e0);
385
+ }
386
+ }
387
+ if (s2 !== peg$FAILED) {
388
+ s3 = peg$currPos;
389
+ s4 = [];
390
+ s5 = peg$parseescaped_char();
391
+ if (s5 === peg$FAILED) {
392
+ s5 = peg$currPos;
393
+ s6 = peg$currPos;
394
+ peg$silentFails++;
395
+ s7 = input.charAt(peg$currPos);
396
+ if (peg$r0.test(s7)) {
397
+ peg$currPos++;
398
+ }
399
+ else {
400
+ s7 = peg$FAILED;
401
+ if (peg$silentFails === 0) {
402
+ peg$fail(peg$e1);
403
+ }
404
+ }
405
+ peg$silentFails--;
406
+ if (s7 === peg$FAILED) {
407
+ s6 = undefined;
408
+ }
409
+ else {
410
+ peg$currPos = s6;
411
+ s6 = peg$FAILED;
412
+ }
413
+ if (s6 !== peg$FAILED) {
414
+ if (input.length > peg$currPos) {
415
+ s7 = input.charAt(peg$currPos);
416
+ peg$currPos++;
417
+ }
418
+ else {
419
+ s7 = peg$FAILED;
420
+ if (peg$silentFails === 0) {
421
+ peg$fail(peg$e2);
422
+ }
423
+ }
424
+ if (s7 !== peg$FAILED) {
425
+ s6 = [s6, s7];
426
+ s5 = s6;
427
+ }
428
+ else {
429
+ peg$currPos = s5;
430
+ s5 = peg$FAILED;
431
+ }
432
+ }
433
+ else {
434
+ peg$currPos = s5;
435
+ s5 = peg$FAILED;
436
+ }
437
+ }
438
+ while (s5 !== peg$FAILED) {
439
+ s4.push(s5);
440
+ s5 = peg$parseescaped_char();
441
+ if (s5 === peg$FAILED) {
442
+ s5 = peg$currPos;
443
+ s6 = peg$currPos;
444
+ peg$silentFails++;
445
+ s7 = input.charAt(peg$currPos);
446
+ if (peg$r0.test(s7)) {
447
+ peg$currPos++;
448
+ }
449
+ else {
450
+ s7 = peg$FAILED;
451
+ if (peg$silentFails === 0) {
452
+ peg$fail(peg$e1);
453
+ }
454
+ }
455
+ peg$silentFails--;
456
+ if (s7 === peg$FAILED) {
457
+ s6 = undefined;
458
+ }
459
+ else {
460
+ peg$currPos = s6;
461
+ s6 = peg$FAILED;
462
+ }
463
+ if (s6 !== peg$FAILED) {
464
+ if (input.length > peg$currPos) {
465
+ s7 = input.charAt(peg$currPos);
466
+ peg$currPos++;
467
+ }
468
+ else {
469
+ s7 = peg$FAILED;
470
+ if (peg$silentFails === 0) {
471
+ peg$fail(peg$e2);
472
+ }
473
+ }
474
+ if (s7 !== peg$FAILED) {
475
+ s6 = [s6, s7];
476
+ s5 = s6;
477
+ }
478
+ else {
479
+ peg$currPos = s5;
480
+ s5 = peg$FAILED;
481
+ }
482
+ }
483
+ else {
484
+ peg$currPos = s5;
485
+ s5 = peg$FAILED;
486
+ }
487
+ }
488
+ }
489
+ s3 = input.substring(s3, peg$currPos);
490
+ if (input.charCodeAt(peg$currPos) === 34) {
491
+ s4 = peg$c0;
492
+ peg$currPos++;
493
+ }
494
+ else {
495
+ s4 = peg$FAILED;
496
+ if (peg$silentFails === 0) {
497
+ peg$fail(peg$e0);
498
+ }
499
+ }
500
+ if (s4 !== peg$FAILED) {
501
+ s2 = [s2, s3, s4];
502
+ s1 = s2;
503
+ }
504
+ else {
505
+ peg$currPos = s1;
506
+ s1 = peg$FAILED;
507
+ }
508
+ }
509
+ else {
510
+ peg$currPos = s1;
511
+ s1 = peg$FAILED;
512
+ }
513
+ if (s1 === peg$FAILED) {
514
+ s1 = peg$currPos;
515
+ if (input.charCodeAt(peg$currPos) === 39) {
516
+ s2 = peg$c1;
517
+ peg$currPos++;
518
+ }
519
+ else {
520
+ s2 = peg$FAILED;
521
+ if (peg$silentFails === 0) {
522
+ peg$fail(peg$e3);
523
+ }
524
+ }
525
+ if (s2 !== peg$FAILED) {
526
+ s3 = peg$currPos;
527
+ s4 = [];
528
+ s5 = peg$parseescaped_char();
529
+ if (s5 === peg$FAILED) {
530
+ s5 = peg$currPos;
531
+ s6 = peg$currPos;
532
+ peg$silentFails++;
533
+ s7 = input.charAt(peg$currPos);
534
+ if (peg$r1.test(s7)) {
535
+ peg$currPos++;
536
+ }
537
+ else {
538
+ s7 = peg$FAILED;
539
+ if (peg$silentFails === 0) {
540
+ peg$fail(peg$e4);
541
+ }
542
+ }
543
+ peg$silentFails--;
544
+ if (s7 === peg$FAILED) {
545
+ s6 = undefined;
546
+ }
547
+ else {
548
+ peg$currPos = s6;
549
+ s6 = peg$FAILED;
550
+ }
551
+ if (s6 !== peg$FAILED) {
552
+ if (input.length > peg$currPos) {
553
+ s7 = input.charAt(peg$currPos);
554
+ peg$currPos++;
555
+ }
556
+ else {
557
+ s7 = peg$FAILED;
558
+ if (peg$silentFails === 0) {
559
+ peg$fail(peg$e2);
560
+ }
561
+ }
562
+ if (s7 !== peg$FAILED) {
563
+ s6 = [s6, s7];
564
+ s5 = s6;
565
+ }
566
+ else {
567
+ peg$currPos = s5;
568
+ s5 = peg$FAILED;
569
+ }
570
+ }
571
+ else {
572
+ peg$currPos = s5;
573
+ s5 = peg$FAILED;
574
+ }
575
+ }
576
+ while (s5 !== peg$FAILED) {
577
+ s4.push(s5);
578
+ s5 = peg$parseescaped_char();
579
+ if (s5 === peg$FAILED) {
580
+ s5 = peg$currPos;
581
+ s6 = peg$currPos;
582
+ peg$silentFails++;
583
+ s7 = input.charAt(peg$currPos);
584
+ if (peg$r1.test(s7)) {
585
+ peg$currPos++;
586
+ }
587
+ else {
588
+ s7 = peg$FAILED;
589
+ if (peg$silentFails === 0) {
590
+ peg$fail(peg$e4);
591
+ }
592
+ }
593
+ peg$silentFails--;
594
+ if (s7 === peg$FAILED) {
595
+ s6 = undefined;
596
+ }
597
+ else {
598
+ peg$currPos = s6;
599
+ s6 = peg$FAILED;
600
+ }
601
+ if (s6 !== peg$FAILED) {
602
+ if (input.length > peg$currPos) {
603
+ s7 = input.charAt(peg$currPos);
604
+ peg$currPos++;
605
+ }
606
+ else {
607
+ s7 = peg$FAILED;
608
+ if (peg$silentFails === 0) {
609
+ peg$fail(peg$e2);
610
+ }
611
+ }
612
+ if (s7 !== peg$FAILED) {
613
+ s6 = [s6, s7];
614
+ s5 = s6;
615
+ }
616
+ else {
617
+ peg$currPos = s5;
618
+ s5 = peg$FAILED;
619
+ }
620
+ }
621
+ else {
622
+ peg$currPos = s5;
623
+ s5 = peg$FAILED;
624
+ }
625
+ }
626
+ }
627
+ s3 = input.substring(s3, peg$currPos);
628
+ if (input.charCodeAt(peg$currPos) === 39) {
629
+ s4 = peg$c1;
630
+ peg$currPos++;
631
+ }
632
+ else {
633
+ s4 = peg$FAILED;
634
+ if (peg$silentFails === 0) {
635
+ peg$fail(peg$e3);
636
+ }
637
+ }
638
+ if (s4 !== peg$FAILED) {
639
+ s2 = [s2, s3, s4];
640
+ s1 = s2;
641
+ }
642
+ else {
643
+ peg$currPos = s1;
644
+ s1 = peg$FAILED;
645
+ }
646
+ }
647
+ else {
648
+ peg$currPos = s1;
649
+ s1 = peg$FAILED;
650
+ }
651
+ }
652
+ if (s1 !== peg$FAILED) {
653
+ peg$savedPos = s0;
654
+ s1 = peg$f0();
655
+ }
656
+ s0 = s1;
657
+ return s0;
658
+ }
659
+ function peg$parseescaped_char() {
660
+ let s0, s1, s2;
661
+ s0 = peg$currPos;
662
+ if (input.charCodeAt(peg$currPos) === 92) {
663
+ s1 = peg$c2;
664
+ peg$currPos++;
665
+ }
666
+ else {
667
+ s1 = peg$FAILED;
668
+ if (peg$silentFails === 0) {
669
+ peg$fail(peg$e5);
670
+ }
671
+ }
672
+ if (s1 !== peg$FAILED) {
673
+ if (input.length > peg$currPos) {
674
+ s2 = input.charAt(peg$currPos);
675
+ peg$currPos++;
676
+ }
677
+ else {
678
+ s2 = peg$FAILED;
679
+ if (peg$silentFails === 0) {
680
+ peg$fail(peg$e2);
681
+ }
682
+ }
683
+ if (s2 !== peg$FAILED) {
684
+ s1 = [s1, s2];
685
+ s0 = s1;
686
+ }
687
+ else {
688
+ peg$currPos = s0;
689
+ s0 = peg$FAILED;
690
+ }
691
+ }
692
+ else {
693
+ peg$currPos = s0;
694
+ s0 = peg$FAILED;
695
+ }
696
+ return s0;
697
+ }
698
+ function peg$parsewrapped_template() {
699
+ let s0, s1, s2, s3, s4, s5, s6;
700
+ s0 = peg$currPos;
701
+ if (input.charCodeAt(peg$currPos) === 96) {
702
+ s1 = peg$c3;
703
+ peg$currPos++;
704
+ }
705
+ else {
706
+ s1 = peg$FAILED;
707
+ if (peg$silentFails === 0) {
708
+ peg$fail(peg$e6);
709
+ }
710
+ }
711
+ if (s1 !== peg$FAILED) {
712
+ s2 = peg$currPos;
713
+ s3 = [];
714
+ s4 = peg$currPos;
715
+ s5 = peg$currPos;
716
+ peg$silentFails++;
717
+ s6 = input.charAt(peg$currPos);
718
+ if (peg$r2.test(s6)) {
719
+ peg$currPos++;
720
+ }
721
+ else {
722
+ s6 = peg$FAILED;
723
+ if (peg$silentFails === 0) {
724
+ peg$fail(peg$e7);
725
+ }
726
+ }
727
+ peg$silentFails--;
728
+ if (s6 === peg$FAILED) {
729
+ s5 = undefined;
730
+ }
731
+ else {
732
+ peg$currPos = s5;
733
+ s5 = peg$FAILED;
734
+ }
735
+ if (s5 !== peg$FAILED) {
736
+ if (input.length > peg$currPos) {
737
+ s6 = input.charAt(peg$currPos);
738
+ peg$currPos++;
739
+ }
740
+ else {
741
+ s6 = peg$FAILED;
742
+ if (peg$silentFails === 0) {
743
+ peg$fail(peg$e2);
744
+ }
745
+ }
746
+ if (s6 !== peg$FAILED) {
747
+ s5 = [s5, s6];
748
+ s4 = s5;
749
+ }
750
+ else {
751
+ peg$currPos = s4;
752
+ s4 = peg$FAILED;
753
+ }
754
+ }
755
+ else {
756
+ peg$currPos = s4;
757
+ s4 = peg$FAILED;
758
+ }
759
+ while (s4 !== peg$FAILED) {
760
+ s3.push(s4);
761
+ s4 = peg$currPos;
762
+ s5 = peg$currPos;
763
+ peg$silentFails++;
764
+ s6 = input.charAt(peg$currPos);
765
+ if (peg$r2.test(s6)) {
766
+ peg$currPos++;
767
+ }
768
+ else {
769
+ s6 = peg$FAILED;
770
+ if (peg$silentFails === 0) {
771
+ peg$fail(peg$e7);
772
+ }
773
+ }
774
+ peg$silentFails--;
775
+ if (s6 === peg$FAILED) {
776
+ s5 = undefined;
777
+ }
778
+ else {
779
+ peg$currPos = s5;
780
+ s5 = peg$FAILED;
781
+ }
782
+ if (s5 !== peg$FAILED) {
783
+ if (input.length > peg$currPos) {
784
+ s6 = input.charAt(peg$currPos);
785
+ peg$currPos++;
786
+ }
787
+ else {
788
+ s6 = peg$FAILED;
789
+ if (peg$silentFails === 0) {
790
+ peg$fail(peg$e2);
791
+ }
792
+ }
793
+ if (s6 !== peg$FAILED) {
794
+ s5 = [s5, s6];
795
+ s4 = s5;
796
+ }
797
+ else {
798
+ peg$currPos = s4;
799
+ s4 = peg$FAILED;
800
+ }
801
+ }
802
+ else {
803
+ peg$currPos = s4;
804
+ s4 = peg$FAILED;
805
+ }
806
+ }
807
+ s2 = input.substring(s2, peg$currPos);
808
+ if (input.charCodeAt(peg$currPos) === 96) {
809
+ s3 = peg$c3;
810
+ peg$currPos++;
811
+ }
812
+ else {
813
+ s3 = peg$FAILED;
814
+ if (peg$silentFails === 0) {
815
+ peg$fail(peg$e6);
816
+ }
817
+ }
818
+ if (s3 !== peg$FAILED) {
819
+ peg$savedPos = s0;
820
+ s0 = peg$f1(s2);
821
+ }
822
+ else {
823
+ peg$currPos = s0;
824
+ s0 = peg$FAILED;
825
+ }
826
+ }
827
+ else {
828
+ peg$currPos = s0;
829
+ s0 = peg$FAILED;
830
+ }
831
+ return s0;
832
+ }
833
+ function peg$parsebare_template() {
834
+ let s0, s1;
835
+ s0 = peg$currPos;
836
+ s1 = peg$parsetemplate_body();
837
+ if (s1 !== peg$FAILED) {
838
+ peg$savedPos = s0;
839
+ s1 = peg$f2(s1);
840
+ }
841
+ s0 = s1;
842
+ return s0;
843
+ }
844
+ function peg$parsetemplate_body() {
845
+ let s0, s1, s2, s3, s4, s5, s6;
846
+ s0 = peg$currPos;
847
+ if (input.substr(peg$currPos, 2) === peg$c4) {
848
+ s1 = peg$c4;
849
+ peg$currPos += 2;
850
+ }
851
+ else {
852
+ s1 = peg$FAILED;
853
+ if (peg$silentFails === 0) {
854
+ peg$fail(peg$e8);
855
+ }
856
+ }
857
+ if (s1 !== peg$FAILED) {
858
+ s2 = peg$currPos;
859
+ s3 = [];
860
+ s4 = peg$currPos;
861
+ s5 = peg$currPos;
862
+ peg$silentFails++;
863
+ if (input.charCodeAt(peg$currPos) === 125) {
864
+ s6 = peg$c5;
865
+ peg$currPos++;
866
+ }
867
+ else {
868
+ s6 = peg$FAILED;
869
+ if (peg$silentFails === 0) {
870
+ peg$fail(peg$e9);
871
+ }
872
+ }
873
+ peg$silentFails--;
874
+ if (s6 === peg$FAILED) {
875
+ s5 = undefined;
876
+ }
877
+ else {
878
+ peg$currPos = s5;
879
+ s5 = peg$FAILED;
880
+ }
881
+ if (s5 !== peg$FAILED) {
882
+ if (input.length > peg$currPos) {
883
+ s6 = input.charAt(peg$currPos);
884
+ peg$currPos++;
885
+ }
886
+ else {
887
+ s6 = peg$FAILED;
888
+ if (peg$silentFails === 0) {
889
+ peg$fail(peg$e2);
890
+ }
891
+ }
892
+ if (s6 !== peg$FAILED) {
893
+ s5 = [s5, s6];
894
+ s4 = s5;
895
+ }
896
+ else {
897
+ peg$currPos = s4;
898
+ s4 = peg$FAILED;
899
+ }
900
+ }
901
+ else {
902
+ peg$currPos = s4;
903
+ s4 = peg$FAILED;
904
+ }
905
+ while (s4 !== peg$FAILED) {
906
+ s3.push(s4);
907
+ s4 = peg$currPos;
908
+ s5 = peg$currPos;
909
+ peg$silentFails++;
910
+ if (input.charCodeAt(peg$currPos) === 125) {
911
+ s6 = peg$c5;
912
+ peg$currPos++;
913
+ }
914
+ else {
915
+ s6 = peg$FAILED;
916
+ if (peg$silentFails === 0) {
917
+ peg$fail(peg$e9);
918
+ }
919
+ }
920
+ peg$silentFails--;
921
+ if (s6 === peg$FAILED) {
922
+ s5 = undefined;
923
+ }
924
+ else {
925
+ peg$currPos = s5;
926
+ s5 = peg$FAILED;
927
+ }
928
+ if (s5 !== peg$FAILED) {
929
+ if (input.length > peg$currPos) {
930
+ s6 = input.charAt(peg$currPos);
931
+ peg$currPos++;
932
+ }
933
+ else {
934
+ s6 = peg$FAILED;
935
+ if (peg$silentFails === 0) {
936
+ peg$fail(peg$e2);
937
+ }
938
+ }
939
+ if (s6 !== peg$FAILED) {
940
+ s5 = [s5, s6];
941
+ s4 = s5;
942
+ }
943
+ else {
944
+ peg$currPos = s4;
945
+ s4 = peg$FAILED;
946
+ }
947
+ }
948
+ else {
949
+ peg$currPos = s4;
950
+ s4 = peg$FAILED;
951
+ }
952
+ }
953
+ s2 = input.substring(s2, peg$currPos);
954
+ if (input.charCodeAt(peg$currPos) === 125) {
955
+ s3 = peg$c5;
956
+ peg$currPos++;
957
+ }
958
+ else {
959
+ s3 = peg$FAILED;
960
+ if (peg$silentFails === 0) {
961
+ peg$fail(peg$e9);
962
+ }
963
+ }
964
+ if (s3 !== peg$FAILED) {
965
+ peg$savedPos = s0;
966
+ s0 = peg$f3(s2);
967
+ }
968
+ else {
969
+ peg$currPos = s0;
970
+ s0 = peg$FAILED;
971
+ }
972
+ }
973
+ else {
974
+ peg$currPos = s0;
975
+ s0 = peg$FAILED;
976
+ }
977
+ return s0;
978
+ }
979
+ function peg$parsetext() {
980
+ let s0, s1, s2, s3, s4, s5, s6, s7, s8;
981
+ s0 = peg$currPos;
982
+ s1 = peg$currPos;
983
+ s2 = [];
984
+ s3 = peg$currPos;
985
+ s4 = peg$currPos;
986
+ peg$silentFails++;
987
+ if (input.charCodeAt(peg$currPos) === 34) {
988
+ s5 = peg$c0;
989
+ peg$currPos++;
990
+ }
991
+ else {
992
+ s5 = peg$FAILED;
993
+ if (peg$silentFails === 0) {
994
+ peg$fail(peg$e0);
995
+ }
996
+ }
997
+ peg$silentFails--;
998
+ if (s5 === peg$FAILED) {
999
+ s4 = undefined;
1000
+ }
1001
+ else {
1002
+ peg$currPos = s4;
1003
+ s4 = peg$FAILED;
1004
+ }
1005
+ if (s4 !== peg$FAILED) {
1006
+ s5 = peg$currPos;
1007
+ peg$silentFails++;
1008
+ if (input.charCodeAt(peg$currPos) === 39) {
1009
+ s6 = peg$c1;
1010
+ peg$currPos++;
1011
+ }
1012
+ else {
1013
+ s6 = peg$FAILED;
1014
+ if (peg$silentFails === 0) {
1015
+ peg$fail(peg$e3);
1016
+ }
1017
+ }
1018
+ peg$silentFails--;
1019
+ if (s6 === peg$FAILED) {
1020
+ s5 = undefined;
1021
+ }
1022
+ else {
1023
+ peg$currPos = s5;
1024
+ s5 = peg$FAILED;
1025
+ }
1026
+ if (s5 !== peg$FAILED) {
1027
+ s6 = peg$currPos;
1028
+ peg$silentFails++;
1029
+ if (input.charCodeAt(peg$currPos) === 96) {
1030
+ s7 = peg$c3;
1031
+ peg$currPos++;
1032
+ }
1033
+ else {
1034
+ s7 = peg$FAILED;
1035
+ if (peg$silentFails === 0) {
1036
+ peg$fail(peg$e6);
1037
+ }
1038
+ }
1039
+ peg$silentFails--;
1040
+ if (s7 === peg$FAILED) {
1041
+ s6 = undefined;
1042
+ }
1043
+ else {
1044
+ peg$currPos = s6;
1045
+ s6 = peg$FAILED;
1046
+ }
1047
+ if (s6 !== peg$FAILED) {
1048
+ s7 = peg$currPos;
1049
+ peg$silentFails++;
1050
+ s8 = peg$parsetemplate_body();
1051
+ peg$silentFails--;
1052
+ if (s8 === peg$FAILED) {
1053
+ s7 = undefined;
1054
+ }
1055
+ else {
1056
+ peg$currPos = s7;
1057
+ s7 = peg$FAILED;
1058
+ }
1059
+ if (s7 !== peg$FAILED) {
1060
+ if (input.length > peg$currPos) {
1061
+ s8 = input.charAt(peg$currPos);
1062
+ peg$currPos++;
1063
+ }
1064
+ else {
1065
+ s8 = peg$FAILED;
1066
+ if (peg$silentFails === 0) {
1067
+ peg$fail(peg$e2);
1068
+ }
1069
+ }
1070
+ if (s8 !== peg$FAILED) {
1071
+ s4 = [s4, s5, s6, s7, s8];
1072
+ s3 = s4;
1073
+ }
1074
+ else {
1075
+ peg$currPos = s3;
1076
+ s3 = peg$FAILED;
1077
+ }
1078
+ }
1079
+ else {
1080
+ peg$currPos = s3;
1081
+ s3 = peg$FAILED;
1082
+ }
1083
+ }
1084
+ else {
1085
+ peg$currPos = s3;
1086
+ s3 = peg$FAILED;
1087
+ }
1088
+ }
1089
+ else {
1090
+ peg$currPos = s3;
1091
+ s3 = peg$FAILED;
1092
+ }
1093
+ }
1094
+ else {
1095
+ peg$currPos = s3;
1096
+ s3 = peg$FAILED;
1097
+ }
1098
+ if (s3 !== peg$FAILED) {
1099
+ while (s3 !== peg$FAILED) {
1100
+ s2.push(s3);
1101
+ s3 = peg$currPos;
1102
+ s4 = peg$currPos;
1103
+ peg$silentFails++;
1104
+ if (input.charCodeAt(peg$currPos) === 34) {
1105
+ s5 = peg$c0;
1106
+ peg$currPos++;
1107
+ }
1108
+ else {
1109
+ s5 = peg$FAILED;
1110
+ if (peg$silentFails === 0) {
1111
+ peg$fail(peg$e0);
1112
+ }
1113
+ }
1114
+ peg$silentFails--;
1115
+ if (s5 === peg$FAILED) {
1116
+ s4 = undefined;
1117
+ }
1118
+ else {
1119
+ peg$currPos = s4;
1120
+ s4 = peg$FAILED;
1121
+ }
1122
+ if (s4 !== peg$FAILED) {
1123
+ s5 = peg$currPos;
1124
+ peg$silentFails++;
1125
+ if (input.charCodeAt(peg$currPos) === 39) {
1126
+ s6 = peg$c1;
1127
+ peg$currPos++;
1128
+ }
1129
+ else {
1130
+ s6 = peg$FAILED;
1131
+ if (peg$silentFails === 0) {
1132
+ peg$fail(peg$e3);
1133
+ }
1134
+ }
1135
+ peg$silentFails--;
1136
+ if (s6 === peg$FAILED) {
1137
+ s5 = undefined;
1138
+ }
1139
+ else {
1140
+ peg$currPos = s5;
1141
+ s5 = peg$FAILED;
1142
+ }
1143
+ if (s5 !== peg$FAILED) {
1144
+ s6 = peg$currPos;
1145
+ peg$silentFails++;
1146
+ if (input.charCodeAt(peg$currPos) === 96) {
1147
+ s7 = peg$c3;
1148
+ peg$currPos++;
1149
+ }
1150
+ else {
1151
+ s7 = peg$FAILED;
1152
+ if (peg$silentFails === 0) {
1153
+ peg$fail(peg$e6);
1154
+ }
1155
+ }
1156
+ peg$silentFails--;
1157
+ if (s7 === peg$FAILED) {
1158
+ s6 = undefined;
1159
+ }
1160
+ else {
1161
+ peg$currPos = s6;
1162
+ s6 = peg$FAILED;
1163
+ }
1164
+ if (s6 !== peg$FAILED) {
1165
+ s7 = peg$currPos;
1166
+ peg$silentFails++;
1167
+ s8 = peg$parsetemplate_body();
1168
+ peg$silentFails--;
1169
+ if (s8 === peg$FAILED) {
1170
+ s7 = undefined;
1171
+ }
1172
+ else {
1173
+ peg$currPos = s7;
1174
+ s7 = peg$FAILED;
1175
+ }
1176
+ if (s7 !== peg$FAILED) {
1177
+ if (input.length > peg$currPos) {
1178
+ s8 = input.charAt(peg$currPos);
1179
+ peg$currPos++;
1180
+ }
1181
+ else {
1182
+ s8 = peg$FAILED;
1183
+ if (peg$silentFails === 0) {
1184
+ peg$fail(peg$e2);
1185
+ }
1186
+ }
1187
+ if (s8 !== peg$FAILED) {
1188
+ s4 = [s4, s5, s6, s7, s8];
1189
+ s3 = s4;
1190
+ }
1191
+ else {
1192
+ peg$currPos = s3;
1193
+ s3 = peg$FAILED;
1194
+ }
1195
+ }
1196
+ else {
1197
+ peg$currPos = s3;
1198
+ s3 = peg$FAILED;
1199
+ }
1200
+ }
1201
+ else {
1202
+ peg$currPos = s3;
1203
+ s3 = peg$FAILED;
1204
+ }
1205
+ }
1206
+ else {
1207
+ peg$currPos = s3;
1208
+ s3 = peg$FAILED;
1209
+ }
1210
+ }
1211
+ else {
1212
+ peg$currPos = s3;
1213
+ s3 = peg$FAILED;
1214
+ }
1215
+ }
1216
+ }
1217
+ else {
1218
+ s2 = peg$FAILED;
1219
+ }
1220
+ if (s2 !== peg$FAILED) {
1221
+ s1 = input.substring(s1, peg$currPos);
1222
+ }
1223
+ else {
1224
+ s1 = s2;
1225
+ }
1226
+ if (s1 !== peg$FAILED) {
1227
+ peg$savedPos = s0;
1228
+ s1 = peg$f4();
1229
+ }
1230
+ s0 = s1;
1231
+ return s0;
1232
+ }
1233
+ peg$result = peg$startRuleFunction();
1234
+ const peg$success = (peg$result !== peg$FAILED && peg$currPos === input.length);
1235
+ function peg$throw() {
1236
+ if (peg$result !== peg$FAILED && peg$currPos < input.length) {
1237
+ peg$fail(peg$endExpectation());
1238
+ }
1239
+ throw peg$buildStructuredError(peg$maxFailExpected, peg$maxFailPos < input.length ? peg$getUnicode(peg$maxFailPos) : null, peg$maxFailPos < input.length
1240
+ ? peg$computeLocation(peg$maxFailPos, peg$maxFailPos + 1)
1241
+ : peg$computeLocation(peg$maxFailPos, peg$maxFailPos));
1242
+ }
1243
+ if (options.peg$library) {
1244
+ return /** @type {any} */ ({
1245
+ peg$result,
1246
+ peg$currPos,
1247
+ peg$FAILED,
1248
+ peg$maxFailExpected,
1249
+ peg$maxFailPos,
1250
+ peg$success,
1251
+ peg$throw: peg$success ? undefined : peg$throw,
1252
+ });
1253
+ }
1254
+ if (peg$success) {
1255
+ return peg$result;
1256
+ }
1257
+ else {
1258
+ peg$throw();
1259
+ }
1260
+ }
1261
+ const peg$allowedStartRules = [
1262
+ "start"
1263
+ ];
1264
+ export { peg$allowedStartRules as StartRules, peg$SyntaxError as SyntaxError, peg$parse as parse };
1265
+ //# sourceMappingURL=find-string-interpolation.js.map