@divkitframework/divkit
Version:
DivKit for the web
1 lines • 1.61 MB
Source Map (JSON)
{"version":3,"file":"client-devtool.mjs","sources":["../../src/expressions/bigint.ts","../../src/expressions/expressions.js","../../src/expressions/const.ts","../../src/expressions/walk.ts","../../src/utils/padLeft.ts","../../src/utils/correctColor.ts","../../src/expressions/utils.ts","../../src/expressions/funcs/funcs.ts","../../src/expressions/funcs/std.ts","../../src/utils/formatDate.ts","../../src/expressions/funcs/datetime.ts","../../src/utils/escapeRegExp.ts","../../src/utils/wrapError.ts","../../src/expressions/funcs/strings.ts","../../src/expressions/funcs/math.ts","../../src/expressions/funcs/colors.ts","../../src/expressions/funcs/interval.ts","../../src/expressions/funcs/dict.ts","../../src/expressions/funcs/array.ts","../../src/expressions/funcs/stored.ts","../../src/expressions/funcs/trigonometry.ts","../../src/expressions/funcs/index.ts","../../node_modules/svelte/src/runtime/internal/utils.js","../../node_modules/svelte/src/runtime/internal/environment.js","../../node_modules/svelte/src/runtime/internal/loop.js","../../node_modules/svelte/src/runtime/internal/globals.js","../../node_modules/svelte/src/runtime/internal/dom.js","../../node_modules/svelte/src/runtime/internal/style_manager.js","../../node_modules/svelte/src/runtime/internal/lifecycle.js","../../node_modules/svelte/src/runtime/internal/scheduler.js","../../node_modules/svelte/src/runtime/internal/transitions.js","../../node_modules/svelte/src/runtime/internal/each.js","../../node_modules/svelte/src/runtime/internal/spread.js","../../node_modules/svelte/src/runtime/internal/Component.js","../../node_modules/svelte/src/shared/version.js","../../node_modules/svelte/src/runtime/store/index.js","../../src/expressions/variable.ts","../../src/expressions/eval.ts","../../node_modules/svelte/src/runtime/internal/disclose-version/index.js","../../src/context/root.ts","../../src/utils/makeStyle.ts","../../src/utils/pxToEm.ts","../../src/utils/htmlFilter.ts","../../src/utils/truthy.ts","../../src/utils/background.ts","../../src/utils/correctNonNegativeNumber.ts","../../src/use/visibilityAction.ts","../../src/utils/genClassName.ts","../../src/use/devtool.ts","../../src/context/state.ts","../../src/utils/edgeInsertsToCss.ts","../../src/utils/isNumber.ts","../../src/utils/isNonNegativeNumber.ts","../../src/utils/correctEdgeInserts.ts","../../src/utils/correctAlpha.ts","../../src/utils/isDeepEqual.ts","../../src/utils/assignIfDifferent.ts","../../src/utils/correctVisibility.ts","../../src/utils/correctCSSInterpolator.ts","../../src/utils/correctNumber.ts","../../src/utils/flattenAnimation.ts","../../src/utils/correctEdgeInsertsObject.ts","../../src/utils/sumEdgeInsets.ts","../../src/utils/correctBorderRadiusObject.ts","../../src/utils/borderRadius.ts","../../src/utils/shadow.ts","../../src/utils/isPrefersReducedMotion.ts","../../src/use/layoutProvider.ts","../../src/context/enabled.ts","../../src/utils/correctBooleanInt.ts","../../src/utils/composeAccessibilityDescription.ts","../../src/utils/componentContext.ts","../../src/utils/transformationsToTransform.ts","../../src/context/visibility.ts","../../src/utils/doNothing.ts","../../src/context/action.ts","../../src/utils/url.ts","../../src/components/utilities/Actionable.svelte","../../src/utils/isPositiveNumber.ts","../../src/utils/filters.ts","../../src/components/utilities/OuterBackground.svelte","../../src/components/utilities/Outer.svelte","../../src/utils/correctPositiveNumber.ts","../../src/utils/fontWeightToCss.ts","../../src/utils/correctFontWeight.ts","../../src/utils/edgeInsetsMultiply.ts","../../src/utils/variationSettings.ts","../../src/components/text/TextRange.svelte","../../src/utils/correctAlignmentHorizontal.ts","../../src/utils/correctAlignmentVertical.ts","../../src/utils/propToString.ts","../../src/utils/correctTintMode.ts","../../src/utils/filterEnabledActions.ts","../../src/utils/debounce.ts","../../src/use/autoEllipsize.ts","../../src/components/text/Text.svelte","../../src/utils/container.ts","../../src/utils/correctContainerOrientation.ts","../../src/utils/correctDrawableStyles.ts","../../src/utils/hasGapSupport.ts","../../src/utils/correctContentAlignmentVertical.ts","../../src/utils/correctContentAlignmentHorizontal.ts","../../src/utils/constStore.ts","../../src/utils/itemBuilder.ts","../../src/utils/simpleThrottle.ts","../../src/utils/getMarginBox.ts","../../src/components/container/ContainerSeparators.svelte","../../src/components/container/Container.svelte","../../src/utils/correctGeneralOrientation.ts","../../src/components/separator/Separator.svelte","../../src/utils/correctImagePosition.ts","../../src/utils/prepareBase64.ts","../../src/components/utilities/DevtoolHolder.svelte","../../src/components/image/Image.svelte","../../src/utils/gridCalcTemplates.ts","../../src/components/grid/Grid.svelte","../../src/utils/correctAlignment.ts","../../src/utils/nonNegativeModulo.ts","../../src/components/gallery/Gallery.svelte","../../src/utils/correctTabDelimiterStyle.ts","../../src/utils/keyboard/codes.ts","../../src/utils/correctBorderRadius.ts","../../src/utils/getTouchCoords.ts","../../src/components/utilities/EnabledContext.svelte","../../src/components/tabs/Tabs.svelte","../../node_modules/svelte/src/runtime/easing/index.js","../../src/utils/easings/interpolateEasing.ts","../../src/utils/easings/ease.ts","../../src/utils/easings/spring.ts","../../src/utils/easing.ts","../../src/utils/inOutTransition.ts","../../src/utils/lerp.ts","../../src/utils/changeBoundsTransition.ts","../../src/utils/flattenTransition.ts","../../src/components/state/State.svelte","../../src/components/pager/Pager.svelte","../../src/components/indicator/Indicator.svelte","../../src/utils/correctSliderTextStyle.ts","../../src/utils/clamp.ts","../../src/utils/slider.ts","../../src/components/slider/Slider.svelte","../../src/utils/textDiff.ts","../../src/utils/mask/baseInputMask.ts","../../src/utils/mask/fixedLengthInputMask.ts","../../src/utils/updateFixedMask.ts","../../src/utils/mask/currencyInputMask.ts","../../src/utils/updateCurrencyMask.ts","../../src/utils/contenteditable.ts","../../src/utils/mask/phoneInputMask.ts","../../src/utils/updatePhoneMask.ts","../../src/components/input/Input.svelte","../../src/components/select/Select.svelte","../../src/utils/correctVideoSource.ts","../../src/utils/video.ts","../../src/components/video/Video.svelte","../../src/utils/booleanInt.ts","../../src/components/switch/Switch.svelte","../../src/components/custom/Custom.svelte","../../src/components/typeMap.ts","../../src/components/utilities/Unknown.svelte","../../src/components/utilities/RootSvgFilters.svelte","../../src/utils/applyTemplate.ts","../../src/expressions/parserCache.ts","../../src/expressions/funcs/customFuncs.ts","../../src/utils/simpleCheckInput.ts","../../src/utils/uniq.ts","../../src/expressions/json.ts","../../src/expressions/globalVariablesController.ts","../../src/utils/timers.ts","../../src/actions/array.ts","../../src/actions/dict.ts","../../src/actions/copyToClipboard.ts","../../src/utils/animators.ts","../../src/utils/componentUtils.ts","../../src/utils/checkSubmitAction.ts","../../src/actions/updateStructure.ts","../../node_modules/svelte/src/runtime/transition/index.js","../../src/utils/inOutAnimation.ts","../../src/utils/hasDialogSupport.ts","../../src/components/tooltip/Tooltip.svelte","../../src/components/menu/Menu.svelte","../../src/components/Root.svelte","../../src/extensions/sizeProvider.ts","../../src/extensions/gesture.ts","../../src/utils/filterHTMLElements.ts","../../src/extensions/lottie.ts","../../src/extensions/markdown.ts","../../src/client-devtool.ts"],"sourcesContent":["export function toBigIntNoCheck(val: number | bigint | string): bigint {\n return BigInt(val);\n}\n\nexport const MAX_INT = toBigIntNoCheck('9223372036854775807');\nexport const MIN_INT = toBigIntNoCheck('-9223372036854775808');\n\nexport function toBigInt(val: number | bigint | string): bigint {\n const res = toBigIntNoCheck(val);\n if (res > MAX_INT || res < MIN_INT) {\n throw new Error('Integer overflow.');\n }\n return res;\n}\n\nexport const bigIntZero = toBigInt(0);\n\nexport function absBigInt(val: bigint): bigint {\n let res = val;\n\n if (res < 0) {\n res = -res;\n }\n\n return res;\n}\n\nexport function signBigInt(val: bigint): bigint {\n let res = 0;\n\n if (val > 0) {\n res = 1;\n } else if (val < 0) {\n res = -1;\n }\n\n return toBigInt(res);\n}\n","// Generated by Peggy 3.0.2.\n//\n// https://peggyjs.org/\n\n\n import { toBigInt } from './bigint';\n\n function buildConditionalExpression(expr, tail) {\n if (tail && tail[3] && tail[7]) {\n return {type: 'ConditionalExpression', test: expr, consequent: tail[3], alternate: tail[7]};\n }\n\n return expr;\n }\n\n function buildTryExpression(expr, tail) {\n if (tail && tail[3]) {\n return {type: 'TryExpression', test: expr, alternate: tail[3]};\n }\n\n return expr;\n }\n\n function buildBinaryExpression(head, tail) {\n if (!tail.length) {\n return head;\n }\n\n return tail.reduce((result, element) => {\n return {\n type: 'BinaryExpression',\n operator: element[1],\n left: result,\n right: element[3]\n };\n }, head);\n }\n\n function buildLogicalExpression(head, tail) {\n if (!tail.length) {\n return head;\n }\n\n return tail.reduce((result, element) => {\n return {\n type: 'LogicalExpression',\n operator: element[1],\n left: result,\n right: element[3]\n };\n }, head);\n }\n\n function buildMethodCall(head, tail) {\n if (!tail.length) {\n return head;\n }\n\n return tail.reduce((result, element) => {\n if (!element[5]) {\n throw new Error('Method expected after .');\n }\n return {\n type: 'MethodExpression',\n object: result,\n method: element[3],\n arguments: element[5][2]\n };\n }, head);\n }\n\n function buildVariableOrBoolean(txt) {\n if (txt === 'true' || txt === 'false') {\n return {type: 'BooleanLiteral', value: txt === 'true'};\n }\n\n return {type: 'Variable', id: {type: 'Identifier', name: txt}};\n }\n\n function buildString(list) {\n if (list.every(it => typeof it === 'string')) {\n return {type: 'StringLiteral', value: list.join('')};\n }\n let res = list.reduce((result, element) => {\n if (typeof element === 'string' && typeof result[result.length - 1] === 'string') {\n result[result.length - 1] += element;\n } else {\n result.push(element);\n }\n return result;\n }, []).reduce((result, element) => {\n if (typeof element === 'string') {\n result.quasis.push({type: 'StringLiteral', value: element});\n } else {\n if (result.quasis.length === result.expressions.length) {\n result.quasis.push({type: 'StringLiteral', value: ''});\n }\n result.expressions.push(element);\n }\n return result;\n }, {\n type: 'TemplateLiteral',\n quasis: [],\n expressions: []\n });\n\n if (res.quasis.length === res.expressions.length) {\n res.quasis.push({type: 'StringLiteral', value: ''});\n }\n\n return res;\n }\n\n function convertToInt64(str) {\n try {\n return toBigInt(str);\n } catch (_err) {\n throw new Error(`Value ${str} can't be converted to Integer type.`);\n }\n }\n\n function escapeChar(char) {\n if (char === \"'\" || char === '\\\\') {\n return char;\n }\n throw new Error('Incorrect string escape');\n }\n\nfunction peg$subclass(child, parent) {\n function C() { this.constructor = child; }\n C.prototype = parent.prototype;\n child.prototype = new C();\n}\n\nfunction peg$SyntaxError(message, expected, found, location) {\n var self = Error.call(this, message);\n // istanbul ignore next Check is a necessary evil to support older environments\n if (Object.setPrototypeOf) {\n Object.setPrototypeOf(self, peg$SyntaxError.prototype);\n }\n self.expected = expected;\n self.found = found;\n self.location = location;\n self.name = \"SyntaxError\";\n return self;\n}\n\npeg$subclass(peg$SyntaxError, Error);\n\nfunction peg$padEnd(str, targetLength, padString) {\n padString = padString || \" \";\n if (str.length > targetLength) { return str; }\n targetLength -= str.length;\n padString += padString.repeat(targetLength);\n return str + padString.slice(0, targetLength);\n}\n\npeg$SyntaxError.prototype.format = function(sources) {\n var str = \"Error: \" + this.message;\n if (this.location) {\n var src = null;\n var k;\n for (k = 0; k < sources.length; k++) {\n if (sources[k].source === this.location.source) {\n src = sources[k].text.split(/\\r\\n|\\n|\\r/g);\n break;\n }\n }\n var s = this.location.start;\n var offset_s = (this.location.source && (typeof this.location.source.offset === \"function\"))\n ? this.location.source.offset(s)\n : s;\n var loc = this.location.source + \":\" + offset_s.line + \":\" + offset_s.column;\n if (src) {\n var e = this.location.end;\n var filler = peg$padEnd(\"\", offset_s.line.toString().length, ' ');\n var line = src[s.line - 1];\n var last = s.line === e.line ? e.column : line.length + 1;\n var hatLen = (last - s.column) || 1;\n str += \"\\n --> \" + loc + \"\\n\"\n + filler + \" |\\n\"\n + offset_s.line + \" | \" + line + \"\\n\"\n + filler + \" | \" + peg$padEnd(\"\", s.column - 1, ' ')\n + peg$padEnd(\"\", hatLen, \"^\");\n } else {\n str += \"\\n at \" + loc;\n }\n }\n return str;\n};\n\npeg$SyntaxError.buildMessage = function(expected, found) {\n var DESCRIBE_EXPECTATION_FNS = {\n literal: function(expectation) {\n return \"\\\"\" + literalEscape(expectation.text) + \"\\\"\";\n },\n\n class: function(expectation) {\n var escapedParts = expectation.parts.map(function(part) {\n return Array.isArray(part)\n ? classEscape(part[0]) + \"-\" + classEscape(part[1])\n : classEscape(part);\n });\n\n return \"[\" + (expectation.inverted ? \"^\" : \"\") + escapedParts.join(\"\") + \"]\";\n },\n\n any: function() {\n return \"any character\";\n },\n\n end: function() {\n return \"end of input\";\n },\n\n other: function(expectation) {\n return expectation.description;\n }\n };\n\n function hex(ch) {\n return ch.charCodeAt(0).toString(16).toUpperCase();\n }\n\n function literalEscape(s) {\n return s\n .replace(/\\\\/g, \"\\\\\\\\\")\n .replace(/\"/g, \"\\\\\\\"\")\n .replace(/\\0/g, \"\\\\0\")\n .replace(/\\t/g, \"\\\\t\")\n .replace(/\\n/g, \"\\\\n\")\n .replace(/\\r/g, \"\\\\r\")\n .replace(/[\\x00-\\x0F]/g, function(ch) { return \"\\\\x0\" + hex(ch); })\n .replace(/[\\x10-\\x1F\\x7F-\\x9F]/g, function(ch) { return \"\\\\x\" + hex(ch); });\n }\n\n function classEscape(s) {\n return s\n .replace(/\\\\/g, \"\\\\\\\\\")\n .replace(/\\]/g, \"\\\\]\")\n .replace(/\\^/g, \"\\\\^\")\n .replace(/-/g, \"\\\\-\")\n .replace(/\\0/g, \"\\\\0\")\n .replace(/\\t/g, \"\\\\t\")\n .replace(/\\n/g, \"\\\\n\")\n .replace(/\\r/g, \"\\\\r\")\n .replace(/[\\x00-\\x0F]/g, function(ch) { return \"\\\\x0\" + hex(ch); })\n .replace(/[\\x10-\\x1F\\x7F-\\x9F]/g, function(ch) { return \"\\\\x\" + hex(ch); });\n }\n\n function describeExpectation(expectation) {\n return DESCRIBE_EXPECTATION_FNS[expectation.type](expectation);\n }\n\n function describeExpected(expected) {\n var descriptions = expected.map(describeExpectation);\n var i, j;\n\n descriptions.sort();\n\n if (descriptions.length > 0) {\n for (i = 1, j = 1; i < descriptions.length; i++) {\n if (descriptions[i - 1] !== descriptions[i]) {\n descriptions[j] = descriptions[i];\n j++;\n }\n }\n descriptions.length = j;\n }\n\n switch (descriptions.length) {\n case 1:\n return descriptions[0];\n\n case 2:\n return descriptions[0] + \" or \" + descriptions[1];\n\n default:\n return descriptions.slice(0, -1).join(\", \")\n + \", or \"\n + descriptions[descriptions.length - 1];\n }\n }\n\n function describeFound(found) {\n return found ? \"\\\"\" + literalEscape(found) + \"\\\"\" : \"end of input\";\n }\n\n return \"Expected \" + describeExpected(expected) + \" but \" + describeFound(found) + \" found.\";\n};\n\nfunction peg$parse(input, options) {\n options = options !== undefined ? options : {};\n\n var peg$FAILED = {};\n var peg$source = options.grammarSource;\n\n var peg$startRuleFunctions = { start: peg$parsestart, JsonStringContents: peg$parseJsonStringContents };\n var peg$startRuleFunction = peg$parsestart;\n\n var peg$c0 = \"@{\";\n var peg$c1 = \"}\";\n var peg$c2 = \"@{}\";\n var peg$c3 = \"\\\\\";\n var peg$c4 = \"?\";\n var peg$c5 = \":\";\n var peg$c6 = \"||\";\n var peg$c7 = \"&&\";\n var peg$c8 = \"==\";\n var peg$c9 = \"!=\";\n var peg$c10 = \">=\";\n var peg$c11 = \">\";\n var peg$c12 = \"<=\";\n var peg$c13 = \"<\";\n var peg$c14 = \"!:\";\n var peg$c15 = \"+\";\n var peg$c16 = \"-\";\n var peg$c17 = \"/\";\n var peg$c18 = \"*\";\n var peg$c19 = \"%\";\n var peg$c20 = \"!\";\n var peg$c21 = \".\";\n var peg$c22 = \"(\";\n var peg$c23 = \")\";\n var peg$c24 = \",\";\n var peg$c25 = \"'\";\n var peg$c26 = \"e\";\n var peg$c27 = \"E\";\n\n var peg$r0 = /^[^}]/;\n var peg$r1 = /^[^'}]/;\n var peg$r2 = /^[0-9]/;\n var peg$r3 = /^[a-zA-Z_]/;\n var peg$r4 = /^[a-zA-Z_0-9]/;\n var peg$r5 = /^[ \\t\\r\\n]/;\n\n var peg$e0 = peg$literalExpectation(\"@{\", false);\n var peg$e1 = peg$literalExpectation(\"}\", false);\n var peg$e2 = peg$literalExpectation(\"@{}\", false);\n var peg$e3 = peg$literalExpectation(\"\\\\\", false);\n var peg$e4 = peg$anyExpectation();\n var peg$e5 = peg$classExpectation([\"}\"], true, false);\n var peg$e6 = peg$literalExpectation(\"?\", false);\n var peg$e7 = peg$literalExpectation(\":\", false);\n var peg$e8 = peg$literalExpectation(\"||\", false);\n var peg$e9 = peg$literalExpectation(\"&&\", false);\n var peg$e10 = peg$literalExpectation(\"==\", false);\n var peg$e11 = peg$literalExpectation(\"!=\", false);\n var peg$e12 = peg$literalExpectation(\">=\", false);\n var peg$e13 = peg$literalExpectation(\">\", false);\n var peg$e14 = peg$literalExpectation(\"<=\", false);\n var peg$e15 = peg$literalExpectation(\"<\", false);\n var peg$e16 = peg$literalExpectation(\"!:\", false);\n var peg$e17 = peg$literalExpectation(\"+\", false);\n var peg$e18 = peg$literalExpectation(\"-\", false);\n var peg$e19 = peg$literalExpectation(\"/\", false);\n var peg$e20 = peg$literalExpectation(\"*\", false);\n var peg$e21 = peg$literalExpectation(\"%\", false);\n var peg$e22 = peg$literalExpectation(\"!\", false);\n var peg$e23 = peg$literalExpectation(\".\", false);\n var peg$e24 = peg$literalExpectation(\"(\", false);\n var peg$e25 = peg$literalExpectation(\")\", false);\n var peg$e26 = peg$literalExpectation(\",\", false);\n var peg$e27 = peg$otherExpectation(\"string\");\n var peg$e28 = peg$literalExpectation(\"'\", false);\n var peg$e29 = peg$classExpectation([\"'\", \"}\"], true, false);\n var peg$e30 = peg$otherExpectation(\"integer\");\n var peg$e31 = peg$classExpectation([[\"0\", \"9\"]], false, false);\n var peg$e32 = peg$otherExpectation(\"number\");\n var peg$e33 = peg$literalExpectation(\"e\", false);\n var peg$e34 = peg$literalExpectation(\"E\", false);\n var peg$e35 = peg$classExpectation([[\"a\", \"z\"], [\"A\", \"Z\"], \"_\"], false, false);\n var peg$e36 = peg$classExpectation([[\"a\", \"z\"], [\"A\", \"Z\"], \"_\", [\"0\", \"9\"]], false, false);\n var peg$e37 = peg$otherExpectation(\"whitespace\");\n var peg$e38 = peg$classExpectation([\" \", \"\\t\", \"\\r\", \"\\n\"], false, false);\n\n var peg$f0 = function(expr) { return expr; };\n var peg$f1 = function(list) { return buildString(list); };\n var peg$f2 = function(expr) { return expr; };\n var peg$f3 = function() { return ''; };\n var peg$f4 = function() { return text(); };\n var peg$f5 = function() { throw new Error(\"Error tokenizing '\" + input + \"'.\"); };\n var peg$f6 = function() { throw new Error(\"Error tokenizing '\" + input + \"'.\"); };\n var peg$f7 = function(str) { return str; };\n var peg$f8 = function(char) { return escapeChar(char); };\n var peg$f9 = function() { throw new Error(\"Error tokenizing '\" + input + \"'.\"); };\n var peg$f10 = function(expr, tail) { return buildConditionalExpression(expr, tail); };\n var peg$f11 = function(head, tail) { return buildLogicalExpression(head, tail); };\n var peg$f12 = function(head, tail) { return buildLogicalExpression(head, tail); };\n var peg$f13 = function(head, tail) { return buildBinaryExpression(head, tail); };\n var peg$f14 = function(head, tail) { return buildBinaryExpression(head, tail); };\n var peg$f15 = function(expr, tail) { return buildTryExpression(expr, tail); };\n var peg$f16 = function(head, tail) { return buildBinaryExpression(head, tail); };\n var peg$f17 = function(head, tail) { return buildBinaryExpression(head, tail); };\n var peg$f18 = function(val) { return val; };\n var peg$f19 = function(val) { return val; };\n var peg$f20 = function(op, expr) { return {type: 'UnaryExpression', operator: op, argument: expr}; };\n var peg$f21 = function() { throw new Error(\"Incorrect unary operator\"); };\n var peg$f22 = function(head, tail) { return buildMethodCall(head, tail); };\n var peg$f23 = function(id, args) { return {type: 'CallExpression', callee: id, arguments: args}; };\n var peg$f24 = function(expr, list) { return [expr, ...list]; };\n var peg$f25 = function(expr) { return expr; };\n var peg$f26 = function(str) { return str; };\n var peg$f27 = function(list) { return buildString(list); };\n var peg$f28 = function(expr) { return expr; };\n var peg$f29 = function() { return ''; };\n var peg$f30 = function() { return text(); };\n var peg$f31 = function() { throw new Error(\"Error tokenizing '\" + input + \"'.\"); };\n var peg$f32 = function() { throw new Error(\"Error tokenizing '\" + input + \"'.\"); };\n var peg$f33 = function(str) { return str; };\n var peg$f34 = function(char) { return escapeChar(char); };\n var peg$f35 = function() { throw new Error(\"Error tokenizing '\" + input + \"'.\"); };\n var peg$f36 = function() { return {type: 'IntegerLiteral', value: convertToInt64(text())}; };\n var peg$f37 = function() { return {type: 'NumberLiteral', value: parseFloat(text())}; };\n var peg$f38 = function() { return {type: 'NumberLiteral', value: parseFloat(text())}; };\n var peg$f39 = function() { const txt = text(); if (/\\.\\./.test(txt) || /\\.$/.test(txt)) {throw new Error('Unexpected token: .')} return buildVariableOrBoolean(txt); };\n var peg$f40 = function() { return {type: 'Identifier', name: text()}; };\n var peg$currPos = 0;\n var peg$savedPos = 0;\n var peg$posDetailsCache = [{ line: 1, column: 1 }];\n var peg$maxFailPos = 0;\n var peg$maxFailExpected = [];\n var peg$silentFails = 0;\n\n var peg$result;\n\n if (\"startRule\" in options) {\n if (!(options.startRule in peg$startRuleFunctions)) {\n throw new Error(\"Can't start parsing from rule \\\"\" + options.startRule + \"\\\".\");\n }\n\n peg$startRuleFunction = peg$startRuleFunctions[options.startRule];\n }\n\n function text() {\n return input.substring(peg$savedPos, peg$currPos);\n }\n\n function offset() {\n return peg$savedPos;\n }\n\n function range() {\n return {\n source: peg$source,\n start: peg$savedPos,\n end: peg$currPos\n };\n }\n\n function location() {\n return peg$computeLocation(peg$savedPos, peg$currPos);\n }\n\n function expected(description, location) {\n location = location !== undefined\n ? location\n : peg$computeLocation(peg$savedPos, peg$currPos);\n\n throw peg$buildStructuredError(\n [peg$otherExpectation(description)],\n input.substring(peg$savedPos, peg$currPos),\n location\n );\n }\n\n function error(message, location) {\n location = location !== undefined\n ? location\n : peg$computeLocation(peg$savedPos, peg$currPos);\n\n throw peg$buildSimpleError(message, location);\n }\n\n function peg$literalExpectation(text, ignoreCase) {\n return { type: \"literal\", text: text, ignoreCase: ignoreCase };\n }\n\n function peg$classExpectation(parts, inverted, ignoreCase) {\n return { type: \"class\", parts: parts, inverted: inverted, ignoreCase: ignoreCase };\n }\n\n function peg$anyExpectation() {\n return { type: \"any\" };\n }\n\n function peg$endExpectation() {\n return { type: \"end\" };\n }\n\n function peg$otherExpectation(description) {\n return { type: \"other\", description: description };\n }\n\n function peg$computePosDetails(pos) {\n var details = peg$posDetailsCache[pos];\n var p;\n\n if (details) {\n return details;\n } else {\n p = pos - 1;\n while (!peg$posDetailsCache[p]) {\n p--;\n }\n\n details = peg$posDetailsCache[p];\n details = {\n line: details.line,\n column: details.column\n };\n\n while (p < pos) {\n if (input.charCodeAt(p) === 10) {\n details.line++;\n details.column = 1;\n } else {\n details.column++;\n }\n\n p++;\n }\n\n peg$posDetailsCache[pos] = details;\n\n return details;\n }\n }\n\n function peg$computeLocation(startPos, endPos, offset) {\n var startPosDetails = peg$computePosDetails(startPos);\n var endPosDetails = peg$computePosDetails(endPos);\n\n var res = {\n source: peg$source,\n start: {\n offset: startPos,\n line: startPosDetails.line,\n column: startPosDetails.column\n },\n end: {\n offset: endPos,\n line: endPosDetails.line,\n column: endPosDetails.column\n }\n };\n if (offset && peg$source && (typeof peg$source.offset === \"function\")) {\n res.start = peg$source.offset(res.start);\n res.end = peg$source.offset(res.end);\n }\n return res;\n }\n\n function peg$fail(expected) {\n if (peg$currPos < peg$maxFailPos) { return; }\n\n if (peg$currPos > peg$maxFailPos) {\n peg$maxFailPos = peg$currPos;\n peg$maxFailExpected = [];\n }\n\n peg$maxFailExpected.push(expected);\n }\n\n function peg$buildSimpleError(message, location) {\n return new peg$SyntaxError(message, null, null, location);\n }\n\n function peg$buildStructuredError(expected, found, location) {\n return new peg$SyntaxError(\n peg$SyntaxError.buildMessage(expected, found),\n expected,\n found,\n location\n );\n }\n\n function peg$parsestart() {\n var s0, s1, s2, s3;\n\n s0 = peg$currPos;\n s1 = peg$parse_();\n s2 = peg$parseExpression();\n if (s2 !== peg$FAILED) {\n s3 = peg$parse_();\n peg$savedPos = s0;\n s0 = peg$f0(s2);\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n return s0;\n }\n\n function peg$parseJsonStringContents() {\n var s0, s1, s2;\n\n s0 = peg$currPos;\n s1 = [];\n s2 = peg$parseJsonStringChar();\n while (s2 !== peg$FAILED) {\n s1.push(s2);\n s2 = peg$parseJsonStringChar();\n }\n peg$savedPos = s0;\n s1 = peg$f1(s1);\n s0 = s1;\n\n return s0;\n }\n\n function peg$parseJsonStringChar() {\n var s0, s1, s2, s3, s4, s5;\n\n s0 = peg$currPos;\n if (input.substr(peg$currPos, 2) === peg$c0) {\n s1 = peg$c0;\n peg$currPos += 2;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$e0); }\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parse_();\n s3 = peg$parseExpression();\n if (s3 !== peg$FAILED) {\n s4 = peg$parse_();\n if (input.charCodeAt(peg$currPos) === 125) {\n s5 = peg$c1;\n peg$currPos++;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$e1); }\n }\n if (s5 !== peg$FAILED) {\n peg$savedPos = s0;\n s0 = peg$f2(s3);\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n if (s0 === peg$FAILED) {\n s0 = peg$currPos;\n if (input.substr(peg$currPos, 3) === peg$c2) {\n s1 = peg$c2;\n peg$currPos += 3;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$e2); }\n }\n if (s1 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$f3();\n }\n s0 = s1;\n if (s0 === peg$FAILED) {\n s0 = peg$currPos;\n s1 = peg$currPos;\n peg$silentFails++;\n if (input.charCodeAt(peg$currPos) === 92) {\n s2 = peg$c3;\n peg$currPos++;\n } else {\n s2 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$e3); }\n }\n if (s2 === peg$FAILED) {\n if (input.substr(peg$currPos, 2) === peg$c0) {\n s2 = peg$c0;\n peg$currPos += 2;\n } else {\n s2 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$e0); }\n }\n }\n peg$silentFails--;\n if (s2 === peg$FAILED) {\n s1 = undefined;\n } else {\n peg$currPos = s1;\n s1 = peg$FAILED;\n }\n if (s1 !== peg$FAILED) {\n if (input.length > peg$currPos) {\n s2 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s2 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$e4); }\n }\n if (s2 !== peg$FAILED) {\n peg$savedPos = s0;\n s0 = peg$f4();\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n if (s0 === peg$FAILED) {\n s0 = peg$currPos;\n if (input.substr(peg$currPos, 2) === peg$c0) {\n s1 = peg$c0;\n peg$currPos += 2;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$e0); }\n }\n if (s1 !== peg$FAILED) {\n s2 = [];\n if (peg$r0.test(input.charAt(peg$currPos))) {\n s3 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$e5); }\n }\n if (s3 !== peg$FAILED) {\n while (s3 !== peg$FAILED) {\n s2.push(s3);\n if (peg$r0.test(input.charAt(peg$currPos))) {\n s3 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$e5); }\n }\n }\n } else {\n s2 = peg$FAILED;\n }\n if (s2 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 125) {\n s3 = peg$c1;\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$e1); }\n }\n if (s3 !== peg$FAILED) {\n peg$savedPos = s0;\n s0 = peg$f5();\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n if (s0 === peg$FAILED) {\n s0 = peg$currPos;\n if (input.substr(peg$currPos, 2) === peg$c0) {\n s1 = peg$c0;\n peg$currPos += 2;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$e0); }\n }\n if (s1 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$f6();\n }\n s0 = s1;\n if (s0 === peg$FAILED) {\n s0 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 92) {\n s1 = peg$c3;\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$e3); }\n }\n if (s1 !== peg$FAILED) {\n if (input.substr(peg$currPos, 2) === peg$c0) {\n s2 = peg$c0;\n peg$currPos += 2;\n } else {\n s2 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$e0); }\n }\n if (s2 !== peg$FAILED) {\n peg$savedPos = s0;\n s0 = peg$f7(s2);\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n if (s0 === peg$FAILED) {\n s0 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 92) {\n s1 = peg$c3;\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$e3); }\n }\n if (s1 !== peg$FAILED) {\n if (input.length > peg$currPos) {\n s2 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s2 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$e4); }\n }\n if (s2 !== peg$FAILED) {\n peg$savedPos = s0;\n s0 = peg$f8(s2);\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n if (s0 === peg$FAILED) {\n s0 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 92) {\n s1 = peg$c3;\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$e3); }\n }\n if (s1 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$f9();\n }\n s0 = s1;\n }\n }\n }\n }\n }\n }\n }\n\n return s0;\n }\n\n function peg$parseExpression() {\n var s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, s10;\n\n s0 = peg$currPos;\n s1 = peg$parseOr();\n if (s1 !== peg$FAILED) {\n s2 = peg$currPos;\n s3 = peg$parse_();\n if (input.charCodeAt(peg$currPos) === 63) {\n s4 = peg$c4;\n peg$currPos++;\n } else {\n s4 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$e6); }\n }\n if (s4 !== peg$FAILED) {\n s5 = peg$parse_();\n s6 = peg$parseExpression();\n if (s6 !== peg$FAILED) {\n s7 = peg$parse_();\n if (input.charCodeAt(peg$currPos) === 58) {\n s8 = peg$c5;\n peg$currPos++;\n } else {\n s8 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$e7); }\n }\n if (s8 !== peg$FAILED) {\n s9 = peg$parse_();\n s10 = peg$parseExpression();\n if (s10 !== peg$FAILED) {\n s3 = [s3, s4, s5, s6, s7, s8, s9, s10];\n s2 = s3;\n } else {\n peg$currPos = s2;\n s2 = peg$FAILED;\n }\n } else {\n peg$currPos = s2;\n s2 = peg$FAILED;\n }\n } else {\n peg$currPos = s2;\n s2 = peg$FAILED;\n }\n } else {\n peg$currPos = s2;\n s2 = peg$FAILED;\n }\n if (s2 === peg$FAILED) {\n s2 = null;\n }\n peg$savedPos = s0;\n s0 = peg$f10(s1, s2);\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n return s0;\n }\n\n function peg$parseOr() {\n var s0, s1, s2, s3, s4, s5, s6, s7;\n\n s0 = peg$currPos;\n s1 = peg$parseAnd();\n if (s1 !== peg$FAILED) {\n s2 = [];\n s3 = peg$currPos;\n s4 = peg$parse_();\n if (input.substr(peg$currPos, 2) === peg$c6) {\n s5 = peg$c6;\n peg$currPos += 2;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$e8); }\n }\n if (s5 !== peg$FAILED) {\n s6 = peg$parse_();\n s7 = peg$parseAnd();\n if (s7 !== peg$FAILED) {\n s4 = [s4, s5, s6, s7];\n s3 = s4;\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n while (s3 !== peg$FAILED) {\n s2.push(s3);\n s3 = peg$currPos;\n s4 = peg$parse_();\n if (input.substr(peg$currPos, 2) === peg$c6) {\n s5 = peg$c6;\n peg$currPos += 2;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$e8); }\n }\n if (s5 !== peg$FAILED) {\n s6 = peg$parse_();\n s7 = peg$parseAnd();\n if (s7 !== peg$FAILED) {\n s4 = [s4, s5, s6, s7];\n s3 = s4;\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n }\n peg$savedPos = s0;\n s0 = peg$f11(s1, s2);\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n return s0;\n }\n\n function peg$parseAnd() {\n var s0, s1, s2, s3, s4, s5, s6, s7;\n\n s0 = peg$currPos;\n s1 = peg$parseEqual();\n if (s1 !== peg$FAILED) {\n s2 = [];\n s3 = peg$currPos;\n s4 = peg$parse_();\n if (input.substr(peg$currPos, 2) === peg$c7) {\n s5 = peg$c7;\n peg$currPos += 2;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$e9); }\n }\n if (s5 !== peg$FAILED) {\n s6 = peg$parse_();\n s7 = peg$parseEqual();\n if (s7 !== peg$FAILED) {\n s4 = [s4, s5, s6, s7];\n s3 = s4;\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n while (s3 !== peg$FAILED) {\n s2.push(s3);\n s3 = peg$currPos;\n s4 = peg$parse_();\n if (input.substr(peg$currPos, 2) === peg$c7) {\n s5 = peg$c7;\n peg$currPos += 2;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$e9); }\n }\n if (s5 !== peg$FAILED) {\n s6 = peg$parse_();\n s7 = peg$parseEqual();\n if (s7 !== peg$FAILED) {\n s4 = [s4, s5, s6, s7];\n s3 = s4;\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n }\n peg$savedPos = s0;\n s0 = peg$f12(s1, s2);\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n return s0;\n }\n\n function peg$parseEqual() {\n var s0, s1, s2, s3, s4, s5, s6, s7;\n\n s0 = peg$currPos;\n s1 = peg$parseComparison();\n if (s1 !== peg$FAILED) {\n s2 = [];\n s3 = peg$currPos;\n s4 = peg$parse_();\n if (input.substr(peg$currPos, 2) === peg$c8) {\n s5 = peg$c8;\n peg$currPos += 2;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$e10); }\n }\n if (s5 === peg$FAILED) {\n if (input.substr(peg$currPos, 2) === peg$c9) {\n s5 = peg$c9;\n peg$currPos += 2;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$e11); }\n }\n }\n if (s5 !== peg$FAILED) {\n s6 = peg$parse_();\n s7 = peg$parseComparison();\n if (s7 !== peg$FAILED) {\n s4 = [s4, s5, s6, s7];\n s3 = s4;\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n while (s3 !== peg$FAILED) {\n s2.push(s3);\n s3 = peg$currPos;\n s4 = peg$parse_();\n if (input.substr(peg$currPos, 2) === peg$c8) {\n s5 = peg$c8;\n peg$currPos += 2;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$e10); }\n }\n if (s5 === peg$FAILED) {\n if (input.substr(peg$currPos, 2) === peg$c9) {\n s5 = peg$c9;\n peg$currPos += 2;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$e11); }\n }\n }\n if (s5 !== peg$FAILED) {\n s6 = peg$parse_();\n s7 = peg$parseComparison();\n if (s7 !== peg$FAILED) {\n s4 = [s4, s5, s6, s7];\n s3 = s4;\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n }\n peg$savedPos = s0;\n s0 = peg$f13(s1, s2);\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n return s0;\n }\n\n function peg$parseComparison() {\n var s0, s1, s2, s3, s4, s5, s6, s7;\n\n s0 = peg$currPos;\n s1 = peg$parseTry();\n if (s1 !== peg$FAILED) {\n s2 = [];\n s3 = peg$currPos;\n s4 = peg$parse_();\n if (input.substr(peg$currPos, 2) === peg$c10) {\n s5 = peg$c10;\n peg$currPos += 2;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$e12); }\n }\n if (s5 === peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 62) {\n s5 = peg$c11;\n peg$currPos++;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$e13); }\n }\n if (s5 === peg$FAILED) {\n if (input.substr(peg$currPos, 2) === peg$c12) {\n s5 = peg$c12;\n peg$currPos += 2;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$e14); }\n }\n if (s5 === peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 60) {\n s5 = peg$c13;\n peg$currPos++;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$e15); }\n }\n }\n }\n }\n if (s5 !== peg$FAILED) {\n s6 = peg$parse_();\n s7 = peg$parseTry();\n if (s7 !== peg$FAILED) {\n s4 = [s4, s5, s6, s7];\n s3 = s4;\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n while (s3 !== peg$FAILED) {\n s2.push(s3);\n s3 = peg$currPos;\n s4 = peg$parse_();\n if (input.substr(peg$currPos, 2) === peg$c10) {\n s5 = peg$c10;\n peg$currPos += 2;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$e12); }\n }\n if (s5 === peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 62) {\n s5 = peg$c11;\n peg$currPos++;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$e13); }\n }\n if (s5 === peg$FAILED) {\n if (input.substr(peg$currPos, 2) === peg$c12) {\n s5 = peg$c12;\n peg$currPos += 2;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$e14); }\n }\n if (s5 === peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 60) {\n s5 = peg$c13;\n peg$currPos++;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$e15); }\n }\n }\n }\n }\n if (s5 !== peg$FAILED) {\n s6 = peg$parse_();\n s7 = peg$parseTry();\n if (s7 !== peg$FAILED) {\n s4 = [s4, s5, s6, s7];\n s3 = s4;\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n }\n peg$savedPos = s0;\n s0 = peg$f14(s1, s2);\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n return s0;\n }\n\n function peg$parseTry() {\n var s0, s1, s2, s3, s4, s5, s6;\n\n s0 = peg$currPos;\n s1 = peg$parseSum();\n if (s1 !== peg$FAILED) {\n s2 = peg$currPos;\n s3 = peg$parse_();\n if (input.substr(peg$currPos, 2) === peg$c14) {\n s4 = peg$c14;\n peg$currPos += 2;\n } else {\n s4 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$e16); }\n }\n if (s4 !== peg$FAILED) {\n s5 = peg$parse_();\n s6 = peg$parseSum();\n if (s6 !== peg$FAILED) {\n s3 = [s3, s4, s5, s6];\n s2 = s3;\n } else {\n peg$currPos = s2;\n s2 = peg$FAILED;\n }\n } else {\n peg$currPos = s2;\n s2 = peg$FAILED;\n }\n if (s2 === peg$FAILED) {\n s2 = null;\n }\n peg$savedPos = s0;\n s0 = peg$f15(s1, s2);\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n return s0;\n }\n\n function peg$parseSum() {\n var s0, s1, s2, s3, s4, s5, s6, s7;\n\n s0 = peg$currPos;\n s1 = peg$parseFactor();\n if (s1 !== peg$FAILED) {\n s2 = [];\n s3 = peg$currPos;\n s4 = peg$parse_();\n if (input.charCodeAt(peg$currPos) === 43) {\n s5 = peg$c15;\n peg$currPos++;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$e17); }\n }\n if (s5 === peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 45) {\n s5 = peg$c16;\n peg$currPos++;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$e18); }\n }\n }\n if (s5 !== peg$FAILED) {\n s6 = peg$parse_();\n s7 = peg$parseFactor();\n if (s7 !== peg$FAILED) {\n s4 = [s4, s5, s6, s7];\n s3 = s4;\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n while (s3 !== peg$FAILED) {\n s2.push(s3);\n s3 = peg$currPos;\n s4 = peg$parse_();\n if (input.charCodeAt(peg$currPos) === 43) {\n s5 = peg$c15;\n peg$currPos++;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$e17); }\n }\n if (s5 === peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 45) {\n s5 = peg$c16;\n peg$currPos++;\n } else {\n s5 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$e18); }\n }\n }\n if (s5 !== peg$FAILED) {\n s6 = peg$parse_();\n s7 = peg$parseFactor();\n if (s7 !== peg$FAILED) {\n s4 = [s4, s5, s6, s7];\n s3 = s4;\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n } else {\n peg$currPos = s3;\n s3 = peg$FAILED;\n }\n }\n peg$savedPos = s0;\n s0 = peg$f16(s1, s2);\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n return s0;\n }\n\n function peg$parseFactor() {\n var s0, s1, s2, s3, s4, s5, s6, s7;\n\n s0 = peg$currPos;\n s1 = peg$parseUnaryExpression();\n if (s1 !== peg$FAILED) {\n s2 = [];\n s3 = peg$currPos;\n s4 = peg$parse_();\n if (input.charCodeAt(peg$currPos) === 4