From 40c41f232f5f6b54775c97410ee24919967a708f Mon Sep 17 00:00:00 2001 From: Lucas Azzola Date: Wed, 14 Jun 2017 02:20:13 +1000 Subject: [PATCH] Website: usability improvements (#2118) * feat(website): use worker thread for formatting * Create index.html Remove step=5 --- .eslintignore | 2 +- docs/index.html | 530 +++--- docs/{ => lib}/index.js | 2555 +++++++++++++++------------ docs/{ => lib}/parser-babylon.js | 6 +- docs/{ => lib}/parser-flow.js | 0 docs/{ => lib}/parser-graphql.js | 0 docs/lib/parser-parse5.js | 9 + docs/{ => lib}/parser-postcss.js | 0 docs/{ => lib}/parser-typescript.js | 4 +- docs/lib/prettier-version.js | 1 + docs/playground.js | 143 ++ docs/worker.js | 53 + scripts/build/build.sh | 13 +- scripts/build/rollup.docs.config.js | 2 +- 14 files changed, 1879 insertions(+), 1439 deletions(-) rename docs/{ => lib}/index.js (86%) rename docs/{ => lib}/parser-babylon.js (99%) rename docs/{ => lib}/parser-flow.js (100%) rename docs/{ => lib}/parser-graphql.js (100%) create mode 100644 docs/lib/parser-parse5.js rename docs/{ => lib}/parser-postcss.js (100%) rename docs/{ => lib}/parser-typescript.js (99%) create mode 100644 docs/lib/prettier-version.js create mode 100644 docs/playground.js create mode 100644 docs/worker.js diff --git a/.eslintignore b/.eslintignore index 433db2c2d..9c30e7767 100644 --- a/.eslintignore +++ b/.eslintignore @@ -1,5 +1,5 @@ !/*.js -/docs/ +/docs/lib/ /tests/**/*.js !/tests/**/jsfmt.spec.js !/**/.eslintrc.js diff --git a/docs/index.html b/docs/index.html index e4816e66f..0b0fbc5ff 100644 --- a/docs/index.html +++ b/docs/index.html @@ -1,150 +1,178 @@ - -Prettier + + + + + + Prettier - + + + + + + + + + + + + - - + + @media (max-width: 500px) { + .tagline { + display: none; + } + } -
- - - -

Opinionated code formatter

- - - GitHub + header a, + header a:visited { + color: #e0e0e0; + } + + header a:focus, + header a:active, + header a:hover { + color: #70a0a0; + } + + .logo { + height: 100px; + } + + .tagline { + flex: 2; + font-weight: 200; + } + + .links { + font-size: 1.3em; + margin-right: 30px; + } + + .editors-container { + display: flex; + flex-grow: 1; + } + + .editors { + display: flex; + flex-flow: row wrap; + flex: 1; + } + + .editor { + min-width: 400px; + display: flex; + flex: 1; + position: relative; + border-top: 1px solid #1A2B34; + } + + .arrow { + align-self: center; + font-size: 1.2em; + } + + .CodeMirror { + height: auto; + position: absolute; + top: 0; + left: 0; + right: 0; + bottom: 0; + font-family: Menlo, monospace; + font-size: 11.05px; + line-height: 17.68px; + } + + .options-container { + display: flex; + flex-flow: row wrap; + justify-content: space-around; + } + + .options { + padding: 0 10px; + display: flex; + flex-flow: column wrap; + flex-grow: 1; + justify-content: space-around; + margin: 5px; + margin-bottom: 0; + min-width: 150px; + } + + label { + font-family: "Consolas", "Courier New", Courier, monospace; + margin: 0 10px; + } + + @media (max-width: 400px) { + label { + padding: 8px; + } + } + + input[type="number"] { + max-width: 40px; + } + + footer { + text-align: center; + } + + + + +
+ + - -
+

Opinionated code formatter

+ + + GitHub + + +
-
-
+
@@ -152,201 +180,51 @@ function require(path) { return window[path.replace(/.+-/, '')]; }
- →
-
-
+
-
-
- Options +
+
+ Options -
-
- - +
+
+ + +
+
+ + + + + +
+
+ + + + +
-
- - - - - -
-
- - - - -
-
-
-
+
+
- + - + -function getOptions() { - var options = {}; - OPTIONS.forEach(function(option) { - var elem = document.getElementById(option); - if (elem.tagName === 'SELECT') { - options[option] = elem.value; - } else if (elem.type === 'number') { - options[option] = Number(elem.value); - } else { - var isInverted = elem.hasAttribute("data-inverted"); - options[option] = isInverted ? !elem.checked : elem.checked; - } - }); - return options; -} - -function omitNonFormatterOptions(options) { - var optionsClone = Object.assign({}, options); - delete optionsClone.doc; - return optionsClone; -} - -function replaceHash(hash) { - if ( - typeof URL === "function" && - typeof history === "object" && - typeof history.replaceState === "function" - ) { - var url = new URL(location); - url.hash = hash; - history.replaceState(null, null, url); - } else { - location.hash = hash; - } -} - -function onceParserLoaded(parser, cb) { - if (window[parser]) { - cb(); - return; - } - - // We can't synchronously insert a script, so we first make sure that the - // parser is loaded before calling format that will require it - var s = document.createElement('script'); - s.src = 'parser-' + parser + '.js'; - s.type = "text/javascript"; - s.onload = cb; - document.getElementsByTagName('head')[0].appendChild(s); -} - -function format() { - var options = getOptions(); - onceParserLoaded(options.parser || 'babylon', function() { - [docEditor, outputEditor].forEach(function(editor) { - editor.setOption( - 'rulers', - [{column: options.printWidth, color: '#444444'}] - ); - }); - document.getElementsByClassName('doc')[0].style.display = options.doc ? 'flex' : 'none'; - - var value = encodeURIComponent( - JSON.stringify( - Object.assign({content: inputEditor.getValue(), options: options}) - ) - ); - replaceHash(value); - var formatterOptions = omitNonFormatterOptions(options); - var res; - try { - res = prettier.format(inputEditor.getValue(), formatterOptions); - } catch (e) { - res = e.toString(); - } - outputEditor.setValue(res); - - if (options.doc) { - var debug; - try { - var doc = prettier.__debug.printToDoc(inputEditor.getValue(), formatterOptions); - debug = prettier.__debug.formatDoc(doc, formatterOptions); - } catch (e) { - debug = e.toString(); - } - docEditor.setValue(debug); - } - }); -} - -document.querySelector('.options-container').onchange = format; - -var editorOptions = { - lineNumbers: true, - keyMap: "sublime", - autoCloseBrackets: true, - matchBrackets: true, - showCursorWhenSelecting: true, - theme: 'neat', - tabWidth: 2 -}; -var inputEditor = CodeMirror.fromTextArea( - document.getElementById('input-editor'), - editorOptions -); -inputEditor.on('change', format); - -var docEditor = CodeMirror.fromTextArea( - document.getElementById('doc-editor'), - {readOnly: true, lineNumbers: false, theme: 'neat'} -); - -var outputEditor = CodeMirror.fromTextArea( - document.getElementById('output-editor'), - {readOnly: true, lineNumbers: true, theme: 'neat'} -); - -document.getElementsByClassName('version')[0].innerText = prettier.version; - -try { - var json = JSON.parse(decodeURIComponent(location.hash.slice(1))); - setOptions(json.options); - inputEditor.setValue(json.content); -} catch (e) { - inputEditor.setValue( - 'hello ( "world"\n);\n\n' + - '[ "lorem", "ipsum", \'dolor\', sit("amet"), consectetur[ \'adipiscing\' ] + "elit" ].reduce(\n (first, second) => first + second,\n "")\n\n' + - 'const Foo = ({ bar, baz, things }) => {\n' + - ' return
\n' + - '
{things.map(thing => reallyLongPleaseDontPutOnOneLine(thing) ?

{ok}

: )\n' + - ' }
}' - ); -} -})(); - - - + + + diff --git a/docs/index.js b/docs/lib/index.js similarity index 86% rename from docs/index.js rename to docs/lib/index.js index 31a233d65..4510ecf69 100644 --- a/docs/index.js +++ b/docs/lib/index.js @@ -13,6 +13,7 @@ function _interopDefault(ex) { } var require$$0 = _interopDefault(require('assert')); +var path = _interopDefault(require('path')); function assertDoc(val) { if (!(typeof val === "string" || val != null && typeof val.type === "string")) { @@ -157,9 +158,9 @@ function isExportDeclaration(node) { return false; } -function getParentExportDeclaration(path) { - var parentNode = path.getParentNode(); - if (path.getName() === "declaration" && isExportDeclaration(parentNode)) { +function getParentExportDeclaration(path$$1) { + var parentNode = path$$1.getParentNode(); + if (path$$1.getName() === "declaration" && isExportDeclaration(parentNode)) { return parentNode; } @@ -345,6 +346,9 @@ function locStart$1(node) { return locStart$1(node.decorators[0]); } + if (node.__location) { + return node.__location.startOffset; + } if (node.range) { return node.range[0]; } @@ -366,6 +370,9 @@ function locEnd$1(node) { loc = lineColumnToIndex(node.source.end, node.source.input.css); } + if (node.__location) { + return node.__location.endOffset; + } if (node.typeAnnotation) { return Math.max(loc, locEnd$1(node.typeAnnotation)); } @@ -1172,15 +1179,15 @@ function printTrailingComment(commentPath, print, options) { return concat([lineSuffix(" " + contents), !isBlock ? breakParent : ""]); } -function printDanglingComments(path, options, sameIndent) { +function printDanglingComments(path$$1, options, sameIndent) { var parts = []; - var node = path.getValue(); + var node = path$$1.getValue(); if (!node || !node.comments) { return ""; } - path.each(function (commentPath) { + path$$1.each(function (commentPath) { var comment = commentPath.getValue(); if (comment && !comment.leading && !comment.trailing) { parts.push(printComment(commentPath, options)); @@ -1197,26 +1204,26 @@ function printDanglingComments(path, options, sameIndent) { return indent(concat([hardline, join(hardline, parts)])); } -function prependCursorPlaceholder(path, options, printed) { - if (path.getNode() === options.cursorNode) { +function prependCursorPlaceholder(path$$1, options, printed) { + if (path$$1.getNode() === options.cursorNode) { return concat([cursor, printed]); } return printed; } -function printComments(path, print, options, needsSemi) { - var value = path.getValue(); - var printed = print(path); +function printComments(path$$1, print, options, needsSemi) { + var value = path$$1.getValue(); + var printed = print(path$$1); var comments = value && value.comments; if (!comments || comments.length === 0) { - return prependCursorPlaceholder(path, options, printed); + return prependCursorPlaceholder(path$$1, options, printed); } var leadingParts = []; var trailingParts = [needsSemi ? ";" : "", printed]; - path.each(function (commentPath) { + path$$1.each(function (commentPath) { var comment = commentPath.getValue(); var leading = comment.leading; var trailing = comment.trailing; @@ -1237,7 +1244,7 @@ function printComments(path, print, options, needsSemi) { } }, "comments"); - return prependCursorPlaceholder(path, options, concat(leadingParts.concat(trailingParts))); + return prependCursorPlaceholder(path$$1, options, concat(leadingParts.concat(trailingParts))); } var comments$1 = { @@ -1256,7 +1263,7 @@ var author = "James Long"; var license = "MIT"; var main = "./index.js"; var dependencies = {}; -var devDependencies = { "babel-cli": "6.24.1", "babel-code-frame": "7.0.0-alpha.12", "babel-preset-es2015": "6.24.1", "babylon": "7.0.0-beta.10", "chalk": "1.1.3", "cross-spawn": "5.1.0", "diff": "3.2.0", "eslint": "3.19.0", "eslint-plugin-prettier": "2.1.1", "esutils": "2.0.2", "flow-parser": "0.47.0", "get-stdin": "5.0.1", "glob": "7.1.2", "graphql": "0.10.1", "jest": "20.0.0", "jest-validate": "20.0.3", "minimist": "1.2.0", "mkdirp": "^0.5.1", "postcss": "^6.0.1", "postcss-less": "^1.0.0", "postcss-media-query-parser": "0.2.3", "postcss-scss": "1.0.0", "postcss-selector-parser": "2.2.3", "postcss-values-parser": "git://github.com/shellscape/postcss-values-parser.git#5e351360479116f3fe309602cdd15b0a233bc29f", "prettier": "1.4.2", "rimraf": "2.6.1", "rollup": "0.41.1", "rollup-plugin-commonjs": "7.0.0", "rollup-plugin-json": "2.1.0", "rollup-plugin-node-builtins": "2.0.0", "rollup-plugin-node-globals": "1.1.0", "rollup-plugin-node-resolve": "2.0.0", "rollup-plugin-replace": "1.1.1", "typescript": "2.3.4", "typescript-eslint-parser": "git://github.com/eslint/typescript-eslint-parser.git#806251524424e3ad91e750da0f76b8de25ed0b42", "uglify-es": "3.0.15", "webpack": "2.6.1" }; +var devDependencies = { "babel-cli": "6.24.1", "babel-code-frame": "7.0.0-alpha.12", "babel-preset-es2015": "6.24.1", "babylon": "7.0.0-beta.10", "chalk": "1.1.3", "cross-spawn": "5.1.0", "diff": "3.2.0", "eslint": "3.19.0", "eslint-plugin-prettier": "2.1.1", "esutils": "2.0.2", "flow-parser": "0.47.0", "get-stdin": "5.0.1", "glob": "7.1.2", "graphql": "0.10.1", "jest": "20.0.0", "jest-validate": "20.0.3", "minimist": "1.2.0", "mkdirp": "^0.5.1", "parse5": "3.0.2", "postcss": "^6.0.1", "postcss-less": "^1.0.0", "postcss-media-query-parser": "0.2.3", "postcss-scss": "1.0.0", "postcss-selector-parser": "2.2.3", "postcss-values-parser": "git://github.com/shellscape/postcss-values-parser.git#5e351360479116f3fe309602cdd15b0a233bc29f", "prettier": "1.4.2", "rimraf": "2.6.1", "rollup": "0.41.1", "rollup-plugin-commonjs": "7.0.0", "rollup-plugin-json": "2.1.0", "rollup-plugin-node-builtins": "2.0.0", "rollup-plugin-node-globals": "1.1.0", "rollup-plugin-node-resolve": "2.0.0", "rollup-plugin-replace": "1.1.1", "typescript": "2.3.4", "typescript-eslint-parser": "git://github.com/eslint/typescript-eslint-parser.git#806251524424e3ad91e750da0f76b8de25ed0b42", "uglify-es": "3.0.15", "webpack": "2.6.1" }; var scripts = { "test": "jest", "test-integration": "jest tests_integration", "lint": "eslint .", "build": "./scripts/build/build.sh" }; var jest = { "setupFiles": ["/tests_config/run_spec.js"], "snapshotSerializers": ["/tests_config/raw-serializer.js"], "testRegex": "jsfmt\\.spec\\.js$|__tests__/.*\\.js$", "testPathIgnorePatterns": ["tests/new_react", "tests/more_react"] }; var _package = { @@ -1319,8 +1326,8 @@ FastPath$1.prototype.getValue = function getValue() { return s[s.length - 1]; }; -function getNodeHelper(path, count) { - var s = path.stack; +function getNodeHelper(path$$1, count) { + var s = path$$1.stack; for (var i = s.length - 1; i >= 0; i -= 2) { var value = s[i]; @@ -1420,7 +1427,7 @@ FastPath$1.prototype.map = function map(callback /*, name1, name2, ... */) { return result; }; -FastPath$1.prototype.needsParens = function () { +FastPath$1.prototype.needsParens = function (options) { var _this = this; var parent = this.getParentNode(); @@ -1598,6 +1605,18 @@ FastPath$1.prototype.needsParens = function () { return false; } + case "TSParenthesizedType": + { + if ((parent.type === "VariableDeclarator" || parent.type === "TypeAnnotation" || parent.type === "GenericTypeAnnotation") && node.typeAnnotation.type === "TypeAnnotation" && node.typeAnnotation.typeAnnotation.type !== "TSFunctionType") { + return false; + } + // Delegate to inner TSParenthesizedType + if (node.typeAnnotation.type === "TSParenthesizedType") { + return false; + } + return true; + } + case "SequenceExpression": switch (parent.type) { case "ReturnStatement": @@ -1664,7 +1683,10 @@ FastPath$1.prototype.needsParens = function () { case "StringLiteral": case "NumericLiteral": case "Literal": - if (typeof node.value === "string" && parent.type === "ExpressionStatement" && !parent.directive) { + if (typeof node.value === "string" && parent.type === "ExpressionStatement" && ( + // TypeScript workaround for eslint/typescript-eslint-parser#267 + // See corresponding workaround in printer.js case: "Literal" + options.parser !== "typescript" && !parent.directive || options.parser === "typescript" && options.originalText.substr(util$5.locStart(node) - 1, 1) === "(")) { // To avoid becoming a directive var grandParent = this.getParentNode(1); @@ -1783,6 +1805,25 @@ function createCommonjsModule(fn, module) { return module = { exports: {} }, fn(module, module.exports), module.exports; } +var index$4 = createCommonjsModule(function (module, exports) { + // Copyright 2014, 2015, 2016, 2017 Simon Lydell + // License: MIT. (See LICENSE.) + + Object.defineProperty(exports, "__esModule", { + value: true + }); + + // This regex comes from regex.coffee, and is inserted here by generate-index.js + // (run `npm run build`). + exports.default = /((['"])(?:(?!\2|\\).|\\(?:\r\n|[\s\S]))*(\2)?|`(?:[^`\\$]|\\[\s\S]|\$(?!\{)|\$\{(?:[^{}]|\{[^}]*\}?)*\}?)*(`)?)|(\/\/.*)|(\/\*(?:[^*]|\*(?!\/))*(\*\/)?)|(\/(?!\*)(?:\[(?:(?![\]\\]).|\\.)*\]|(?![\/\]\\]).|\\.)+\/(?:(?!\s*(?:\b|[\u0080-\uFFFF$\\'"~({]|[+\-!](?!=)|\.?\d))|[gmiyu]{1,5}\b(?![\u0080-\uFFFF$\\]|\s*(?:[+\-*%&|^<>!=?({]|\/(?![\/*])))))|(0[xX][\da-fA-F]+|0[oO][0-7]+|0[bB][01]+|(?:\d*\.\d+|\d+\.?)(?:[eE][+-]?\d+)?)|((?!\d)(?:(?!\s)[$\w\u0080-\uFFFF]|\\u[\da-fA-F]{4}|\\u\{[\da-fA-F]+\})+)|(--|\+\+|&&|\|\||=>|\.{3}|(?:[+\-\/%&|^]|\*{1,2}|<{1,2}|>{1,3}|!=?|={1,2})=?|[?~.,:;[\](){}])|(\s+)|(^$|[\s\S])/g; + + exports.matchToToken = function (match) { + var token = { type: "invalid", value: match[0] }; + if (match[1]) token.type = "string", token.closed = !!(match[3] || match[4]);else if (match[5]) token.type = "comment";else if (match[6]) token.type = "comment", token.closed = !!match[7];else if (match[8]) token.type = "regex";else if (match[9]) token.type = "number";else if (match[10]) token.type = "name";else if (match[11]) token.type = "punctuator";else if (match[12]) token.type = "whitespace"; + return token; + }; +}); + var ast = createCommonjsModule(function (module) { /* Copyright (C) 2013 Yusuke Suzuki @@ -2272,6 +2313,714 @@ var utils = createCommonjsModule(function (module, exports) { /* vim: set sw=4 ts=4 et tw=80 : */ }); +var matchOperatorsRe = /[|\\{}()[\]^$+*?.]/g; + +var index$8 = function index$8(str) { + if (typeof str !== 'string') { + throw new TypeError('Expected a string'); + } + + return str.replace(matchOperatorsRe, '\\$&'); +}; + +var index$10 = createCommonjsModule(function (module) { + 'use strict'; + + function assembleStyles() { + var styles = { + modifiers: { + reset: [0, 0], + bold: [1, 22], // 21 isn't widely supported and 22 does the same thing + dim: [2, 22], + italic: [3, 23], + underline: [4, 24], + inverse: [7, 27], + hidden: [8, 28], + strikethrough: [9, 29] + }, + colors: { + black: [30, 39], + red: [31, 39], + green: [32, 39], + yellow: [33, 39], + blue: [34, 39], + magenta: [35, 39], + cyan: [36, 39], + white: [37, 39], + gray: [90, 39] + }, + bgColors: { + bgBlack: [40, 49], + bgRed: [41, 49], + bgGreen: [42, 49], + bgYellow: [43, 49], + bgBlue: [44, 49], + bgMagenta: [45, 49], + bgCyan: [46, 49], + bgWhite: [47, 49] + } + }; + + // fix humans + styles.colors.grey = styles.colors.gray; + + Object.keys(styles).forEach(function (groupName) { + var group = styles[groupName]; + + Object.keys(group).forEach(function (styleName) { + var style = group[styleName]; + + styles[styleName] = group[styleName] = { + open: '\x1B[' + style[0] + 'm', + close: '\x1B[' + style[1] + 'm' + }; + }); + + Object.defineProperty(styles, groupName, { + value: group, + enumerable: false + }); + }); + + return styles; + } + + Object.defineProperty(module, 'exports', { + enumerable: true, + get: assembleStyles + }); +}); + +var index$14 = function index$14() { + return (/[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-PRZcf-nqry=><]/g + ); +}; + +var ansiRegex = index$14(); + +var index$12 = function index$12(str) { + return typeof str === 'string' ? str.replace(ansiRegex, '') : str; +}; + +var ansiRegex$1 = index$14; +var re = new RegExp(ansiRegex$1().source); // remove the `g` flag +var index$16 = re.test.bind(re); + +var argv = process.argv; + +var terminator = argv.indexOf('--'); +var hasFlag = function hasFlag(flag) { + flag = '--' + flag; + var pos = argv.indexOf(flag); + return pos !== -1 && (terminator !== -1 ? pos < terminator : true); +}; + +var index$18 = function () { + if ('FORCE_COLOR' in process.env) { + return true; + } + + if (hasFlag('no-color') || hasFlag('no-colors') || hasFlag('color=false')) { + return false; + } + + if (hasFlag('color') || hasFlag('colors') || hasFlag('color=true') || hasFlag('color=always')) { + return true; + } + + if (process.stdout && !process.stdout.isTTY) { + return false; + } + + if (process.platform === 'win32') { + return true; + } + + if ('COLORTERM' in process.env) { + return true; + } + + if (process.env.TERM === 'dumb') { + return false; + } + + if (/^screen|^xterm|^vt100|color|ansi|cygwin|linux/i.test(process.env.TERM)) { + return true; + } + + return false; +}(); + +var escapeStringRegexp = index$8; +var ansiStyles = index$10; +var stripAnsi = index$12; +var hasAnsi = index$16; +var supportsColor = index$18; +var defineProps = Object.defineProperties; +var isSimpleWindowsTerm = process.platform === 'win32' && !/^xterm/i.test(process.env.TERM); + +function Chalk(options) { + // detect mode if not set manually + this.enabled = !options || options.enabled === undefined ? supportsColor : options.enabled; +} + +// use bright blue on Windows as the normal blue color is illegible +if (isSimpleWindowsTerm) { + ansiStyles.blue.open = '\x1B[94m'; +} + +var styles = function () { + var ret = {}; + + Object.keys(ansiStyles).forEach(function (key) { + ansiStyles[key].closeRe = new RegExp(escapeStringRegexp(ansiStyles[key].close), 'g'); + + ret[key] = { + get: function get() { + return build.call(this, this._styles.concat(key)); + } + }; + }); + + return ret; +}(); + +var proto = defineProps(function chalk() {}, styles); + +function build(_styles) { + var builder = function builder() { + return applyStyle.apply(builder, arguments); + }; + + builder._styles = _styles; + builder.enabled = this.enabled; + // __proto__ is used because we must return a function, but there is + // no way to create a function with a different prototype. + /* eslint-disable no-proto */ + builder.__proto__ = proto; + + return builder; +} + +function applyStyle() { + // support varags, but simply cast to string in case there's only one arg + var args = arguments; + var argsLen = args.length; + var str = argsLen !== 0 && String(arguments[0]); + + if (argsLen > 1) { + // don't slice `arguments`, it prevents v8 optimizations + for (var a = 1; a < argsLen; a++) { + str += ' ' + args[a]; + } + } + + if (!this.enabled || !str) { + return str; + } + + var nestedStyles = this._styles; + var i = nestedStyles.length; + + // Turns out that on Windows dimmed gray text becomes invisible in cmd.exe, + // see https://github.com/chalk/chalk/issues/58 + // If we're on Windows and we're dealing with a gray color, temporarily make 'dim' a noop. + var originalDim = ansiStyles.dim.open; + if (isSimpleWindowsTerm && (nestedStyles.indexOf('gray') !== -1 || nestedStyles.indexOf('grey') !== -1)) { + ansiStyles.dim.open = ''; + } + + while (i--) { + var code = ansiStyles[nestedStyles[i]]; + + // Replace any instances already present with a re-opening code + // otherwise only the part of the string until said closing code + // will be colored, and the rest will simply be 'plain'. + str = code.open + str.replace(code.closeRe, code.open) + code.close; + } + + // Reset the original 'dim' if we changed it to work around the Windows dimmed gray issue. + ansiStyles.dim.open = originalDim; + + return str; +} + +function init() { + var ret = {}; + + Object.keys(styles).forEach(function (name) { + ret[name] = { + get: function get() { + return build.call(this, [name]); + } + }; + }); + + return ret; +} + +defineProps(Chalk.prototype, init()); + +var index$6 = new Chalk(); +var styles_1 = ansiStyles; +var hasColor = hasAnsi; +var stripColor = stripAnsi; +var supportsColor_1 = supportsColor; + +index$6.styles = styles_1; +index$6.hasColor = hasColor; +index$6.stripColor = stripColor; +index$6.supportsColor = supportsColor_1; + +var index$2 = createCommonjsModule(function (module, exports) { + "use strict"; + + exports.__esModule = true; + exports.codeFrameColumns = codeFrameColumns; + + exports.default = function (rawLines, lineNumber, colNumber) { + var opts = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {}; + + if (!deprecationWarningShown) { + deprecationWarningShown = true; + + var deprecationError = new Error("Passing lineNumber and colNumber is deprecated to babel-code-frame. Please use `codeFrameColumns`."); + deprecationError.name = "DeprecationWarning"; + + if (process.emitWarning) { + process.emitWarning(deprecationError); + } else { + console.warn(deprecationError); + } + } + + colNumber = Math.max(colNumber, 0); + + var location = { start: { column: colNumber, line: lineNumber } }; + + return codeFrameColumns(rawLines, location, opts); + }; + + var _jsTokens = index$4; + + var _jsTokens2 = _interopRequireDefault(_jsTokens); + + var _esutils = utils; + + var _esutils2 = _interopRequireDefault(_esutils); + + var _chalk = index$6; + + var _chalk2 = _interopRequireDefault(_chalk); + + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { default: obj }; + } + + var deprecationWarningShown = false; + + function getDefs(chalk) { + return { + keyword: chalk.cyan, + capitalized: chalk.yellow, + jsx_tag: chalk.yellow, + punctuator: chalk.yellow, + + number: chalk.magenta, + string: chalk.green, + regex: chalk.magenta, + comment: chalk.grey, + invalid: chalk.white.bgRed.bold, + gutter: chalk.grey, + marker: chalk.red.bold + }; + } + + var NEWLINE = /\r\n|[\n\r\u2028\u2029]/; + + var JSX_TAG = /^[a-z][\w-]*$/i; + + var BRACKET = /^[()\[\]{}]$/; + + function getTokenType(match) { + var _match$slice = match.slice(-2), + offset = _match$slice[0], + text = _match$slice[1]; + + var token = (0, _jsTokens.matchToToken)(match); + + if (token.type === "name") { + if (_esutils2.default.keyword.isReservedWordES6(token.value)) { + return "keyword"; + } + + if (JSX_TAG.test(token.value) && (text[offset - 1] === "<" || text.substr(offset - 2, 2) == " 2 && arguments[2] !== undefined ? arguments[2] : {}; + + var highlighted = opts.highlightCode && _chalk2.default.supportsColor || opts.forceColor; + var chalk = _chalk2.default; + if (opts.forceColor) { + chalk = new _chalk2.default.constructor({ enabled: true }); + } + var maybeHighlight = function maybeHighlight(chalkFn, string) { + return highlighted ? chalkFn(string) : string; + }; + var defs = getDefs(chalk); + if (highlighted) rawLines = highlight(defs, rawLines); + + var lines = rawLines.split(NEWLINE); + + var _getMarkerLines = getMarkerLines(loc, lines, opts), + start = _getMarkerLines.start, + end = _getMarkerLines.end, + markerLines = _getMarkerLines.markerLines; + + var numberMaxWidth = String(end).length; + + var frame = lines.slice(start, end).map(function (line, index) { + var number = start + 1 + index; + var paddedNumber = (" " + number).slice(-numberMaxWidth); + var gutter = " " + paddedNumber + " | "; + var hasMarker = markerLines[number]; + if (hasMarker) { + var markerLine = ""; + if (Array.isArray(hasMarker)) { + var markerSpacing = line.slice(0, Math.max(hasMarker[0] - 1, 0)).replace(/[^\t]/g, " "); + var numberOfMarkers = hasMarker[1] || 1; + + markerLine = ["\n ", maybeHighlight(defs.gutter, gutter.replace(/\d/g, " ")), markerSpacing, maybeHighlight(defs.marker, "^").repeat(numberOfMarkers)].join(""); + } + return [maybeHighlight(defs.marker, ">"), maybeHighlight(defs.gutter, gutter), line, markerLine].join(""); + } else { + return " " + maybeHighlight(defs.gutter, gutter) + line; + } + }).join("\n"); + + if (highlighted) { + return chalk.reset(frame); + } else { + return frame; + } + } +}); + +var path$1 = path; + +var parsers = { + get flow() { + return eval("require")("./parser-flow"); + }, + get graphql() { + return eval("require")("./parser-graphql"); + }, + get parse5() { + return eval("require")("./parser-parse5"); + }, + get babylon() { + return eval("require")("./parser-babylon"); + }, + get typescript() { + return eval("require")("./parser-typescript"); + }, + get postcss() { + return eval("require")("./parser-postcss"); + } +}; + +function resolveParseFunction(opts) { + if (typeof opts.parser === "function") { + return opts.parser; + } + if (typeof opts.parser === "string") { + if (parsers.hasOwnProperty(opts.parser)) { + return parsers[opts.parser]; + } + try { + return eval("require")(path$1.resolve(process.cwd(), opts.parser)); + } catch (err) { + throw new Error('Couldn\'t resolve parser "' + opts.parser + '"'); + } + } + return parsers.babylon; +} + +function parse(text, opts) { + var parseFunction = resolveParseFunction(opts); + + try { + return parseFunction(text, parsers, opts); + } catch (error) { + var loc = error.loc; + + if (loc) { + var codeFrame = index$2; + error.codeFrame = codeFrame.codeFrameColumns(text, loc, { + highlightCode: true + }); + error.message += "\n" + error.codeFrame; + throw error; + } + + throw error.stack; + } +} + +var parser$1 = { parse: parse }; + +var util$6 = util$2; +var docBuilders$4 = docBuilders$1; +var indent$3 = docBuilders$4.indent; +var hardline$3 = docBuilders$4.hardline; +var softline$2 = docBuilders$4.softline; +var concat$3 = docBuilders$4.concat; + +function printSubtree(subtreeParser, options) { + var next = Object.assign({}, { transformDoc: function transformDoc(doc) { + return doc; + } }, subtreeParser); + next.options = Object.assign({}, options, next.options); + var ast = parser$1.parse(next.text, next.options); + var nextDoc = printer.printAstToDoc(ast, next.options); + return next.transformDoc(nextDoc); +} + +/** + * @returns {{ text, options?, transformDoc? } | void} + */ +function getSubtreeParser(path$$1, options) { + switch (options.parser) { + case "parse5": + return fromHtmlParser2(path$$1, options); + case "babylon": + case "flow": + case "typescript": + return fromBabylonFlowOrTypeScript(path$$1, options); + } +} + +function fromBabylonFlowOrTypeScript(path$$1) { + var node = path$$1.getValue(); + + switch (node.type) { + case "TemplateElement": + { + var parent = path$$1.getParentNode(); + var parentParent = path$$1.getParentNode(1); + var parentParentParent = path$$1.getParentNode(2); + + /* + * styled-jsx: + * ```jsx + * + * ``` + */ + if (parentParentParent && parent.quasis && parent.quasis.length === 1 && parentParent.type === "JSXExpressionContainer" && parentParentParent.type === "JSXElement" && parentParentParent.openingElement.name.name === "style" && parentParentParent.openingElement.attributes.some(function (attribute) { + return attribute.name.name === "jsx"; + })) { + return { + options: { parser: "postcss" }, + transformDoc: function transformDoc(doc) { + return concat$3([indent$3(concat$3([softline$2, stripTrailingHardline(doc)])), softline$2]); + }, + text: parent.quasis[0].value.raw + }; + } + + /* + * styled-components: + * styled.button`color: red` + * Foo.extend`color: red` + */ + if (parentParent && parentParent.type === "TaggedTemplateExpression" && parent.quasis.length === 1 && parentParent.tag.type === "MemberExpression" && (parentParent.tag.object.name === "styled" || /^[A-Z]/.test(parentParent.tag.object.name) && parentParent.tag.property.name === "extend")) { + return { + options: { parser: "postcss" }, + transformDoc: function transformDoc(doc) { + return concat$3([indent$3(concat$3([softline$2, stripTrailingHardline(doc)])), softline$2]); + }, + text: parent.quasis[0].value.raw + }; + } + + /* + * react-relay and graphql-tag + * graphql`...` + * graphql.experimental`...` + * gql`...` + */ + if (parentParent && parentParent.type === "TaggedTemplateExpression" && parent.quasis.length === 1 && ( + // ((parentParent.tag.type === "MemberExpression" && + // parentParent.tag.object.name === "Relay" && + // parentParent.tag.property.name === "QL") || + parentParent.tag.type === "MemberExpression" && parentParent.tag.object.name === "graphql" && parentParent.tag.property.name === "experimental" || parentParent.tag.type === "Identifier" && (parentParent.tag.name === "gql" || parentParent.tag.name === "graphql"))) { + return { + options: { parser: "graphql" }, + transformDoc: function transformDoc(doc) { + return concat$3([indent$3(concat$3([softline$2, doc])), softline$2]); + }, + text: parent.quasis[0].value.raw + }; + } + + break; + } + } +} + +function fromHtmlParser2(path$$1, options) { + var node = path$$1.getValue(); + + switch (node.type) { + case "text": + { + var parent = path$$1.getParentNode(); + // Inline JavaScript + if (parent.type === "script" && (!parent.attribs.lang && !parent.attribs.lang || parent.attribs.type === "text/javascript" || parent.attribs.type === "application/javascript")) { + var _parser = options.parser === "flow" ? "flow" : "babylon"; + return { + options: { parser: _parser }, + transformDoc: function transformDoc(doc) { + return concat$3([hardline$3, doc]); + }, + text: getText(options, node) + }; + } + + // Inline TypeScript + if (parent.type === "script" && (parent.attribs.type === "application/x-typescript" || parent.attribs.lang === "ts")) { + return { + options: { parser: "typescript" }, + transformDoc: function transformDoc(doc) { + return concat$3([hardline$3, doc]); + }, + text: getText(options, node) + }; + } + + // Inline Styles + if (parent.type === "style") { + return { + options: { parser: "postcss" }, + transformDoc: function transformDoc(doc) { + return concat$3([hardline$3, stripTrailingHardline(doc)]); + }, + text: getText(options, node) + }; + } + + break; + } + } +} + +function getText(options, node) { + return options.originalText.slice(util$6.locStart(node), util$6.locEnd(node)); +} + +function stripTrailingHardline(doc) { + // HACK remove ending hardline, original PR: #1984 + if (doc.type === "concat" && doc.parts[0].type === "concat" && doc.parts[0].parts.length === 2 && doc.parts[0].parts[1] === hardline$3) { + return doc.parts[0].parts[0]; + } + return doc; +} + +var multiparser$1 = { + getSubtreeParser: getSubtreeParser, + printSubtree: printSubtree +}; + function traverseDoc(doc, onEnter, onExit, shouldTraverseConditionalGroups) { function traverseDocRec(doc) { var shouldRecurse = true; @@ -2423,18 +3172,18 @@ var docUtils$1 = { propagateBreaks: propagateBreaks }; -var docBuilders$4 = docBuilders$1; -var concat$3 = docBuilders$4.concat; -var join$3 = docBuilders$4.join; -var hardline$3 = docBuilders$4.hardline; -var line$2 = docBuilders$4.line; -var softline$2 = docBuilders$4.softline; -var group$2 = docBuilders$4.group; -var indent$3 = docBuilders$4.indent; -var ifBreak$2 = docBuilders$4.ifBreak; +var docBuilders$5 = docBuilders$1; +var concat$4 = docBuilders$5.concat; +var join$3 = docBuilders$5.join; +var hardline$4 = docBuilders$5.hardline; +var line$2 = docBuilders$5.line; +var softline$3 = docBuilders$5.softline; +var group$2 = docBuilders$5.group; +var indent$4 = docBuilders$5.indent; +var ifBreak$2 = docBuilders$5.ifBreak; -function genericPrint$1(path, options, print) { - var n = path.getValue(); +function genericPrint$1(path$$1, options, print) { + var n = path$$1.getValue(); if (!n) { return ""; } @@ -2446,23 +3195,23 @@ function genericPrint$1(path, options, print) { switch (n.kind) { case "Document": { - return join$3(concat$3([hardline$3, hardline$3]), path.map(print, "definitions")); + return join$3(concat$4([hardline$4, hardline$4]), path$$1.map(print, "definitions")); } case "OperationDefinition": { - return concat$3([n.name === null ? "" : n.operation, n.name ? concat$3([" ", path.call(print, "name")]) : "", n.variableDefinitions && n.variableDefinitions.length ? group$2(concat$3(["(", indent$3(concat$3([softline$2, join$3(concat$3([",", ifBreak$2("", " "), softline$2]), path.map(print, "variableDefinitions"))])), softline$2, ")"])) : "", printDirectives(path, print, n), n.selectionSet ? n.name === null ? "" : " " : "", path.call(print, "selectionSet")]); + return concat$4([n.name === null ? "" : n.operation, n.name ? concat$4([" ", path$$1.call(print, "name")]) : "", n.variableDefinitions && n.variableDefinitions.length ? group$2(concat$4(["(", indent$4(concat$4([softline$3, join$3(concat$4([",", ifBreak$2("", " "), softline$3]), path$$1.map(print, "variableDefinitions"))])), softline$3, ")"])) : "", printDirectives(path$$1, print, n), n.selectionSet ? n.name === null ? "" : " " : "", path$$1.call(print, "selectionSet")]); } case "FragmentDefinition": { - return concat$3(["fragment ", path.call(print, "name"), " on ", path.call(print, "typeCondition"), printDirectives(path, print, n), " ", path.call(print, "selectionSet")]); + return concat$4(["fragment ", path$$1.call(print, "name"), " on ", path$$1.call(print, "typeCondition"), printDirectives(path$$1, print, n), " ", path$$1.call(print, "selectionSet")]); } case "SelectionSet": { - return concat$3(["{", indent$3(concat$3([hardline$3, join$3(hardline$3, path.map(print, "selections"))])), hardline$3, "}"]); + return concat$4(["{", indent$4(concat$4([hardline$4, join$3(hardline$4, path$$1.map(print, "selections"))])), hardline$4, "}"]); } case "Field": { - return group$2(concat$3([n.alias ? concat$3([path.call(print, "alias"), ": "]) : "", path.call(print, "name"), n.arguments.length > 0 ? group$2(concat$3(["(", indent$3(concat$3([softline$2, join$3(concat$3([",", ifBreak$2("", " "), softline$2]), path.map(print, "arguments"))])), softline$2, ")"])) : "", printDirectives(path, print, n), n.selectionSet ? " " : "", path.call(print, "selectionSet")])); + return group$2(concat$4([n.alias ? concat$4([path$$1.call(print, "alias"), ": "]) : "", path$$1.call(print, "name"), n.arguments.length > 0 ? group$2(concat$4(["(", indent$4(concat$4([softline$3, join$3(concat$4([",", ifBreak$2("", " "), softline$3]), path$$1.map(print, "arguments"))])), softline$3, ")"])) : "", printDirectives(path$$1, print, n), n.selectionSet ? " " : "", path$$1.call(print, "selectionSet")])); } case "Name": { @@ -2470,7 +3219,7 @@ function genericPrint$1(path, options, print) { } case "StringValue": { - return concat$3(['"', n.value, '"']); + return concat$4(['"', n.value, '"']); } case "IntValue": case "FloatValue": @@ -2488,50 +3237,60 @@ function genericPrint$1(path, options, print) { } case "Variable": { - return concat$3(["$", path.call(print, "name")]); + return concat$4(["$", path$$1.call(print, "name")]); } case "ListValue": { - return group$2(concat$3(["[", indent$3(concat$3([softline$2, join$3(concat$3([",", ifBreak$2("", " "), softline$2]), path.map(print, "values"))])), softline$2, "]"])); + return group$2(concat$4(["[", indent$4(concat$4([softline$3, join$3(concat$4([",", ifBreak$2("", " "), softline$3]), path$$1.map(print, "values"))])), softline$3, "]"])); } case "ObjectValue": { - return group$2(concat$3(["{", n.fields.length > 0 ? " " : "", indent$3(concat$3([softline$2, join$3(concat$3([",", ifBreak$2("", " "), softline$2]), path.map(print, "fields"))])), softline$2, ifBreak$2("", n.fields.length > 0 ? " " : ""), "}"])); + return group$2(concat$4(["{", n.fields.length > 0 ? " " : "", indent$4(concat$4([softline$3, join$3(concat$4([",", ifBreak$2("", " "), softline$3]), path$$1.map(print, "fields"))])), softline$3, ifBreak$2("", n.fields.length > 0 ? " " : ""), "}"])); } case "ObjectField": case "Argument": { - return concat$3([path.call(print, "name"), ": ", path.call(print, "value")]); + return concat$4([path$$1.call(print, "name"), ": ", path$$1.call(print, "value")]); } case "Directive": { - return concat$3(["@", path.call(print, "name"), n.arguments.length > 0 ? group$2(concat$3(["(", indent$3(concat$3([softline$2, join$3(concat$3([",", ifBreak$2("", " "), softline$2]), path.map(print, "arguments"))])), softline$2, ")"])) : ""]); + return concat$4(["@", path$$1.call(print, "name"), n.arguments.length > 0 ? group$2(concat$4(["(", indent$4(concat$4([softline$3, join$3(concat$4([",", ifBreak$2("", " "), softline$3]), path$$1.map(print, "arguments"))])), softline$3, ")"])) : ""]); } case "NamedType": { - return path.call(print, "name"); + return path$$1.call(print, "name"); } case "VariableDefinition": { - return concat$3([path.call(print, "variable"), ": ", path.call(print, "type"), n.defaultValue ? concat$3([" = ", path.call(print, "defaultValue")]) : ""]); + return concat$4([path$$1.call(print, "variable"), ": ", path$$1.call(print, "type"), n.defaultValue ? concat$4([" = ", path$$1.call(print, "defaultValue")]) : ""]); } case "FragmentSpread": { - return concat$3(["...", path.call(print, "name"), printDirectives(path, print, n)]); + return concat$4(["...", path$$1.call(print, "name"), printDirectives(path$$1, print, n)]); } case "InlineFragment": { - return concat$3(["...", n.typeCondition ? concat$3([" on ", path.call(print, "typeCondition")]) : "", printDirectives(path, print, n), " ", path.call(print, "selectionSet")]); + return concat$4(["...", n.typeCondition ? concat$4([" on ", path$$1.call(print, "typeCondition")]) : "", printDirectives(path$$1, print, n), " ", path$$1.call(print, "selectionSet")]); } case "UnionTypeDefinition": { - return group$2(concat$3(["union ", path.call(print, "name"), " =", ifBreak$2("", " "), indent$3(concat$3([ifBreak$2(concat$3([line$2, " "])), join$3(concat$3([line$2, "| "]), path.map(print, "types"))]))])); + return group$2(concat$4(["union ", path$$1.call(print, "name"), " =", ifBreak$2("", " "), indent$4(concat$4([ifBreak$2(concat$4([line$2, " "])), join$3(concat$4([line$2, "| "]), path$$1.map(print, "types"))]))])); + } + + case "NonNullType": + { + return concat$4([path$$1.call(print, "type"), "!"]); + } + + case "ListType": + { + return concat$4(["[", path$$1.call(print, "type"), "]"]); } default: @@ -2539,28 +3298,120 @@ function genericPrint$1(path, options, print) { } } -function printDirectives(path, print, n) { +function printDirectives(path$$1, print, n) { if (n.directives.length === 0) { return ""; } - return concat$3([" ", group$2(indent$3(concat$3([softline$2, join$3(concat$3([ifBreak$2("", " "), softline$2]), path.map(print, "directives"))])))]); + return concat$4([" ", group$2(indent$4(concat$4([softline$3, join$3(concat$4([ifBreak$2("", " "), softline$3]), path$$1.map(print, "directives"))])))]); } var printerGraphql = genericPrint$1; -var util$6 = util$2; -var docBuilders$5 = docBuilders$1; -var concat$4 = docBuilders$5.concat; -var join$4 = docBuilders$5.join; -var line$3 = docBuilders$5.line; -var hardline$4 = docBuilders$5.hardline; -var softline$3 = docBuilders$5.softline; -var group$3 = docBuilders$5.group; -var indent$4 = docBuilders$5.indent; +var util$7 = util$2; +var docBuilders$6 = docBuilders$1; +var concat$5 = docBuilders$6.concat; +var join$4 = docBuilders$6.join; +var hardline$5 = docBuilders$6.hardline; +// const line = docBuilders.line; +var softline$4 = docBuilders$6.softline; +var group$3 = docBuilders$6.group; +var indent$5 = docBuilders$6.indent; +// const ifBreak = docBuilders.ifBreak; -function genericPrint$2(path, options, print) { - var n = path.getValue(); +// http://w3c.github.io/html/single-page.html#void-elements +var voidTags = { + area: true, + base: true, + br: true, + col: true, + embed: true, + hr: true, + img: true, + input: true, + link: true, + meta: true, + param: true, + source: true, + track: true, + wbr: true +}; + +function genericPrint$2(path$$1, options, print) { + var n = path$$1.getValue(); + if (!n) { + return ""; + } + + if (typeof n === "string") { + return n; + } + + switch (n.type) { + case "root": + { + return concat$5(path$$1.map(print, "children")); + } + case "directive": + { + return concat$5(["<", n.data, ">", hardline$5]); + } + case "text": + { + return n.data.replace(/\s+/g, " ").trim(); + } + case "script": + case "style": + case "tag": + { + var selfClose = voidTags[n.name] ? ">" : " />"; + + var children = []; + path$$1.each(function (childPath) { + var child = childPath.getValue(); + if (child.type !== "text") { + children.push(softline$4); + } + children.push(childPath.call(print)); + }, "children"); + + var _hasNewline = util$7.hasNewlineInRange(options.originalText, util$7.locStart(n), util$7.locEnd(n)); + + return group$3(concat$5([_hasNewline ? hardline$5 : "", "<", n.name, printAttributes(n.attribs), n.children.length ? ">" : selfClose, n.name.toLowerCase() === "html" ? concat$5(children) : indent$5(concat$5(children)), n.children.length ? concat$5([softline$4, ""]) : ""])); + } + case "comment": + { + return concat$5([""]); + } + default: + throw new Error("unknown htmlparser2 type: " + n.type); + } +} + +function printAttributes(attribs) { + var attributeKeys = Object.keys(attribs); + return concat$5([attributeKeys.length ? " " : "", join$4(" ", attributeKeys.map(function (name) { + if (attribs[name] === "") { + return name; + } + return concat$5([name, '="', attribs[name], '"']); + }))]); +} + +var printerHtmlparser2 = genericPrint$2; + +var util$8 = util$2; +var docBuilders$7 = docBuilders$1; +var concat$6 = docBuilders$7.concat; +var join$5 = docBuilders$7.join; +var line$3 = docBuilders$7.line; +var hardline$6 = docBuilders$7.hardline; +var softline$5 = docBuilders$7.softline; +var group$4 = docBuilders$7.group; +var indent$6 = docBuilders$7.indent; + +function genericPrint$3(path$$1, options, print) { + var n = path$$1.getValue(); if (!n) { return ""; @@ -2573,28 +3424,28 @@ function genericPrint$2(path, options, print) { switch (n.type) { case "css-root": { - return concat$4([printNodeSequence(path, options, print), hardline$4]); + return concat$6([printNodeSequence(path$$1, options, print), hardline$6]); } case "css-comment": { if (n.raws.content) { return n.raws.content; } - var text = options.originalText.slice(util$6.locStart(n), util$6.locEnd(n)); + var text = options.originalText.slice(util$8.locStart(n), util$8.locEnd(n)); var rawText = n.raws.text || n.text; // Workaround a bug where the location is off. // https://github.com/postcss/postcss-scss/issues/63 if (text.indexOf(rawText) === -1) { if (n.raws.inline) { - return concat$4(["// ", rawText]); + return concat$6(["// ", rawText]); } - return concat$4(["/* ", rawText, " */"]); + return concat$6(["/* ", rawText, " */"]); } return text; } case "css-rule": { - return concat$4([path.call(print, "selector"), n.important ? " !important" : "", n.nodes ? concat$4([" {", n.nodes.length > 0 ? indent$4(concat$4([hardline$4, printNodeSequence(path, options, print)])) : "", hardline$4, "}"]) : ";"]); + return concat$6([path$$1.call(print, "selector"), n.important ? " !important" : "", n.nodes ? concat$6([" {", n.nodes.length > 0 ? indent$6(concat$6([hardline$6, printNodeSequence(path$$1, options, print)])) : "", hardline$6, "}"]) : ";"]); } case "css-decl": { @@ -2604,33 +3455,33 @@ function genericPrint$2(path, options, print) { // well. var isValueExtend = n.value.type === "value-root" && n.value.group.type === "value-value" && n.value.group.group.type === "value-func" && n.value.group.group.value === "extend"; - return concat$4([n.raws.before.replace(/[\s;]/g, ""), n.prop, ":", isValueExtend ? "" : " ", path.call(print, "value"), n.important ? " !important" : "", n.nodes ? concat$4([" {", indent$4(concat$4([softline$3, printNodeSequence(path, options, print)])), softline$3, "}"]) : ";"]); + return concat$6([n.raws.before.replace(/[\s;]/g, ""), n.prop, ":", isValueExtend ? "" : " ", path$$1.call(print, "value"), n.important ? " !important" : "", n.nodes ? concat$6([" {", indent$6(concat$6([softline$5, printNodeSequence(path$$1, options, print)])), softline$5, "}"]) : ";"]); } case "css-atrule": { var hasParams = n.params && !(n.params.type === "media-query-list" && n.params.value === ""); - return concat$4(["@", n.name, hasParams ? concat$4([" ", path.call(print, "params")]) : "", n.nodes ? concat$4([" {", indent$4(concat$4([n.nodes.length > 0 ? softline$3 : "", printNodeSequence(path, options, print)])), softline$3, "}"]) : ";"]); + return concat$6(["@", n.name, hasParams ? concat$6([" ", path$$1.call(print, "params")]) : "", n.nodes ? concat$6([" {", indent$6(concat$6([n.nodes.length > 0 ? softline$5 : "", printNodeSequence(path$$1, options, print)])), softline$5, "}"]) : ";"]); } case "css-import": { - return concat$4(["@", n.name, " ", n.directives ? concat$4([n.directives, " "]) : "", n.importPath, ";"]); + return concat$6(["@", n.name, " ", n.directives ? concat$6([n.directives, " "]) : "", n.importPath, ";"]); } // postcss-media-query-parser case "media-query-list": { var parts = []; - path.each(function (childPath) { + path$$1.each(function (childPath) { var node = childPath.getValue(); if (node.type === "media-query" && node.value === "") { return; } parts.push(childPath.call(print)); }, "nodes"); - return join$4(", ", parts); + return join$5(", ", parts); } case "media-query": { - return join$4(" ", path.map(print, "nodes")); + return join$5(" ", path$$1.map(print, "nodes")); } case "media-type": { @@ -2641,7 +3492,7 @@ function genericPrint$2(path, options, print) { if (!n.nodes) { return n.value; } - return concat$4(["(", concat$4(path.map(print, "nodes")), ")"]); + return concat$6(["(", concat$6(path$$1.map(print, "nodes")), ")"]); } case "media-feature": { @@ -2649,7 +3500,7 @@ function genericPrint$2(path, options, print) { } case "media-colon": { - return concat$4([n.value, " "]); + return concat$6([n.value, " "]); } case "media-value": { @@ -2670,7 +3521,7 @@ function genericPrint$2(path, options, print) { // postcss-selector-parser case "selector-root": { - return group$3(join$4(concat$4([",", line$3]), path.map(print, "nodes"))); + return group$4(join$5(concat$6([",", hardline$6]), path$$1.map(print, "nodes"))); } case "selector-comment": { @@ -2686,22 +3537,22 @@ function genericPrint$2(path, options, print) { } case "selector-id": { - return concat$4(["#", n.value]); + return concat$6(["#", n.value]); } case "selector-class": { - return concat$4([".", n.value]); + return concat$6([".", n.value]); } case "selector-attribute": { - return concat$4(["[", n.attribute, n.operator ? n.operator : "", n.value ? n.value : "", n.insensitive ? " i" : "", "]"]); + return concat$6(["[", n.attribute, n.operator ? n.operator : "", n.value ? n.value : "", n.insensitive ? " i" : "", "]"]); } case "selector-combinator": { if (n.value === "+" || n.value === ">" || n.value === "~") { - var parent = path.getParentNode(); + var parent = path$$1.getParentNode(); var leading = parent.type === "selector-selector" && parent.nodes[0] === n ? "" : line$3; - return concat$4([leading, n.value, " "]); + return concat$6([leading, n.value, " "]); } return n.value; } @@ -2711,11 +3562,11 @@ function genericPrint$2(path, options, print) { } case "selector-selector": { - return group$3(indent$4(concat$4(path.map(print, "nodes")))); + return group$4(indent$6(concat$6(path$$1.map(print, "nodes")))); } case "selector-pseudo": { - return concat$4([n.value, n.nodes && n.nodes.length > 0 ? concat$4(["(", join$4(", ", path.map(print, "nodes")), ")"]) : ""]); + return concat$6([n.value, n.nodes && n.nodes.length > 0 ? concat$6(["(", join$5(", ", path$$1.map(print, "nodes")), ")"]) : ""]); } case "selector-nesting": { @@ -2724,11 +3575,11 @@ function genericPrint$2(path, options, print) { // postcss-values-parser case "value-root": { - return path.call(print, "group"); + return path$$1.call(print, "group"); } case "value-comma_group": { - var printed = path.map(print, "groups"); + var printed = path$$1.map(print, "groups"); var _parts = []; for (var i = 0; i < n.groups.length; ++i) { _parts.push(printed[i]); @@ -2741,41 +3592,41 @@ function genericPrint$2(path, options, print) { } } - return group$3(indent$4(concat$4(_parts))); + return group$4(indent$6(concat$6(_parts))); } case "value-paren_group": { - var _parent2 = path.getParentNode(); + var _parent2 = path$$1.getParentNode(); var isURLCall = _parent2 && _parent2.type === "value-func" && _parent2.value === "url"; if (isURLCall && (n.groups.length === 1 || n.groups.length > 0 && n.groups[0].type === "value-comma_group" && n.groups[0].groups.length > 0 && n.groups[0].groups[0].type === "value-word" && n.groups[0].groups[0].value === "data")) { - return concat$4([n.open ? path.call(print, "open") : "", join$4(",", path.map(print, "groups")), n.close ? path.call(print, "close") : ""]); + return concat$6([n.open ? path$$1.call(print, "open") : "", join$5(",", path$$1.map(print, "groups")), n.close ? path$$1.call(print, "close") : ""]); } if (!n.open) { - return group$3(indent$4(join$4(concat$4([",", line$3]), path.map(print, "groups")))); + return group$4(indent$6(join$5(concat$6([",", line$3]), path$$1.map(print, "groups")))); } - return group$3(concat$4([n.open ? path.call(print, "open") : "", indent$4(concat$4([softline$3, join$4(concat$4([",", line$3]), path.map(print, "groups"))])), softline$3, n.close ? path.call(print, "close") : ""])); + return group$4(concat$6([n.open ? path$$1.call(print, "open") : "", indent$6(concat$6([softline$5, join$5(concat$6([",", line$3]), path$$1.map(print, "groups"))])), softline$5, n.close ? path$$1.call(print, "close") : ""])); } case "value-value": { - return path.call(print, "group"); + return path$$1.call(print, "group"); } case "value-func": { - return concat$4([n.value, path.call(print, "group")]); + return concat$6([n.value, path$$1.call(print, "group")]); } case "value-paren": { if (n.raws.before !== "") { - return concat$4([line$3, n.value]); + return concat$6([line$3, n.value]); } return n.value; } case "value-number": { - return concat$4([n.value, n.unit]); + return concat$6([n.value, n.unit]); } case "value-operator": { @@ -2791,15 +3642,15 @@ function genericPrint$2(path, options, print) { } case "value-comma": { - return concat$4([n.value, " "]); + return concat$6([n.value, " "]); } case "value-string": { - return concat$4([n.quoted ? n.raws.quote : "", n.value, n.quoted ? n.raws.quote : ""]); + return concat$6([n.quoted ? n.raws.quote : "", n.value, n.quoted ? n.raws.quote : ""]); } case "value-atword": { - return concat$4(["@", n.value]); + return concat$6(["@", n.value]); } default: @@ -2807,37 +3658,45 @@ function genericPrint$2(path, options, print) { } } -function printNodeSequence(path, options, print) { - var node = path.getValue(); +function printNodeSequence(path$$1, options, print) { + var node = path$$1.getValue(); var parts = []; var i = 0; - path.map(function (pathChild) { - parts.push(pathChild.call(print)); + path$$1.map(function (pathChild) { + var prevNode = node.nodes[i - 1]; + if (prevNode && prevNode.type === "css-comment" && prevNode.text.trim() === "prettier-ignore") { + var childNode = pathChild.getValue(); + parts.push(options.originalText.slice(util$8.locStart(childNode), util$8.locEnd(childNode))); + } else { + parts.push(pathChild.call(print)); + } + if (i !== node.nodes.length - 1) { - if (node.nodes[i + 1].type === "css-comment" && !util$6.hasNewline(options.originalText, util$6.locStart(node.nodes[i + 1]), { backwards: true })) { + if (node.nodes[i + 1].type === "css-comment" && !util$8.hasNewline(options.originalText, util$8.locStart(node.nodes[i + 1]), { backwards: true }) || node.nodes[i + 1].type === "css-atrule" && node.nodes[i + 1].name === "else") { parts.push(" "); } else { - parts.push(hardline$4); - if (util$6.isNextLineEmpty(options.originalText, pathChild.getValue())) { - parts.push(hardline$4); + parts.push(hardline$6); + if (util$8.isNextLineEmpty(options.originalText, pathChild.getValue())) { + parts.push(hardline$6); } } } i++; }, "nodes"); - return concat$4(parts); + return concat$6(parts); } function printValue(value) { return value; } -var printerPostcss = genericPrint$2; +var printerPostcss = genericPrint$3; var assert$1 = require$$0; var comments$3 = comments$1; var FastPath = fastPath; +var multiparser = multiparser$1; var util$4 = util$2; var isIdentifierName = utils.keyword.isIdentifierNameES6; @@ -2887,6 +3746,8 @@ function getPrintFunction(options) { switch (options.parser) { case "graphql": return printerGraphql; + case "parse5": + return printerHtmlparser2; case "postcss": return printerPostcss; default: @@ -2894,10 +3755,10 @@ function getPrintFunction(options) { } } -function genericPrint(path, options, printPath, args) { - assert$1.ok(path instanceof FastPath); +function genericPrint(path$$1, options, printPath, args) { + assert$1.ok(path$$1 instanceof FastPath); - var node = path.getValue(); + var node = path$$1.getValue(); // Escape hatch if (node && node.comments && node.comments.length > 0 && node.comments.some(function (comment) { @@ -2906,8 +3767,23 @@ function genericPrint(path, options, printPath, args) { return options.originalText.slice(util$4.locStart(node), util$4.locEnd(node)); } + if (node) { + // Potentially switch to a different parser + var next = multiparser.getSubtreeParser(path$$1, options); + if (next) { + try { + return multiparser.printSubtree(next, options); + } catch (error) { + if (process.env.PRETTIER_DEBUG) { + console.error(error); + } + // Continue with current parser + } + } + } + var needsParens = false; - var linesWithoutParens = getPrintFunction(options)(path, options, printPath, args); + var linesWithoutParens = getPrintFunction(options)(path$$1, options, printPath, args); if (!node || isEmpty(linesWithoutParens)) { return linesWithoutParens; @@ -2917,9 +3793,9 @@ function genericPrint(path, options, printPath, args) { if (node.decorators && node.decorators.length > 0 && // If the parent node is an export declaration, it will be // responsible for printing node.decorators. - !util$4.getParentExportDeclaration(path)) { + !util$4.getParentExportDeclaration(path$$1)) { var separator = hardline$2; - path.each(function (decoratorPath) { + path$$1.each(function (decoratorPath) { var prefix = "@"; var decorator = decoratorPath.getValue(); if (decorator.expression) { @@ -2936,7 +3812,7 @@ function genericPrint(path, options, printPath, args) { } else if (util$4.isExportDeclaration(node) && node.declaration && node.declaration.decorators) { // Export declarations are responsible for printing any decorators // that logically apply to node.declaration. - path.each(function (decoratorPath) { + path$$1.each(function (decoratorPath) { var decorator = decoratorPath.getValue(); var prefix = decorator.type === "Decorator" || decorator.type === "TSDecorator" ? "" : "@"; decorators.push(prefix, printPath(decoratorPath), hardline$2); @@ -2944,7 +3820,7 @@ function genericPrint(path, options, printPath, args) { } else { // Nodes with decorators can't have parentheses, so we can avoid // computing path.needsParens() except in this case. - needsParens = path.needsParens(); + needsParens = path$$1.needsParens(options); } if (node.type) { @@ -2972,8 +3848,8 @@ function genericPrint(path, options, printPath, args) { return concat$2(parts); } -function genericPrintNoParens(path, options, print, args) { - var n = path.getValue(); +function genericPrintNoParens(path$$1, options, print, args) { + var n = path$$1.getValue(); var semi = options.semi ? ";" : ""; if (!n) { @@ -2987,11 +3863,11 @@ function genericPrintNoParens(path, options, print, args) { var parts = []; switch (n.type) { case "File": - return path.call(print, "program"); + return path$$1.call(print, "program"); case "Program": // Babel 6 if (n.directives) { - path.each(function (childPath) { + path$$1.each(function (childPath) { parts.push(print(childPath), semi, hardline$2); if (util$4.isNextLineEmpty(options.originalText, childPath.getValue())) { parts.push(hardline$2); @@ -2999,11 +3875,11 @@ function genericPrintNoParens(path, options, print, args) { }, "directives"); } - parts.push(path.call(function (bodyPath) { + parts.push(path$$1.call(function (bodyPath) { return printStatementSequence(bodyPath, options, print); }, "body")); - parts.push(comments$3.printDanglingComments(path, options, /* sameIndent */true)); + parts.push(comments$3.printDanglingComments(path$$1, options, /* sameIndent */true)); // Only force a trailing newline if there were any contents. if (n.body.length || n.comments) { @@ -3020,19 +3896,19 @@ function genericPrintNoParens(path, options, print, args) { if (n.directive) { return concat$2([nodeStr(n.expression, options, true), semi]); } - return concat$2([path.call(print, "expression"), semi]); // Babel extension. + return concat$2([path$$1.call(print, "expression"), semi]); // Babel extension. case "ParenthesizedExpression": - return concat$2(["(", path.call(print, "expression"), ")"]); + return concat$2(["(", path$$1.call(print, "expression"), ")"]); case "AssignmentExpression": - return printAssignment(n.left, path.call(print, "left"), concat$2([" ", n.operator]), n.right, path.call(print, "right"), options); + return printAssignment(n.left, path$$1.call(print, "left"), concat$2([" ", n.operator]), n.right, path$$1.call(print, "right"), options); case "BinaryExpression": case "LogicalExpression": { - var parent = path.getParentNode(); - var parentParent = path.getParentNode(1); + var parent = path$$1.getParentNode(); + var parentParent = path$$1.getParentNode(1); var isInsideParenthesis = n !== parent.body && (parent.type === "IfStatement" || parent.type === "WhileStatement" || parent.type === "DoStatement"); - var _parts2 = printBinaryishExpressions(path, print, options, + var _parts2 = printBinaryishExpressions(path$$1, print, options, /* isNested */false, isInsideParenthesis); // if ( @@ -3067,41 +3943,41 @@ function genericPrintNoParens(path, options, print, args) { _parts2.length > 0 ? _parts2[0] : "", indent$2(rest)])); } case "AssignmentPattern": - return concat$2([path.call(print, "left"), " = ", path.call(print, "right")]); + return concat$2([path$$1.call(print, "left"), " = ", path$$1.call(print, "right")]); case "TSTypeAssertionExpression": - return concat$2(["<", path.call(print, "typeAnnotation"), ">", path.call(print, "expression")]); + return concat$2(["<", path$$1.call(print, "typeAnnotation"), ">", path$$1.call(print, "expression")]); case "MemberExpression": { - var _parent3 = path.getParentNode(); + var _parent3 = path$$1.getParentNode(); var firstNonMemberParent = void 0; var i = 0; do { - firstNonMemberParent = path.getParentNode(i); + firstNonMemberParent = path$$1.getParentNode(i); i++; } while (firstNonMemberParent && firstNonMemberParent.type === "MemberExpression"); var shouldInline = firstNonMemberParent && (firstNonMemberParent.type === "VariableDeclarator" && firstNonMemberParent.id.type !== "Identifier" || firstNonMemberParent.type === "AssignmentExpression" && firstNonMemberParent.left.type !== "Identifier") || n.computed || n.object.type === "Identifier" && n.property.type === "Identifier" && _parent3.type !== "MemberExpression"; - return concat$2([path.call(print, "object"), shouldInline ? printMemberLookup(path, options, print) : group$1(indent$2(concat$2([softline$1, printMemberLookup(path, options, print)])))]); + return concat$2([path$$1.call(print, "object"), shouldInline ? printMemberLookup(path$$1, options, print) : group$1(indent$2(concat$2([softline$1, printMemberLookup(path$$1, options, print)])))]); } case "MetaProperty": - return concat$2([path.call(print, "meta"), ".", path.call(print, "property")]); + return concat$2([path$$1.call(print, "meta"), ".", path$$1.call(print, "property")]); case "BindExpression": if (n.object) { - parts.push(path.call(print, "object")); + parts.push(path$$1.call(print, "object")); } - parts.push("::", path.call(print, "callee")); + parts.push("::", path$$1.call(print, "callee")); return concat$2(parts); case "Path": return join$2(".", n.body); case "Identifier": { - var parentNode = path.getParentNode(); + var parentNode = path$$1.getParentNode(); var isFunctionDeclarationIdentifier = parentNode.type === "DeclareFunction" && parentNode.id === n; - return concat$2([n.name, n.optional ? "?" : "", n.typeAnnotation && !isFunctionDeclarationIdentifier ? ": " : "", path.call(print, "typeAnnotation")]); + return concat$2([n.name, n.optional ? "?" : "", n.typeAnnotation && !isFunctionDeclarationIdentifier ? ": " : "", path$$1.call(print, "typeAnnotation")]); } case "SpreadElement": case "SpreadElementPattern": @@ -3112,14 +3988,14 @@ function genericPrintNoParens(path, options, print, args) { case "SpreadPropertyPattern": case "RestElement": case "ObjectTypeSpreadProperty": - return concat$2(["...", path.call(print, "argument"), n.typeAnnotation ? ": " : "", path.call(print, "typeAnnotation")]); + return concat$2(["...", path$$1.call(print, "argument"), n.typeAnnotation ? ": " : "", path$$1.call(print, "typeAnnotation")]); case "FunctionDeclaration": case "FunctionExpression": case "TSNamespaceFunctionDeclaration": if (isNodeStartingWithDeclare(n, options)) { parts.push("declare "); } - parts.push(printFunctionDeclaration(path, print, options)); + parts.push(printFunctionDeclaration(path$$1, print, options)); if (!n.body) { parts.push(semi); } @@ -3130,17 +4006,17 @@ function genericPrintNoParens(path, options, print, args) { parts.push("async "); } - parts.push(printFunctionTypeParameters(path, options, print)); - if (canPrintParamsWithoutParens(n)) { - parts.push(path.call(print, "params", 0)); + parts.push(path$$1.call(print, "params", 0)); } else { - parts.push(group$1(concat$2([printFunctionParams(path, print, options, args && (args.expandLastArg || args.expandFirstArg)), printReturnType(path, print)]))); + parts.push(group$1(concat$2([printFunctionParams(path$$1, print, options, + /* expandLast */args && (args.expandLastArg || args.expandFirstArg), + /* printTypeParams */true), printReturnType(path$$1, print)]))); } parts.push(" =>"); - var body = path.call(function (bodyPath) { + var body = path$$1.call(function (bodyPath) { return print(bodyPath, args); }, "body"); var collapsed = concat$2([concat$2(parts), " ", body]); @@ -3176,7 +4052,7 @@ function genericPrintNoParens(path, options, print, args) { parts.push("abstract "); } - parts.push(printMethod(path, options, print)); + parts.push(printMethod(path$$1, options, print)); return concat$2(parts); case "YieldExpression": @@ -3186,7 +4062,7 @@ function genericPrintNoParens(path, options, print, args) { parts.push("*"); } if (n.argument) { - parts.push(" ", path.call(print, "argument")); + parts.push(" ", path$$1.call(print, "argument")); } return concat$2(parts); @@ -3197,54 +4073,54 @@ function genericPrintNoParens(path, options, print, args) { parts.push("*"); } if (n.argument) { - parts.push(" ", path.call(print, "argument")); + parts.push(" ", path$$1.call(print, "argument")); } return concat$2(parts); case "ModuleDeclaration": - parts.push("module", path.call(print, "id")); + parts.push("module", path$$1.call(print, "id")); if (n.source) { assert$1.ok(!n.body); - parts.push("from", path.call(print, "source")); + parts.push("from", path$$1.call(print, "source")); } else { - parts.push(path.call(print, "body")); + parts.push(path$$1.call(print, "body")); } return join$2(" ", parts); case "ImportSpecifier": if (n.imported) { if (n.importKind) { - parts.push(path.call(print, "importKind"), " "); + parts.push(path$$1.call(print, "importKind"), " "); } - parts.push(path.call(print, "imported")); + parts.push(path$$1.call(print, "imported")); if (n.local && n.local.name !== n.imported.name) { - parts.push(" as ", path.call(print, "local")); + parts.push(" as ", path$$1.call(print, "local")); } } else if (n.id) { - parts.push(path.call(print, "id")); + parts.push(path$$1.call(print, "id")); if (n.name) { - parts.push(" as ", path.call(print, "name")); + parts.push(" as ", path$$1.call(print, "name")); } } return concat$2(parts); case "ExportSpecifier": if (n.local) { - parts.push(path.call(print, "local")); + parts.push(path$$1.call(print, "local")); if (n.exported && n.exported.name !== n.local.name) { - parts.push(" as ", path.call(print, "exported")); + parts.push(" as ", path$$1.call(print, "exported")); } } else if (n.id) { - parts.push(path.call(print, "id")); + parts.push(path$$1.call(print, "id")); if (n.name) { - parts.push(" as ", path.call(print, "name")); + parts.push(" as ", path$$1.call(print, "name")); } } @@ -3255,35 +4131,35 @@ function genericPrintNoParens(path, options, print, args) { parts.push("* as "); if (n.local) { - parts.push(path.call(print, "local")); + parts.push(path$$1.call(print, "local")); } else if (n.id) { - parts.push(path.call(print, "id")); + parts.push(path$$1.call(print, "id")); } return concat$2(parts); case "ImportDefaultSpecifier": if (n.local) { - return path.call(print, "local"); + return path$$1.call(print, "local"); } - return path.call(print, "id"); + return path$$1.call(print, "id"); case "ExportDeclaration": case "ExportDefaultDeclaration": case "ExportNamedDeclaration": - return printExportDeclaration(path, options, print); + return printExportDeclaration(path$$1, options, print); case "ExportAllDeclaration": parts.push("export *"); if (n.exported) { - parts.push(" as ", path.call(print, "exported")); + parts.push(" as ", path$$1.call(print, "exported")); } - parts.push(" from ", path.call(print, "source"), semi); + parts.push(" from ", path$$1.call(print, "source"), semi); return concat$2(parts); case "ExportNamespaceSpecifier": case "ExportDefaultSpecifier": - return path.call(print, "exported"); + return path$$1.call(print, "exported"); case "ImportDeclaration": { parts.push("import "); @@ -3295,7 +4171,7 @@ function genericPrintNoParens(path, options, print, args) { var standalones = []; var grouped = []; if (n.specifiers && n.specifiers.length > 0) { - path.each(function (specifierPath) { + path$$1.each(function (specifierPath) { var value = specifierPath.getValue(); if (value.type === "ImportDefaultSpecifier" || value.type === "ImportNamespaceSpecifier") { standalones.push(print(specifierPath)); @@ -3312,7 +4188,7 @@ function genericPrintNoParens(path, options, print, args) { parts.push(", "); } - if (grouped.length === 1 && n.specifiers && !n.specifiers.some(function (node) { + if (grouped.length === 1 && standalones.length === 0 && n.specifiers && !n.specifiers.some(function (node) { return node.comments; })) { parts.push(concat$2(["{", options.bracketSpacing ? " " : "", concat$2(grouped), options.bracketSpacing ? " " : "", "}"])); @@ -3325,7 +4201,7 @@ function genericPrintNoParens(path, options, print, args) { parts.push("{} from "); } - parts.push(path.call(print, "source"), semi); + parts.push(path$$1.call(print, "source"), semi); return concat$2(parts); } @@ -3334,7 +4210,7 @@ function genericPrintNoParens(path, options, print, args) { return "import"; case "BlockStatement": { - var naked = path.call(function (bodyPath) { + var naked = path$$1.call(function (bodyPath) { return printStatementSequence(bodyPath, options, print); }, "body"); @@ -3343,8 +4219,8 @@ function genericPrintNoParens(path, options, print, args) { }); var hasDirectives = n.directives && n.directives.length > 0; - var _parent4 = path.getParentNode(); - var _parentParent = path.getParentNode(1); + var _parent4 = path$$1.getParentNode(); + var _parentParent = path$$1.getParentNode(1); if (!hasContent && !hasDirectives && !n.comments && (_parent4.type === "ArrowFunctionExpression" || _parent4.type === "FunctionExpression" || _parent4.type === "FunctionDeclaration" || _parent4.type === "ObjectMethod" || _parent4.type === "ClassMethod" || _parent4.type === "ForStatement" || _parent4.type === "WhileStatement" || _parent4.type === "DoWhileStatement" || _parent4.type === "CatchClause" && !_parentParent.finalizer)) { return "{}"; } @@ -3353,8 +4229,11 @@ function genericPrintNoParens(path, options, print, args) { // Babel 6 if (hasDirectives) { - path.each(function (childPath) { + path$$1.each(function (childPath) { parts.push(indent$2(concat$2([hardline$2, print(childPath), semi]))); + if (util$4.isNextLineEmpty(options.originalText, childPath.getValue())) { + parts.push(hardline$2); + } }, "directives"); } @@ -3362,7 +4241,7 @@ function genericPrintNoParens(path, options, print, args) { parts.push(indent$2(concat$2([hardline$2, naked]))); } - parts.push(comments$3.printDanglingComments(path, options)); + parts.push(comments$3.printDanglingComments(path$$1, options)); parts.push(hardline$2, "}"); return concat$2(parts); @@ -3372,16 +4251,16 @@ function genericPrintNoParens(path, options, print, args) { if (n.argument) { if (returnArgumentHasLeadingComment(options, n.argument)) { - parts.push(concat$2([" (", indent$2(concat$2([softline$1, path.call(print, "argument")])), line$1, ")"])); + parts.push(concat$2([" (", indent$2(concat$2([softline$1, path$$1.call(print, "argument")])), line$1, ")"])); } else if (n.argument.type === "LogicalExpression" || n.argument.type === "BinaryExpression") { - parts.push(group$1(concat$2([ifBreak$1(" (", " "), indent$2(concat$2([softline$1, path.call(print, "argument")])), softline$1, ifBreak$1(")")]))); + parts.push(group$1(concat$2([ifBreak$1(" (", " "), indent$2(concat$2([softline$1, path$$1.call(print, "argument")])), softline$1, ifBreak$1(")")]))); } else { - parts.push(" ", path.call(print, "argument")); + parts.push(" ", path$$1.call(print, "argument")); } } if (hasDanglingComments(n)) { - parts.push(" ", comments$3.printDanglingComments(path, options, /* sameIndent */true)); + parts.push(" ", comments$3.printDanglingComments(path$$1, options, /* sameIndent */true)); } parts.push(semi); @@ -3397,25 +4276,25 @@ function genericPrintNoParens(path, options, print, args) { // Keep test declarations on a single line // e.g. `it('long name', () => {` n.callee.type === "Identifier" && (n.callee.name === "it" || n.callee.name === "test" || n.callee.name === "describe") && n.arguments.length === 2 && (n.arguments[0].type === "StringLiteral" || n.arguments[0].type === "TemplateLiteral" || n.arguments[0].type === "Literal" && typeof n.arguments[0].value === "string") && (n.arguments[1].type === "FunctionExpression" || n.arguments[1].type === "ArrowFunctionExpression") && n.arguments[1].params.length <= 1) { - return concat$2([path.call(print, "callee"), path.call(print, "typeParameters"), concat$2(["(", join$2(", ", path.map(print, "arguments")), ")"])]); + return concat$2([path$$1.call(print, "callee"), path$$1.call(print, "typeParameters"), concat$2(["(", join$2(", ", path$$1.map(print, "arguments")), ")"])]); } // We detect calls on member lookups and possibly print them in a // special chain format. See `printMemberChain` for more info. if (n.callee.type === "MemberExpression") { - return printMemberChain(path, options, print); + return printMemberChain(path$$1, options, print); } - return concat$2([path.call(print, "callee"), printFunctionTypeParameters(path, options, print), printArgumentsList(path, options, print)]); + return concat$2([path$$1.call(print, "callee"), printFunctionTypeParameters(path$$1, options, print), printArgumentsList(path$$1, options, print)]); } case "TSInterfaceDeclaration": - parts.push(n.abstract ? "abstract " : "", printTypeScriptModifiers(path, options, print), "interface ", path.call(print, "id"), n.typeParameters ? path.call(print, "typeParameters") : "", " "); + parts.push(n.abstract ? "abstract " : "", printTypeScriptModifiers(path$$1, options, print), "interface ", path$$1.call(print, "id"), n.typeParameters ? path$$1.call(print, "typeParameters") : "", " "); if (n.heritage.length) { - parts.push("extends ", join$2(", ", path.map(print, "heritage")), " "); + parts.push(group$1(indent$2(concat$2([softline$1, "extends ", indent$2(join$2(concat$2([",", line$1]), path$$1.map(print, "heritage"))), " "])))); } - parts.push(path.call(print, "body")); + parts.push(path$$1.call(print, "body")); return concat$2(parts); case "ObjectExpression": @@ -3426,11 +4305,11 @@ function genericPrintNoParens(path, options, print, args) { { var isTypeAnnotation = n.type === "ObjectTypeAnnotation"; var shouldBreak = n.type !== "ObjectPattern" && util$4.hasNewlineInRange(options.originalText, util$4.locStart(n), util$4.locEnd(n)); - var separator = n.type === "TSInterfaceBody" || n.type === "TSTypeLiteral" ? shouldBreak ? semi : ";" : ","; + var separator = n.type === "TSInterfaceBody" || n.type === "TSTypeLiteral" ? ifBreak$1(semi, ";") : ","; var fields = []; var leftBrace = n.exact ? "{|" : "{"; var rightBrace = n.exact ? "|}" : "}"; - var _parent5 = path.getParentNode(0); + var _parent5 = path$$1.getParentNode(0); var propertiesField = void 0; @@ -3452,7 +4331,7 @@ function genericPrintNoParens(path, options, print, args) { // printing them. var propsAndLoc = []; fields.forEach(function (field) { - path.each(function (childPath) { + path$$1.each(function (childPath) { var node = childPath.getValue(); propsAndLoc.push({ node: node, @@ -3484,15 +4363,15 @@ function genericPrintNoParens(path, options, print, args) { return concat$2([leftBrace, rightBrace]); } - content = group$1(concat$2([leftBrace, comments$3.printDanglingComments(path, options), softline$1, rightBrace])); + content = group$1(concat$2([leftBrace, comments$3.printDanglingComments(path$$1, options), softline$1, rightBrace])); } else { - content = concat$2([leftBrace, indent$2(concat$2([options.bracketSpacing ? line$1 : softline$1, concat$2(props)])), ifBreak$1(canHaveTrailingSeparator && (separator !== "," || shouldPrintComma(options)) ? separator : ""), concat$2([options.bracketSpacing ? line$1 : softline$1, rightBrace]), n.typeAnnotation ? ": " : "", path.call(print, "typeAnnotation")]); + content = concat$2([leftBrace, indent$2(concat$2([options.bracketSpacing ? line$1 : softline$1, concat$2(props)])), ifBreak$1(canHaveTrailingSeparator && (separator !== "," || shouldPrintComma(options)) ? separator : ""), concat$2([options.bracketSpacing ? line$1 : softline$1, rightBrace]), n.typeAnnotation ? ": " : "", path$$1.call(print, "typeAnnotation")]); } // If we inline the object as first argument of the parent, we don't want // to create another group so that the object breaks before the return // type - var parentParentParent = path.getParentNode(2); + var parentParentParent = path$$1.getParentNode(2); if (n.type === "ObjectPattern" && _parent5 && shouldHugArguments(_parent5) && _parent5.params[0] === n || shouldHugType(n) && parentParentParent && shouldHugArguments(parentParentParent) && parentParentParent.params[0].typeAnnotation.typeAnnotation === n) { return content; } @@ -3500,24 +4379,24 @@ function genericPrintNoParens(path, options, print, args) { return group$1(content, { shouldBreak: shouldBreak }); } case "PropertyPattern": - return concat$2([path.call(print, "key"), ": ", path.call(print, "pattern")]); + return concat$2([path$$1.call(print, "key"), ": ", path$$1.call(print, "pattern")]); // Babel 6 case "ObjectProperty": // Non-standard AST node type. case "Property": if (n.method || n.kind === "get" || n.kind === "set") { - return printMethod(path, options, print); + return printMethod(path$$1, options, print); } if (n.shorthand) { - parts.push(path.call(print, "value")); + parts.push(path$$1.call(print, "value")); } else { var printedLeft = void 0; if (n.computed) { - printedLeft = concat$2(["[", path.call(print, "key"), "]"]); + printedLeft = concat$2(["[", path$$1.call(print, "key"), "]"]); } else { - printedLeft = printPropertyKey(path, options, print); + printedLeft = printPropertyKey(path$$1, options, print); } - parts.push(printAssignment(n.key, printedLeft, ":", n.value, path.call(print, "value"), options)); + parts.push(printAssignment(n.key, printedLeft, ":", n.value, path$$1.call(print, "value"), options)); } return concat$2(parts); // Babel 6 @@ -3526,21 +4405,21 @@ function genericPrintNoParens(path, options, print, args) { parts.push("static "); } - parts = parts.concat(printObjectMethod(path, options, print)); + parts = parts.concat(printObjectMethod(path$$1, options, print)); return concat$2(parts); // Babel 6 case "ObjectMethod": - return printObjectMethod(path, options, print); + return printObjectMethod(path$$1, options, print); case "TSDecorator": case "Decorator": - return concat$2(["@", path.call(print, "expression")]); + return concat$2(["@", path$$1.call(print, "expression")]); case "ArrayExpression": case "ArrayPattern": if (n.elements.length === 0) { if (!hasDanglingComments(n)) { parts.push("[]"); } else { - parts.push(group$1(concat$2(["[", comments$3.printDanglingComments(path, options), softline$1, "]"]))); + parts.push(group$1(concat$2(["[", comments$3.printDanglingComments(path$$1, options), softline$1, "]"]))); } } else { var _lastElem = util$4.getLast(n.elements); @@ -3558,24 +4437,24 @@ function genericPrintNoParens(path, options, print, args) { // we already check for an empty array just above so we are safe var needsForcedTrailingComma = canHaveTrailingComma && _lastElem === null; - parts.push(group$1(concat$2(["[", indent$2(concat$2([softline$1, printArrayItems(path, options, "elements", print)])), needsForcedTrailingComma ? "," : "", ifBreak$1(canHaveTrailingComma && !needsForcedTrailingComma && shouldPrintComma(options) ? "," : ""), comments$3.printDanglingComments(path, options, + parts.push(group$1(concat$2(["[", indent$2(concat$2([softline$1, printArrayItems(path$$1, options, "elements", print)])), needsForcedTrailingComma ? "," : "", ifBreak$1(canHaveTrailingComma && !needsForcedTrailingComma && shouldPrintComma(options) ? "," : ""), comments$3.printDanglingComments(path$$1, options, /* sameIndent */true), softline$1, "]"]))); } if (n.typeAnnotation) { - parts.push(": ", path.call(print, "typeAnnotation")); + parts.push(": ", path$$1.call(print, "typeAnnotation")); } return concat$2(parts); case "SequenceExpression": { - var _parent6 = path.getParentNode(); + var _parent6 = path$$1.getParentNode(); var _shouldInline = _parent6.type === "ReturnStatement" || _parent6.type === "ForStatement" || _parent6.type === "ExpressionStatement"; if (_shouldInline) { - return join$2(", ", path.map(print, "expressions")); + return join$2(", ", path$$1.map(print, "expressions")); } - return group$1(concat$2([indent$2(concat$2([softline$1, join$2(concat$2([",", line$1]), path.map(print, "expressions"))])), softline$1])); + return group$1(concat$2([indent$2(concat$2([softline$1, join$2(concat$2([",", line$1]), path$$1.map(print, "expressions"))])), softline$1])); } case "ThisExpression": return "this"; @@ -3593,18 +4472,25 @@ function genericPrintNoParens(path, options, print, args) { case "BooleanLiteral": // Babel 6 Literal split case "StringLiteral": // Babel 6 Literal split case "Literal": - if (n.regex) { - return printRegex(n.regex); + { + if (n.regex) { + return printRegex(n.regex); + } + if (typeof n.value === "number") { + return printNumber(n.raw); + } + if (typeof n.value !== "string") { + return "" + n.value; + } + // TypeScript workaround for eslint/typescript-eslint-parser#267 + // See corresponding workaround in fast-path.js needsParens() + var grandParent = path$$1.getParentNode(1); + var isTypeScriptDirective = options.parser === "typescript" && typeof n.value === "string" && grandParent && (grandParent.type === "Program" || grandParent.type === "BlockStatement"); + + return nodeStr(n, options, isTypeScriptDirective); } - if (typeof n.value === "number") { - return printNumber(n.raw); - } - if (typeof n.value !== "string") { - return "" + n.value; - } - return nodeStr(n, options); // Babel 6 case "Directive": - return path.call(print, "value"); // Babel 6 + return path$$1.call(print, "value"); // Babel 6 case "DirectiveLiteral": return nodeStr(n, options); case "ModuleSpecifier": @@ -3622,11 +4508,11 @@ function genericPrintNoParens(path, options, print, args) { parts.push(" "); } - parts.push(path.call(print, "argument")); + parts.push(path$$1.call(print, "argument")); return concat$2(parts); case "UpdateExpression": - parts.push(path.call(print, "argument"), n.operator); + parts.push(path$$1.call(print, "argument"), n.operator); if (n.prefix) { parts.reverse(); @@ -3635,28 +4521,28 @@ function genericPrintNoParens(path, options, print, args) { return concat$2(parts); case "ConditionalExpression": { - var _parent7 = path.getParentNode(); - var printed = concat$2([line$1, "? ", n.consequent.type === "ConditionalExpression" ? ifBreak$1("", "(") : "", align$1(2, path.call(print, "consequent")), n.consequent.type === "ConditionalExpression" ? ifBreak$1("", ")") : "", line$1, ": ", align$1(2, path.call(print, "alternate"))]); + var _parent7 = path$$1.getParentNode(); + var printed = concat$2([line$1, "? ", n.consequent.type === "ConditionalExpression" ? ifBreak$1("", "(") : "", align$1(2, path$$1.call(print, "consequent")), n.consequent.type === "ConditionalExpression" ? ifBreak$1("", ")") : "", line$1, ": ", align$1(2, path$$1.call(print, "alternate"))]); - return group$1(concat$2([path.call(print, "test"), _parent7.type === "ConditionalExpression" ? printed : indent$2(printed)])); + return group$1(concat$2([path$$1.call(print, "test"), _parent7.type === "ConditionalExpression" ? printed : indent$2(printed)])); } case "NewExpression": - parts.push("new ", path.call(print, "callee"), printFunctionTypeParameters(path, options, print)); + parts.push("new ", path$$1.call(print, "callee"), printFunctionTypeParameters(path$$1, options, print)); if (n.arguments) { - parts.push(printArgumentsList(path, options, print)); + parts.push(printArgumentsList(path$$1, options, print)); } return concat$2(parts); case "VariableDeclaration": { - var _printed = path.map(function (childPath) { + var _printed = path$$1.map(function (childPath) { return print(childPath); }, "declarations"); // We generally want to terminate all variable declarations with a // semicolon, except when they in the () part of for loops. - var _parentNode = path.getParentNode(); + var _parentNode = path$$1.getParentNode(); var isParentForLoop = _parentNode.type === "ForStatement" || _parentNode.type === "ForInStatement" || _parentNode.type === "ForOfStatement" || _parentNode.type === "ForAwaitStatement"; @@ -3664,7 +4550,15 @@ function genericPrintNoParens(path, options, print, args) { return decl.init; }); - parts = [isNodeStartingWithDeclare(n, options) ? "declare " : "", n.kind, _printed.length ? concat$2([" ", _printed[0]]) : "", indent$2(concat$2(_printed.slice(1).map(function (p) { + var firstVariable = void 0; + if (_printed.length === 1) { + firstVariable = _printed[0]; + } else if (_printed.length > 1) { + // Indent first var to comply with eslint one-var rule + firstVariable = indent$2(_printed[0]); + } + + parts = [isNodeStartingWithDeclare(n, options) ? "declare " : "", n.kind, firstVariable ? concat$2([" ", firstVariable]) : "", indent$2(concat$2(_printed.slice(1).map(function (p) { return concat$2([",", hasValue && !isParentForLoop ? hardline$2 : line$1, p]); })))]; @@ -3675,13 +4569,13 @@ function genericPrintNoParens(path, options, print, args) { return group$1(concat$2(parts)); } case "VariableDeclarator": - return printAssignment(n.id, concat$2([path.call(print, "id"), path.call(print, "typeParameters")]), " =", n.init, n.init && path.call(print, "init"), options); + return printAssignment(n.id, concat$2([path$$1.call(print, "id"), path$$1.call(print, "typeParameters")]), " =", n.init, n.init && path$$1.call(print, "init"), options); case "WithStatement": - return group$1(concat$2(["with (", path.call(print, "object"), ")", adjustClause(n.body, path.call(print, "body"))])); + return group$1(concat$2(["with (", path$$1.call(print, "object"), ")", adjustClause(n.body, path$$1.call(print, "body"))])); case "IfStatement": { - var con = adjustClause(n.consequent, path.call(print, "consequent")); - var opening = group$1(concat$2(["if (", group$1(concat$2([indent$2(concat$2([softline$1, path.call(print, "test")])), softline$1])), ")", con])); + var con = adjustClause(n.consequent, path$$1.call(print, "consequent")); + var opening = group$1(concat$2(["if (", group$1(concat$2([indent$2(concat$2([softline$1, path$$1.call(print, "test")])), softline$1])), ")", con])); parts.push(opening); @@ -3692,19 +4586,19 @@ function genericPrintNoParens(path, options, print, args) { parts.push(hardline$2, "else"); } - parts.push(group$1(adjustClause(n.alternate, path.call(print, "alternate"), n.alternate.type === "IfStatement"))); + parts.push(group$1(adjustClause(n.alternate, path$$1.call(print, "alternate"), n.alternate.type === "IfStatement"))); } return concat$2(parts); } case "ForStatement": { - var _body = adjustClause(n.body, path.call(print, "body")); + var _body = adjustClause(n.body, path$$1.call(print, "body")); // We want to keep dangling comments above the loop to stay consistent. // Any comment positioned between the for statement and the parentheses // is going to be printed before the statement. - var dangling = comments$3.printDanglingComments(path, options, + var dangling = comments$3.printDanglingComments(path$$1, options, /* sameLine */true); var printedComments = dangling ? concat$2([dangling, softline$1]) : ""; @@ -3712,13 +4606,13 @@ function genericPrintNoParens(path, options, print, args) { return concat$2([printedComments, group$1(concat$2(["for (;;)", _body]))]); } - return concat$2([printedComments, group$1(concat$2(["for (", group$1(concat$2([indent$2(concat$2([softline$1, path.call(print, "init"), ";", line$1, path.call(print, "test"), ";", line$1, path.call(print, "update")])), softline$1])), ")", _body]))]); + return concat$2([printedComments, group$1(concat$2(["for (", group$1(concat$2([indent$2(concat$2([softline$1, path$$1.call(print, "init"), ";", line$1, path$$1.call(print, "test"), ";", line$1, path$$1.call(print, "update")])), softline$1])), ")", _body]))]); } case "WhileStatement": - return group$1(concat$2(["while (", group$1(concat$2([indent$2(concat$2([softline$1, path.call(print, "test")])), softline$1])), ")", adjustClause(n.body, path.call(print, "body"))])); + return group$1(concat$2(["while (", group$1(concat$2([indent$2(concat$2([softline$1, path$$1.call(print, "test")])), softline$1])), ")", adjustClause(n.body, path$$1.call(print, "body"))])); case "ForInStatement": // Note: esprima can't actually parse "for each (". - return group$1(concat$2([n.each ? "for each (" : "for (", path.call(print, "left"), " in ", path.call(print, "right"), ")", adjustClause(n.body, path.call(print, "body"))])); + return group$1(concat$2([n.each ? "for each (" : "for (", path$$1.call(print, "left"), " in ", path$$1.call(print, "right"), ")", adjustClause(n.body, path$$1.call(print, "body"))])); case "ForOfStatement": case "ForAwaitStatement": @@ -3728,12 +4622,12 @@ function genericPrintNoParens(path, options, print, args) { // https://github.com/estree/estree/pull/138 var isAwait = n.type === "ForAwaitStatement" || n.await; - return group$1(concat$2(["for", isAwait ? " await" : "", " (", path.call(print, "left"), " of ", path.call(print, "right"), ")", adjustClause(n.body, path.call(print, "body"))])); + return group$1(concat$2(["for", isAwait ? " await" : "", " (", path$$1.call(print, "left"), " of ", path$$1.call(print, "right"), ")", adjustClause(n.body, path$$1.call(print, "body"))])); } case "DoWhileStatement": { - var clause = adjustClause(n.body, path.call(print, "body")); + var clause = adjustClause(n.body, path$$1.call(print, "body")); var doBody = group$1(concat$2(["do", clause])); parts = [doBody]; @@ -3744,17 +4638,17 @@ function genericPrintNoParens(path, options, print, args) { } parts.push("while ("); - parts.push(group$1(concat$2([indent$2(softline$1), path.call(print, "test"), softline$1])), ")", semi); + parts.push(group$1(concat$2([indent$2(softline$1), path$$1.call(print, "test"), softline$1])), ")", semi); return concat$2(parts); } case "DoExpression": - return concat$2(["do ", path.call(print, "body")]); + return concat$2(["do ", path$$1.call(print, "body")]); case "BreakStatement": parts.push("break"); if (n.label) { - parts.push(" ", path.call(print, "label")); + parts.push(" ", path$$1.call(print, "label")); } parts.push(semi); @@ -3764,7 +4658,7 @@ function genericPrintNoParens(path, options, print, args) { parts.push("continue"); if (n.label) { - parts.push(" ", path.call(print, "label")); + parts.push(" ", path$$1.call(print, "label")); } parts.push(semi); @@ -3772,49 +4666,49 @@ function genericPrintNoParens(path, options, print, args) { return concat$2(parts); case "LabeledStatement": if (n.body.type === "EmptyStatement") { - return concat$2([path.call(print, "label"), ":;"]); + return concat$2([path$$1.call(print, "label"), ":;"]); } - return concat$2([path.call(print, "label"), ": ", path.call(print, "body")]); + return concat$2([path$$1.call(print, "label"), ": ", path$$1.call(print, "body")]); case "TryStatement": - parts.push("try ", path.call(print, "block")); + parts.push("try ", path$$1.call(print, "block")); if (n.handler) { - parts.push(" ", path.call(print, "handler")); + parts.push(" ", path$$1.call(print, "handler")); } else if (n.handlers) { - path.each(function (handlerPath) { + path$$1.each(function (handlerPath) { parts.push(" ", print(handlerPath)); }, "handlers"); } if (n.finalizer) { - parts.push(" finally ", path.call(print, "finalizer")); + parts.push(" finally ", path$$1.call(print, "finalizer")); } return concat$2(parts); case "CatchClause": - parts.push("catch (", path.call(print, "param")); + parts.push("catch (", path$$1.call(print, "param")); if (n.guard) { // Note: esprima does not recognize conditional catch clauses. - parts.push(" if ", path.call(print, "guard")); + parts.push(" if ", path$$1.call(print, "guard")); } - parts.push(") ", path.call(print, "body")); + parts.push(") ", path$$1.call(print, "body")); return concat$2(parts); case "ThrowStatement": - return concat$2(["throw ", path.call(print, "argument"), semi]); + return concat$2(["throw ", path$$1.call(print, "argument"), semi]); // Note: ignoring n.lexical because it has no printing consequences. case "SwitchStatement": - return concat$2(["switch (", path.call(print, "discriminant"), ") {", n.cases.length > 0 ? indent$2(concat$2([hardline$2, join$2(hardline$2, path.map(function (casePath) { + return concat$2(["switch (", path$$1.call(print, "discriminant"), ") {", n.cases.length > 0 ? indent$2(concat$2([hardline$2, join$2(hardline$2, path$$1.map(function (casePath) { var caseNode = casePath.getValue(); return concat$2([casePath.call(print), n.cases.indexOf(caseNode) !== n.cases.length - 1 && util$4.isNextLineEmpty(options.originalText, caseNode) ? hardline$2 : ""]); }, "cases"))])) : "", hardline$2, "}"]); case "SwitchCase": { if (n.test) { - parts.push("case ", path.call(print, "test"), ":"); + parts.push("case ", path$$1.call(print, "test"), ":"); } else { parts.push("default:"); } @@ -3824,7 +4718,7 @@ function genericPrintNoParens(path, options, print, args) { }); if (consequent.length > 0) { - var cons = path.call(function (consequentPath) { + var cons = path$$1.call(function (consequentPath) { return printStatementSequence(consequentPath, options, print); }, "consequent"); @@ -3837,7 +4731,7 @@ function genericPrintNoParens(path, options, print, args) { case "DebuggerStatement": return concat$2(["debugger", semi]); case "JSXAttribute": - parts.push(path.call(print, "name")); + parts.push(path$$1.call(print, "name")); if (n.value) { var res = void 0; @@ -3845,7 +4739,7 @@ function genericPrintNoParens(path, options, print, args) { var value = n.value.extra ? n.value.extra.raw : n.value.raw; res = '"' + value.slice(1, -1).replace(/"/g, """) + '"'; } else { - res = path.call(print, "value"); + res = path$$1.call(print, "value"); } parts.push("=", res); } @@ -3859,68 +4753,72 @@ function genericPrintNoParens(path, options, print, args) { } return "" + n.name; case "JSXNamespacedName": - return join$2(":", [path.call(print, "namespace"), path.call(print, "name")]); + return join$2(":", [path$$1.call(print, "namespace"), path$$1.call(print, "name")]); case "JSXMemberExpression": - return join$2(".", [path.call(print, "object"), path.call(print, "property")]); + return join$2(".", [path$$1.call(print, "object"), path$$1.call(print, "property")]); case "TSQualifiedName": - return join$2(".", [path.call(print, "left"), path.call(print, "right")]); + return join$2(".", [path$$1.call(print, "left"), path$$1.call(print, "right")]); case "JSXSpreadAttribute": - return concat$2(["{...", path.call(print, "argument"), "}"]); + return concat$2(["{...", path$$1.call(print, "argument"), "}"]); case "JSXExpressionContainer": { - var _parent8 = path.getParentNode(0); + var _parent8 = path$$1.getParentNode(0); var _shouldInline2 = n.expression.type === "ArrayExpression" || n.expression.type === "ObjectExpression" || n.expression.type === "ArrowFunctionExpression" || n.expression.type === "CallExpression" || n.expression.type === "FunctionExpression" || n.expression.type === "JSXEmptyExpression" || n.expression.type === "TemplateLiteral" || n.expression.type === "TaggedTemplateExpression" || _parent8.type === "JSXElement" && (n.expression.type === "ConditionalExpression" || isBinaryish(n.expression)); if (_shouldInline2) { - return group$1(concat$2(["{", path.call(print, "expression"), lineSuffixBoundary$1, "}"])); + return group$1(concat$2(["{", path$$1.call(print, "expression"), lineSuffixBoundary$1, "}"])); } - return group$1(concat$2(["{", indent$2(concat$2([softline$1, path.call(print, "expression")])), softline$1, lineSuffixBoundary$1, "}"])); + return group$1(concat$2(["{", indent$2(concat$2([softline$1, path$$1.call(print, "expression")])), softline$1, lineSuffixBoundary$1, "}"])); } case "JSXElement": { - var elem = comments$3.printComments(path, function () { - return printJSXElement(path, options, print); + var elem = comments$3.printComments(path$$1, function () { + return printJSXElement(path$$1, options, print); }, options); - return maybeWrapJSXElementInParens(path, elem); + return maybeWrapJSXElementInParens(path$$1, elem); } case "JSXOpeningElement": { - var _n2 = path.getValue(); + var _n2 = path$$1.getValue(); // don't break up opening elements with a single long text attribute if (_n2.attributes.length === 1 && _n2.attributes[0].value && isStringLiteral(_n2.attributes[0].value)) { - return group$1(concat$2(["<", path.call(print, "name"), " ", concat$2(path.map(print, "attributes")), _n2.selfClosing ? " />" : ">"])); + return group$1(concat$2(["<", path$$1.call(print, "name"), " ", concat$2(path$$1.map(print, "attributes")), _n2.selfClosing ? " />" : ">"])); } - return group$1(concat$2(["<", path.call(print, "name"), concat$2([indent$2(concat$2(path.map(function (attr) { + return group$1(concat$2(["<", path$$1.call(print, "name"), concat$2([indent$2(concat$2(path$$1.map(function (attr) { return concat$2([line$1, print(attr)]); }, "attributes"))), _n2.selfClosing ? line$1 : options.jsxBracketSameLine ? ">" : softline$1]), _n2.selfClosing ? "/>" : options.jsxBracketSameLine ? "" : ">"])); } case "JSXClosingElement": - return concat$2([""]); + return concat$2([""]); case "JSXText": throw new Error("JSXTest should be handled by JSXElement"); case "JSXEmptyExpression": { var requiresHardline = n.comments && !n.comments.every(util$4.isBlockComment); - return concat$2([comments$3.printDanglingComments(path, options, + return concat$2([comments$3.printDanglingComments(path$$1, options, /* sameIndent */!requiresHardline), requiresHardline ? hardline$2 : ""]); } + case "Keyword": + { + return n.name; + } case "TypeAnnotatedIdentifier": - return concat$2([path.call(print, "annotation"), " ", path.call(print, "identifier")]); + return concat$2([path$$1.call(print, "annotation"), " ", path$$1.call(print, "identifier")]); case "ClassBody": if (!n.comments && n.body.length === 0) { return "{}"; } - return concat$2(["{", n.body.length > 0 ? indent$2(concat$2([hardline$2, path.call(function (bodyPath) { + return concat$2(["{", n.body.length > 0 ? indent$2(concat$2([hardline$2, path$$1.call(function (bodyPath) { return printStatementSequence(bodyPath, options, print); - }, "body")])) : comments$3.printDanglingComments(path, options), hardline$2, "}"]); + }, "body")])) : comments$3.printDanglingComments(path$$1, options), hardline$2, "}"]); case "ClassPropertyDefinition": - parts.push("static ", path.call(print, "definition")); + parts.push("static ", path$$1.call(print, "definition")); if (n.definition.type !== "MethodDefinition" && n.definition.type !== "TSAbstractMethodDefinition") { parts.push(semi); @@ -3947,15 +4845,15 @@ function genericPrintNoParens(path, options, print, args) { parts.push("readonly "); } if (n.computed) { - parts.push("[", path.call(print, "key"), "]"); + parts.push("[", path$$1.call(print, "key"), "]"); } else { - parts.push(printPropertyKey(path, options, print)); + parts.push(printPropertyKey(path$$1, options, print)); } if (n.typeAnnotation) { - parts.push(": ", path.call(print, "typeAnnotation")); + parts.push(": ", path$$1.call(print, "typeAnnotation")); } if (n.value) { - parts.push(" =", printAssignmentRight(n.value, path.call(print, "value"), false, // canBreak + parts.push(" =", printAssignmentRight(n.value, path$$1.call(print, "value"), false, // canBreak options)); } @@ -3969,55 +4867,29 @@ function genericPrintNoParens(path, options, print, args) { if (isNodeStartingWithDeclare(n, options)) { parts.push("declare "); } - parts.push(concat$2(printClass(path, options, print))); + parts.push(concat$2(printClass(path$$1, options, print))); return concat$2(parts); case "TSInterfaceHeritage": - parts.push(path.call(print, "id")); + parts.push(path$$1.call(print, "id")); if (n.typeParameters) { - parts.push(path.call(print, "typeParameters")); + parts.push(path$$1.call(print, "typeParameters")); } return concat$2(parts); case "TSHeritageClause": - return join$2(", ", path.map(print, "types")); + return join$2(", ", path$$1.map(print, "types")); case "TSExpressionWithTypeArguments": - return concat$2([path.call(print, "expression"), printTypeParameters(path, options, print, "typeArguments")]); + return concat$2([path$$1.call(print, "expression"), printTypeParameters(path$$1, options, print, "typeArguments")]); case "TemplateElement": return join$2(literalline$1, n.value.raw.split(/\r?\n/g)); case "TemplateLiteral": { - var _parent9 = path.getParentNode(); - var _parentParent2 = path.getParentNode(1); - var isCSS = n.quasis && n.quasis.length === 1 && _parent9.type === "JSXExpressionContainer" && _parentParent2.type === "JSXElement" && _parentParent2.openingElement.name.name === "style" && _parentParent2.openingElement.attributes.some(function (attribute) { - return attribute.name.name === "jsx"; - }); - - if (isCSS) { - var parseCss = eval("require")("./parser-postcss"); - var newOptions = Object.assign({}, options, { parser: "postcss" }); - var text = n.quasis[0].value.raw; - try { - var _ast = parseCss(text, newOptions); - var subtree = printAstToDoc$1(_ast, newOptions); - - // HACK remove ending hardline - assert$1.ok(subtree.type === "concat" && subtree.parts[0].type === "concat" && subtree.parts[0].parts.length === 2 && subtree.parts[0].parts[1] === hardline$2); - subtree = subtree.parts[0].parts[0]; - - parts.push("`", indent$2(concat$2([line$1, subtree])), line$1, "`"); - return group$1(concat$2(parts)); - } catch (error) { - // If CSS parsing (or printing) failed - // we give up and just print the TemplateElement as usual - } - } - - var expressions = path.map(print, "expressions"); + var expressions = path$$1.map(print, "expressions"); parts.push("`"); - path.each(function (childPath) { + path$$1.each(function (childPath) { var i = childPath.getName(); parts.push(print(childPath)); @@ -4057,7 +4929,7 @@ function genericPrintNoParens(path, options, print, args) { // These types are unprintable because they serve as abstract // supertypes for other (printable) types. case "TaggedTemplateExpression": - return concat$2([path.call(print, "tag"), path.call(print, "quasi")]); + return concat$2([path$$1.call(print, "tag"), path$$1.call(print, "quasi")]); case "Node": case "Printable": case "SourceLocation": @@ -4077,7 +4949,7 @@ function genericPrintNoParens(path, options, print, args) { // transformed away before printing. case "TypeAnnotation": if (n.typeAnnotation) { - return path.call(print, "typeAnnotation"); + return path$$1.call(print, "typeAnnotation"); } return ""; @@ -4085,9 +4957,9 @@ function genericPrintNoParens(path, options, print, args) { case "TupleTypeAnnotation": { var typesField = n.type === "TSTupleType" ? "elementTypes" : "types"; - return group$1(concat$2(["[", indent$2(concat$2([softline$1, printArrayItems(path, options, typesField, print)])), + return group$1(concat$2(["[", indent$2(concat$2([softline$1, printArrayItems(path$$1, options, typesField, print)])), // TypeScript doesn't support trailing commas in tuple types - n.type === "TSTupleType" ? "" : ifBreak$1(shouldPrintComma(options) ? "," : ""), comments$3.printDanglingComments(path, options, /* sameIndent */true), softline$1, "]"])); + n.type === "TSTupleType" ? "" : ifBreak$1(shouldPrintComma(options) ? "," : ""), comments$3.printDanglingComments(path$$1, options, /* sameIndent */true), softline$1, "]"])); } case "ExistsTypeAnnotation": @@ -4099,49 +4971,49 @@ function genericPrintNoParens(path, options, print, args) { case "MixedTypeAnnotation": return "mixed"; case "ArrayTypeAnnotation": - return concat$2([path.call(print, "elementType"), "[]"]); + return concat$2([path$$1.call(print, "elementType"), "[]"]); case "BooleanTypeAnnotation": return "boolean"; case "BooleanLiteralTypeAnnotation": return "" + n.value; case "DeclareClass": - return printFlowDeclaration(path, printClass(path, options, print)); + return printFlowDeclaration(path$$1, printClass(path$$1, options, print)); case "DeclareFunction": // For TypeScript the DeclareFunction node shares the AST // structure with FunctionDeclaration if (n.params) { - return concat$2(["declare ", printFunctionDeclaration(path, print, options)]); + return concat$2(["declare ", printFunctionDeclaration(path$$1, print, options)]); } - return printFlowDeclaration(path, ["function ", path.call(print, "id"), n.predicate ? " " : "", path.call(print, "predicate"), semi]); + return printFlowDeclaration(path$$1, ["function ", path$$1.call(print, "id"), n.predicate ? " " : "", path$$1.call(print, "predicate"), semi]); case "DeclareModule": - return printFlowDeclaration(path, ["module ", path.call(print, "id"), " ", path.call(print, "body")]); + return printFlowDeclaration(path$$1, ["module ", path$$1.call(print, "id"), " ", path$$1.call(print, "body")]); case "DeclareModuleExports": - return printFlowDeclaration(path, ["module.exports", ": ", path.call(print, "typeAnnotation"), semi]); + return printFlowDeclaration(path$$1, ["module.exports", ": ", path$$1.call(print, "typeAnnotation"), semi]); case "DeclareVariable": - return printFlowDeclaration(path, ["var ", path.call(print, "id"), semi]); + return printFlowDeclaration(path$$1, ["var ", path$$1.call(print, "id"), semi]); case "DeclareExportAllDeclaration": - return concat$2(["declare export * from ", path.call(print, "source")]); + return concat$2(["declare export * from ", path$$1.call(print, "source")]); case "DeclareExportDeclaration": - return concat$2(["declare ", printExportDeclaration(path, options, print)]); + return concat$2(["declare ", printExportDeclaration(path$$1, options, print)]); case "FunctionTypeAnnotation": case "TSFunctionType": { // FunctionTypeAnnotation is ambiguous: // declare function foo(a: B): void; OR // var A: (a: B) => void; - var _parent10 = path.getParentNode(0); - var _parentParent3 = path.getParentNode(1); - var _parentParentParent = path.getParentNode(2); - var isArrowFunctionTypeAnnotation = n.type === "TSFunctionType" || !(_parent10.type === "ObjectTypeProperty" && !getFlowVariance(_parent10) && !_parent10.optional && util$4.locStart(_parent10) === util$4.locStart(n) || _parent10.type === "ObjectTypeCallProperty" || _parentParentParent && _parentParentParent.type === "DeclareFunction"); + var _parent9 = path$$1.getParentNode(0); + var _parentParent2 = path$$1.getParentNode(1); + var _parentParentParent = path$$1.getParentNode(2); + var isArrowFunctionTypeAnnotation = n.type === "TSFunctionType" || !(_parent9.type === "ObjectTypeProperty" && !getFlowVariance(_parent9) && !_parent9.optional && util$4.locStart(_parent9) === util$4.locStart(n) || _parent9.type === "ObjectTypeCallProperty" || _parentParentParent && _parentParentParent.type === "DeclareFunction"); - var needsColon = isArrowFunctionTypeAnnotation && _parent10.type === "TypeAnnotation"; + var needsColon = isArrowFunctionTypeAnnotation && _parent9.type === "TypeAnnotation"; // Sadly we can't put it inside of FastPath::needsColon because we are // printing ":" as part of the expression and it would put parenthesis // around :( - var needsParens = needsColon && isArrowFunctionTypeAnnotation && _parent10.type === "TypeAnnotation" && _parentParent3.type === "ArrowFunctionExpression"; + var needsParens = needsColon && isArrowFunctionTypeAnnotation && _parent9.type === "TypeAnnotation" && _parentParent2.type === "ArrowFunctionExpression"; - if (isObjectTypePropertyAFunction(_parent10)) { + if (isObjectTypePropertyAFunction(_parent9)) { isArrowFunctionTypeAnnotation = true; needsColon = true; } @@ -4150,12 +5022,14 @@ function genericPrintNoParens(path, options, print, args) { parts.push("("); } - parts.push(printFunctionTypeParameters(path, options, print), printFunctionParams(path, print, options)); + parts.push(printFunctionParams(path$$1, print, options, + /* expandArg */false, + /* printTypeParams */true)); // The returnType is not wrapped in a TypeAnnotation, so the colon // needs to be added separately. if (n.returnType || n.predicate || n.typeAnnotation) { - parts.push(isArrowFunctionTypeAnnotation ? " => " : ": ", path.call(print, "returnType"), path.call(print, "predicate"), path.call(print, "typeAnnotation")); + parts.push(isArrowFunctionTypeAnnotation ? " => " : ": ", path$$1.call(print, "returnType"), path$$1.call(print, "predicate"), path$$1.call(print, "typeAnnotation")); } if (needsParens) { parts.push(")"); @@ -4164,9 +5038,9 @@ function genericPrintNoParens(path, options, print, args) { return group$1(concat$2(parts)); } case "FunctionTypeParam": - return concat$2([path.call(print, "name"), n.optional ? "?" : "", n.name ? ": " : "", path.call(print, "typeAnnotation")]); + return concat$2([path$$1.call(print, "name"), n.optional ? "?" : "", n.name ? ": " : "", path$$1.call(print, "typeAnnotation")]); case "GenericTypeAnnotation": - return concat$2([path.call(print, "id"), path.call(print, "typeParameters")]); + return concat$2([path$$1.call(print, "id"), path$$1.call(print, "typeParameters")]); case "DeclareInterface": case "InterfaceDeclaration": { @@ -4174,24 +5048,24 @@ function genericPrintNoParens(path, options, print, args) { parts.push("declare "); } - parts.push("interface ", path.call(print, "id"), path.call(print, "typeParameters")); + parts.push("interface ", path$$1.call(print, "id"), path$$1.call(print, "typeParameters")); if (n["extends"].length > 0) { - parts.push(group$1(indent$2(concat$2([line$1, "extends ", join$2(", ", path.map(print, "extends"))])))); + parts.push(group$1(indent$2(concat$2([line$1, "extends ", join$2(", ", path$$1.map(print, "extends"))])))); } parts.push(" "); - parts.push(path.call(print, "body")); + parts.push(path$$1.call(print, "body")); return group$1(concat$2(parts)); } case "ClassImplements": case "InterfaceExtends": - return concat$2([path.call(print, "id"), path.call(print, "typeParameters")]); + return concat$2([path$$1.call(print, "id"), path$$1.call(print, "typeParameters")]); case "TSIntersectionType": case "IntersectionTypeAnnotation": { - var types = path.map(print, "types"); + var types = path$$1.map(print, "types"); var result = []; for (var _i5 = 0; _i5 < types.length; ++_i5) { if (_i5 === 0) { @@ -4217,9 +5091,9 @@ function genericPrintNoParens(path, options, print, args) { // | B // | C - var _parent11 = path.getParentNode(); + var _parent10 = path$$1.getParentNode(); // If there's a leading comment, the parent is doing the indentation - var shouldIndent = _parent11.type !== "TypeParameterInstantiation" && _parent11.type !== "GenericTypeAnnotation" && !((_parent11.type === "TypeAlias" || _parent11.type === "VariableDeclarator") && hasLeadingOwnLineComment(options.originalText, n)); + var shouldIndent = _parent10.type !== "TypeParameterInstantiation" && _parent10.type !== "GenericTypeAnnotation" && !((_parent10.type === "TypeAlias" || _parent10.type === "VariableDeclarator") && hasLeadingOwnLineComment(options.originalText, n)); // { // a: string @@ -4231,7 +5105,7 @@ function genericPrintNoParens(path, options, print, args) { // | child1 // // comment // | child2 - var _printed2 = path.map(function (typePath) { + var _printed2 = path$$1.map(function (typePath) { var printedType = typePath.call(print); if (!shouldHug && shouldIndent) { printedType = align$1(2, printedType); @@ -4250,7 +5124,7 @@ function genericPrintNoParens(path, options, print, args) { return group$1(shouldIndent ? indent$2(_code) : _code); } case "NullableTypeAnnotation": - return concat$2(["?", path.call(print, "typeAnnotation")]); + return concat$2(["?", path$$1.call(print, "typeAnnotation")]); case "NullLiteralTypeAnnotation": return "null"; case "ThisTypeAnnotation": @@ -4262,22 +5136,22 @@ function genericPrintNoParens(path, options, print, args) { parts.push("static "); } - parts.push(path.call(print, "value")); + parts.push(path$$1.call(print, "value")); return concat$2(parts); case "ObjectTypeIndexer": { var _variance = getFlowVariance(n); - return concat$2([_variance || "", "[", path.call(print, "id"), n.id ? ": " : "", path.call(print, "key"), "]: ", path.call(print, "value")]); + return concat$2([_variance || "", "[", path$$1.call(print, "id"), n.id ? ": " : "", path$$1.call(print, "key"), "]: ", path$$1.call(print, "value")]); } case "ObjectTypeProperty": { var _variance2 = getFlowVariance(n); - return concat$2([n.static ? "static " : "", isGetterOrSetter(n) ? n.kind + " " : "", _variance2 || "", path.call(print, "key"), n.optional ? "?" : "", isFunctionNotation(n) ? "" : ": ", path.call(print, "value")]); + return concat$2([n.static ? "static " : "", isGetterOrSetter(n) ? n.kind + " " : "", _variance2 || "", path$$1.call(print, "key"), n.optional ? "?" : "", isFunctionNotation(n) ? "" : ": ", path$$1.call(print, "value")]); } case "QualifiedTypeIdentifier": - return concat$2([path.call(print, "qualification"), ".", path.call(print, "id")]); + return concat$2([path$$1.call(print, "qualification"), ".", path$$1.call(print, "id")]); case "StringLiteralTypeAnnotation": return nodeStr(n, options); case "NumberLiteralTypeAnnotation": @@ -4299,17 +5173,17 @@ function genericPrintNoParens(path, options, print, args) { var canBreak = n.right.type === "StringLiteralTypeAnnotation"; - var _printed3 = printAssignmentRight(n.right, path.call(print, "right"), canBreak, options); + var _printed3 = printAssignmentRight(n.right, path$$1.call(print, "right"), canBreak, options); - parts.push("type ", path.call(print, "id"), path.call(print, "typeParameters"), " =", _printed3, semi); + parts.push("type ", path$$1.call(print, "id"), path$$1.call(print, "typeParameters"), " =", _printed3, semi); return group$1(concat$2(parts)); } case "TypeCastExpression": - return concat$2(["(", path.call(print, "expression"), ": ", path.call(print, "typeAnnotation"), ")"]); + return concat$2(["(", path$$1.call(print, "expression"), ": ", path$$1.call(print, "typeAnnotation"), ")"]); case "TypeParameterDeclaration": case "TypeParameterInstantiation": - return printTypeParameters(path, options, print, "params"); + return printTypeParameters(path$$1, options, print, "params"); case "TypeParameter": { var _variance3 = getFlowVariance(n); @@ -4318,25 +5192,25 @@ function genericPrintNoParens(path, options, print, args) { parts.push(_variance3); } - parts.push(path.call(print, "name")); + parts.push(path$$1.call(print, "name")); if (n.bound) { parts.push(": "); - parts.push(path.call(print, "bound")); + parts.push(path$$1.call(print, "bound")); } if (n.constraint) { - parts.push(" extends ", path.call(print, "constraint")); + parts.push(" extends ", path$$1.call(print, "constraint")); } if (n["default"]) { - parts.push(" = ", path.call(print, "default")); + parts.push(" = ", path$$1.call(print, "default")); } return concat$2(parts); } case "TypeofTypeAnnotation": - return concat$2(["typeof ", path.call(print, "argument")]); + return concat$2(["typeof ", path$$1.call(print, "argument")]); case "VoidTypeAnnotation": return "void"; case "NullTypeAnnotation": @@ -4347,7 +5221,7 @@ function genericPrintNoParens(path, options, print, args) { // be either left alone or desugared into AST types that are fully // supported by the pretty-printer. case "DeclaredPredicate": - return concat$2(["%checks(", path.call(print, "value"), ")"]); + return concat$2(["%checks(", path$$1.call(print, "value"), ")"]); case "TSAbstractKeyword": return "abstract"; case "TSAnyKeyword": @@ -4387,9 +5261,9 @@ function genericPrintNoParens(path, options, print, args) { case "TSVoidKeyword": return "void"; case "TSAsExpression": - return concat$2([path.call(print, "expression"), " as ", path.call(print, "typeAnnotation")]); + return concat$2([path$$1.call(print, "expression"), " as ", path$$1.call(print, "typeAnnotation")]); case "TSArrayType": - return concat$2([path.call(print, "elementType"), "[]"]); + return concat$2([path$$1.call(print, "elementType"), "[]"]); case "TSPropertySignature": { if (n.accessibility) { @@ -4410,7 +5284,7 @@ function genericPrintNoParens(path, options, print, args) { parts.push("["); } - parts.push(path.call(print, "key")); + parts.push(path$$1.call(print, "key")); if (n.computed) { parts.push("]"); @@ -4422,12 +5296,12 @@ function genericPrintNoParens(path, options, print, args) { if (n.typeAnnotation) { parts.push(": "); - parts.push(path.call(print, "typeAnnotation")); + parts.push(path$$1.call(print, "typeAnnotation")); } // This isn't valid semantically, but it's in the AST so we can print it. if (n.initializer) { - parts.push(" = ", path.call(print, "initializer")); + parts.push(" = ", path$$1.call(print, "initializer")); } return concat$2(parts); @@ -4446,41 +5320,43 @@ function genericPrintNoParens(path, options, print, args) { parts.push("readonly "); } - parts.push(path.call(print, "parameter")); + parts.push(path$$1.call(print, "parameter")); return concat$2(parts); case "TSTypeReference": - return concat$2([path.call(print, "typeName"), printTypeParameters(path, options, print, "typeParameters")]); + return concat$2([path$$1.call(print, "typeName"), printTypeParameters(path$$1, options, print, "typeParameters")]); case "TSTypeQuery": - return concat$2(["typeof ", path.call(print, "exprName")]); + return concat$2(["typeof ", path$$1.call(print, "exprName")]); case "TSParenthesizedType": - return concat$2(["(", path.call(print, "typeAnnotation"), ")"]); + { + return path$$1.call(print, "typeAnnotation"); + } case "TSIndexSignature": { - var _parent12 = path.getParentNode(); + var _parent11 = path$$1.getParentNode(); var printedParams = []; if (n.params) { - printedParams = path.map(print, "params"); + printedParams = path$$1.map(print, "params"); } if (n.parameters) { - printedParams = path.map(print, "parameters"); + printedParams = path$$1.map(print, "parameters"); } - return concat$2([n.accessibility ? concat$2([n.accessibility, " "]) : "", n.export ? "export " : "", n.static ? "static " : "", n.readonly ? "readonly " : "", "[", path.call(print, "index"), + return concat$2([n.accessibility ? concat$2([n.accessibility, " "]) : "", n.export ? "export " : "", n.static ? "static " : "", n.readonly ? "readonly " : "", "[", path$$1.call(print, "index"), // This should only contain a single element, however TypeScript parses // it using parseDelimitedList that uses commas as delimiter. - join$2(", ", printedParams), "]: ", path.call(print, "typeAnnotation"), _parent12.type === "ClassBody" ? semi : ""]); + join$2(", ", printedParams), "]: ", path$$1.call(print, "typeAnnotation"), _parent11.type === "ClassBody" ? semi : ""]); } case "TSTypePredicate": - return concat$2([path.call(print, "parameterName"), " is ", path.call(print, "typeAnnotation")]); + return concat$2([path$$1.call(print, "parameterName"), " is ", path$$1.call(print, "typeAnnotation")]); case "TSNonNullExpression": - return concat$2([path.call(print, "expression"), "!"]); + return concat$2([path$$1.call(print, "expression"), "!"]); case "TSThisType": return "this"; case "TSLastTypeNode": - return path.call(print, "literal"); + return path$$1.call(print, "literal"); case "TSIndexedAccessType": - return concat$2([path.call(print, "objectType"), "[", path.call(print, "indexType"), "]"]); + return concat$2([path$$1.call(print, "objectType"), "[", path$$1.call(print, "indexType"), "]"]); case "TSConstructSignature": case "TSConstructorType": case "TSCallSignature": @@ -4488,45 +5364,45 @@ function genericPrintNoParens(path, options, print, args) { if (n.type !== "TSCallSignature") { parts.push("new "); } - var isType = n.type === "TSConstructorType"; - if (n.typeParameters) { - parts.push(printTypeParameters(path, options, print, "typeParameters")); - } + parts.push(printFunctionParams(path$$1, print, options, + /* expandArg */false, + /* printTypeParams */true)); - var params = n.params ? path.map(print, "params") : path.map(print, "parameters"); - parts.push("(", join$2(", ", params), ")"); if (n.typeAnnotation) { - parts.push(isType ? " => " : ": ", path.call(print, "typeAnnotation")); + var isType = n.type === "TSConstructorType"; + parts.push(isType ? " => " : ": ", path$$1.call(print, "typeAnnotation")); } return concat$2(parts); } case "TSTypeOperator": - return concat$2(["keyof ", path.call(print, "typeAnnotation")]); + return concat$2(["keyof ", path$$1.call(print, "typeAnnotation")]); case "TSMappedType": - return group$1(concat$2(["{", indent$2(concat$2([options.bracketSpacing ? line$1 : softline$1, n.readonlyToken ? concat$2([path.call(print, "readonlyToken"), " "]) : "", printTypeScriptModifiers(path, options, print), "[", path.call(print, "typeParameter"), "]", n.questionToken ? "?" : "", ": ", path.call(print, "typeAnnotation")])), comments$3.printDanglingComments(path, options, /* sameIndent */true), options.bracketSpacing ? line$1 : softline$1, "}"])); + return group$1(concat$2(["{", indent$2(concat$2([options.bracketSpacing ? line$1 : softline$1, n.readonlyToken ? concat$2([path$$1.call(print, "readonlyToken"), " "]) : "", printTypeScriptModifiers(path$$1, options, print), "[", path$$1.call(print, "typeParameter"), "]", n.questionToken ? "?" : "", ": ", path$$1.call(print, "typeAnnotation")])), comments$3.printDanglingComments(path$$1, options, /* sameIndent */true), options.bracketSpacing ? line$1 : softline$1, "}"])); case "TSTypeParameter": - parts.push(path.call(print, "name")); + parts.push(path$$1.call(print, "name")); if (n.constraint) { - parts.push(" in ", path.call(print, "constraint")); + parts.push(" in ", path$$1.call(print, "constraint")); } return concat$2(parts); case "TSMethodSignature": - parts.push(n.accessibility ? concat$2([n.accessibility, " "]) : "", n.export ? "export " : "", n.static ? "static " : "", n.readonly ? "readonly " : "", n.computed ? "[" : "", path.call(print, "key"), n.computed ? "]" : "", n.optional ? "?" : "", printFunctionTypeParameters(path, options, print), printFunctionParams(path, print, options)); + parts.push(n.accessibility ? concat$2([n.accessibility, " "]) : "", n.export ? "export " : "", n.static ? "static " : "", n.readonly ? "readonly " : "", n.computed ? "[" : "", path$$1.call(print, "key"), n.computed ? "]" : "", n.optional ? "?" : "", printFunctionParams(path$$1, print, options, + /* expandArg */false, + /* printTypeParams */true)); if (n.typeAnnotation) { - parts.push(": ", path.call(print, "typeAnnotation")); + parts.push(": ", path$$1.call(print, "typeAnnotation")); } return group$1(concat$2(parts)); case "TSNamespaceExportDeclaration": if (n.declaration) { // Temporary fix until https://github.com/eslint/typescript-eslint-parser/issues/263 var isDefault = options.originalText.slice(util$4.locStart(n), util$4.locStart(n.declaration)).match(/\bdefault\b/); - parts.push("export ", isDefault ? "default " : "", path.call(print, "declaration")); + parts.push("export ", isDefault ? "default " : "", path$$1.call(print, "declaration")); } else { - parts.push("export as namespace ", path.call(print, "name")); + parts.push("export as namespace ", path$$1.call(print, "name")); if (options.semi) { parts.push(";"); @@ -4536,27 +5412,27 @@ function genericPrintNoParens(path, options, print, args) { return group$1(concat$2(parts)); case "TSEnumDeclaration": if (n.modifiers) { - parts.push(printTypeScriptModifiers(path, options, print)); + parts.push(printTypeScriptModifiers(path$$1, options, print)); } - parts.push("enum ", path.call(print, "name"), " "); + parts.push("enum ", path$$1.call(print, "name"), " "); if (n.members.length === 0) { - parts.push(group$1(concat$2(["{", comments$3.printDanglingComments(path, options), softline$1, "}"]))); + parts.push(group$1(concat$2(["{", comments$3.printDanglingComments(path$$1, options), softline$1, "}"]))); } else { - parts.push(group$1(concat$2(["{", indent$2(concat$2([hardline$2, printArrayItems(path, options, "members", print), shouldPrintComma(options, "es5") ? "," : ""])), comments$3.printDanglingComments(path, options, + parts.push(group$1(concat$2(["{", indent$2(concat$2([hardline$2, printArrayItems(path$$1, options, "members", print), shouldPrintComma(options, "es5") ? "," : ""])), comments$3.printDanglingComments(path$$1, options, /* sameIndent */true), hardline$2, "}"]))); } return concat$2(parts); case "TSEnumMember": - parts.push(path.call(print, "name")); + parts.push(path$$1.call(print, "name")); if (n.initializer) { - parts.push(" = ", path.call(print, "initializer")); + parts.push(" = ", path$$1.call(print, "initializer")); } return concat$2(parts); case "TSImportEqualsDeclaration": - parts.push(printTypeScriptModifiers(path, options, print), "import ", path.call(print, "name"), " = ", path.call(print, "moduleReference")); + parts.push(printTypeScriptModifiers(path$$1, options, print), "import ", path$$1.call(print, "name"), " = ", path$$1.call(print, "moduleReference")); if (options.semi) { parts.push(";"); @@ -4564,18 +5440,18 @@ function genericPrintNoParens(path, options, print, args) { return group$1(concat$2(parts)); case "TSExternalModuleReference": - return concat$2(["require(", path.call(print, "expression"), ")"]); + return concat$2(["require(", path$$1.call(print, "expression"), ")"]); case "TSModuleDeclaration": { - var _parent13 = path.getParentNode(); + var _parent12 = path$$1.getParentNode(); var isExternalModule = isLiteral(n.name); - var parentIsDeclaration = _parent13.type === "TSModuleDeclaration"; + var parentIsDeclaration = _parent12.type === "TSModuleDeclaration"; var bodyIsDeclaration = n.body && n.body.type === "TSModuleDeclaration"; if (parentIsDeclaration) { parts.push("."); } else { - parts.push(printTypeScriptModifiers(path, options, print)); + parts.push(printTypeScriptModifiers(path$$1, options, print)); // Global declaration looks like this: // declare global { ... } @@ -4588,14 +5464,14 @@ function genericPrintNoParens(path, options, print, args) { } } - parts.push(path.call(print, "name")); + parts.push(path$$1.call(print, "name")); if (bodyIsDeclaration) { - parts.push(path.call(print, "body")); + parts.push(path$$1.call(print, "body")); } else if (n.body) { - parts.push(" {", indent$2(concat$2([line$1, path.call(function (bodyPath) { + parts.push(" {", indent$2(concat$2([line$1, path$$1.call(function (bodyPath) { return comments$3.printDanglingComments(bodyPath, options, true); - }, "body"), group$1(path.call(print, "body"))])), line$1, "}"); + }, "body"), group$1(path$$1.call(print, "body"))])), line$1, "}"); } else { parts.push(semi); } @@ -4603,7 +5479,7 @@ function genericPrintNoParens(path, options, print, args) { return concat$2(parts); } case "TSModuleBlock": - return path.call(function (bodyPath) { + return path$$1.call(function (bodyPath) { return printStatementSequence(bodyPath, options, print); }, "body"); @@ -4612,13 +5488,13 @@ function genericPrintNoParens(path, options, print, args) { } } -function printStatementSequence(path, options, print) { +function printStatementSequence(path$$1, options, print) { var printed = []; - var bodyNode = path.getNode(); + var bodyNode = path$$1.getNode(); var isClass = bodyNode.type === "ClassBody"; - path.map(function (stmtPath, i) { + path$$1.map(function (stmtPath, i) { var stmt = stmtPath.getValue(); // Just in case the AST has been modified to contain falsy @@ -4673,23 +5549,23 @@ function printStatementSequence(path, options, print) { return join$2(hardline$2, printed); } -function printPropertyKey(path, options, print) { - var node = path.getNode(); +function printPropertyKey(path$$1, options, print) { + var node = path$$1.getNode(); var key = node.key; if (isStringLiteral(key) && isIdentifierName(key.value) && !node.computed) { // 'a' -> a - return path.call(function (keyPath) { + return path$$1.call(function (keyPath) { return comments$3.printComments(keyPath, function () { return key.value; }, options); }, "key"); } - return path.call(print, "key"); + return path$$1.call(print, "key"); } -function printMethod(path, options, print) { - var node = path.getNode(); +function printMethod(path$$1, options, print) { + var node = path$$1.getNode(); var semi = options.semi ? ";" : ""; var kind = node.kind; var parts = []; @@ -4712,20 +5588,20 @@ function printMethod(path, options, print) { parts.push(kind, " "); } - var key = printPropertyKey(path, options, print); + var key = printPropertyKey(path$$1, options, print); if (node.computed) { key = concat$2(["[", key, "]"]); } - parts.push(key, concat$2(path.call(function (valuePath) { + parts.push(key, concat$2(path$$1.call(function (valuePath) { return [printFunctionTypeParameters(valuePath, options, print), group$1(concat$2([printFunctionParams(valuePath, print, options), printReturnType(valuePath, print)]))]; }, "value"))); if (!node.value.body || node.value.body.length === 0) { parts.push(semi); } else { - parts.push(" ", path.call(print, "value", "body")); + parts.push(" ", path$$1.call(print, "value", "body")); } return concat$2(parts); @@ -4754,13 +5630,13 @@ function shouldGroupFirstArg(args) { return (!firstArg.comments || !firstArg.comments.length) && (firstArg.type === "FunctionExpression" || firstArg.type === "ArrowFunctionExpression" && firstArg.body.type === "BlockStatement") && !couldGroupArg(secondArg); } -function printArgumentsList(path, options, print) { - var printed = path.map(print, "arguments"); +function printArgumentsList(path$$1, options, print) { + var printed = path$$1.map(print, "arguments"); if (printed.length === 0) { - return concat$2(["(", comments$3.printDanglingComments(path, options, /* sameIndent */true), ")"]); + return concat$2(["(", comments$3.printDanglingComments(path$$1, options, /* sameIndent */true), ")"]); } - var args = path.getValue().arguments; + var args = path$$1.getValue().arguments; // This is just an optimization; I think we could return the // conditional group for all function calls, but it's more expensive // so only do it for specific forms. @@ -4772,7 +5648,7 @@ function printArgumentsList(path, options, print) { // We want to print the last argument with a special flag var printedExpanded = void 0; var i = 0; - path.each(function (argPath) { + path$$1.each(function (argPath) { if (shouldGroupFirst && i === 0) { printedExpanded = [argPath.call(function (p) { return print(p, { expandFirstArg: true }); @@ -4794,32 +5670,34 @@ function printArgumentsList(path, options, print) { return group$1(concat$2(["(", indent$2(concat$2([softline$1, join$2(concat$2([",", line$1]), printed)])), ifBreak$1(shouldPrintComma(options, "all") ? "," : ""), softline$1, ")"]), { shouldBreak: printed.some(willBreak) }); } -function printFunctionTypeParameters(path, options, print) { - var fun = path.getValue(); +function printFunctionTypeParameters(path$$1, options, print) { + var fun = path$$1.getValue(); var paramsFieldIsArray = Array.isArray(fun["typeParameters"]); if (fun.typeParameters) { // for TSFunctionType typeParameters is an array // for FunctionTypeAnnotation it's a single node if (paramsFieldIsArray) { - return concat$2("<", join$2(", ", path.map(print, "typeParameters")), ">"); + return concat$2("<", join$2(", ", path$$1.map(print, "typeParameters")), ">"); } - return path.call(print, "typeParameters"); + return path$$1.call(print, "typeParameters"); } return ""; } -function printFunctionParams(path, print, options, expandArg) { - var fun = path.getValue(); +function printFunctionParams(path$$1, print, options, expandArg, printTypeParams) { + var fun = path$$1.getValue(); var paramsField = fun.parameters ? "parameters" : "params"; + var typeParams = printTypeParams ? printFunctionTypeParameters(path$$1, options, print) : ""; + var printed = []; if (fun[paramsField]) { - printed = path.map(print, paramsField); + printed = path$$1.map(print, paramsField); } if (fun.defaults) { - path.each(function (defExprPath) { + path$$1.each(function (defExprPath) { var i = defExprPath.getName(); var p = printed[i]; @@ -4830,11 +5708,11 @@ function printFunctionParams(path, print, options, expandArg) { } if (fun.rest) { - printed.push(concat$2(["...", path.call(print, "rest")])); + printed.push(concat$2(["...", path$$1.call(print, "rest")])); } if (printed.length === 0) { - return concat$2(["(", comments$3.printDanglingComments(path, options, /* sameIndent */true), ")"]); + return concat$2([typeParams, "(", comments$3.printDanglingComments(path$$1, options, /* sameIndent */true), ")"]); } var lastParam = util$4.getLast(fun[paramsField]); @@ -4850,7 +5728,7 @@ function printFunctionParams(path, print, options, expandArg) { // }) ) => { // }) if (expandArg) { - return group$1(concat$2(["(", join$2(", ", printed.map(removeLines)), ")"])); + return group$1(concat$2([removeLines(typeParams), "(", join$2(", ", printed.map(removeLines)), ")"])); } // Single object destructuring should hug @@ -4861,10 +5739,10 @@ function printFunctionParams(path, print, options, expandArg) { // c // }) {} if (shouldHugArguments(fun)) { - return concat$2(["(", join$2(", ", printed), ")"]); + return concat$2([typeParams, "(", join$2(", ", printed), ")"]); } - var parent = path.getParentNode(); + var parent = path$$1.getParentNode(); var flowTypeAnnotations = ["AnyTypeAnnotation", "NullLiteralTypeAnnotation", "GenericTypeAnnotation", "ThisTypeAnnotation", "NumberTypeAnnotation", "VoidTypeAnnotation", "NullTypeAnnotation", "EmptyTypeAnnotation", "MixedTypeAnnotation", "BooleanTypeAnnotation", "BooleanLiteralTypeAnnotation", "StringTypeAnnotation"]; @@ -4876,15 +5754,15 @@ function printFunctionParams(path, print, options, expandArg) { var canHaveTrailingComma = !(lastParam && lastParam.type === "RestElement") && !fun.rest; - return concat$2(["(", indent$2(concat$2([softline$1, join$2(concat$2([",", line$1]), printed)])), ifBreak$1(canHaveTrailingComma && shouldPrintComma(options, "all") ? "," : ""), softline$1, ")"]); + return concat$2([typeParams, "(", indent$2(concat$2([softline$1, join$2(concat$2([",", line$1]), printed)])), ifBreak$1(canHaveTrailingComma && shouldPrintComma(options, "all") ? "," : ""), softline$1, ")"]); } function canPrintParamsWithoutParens(node) { return node.params.length === 1 && !node.rest && node.params[0].type === "Identifier" && !node.params[0].typeAnnotation && !util$4.hasBlockComments(node.params[0]) && !node.params[0].optional && !node.predicate && !node.returnType; } -function printFunctionDeclaration(path, print, options) { - var n = path.getValue(); +function printFunctionDeclaration(path$$1, print, options) { + var n = path$$1.getValue(); var parts = []; if (n.async) { @@ -4897,16 +5775,16 @@ function printFunctionDeclaration(path, print, options) { parts.push("*"); } if (n.id) { - parts.push(" ", path.call(print, "id")); + parts.push(" ", path$$1.call(print, "id")); } - parts.push(printFunctionTypeParameters(path, options, print), group$1(concat$2([printFunctionParams(path, print, options), printReturnType(path, print)])), n.body ? " " : "", path.call(print, "body")); + parts.push(printFunctionTypeParameters(path$$1, options, print), group$1(concat$2([printFunctionParams(path$$1, print, options), printReturnType(path$$1, print)])), n.body ? " " : "", path$$1.call(print, "body")); return concat$2(parts); } -function printObjectMethod(path, options, print) { - var objMethod = path.getValue(); +function printObjectMethod(path$$1, options, print) { + var objMethod = path$$1.getValue(); var parts = []; if (objMethod.async) { @@ -4916,10 +5794,10 @@ function printObjectMethod(path, options, print) { parts.push("*"); } if (objMethod.method || objMethod.kind === "get" || objMethod.kind === "set") { - return printMethod(path, options, print); + return printMethod(path$$1, options, print); } - var key = printPropertyKey(path, options, print); + var key = printPropertyKey(path$$1, options, print); if (objMethod.computed) { parts.push("[", key, "]"); @@ -4927,14 +5805,14 @@ function printObjectMethod(path, options, print) { parts.push(key); } - parts.push(printFunctionTypeParameters(path, options, print), group$1(concat$2([printFunctionParams(path, print, options), printReturnType(path, print)])), " ", path.call(print, "body")); + parts.push(printFunctionTypeParameters(path$$1, options, print), group$1(concat$2([printFunctionParams(path$$1, print, options), printReturnType(path$$1, print)])), " ", path$$1.call(print, "body")); return concat$2(parts); } -function printReturnType(path, print) { - var n = path.getValue(); - var parts = [path.call(print, "returnType")]; +function printReturnType(path$$1, print) { + var n = path$$1.getValue(); + var parts = [path$$1.call(print, "returnType")]; // prepend colon to TypeScript type annotation if (n.returnType && n.returnType.typeAnnotation) { @@ -4944,14 +5822,14 @@ function printReturnType(path, print) { if (n.predicate) { // The return type will already add the colon, but otherwise we // need to do it ourselves - parts.push(n.returnType ? " " : ": ", path.call(print, "predicate")); + parts.push(n.returnType ? " " : ": ", path$$1.call(print, "predicate")); } return concat$2(parts); } -function printExportDeclaration(path, options, print) { - var decl = path.getValue(); +function printExportDeclaration(path$$1, options, print) { + var decl = path$$1.getValue(); var semi = options.semi ? ";" : ""; var parts = ["export "]; @@ -4964,10 +5842,10 @@ function printExportDeclaration(path, options, print) { } } - parts.push(comments$3.printDanglingComments(path, options, /* sameIndent */true)); + parts.push(comments$3.printDanglingComments(path$$1, options, /* sameIndent */true)); if (decl.declaration) { - parts.push(path.call(print, "declaration")); + parts.push(path$$1.call(print, "declaration")); if (decl.type === "ExportDefaultDeclaration" && decl.declaration.type !== "ClassDeclaration" && decl.declaration.type !== "FunctionDeclaration" && decl.declaration.type !== "TSAbstractClassDeclaration") { parts.push(semi); @@ -4981,8 +5859,8 @@ function printExportDeclaration(path, options, print) { var defaultSpecifiers = []; var namespaceSpecifiers = []; - path.map(function (specifierPath) { - var specifierType = path.getValue().type; + path$$1.map(function (specifierPath) { + var specifierType = path$$1.getValue().type; if (specifierType === "ExportSpecifier") { specifiers.push(print(specifierPath)); } else if (specifierType === "ExportDefaultSpecifier") { @@ -5002,7 +5880,7 @@ function printExportDeclaration(path, options, print) { } if (decl.source) { - parts.push(" from ", path.call(print, "source")); + parts.push(" from ", path$$1.call(print, "source")); } parts.push(semi); @@ -5011,8 +5889,8 @@ function printExportDeclaration(path, options, print) { return concat$2(parts); } -function printFlowDeclaration(path, parts) { - var parentExportDecl = util$4.getParentExportDeclaration(path); +function printFlowDeclaration(path$$1, parts) { + var parentExportDecl = util$4.getParentExportDeclaration(path$$1); if (parentExportDecl) { assert$1.strictEqual(parentExportDecl.type, "DeclareExportDeclaration"); @@ -5026,15 +5904,15 @@ function printFlowDeclaration(path, parts) { return concat$2(parts); } -function getFlowVariance(path) { - if (!path.variance) { +function getFlowVariance(path$$1) { + if (!path$$1.variance) { return null; } // Babylon 7.0 currently uses variance node type, and flow should // follow suit soon: // https://github.com/babel/babel/issues/4722 - var variance = path.variance.kind || path.variance; + var variance = path$$1.variance.kind || path$$1.variance; switch (variance) { case "plus": @@ -5048,16 +5926,16 @@ function getFlowVariance(path) { } } -function printTypeScriptModifiers(path, options, print) { - var n = path.getValue(); +function printTypeScriptModifiers(path$$1, options, print) { + var n = path$$1.getValue(); if (!n.modifiers || !n.modifiers.length) { return ""; } - return concat$2([join$2(" ", path.map(print, "modifiers")), " "]); + return concat$2([join$2(" ", path$$1.map(print, "modifiers")), " "]); } -function printTypeParameters(path, options, print, paramsKey) { - var n = path.getValue(); +function printTypeParameters(path$$1, options, print, paramsKey) { + var n = path$$1.getValue(); if (!n[paramsKey]) { return ""; @@ -5065,20 +5943,20 @@ function printTypeParameters(path, options, print, paramsKey) { // for TypeParameterDeclaration typeParameters is a single node if (!Array.isArray(n[paramsKey])) { - return path.call(print, paramsKey); + return path$$1.call(print, paramsKey); } var shouldInline = n[paramsKey].length === 1 && (shouldHugType(n[paramsKey][0]) || n[paramsKey][0].type === "GenericTypeAnnotation" && shouldHugType(n[paramsKey][0].id) || n[paramsKey][0].type === "NullableTypeAnnotation"); if (shouldInline) { - return concat$2(["<", join$2(", ", path.map(print, paramsKey)), ">"]); + return concat$2(["<", join$2(", ", path$$1.map(print, paramsKey)), ">"]); } - return group$1(concat$2(["<", indent$2(concat$2([softline$1, join$2(concat$2([",", line$1]), path.map(print, paramsKey))])), ifBreak$1(options.parser !== "typescript" && shouldPrintComma(options, "all") ? "," : ""), softline$1, ">"])); + return group$1(concat$2(["<", indent$2(concat$2([softline$1, join$2(concat$2([",", line$1]), path$$1.map(print, paramsKey))])), ifBreak$1(options.parser !== "typescript" && shouldPrintComma(options, "all") ? "," : ""), softline$1, ">"])); } -function printClass(path, options, print) { - var n = path.getValue(); +function printClass(path$$1, options, print) { + var n = path$$1.getValue(); var parts = []; if (n.accessibility) { @@ -5091,34 +5969,34 @@ function printClass(path, options, print) { parts.push("class"); if (n.id) { - parts.push(" ", path.call(print, "id")); + parts.push(" ", path$$1.call(print, "id")); } - parts.push(path.call(print, "typeParameters")); + parts.push(path$$1.call(print, "typeParameters")); var partsGroup = []; if (n.superClass) { - parts.push(" extends ", path.call(print, "superClass"), path.call(print, "superTypeParameters")); + parts.push(" extends ", path$$1.call(print, "superClass"), path$$1.call(print, "superTypeParameters")); } else if (n.extends && n.extends.length > 0) { - parts.push(" extends ", join$2(", ", path.map(print, "extends"))); + parts.push(" extends ", join$2(", ", path$$1.map(print, "extends"))); } if (n["implements"] && n["implements"].length > 0) { - partsGroup.push(line$1, "implements ", group$1(indent$2(join$2(concat$2([",", line$1]), path.map(print, "implements"))))); + partsGroup.push(line$1, "implements ", group$1(indent$2(join$2(concat$2([",", line$1]), path$$1.map(print, "implements"))))); } if (partsGroup.length > 0) { parts.push(group$1(indent$2(concat$2(partsGroup)))); } - parts.push(" ", path.call(print, "body")); + parts.push(" ", path$$1.call(print, "body")); return parts; } -function printMemberLookup(path, options, print) { - var property = path.call(print, "property"); - var n = path.getValue(); +function printMemberLookup(path$$1, options, print) { + var property = path$$1.call(print, "property"); + var n = path$$1.getValue(); if (!n.computed) { return concat$2([".", property]); @@ -5142,7 +6020,7 @@ function printMemberLookup(path, options, print) { // The way it is structured in the AST is via a nested sequence of // MemberExpression and CallExpression. We need to traverse the AST // and make groups out of it to print it in the desired way. -function printMemberChain(path, options, print) { +function printMemberChain(path$$1, options, print) { // The first phase is to linearize the AST by traversing it down. // // a().b() @@ -5152,32 +6030,32 @@ function printMemberChain(path, options, print) { // [Identifier, CallExpression, MemberExpression, CallExpression] var printedNodes = []; - function rec(path) { - var node = path.getValue(); + function rec(path$$1) { + var node = path$$1.getValue(); if (node.type === "CallExpression") { printedNodes.unshift({ node: node, - printed: comments$3.printComments(path, function () { - return concat$2([printFunctionTypeParameters(path, options, print), printArgumentsList(path, options, print)]); + printed: comments$3.printComments(path$$1, function () { + return concat$2([printFunctionTypeParameters(path$$1, options, print), printArgumentsList(path$$1, options, print)]); }, options) }); - path.call(function (callee) { + path$$1.call(function (callee) { return rec(callee); }, "callee"); } else if (node.type === "MemberExpression") { printedNodes.unshift({ node: node, - printed: comments$3.printComments(path, function () { - return printMemberLookup(path, options, print); + printed: comments$3.printComments(path$$1, function () { + return printMemberLookup(path$$1, options, print); }, options) }); - path.call(function (object) { + path$$1.call(function (object) { return rec(object); }, "object"); } else { printedNodes.unshift({ node: node, - printed: path.call(print) + printed: path$$1.call(print) }); } } @@ -5185,10 +6063,10 @@ function printMemberChain(path, options, print) { // need to extract this first call without printing them as they would // if handled inside of the recursive call. printedNodes.unshift({ - node: path.getValue(), - printed: concat$2([printFunctionTypeParameters(path, options, print), printArgumentsList(path, options, print)]) + node: path$$1.getValue(), + printed: concat$2([printFunctionTypeParameters(path$$1, options, print), printArgumentsList(path$$1, options, print)]) }); - path.call(function (callee) { + path$$1.call(function (callee) { return rec(callee); }, "callee"); @@ -5243,7 +6121,7 @@ function printMemberChain(path, options, print) { if (hasSeenCallExpression && printedNodes[i].node.type === "MemberExpression") { // [0] should be appended at the end of the group instead of the // beginning of the next one - if (printedNodes[i].node.computed) { + if (printedNodes[i].node.computed && isLiteral(printedNodes[i].node.property)) { currentGroup.push(printedNodes[i]); continue; } @@ -5370,12 +6248,12 @@ function isEmptyJSXElement(node) { // This requires that we give it an array of alternating // content and whitespace elements. // To ensure this we add dummy `""` content elements as needed. -function printJSXChildren(path, options, print, jsxWhitespace) { - var n = path.getValue(); +function printJSXChildren(path$$1, options, print, jsxWhitespace) { + var n = path$$1.getValue(); var children = []; // using `map` instead of `each` because it provides `i` - path.map(function (childPath, i) { + path$$1.map(function (childPath, i) { var child = childPath.getValue(); if (isLiteral(child) && typeof child.value === "string") { var value = child.raw || child.extra.raw; @@ -5490,8 +6368,8 @@ function printJSXChildren(path, options, print, jsxWhitespace) { // // To support that case properly, all leading and trailing spaces // are stripped from the list of children, and replaced with a single hardline. -function printJSXElement(path, options, print) { - var n = path.getValue(); +function printJSXElement(path$$1, options, print) { + var n = path$$1.getValue(); // Turn
into
if (isEmptyJSXElement(n)) { @@ -5499,11 +6377,11 @@ function printJSXElement(path, options, print) { delete n.closingElement; } - var openingLines = path.call(print, "openingElement"); - var closingLines = path.call(print, "closingElement"); + var openingLines = path$$1.call(print, "openingElement"); + var closingLines = path$$1.call(print, "closingElement"); if (n.children.length === 1 && n.children[0].type === "JSXExpressionContainer" && (n.children[0].expression.type === "TemplateLiteral" || n.children[0].expression.type === "TaggedTemplateExpression")) { - return concat$2([openingLines, concat$2(path.map(print, "children")), closingLines]); + return concat$2([openingLines, concat$2(path$$1.map(print, "children")), closingLines]); } // If no children, just print the opening element @@ -5517,7 +6395,7 @@ function printJSXElement(path, options, print) { var rawJsxWhitespace = options.singleQuote ? "{' '}" : '{" "}'; var jsxWhitespace = ifBreak$1(concat$2([rawJsxWhitespace, softline$1]), " "); - var children = printJSXChildren(path, options, print, jsxWhitespace); + var children = printJSXChildren(path$$1, options, print, jsxWhitespace); // Remove multiple filler empty strings // These can occur when a text element is followed by a newline. @@ -5590,8 +6468,8 @@ function printJSXElement(path, options, print) { return conditionalGroup$1([group$1(concat$2([openingLines, fill$1(children), closingLines])), multiLineElem]); } -function maybeWrapJSXElementInParens(path, elem) { - var parent = path.getParentNode(); +function maybeWrapJSXElementInParens(path$$1, elem) { + var parent = path$$1.getParentNode(); if (!parent) { return elem; } @@ -5641,9 +6519,9 @@ function shouldInlineLogicalExpression(node) { // precedence level and the AST is structured based on precedence // level, things are naturally broken up correctly, i.e. `&&` is // broken before `+`. -function printBinaryishExpressions(path, print, options, isNested, isInsideParenthesis) { +function printBinaryishExpressions(path$$1, print, options, isNested, isInsideParenthesis) { var parts = []; - var node = path.getValue(); + var node = path$$1.getValue(); // We treat BinaryExpression and LogicalExpression nodes the same. if (isBinaryish(node)) { @@ -5658,19 +6536,19 @@ function printBinaryishExpressions(path, print, options, isNested, isInsideParen // which is unique in that it is right-associative.) if (util$4.getPrecedence(node.left.operator) === util$4.getPrecedence(node.operator) && node.operator !== "**") { // Flatten them out by recursively calling this function. - parts = parts.concat(path.call(function (left) { + parts = parts.concat(path$$1.call(function (left) { return printBinaryishExpressions(left, print, options, /* isNested */true, isInsideParenthesis); }, "left")); } else { - parts.push(path.call(print, "left")); + parts.push(path$$1.call(print, "left")); } - var right = concat$2([node.operator, shouldInlineLogicalExpression(node) ? " " : line$1, path.call(print, "right")]); + var right = concat$2([node.operator, shouldInlineLogicalExpression(node) ? " " : line$1, path$$1.call(print, "right")]); // If there's only a single binary expression, we want to create a group // in order to avoid having a small right part like -1 be on its own line. - var parent = path.getParentNode(); + var parent = path$$1.getParentNode(); var shouldGroup = !(isInsideParenthesis && node.type === "LogicalExpression") && parent.type !== node.type && node.left.type !== node.type && node.right.type !== node.type; parts.push(" ", shouldGroup ? group$1(right) : right); @@ -5679,13 +6557,13 @@ function printBinaryishExpressions(path, print, options, isNested, isInsideParen // the other ones since we don't call the normal print on BinaryExpression, // only for the left and right parts if (isNested && node.comments) { - parts = comments$3.printComments(path, function () { + parts = comments$3.printComments(path$$1, function () { return concat$2(parts); }, options); } } else { // Our stopping case. Simply print the node normally. - parts.push(path.call(print)); + parts.push(path$$1.call(print)); } return parts; @@ -5727,7 +6605,7 @@ function adjustClause(node, clause, forceSpace) { return indent$2(concat$2([line$1, clause])); } -function nodeStr(node, options, isFlowDirectiveLiteral) { +function nodeStr(node, options, isFlowOrTypeScriptDirectiveLiteral) { var raw = node.extra ? node.extra.raw : node.raw; // `rawContent` is the string exactly like it appeared in the input source // code, with its enclosing quote. @@ -5740,7 +6618,8 @@ function nodeStr(node, options, isFlowDirectiveLiteral) { var alternate = preferred === single ? double : single; var shouldUseAlternateQuote = false; - var isDirectiveLiteral = isFlowDirectiveLiteral || node.type === "DirectiveLiteral"; + var isDirectiveLiteral = isFlowOrTypeScriptDirectiveLiteral || node.type === "DirectiveLiteral"; + var canChangeDirectiveQuotes = false; // If `rawContent` contains at least one of the quote preferred for enclosing @@ -5832,12 +6711,12 @@ function printNumber(rawNumber) { .replace(/\.(?=e|$)/, ""); } -function isLastStatement(path) { - var parent = path.getParentNode(); +function isLastStatement(path$$1) { + var parent = path$$1.getParentNode(); if (!parent) { return true; } - var node = path.getValue(); + var node = path$$1.getValue(); var body = (parent.body || parent.consequent).filter(function (stmt) { return stmt.type !== "EmptyStatement"; }); @@ -5894,11 +6773,11 @@ function exprNeedsASIProtection(node) { return exprNeedsASIProtection(getLeftSide(node)); } -function stmtNeedsASIProtection(path) { - if (!path) { +function stmtNeedsASIProtection(path$$1) { + if (!path$$1) { return false; } - var node = path.getNode(); + var node = path$$1.getNode(); if (node.type !== "ExpressionStatement") { return false; @@ -5907,8 +6786,8 @@ function stmtNeedsASIProtection(path) { return exprNeedsASIProtection(node.expression); } -function classPropMayCauseASIProblems(path) { - var node = path.getNode(); +function classPropMayCauseASIProblems(path$$1) { + var node = path$$1.getNode(); if (node.type !== "ClassProperty") { return false; @@ -6067,11 +6946,11 @@ function isTemplateOnItsOwnLine(n, text) { return (n.type === "TemplateLiteral" && templateLiteralHasNewLines(n) || n.type === "TaggedTemplateExpression" && templateLiteralHasNewLines(n.quasi)) && !util$4.hasNewline(text, util$4.locStart(n), { backwards: true }); } -function printArrayItems(path, options, printPath, print) { +function printArrayItems(path$$1, options, printPath, print) { var printedElements = []; var separatorParts = []; - path.each(function (childPath) { + path$$1.each(function (childPath) { printedElements.push(concat$2(separatorParts)); printedElements.push(group$1(print(childPath))); @@ -6120,16 +6999,16 @@ function isObjectType(n) { function printAstToDoc$1(ast, options, addAlignmentSize) { addAlignmentSize = addAlignmentSize || 0; - function printGenerically(path, args) { - var node = path.getValue(); - var parent = path.getParentNode(0); + function printGenerically(path$$1, args) { + var node = path$$1.getValue(); + var parent = path$$1.getParentNode(0); // We let JSXElement print its comments itself because it adds () around // UnionTypeAnnotation has to align the child without the comments if (node && node.type === "JSXElement" || parent && (parent.type === "UnionTypeAnnotation" || parent.type === "TSUnionType")) { - return genericPrint(path, options, printGenerically, args); + return genericPrint(path$$1, options, printGenerically, args); } - return comments$3.printComments(path, function (p) { + return comments$3.printComments(path$$1, function (p) { return genericPrint(p, options, printGenerically, args); }, options, args && args.needsSemi); } @@ -6146,10 +7025,10 @@ function printAstToDoc$1(ast, options, addAlignmentSize) { var printer = { printAstToDoc: printAstToDoc$1 }; -var docBuilders$6 = docBuilders$1; -var concat$5 = docBuilders$6.concat; -var fill$2 = docBuilders$6.fill; -var cursor$2 = docBuilders$6.cursor; +var docBuilders$8 = docBuilders$1; +var concat$7 = docBuilders$8.concat; +var fill$2 = docBuilders$8.fill; +var cursor$2 = docBuilders$8.cursor; var MODE_BREAK = 1; var MODE_FLAT = 2; @@ -6443,7 +7322,7 @@ function printDocToString$1(doc, options) { var remainingCmd = [ind, mode, fill$2(remaining)]; var secondContent = parts[2]; - var firstAndSecondContentFlatCmd = [ind, MODE_FLAT, concat$5([content, whitespace, secondContent])]; + var firstAndSecondContentFlatCmd = [ind, MODE_FLAT, concat$7([content, whitespace, secondContent])]; var firstAndSecondContentFits = fits(firstAndSecondContentFlatCmd, [], _rem, true); if (firstAndSecondContentFits) { @@ -6556,266 +7435,7 @@ function printDocToString$1(doc, options) { var docPrinter = { printDocToString: printDocToString$1 }; -var matchOperatorsRe = /[|\\{}()[\]^$+*?.]/g; - -var index$6 = function index$6(str) { - if (typeof str !== 'string') { - throw new TypeError('Expected a string'); - } - - return str.replace(matchOperatorsRe, '\\$&'); -}; - -var index$8 = createCommonjsModule(function (module) { - 'use strict'; - - function assembleStyles() { - var styles = { - modifiers: { - reset: [0, 0], - bold: [1, 22], // 21 isn't widely supported and 22 does the same thing - dim: [2, 22], - italic: [3, 23], - underline: [4, 24], - inverse: [7, 27], - hidden: [8, 28], - strikethrough: [9, 29] - }, - colors: { - black: [30, 39], - red: [31, 39], - green: [32, 39], - yellow: [33, 39], - blue: [34, 39], - magenta: [35, 39], - cyan: [36, 39], - white: [37, 39], - gray: [90, 39] - }, - bgColors: { - bgBlack: [40, 49], - bgRed: [41, 49], - bgGreen: [42, 49], - bgYellow: [43, 49], - bgBlue: [44, 49], - bgMagenta: [45, 49], - bgCyan: [46, 49], - bgWhite: [47, 49] - } - }; - - // fix humans - styles.colors.grey = styles.colors.gray; - - Object.keys(styles).forEach(function (groupName) { - var group = styles[groupName]; - - Object.keys(group).forEach(function (styleName) { - var style = group[styleName]; - - styles[styleName] = group[styleName] = { - open: '\x1B[' + style[0] + 'm', - close: '\x1B[' + style[1] + 'm' - }; - }); - - Object.defineProperty(styles, groupName, { - value: group, - enumerable: false - }); - }); - - return styles; - } - - Object.defineProperty(module, 'exports', { - enumerable: true, - get: assembleStyles - }); -}); - -var index$12 = function index$12() { - return (/[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-PRZcf-nqry=><]/g - ); -}; - -var ansiRegex = index$12(); - -var index$10 = function index$10(str) { - return typeof str === 'string' ? str.replace(ansiRegex, '') : str; -}; - -var ansiRegex$1 = index$12; -var re = new RegExp(ansiRegex$1().source); // remove the `g` flag -var index$14 = re.test.bind(re); - -var argv = process.argv; - -var terminator = argv.indexOf('--'); -var hasFlag = function hasFlag(flag) { - flag = '--' + flag; - var pos = argv.indexOf(flag); - return pos !== -1 && (terminator !== -1 ? pos < terminator : true); -}; - -var index$16 = function () { - if ('FORCE_COLOR' in process.env) { - return true; - } - - if (hasFlag('no-color') || hasFlag('no-colors') || hasFlag('color=false')) { - return false; - } - - if (hasFlag('color') || hasFlag('colors') || hasFlag('color=true') || hasFlag('color=always')) { - return true; - } - - if (process.stdout && !process.stdout.isTTY) { - return false; - } - - if (process.platform === 'win32') { - return true; - } - - if ('COLORTERM' in process.env) { - return true; - } - - if (process.env.TERM === 'dumb') { - return false; - } - - if (/^screen|^xterm|^vt100|color|ansi|cygwin|linux/i.test(process.env.TERM)) { - return true; - } - - return false; -}(); - -var escapeStringRegexp = index$6; -var ansiStyles = index$8; -var stripAnsi = index$10; -var hasAnsi = index$14; -var supportsColor = index$16; -var defineProps = Object.defineProperties; -var isSimpleWindowsTerm = process.platform === 'win32' && !/^xterm/i.test(process.env.TERM); - -function Chalk(options) { - // detect mode if not set manually - this.enabled = !options || options.enabled === undefined ? supportsColor : options.enabled; -} - -// use bright blue on Windows as the normal blue color is illegible -if (isSimpleWindowsTerm) { - ansiStyles.blue.open = '\x1B[94m'; -} - -var styles = function () { - var ret = {}; - - Object.keys(ansiStyles).forEach(function (key) { - ansiStyles[key].closeRe = new RegExp(escapeStringRegexp(ansiStyles[key].close), 'g'); - - ret[key] = { - get: function get() { - return build.call(this, this._styles.concat(key)); - } - }; - }); - - return ret; -}(); - -var proto = defineProps(function chalk() {}, styles); - -function build(_styles) { - var builder = function builder() { - return applyStyle.apply(builder, arguments); - }; - - builder._styles = _styles; - builder.enabled = this.enabled; - // __proto__ is used because we must return a function, but there is - // no way to create a function with a different prototype. - /* eslint-disable no-proto */ - builder.__proto__ = proto; - - return builder; -} - -function applyStyle() { - // support varags, but simply cast to string in case there's only one arg - var args = arguments; - var argsLen = args.length; - var str = argsLen !== 0 && String(arguments[0]); - - if (argsLen > 1) { - // don't slice `arguments`, it prevents v8 optimizations - for (var a = 1; a < argsLen; a++) { - str += ' ' + args[a]; - } - } - - if (!this.enabled || !str) { - return str; - } - - var nestedStyles = this._styles; - var i = nestedStyles.length; - - // Turns out that on Windows dimmed gray text becomes invisible in cmd.exe, - // see https://github.com/chalk/chalk/issues/58 - // If we're on Windows and we're dealing with a gray color, temporarily make 'dim' a noop. - var originalDim = ansiStyles.dim.open; - if (isSimpleWindowsTerm && (nestedStyles.indexOf('gray') !== -1 || nestedStyles.indexOf('grey') !== -1)) { - ansiStyles.dim.open = ''; - } - - while (i--) { - var code = ansiStyles[nestedStyles[i]]; - - // Replace any instances already present with a re-opening code - // otherwise only the part of the string until said closing code - // will be colored, and the rest will simply be 'plain'. - str = code.open + str.replace(code.closeRe, code.open) + code.close; - } - - // Reset the original 'dim' if we changed it to work around the Windows dimmed gray issue. - ansiStyles.dim.open = originalDim; - - return str; -} - -function init() { - var ret = {}; - - Object.keys(styles).forEach(function (name) { - ret[name] = { - get: function get() { - return build.call(this, [name]); - } - }; - }); - - return ret; -} - -defineProps(Chalk.prototype, init()); - -var index$4 = new Chalk(); -var styles_1 = ansiStyles; -var hasColor = hasAnsi; -var stripColor = stripAnsi; -var supportsColor_1 = supportsColor; - -index$4.styles = styles_1; -index$4.hasColor = hasColor; -index$4.stripColor = stripColor; -index$4.supportsColor = supportsColor_1; - -var index$26 = { +var index$30 = { "aliceblue": [240, 248, 255], "antiquewhite": [250, 235, 215], "aqua": [0, 255, 255], @@ -6968,7 +7588,7 @@ var index$26 = { var conversions$1 = createCommonjsModule(function (module) { /* MIT license */ - var cssKeywords = index$26; + var cssKeywords = index$30; // NOTE: conversions should only return primitive values (i.e. arrays, or // values that give correct `typeof` results). @@ -7875,17 +8495,17 @@ function link(from, to) { } function wrapConversion(toModel, graph) { - var path = [graph[toModel].parent, toModel]; + var path$$1 = [graph[toModel].parent, toModel]; var fn = conversions$3[graph[toModel].parent][toModel]; var cur = graph[toModel].parent; while (graph[cur].parent) { - path.unshift(graph[cur].parent); + path$$1.unshift(graph[cur].parent); fn = link(conversions$3[graph[cur].parent][cur], fn); cur = graph[cur].parent; } - fn.conversion = path; + fn.conversion = path$$1; return fn; } @@ -7986,12 +8606,12 @@ models.forEach(function (fromModel) { }); }); -var index$24 = convert; +var index$28 = convert; -var index$22 = createCommonjsModule(function (module) { +var index$26 = createCommonjsModule(function (module) { 'use strict'; - var colorConvert = index$24; + var colorConvert = index$28; var wrapAnsi16 = function wrapAnsi16(fn, offset) { return function () { @@ -8206,7 +8826,7 @@ var test = function test(object) { var AsymmetricMatcher$1 = { print: print$1, test: test }; -var ansiRegex$2 = index$12; /** +var ansiRegex$2 = index$14; /** * Copyright (c) 2014-present, Facebook, Inc. All rights reserved. * * This source code is licensed under the BSD-style license found in the @@ -8215,7 +8835,7 @@ var ansiRegex$2 = index$12; /** * * */var toHumanReadableAnsi = function toHumanReadableAnsi(text) { - var style = index$22;return text.replace(ansiRegex$2(), function (match, offset, string) { + var style = index$26;return text.replace(ansiRegex$2(), function (match, offset, string) { switch (match) {case style.red.close:case style.green.close:case style.reset.open: case style.reset.close: return ''; @@ -8279,7 +8899,7 @@ function printChildren(flatChildren, print, indent, colors, opts) { }).join(opts.edgeSpacing); } -function printAttributes(attributes, indent, colors, opts) { +function printAttributes$1(attributes, indent, colors, opts) { return attributes.sort().map(function (attribute) { return opts.spacing + indent(colors.prop.open + attribute.name + colors.prop.close + '=') + colors.value.open + ('"' + attribute.value + '"') + colors.value.close; }).join(''); @@ -8303,7 +8923,7 @@ var print$3 = function print$3(element, print, indent, opts, colors) { var hasAttributes = element.attributes && element.attributes.length; if (hasAttributes) { var attributes = Array.prototype.slice.call(element.attributes); - result += printAttributes(attributes, indent, colors, opts); + result += printAttributes$1(attributes, indent, colors, opts); } var flatChildren = Array.prototype.slice.call(element.childNodes); @@ -8638,7 +9258,7 @@ var test$10 = function test$10(object) { var ReactTestComponent = { print: print$11, test: test$10 }; -var style = index$22; /** +var style = index$26; /** * Copyright (c) 2014-present, Facebook, Inc. All rights reserved. * * This source code is licensed under the BSD-style license found in the @@ -9091,10 +9711,10 @@ prettyFormat$1.plugins = { ReactElement: ReactElement$1, ReactTestComponent: ReactTestComponent }; -var index$20 = prettyFormat$1; +var index$24 = prettyFormat$1; -var chalk$1 = index$4; -var prettyFormat = index$20;var _require$plugins = index$20.plugins;var AsymmetricMatcher = _require$plugins.AsymmetricMatcher;var ReactElement = _require$plugins.ReactElement;var HTMLElement = _require$plugins.HTMLElement;var Immutable = _require$plugins.Immutable; +var chalk$1 = index$6; +var prettyFormat = index$24;var _require$plugins = index$24.plugins;var AsymmetricMatcher = _require$plugins.AsymmetricMatcher;var ReactElement = _require$plugins.ReactElement;var HTMLElement = _require$plugins.HTMLElement;var Immutable = _require$plugins.Immutable; var PLUGINS = [AsymmetricMatcher, ReactElement, HTMLElement].concat(Immutable); @@ -9213,7 +9833,7 @@ var matcherHint = function matcherHint(matcherName) { return chalk$1.dim('expect' + (isDirectExpectCall ? '' : '(')) + RECEIVED_COLOR(received) + chalk$1.dim((isDirectExpectCall ? '' : ')') + matcherName + '(') + EXPECTED_COLOR(expected) + (secondArgument ? ', ' + EXPECTED_COLOR(secondArgument) : '') + chalk$1.dim(')'); }; -var index$18 = { +var index$22 = { EXPECTED_BG: EXPECTED_BG, EXPECTED_COLOR: EXPECTED_COLOR, RECEIVED_BG: RECEIVED_BG, @@ -9235,7 +9855,7 @@ var index$18 = { var arr = []; var charCodeCache = []; -var index$28 = function index$28(a, b) { +var index$32 = function index$32(a, b) { if (a === b) { return 0; } @@ -9316,14 +9936,14 @@ var index$28 = function index$28(a, b) { return ret; }; -var chalk$2 = index$4; +var chalk$2 = index$6; var BULLET = chalk$2.bold('\u25CF'); var DEPRECATION = BULLET + ' Deprecation Warning'; var ERROR$1 = BULLET + ' Validation Error'; var WARNING = BULLET + ' Validation Warning'; var format$2 = function format$2(value) { - return typeof value === 'function' ? value.toString() : index$20(value, { min: true }); + return typeof value === 'function' ? value.toString() : index$24(value, { min: true }); }; var ValidationError$1 = function (_Error) { @@ -9351,7 +9971,7 @@ var logValidationWarning = function logValidationWarning(name, message, comment) }; var createDidYouMeanMessage = function createDidYouMeanMessage(unrecognized, allowedOptions) { - var leven = index$28; + var leven = index$32; var suggestion = allowedOptions.find(function (option) { var steps = leven(option, unrecognized); return steps < 3; @@ -9369,7 +9989,7 @@ var utils$2 = { format: format$2, logValidationWarning: logValidationWarning }; -var chalk = index$4; /** +var chalk = index$6; /** * Copyright (c) 2014-present, Facebook, Inc. All rights reserved. * * This source code is licensed under the BSD-style license found in the @@ -9377,7 +9997,7 @@ var chalk = index$4; /** * of patent rights can be found in the PATENTS file in the same directory. * * - */var _require = index$18;var getType = _require.getType;var _require2 = utils$2;var format$1 = _require2.format;var ValidationError = _require2.ValidationError;var ERROR = _require2.ERROR;var errorMessage = function errorMessage(option, received, defaultValue, options) { + */var _require = index$22;var getType = _require.getType;var _require2 = utils$2;var format$1 = _require2.format;var ValidationError = _require2.ValidationError;var ERROR = _require2.ERROR;var errorMessage = function errorMessage(option, received, defaultValue, options) { var message = ' Option ' + chalk.bold('"' + option + '"') + ' must be of type:\n ' + chalk.bold.green(getType(defaultValue)) + '\n but instead received:\n ' + chalk.bold.red(getType(received)) + '\n\n Example:\n {\n ' + chalk.bold('"' + option + '"') + ': ' + chalk.bold(format$1(defaultValue)) + '\n }'; var comment = options.comment; @@ -9414,7 +10034,7 @@ var deprecationWarning$1 = function deprecationWarning$1(config, option, depreca var deprecated = { deprecationWarning: deprecationWarning$1 }; -var chalk$3 = index$4; /** +var chalk$3 = index$6; /** * Copyright (c) 2014-present, Facebook, Inc. All rights reserved. * * This source code is licensed under the BSD-style license found in the @@ -9531,7 +10151,7 @@ var validate$1 = function validate$1(config, options) { var validate_1 = validate$1; -var index$2 = { +var index$20 = { ValidationError: errors.ValidationError, createDidYouMeanMessage: utils$2.createDidYouMeanMessage, format: utils$2.format, @@ -9546,7 +10166,7 @@ var deprecated$2 = { var deprecated_1 = deprecated$2; -var validate = index$2.validate; +var validate = index$20.validate; var deprecatedConfig = deprecated_1; var defaults = { @@ -9577,6 +10197,8 @@ function normalize(options) { if (/\.(css|less|scss)$/.test(filepath)) { normalized.parser = "postcss"; + } else if (/\.html$/.test(filepath)) { + normalized.parser = "parse5"; } else if (/\.(ts|tsx)$/.test(filepath)) { normalized.parser = "typescript"; } @@ -9589,8 +10211,17 @@ function normalize(options) { console.warn("Warning: `trailingComma` without any argument is deprecated. " + 'Specify "none", "es5", or "all".'); } + var parserBackup = normalized.parser; + if (typeof normalized.parser === "function") { + // Delete the function from the object to pass validation. + delete normalized.parser; + } + validate(normalized, { exampleConfig: exampleConfig, deprecatedConfig: deprecatedConfig }); + // Restore the option back to a function; + normalized.parser = parserBackup; + // For backward compatibility. Deprecated in 0.0.10 if ("useFlowParser" in normalized) { normalized.parser = normalized.useFlowParser ? "flow" : "babylon"; @@ -9608,284 +10239,6 @@ function normalize(options) { var options = { normalize: normalize }; -var index$32 = createCommonjsModule(function (module, exports) { - // Copyright 2014, 2015, 2016, 2017 Simon Lydell - // License: MIT. (See LICENSE.) - - Object.defineProperty(exports, "__esModule", { - value: true - }); - - // This regex comes from regex.coffee, and is inserted here by generate-index.js - // (run `npm run build`). - exports.default = /((['"])(?:(?!\2|\\).|\\(?:\r\n|[\s\S]))*(\2)?|`(?:[^`\\$]|\\[\s\S]|\$(?!\{)|\$\{(?:[^{}]|\{[^}]*\}?)*\}?)*(`)?)|(\/\/.*)|(\/\*(?:[^*]|\*(?!\/))*(\*\/)?)|(\/(?!\*)(?:\[(?:(?![\]\\]).|\\.)*\]|(?![\/\]\\]).|\\.)+\/(?:(?!\s*(?:\b|[\u0080-\uFFFF$\\'"~({]|[+\-!](?!=)|\.?\d))|[gmiyu]{1,5}\b(?![\u0080-\uFFFF$\\]|\s*(?:[+\-*%&|^<>!=?({]|\/(?![\/*])))))|(0[xX][\da-fA-F]+|0[oO][0-7]+|0[bB][01]+|(?:\d*\.\d+|\d+\.?)(?:[eE][+-]?\d+)?)|((?!\d)(?:(?!\s)[$\w\u0080-\uFFFF]|\\u[\da-fA-F]{4}|\\u\{[\da-fA-F]+\})+)|(--|\+\+|&&|\|\||=>|\.{3}|(?:[+\-\/%&|^]|\*{1,2}|<{1,2}|>{1,3}|!=?|={1,2})=?|[?~.,:;[\](){}])|(\s+)|(^$|[\s\S])/g; - - exports.matchToToken = function (match) { - var token = { type: "invalid", value: match[0] }; - if (match[1]) token.type = "string", token.closed = !!(match[3] || match[4]);else if (match[5]) token.type = "comment";else if (match[6]) token.type = "comment", token.closed = !!match[7];else if (match[8]) token.type = "regex";else if (match[9]) token.type = "number";else if (match[10]) token.type = "name";else if (match[11]) token.type = "punctuator";else if (match[12]) token.type = "whitespace"; - return token; - }; -}); - -var index$30 = createCommonjsModule(function (module, exports) { - "use strict"; - - exports.__esModule = true; - exports.codeFrameColumns = codeFrameColumns; - - exports.default = function (rawLines, lineNumber, colNumber) { - var opts = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {}; - - if (!deprecationWarningShown) { - deprecationWarningShown = true; - - var deprecationError = new Error("Passing lineNumber and colNumber is deprecated to babel-code-frame. Please use `codeFrameColumns`."); - deprecationError.name = "DeprecationWarning"; - - if (process.emitWarning) { - process.emitWarning(deprecationError); - } else { - console.warn(deprecationError); - } - } - - colNumber = Math.max(colNumber, 0); - - var location = { start: { column: colNumber, line: lineNumber } }; - - return codeFrameColumns(rawLines, location, opts); - }; - - var _jsTokens = index$32; - - var _jsTokens2 = _interopRequireDefault(_jsTokens); - - var _esutils = utils; - - var _esutils2 = _interopRequireDefault(_esutils); - - var _chalk = index$4; - - var _chalk2 = _interopRequireDefault(_chalk); - - function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : { default: obj }; - } - - var deprecationWarningShown = false; - - function getDefs(chalk) { - return { - keyword: chalk.cyan, - capitalized: chalk.yellow, - jsx_tag: chalk.yellow, - punctuator: chalk.yellow, - - number: chalk.magenta, - string: chalk.green, - regex: chalk.magenta, - comment: chalk.grey, - invalid: chalk.white.bgRed.bold, - gutter: chalk.grey, - marker: chalk.red.bold - }; - } - - var NEWLINE = /\r\n|[\n\r\u2028\u2029]/; - - var JSX_TAG = /^[a-z][\w-]*$/i; - - var BRACKET = /^[()\[\]{}]$/; - - function getTokenType(match) { - var _match$slice = match.slice(-2), - offset = _match$slice[0], - text = _match$slice[1]; - - var token = (0, _jsTokens.matchToToken)(match); - - if (token.type === "name") { - if (_esutils2.default.keyword.isReservedWordES6(token.value)) { - return "keyword"; - } - - if (JSX_TAG.test(token.value) && (text[offset - 1] === "<" || text.substr(offset - 2, 2) == " 2 && arguments[2] !== undefined ? arguments[2] : {}; - - var highlighted = opts.highlightCode && _chalk2.default.supportsColor || opts.forceColor; - var chalk = _chalk2.default; - if (opts.forceColor) { - chalk = new _chalk2.default.constructor({ enabled: true }); - } - var maybeHighlight = function maybeHighlight(chalkFn, string) { - return highlighted ? chalkFn(string) : string; - }; - var defs = getDefs(chalk); - if (highlighted) rawLines = highlight(defs, rawLines); - - var lines = rawLines.split(NEWLINE); - - var _getMarkerLines = getMarkerLines(loc, lines, opts), - start = _getMarkerLines.start, - end = _getMarkerLines.end, - markerLines = _getMarkerLines.markerLines; - - var numberMaxWidth = String(end).length; - - var frame = lines.slice(start, end).map(function (line, index) { - var number = start + 1 + index; - var paddedNumber = (" " + number).slice(-numberMaxWidth); - var gutter = " " + paddedNumber + " | "; - var hasMarker = markerLines[number]; - if (hasMarker) { - var markerLine = ""; - if (Array.isArray(hasMarker)) { - var markerSpacing = line.slice(0, Math.max(hasMarker[0] - 1, 0)).replace(/[^\t]/g, " "); - var numberOfMarkers = hasMarker[1] || 1; - - markerLine = ["\n ", maybeHighlight(defs.gutter, gutter.replace(/\d/g, " ")), markerSpacing, maybeHighlight(defs.marker, "^").repeat(numberOfMarkers)].join(""); - } - return [maybeHighlight(defs.marker, ">"), maybeHighlight(defs.gutter, gutter), line, markerLine].join(""); - } else { - return " " + maybeHighlight(defs.gutter, gutter) + line; - } - }).join("\n"); - - if (highlighted) { - return chalk.reset(frame); - } else { - return frame; - } - } -}); - -function parse(text, opts) { - var parseFunction = void 0; - - if (opts.parser === "flow") { - parseFunction = eval("require")("./parser-flow"); - } else if (opts.parser === "graphql") { - parseFunction = eval("require")("./parser-graphql"); - } else if (opts.parser === "typescript") { - parseFunction = eval("require")("./parser-typescript"); - } else if (opts.parser === "postcss") { - parseFunction = eval("require")("./parser-postcss"); - } else { - parseFunction = eval("require")("./parser-babylon"); - } - - try { - return parseFunction(text); - } catch (error) { - var loc = error.loc; - - if (loc) { - var codeFrame = index$30; - error.codeFrame = codeFrame.codeFrameColumns(text, loc, { - highlightCode: true - }); - error.message += "\n" + error.codeFrame; - throw error; - } - - throw error.stack; - } -} - -var parser$1 = { parse: parse }; - function flattenDoc(doc) { if (doc.type === "concat") { var res = []; @@ -9986,10 +10339,10 @@ var docDebug = { } }; -var require$$1$12 = _package$1 && _package$1['default'] || _package$1; +var require$$1$13 = _package$1 && _package$1['default'] || _package$1; var comments = comments$1; -var version = require$$1$12.version; +var version = require$$1$13.version; var printAstToDoc = printer.printAstToDoc; var util = util$2; var _printDocToString = docPrinter.printDocToString; diff --git a/docs/parser-babylon.js b/docs/lib/parser-babylon.js similarity index 99% rename from docs/parser-babylon.js rename to docs/lib/parser-babylon.js index 9c78af036..1036a2414 100644 --- a/docs/parser-babylon.js +++ b/docs/lib/parser-babylon.js @@ -21,11 +21,11 @@ var babylon = function () { var e = index, s = { sourceType: "module", allowImportExportEverywhere: !1, allowReturnOutsideFunction: !0, plugins: ["jsx", "flow", "doExpressions", "objectRestSpread", "decorators", "classProperties", "exportExtensions", "asyncGenerators", "functionBind", "functionSent", "dynamicImport"] };var i = void 0;try { i = e.parse(t, s); - } catch (i) { + } catch (r) { try { - return e.parse(t, Object.assign({}, s, { strictMode: !1 })); + i = e.parse(t, Object.assign({}, s, { strictMode: !1 })); } catch (t) { - throw createError(i.message.replace(/ \(.*\)/, ""), { start: { line: i.loc.line, column: i.loc.column + 1 } }); + throw createError(r.message.replace(/ \(.*\)/, ""), { start: { line: r.loc.line, column: r.loc.column + 1 } }); } }return delete i.tokens, i; }var parserCreateError = createError$1, diff --git a/docs/parser-flow.js b/docs/lib/parser-flow.js similarity index 100% rename from docs/parser-flow.js rename to docs/lib/parser-flow.js diff --git a/docs/parser-graphql.js b/docs/lib/parser-graphql.js similarity index 100% rename from docs/parser-graphql.js rename to docs/lib/parser-graphql.js diff --git a/docs/lib/parser-parse5.js b/docs/lib/parser-parse5.js new file mode 100644 index 000000000..b59c78d3b --- /dev/null +++ b/docs/lib/parser-parse5.js @@ -0,0 +1,9 @@ +var parse5 = (function (stream,util) { +stream = 'default' in stream ? stream['default'] : stream; +util = 'default' in util ? util['default'] : util; + +function _interopDefault$1(e){return e&&"object"==typeof e&&"default"in e?e.default:e}function createCommonjsModule(e,t){return t={exports:{}},e(t,t.exports),t.exports}function enquoteDoctypeId(e){var t=-1!==e.indexOf('"')?"'":'"';return t+e+t}function hasPrefix(e,t){for(var n=0;n=55296&&e<=56319&&t>=56320&&t<=57343}function n(e,t){return 1024*(e-55296)+9216+t}var r=unicode.CODE_POINTS,i=e.exports=function(){this.html=null,this.pos=-1,this.lastGapPos=-1,this.lastCharPos=-1,this.droppedBufferSize=0,this.gapStack=[],this.skipNextNewLine=!1,this.lastChunkWritten=!1,this.endOfChunkHit=!1,this.bufferWaterline=65536;};Object.defineProperty(i.prototype,"sourcePos",{get:function(){return this.droppedBufferSize+this.pos}}),i.prototype.dropParsedChunk=function(){this.pos>this.bufferWaterline&&(this.lastCharPos-=this.pos,this.droppedBufferSize+=this.pos,this.html=this.html.substring(this.pos),this.pos=0,this.lastGapPos=-1,this.gapStack=[]);},i.prototype._addGap=function(){this.gapStack.push(this.lastGapPos),this.lastGapPos=this.pos;},i.prototype._processHighRangeCodePoint=function(e){if(this.pos!==this.lastCharPos){var i=this.html.charCodeAt(this.pos+1);t(e,i)&&(this.pos++,e=n(e,i),this._addGap());}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,r.EOF;return e},i.prototype.write=function(e,t){this.html?this.html+=e:this.html=e,this.lastCharPos=this.html.length-1,this.endOfChunkHit=!1,this.lastChunkWritten=t;},i.prototype.insertHtmlAtCurrentPos=function(e){this.html=this.html.substring(0,this.pos+1)+e+this.html.substring(this.pos+1,this.html.length),this.lastCharPos=this.html.length-1,this.endOfChunkHit=!1;},i.prototype.advance=function(){if(++this.pos>this.lastCharPos)return this.lastChunkWritten||(this.endOfChunkHit=!0),r.EOF;var e=this.html.charCodeAt(this.pos);return this.skipNextNewLine&&e===r.LINE_FEED?(this.skipNextNewLine=!1,this._addGap(),this.advance()):e===r.CARRIAGE_RETURN?(this.skipNextNewLine=!0,r.LINE_FEED):(this.skipNextNewLine=!1,e>=55296?this._processHighRangeCodePoint(e):e)},i.prototype.retreat=function(){this.pos===this.lastGapPos&&(this.lastGapPos=this.gapStack.pop(),this.pos--),this.pos--;};}); var UNICODE=unicode; var $=UNICODE.CODE_POINTS; var assign=function(e){function t(e){e.location={line:s,col:i,startOffset:r,endOffset:-1};}var n=Object.getPrototypeOf(e),r=-1,i=-1,s=1,o=!1,T=0,a=-1,E=1;e._consume=function(){var e=n._consume.call(this);return o&&(o=!1,E++,T=this.preprocessor.sourcePos),e===$.LINE_FEED&&(o=!0),a=this.preprocessor.sourcePos-T+1,e},e._unconsume=function(){n._unconsume.call(this),o=!1,a=this.preprocessor.sourcePos-T+1;},e._createStartTagToken=function(){n._createStartTagToken.call(this),t(this.currentToken);},e._createEndTagToken=function(){n._createEndTagToken.call(this),t(this.currentToken);},e._createCommentToken=function(){n._createCommentToken.call(this),t(this.currentToken);},e._createDoctypeToken=function(e){n._createDoctypeToken.call(this,e),t(this.currentToken);},e._createCharacterToken=function(e,r){n._createCharacterToken.call(this,e,r),t(this.currentCharacterToken);},e._createAttr=function(e){n._createAttr.call(this,e),this.currentAttrLocation={line:E,col:a,startOffset:this.preprocessor.sourcePos,endOffset:-1};},e._leaveAttrName=function(e){n._leaveAttrName.call(this,e),this._attachCurrentAttrLocationInfo();},e._leaveAttrValue=function(e){n._leaveAttrValue.call(this,e),this._attachCurrentAttrLocationInfo();},e._attachCurrentAttrLocationInfo=function(){this.currentAttrLocation.endOffset=this.preprocessor.sourcePos,this.currentToken.location.attrs||(this.currentToken.location.attrs=Object.create(null)),this.currentToken.location.attrs[this.currentAttr.name]=this.currentAttrLocation;},e._emitCurrentToken=function(){this.currentCharacterToken&&(this.currentCharacterToken.location.endOffset=this.currentToken.location.startOffset),this.currentToken.location.endOffset=this.preprocessor.sourcePos+1,n._emitCurrentToken.call(this);},e._emitCurrentCharacterToken=function(){this.currentCharacterToken&&-1===this.currentCharacterToken.location.endOffset&&(this.currentCharacterToken.location.endOffset=this.preprocessor.sourcePos),n._emitCurrentCharacterToken.call(this);},Object.keys(n.MODE).map(function(e){return n.MODE[e]}).forEach(function(t){e[t]=function(e){r=this.preprocessor.sourcePos,s=E,i=a,n[t].call(this,e);};});}; var tokenizer_mixin={assign:assign}; var named_entity_data=new Uint16Array([4,52,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,106,303,412,810,1432,1701,1796,1987,2114,2360,2420,2484,3170,3251,4140,4393,4575,4610,5106,5512,5728,6117,6274,6315,6345,6427,6516,7002,7910,8733,9323,9870,10170,10631,10893,11318,11386,11467,12773,13092,14474,14922,15448,15542,16419,17666,18166,18611,19004,19095,19298,19397,4,16,69,77,97,98,99,102,103,108,109,110,111,112,114,115,116,117,140,150,158,169,176,194,199,210,216,222,226,242,256,266,283,294,108,105,103,5,198,1,59,148,1,198,80,5,38,1,59,156,1,38,99,117,116,101,5,193,1,59,167,1,193,114,101,118,101,59,1,258,4,2,105,121,182,191,114,99,5,194,1,59,189,1,194,59,1,1040,114,59,3,55349,56580,114,97,118,101,5,192,1,59,208,1,192,112,104,97,59,1,913,97,99,114,59,1,256,100,59,1,10835,4,2,103,112,232,237,111,110,59,1,260,102,59,3,55349,56632,112,108,121,70,117,110,99,116,105,111,110,59,1,8289,105,110,103,5,197,1,59,264,1,197,4,2,99,115,272,277,114,59,3,55349,56476,105,103,110,59,1,8788,105,108,100,101,5,195,1,59,292,1,195,109,108,5,196,1,59,301,1,196,4,8,97,99,101,102,111,114,115,117,321,350,354,383,388,394,400,405,4,2,99,114,327,336,107,115,108,97,115,104,59,1,8726,4,2,118,119,342,345,59,1,10983,101,100,59,1,8966,121,59,1,1041,4,3,99,114,116,362,369,379,97,117,115,101,59,1,8757,110,111,117,108,108,105,115,59,1,8492,97,59,1,914,114,59,3,55349,56581,112,102,59,3,55349,56633,101,118,101,59,1,728,99,114,59,1,8492,109,112,101,113,59,1,8782,4,14,72,79,97,99,100,101,102,104,105,108,111,114,115,117,442,447,456,504,542,547,569,573,577,616,678,784,790,796,99,121,59,1,1063,80,89,5,169,1,59,454,1,169,4,3,99,112,121,464,470,497,117,116,101,59,1,262,4,2,59,105,476,478,1,8914,116,97,108,68,105,102,102,101,114,101,110,116,105,97,108,68,59,1,8517,108,101,121,115,59,1,8493,4,4,97,101,105,111,514,520,530,535,114,111,110,59,1,268,100,105,108,5,199,1,59,528,1,199,114,99,59,1,264,110,105,110,116,59,1,8752,111,116,59,1,266,4,2,100,110,553,560,105,108,108,97,59,1,184,116,101,114,68,111,116,59,1,183,114,59,1,8493,105,59,1,935,114,99,108,101,4,4,68,77,80,84,591,596,603,609,111,116,59,1,8857,105,110,117,115,59,1,8854,108,117,115,59,1,8853,105,109,101,115,59,1,8855,111,4,2,99,115,623,646,107,119,105,115,101,67,111,110,116,111,117,114,73,110,116,101,103,114,97,108,59,1,8754,101,67,117,114,108,121,4,2,68,81,658,671,111,117,98,108,101,81,117,111,116,101,59,1,8221,117,111,116,101,59,1,8217,4,4,108,110,112,117,688,701,736,753,111,110,4,2,59,101,696,698,1,8759,59,1,10868,4,3,103,105,116,709,717,722,114,117,101,110,116,59,1,8801,110,116,59,1,8751,111,117,114,73,110,116,101,103,114,97,108,59,1,8750,4,2,102,114,742,745,59,1,8450,111,100,117,99,116,59,1,8720,110,116,101,114,67,108,111,99,107,119,105,115,101,67,111,110,116,111,117,114,73,110,116,101,103,114,97,108,59,1,8755,111,115,115,59,1,10799,99,114,59,3,55349,56478,112,4,2,59,67,803,805,1,8915,97,112,59,1,8781,4,11,68,74,83,90,97,99,101,102,105,111,115,834,850,855,860,865,888,903,916,921,1011,1415,4,2,59,111,840,842,1,8517,116,114,97,104,100,59,1,10513,99,121,59,1,1026,99,121,59,1,1029,99,121,59,1,1039,4,3,103,114,115,873,879,883,103,101,114,59,1,8225,114,59,1,8609,104,118,59,1,10980,4,2,97,121,894,900,114,111,110,59,1,270,59,1,1044,108,4,2,59,116,910,912,1,8711,97,59,1,916,114,59,3,55349,56583,4,2,97,102,927,998,4,2,99,109,933,992,114,105,116,105,99,97,108,4,4,65,68,71,84,950,957,978,985,99,117,116,101,59,1,180,111,4,2,116,117,964,967,59,1,729,98,108,101,65,99,117,116,101,59,1,733,114,97,118,101,59,1,96,105,108,100,101,59,1,732,111,110,100,59,1,8900,102,101,114,101,110,116,105,97,108,68,59,1,8518,4,4,112,116,117,119,1021,1026,1048,1249,102,59,3,55349,56635,4,3,59,68,69,1034,1036,1041,1,168,111,116,59,1,8412,113,117,97,108,59,1,8784,98,108,101,4,6,67,68,76,82,85,86,1065,1082,1101,1189,1211,1236,111,110,116,111,117,114,73,110,116,101,103,114,97,108,59,1,8751,111,4,2,116,119,1089,1092,59,1,168,110,65,114,114,111,119,59,1,8659,4,2,101,111,1107,1141,102,116,4,3,65,82,84,1117,1124,1136,114,114,111,119,59,1,8656,105,103,104,116,65,114,114,111,119,59,1,8660,101,101,59,1,10980,110,103,4,2,76,82,1149,1177,101,102,116,4,2,65,82,1158,1165,114,114,111,119,59,1,10232,105,103,104,116,65,114,114,111,119,59,1,10234,105,103,104,116,65,114,114,111,119,59,1,10233,105,103,104,116,4,2,65,84,1199,1206,114,114,111,119,59,1,8658,101,101,59,1,8872,112,4,2,65,68,1218,1225,114,114,111,119,59,1,8657,111,119,110,65,114,114,111,119,59,1,8661,101,114,116,105,99,97,108,66,97,114,59,1,8741,110,4,6,65,66,76,82,84,97,1264,1292,1299,1352,1391,1408,114,114,111,119,4,3,59,66,85,1276,1278,1283,1,8595,97,114,59,1,10515,112,65,114,114,111,119,59,1,8693,114,101,118,101,59,1,785,101,102,116,4,3,82,84,86,1310,1323,1334,105,103,104,116,86,101,99,116,111,114,59,1,10576,101,101,86,101,99,116,111,114,59,1,10590,101,99,116,111,114,4,2,59,66,1345,1347,1,8637,97,114,59,1,10582,105,103,104,116,4,2,84,86,1362,1373,101,101,86,101,99,116,111,114,59,1,10591,101,99,116,111,114,4,2,59,66,1384,1386,1,8641,97,114,59,1,10583,101,101,4,2,59,65,1399,1401,1,8868,114,114,111,119,59,1,8615,114,114,111,119,59,1,8659,4,2,99,116,1421,1426,114,59,3,55349,56479,114,111,107,59,1,272,4,16,78,84,97,99,100,102,103,108,109,111,112,113,115,116,117,120,1466,1470,1478,1489,1515,1520,1525,1536,1544,1593,1609,1617,1650,1664,1668,1677,71,59,1,330,72,5,208,1,59,1476,1,208,99,117,116,101,5,201,1,59,1487,1,201,4,3,97,105,121,1497,1503,1512,114,111,110,59,1,282,114,99,5,202,1,59,1510,1,202,59,1,1069,111,116,59,1,278,114,59,3,55349,56584,114,97,118,101,5,200,1,59,1534,1,200,101,109,101,110,116,59,1,8712,4,2,97,112,1550,1555,99,114,59,1,274,116,121,4,2,83,86,1563,1576,109,97,108,108,83,113,117,97,114,101,59,1,9723,101,114,121,83,109,97,108,108,83,113,117,97,114,101,59,1,9643,4,2,103,112,1599,1604,111,110,59,1,280,102,59,3,55349,56636,115,105,108,111,110,59,1,917,117,4,2,97,105,1624,1640,108,4,2,59,84,1631,1633,1,10869,105,108,100,101,59,1,8770,108,105,98,114,105,117,109,59,1,8652,4,2,99,105,1656,1660,114,59,1,8496,109,59,1,10867,97,59,1,919,109,108,5,203,1,59,1675,1,203,4,2,105,112,1683,1689,115,116,115,59,1,8707,111,110,101,110,116,105,97,108,69,59,1,8519,4,5,99,102,105,111,115,1713,1717,1722,1762,1791,121,59,1,1060,114,59,3,55349,56585,108,108,101,100,4,2,83,86,1732,1745,109,97,108,108,83,113,117,97,114,101,59,1,9724,101,114,121,83,109,97,108,108,83,113,117,97,114,101,59,1,9642,4,3,112,114,117,1770,1775,1781,102,59,3,55349,56637,65,108,108,59,1,8704,114,105,101,114,116,114,102,59,1,8497,99,114,59,1,8497,4,12,74,84,97,98,99,100,102,103,111,114,115,116,1822,1827,1834,1848,1855,1877,1882,1887,1890,1896,1978,1984,99,121,59,1,1027,5,62,1,59,1832,1,62,109,109,97,4,2,59,100,1843,1845,1,915,59,1,988,114,101,118,101,59,1,286,4,3,101,105,121,1863,1869,1874,100,105,108,59,1,290,114,99,59,1,284,59,1,1043,111,116,59,1,288,114,59,3,55349,56586,59,1,8921,112,102,59,3,55349,56638,101,97,116,101,114,4,6,69,70,71,76,83,84,1915,1933,1944,1953,1959,1971,113,117,97,108,4,2,59,76,1925,1927,1,8805,101,115,115,59,1,8923,117,108,108,69,113,117,97,108,59,1,8807,114,101,97,116,101,114,59,1,10914,101,115,115,59,1,8823,108,97,110,116,69,113,117,97,108,59,1,10878,105,108,100,101,59,1,8819,99,114,59,3,55349,56482,59,1,8811,4,8,65,97,99,102,105,111,115,117,2005,2012,2026,2032,2036,2049,2073,2089,82,68,99,121,59,1,1066,4,2,99,116,2018,2023,101,107,59,1,711,59,1,94,105,114,99,59,1,292,114,59,1,8460,108,98,101,114,116,83,112,97,99,101,59,1,8459,4,2,112,114,2055,2059,102,59,1,8461,105,122,111,110,116,97,108,76,105,110,101,59,1,9472,4,2,99,116,2079,2083,114,59,1,8459,114,111,107,59,1,294,109,112,4,2,68,69,2097,2107,111,119,110,72,117,109,112,59,1,8782,113,117,97,108,59,1,8783,4,14,69,74,79,97,99,100,102,103,109,110,111,115,116,117,2144,2149,2155,2160,2171,2189,2194,2198,2209,2245,2307,2329,2334,2341,99,121,59,1,1045,108,105,103,59,1,306,99,121,59,1,1025,99,117,116,101,5,205,1,59,2169,1,205,4,2,105,121,2177,2186,114,99,5,206,1,59,2184,1,206,59,1,1048,111,116,59,1,304,114,59,1,8465,114,97,118,101,5,204,1,59,2207,1,204,4,3,59,97,112,2217,2219,2238,1,8465,4,2,99,103,2225,2229,114,59,1,298,105,110,97,114,121,73,59,1,8520,108,105,101,115,59,1,8658,4,2,116,118,2251,2281,4,2,59,101,2257,2259,1,8748,4,2,103,114,2265,2271,114,97,108,59,1,8747,115,101,99,116,105,111,110,59,1,8898,105,115,105,98,108,101,4,2,67,84,2293,2300,111,109,109,97,59,1,8291,105,109,101,115,59,1,8290,4,3,103,112,116,2315,2320,2325,111,110,59,1,302,102,59,3,55349,56640,97,59,1,921,99,114,59,1,8464,105,108,100,101,59,1,296,4,2,107,109,2347,2352,99,121,59,1,1030,108,5,207,1,59,2358,1,207,4,5,99,102,111,115,117,2372,2386,2391,2397,2414,4,2,105,121,2378,2383,114,99,59,1,308,59,1,1049,114,59,3,55349,56589,112,102,59,3,55349,56641,4,2,99,101,2403,2408,114,59,3,55349,56485,114,99,121,59,1,1032,107,99,121,59,1,1028,4,7,72,74,97,99,102,111,115,2436,2441,2446,2452,2467,2472,2478,99,121,59,1,1061,99,121,59,1,1036,112,112,97,59,1,922,4,2,101,121,2458,2464,100,105,108,59,1,310,59,1,1050,114,59,3,55349,56590,112,102,59,3,55349,56642,99,114,59,3,55349,56486,4,11,74,84,97,99,101,102,108,109,111,115,116,2508,2513,2520,2562,2585,2981,2986,3004,3011,3146,3167,99,121,59,1,1033,5,60,1,59,2518,1,60,4,5,99,109,110,112,114,2532,2538,2544,2548,2558,117,116,101,59,1,313,98,100,97,59,1,923,103,59,1,10218,108,97,99,101,116,114,102,59,1,8466,114,59,1,8606,4,3,97,101,121,2570,2576,2582,114,111,110,59,1,317,100,105,108,59,1,315,59,1,1051,4,2,102,115,2591,2907,116,4,10,65,67,68,70,82,84,85,86,97,114,2614,2663,2672,2728,2735,2760,2820,2870,2888,2895,4,2,110,114,2620,2633,103,108,101,66,114,97,99,107,101,116,59,1,10216,114,111,119,4,3,59,66,82,2644,2646,2651,1,8592,97,114,59,1,8676,105,103,104,116,65,114,114,111,119,59,1,8646,101,105,108,105,110,103,59,1,8968,111,4,2,117,119,2679,2692,98,108,101,66,114,97,99,107,101,116,59,1,10214,110,4,2,84,86,2699,2710,101,101,86,101,99,116,111,114,59,1,10593,101,99,116,111,114,4,2,59,66,2721,2723,1,8643,97,114,59,1,10585,108,111,111,114,59,1,8970,105,103,104,116,4,2,65,86,2745,2752,114,114,111,119,59,1,8596,101,99,116,111,114,59,1,10574,4,2,101,114,2766,2792,101,4,3,59,65,86,2775,2777,2784,1,8867,114,114,111,119,59,1,8612,101,99,116,111,114,59,1,10586,105,97,110,103,108,101,4,3,59,66,69,2806,2808,2813,1,8882,97,114,59,1,10703,113,117,97,108,59,1,8884,112,4,3,68,84,86,2829,2841,2852,111,119,110,86,101,99,116,111,114,59,1,10577,101,101,86,101,99,116,111,114,59,1,10592,101,99,116,111,114,4,2,59,66,2863,2865,1,8639,97,114,59,1,10584,101,99,116,111,114,4,2,59,66,2881,2883,1,8636,97,114,59,1,10578,114,114,111,119,59,1,8656,105,103,104,116,97,114,114,111,119,59,1,8660,115,4,6,69,70,71,76,83,84,2922,2936,2947,2956,2962,2974,113,117,97,108,71,114,101,97,116,101,114,59,1,8922,117,108,108,69,113,117,97,108,59,1,8806,114,101,97,116,101,114,59,1,8822,101,115,115,59,1,10913,108,97,110,116,69,113,117,97,108,59,1,10877,105,108,100,101,59,1,8818,114,59,3,55349,56591,4,2,59,101,2992,2994,1,8920,102,116,97,114,114,111,119,59,1,8666,105,100,111,116,59,1,319,4,3,110,112,119,3019,3110,3115,103,4,4,76,82,108,114,3030,3058,3070,3098,101,102,116,4,2,65,82,3039,3046,114,114,111,119,59,1,10229,105,103,104,116,65,114,114,111,119,59,1,10231,105,103,104,116,65,114,114,111,119,59,1,10230,101,102,116,4,2,97,114,3079,3086,114,114,111,119,59,1,10232,105,103,104,116,97,114,114,111,119,59,1,10234,105,103,104,116,97,114,114,111,119,59,1,10233,102,59,3,55349,56643,101,114,4,2,76,82,3123,3134,101,102,116,65,114,114,111,119,59,1,8601,105,103,104,116,65,114,114,111,119,59,1,8600,4,3,99,104,116,3154,3158,3161,114,59,1,8466,59,1,8624,114,111,107,59,1,321,59,1,8810,4,8,97,99,101,102,105,111,115,117,3188,3192,3196,3222,3227,3237,3243,3248,112,59,1,10501,121,59,1,1052,4,2,100,108,3202,3213,105,117,109,83,112,97,99,101,59,1,8287,108,105,110,116,114,102,59,1,8499,114,59,3,55349,56592,110,117,115,80,108,117,115,59,1,8723,112,102,59,3,55349,56644,99,114,59,1,8499,59,1,924,4,9,74,97,99,101,102,111,115,116,117,3271,3276,3283,3306,3422,3427,4120,4126,4137,99,121,59,1,1034,99,117,116,101,59,1,323,4,3,97,101,121,3291,3297,3303,114,111,110,59,1,327,100,105,108,59,1,325,59,1,1053,4,3,103,115,119,3314,3380,3415,97,116,105,118,101,4,3,77,84,86,3327,3340,3365,101,100,105,117,109,83,112,97,99,101,59,1,8203,104,105,4,2,99,110,3348,3357,107,83,112,97,99,101,59,1,8203,83,112,97,99,101,59,1,8203,101,114,121,84,104,105,110,83,112,97,99,101,59,1,8203,116,101,100,4,2,71,76,3389,3405,114,101,97,116,101,114,71,114,101,97,116,101,114,59,1,8811,101,115,115,76,101,115,115,59,1,8810,76,105,110,101,59,1,10,114,59,3,55349,56593,4,4,66,110,112,116,3437,3444,3460,3464,114,101,97,107,59,1,8288,66,114,101,97,107,105,110,103,83,112,97,99,101,59,1,160,102,59,1,8469,4,13,59,67,68,69,71,72,76,78,80,82,83,84,86,3492,3494,3517,3536,3578,3657,3685,3784,3823,3860,3915,4066,4107,1,10988,4,2,111,117,3500,3510,110,103,114,117,101,110,116,59,1,8802,112,67,97,112,59,1,8813,111,117,98,108,101,86,101,114,116,105,99,97,108,66,97,114,59,1,8742,4,3,108,113,120,3544,3552,3571,101,109,101,110,116,59,1,8713,117,97,108,4,2,59,84,3561,3563,1,8800,105,108,100,101,59,3,8770,824,105,115,116,115,59,1,8708,114,101,97,116,101,114,4,7,59,69,70,71,76,83,84,3600,3602,3609,3621,3631,3637,3650,1,8815,113,117,97,108,59,1,8817,117,108,108,69,113,117,97,108,59,3,8807,824,114,101,97,116,101,114,59,3,8811,824,101,115,115,59,1,8825,108,97,110,116,69,113,117,97,108,59,3,10878,824,105,108,100,101,59,1,8821,117,109,112,4,2,68,69,3666,3677,111,119,110,72,117,109,112,59,3,8782,824,113,117,97,108,59,3,8783,824,101,4,2,102,115,3692,3724,116,84,114,105,97,110,103,108,101,4,3,59,66,69,3709,3711,3717,1,8938,97,114,59,3,10703,824,113,117,97,108,59,1,8940,115,4,6,59,69,71,76,83,84,3739,3741,3748,3757,3764,3777,1,8814,113,117,97,108,59,1,8816,114,101,97,116,101,114,59,1,8824,101,115,115,59,3,8810,824,108,97,110,116,69,113,117,97,108,59,3,10877,824,105,108,100,101,59,1,8820,101,115,116,101,100,4,2,71,76,3795,3812,114,101,97,116,101,114,71,114,101,97,116,101,114,59,3,10914,824,101,115,115,76,101,115,115,59,3,10913,824,114,101,99,101,100,101,115,4,3,59,69,83,3838,3840,3848,1,8832,113,117,97,108,59,3,10927,824,108,97,110,116,69,113,117,97,108,59,1,8928,4,2,101,105,3866,3881,118,101,114,115,101,69,108,101,109,101,110,116,59,1,8716,103,104,116,84,114,105,97,110,103,108,101,4,3,59,66,69,3900,3902,3908,1,8939,97,114,59,3,10704,824,113,117,97,108,59,1,8941,4,2,113,117,3921,3973,117,97,114,101,83,117,4,2,98,112,3933,3952,115,101,116,4,2,59,69,3942,3945,3,8847,824,113,117,97,108,59,1,8930,101,114,115,101,116,4,2,59,69,3963,3966,3,8848,824,113,117,97,108,59,1,8931,4,3,98,99,112,3981,4e3,4045,115,101,116,4,2,59,69,3990,3993,3,8834,8402,113,117,97,108,59,1,8840,99,101,101,100,115,4,4,59,69,83,84,4015,4017,4025,4037,1,8833,113,117,97,108,59,3,10928,824,108,97,110,116,69,113,117,97,108,59,1,8929,105,108,100,101,59,3,8831,824,101,114,115,101,116,4,2,59,69,4056,4059,3,8835,8402,113,117,97,108,59,1,8841,105,108,100,101,4,4,59,69,70,84,4080,4082,4089,4100,1,8769,113,117,97,108,59,1,8772,117,108,108,69,113,117,97,108,59,1,8775,105,108,100,101,59,1,8777,101,114,116,105,99,97,108,66,97,114,59,1,8740,99,114,59,3,55349,56489,105,108,100,101,5,209,1,59,4135,1,209,59,1,925,4,14,69,97,99,100,102,103,109,111,112,114,115,116,117,118,4170,4176,4187,4205,4212,4217,4228,4253,4259,4292,4295,4316,4337,4346,108,105,103,59,1,338,99,117,116,101,5,211,1,59,4185,1,211,4,2,105,121,4193,4202,114,99,5,212,1,59,4200,1,212,59,1,1054,98,108,97,99,59,1,336,114,59,3,55349,56594,114,97,118,101,5,210,1,59,4226,1,210,4,3,97,101,105,4236,4241,4246,99,114,59,1,332,103,97,59,1,937,99,114,111,110,59,1,927,112,102,59,3,55349,56646,101,110,67,117,114,108,121,4,2,68,81,4272,4285,111,117,98,108,101,81,117,111,116,101,59,1,8220,117,111,116,101,59,1,8216,59,1,10836,4,2,99,108,4301,4306,114,59,3,55349,56490,97,115,104,5,216,1,59,4314,1,216,105,4,2,108,109,4323,4332,100,101,5,213,1,59,4330,1,213,101,115,59,1,10807,109,108,5,214,1,59,4344,1,214,101,114,4,2,66,80,4354,4380,4,2,97,114,4360,4364,114,59,1,8254,97,99,4,2,101,107,4372,4375,59,1,9182,101,116,59,1,9140,97,114,101,110,116,104,101,115,105,115,59,1,9180,4,9,97,99,102,104,105,108,111,114,115,4413,4422,4426,4431,4435,4438,4448,4471,4561,114,116,105,97,108,68,59,1,8706,121,59,1,1055,114,59,3,55349,56595,105,59,1,934,59,1,928,117,115,77,105,110,117,115,59,1,177,4,2,105,112,4454,4467,110,99,97,114,101,112,108,97,110,101,59,1,8460,102,59,1,8473,4,4,59,101,105,111,4481,4483,4526,4531,1,10939,99,101,100,101,115,4,4,59,69,83,84,4498,4500,4507,4519,1,8826,113,117,97,108,59,1,10927,108,97,110,116,69,113,117,97,108,59,1,8828,105,108,100,101,59,1,8830,109,101,59,1,8243,4,2,100,112,4537,4543,117,99,116,59,1,8719,111,114,116,105,111,110,4,2,59,97,4555,4557,1,8759,108,59,1,8733,4,2,99,105,4567,4572,114,59,3,55349,56491,59,1,936,4,4,85,102,111,115,4585,4594,4599,4604,79,84,5,34,1,59,4592,1,34,114,59,3,55349,56596,112,102,59,1,8474,99,114,59,3,55349,56492,4,12,66,69,97,99,101,102,104,105,111,114,115,117,4636,4642,4650,4681,4704,4763,4767,4771,5047,5069,5081,5094,97,114,114,59,1,10512,71,5,174,1,59,4648,1,174,4,3,99,110,114,4658,4664,4668,117,116,101,59,1,340,103,59,1,10219,114,4,2,59,116,4675,4677,1,8608,108,59,1,10518,4,3,97,101,121,4689,4695,4701,114,111,110,59,1,344,100,105,108,59,1,342,59,1,1056,4,2,59,118,4710,4712,1,8476,101,114,115,101,4,2,69,85,4722,4748,4,2,108,113,4728,4736,101,109,101,110,116,59,1,8715,117,105,108,105,98,114,105,117,109,59,1,8651,112,69,113,117,105,108,105,98,114,105,117,109,59,1,10607,114,59,1,8476,111,59,1,929,103,104,116,4,8,65,67,68,70,84,85,86,97,4792,4840,4849,4905,4912,4972,5022,5040,4,2,110,114,4798,4811,103,108,101,66,114,97,99,107,101,116,59,1,10217,114,111,119,4,3,59,66,76,4822,4824,4829,1,8594,97,114,59,1,8677,101,102,116,65,114,114,111,119,59,1,8644,101,105,108,105,110,103,59,1,8969,111,4,2,117,119,4856,4869,98,108,101,66,114,97,99,107,101,116,59,1,10215,110,4,2,84,86,4876,4887,101,101,86,101,99,116,111,114,59,1,10589,101,99,116,111,114,4,2,59,66,4898,4900,1,8642,97,114,59,1,10581,108,111,111,114,59,1,8971,4,2,101,114,4918,4944,101,4,3,59,65,86,4927,4929,4936,1,8866,114,114,111,119,59,1,8614,101,99,116,111,114,59,1,10587,105,97,110,103,108,101,4,3,59,66,69,4958,4960,4965,1,8883,97,114,59,1,10704,113,117,97,108,59,1,8885,112,4,3,68,84,86,4981,4993,5004,111,119,110,86,101,99,116,111,114,59,1,10575,101,101,86,101,99,116,111,114,59,1,10588,101,99,116,111,114,4,2,59,66,5015,5017,1,8638,97,114,59,1,10580,101,99,116,111,114,4,2,59,66,5033,5035,1,8640,97,114,59,1,10579,114,114,111,119,59,1,8658,4,2,112,117,5053,5057,102,59,1,8477,110,100,73,109,112,108,105,101,115,59,1,10608,105,103,104,116,97,114,114,111,119,59,1,8667,4,2,99,104,5087,5091,114,59,1,8475,59,1,8625,108,101,68,101,108,97,121,101,100,59,1,10740,4,13,72,79,97,99,102,104,105,109,111,113,115,116,117,5134,5150,5157,5164,5198,5203,5259,5265,5277,5283,5374,5380,5385,4,2,67,99,5140,5146,72,99,121,59,1,1065,121,59,1,1064,70,84,99,121,59,1,1068,99,117,116,101,59,1,346,4,5,59,97,101,105,121,5176,5178,5184,5190,5195,1,10940,114,111,110,59,1,352,100,105,108,59,1,350,114,99,59,1,348,59,1,1057,114,59,3,55349,56598,111,114,116,4,4,68,76,82,85,5216,5227,5238,5250,111,119,110,65,114,114,111,119,59,1,8595,101,102,116,65,114,114,111,119,59,1,8592,105,103,104,116,65,114,114,111,119,59,1,8594,112,65,114,114,111,119,59,1,8593,103,109,97,59,1,931,97,108,108,67,105,114,99,108,101,59,1,8728,112,102,59,3,55349,56650,4,2,114,117,5289,5293,116,59,1,8730,97,114,101,4,4,59,73,83,85,5306,5308,5322,5367,1,9633,110,116,101,114,115,101,99,116,105,111,110,59,1,8851,117,4,2,98,112,5329,5347,115,101,116,4,2,59,69,5338,5340,1,8847,113,117,97,108,59,1,8849,101,114,115,101,116,4,2,59,69,5358,5360,1,8848,113,117,97,108,59,1,8850,110,105,111,110,59,1,8852,99,114,59,3,55349,56494,97,114,59,1,8902,4,4,98,99,109,112,5395,5420,5475,5478,4,2,59,115,5401,5403,1,8912,101,116,4,2,59,69,5411,5413,1,8912,113,117,97,108,59,1,8838,4,2,99,104,5426,5468,101,101,100,115,4,4,59,69,83,84,5440,5442,5449,5461,1,8827,113,117,97,108,59,1,10928,108,97,110,116,69,113,117,97,108,59,1,8829,105,108,100,101,59,1,8831,84,104,97,116,59,1,8715,59,1,8721,4,3,59,101,115,5486,5488,5507,1,8913,114,115,101,116,4,2,59,69,5498,5500,1,8835,113,117,97,108,59,1,8839,101,116,59,1,8913,4,11,72,82,83,97,99,102,104,105,111,114,115,5536,5546,5552,5567,5579,5602,5607,5655,5695,5701,5711,79,82,78,5,222,1,59,5544,1,222,65,68,69,59,1,8482,4,2,72,99,5558,5563,99,121,59,1,1035,121,59,1,1062,4,2,98,117,5573,5576,59,1,9,59,1,932,4,3,97,101,121,5587,5593,5599,114,111,110,59,1,356,100,105,108,59,1,354,59,1,1058,114,59,3,55349,56599,4,2,101,105,5613,5631,4,2,114,116,5619,5627,101,102,111,114,101,59,1,8756,97,59,1,920,4,2,99,110,5637,5647,107,83,112,97,99,101,59,3,8287,8202,83,112,97,99,101,59,1,8201,108,100,101,4,4,59,69,70,84,5668,5670,5677,5688,1,8764,113,117,97,108,59,1,8771,117,108,108,69,113,117,97,108,59,1,8773,105,108,100,101,59,1,8776,112,102,59,3,55349,56651,105,112,108,101,68,111,116,59,1,8411,4,2,99,116,5717,5722,114,59,3,55349,56495,114,111,107,59,1,358,4,14,97,98,99,100,102,103,109,110,111,112,114,115,116,117,5758,5789,5805,5823,5830,5835,5846,5852,5921,5937,6089,6095,6101,6108,4,2,99,114,5764,5774,117,116,101,5,218,1,59,5772,1,218,114,4,2,59,111,5781,5783,1,8607,99,105,114,59,1,10569,114,4,2,99,101,5796,5800,121,59,1,1038,118,101,59,1,364,4,2,105,121,5811,5820,114,99,5,219,1,59,5818,1,219,59,1,1059,98,108,97,99,59,1,368,114,59,3,55349,56600,114,97,118,101,5,217,1,59,5844,1,217,97,99,114,59,1,362,4,2,100,105,5858,5905,101,114,4,2,66,80,5866,5892,4,2,97,114,5872,5876,114,59,1,95,97,99,4,2,101,107,5884,5887,59,1,9183,101,116,59,1,9141,97,114,101,110,116,104,101,115,105,115,59,1,9181,111,110,4,2,59,80,5913,5915,1,8899,108,117,115,59,1,8846,4,2,103,112,5927,5932,111,110,59,1,370,102,59,3,55349,56652,4,8,65,68,69,84,97,100,112,115,5955,5985,5996,6009,6026,6033,6044,6075,114,114,111,119,4,3,59,66,68,5967,5969,5974,1,8593,97,114,59,1,10514,111,119,110,65,114,114,111,119,59,1,8645,111,119,110,65,114,114,111,119,59,1,8597,113,117,105,108,105,98,114,105,117,109,59,1,10606,101,101,4,2,59,65,6017,6019,1,8869,114,114,111,119,59,1,8613,114,114,111,119,59,1,8657,111,119,110,97,114,114,111,119,59,1,8661,101,114,4,2,76,82,6052,6063,101,102,116,65,114,114,111,119,59,1,8598,105,103,104,116,65,114,114,111,119,59,1,8599,105,4,2,59,108,6082,6084,1,978,111,110,59,1,933,105,110,103,59,1,366,99,114,59,3,55349,56496,105,108,100,101,59,1,360,109,108,5,220,1,59,6115,1,220,4,9,68,98,99,100,101,102,111,115,118,6137,6143,6148,6152,6166,6250,6255,6261,6267,97,115,104,59,1,8875,97,114,59,1,10987,121,59,1,1042,97,115,104,4,2,59,108,6161,6163,1,8873,59,1,10982,4,2,101,114,6172,6175,59,1,8897,4,3,98,116,121,6183,6188,6238,97,114,59,1,8214,4,2,59,105,6194,6196,1,8214,99,97,108,4,4,66,76,83,84,6209,6214,6220,6231,97,114,59,1,8739,105,110,101,59,1,124,101,112,97,114,97,116,111,114,59,1,10072,105,108,100,101,59,1,8768,84,104,105,110,83,112,97,99,101,59,1,8202,114,59,3,55349,56601,112,102,59,3,55349,56653,99,114,59,3,55349,56497,100,97,115,104,59,1,8874,4,5,99,101,102,111,115,6286,6292,6298,6303,6309,105,114,99,59,1,372,100,103,101,59,1,8896,114,59,3,55349,56602,112,102,59,3,55349,56654,99,114,59,3,55349,56498,4,4,102,105,111,115,6325,6330,6333,6339,114,59,3,55349,56603,59,1,926,112,102,59,3,55349,56655,99,114,59,3,55349,56499,4,9,65,73,85,97,99,102,111,115,117,6365,6370,6375,6380,6391,6405,6410,6416,6422,99,121,59,1,1071,99,121,59,1,1031,99,121,59,1,1070,99,117,116,101,5,221,1,59,6389,1,221,4,2,105,121,6397,6402,114,99,59,1,374,59,1,1067,114,59,3,55349,56604,112,102,59,3,55349,56656,99,114,59,3,55349,56500,109,108,59,1,376,4,8,72,97,99,100,101,102,111,115,6445,6450,6457,6472,6477,6501,6505,6510,99,121,59,1,1046,99,117,116,101,59,1,377,4,2,97,121,6463,6469,114,111,110,59,1,381,59,1,1047,111,116,59,1,379,4,2,114,116,6483,6497,111,87,105,100,116,104,83,112,97,99,101,59,1,8203,97,59,1,918,114,59,1,8488,112,102,59,1,8484,99,114,59,3,55349,56501,4,16,97,98,99,101,102,103,108,109,110,111,112,114,115,116,117,119,6550,6561,6568,6612,6622,6634,6645,6672,6699,6854,6870,6923,6933,6963,6974,6983,99,117,116,101,5,225,1,59,6559,1,225,114,101,118,101,59,1,259,4,6,59,69,100,105,117,121,6582,6584,6588,6591,6600,6609,1,8766,59,3,8766,819,59,1,8767,114,99,5,226,1,59,6598,1,226,116,101,5,180,1,59,6607,1,180,59,1,1072,108,105,103,5,230,1,59,6620,1,230,4,2,59,114,6628,6630,1,8289,59,3,55349,56606,114,97,118,101,5,224,1,59,6643,1,224,4,2,101,112,6651,6667,4,2,102,112,6657,6663,115,121,109,59,1,8501,104,59,1,8501,104,97,59,1,945,4,2,97,112,6678,6692,4,2,99,108,6684,6688,114,59,1,257,103,59,1,10815,5,38,1,59,6697,1,38,4,2,100,103,6705,6737,4,5,59,97,100,115,118,6717,6719,6724,6727,6734,1,8743,110,100,59,1,10837,59,1,10844,108,111,112,101,59,1,10840,59,1,10842,4,7,59,101,108,109,114,115,122,6753,6755,6758,6762,6814,6835,6848,1,8736,59,1,10660,101,59,1,8736,115,100,4,2,59,97,6770,6772,1,8737,4,8,97,98,99,100,101,102,103,104,6790,6793,6796,6799,6802,6805,6808,6811,59,1,10664,59,1,10665,59,1,10666,59,1,10667,59,1,10668,59,1,10669,59,1,10670,59,1,10671,116,4,2,59,118,6821,6823,1,8735,98,4,2,59,100,6830,6832,1,8894,59,1,10653,4,2,112,116,6841,6845,104,59,1,8738,59,1,197,97,114,114,59,1,9084,4,2,103,112,6860,6865,111,110,59,1,261,102,59,3,55349,56658,4,7,59,69,97,101,105,111,112,6886,6888,6891,6897,6900,6904,6908,1,8776,59,1,10864,99,105,114,59,1,10863,59,1,8778,100,59,1,8779,115,59,1,39,114,111,120,4,2,59,101,6917,6919,1,8776,113,59,1,8778,105,110,103,5,229,1,59,6931,1,229,4,3,99,116,121,6941,6946,6949,114,59,3,55349,56502,59,1,42,109,112,4,2,59,101,6957,6959,1,8776,113,59,1,8781,105,108,100,101,5,227,1,59,6972,1,227,109,108,5,228,1,59,6981,1,228,4,2,99,105,6989,6997,111,110,105,110,116,59,1,8755,110,116,59,1,10769,4,16,78,97,98,99,100,101,102,105,107,108,110,111,112,114,115,117,7036,7041,7119,7135,7149,7155,7219,7224,7347,7354,7463,7489,7786,7793,7814,7866,111,116,59,1,10989,4,2,99,114,7047,7094,107,4,4,99,101,112,115,7058,7064,7073,7080,111,110,103,59,1,8780,112,115,105,108,111,110,59,1,1014,114,105,109,101,59,1,8245,105,109,4,2,59,101,7088,7090,1,8765,113,59,1,8909,4,2,118,119,7100,7105,101,101,59,1,8893,101,100,4,2,59,103,7113,7115,1,8965,101,59,1,8965,114,107,4,2,59,116,7127,7129,1,9141,98,114,107,59,1,9142,4,2,111,121,7141,7146,110,103,59,1,8780,59,1,1073,113,117,111,59,1,8222,4,5,99,109,112,114,116,7167,7181,7188,7193,7199,97,117,115,4,2,59,101,7176,7178,1,8757,59,1,8757,112,116,121,118,59,1,10672,115,105,59,1,1014,110,111,117,59,1,8492,4,3,97,104,119,7207,7210,7213,59,1,946,59,1,8502,101,101,110,59,1,8812,114,59,3,55349,56607,103,4,7,99,111,115,116,117,118,119,7241,7262,7288,7305,7328,7335,7340,4,3,97,105,117,7249,7253,7258,112,59,1,8898,114,99,59,1,9711,112,59,1,8899,4,3,100,112,116,7270,7275,7281,111,116,59,1,10752,108,117,115,59,1,10753,105,109,101,115,59,1,10754,4,2,113,116,7294,7300,99,117,112,59,1,10758,97,114,59,1,9733,114,105,97,110,103,108,101,4,2,100,117,7318,7324,111,119,110,59,1,9661,112,59,1,9651,112,108,117,115,59,1,10756,101,101,59,1,8897,101,100,103,101,59,1,8896,97,114,111,119,59,1,10509,4,3,97,107,111,7362,7436,7458,4,2,99,110,7368,7432,107,4,3,108,115,116,7377,7386,7394,111,122,101,110,103,101,59,1,10731,113,117,97,114,101,59,1,9642,114,105,97,110,103,108,101,4,4,59,100,108,114,7411,7413,7419,7425,1,9652,111,119,110,59,1,9662,101,102,116,59,1,9666,105,103,104,116,59,1,9656,107,59,1,9251,4,2,49,51,7442,7454,4,2,50,52,7448,7451,59,1,9618,59,1,9617,52,59,1,9619,99,107,59,1,9608,4,2,101,111,7469,7485,4,2,59,113,7475,7478,3,61,8421,117,105,118,59,3,8801,8421,116,59,1,8976,4,4,112,116,119,120,7499,7504,7517,7523,102,59,3,55349,56659,4,2,59,116,7510,7512,1,8869,111,109,59,1,8869,116,105,101,59,1,8904,4,12,68,72,85,86,98,100,104,109,112,116,117,118,7549,7571,7597,7619,7655,7660,7682,7708,7715,7721,7728,7750,4,4,76,82,108,114,7559,7562,7565,7568,59,1,9559,59,1,9556,59,1,9558,59,1,9555,4,5,59,68,85,100,117,7583,7585,7588,7591,7594,1,9552,59,1,9574,59,1,9577,59,1,9572,59,1,9575,4,4,76,82,108,114,7607,7610,7613,7616,59,1,9565,59,1,9562,59,1,9564,59,1,9561,4,7,59,72,76,82,104,108,114,7635,7637,7640,7643,7646,7649,7652,1,9553,59,1,9580,59,1,9571,59,1,9568,59,1,9579,59,1,9570,59,1,9567,111,120,59,1,10697,4,4,76,82,108,114,7670,7673,7676,7679,59,1,9557,59,1,9554,59,1,9488,59,1,9484,4,5,59,68,85,100,117,7694,7696,7699,7702,7705,1,9472,59,1,9573,59,1,9576,59,1,9516,59,1,9524,105,110,117,115,59,1,8863,108,117,115,59,1,8862,105,109,101,115,59,1,8864,4,4,76,82,108,114,7738,7741,7744,7747,59,1,9563,59,1,9560,59,1,9496,59,1,9492,4,7,59,72,76,82,104,108,114,7766,7768,7771,7774,7777,7780,7783,1,9474,59,1,9578,59,1,9569,59,1,9566,59,1,9532,59,1,9508,59,1,9500,114,105,109,101,59,1,8245,4,2,101,118,7799,7804,118,101,59,1,728,98,97,114,5,166,1,59,7812,1,166,4,4,99,101,105,111,7824,7829,7834,7846,114,59,3,55349,56503,109,105,59,1,8271,109,4,2,59,101,7841,7843,1,8765,59,1,8909,108,4,3,59,98,104,7855,7857,7860,1,92,59,1,10693,115,117,98,59,1,10184,4,2,108,109,7872,7885,108,4,2,59,101,7879,7881,1,8226,116,59,1,8226,112,4,3,59,69,101,7894,7896,7899,1,8782,59,1,10926,4,2,59,113,7905,7907,1,8783,59,1,8783,4,15,97,99,100,101,102,104,105,108,111,114,115,116,117,119,121,7942,8021,8075,8080,8121,8126,8157,8279,8295,8430,8446,8485,8491,8707,8726,4,3,99,112,114,7950,7956,8007,117,116,101,59,1,263,4,6,59,97,98,99,100,115,7970,7972,7977,7984,7998,8003,1,8745,110,100,59,1,10820,114,99,117,112,59,1,10825,4,2,97,117,7990,7994,112,59,1,10827,112,59,1,10823,111,116,59,1,10816,59,3,8745,65024,4,2,101,111,8013,8017,116,59,1,8257,110,59,1,711,4,4,97,101,105,117,8031,8046,8056,8061,4,2,112,114,8037,8041,115,59,1,10829,111,110,59,1,269,100,105,108,5,231,1,59,8054,1,231,114,99,59,1,265,112,115,4,2,59,115,8069,8071,1,10828,109,59,1,10832,111,116,59,1,267,4,3,100,109,110,8088,8097,8104,105,108,5,184,1,59,8095,1,184,112,116,121,118,59,1,10674,116,5,162,2,59,101,8112,8114,1,162,114,100,111,116,59,1,183,114,59,3,55349,56608,4,3,99,101,105,8134,8138,8154,121,59,1,1095,99,107,4,2,59,109,8146,8148,1,10003,97,114,107,59,1,10003,59,1,967,114,4,7,59,69,99,101,102,109,115,8174,8176,8179,8258,8261,8268,8273,1,9675,59,1,10691,4,3,59,101,108,8187,8189,8193,1,710,113,59,1,8791,101,4,2,97,100,8200,8223,114,114,111,119,4,2,108,114,8210,8216,101,102,116,59,1,8634,105,103,104,116,59,1,8635,4,5,82,83,97,99,100,8235,8238,8241,8246,8252,59,1,174,59,1,9416,115,116,59,1,8859,105,114,99,59,1,8858,97,115,104,59,1,8861,59,1,8791,110,105,110,116,59,1,10768,105,100,59,1,10991,99,105,114,59,1,10690,117,98,115,4,2,59,117,8288,8290,1,9827,105,116,59,1,9827,4,4,108,109,110,112,8305,8326,8376,8400,111,110,4,2,59,101,8313,8315,1,58,4,2,59,113,8321,8323,1,8788,59,1,8788,4,2,109,112,8332,8344,97,4,2,59,116,8339,8341,1,44,59,1,64,4,3,59,102,108,8352,8354,8358,1,8705,110,59,1,8728,101,4,2,109,120,8365,8371,101,110,116,59,1,8705,101,115,59,1,8450,4,2,103,105,8382,8395,4,2,59,100,8388,8390,1,8773,111,116,59,1,10861,110,116,59,1,8750,4,3,102,114,121,8408,8412,8417,59,3,55349,56660,111,100,59,1,8720,5,169,2,59,115,8424,8426,1,169,114,59,1,8471,4,2,97,111,8436,8441,114,114,59,1,8629,115,115,59,1,10007,4,2,99,117,8452,8457,114,59,3,55349,56504,4,2,98,112,8463,8474,4,2,59,101,8469,8471,1,10959,59,1,10961,4,2,59,101,8480,8482,1,10960,59,1,10962,100,111,116,59,1,8943,4,7,100,101,108,112,114,118,119,8507,8522,8536,8550,8600,8697,8702,97,114,114,4,2,108,114,8516,8519,59,1,10552,59,1,10549,4,2,112,115,8528,8532,114,59,1,8926,99,59,1,8927,97,114,114,4,2,59,112,8545,8547,1,8630,59,1,10557,4,6,59,98,99,100,111,115,8564,8566,8573,8587,8592,8596,1,8746,114,99,97,112,59,1,10824,4,2,97,117,8579,8583,112,59,1,10822,112,59,1,10826,111,116,59,1,8845,114,59,1,10821,59,3,8746,65024,4,4,97,108,114,118,8610,8623,8663,8672,114,114,4,2,59,109,8618,8620,1,8631,59,1,10556,121,4,3,101,118,119,8632,8651,8656,113,4,2,112,115,8639,8645,114,101,99,59,1,8926,117,99,99,59,1,8927,101,101,59,1,8910,101,100,103,101,59,1,8911,101,110,5,164,1,59,8670,1,164,101,97,114,114,111,119,4,2,108,114,8684,8690,101,102,116,59,1,8630,105,103,104,116,59,1,8631,101,101,59,1,8910,101,100,59,1,8911,4,2,99,105,8713,8721,111,110,105,110,116,59,1,8754,110,116,59,1,8753,108,99,116,121,59,1,9005,4,19,65,72,97,98,99,100,101,102,104,105,106,108,111,114,115,116,117,119,122,8773,8778,8783,8821,8839,8854,8887,8914,8930,8944,9036,9041,9058,9197,9227,9258,9281,9297,9305,114,114,59,1,8659,97,114,59,1,10597,4,4,103,108,114,115,8793,8799,8805,8809,103,101,114,59,1,8224,101,116,104,59,1,8504,114,59,1,8595,104,4,2,59,118,8816,8818,1,8208,59,1,8867,4,2,107,108,8827,8834,97,114,111,119,59,1,10511,97,99,59,1,733,4,2,97,121,8845,8851,114,111,110,59,1,271,59,1,1076,4,3,59,97,111,8862,8864,8880,1,8518,4,2,103,114,8870,8876,103,101,114,59,1,8225,114,59,1,8650,116,115,101,113,59,1,10871,4,3,103,108,109,8895,8902,8907,5,176,1,59,8900,1,176,116,97,59,1,948,112,116,121,118,59,1,10673,4,2,105,114,8920,8926,115,104,116,59,1,10623,59,3,55349,56609,97,114,4,2,108,114,8938,8941,59,1,8643,59,1,8642,4,5,97,101,103,115,118,8956,8986,8989,8996,9001,109,4,3,59,111,115,8965,8967,8983,1,8900,110,100,4,2,59,115,8975,8977,1,8900,117,105,116,59,1,9830,59,1,9830,59,1,168,97,109,109,97,59,1,989,105,110,59,1,8946,4,3,59,105,111,9009,9011,9031,1,247,100,101,5,247,2,59,111,9020,9022,1,247,110,116,105,109,101,115,59,1,8903,110,120,59,1,8903,99,121,59,1,1106,99,4,2,111,114,9048,9053,114,110,59,1,8990,111,112,59,1,8973,4,5,108,112,116,117,119,9070,9076,9081,9130,9144,108,97,114,59,1,36,102,59,3,55349,56661,4,5,59,101,109,112,115,9093,9095,9109,9116,9122,1,729,113,4,2,59,100,9102,9104,1,8784,111,116,59,1,8785,105,110,117,115,59,1,8760,108,117,115,59,1,8724,113,117,97,114,101,59,1,8865,98,108,101,98,97,114,119,101,100,103,101,59,1,8966,110,4,3,97,100,104,9153,9160,9172,114,114,111,119,59,1,8595,111,119,110,97,114,114,111,119,115,59,1,8650,97,114,112,111,111,110,4,2,108,114,9184,9190,101,102,116,59,1,8643,105,103,104,116,59,1,8642,4,2,98,99,9203,9211,107,97,114,111,119,59,1,10512,4,2,111,114,9217,9222,114,110,59,1,8991,111,112,59,1,8972,4,3,99,111,116,9235,9248,9252,4,2,114,121,9241,9245,59,3,55349,56505,59,1,1109,108,59,1,10742,114,111,107,59,1,273,4,2,100,114,9264,9269,111,116,59,1,8945,105,4,2,59,102,9276,9278,1,9663,59,1,9662,4,2,97,104,9287,9292,114,114,59,1,8693,97,114,59,1,10607,97,110,103,108,101,59,1,10662,4,2,99,105,9311,9315,121,59,1,1119,103,114,97,114,114,59,1,10239,4,18,68,97,99,100,101,102,103,108,109,110,111,112,113,114,115,116,117,120,9361,9376,9398,9439,9444,9447,9462,9495,9531,9585,9598,9614,9659,9755,9771,9792,9808,9826,4,2,68,111,9367,9372,111,116,59,1,10871,116,59,1,8785,4,2,99,115,9382,9392,117,116,101,5,233,1,59,9390,1,233,116,101,114,59,1,10862,4,4,97,105,111,121,9408,9414,9430,9436,114,111,110,59,1,283,114,4,2,59,99,9421,9423,1,8790,5,234,1,59,9428,1,234,108,111,110,59,1,8789,59,1,1101,111,116,59,1,279,59,1,8519,4,2,68,114,9453,9458,111,116,59,1,8786,59,3,55349,56610,4,3,59,114,115,9470,9472,9482,1,10906,97,118,101,5,232,1,59,9480,1,232,4,2,59,100,9488,9490,1,10902,111,116,59,1,10904,4,4,59,105,108,115,9505,9507,9515,9518,1,10905,110,116,101,114,115,59,1,9191,59,1,8467,4,2,59,100,9524,9526,1,10901,111,116,59,1,10903,4,3,97,112,115,9539,9544,9564,99,114,59,1,275,116,121,4,3,59,115,118,9554,9556,9561,1,8709,101,116,59,1,8709,59,1,8709,112,4,2,49,59,9571,9583,4,2,51,52,9577,9580,59,1,8196,59,1,8197,1,8195,4,2,103,115,9591,9594,59,1,331,112,59,1,8194,4,2,103,112,9604,9609,111,110,59,1,281,102,59,3,55349,56662,4,3,97,108,115,9622,9635,9640,114,4,2,59,115,9629,9631,1,8917,108,59,1,10723,117,115,59,1,10865,105,4,3,59,108,118,9649,9651,9656,1,949,111,110,59,1,949,59,1,1013,4,4,99,115,117,118,9669,9686,9716,9747,4,2,105,111,9675,9680,114,99,59,1,8790,108,111,110,59,1,8789,4,2,105,108,9692,9696,109,59,1,8770,97,110,116,4,2,103,108,9705,9710,116,114,59,1,10902,101,115,115,59,1,10901,4,3,97,101,105,9724,9729,9734,108,115,59,1,61,115,116,59,1,8799,118,4,2,59,68,9741,9743,1,8801,68,59,1,10872,112,97,114,115,108,59,1,10725,4,2,68,97,9761,9766,111,116,59,1,8787,114,114,59,1,10609,4,3,99,100,105,9779,9783,9788,114,59,1,8495,111,116,59,1,8784,109,59,1,8770,4,2,97,104,9798,9801,59,1,951,5,240,1,59,9806,1,240,4,2,109,114,9814,9822,108,5,235,1,59,9820,1,235,111,59,1,8364,4,3,99,105,112,9834,9838,9843,108,59,1,33,115,116,59,1,8707,4,2,101,111,9849,9859,99,116,97,116,105,111,110,59,1,8496,110,101,110,116,105,97,108,101,59,1,8519,4,12,97,99,101,102,105,106,108,110,111,112,114,115,9896,9910,9914,9921,9954,9960,9967,9989,9994,10027,10036,10164,108,108,105,110,103,100,111,116,115,101,113,59,1,8786,121,59,1,1092,109,97,108,101,59,1,9792,4,3,105,108,114,9929,9935,9950,108,105,103,59,1,64259,4,2,105,108,9941,9945,103,59,1,64256,105,103,59,1,64260,59,3,55349,56611,108,105,103,59,1,64257,108,105,103,59,3,102,106,4,3,97,108,116,9975,9979,9984,116,59,1,9837,105,103,59,1,64258,110,115,59,1,9649,111,102,59,1,402,4,2,112,114,1e4,10005,102,59,3,55349,56663,4,2,97,107,10011,10016,108,108,59,1,8704,4,2,59,118,10022,10024,1,8916,59,1,10969,97,114,116,105,110,116,59,1,10765,4,2,97,111,10042,10159,4,2,99,115,10048,10155,4,6,49,50,51,52,53,55,10062,10102,10114,10135,10139,10151,4,6,50,51,52,53,54,56,10076,10083,10086,10093,10096,10099,5,189,1,59,10081,1,189,59,1,8531,5,188,1,59,10091,1,188,59,1,8533,59,1,8537,59,1,8539,4,2,51,53,10108,10111,59,1,8532,59,1,8534,4,3,52,53,56,10122,10129,10132,5,190,1,59,10127,1,190,59,1,8535,59,1,8540,53,59,1,8536,4,2,54,56,10145,10148,59,1,8538,59,1,8541,56,59,1,8542,108,59,1,8260,119,110,59,1,8994,99,114,59,3,55349,56507,4,17,69,97,98,99,100,101,102,103,105,106,108,110,111,114,115,116,118,10206,10217,10247,10254,10268,10273,10358,10363,10374,10380,10385,10406,10458,10464,10470,10497,10610,4,2,59,108,10212,10214,1,8807,59,1,10892,4,3,99,109,112,10225,10231,10244,117,116,101,59,1,501,109,97,4,2,59,100,10239,10241,1,947,59,1,989,59,1,10886,114,101,118,101,59,1,287,4,2,105,121,10260,10265,114,99,59,1,285,59,1,1075,111,116,59,1,289,4,4,59,108,113,115,10283,10285,10288,10308,1,8805,59,1,8923,4,3,59,113,115,10296,10298,10301,1,8805,59,1,8807,108,97,110,116,59,1,10878,4,4,59,99,100,108,10318,10320,10324,10345,1,10878,99,59,1,10921,111,116,4,2,59,111,10332,10334,1,10880,4,2,59,108,10340,10342,1,10882,59,1,10884,4,2,59,101,10351,10354,3,8923,65024,115,59,1,10900,114,59,3,55349,56612,4,2,59,103,10369,10371,1,8811,59,1,8921,109,101,108,59,1,8503,99,121,59,1,1107,4,4,59,69,97,106,10395,10397,10400,10403,1,8823,59,1,10898,59,1,10917,59,1,10916,4,4,69,97,101,115,10416,10419,10434,10453,59,1,8809,112,4,2,59,112,10426,10428,1,10890,114,111,120,59,1,10890,4,2,59,113,10440,10442,1,10888,4,2,59,113,10448,10450,1,10888,59,1,8809,105,109,59,1,8935,112,102,59,3,55349,56664,97,118,101,59,1,96,4,2,99,105,10476,10480,114,59,1,8458,109,4,3,59,101,108,10489,10491,10494,1,8819,59,1,10894,59,1,10896,5,62,6,59,99,100,108,113,114,10512,10514,10527,10532,10538,10545,1,62,4,2,99,105,10520,10523,59,1,10919,114,59,1,10874,111,116,59,1,8919,80,97,114,59,1,10645,117,101,115,116,59,1,10876,4,5,97,100,101,108,115,10557,10574,10579,10599,10605,4,2,112,114,10563,10570,112,114,111,120,59,1,10886,114,59,1,10616,111,116,59,1,8919,113,4,2,108,113,10586,10592,101,115,115,59,1,8923,108,101,115,115,59,1,10892,101,115,115,59,1,8823,105,109,59,1,8819,4,2,101,110,10616,10626,114,116,110,101,113,113,59,3,8809,65024,69,59,3,8809,65024,4,10,65,97,98,99,101,102,107,111,115,121,10653,10658,10713,10718,10724,10760,10765,10786,10850,10875,114,114,59,1,8660,4,4,105,108,109,114,10668,10674,10678,10684,114,115,112,59,1,8202,102,59,1,189,105,108,116,59,1,8459,4,2,100,114,10690,10695,99,121,59,1,1098,4,3,59,99,119,10703,10705,10710,1,8596,105,114,59,1,10568,59,1,8621,97,114,59,1,8463,105,114,99,59,1,293,4,3,97,108,114,10732,10748,10754,114,116,115,4,2,59,117,10741,10743,1,9829,105,116,59,1,9829,108,105,112,59,1,8230,99,111,110,59,1,8889,114,59,3,55349,56613,115,4,2,101,119,10772,10779,97,114,111,119,59,1,10533,97,114,111,119,59,1,10534,4,5,97,109,111,112,114,10798,10803,10809,10839,10844,114,114,59,1,8703,116,104,116,59,1,8763,107,4,2,108,114,10816,10827,101,102,116,97,114,114,111,119,59,1,8617,105,103,104,116,97,114,114,111,119,59,1,8618,102,59,3,55349,56665,98,97,114,59,1,8213,4,3,99,108,116,10858,10863,10869,114,59,3,55349,56509,97,115,104,59,1,8463,114,111,107,59,1,295,4,2,98,112,10881,10887,117,108,108,59,1,8259,104,101,110,59,1,8208,4,15,97,99,101,102,103,105,106,109,110,111,112,113,115,116,117,10925,10936,10958,10977,10990,11001,11039,11045,11101,11192,11220,11226,11237,11285,11299,99,117,116,101,5,237,1,59,10934,1,237,4,3,59,105,121,10944,10946,10955,1,8291,114,99,5,238,1,59,10953,1,238,59,1,1080,4,2,99,120,10964,10968,121,59,1,1077,99,108,5,161,1,59,10975,1,161,4,2,102,114,10983,10986,59,1,8660,59,3,55349,56614,114,97,118,101,5,236,1,59,10999,1,236,4,4,59,105,110,111,11011,11013,11028,11034,1,8520,4,2,105,110,11019,11024,110,116,59,1,10764,116,59,1,8749,102,105,110,59,1,10716,116,97,59,1,8489,108,105,103,59,1,307,4,3,97,111,112,11053,11092,11096,4,3,99,103,116,11061,11065,11088,114,59,1,299,4,3,101,108,112,11073,11076,11082,59,1,8465,105,110,101,59,1,8464,97,114,116,59,1,8465,104,59,1,305,102,59,1,8887,101,100,59,1,437,4,5,59,99,102,111,116,11113,11115,11121,11136,11142,1,8712,97,114,101,59,1,8453,105,110,4,2,59,116,11129,11131,1,8734,105,101,59,1,10717,100,111,116,59,1,305,4,5,59,99,101,108,112,11154,11156,11161,11179,11186,1,8747,97,108,59,1,8890,4,2,103,114,11167,11173,101,114,115,59,1,8484,99,97,108,59,1,8890,97,114,104,107,59,1,10775,114,111,100,59,1,10812,4,4,99,103,112,116,11202,11206,11211,11216,121,59,1,1105,111,110,59,1,303,102,59,3,55349,56666,97,59,1,953,114,111,100,59,1,10812,117,101,115,116,5,191,1,59,11235,1,191,4,2,99,105,11243,11248,114,59,3,55349,56510,110,4,5,59,69,100,115,118,11261,11263,11266,11271,11282,1,8712,59,1,8953,111,116,59,1,8949,4,2,59,118,11277,11279,1,8948,59,1,8947,59,1,8712,4,2,59,105,11291,11293,1,8290,108,100,101,59,1,297,4,2,107,109,11305,11310,99,121,59,1,1110,108,5,239,1,59,11316,1,239,4,6,99,102,109,111,115,117,11332,11346,11351,11357,11363,11380,4,2,105,121,11338,11343,114,99,59,1,309,59,1,1081,114,59,3,55349,56615,97,116,104,59,1,567,112,102,59,3,55349,56667,4,2,99,101,11369,11374,114,59,3,55349,56511,114,99,121,59,1,1112,107,99,121,59,1,1108,4,8,97,99,102,103,104,106,111,115,11404,11418,11433,11438,11445,11450,11455,11461,112,112,97,4,2,59,118,11413,11415,1,954,59,1,1008,4,2,101,121,11424,11430,100,105,108,59,1,311,59,1,1082,114,59,3,55349,56616,114,101,101,110,59,1,312,99,121,59,1,1093,99,121,59,1,1116,112,102,59,3,55349,56668,99,114,59,3,55349,56512,4,23,65,66,69,72,97,98,99,100,101,102,103,104,106,108,109,110,111,112,114,115,116,117,118,11515,11538,11544,11555,11560,11721,11780,11818,11868,12136,12160,12171,12203,12208,12246,12275,12327,12509,12523,12569,12641,12732,12752,4,3,97,114,116,11523,11528,11532,114,114,59,1,8666,114,59,1,8656,97,105,108,59,1,10523,97,114,114,59,1,10510,4,2,59,103,11550,11552,1,8806,59,1,10891,97,114,59,1,10594,4,9,99,101,103,109,110,112,113,114,116,11580,11586,11594,11600,11606,11624,11627,11636,11694,117,116,101,59,1,314,109,112,116,121,118,59,1,10676,114,97,110,59,1,8466,98,100,97,59,1,955,103,4,3,59,100,108,11615,11617,11620,1,10216,59,1,10641,101,59,1,10216,59,1,10885,117,111,5,171,1,59,11634,1,171,114,4,8,59,98,102,104,108,112,115,116,11655,11657,11669,11673,11677,11681,11685,11690,1,8592,4,2,59,102,11663,11665,1,8676,115,59,1,10527,115,59,1,10525,107,59,1,8617,112,59,1,8619,108,59,1,10553,105,109,59,1,10611,108,59,1,8610,4,3,59,97,101,11702,11704,11709,1,10923,105,108,59,1,10521,4,2,59,115,11715,11717,1,10925,59,3,10925,65024,4,3,97,98,114,11729,11734,11739,114,114,59,1,10508,114,107,59,1,10098,4,2,97,107,11745,11758,99,4,2,101,107,11752,11755,59,1,123,59,1,91,4,2,101,115,11764,11767,59,1,10635,108,4,2,100,117,11774,11777,59,1,10639,59,1,10637,4,4,97,101,117,121,11790,11796,11811,11815,114,111,110,59,1,318,4,2,100,105,11802,11807,105,108,59,1,316,108,59,1,8968,98,59,1,123,59,1,1083,4,4,99,113,114,115,11828,11832,11845,11864,97,59,1,10550,117,111,4,2,59,114,11840,11842,1,8220,59,1,8222,4,2,100,117,11851,11857,104,97,114,59,1,10599,115,104,97,114,59,1,10571,104,59,1,8626,4,5,59,102,103,113,115,11880,11882,12008,12011,12031,1,8804,116,4,5,97,104,108,114,116,11895,11913,11935,11947,11996,114,114,111,119,4,2,59,116,11905,11907,1,8592,97,105,108,59,1,8610,97,114,112,111,111,110,4,2,100,117,11925,11931,111,119,110,59,1,8637,112,59,1,8636,101,102,116,97,114,114,111,119,115,59,1,8647,105,103,104,116,4,3,97,104,115,11959,11974,11984,114,114,111,119,4,2,59,115,11969,11971,1,8596,59,1,8646,97,114,112,111,111,110,115,59,1,8651,113,117,105,103,97,114,114,111,119,59,1,8621,104,114,101,101,116,105,109,101,115,59,1,8907,59,1,8922,4,3,59,113,115,12019,12021,12024,1,8804,59,1,8806,108,97,110,116,59,1,10877,4,5,59,99,100,103,115,12043,12045,12049,12070,12083,1,10877,99,59,1,10920,111,116,4,2,59,111,12057,12059,1,10879,4,2,59,114,12065,12067,1,10881,59,1,10883,4,2,59,101,12076,12079,3,8922,65024,115,59,1,10899,4,5,97,100,101,103,115,12095,12103,12108,12126,12131,112,112,114,111,120,59,1,10885,111,116,59,1,8918,113,4,2,103,113,12115,12120,116,114,59,1,8922,103,116,114,59,1,10891,116,114,59,1,8822,105,109,59,1,8818,4,3,105,108,114,12144,12150,12156,115,104,116,59,1,10620,111,111,114,59,1,8970,59,3,55349,56617,4,2,59,69,12166,12168,1,8822,59,1,10897,4,2,97,98,12177,12198,114,4,2,100,117,12184,12187,59,1,8637,4,2,59,108,12193,12195,1,8636,59,1,10602,108,107,59,1,9604,99,121,59,1,1113,4,5,59,97,99,104,116,12220,12222,12227,12235,12241,1,8810,114,114,59,1,8647,111,114,110,101,114,59,1,8990,97,114,100,59,1,10603,114,105,59,1,9722,4,2,105,111,12252,12258,100,111,116,59,1,320,117,115,116,4,2,59,97,12267,12269,1,9136,99,104,101,59,1,9136,4,4,69,97,101,115,12285,12288,12303,12322,59,1,8808,112,4,2,59,112,12295,12297,1,10889,114,111,120,59,1,10889,4,2,59,113,12309,12311,1,10887,4,2,59,113,12317,12319,1,10887,59,1,8808,105,109,59,1,8934,4,8,97,98,110,111,112,116,119,122,12345,12359,12364,12421,12446,12467,12474,12490,4,2,110,114,12351,12355,103,59,1,10220,114,59,1,8701,114,107,59,1,10214,103,4,3,108,109,114,12373,12401,12409,101,102,116,4,2,97,114,12382,12389,114,114,111,119,59,1,10229,105,103,104,116,97,114,114,111,119,59,1,10231,97,112,115,116,111,59,1,10236,105,103,104,116,97,114,114,111,119,59,1,10230,112,97,114,114,111,119,4,2,108,114,12433,12439,101,102,116,59,1,8619,105,103,104,116,59,1,8620,4,3,97,102,108,12454,12458,12462,114,59,1,10629,59,3,55349,56669,117,115,59,1,10797,105,109,101,115,59,1,10804,4,2,97,98,12480,12485,115,116,59,1,8727,97,114,59,1,95,4,3,59,101,102,12498,12500,12506,1,9674,110,103,101,59,1,9674,59,1,10731,97,114,4,2,59,108,12517,12519,1,40,116,59,1,10643,4,5,97,99,104,109,116,12535,12540,12548,12561,12564,114,114,59,1,8646,111,114,110,101,114,59,1,8991,97,114,4,2,59,100,12556,12558,1,8651,59,1,10605,59,1,8206,114,105,59,1,8895,4,6,97,99,104,105,113,116,12583,12589,12594,12597,12614,12635,113,117,111,59,1,8249,114,59,3,55349,56513,59,1,8624,109,4,3,59,101,103,12606,12608,12611,1,8818,59,1,10893,59,1,10895,4,2,98,117,12620,12623,59,1,91,111,4,2,59,114,12630,12632,1,8216,59,1,8218,114,111,107,59,1,322,5,60,8,59,99,100,104,105,108,113,114,12660,12662,12675,12680,12686,12692,12698,12705,1,60,4,2,99,105,12668,12671,59,1,10918,114,59,1,10873,111,116,59,1,8918,114,101,101,59,1,8907,109,101,115,59,1,8905,97,114,114,59,1,10614,117,101,115,116,59,1,10875,4,2,80,105,12711,12716,97,114,59,1,10646,4,3,59,101,102,12724,12726,12729,1,9667,59,1,8884,59,1,9666,114,4,2,100,117,12739,12746,115,104,97,114,59,1,10570,104,97,114,59,1,10598,4,2,101,110,12758,12768,114,116,110,101,113,113,59,3,8808,65024,69,59,3,8808,65024,4,14,68,97,99,100,101,102,104,105,108,110,111,112,115,117,12803,12809,12893,12908,12914,12928,12933,12937,13011,13025,13032,13049,13052,13069,68,111,116,59,1,8762,4,4,99,108,112,114,12819,12827,12849,12887,114,5,175,1,59,12825,1,175,4,2,101,116,12833,12836,59,1,9794,4,2,59,101,12842,12844,1,10016,115,101,59,1,10016,4,2,59,115,12855,12857,1,8614,116,111,4,4,59,100,108,117,12869,12871,12877,12883,1,8614,111,119,110,59,1,8615,101,102,116,59,1,8612,112,59,1,8613,107,101,114,59,1,9646,4,2,111,121,12899,12905,109,109,97,59,1,10793,59,1,1084,97,115,104,59,1,8212,97,115,117,114,101,100,97,110,103,108,101,59,1,8737,114,59,3,55349,56618,111,59,1,8487,4,3,99,100,110,12945,12954,12985,114,111,5,181,1,59,12952,1,181,4,4,59,97,99,100,12964,12966,12971,12976,1,8739,115,116,59,1,42,105,114,59,1,10992,111,116,5,183,1,59,12983,1,183,117,115,4,3,59,98,100,12995,12997,13e3,1,8722,59,1,8863,4,2,59,117,13006,13008,1,8760,59,1,10794,4,2,99,100,13017,13021,112,59,1,10971,114,59,1,8230,112,108,117,115,59,1,8723,4,2,100,112,13038,13044,101,108,115,59,1,8871,102,59,3,55349,56670,59,1,8723,4,2,99,116,13058,13063,114,59,3,55349,56514,112,111,115,59,1,8766,4,3,59,108,109,13077,13079,13087,1,956,116,105,109,97,112,59,1,8888,97,112,59,1,8888,4,24,71,76,82,86,97,98,99,100,101,102,103,104,105,106,108,109,111,112,114,115,116,117,118,119,13142,13165,13217,13229,13247,13330,13359,13414,13420,13508,13513,13579,13602,13626,13631,13762,13767,13855,13936,13995,14214,14285,14312,14432,4,2,103,116,13148,13152,59,3,8921,824,4,2,59,118,13158,13161,3,8811,8402,59,3,8811,824,4,3,101,108,116,13173,13200,13204,102,116,4,2,97,114,13181,13188,114,114,111,119,59,1,8653,105,103,104,116,97,114,114,111,119,59,1,8654,59,3,8920,824,4,2,59,118,13210,13213,3,8810,8402,59,3,8810,824,105,103,104,116,97,114,114,111,119,59,1,8655,4,2,68,100,13235,13241,97,115,104,59,1,8879,97,115,104,59,1,8878,4,5,98,99,110,112,116,13259,13264,13270,13275,13308,108,97,59,1,8711,117,116,101,59,1,324,103,59,3,8736,8402,4,5,59,69,105,111,112,13287,13289,13293,13298,13302,1,8777,59,3,10864,824,100,59,3,8779,824,115,59,1,329,114,111,120,59,1,8777,117,114,4,2,59,97,13316,13318,1,9838,108,4,2,59,115,13325,13327,1,9838,59,1,8469,4,2,115,117,13336,13344,112,5,160,1,59,13342,1,160,109,112,4,2,59,101,13352,13355,3,8782,824,59,3,8783,824,4,5,97,101,111,117,121,13371,13385,13391,13407,13411,4,2,112,114,13377,13380,59,1,10819,111,110,59,1,328,100,105,108,59,1,326,110,103,4,2,59,100,13399,13401,1,8775,111,116,59,3,10861,824,112,59,1,10818,59,1,1085,97,115,104,59,1,8211,4,7,59,65,97,100,113,115,120,13436,13438,13443,13466,13472,13478,13494,1,8800,114,114,59,1,8663,114,4,2,104,114,13450,13454,107,59,1,10532,4,2,59,111,13460,13462,1,8599,119,59,1,8599,111,116,59,3,8784,824,117,105,118,59,1,8802,4,2,101,105,13484,13489,97,114,59,1,10536,109,59,3,8770,824,105,115,116,4,2,59,115,13503,13505,1,8708,59,1,8708,114,59,3,55349,56619,4,4,69,101,115,116,13523,13527,13563,13568,59,3,8807,824,4,3,59,113,115,13535,13537,13559,1,8817,4,3,59,113,115,13545,13547,13551,1,8817,59,3,8807,824,108,97,110,116,59,3,10878,824,59,3,10878,824,105,109,59,1,8821,4,2,59,114,13574,13576,1,8815,59,1,8815,4,3,65,97,112,13587,13592,13597,114,114,59,1,8654,114,114,59,1,8622,97,114,59,1,10994,4,3,59,115,118,13610,13612,13623,1,8715,4,2,59,100,13618,13620,1,8956,59,1,8954,59,1,8715,99,121,59,1,1114,4,7,65,69,97,100,101,115,116,13647,13652,13656,13661,13665,13737,13742,114,114,59,1,8653,59,3,8806,824,114,114,59,1,8602,114,59,1,8229,4,4,59,102,113,115,13675,13677,13703,13725,1,8816,116,4,2,97,114,13684,13691,114,114,111,119,59,1,8602,105,103,104,116,97,114,114,111,119,59,1,8622,4,3,59,113,115,13711,13713,13717,1,8816,59,3,8806,824,108,97,110,116,59,3,10877,824,4,2,59,115,13731,13734,3,10877,824,59,1,8814,105,109,59,1,8820,4,2,59,114,13748,13750,1,8814,105,4,2,59,101,13757,13759,1,8938,59,1,8940,105,100,59,1,8740,4,2,112,116,13773,13778,102,59,3,55349,56671,5,172,3,59,105,110,13787,13789,13829,1,172,110,4,4,59,69,100,118,13800,13802,13806,13812,1,8713,59,3,8953,824,111,116,59,3,8949,824,4,3,97,98,99,13820,13823,13826,59,1,8713,59,1,8951,59,1,8950,105,4,2,59,118,13836,13838,1,8716,4,3,97,98,99,13846,13849,13852,59,1,8716,59,1,8958,59,1,8957,4,3,97,111,114,13863,13892,13899,114,4,4,59,97,115,116,13874,13876,13883,13888,1,8742,108,108,101,108,59,1,8742,108,59,3,11005,8421,59,3,8706,824,108,105,110,116,59,1,10772,4,3,59,99,101,13907,13909,13914,1,8832,117,101,59,1,8928,4,2,59,99,13920,13923,3,10927,824,4,2,59,101,13929,13931,1,8832,113,59,3,10927,824,4,4,65,97,105,116,13946,13951,13971,13982,114,114,59,1,8655,114,114,4,3,59,99,119,13961,13963,13967,1,8603,59,3,10547,824,59,3,8605,824,103,104,116,97,114,114,111,119,59,1,8603,114,105,4,2,59,101,13990,13992,1,8939,59,1,8941,4,7,99,104,105,109,112,113,117,14011,14036,14060,14080,14085,14090,14106,4,4,59,99,101,114,14021,14023,14028,14032,1,8833,117,101,59,1,8929,59,3,10928,824,59,3,55349,56515,111,114,116,4,2,109,112,14045,14050,105,100,59,1,8740,97,114,97,108,108,101,108,59,1,8742,109,4,2,59,101,14067,14069,1,8769,4,2,59,113,14075,14077,1,8772,59,1,8772,105,100,59,1,8740,97,114,59,1,8742,115,117,4,2,98,112,14098,14102,101,59,1,8930,101,59,1,8931,4,3,98,99,112,14114,14157,14171,4,4,59,69,101,115,14124,14126,14130,14133,1,8836,59,3,10949,824,59,1,8840,101,116,4,2,59,101,14141,14144,3,8834,8402,113,4,2,59,113,14151,14153,1,8840,59,3,10949,824,99,4,2,59,101,14164,14166,1,8833,113,59,3,10928,824,4,4,59,69,101,115,14181,14183,14187,14190,1,8837,59,3,10950,824,59,1,8841,101,116,4,2,59,101,14198,14201,3,8835,8402,113,4,2,59,113,14208,14210,1,8841,59,3,10950,824,4,4,103,105,108,114,14224,14228,14238,14242,108,59,1,8825,108,100,101,5,241,1,59,14236,1,241,103,59,1,8824,105,97,110,103,108,101,4,2,108,114,14254,14269,101,102,116,4,2,59,101,14263,14265,1,8938,113,59,1,8940,105,103,104,116,4,2,59,101,14279,14281,1,8939,113,59,1,8941,4,2,59,109,14291,14293,1,957,4,3,59,101,115,14301,14303,14308,1,35,114,111,59,1,8470,112,59,1,8199,4,9,68,72,97,100,103,105,108,114,115,14332,14338,14344,14349,14355,14369,14376,14408,14426,97,115,104,59,1,8877,97,114,114,59,1,10500,112,59,3,8781,8402,97,115,104,59,1,8876,4,2,101,116,14361,14365,59,3,8805,8402,59,3,62,8402,110,102,105,110,59,1,10718,4,3,65,101,116,14384,14389,14393,114,114,59,1,10498,59,3,8804,8402,4,2,59,114,14399,14402,3,60,8402,105,101,59,3,8884,8402,4,2,65,116,14414,14419,114,114,59,1,10499,114,105,101,59,3,8885,8402,105,109,59,3,8764,8402,4,3,65,97,110,14440,14445,14468,114,114,59,1,8662,114,4,2,104,114,14452,14456,107,59,1,10531,4,2,59,111,14462,14464,1,8598,119,59,1,8598,101,97,114,59,1,10535,4,18,83,97,99,100,101,102,103,104,105,108,109,111,112,114,115,116,117,118,14512,14515,14535,14560,14597,14603,14618,14643,14657,14662,14701,14741,14747,14769,14851,14877,14907,14916,59,1,9416,4,2,99,115,14521,14531,117,116,101,5,243,1,59,14529,1,243,116,59,1,8859,4,2,105,121,14541,14557,114,4,2,59,99,14548,14550,1,8858,5,244,1,59,14555,1,244,59,1,1086,4,5,97,98,105,111,115,14572,14577,14583,14587,14591,115,104,59,1,8861,108,97,99,59,1,337,118,59,1,10808,116,59,1,8857,111,108,100,59,1,10684,108,105,103,59,1,339,4,2,99,114,14609,14614,105,114,59,1,10687,59,3,55349,56620,4,3,111,114,116,14626,14630,14640,110,59,1,731,97,118,101,5,242,1,59,14638,1,242,59,1,10689,4,2,98,109,14649,14654,97,114,59,1,10677,59,1,937,110,116,59,1,8750,4,4,97,99,105,116,14672,14677,14693,14698,114,114,59,1,8634,4,2,105,114,14683,14687,114,59,1,10686,111,115,115,59,1,10683,110,101,59,1,8254,59,1,10688,4,3,97,101,105,14709,14714,14719,99,114,59,1,333,103,97,59,1,969,4,3,99,100,110,14727,14733,14736,114,111,110,59,1,959,59,1,10678,117,115,59,1,8854,112,102,59,3,55349,56672,4,3,97,101,108,14755,14759,14764,114,59,1,10679,114,112,59,1,10681,117,115,59,1,8853,4,7,59,97,100,105,111,115,118,14785,14787,14792,14831,14837,14841,14848,1,8744,114,114,59,1,8635,4,4,59,101,102,109,14802,14804,14817,14824,1,10845,114,4,2,59,111,14811,14813,1,8500,102,59,1,8500,5,170,1,59,14822,1,170,5,186,1,59,14829,1,186,103,111,102,59,1,8886,114,59,1,10838,108,111,112,101,59,1,10839,59,1,10843,4,3,99,108,111,14859,14863,14873,114,59,1,8500,97,115,104,5,248,1,59,14871,1,248,108,59,1,8856,105,4,2,108,109,14884,14893,100,101,5,245,1,59,14891,1,245,101,115,4,2,59,97,14901,14903,1,8855,115,59,1,10806,109,108,5,246,1,59,14914,1,246,98,97,114,59,1,9021,4,12,97,99,101,102,104,105,108,109,111,114,115,117,14948,14992,14996,15033,15038,15068,15090,15189,15192,15222,15427,15441,114,4,4,59,97,115,116,14959,14961,14976,14989,1,8741,5,182,2,59,108,14968,14970,1,182,108,101,108,59,1,8741,4,2,105,108,14982,14986,109,59,1,10995,59,1,11005,59,1,8706,121,59,1,1087,114,4,5,99,105,109,112,116,15009,15014,15019,15024,15027,110,116,59,1,37,111,100,59,1,46,105,108,59,1,8240,59,1,8869,101,110,107,59,1,8241,114,59,3,55349,56621,4,3,105,109,111,15046,15057,15063,4,2,59,118,15052,15054,1,966,59,1,981,109,97,116,59,1,8499,110,101,59,1,9742,4,3,59,116,118,15076,15078,15087,1,960,99,104,102,111,114,107,59,1,8916,59,1,982,4,2,97,117,15096,15119,110,4,2,99,107,15103,15115,107,4,2,59,104,15110,15112,1,8463,59,1,8462,118,59,1,8463,115,4,9,59,97,98,99,100,101,109,115,116,15140,15142,15148,15151,15156,15168,15171,15179,15184,1,43,99,105,114,59,1,10787,59,1,8862,105,114,59,1,10786,4,2,111,117,15162,15165,59,1,8724,59,1,10789,59,1,10866,110,5,177,1,59,15177,1,177,105,109,59,1,10790,119,111,59,1,10791,59,1,177,4,3,105,112,117,15200,15208,15213,110,116,105,110,116,59,1,10773,102,59,3,55349,56673,110,100,5,163,1,59,15220,1,163,4,10,59,69,97,99,101,105,110,111,115,117,15244,15246,15249,15253,15258,15334,15347,15367,15416,15421,1,8826,59,1,10931,112,59,1,10935,117,101,59,1,8828,4,2,59,99,15264,15266,1,10927,4,6,59,97,99,101,110,115,15280,15282,15290,15299,15303,15329,1,8826,112,112,114,111,120,59,1,10935,117,114,108,121,101,113,59,1,8828,113,59,1,10927,4,3,97,101,115,15311,15319,15324,112,112,114,111,120,59,1,10937,113,113,59,1,10933,105,109,59,1,8936,105,109,59,1,8830,109,101,4,2,59,115,15342,15344,1,8242,59,1,8473,4,3,69,97,115,15355,15358,15362,59,1,10933,112,59,1,10937,105,109,59,1,8936,4,3,100,102,112,15375,15378,15404,59,1,8719,4,3,97,108,115,15386,15392,15398,108,97,114,59,1,9006,105,110,101,59,1,8978,117,114,102,59,1,8979,4,2,59,116,15410,15412,1,8733,111,59,1,8733,105,109,59,1,8830,114,101,108,59,1,8880,4,2,99,105,15433,15438,114,59,3,55349,56517,59,1,968,110,99,115,112,59,1,8200,4,6,102,105,111,112,115,117,15462,15467,15472,15478,15485,15491,114,59,3,55349,56622,110,116,59,1,10764,112,102,59,3,55349,56674,114,105,109,101,59,1,8279,99,114,59,3,55349,56518,4,3,97,101,111,15499,15520,15534,116,4,2,101,105,15506,15515,114,110,105,111,110,115,59,1,8461,110,116,59,1,10774,115,116,4,2,59,101,15528,15530,1,63,113,59,1,8799,116,5,34,1,59,15540,1,34,4,21,65,66,72,97,98,99,100,101,102,104,105,108,109,110,111,112,114,115,116,117,120,15586,15609,15615,15620,15796,15855,15893,15931,15977,16001,16039,16183,16204,16222,16228,16285,16312,16318,16363,16408,16416,4,3,97,114,116,15594,15599,15603,114,114,59,1,8667,114,59,1,8658,97,105,108,59,1,10524,97,114,114,59,1,10511,97,114,59,1,10596,4,7,99,100,101,110,113,114,116,15636,15651,15656,15664,15687,15696,15770,4,2,101,117,15642,15646,59,3,8765,817,116,101,59,1,341,105,99,59,1,8730,109,112,116,121,118,59,1,10675,103,4,4,59,100,101,108,15675,15677,15680,15683,1,10217,59,1,10642,59,1,10661,101,59,1,10217,117,111,5,187,1,59,15694,1,187,114,4,11,59,97,98,99,102,104,108,112,115,116,119,15721,15723,15727,15739,15742,15746,15750,15754,15758,15763,15767,1,8594,112,59,1,10613,4,2,59,102,15733,15735,1,8677,115,59,1,10528,59,1,10547,115,59,1,10526,107,59,1,8618,112,59,1,8620,108,59,1,10565,105,109,59,1,10612,108,59,1,8611,59,1,8605,4,2,97,105,15776,15781,105,108,59,1,10522,111,4,2,59,110,15788,15790,1,8758,97,108,115,59,1,8474,4,3,97,98,114,15804,15809,15814,114,114,59,1,10509,114,107,59,1,10099,4,2,97,107,15820,15833,99,4,2,101,107,15827,15830,59,1,125,59,1,93,4,2,101,115,15839,15842,59,1,10636,108,4,2,100,117,15849,15852,59,1,10638,59,1,10640,4,4,97,101,117,121,15865,15871,15886,15890,114,111,110,59,1,345,4,2,100,105,15877,15882,105,108,59,1,343,108,59,1,8969,98,59,1,125,59,1,1088,4,4,99,108,113,115,15903,15907,15914,15927,97,59,1,10551,100,104,97,114,59,1,10601,117,111,4,2,59,114,15922,15924,1,8221,59,1,8221,104,59,1,8627,4,3,97,99,103,15939,15966,15970,108,4,4,59,105,112,115,15950,15952,15957,15963,1,8476,110,101,59,1,8475,97,114,116,59,1,8476,59,1,8477,116,59,1,9645,5,174,1,59,15975,1,174,4,3,105,108,114,15985,15991,15997,115,104,116,59,1,10621,111,111,114,59,1,8971,59,3,55349,56623,4,2,97,111,16007,16028,114,4,2,100,117,16014,16017,59,1,8641,4,2,59,108,16023,16025,1,8640,59,1,10604,4,2,59,118,16034,16036,1,961,59,1,1009,4,3,103,110,115,16047,16167,16171,104,116,4,6,97,104,108,114,115,116,16063,16081,16103,16130,16143,16155,114,114,111,119,4,2,59,116,16073,16075,1,8594,97,105,108,59,1,8611,97,114,112,111,111,110,4,2,100,117,16093,16099,111,119,110,59,1,8641,112,59,1,8640,101,102,116,4,2,97,104,16112,16120,114,114,111,119,115,59,1,8644,97,114,112,111,111,110,115,59,1,8652,105,103,104,116,97,114,114,111,119,115,59,1,8649,113,117,105,103,97,114,114,111,119,59,1,8605,104,114,101,101,116,105,109,101,115,59,1,8908,103,59,1,730,105,110,103,100,111,116,115,101,113,59,1,8787,4,3,97,104,109,16191,16196,16201,114,114,59,1,8644,97,114,59,1,8652,59,1,8207,111,117,115,116,4,2,59,97,16214,16216,1,9137,99,104,101,59,1,9137,109,105,100,59,1,10990,4,4,97,98,112,116,16238,16252,16257,16278,4,2,110,114,16244,16248,103,59,1,10221,114,59,1,8702,114,107,59,1,10215,4,3,97,102,108,16265,16269,16273,114,59,1,10630,59,3,55349,56675,117,115,59,1,10798,105,109,101,115,59,1,10805,4,2,97,112,16291,16304,114,4,2,59,103,16298,16300,1,41,116,59,1,10644,111,108,105,110,116,59,1,10770,97,114,114,59,1,8649,4,4,97,99,104,113,16328,16334,16339,16342,113,117,111,59,1,8250,114,59,3,55349,56519,59,1,8625,4,2,98,117,16348,16351,59,1,93,111,4,2,59,114,16358,16360,1,8217,59,1,8217,4,3,104,105,114,16371,16377,16383,114,101,101,59,1,8908,109,101,115,59,1,8906,105,4,4,59,101,102,108,16394,16396,16399,16402,1,9657,59,1,8885,59,1,9656,116,114,105,59,1,10702,108,117,104,97,114,59,1,10600,59,1,8478,4,19,97,98,99,100,101,102,104,105,108,109,111,112,113,114,115,116,117,119,122,16459,16466,16472,16572,16590,16672,16687,16746,16844,16850,16924,16963,16988,17115,17121,17154,17206,17614,17656,99,117,116,101,59,1,347,113,117,111,59,1,8218,4,10,59,69,97,99,101,105,110,112,115,121,16494,16496,16499,16513,16518,16531,16536,16556,16564,16569,1,8827,59,1,10932,4,2,112,114,16505,16508,59,1,10936,111,110,59,1,353,117,101,59,1,8829,4,2,59,100,16524,16526,1,10928,105,108,59,1,351,114,99,59,1,349,4,3,69,97,115,16544,16547,16551,59,1,10934,112,59,1,10938,105,109,59,1,8937,111,108,105,110,116,59,1,10771,105,109,59,1,8831,59,1,1089,111,116,4,3,59,98,101,16582,16584,16587,1,8901,59,1,8865,59,1,10854,4,7,65,97,99,109,115,116,120,16606,16611,16634,16642,16646,16652,16668,114,114,59,1,8664,114,4,2,104,114,16618,16622,107,59,1,10533,4,2,59,111,16628,16630,1,8600,119,59,1,8600,116,5,167,1,59,16640,1,167,105,59,1,59,119,97,114,59,1,10537,109,4,2,105,110,16659,16665,110,117,115,59,1,8726,59,1,8726,116,59,1,10038,114,4,2,59,111,16679,16682,3,55349,56624,119,110,59,1,8994,4,4,97,99,111,121,16697,16702,16716,16739,114,112,59,1,9839,4,2,104,121,16708,16713,99,121,59,1,1097,59,1,1096,114,116,4,2,109,112,16724,16729,105,100,59,1,8739,97,114,97,108,108,101,108,59,1,8741,5,173,1,59,16744,1,173,4,2,103,109,16752,16770,109,97,4,3,59,102,118,16762,16764,16767,1,963,59,1,962,59,1,962,4,8,59,100,101,103,108,110,112,114,16788,16790,16795,16806,16817,16828,16832,16838,1,8764,111,116,59,1,10858,4,2,59,113,16801,16803,1,8771,59,1,8771,4,2,59,69,16812,16814,1,10910,59,1,10912,4,2,59,69,16823,16825,1,10909,59,1,10911,101,59,1,8774,108,117,115,59,1,10788,97,114,114,59,1,10610,97,114,114,59,1,8592,4,4,97,101,105,116,16860,16883,16891,16904,4,2,108,115,16866,16878,108,115,101,116,109,105,110,117,115,59,1,8726,104,112,59,1,10803,112,97,114,115,108,59,1,10724,4,2,100,108,16897,16900,59,1,8739,101,59,1,8995,4,2,59,101,16910,16912,1,10922,4,2,59,115,16918,16920,1,10924,59,3,10924,65024,4,3,102,108,112,16932,16938,16958,116,99,121,59,1,1100,4,2,59,98,16944,16946,1,47,4,2,59,97,16952,16954,1,10692,114,59,1,9023,102,59,3,55349,56676,97,4,2,100,114,16970,16985,101,115,4,2,59,117,16978,16980,1,9824,105,116,59,1,9824,59,1,8741,4,3,99,115,117,16996,17028,17089,4,2,97,117,17002,17015,112,4,2,59,115,17009,17011,1,8851,59,3,8851,65024,112,4,2,59,115,17022,17024,1,8852,59,3,8852,65024,117,4,2,98,112,17035,17062,4,3,59,101,115,17043,17045,17048,1,8847,59,1,8849,101,116,4,2,59,101,17056,17058,1,8847,113,59,1,8849,4,3,59,101,115,17070,17072,17075,1,8848,59,1,8850,101,116,4,2,59,101,17083,17085,1,8848,113,59,1,8850,4,3,59,97,102,17097,17099,17112,1,9633,114,4,2,101,102,17106,17109,59,1,9633,59,1,9642,59,1,9642,97,114,114,59,1,8594,4,4,99,101,109,116,17131,17136,17142,17148,114,59,3,55349,56520,116,109,110,59,1,8726,105,108,101,59,1,8995,97,114,102,59,1,8902,4,2,97,114,17160,17172,114,4,2,59,102,17167,17169,1,9734,59,1,9733,4,2,97,110,17178,17202,105,103,104,116,4,2,101,112,17188,17197,112,115,105,108,111,110,59,1,1013,104,105,59,1,981,115,59,1,175,4,5,98,99,109,110,112,17218,17351,17420,17423,17427,4,9,59,69,100,101,109,110,112,114,115,17238,17240,17243,17248,17261,17267,17279,17285,17291,1,8834,59,1,10949,111,116,59,1,10941,4,2,59,100,17254,17256,1,8838,111,116,59,1,10947,117,108,116,59,1,10945,4,2,69,101,17273,17276,59,1,10955,59,1,8842,108,117,115,59,1,10943,97,114,114,59,1,10617,4,3,101,105,117,17299,17335,17339,116,4,3,59,101,110,17308,17310,17322,1,8834,113,4,2,59,113,17317,17319,1,8838,59,1,10949,101,113,4,2,59,113,17330,17332,1,8842,59,1,10955,109,59,1,10951,4,2,98,112,17345,17348,59,1,10965,59,1,10963,99,4,6,59,97,99,101,110,115,17366,17368,17376,17385,17389,17415,1,8827,112,112,114,111,120,59,1,10936,117,114,108,121,101,113,59,1,8829,113,59,1,10928,4,3,97,101,115,17397,17405,17410,112,112,114,111,120,59,1,10938,113,113,59,1,10934,105,109,59,1,8937,105,109,59,1,8831,59,1,8721,103,59,1,9834,4,13,49,50,51,59,69,100,101,104,108,109,110,112,115,17455,17462,17469,17476,17478,17481,17496,17509,17524,17530,17536,17548,17554,5,185,1,59,17460,1,185,5,178,1,59,17467,1,178,5,179,1,59,17474,1,179,1,8835,59,1,10950,4,2,111,115,17487,17491,116,59,1,10942,117,98,59,1,10968,4,2,59,100,17502,17504,1,8839,111,116,59,1,10948,115,4,2,111,117,17516,17520,108,59,1,10185,98,59,1,10967,97,114,114,59,1,10619,117,108,116,59,1,10946,4,2,69,101,17542,17545,59,1,10956,59,1,8843,108,117,115,59,1,10944,4,3,101,105,117,17562,17598,17602,116,4,3,59,101,110,17571,17573,17585,1,8835,113,4,2,59,113,17580,17582,1,8839,59,1,10950,101,113,4,2,59,113,17593,17595,1,8843,59,1,10956,109,59,1,10952,4,2,98,112,17608,17611,59,1,10964,59,1,10966,4,3,65,97,110,17622,17627,17650,114,114,59,1,8665,114,4,2,104,114,17634,17638,107,59,1,10534,4,2,59,111,17644,17646,1,8601,119,59,1,8601,119,97,114,59,1,10538,108,105,103,5,223,1,59,17664,1,223,4,13,97,98,99,100,101,102,104,105,111,112,114,115,119,17694,17709,17714,17737,17742,17749,17754,17860,17905,17957,17964,18090,18122,4,2,114,117,17700,17706,103,101,116,59,1,8982,59,1,964,114,107,59,1,9140,4,3,97,101,121,17722,17728,17734,114,111,110,59,1,357,100,105,108,59,1,355,59,1,1090,111,116,59,1,8411,108,114,101,99,59,1,8981,114,59,3,55349,56625,4,4,101,105,107,111,17764,17805,17836,17851,4,2,114,116,17770,17786,101,4,2,52,102,17777,17780,59,1,8756,111,114,101,59,1,8756,97,4,3,59,115,118,17795,17797,17802,1,952,121,109,59,1,977,59,1,977,4,2,99,110,17811,17831,107,4,2,97,115,17818,17826,112,112,114,111,120,59,1,8776,105,109,59,1,8764,115,112,59,1,8201,4,2,97,115,17842,17846,112,59,1,8776,105,109,59,1,8764,114,110,5,254,1,59,17858,1,254,4,3,108,109,110,17868,17873,17901,100,101,59,1,732,101,115,5,215,3,59,98,100,17884,17886,17898,1,215,4,2,59,97,17892,17894,1,8864,114,59,1,10801,59,1,10800,116,59,1,8749,4,3,101,112,115,17913,17917,17953,97,59,1,10536,4,4,59,98,99,102,17927,17929,17934,17939,1,8868,111,116,59,1,9014,105,114,59,1,10993,4,2,59,111,17945,17948,3,55349,56677,114,107,59,1,10970,97,59,1,10537,114,105,109,101,59,1,8244,4,3,97,105,112,17972,17977,18082,100,101,59,1,8482,4,7,97,100,101,109,112,115,116,17993,18051,18056,18059,18066,18072,18076,110,103,108,101,4,5,59,100,108,113,114,18009,18011,18017,18032,18035,1,9653,111,119,110,59,1,9663,101,102,116,4,2,59,101,18026,18028,1,9667,113,59,1,8884,59,1,8796,105,103,104,116,4,2,59,101,18045,18047,1,9657,113,59,1,8885,111,116,59,1,9708,59,1,8796,105,110,117,115,59,1,10810,108,117,115,59,1,10809,98,59,1,10701,105,109,101,59,1,10811,101,122,105,117,109,59,1,9186,4,3,99,104,116,18098,18111,18116,4,2,114,121,18104,18108,59,3,55349,56521,59,1,1094,99,121,59,1,1115,114,111,107,59,1,359,4,2,105,111,18128,18133,120,116,59,1,8812,104,101,97,100,4,2,108,114,18143,18154,101,102,116,97,114,114,111,119,59,1,8606,105,103,104,116,97,114,114,111,119,59,1,8608,4,18,65,72,97,98,99,100,102,103,104,108,109,111,112,114,115,116,117,119,18204,18209,18214,18234,18250,18268,18292,18308,18319,18343,18379,18397,18413,18504,18547,18553,18584,18603,114,114,59,1,8657,97,114,59,1,10595,4,2,99,114,18220,18230,117,116,101,5,250,1,59,18228,1,250,114,59,1,8593,114,4,2,99,101,18241,18245,121,59,1,1118,118,101,59,1,365,4,2,105,121,18256,18265,114,99,5,251,1,59,18263,1,251,59,1,1091,4,3,97,98,104,18276,18281,18287,114,114,59,1,8645,108,97,99,59,1,369,97,114,59,1,10606,4,2,105,114,18298,18304,115,104,116,59,1,10622,59,3,55349,56626,114,97,118,101,5,249,1,59,18317,1,249,4,2,97,98,18325,18338,114,4,2,108,114,18332,18335,59,1,8639,59,1,8638,108,107,59,1,9600,4,2,99,116,18349,18374,4,2,111,114,18355,18369,114,110,4,2,59,101,18363,18365,1,8988,114,59,1,8988,111,112,59,1,8975,114,105,59,1,9720,4,2,97,108,18385,18390,99,114,59,1,363,5,168,1,59,18395,1,168,4,2,103,112,18403,18408,111,110,59,1,371,102,59,3,55349,56678,4,6,97,100,104,108,115,117,18427,18434,18445,18470,18475,18494,114,114,111,119,59,1,8593,111,119,110,97,114,114,111,119,59,1,8597,97,114,112,111,111,110,4,2,108,114,18457,18463,101,102,116,59,1,8639,105,103,104,116,59,1,8638,117,115,59,1,8846,105,4,3,59,104,108,18484,18486,18489,1,965,59,1,978,111,110,59,1,965,112,97,114,114,111,119,115,59,1,8648,4,3,99,105,116,18512,18537,18542,4,2,111,114,18518,18532,114,110,4,2,59,101,18526,18528,1,8989,114,59,1,8989,111,112,59,1,8974,110,103,59,1,367,114,105,59,1,9721,99,114,59,3,55349,56522,4,3,100,105,114,18561,18566,18572,111,116,59,1,8944,108,100,101,59,1,361,105,4,2,59,102,18579,18581,1,9653,59,1,9652,4,2,97,109,18590,18595,114,114,59,1,8648,108,5,252,1,59,18601,1,252,97,110,103,108,101,59,1,10663,4,15,65,66,68,97,99,100,101,102,108,110,111,112,114,115,122,18643,18648,18661,18667,18847,18851,18857,18904,18909,18915,18931,18937,18943,18949,18996,114,114,59,1,8661,97,114,4,2,59,118,18656,18658,1,10984,59,1,10985,97,115,104,59,1,8872,4,2,110,114,18673,18679,103,114,116,59,1,10652,4,7,101,107,110,112,114,115,116,18695,18704,18711,18720,18742,18754,18810,112,115,105,108,111,110,59,1,1013,97,112,112,97,59,1,1008,111,116,104,105,110,103,59,1,8709,4,3,104,105,114,18728,18732,18735,105,59,1,981,59,1,982,111,112,116,111,59,1,8733,4,2,59,104,18748,18750,1,8597,111,59,1,1009,4,2,105,117,18760,18766,103,109,97,59,1,962,4,2,98,112,18772,18791,115,101,116,110,101,113,4,2,59,113,18784,18787,3,8842,65024,59,3,10955,65024,115,101,116,110,101,113,4,2,59,113,18803,18806,3,8843,65024,59,3,10956,65024,4,2,104,114,18816,18822,101,116,97,59,1,977,105,97,110,103,108,101,4,2,108,114,18834,18840,101,102,116,59,1,8882,105,103,104,116,59,1,8883,121,59,1,1074,97,115,104,59,1,8866,4,3,101,108,114,18865,18884,18890,4,3,59,98,101,18873,18875,18880,1,8744,97,114,59,1,8891,113,59,1,8794,108,105,112,59,1,8942,4,2,98,116,18896,18901,97,114,59,1,124,59,1,124,114,59,3,55349,56627,116,114,105,59,1,8882,115,117,4,2,98,112,18923,18927,59,3,8834,8402,59,3,8835,8402,112,102,59,3,55349,56679,114,111,112,59,1,8733,116,114,105,59,1,8883,4,2,99,117,18955,18960,114,59,3,55349,56523,4,2,98,112,18966,18981,110,4,2,69,101,18973,18977,59,3,10955,65024,59,3,8842,65024,110,4,2,69,101,18988,18992,59,3,10956,65024,59,3,8843,65024,105,103,122,97,103,59,1,10650,4,7,99,101,102,111,112,114,115,19020,19026,19061,19066,19072,19075,19089,105,114,99,59,1,373,4,2,100,105,19032,19055,4,2,98,103,19038,19043,97,114,59,1,10847,101,4,2,59,113,19050,19052,1,8743,59,1,8793,101,114,112,59,1,8472,114,59,3,55349,56628,112,102,59,3,55349,56680,59,1,8472,4,2,59,101,19081,19083,1,8768,97,116,104,59,1,8768,99,114,59,3,55349,56524,4,14,99,100,102,104,105,108,109,110,111,114,115,117,118,119,19125,19146,19152,19157,19173,19176,19192,19197,19202,19236,19252,19269,19286,19291,4,3,97,105,117,19133,19137,19142,112,59,1,8898,114,99,59,1,9711,112,59,1,8899,116,114,105,59,1,9661,114,59,3,55349,56629,4,2,65,97,19163,19168,114,114,59,1,10234,114,114,59,1,10231,59,1,958,4,2,65,97,19182,19187,114,114,59,1,10232,114,114,59,1,10229,97,112,59,1,10236,105,115,59,1,8955,4,3,100,112,116,19210,19215,19230,111,116,59,1,10752,4,2,102,108,19221,19225,59,3,55349,56681,117,115,59,1,10753,105,109,101,59,1,10754,4,2,65,97,19242,19247,114,114,59,1,10233,114,114,59,1,10230,4,2,99,113,19258,19263,114,59,3,55349,56525,99,117,112,59,1,10758,4,2,112,116,19275,19281,108,117,115,59,1,10756,114,105,59,1,9651,101,101,59,1,8897,101,100,103,101,59,1,8896,4,8,97,99,101,102,105,111,115,117,19316,19335,19349,19357,19362,19367,19373,19379,99,4,2,117,121,19323,19332,116,101,5,253,1,59,19330,1,253,59,1,1103,4,2,105,121,19341,19346,114,99,59,1,375,59,1,1099,110,5,165,1,59,19355,1,165,114,59,3,55349,56630,99,121,59,1,1111,112,102,59,3,55349,56682,99,114,59,3,55349,56526,4,2,99,109,19385,19389,121,59,1,1102,108,5,255,1,59,19395,1,255,4,10,97,99,100,101,102,104,105,111,115,119,19419,19426,19441,19446,19462,19467,19472,19480,19486,19492,99,117,116,101,59,1,378,4,2,97,121,19432,19438,114,111,110,59,1,382,59,1,1079,111,116,59,1,380,4,2,101,116,19452,19458,116,114,102,59,1,8488,97,59,1,950,114,59,3,55349,56631,99,121,59,1,1078,103,114,97,114,114,59,1,8669,112,102,59,3,55349,56683,99,114,59,3,55349,56527,4,2,106,110,19498,19501,59,1,8205,106,59,1,8204]); var index$4=createCommonjsModule(function(e){function t(e){return e===u.SPACE||e===u.LINE_FEED||e===u.TABULATION||e===u.FORM_FEED}function n(e){return e>=u.DIGIT_0&&e<=u.DIGIT_9}function r(e){return e>=u.LATIN_CAPITAL_A&&e<=u.LATIN_CAPITAL_Z}function i(e){return e>=u.LATIN_SMALL_A&&e<=u.LATIN_SMALL_Z}function s(e){return i(e)||r(e)}function o(e){return s(e)||n(e)}function T(e,t){return n(e)||t&&(e>=u.LATIN_CAPITAL_A&&e<=u.LATIN_CAPITAL_F||e>=u.LATIN_SMALL_A&&e<=u.LATIN_SMALL_F)}function a(e){return e>=55296&&e<=57343||e>1114111}function E(e){return e+32}function _(e){return e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode(e>>>10&1023|55296)+String.fromCharCode(56320|1023&e))}function c(e){return String.fromCharCode(E(e))}function p(e,t){for(var n=m[++e],r=++e,i=r+n-1;r<=i;){var s=r+i>>>1,o=m[s];if(ot))return m[s+n];i=s-1;}}return-1}var A=preprocessor,h=tokenizer_mixin,l=unicode,m=named_entity_data,u=l.CODE_POINTS,N=l.CODE_POINT_SEQUENCES,C={0:65533,13:13,128:8364,129:129,130:8218,131:402,132:8222,133:8230,134:8224,135:8225,136:710,137:8240,138:352,139:8249,140:338,141:141,142:381,143:143,144:144,145:8216,146:8217,147:8220,148:8221,149:8226,150:8211,151:8212,152:732,153:8482,154:353,155:8250,156:339,157:157,158:382,159:376},d="DATA_STATE",S=e.exports=function(e){this.preprocessor=new A,this.tokenQueue=[],this.allowCDATA=!1,this.state=d,this.returnState="",this.tempBuff=[],this.additionalAllowedCp=void 0,this.lastStartTagName="",this.consumedAfterSnapshot=-1,this.active=!1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr=null,e&&e.locationInfo&&h.assign(this);};S.CHARACTER_TOKEN="CHARACTER_TOKEN",S.NULL_CHARACTER_TOKEN="NULL_CHARACTER_TOKEN",S.WHITESPACE_CHARACTER_TOKEN="WHITESPACE_CHARACTER_TOKEN",S.START_TAG_TOKEN="START_TAG_TOKEN",S.END_TAG_TOKEN="END_TAG_TOKEN",S.COMMENT_TOKEN="COMMENT_TOKEN",S.DOCTYPE_TOKEN="DOCTYPE_TOKEN",S.EOF_TOKEN="EOF_TOKEN",S.HIBERNATION_TOKEN="HIBERNATION_TOKEN",S.MODE=S.prototype.MODE={DATA:d,RCDATA:"RCDATA_STATE",RAWTEXT:"RAWTEXT_STATE",SCRIPT_DATA:"SCRIPT_DATA_STATE",PLAINTEXT:"PLAINTEXT_STATE"},S.getTokenAttr=function(e,t){for(var n=e.attrs.length-1;n>=0;n--)if(e.attrs[n].name===t)return e.attrs[n].value;return null},S.prototype.getNextToken=function(){for(;!this.tokenQueue.length&&this.active;){this._hibernationSnapshot();var e=this._consume();this._ensureHibernation()||this[this.state](e);}return this.tokenQueue.shift()},S.prototype.write=function(e,t){this.active=!0,this.preprocessor.write(e,t);},S.prototype.insertHtmlAtCurrentPos=function(e){this.active=!0,this.preprocessor.insertHtmlAtCurrentPos(e);},S.prototype._hibernationSnapshot=function(){this.consumedAfterSnapshot=0;},S.prototype._ensureHibernation=function(){if(this.preprocessor.endOfChunkHit){for(;this.consumedAfterSnapshot>0;this.consumedAfterSnapshot--)this.preprocessor.retreat();return this.active=!1,this.tokenQueue.push({type:S.HIBERNATION_TOKEN}),!0}return!1},S.prototype._consume=function(){return this.consumedAfterSnapshot++,this.preprocessor.advance()},S.prototype._unconsume=function(){this.consumedAfterSnapshot--,this.preprocessor.retreat();},S.prototype._unconsumeSeveral=function(e){for(;e--;)this._unconsume();},S.prototype._reconsumeInState=function(e){this.state=e,this._unconsume();},S.prototype._consumeSubsequentIfMatch=function(e,t,n){for(var r=0,i=!0,s=e.length,o=0,T=t,a=void 0;o0&&(T=this._consume(),r++),T===u.EOF){i=!1;break}if(a=e[o],T!==a&&(n||T!==E(a))){i=!1;break}}return i||this._unconsumeSeveral(r),i},S.prototype._lookahead=function(){var e=this._consume();return this._unconsume(),e},S.prototype.isTempBufferEqualToScriptString=function(){if(this.tempBuff.length!==N.SCRIPT_STRING.length)return!1;for(var e=0;e-1;){var a=m[T],E=a<7;if(E&&1&a&&(t=2&a?[m[++T],m[++T]]:[m[++T]],n=i,r===u.SEMICOLON)){s=!0;break}if(r=this._consume(),i++,r===u.EOF)break;T=E?4&a?p(T,r):-1:r===a?++T:-1;}if(t){if(!s&&(this._unconsumeSeveral(i-n),e)){var _=this._lookahead();if(_===u.EQUALS_SIGN||o(_))return this._unconsumeSeveral(n),null}return t}return this._unconsumeSeveral(i),null},S.prototype._consumeCharacterReference=function(e,n){if(t(e)||e===u.GREATER_THAN_SIGN||e===u.AMPERSAND||e===this.additionalAllowedCp||e===u.EOF)return this._unconsume(),null;if(e===u.NUMBER_SIGN){var r=!1,i=this._lookahead();return i!==u.LATIN_SMALL_X&&i!==u.LATIN_CAPITAL_X||(this._consume(),r=!0),(i=this._lookahead())!==u.EOF&&T(i,r)?[this._consumeNumericEntity(r)]:(this._unconsumeSeveral(r?2:1),null)}return this._unconsume(),this._consumeNamedEntity(n)};var f=S.prototype;f[d]=function(e){this.preprocessor.dropParsedChunk(),e===u.AMPERSAND?this.state="CHARACTER_REFERENCE_IN_DATA_STATE":e===u.LESS_THAN_SIGN?this.state="TAG_OPEN_STATE":e===u.NULL?this._emitCodePoint(e):e===u.EOF?this._emitEOFToken():this._emitCodePoint(e);},f.CHARACTER_REFERENCE_IN_DATA_STATE=function(e){this.additionalAllowedCp=void 0;var t=this._consumeCharacterReference(e,!1);this._ensureHibernation()||(t?this._emitSeveralCodePoints(t):this._emitChar("&"),this.state=d);},f.RCDATA_STATE=function(e){this.preprocessor.dropParsedChunk(),e===u.AMPERSAND?this.state="CHARACTER_REFERENCE_IN_RCDATA_STATE":e===u.LESS_THAN_SIGN?this.state="RCDATA_LESS_THAN_SIGN_STATE":e===u.NULL?this._emitChar(l.REPLACEMENT_CHARACTER):e===u.EOF?this._emitEOFToken():this._emitCodePoint(e);},f.CHARACTER_REFERENCE_IN_RCDATA_STATE=function(e){this.additionalAllowedCp=void 0;var t=this._consumeCharacterReference(e,!1);this._ensureHibernation()||(t?this._emitSeveralCodePoints(t):this._emitChar("&"),this.state="RCDATA_STATE");},f.RAWTEXT_STATE=function(e){this.preprocessor.dropParsedChunk(),e===u.LESS_THAN_SIGN?this.state="RAWTEXT_LESS_THAN_SIGN_STATE":e===u.NULL?this._emitChar(l.REPLACEMENT_CHARACTER):e===u.EOF?this._emitEOFToken():this._emitCodePoint(e);},f.SCRIPT_DATA_STATE=function(e){this.preprocessor.dropParsedChunk(),e===u.LESS_THAN_SIGN?this.state="SCRIPT_DATA_LESS_THAN_SIGN_STATE":e===u.NULL?this._emitChar(l.REPLACEMENT_CHARACTER):e===u.EOF?this._emitEOFToken():this._emitCodePoint(e);},f.PLAINTEXT_STATE=function(e){this.preprocessor.dropParsedChunk(),e===u.NULL?this._emitChar(l.REPLACEMENT_CHARACTER):e===u.EOF?this._emitEOFToken():this._emitCodePoint(e);},f.TAG_OPEN_STATE=function(e){e===u.EXCLAMATION_MARK?this.state="MARKUP_DECLARATION_OPEN_STATE":e===u.SOLIDUS?this.state="END_TAG_OPEN_STATE":s(e)?(this._createStartTagToken(),this._reconsumeInState("TAG_NAME_STATE")):e===u.QUESTION_MARK?this._reconsumeInState("BOGUS_COMMENT_STATE"):(this._emitChar("<"),this._reconsumeInState(d));},f.END_TAG_OPEN_STATE=function(e){s(e)?(this._createEndTagToken(),this._reconsumeInState("TAG_NAME_STATE")):e===u.GREATER_THAN_SIGN?this.state=d:e===u.EOF?(this._reconsumeInState(d),this._emitChar("<"),this._emitChar("/")):this._reconsumeInState("BOGUS_COMMENT_STATE");},f.TAG_NAME_STATE=function(e){t(e)?this.state="BEFORE_ATTRIBUTE_NAME_STATE":e===u.SOLIDUS?this.state="SELF_CLOSING_START_TAG_STATE":e===u.GREATER_THAN_SIGN?(this.state=d,this._emitCurrentToken()):r(e)?this.currentToken.tagName+=c(e):e===u.NULL?this.currentToken.tagName+=l.REPLACEMENT_CHARACTER:e===u.EOF?this._reconsumeInState(d):this.currentToken.tagName+=_(e);},f.RCDATA_LESS_THAN_SIGN_STATE=function(e){e===u.SOLIDUS?(this.tempBuff=[],this.state="RCDATA_END_TAG_OPEN_STATE"):(this._emitChar("<"),this._reconsumeInState("RCDATA_STATE"));},f.RCDATA_END_TAG_OPEN_STATE=function(e){s(e)?(this._createEndTagToken(),this._reconsumeInState("RCDATA_END_TAG_NAME_STATE")):(this._emitChar("<"),this._emitChar("/"),this._reconsumeInState("RCDATA_STATE"));},f.RCDATA_END_TAG_NAME_STATE=function(e){if(r(e))this.currentToken.tagName+=c(e),this.tempBuff.push(e);else if(i(e))this.currentToken.tagName+=_(e),this.tempBuff.push(e);else{if(this._isAppropriateEndTagToken()){if(t(e))return void(this.state="BEFORE_ATTRIBUTE_NAME_STATE");if(e===u.SOLIDUS)return void(this.state="SELF_CLOSING_START_TAG_STATE");if(e===u.GREATER_THAN_SIGN)return this.state=d,void this._emitCurrentToken()}this._emitChar("<"),this._emitChar("/"),this._emitSeveralCodePoints(this.tempBuff),this._reconsumeInState("RCDATA_STATE");}},f.RAWTEXT_LESS_THAN_SIGN_STATE=function(e){e===u.SOLIDUS?(this.tempBuff=[],this.state="RAWTEXT_END_TAG_OPEN_STATE"):(this._emitChar("<"),this._reconsumeInState("RAWTEXT_STATE"));},f.RAWTEXT_END_TAG_OPEN_STATE=function(e){s(e)?(this._createEndTagToken(),this._reconsumeInState("RAWTEXT_END_TAG_NAME_STATE")):(this._emitChar("<"),this._emitChar("/"),this._reconsumeInState("RAWTEXT_STATE"));},f.RAWTEXT_END_TAG_NAME_STATE=function(e){if(r(e))this.currentToken.tagName+=c(e),this.tempBuff.push(e);else if(i(e))this.currentToken.tagName+=_(e),this.tempBuff.push(e);else{if(this._isAppropriateEndTagToken()){if(t(e))return void(this.state="BEFORE_ATTRIBUTE_NAME_STATE");if(e===u.SOLIDUS)return void(this.state="SELF_CLOSING_START_TAG_STATE");if(e===u.GREATER_THAN_SIGN)return this._emitCurrentToken(),void(this.state=d)}this._emitChar("<"),this._emitChar("/"),this._emitSeveralCodePoints(this.tempBuff),this._reconsumeInState("RAWTEXT_STATE");}},f.SCRIPT_DATA_LESS_THAN_SIGN_STATE=function(e){e===u.SOLIDUS?(this.tempBuff=[],this.state="SCRIPT_DATA_END_TAG_OPEN_STATE"):e===u.EXCLAMATION_MARK?(this.state="SCRIPT_DATA_ESCAPE_START_STATE",this._emitChar("<"),this._emitChar("!")):(this._emitChar("<"),this._reconsumeInState("SCRIPT_DATA_STATE"));},f.SCRIPT_DATA_END_TAG_OPEN_STATE=function(e){s(e)?(this._createEndTagToken(),this._reconsumeInState("SCRIPT_DATA_END_TAG_NAME_STATE")):(this._emitChar("<"),this._emitChar("/"),this._reconsumeInState("SCRIPT_DATA_STATE"));},f.SCRIPT_DATA_END_TAG_NAME_STATE=function(e){if(r(e))this.currentToken.tagName+=c(e),this.tempBuff.push(e);else if(i(e))this.currentToken.tagName+=_(e),this.tempBuff.push(e);else{if(this._isAppropriateEndTagToken()){if(t(e))return void(this.state="BEFORE_ATTRIBUTE_NAME_STATE");if(e===u.SOLIDUS)return void(this.state="SELF_CLOSING_START_TAG_STATE");if(e===u.GREATER_THAN_SIGN)return this._emitCurrentToken(),void(this.state=d)}this._emitChar("<"),this._emitChar("/"),this._emitSeveralCodePoints(this.tempBuff),this._reconsumeInState("SCRIPT_DATA_STATE");}},f.SCRIPT_DATA_ESCAPE_START_STATE=function(e){e===u.HYPHEN_MINUS?(this.state="SCRIPT_DATA_ESCAPE_START_DASH_STATE",this._emitChar("-")):this._reconsumeInState("SCRIPT_DATA_STATE");},f.SCRIPT_DATA_ESCAPE_START_DASH_STATE=function(e){e===u.HYPHEN_MINUS?(this.state="SCRIPT_DATA_ESCAPED_DASH_DASH_STATE",this._emitChar("-")):this._reconsumeInState("SCRIPT_DATA_STATE");},f.SCRIPT_DATA_ESCAPED_STATE=function(e){e===u.HYPHEN_MINUS?(this.state="SCRIPT_DATA_ESCAPED_DASH_STATE",this._emitChar("-")):e===u.LESS_THAN_SIGN?this.state="SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN_STATE":e===u.NULL?this._emitChar(l.REPLACEMENT_CHARACTER):e===u.EOF?this._reconsumeInState(d):this._emitCodePoint(e);},f.SCRIPT_DATA_ESCAPED_DASH_STATE=function(e){e===u.HYPHEN_MINUS?(this.state="SCRIPT_DATA_ESCAPED_DASH_DASH_STATE",this._emitChar("-")):e===u.LESS_THAN_SIGN?this.state="SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN_STATE":e===u.NULL?(this.state="SCRIPT_DATA_ESCAPED_STATE",this._emitChar(l.REPLACEMENT_CHARACTER)):e===u.EOF?this._reconsumeInState(d):(this.state="SCRIPT_DATA_ESCAPED_STATE",this._emitCodePoint(e));},f.SCRIPT_DATA_ESCAPED_DASH_DASH_STATE=function(e){e===u.HYPHEN_MINUS?this._emitChar("-"):e===u.LESS_THAN_SIGN?this.state="SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN_STATE":e===u.GREATER_THAN_SIGN?(this.state="SCRIPT_DATA_STATE",this._emitChar(">")):e===u.NULL?(this.state="SCRIPT_DATA_ESCAPED_STATE",this._emitChar(l.REPLACEMENT_CHARACTER)):e===u.EOF?this._reconsumeInState(d):(this.state="SCRIPT_DATA_ESCAPED_STATE",this._emitCodePoint(e));},f.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN_STATE=function(e){e===u.SOLIDUS?(this.tempBuff=[],this.state="SCRIPT_DATA_ESCAPED_END_TAG_OPEN_STATE"):s(e)?(this.tempBuff=[],this._emitChar("<"),this._reconsumeInState("SCRIPT_DATA_DOUBLE_ESCAPE_START_STATE")):(this._emitChar("<"),this._reconsumeInState("SCRIPT_DATA_ESCAPED_STATE"));},f.SCRIPT_DATA_ESCAPED_END_TAG_OPEN_STATE=function(e){s(e)?(this._createEndTagToken(),this._reconsumeInState("SCRIPT_DATA_ESCAPED_END_TAG_NAME_STATE")):(this._emitChar("<"),this._emitChar("/"),this._reconsumeInState("SCRIPT_DATA_ESCAPED_STATE"));},f.SCRIPT_DATA_ESCAPED_END_TAG_NAME_STATE=function(e){if(r(e))this.currentToken.tagName+=c(e),this.tempBuff.push(e);else if(i(e))this.currentToken.tagName+=_(e),this.tempBuff.push(e);else{if(this._isAppropriateEndTagToken()){if(t(e))return void(this.state="BEFORE_ATTRIBUTE_NAME_STATE");if(e===u.SOLIDUS)return void(this.state="SELF_CLOSING_START_TAG_STATE");if(e===u.GREATER_THAN_SIGN)return this._emitCurrentToken(),void(this.state=d)}this._emitChar("<"),this._emitChar("/"),this._emitSeveralCodePoints(this.tempBuff),this._reconsumeInState("SCRIPT_DATA_ESCAPED_STATE");}},f.SCRIPT_DATA_DOUBLE_ESCAPE_START_STATE=function(e){t(e)||e===u.SOLIDUS||e===u.GREATER_THAN_SIGN?(this.state=this.isTempBufferEqualToScriptString()?"SCRIPT_DATA_DOUBLE_ESCAPED_STATE":"SCRIPT_DATA_ESCAPED_STATE",this._emitCodePoint(e)):r(e)?(this.tempBuff.push(E(e)),this._emitCodePoint(e)):i(e)?(this.tempBuff.push(e),this._emitCodePoint(e)):this._reconsumeInState("SCRIPT_DATA_ESCAPED_STATE");},f.SCRIPT_DATA_DOUBLE_ESCAPED_STATE=function(e){e===u.HYPHEN_MINUS?(this.state="SCRIPT_DATA_DOUBLE_ESCAPED_DASH_STATE",this._emitChar("-")):e===u.LESS_THAN_SIGN?(this.state="SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN_STATE",this._emitChar("<")):e===u.NULL?this._emitChar(l.REPLACEMENT_CHARACTER):e===u.EOF?this._reconsumeInState(d):this._emitCodePoint(e);},f.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_STATE=function(e){e===u.HYPHEN_MINUS?(this.state="SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH_STATE",this._emitChar("-")):e===u.LESS_THAN_SIGN?(this.state="SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN_STATE",this._emitChar("<")):e===u.NULL?(this.state="SCRIPT_DATA_DOUBLE_ESCAPED_STATE",this._emitChar(l.REPLACEMENT_CHARACTER)):e===u.EOF?this._reconsumeInState(d):(this.state="SCRIPT_DATA_DOUBLE_ESCAPED_STATE",this._emitCodePoint(e));},f.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH_STATE=function(e){e===u.HYPHEN_MINUS?this._emitChar("-"):e===u.LESS_THAN_SIGN?(this.state="SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN_STATE",this._emitChar("<")):e===u.GREATER_THAN_SIGN?(this.state="SCRIPT_DATA_STATE",this._emitChar(">")):e===u.NULL?(this.state="SCRIPT_DATA_DOUBLE_ESCAPED_STATE",this._emitChar(l.REPLACEMENT_CHARACTER)):e===u.EOF?this._reconsumeInState(d):(this.state="SCRIPT_DATA_DOUBLE_ESCAPED_STATE",this._emitCodePoint(e));},f.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN_STATE=function(e){e===u.SOLIDUS?(this.tempBuff=[],this.state="SCRIPT_DATA_DOUBLE_ESCAPE_END_STATE",this._emitChar("/")):this._reconsumeInState("SCRIPT_DATA_DOUBLE_ESCAPED_STATE");},f.SCRIPT_DATA_DOUBLE_ESCAPE_END_STATE=function(e){t(e)||e===u.SOLIDUS||e===u.GREATER_THAN_SIGN?(this.state=this.isTempBufferEqualToScriptString()?"SCRIPT_DATA_ESCAPED_STATE":"SCRIPT_DATA_DOUBLE_ESCAPED_STATE",this._emitCodePoint(e)):r(e)?(this.tempBuff.push(E(e)),this._emitCodePoint(e)):i(e)?(this.tempBuff.push(e),this._emitCodePoint(e)):this._reconsumeInState("SCRIPT_DATA_DOUBLE_ESCAPED_STATE");},f.BEFORE_ATTRIBUTE_NAME_STATE=function(e){t(e)||(e===u.SOLIDUS||e===u.GREATER_THAN_SIGN||e===u.EOF?this._reconsumeInState("AFTER_ATTRIBUTE_NAME_STATE"):e===u.EQUALS_SIGN?(this._createAttr("="),this.state="ATTRIBUTE_NAME_STATE"):(this._createAttr(""),this._reconsumeInState("ATTRIBUTE_NAME_STATE")));},f.ATTRIBUTE_NAME_STATE=function(e){t(e)||e===u.SOLIDUS||e===u.GREATER_THAN_SIGN||e===u.EOF?(this._leaveAttrName("AFTER_ATTRIBUTE_NAME_STATE"),this._unconsume()):e===u.EQUALS_SIGN?this._leaveAttrName("BEFORE_ATTRIBUTE_VALUE_STATE"):r(e)?this.currentAttr.name+=c(e):e===u.QUOTATION_MARK||e===u.APOSTROPHE||e===u.LESS_THAN_SIGN?this.currentAttr.name+=_(e):e===u.NULL?this.currentAttr.name+=l.REPLACEMENT_CHARACTER:this.currentAttr.name+=_(e);},f.AFTER_ATTRIBUTE_NAME_STATE=function(e){t(e)||(e===u.SOLIDUS?this.state="SELF_CLOSING_START_TAG_STATE":e===u.EQUALS_SIGN?this.state="BEFORE_ATTRIBUTE_VALUE_STATE":e===u.GREATER_THAN_SIGN?(this.state=d,this._emitCurrentToken()):e===u.EOF?this._reconsumeInState(d):(this._createAttr(""),this._reconsumeInState("ATTRIBUTE_NAME_STATE")));},f.BEFORE_ATTRIBUTE_VALUE_STATE=function(e){t(e)||(e===u.QUOTATION_MARK?this.state="ATTRIBUTE_VALUE_DOUBLE_QUOTED_STATE":e===u.APOSTROPHE?this.state="ATTRIBUTE_VALUE_SINGLE_QUOTED_STATE":this._reconsumeInState("ATTRIBUTE_VALUE_UNQUOTED_STATE"));},f.ATTRIBUTE_VALUE_DOUBLE_QUOTED_STATE=function(e){e===u.QUOTATION_MARK?this.state="AFTER_ATTRIBUTE_VALUE_QUOTED_STATE":e===u.AMPERSAND?(this.additionalAllowedCp=u.QUOTATION_MARK,this.returnState=this.state,this.state="CHARACTER_REFERENCE_IN_ATTRIBUTE_VALUE_STATE"):e===u.NULL?this.currentAttr.value+=l.REPLACEMENT_CHARACTER:e===u.EOF?this._reconsumeInState(d):this.currentAttr.value+=_(e);},f.ATTRIBUTE_VALUE_SINGLE_QUOTED_STATE=function(e){e===u.APOSTROPHE?this.state="AFTER_ATTRIBUTE_VALUE_QUOTED_STATE":e===u.AMPERSAND?(this.additionalAllowedCp=u.APOSTROPHE,this.returnState=this.state,this.state="CHARACTER_REFERENCE_IN_ATTRIBUTE_VALUE_STATE"):e===u.NULL?this.currentAttr.value+=l.REPLACEMENT_CHARACTER:e===u.EOF?this._reconsumeInState(d):this.currentAttr.value+=_(e);},f.ATTRIBUTE_VALUE_UNQUOTED_STATE=function(e){t(e)?this._leaveAttrValue("BEFORE_ATTRIBUTE_NAME_STATE"):e===u.AMPERSAND?(this.additionalAllowedCp=u.GREATER_THAN_SIGN,this.returnState=this.state,this.state="CHARACTER_REFERENCE_IN_ATTRIBUTE_VALUE_STATE"):e===u.GREATER_THAN_SIGN?(this._leaveAttrValue(d),this._emitCurrentToken()):e===u.NULL?this.currentAttr.value+=l.REPLACEMENT_CHARACTER:e===u.QUOTATION_MARK||e===u.APOSTROPHE||e===u.LESS_THAN_SIGN||e===u.EQUALS_SIGN||e===u.GRAVE_ACCENT?this.currentAttr.value+=_(e):e===u.EOF?this._reconsumeInState(d):this.currentAttr.value+=_(e);},f.CHARACTER_REFERENCE_IN_ATTRIBUTE_VALUE_STATE=function(e){var t=this._consumeCharacterReference(e,!0);if(!this._ensureHibernation()){if(t)for(var n=0;n=0;n--)if(this.items[n]===e){t=n;break}return t},o.prototype._isInTemplate=function(){return this.currentTagName===i.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===s.HTML},o.prototype._updateCurrentElement=function(){this.current=this.items[this.stackTop],this.currentTagName=this.current&&this.treeAdapter.getTagName(this.current),this.currentTmplContent=this._isInTemplate()?this.treeAdapter.getTemplateContent(this.current):null;},o.prototype.push=function(e){this.items[++this.stackTop]=e,this._updateCurrentElement(),this._isInTemplate()&&this.tmplCount++;},o.prototype.pop=function(){this.stackTop--,this.tmplCount>0&&this._isInTemplate()&&this.tmplCount--,this._updateCurrentElement();},o.prototype.replace=function(e,t){var n=this._indexOf(e);this.items[n]=t,n===this.stackTop&&this._updateCurrentElement();},o.prototype.insertAfter=function(e,t){var n=this._indexOf(e)+1;this.items.splice(n,0,t),n===++this.stackTop&&this._updateCurrentElement();},o.prototype.popUntilTagNamePopped=function(e){for(;this.stackTop>-1;){var t=this.currentTagName,n=this.treeAdapter.getNamespaceURI(this.current);if(this.pop(),t===e&&n===s.HTML)break}},o.prototype.popUntilElementPopped=function(e){for(;this.stackTop>-1;){var t=this.current;if(this.pop(),t===e)break}},o.prototype.popUntilNumberedHeaderPopped=function(){for(;this.stackTop>-1;){var e=this.currentTagName,t=this.treeAdapter.getNamespaceURI(this.current);if(this.pop(),e===i.H1||e===i.H2||e===i.H3||e===i.H4||e===i.H5||e===i.H6&&t===s.HTML)break}},o.prototype.popUntilTableCellPopped=function(){for(;this.stackTop>-1;){var e=this.currentTagName,t=this.treeAdapter.getNamespaceURI(this.current);if(this.pop(),e===i.TD||e===i.TH&&t===s.HTML)break}},o.prototype.popAllUpToHtmlElement=function(){this.stackTop=0,this._updateCurrentElement();},o.prototype.clearBackToTableContext=function(){for(;this.currentTagName!==i.TABLE&&this.currentTagName!==i.TEMPLATE&&this.currentTagName!==i.HTML||this.treeAdapter.getNamespaceURI(this.current)!==s.HTML;)this.pop();},o.prototype.clearBackToTableBodyContext=function(){for(;this.currentTagName!==i.TBODY&&this.currentTagName!==i.TFOOT&&this.currentTagName!==i.THEAD&&this.currentTagName!==i.TEMPLATE&&this.currentTagName!==i.HTML||this.treeAdapter.getNamespaceURI(this.current)!==s.HTML;)this.pop();},o.prototype.clearBackToTableRowContext=function(){for(;this.currentTagName!==i.TR&&this.currentTagName!==i.TEMPLATE&&this.currentTagName!==i.HTML||this.treeAdapter.getNamespaceURI(this.current)!==s.HTML;)this.pop();},o.prototype.remove=function(e){for(var t=this.stackTop;t>=0;t--)if(this.items[t]===e){this.items.splice(t,1),this.stackTop--,this._updateCurrentElement();break}},o.prototype.tryPeekProperlyNestedBodyElement=function(){var e=this.items[1];return e&&this.treeAdapter.getTagName(e)===i.BODY?e:null},o.prototype.contains=function(e){return this._indexOf(e)>-1},o.prototype.getCommonAncestor=function(e){var t=this._indexOf(e);return--t>=0?this.items[t]:null},o.prototype.isRootHtmlElementCurrent=function(){return 0===this.stackTop&&this.currentTagName===i.HTML},o.prototype.hasInScope=function(e){for(var t=this.stackTop;t>=0;t--){var r=this.treeAdapter.getTagName(this.items[t]),i=this.treeAdapter.getNamespaceURI(this.items[t]);if(r===e&&i===s.HTML)return!0;if(n(r,i))return!1}return!0},o.prototype.hasNumberedHeaderInScope=function(){for(var e=this.stackTop;e>=0;e--){var t=this.treeAdapter.getTagName(this.items[e]),r=this.treeAdapter.getNamespaceURI(this.items[e]);if((t===i.H1||t===i.H2||t===i.H3||t===i.H4||t===i.H5||t===i.H6)&&r===s.HTML)return!0;if(n(t,r))return!1}return!0},o.prototype.hasInListItemScope=function(e){for(var t=this.stackTop;t>=0;t--){var r=this.treeAdapter.getTagName(this.items[t]),o=this.treeAdapter.getNamespaceURI(this.items[t]);if(r===e&&o===s.HTML)return!0;if((r===i.UL||r===i.OL)&&o===s.HTML||n(r,o))return!1}return!0},o.prototype.hasInButtonScope=function(e){for(var t=this.stackTop;t>=0;t--){var r=this.treeAdapter.getTagName(this.items[t]),o=this.treeAdapter.getNamespaceURI(this.items[t]);if(r===e&&o===s.HTML)return!0;if(r===i.BUTTON&&o===s.HTML||n(r,o))return!1}return!0},o.prototype.hasInTableScope=function(e){for(var t=this.stackTop;t>=0;t--){var n=this.treeAdapter.getTagName(this.items[t]);if(this.treeAdapter.getNamespaceURI(this.items[t])===s.HTML){if(n===e)return!0;if(n===i.TABLE||n===i.TEMPLATE||n===i.HTML)return!1}}return!0},o.prototype.hasTableBodyContextInTableScope=function(){for(var e=this.stackTop;e>=0;e--){var t=this.treeAdapter.getTagName(this.items[e]);if(this.treeAdapter.getNamespaceURI(this.items[e])===s.HTML){if(t===i.TBODY||t===i.THEAD||t===i.TFOOT)return!0;if(t===i.TABLE||t===i.HTML)return!1}}return!0},o.prototype.hasInSelectScope=function(e){for(var t=this.stackTop;t>=0;t--){var n=this.treeAdapter.getTagName(this.items[t]);if(this.treeAdapter.getNamespaceURI(this.items[t])===s.HTML){if(n===e)return!0;if(n!==i.OPTION&&n!==i.OPTGROUP)return!1}}return!0},o.prototype.generateImpliedEndTags=function(){for(;t(this.currentTagName);)this.pop();},o.prototype.generateImpliedEndTagsWithExclusion=function(e){for(;t(this.currentTagName)&&this.currentTagName!==e;)this.pop();};}); var formatting_element_list=createCommonjsModule(function(e){var t=e.exports=function(e){this.length=0,this.entries=[],this.treeAdapter=e,this.bookmark=null;};t.MARKER_ENTRY="MARKER_ENTRY",t.ELEMENT_ENTRY="ELEMENT_ENTRY",t.prototype._getNoahArkConditionCandidates=function(e){var n=[];if(this.length>=3)for(var r=this.treeAdapter.getAttrList(e).length,i=this.treeAdapter.getTagName(e),s=this.treeAdapter.getNamespaceURI(e),o=this.length-1;o>=0;o--){var T=this.entries[o];if(T.type===t.MARKER_ENTRY)break;var a=T.element,E=this.treeAdapter.getAttrList(a);this.treeAdapter.getTagName(a)===i&&this.treeAdapter.getNamespaceURI(a)===s&&E.length===r&&n.push({idx:o,attrs:E});}return n.length<3?[]:n},t.prototype._ensureNoahArkCondition=function(e){var t=this._getNoahArkConditionCandidates(e),n=t.length;if(n){for(var r=this.treeAdapter.getAttrList(e),i=r.length,s=Object.create(null),o=0;o=2;o--)this.entries.splice(t[o].idx,1),this.length--;}},t.prototype.insertMarker=function(){this.entries.push({type:t.MARKER_ENTRY}),this.length++;},t.prototype.pushElement=function(e,n){this._ensureNoahArkCondition(e),this.entries.push({type:t.ELEMENT_ENTRY,element:e,token:n}),this.length++;},t.prototype.insertElementAfterBookmark=function(e,n){for(var r=this.length-1;r>=0&&this.entries[r]!==this.bookmark;r--);this.entries.splice(r+1,0,{type:t.ELEMENT_ENTRY,element:e,token:n}),this.length++;},t.prototype.removeEntry=function(e){for(var t=this.length-1;t>=0;t--)if(this.entries[t]===e){this.entries.splice(t,1),this.length--;break}},t.prototype.clearToLastMarker=function(){for(;this.length;){var e=this.entries.pop();if(this.length--,e.type===t.MARKER_ENTRY)break}},t.prototype.getElementEntryInScopeWithTagName=function(e){for(var n=this.length-1;n>=0;n--){var r=this.entries[n];if(r.type===t.MARKER_ENTRY)return null;if(this.treeAdapter.getTagName(r.element)===e)return r}return null},t.prototype.getElementEntry=function(e){for(var n=this.length-1;n>=0;n--){var r=this.entries[n];if(r.type===t.ELEMENT_ENTRY&&r.element===e)return r}return null};}); var OpenElementStack=open_element_stack; var Tokenizer=index$4; var HTML=html; var $$1=HTML.TAG_NAMES; var assign$1=function(e){function t(t,n){var i=t.__location;if(i)if(i.startTag||(i.startTag={line:i.line,col:i.col,startOffset:i.startOffset,endOffset:i.endOffset},i.attrs&&(i.startTag.attrs=i.attrs)),n.location){var s=n.location,o=r.getTagName(t),T=n.type===Tokenizer.END_TAG_TOKEN&&o===n.tagName;T&&(i.endTag={line:s.line,col:s.col,startOffset:s.startOffset,endOffset:s.endOffset}),i.endOffset=T?s.endOffset:s.startOffset;}else n.type===Tokenizer.EOF_TOKEN&&(i.endOffset=e.tokenizer.preprocessor.sourcePos);}var n=Object.getPrototypeOf(e),r=e.treeAdapter,i=null,s=null,o=null;e._bootstrap=function(r,T){n._bootstrap.call(this,r,T),i=null,s=null,o=null,e.openElements.pop=function(){t(this.current,o),OpenElementStack.prototype.pop.call(this);},e.openElements.popAllUpToHtmlElement=function(){for(var e=this.stackTop;e>0;e--)t(this.items[e],o);OpenElementStack.prototype.popAllUpToHtmlElement.call(this);},e.openElements.remove=function(e){t(e,o),OpenElementStack.prototype.remove.call(this,e);};},e._runParsingLoop=function(r){n._runParsingLoop.call(this,r);for(var i=e.openElements.stackTop;i>=0;i--)t(e.openElements.items[i],o);},e._processTokenInForeignContent=function(e){o=e,n._processTokenInForeignContent.call(this,e);},e._processToken=function(e){if(o=e,n._processToken.call(this,e),e.type===Tokenizer.END_TAG_TOKEN&&(e.tagName===$$1.HTML||e.tagName===$$1.BODY&&this.openElements.hasInScope($$1.BODY)))for(var r=this.openElements.stackTop;r>=0;r--){var i=this.openElements.items[r];if(this.treeAdapter.getTagName(i)===e.tagName){t(i,e);break}}},e._setDocumentType=function(e){n._setDocumentType.call(this,e);for(var t=this.treeAdapter.getChildNodes(this.document),r=t.length,i=0;i-1)return DOCUMENT_MODE.QUIRKS;var r=null===n?QUIRKS_MODE_NO_SYSTEM_ID_PUBLIC_ID_PREFIXES:QUIRKS_MODE_PUBLIC_ID_PREFIXES;if(hasPrefix(t,r))return DOCUMENT_MODE.QUIRKS;if(r=null===n?LIMITED_QUIRKS_PUBLIC_ID_PREFIXES:LIMITED_QUIRKS_WITH_SYSTEM_ID_PUBLIC_ID_PREFIXES,hasPrefix(t,r))return DOCUMENT_MODE.LIMITED_QUIRKS}return DOCUMENT_MODE.NO_QUIRKS}; var serializeContent=function(e,t,n){var r="!DOCTYPE ";return e&&(r+=e),null!==t?r+=" PUBLIC "+enquoteDoctypeId(t):null!==n&&(r+=" SYSTEM"),null!==n&&(r+=" "+enquoteDoctypeId(n)),r}; var doctype={getDocumentMode:getDocumentMode,serializeContent:serializeContent}; var foreign_content=createCommonjsModule(function(e,t){function n(e,t){return t===T.MATHML&&(e===o.MI||e===o.MO||e===o.MN||e===o.MS||e===o.MTEXT)}function r(e,t,n){if(t===T.MATHML&&e===o.ANNOTATION_XML)for(var r=0;r=0;r--){var i=e.openElements.items[r];if(i===t.element)break;e._isSpecialElement(i)&&(n=i);}return n||(e.openElements.popUntilElementPopped(t.element),e.activeFormattingElements.removeEntry(t)),n}function r(e,t,n){for(var r=t,s=e.openElements.getCommonAncestor(t),o=0,T=s;T!==n;o++,T=s){s=e.openElements.getCommonAncestor(T);var a=e.activeFormattingElements.getElementEntry(T),E=a&&o>=vt;!a||E?(E&&e.activeFormattingElements.removeEntry(a),e.openElements.remove(T)):(T=i(e,a),r===t&&(e.activeFormattingElements.bookmark=a),e.treeAdapter.detachNode(r),e.treeAdapter.appendChild(T,r),r=T);}return r}function i(e,t){var n=e.treeAdapter.getNamespaceURI(t.element),r=e.treeAdapter.createElement(t.token.tagName,n,t.token.attrs);return e.openElements.replace(t.element,r),t.element=r,r}function s(e,t,n){if(e._isElementCausesFosterParenting(t))e._fosterParentElement(n);else{var r=e.treeAdapter.getTagName(t),i=e.treeAdapter.getNamespaceURI(t);r===Pt.TEMPLATE&&i===Dt.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,n);}}function o(e,t,n){var r=e.treeAdapter.getNamespaceURI(n.element),i=n.token,s=e.treeAdapter.createElement(i.tagName,r,i.attrs);e._adoptNodes(t,s),e.treeAdapter.appendChild(t,s),e.activeFormattingElements.insertElementAfterBookmark(s,n.token),e.activeFormattingElements.removeEntry(n),e.openElements.remove(n.element),e.openElements.insertAfter(t,s);}function T(e,i){for(var T,a=0;a0&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(Pt.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e._popTmplInsertionMode(),e._resetInsertionMode());}function I(e,t){e.openElements.pop(),e.insertionMode=yt,e._processToken(t);}function R(e,t){var n=t.tagName;n===Pt.HTML?Ee(e,t):n===Pt.BODY?(e._insertElement(t,Dt.HTML),e.framesetOk=!1,e.insertionMode=Kt):n===Pt.FRAMESET?(e._insertElement(t,Dt.HTML),e.insertionMode=Jt):n===Pt.BASE||n===Pt.BASEFONT||n===Pt.BGSOUND||n===Pt.LINK||n===Pt.META||n===Pt.NOFRAMES||n===Pt.SCRIPT||n===Pt.STYLE||n===Pt.TEMPLATE||n===Pt.TITLE?(e.openElements.push(e.headElement),f(e,t),e.openElements.remove(e.headElement)):n!==Pt.HEAD&&L(e,t);}function M(e,t){var n=t.tagName;n===Pt.BODY||n===Pt.HTML||n===Pt.BR?L(e,t):n===Pt.TEMPLATE&&O(e,t);}function L(e,t){e._insertFakeElement(Pt.BODY),e.insertionMode=Kt,e._processToken(t);}function P(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t);}function D(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1;}function g(e,t){0===e.openElements.tmplCount&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs);}function H(e,t){var n=e.openElements.tryPeekProperlyNestedBodyElement();n&&0===e.openElements.tmplCount&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs));}function k(e,t){var n=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&n&&(e.treeAdapter.detachNode(n),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,Dt.HTML),e.insertionMode=Jt);}function U(e,t){e.openElements.hasInButtonScope(Pt.P)&&e._closePElement(),e._insertElement(t,Dt.HTML);}function v(e,t){e.openElements.hasInButtonScope(Pt.P)&&e._closePElement();var n=e.openElements.currentTagName;n!==Pt.H1&&n!==Pt.H2&&n!==Pt.H3&&n!==Pt.H4&&n!==Pt.H5&&n!==Pt.H6||e.openElements.pop(),e._insertElement(t,Dt.HTML);}function F(e,t){e.openElements.hasInButtonScope(Pt.P)&&e._closePElement(),e._insertElement(t,Dt.HTML),e.skipNextNewLine=!0,e.framesetOk=!1;}function G(e,t){var n=e.openElements.tmplCount>0;e.formElement&&!n||(e.openElements.hasInButtonScope(Pt.P)&&e._closePElement(),e._insertElement(t,Dt.HTML),n||(e.formElement=e.openElements.current));}function B(e,t){e.framesetOk=!1;for(var n=t.tagName,r=e.openElements.stackTop;r>=0;r--){var i=e.openElements.items[r],s=e.treeAdapter.getTagName(i),o=null;if(n===Pt.LI&&s===Pt.LI?o=Pt.LI:n!==Pt.DD&&n!==Pt.DT||s!==Pt.DD&&s!==Pt.DT||(o=s),o){e.openElements.generateImpliedEndTagsWithExclusion(o),e.openElements.popUntilTagNamePopped(o);break}if(s!==Pt.ADDRESS&&s!==Pt.DIV&&s!==Pt.P&&e._isSpecialElement(i))break}e.openElements.hasInButtonScope(Pt.P)&&e._closePElement(),e._insertElement(t,Dt.HTML);}function y(e,t){e.openElements.hasInButtonScope(Pt.P)&&e._closePElement(),e._insertElement(t,Dt.HTML),e.tokenizer.state=Nt.MODE.PLAINTEXT;}function K(e,t){e.openElements.hasInScope(Pt.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(Pt.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,Dt.HTML),e.framesetOk=!1;}function b(e,t){var n=e.activeFormattingElements.getElementEntryInScopeWithTagName(Pt.A);n&&(T(e,t),e.openElements.remove(n.element),e.activeFormattingElements.removeEntry(n)),e._reconstructActiveFormattingElements(),e._insertElement(t,Dt.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t);}function x(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,Dt.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t);}function Y(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(Pt.NOBR)&&(T(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,Dt.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t);}function w(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,Dt.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1;}function X(e,t){e.treeAdapter.getDocumentMode(e.document)!==Lt.DOCUMENT_MODE.QUIRKS&&e.openElements.hasInButtonScope(Pt.P)&&e._closePElement(),e._insertElement(t,Dt.HTML),e.framesetOk=!1,e.insertionMode=xt;}function Q(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,Dt.HTML),e.framesetOk=!1;}function W(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,Dt.HTML);var n=Nt.getTokenAttr(t,gt.TYPE);n&&n.toLowerCase()===kt||(e.framesetOk=!1);}function j(e,t){e._appendElement(t,Dt.HTML);}function z(e,t){e.openElements.hasInButtonScope(Pt.P)&&e._closePElement(),e.openElements.currentTagName===Pt.MENUITEM&&e.openElements.pop(),e._appendElement(t,Dt.HTML),e.framesetOk=!1;}function V(e,t){t.tagName=Pt.IMG,Q(e,t);}function $(e,t){e._insertElement(t,Dt.HTML),e.skipNextNewLine=!0,e.tokenizer.state=Nt.MODE.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=bt;}function q(e,t){e.openElements.hasInButtonScope(Pt.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,Nt.MODE.RAWTEXT);}function J(e,t){e.framesetOk=!1,e._switchToTextParsing(t,Nt.MODE.RAWTEXT);}function Z(e,t){e._switchToTextParsing(t,Nt.MODE.RAWTEXT);}function ee(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,Dt.HTML),e.framesetOk=!1,e.insertionMode===xt||e.insertionMode===wt||e.insertionMode===Qt||e.insertionMode===Wt||e.insertionMode===jt?e.insertionMode=Vt:e.insertionMode=zt;}function te(e,t){e.openElements.currentTagName===Pt.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,Dt.HTML);}function ne(e,t){e.openElements.hasInScope(Pt.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,Dt.HTML);}function re(e,t){e.openElements.hasInScope(Pt.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(Pt.RTC),e._insertElement(t,Dt.HTML);}function ie(e,t){e.openElements.currentTagName===Pt.MENUITEM&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,Dt.HTML);}function se(e,t){e.openElements.hasInButtonScope(Pt.P)&&e._closePElement(),e.openElements.currentTagName===Pt.MENUITEM&&e.openElements.pop(),e._insertElement(t,Dt.HTML);}function oe(e,t){e._reconstructActiveFormattingElements(),It.adjustTokenMathMLAttrs(t),It.adjustTokenXMLAttrs(t),t.selfClosing?e._appendElement(t,Dt.MATHML):e._insertElement(t,Dt.MATHML);}function Te(e,t){e._reconstructActiveFormattingElements(),It.adjustTokenSVGAttrs(t),It.adjustTokenXMLAttrs(t),t.selfClosing?e._appendElement(t,Dt.SVG):e._insertElement(t,Dt.SVG);}function ae(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,Dt.HTML);}function Ee(e,t){var n=t.tagName;switch(n.length){case 1:n===Pt.I||n===Pt.S||n===Pt.B||n===Pt.U?x(e,t):n===Pt.P?U(e,t):n===Pt.A?b(e,t):ae(e,t);break;case 2:n===Pt.DL||n===Pt.OL||n===Pt.UL?U(e,t):n===Pt.H1||n===Pt.H2||n===Pt.H3||n===Pt.H4||n===Pt.H5||n===Pt.H6?v(e,t):n===Pt.LI||n===Pt.DD||n===Pt.DT?B(e,t):n===Pt.EM||n===Pt.TT?x(e,t):n===Pt.BR?Q(e,t):n===Pt.HR?z(e,t):n===Pt.RB?ne(e,t):n===Pt.RT||n===Pt.RP?re(e,t):n!==Pt.TH&&n!==Pt.TD&&n!==Pt.TR&&ae(e,t);break;case 3:n===Pt.DIV||n===Pt.DIR||n===Pt.NAV?U(e,t):n===Pt.PRE?F(e,t):n===Pt.BIG?x(e,t):n===Pt.IMG||n===Pt.WBR?Q(e,t):n===Pt.XMP?q(e,t):n===Pt.SVG?Te(e,t):n===Pt.RTC?ne(e,t):n!==Pt.COL&&ae(e,t);break;case 4:n===Pt.HTML?g(e,t):n===Pt.BASE||n===Pt.LINK||n===Pt.META?f(e,t):n===Pt.BODY?H(e,t):n===Pt.MAIN?U(e,t):n===Pt.FORM?G(e,t):n===Pt.CODE||n===Pt.FONT?x(e,t):n===Pt.NOBR?Y(e,t):n===Pt.AREA?Q(e,t):n===Pt.MATH?oe(e,t):n===Pt.MENU?se(e,t):n!==Pt.HEAD&&ae(e,t);break;case 5:n===Pt.STYLE||n===Pt.TITLE?f(e,t):n===Pt.ASIDE?U(e,t):n===Pt.SMALL?x(e,t):n===Pt.TABLE?X(e,t):n===Pt.EMBED?Q(e,t):n===Pt.INPUT?W(e,t):n===Pt.PARAM||n===Pt.TRACK?j(e,t):n===Pt.IMAGE?V(e,t):n!==Pt.FRAME&&n!==Pt.TBODY&&n!==Pt.TFOOT&&n!==Pt.THEAD&&ae(e,t);break;case 6:n===Pt.SCRIPT?f(e,t):n===Pt.CENTER||n===Pt.FIGURE||n===Pt.FOOTER||n===Pt.HEADER||n===Pt.HGROUP?U(e,t):n===Pt.BUTTON?K(e,t):n===Pt.STRIKE||n===Pt.STRONG?x(e,t):n===Pt.APPLET||n===Pt.OBJECT?w(e,t):n===Pt.KEYGEN?Q(e,t):n===Pt.SOURCE?j(e,t):n===Pt.IFRAME?J(e,t):n===Pt.SELECT?ee(e,t):n===Pt.OPTION?te(e,t):ae(e,t);break;case 7:n===Pt.BGSOUND?f(e,t):n===Pt.DETAILS||n===Pt.ADDRESS||n===Pt.ARTICLE||n===Pt.SECTION||n===Pt.SUMMARY?U(e,t):n===Pt.LISTING?F(e,t):n===Pt.MARQUEE?w(e,t):n===Pt.NOEMBED?Z(e,t):n!==Pt.CAPTION&&ae(e,t);break;case 8:n===Pt.BASEFONT?f(e,t):n===Pt.MENUITEM?ie(e,t):n===Pt.FRAMESET?k(e,t):n===Pt.FIELDSET?U(e,t):n===Pt.TEXTAREA?$(e,t):n===Pt.TEMPLATE?f(e,t):n===Pt.NOSCRIPT?Z(e,t):n===Pt.OPTGROUP?te(e,t):n!==Pt.COLGROUP&&ae(e,t);break;case 9:n===Pt.PLAINTEXT?y(e,t):ae(e,t);break;case 10:n===Pt.BLOCKQUOTE||n===Pt.FIGCAPTION?U(e,t):ae(e,t);break;default:ae(e,t);}}function _e(e){e.openElements.hasInScope(Pt.BODY)&&(e.insertionMode=qt);}function ce(e,t){e.openElements.hasInScope(Pt.BODY)&&(e.insertionMode=qt,e._processToken(t));}function pe(e,t){var n=t.tagName;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n));}function Ae(e){var t=e.openElements.tmplCount>0,n=e.formElement;t||(e.formElement=null),(n||t)&&e.openElements.hasInScope(Pt.FORM)&&(e.openElements.generateImpliedEndTags(),t?e.openElements.popUntilTagNamePopped(Pt.FORM):e.openElements.remove(n));}function he(e){e.openElements.hasInButtonScope(Pt.P)||e._insertFakeElement(Pt.P),e._closePElement();}function le(e){e.openElements.hasInListItemScope(Pt.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(Pt.LI),e.openElements.popUntilTagNamePopped(Pt.LI));}function me(e,t){var n=t.tagName;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n));}function ue(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped());}function Ne(e,t){var n=t.tagName;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker());}function Ce(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(Pt.BR),e.openElements.pop(),e.framesetOk=!1;}function de(e,t){for(var n=t.tagName,r=e.openElements.stackTop;r>0;r--){var i=e.openElements.items[r];if(e.treeAdapter.getTagName(i)===n){e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilElementPopped(i);break}if(e._isSpecialElement(i))break}}function Se(e,t){var n=t.tagName;switch(n.length){case 1:n===Pt.A||n===Pt.B||n===Pt.I||n===Pt.S||n===Pt.U?T(e,t):n===Pt.P?he(e,t):de(e,t);break;case 2:n===Pt.DL||n===Pt.UL||n===Pt.OL?pe(e,t):n===Pt.LI?le(e,t):n===Pt.DD||n===Pt.DT?me(e,t):n===Pt.H1||n===Pt.H2||n===Pt.H3||n===Pt.H4||n===Pt.H5||n===Pt.H6?ue(e,t):n===Pt.BR?Ce(e,t):n===Pt.EM||n===Pt.TT?T(e,t):de(e,t);break;case 3:n===Pt.BIG?T(e,t):n===Pt.DIR||n===Pt.DIV||n===Pt.NAV?pe(e,t):de(e,t);break;case 4:n===Pt.BODY?_e(e,t):n===Pt.HTML?ce(e,t):n===Pt.FORM?Ae(e,t):n===Pt.CODE||n===Pt.FONT||n===Pt.NOBR?T(e,t):n===Pt.MAIN||n===Pt.MENU?pe(e,t):de(e,t);break;case 5:n===Pt.ASIDE?pe(e,t):n===Pt.SMALL?T(e,t):de(e,t);break;case 6:n===Pt.CENTER||n===Pt.FIGURE||n===Pt.FOOTER||n===Pt.HEADER||n===Pt.HGROUP?pe(e,t):n===Pt.APPLET||n===Pt.OBJECT?Ne(e,t):n===Pt.STRIKE||n===Pt.STRONG?T(e,t):de(e,t);break;case 7:n===Pt.ADDRESS||n===Pt.ARTICLE||n===Pt.DETAILS||n===Pt.SECTION||n===Pt.SUMMARY?pe(e,t):n===Pt.MARQUEE?Ne(e,t):de(e,t);break;case 8:n===Pt.FIELDSET?pe(e,t):n===Pt.TEMPLATE?O(e,t):de(e,t);break;case 10:n===Pt.BLOCKQUOTE||n===Pt.FIGCAPTION?pe(e,t):de(e,t);break;default:de(e,t);}}function fe(e,t){e.tmplInsertionModeStackTop>-1?rt(e,t):e.stopped=!0;}function Oe(e,t){t.tagName===Pt.SCRIPT&&(e.pendingScript=e.openElements.current),e.openElements.pop(),e.insertionMode=e.originalInsertionMode;}function Ie(e,t){e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e._processToken(t);}function Re(e,t){var n=e.openElements.currentTagName;n===Pt.TABLE||n===Pt.TBODY||n===Pt.TFOOT||n===Pt.THEAD||n===Pt.TR?(e.pendingCharacterTokens=[],e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=Yt,e._processToken(t)):Ge(e,t);}function Me(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,Dt.HTML),e.insertionMode=wt;}function Le(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,Dt.HTML),e.insertionMode=Xt;}function Pe(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(Pt.COLGROUP),e.insertionMode=Xt,e._processToken(t);}function De(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,Dt.HTML),e.insertionMode=Qt;}function ge(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(Pt.TBODY),e.insertionMode=Qt,e._processToken(t);}function He(e,t){e.openElements.hasInTableScope(Pt.TABLE)&&(e.openElements.popUntilTagNamePopped(Pt.TABLE),e._resetInsertionMode(),e._processToken(t));}function ke(e,t){var n=Nt.getTokenAttr(t,gt.TYPE);n&&n.toLowerCase()===kt?e._appendElement(t,Dt.HTML):Ge(e,t);}function Ue(e,t){e.formElement||0!==e.openElements.tmplCount||(e._insertElement(t,Dt.HTML),e.formElement=e.openElements.current,e.openElements.pop());}function ve(e,t){var n=t.tagName;switch(n.length){case 2:n===Pt.TD||n===Pt.TH||n===Pt.TR?ge(e,t):Ge(e,t);break;case 3:n===Pt.COL?Pe(e,t):Ge(e,t);break;case 4:n===Pt.FORM?Ue(e,t):Ge(e,t);break;case 5:n===Pt.TABLE?He(e,t):n===Pt.STYLE?f(e,t):n===Pt.TBODY||n===Pt.TFOOT||n===Pt.THEAD?De(e,t):n===Pt.INPUT?ke(e,t):Ge(e,t);break;case 6:n===Pt.SCRIPT?f(e,t):Ge(e,t);break;case 7:n===Pt.CAPTION?Me(e,t):Ge(e,t);break;case 8:n===Pt.COLGROUP?Le(e,t):n===Pt.TEMPLATE?f(e,t):Ge(e,t);break;default:Ge(e,t);}}function Fe(e,t){var n=t.tagName;n===Pt.TABLE?e.openElements.hasInTableScope(Pt.TABLE)&&(e.openElements.popUntilTagNamePopped(Pt.TABLE),e._resetInsertionMode()):n===Pt.TEMPLATE?O(e,t):n!==Pt.BODY&&n!==Pt.CAPTION&&n!==Pt.COL&&n!==Pt.COLGROUP&&n!==Pt.HTML&&n!==Pt.TBODY&&n!==Pt.TD&&n!==Pt.TFOOT&&n!==Pt.TH&&n!==Pt.THEAD&&n!==Pt.TR&&Ge(e,t);}function Ge(e,t){var n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,e._processTokenInBodyMode(t),e.fosterParentingEnabled=n;}function Be(e,t){e.pendingCharacterTokens.push(t);}function ye(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0;}function Ke(e,t){var n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n0?(e.openElements.popUntilTagNamePopped(Pt.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e._popTmplInsertionMode(),e._resetInsertionMode(),e._processToken(t)):e.stopped=!0;}function it(e,t){t.tagName===Pt.HTML?Ee(e,t):ot(e,t);}function st(e,t){t.tagName===Pt.HTML?e.fragmentContext||(e.insertionMode=en):ot(e,t);}function ot(e,t){e.insertionMode=Kt,e._processToken(t);}function Tt(e,t){var n=t.tagName;n===Pt.HTML?Ee(e,t):n===Pt.FRAMESET?e._insertElement(t,Dt.HTML):n===Pt.FRAME?e._appendElement(t,Dt.HTML):n===Pt.NOFRAMES&&f(e,t);}function at(e,t){t.tagName!==Pt.FRAMESET||e.openElements.isRootHtmlElementCurrent()||(e.openElements.pop(),e.fragmentContext||e.openElements.currentTagName===Pt.FRAMESET||(e.insertionMode=Zt));}function Et(e,t){var n=t.tagName;n===Pt.HTML?Ee(e,t):n===Pt.NOFRAMES&&f(e,t);}function _t(e,t){t.tagName===Pt.HTML&&(e.insertionMode=tn);}function ct(e,t){t.tagName===Pt.HTML?Ee(e,t):pt(e,t);}function pt(e,t){e.insertionMode=Kt,e._processToken(t);}function At(e,t){var n=t.tagName;n===Pt.HTML?Ee(e,t):n===Pt.NOFRAMES&&f(e,t);}function ht(e,t){t.chars=Mt.REPLACEMENT_CHARACTER,e._insertCharacters(t);}function lt(e,t){e._insertCharacters(t),e.framesetOk=!1;}function mt(e,t){if(It.causesExit(t)&&!e.fragmentContext){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==Dt.HTML&&!e._isIntegrationPoint(e.openElements.current);)e.openElements.pop();e._processToken(t);}else{var n=e._getAdjustedCurrentElement(),r=e.treeAdapter.getNamespaceURI(n);r===Dt.MATHML?It.adjustTokenMathMLAttrs(t):r===Dt.SVG&&(It.adjustTokenSVGTagName(t),It.adjustTokenSVGAttrs(t)),It.adjustTokenXMLAttrs(t),t.selfClosing?e._appendElement(t,r):e._insertElement(t,r);}}function ut(e,t){for(var n=e.openElements.stackTop;n>0;n--){var r=e.openElements.items[n];if(e.treeAdapter.getNamespaceURI(r)===Dt.HTML){e._processToken(t);break}if(e.treeAdapter.getTagName(r).toLowerCase()===t.tagName){e.openElements.popUntilElementPopped(r);break}}}var Nt=index$4,Ct=open_element_stack,dt=formatting_element_list,St=parser_mixin,ft=_default,Ot=doctype,It=foreign_content,Rt=merge_options,Mt=unicode,Lt=html,Pt=Lt.TAG_NAMES,Dt=Lt.NAMESPACES,gt=Lt.ATTRS,Ht={locationInfo:!1,treeAdapter:ft},kt="hidden",Ut=8,vt=3,Ft="BEFORE_HTML_MODE",Gt="BEFORE_HEAD_MODE",Bt="IN_HEAD_MODE",yt="AFTER_HEAD_MODE",Kt="IN_BODY_MODE",bt="TEXT_MODE",xt="IN_TABLE_MODE",Yt="IN_TABLE_TEXT_MODE",wt="IN_CAPTION_MODE",Xt="IN_COLUMN_GROUP_MODE",Qt="IN_TABLE_BODY_MODE",Wt="IN_ROW_MODE",jt="IN_CELL_MODE",zt="IN_SELECT_MODE",Vt="IN_SELECT_IN_TABLE_MODE",$t="IN_TEMPLATE_MODE",qt="AFTER_BODY_MODE",Jt="IN_FRAMESET_MODE",Zt="AFTER_FRAMESET_MODE",en="AFTER_AFTER_BODY_MODE",tn="AFTER_AFTER_FRAMESET_MODE",nn=Object.create(null);nn[Pt.TR]=Wt,nn[Pt.TBODY]=nn[Pt.THEAD]=nn[Pt.TFOOT]=Qt,nn[Pt.CAPTION]=wt,nn[Pt.COLGROUP]=Xt,nn[Pt.TABLE]=xt,nn[Pt.BODY]=Kt,nn[Pt.FRAMESET]=Jt;var rn=Object.create(null);rn[Pt.CAPTION]=rn[Pt.COLGROUP]=rn[Pt.TBODY]=rn[Pt.TFOOT]=rn[Pt.THEAD]=xt,rn[Pt.COL]=Xt,rn[Pt.TR]=Qt,rn[Pt.TD]=rn[Pt.TH]=Wt;var sn=Object.create(null);sn.INITIAL_MODE=Object.create(null),sn.INITIAL_MODE[Nt.CHARACTER_TOKEN]=sn.INITIAL_MODE[Nt.NULL_CHARACTER_TOKEN]=l,sn.INITIAL_MODE[Nt.WHITESPACE_CHARACTER_TOKEN]=a,sn.INITIAL_MODE[Nt.COMMENT_TOKEN]=E,sn.INITIAL_MODE[Nt.DOCTYPE_TOKEN]=h,sn.INITIAL_MODE[Nt.START_TAG_TOKEN]=sn.INITIAL_MODE[Nt.END_TAG_TOKEN]=sn.INITIAL_MODE[Nt.EOF_TOKEN]=l,sn[Ft]=Object.create(null),sn[Ft][Nt.CHARACTER_TOKEN]=sn[Ft][Nt.NULL_CHARACTER_TOKEN]=N,sn[Ft][Nt.WHITESPACE_CHARACTER_TOKEN]=a,sn[Ft][Nt.COMMENT_TOKEN]=E,sn[Ft][Nt.DOCTYPE_TOKEN]=a,sn[Ft][Nt.START_TAG_TOKEN]=m,sn[Ft][Nt.END_TAG_TOKEN]=u,sn[Ft][Nt.EOF_TOKEN]=N,sn[Gt]=Object.create(null),sn[Gt][Nt.CHARACTER_TOKEN]=sn[Gt][Nt.NULL_CHARACTER_TOKEN]=S,sn[Gt][Nt.WHITESPACE_CHARACTER_TOKEN]=a,sn[Gt][Nt.COMMENT_TOKEN]=E,sn[Gt][Nt.DOCTYPE_TOKEN]=a,sn[Gt][Nt.START_TAG_TOKEN]=C,sn[Gt][Nt.END_TAG_TOKEN]=d,sn[Gt][Nt.EOF_TOKEN]=S,sn[Bt]=Object.create(null),sn[Bt][Nt.CHARACTER_TOKEN]=sn[Bt][Nt.NULL_CHARACTER_TOKEN]=I,sn[Bt][Nt.WHITESPACE_CHARACTER_TOKEN]=p,sn[Bt][Nt.COMMENT_TOKEN]=E,sn[Bt][Nt.DOCTYPE_TOKEN]=a,sn[Bt][Nt.START_TAG_TOKEN]=f,sn[Bt][Nt.END_TAG_TOKEN]=O,sn[Bt][Nt.EOF_TOKEN]=I,sn[yt]=Object.create(null),sn[yt][Nt.CHARACTER_TOKEN]=sn[yt][Nt.NULL_CHARACTER_TOKEN]=L,sn[yt][Nt.WHITESPACE_CHARACTER_TOKEN]=p,sn[yt][Nt.COMMENT_TOKEN]=E,sn[yt][Nt.DOCTYPE_TOKEN]=a,sn[yt][Nt.START_TAG_TOKEN]=R,sn[yt][Nt.END_TAG_TOKEN]=M,sn[yt][Nt.EOF_TOKEN]=L,sn[Kt]=Object.create(null),sn[Kt][Nt.CHARACTER_TOKEN]=D,sn[Kt][Nt.NULL_CHARACTER_TOKEN]=a,sn[Kt][Nt.WHITESPACE_CHARACTER_TOKEN]=P,sn[Kt][Nt.COMMENT_TOKEN]=E,sn[Kt][Nt.DOCTYPE_TOKEN]=a,sn[Kt][Nt.START_TAG_TOKEN]=Ee,sn[Kt][Nt.END_TAG_TOKEN]=Se,sn[Kt][Nt.EOF_TOKEN]=fe,sn[bt]=Object.create(null),sn[bt][Nt.CHARACTER_TOKEN]=sn[bt][Nt.NULL_CHARACTER_TOKEN]=sn[bt][Nt.WHITESPACE_CHARACTER_TOKEN]=p,sn[bt][Nt.COMMENT_TOKEN]=sn[bt][Nt.DOCTYPE_TOKEN]=sn[bt][Nt.START_TAG_TOKEN]=a,sn[bt][Nt.END_TAG_TOKEN]=Oe,sn[bt][Nt.EOF_TOKEN]=Ie,sn[xt]=Object.create(null),sn[xt][Nt.CHARACTER_TOKEN]=sn[xt][Nt.NULL_CHARACTER_TOKEN]=sn[xt][Nt.WHITESPACE_CHARACTER_TOKEN]=Re,sn[xt][Nt.COMMENT_TOKEN]=E,sn[xt][Nt.DOCTYPE_TOKEN]=a,sn[xt][Nt.START_TAG_TOKEN]=ve,sn[xt][Nt.END_TAG_TOKEN]=Fe,sn[xt][Nt.EOF_TOKEN]=fe,sn[Yt]=Object.create(null),sn[Yt][Nt.CHARACTER_TOKEN]=ye,sn[Yt][Nt.NULL_CHARACTER_TOKEN]=a,sn[Yt][Nt.WHITESPACE_CHARACTER_TOKEN]=Be,sn[Yt][Nt.COMMENT_TOKEN]=sn[Yt][Nt.DOCTYPE_TOKEN]=sn[Yt][Nt.START_TAG_TOKEN]=sn[Yt][Nt.END_TAG_TOKEN]=sn[Yt][Nt.EOF_TOKEN]=Ke,sn[wt]=Object.create(null),sn[wt][Nt.CHARACTER_TOKEN]=D,sn[wt][Nt.NULL_CHARACTER_TOKEN]=a,sn[wt][Nt.WHITESPACE_CHARACTER_TOKEN]=P,sn[wt][Nt.COMMENT_TOKEN]=E,sn[wt][Nt.DOCTYPE_TOKEN]=a,sn[wt][Nt.START_TAG_TOKEN]=be,sn[wt][Nt.END_TAG_TOKEN]=xe,sn[wt][Nt.EOF_TOKEN]=fe,sn[Xt]=Object.create(null),sn[Xt][Nt.CHARACTER_TOKEN]=sn[Xt][Nt.NULL_CHARACTER_TOKEN]=Xe,sn[Xt][Nt.WHITESPACE_CHARACTER_TOKEN]=p,sn[Xt][Nt.COMMENT_TOKEN]=E,sn[Xt][Nt.DOCTYPE_TOKEN]=a,sn[Xt][Nt.START_TAG_TOKEN]=Ye,sn[Xt][Nt.END_TAG_TOKEN]=we,sn[Xt][Nt.EOF_TOKEN]=fe,sn[Qt]=Object.create(null),sn[Qt][Nt.CHARACTER_TOKEN]=sn[Qt][Nt.NULL_CHARACTER_TOKEN]=sn[Qt][Nt.WHITESPACE_CHARACTER_TOKEN]=Re,sn[Qt][Nt.COMMENT_TOKEN]=E,sn[Qt][Nt.DOCTYPE_TOKEN]=a,sn[Qt][Nt.START_TAG_TOKEN]=Qe,sn[Qt][Nt.END_TAG_TOKEN]=We,sn[Qt][Nt.EOF_TOKEN]=fe,sn[Wt]=Object.create(null),sn[Wt][Nt.CHARACTER_TOKEN]=sn[Wt][Nt.NULL_CHARACTER_TOKEN]=sn[Wt][Nt.WHITESPACE_CHARACTER_TOKEN]=Re,sn[Wt][Nt.COMMENT_TOKEN]=E,sn[Wt][Nt.DOCTYPE_TOKEN]=a,sn[Wt][Nt.START_TAG_TOKEN]=je,sn[Wt][Nt.END_TAG_TOKEN]=ze,sn[Wt][Nt.EOF_TOKEN]=fe,sn[jt]=Object.create(null),sn[jt][Nt.CHARACTER_TOKEN]=D,sn[jt][Nt.NULL_CHARACTER_TOKEN]=a,sn[jt][Nt.WHITESPACE_CHARACTER_TOKEN]=P,sn[jt][Nt.COMMENT_TOKEN]=E,sn[jt][Nt.DOCTYPE_TOKEN]=a,sn[jt][Nt.START_TAG_TOKEN]=Ve,sn[jt][Nt.END_TAG_TOKEN]=$e,sn[jt][Nt.EOF_TOKEN]=fe,sn[zt]=Object.create(null),sn[zt][Nt.CHARACTER_TOKEN]=p,sn[zt][Nt.NULL_CHARACTER_TOKEN]=a,sn[zt][Nt.WHITESPACE_CHARACTER_TOKEN]=p,sn[zt][Nt.COMMENT_TOKEN]=E,sn[zt][Nt.DOCTYPE_TOKEN]=a,sn[zt][Nt.START_TAG_TOKEN]=qe,sn[zt][Nt.END_TAG_TOKEN]=Je,sn[zt][Nt.EOF_TOKEN]=fe,sn[Vt]=Object.create(null),sn[Vt][Nt.CHARACTER_TOKEN]=p,sn[Vt][Nt.NULL_CHARACTER_TOKEN]=a,sn[Vt][Nt.WHITESPACE_CHARACTER_TOKEN]=p,sn[Vt][Nt.COMMENT_TOKEN]=E,sn[Vt][Nt.DOCTYPE_TOKEN]=a,sn[Vt][Nt.START_TAG_TOKEN]=Ze,sn[Vt][Nt.END_TAG_TOKEN]=et,sn[Vt][Nt.EOF_TOKEN]=fe,sn[$t]=Object.create(null),sn[$t][Nt.CHARACTER_TOKEN]=D,sn[$t][Nt.NULL_CHARACTER_TOKEN]=a,sn[$t][Nt.WHITESPACE_CHARACTER_TOKEN]=P,sn[$t][Nt.COMMENT_TOKEN]=E,sn[$t][Nt.DOCTYPE_TOKEN]=a,sn[$t][Nt.START_TAG_TOKEN]=tt,sn[$t][Nt.END_TAG_TOKEN]=nt,sn[$t][Nt.EOF_TOKEN]=rt,sn[qt]=Object.create(null),sn[qt][Nt.CHARACTER_TOKEN]=sn[qt][Nt.NULL_CHARACTER_TOKEN]=ot,sn[qt][Nt.WHITESPACE_CHARACTER_TOKEN]=P,sn[qt][Nt.COMMENT_TOKEN]=_,sn[qt][Nt.DOCTYPE_TOKEN]=a,sn[qt][Nt.START_TAG_TOKEN]=it,sn[qt][Nt.END_TAG_TOKEN]=st,sn[qt][Nt.EOF_TOKEN]=A,sn[Jt]=Object.create(null),sn[Jt][Nt.CHARACTER_TOKEN]=sn[Jt][Nt.NULL_CHARACTER_TOKEN]=a,sn[Jt][Nt.WHITESPACE_CHARACTER_TOKEN]=p,sn[Jt][Nt.COMMENT_TOKEN]=E,sn[Jt][Nt.DOCTYPE_TOKEN]=a,sn[Jt][Nt.START_TAG_TOKEN]=Tt,sn[Jt][Nt.END_TAG_TOKEN]=at,sn[Jt][Nt.EOF_TOKEN]=A,sn[Zt]=Object.create(null),sn[Zt][Nt.CHARACTER_TOKEN]=sn[Zt][Nt.NULL_CHARACTER_TOKEN]=a,sn[Zt][Nt.WHITESPACE_CHARACTER_TOKEN]=p,sn[Zt][Nt.COMMENT_TOKEN]=E,sn[Zt][Nt.DOCTYPE_TOKEN]=a,sn[Zt][Nt.START_TAG_TOKEN]=Et,sn[Zt][Nt.END_TAG_TOKEN]=_t,sn[Zt][Nt.EOF_TOKEN]=A,sn[en]=Object.create(null),sn[en][Nt.CHARACTER_TOKEN]=pt,sn[en][Nt.NULL_CHARACTER_TOKEN]=pt,sn[en][Nt.WHITESPACE_CHARACTER_TOKEN]=P,sn[en][Nt.COMMENT_TOKEN]=c,sn[en][Nt.DOCTYPE_TOKEN]=a,sn[en][Nt.START_TAG_TOKEN]=ct,sn[en][Nt.END_TAG_TOKEN]=pt,sn[en][Nt.EOF_TOKEN]=A,sn[tn]=Object.create(null),sn[tn][Nt.CHARACTER_TOKEN]=sn[tn][Nt.NULL_CHARACTER_TOKEN]=a,sn[tn][Nt.WHITESPACE_CHARACTER_TOKEN]=P,sn[tn][Nt.COMMENT_TOKEN]=c,sn[tn][Nt.DOCTYPE_TOKEN]=a,sn[tn][Nt.START_TAG_TOKEN]=At,sn[tn][Nt.END_TAG_TOKEN]=a,sn[tn][Nt.EOF_TOKEN]=A;var on=e.exports=function(e){this.options=Rt(Ht,e),this.treeAdapter=this.options.treeAdapter,this.pendingScript=null,this.options.locationInfo&&St.assign(this);};on.prototype.parse=function(e){var t=this.treeAdapter.createDocument();return this._bootstrap(t,null),this.tokenizer.write(e,!0),this._runParsingLoop(null),t},on.prototype.parseFragment=function(e,t){t||(t=this.treeAdapter.createElement(Pt.TEMPLATE,Dt.HTML,[]));var n=this.treeAdapter.createElement("documentmock",Dt.HTML,[]);this._bootstrap(n,t),this.treeAdapter.getTagName(t)===Pt.TEMPLATE&&this._pushTmplInsertionMode($t),this._initTokenizerForFragmentParsing(),this._insertFakeRootElement(),this._resetInsertionMode(),this._findFormInFragmentContext(),this.tokenizer.write(e,!0),this._runParsingLoop(null);var r=this.treeAdapter.getFirstChild(n),i=this.treeAdapter.createDocumentFragment();return this._adoptNodes(r,i),i},on.prototype._bootstrap=function(e,t){this.tokenizer=new Nt(this.options),this.stopped=!1,this.insertionMode="INITIAL_MODE",this.originalInsertionMode="",this.document=e,this.fragmentContext=t,this.headElement=null,this.formElement=null,this.openElements=new Ct(this.document,this.treeAdapter),this.activeFormattingElements=new dt(this.treeAdapter),this.tmplInsertionModeStack=[],this.tmplInsertionModeStackTop=-1,this.currentTmplInsertionMode=null,this.pendingCharacterTokens=[],this.hasNonWhitespacePendingCharacterToken=!1,this.framesetOk=!0,this.skipNextNewLine=!1,this.fosterParentingEnabled=!1;},on.prototype._runParsingLoop=function(e){for(;!this.stopped;){this._setupTokenizerCDATAMode();var t=this.tokenizer.getNextToken();if(t.type===Nt.HIBERNATION_TOKEN)break;if(this.skipNextNewLine&&(this.skipNextNewLine=!1,t.type===Nt.WHITESPACE_CHARACTER_TOKEN&&"\n"===t.chars[0])){if(1===t.chars.length)continue;t.chars=t.chars.substr(1);}if(this._processInputToken(t),e&&this.pendingScript)break}},on.prototype.runParsingLoopForCurrentChunk=function(e,t){if(this._runParsingLoop(t),t&&this.pendingScript){var n=this.pendingScript;return this.pendingScript=null,void t(n)}e&&e();},on.prototype._setupTokenizerCDATAMode=function(){var e=this._getAdjustedCurrentElement();this.tokenizer.allowCDATA=e&&e!==this.document&&this.treeAdapter.getNamespaceURI(e)!==Dt.HTML&&!this._isIntegrationPoint(e);},on.prototype._switchToTextParsing=function(e,t){this._insertElement(e,Dt.HTML),this.tokenizer.state=t,this.originalInsertionMode=this.insertionMode,this.insertionMode=bt;},on.prototype.switchToPlaintextParsing=function(){this.insertionMode=bt,this.originalInsertionMode=Kt,this.tokenizer.state=Nt.MODE.PLAINTEXT;},on.prototype._getAdjustedCurrentElement=function(){return 0===this.openElements.stackTop&&this.fragmentContext?this.fragmentContext:this.openElements.current},on.prototype._findFormInFragmentContext=function(){var e=this.fragmentContext;do{if(this.treeAdapter.getTagName(e)===Pt.FORM){this.formElement=e;break}e=this.treeAdapter.getParentNode(e);}while(e)},on.prototype._initTokenizerForFragmentParsing=function(){if(this.treeAdapter.getNamespaceURI(this.fragmentContext)===Dt.HTML){var e=this.treeAdapter.getTagName(this.fragmentContext);e===Pt.TITLE||e===Pt.TEXTAREA?this.tokenizer.state=Nt.MODE.RCDATA:e===Pt.STYLE||e===Pt.XMP||e===Pt.IFRAME||e===Pt.NOEMBED||e===Pt.NOFRAMES||e===Pt.NOSCRIPT?this.tokenizer.state=Nt.MODE.RAWTEXT:e===Pt.SCRIPT?this.tokenizer.state=Nt.MODE.SCRIPT_DATA:e===Pt.PLAINTEXT&&(this.tokenizer.state=Nt.MODE.PLAINTEXT);}},on.prototype._setDocumentType=function(e){this.treeAdapter.setDocumentType(this.document,e.name,e.publicId,e.systemId);},on.prototype._attachElementToTree=function(e){if(this._shouldFosterParentOnInsertion())this._fosterParentElement(e);else{var t=this.openElements.currentTmplContent||this.openElements.current;this.treeAdapter.appendChild(t,e);}},on.prototype._appendElement=function(e,t){var n=this.treeAdapter.createElement(e.tagName,t,e.attrs);this._attachElementToTree(n);},on.prototype._insertElement=function(e,t){var n=this.treeAdapter.createElement(e.tagName,t,e.attrs);this._attachElementToTree(n),this.openElements.push(n);},on.prototype._insertFakeElement=function(e){var t=this.treeAdapter.createElement(e,Dt.HTML,[]);this._attachElementToTree(t),this.openElements.push(t);},on.prototype._insertTemplate=function(e){var t=this.treeAdapter.createElement(e.tagName,Dt.HTML,e.attrs),n=this.treeAdapter.createDocumentFragment();this.treeAdapter.setTemplateContent(t,n),this._attachElementToTree(t),this.openElements.push(t);},on.prototype._insertFakeRootElement=function(){var e=this.treeAdapter.createElement(Pt.HTML,Dt.HTML,[]);this.treeAdapter.appendChild(this.openElements.current,e),this.openElements.push(e);},on.prototype._appendCommentNode=function(e,t){var n=this.treeAdapter.createCommentNode(e.data);this.treeAdapter.appendChild(t,n);},on.prototype._insertCharacters=function(e){if(this._shouldFosterParentOnInsertion())this._fosterParentText(e.chars);else{var t=this.openElements.currentTmplContent||this.openElements.current;this.treeAdapter.insertText(t,e.chars);}},on.prototype._adoptNodes=function(e,t){for(;;){var n=this.treeAdapter.getFirstChild(e);if(!n)break;this.treeAdapter.detachNode(n),this.treeAdapter.appendChild(t,n);}},on.prototype._shouldProcessTokenInForeignContent=function(e){var t=this._getAdjustedCurrentElement();if(!t||t===this.document)return!1;var n=this.treeAdapter.getNamespaceURI(t);if(n===Dt.HTML)return!1;if(this.treeAdapter.getTagName(t)===Pt.ANNOTATION_XML&&n===Dt.MATHML&&e.type===Nt.START_TAG_TOKEN&&e.tagName===Pt.SVG)return!1;var r=e.type===Nt.CHARACTER_TOKEN||e.type===Nt.NULL_CHARACTER_TOKEN||e.type===Nt.WHITESPACE_CHARACTER_TOKEN;return(!(e.type===Nt.START_TAG_TOKEN&&e.tagName!==Pt.MGLYPH&&e.tagName!==Pt.MALIGNMARK)&&!r||!this._isIntegrationPoint(t,Dt.MATHML))&&((e.type!==Nt.START_TAG_TOKEN&&!r||!this._isIntegrationPoint(t,Dt.HTML))&&e.type!==Nt.EOF_TOKEN)},on.prototype._processToken=function(e){sn[this.insertionMode][e.type](this,e);},on.prototype._processTokenInBodyMode=function(e){sn[Kt][e.type](this,e);},on.prototype._processTokenInForeignContent=function(e){e.type===Nt.CHARACTER_TOKEN?lt(this,e):e.type===Nt.NULL_CHARACTER_TOKEN?ht(this,e):e.type===Nt.WHITESPACE_CHARACTER_TOKEN?p(this,e):e.type===Nt.COMMENT_TOKEN?E(this,e):e.type===Nt.START_TAG_TOKEN?mt(this,e):e.type===Nt.END_TAG_TOKEN&&ut(this,e);},on.prototype._processInputToken=function(e){this._shouldProcessTokenInForeignContent(e)?this._processTokenInForeignContent(e):this._processToken(e);},on.prototype._isIntegrationPoint=function(e,t){var n=this.treeAdapter.getTagName(e),r=this.treeAdapter.getNamespaceURI(e),i=this.treeAdapter.getAttrList(e);return It.isIntegrationPoint(n,r,i,t)},on.prototype._reconstructActiveFormattingElements=function(){var e=this.activeFormattingElements.length;if(e){var t=e,n=null;do{if(t--,(n=this.activeFormattingElements.entries[t]).type===dt.MARKER_ENTRY||this.openElements.contains(n.element)){t++;break}}while(t>0);for(var r=t;r=0;e--){var n=this.openElements.items[e];0===e&&(t=!0,this.fragmentContext&&(n=this.fragmentContext));var r=this.treeAdapter.getTagName(n),i=nn[r];if(i){this.insertionMode=i;break}if(!(t||r!==Pt.TD&&r!==Pt.TH)){this.insertionMode=jt;break}if(!t&&r===Pt.HEAD){this.insertionMode=Bt;break}if(r===Pt.SELECT){this._resetInsertionModeForSelect(e);break}if(r===Pt.TEMPLATE){this.insertionMode=this.currentTmplInsertionMode;break}if(r===Pt.HTML){this.insertionMode=this.headElement?yt:Gt;break}if(t){this.insertionMode=Kt;break}}},on.prototype._resetInsertionModeForSelect=function(e){if(e>0)for(var t=e-1;t>0;t--){var n=this.openElements.items[t],r=this.treeAdapter.getTagName(n);if(r===Pt.TEMPLATE)break;if(r===Pt.TABLE)return void(this.insertionMode=Vt)}this.insertionMode=zt;},on.prototype._pushTmplInsertionMode=function(e){this.tmplInsertionModeStack.push(e),this.tmplInsertionModeStackTop++,this.currentTmplInsertionMode=e;},on.prototype._popTmplInsertionMode=function(){this.tmplInsertionModeStack.pop(),this.tmplInsertionModeStackTop--,this.currentTmplInsertionMode=this.tmplInsertionModeStack[this.tmplInsertionModeStackTop];},on.prototype._isElementCausesFosterParenting=function(e){var t=this.treeAdapter.getTagName(e);return t===Pt.TABLE||t===Pt.TBODY||t===Pt.TFOOT||t===Pt.THEAD||t===Pt.TR},on.prototype._shouldFosterParentOnInsertion=function(){return this.fosterParentingEnabled&&this._isElementCausesFosterParenting(this.openElements.current)},on.prototype._findFosterParentingLocation=function(){for(var e={parent:null,beforeElement:null},t=this.openElements.stackTop;t>=0;t--){var n=this.openElements.items[t],r=this.treeAdapter.getTagName(n),i=this.treeAdapter.getNamespaceURI(n);if(r===Pt.TEMPLATE&&i===Dt.HTML){e.parent=this.treeAdapter.getTemplateContent(n);break}if(r===Pt.TABLE){e.parent=this.treeAdapter.getParentNode(n),e.parent?e.beforeElement=n:e.parent=this.openElements.items[t-1];break}}return e.parent||(e.parent=this.openElements.items[0]),e},on.prototype._fosterParentElement=function(e){var t=this._findFosterParentingLocation();t.beforeElement?this.treeAdapter.insertBefore(t.parent,e,t.beforeElement):this.treeAdapter.appendChild(t.parent,e);},on.prototype._fosterParentText=function(e){var t=this._findFosterParentingLocation();t.beforeElement?this.treeAdapter.insertTextBefore(t.parent,e,t.beforeElement):this.treeAdapter.insertText(t.parent,e);},on.prototype._isSpecialElement=function(e){var t=this.treeAdapter.getTagName(e),n=this.treeAdapter.getNamespaceURI(e);return Lt.SPECIAL_ELEMENTS[n][t]};}); var index$6=createCommonjsModule(function(e){var t=_default,n=doctype,r=merge_options,i=html,s=i.TAG_NAMES,o=i.NAMESPACES,T={treeAdapter:t},a=/&/g,E=/\u00a0/g,_=/"/g,c=//g,A=e.exports=function(e,t){this.options=r(T,t),this.treeAdapter=this.options.treeAdapter,this.html="",this.startNode=e;};A.escapeString=function(e,t){return e=e.replace(a,"&").replace(E," "),e=t?e.replace(_,"""):e.replace(c,"<").replace(p,">")},A.prototype.serialize=function(){return this._serializeChildNodes(this.startNode),this.html},A.prototype._serializeChildNodes=function(e){var t=this.treeAdapter.getChildNodes(e);if(t)for(var n=0,r=t.length;n",t!==s.AREA&&t!==s.BASE&&t!==s.BASEFONT&&t!==s.BGSOUND&&t!==s.BR&&t!==s.BR&&t!==s.COL&&t!==s.EMBED&&t!==s.FRAME&&t!==s.HR&&t!==s.IMG&&t!==s.INPUT&&t!==s.KEYGEN&&t!==s.LINK&&t!==s.MENUITEM&&t!==s.META&&t!==s.PARAM&&t!==s.SOURCE&&t!==s.TRACK&&t!==s.WBR){var r=t===s.TEMPLATE&&n===o.HTML?this.treeAdapter.getTemplateContent(e):e;this._serializeChildNodes(r),this.html+="";}},A.prototype._serializeAttributes=function(e){for(var t=this.treeAdapter.getAttrList(e),n=0,r=t.length;n";};}); var htmlparser2=createCommonjsModule(function(e,t){var n=doctype,r=html.DOCUMENT_MODE,i={element:1,text:3,cdata:4,comment:8},s={tagName:"name",childNodes:"children",parentNode:"parent",previousSibling:"prev",nextSibling:"next",nodeValue:"data"},o=function(e){for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);};o.prototype={get firstChild(){var e=this.children;return e&&e[0]||null},get lastChild(){var e=this.children;return e&&e[e.length-1]||null},get nodeType(){return i[this.type]||i.element}},Object.keys(s).forEach(function(e){var t=s[e];Object.defineProperty(o.prototype,e,{get:function(){return this[t]||null},set:function(e){return this[t]=e,e}});}),t.createDocument=function(){return new o({type:"root",name:"root",parent:null,prev:null,next:null,children:[],"x-mode":r.NO_QUIRKS})},t.createDocumentFragment=function(){return new o({type:"root",name:"root",parent:null,prev:null,next:null,children:[]})},t.createElement=function(e,t,n){for(var r=Object.create(null),i=Object.create(null),s=Object.create(null),T=0;T first + second,\n "")\n\n' + + "const Foo = ({ bar, baz, things }) => {\n" + + ' return
\n' + + "
{things.map(thing => reallyLongPleaseDontPutOnOneLine(thing) ?

{ok}

: )\n" + + " }
}" + ); + } +})(); diff --git a/docs/worker.js b/docs/worker.js new file mode 100644 index 000000000..f86bf574b --- /dev/null +++ b/docs/worker.js @@ -0,0 +1,53 @@ +/* eslint-env worker */ +/* eslint no-var: off, strict: off */ + +// "Polyfills" in order for all the code to run +self.global = self; +self.Buffer = { + isBuffer: function() { + return false; + } +}; +// eslint-disable-next-line +fs = module$1 = module = path = os = crypto = {}; +self.process = { argv: [], env: {} }; +self.assert = { ok: function() {}, strictEqual: function() {} }; +self.require = function require(path) { + return self[path.replace(/.+-/, "")]; +}; + +importScripts("lib/index.js"); +var prettier = index; // eslint-disable-line + +var parsersLoaded = {}; + +self.onmessage = function(message) { + lazyLoadParser(message.data.options.parser); + + var formatted, doc; + try { + formatted = prettier.format(message.data.text, message.data.options); + } catch (e) { + formatted = e.toString(); + } + + if (message.data.doc) { + try { + doc = prettier.__debug.formatDoc( + prettier.__debug.printToDoc(message.data.text, message.data.options), + {} + ); + } catch (e) { + doc = e.toString(); + } + } + + self.postMessage({ formatted: formatted, doc: doc }); +}; + +function lazyLoadParser(parser) { + if (!parsersLoaded[parser]) { + importScripts("lib/parser-" + parser + ".js"); + parsersLoaded[parser] = true; + } +} diff --git a/scripts/build/build.sh b/scripts/build/build.sh index 4c51239bb..4c0e57480 100755 --- a/scripts/build/build.sh +++ b/scripts/build/build.sh @@ -3,8 +3,8 @@ set -e cd "$(dirname "$0")"; cd ../..; -rm -Rf dist/ -rm -f docs/*.js +rm -Rf dist/ docs/lib/ +mkdir -p docs/lib/ ## --- Lib --- @@ -43,12 +43,12 @@ echo; ## --- Docs --- echo 'Bundling docs index...'; -cp dist/index.js docs/index.js -node_modules/babel-cli/bin/babel.js dist/index.js --out-file docs/index.js --presets=es2015 +cp dist/index.js docs/lib/index.js +node_modules/babel-cli/bin/babel.js dist/index.js --out-file docs/lib/index.js --presets=es2015 echo 'Bundling docs babylon...'; node_modules/.bin/rollup -c scripts/build/rollup.docs.config.js --environment filepath:parser-babylon.js -node_modules/babel-cli/bin/babel.js docs/parser-babylon.js --out-file docs/parser-babylon.js --presets=es2015 +node_modules/babel-cli/bin/babel.js docs/lib/parser-babylon.js --out-file docs/lib/parser-babylon.js --presets=es2015 echo 'Bundling docs flow...'; node_modules/.bin/rollup -c scripts/build/rollup.docs.config.js --environment filepath:parser-flow.js @@ -72,6 +72,9 @@ echo; echo 'Remove eval' sed -i '' -e 's/eval("require")/require/g' dist/index.js dist/bin/prettier.js +echo 'Create prettier-version.js' +node -p '`prettierVersion = "${require(".").version}";`' > docs/lib/prettier-version.js + echo 'Copy package.json' cp package.json dist/ diff --git a/scripts/build/rollup.docs.config.js b/scripts/build/rollup.docs.config.js index f967ac7dd..30b746c7f 100644 --- a/scripts/build/rollup.docs.config.js +++ b/scripts/build/rollup.docs.config.js @@ -10,7 +10,7 @@ const basename = filename.replace(/\..+/, ''); export default Object.assign(baseConfig, { entry: 'dist/' + filepath, - dest: 'docs/' + filename, + dest: 'docs/lib/' + filename, format: 'iife', plugins: [json(), resolve({ preferBuiltins: true }), commonjs(), globals()], useStrict: false,